diff --git a/.env.example b/.env.example index ca4260a..56afef4 100644 --- a/.env.example +++ b/.env.example @@ -1,21 +1,12 @@ # Authentication EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_key_here +# Release CLI only. Do not prefix with EXPO_PUBLIC_ and do not expose as plaintext. +CLERK_SECRET_KEY=sk_live_or_sk_test_for_release_scripts -# Database -DATABASE_URL=postgresql://username:password@localhost:5432/prepai_db - -# External APIs -KROGER_CLIENT_ID=your_kroger_client_id -KROGER_CLIENT_SECRET=your_kroger_client_secret -EDAMAM_APP_ID=your_edamam_app_id -EDAMAM_APP_KEY=your_edamam_app_key -OPENAI_API_KEY=your_openai_api_key - -# OpenAI Configuration -OPENAI_BASE_URL=https://api.openai.com/v1 -OPENAI_MODEL=gpt-5.5 +# Local AI +EXPO_PUBLIC_LOCAL_AI_ENABLED=true +EXPO_PUBLIC_LOCAL_AI_PROVIDER=executorch +EXPO_PUBLIC_CLOUD_AI_FALLBACK=false # App Configuration EXPO_PUBLIC_APP_ENV=development -EXPO_PUBLIC_API_BASE_URL=https://prepai.com -EXPO_PUBLIC_API_URL=https://prepai.com diff --git a/.eslintignore b/.eslintignore index 4c0acb3..cbcbe72 100644 --- a/.eslintignore +++ b/.eslintignore @@ -8,4 +8,6 @@ prisma/generated/ # Build outputs dist/ +dist-ios-check/ +dist-web-check/ build/ diff --git a/.github/actions/setup-node-environment/action.yaml b/.github/actions/setup-node-environment/action.yaml index 74b0b93..fe26ac1 100644 --- a/.github/actions/setup-node-environment/action.yaml +++ b/.github/actions/setup-node-environment/action.yaml @@ -1,32 +1,42 @@ -name: "Setup Node environment" -description: "Checkout, cache and bun install" - -inputs: - node-version: - description: 'The Node.js version to use' - required: true - default: '18' - cache-path: - description: 'The path to cache node modules' - required: true - cache-key: - description: 'The key for caching' - required: true - -runs: - using: 'composite' - steps: - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{ inputs.node-version }} - - name: Install Bun - shell: bash - run: | - curl -fsSL https://bun.sh/install | bash - echo "$HOME/.bun/bin" >> $GITHUB_PATH - - name: Cache Node modules - uses: actions/cache@v4 - with: - path: ${{ inputs.cache-path }} - key: ${{ inputs.cache-key }} +name: 'Setup Node environment' +description: 'Checkout, cache and bun install' + +inputs: + node-version: + description: 'The Node.js version to use' + required: false + default: '' + node-version-file: + description: 'The Node.js version file to use' + required: false + default: '.nvmrc' + cache-path: + description: 'The path to cache node modules' + required: true + cache-key: + description: 'The key for caching' + required: true + +runs: + using: 'composite' + steps: + - name: Set up Node.js from explicit version + if: ${{ inputs.node-version != '' }} + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node-version }} + - name: Set up Node.js from version file + if: ${{ inputs.node-version == '' }} + uses: actions/setup-node@v4 + with: + node-version-file: ${{ inputs.node-version-file }} + - name: Install Bun + shell: bash + run: | + curl -fsSL https://bun.sh/install | bash + echo "$HOME/.bun/bin" >> $GITHUB_PATH + - name: Cache Node modules + uses: actions/cache@v4 + with: + path: ${{ inputs.cache-path }} + key: ${{ inputs.cache-key }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0744fac..29cfef4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,6 @@ jobs: - uses: ./.github/actions/setup-node-environment with: - node-version: '20' cache-path: 'node_modules' cache-key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }} @@ -30,6 +29,22 @@ jobs: - name: Lint run: bun run lint + - name: Startup module-work guard + run: bun run guard:startup + + - name: Module work advisory report + env: + MODULE_WORK_REPORT_OUTPUT: dist/module-work-report.json + run: bun run report:module-work + + - name: Upload module work report + if: always() + uses: actions/upload-artifact@v4 + with: + name: module-work-report + path: dist/module-work-report.json + if-no-files-found: ignore + - name: Test run: bun run test -- --runInBand @@ -37,11 +52,45 @@ jobs: run: bun run doctor - name: Verify iOS export - run: | - bunx expo export --platform ios --output-dir dist-ios-check - rm -rf dist-ios-check + run: rm -f .expo/atlas.jsonl && EXPO_ATLAS=true NODE_ENV=production METRO_MAX_WORKERS=1 bunx expo export --platform ios --output-dir dist-ios-check - name: Verify web export - run: | - bunx expo export --platform web --output-dir dist-web-check - rm -rf dist-web-check + run: METRO_MAX_WORKERS=1 bunx expo export --platform web --output-dir dist-web-check + + - name: Production readiness guardrails + run: bun run verify:production + + - name: Expo Atlas bundle report + env: + ATLAS_SUMMARY_OUTPUT: dist/atlas-summary.json + run: bun run report:atlas + + - name: Upload Expo Atlas artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: expo-atlas + path: | + dist/atlas-summary.json + .expo/atlas.jsonl + if-no-files-found: ignore + + - name: Performance baseline report + env: + PERFORMANCE_BASELINE_OUTPUT: dist/performance-baseline.json + run: bun run perf:baseline:report + + - name: Upload performance baseline + if: always() + uses: actions/upload-artifact@v4 + with: + name: performance-baseline + path: dist/performance-baseline.json + if-no-files-found: ignore + + - name: Dead code and dependency audit + run: bun run knip:check + + - name: Cleanup export artifacts + if: always() + run: rm -rf dist-ios-check dist-web-check diff --git a/.github/workflows/release-dev.yaml b/.github/workflows/release-dev.yaml index d363558..2d1b57b 100644 --- a/.github/workflows/release-dev.yaml +++ b/.github/workflows/release-dev.yaml @@ -22,7 +22,6 @@ jobs: - uses: ./.github/actions/setup-node-environment with: - node-version: '20' cache-path: 'node_modules' cache-key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }} diff --git a/.github/workflows/release-ipa.yml b/.github/workflows/release-ipa.yml index 75f518b..6384a9e 100644 --- a/.github/workflows/release-ipa.yml +++ b/.github/workflows/release-ipa.yml @@ -19,7 +19,6 @@ jobs: - uses: ./.github/actions/setup-node-environment with: - node-version: '20' cache-path: 'node_modules' cache-key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }} @@ -30,13 +29,14 @@ jobs: - name: Install dependencies run: bun install --frozen-lockfile - - name: Verify release candidate - run: bun run verify + - name: Verify EAS production environment + run: bun run verify:release-env - - name: Verify iOS bundle export - run: | - bunx expo export --platform ios --output-dir dist-ios-check - rm -rf dist-ios-check + - name: Verify App Store URLs + run: bun run verify:appstore-urls + + - name: Verify App Store release candidate + run: bun run test:readiness - name: Build production iOS app run: eas build --platform ios --profile production --non-interactive --wait diff --git a/.gitignore b/.gitignore index 26f5a45..c3f0b87 100644 --- a/.gitignore +++ b/.gitignore @@ -5,8 +5,10 @@ node_modules/ # Expo .expo/ dist/ +dist-*-check/ web-build/ android +builds/ # Native *.orig.* diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..f234c57 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20.19.3 diff --git a/README.md b/README.md index d14c18b..a7942ee 100644 --- a/README.md +++ b/README.md @@ -906,10 +906,10 @@ bun run test -- src/components/Button.test.tsx ```bash # Validate production readiness -bunx expo-doctor -./node_modules/.bin/tsc --noEmit --pretty false -bun run lint -bun run test -- --runInBand +bun run test:readiness + +# Inspect the production iOS bundle graph with Expo Atlas +bun run analyze:atlas # Deploy web bun run deploy:web:prod @@ -919,7 +919,7 @@ eas build --platform ios --profile production --non-interactive eas submit --platform ios --latest ``` -See [docs/ios-app-store-release.md](docs/ios-app-store-release.md) for the iOS App Store checklist, required production secrets, HealthKit review notes, and the required $4.99 App Store Connect price. +See [docs/ios-app-store-release.md](docs/ios-app-store-release.md) for the iOS App Store checklist, required production secrets, HealthKit review notes, and the required $4.99 App Store Connect price. See [docs/production-performance.md](docs/production-performance.md) for the release profiling and guardrail workflow. ## 🤝 Contributing diff --git a/app.json b/app.json index 58b426d..c6585a7 100644 --- a/app.json +++ b/app.json @@ -27,12 +27,27 @@ "expo-secure-store", "expo-asset", "expo-background-task", + [ + "expo-build-properties", + { + "android": { + "enableProguardInReleaseBuilds": true, + "enableShrinkResourcesInReleaseBuilds": true, + "networkInspector": false + }, + "ios": { + "deploymentTarget": "16.4", + "networkInspector": false + } + } + ], + "./plugins/with-fmt-xcode26-fix", [ "@kingstinct/react-native-healthkit", { "NSHealthShareUsageDescription": "PrepAI imports activity, workouts, sleep, hydration, and body measurements from Apple Health to personalize your nutrition and fitness plan.", - "NSHealthUpdateUsageDescription": "PrepAI can save health and fitness updates you explicitly choose to sync.", - "background": true + "NSHealthUpdateUsageDescription": false, + "background": false } ] ], @@ -44,19 +59,20 @@ "resizeMode": "contain", "backgroundColor": "#000000" }, - "assetBundlePatterns": ["**/*"], + "assetBundlePatterns": [ + "**/*" + ], "web": { "bundler": "metro", - "output": "server", + "output": "static", "favicon": "./src/assets/favicon.png" }, "ios": { - "supportsTablet": true, + "supportsTablet": false, "bundleIdentifier": "com.jongan69.prepai", "infoPlist": { "ITSAppUsesNonExemptEncryption": false, - "NSHealthShareUsageDescription": "PrepAI imports activity, workouts, sleep, hydration, and body measurements from Apple Health to personalize your nutrition and fitness plan.", - "NSHealthUpdateUsageDescription": "PrepAI can save health and fitness updates you explicitly choose to sync." + "NSHealthShareUsageDescription": "PrepAI imports activity, workouts, sleep, hydration, and body measurements from Apple Health to personalize your nutrition and fitness plan." } }, "android": { @@ -72,11 +88,10 @@ "eas": { "projectId": "30d0bb01-8e31-4a5f-8de4-549fd39256b9" }, - "apiBaseUrl": "https://prepai.com", "appInfo": { "name": "PrepAI", - "tagline": "Transform Your Fitness Journey with AI", - "description": "PrepAI combines artificial intelligence with personalized nutrition and workout planning to help you achieve your health goals faster and more effectively.", + "tagline": "Local-first health intelligence", + "description": "PrepAI keeps nutrition, workouts, hydration, sleep, body metrics, supplement logs, and Apple Health imports organized in a private local-first health tracker.", "version": "1.0.0", "socialMedia": { "twitter": "https://twitter.com/prepai", diff --git a/bun.lock b/bun.lock index 719c4c1..a8510f2 100644 --- a/bun.lock +++ b/bun.lock @@ -6,30 +6,27 @@ "name": "prepai", "dependencies": { "@clerk/clerk-expo": "^2.14.25", - "@expo-google-fonts/outfit": "^0.4.2", "@expo/metro-runtime": "~5.0.5", "@kingstinct/react-native-healthkit": "^14.0.2", - "@prisma/extension-accelerate": "^2.0.2", "@react-native-community/datetimepicker": "8.4.1", "@react-navigation/drawer": "^7.3.9", - "@reduxjs/toolkit": "^2.8.2", - "@shopify/flash-list": "1.7.6", - "@types/swagger-jsdoc": "^6.0.4", "eslint-config-prettier": "^9.1.2", "eslint-plugin-prettier": "^5.5.4", "expo": "~53.0.27", + "expo-asset": "~11.1.7", "expo-auth-session": "^6.2.1", "expo-background-task": "^0.2.8", "expo-blur": "^14.1.5", + "expo-build-properties": "~0.14.8", "expo-constants": "~17.1.8", "expo-dev-client": "~5.2.4", "expo-document-picker": "~13.1.6", "expo-file-system": "~18.1.11", + "expo-font": "~13.3.2", "expo-haptics": "^14.1.4", "expo-image-picker": "^16.1.4", "expo-linear-gradient": "^14.1.5", "expo-linking": "~7.1.7", - "expo-location": "^18.1.6", "expo-navigation-bar": "~4.2.8", "expo-router": "~5.1.11", "expo-secure-store": "~14.2.4", @@ -37,10 +34,9 @@ "expo-splash-screen": "^0.30.10", "expo-sqlite": "~15.2.14", "expo-status-bar": "~2.2.3", + "expo-system-ui": "~5.0.11", "expo-updates": "~0.28.18", "expo-web-browser": "^14.2.0", - "idb": "^8.0.3", - "lottie-react-native": "7.2.2", "lucide-react-native": "^0.542.0", "nativewind": "^4.1.23", "prettier": "^3.6.2", @@ -48,11 +44,12 @@ "react-dom": "19.0.0", "react-native": "0.79.6", "react-native-actions-sheet": "^0.9.7", - "react-native-calendars": "^1.1313.0", "react-native-chart-kit": "^6.12.0", + "react-native-executorch": "0.8.4", "react-native-gesture-handler": "~2.24.0", "react-native-modal": "^14.0.0-rc.1", "react-native-nitro-modules": "^0.35.9", + "react-native-performance": "6.0.0", "react-native-reanimated": "~3.17.5", "react-native-safe-area-context": "5.4.0", "react-native-screens": "~4.11.1", @@ -60,30 +57,23 @@ "react-native-toast-message": "^2.3.3", "react-native-web": "^0.20.0", "react-native-wheel-picker-expo": "^0.5.4", - "react-redux": "^9.2.0", - "redux": "^5.0.1", - "redux-devtools-expo-dev-plugin": "^0.2.1", - "semver": "^7.7.2", - "sql.js": "^1.13.0", - "swagger-jsdoc": "^6.2.8", "tailwind-merge": "^3.3.1", + "zustand": "^5.0.14", }, "devDependencies": { "@babel/core": "^7.28.3", "@expo/ngrok": "^4.1.3", - "@testing-library/react-hooks": "^8.0.1", "@testing-library/react-native": "^13.3.3", "@types/jest": "^29.5.14", "@types/react": "~19.0.14", - "@types/sql.js": "^1.4.9", "eslint": "^8.57.1", "eslint-config-expo": "~9.2.0", + "expo-atlas": "0.4.3", "jest": "^29.7.0", "jest-expo": "~53.0.14", - "prettier-plugin-tailwindcss": "^0.5.14", - "sqlite3": "^5.1.7", + "knip": "^6.17.1", + "signal-exit": "^3.0.7", "tailwindcss": "^3.4.17", - "ts-node": "^10.9.2", "typescript": "~5.8.3", }, }, @@ -97,14 +87,6 @@ "@ampproject/remapping": ["@ampproject/remapping@2.3.0", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw=="], - "@apidevtools/json-schema-ref-parser": ["@apidevtools/json-schema-ref-parser@9.1.2", "", { "dependencies": { "@jsdevtools/ono": "^7.1.3", "@types/json-schema": "^7.0.6", "call-me-maybe": "^1.0.1", "js-yaml": "^4.1.0" } }, "sha512-r1w81DpR+KyRWd3f+rk6TNqMgedmAxZP5v5KWlXQWlgMUUtyEJch0DKEci1SorPMiSeM8XPl7MZ3miJ60JIpQg=="], - - "@apidevtools/openapi-schemas": ["@apidevtools/openapi-schemas@2.1.0", "", {}, "sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ=="], - - "@apidevtools/swagger-methods": ["@apidevtools/swagger-methods@3.0.2", "", {}, "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg=="], - - "@apidevtools/swagger-parser": ["@apidevtools/swagger-parser@10.0.3", "", { "dependencies": { "@apidevtools/json-schema-ref-parser": "^9.0.6", "@apidevtools/openapi-schemas": "^2.0.4", "@apidevtools/swagger-methods": "^3.0.2", "@jsdevtools/ono": "^7.1.3", "call-me-maybe": "^1.0.1", "z-schema": "^5.0.1" }, "peerDependencies": { "openapi-types": ">=7" } }, "sha512-sNiLY51vZOmSPFZA5TF35KZ2HbgYklQnTSDnkghamzLb3EkNtcQnrBQEj5AOCxHpTtXpqMCRM1CrmV2rG6nw4g=="], - "@babel/code-frame": ["@babel/code-frame@7.27.1", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg=="], "@babel/compat-data": ["@babel/compat-data@7.28.0", "", {}, "sha512-60X7qkglvrap8mn1lh2ebxXdZYtUcpd7gsmy9kLaBJ4i/WdY8PqTSdxyA8qraikqKQK5C1KRBKXqznrVapyNaw=="], @@ -317,6 +299,12 @@ "@egjs/hammerjs": ["@egjs/hammerjs@2.0.17", "", { "dependencies": { "@types/hammerjs": "^2.0.36" } }, "sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A=="], + "@emnapi/core": ["@emnapi/core@1.10.0", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.1", "tslib": "^2.4.0" } }, "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw=="], + + "@emnapi/runtime": ["@emnapi/runtime@1.10.0", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA=="], + + "@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w=="], + "@emotion/babel-plugin": ["@emotion/babel-plugin@11.13.5", "", { "dependencies": { "@babel/helper-module-imports": "^7.16.7", "@babel/runtime": "^7.18.3", "@emotion/hash": "^0.9.2", "@emotion/memoize": "^0.9.0", "@emotion/serialize": "^1.3.3", "babel-plugin-macros": "^3.1.0", "convert-source-map": "^1.5.0", "escape-string-regexp": "^4.0.0", "find-root": "^1.1.0", "source-map": "^0.5.7", "stylis": "4.2.0" } }, "sha512-pxHCpT2ex+0q+HH91/zsdHkw/lXd468DIN2zvfvLtPKLLMo6gQj7oLObq8PhkrxOZb/gGCq03S3Z7PDhS8pduQ=="], "@emotion/cache": ["@emotion/cache@11.11.0", "", { "dependencies": { "@emotion/memoize": "^0.8.1", "@emotion/sheet": "^1.2.2", "@emotion/utils": "^1.2.1", "@emotion/weak-memoize": "^0.3.1", "stylis": "4.2.0" } }, "sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ=="], @@ -357,8 +345,6 @@ "@eslint/plugin-kit": ["@eslint/plugin-kit@0.3.5", "", { "dependencies": { "@eslint/core": "^0.15.2", "levn": "^0.4.1" } }, "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w=="], - "@expo-google-fonts/outfit": ["@expo-google-fonts/outfit@0.4.2", "", {}, "sha512-YLG+jmgWDEj8nE/dXQErvckaeLtotpP5IDbW9grr1R+tZ5a2As/Ystw7AEOMCfoQmNOGO+WAluLQMlUqTdiM/A=="], - "@expo/cli": ["@expo/cli@0.24.24", "", { "dependencies": { "@0no-co/graphql.web": "^1.0.8", "@babel/runtime": "^7.20.0", "@expo/code-signing-certificates": "^0.0.6", "@expo/config": "~11.0.13", "@expo/config-plugins": "~10.1.2", "@expo/devcert": "^1.1.2", "@expo/env": "~1.0.7", "@expo/image-utils": "^0.7.6", "@expo/json-file": "^9.1.5", "@expo/metro-config": "~0.20.18", "@expo/osascript": "^2.2.5", "@expo/package-manager": "^1.8.6", "@expo/plist": "^0.3.5", "@expo/prebuild-config": "^9.0.12", "@expo/schema-utils": "^0.1.0", "@expo/spawn-async": "^1.7.2", "@expo/ws-tunnel": "^1.0.1", "@expo/xcpretty": "^4.3.0", "@react-native/dev-middleware": "0.79.6", "@urql/core": "^5.0.6", "@urql/exchange-retry": "^1.3.0", "accepts": "^1.3.8", "arg": "^5.0.2", "better-opn": "~3.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", "env-editor": "^0.4.1", "freeport-async": "^2.0.0", "getenv": "^2.0.0", "glob": "^10.4.2", "lan-network": "^0.1.6", "minimatch": "^9.0.0", "node-forge": "^1.3.3", "npm-package-arg": "^11.0.0", "ora": "^3.4.0", "picomatch": "^3.0.1", "pretty-bytes": "^5.6.0", "pretty-format": "^29.7.0", "progress": "^2.0.3", "prompts": "^2.3.2", "qrcode-terminal": "0.11.0", "require-from-string": "^2.0.2", "requireg": "^0.2.2", "resolve": "^1.22.2", "resolve-from": "^5.0.0", "resolve.exports": "^2.0.3", "semver": "^7.6.0", "send": "^0.19.0", "slugify": "^1.3.4", "source-map-support": "~0.5.21", "stacktrace-parser": "^0.1.10", "structured-headers": "^0.4.1", "tar": "^7.4.3", "terminal-link": "^2.1.1", "undici": "^6.18.2", "wrap-ansi": "^7.0.0", "ws": "^8.12.1" }, "bin": { "expo-internal": "build/bin/cli" } }, "sha512-XybHfF2QNPJNnHoUKHcG796iEkX5126UuTAs6MSpZuvZRRQRj/sGCLX+driCOVHbDOpcCOusMuHrhxHbtTApyg=="], "@expo/code-signing-certificates": ["@expo/code-signing-certificates@0.0.6", "", { "dependencies": { "node-forge": "^1.3.3" } }, "sha512-iNe0puxwBNEcuua9gmTGzq+SuMDa0iATai1FlFTMHJ/vUmKvN/V//drXoLJkVb5i5H3iE/n/qIJxyoBnXouD0w=="], @@ -421,7 +407,7 @@ "@expo/sdk-runtime-versions": ["@expo/sdk-runtime-versions@1.0.0", "", {}, "sha512-Doz2bfiPndXYFPMRwPyGa1k5QaKDVpY806UJj570epIiMzWaYyCtobasyfC++qfIXVb5Ocy7r3tP9d62hAQ7IQ=="], - "@expo/server": ["@expo/server@0.6.3", "", { "dependencies": { "abort-controller": "^3.0.0", "debug": "^4.3.4", "source-map-support": "~0.5.21", "undici": "^6.18.2 || ^7.0.0" } }, "sha512-Ea7NJn9Xk1fe4YeJ86rObHSv/bm3u/6WiQPXEqXJ2GrfYpVab2Swoh9/PnSM3KjR64JAgKjArDn1HiPjITCfHA=="], + "@expo/server": ["@expo/server@0.5.3", "", { "dependencies": { "abort-controller": "^3.0.0", "debug": "^4.3.4", "source-map-support": "~0.5.21", "undici": "^6.18.2" } }, "sha512-WXsWzeBs5v/h0PUfHyNLLz07rwwO5myQ1A5DGYewyyGLmsyl61yVCe8AgAlp1wkiMsqhj2hZqI2u3K10QnCMrQ=="], "@expo/spawn-async": ["@expo/spawn-async@1.7.2", "", { "dependencies": { "cross-spawn": "^7.0.3" } }, "sha512-QdWi16+CHB9JYP7gma19OVVg0BFkvU8zNj9GjWorYI8Iv8FUxjOCcYRuAmX4s/h91e4e7BPsskc8cSrZYho9Ew=="], @@ -443,7 +429,7 @@ "@formkit/auto-animate": ["@formkit/auto-animate@0.8.4", "", {}, "sha512-DHHC01EJ1p70Q0z/ZFRBIY8NDnmfKccQoyoM84Tgb6omLMat6jivCdf272Y8k3nf4Lzdin/Y4R9q8uFtU0GbnA=="], - "@gar/promisify": ["@gar/promisify@1.1.3", "", {}, "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw=="], + "@huggingface/jinja": ["@huggingface/jinja@0.5.9", "", {}, "sha512-uWTG+l3VJRsl7EXxYizuL3P+cCPoc3cRqbWWRcQN0FhejRfbdq0RNhCmbY/YDtnTcz9icdLYuLDjsnz4d8JMuw=="], "@humanfs/core": ["@humanfs/core@0.19.1", "", {}, "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA=="], @@ -513,10 +499,10 @@ "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.25", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ=="], - "@jsdevtools/ono": ["@jsdevtools/ono@7.1.3", "", {}, "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg=="], - "@kingstinct/react-native-healthkit": ["@kingstinct/react-native-healthkit@14.0.2", "", { "peerDependencies": { "react": ">=19", "react-native": ">=0.79", "react-native-nitro-modules": ">=0.35" } }, "sha512-ed6x7xtSaML8qy8qswJWlVPKImeNEvHfWtuzylQZ9MsxgLriv33gDjf/8iWIcB4SKCW/BZNOFBcCqTQq5i5zmw=="], + "@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.1.5", "", { "dependencies": { "@tybys/wasm-util": "^0.10.2" }, "peerDependencies": { "@emnapi/core": "^1.7.1", "@emnapi/runtime": "^1.7.1" } }, "sha512-AWPoBRJ9tsnVhor4sjO7rkni+7p+2IAEFj6cx06UgP10jkQHqay/36uRV/bFkgrh18D9vb4cr8Q0Pthskgzy+Q=="], + "@noble/ciphers": ["@noble/ciphers@1.3.0", "", {}, "sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw=="], "@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], @@ -531,17 +517,89 @@ "@nolyfill/is-core-module": ["@nolyfill/is-core-module@1.0.39", "", {}, "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA=="], - "@npmcli/fs": ["@npmcli/fs@1.1.1", "", { "dependencies": { "@gar/promisify": "^1.0.1", "semver": "^7.3.5" } }, "sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ=="], + "@oxc-parser/binding-android-arm-eabi": ["@oxc-parser/binding-android-arm-eabi@0.135.0", "", { "os": "android", "cpu": "arm" }, "sha512-sHeZItACNcA5WRAWqF6ixriR4GkZDyY10gVgnZU7pXku1DjHFATSqnwZM809jl0gXPHxb6fKzYQCK7bNK5cACQ=="], - "@npmcli/move-file": ["@npmcli/move-file@1.1.2", "", { "dependencies": { "mkdirp": "^1.0.4", "rimraf": "^3.0.2" } }, "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg=="], + "@oxc-parser/binding-android-arm64": ["@oxc-parser/binding-android-arm64@0.135.0", "", { "os": "android", "cpu": "arm64" }, "sha512-wPte+SzgzWWFgMSF8YZDNM+tBXtJg0AXBi7+tU3yS2z1f2Af9kRLZLKuJojADmuD/cZexmnMHHC3SDItTW77Iw=="], - "@pkgjs/parseargs": ["@pkgjs/parseargs@0.11.0", "", {}, "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg=="], + "@oxc-parser/binding-darwin-arm64": ["@oxc-parser/binding-darwin-arm64@0.135.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-BmKz3lHIsqVos+9aPcdYCT9MG3APoUyM43KlEFhJMWNVDOGG8FKyiFz81Bc+mGz2o0hpuQ3PfXLfVWJrKXjo2g=="], - "@pkgr/core": ["@pkgr/core@0.2.9", "", {}, "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA=="], + "@oxc-parser/binding-darwin-x64": ["@oxc-parser/binding-darwin-x64@0.135.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-dM8BS+8+Br1fNvmh2QZbGiHaYttwLebRa6J4Uz9vuFzMNmvsdRYwf7993ptOaV0JTrR63AaoVLjX7nhWbijxjQ=="], + + "@oxc-parser/binding-freebsd-x64": ["@oxc-parser/binding-freebsd-x64@0.135.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-xlZnvvJdR9bGu2pOhvR5hMuKPHCE6Sa9owK5A484mzjHdm75VRV5nCs5w/jkmGODMMTFc+KN7EnZqEieM813kw=="], + + "@oxc-parser/binding-linux-arm-gnueabihf": ["@oxc-parser/binding-linux-arm-gnueabihf@0.135.0", "", { "os": "linux", "cpu": "arm" }, "sha512-PSR8LmBK/H/PQRiN8g7RebQgZX/ntVCrdT/JBfNxE5ezdHG1s2i4rbazsRJYD83TTI1MmgTpC0MGL42PLtskQQ=="], + + "@oxc-parser/binding-linux-arm-musleabihf": ["@oxc-parser/binding-linux-arm-musleabihf@0.135.0", "", { "os": "linux", "cpu": "arm" }, "sha512-I85GJXzfUsigkkk7Ngdz95C217M4FdUi1Z2HrX5UyPmURobwQZ7m2bbUvwFkz4VGZd+lymFGKHvDZ3RQC9qOzA=="], + + "@oxc-parser/binding-linux-arm64-gnu": ["@oxc-parser/binding-linux-arm64-gnu@0.135.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-zqEY0npz0g0aGZj/8a5BclunjVDytsBQHYtIC10Gd26HcrLwbVF6YDbqRQjunMGYdSo97u6xOBl05aTDI2diDQ=="], + + "@oxc-parser/binding-linux-arm64-musl": ["@oxc-parser/binding-linux-arm64-musl@0.135.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-mWAfprP819gQ2qYst1RxgTI8b/z0b29OpoKfRflIXLHde2dZLihQD4g47Onuvtpo5GPIkMYPRlX9QoeZfs/GnQ=="], + + "@oxc-parser/binding-linux-ppc64-gnu": ["@oxc-parser/binding-linux-ppc64-gnu@0.135.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-gri8c2AOmJKJwOux2KTHFBfUaXoJURuVMKhmKEi/2hTF55cQteTDV2XNfTiE5oCC+Tnem1Y4/MWzcyDadtsSag=="], + + "@oxc-parser/binding-linux-riscv64-gnu": ["@oxc-parser/binding-linux-riscv64-gnu@0.135.0", "", { "os": "linux", "cpu": "none" }, "sha512-Y2tkupCG5wo0SxH2rMLG4d4Kmv6DaM3sBp+GuM5lox0S8Za6VxKgQrY2Mut088QQxKkEE89n/4CCCgmw2o0e3Q=="], + + "@oxc-parser/binding-linux-riscv64-musl": ["@oxc-parser/binding-linux-riscv64-musl@0.135.0", "", { "os": "linux", "cpu": "none" }, "sha512-xDRJq6i6WTynjeP+ISbDpyH4p9BaJ0wuQcL0lCSDkt9qOXC9dmwpOu1VG/TlwmPI3KpYntmO9nJCuc3TMTsNBA=="], + + "@oxc-parser/binding-linux-s390x-gnu": ["@oxc-parser/binding-linux-s390x-gnu@0.135.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-V4MoUuiCRNvihxhIufRxvK+ka013V4joTSK0FAGA1KEjLuNprfH6N/Qw2uxQEVIFuNYMhD/hV6xJ/ptbzlKdHg=="], + + "@oxc-parser/binding-linux-x64-gnu": ["@oxc-parser/binding-linux-x64-gnu@0.135.0", "", { "os": "linux", "cpu": "x64" }, "sha512-JCFZ7zM7KXOKoPAbK/ZB4wY0M1jxRECiem2UQuiXLjzGqS9+hno7mtX+qyK2F7HWK2xPhyJb+frpcOtk5DKOtg=="], + + "@oxc-parser/binding-linux-x64-musl": ["@oxc-parser/binding-linux-x64-musl@0.135.0", "", { "os": "linux", "cpu": "x64" }, "sha512-9jSVS1b3hOV7sdKH4aA2DFfnTz0RgQd0v2BefR+LYbH8yIlmSM22JJZbAAjVeVXmFgUAk3zJQ1tpE/Nd+Vi2YQ=="], + + "@oxc-parser/binding-openharmony-arm64": ["@oxc-parser/binding-openharmony-arm64@0.135.0", "", { "os": "none", "cpu": "arm64" }, "sha512-M857ZLBSdn1Uy/SJJz5zh0qGu67B4P9omCgXGBU2LLqTzraX6ZjVNaKq5yW1PDw/LgJXDXR/dbZfgmB310f11Q=="], + + "@oxc-parser/binding-wasm32-wasi": ["@oxc-parser/binding-wasm32-wasi@0.135.0", "", { "dependencies": { "@emnapi/core": "1.10.0", "@emnapi/runtime": "1.10.0", "@napi-rs/wasm-runtime": "^1.1.4" }, "cpu": "none" }, "sha512-2w6DVcntQZX9U5RhXtgiWb3FLWFB5EcwI1U8yr3htOCJUJjagN4BFUHz/Y/d9ZsumndZ6ByxxWEtbUZNE1bfFw=="], + + "@oxc-parser/binding-win32-arm64-msvc": ["@oxc-parser/binding-win32-arm64-msvc@0.135.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-rX1U8+IH2Z37EJjDXKa1iifvUQAdba+vZ4Ewj1iaG5eA/QaSybzclCOwtWa0/5BuUQnnK/T2JHUEFrwhL6Ck2Q=="], + + "@oxc-parser/binding-win32-ia32-msvc": ["@oxc-parser/binding-win32-ia32-msvc@0.135.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-9FAisBbH1QICGAjlJobiuKGd/jOuVmyqniWdQMwTa5SkCl6hhuotBCJf1n46B0flYbSOR5TzfV9HZCWSyb3c/Q=="], + + "@oxc-parser/binding-win32-x64-msvc": ["@oxc-parser/binding-win32-x64-msvc@0.135.0", "", { "os": "win32", "cpu": "x64" }, "sha512-wYF+A2AzJ2n7ul6q+Z2G/ia0S2+8cUp0AgWZzoFvF4WmUcl1P7p+o6se1Gdr5wGnWuF0iAMIkGddrjCarNr2yA=="], + + "@oxc-project/types": ["@oxc-project/types@0.135.0", "", {}, "sha512-wR+xRdFkUBMvcAjBJ2q2kcZM6d+DKu2NgoOyxZgYwZdLhmiv6+rnO8PZ/P68kMiZtIKm+pW7zyEJ4kSOs0vo+Q=="], + + "@oxc-resolver/binding-android-arm-eabi": ["@oxc-resolver/binding-android-arm-eabi@11.21.3", "", { "os": "android", "cpu": "arm" }, "sha512-eNU11A2WNizh04v3uyaJCootrHIaS0B9aHYXvAvVnPNk4xYSjMUjHnhQ6dewPN2MRYDskV85d1N0Aw0WNWhcyg=="], + + "@oxc-resolver/binding-android-arm64": ["@oxc-resolver/binding-android-arm64@11.21.3", "", { "os": "android", "cpu": "arm64" }, "sha512-8Q+ZjTLvn2dIcWsrmhdrEihm7q+ag/k+mkry7Z+t0QbbHaVxXQfvH9AewyVMh/WrpEKhQ3DDgx9fYbqeCpeOEw=="], + + "@oxc-resolver/binding-darwin-arm64": ["@oxc-resolver/binding-darwin-arm64@11.21.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-wkh0qKZGHXVUDxFw3oA1TXnU2BDYY/r775oJflGeIr8uDPPoN2pk8gijQIzYRT6hoql/lg3+Tx/SaTn9e2/aGg=="], + + "@oxc-resolver/binding-darwin-x64": ["@oxc-resolver/binding-darwin-x64@11.21.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-HbNc23FAQYbuyDV2vBWMez4u4mrsm5RAkniGZAWqr6lYZ3N4beeqIb776jzwRl8qL2zRhHVXpUj97X0QgogVzg=="], + + "@oxc-resolver/binding-freebsd-x64": ["@oxc-resolver/binding-freebsd-x64@11.21.3", "", { "os": "freebsd", "cpu": "x64" }, "sha512-K6xNsTUPEUdfrn0+kbMq5nOUB5w1C5pavPQngt4TM2FpN91lP0PBe2srSpamb4d69O7h86oAi/qWX/kZNRSjkw=="], + + "@oxc-resolver/binding-linux-arm-gnueabihf": ["@oxc-resolver/binding-linux-arm-gnueabihf@11.21.3", "", { "os": "linux", "cpu": "arm" }, "sha512-VcFmOpcpWX1zoEy8M58tR2M9YxM+Z9RuQhqAx5q0CTmrruaP7Gveejg75hzd/5sg5nk9G3aLALEa3hE2FsmmTQ=="], + + "@oxc-resolver/binding-linux-arm-musleabihf": ["@oxc-resolver/binding-linux-arm-musleabihf@11.21.3", "", { "os": "linux", "cpu": "arm" }, "sha512-quVoxFLBy43hWaQbbDtQNRwAX5vX76mv7n64icAtQcJ3eNgVeblqmkupF/hAneNthdqSlnd1sTjb3aQSaDPaCQ=="], + + "@oxc-resolver/binding-linux-arm64-gnu": ["@oxc-resolver/binding-linux-arm64-gnu@11.21.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-X0AqNZgcD07Q4V3RDK18/vYOj/HQT/FnmEFGYS2jTWqY7JO13ryE3TEs3eAIgUJhBnNkpEaiXqz3VK8M7qQhWQ=="], - "@prisma/client": ["@prisma/client@6.15.0", "", { "peerDependencies": { "prisma": "*", "typescript": ">=5.1.0" }, "optionalPeers": ["prisma", "typescript"] }, "sha512-wR2LXUbOH4cL/WToatI/Y2c7uzni76oNFND7+23ypLllBmIS8e3ZHhO+nud9iXSXKFt1SoM3fTZvHawg63emZw=="], + "@oxc-resolver/binding-linux-arm64-musl": ["@oxc-resolver/binding-linux-arm64-musl@11.21.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-YkaQnaKYdbuaXvRt5Qd0GpbihzVnyfR6z1SpYfIUC6RTu4NF7lDKPjVkYb+jRI2gedVO2rVpN35Y6akG6ud4Lw=="], - "@prisma/extension-accelerate": ["@prisma/extension-accelerate@2.0.2", "", { "peerDependencies": { "@prisma/client": ">=4.16.1" } }, "sha512-yZK6/k7uOEFpEsKoZezQS1CKDboPtBCQ0NyI70e1Un8tDiRgg80iWGyjsJmRpps2ZIut3MroHP+dyR3wVKh8lA=="], + "@oxc-resolver/binding-linux-ppc64-gnu": ["@oxc-resolver/binding-linux-ppc64-gnu@11.21.3", "", { "os": "linux", "cpu": "ppc64" }, "sha512-gB9HwhrPiFqUzDeEq+y/CgAijz1YdI6BnXz5GaH2Pa9cWdutchlkGFAiAuGb/PjVQpiK6NFKzFuztxrweoit7A=="], + + "@oxc-resolver/binding-linux-riscv64-gnu": ["@oxc-resolver/binding-linux-riscv64-gnu@11.21.3", "", { "os": "linux", "cpu": "none" }, "sha512-zjDWBlYk8QGv0H8dsPUWqkfjYIIjG2TvspGkzXL0eImbgxtZorA/klKeHyolevoT3Kvbi+1iMr9Lhrh7jf54Og=="], + + "@oxc-resolver/binding-linux-riscv64-musl": ["@oxc-resolver/binding-linux-riscv64-musl@11.21.3", "", { "os": "linux", "cpu": "none" }, "sha512-4UfsQvacV388y1zpXL7C1x1FNYaV52JtuNRiuzrfQA2z1z6ElVrsidkGsrvQ5EgeSq1Pj7kaKqrgGkvFuxJ/tw=="], + + "@oxc-resolver/binding-linux-s390x-gnu": ["@oxc-resolver/binding-linux-s390x-gnu@11.21.3", "", { "os": "linux", "cpu": "s390x" }, "sha512-b5uH+HKH0MP5mNBYaK75SKsJbw52URqrx2LavYdq6wb0l3ExAG5niYRP9DWUNHdKilpaBVM2bXk9HNWrH3ew7Q=="], + + "@oxc-resolver/binding-linux-x64-gnu": ["@oxc-resolver/binding-linux-x64-gnu@11.21.3", "", { "os": "linux", "cpu": "x64" }, "sha512-PjYlmilBpNRh2ntXNYAK3Am5w/nPfEpnU/96iNx7CI8EzAn12J4JRiec63wHJTH31nLoCNxBg/829pN+3CfG3Q=="], + + "@oxc-resolver/binding-linux-x64-musl": ["@oxc-resolver/binding-linux-x64-musl@11.21.3", "", { "os": "linux", "cpu": "x64" }, "sha512-QTBAb7JuHlZ7JUEyM8UiQi2f7m/L4swBhP2TNpYIDc9Wp/wRw1G/8sl6i13aIzQAXH7LKIm294LeOHd0lQR8zA=="], + + "@oxc-resolver/binding-openharmony-arm64": ["@oxc-resolver/binding-openharmony-arm64@11.21.3", "", { "os": "none", "cpu": "arm64" }, "sha512-4j1DFwjwv36ec9kds0jU/ucQ5Ha4ERO/H95BxR5JFf0kqUUAJ1kwII7XhTc1vZrkdJkvLGC9Q2MbpObpum8RBg=="], + + "@oxc-resolver/binding-wasm32-wasi": ["@oxc-resolver/binding-wasm32-wasi@11.21.3", "", { "dependencies": { "@emnapi/core": "1.11.0", "@emnapi/runtime": "1.11.0", "@napi-rs/wasm-runtime": "^1.1.5" }, "cpu": "none" }, "sha512-i8oluoel5kru/j1WNrjmQSiA3GQ7wvIYVR1IwIoZtKogAhya2iub+ZKIeSIkcJOrnzQ18Tzl/F+kL3fYOxZLvA=="], + + "@oxc-resolver/binding-win32-arm64-msvc": ["@oxc-resolver/binding-win32-arm64-msvc@11.21.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-M/8dw8dD6aOs+NlPJax401CZB9I7Aut84isQLgALGGwke4Afvw+/7yYhZb94yXf6t2sPLhQLmSmtSV+2FhsOWg=="], + + "@oxc-resolver/binding-win32-x64-msvc": ["@oxc-resolver/binding-win32-x64-msvc@11.21.3", "", { "os": "win32", "cpu": "x64" }, "sha512-H7BCt/VnS9hnmMp42eGhZ99izSCRvlnWwy/N71K1/J8QoExwY4262Z8QiEkMDtduRJrztayDxETTckmUuAVL9Q=="], + + "@pkgjs/parseargs": ["@pkgjs/parseargs@0.11.0", "", {}, "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg=="], + + "@pkgr/core": ["@pkgr/core@0.2.9", "", {}, "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA=="], "@radix-ui/react-compose-refs": ["@radix-ui/react-compose-refs@1.1.2", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg=="], @@ -585,16 +643,6 @@ "@react-navigation/routers": ["@react-navigation/routers@7.5.1", "", { "dependencies": { "nanoid": "^3.3.11" } }, "sha512-pxipMW/iEBSUrjxz2cDD7fNwkqR4xoi0E/PcfTQGCcdJwLoaxzab5kSadBLj1MTJyT0YRrOXL9umHpXtp+Dv4w=="], - "@redux-devtools/core": ["@redux-devtools/core@4.0.0", "", { "dependencies": { "@babel/runtime": "^7.23.5", "@redux-devtools/instrument": "^2.2.0", "lodash": "^4.17.21" }, "peerDependencies": { "react": "^16.8.4 || ^17.0.0 || ^18.0.0", "react-redux": "^7.0.0 || ^8.0.0 || ^9.0.0", "redux": "^3.5.2 || ^4.0.0 || ^5.0.0" } }, "sha512-9smPIgjVxSwCmA35SOwy/ZmlVdKfrdWQHxZdBeXw3G4u+guCl7hBLaOqqUhgceKdsX0IkdIr0v5TLpm2gQT2oQ=="], - - "@redux-devtools/instrument": ["@redux-devtools/instrument@2.2.0", "", { "dependencies": { "@babel/runtime": "^7.23.2", "lodash": "^4.17.21" }, "peerDependencies": { "redux": "^3.4.0 || ^4.0.0 || ^5.0.0" } }, "sha512-HKaL+ghBQ4ZQkM/kEQIKx8dNwz4E1oeiCDfdQlpPXxEi/BrisyrFFncAXb1y2HIJsLV9zSvQUR2jRtMDWgfi8w=="], - - "@redux-devtools/serialize": ["@redux-devtools/serialize@0.4.2", "", { "dependencies": { "@babel/runtime": "^7.23.2", "jsan": "^3.1.14" }, "peerDependencies": { "immutable": "^4.0.0" } }, "sha512-YVqZCChJld5l3Ni2psEZ5loe9x5xpf9J4ckz+7OJdzCNsplC7vzjnkQbFxE6+ULZbywRVp+nSBslTXmaXqAw4A=="], - - "@redux-devtools/utils": ["@redux-devtools/utils@3.0.1", "", { "dependencies": { "@babel/runtime": "^7.25.7", "@redux-devtools/core": "^4.0.0", "@redux-devtools/serialize": "^0.4.2", "@types/get-params": "^0.1.2", "get-params": "^0.1.2", "immutable": "^4.3.7", "jsan": "^3.1.14", "nanoid": "^5.0.7", "redux": "^5.0.1" }, "peerDependencies": { "@redux-devtools/core": "^4.0.0", "immutable": "^4.3.7", "redux": "^4.0.0 || ^5.0.0" } }, "sha512-24/W3ry3muwCSKpET+0JHM1ZwMT5+bODIzVlvFahwY9FjVOzidt+PyZ9KfufmjQU1Ys1x4/FEhSfVp8HZzOD7A=="], - - "@reduxjs/toolkit": ["@reduxjs/toolkit@2.8.2", "", { "dependencies": { "@standard-schema/spec": "^1.0.0", "@standard-schema/utils": "^0.3.0", "immer": "^10.0.3", "redux": "^5.0.1", "redux-thunk": "^3.1.0", "reselect": "^5.1.0" }, "peerDependencies": { "react": "^16.9.0 || ^17.0.0 || ^18 || ^19", "react-redux": "^7.2.1 || ^8.1.3 || ^9.0.0" }, "optionalPeers": ["react", "react-redux"] }, "sha512-MYlOhQ0sLdw4ud48FoC5w0dH9VfWQjtCjreKwYTT3l+r427qYC5Y8PihNutepr8XrNaBUDQo9khWUwQxZaqt5A=="], - "@rtsao/scc": ["@rtsao/scc@1.1.0", "", {}, "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g=="], "@scure/base": ["@scure/base@1.2.6", "", {}, "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg=="], @@ -603,8 +651,6 @@ "@scure/bip39": ["@scure/bip39@1.6.0", "", { "dependencies": { "@noble/hashes": "~1.8.0", "@scure/base": "~1.2.5" } }, "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A=="], - "@shopify/flash-list": ["@shopify/flash-list@1.7.6", "", { "dependencies": { "recyclerlistview": "4.2.3", "tslib": "2.8.1" }, "peerDependencies": { "@babel/runtime": "*", "react": "*", "react-native": "*" } }, "sha512-0kuuAbWgy4YSlN05mt0ScvxK8uiDixMsICWvDed+LTxvZ5+5iRyt3M8cRLUroB8sfiZlJJZWlxHrx0frBpsYOQ=="], - "@sinclair/typebox": ["@sinclair/typebox@0.34.41", "", {}, "sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g=="], "@sindresorhus/is": ["@sindresorhus/is@4.6.0", "", {}, "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw=="], @@ -613,18 +659,12 @@ "@sinonjs/fake-timers": ["@sinonjs/fake-timers@10.3.0", "", { "dependencies": { "@sinonjs/commons": "^3.0.0" } }, "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA=="], - "@standard-schema/spec": ["@standard-schema/spec@1.0.0", "", {}, "sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA=="], - - "@standard-schema/utils": ["@standard-schema/utils@0.3.0", "", {}, "sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g=="], - "@stripe/stripe-js": ["@stripe/stripe-js@5.6.0", "", {}, "sha512-w8CEY73X/7tw2KKlL3iOk679V9bWseE4GzNz3zlaYxcTjmcmWOathRb0emgo/QQ3eoNzmq68+2Y2gxluAv3xGw=="], "@swc/helpers": ["@swc/helpers@0.5.17", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A=="], "@szmarczak/http-timer": ["@szmarczak/http-timer@4.0.6", "", { "dependencies": { "defer-to-connect": "^2.0.0" } }, "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w=="], - "@testing-library/react-hooks": ["@testing-library/react-hooks@8.0.1", "", { "dependencies": { "@babel/runtime": "^7.12.5", "react-error-boundary": "^3.1.0" }, "peerDependencies": { "@types/react": "^16.9.0 || ^17.0.0", "react": "^16.9.0 || ^17.0.0", "react-dom": "^16.9.0 || ^17.0.0", "react-test-renderer": "^16.9.0 || ^17.0.0" }, "optionalPeers": ["@types/react", "react-dom", "react-test-renderer"] }, "sha512-Aqhl2IVmLt8IovEVarNDFuJDVWVvhnr9/GCU6UUnrYXwgDFF9h2L2o2P9KBni1AST5sT6riAyoukFLyjQUgD/g=="], - "@testing-library/react-native": ["@testing-library/react-native@13.3.3", "", { "dependencies": { "jest-matcher-utils": "^30.0.5", "picocolors": "^1.1.1", "pretty-format": "^30.0.5", "redent": "^3.0.0" }, "peerDependencies": { "jest": ">=29.0.0", "react": ">=18.2.0", "react-native": ">=0.71", "react-test-renderer": ">=18.2.0" }, "optionalPeers": ["jest"] }, "sha512-k6Mjsd9dbZgvY4Bl7P1NIpePQNi+dfYtlJ5voi9KQlynxSyQkfOgJmYGCYmw/aSgH/rUcFvG8u5gd4npzgRDyg=="], "@tootallnate/once": ["@tootallnate/once@2.0.0", "", {}, "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A=="], @@ -637,6 +677,8 @@ "@tsconfig/node16": ["@tsconfig/node16@1.0.4", "", {}, "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA=="], + "@tybys/wasm-util": ["@tybys/wasm-util@0.10.2", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg=="], + "@types/babel__core": ["@types/babel__core@7.20.5", "", { "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA=="], "@types/babel__generator": ["@types/babel__generator@7.6.8", "", { "dependencies": { "@babel/types": "^7.0.0" } }, "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw=="], @@ -647,14 +689,10 @@ "@types/cacheable-request": ["@types/cacheable-request@6.0.3", "", { "dependencies": { "@types/http-cache-semantics": "*", "@types/keyv": "^3.1.4", "@types/node": "*", "@types/responselike": "^1.0.0" } }, "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw=="], - "@types/emscripten": ["@types/emscripten@1.39.13", "", {}, "sha512-cFq+fO/isvhvmuP/+Sl4K4jtU6E23DoivtbO4r50e3odaxAiVdbfSYRDdJ4gCdxx+3aRjhphS5ZMwIH4hFy/Cw=="], - "@types/eslint": ["@types/eslint@9.6.1", "", { "dependencies": { "@types/estree": "*", "@types/json-schema": "*" } }, "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag=="], "@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="], - "@types/get-params": ["@types/get-params@0.1.2", "", {}, "sha512-ujqPyr1UDsOTDngJPV+WFbR0iHT5AfZKlNPMX6XOCnQcMhEqR+r64dVC/nwYCitqjR3DcpWofnOEAInUQmI/eA=="], - "@types/graceful-fs": ["@types/graceful-fs@4.1.9", "", { "dependencies": { "@types/node": "*" } }, "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ=="], "@types/hammerjs": ["@types/hammerjs@2.0.46", "", {}, "sha512-ynRvcq6wvqexJ9brDMS4BnBLzmr0e14d6ZJTEShTBWKymQiHwlAyGu0ZPEFI2Fh1U53F7tN9ufClWM5KvqkKOw=="], @@ -685,16 +723,10 @@ "@types/responselike": ["@types/responselike@1.0.3", "", { "dependencies": { "@types/node": "*" } }, "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw=="], - "@types/sql.js": ["@types/sql.js@1.4.9", "", { "dependencies": { "@types/emscripten": "*", "@types/node": "*" } }, "sha512-ep8b36RKHlgWPqjNG9ToUrPiwkhwh0AEzy883mO5Xnd+cL6VBH1EvSjBAAuxLUFF2Vn/moE3Me6v9E1Lo+48GQ=="], - "@types/stack-utils": ["@types/stack-utils@2.0.3", "", {}, "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw=="], - "@types/swagger-jsdoc": ["@types/swagger-jsdoc@6.0.4", "", {}, "sha512-W+Xw5epcOZrF/AooUM/PccNMSAFOKWZA5dasNyMujTwsBkU74njSJBpvCCJhHAJ95XRMzQrrW844Btu0uoetwQ=="], - "@types/tough-cookie": ["@types/tough-cookie@4.0.5", "", {}, "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA=="], - "@types/use-sync-external-store": ["@types/use-sync-external-store@0.0.6", "", {}, "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg=="], - "@types/yargs": ["@types/yargs@17.0.33", "", { "dependencies": { "@types/yargs-parser": "*" } }, "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA=="], "@types/yargs-parser": ["@types/yargs-parser@21.0.3", "", {}, "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ=="], @@ -733,8 +765,6 @@ "abab": ["abab@2.0.6", "", {}, "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA=="], - "abbrev": ["abbrev@1.1.1", "", {}, "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="], - "abitype": ["abitype@1.0.9", "", { "peerDependencies": { "typescript": ">=5.0.4", "zod": "^3 >=3.22.0" }, "optionalPeers": ["typescript", "zod"] }, "sha512-oN0S++TQmlwWuB+rkA6aiEefLv3SP+2l/tC5mux/TLj6qdA6rF15Vbpex4fHovLsMkwLwTIRj8/Q8vXCS3GfOg=="], "abort-controller": ["abort-controller@3.0.0", "", { "dependencies": { "event-target-shim": "^5.0.0" } }, "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg=="], @@ -751,10 +781,6 @@ "agent-base": ["agent-base@6.0.2", "", { "dependencies": { "debug": "4" } }, "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ=="], - "agentkeepalive": ["agentkeepalive@4.5.0", "", { "dependencies": { "humanize-ms": "^1.2.1" } }, "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew=="], - - "aggregate-error": ["aggregate-error@3.1.0", "", { "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" } }, "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA=="], - "ajv": ["ajv@6.12.6", "", { "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g=="], "alien-signals": ["alien-signals@2.0.6", "", {}, "sha512-P3TxJSe31bUHBiblg59oU1PpaWPtmxF9GhJ/cB7OkgJ0qN/ifFSKUI25/v8ZhsT+lIG6ac8DpTOplXxORX6F3Q=="], @@ -773,16 +799,14 @@ "application-config-path": ["application-config-path@0.1.1", "", {}, "sha512-zy9cHePtMP0YhwG+CfHm0bgwdnga2X3gZexpdCwEj//dpb+TKajtiC8REEUJUSq6Ab4f9cgNy2l8ObXzCXFkEw=="], - "aproba": ["aproba@2.0.0", "", {}, "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ=="], - - "are-we-there-yet": ["are-we-there-yet@3.0.1", "", { "dependencies": { "delegates": "^1.0.0", "readable-stream": "^3.6.0" } }, "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg=="], - "arg": ["arg@5.0.2", "", {}, "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg=="], "argparse": ["argparse@2.0.1", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="], "array-buffer-byte-length": ["array-buffer-byte-length@1.0.2", "", { "dependencies": { "call-bound": "^1.0.3", "is-array-buffer": "^3.0.5" } }, "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw=="], + "array-flatten": ["array-flatten@1.1.1", "", {}, "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="], + "array-includes": ["array-includes@3.1.8", "", { "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", "es-abstract": "^1.23.2", "es-object-atoms": "^1.0.0", "get-intrinsic": "^1.2.4", "is-string": "^1.0.7" } }, "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ=="], "array-timsort": ["array-timsort@1.0.3", "", {}, "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ=="], @@ -825,6 +849,8 @@ "babel-plugin-polyfill-regenerator": ["babel-plugin-polyfill-regenerator@0.6.2", "", { "dependencies": { "@babel/helper-define-polyfill-provider": "^0.6.2" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "sha512-2R25rQZWP63nGwaAswvDazbPXfrM3HwVoBXK6HcqeKrSrL/JqcC/rDcf95l4r7LXLyxDXc8uQDa064GubtCABg=="], + "babel-plugin-react-compiler": ["babel-plugin-react-compiler@1.0.0", "", { "dependencies": { "@babel/types": "^7.26.0" } }, "sha512-Ixm8tFfoKKIPYdCCKYTsqv+Fd4IJ0DQqMyEimo+pxUOMUR9cVPlwTrFt9Avu+3cb6Zp3mAzl+t1MrG2fxxKsxw=="], + "babel-plugin-react-native-web": ["babel-plugin-react-native-web@0.19.13", "", {}, "sha512-4hHoto6xaN23LCyZgL9LJZc3olmAxd7b6jDzlZnKXAh4rRAbZRKNBJoOOdp46OBqgy+K0t0guTj5/mhA8inymQ=="], "babel-plugin-syntax-hermes-parser": ["babel-plugin-syntax-hermes-parser@0.25.1", "", { "dependencies": { "hermes-parser": "0.25.1" } }, "sha512-IVNpGzboFLfXZUAwkLFcI/bnqVbwky0jP3eBno4HKtqvQJAHBLdgxiG6lQ4to0+Q/YCN3PO0od5NZwIKyY4REQ=="], @@ -843,15 +869,15 @@ "base64-js": ["base64-js@1.5.1", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="], + "basic-auth": ["basic-auth@2.0.1", "", { "dependencies": { "safe-buffer": "5.1.2" } }, "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg=="], + "better-opn": ["better-opn@3.0.2", "", { "dependencies": { "open": "^8.0.4" } }, "sha512-aVNobHnJqLiUelTaHat9DZ1qM2w0C0Eym4LPI/3JxOnSokGVdsl1T1kN7TFvsEAD8G47A6VKQ0TVHqbBnYMJlQ=="], "big-integer": ["big-integer@1.6.52", "", {}, "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg=="], "binary-extensions": ["binary-extensions@2.3.0", "", {}, "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw=="], - "bindings": ["bindings@1.5.0", "", { "dependencies": { "file-uri-to-path": "1.0.0" } }, "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ=="], - - "bl": ["bl@4.1.0", "", { "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", "readable-stream": "^3.4.0" } }, "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w=="], + "body-parser": ["body-parser@1.20.5", "", { "dependencies": { "bytes": "~3.1.2", "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "~1.2.0", "http-errors": "~2.0.1", "iconv-lite": "~0.4.24", "on-finished": "~2.4.1", "qs": "~6.15.1", "raw-body": "~2.5.3", "type-is": "~1.6.18", "unpipe": "~1.0.0" } }, "sha512-3grm+/2tUOvu2cjJkvsIxrv/wVpfXQW4PsQHYm7yk4vfpu7Ekl6nEsYBoJUL6qDwZUx8wUhQ8tR2qz+ad9c9OA=="], "boolbase": ["boolbase@1.0.0", "", {}, "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww=="], @@ -875,8 +901,6 @@ "bytes": ["bytes@3.0.0", "", {}, "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw=="], - "cacache": ["cacache@15.3.0", "", { "dependencies": { "@npmcli/fs": "^1.0.0", "@npmcli/move-file": "^1.0.1", "chownr": "^2.0.0", "fs-minipass": "^2.0.0", "glob": "^7.1.4", "infer-owner": "^1.0.4", "lru-cache": "^6.0.0", "minipass": "^3.1.1", "minipass-collect": "^1.0.2", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.2", "mkdirp": "^1.0.3", "p-map": "^4.0.0", "promise-inflight": "^1.0.1", "rimraf": "^3.0.2", "ssri": "^8.0.1", "tar": "^6.0.2", "unique-filename": "^1.1.1" } }, "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ=="], - "cacheable-lookup": ["cacheable-lookup@5.0.4", "", {}, "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA=="], "cacheable-request": ["cacheable-request@7.0.4", "", { "dependencies": { "clone-response": "^1.0.2", "get-stream": "^5.1.0", "http-cache-semantics": "^4.0.0", "keyv": "^4.0.0", "lowercase-keys": "^2.0.0", "normalize-url": "^6.0.1", "responselike": "^2.0.0" } }, "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg=="], @@ -887,8 +911,6 @@ "call-bound": ["call-bound@1.0.3", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "get-intrinsic": "^1.2.6" } }, "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA=="], - "call-me-maybe": ["call-me-maybe@1.0.2", "", {}, "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ=="], - "caller-callsite": ["caller-callsite@2.0.0", "", { "dependencies": { "callsites": "^2.0.0" } }, "sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ=="], "caller-path": ["caller-path@2.0.0", "", { "dependencies": { "caller-callsite": "^2.0.0" } }, "sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A=="], @@ -907,7 +929,7 @@ "chokidar": ["chokidar@3.6.0", "", { "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" }, "optionalDependencies": { "fsevents": "~2.3.2" } }, "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw=="], - "chownr": ["chownr@2.0.0", "", {}, "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ=="], + "chownr": ["chownr@3.0.0", "", {}, "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g=="], "chrome-launcher": ["chrome-launcher@0.15.2", "", { "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" } }, "sha512-zdLEwNo3aUVzIhKhTtXfxhdvZhUghrnmkvcAq2NoDd+LeOHKf03H5jwZ8T/STsAlzyALkBVK552iaG1fGf1xVQ=="], @@ -917,8 +939,6 @@ "cjs-module-lexer": ["cjs-module-lexer@1.4.1", "", {}, "sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA=="], - "clean-stack": ["clean-stack@2.2.0", "", {}, "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A=="], - "cli-cursor": ["cli-cursor@2.1.0", "", { "dependencies": { "restore-cursor": "^2.0.0" } }, "sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw=="], "cli-spinners": ["cli-spinners@2.9.2", "", {}, "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg=="], @@ -945,8 +965,6 @@ "color-string": ["color-string@1.9.1", "", { "dependencies": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" } }, "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg=="], - "color-support": ["color-support@1.1.3", "", { "bin": "bin.js" }, "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg=="], - "combined-stream": ["combined-stream@1.0.8", "", { "dependencies": { "delayed-stream": "~1.0.0" } }, "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg=="], "command-exists": ["command-exists@1.2.9", "", {}, "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w=="], @@ -963,10 +981,16 @@ "connect": ["connect@3.7.0", "", { "dependencies": { "debug": "2.6.9", "finalhandler": "1.1.2", "parseurl": "~1.3.3", "utils-merge": "1.0.1" } }, "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ=="], - "console-control-strings": ["console-control-strings@1.1.0", "", {}, "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ=="], + "content-disposition": ["content-disposition@0.5.4", "", { "dependencies": { "safe-buffer": "5.2.1" } }, "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ=="], + + "content-type": ["content-type@1.0.5", "", {}, "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA=="], "convert-source-map": ["convert-source-map@2.0.0", "", {}, "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg=="], + "cookie": ["cookie@0.7.2", "", {}, "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w=="], + + "cookie-signature": ["cookie-signature@1.0.7", "", {}, "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA=="], + "copy-to-clipboard": ["copy-to-clipboard@3.3.3", "", { "dependencies": { "toggle-selection": "^1.0.6" } }, "sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA=="], "core-js": ["core-js@3.41.0", "", {}, "sha512-SJ4/EHwS36QMJd6h/Rg+GyR4A5xE0FSI3eZ+iBVpfqf1x0eTSg1smWLHrA+2jQThZSh97fmSgFSU8B61nxosxA=="], @@ -1041,15 +1065,13 @@ "delayed-stream": ["delayed-stream@1.0.0", "", {}, "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="], - "delegates": ["delegates@1.0.0", "", {}, "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ=="], - "depd": ["depd@2.0.0", "", {}, "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="], "dequal": ["dequal@2.0.3", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="], "destroy": ["destroy@1.2.0", "", {}, "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg=="], - "detect-libc": ["detect-libc@2.0.3", "", {}, "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw=="], + "detect-libc": ["detect-libc@1.0.3", "", { "bin": "bin/detect-libc.js" }, "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg=="], "detect-newline": ["detect-newline@3.1.0", "", {}, "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA=="], @@ -1089,7 +1111,7 @@ "emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], - "encodeurl": ["encodeurl@1.0.2", "", {}, "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w=="], + "encodeurl": ["encodeurl@2.0.0", "", {}, "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg=="], "encoding": ["encoding@0.1.13", "", { "dependencies": { "iconv-lite": "^0.6.2" } }, "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A=="], @@ -1101,12 +1123,8 @@ "env-editor": ["env-editor@0.4.2", "", {}, "sha512-ObFo8v4rQJAE59M69QzwloxPZtd33TpYEIjtKD1rrFDcM1Gd7IkDxEBU+HriziN6HSHQnBJi8Dmy+JWkav5HKA=="], - "env-paths": ["env-paths@2.2.1", "", {}, "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A=="], - "eol": ["eol@0.9.1", "", {}, "sha512-Ds/TEoZjwggRoz/Q2O7SE3i4Jm66mqTDfmdHdq/7DKVk3bro9Q8h6WdXKdPqFLMoqxrDK5SVRzHVPOS6uuGtrg=="], - "err-code": ["err-code@2.0.3", "", {}, "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA=="], - "error-ex": ["error-ex@1.3.2", "", { "dependencies": { "is-arrayish": "^0.2.1" } }, "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g=="], "error-stack-parser": ["error-stack-parser@2.1.4", "", { "dependencies": { "stackframe": "^1.3.4" } }, "sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ=="], @@ -1185,8 +1203,6 @@ "exit": ["exit@0.1.2", "", {}, "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ=="], - "expand-template": ["expand-template@2.0.3", "", {}, "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg=="], - "expect": ["expect@29.7.0", "", { "dependencies": { "@jest/expect-utils": "^29.7.0", "jest-get-type": "^29.6.3", "jest-matcher-utils": "^29.7.0", "jest-message-util": "^29.7.0", "jest-util": "^29.7.0" } }, "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw=="], "expo": ["expo@53.0.27", "", { "dependencies": { "@babel/runtime": "^7.20.0", "@expo/cli": "0.24.24", "@expo/config": "~11.0.13", "@expo/config-plugins": "~10.1.2", "@expo/fingerprint": "0.13.4", "@expo/metro-config": "0.20.18", "@expo/vector-icons": "^14.0.0", "babel-preset-expo": "~13.2.5", "expo-asset": "~11.1.7", "expo-constants": "~17.1.8", "expo-file-system": "~18.1.11", "expo-font": "~13.3.2", "expo-keep-awake": "~14.1.4", "expo-modules-autolinking": "2.1.15", "expo-modules-core": "2.5.0", "react-native-edge-to-edge": "1.6.0", "whatwg-url-without-unicode": "8.0.0-3" }, "peerDependencies": { "@expo/dom-webview": "*", "@expo/metro-runtime": "*", "react": "*", "react-native": "*", "react-native-webview": "*" }, "optionalPeers": ["@expo/dom-webview", "@expo/metro-runtime", "react-native-webview"], "bin": { "expo": "bin/cli", "fingerprint": "bin/fingerprint", "expo-modules-autolinking": "bin/autolinking" } }, "sha512-iQwe2uWLb88opUY4vBYEW1d2GUq3lsa43gsMBEdDV+6pw0Oek93l/4nDLe0ODDdrBRjIJm/rdhKqJC/ehHCUqw=="], @@ -1195,12 +1211,16 @@ "expo-asset": ["expo-asset@11.1.7", "", { "dependencies": { "@expo/image-utils": "^0.7.6", "expo-constants": "~17.1.7" }, "peerDependencies": { "expo": "*", "react": "*", "react-native": "*" } }, "sha512-b5P8GpjUh08fRCf6m5XPVAh7ra42cQrHBIMgH2UXP+xsj4Wufl6pLy6jRF5w6U7DranUMbsXm8TOyq4EHy7ADg=="], + "expo-atlas": ["expo-atlas@0.4.3", "", { "dependencies": { "@expo/server": "^0.5.0", "arg": "^5.0.2", "chalk": "^4.1.2", "compression": "^1.7.4", "connect": "^3.7.0", "express": "^4.19.2", "freeport-async": "^2.0.0", "getenv": "^2.0.0", "morgan": "^1.10.0", "open": "^8.4.2", "serve-static": "^1.15.0", "stream-json": "^1.8.0" }, "peerDependencies": { "expo": "*" }, "bin": { "expo-atlas": "build/src/cli/bin.js" } }, "sha512-nN2bouxFvMsqZqLl0ka+eI9Ofida0PcuoE4v+7fHlgyp95X2cCL8Acf0nRKXmmIBEYazdw0d7BAOZfC0b41oxA=="], + "expo-auth-session": ["expo-auth-session@6.2.1", "", { "dependencies": { "expo-application": "~6.1.5", "expo-constants": "~17.1.7", "expo-crypto": "~14.1.5", "expo-linking": "~7.1.7", "expo-web-browser": "~14.2.0", "invariant": "^2.2.4" }, "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-9KgqrGpW7PoNOhxJ7toofi/Dz5BU2TE4Q+ktJZsmDXLoFcNOcvBokh2+mkhG58Qvd/xJ9Z5sAt/5QoOFaPb9wA=="], "expo-background-task": ["expo-background-task@0.2.8", "", { "dependencies": { "expo-task-manager": "~13.1.6" }, "peerDependencies": { "expo": "*" } }, "sha512-dePyskpmyDZeOtbr9vWFh+Nrse0TvF6YitJqnKcd+3P7pDMiDr1V2aT6zHdNOc5iV9vPaDJoH/zdmlarp1uHMQ=="], "expo-blur": ["expo-blur@14.1.5", "", { "peerDependencies": { "expo": "*", "react": "*", "react-native": "*" } }, "sha512-CCLJHxN4eoAl06ESKT3CbMasJ98WsjF9ZQEJnuxtDb9ffrYbZ+g9ru84fukjNUOTtc8A8yXE5z8NgY1l0OMrmQ=="], + "expo-build-properties": ["expo-build-properties@0.14.8", "", { "dependencies": { "ajv": "^8.11.0", "semver": "^7.6.0" }, "peerDependencies": { "expo": "*" } }, "sha512-GTFNZc5HaCS9RmCi6HspCe2+isleuOWt2jh7UEKHTDQ9tdvzkIoWc7U6bQO9lH3Mefk4/BcCUZD/utl7b1wdqw=="], + "expo-constants": ["expo-constants@17.1.8", "", { "dependencies": { "@expo/config": "~11.0.13", "@expo/env": "~1.0.7" }, "peerDependencies": { "expo": "*", "react-native": "*" } }, "sha512-sOCeMN/BWLA7hBP6lMwoEQzFNgTopk6YY03sBAmwT216IHyL54TjNseg8CRU1IQQ/+qinJ2fYWCl7blx2TiNcA=="], "expo-crypto": ["expo-crypto@14.1.5", "", { "dependencies": { "base64-js": "^1.3.0" }, "peerDependencies": { "expo": "*" } }, "sha512-ZXJoUMoUeiMNEoSD4itItFFz3cKrit6YJ/BR0hjuwNC+NczbV9rorvhvmeJmrU9O2cFQHhJQQR1fjQnt45Vu4Q=="], @@ -1235,8 +1255,6 @@ "expo-linking": ["expo-linking@7.1.7", "", { "dependencies": { "expo-constants": "~17.1.7", "invariant": "^2.2.4" }, "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-ZJaH1RIch2G/M3hx2QJdlrKbYFUTOjVVW4g39hfxrE5bPX9xhZUYXqxqQtzMNl1ylAevw9JkgEfWbBWddbZ3UA=="], - "expo-location": ["expo-location@18.1.6", "", { "peerDependencies": { "expo": "*" } }, "sha512-l5dQQ2FYkrBgNzaZN1BvSmdhhcztFOUucu2kEfDBMV4wSIuTIt/CKsho+F3RnAiWgvui1wb1WTTf80E8zq48hA=="], - "expo-manifests": ["expo-manifests@0.16.6", "", { "dependencies": { "@expo/config": "~11.0.12", "expo-json-utils": "~0.15.0" }, "peerDependencies": { "expo": "*" } }, "sha512-1A+do6/mLUWF9xd3uCrlXr9QFDbjbfqAYmUy8UDLOjof1lMrOhyeC4Yi6WexA/A8dhZEpIxSMCKfn7G4aHAh4w=="], "expo-modules-autolinking": ["expo-modules-autolinking@2.1.15", "", { "dependencies": { "@expo/spawn-async": "^1.7.2", "chalk": "^4.1.0", "commander": "^7.2.0", "find-up": "^5.0.0", "glob": "^10.4.2", "require-from-string": "^2.0.2", "resolve-from": "^5.0.0" }, "bin": { "expo-modules-autolinking": "bin/expo-modules-autolinking.js" } }, "sha512-IUITUERdkgooXjr9bXsX0PmhrZUIGTMyP6NtmQpAxN5+qtf/I7ewbwLx1/rX7tgiAOzaYme+PZOp/o6yqIhFsw=="], @@ -1259,6 +1277,8 @@ "expo-structured-headers": ["expo-structured-headers@4.1.0", "", {}, "sha512-2X+aUNzC/qaw7/WyUhrVHNDB0uQ5rE12XA2H/rJXaAiYQSuOeU90ladaN0IJYV9I2XlhYrjXLktLXWbO7zgbag=="], + "expo-system-ui": ["expo-system-ui@5.0.11", "", { "dependencies": { "@react-native/normalize-colors": "0.79.6", "debug": "^4.3.2" }, "peerDependencies": { "expo": "*", "react-native": "*", "react-native-web": "*" }, "optionalPeers": ["react-native-web"] }, "sha512-PG5VdaG5cwBe1Rj02mJdnsihKl9Iw/w/a6+qh2mH3f2K/IvQ+Hf7aG2kavSADtkGNCNj7CEIg7Rn4DQz/SE5rQ=="], + "expo-task-manager": ["expo-task-manager@13.1.6", "", { "dependencies": { "unimodules-app-loader": "~5.1.3" }, "peerDependencies": { "expo": "*", "react-native": "*" } }, "sha512-sYNAftpIeZ+j6ur17Jo0OpSTk9ks/MDvTbrNCimXMyjIt69XXYL/kAPYf76bWuxOuN8bcJ8Ef8YvihkwFG9hDA=="], "expo-updates": ["expo-updates@0.28.18", "", { "dependencies": { "@expo/code-signing-certificates": "^0.0.6", "@expo/config": "~11.0.13", "@expo/config-plugins": "~10.1.2", "@expo/spawn-async": "^1.7.2", "arg": "4.1.0", "chalk": "^4.1.2", "expo-eas-client": "~0.14.4", "expo-manifests": "~0.16.6", "expo-structured-headers": "~4.1.0", "expo-updates-interface": "~1.1.0", "glob": "^10.4.2", "ignore": "^5.3.1", "resolve-from": "^5.0.0" }, "peerDependencies": { "expo": "*", "react": "*" }, "bin": { "expo-updates": "bin/cli.js" } }, "sha512-qbxRF8w/xPNiEWmZHDxK4XJ0ns4A9VpQg66jNeAEc8mrX9f7TG3TyLyLtydAP0F4aTNrBcSxah8K5VA90vcPig=="], @@ -1269,6 +1289,8 @@ "exponential-backoff": ["exponential-backoff@3.1.1", "", {}, "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw=="], + "express": ["express@4.22.2", "", { "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", "body-parser": "~1.20.5", "content-disposition": "~0.5.4", "content-type": "~1.0.4", "cookie": "~0.7.1", "cookie-signature": "~1.0.6", "debug": "2.6.9", "depd": "2.0.0", "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", "finalhandler": "~1.3.1", "fresh": "~0.5.2", "http-errors": "~2.0.0", "merge-descriptors": "1.0.3", "methods": "~1.1.2", "on-finished": "~2.4.1", "parseurl": "~1.3.3", "path-to-regexp": "~0.1.12", "proxy-addr": "~2.0.7", "qs": "~6.15.1", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", "send": "~0.19.0", "serve-static": "~1.16.2", "setprototypeof": "1.2.0", "statuses": "~2.0.1", "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" } }, "sha512-IuL+Elrou2ZvCFHs18/CIzy2Nzvo25nZ1/D2eIZlz7c+QUayAcYoiM2BthCjs+EBHVpjYjcuLDAiCWgeIX3X1Q=="], + "fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="], "fast-diff": ["fast-diff@1.3.0", "", {}, "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw=="], @@ -1289,9 +1311,11 @@ "fbjs-css-vars": ["fbjs-css-vars@1.0.2", "", {}, "sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ=="], - "file-entry-cache": ["file-entry-cache@6.0.1", "", { "dependencies": { "flat-cache": "^3.0.4" } }, "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg=="], + "fd-package-json": ["fd-package-json@2.0.0", "", { "dependencies": { "walk-up-path": "^4.0.0" } }, "sha512-jKmm9YtsNXN789RS/0mSzOC1NUq9mkVd65vbSSVsKdjGvYXBuE4oWe2QOEoFeRmJg+lPuZxpmrfFclNhoRMneQ=="], - "file-uri-to-path": ["file-uri-to-path@1.0.0", "", {}, "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="], + "fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="], + + "file-entry-cache": ["file-entry-cache@6.0.1", "", { "dependencies": { "flat-cache": "^3.0.4" } }, "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg=="], "fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="], @@ -1317,13 +1341,13 @@ "form-data": ["form-data@4.0.0", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "mime-types": "^2.1.12" } }, "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww=="], - "freeport-async": ["freeport-async@2.0.0", "", {}, "sha512-K7od3Uw45AJg00XUmy15+Hae2hOcgKcmN3/EF6Y7i01O0gaqiRx8sUSpsb9+BRNL8RPBrhzPsVfy8q9ADlJuWQ=="], + "formatly": ["formatly@0.3.0", "", { "dependencies": { "fd-package-json": "^2.0.0" }, "bin": { "formatly": "bin/index.mjs" } }, "sha512-9XNj/o4wrRFyhSMJOvsuyMwy8aUfBaZ1VrqHVfohyXf0Sw0e+yfKG+xZaY3arGCOMdwFsqObtzVOc1gU9KiT9w=="], - "fresh": ["fresh@0.5.2", "", {}, "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q=="], + "forwarded": ["forwarded@0.2.0", "", {}, "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="], - "fs-constants": ["fs-constants@1.0.0", "", {}, "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="], + "freeport-async": ["freeport-async@2.0.0", "", {}, "sha512-K7od3Uw45AJg00XUmy15+Hae2hOcgKcmN3/EF6Y7i01O0gaqiRx8sUSpsb9+BRNL8RPBrhzPsVfy8q9ADlJuWQ=="], - "fs-minipass": ["fs-minipass@2.1.0", "", { "dependencies": { "minipass": "^3.0.0" } }, "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg=="], + "fresh": ["fresh@0.5.2", "", {}, "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q=="], "fs.realpath": ["fs.realpath@1.0.0", "", {}, "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="], @@ -1335,8 +1359,6 @@ "functions-have-names": ["functions-have-names@1.2.3", "", {}, "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ=="], - "gauge": ["gauge@4.0.4", "", { "dependencies": { "aproba": "^1.0.3 || ^2.0.0", "color-support": "^1.1.3", "console-control-strings": "^1.1.0", "has-unicode": "^2.0.1", "signal-exit": "^3.0.7", "string-width": "^4.2.3", "strip-ansi": "^6.0.1", "wide-align": "^1.1.5" } }, "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg=="], - "gensync": ["gensync@1.0.0-beta.2", "", {}, "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="], "get-caller-file": ["get-caller-file@2.0.5", "", {}, "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="], @@ -1345,8 +1367,6 @@ "get-package-type": ["get-package-type@0.1.0", "", {}, "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q=="], - "get-params": ["get-params@0.1.2", "", {}, "sha512-41eOxtlGgHQRbFyA8KTH+w+32Em3cRdfBud7j67ulzmIfmaHX9doq47s0fa4P5o9H64BZX9nrYI6sJvk46Op+Q=="], - "get-port": ["get-port@3.2.0", "", {}, "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg=="], "get-proto": ["get-proto@1.0.1", "", { "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" } }, "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g=="], @@ -1355,12 +1375,10 @@ "get-symbol-description": ["get-symbol-description@1.1.0", "", { "dependencies": { "call-bound": "^1.0.3", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6" } }, "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg=="], - "get-tsconfig": ["get-tsconfig@4.8.1", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg=="], + "get-tsconfig": ["get-tsconfig@4.14.0", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA=="], "getenv": ["getenv@2.0.0", "", {}, "sha512-VilgtJj/ALgGY77fiLam5iD336eSWi96Q15JSAG1zi8NRBysm3LXKdGnHb4m5cuyxvOLQQKWpBZAT6ni4FI2iQ=="], - "github-from-package": ["github-from-package@0.0.0", "", {}, "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw=="], - "glob": ["glob@10.4.5", "", { "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": "dist/esm/bin.mjs" }, "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg=="], "glob-parent": ["glob-parent@6.0.2", "", { "dependencies": { "is-glob": "^4.0.3" } }, "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A=="], @@ -1379,6 +1397,8 @@ "graphemer": ["graphemer@1.4.0", "", {}, "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag=="], + "graphql": ["graphql@16.8.1", "", {}, "sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw=="], + "has-bigints": ["has-bigints@1.0.2", "", {}, "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ=="], "has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="], @@ -1393,8 +1413,6 @@ "has-tostringtag": ["has-tostringtag@1.0.2", "", { "dependencies": { "has-symbols": "^1.0.3" } }, "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw=="], - "has-unicode": ["has-unicode@2.0.1", "", {}, "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ=="], - "hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="], "hermes-estree": ["hermes-estree@0.25.1", "", {}, "sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw=="], @@ -1421,13 +1439,9 @@ "human-signals": ["human-signals@2.1.0", "", {}, "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw=="], - "humanize-ms": ["humanize-ms@1.2.1", "", { "dependencies": { "ms": "^2.0.0" } }, "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ=="], - "hyphenate-style-name": ["hyphenate-style-name@1.1.0", "", {}, "sha512-WDC/ui2VVRrz3jOVi+XtjqkDjiVjTtFaAGiW37k6b+ohyQ5wYDOGkvCZa8+H0nx3gyvv0+BST9xuOgIyGQ00gw=="], - "iconv-lite": ["iconv-lite@0.6.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw=="], - - "idb": ["idb@8.0.3", "", {}, "sha512-LtwtVyVYO5BqRvcsKuB2iUMnHwPVByPCXFXOpuU96IZPPoPN6xjOGxZQ74pgSVVLQWtUOYgyeL4GE98BY5D3wg=="], + "iconv-lite": ["iconv-lite@0.4.24", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3" } }, "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA=="], "idb-keyval": ["idb-keyval@6.2.1", "", {}, "sha512-8Sb3veuYCyrZL+VBt9LJfZjLUPWVvqn8tG28VqYNFCo43KHcKuq+b4EiXGeuaLAQWL2YmyDgMp2aSpH9JHsEQg=="], @@ -1439,8 +1453,6 @@ "immer": ["immer@10.1.1", "", {}, "sha512-s2MPrmjovJcoMaHtx6K11Ra7oD05NT97w1IC5zpMkT6Atjr7H8LjaDd81iIxUYpMKSRRNMJE703M1Fhr/TctHw=="], - "immutable": ["immutable@4.3.7", "", {}, "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw=="], - "import-fresh": ["import-fresh@3.3.0", "", { "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" } }, "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw=="], "import-local": ["import-local@3.2.0", "", { "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" }, "bin": { "import-local-fixture": "fixtures/cli.js" } }, "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA=="], @@ -1449,8 +1461,6 @@ "indent-string": ["indent-string@4.0.0", "", {}, "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg=="], - "infer-owner": ["infer-owner@1.0.4", "", {}, "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A=="], - "inflight": ["inflight@1.0.6", "", { "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA=="], "inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="], @@ -1465,7 +1475,7 @@ "invariant": ["invariant@2.2.4", "", { "dependencies": { "loose-envify": "^1.0.0" } }, "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA=="], - "ip-address": ["ip-address@9.0.5", "", { "dependencies": { "jsbn": "1.1.0", "sprintf-js": "^1.1.3" } }, "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g=="], + "ipaddr.js": ["ipaddr.js@1.9.1", "", {}, "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="], "is-array-buffer": ["is-array-buffer@3.0.5", "", { "dependencies": { "call-bind": "^1.0.8", "call-bound": "^1.0.3", "get-intrinsic": "^1.2.6" } }, "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A=="], @@ -1505,8 +1515,6 @@ "is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="], - "is-lambda": ["is-lambda@1.0.1", "", {}, "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ=="], - "is-map": ["is-map@2.0.3", "", {}, "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw=="], "is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="], @@ -1621,7 +1629,7 @@ "jimp-compact": ["jimp-compact@0.16.1", "", {}, "sha512-dZ6Ra7u1G8c4Letq/B5EzAxj4tLFHL+cGtdpR+PVm4yzPDj+lCk+AbivWt1eOM+ikzkowtyV7qSqX6qr3t71Ww=="], - "jiti": ["jiti@1.21.7", "", { "bin": { "jiti": "bin/jiti.js" } }, "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A=="], + "jiti": ["jiti@2.7.0", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ=="], "js-cookie": ["js-cookie@3.0.5", "", {}, "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw=="], @@ -1629,10 +1637,6 @@ "js-yaml": ["js-yaml@4.1.0", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": "bin/js-yaml.js" }, "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA=="], - "jsan": ["jsan@3.1.14", "", {}, "sha512-wStfgOJqMv4QKktuH273f5fyi3D3vy2pHOiSDGPvpcS/q+wb/M7AK3vkCcaHbkZxDOlDU/lDJgccygKSG2OhtA=="], - - "jsbn": ["jsbn@1.1.0", "", {}, "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A=="], - "jsc-safe-url": ["jsc-safe-url@0.2.4", "", {}, "sha512-0wM3YBWtYePOjfyXQH5MWQ8H7sdk5EXSwZvmSLKk2RboVQ2Bu239jycHDz5J/8Blf3K0Qnoy2b6xD+z10MFB+Q=="], "jsdom": ["jsdom@20.0.3", "", { "dependencies": { "abab": "^2.0.6", "acorn": "^8.8.1", "acorn-globals": "^7.0.0", "cssom": "^0.5.0", "cssstyle": "^2.3.0", "data-urls": "^3.0.2", "decimal.js": "^10.4.2", "domexception": "^4.0.0", "escodegen": "^2.0.0", "form-data": "^4.0.0", "html-encoding-sniffer": "^3.0.0", "http-proxy-agent": "^5.0.0", "https-proxy-agent": "^5.0.1", "is-potential-custom-element-name": "^1.0.1", "nwsapi": "^2.2.2", "parse5": "^7.1.1", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", "tough-cookie": "^4.1.2", "w3c-xmlserializer": "^4.0.0", "webidl-conversions": "^7.0.0", "whatwg-encoding": "^2.0.0", "whatwg-mimetype": "^3.0.0", "whatwg-url": "^11.0.0", "ws": "^8.11.0", "xml-name-validator": "^4.0.0" }, "peerDependencies": { "canvas": "^2.5.0" }, "optionalPeers": ["canvas"] }, "sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ=="], @@ -1651,12 +1655,18 @@ "json5": ["json5@2.2.3", "", { "bin": "lib/cli.js" }, "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="], + "jsonrepair": ["jsonrepair@3.14.0", "", { "bin": { "jsonrepair": "bin/cli.js" } }, "sha512-tWPGKMZf/8UPim+fcW2EfcQ/d/7aKUrP6IECz9G3Tu6Q5dX0orSleqJ9z6sSw7qrQkjF8/Edo4DvsWBZ8H+HNg=="], + + "jsonschema": ["jsonschema@1.5.0", "", {}, "sha512-K+A9hhqbn0f3pJX17Q/7H6yQfD/5OXgdrR5UE12gMXCiN9D5Xq2o5mddV2QEcX/bjla99ASsAAQUyMCCRWAEhw=="], + "jsx-ast-utils": ["jsx-ast-utils@3.3.5", "", { "dependencies": { "array-includes": "^3.1.6", "array.prototype.flat": "^1.3.1", "object.assign": "^4.1.4", "object.values": "^1.1.6" } }, "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ=="], "keyv": ["keyv@4.5.4", "", { "dependencies": { "json-buffer": "3.0.1" } }, "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw=="], "kleur": ["kleur@3.0.3", "", {}, "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w=="], + "knip": ["knip@6.17.1", "", { "dependencies": { "fdir": "^6.5.0", "formatly": "^0.3.0", "get-tsconfig": "4.14.0", "jiti": "^2.7.0", "oxc-parser": "^0.135.0", "oxc-resolver": "^11.20.0", "picomatch": "^4.0.4", "smol-toml": "^1.6.1", "strip-json-comments": "5.0.3", "tinyglobby": "^0.2.17", "unbash": "^4.0.1", "yaml": "^2.9.0", "zod": "^4.1.11" }, "bin": { "knip": "bin/knip.js", "knip-bun": "bin/knip-bun.js" } }, "sha512-HcQsZSQ4Ymhuay4BVzJtM5pFZNDSomYYqcNCZOSITPQh9g18a09DqziWAxSt2G+BH9wGlG+0ZjWpEnaFlnKseQ=="], + "lan-network": ["lan-network@0.1.7", "", { "bin": { "lan-network": "dist/lan-network-cli.js" } }, "sha512-mnIlAEMu4OyEvUNdzco9xpuB9YVcPkQec+QsgycBCtPZvEqWPCDPfbAE4OJMdBBWpZWtpCn1xw9jJYlwjWI5zQ=="], "leven": ["leven@3.1.0", "", {}, "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A=="], @@ -1697,22 +1707,14 @@ "lodash.debounce": ["lodash.debounce@4.0.8", "", {}, "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow=="], - "lodash.get": ["lodash.get@4.4.2", "", {}, "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ=="], - - "lodash.isequal": ["lodash.isequal@4.5.0", "", {}, "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ=="], - "lodash.merge": ["lodash.merge@4.6.2", "", {}, "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="], - "lodash.mergewith": ["lodash.mergewith@4.6.2", "", {}, "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ=="], - "lodash.throttle": ["lodash.throttle@4.1.1", "", {}, "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ=="], "log-symbols": ["log-symbols@2.2.0", "", { "dependencies": { "chalk": "^2.0.1" } }, "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg=="], "loose-envify": ["loose-envify@1.4.0", "", { "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, "bin": "cli.js" }, "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q=="], - "lottie-react-native": ["lottie-react-native@7.2.2", "", { "peerDependencies": { "@lottiefiles/dotlottie-react": "^0.6.5", "react": "*", "react-native": ">=0.46", "react-native-windows": ">=0.63.x" }, "optionalPeers": ["@lottiefiles/dotlottie-react", "react-native-windows"] }, "sha512-pp3dnFVFZlfZzIL5qKGXju2d6RfnYhPbb8xQL9dYqvPbPy2EbnK2aFlv6jAZLYh0QjUGPEmRAgAAnsOOtT+H9Q=="], - "lowercase-keys": ["lowercase-keys@2.0.0", "", {}, "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA=="], "lru-cache": ["lru-cache@5.1.1", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="], @@ -1723,8 +1725,6 @@ "make-error": ["make-error@1.3.6", "", {}, "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw=="], - "make-fetch-happen": ["make-fetch-happen@9.1.0", "", { "dependencies": { "agentkeepalive": "^4.1.3", "cacache": "^15.2.0", "http-cache-semantics": "^4.1.0", "http-proxy-agent": "^4.0.1", "https-proxy-agent": "^5.0.0", "is-lambda": "^1.0.1", "lru-cache": "^6.0.0", "minipass": "^3.1.3", "minipass-collect": "^1.0.2", "minipass-fetch": "^1.3.2", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "negotiator": "^0.6.2", "promise-retry": "^2.0.1", "socks-proxy-agent": "^6.0.0", "ssri": "^8.0.0" } }, "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg=="], - "makeerror": ["makeerror@1.0.12", "", { "dependencies": { "tmpl": "1.0.5" } }, "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg=="], "marky": ["marky@1.2.5", "", {}, "sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q=="], @@ -1733,12 +1733,18 @@ "mdn-data": ["mdn-data@2.0.14", "", {}, "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow=="], + "media-typer": ["media-typer@0.3.0", "", {}, "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ=="], + "memoize-one": ["memoize-one@5.2.1", "", {}, "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q=="], + "merge-descriptors": ["merge-descriptors@1.0.3", "", {}, "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ=="], + "merge-stream": ["merge-stream@2.0.0", "", {}, "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w=="], "merge2": ["merge2@1.4.1", "", {}, "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="], + "methods": ["methods@1.1.2", "", {}, "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w=="], + "metro": ["metro@0.82.5", "", { "dependencies": { "@babel/code-frame": "^7.24.7", "@babel/core": "^7.25.2", "@babel/generator": "^7.25.0", "@babel/parser": "^7.25.3", "@babel/template": "^7.25.0", "@babel/traverse": "^7.25.3", "@babel/types": "^7.25.2", "accepts": "^1.3.7", "chalk": "^4.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.29.1", "image-size": "^1.0.2", "invariant": "^2.2.4", "jest-worker": "^29.7.0", "jsc-safe-url": "^0.2.2", "lodash.throttle": "^4.1.1", "metro-babel-transformer": "0.82.5", "metro-cache": "0.82.5", "metro-cache-key": "0.82.5", "metro-config": "0.82.5", "metro-core": "0.82.5", "metro-file-map": "0.82.5", "metro-resolver": "0.82.5", "metro-runtime": "0.82.5", "metro-source-map": "0.82.5", "metro-symbolicate": "0.82.5", "metro-transform-plugins": "0.82.5", "metro-transform-worker": "0.82.5", "mime-types": "^2.1.27", "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" } }, "sha512-8oAXxL7do8QckID/WZEKaIFuQJFUTLzfVcC48ghkHhNK2RGuQq8Xvf4AVd+TUA0SZtX0q8TGNXZ/eba1ckeGCg=="], "metro-babel-transformer": ["metro-babel-transformer@0.82.5", "", { "dependencies": { "@babel/core": "^7.25.2", "flow-enums-runtime": "^0.0.6", "hermes-parser": "0.29.1", "nullthrows": "^1.1.1" } }, "sha512-W/scFDnwJXSccJYnOFdGiYr9srhbHPdxX9TvvACOFsIXdLilh3XuxQl/wXW6jEJfgIb0jTvoTlwwrqvuwymr6Q=="], @@ -1785,25 +1791,13 @@ "minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="], - "minipass": ["minipass@5.0.0", "", {}, "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ=="], - - "minipass-collect": ["minipass-collect@1.0.2", "", { "dependencies": { "minipass": "^3.0.0" } }, "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA=="], - - "minipass-fetch": ["minipass-fetch@1.4.1", "", { "dependencies": { "minipass": "^3.1.0", "minipass-sized": "^1.0.3", "minizlib": "^2.0.0" }, "optionalDependencies": { "encoding": "^0.1.12" } }, "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw=="], - - "minipass-flush": ["minipass-flush@1.0.5", "", { "dependencies": { "minipass": "^3.0.0" } }, "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw=="], - - "minipass-pipeline": ["minipass-pipeline@1.2.4", "", { "dependencies": { "minipass": "^3.0.0" } }, "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A=="], + "minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="], - "minipass-sized": ["minipass-sized@1.0.3", "", { "dependencies": { "minipass": "^3.0.0" } }, "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g=="], + "minizlib": ["minizlib@3.0.2", "", { "dependencies": { "minipass": "^7.1.2" } }, "sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA=="], - "minizlib": ["minizlib@2.1.2", "", { "dependencies": { "minipass": "^3.0.0", "yallist": "^4.0.0" } }, "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg=="], + "mkdirp": ["mkdirp@0.5.6", "", { "dependencies": { "minimist": "^1.2.6" }, "bin": "bin/cmd.js" }, "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw=="], - "mkdirp": ["mkdirp@1.0.4", "", { "bin": "bin/cmd.js" }, "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="], - - "mkdirp-classic": ["mkdirp-classic@0.5.3", "", {}, "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="], - - "moment": ["moment@2.30.1", "", {}, "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how=="], + "morgan": ["morgan@1.11.0", "", { "dependencies": { "basic-auth": "~2.0.1", "debug": "2.6.9", "depd": "~2.0.0", "on-finished": "~2.4.1", "on-headers": "~1.1.0" } }, "sha512-zSkVu3t18r39pw4ixfBKvfZi3y2UOqr7d4WYwcj3m8nXpEQK4rPO6GLzs/CExoRgmX3y9EjmmcXqv6jq0SK46g=="], "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], @@ -1811,8 +1805,6 @@ "nanoid": ["nanoid@3.3.8", "", { "bin": "bin/nanoid.cjs" }, "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w=="], - "napi-build-utils": ["napi-build-utils@1.0.2", "", {}, "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg=="], - "nativewind": ["nativewind@4.1.23", "", { "dependencies": { "comment-json": "^4.2.5", "debug": "^4.3.7", "react-native-css-interop": "0.1.22" }, "peerDependencies": { "tailwindcss": ">3.3.0" } }, "sha512-oLX3suGI6ojQqWxdQezOSM5GmJ4KvMnMtmaSMN9Ggb5j7ysFt4nHxb1xs8RDjZR7BWc+bsetNJU8IQdQMHqRpg=="], "natural-compare": ["natural-compare@1.4.0", "", {}, "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw=="], @@ -1821,22 +1813,14 @@ "nested-error-stacks": ["nested-error-stacks@2.0.1", "", {}, "sha512-SrQrok4CATudVzBS7coSz26QRSmlK9TzzoFbeKfcPBUFPjcQM9Rqvr/DlJkOrwI/0KcgvMub1n1g5Jt9EgRn4A=="], - "node-abi": ["node-abi@3.68.0", "", { "dependencies": { "semver": "^7.3.5" } }, "sha512-7vbj10trelExNjFSBm5kTvZXXa7pZyKWx9RCKIyqe6I9Ev3IzGpQoqBP3a+cOdxY+pWj6VkP28n/2wWysBHD/A=="], - - "node-addon-api": ["node-addon-api@7.1.1", "", {}, "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ=="], - "node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" } }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="], "node-forge": ["node-forge@1.4.0", "", {}, "sha512-LarFH0+6VfriEhqMMcLX2F7SwSXeWwnEAJEsYm5QKWchiVYVvJyV9v7UDvUv+w5HO23ZpQTXDv/GxdDdMyOuoQ=="], - "node-gyp": ["node-gyp@8.4.1", "", { "dependencies": { "env-paths": "^2.2.0", "glob": "^7.1.4", "graceful-fs": "^4.2.6", "make-fetch-happen": "^9.1.0", "nopt": "^5.0.0", "npmlog": "^6.0.0", "rimraf": "^3.0.2", "semver": "^7.3.5", "tar": "^6.1.2", "which": "^2.0.2" }, "bin": "bin/node-gyp.js" }, "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w=="], - "node-int64": ["node-int64@0.4.0", "", {}, "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw=="], "node-releases": ["node-releases@2.0.18", "", {}, "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g=="], - "nopt": ["nopt@5.0.0", "", { "dependencies": { "abbrev": "1" }, "bin": "bin/nopt.js" }, "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ=="], - "normalize-path": ["normalize-path@3.0.0", "", {}, "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="], "normalize-url": ["normalize-url@6.1.0", "", {}, "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A=="], @@ -1845,8 +1829,6 @@ "npm-run-path": ["npm-run-path@4.0.1", "", { "dependencies": { "path-key": "^3.0.0" } }, "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw=="], - "npmlog": ["npmlog@6.0.2", "", { "dependencies": { "are-we-there-yet": "^3.0.0", "console-control-strings": "^1.1.0", "gauge": "^4.0.3", "set-blocking": "^2.0.0" } }, "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg=="], - "nth-check": ["nth-check@2.1.1", "", { "dependencies": { "boolbase": "^1.0.0" } }, "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w=="], "nullthrows": ["nullthrows@1.1.1", "", {}, "sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw=="], @@ -1881,9 +1863,7 @@ "onetime": ["onetime@5.1.2", "", { "dependencies": { "mimic-fn": "^2.1.0" } }, "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg=="], - "open": ["open@7.4.2", "", { "dependencies": { "is-docker": "^2.0.0", "is-wsl": "^2.1.1" } }, "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q=="], - - "openapi-types": ["openapi-types@12.1.3", "", {}, "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw=="], + "open": ["open@8.4.2", "", { "dependencies": { "define-lazy-prop": "^2.0.0", "is-docker": "^2.1.1", "is-wsl": "^2.2.0" } }, "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ=="], "optionator": ["optionator@0.9.4", "", { "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", "type-check": "^0.4.0", "word-wrap": "^1.2.5" } }, "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g=="], @@ -1895,14 +1875,16 @@ "ox": ["ox@0.6.9", "", { "dependencies": { "@adraffy/ens-normalize": "^1.10.1", "@noble/curves": "^1.6.0", "@noble/hashes": "^1.5.0", "@scure/bip32": "^1.5.0", "@scure/bip39": "^1.4.0", "abitype": "^1.0.6", "eventemitter3": "5.0.1" }, "peerDependencies": { "typescript": ">=5.4.0" }, "optionalPeers": ["typescript"] }, "sha512-wi5ShvzE4eOcTwQVsIPdFr+8ycyX+5le/96iAJutaZAvCes1J0+RvpEPg5QDPDiaR0XQQAvZVl7AwqQcINuUug=="], + "oxc-parser": ["oxc-parser@0.135.0", "", { "dependencies": { "@oxc-project/types": "^0.135.0" }, "optionalDependencies": { "@oxc-parser/binding-android-arm-eabi": "0.135.0", "@oxc-parser/binding-android-arm64": "0.135.0", "@oxc-parser/binding-darwin-arm64": "0.135.0", "@oxc-parser/binding-darwin-x64": "0.135.0", "@oxc-parser/binding-freebsd-x64": "0.135.0", "@oxc-parser/binding-linux-arm-gnueabihf": "0.135.0", "@oxc-parser/binding-linux-arm-musleabihf": "0.135.0", "@oxc-parser/binding-linux-arm64-gnu": "0.135.0", "@oxc-parser/binding-linux-arm64-musl": "0.135.0", "@oxc-parser/binding-linux-ppc64-gnu": "0.135.0", "@oxc-parser/binding-linux-riscv64-gnu": "0.135.0", "@oxc-parser/binding-linux-riscv64-musl": "0.135.0", "@oxc-parser/binding-linux-s390x-gnu": "0.135.0", "@oxc-parser/binding-linux-x64-gnu": "0.135.0", "@oxc-parser/binding-linux-x64-musl": "0.135.0", "@oxc-parser/binding-openharmony-arm64": "0.135.0", "@oxc-parser/binding-wasm32-wasi": "0.135.0", "@oxc-parser/binding-win32-arm64-msvc": "0.135.0", "@oxc-parser/binding-win32-ia32-msvc": "0.135.0", "@oxc-parser/binding-win32-x64-msvc": "0.135.0" } }, "sha512-/DaPStu0s2zzNSRRniKyTPM6Z/o+DapOp2JYNKDL8AsgaBGPK2IdZyB87SQjVH+xeQPz+Qr9mrjglfkYgtbVRA=="], + + "oxc-resolver": ["oxc-resolver@11.21.3", "", { "optionalDependencies": { "@oxc-resolver/binding-android-arm-eabi": "11.21.3", "@oxc-resolver/binding-android-arm64": "11.21.3", "@oxc-resolver/binding-darwin-arm64": "11.21.3", "@oxc-resolver/binding-darwin-x64": "11.21.3", "@oxc-resolver/binding-freebsd-x64": "11.21.3", "@oxc-resolver/binding-linux-arm-gnueabihf": "11.21.3", "@oxc-resolver/binding-linux-arm-musleabihf": "11.21.3", "@oxc-resolver/binding-linux-arm64-gnu": "11.21.3", "@oxc-resolver/binding-linux-arm64-musl": "11.21.3", "@oxc-resolver/binding-linux-ppc64-gnu": "11.21.3", "@oxc-resolver/binding-linux-riscv64-gnu": "11.21.3", "@oxc-resolver/binding-linux-riscv64-musl": "11.21.3", "@oxc-resolver/binding-linux-s390x-gnu": "11.21.3", "@oxc-resolver/binding-linux-x64-gnu": "11.21.3", "@oxc-resolver/binding-linux-x64-musl": "11.21.3", "@oxc-resolver/binding-openharmony-arm64": "11.21.3", "@oxc-resolver/binding-wasm32-wasi": "11.21.3", "@oxc-resolver/binding-win32-arm64-msvc": "11.21.3", "@oxc-resolver/binding-win32-x64-msvc": "11.21.3" } }, "sha512-2Mx3fKQz7+xgrBONjsxOgCGtMHOn38/HxMzW1I5efwXB5a4lRN0Vp40gYUJFBWJslcrvwoofTrqoTnLbwTd3pA=="], + "p-cancelable": ["p-cancelable@2.1.1", "", {}, "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg=="], "p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="], "p-locate": ["p-locate@5.0.0", "", { "dependencies": { "p-limit": "^3.0.2" } }, "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw=="], - "p-map": ["p-map@4.0.0", "", { "dependencies": { "aggregate-error": "^3.0.0" } }, "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ=="], - "p-try": ["p-try@2.2.0", "", {}, "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="], "package-json-from-dist": ["package-json-from-dist@1.0.1", "", {}, "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw=="], @@ -1929,13 +1911,15 @@ "path-scurry": ["path-scurry@1.11.1", "", { "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" } }, "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA=="], + "path-to-regexp": ["path-to-regexp@0.1.13", "", {}, "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA=="], + "path-type": ["path-type@4.0.0", "", {}, "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw=="], "paths-js": ["paths-js@0.4.11", "", {}, "sha512-3mqcLomDBXOo7Fo+UlaenG6f71bk1ZezPQy2JCmYHy2W2k5VKpP+Jbin9H0bjXynelTbglCqdFhSEkeIkKTYUA=="], "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], - "picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], + "picomatch": ["picomatch@4.0.4", "", {}, "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A=="], "pify": ["pify@2.3.0", "", {}, "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog=="], @@ -1945,7 +1929,7 @@ "plist": ["plist@3.1.0", "", { "dependencies": { "@xmldom/xmldom": "^0.8.8", "base64-js": "^1.5.1", "xmlbuilder": "^15.1.1" } }, "sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ=="], - "pngjs": ["pngjs@3.4.0", "", {}, "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w=="], + "pngjs": ["pngjs@7.0.0", "", {}, "sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow=="], "point-in-polygon": ["point-in-polygon@1.1.0", "", {}, "sha512-3ojrFwjnnw8Q9242TzgXuTD+eKiutbzyslcq1ydfu82Db2y+Ogbmyrkpv0Hgj31qwT3lbS9+QAAO/pIQM35XRw=="], @@ -1967,16 +1951,12 @@ "preact": ["preact@10.24.2", "", {}, "sha512-1cSoF0aCC8uaARATfrlz4VCBqE8LwZwRfLgkxJOQwAlQt6ayTmi0D9OF7nXid1POI5SZidFuG9CnlXbDfLqY/Q=="], - "prebuild-install": ["prebuild-install@7.1.2", "", { "dependencies": { "detect-libc": "^2.0.0", "expand-template": "^2.0.3", "github-from-package": "0.0.0", "minimist": "^1.2.3", "mkdirp-classic": "^0.5.3", "napi-build-utils": "^1.0.1", "node-abi": "^3.3.0", "pump": "^3.0.0", "rc": "^1.2.7", "simple-get": "^4.0.0", "tar-fs": "^2.0.0", "tunnel-agent": "^0.6.0" }, "bin": "bin.js" }, "sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ=="], - "prelude-ls": ["prelude-ls@1.2.1", "", {}, "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g=="], "prettier": ["prettier@3.6.2", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ=="], "prettier-linter-helpers": ["prettier-linter-helpers@1.0.0", "", { "dependencies": { "fast-diff": "^1.1.2" } }, "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w=="], - "prettier-plugin-tailwindcss": ["prettier-plugin-tailwindcss@0.5.14", "", { "peerDependencies": { "@ianvs/prettier-plugin-sort-imports": "*", "@prettier/plugin-pug": "*", "@shopify/prettier-plugin-liquid": "*", "@trivago/prettier-plugin-sort-imports": "*", "@zackad/prettier-plugin-twig-melody": "*", "prettier": "^3.0", "prettier-plugin-astro": "*", "prettier-plugin-css-order": "*", "prettier-plugin-import-sort": "*", "prettier-plugin-jsdoc": "*", "prettier-plugin-marko": "*", "prettier-plugin-organize-attributes": "*", "prettier-plugin-organize-imports": "*", "prettier-plugin-sort-imports": "*", "prettier-plugin-style-order": "*", "prettier-plugin-svelte": "*" }, "optionalPeers": ["@ianvs/prettier-plugin-sort-imports", "@prettier/plugin-pug", "@shopify/prettier-plugin-liquid", "@trivago/prettier-plugin-sort-imports", "@zackad/prettier-plugin-twig-melody", "prettier-plugin-astro", "prettier-plugin-css-order", "prettier-plugin-import-sort", "prettier-plugin-jsdoc", "prettier-plugin-marko", "prettier-plugin-organize-attributes", "prettier-plugin-organize-imports", "prettier-plugin-sort-imports", "prettier-plugin-style-order", "prettier-plugin-svelte"] }, "sha512-Puaz+wPUAhFp8Lo9HuciYKM2Y2XExESjeT+9NQoVFXZsPPnc9VYss2SpxdQ6vbatmt8/4+SN0oe0I1cPDABg9Q=="], - "pretty-bytes": ["pretty-bytes@5.6.0", "", {}, "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg=="], "pretty-format": ["pretty-format@30.0.5", "", { "dependencies": { "@jest/schemas": "30.0.5", "ansi-styles": "^5.2.0", "react-is": "^18.3.1" } }, "sha512-D1tKtYvByrBkFLe2wHJl2bwMJIiT8rW+XA+TiataH79/FszLQMrpGEvzUVkzPau7OCO0Qnrhpe87PqtOAIB8Yw=="], @@ -1987,14 +1967,12 @@ "promise": ["promise@8.3.0", "", { "dependencies": { "asap": "~2.0.6" } }, "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg=="], - "promise-inflight": ["promise-inflight@1.0.1", "", {}, "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g=="], - - "promise-retry": ["promise-retry@2.0.1", "", { "dependencies": { "err-code": "^2.0.2", "retry": "^0.12.0" } }, "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g=="], - "prompts": ["prompts@2.4.2", "", { "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" } }, "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q=="], "prop-types": ["prop-types@15.8.1", "", { "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", "react-is": "^16.13.1" } }, "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg=="], + "proxy-addr": ["proxy-addr@2.0.7", "", { "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" } }, "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg=="], + "psl": ["psl@1.9.0", "", {}, "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag=="], "pump": ["pump@3.0.2", "", { "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw=="], @@ -2007,6 +1985,8 @@ "qrcode.react": ["qrcode.react@4.2.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-QpgqWi8rD9DsS9EP3z7BT+5lY5SFhsqGjpgW5DY/i3mK4M9DTBNz3ErMi8BWYEfI3L0d8GIbGmcdFAS1uIRGjA=="], + "qs": ["qs@6.15.2", "", { "dependencies": { "side-channel": "^1.1.0" } }, "sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw=="], + "query-string": ["query-string@7.1.3", "", { "dependencies": { "decode-uri-component": "^0.2.2", "filter-obj": "^1.1.0", "split-on-first": "^1.0.0", "strict-uri-encode": "^2.0.0" } }, "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg=="], "querystringify": ["querystringify@2.2.0", "", {}, "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ=="], @@ -2019,6 +1999,8 @@ "range-parser": ["range-parser@1.2.1", "", {}, "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="], + "raw-body": ["raw-body@2.5.3", "", { "dependencies": { "bytes": "~3.1.2", "http-errors": "~2.0.1", "iconv-lite": "~0.4.24", "unpipe": "~1.0.0" } }, "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA=="], + "rc": ["rc@1.2.8", "", { "dependencies": { "deep-extend": "^0.6.0", "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" }, "bin": "cli.js" }, "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw=="], "react": ["react@19.0.0", "", {}, "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ=="], @@ -2027,13 +2009,11 @@ "react-dom": ["react-dom@19.0.0", "", { "dependencies": { "scheduler": "^0.25.0" }, "peerDependencies": { "react": "^19.0.0" } }, "sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ=="], - "react-error-boundary": ["react-error-boundary@3.1.4", "", { "dependencies": { "@babel/runtime": "^7.12.5" }, "peerDependencies": { "react": ">=16.13.1" } }, "sha512-uM9uPzZJTF6wRQORmSrvOIgt4lJ9MC1sNgEOj2XGsDTRE4kmpWxg7ENK9EWNKJRMAOY9z0MuF4yIfl6gp4sotA=="], - "react-fast-compare": ["react-fast-compare@3.2.2", "", {}, "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ=="], "react-freeze": ["react-freeze@1.0.4", "", { "peerDependencies": { "react": ">=17.0.0" } }, "sha512-r4F0Sec0BLxWicc7HEyo2x3/2icUTrRmDjaaRyzzn+7aDyFZliszMDOgLVwSnQnYENOlL1o569Ze2HZefk8clA=="], - "react-is": ["react-is@19.1.1", "", {}, "sha512-tr41fA15Vn8p4X9ntI+yCyeGSf1TlYaY5vlTZfQmeLBrFo3psOPX6HhTDnFNL9uj3EhP0KAQ80cugCl4b4BERA=="], + "react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], "react-native": ["react-native@0.79.6", "", { "dependencies": { "@jest/create-cache-key-function": "^29.7.0", "@react-native/assets-registry": "0.79.6", "@react-native/codegen": "0.79.6", "@react-native/community-cli-plugin": "0.79.6", "@react-native/gradle-plugin": "0.79.6", "@react-native/js-polyfills": "0.79.6", "@react-native/normalize-colors": "0.79.6", "@react-native/virtualized-lists": "0.79.6", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", "babel-jest": "^29.7.0", "babel-plugin-syntax-hermes-parser": "0.25.1", "base64-js": "^1.5.1", "chalk": "^4.0.0", "commander": "^12.0.0", "event-target-shim": "^5.0.1", "flow-enums-runtime": "^0.0.6", "glob": "^7.1.1", "invariant": "^2.2.4", "jest-environment-node": "^29.7.0", "memoize-one": "^5.0.0", "metro-runtime": "^0.82.0", "metro-source-map": "^0.82.0", "nullthrows": "^1.1.1", "pretty-format": "^29.7.0", "promise": "^8.3.0", "react-devtools-core": "^6.1.1", "react-refresh": "^0.14.0", "regenerator-runtime": "^0.13.2", "scheduler": "0.25.0", "semver": "^7.1.3", "stacktrace-parser": "^0.1.10", "whatwg-fetch": "^3.0.0", "ws": "^6.2.3", "yargs": "^17.6.2" }, "peerDependencies": { "@types/react": "^19.0.0", "react": "^19.0.0" }, "optionalPeers": ["@types/react"], "bin": { "react-native": "cli.js" } }, "sha512-kvIWSmf4QPfY41HC25TR285N7Fv0Pyn3DAEK8qRL9dA35usSaxsJkHfw+VqnonqJjXOaoKCEanwudRAJ60TBGA=="], @@ -2041,8 +2021,6 @@ "react-native-animatable": ["react-native-animatable@1.4.0", "", { "dependencies": { "prop-types": "^15.8.1" } }, "sha512-DZwaDVWm2NBvBxf7I0wXKXLKb/TxDnkV53sWhCvei1pRyTX3MVFpkvdYBknNBqPrxYuAIlPxEp7gJOidIauUkw=="], - "react-native-calendars": ["react-native-calendars@1.1313.0", "", { "dependencies": { "hoist-non-react-statics": "^3.3.1", "lodash": "^4.17.15", "memoize-one": "^5.2.1", "prop-types": "^15.5.10", "react-native-safe-area-context": "4.5.0", "react-native-swipe-gestures": "^1.0.5", "recyclerlistview": "^4.0.0", "xdate": "^0.8.0" }, "optionalDependencies": { "moment": "^2.29.4" } }, "sha512-YQ7Vg57rBRVymolamYDTxZ0lPOELTDHQbTukTWdxR47aRBYJwKI6ocRbwcY5gYgyDwNgJS4uLGu5AvmYS74LYQ=="], - "react-native-chart-kit": ["react-native-chart-kit@6.12.0", "", { "dependencies": { "lodash": "^4.17.13", "paths-js": "^0.4.10", "point-in-polygon": "^1.0.1" }, "peerDependencies": { "react": "> 16.7.0", "react-native": ">= 0.50.0", "react-native-svg": "> 6.4.1" } }, "sha512-nZLGyCFzZ7zmX0KjYeeSV1HKuPhl1wOMlTAqa0JhlyW62qV/1ZPXHgT8o9s8mkFaGxdqbspOeuaa6I9jUQDgnA=="], "react-native-css-interop": ["react-native-css-interop@0.1.22", "", { "dependencies": { "@babel/helper-module-imports": "^7.22.15", "@babel/traverse": "^7.23.0", "@babel/types": "^7.23.0", "debug": "^4.3.7", "lightningcss": "^1.27.0", "semver": "^7.6.3" }, "peerDependencies": { "react": ">=18", "react-native": "*", "react-native-reanimated": ">=3.6.2", "tailwindcss": "~3" } }, "sha512-Mu01e+H9G+fxSWvwtgWlF5MJBJC4VszTCBXopIpeR171lbeBInHb8aHqoqRPxmJpi3xIHryzqKFOJYAdk7PBxg=="], @@ -2051,6 +2029,8 @@ "react-native-edge-to-edge": ["react-native-edge-to-edge@1.6.0", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-2WCNdE3Qd6Fwg9+4BpbATUxCLcouF6YRY7K+J36KJ4l3y+tWN6XCqAC4DuoGblAAbb2sLkhEDp4FOlbOIot2Og=="], + "react-native-executorch": ["react-native-executorch@0.8.4", "", { "dependencies": { "@huggingface/jinja": "^0.5.0", "jsonrepair": "^3.12.0", "jsonschema": "^1.5.0", "pngjs": "^7.0.0", "zod": "^4.3.6" }, "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-3g4TIKsMJCn8gkwx15yEtM9/glmRnSEzpz4J1jCiG5W0oe6E27bI46sU+x9uRo0xq9pXwoGygQw/cqv3Y+I+aw=="], + "react-native-gesture-handler": ["react-native-gesture-handler@2.24.0", "", { "dependencies": { "@egjs/hammerjs": "^2.0.17", "hoist-non-react-statics": "^3.3.0", "invariant": "^2.2.4" }, "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-ZdWyOd1C8axKJHIfYxjJKCcxjWEpUtUWgTOVY2wynbiveSQDm8X/PDyAKXSer/GOtIpjudUbACOndZXCN3vHsw=="], "react-native-is-edge-to-edge": ["react-native-is-edge-to-edge@1.1.7", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-EH6i7E8epJGIcu7KpfXYXiV2JFIYITtq+rVS8uEb+92naMRBdxhTuS8Wn2Q7j9sqyO0B+Xbaaf9VdipIAmGW4w=="], @@ -2059,6 +2039,8 @@ "react-native-nitro-modules": ["react-native-nitro-modules@0.35.9", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-yCO6eJ85SPPUo4a4an7H5oj6wPCSIT72fbjr5WZ/20n6zswaJ2gNNpnWtg2We0AZwkAOjSqkOJ0Vjc05p6kGiA=="], + "react-native-performance": ["react-native-performance@6.0.0", "", { "peerDependencies": { "react-native": "*" } }, "sha512-Sca75O8jhqXAnNbqvINnrw248Kv9cIwoGxToD8u2uX+BrkAxxXS+YhClEV5L3JdiOpdNCO1MJ5R9bgs2VkNpFg=="], + "react-native-reanimated": ["react-native-reanimated@3.17.5", "", { "dependencies": { "@babel/plugin-transform-arrow-functions": "^7.0.0-0", "@babel/plugin-transform-class-properties": "^7.0.0-0", "@babel/plugin-transform-classes": "^7.0.0-0", "@babel/plugin-transform-nullish-coalescing-operator": "^7.0.0-0", "@babel/plugin-transform-optional-chaining": "^7.0.0-0", "@babel/plugin-transform-shorthand-properties": "^7.0.0-0", "@babel/plugin-transform-template-literals": "^7.0.0-0", "@babel/plugin-transform-unicode-regex": "^7.0.0-0", "@babel/preset-typescript": "^7.16.7", "convert-source-map": "^2.0.0", "invariant": "^2.2.4", "react-native-is-edge-to-edge": "1.1.7" }, "peerDependencies": { "@babel/core": "^7.0.0-0", "react": "*", "react-native": "*" } }, "sha512-SxBK7wQfJ4UoWoJqQnmIC7ZjuNgVb9rcY5Xc67upXAFKftWg0rnkknTw6vgwnjRcvYThrjzUVti66XoZdDJGtw=="], "react-native-safe-area-context": ["react-native-safe-area-context@5.4.0", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-JaEThVyJcLhA+vU0NU8bZ0a1ih6GiF4faZ+ArZLqpYbL6j7R3caRqj+mE3lEtKCuHgwjLg3bCxLL1GPUJZVqUA=="], @@ -2067,8 +2049,6 @@ "react-native-svg": ["react-native-svg@15.11.2", "", { "dependencies": { "css-select": "^5.1.0", "css-tree": "^1.1.3", "warn-once": "0.1.1" }, "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-+YfF72IbWQUKzCIydlijV1fLuBsQNGMT6Da2kFlo1sh+LE3BIm/2Q7AR1zAAR6L0BFLi1WaQPLfFUC9bNZpOmw=="], - "react-native-swipe-gestures": ["react-native-swipe-gestures@1.0.5", "", {}, "sha512-Ns7Bn9H/Tyw278+5SQx9oAblDZ7JixyzeOczcBK8dipQk2pD7Djkcfnf1nB/8RErAmMLL9iXgW0QHqiII8AhKw=="], - "react-native-toast-message": ["react-native-toast-message@2.3.3", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-4IIUHwUPvKHu4gjD0Vj2aGQzqPATiblL1ey8tOqsxOWRPGGu52iIbL8M/mCz4uyqecvPdIcMY38AfwRuUADfQQ=="], "react-native-url-polyfill": ["react-native-url-polyfill@2.0.0", "", { "dependencies": { "whatwg-url-without-unicode": "8.0.0-3" }, "peerDependencies": { "react-native": "*" } }, "sha512-My330Do7/DvKnEvwQc0WdcBnFPploYKp9CYlefDXzIdEaA+PAhDYllkvGeEroEzvc4Kzzj2O4yVdz8v6fjRvhA=="], @@ -2077,28 +2057,16 @@ "react-native-wheel-picker-expo": ["react-native-wheel-picker-expo@0.5.4", "", { "peerDependencies": { "expo-haptics": ">=11", "expo-linear-gradient": ">=11", "react": "*", "react-native": "*" } }, "sha512-mTA35pqAGioi7gie+nLF4EcwCj7zU36zzlYZVRS/bZul84zvvoMFKJu6Sm84WuWQiUJ40J1EgYxQ3Ui1pIMJZg=="], - "react-redux": ["react-redux@9.2.0", "", { "dependencies": { "@types/use-sync-external-store": "^0.0.6", "use-sync-external-store": "^1.4.0" }, "peerDependencies": { "@types/react": "^18.2.25 || ^19", "react": "^18.0 || ^19", "redux": "^5.0.0" }, "optionalPeers": ["@types/react", "redux"] }, "sha512-ROY9fvHhwOD9ySfrF0wmvu//bKCQ6AeZZq1nJNtbDC+kk5DuSuNX/n6YWYF/SYy7bSba4D4FSz8DJeKY/S/r+g=="], - "react-refresh": ["react-refresh@0.14.2", "", {}, "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA=="], "react-test-renderer": ["react-test-renderer@19.0.0", "", { "dependencies": { "react-is": "^19.0.0", "scheduler": "^0.25.0" }, "peerDependencies": { "react": "^19.0.0" } }, "sha512-oX5u9rOQlHzqrE/64CNr0HB0uWxkCQmZNSfozlYvwE71TLVgeZxVf0IjouGEr1v7r1kcDifdAJBeOhdhxsG/DA=="], "read-cache": ["read-cache@1.0.0", "", { "dependencies": { "pify": "^2.3.0" } }, "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA=="], - "readable-stream": ["readable-stream@3.6.2", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="], - "readdirp": ["readdirp@3.6.0", "", { "dependencies": { "picomatch": "^2.2.1" } }, "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA=="], - "recyclerlistview": ["recyclerlistview@4.2.3", "", { "dependencies": { "lodash.debounce": "4.0.8", "prop-types": "15.8.1", "ts-object-utils": "0.0.5" }, "peerDependencies": { "react": ">= 15.2.1", "react-native": ">= 0.30.0" } }, "sha512-STR/wj/FyT8EMsBzzhZ1l2goYirMkIgfV3gYEPxI3Kf3lOnu6f7Dryhyw7/IkQrgX5xtTcDrZMqytvteH9rL3g=="], - "redent": ["redent@3.0.0", "", { "dependencies": { "indent-string": "^4.0.0", "strip-indent": "^3.0.0" } }, "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg=="], - "redux": ["redux@5.0.1", "", {}, "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w=="], - - "redux-devtools-expo-dev-plugin": ["redux-devtools-expo-dev-plugin@0.2.1", "", { "dependencies": { "@redux-devtools/instrument": "^2.2.0", "@redux-devtools/utils": "^3.0.0", "jsan": "^3.1.14" }, "peerDependencies": { "expo": "*", "redux": "*" } }, "sha512-wzSZ/DDa1QoQ/Uh1BdtJJdFDj0URXXknkHNcO+Q2A3Pbt7LTku1gAuzIMdy36ET7Pp7ge+UDj2OAEpe6kyQqPA=="], - - "redux-thunk": ["redux-thunk@3.1.0", "", { "peerDependencies": { "redux": "^5.0.0" } }, "sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw=="], - "reflect.getprototypeof": ["reflect.getprototypeof@1.0.10", "", { "dependencies": { "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-abstract": "^1.23.9", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "get-intrinsic": "^1.2.7", "get-proto": "^1.0.1", "which-builtin-type": "^1.2.1" } }, "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw=="], "regenerate": ["regenerate@1.4.2", "", {}, "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A=="], @@ -2125,8 +2093,6 @@ "requires-port": ["requires-port@1.0.0", "", {}, "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ=="], - "reselect": ["reselect@5.1.1", "", {}, "sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w=="], - "resolve": ["resolve@1.22.8", "", { "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": "bin/resolve" }, "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw=="], "resolve-alpn": ["resolve-alpn@1.2.1", "", {}, "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g=="], @@ -2145,8 +2111,6 @@ "restore-cursor": ["restore-cursor@2.0.0", "", { "dependencies": { "onetime": "^2.0.0", "signal-exit": "^3.0.2" } }, "sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q=="], - "retry": ["retry@0.12.0", "", {}, "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow=="], - "reusify": ["reusify@1.0.4", "", {}, "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw=="], "rimraf": ["rimraf@3.0.2", "", { "dependencies": { "glob": "^7.1.3" }, "bin": "bin.js" }, "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA=="], @@ -2169,7 +2133,7 @@ "scheduler": ["scheduler@0.25.0", "", {}, "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA=="], - "semver": ["semver@7.7.2", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="], + "semver": ["semver@6.3.1", "", { "bin": "bin/semver.js" }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], "send": ["send@0.19.0", "", { "dependencies": { "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", "http-errors": "2.0.0", "mime": "1.6.0", "ms": "2.1.3", "on-finished": "2.4.1", "range-parser": "~1.2.1", "statuses": "2.0.1" } }, "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw=="], @@ -2179,8 +2143,6 @@ "server-only": ["server-only@0.0.1", "", {}, "sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA=="], - "set-blocking": ["set-blocking@2.0.0", "", {}, "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw=="], - "set-function-length": ["set-function-length@1.2.2", "", { "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", "has-property-descriptors": "^1.0.2" } }, "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg=="], "set-function-name": ["set-function-name@2.0.2", "", { "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", "functions-have-names": "^1.2.3", "has-property-descriptors": "^1.0.2" } }, "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ=="], @@ -2207,11 +2169,7 @@ "side-channel-weakmap": ["side-channel-weakmap@1.0.2", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3", "side-channel-map": "^1.0.1" } }, "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A=="], - "signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="], - - "simple-concat": ["simple-concat@1.0.1", "", {}, "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q=="], - - "simple-get": ["simple-get@4.0.1", "", { "dependencies": { "decompress-response": "^6.0.0", "once": "^1.3.1", "simple-concat": "^1.0.0" } }, "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA=="], + "signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="], "simple-plist": ["simple-plist@1.3.1", "", { "dependencies": { "bplist-creator": "0.1.0", "bplist-parser": "0.3.1", "plist": "^3.0.5" } }, "sha512-iMSw5i0XseMnrhtIzRb7XpQEXepa9xhWxGUojHBL43SIpQuDQkh3Wpy67ZbDzZVr6EKxvwVChnVpdl8hEVLDiw=="], @@ -2223,11 +2181,7 @@ "slugify": ["slugify@1.6.6", "", {}, "sha512-h+z7HKHYXj6wJU+AnS/+IH8Uh9fdcX1Lrhg1/VMdf9PwoBQXFcXiAdsy2tSK0P6gKwJLXp02r90ahUCqHk9rrw=="], - "smart-buffer": ["smart-buffer@4.2.0", "", {}, "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg=="], - - "socks": ["socks@2.8.3", "", { "dependencies": { "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" } }, "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw=="], - - "socks-proxy-agent": ["socks-proxy-agent@6.2.1", "", { "dependencies": { "agent-base": "^6.0.2", "debug": "^4.3.3", "socks": "^2.6.2" } }, "sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ=="], + "smol-toml": ["smol-toml@1.7.0", "", {}, "sha512-aqVvWoyO21L23mb+drl4RmMXbf6N7FdHjAhTRA9ZBL7apWBgfWC16KjrASI+1p9GAroljyMHj6fK67i0UiTNvQ=="], "source-map": ["source-map@0.5.7", "", {}, "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ=="], @@ -2239,12 +2193,6 @@ "sprintf-js": ["sprintf-js@1.0.3", "", {}, "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g=="], - "sql.js": ["sql.js@1.13.0", "", {}, "sha512-RJbVP1HRDlUUXahJ7VMTcu9Rm1Nzw+EBpoPr94vnbD4LwR715F3CcxE2G2k45PewcaZ57pjetYa+LoSJLAASgA=="], - - "sqlite3": ["sqlite3@5.1.7", "", { "dependencies": { "bindings": "^1.5.0", "node-addon-api": "^7.0.0", "prebuild-install": "^7.1.1", "tar": "^6.1.11" }, "optionalDependencies": { "node-gyp": "8.x" }, "peerDependencies": { "node-gyp": "8.x" } }, "sha512-GGIyOiFaG+TUra3JIfkI/zGP8yZYLPQ0pl1bH+ODjiX57sPhrLU5sQJn1y9bDKZUFYkX1crlrPfSYt0BKKdkog=="], - - "ssri": ["ssri@8.0.1", "", { "dependencies": { "minipass": "^3.1.1" } }, "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ=="], - "stack-generator": ["stack-generator@2.0.10", "", { "dependencies": { "stackframe": "^1.3.4" } }, "sha512-mwnua/hkqM6pF4k8SnmZ2zfETsRUpWXREfA/goT8SLCV4iOFa4bzOX2nDipWAZFPTjLvQB82f5yaodMVhK0yJQ=="], "stack-utils": ["stack-utils@2.0.6", "", { "dependencies": { "escape-string-regexp": "^2.0.0" } }, "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ=="], @@ -2263,6 +2211,10 @@ "stream-buffers": ["stream-buffers@2.2.0", "", {}, "sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg=="], + "stream-chain": ["stream-chain@2.2.5", "", {}, "sha512-1TJmBx6aSWqZ4tx7aTpBDXK0/e2hhcNSTV8+CbFJtDjbb+I1mZ8lHit0Grw9GRT+6JbIrrDd8esncgBi8aBXGA=="], + + "stream-json": ["stream-json@1.9.1", "", { "dependencies": { "stream-chain": "^2.2.5" } }, "sha512-uWkjJ+2Nt/LO9Z/JyKZbMusL8Dkh97uUBTv3AJQ74y07lVahLY4eEFsPsE97pxYBwr8nnjMAIch5eqI0gPShyw=="], + "strict-uri-encode": ["strict-uri-encode@2.0.0", "", {}, "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ=="], "string-length": ["string-length@5.0.1", "", { "dependencies": { "char-regex": "^2.0.0", "strip-ansi": "^7.0.1" } }, "sha512-9Ep08KAMUn0OadnVaBuRdE2l615CQ508kr0XMadjClfYpdCyvrbFp6Taebo8yyxokQ4viUd/xPPUA4FGgUa0ow=="], @@ -2281,8 +2233,6 @@ "string.prototype.trimstart": ["string.prototype.trimstart@1.0.8", "", { "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" } }, "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg=="], - "string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="], - "strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], "strip-ansi-cjs": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], @@ -2293,7 +2243,7 @@ "strip-indent": ["strip-indent@3.0.0", "", { "dependencies": { "min-indent": "^1.0.0" } }, "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ=="], - "strip-json-comments": ["strip-json-comments@3.1.1", "", {}, "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="], + "strip-json-comments": ["strip-json-comments@5.0.3", "", {}, "sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw=="], "structured-headers": ["structured-headers@0.4.1", "", {}, "sha512-0MP/Cxx5SzeeZ10p/bZI0S6MpgD+yxAhi1BOQ34jgnMXsCq3j1t6tQnZu+KdlL7dvJTLT3g9xN8tl10TqgFMcg=="], @@ -2311,10 +2261,6 @@ "supports-preserve-symlinks-flag": ["supports-preserve-symlinks-flag@1.0.0", "", {}, "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="], - "swagger-jsdoc": ["swagger-jsdoc@6.2.8", "", { "dependencies": { "commander": "6.2.0", "doctrine": "3.0.0", "glob": "7.1.6", "lodash.mergewith": "^4.6.2", "swagger-parser": "^10.0.3", "yaml": "2.0.0-1" }, "bin": { "swagger-jsdoc": "bin/swagger-jsdoc.js" } }, "sha512-VPvil1+JRpmJ55CgAtn8DIcpBs0bL5L3q5bVQvF4tAW/k/9JYSj7dCpaYCAv5rufe0vcCbBRQXGvzpkWjvLklQ=="], - - "swagger-parser": ["swagger-parser@10.0.3", "", { "dependencies": { "@apidevtools/swagger-parser": "10.0.3" } }, "sha512-nF7oMeL4KypldrQhac8RyHerJeGPD1p2xDh900GPvc+Nk7nWP6jX2FcC7WmkinMoAmoO774+AFXcWsW8gMWEIg=="], - "swr": ["swr@2.3.4", "", { "dependencies": { "dequal": "^2.0.3", "use-sync-external-store": "^1.4.0" }, "peerDependencies": { "react": "^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-bYd2lrhc+VarcpkgWclcUi92wYCpOgMws9Sd1hG1ntAu0NEy+14CbotuFjshBU2kt9rYj9TSmDcybpxpeTU1fg=="], "symbol-tree": ["symbol-tree@3.2.4", "", {}, "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="], @@ -2329,11 +2275,7 @@ "tapable": ["tapable@2.2.1", "", {}, "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ=="], - "tar": ["tar@6.2.1", "", { "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", "minipass": "^5.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" } }, "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A=="], - - "tar-fs": ["tar-fs@2.1.1", "", { "dependencies": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", "pump": "^3.0.0", "tar-stream": "^2.1.4" } }, "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng=="], - - "tar-stream": ["tar-stream@2.2.0", "", { "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", "fs-constants": "^1.0.0", "inherits": "^2.0.3", "readable-stream": "^3.1.1" } }, "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ=="], + "tar": ["tar@7.4.3", "", { "dependencies": { "@isaacs/fs-minipass": "^4.0.0", "chownr": "^3.0.0", "minipass": "^7.1.2", "minizlib": "^3.0.1", "mkdirp": "^3.0.1", "yallist": "^5.0.0" } }, "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw=="], "temp-dir": ["temp-dir@2.0.0", "", {}, "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg=="], @@ -2351,6 +2293,8 @@ "throat": ["throat@5.0.0", "", {}, "sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA=="], + "tinyglobby": ["tinyglobby@0.2.17", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.4" } }, "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g=="], + "tmp": ["tmp@0.0.33", "", { "dependencies": { "os-tmpdir": "~1.0.2" } }, "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw=="], "tmpl": ["tmpl@1.0.5", "", {}, "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw=="], @@ -2371,20 +2315,18 @@ "ts-node": ["ts-node@10.9.2", "", { "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", "@tsconfig/node12": "^1.0.7", "@tsconfig/node14": "^1.0.0", "@tsconfig/node16": "^1.0.2", "acorn": "^8.4.1", "acorn-walk": "^8.1.1", "arg": "^4.1.0", "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", "v8-compile-cache-lib": "^3.0.1", "yn": "3.1.1" }, "peerDependencies": { "@swc/core": ">=1.2.50", "@swc/wasm": ">=1.2.50", "@types/node": "*", "typescript": ">=2.7" }, "optionalPeers": ["@swc/core", "@swc/wasm"], "bin": { "ts-node": "dist/bin.js", "ts-node-cwd": "dist/bin-cwd.js", "ts-node-esm": "dist/bin-esm.js", "ts-node-script": "dist/bin-script.js", "ts-node-transpile-only": "dist/bin-transpile.js", "ts-script": "dist/bin-script-deprecated.js" } }, "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ=="], - "ts-object-utils": ["ts-object-utils@0.0.5", "", {}, "sha512-iV0GvHqOmilbIKJsfyfJY9/dNHCs969z3so90dQWsO1eMMozvTpnB1MEaUbb3FYtZTGjv5sIy/xmslEz0Rg2TA=="], - "tsconfig-paths": ["tsconfig-paths@3.15.0", "", { "dependencies": { "@types/json5": "^0.0.29", "json5": "^1.0.2", "minimist": "^1.2.6", "strip-bom": "^3.0.0" } }, "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg=="], "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], - "tunnel-agent": ["tunnel-agent@0.6.0", "", { "dependencies": { "safe-buffer": "^5.0.1" } }, "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w=="], - "type-check": ["type-check@0.4.0", "", { "dependencies": { "prelude-ls": "^1.2.1" } }, "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew=="], "type-detect": ["type-detect@4.0.8", "", {}, "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g=="], "type-fest": ["type-fest@0.20.2", "", {}, "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ=="], + "type-is": ["type-is@1.6.18", "", { "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" } }, "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g=="], + "typed-array-buffer": ["typed-array-buffer@1.0.3", "", { "dependencies": { "call-bound": "^1.0.3", "es-errors": "^1.3.0", "is-typed-array": "^1.1.14" } }, "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw=="], "typed-array-byte-length": ["typed-array-byte-length@1.0.3", "", { "dependencies": { "call-bind": "^1.0.8", "for-each": "^0.3.3", "gopd": "^1.2.0", "has-proto": "^1.2.0", "is-typed-array": "^1.1.14" } }, "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg=="], @@ -2397,6 +2339,8 @@ "ua-parser-js": ["ua-parser-js@1.0.39", "", { "bin": "script/cli.js" }, "sha512-k24RCVWlEcjkdOxYmVJgeD/0a1TiSpqLg+ZalVGV9lsnr4yqu0w7tX/x2xX6G4zpkgQnRf89lxuZ1wsbjXM8lw=="], + "unbash": ["unbash@4.0.1", "", {}, "sha512-1ajSo3813sDoVIHx4inJdUS4l5L2ic5cFiddemPiyjb/PZEoBAhFwHtbaEdRDFxbAKy7FCG7s5ww3/uCFawuIA=="], + "unbox-primitive": ["unbox-primitive@1.1.0", "", { "dependencies": { "call-bound": "^1.0.3", "has-bigints": "^1.0.2", "has-symbols": "^1.1.0", "which-boxed-primitive": "^1.1.1" } }, "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw=="], "undici": ["undici@6.21.1", "", {}, "sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ=="], @@ -2413,10 +2357,6 @@ "unimodules-app-loader": ["unimodules-app-loader@5.1.3", "", {}, "sha512-nPUkwfkpJWvdOQrVvyQSUol93/UdmsCVd9Hkx9RgAevmKSVYdZI+S87W73NGKl6QbwK9L1BDSY5OrQuo8Oq15g=="], - "unique-filename": ["unique-filename@1.1.1", "", { "dependencies": { "unique-slug": "^2.0.0" } }, "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ=="], - - "unique-slug": ["unique-slug@2.0.2", "", { "dependencies": { "imurmurhash": "^0.1.4" } }, "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w=="], - "unique-string": ["unique-string@2.0.0", "", { "dependencies": { "crypto-random-string": "^2.0.0" } }, "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg=="], "universalify": ["universalify@0.2.0", "", {}, "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg=="], @@ -2445,8 +2385,6 @@ "validate-npm-package-name": ["validate-npm-package-name@5.0.1", "", {}, "sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ=="], - "validator": ["validator@13.15.15", "", {}, "sha512-BgWVbCI72aIQy937xbawcs+hrVaN/CZ2UwutgaJ36hGqRrLNM+f5LUT/YPRbo8IV/ASeFzXszezV+y2+rq3l8A=="], - "vary": ["vary@1.1.2", "", {}, "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="], "viem": ["viem@2.36.0", "", { "dependencies": { "@noble/curves": "1.9.6", "@noble/hashes": "1.8.0", "@scure/bip32": "1.7.0", "@scure/bip39": "1.6.0", "abitype": "1.0.8", "isows": "1.0.7", "ox": "0.9.1", "ws": "8.18.3" }, "peerDependencies": { "typescript": ">=5.0.4" }, "optionalPeers": ["typescript"] }, "sha512-Xz7AkGtR43K+NY74X2lBevwfRrsXuifGUzt8QiULO47NXIcT7g3jcA4nIvl5m2OTE5v8SlzishwXmg64xOIVmQ=="], @@ -2455,6 +2393,8 @@ "w3c-xmlserializer": ["w3c-xmlserializer@4.0.0", "", { "dependencies": { "xml-name-validator": "^4.0.0" } }, "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw=="], + "walk-up-path": ["walk-up-path@4.0.0", "", {}, "sha512-3hu+tD8YzSLGuFYtPRb48vdhKMi0KQV5sn+uWr8+7dMEq/2G/dtLrdDinkLjqq5TIbIBjYJ4Ax/n3YiaW7QM8A=="], + "walker": ["walker@1.0.8", "", { "dependencies": { "makeerror": "1.0.12" } }, "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ=="], "warn-once": ["warn-once@0.1.1", "", {}, "sha512-VkQZJbO8zVImzYFteBXvBOZEl1qL175WH8VmZcxF2fZAoudNhNDvHi+doCaAEdU2l2vtcIwa2zn0QK5+I1HQ3Q=="], @@ -2483,8 +2423,6 @@ "which-typed-array": ["which-typed-array@1.1.18", "", { "dependencies": { "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.8", "call-bound": "^1.0.3", "for-each": "^0.3.3", "gopd": "^1.2.0", "has-tostringtag": "^1.0.2" } }, "sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA=="], - "wide-align": ["wide-align@1.1.5", "", { "dependencies": { "string-width": "^1.0.2 || 2 || 3 || 4" } }, "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg=="], - "wonka": ["wonka@6.3.5", "", {}, "sha512-SSil+ecw6B4/Dm7Pf2sAshKQ5hWFvfyGlfPbEd6A14dOH6VDjrmbY86u6nZvy9omGwwIPFR8V41+of1EezgoUw=="], "word-wrap": ["word-wrap@1.2.5", "", {}, "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA=="], @@ -2501,8 +2439,6 @@ "xcode": ["xcode@3.0.1", "", { "dependencies": { "simple-plist": "^1.1.0", "uuid": "^7.0.3" } }, "sha512-kCz5k7J7XbJtjABOvkc5lJmkiDh8VhjVCGNiqdKCscmVpdVUpEAyXv1xmCLkQJ5dsHqx3IPO4XW+NTDhU/fatA=="], - "xdate": ["xdate@0.8.3", "", {}, "sha512-1NhJWPJwN+VjbkACT9XHbQK4o6exeSVtS2CxhMPwUE7xQakoEFTlwra9YcqV/uHQVyeEUYoYC46VGDJ+etnIiw=="], - "xml-name-validator": ["xml-name-validator@4.0.0", "", {}, "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw=="], "xml2js": ["xml2js@0.6.0", "", { "dependencies": { "sax": ">=0.6.0", "xmlbuilder": "~11.0.0" } }, "sha512-eLTh0kA8uHceqesPqSE+VvO1CDDJWMwlQfB6LuN6T8w6MaDJ8Txm8P7s5cHD0miF0V+GGTZrDQfxPZQVsur33w=="], @@ -2513,7 +2449,7 @@ "y18n": ["y18n@5.0.8", "", {}, "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="], - "yallist": ["yallist@4.0.0", "", {}, "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="], + "yallist": ["yallist@3.1.1", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="], "yaml": ["yaml@1.10.2", "", {}, "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg=="], @@ -2525,11 +2461,9 @@ "yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="], - "z-schema": ["z-schema@5.0.6", "", { "dependencies": { "lodash.get": "^4.4.2", "lodash.isequal": "^4.5.0", "validator": "^13.7.0" }, "optionalDependencies": { "commander": "^10.0.0" }, "bin": { "z-schema": "bin/z-schema" } }, "sha512-+XR1GhnWklYdfr8YaZv/iu+vY+ux7V5DS5zH1DQf6bO5ufrt/5cgNhVO5qyhsjFXvsqQb/f08DWE9b6uPscyAg=="], + "zod": ["zod@4.4.3", "", {}, "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ=="], - "zustand": ["zustand@5.0.3", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-14fwWQtU3pH4dE0dOpdMiWjddcH+QzKIgk1cl8epwSE7yag43k/AD/m4L6+K7DytAOr9gGBe3/EXj9g7cdostg=="], - - "@babel/core/semver": ["semver@6.3.1", "", { "bin": "bin/semver.js" }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], + "zustand": ["zustand@5.0.14", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-/8tAspM5LMPr28b3fwLYrtdj77ECpfZviaP75CMTnwO8ISyaE4GDIG/9rDDYq/cH9D2Xw2A2RXglLInmVBQB/g=="], "@babel/generator/@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="], @@ -2537,14 +2471,8 @@ "@babel/helper-annotate-as-pure/@babel/types": ["@babel/types@7.26.9", "", { "dependencies": { "@babel/helper-string-parser": "^7.25.9", "@babel/helper-validator-identifier": "^7.25.9" } }, "sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw=="], - "@babel/helper-compilation-targets/semver": ["semver@6.3.1", "", { "bin": "bin/semver.js" }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - "@babel/helper-create-class-features-plugin/@babel/traverse": ["@babel/traverse@7.26.9", "", { "dependencies": { "@babel/code-frame": "^7.26.2", "@babel/generator": "^7.26.9", "@babel/parser": "^7.26.9", "@babel/template": "^7.26.9", "@babel/types": "^7.26.9", "debug": "^4.3.1", "globals": "^11.1.0" } }, "sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg=="], - "@babel/helper-create-class-features-plugin/semver": ["semver@6.3.1", "", { "bin": "bin/semver.js" }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - - "@babel/helper-create-regexp-features-plugin/semver": ["semver@6.3.1", "", { "bin": "bin/semver.js" }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - "@babel/helper-define-polyfill-provider/@babel/helper-compilation-targets": ["@babel/helper-compilation-targets@7.25.2", "", { "dependencies": { "@babel/compat-data": "^7.25.2", "@babel/helper-validator-option": "^7.24.8", "browserslist": "^4.23.1", "lru-cache": "^5.1.1", "semver": "^6.3.1" } }, "sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw=="], "@babel/helper-member-expression-to-functions/@babel/traverse": ["@babel/traverse@7.26.9", "", { "dependencies": { "@babel/code-frame": "^7.26.2", "@babel/generator": "^7.26.9", "@babel/parser": "^7.26.9", "@babel/template": "^7.26.9", "@babel/types": "^7.26.9", "debug": "^4.3.1", "globals": "^11.1.0" } }, "sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg=="], @@ -2603,14 +2531,14 @@ "@babel/plugin-transform-runtime/@babel/helper-module-imports": ["@babel/helper-module-imports@7.25.9", "", { "dependencies": { "@babel/traverse": "^7.25.9", "@babel/types": "^7.25.9" } }, "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw=="], - "@babel/plugin-transform-runtime/semver": ["semver@6.3.1", "", { "bin": "bin/semver.js" }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - "@babel/preset-react/@babel/helper-validator-option": ["@babel/helper-validator-option@7.25.9", "", {}, "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw=="], "@babel/preset-typescript/@babel/helper-validator-option": ["@babel/helper-validator-option@7.25.9", "", {}, "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw=="], "@babel/runtime/regenerator-runtime": ["regenerator-runtime@0.14.1", "", {}, "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw=="], + "@base-org/account/zustand": ["zustand@5.0.3", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-14fwWQtU3pH4dE0dOpdMiWjddcH+QzKIgk1cl8epwSE7yag43k/AD/m4L6+K7DytAOr9gGBe3/EXj9g7cdostg=="], + "@clerk/clerk-js/regenerator-runtime": ["regenerator-runtime@0.14.1", "", {}, "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw=="], "@cspotcode/source-map-support/@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.9", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ=="], @@ -2623,6 +2551,8 @@ "@eslint/config-array/debug": ["debug@4.4.1", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="], + "@eslint/eslintrc/strip-json-comments": ["strip-json-comments@3.1.1", "", {}, "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="], + "@expo/cli/@expo/prebuild-config": ["@expo/prebuild-config@9.0.12", "", { "dependencies": { "@expo/config": "~11.0.13", "@expo/config-plugins": "~10.1.2", "@expo/config-types": "^53.0.5", "@expo/image-utils": "^0.7.6", "@expo/json-file": "^9.1.5", "@react-native/normalize-colors": "0.79.6", "debug": "^4.3.1", "resolve-from": "^5.0.0", "semver": "^7.6.0", "xml2js": "0.6.0" } }, "sha512-AKH5Scf+gEMgGxZZaimrJI2wlUJlRoqzDNn7/rkhZa5gUTnO4l6slKak2YdaH+nXlOWCNfAQWa76NnpQIfmv6Q=="], "@expo/cli/debug": ["debug@4.4.1", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="], @@ -2633,20 +2563,26 @@ "@expo/cli/pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], - "@expo/cli/tar": ["tar@7.4.3", "", { "dependencies": { "@isaacs/fs-minipass": "^4.0.0", "chownr": "^3.0.0", "minipass": "^7.1.2", "minizlib": "^3.0.1", "mkdirp": "^3.0.1", "yallist": "^5.0.0" } }, "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw=="], + "@expo/cli/semver": ["semver@7.7.2", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="], "@expo/cli/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], "@expo/config/@babel/code-frame": ["@babel/code-frame@7.10.4", "", { "dependencies": { "@babel/highlight": "^7.10.4" } }, "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg=="], - "@expo/devcert/debug": ["debug@3.2.7", "", { "dependencies": { "ms": "^2.1.1" } }, "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ=="], + "@expo/config/semver": ["semver@7.7.2", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="], + + "@expo/config-plugins/semver": ["semver@7.7.2", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="], - "@expo/devcert/mkdirp": ["mkdirp@0.5.6", "", { "dependencies": { "minimist": "^1.2.6" }, "bin": "bin/cmd.js" }, "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw=="], + "@expo/devcert/debug": ["debug@3.2.7", "", { "dependencies": { "ms": "^2.1.1" } }, "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ=="], "@expo/devcert/tslib": ["tslib@2.7.0", "", {}, "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA=="], "@expo/fingerprint/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="], + "@expo/fingerprint/semver": ["semver@7.7.2", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="], + + "@expo/image-utils/semver": ["semver@7.7.2", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="], + "@expo/json-file/@babel/code-frame": ["@babel/code-frame@7.10.4", "", { "dependencies": { "@babel/highlight": "^7.10.4" } }, "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg=="], "@expo/metro-config/debug": ["debug@4.4.1", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="], @@ -2655,6 +2591,8 @@ "@expo/prebuild-config/@react-native/normalize-colors": ["@react-native/normalize-colors@0.79.5", "", {}, "sha512-nGXMNMclZgzLUxijQQ38Dm3IAEhgxuySAWQHnljFtfB0JdaMwpe0Ox9H7Tp2OgrEA+EMEv+Od9ElKlHwGKmmvQ=="], + "@expo/prebuild-config/semver": ["semver@7.7.2", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="], + "@expo/server/debug": ["debug@4.4.1", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="], "@expo/xcpretty/@babel/code-frame": ["@babel/code-frame@7.10.4", "", { "dependencies": { "@babel/highlight": "^7.10.4" } }, "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg=="], @@ -2667,8 +2605,6 @@ "@isaacs/cliui/wrap-ansi": ["wrap-ansi@8.1.0", "", { "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", "strip-ansi": "^7.0.1" } }, "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ=="], - "@isaacs/fs-minipass/minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="], - "@istanbuljs/load-nyc-config/camelcase": ["camelcase@5.3.1", "", {}, "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="], "@istanbuljs/load-nyc-config/find-up": ["find-up@4.1.0", "", { "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" } }, "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw=="], @@ -2687,16 +2623,24 @@ "@noble/curves/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], - "@npmcli/fs/semver": ["semver@7.6.3", "", { "bin": "bin/semver.js" }, "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A=="], + "@oxc-resolver/binding-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.11.0", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.2", "tslib": "^2.4.0" } }, "sha512-l9Oo58x0HOP5znGzVhYW9U3e5wVuA4LAZU2AGezTmkhO1CgQRFDhDg4nneHsu/t3WniXg9QrG2nIXL/ZS8ln8Q=="], + + "@oxc-resolver/binding-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@1.11.0", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-55coeOFKHv1ywEcUXJtWU5f+Jr/W5tZDvZig8DLKSwUN1JpROQ4rk/SNOQiFWmaR/VKF4zuFyW1B8JduOSv6Pg=="], "@react-native/codegen/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="], "@react-native/community-cli-plugin/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], + "@react-native/community-cli-plugin/semver": ["semver@7.7.2", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="], + "@react-native/dev-middleware/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], + "@react-native/dev-middleware/open": ["open@7.4.2", "", { "dependencies": { "is-docker": "^2.0.0", "is-wsl": "^2.1.1" } }, "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q=="], + "@react-navigation/core/nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], + "@react-navigation/core/react-is": ["react-is@19.1.1", "", {}, "sha512-tr41fA15Vn8p4X9ntI+yCyeGSf1TlYaY5vlTZfQmeLBrFo3psOPX6HhTDnFNL9uj3EhP0KAQ80cugCl4b4BERA=="], + "@react-navigation/core/use-sync-external-store": ["use-sync-external-store@1.5.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-Rb46I4cGGVBmjamjphe8L/UnvJD+uPPtTkNvX5mZgqdbavhI4EbgIWJiIHXJ8bc/i9EQGPRh4DwEURJ552Do0A=="], "@react-navigation/elements/use-sync-external-store": ["use-sync-external-store@1.5.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-Rb46I4cGGVBmjamjphe8L/UnvJD+uPPtTkNvX5mZgqdbavhI4EbgIWJiIHXJ8bc/i9EQGPRh4DwEURJ552Do0A=="], @@ -2705,8 +2649,6 @@ "@react-navigation/routers/nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], - "@redux-devtools/utils/nanoid": ["nanoid@5.0.9", "", { "bin": "bin/nanoid.js" }, "sha512-Aooyr6MXU6HpvvWXKoVoXwKMs/KyVakWwg7xQfv5/S/RIgJMy0Ifa45H9qqYy7pTCszrHzP21Uk4PZq2HpEM8Q=="], - "@scure/bip32/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], "@scure/bip39/@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], @@ -2737,12 +2679,16 @@ "@typescript-eslint/typescript-estree/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="], + "@typescript-eslint/typescript-estree/semver": ["semver@7.7.2", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="], + "@typescript-eslint/utils/@eslint-community/eslint-utils": ["@eslint-community/eslint-utils@4.7.0", "", { "dependencies": { "eslint-visitor-keys": "^3.4.3" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw=="], "@typescript-eslint/visitor-keys/eslint-visitor-keys": ["eslint-visitor-keys@4.2.1", "", {}, "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ=="], "ansi-escapes/type-fest": ["type-fest@0.21.3", "", {}, "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w=="], + "anymatch/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], + "babel-plugin-istanbul/istanbul-lib-instrument": ["istanbul-lib-instrument@5.2.1", "", { "dependencies": { "@babel/core": "^7.12.3", "@babel/parser": "^7.14.7", "@istanbuljs/schema": "^0.1.2", "istanbul-lib-coverage": "^3.2.0", "semver": "^6.3.0" } }, "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg=="], "babel-plugin-jest-hoist/@babel/template": ["@babel/template@7.26.9", "", { "dependencies": { "@babel/code-frame": "^7.26.2", "@babel/parser": "^7.26.9", "@babel/types": "^7.26.9" } }, "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA=="], @@ -2753,17 +2699,15 @@ "babel-plugin-polyfill-corejs2/@babel/compat-data": ["@babel/compat-data@7.25.4", "", {}, "sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ=="], - "babel-plugin-polyfill-corejs2/semver": ["semver@6.3.1", "", { "bin": "bin/semver.js" }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], + "babel-plugin-react-compiler/@babel/types": ["@babel/types@7.29.7", "", { "dependencies": { "@babel/helper-string-parser": "^7.29.7", "@babel/helper-validator-identifier": "^7.29.7" } }, "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA=="], "babel-preset-expo/debug": ["debug@4.4.1", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="], - "better-opn/open": ["open@8.4.2", "", { "dependencies": { "define-lazy-prop": "^2.0.0", "is-docker": "^2.1.1", "is-wsl": "^2.2.0" } }, "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ=="], + "body-parser/bytes": ["bytes@3.1.2", "", {}, "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="], - "cacache/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="], + "body-parser/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], - "cacache/lru-cache": ["lru-cache@6.0.0", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA=="], - - "cacache/minipass": ["minipass@3.3.6", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="], + "body-parser/http-errors": ["http-errors@2.0.1", "", { "dependencies": { "depd": "~2.0.0", "inherits": "~2.0.4", "setprototypeof": "~1.2.0", "statuses": "~2.0.2", "toidentifier": "~1.0.1" } }, "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ=="], "caller-callsite/callsites": ["callsites@2.0.0", "", {}, "sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ=="], @@ -2771,6 +2715,8 @@ "chokidar/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], + "chromium-edge-launcher/mkdirp": ["mkdirp@1.0.4", "", { "bin": "bin/cmd.js" }, "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="], + "clone-response/mimic-response": ["mimic-response@1.0.1", "", {}, "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ=="], "color-string/color-name": ["color-name@1.1.3", "", {}, "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="], @@ -2779,6 +2725,8 @@ "connect/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], + "content-disposition/safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="], + "cosmiconfig/import-fresh": ["import-fresh@2.0.0", "", { "dependencies": { "caller-path": "^2.0.0", "resolve-from": "^3.0.0" } }, "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg=="], "cosmiconfig/js-yaml": ["js-yaml@3.14.1", "", { "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" }, "bin": "bin/js-yaml.js" }, "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g=="], @@ -2791,6 +2739,8 @@ "domexception/webidl-conversions": ["webidl-conversions@7.0.0", "", {}, "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g=="], + "encoding/iconv-lite": ["iconv-lite@0.6.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw=="], + "error-ex/is-arrayish": ["is-arrayish@0.2.1", "", {}, "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg=="], "escodegen/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], @@ -2799,6 +2749,8 @@ "eslint-import-resolver-node/debug": ["debug@3.2.7", "", { "dependencies": { "ms": "^2.1.1" } }, "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ=="], + "eslint-import-resolver-typescript/get-tsconfig": ["get-tsconfig@4.8.1", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg=="], + "eslint-module-utils/debug": ["debug@3.2.7", "", { "dependencies": { "ms": "^2.1.1" } }, "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ=="], "eslint-plugin-expo/eslint": ["eslint@9.34.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.21.0", "@eslint/config-helpers": "^0.3.1", "@eslint/core": "^0.15.2", "@eslint/eslintrc": "^3.3.1", "@eslint/js": "9.34.0", "@eslint/plugin-kit": "^0.3.5", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^8.4.0", "eslint-visitor-keys": "^4.2.1", "espree": "^10.4.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-RNCHRX5EwdrESy3Jc9o8ie8Bog+PeYvvSR8sDGoZxNFTvZ4dlxUB3WzQ3bQMztFrSRODGrLLj8g6OFuGY/aiQg=="], @@ -2807,8 +2759,6 @@ "eslint-plugin-import/doctrine": ["doctrine@2.1.0", "", { "dependencies": { "esutils": "^2.0.2" } }, "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw=="], - "eslint-plugin-import/semver": ["semver@6.3.1", "", { "bin": "bin/semver.js" }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - "eslint-plugin-react/array.prototype.flatmap": ["array.prototype.flatmap@1.3.3", "", { "dependencies": { "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-abstract": "^1.23.5", "es-shim-unscopables": "^1.0.2" } }, "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg=="], "eslint-plugin-react/doctrine": ["doctrine@2.1.0", "", { "dependencies": { "esutils": "^2.0.2" } }, "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw=="], @@ -2817,18 +2767,18 @@ "eslint-plugin-react/resolve": ["resolve@2.0.0-next.5", "", { "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": "bin/resolve" }, "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA=="], - "eslint-plugin-react/semver": ["semver@6.3.1", "", { "bin": "bin/semver.js" }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - "execa/get-stream": ["get-stream@6.0.1", "", {}, "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg=="], - "execa/signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="], - "expect/jest-matcher-utils": ["jest-matcher-utils@29.7.0", "", { "dependencies": { "chalk": "^4.0.0", "jest-diff": "^29.7.0", "jest-get-type": "^29.6.3", "pretty-format": "^29.7.0" } }, "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g=="], "expo-asset/expo-constants": ["expo-constants@17.1.7", "", { "dependencies": { "@expo/config": "~11.0.12", "@expo/env": "~1.0.7" }, "peerDependencies": { "expo": "*", "react-native": "*" } }, "sha512-byBjGsJ6T6FrLlhOBxw4EaiMXrZEn/MlUYIj/JAd+FS7ll5X/S4qVRbIimSJtdW47hXMq0zxPfJX6njtA56hHA=="], "expo-auth-session/expo-constants": ["expo-constants@17.1.7", "", { "dependencies": { "@expo/config": "~11.0.12", "@expo/env": "~1.0.7" }, "peerDependencies": { "expo": "*", "react-native": "*" } }, "sha512-byBjGsJ6T6FrLlhOBxw4EaiMXrZEn/MlUYIj/JAd+FS7ll5X/S4qVRbIimSJtdW47hXMq0zxPfJX6njtA56hHA=="], + "expo-build-properties/ajv": ["ajv@8.11.0", "", { "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2", "uri-js": "^4.2.2" } }, "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg=="], + + "expo-build-properties/semver": ["semver@7.7.2", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="], + "expo-dev-launcher/ajv": ["ajv@8.11.0", "", { "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2", "uri-js": "^4.2.2" } }, "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg=="], "expo-linking/expo-constants": ["expo-constants@17.1.7", "", { "dependencies": { "@expo/config": "~11.0.12", "@expo/env": "~1.0.7" }, "peerDependencies": { "expo": "*", "react-native": "*" } }, "sha512-byBjGsJ6T6FrLlhOBxw4EaiMXrZEn/MlUYIj/JAd+FS7ll5X/S4qVRbIimSJtdW47hXMq0zxPfJX6njtA56hHA=="], @@ -2837,36 +2787,42 @@ "expo-navigation-bar/debug": ["debug@4.4.1", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="], + "expo-router/@expo/server": ["@expo/server@0.6.3", "", { "dependencies": { "abort-controller": "^3.0.0", "debug": "^4.3.4", "source-map-support": "~0.5.21", "undici": "^6.18.2 || ^7.0.0" } }, "sha512-Ea7NJn9Xk1fe4YeJ86rObHSv/bm3u/6WiQPXEqXJ2GrfYpVab2Swoh9/PnSM3KjR64JAgKjArDn1HiPjITCfHA=="], + "expo-router/semver": ["semver@7.6.3", "", { "bin": "bin/semver.js" }, "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A=="], + "expo-system-ui/debug": ["debug@4.4.1", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="], + "expo-updates/arg": ["arg@4.1.0", "", {}, "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg=="], + "express/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], + + "express/finalhandler": ["finalhandler@1.3.2", "", { "dependencies": { "debug": "2.6.9", "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "on-finished": "~2.4.1", "parseurl": "~1.3.3", "statuses": "~2.0.2", "unpipe": "~1.0.0" } }, "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg=="], + + "express/safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="], + "fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], "fbjs/promise": ["promise@7.3.1", "", { "dependencies": { "asap": "~2.0.3" } }, "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg=="], "finalhandler/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], + "finalhandler/encodeurl": ["encodeurl@1.0.2", "", {}, "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w=="], + "finalhandler/on-finished": ["on-finished@2.3.0", "", { "dependencies": { "ee-first": "1.1.1" } }, "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww=="], "finalhandler/statuses": ["statuses@1.5.0", "", {}, "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA=="], - "fs-minipass/minipass": ["minipass@3.3.6", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="], - - "gauge/signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="], + "foreground-child/signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="], "glob/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="], - "glob/minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="], - "hoist-non-react-statics/react-is": ["react-is@16.13.1", "", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="], "hosted-git-info/lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="], "import-fresh/resolve-from": ["resolve-from@4.0.0", "", {}, "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="], - "ip-address/sprintf-js": ["sprintf-js@1.1.3", "", {}, "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA=="], - "is-bun-module/semver": ["semver@7.6.3", "", { "bin": "bin/semver.js" }, "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A=="], "istanbul-lib-instrument/@babel/core": ["@babel/core@7.25.2", "", { "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.24.7", "@babel/generator": "^7.25.0", "@babel/helper-compilation-targets": "^7.25.2", "@babel/helper-module-transforms": "^7.25.2", "@babel/helpers": "^7.25.0", "@babel/parser": "^7.25.0", "@babel/template": "^7.25.0", "@babel/traverse": "^7.25.2", "@babel/types": "^7.25.2", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.2.3", "semver": "^6.3.1" } }, "sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA=="], @@ -2891,6 +2847,8 @@ "jest-config/pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], + "jest-config/strip-json-comments": ["strip-json-comments@3.1.1", "", {}, "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="], + "jest-each/pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], "jest-leak-detector/pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], @@ -2921,6 +2879,8 @@ "jest-snapshot/semver": ["semver@7.6.3", "", { "bin": "bin/semver.js" }, "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A=="], + "jest-util/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], + "jest-validate/pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], "jest-watch-select-projects/chalk": ["chalk@3.0.0", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg=="], @@ -2939,22 +2899,14 @@ "jsdom/ws": ["ws@8.18.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw=="], - "lighthouse-logger/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], + "knip/yaml": ["yaml@2.9.0", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA=="], - "lightningcss/detect-libc": ["detect-libc@1.0.3", "", { "bin": "bin/detect-libc.js" }, "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg=="], + "lighthouse-logger/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], "log-symbols/chalk": ["chalk@2.4.2", "", { "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ=="], - "lru-cache/yallist": ["yallist@3.1.1", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="], - "make-dir/semver": ["semver@7.6.3", "", { "bin": "bin/semver.js" }, "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A=="], - "make-fetch-happen/http-proxy-agent": ["http-proxy-agent@4.0.1", "", { "dependencies": { "@tootallnate/once": "1", "agent-base": "6", "debug": "4" } }, "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg=="], - - "make-fetch-happen/lru-cache": ["lru-cache@6.0.0", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA=="], - - "make-fetch-happen/minipass": ["minipass@3.3.6", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="], - "metro/ci-info": ["ci-info@2.0.0", "", {}, "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ=="], "metro/debug": ["debug@4.4.1", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="], @@ -2969,26 +2921,14 @@ "metro-file-map/debug": ["debug@4.4.1", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="], - "minipass-collect/minipass": ["minipass@3.3.6", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="], - - "minipass-fetch/minipass": ["minipass@3.3.6", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="], - - "minipass-flush/minipass": ["minipass@3.3.6", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="], + "micromatch/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], - "minipass-pipeline/minipass": ["minipass@3.3.6", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="], + "morgan/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], - "minipass-sized/minipass": ["minipass@3.3.6", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="], - - "minizlib/minipass": ["minipass@3.3.6", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="], - - "node-abi/semver": ["semver@7.6.3", "", { "bin": "bin/semver.js" }, "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A=="], + "morgan/on-headers": ["on-headers@1.1.0", "", {}, "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A=="], "node-fetch/whatwg-url": ["whatwg-url@5.0.0", "", { "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="], - "node-gyp/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="], - - "node-gyp/semver": ["semver@7.6.3", "", { "bin": "bin/semver.js" }, "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A=="], - "npm-package-arg/semver": ["semver@7.6.3", "", { "bin": "bin/semver.js" }, "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A=="], "object.entries/call-bound": ["call-bound@1.0.4", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "get-intrinsic": "^1.3.0" } }, "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg=="], @@ -3003,18 +2943,20 @@ "parse-json/@babel/code-frame": ["@babel/code-frame@7.24.7", "", { "dependencies": { "@babel/highlight": "^7.24.7", "picocolors": "^1.0.0" } }, "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA=="], - "path-scurry/lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="], + "parse-png/pngjs": ["pngjs@3.4.0", "", {}, "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w=="], - "path-scurry/minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="], + "path-scurry/lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="], "pkg-dir/find-up": ["find-up@4.1.0", "", { "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" } }, "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw=="], "postcss-load-config/yaml": ["yaml@2.5.1", "", { "bin": "bin.mjs" }, "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q=="], - "pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], - "prop-types/react-is": ["react-is@16.13.1", "", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="], + "raw-body/bytes": ["bytes@3.1.2", "", {}, "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="], + + "raw-body/http-errors": ["http-errors@2.0.1", "", { "dependencies": { "depd": "~2.0.0", "inherits": "~2.0.4", "setprototypeof": "~1.2.0", "statuses": "~2.0.2", "toidentifier": "~1.0.1" } }, "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ=="], + "rc/strip-json-comments": ["strip-json-comments@2.0.1", "", {}, "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ=="], "react-devtools-core/ws": ["ws@7.5.10", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": "^5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ=="], @@ -3023,34 +2965,36 @@ "react-native/pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], - "react-native-calendars/react-native-safe-area-context": ["react-native-safe-area-context@4.5.0", "", { "peerDependencies": { "react": "*", "react-native": "*" } }, "sha512-0WORnk9SkREGUg2V7jHZbuN5x4vcxj/1B0QOcXJjdYWrzZHgLcUzYWWIUecUPJh747Mwjt/42RZDOaFn3L8kPQ=="], + "react-native/semver": ["semver@7.7.2", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="], "react-native-css-interop/lightningcss": ["lightningcss@1.30.1", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-darwin-arm64": "1.30.1", "lightningcss-darwin-x64": "1.30.1", "lightningcss-freebsd-x64": "1.30.1", "lightningcss-linux-arm-gnueabihf": "1.30.1", "lightningcss-linux-arm64-gnu": "1.30.1", "lightningcss-linux-arm64-musl": "1.30.1", "lightningcss-linux-x64-gnu": "1.30.1", "lightningcss-linux-x64-musl": "1.30.1", "lightningcss-win32-arm64-msvc": "1.30.1", "lightningcss-win32-x64-msvc": "1.30.1" } }, "sha512-xi6IyHML+c9+Q3W0S4fCQJOym42pyurFiJUHEcEyHS0CeKzia4yZDEsLlqOFykxOdHpNy0NmvVO31vcSqAxJCg=="], + "react-native-css-interop/semver": ["semver@7.7.2", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="], + "react-native-web/@react-native/normalize-colors": ["@react-native/normalize-colors@0.74.87", "", {}, "sha512-Xh7Nyk/MPefkb0Itl5Z+3oOobeG9lfLb7ZOY2DKpFnoCE1TzBmib9vMNdFaLdSxLIP+Ec6icgKtdzYg8QUPYzA=="], "react-native-web/memoize-one": ["memoize-one@6.0.0", "", {}, "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw=="], + "react-test-renderer/react-is": ["react-is@19.1.1", "", {}, "sha512-tr41fA15Vn8p4X9ntI+yCyeGSf1TlYaY5vlTZfQmeLBrFo3psOPX6HhTDnFNL9uj3EhP0KAQ80cugCl4b4BERA=="], + + "readdirp/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], + "regjsparser/jsesc": ["jsesc@0.5.0", "", { "bin": "bin/jsesc" }, "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA=="], "requireg/resolve": ["resolve@1.7.1", "", { "dependencies": { "path-parse": "^1.0.5" } }, "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw=="], "restore-cursor/onetime": ["onetime@2.0.1", "", { "dependencies": { "mimic-fn": "^1.0.0" } }, "sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ=="], - "restore-cursor/signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="], - "rimraf/glob": ["glob@7.2.3", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="], "send/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], - "serve-static/encodeurl": ["encodeurl@2.0.0", "", {}, "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg=="], + "send/encodeurl": ["encodeurl@1.0.2", "", {}, "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w=="], "simple-plist/bplist-parser": ["bplist-parser@0.3.1", "", { "dependencies": { "big-integer": "1.6.x" } }, "sha512-PyJxiNtA5T2PlLIeBot4lbp7rj4OadzjnMZD/G5zuBNt8ei/yCU7+wW0h2bag9vr8c+/WuRWmSxbqAl9hL1rBA=="], "source-map-support/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], - "ssri/minipass": ["minipass@3.3.6", "", { "dependencies": { "yallist": "^4.0.0" } }, "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="], - "stack-utils/escape-string-regexp": ["escape-string-regexp@2.0.0", "", {}, "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w=="], "stacktrace-gps/source-map": ["source-map@0.5.6", "", {}, "sha512-MjZkVp0NHr5+TPihLcadqnlVoGIoWo4IBHptutGh9wI3ttUYvCG26HkSuDi+K6lsZ25syXJXcctwgyVCt//xqA=="], @@ -3069,15 +3013,13 @@ "sucrase/commander": ["commander@4.1.1", "", {}, "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA=="], - "swagger-jsdoc/commander": ["commander@6.2.0", "", {}, "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q=="], + "swr/use-sync-external-store": ["use-sync-external-store@1.5.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-Rb46I4cGGVBmjamjphe8L/UnvJD+uPPtTkNvX5mZgqdbavhI4EbgIWJiIHXJ8bc/i9EQGPRh4DwEURJ552Do0A=="], - "swagger-jsdoc/glob": ["glob@7.1.6", "", { "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA=="], + "tailwindcss/jiti": ["jiti@1.21.7", "", { "bin": { "jiti": "bin/jiti.js" } }, "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A=="], - "swagger-jsdoc/yaml": ["yaml@2.0.0-1", "", {}, "sha512-W7h5dEhywMKenDJh2iX/LABkbFnBxasD27oyXWDS/feDsxiw0dD5ncXdYXgkvAsXIY2MpW/ZKkr9IU30DBdMNQ=="], + "tar/mkdirp": ["mkdirp@3.0.1", "", { "bin": { "mkdirp": "dist/cjs/src/bin.js" } }, "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg=="], - "swr/use-sync-external-store": ["use-sync-external-store@1.5.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-Rb46I4cGGVBmjamjphe8L/UnvJD+uPPtTkNvX5mZgqdbavhI4EbgIWJiIHXJ8bc/i9EQGPRh4DwEURJ552Do0A=="], - - "tar-fs/chownr": ["chownr@1.1.4", "", {}, "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="], + "tar/yallist": ["yallist@5.0.0", "", {}, "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw=="], "terser/commander": ["commander@2.20.3", "", {}, "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="], @@ -3097,20 +3039,18 @@ "viem/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], + "whatwg-encoding/iconv-lite": ["iconv-lite@0.6.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw=="], + "whatwg-url/webidl-conversions": ["webidl-conversions@7.0.0", "", {}, "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g=="], "wrap-ansi/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], "wrap-ansi-cjs/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], - "write-file-atomic/signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="], - "xcode/uuid": ["uuid@7.0.3", "", { "bin": "dist/bin/uuid" }, "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg=="], "xml2js/xmlbuilder": ["xmlbuilder@11.0.1", "", {}, "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA=="], - "z-schema/commander": ["commander@10.0.1", "", {}, "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug=="], - "@babel/helper-annotate-as-pure/@babel/types/@babel/helper-string-parser": ["@babel/helper-string-parser@7.25.9", "", {}, "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA=="], "@babel/helper-annotate-as-pure/@babel/types/@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.25.9", "", {}, "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ=="], @@ -3131,8 +3071,6 @@ "@babel/helper-define-polyfill-provider/@babel/helper-compilation-targets/@babel/helper-validator-option": ["@babel/helper-validator-option@7.25.9", "", {}, "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw=="], - "@babel/helper-define-polyfill-provider/@babel/helper-compilation-targets/semver": ["semver@6.3.1", "", { "bin": "bin/semver.js" }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - "@babel/helper-member-expression-to-functions/@babel/traverse/@babel/code-frame": ["@babel/code-frame@7.26.2", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" } }, "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ=="], "@babel/helper-member-expression-to-functions/@babel/traverse/@babel/generator": ["@babel/generator@7.26.9", "", { "dependencies": { "@babel/parser": "^7.26.9", "@babel/types": "^7.26.9", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" } }, "sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg=="], @@ -3245,8 +3183,6 @@ "@babel/plugin-transform-classes/@babel/helper-compilation-targets/@babel/helper-validator-option": ["@babel/helper-validator-option@7.25.9", "", {}, "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw=="], - "@babel/plugin-transform-classes/@babel/helper-compilation-targets/semver": ["semver@6.3.1", "", { "bin": "bin/semver.js" }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - "@babel/plugin-transform-classes/@babel/traverse/@babel/code-frame": ["@babel/code-frame@7.26.2", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" } }, "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ=="], "@babel/plugin-transform-classes/@babel/traverse/@babel/generator": ["@babel/generator@7.26.9", "", { "dependencies": { "@babel/parser": "^7.26.9", "@babel/types": "^7.26.9", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" } }, "sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg=="], @@ -3267,8 +3203,6 @@ "@babel/plugin-transform-function-name/@babel/helper-compilation-targets/@babel/helper-validator-option": ["@babel/helper-validator-option@7.25.9", "", {}, "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw=="], - "@babel/plugin-transform-function-name/@babel/helper-compilation-targets/semver": ["semver@6.3.1", "", { "bin": "bin/semver.js" }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - "@babel/plugin-transform-function-name/@babel/traverse/@babel/code-frame": ["@babel/code-frame@7.26.2", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" } }, "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ=="], "@babel/plugin-transform-function-name/@babel/traverse/@babel/generator": ["@babel/generator@7.26.9", "", { "dependencies": { "@babel/parser": "^7.26.9", "@babel/types": "^7.26.9", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" } }, "sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg=="], @@ -3291,8 +3225,6 @@ "@babel/plugin-transform-object-rest-spread/@babel/helper-compilation-targets/@babel/helper-validator-option": ["@babel/helper-validator-option@7.25.9", "", {}, "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw=="], - "@babel/plugin-transform-object-rest-spread/@babel/helper-compilation-targets/semver": ["semver@6.3.1", "", { "bin": "bin/semver.js" }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - "@babel/plugin-transform-react-jsx/@babel/helper-module-imports/@babel/traverse": ["@babel/traverse@7.26.9", "", { "dependencies": { "@babel/code-frame": "^7.26.2", "@babel/generator": "^7.26.9", "@babel/parser": "^7.26.9", "@babel/template": "^7.26.9", "@babel/types": "^7.26.9", "debug": "^4.3.1", "globals": "^11.1.0" } }, "sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg=="], "@babel/plugin-transform-react-jsx/@babel/types/@babel/helper-string-parser": ["@babel/helper-string-parser@7.25.9", "", {}, "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA=="], @@ -3307,18 +3239,6 @@ "@expo/cli/pretty-format/@jest/schemas": ["@jest/schemas@29.6.3", "", { "dependencies": { "@sinclair/typebox": "^0.27.8" } }, "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA=="], - "@expo/cli/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], - - "@expo/cli/tar/chownr": ["chownr@3.0.0", "", {}, "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g=="], - - "@expo/cli/tar/minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="], - - "@expo/cli/tar/minizlib": ["minizlib@3.0.2", "", { "dependencies": { "minipass": "^7.1.2" } }, "sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA=="], - - "@expo/cli/tar/mkdirp": ["mkdirp@3.0.1", "", { "bin": { "mkdirp": "dist/cjs/src/bin.js" } }, "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg=="], - - "@expo/cli/tar/yallist": ["yallist@5.0.0", "", {}, "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw=="], - "@expo/fingerprint/minimatch/brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="], "@expo/metro-config/minimatch/brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="], @@ -3335,8 +3255,6 @@ "@jest/core/pretty-format/@jest/schemas": ["@jest/schemas@29.6.3", "", { "dependencies": { "@sinclair/typebox": "^0.27.8" } }, "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA=="], - "@jest/core/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], - "@jest/reporters/string-length/char-regex": ["char-regex@1.0.2", "", {}, "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw=="], "@jest/transform/@babel/core/@babel/code-frame": ["@babel/code-frame@7.24.7", "", { "dependencies": { "@babel/highlight": "^7.24.7", "picocolors": "^1.0.0" } }, "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA=="], @@ -3357,10 +3275,10 @@ "@jest/transform/@babel/core/@babel/types": ["@babel/types@7.26.9", "", { "dependencies": { "@babel/helper-string-parser": "^7.25.9", "@babel/helper-validator-identifier": "^7.25.9" } }, "sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw=="], - "@jest/transform/@babel/core/semver": ["semver@6.3.1", "", { "bin": "bin/semver.js" }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - "@jest/types/@jest/schemas/@sinclair/typebox": ["@sinclair/typebox@0.27.8", "", {}, "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA=="], + "@oxc-resolver/binding-wasm32-wasi/@emnapi/core/@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.2.2", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA=="], + "@react-native/community-cli-plugin/debug/ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="], "@react-native/dev-middleware/debug/ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="], @@ -3383,16 +3301,12 @@ "@types/jest/pretty-format/@jest/schemas": ["@jest/schemas@29.6.3", "", { "dependencies": { "@sinclair/typebox": "^0.27.8" } }, "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA=="], - "@types/jest/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], - "@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="], "babel-plugin-istanbul/istanbul-lib-instrument/@babel/core": ["@babel/core@7.25.2", "", { "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.24.7", "@babel/generator": "^7.25.0", "@babel/helper-compilation-targets": "^7.25.2", "@babel/helper-module-transforms": "^7.25.2", "@babel/helpers": "^7.25.0", "@babel/parser": "^7.25.0", "@babel/template": "^7.25.0", "@babel/traverse": "^7.25.2", "@babel/types": "^7.25.2", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.2.3", "semver": "^6.3.1" } }, "sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA=="], "babel-plugin-istanbul/istanbul-lib-instrument/@babel/parser": ["@babel/parser@7.26.9", "", { "dependencies": { "@babel/types": "^7.26.9" }, "bin": { "parser": "bin/babel-parser.js" } }, "sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A=="], - "babel-plugin-istanbul/istanbul-lib-instrument/semver": ["semver@6.3.1", "", { "bin": "bin/semver.js" }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - "babel-plugin-jest-hoist/@babel/template/@babel/code-frame": ["@babel/code-frame@7.26.2", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" } }, "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ=="], "babel-plugin-jest-hoist/@babel/template/@babel/parser": ["@babel/parser@7.26.9", "", { "dependencies": { "@babel/types": "^7.26.9" }, "bin": { "parser": "bin/babel-parser.js" } }, "sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A=="], @@ -3401,6 +3315,14 @@ "babel-plugin-jest-hoist/@babel/types/@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.25.9", "", {}, "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ=="], + "babel-plugin-react-compiler/@babel/types/@babel/helper-string-parser": ["@babel/helper-string-parser@7.29.7", "", {}, "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw=="], + + "babel-plugin-react-compiler/@babel/types/@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.29.7", "", {}, "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg=="], + + "body-parser/debug/ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="], + + "body-parser/http-errors/statuses": ["statuses@2.0.2", "", {}, "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="], + "compression/debug/ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="], "connect/debug/ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="], @@ -3431,8 +3353,16 @@ "expect/jest-matcher-utils/pretty-format": ["pretty-format@29.7.0", "", { "dependencies": { "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", "react-is": "^18.0.0" } }, "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ=="], + "expo-build-properties/ajv/json-schema-traverse": ["json-schema-traverse@1.0.0", "", {}, "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="], + "expo-dev-launcher/ajv/json-schema-traverse": ["json-schema-traverse@1.0.0", "", {}, "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="], + "expo-router/@expo/server/debug": ["debug@4.4.1", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="], + + "express/debug/ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="], + + "express/finalhandler/statuses": ["statuses@2.0.2", "", {}, "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="], + "finalhandler/debug/ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="], "glob/minimatch/brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="], @@ -3461,8 +3391,6 @@ "jest-circus/pretty-format/@jest/schemas": ["@jest/schemas@29.6.3", "", { "dependencies": { "@sinclair/typebox": "^0.27.8" } }, "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA=="], - "jest-circus/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], - "jest-config/@babel/core/@babel/code-frame": ["@babel/code-frame@7.24.7", "", { "dependencies": { "@babel/highlight": "^7.24.7", "picocolors": "^1.0.0" } }, "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA=="], "jest-config/@babel/core/@babel/generator": ["@babel/generator@7.25.6", "", { "dependencies": { "@babel/types": "^7.25.6", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" } }, "sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw=="], @@ -3481,24 +3409,14 @@ "jest-config/@babel/core/@babel/types": ["@babel/types@7.26.9", "", { "dependencies": { "@babel/helper-string-parser": "^7.25.9", "@babel/helper-validator-identifier": "^7.25.9" } }, "sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw=="], - "jest-config/@babel/core/semver": ["semver@6.3.1", "", { "bin": "bin/semver.js" }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], - "jest-config/pretty-format/@jest/schemas": ["@jest/schemas@29.6.3", "", { "dependencies": { "@sinclair/typebox": "^0.27.8" } }, "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA=="], - "jest-config/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], - "jest-each/pretty-format/@jest/schemas": ["@jest/schemas@29.6.3", "", { "dependencies": { "@sinclair/typebox": "^0.27.8" } }, "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA=="], - "jest-each/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], - "jest-leak-detector/pretty-format/@jest/schemas": ["@jest/schemas@29.6.3", "", { "dependencies": { "@sinclair/typebox": "^0.27.8" } }, "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA=="], - "jest-leak-detector/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], - "jest-message-util/pretty-format/@jest/schemas": ["@jest/schemas@29.6.3", "", { "dependencies": { "@sinclair/typebox": "^0.27.8" } }, "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA=="], - "jest-message-util/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], - "jest-runner/source-map-support/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], "jest-snapshot/@babel/core/@babel/code-frame": ["@babel/code-frame@7.24.7", "", { "dependencies": { "@babel/highlight": "^7.24.7", "picocolors": "^1.0.0" } }, "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA=="], @@ -3525,12 +3443,8 @@ "jest-snapshot/pretty-format/@jest/schemas": ["@jest/schemas@29.6.3", "", { "dependencies": { "@sinclair/typebox": "^0.27.8" } }, "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA=="], - "jest-snapshot/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], - "jest-validate/pretty-format/@jest/schemas": ["@jest/schemas@29.6.3", "", { "dependencies": { "@sinclair/typebox": "^0.27.8" } }, "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA=="], - "jest-validate/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], - "jest-watch-select-projects/chalk/ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], "jest-watch-typeahead/strip-ansi/ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="], @@ -3545,8 +3459,6 @@ "log-symbols/chalk/supports-color": ["supports-color@5.5.0", "", { "dependencies": { "has-flag": "^3.0.0" } }, "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow=="], - "make-fetch-happen/http-proxy-agent/@tootallnate/once": ["@tootallnate/once@1.1.2", "", {}, "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw=="], - "metro-babel-transformer/hermes-parser/hermes-estree": ["hermes-estree@0.29.1", "", {}, "sha512-jl+x31n4/w+wEqm0I2r4CMimukLbLQEYpisys5oCre611CI5fc9TxhqkBBCJ1edDG4Kza0f7CgNz8xVMLZQOmQ=="], "metro-cache/https-proxy-agent/agent-base": ["agent-base@7.1.4", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="], @@ -3555,6 +3467,8 @@ "metro/hermes-parser/hermes-estree": ["hermes-estree@0.29.1", "", {}, "sha512-jl+x31n4/w+wEqm0I2r4CMimukLbLQEYpisys5oCre611CI5fc9TxhqkBBCJ1edDG4Kza0f7CgNz8xVMLZQOmQ=="], + "morgan/debug/ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="], + "node-fetch/whatwg-url/tr46": ["tr46@0.0.3", "", {}, "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="], "node-fetch/whatwg-url/webidl-conversions": ["webidl-conversions@3.0.1", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="], @@ -3571,6 +3485,10 @@ "pkg-dir/find-up/locate-path": ["locate-path@5.0.0", "", { "dependencies": { "p-locate": "^4.1.0" } }, "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g=="], + "raw-body/http-errors/statuses": ["statuses@2.0.2", "", {}, "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="], + + "react-native-css-interop/lightningcss/detect-libc": ["detect-libc@2.0.3", "", {}, "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw=="], + "react-native-css-interop/lightningcss/lightningcss-darwin-arm64": ["lightningcss-darwin-arm64@1.30.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-c8JK7hyE65X1MHMN+Viq9n11RRC7hgin3HhYKhrMyaXflk5GVplZ60IxyoVtzILeKr+xAJwg6zK6sjTBJ0FKYQ=="], "react-native-css-interop/lightningcss/lightningcss-darwin-x64": ["lightningcss-darwin-x64@1.30.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-k1EvjakfumAQoTfcXUcHQZhSpLlkAuEkdMBsI/ivWw9hL+7FtilQc0Cy3hrx0AAQrVtQAbMI7YjCgYgvn37PzA=="], @@ -3593,8 +3511,6 @@ "react-native/pretty-format/@jest/schemas": ["@jest/schemas@29.6.3", "", { "dependencies": { "@sinclair/typebox": "^0.27.8" } }, "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA=="], - "react-native/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], - "restore-cursor/onetime/mimic-fn": ["mimic-fn@1.2.0", "", {}, "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ=="], "send/debug/ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="], @@ -3769,14 +3685,14 @@ "eslint-plugin-expo/eslint/@eslint/eslintrc/globals": ["globals@14.0.0", "", {}, "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ=="], + "eslint-plugin-expo/eslint/@eslint/eslintrc/strip-json-comments": ["strip-json-comments@3.1.1", "", {}, "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="], + "eslint-plugin-expo/eslint/espree/acorn": ["acorn@8.15.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg=="], "eslint-plugin-expo/eslint/file-entry-cache/flat-cache": ["flat-cache@4.0.1", "", { "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.4" } }, "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw=="], "expect/jest-matcher-utils/pretty-format/@jest/schemas": ["@jest/schemas@29.6.3", "", { "dependencies": { "@sinclair/typebox": "^0.27.8" } }, "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA=="], - "expect/jest-matcher-utils/pretty-format/react-is": ["react-is@18.3.1", "", {}, "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg=="], - "istanbul-lib-instrument/@babel/core/@babel/generator/jsesc": ["jsesc@2.5.2", "", { "bin": "bin/jsesc" }, "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA=="], "istanbul-lib-instrument/@babel/core/@babel/helper-compilation-targets/@babel/compat-data": ["@babel/compat-data@7.25.4", "", {}, "sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ=="], diff --git a/config/performance-budgets.json b/config/performance-budgets.json new file mode 100644 index 0000000..4de1267 --- /dev/null +++ b/config/performance-budgets.json @@ -0,0 +1,34 @@ +{ + "iosExport": { + "bundleBytesWarning": 10485760, + "bundleBytesMax": 12582912, + "assetBytesWarning": 1048576, + "assetBytesMax": 1572864, + "assetCountMax": 55 + }, + "webExport": { + "bundleBytesWarning": 3670016, + "bundleBytesMax": 5242880, + "assetBytesWarning": 1048576, + "assetBytesMax": 1572864, + "assetCountMax": 55 + }, + "expoAtlas": { + "moduleCountMax": 2200, + "sourceBytesWarning": 11534336, + "sourceBytesMax": 12582912, + "dependencySourceBytesWarning": 10485760, + "dependencySourceBytesMax": 11534336, + "appSourceBytesWarning": 1258291, + "appSourceBytesMax": 1572864 + }, + "trackedBrandAssets": { + "expectedCount": 16, + "bytesWarning": 1179648, + "bytesMax": 1441792 + }, + "appStoreScreenshots": { + "fileBytesMax": 2097152, + "totalBytesMax": 8388608 + } +} diff --git a/docs/app-store-submission-fields.md b/docs/app-store-submission-fields.md new file mode 100644 index 0000000..39105e1 --- /dev/null +++ b/docs/app-store-submission-fields.md @@ -0,0 +1,103 @@ +# App Store Submission Fields + +Use this as the working sheet for the first iOS App Store submission. + +## Decisions Needed + +- App name: `PrepAI` for fastest launch, or a new broader-health name such as `BioSync`. +- First version scope: ship current health/nutrition/workout MVP, or add peptide tracking before v1. +- App Store price: `$4.99`. +- Category: `Health & Fitness`. +- Bundle ID: `com.jongan69.prepai`. +- EAS project: `@jongan69/prepai`. +- Device support: iPhone only for v1. Add iPad support after iPad-specific QA and App Store screenshots are ready. + +## Store Listing Draft + +### Name + +PrepAI + +### Subtitle + +Health, nutrition, and recovery tracking + +### Promotional Text + +Track meals, workouts, hydration, sleep, body metrics, and Apple Health data in one local-first wellness app. + +### Description + +PrepAI helps you keep your health routine organized with nutrition logging, workout tracking, hydration, sleep, body metrics, and Apple Health sync. The app is built around local-first storage so your daily records remain available on your device, with explicit JSON export/import when you want a portable backup. + +Use PrepAI to log meals, review progress, sync HealthKit activity and body measurements, and keep your wellness plan in one place. Supported AI features run on device when the local model is available, while the core tracking experience remains available without relying on AI. + +PrepAI is designed for personal wellness tracking and planning. It does not diagnose, treat, prescribe, or replace advice from a qualified clinician. + +### Keywords + +health,fitness,nutrition,meal,workout,hydration,sleep,wellness,apple health,tracker + +### Support URL + +https://prepitai.expo.app/contact + +### Privacy Policy URL + +https://prepitai.expo.app/privacy + +## Review Notes Draft + +PrepAI requests Apple Health access only after the user taps Sync Health. The app imports activity, workouts, sleep, hydration, and body measurements to personalize nutrition, hydration, and workout planning. Users can continue using the app without granting Health access. + +The app is intended for personal wellness tracking. It does not diagnose, treat, prescribe, recommend medication dosage, or replace clinician guidance. + +If login is required during review, provide a demo account in App Store Connect review notes. + +## Privacy Nutrition Labels To Prepare + +- Contact info: account email if collected through Clerk. +- Health and fitness: health profile, weight, water, sleep, workouts, HealthKit-derived activity/body data. +- User content: profile photo if the user chooses one. +- Identifiers: user ID/account ID. +- Diagnostics: only if crash/error analytics are enabled. +- Purchases: paid app purchase is handled by Apple. + +## Screenshots + +The initial iPhone 6.7/6.9 screenshots are generated and referenced by `store.config.json`: + +- `store/apple/screenshot/en-US/APP_IPHONE_67/01-prepai.png` +- `store/apple/screenshot/en-US/APP_IPHONE_67/02-prepai.png` +- `store/apple/screenshot/en-US/APP_IPHONE_67/03-prepai.png` +- `store/apple/screenshot/en-US/APP_IPHONE_67/04-prepai.png` +- `store/apple/screenshot/en-US/APP_IPHONE_67/05-prepai.png` + +Regenerate or revise them with `scripts/app-store-screenshot.html` if the visible v1 scope changes. + +If peptide tracking ships in v1, include one screenshot of the log screen and keep the copy focused on personal records, not medical dosing advice. + +Do not enable iPad support until the store package includes iPad screenshots and the physical-device checklist covers iPad layouts. + +## User-Owned Launch Inputs + +- Apple Developer Program access for `jongan69` or the correct team. +- App Store Connect app record for bundle ID `com.jongan69.prepai`: created as `6782733134`. +- App Store Connect `ascAppId`, Apple ID email, and Apple Team ID if EAS cannot infer them: `ascAppId` is saved in `eas.json`. +- Final app name and subtitle: initial metadata is `PrepAI Health Tracker` / `Meals, workouts, HealthKit`. +- Final privacy/support URLs that load over HTTPS: current metadata uses `https://prepitai.expo.app/privacy` and `https://prepitai.expo.app/contact`. +- Final screenshots: uploaded for the initial 6.7/6.9-inch iPhone slot. +- Demo account credentials or a demo-mode explanation. +- App Review contact phone number in international format, for example `+15551234567`. +- Production Clerk credentials in EAS production. +- Local AI EAS values: `EXPO_PUBLIC_LOCAL_AI_ENABLED=true`, `EXPO_PUBLIC_LOCAL_AI_PROVIDER=executorch`, and `EXPO_PUBLIC_CLOUD_AI_FALLBACK=false`. + +Before submitting for App Review, run: + +```bash +APP_REVIEW_PHONE="+15551234567" bun run verify:appstore +``` + +## Local AI Positioning + +The v1 listing should avoid promising fully offline AI until the ExecuTorch build has passed physical-device testing. Use local-first language for storage and core tracking. For AI, say supported AI features run on device when the local model is available. diff --git a/docs/ios-app-store-release.md b/docs/ios-app-store-release.md index b92532c..eb8bf2c 100644 --- a/docs/ios-app-store-release.md +++ b/docs/ios-app-store-release.md @@ -2,48 +2,93 @@ PrepAI is configured for the iOS bundle identifier `com.jongan69.prepai` and EAS project `@jongan69/prepai`. +## Current Launch Status + +Last checked: 2026-06-22. + +- `bun run test:readiness` passes: TypeScript, ESLint, Jest, Expo Doctor, iOS export, production guardrails, and web export. +- Settings now includes explicit JSON export/import for local user data backups. +- EAS project is linked and reachable as `@jongan69/prepai`. +- EAS iOS store build `25` finished successfully from commit `ed9dfea`. +- Build `25` was uploaded to App Store Connect under app ID `6782733134` and is the current App Review target. +- EAS Metadata synced the v1 store listing, Health & Fitness category, age rating declaration, automatic release setting, working support/privacy URLs, and 5 iPhone 6.7/6.9 screenshots. +- The v1 app config is iPhone-only; do not enable iPad support until iPad screenshots and tablet QA are ready. +- `https://prepitai.expo.app`, `https://prepitai.expo.app/privacy`, and `https://prepitai.expo.app/contact` return HTTP 200 and are being used for the initial App Store metadata. +- `https://prepai.com`, `https://prepai.com/privacy`, and `https://prepai.com/contact` still return only a JavaScript redirect placeholder, so the custom domain is not App Review ready yet. +- EAS production env has been cleaned of the old backend/provider variables that the local-first MVP no longer uses. +- EAS production env must still use production Clerk credentials. +- Duplicate Clerk publishable-key values still exist because EAS has both project/shared variables with the same name. Keep only the production Clerk publishable key before public launch. +- App Review details are not yet synced because `APP_REVIEW_PHONE` is not configured. + ## Required App Store Settings - Price: set the iOS app price to **$4.99** in App Store Connect. App Store pricing is not controlled by `app.json` or EAS. - Category: Health & Fitness. - Age rating: complete the App Store questionnaire truthfully for health, nutrition, and AI-generated content. - Health data disclosure: disclose Apple Health/HealthKit reads for body measurements, activity, workouts, sleep, hydration, and nutrition personalization. +- Local backup disclosure: local app data survives normal app updates. Users can manually export/import JSON backups from Settings, but deleting the app removes the local app container unless the user has exported a backup first. - Privacy policy URL: use the production privacy page before submission. - Support URL: use the production support/contact page before submission. ## Required Production Secrets -Set these in the EAS production environment or hosting environment before building/submitting: +Set these in the EAS production environment before building/submitting: ```bash -eas secret:create --scope project --name OPENAI_API_KEY --value "..." -eas secret:create --scope project --name EDAMAM_APP_ID --value "..." -eas secret:create --scope project --name EDAMAM_APP_KEY --value "..." -eas secret:create --scope project --name KROGER_CLIENT_ID --value "..." -eas secret:create --scope project --name KROGER_CLIENT_SECRET --value "..." +export CLERK_SECRET_KEY="sk_live_..." +export EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY="pk_live_..." +bun run eas:configure-clerk ``` -For native API calls, set the hosted API origin at build time: +Only values intentionally used in the client should use `EXPO_PUBLIC_` or plaintext visibility. Clerk secret keys must not be plaintext. + +The helper removes stale project-scoped values before writing the live values. If EAS also has shared/account-level Clerk variables with the same names, remove them before release or run the helper with: ```bash -eas env:create --environment production --name EXPO_PUBLIC_API_BASE_URL --value "https://prepai.com" +PREPAI_DELETE_ACCOUNT_EAS_ENV=1 bun run eas:configure-clerk +``` + +Use the account-level cleanup only when those shared Clerk variables are stale test values that are not needed by another Expo project. The release verifier fails on duplicate names, `pk_test_` / `sk_test_` values, and Clerk secret keys that are not project-scoped secret variables. + +If `bun run eas:configure-clerk` writes the live project values but `verify:release-env` still reports duplicates, remove the old shared/account-level Clerk test variables from the EAS dashboard, or rerun with `PREPAI_DELETE_ACCOUNT_EAS_ENV=1`, then verify again: + +```bash +bun run verify:release-env ``` ## Verification Commands -Run these before every App Store build: +Run this before every App Store build: ```bash -bunx expo-doctor -./node_modules/.bin/tsc --noEmit --pretty false -bun run lint -bun run test -- --runInBand -bunx expo export --platform ios --output-dir dist-ios-check -rm -rf dist-ios-check +bun run verify:release-env +bun run verify:appstore-urls +bun run test:readiness +``` + +`verify:release-env` fails if required EAS production variables are missing, duplicated, or still using obvious test-mode Clerk credentials. It does not print secret values. +`verify:appstore-urls` checks that the App Store marketing, privacy, and support URLs in `store.config.json` return HTTP 2xx/3xx. + +Run this before submitting the uploaded build for App Review: + +```bash +APP_REVIEW_PHONE="+15551234567" bun run verify:appstore ``` ## Build And Submit +If the provisioning profile is expired, provide Apple credentials through environment variables before building: + +```bash +export EXPO_ASC_API_KEY_PATH="/absolute/path/AuthKey_XXXXXXXXXX.p8" +export EXPO_ASC_KEY_ID="XXXXXXXXXX" +export EXPO_ASC_ISSUER_ID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +export EXPO_APPLE_TEAM_ID="XXXXXXXXXX" +export EXPO_APPLE_TEAM_TYPE="INDIVIDUAL" +``` + +Use `COMPANY_OR_ORGANIZATION` instead of `INDIVIDUAL` if the Apple Developer account is an organization team. + ```bash eas build --platform ios --profile production --non-interactive eas submit --platform ios --latest @@ -51,8 +96,39 @@ eas submit --platform ios --latest If EAS cannot infer the App Store Connect app, add the real `ascAppId`, `appleId`, and `appleTeamId` to `eas.json` under `submit.production.ios`. Do not commit placeholders. +The current `submit.production.ios.ascAppId` is `6782733134`. + +The CLI App Review submit helper is `bun run submit:appstore`. It runs the full `verify:appstore` gate before calling Fastlane, including production env checks, URL checks, typecheck, lint, tests, Expo Doctor, iOS export, web export, and production guardrails. + +Do not submit the app for App Review until price, privacy answers, review notes, screenshots, demo access, production Clerk credentials, and App Review contact phone are complete. + +To submit the already-uploaded build `25` with the local Fastlane helper: + +```bash +APP_REVIEW_PHONE="+15551234567" bun run submit:appstore +``` + +The helper reads the demo review account from `/tmp/prepai-demo-review-creds.txt`, attaches build `25` by default, and submits version `1.0.0` for review. Override `BUILD_NUMBER` when the App Store target build changes: + +```bash +APP_REVIEW_PHONE="+15551234567" BUILD_NUMBER="26" bun run submit:appstore +``` + +If Fastlane prompts for Apple two-factor authentication, enter the 6-digit code from `jong2298@icloud.com` immediately. + +For a non-interactive release path, create an App Store Connect API key with App Manager access and export Fastlane-compatible API key variables before running the same helper: + +```bash +export APP_STORE_CONNECT_API_KEY_PATH="/absolute/path/AuthKey_XXXXXXXXXX.p8" +export APP_STORE_CONNECT_API_KEY_ID="XXXXXXXXXX" +export APP_STORE_CONNECT_API_KEY_ISSUER_ID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +APP_REVIEW_PHONE="+15551234567" bun run submit:appstore +``` + ## HealthKit Review Notes Use this review note when submitting: > PrepAI requests Apple Health access only after the user taps Sync Health. The app imports activity, workouts, sleep, hydration, and body measurements to personalize nutrition, hydration, and workout planning. Users can continue using the app without granting Health access. + +If peptide tracking ships in the first App Store version, keep review notes and metadata focused on personal logging, reminders, and wellness/recovery context. Do not describe the app as diagnosing, prescribing, recommending dosage, or treating medical conditions. diff --git a/docs/local-first-ai-roadmap.md b/docs/local-first-ai-roadmap.md new file mode 100644 index 0000000..1480b1e --- /dev/null +++ b/docs/local-first-ai-roadmap.md @@ -0,0 +1,54 @@ +# Local-First Storage and AI Roadmap + +PrepAI should ship as a local-first health app. The App Store MVP should not depend on AI for core tracking workflows. + +## What Works Locally Today + +- Health profile, meals, meal items, workouts, exercises, progress logs, weight entries, water intake, sleep entries, goals, supplement protocols, and supplement logs are stored in local SQLite. +- HealthKit sync writes Apple Health samples into local records. +- Settings supports explicit JSON export/import for user-controlled local backups. +- Supplement and peptide logs are included in explicit JSON export/import. +- The home dashboard includes an explicit local health insight action that uses ExecuTorch against local records when the signed native runtime and model are available. +- The local checkpoint queue supports export/import readiness without sending records to a backend. + +## iOS Data Persistence Boundary + +Local SQLite data survives normal app updates. It does not reliably survive deleting the app from iOS, because deleting an app removes its app container. Data that must survive deletion needs one of: + +- Explicit user export/import. +- Optional iCloud, CloudKit, or document-provider backup. +- iCloud/CloudKit support in a future release. + +For v1, only promise deletion recovery when the user has exported a backup file and imports it after reinstalling. + +## Local AI Direction + +Preferred local AI provider: `react-native-executorch`. + +Current compatibility notes, checked 2026-06-22: + +- `react-native-executorch` is pinned to `0.8.4` for this Expo SDK 53 branch. +- PrepAI uses a local Expo resource-fetcher adapter for ExecuTorch model downloads so the release bundle does not import unused ExecuTorch vision modules. +- The project already uses React Native New Architecture via `newArchEnabled: true`. +- The production profiles set `RCT_REMOVE_LEGACY_ARCH=1`. +- Local AI runtime setup is loaded after first content appears so it does not block app startup. +- Local health insight generation is wired to `react-native-executorch` through the app runtime instead of a backend API. +- A signed iOS build still needs physical-device validation before App Review depends on any local model output. + +## Migration Plan + +1. Ship App Store MVP with local SQLite tracking, HealthKit sync, and explicit JSON export/import. +2. Add iCloud/CloudKit or document-provider backup after App Store MVP. +3. Keep `react-native-executorch` behind `EXPO_PUBLIC_LOCAL_AI_ENABLED=true`. +4. Upgrade to the latest Expo/RN line after MVP submission and repin ExecuTorch to the newest compatible package. +5. Build a development client and test on a physical iPhone. +6. Start with text-only local tasks: + - nutrition note summaries, + - daily wellness summaries, + - goal suggestions from local records, + - peptide-cycle notes if that feature ships. +7. Add local vision or an explicitly consented cloud vision fallback only after the App Store MVP is stable. + +## Release Rule + +Do not make the first App Store submission depend on ExecuTorch until a signed iOS build has passed physical-device testing. Local AI is a strong product direction, but App Review should get a stable health-tracking app first. diff --git a/docs/production-performance.md b/docs/production-performance.md new file mode 100644 index 0000000..c38d7f8 --- /dev/null +++ b/docs/production-performance.md @@ -0,0 +1,68 @@ +# Production Performance Plan + +This branch keeps the App Store MVP on Expo SDK 53 while adding production-grade measurement and guardrails that are safe for the current native stack. + +## Implemented In App + +- `react-native-performance` startup measures for `nativeLaunch`, `runJsBundle`, `contentAppeared`, and `interactive`. +- Settings can export a local startup diagnostics JSON report with the latest release-build performance entries and the 20 most recent saved startup snapshots. +- Deferred startup queue in `src/lib/defer-until-app-ready.ts` so non-critical work can wait until the first screen is visible. +- ExecuTorch/local-AI runtime setup is deferred instead of running on the first render path. +- `guard:startup` scans startup-critical files for suspicious module-load work before tests and in CI. +- `report:module-work` scans product source for broader import-time work and posts an advisory CI summary/artifact for PR review. +- `knip:check` now passes cleanly and runs inside `test:readiness`, blocking dead files, unused dependencies, unresolved imports, and duplicate exports before release builds. +- Android release shrinking is enabled through `expo-build-properties`. +- On Expo SDK 53, Android release minification is controlled by `enableProguardInReleaseBuilds`; `enableMinifyInReleaseBuilds` is not a supported config key in the installed `expo-build-properties` schema. +- EAS production profiles set `RCT_REMOVE_LEGACY_ARCH=1`. +- Expo Atlas can be enabled on demand with `EXPO_ATLAS=1`, and CI now emits a non-interactive Atlas summary artifact from the iOS export with module/dependency graph budgets. +- `perf:baseline` exports the iOS and web bundles, writes `dist/performance-baseline.json`, and enforces `config/performance-budgets.json`. +- `test:readiness` removes generated export directories after successful verification so local release checks leave the repo clean. +- Lottie was removed because it was not used by live UI. +- Direct product-code Reanimated usage was removed from simple toggle, hydration, and progress animations; React Native `Animated` now handles those surfaces while Reanimated remains installed as a navigation/styling peer dependency. +- Outfit font loading now vendors only the two used weights, `400Regular` and `700Bold`, instead of exporting the full Google font package. +- Critical icon/splash assets and the reachable onboarding/dashboard visual set are generated by `scripts/generate-brand-assets.py` and kept under production asset budgets. +- The direct `@expo/vector-icons` dependency and unreachable vector-icon screens/components were removed. +- Lucide icons are imported from direct per-icon modules instead of the package barrel, which keeps unused icons out of the native bundle. +- Fifty unused scaffold files/components/hooks were removed from the mobile code graph after typecheck validation. +- Meal planning no longer returns canned fallback recipes when the recipe provider is unavailable; it retries real provider queries and then fails clearly. +- Fake testimonial/blog/careers/tutorial web surfaces and their unused headshot assets were removed from the bundled route graph. +- The iOS production export now uses 41 assets, 773.8 KB of exported assets, and a 6.77 MB Hermes bundle in the latest local check; the main web bundle is 3.05 MB. + +## Release Profiling Commands + +```bash +bun run test:readiness +bun run guard:startup +bun run report:module-work +bun run report:atlas +bun run perf:baseline +bun run analyze:atlas +``` + +For device profiling, use a signed release or TestFlight build. Debug builds are not trustworthy for startup or JS timing. + +## Manual Device Profiling + +- iOS: use Instruments with the App Launch template against the release build. +- Android: use Perfetto, Android Studio profiler, and Android Vitals once Play Console testing starts. +- JavaScript: capture Hermes/release traces when investigating JS-side startup regressions. +- In a signed iOS build, open Settings and export Startup Diagnostics after launch profiling to capture the app-side `react-native-performance` entries without uploading health data. + +## Guardrails + +- CI runs typecheck, lint, Jest, Expo Doctor, iOS export, web export, and `verify:production`. +- CI enables Expo Atlas during the iOS export, writes `dist/atlas-summary.json`, and uploads that summary with the raw `.expo/atlas.jsonl` graph for dependency-size review. +- `report:atlas` fails CI if the release graph exceeds module/source budgets or reintroduces forbidden local-AI bloat such as the full ExecuTorch barrel, text-to-image internals, `pngjs`, or the upstream Expo resource fetcher package. +- CI emits `perf:baseline:report` from the iOS and web exports, appends a Markdown summary to the GitHub step summary, and uploads the JSON report as a `performance-baseline` artifact. +- `config/performance-budgets.json` blocks iOS bundle growth above 12 MB, web JS/CSS bundle growth above 5 MB, exported iOS/web assets above 1.5 MB, exported iOS/web asset count above 55, or tracked brand assets above 1.5 MB. +- App Store screenshots are also budgeted in `config/performance-budgets.json`; `verify:production` fails if a screenshot exceeds 2 MB or the v1 screenshot set exceeds 8 MB. +- `verify:production` fails on blocked mock/demo terms in mobile code, direct runtime `console.*` calls, oversized critical/generated visual assets, or oversized exported iOS bundles. +- `verify:production` fails if Hermes, New Architecture, Android R8/Proguard, Android resource shrinking, release network-inspector disablement, iOS deployment target, or EAS `RCT_REMOVE_LEGACY_ARCH=1` drift. +- `guard:startup` fails if startup-critical modules reintroduce suspicious import-time work such as native initialization, resource deletion, file I/O, timers, or global event hooks. +- CI uploads a non-blocking `module-work-report` artifact so risky import-time work outside startup-critical files is visible during review. +- Startup-critical files carry `@requires-approval startup-critical`; `verify:production` fails if those annotations are removed. +- CI runs `knip:check` as a blocking dead-code and dependency audit. + +## SDK Upgrade Track + +EAS Observe is the right next hosted observability layer, but the current setup path is for newer Expo SDK lines than this SDK 53 MVP branch. Add it after the MVP branch upgrades, then wire route metrics and cold-start dashboards into the release checklist. diff --git a/docs/testing-checklist.md b/docs/testing-checklist.md new file mode 100644 index 0000000..a37616d --- /dev/null +++ b/docs/testing-checklist.md @@ -0,0 +1,130 @@ +# PrepAI Testing Checklist + +Use this checklist for a complete v1 pass on a physical iPhone. A physical device is required for the real Apple Health permission flow. + +The first App Store build is iPhone-only. Keep iPad support disabled until iPad screenshots and tablet layout QA are added. + +## Current Test Build + +- iOS bundle ID: `com.jongan69.prepai` +- App version: `1.0.0` +- App Store Connect build: `25` +- Runtime version: `1.0.0` +- EAS update channel: `production` +- Current production update group: `8416d5f4-49e5-4bfa-a8eb-6f7d7cebf1d6` +- Current iOS update ID: `019eed84-b0b2-71e2-8064-e2c0bdf61342` + +Build `25` is configured to check the `production` update channel on launch, so it should receive the latest JavaScript update after a fresh app launch with network access. + +## Before Testing + +Run the readiness gate: + +```bash +bun run test:readiness +``` + +Expected result: + +- TypeScript passes. +- ESLint has no errors. Existing warnings are acceptable until separately cleaned up. +- Jest passes. +- Expo Doctor passes. +- iOS export passes. +- Production readiness guardrails pass: no blocked mock/demo terms in mobile code, critical app assets stay under budget, and exported iOS bundles stay under budget. +- Web export passes. +- Dashboard charts show real local records or an empty trend state; they must not generate visual trends from projected values. +- Local Health Insight runs on a signed iOS build when `EXPO_PUBLIC_LOCAL_AI_ENABLED=true`; if the model/runtime is unavailable, the app shows a user-readable error instead of uploading local health data silently. + +For bundle inspection, run: + +```bash +bun run analyze:atlas +``` + +For a non-interactive Atlas summary after an `EXPO_ATLAS=true` export, run: + +```bash +bun run report:atlas +``` + +For release startup profiling, launch the signed build once, then open Settings and export Startup Diagnostics. The file contains local `react-native-performance` startup entries and does not include nutrition, workout, supplement, or Apple Health records. + +## Install Path + +For full iOS testing, install build `25` from TestFlight or App Store Connect. Do not use Expo Go for the full pass because this app includes native modules such as HealthKit. + +If you test locally from source, create a `.env.local` with at least: + +```bash +EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=... +EXPO_PUBLIC_LOCAL_AI_ENABLED=true +EXPO_PUBLIC_LOCAL_AI_PROVIDER=executorch +EXPO_PUBLIC_CLOUD_AI_FALLBACK=false +``` + +Then run: + +```bash +bun run dev:tunnel +``` + +Local source testing is useful for UI and navigation, but the production/TestFlight build is the authority for App Store readiness. + +## Auth Pass + +- Fresh install opens onboarding. +- Email button opens the email/password login screen. +- Google button starts Clerk Google OAuth, not the email/password screen. +- Apple button starts Clerk Apple OAuth, not the email/password screen. +- Successful OAuth lands in the main app. +- Sign out clears the active Clerk session. +- Relaunch after sign-in preserves the session. + +If Google or Apple opens Clerk and then fails, check the provider setup in Clerk Dashboard. The app-side buttons are wired to `oauth_google` and `oauth_apple`. + +## Core App Pass + +- Dashboard loads without crashing. +- Add meal works. +- Add workout works. +- Add water works. +- Add weight works. +- Supplement tracking saves protocols locally. +- Supplement tracking logs amount, route, site, notes, effects, and side-effect notes. +- Supplement protocols can be paused, reactivated, edited, and removed without deleting existing logs. +- Supplement logs can be removed from the recent log list. +- Progress screen reflects logged data. +- Settings opens. +- JSON export creates a backup. +- JSON import restores or merges the backup on the same device. +- Deleting and reinstalling the app removes local app-container data unless you imported an exported backup. + +## HealthKit Pass + +- Tap the Apple Health sync entry point. +- iOS Health permission prompt appears. +- Grant selected permissions. +- Activity, workouts, sleep, hydration, and body/body-measurement data sync where available. +- Denying Health permissions does not block the rest of the app. +- HealthKit-related errors show user-readable messages. + +## Local AI Pass + +- Local Health Insight should generate on a signed native build or show a clear local-runtime/model error. +- Local Meal Planner should generate on a signed native build or show a clear local-runtime/model error. +- No nutrition, workout, supplement, or Apple Health data should be uploaded for AI generation in the MVP. + +## App Store Review Pass + +- App price is set to `$4.99` in App Store Connect. +- App Privacy answers are complete. +- Review demo account works. +- Review contact phone is present. +- Submit the current App Store target build with: + +```bash +APP_REVIEW_PHONE="+15551234567" bun run submit:appstore +``` + +Set `BUILD_NUMBER` if the current target is no longer build `25`. diff --git a/eas.json b/eas.json index e2c401b..3fac496 100644 --- a/eas.json +++ b/eas.json @@ -11,11 +11,31 @@ "preview": { "distribution": "internal" }, + "main": { + "autoIncrement": true, + "channel": "production", + "env": { + "RCT_REMOVE_LEGACY_ARCH": "1" + } + }, "production": { - "autoIncrement": true + "autoIncrement": true, + "channel": "production", + "env": { + "RCT_REMOVE_LEGACY_ARCH": "1" + } } }, "submit": { - "production": {} + "main": { + "ios": { + "ascAppId": "6782733134" + } + }, + "production": { + "ios": { + "ascAppId": "6782733134" + } + } } } diff --git a/jest.config.bun.ts b/jest.config.bun.ts deleted file mode 100644 index e775247..0000000 --- a/jest.config.bun.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { Config } from 'jest'; - -const config: Config = { - verbose: true, - preset: 'jest-expo', - setupFilesAfterEnv: ['/src/setupTests.ts'], - transformIgnorePatterns: [ - 'node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@sentry/react-native|native-base|react-native-svg)', - ], - testEnvironment: 'jsdom', - moduleNameMapper: { - '^@/(.*)$': '/src/$1', - }, - collectCoverageFrom: ['src/**/*.{ts,tsx}', '!src/**/*.d.ts', '!src/setupTests.ts', '!src/**/__tests__/**'], - // Only run the consolidated Bun test file - testMatch: ['/src/__tests__/bun-tests.test.ts'], - // Exclude problematic modules - modulePathIgnorePatterns: ['/node_modules/expo-router', '/node_modules/@clerk/clerk-expo'], -}; - -export default config; diff --git a/jest.config.ts b/jest.config.ts index b0511f8..c50a67b 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -5,7 +5,7 @@ const config: Config = { preset: 'jest-expo', setupFilesAfterEnv: ['/src/setupTests.ts'], transformIgnorePatterns: [ - 'node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@sentry/react-native|native-base|react-native-svg)', + 'node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|react-navigation|@react-navigation/.*|@sentry/react-native|native-base|react-native-svg)', ], testEnvironment: 'jsdom', moduleNameMapper: { diff --git a/knip.json b/knip.json new file mode 100644 index 0000000..43056df --- /dev/null +++ b/knip.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://unpkg.com/knip@6/schema.json", + "ignoreBinaries": ["python3"], + "ignoreDependencies": ["@expo/ngrok", "signal-exit"], + "ignoreFiles": ["plugins/with-fmt-xcode26-fix.js"], + "ignoreUnresolved": ["babel-preset-expo", "jest-environment-jsdom"] +} diff --git a/metro.config.js b/metro.config.js index 1a1702f..3137982 100644 --- a/metro.config.js +++ b/metro.config.js @@ -4,8 +4,23 @@ const { withNativeWind } = require('nativewind/metro'); // eslint-disable-next-line no-undef const config = getDefaultConfig(__dirname); +config.maxWorkers = Number(process.env.METRO_MAX_WORKERS || 2); + // Add wasm asset support config.resolver.assetExts.push('wasm'); +config.resolver.assetExts.push('pte'); +config.resolver.assetExts.push('bin'); + +const defaultResolveRequest = config.resolver.resolveRequest; +config.resolver.resolveRequest = (context, moduleName, platform) => { + if (moduleName === 'expo-file-system/legacy') { + return context.resolveRequest(context, 'expo-file-system', platform); + } + + return defaultResolveRequest + ? defaultResolveRequest(context, moduleName, platform) + : context.resolveRequest(context, moduleName, platform); +}; // Add COEP and COOP headers to support SharedArrayBuffer config.server.enhanceMiddleware = (middleware) => { diff --git a/package.json b/package.json index 79e63c9..17116f4 100644 --- a/package.json +++ b/package.json @@ -13,59 +13,68 @@ "web": "expo start --web", "prebuild": "bunx expo prebuild", "build:all": "bunx eas build --platform all", - "build:update": "eas update", + "build:update": "bunx eas update", "export:web": "bunx expo export -p web", "export:ios": "bunx expo export --platform ios --output-dir dist-ios-check", "deploy:web:dev": "bunx expo export -p web && bunx eas-cli@latest deploy", "deploy:web:prod": "bunx expo export -p web && bunx eas-cli@latest deploy --prod", - "db:migrate": "bunx prisma migrate dev", - "db:generate": "bunx prisma generate --no-engine", - "typecheck": "tsc --noEmit --pretty false", - "lint": "eslint . --ext .js,.jsx,.ts,.tsx", - "lint:fix": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix", - "format": "prettier \"**/*.{js,jsx,ts,tsx,json}\" --write", - "format:fix": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix && prettier \"**/*.{js,jsx,ts,tsx,json}\" --write", + "submit:appstore": "bash scripts/submit-app-store-review.sh", + "eas:configure-clerk": "bash scripts/configure-eas-production-clerk.sh", + "typecheck": "node --max-old-space-size=4096 ./node_modules/typescript/bin/tsc --noEmit --pretty false", + "lint": "node --max-old-space-size=4096 ./node_modules/eslint/bin/eslint.js . --ext .js,.jsx,.ts,.tsx", + "lint:fix": "node --max-old-space-size=4096 ./node_modules/eslint/bin/eslint.js \"**/*.{js,jsx,ts,tsx}\" --fix", + "format": "node ./node_modules/prettier/bin/prettier.cjs \"**/*.{js,jsx,ts,tsx,json}\" --write", + "format:fix": "node --max-old-space-size=4096 ./node_modules/eslint/bin/eslint.js \"**/*.{js,jsx,ts,tsx}\" --fix && node ./node_modules/prettier/bin/prettier.cjs \"**/*.{js,jsx,ts,tsx,json}\" --write", "clean": "rm -rf node_modules && rm -rf package-lock.json && bun i", "start": "expo start", "tunnel": "bunx expo start --tunnel -c", "android:dev": "expo run:android --device", "ios:dev": "expo run:ios --device", "doc-fix": "bunx expo install --check", - "migrate": "bunx prisma migrate dev", - "accelerate": "bunx prisma generate --no-engine", - "swagger:generate": "node scripts/generate-swagger.js", + "generate:brand-assets": "python3 scripts/generate-brand-assets.py", "doctor": "bunx expo-doctor", - "verify": "bun run typecheck && bun run lint && bun run test -- --runInBand && bun run doctor", - "test": "jest", - "test:watch": "jest --watch", - "test:coverage": "jest --coverage" + "verify:production": "node scripts/verify-production-readiness.js", + "verify:release-env": "node scripts/verify-release-environment.js", + "verify:appstore-urls": "node scripts/verify-app-store-urls.js", + "verify:appstore": "bun run verify:release-env -- --require-app-review-phone && bun run verify:appstore-urls && bun run test:readiness", + "clean:release-artifacts": "node scripts/cleanup-release-artifacts.js", + "guard:startup": "node scripts/scan-startup-module-work.js", + "report:module-work": "node scripts/report-module-work.js", + "report:atlas": "node scripts/report-atlas-bundle.js", + "analyze:atlas": "rm -f .expo/atlas.jsonl && EXPO_ATLAS=true NODE_ENV=production METRO_MAX_WORKERS=1 bunx expo export --platform ios --output-dir dist-atlas-ios && bunx expo-atlas .expo/atlas.jsonl --no-open", + "perf:baseline": "rm -rf dist-ios-check dist-web-check && NODE_ENV=production METRO_MAX_WORKERS=1 bunx expo export --platform ios --output-dir dist-ios-check && METRO_MAX_WORKERS=1 bunx expo export -p web --output-dir dist-web-check && node scripts/collect-performance-baseline.js", + "perf:baseline:report": "node scripts/collect-performance-baseline.js", + "knip:check": "bunx knip", + "knip:dependencies": "bunx knip --dependencies --no-config-hints", + "verify": "bun run typecheck && bun run lint && bun run test -- --runInBand && bun run doctor && bun run verify:production", + "test:readiness": "bun run typecheck && bun run lint && bun run guard:startup && bun run report:module-work && bun run knip:check && bun run test -- --runInBand && bun run doctor && rm -rf dist-ios-check dist-web-check && NODE_ENV=production METRO_MAX_WORKERS=1 bunx expo export --platform ios --output-dir dist-ios-check && METRO_MAX_WORKERS=1 bunx expo export -p web --output-dir dist-web-check && bun run verify:production && bun run perf:baseline:report && bun run clean:release-artifacts", + "test": "node --max-old-space-size=4096 ./node_modules/jest/bin/jest.js", + "test:watch": "node --max-old-space-size=4096 ./node_modules/jest/bin/jest.js --watch", + "test:coverage": "node --max-old-space-size=4096 ./node_modules/jest/bin/jest.js --coverage" }, "dependencies": { "@clerk/clerk-expo": "^2.14.25", - "@expo-google-fonts/outfit": "^0.4.2", "@expo/metro-runtime": "~5.0.5", "@kingstinct/react-native-healthkit": "^14.0.2", - "@prisma/extension-accelerate": "^2.0.2", "@react-native-community/datetimepicker": "8.4.1", "@react-navigation/drawer": "^7.3.9", - "@reduxjs/toolkit": "^2.8.2", - "@shopify/flash-list": "1.7.6", - "@types/swagger-jsdoc": "^6.0.4", "eslint-config-prettier": "^9.1.2", "eslint-plugin-prettier": "^5.5.4", "expo": "~53.0.27", + "expo-asset": "~11.1.7", "expo-auth-session": "^6.2.1", "expo-background-task": "^0.2.8", "expo-blur": "^14.1.5", + "expo-build-properties": "~0.14.8", "expo-constants": "~17.1.8", "expo-dev-client": "~5.2.4", "expo-document-picker": "~13.1.6", "expo-file-system": "~18.1.11", + "expo-font": "~13.3.2", "expo-haptics": "^14.1.4", "expo-image-picker": "^16.1.4", "expo-linear-gradient": "^14.1.5", "expo-linking": "~7.1.7", - "expo-location": "^18.1.6", "expo-navigation-bar": "~4.2.8", "expo-router": "~5.1.11", "expo-secure-store": "~14.2.4", @@ -73,10 +82,9 @@ "expo-splash-screen": "^0.30.10", "expo-sqlite": "~15.2.14", "expo-status-bar": "~2.2.3", + "expo-system-ui": "~5.0.11", "expo-updates": "~0.28.18", "expo-web-browser": "^14.2.0", - "idb": "^8.0.3", - "lottie-react-native": "7.2.2", "lucide-react-native": "^0.542.0", "nativewind": "^4.1.23", "prettier": "^3.6.2", @@ -84,11 +92,12 @@ "react-dom": "19.0.0", "react-native": "0.79.6", "react-native-actions-sheet": "^0.9.7", - "react-native-calendars": "^1.1313.0", "react-native-chart-kit": "^6.12.0", + "react-native-executorch": "0.8.4", "react-native-gesture-handler": "~2.24.0", "react-native-modal": "^14.0.0-rc.1", "react-native-nitro-modules": "^0.35.9", + "react-native-performance": "6.0.0", "react-native-reanimated": "~3.17.5", "react-native-safe-area-context": "5.4.0", "react-native-screens": "~4.11.1", @@ -96,30 +105,23 @@ "react-native-toast-message": "^2.3.3", "react-native-web": "^0.20.0", "react-native-wheel-picker-expo": "^0.5.4", - "react-redux": "^9.2.0", - "redux": "^5.0.1", - "redux-devtools-expo-dev-plugin": "^0.2.1", - "semver": "^7.7.2", - "sql.js": "^1.13.0", - "swagger-jsdoc": "^6.2.8", - "tailwind-merge": "^3.3.1" + "tailwind-merge": "^3.3.1", + "zustand": "^5.0.14" }, "devDependencies": { "@babel/core": "^7.28.3", "@expo/ngrok": "^4.1.3", - "@testing-library/react-hooks": "^8.0.1", "@testing-library/react-native": "^13.3.3", "@types/jest": "^29.5.14", "@types/react": "~19.0.14", - "@types/sql.js": "^1.4.9", "eslint": "^8.57.1", "eslint-config-expo": "~9.2.0", + "expo-atlas": "0.4.3", "jest": "^29.7.0", "jest-expo": "~53.0.14", - "prettier-plugin-tailwindcss": "^0.5.14", - "sqlite3": "^5.1.7", + "knip": "^6.17.1", + "signal-exit": "^3.0.7", "tailwindcss": "^3.4.17", - "ts-node": "^10.9.2", "typescript": "~5.8.3" }, "private": true, @@ -127,14 +129,10 @@ "doctor": { "reactNativeDirectoryCheck": { "exclude": [ - "@prisma/extension-accelerate", "eslint-config-prettier", "eslint-plugin-prettier", - "idb", "prettier", "react-native-wheel-picker-expo", - "redux-devtools-expo-dev-plugin", - "sql.js", "react-native-chart-kit" ], "listUnknownPackages": false diff --git a/plugins/with-fmt-xcode26-fix.js b/plugins/with-fmt-xcode26-fix.js new file mode 100644 index 0000000..9babddc --- /dev/null +++ b/plugins/with-fmt-xcode26-fix.js @@ -0,0 +1,45 @@ +const fs = require('fs'); +const path = require('path'); + +const { withDangerousMod } = require('@expo/config-plugins'); + +const MARKER = '# PrepAI: Xcode 26 fmt consteval workaround'; +const PATCH = ` + ${MARKER} + installer.pods_project.targets.each do |target| + next unless target.name == 'fmt' + + target.build_configurations.each do |config| + config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'gnu++17' + end + end +`; + +const withFmtXcode26Fix = (config) => + withDangerousMod(config, [ + 'ios', + async (modConfig) => { + const podfilePath = path.join(modConfig.modRequest.platformProjectRoot, 'Podfile'); + let podfile = fs.readFileSync(podfilePath, 'utf8'); + + if (podfile.includes(MARKER)) { + return modConfig; + } + + if (!podfile.includes('post_install do |installer|')) { + throw new Error('Could not find post_install block in ios/Podfile'); + } + + const codeSignComment = ' # This is necessary for Xcode 14, because it signs resource bundles by default'; + if (!podfile.includes(codeSignComment)) { + throw new Error('Could not find resource bundle code signing block in ios/Podfile'); + } + + podfile = podfile.replace(codeSignComment, `${PATCH}\n${codeSignComment}`); + fs.writeFileSync(podfilePath, podfile); + + return modConfig; + }, + ]); + +module.exports = withFmtXcode26Fix; diff --git a/prisma/generated/client/client.d.ts b/prisma/generated/client/client.d.ts deleted file mode 100644 index ea465c2..0000000 --- a/prisma/generated/client/client.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './index'; diff --git a/prisma/generated/client/client.js b/prisma/generated/client/client.js deleted file mode 100644 index 73623f9..0000000 --- a/prisma/generated/client/client.js +++ /dev/null @@ -1,3 +0,0 @@ -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ -module.exports = { ...require('.') }; diff --git a/prisma/generated/client/default.d.ts b/prisma/generated/client/default.d.ts deleted file mode 100644 index ea465c2..0000000 --- a/prisma/generated/client/default.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './index'; diff --git a/prisma/generated/client/default.js b/prisma/generated/client/default.js deleted file mode 100644 index 73623f9..0000000 --- a/prisma/generated/client/default.js +++ /dev/null @@ -1,3 +0,0 @@ -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ -module.exports = { ...require('.') }; diff --git a/prisma/generated/client/edge.d.ts b/prisma/generated/client/edge.d.ts deleted file mode 100644 index acced89..0000000 --- a/prisma/generated/client/edge.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './default'; diff --git a/prisma/generated/client/edge.js b/prisma/generated/client/edge.js deleted file mode 100644 index e69ab57..0000000 --- a/prisma/generated/client/edge.js +++ /dev/null @@ -1,376 +0,0 @@ -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ - -Object.defineProperty(exports, '__esModule', { value: true }); - -const { - PrismaClientKnownRequestError, - PrismaClientUnknownRequestError, - PrismaClientRustPanicError, - PrismaClientInitializationError, - PrismaClientValidationError, - getPrismaClient, - sqltag, - empty, - join, - raw, - skip, - Decimal, - Debug, - objectEnumValues, - makeStrictEnum, - Extensions, - warnOnce, - defineDmmfProperty, - Public, - getRuntime, - createParam, -} = require('./runtime/edge.js'); - -const Prisma = {}; - -exports.Prisma = Prisma; -exports.$Enums = {}; - -/** - * Prisma Client JS version: 6.14.0 - * Query Engine version: 717184b7b35ea05dfa71a3236b7af656013e1e49 - */ -Prisma.prismaVersion = { - client: '6.14.0', - engine: '717184b7b35ea05dfa71a3236b7af656013e1e49', -}; - -Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; -Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError; -Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError; -Prisma.PrismaClientInitializationError = PrismaClientInitializationError; -Prisma.PrismaClientValidationError = PrismaClientValidationError; -Prisma.Decimal = Decimal; - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = sqltag; -Prisma.empty = empty; -Prisma.join = join; -Prisma.raw = raw; -Prisma.validator = Public.validator; - -/** - * Extensions - */ -Prisma.getExtensionContext = Extensions.getExtensionContext; -Prisma.defineExtension = Extensions.defineExtension; - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull; -Prisma.JsonNull = objectEnumValues.instances.JsonNull; -Prisma.AnyNull = objectEnumValues.instances.AnyNull; - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull, -}; - -/** - * Enums - */ -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable', -}); - -exports.Prisma.UserScalarFieldEnum = { - id: 'id', - clerkId: 'clerkId', - name: 'name', - email: 'email', - createdAt: 'createdAt', - updatedAt: 'updatedAt', -}; - -exports.Prisma.HealthProfileScalarFieldEnum = { - id: 'id', - userId: 'userId', - height: 'height', - weight: 'weight', - age: 'age', - gender: 'gender', - birthday: 'birthday', - targetWeight: 'targetWeight', - targetCalories: 'targetCalories', - targetWaterL: 'targetWaterL', - activityLevel: 'activityLevel', - fitnessGoal: 'fitnessGoal', - heightUnit: 'heightUnit', - weightUnit: 'weightUnit', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.WorkoutScalarFieldEnum = { - id: 'id', - userId: 'userId', - title: 'title', - category: 'category', - durationMin: 'durationMin', - calories: 'calories', - date: 'date', - notes: 'notes', - isCompleted: 'isCompleted', - totalTime: 'totalTime', - restTime: 'restTime', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.ExerciseScalarFieldEnum = { - id: 'id', - workoutId: 'workoutId', - name: 'name', - sets: 'sets', - reps: 'reps', - weightKg: 'weightKg', - duration: 'duration', - distance: 'distance', - restTime: 'restTime', - order: 'order', - isCompleted: 'isCompleted', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.MealScalarFieldEnum = { - id: 'id', - userId: 'userId', - name: 'name', - mealType: 'mealType', - calories: 'calories', - protein: 'protein', - carbs: 'carbs', - fat: 'fat', - date: 'date', - notes: 'notes', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.MealItemScalarFieldEnum = { - id: 'id', - mealId: 'mealId', - userId: 'userId', - name: 'name', - calories: 'calories', - protein: 'protein', - carbs: 'carbs', - fat: 'fat', - quantity: 'quantity', - unit: 'unit', - isHighInProtein: 'isHighInProtein', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.ProgressLogScalarFieldEnum = { - id: 'id', - userId: 'userId', - date: 'date', - waterL: 'waterL', - sleepHrs: 'sleepHrs', - mood: 'mood', - weightKg: 'weightKg', - steps: 'steps', - activeMinutes: 'activeMinutes', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.WeightEntryScalarFieldEnum = { - id: 'id', - userId: 'userId', - weightKg: 'weightKg', - date: 'date', - photo: 'photo', - notes: 'notes', - bodyFatPercentage: 'bodyFatPercentage', - muscleMassKg: 'muscleMassKg', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.WaterIntakeScalarFieldEnum = { - id: 'id', - userId: 'userId', - amountMl: 'amountMl', - date: 'date', - time: 'time', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.SleepEntryScalarFieldEnum = { - id: 'id', - userId: 'userId', - hours: 'hours', - quality: 'quality', - date: 'date', - bedtime: 'bedtime', - wakeTime: 'wakeTime', - notes: 'notes', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.GoalScalarFieldEnum = { - id: 'id', - userId: 'userId', - type: 'type', - target: 'target', - current: 'current', - unit: 'unit', - startDate: 'startDate', - endDate: 'endDate', - isActive: 'isActive', - notes: 'notes', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc', -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive', -}; - -exports.Prisma.NullsOrder = { - first: 'first', - last: 'last', -}; - -exports.Prisma.ModelName = { - User: 'User', - HealthProfile: 'HealthProfile', - Workout: 'Workout', - Exercise: 'Exercise', - Meal: 'Meal', - MealItem: 'MealItem', - ProgressLog: 'ProgressLog', - WeightEntry: 'WeightEntry', - WaterIntake: 'WaterIntake', - SleepEntry: 'SleepEntry', - Goal: 'Goal', -}; -/** - * Create the Client - */ -const config = { - generator: { - name: 'client', - provider: { - fromEnvVar: null, - value: 'prisma-client-js', - }, - output: { - value: '/Users/jonathangan/Desktop/PrepAI/prisma/generated/client', - fromEnvVar: null, - }, - config: { - engineType: 'library', - }, - binaryTargets: [ - { - fromEnvVar: null, - value: 'darwin-arm64', - native: true, - }, - ], - previewFeatures: [], - sourceFilePath: '/Users/jonathangan/Desktop/PrepAI/prisma/schema.prisma', - isCustomOutput: true, - }, - relativeEnvPaths: { - rootEnvPath: null, - schemaEnvPath: '../../../.env', - }, - relativePath: '../..', - clientVersion: '6.14.0', - engineVersion: '717184b7b35ea05dfa71a3236b7af656013e1e49', - datasourceNames: ['db'], - activeProvider: 'postgresql', - postinstall: false, - inlineDatasources: { - db: { - url: { - fromEnvVar: 'DATABASE_URL', - value: null, - }, - }, - }, - inlineSchema: - "datasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"./generated/client\"\n}\n\n/// Users come from Clerk, but we mirror them locally\nmodel User {\n id String @id @default(cuid()) // local UUID\n clerkId String @unique // Clerk auth userId\n name String?\n email String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n healthProfiles HealthProfile[]\n workouts Workout[]\n meals Meal[]\n mealItems MealItem[]\n progressLogs ProgressLog[]\n weightEntries WeightEntry[]\n waterIntake WaterIntake[]\n sleepEntries SleepEntry[]\n goals Goal[]\n}\n\n/// Health profile holds user settings and preferences\nmodel HealthProfile {\n id String @id @default(cuid())\n userId String\n user User @relation(fields: [userId], references: [id])\n height Float? // Height value (always stored in cm)\n weight Float? // Weight value (always stored in kg)\n age Int?\n gender String? // 'Male' | 'Female'\n birthday DateTime?\n targetWeight Float? // Target weight (always stored in kg)\n targetCalories Int? @default(2000)\n targetWaterL Float? @default(2.0)\n activityLevel String? // 'sedentary' | 'light' | 'moderate' | 'active' | 'very_active'\n fitnessGoal String? // 'lose_weight' | 'gain_weight' | 'maintain' | 'build_muscle' | 'improve_fitness'\n heightUnit String? @default(\"cm\") // 'cm' | 'in'\n weightUnit String? @default(\"kg\") // 'kg' | 'lb'\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n syncedAt DateTime?\n isDeleted Boolean @default(false)\n}\n\n/// Workouts with categories and types\nmodel Workout {\n id String @id @default(cuid())\n userId String\n user User @relation(fields: [userId], references: [id])\n title String\n category String // 'strength' | 'cardio' | 'yoga' | 'pilates' | 'functional' | 'flexibility'\n durationMin Int?\n calories Int?\n date DateTime\n notes String?\n isCompleted Boolean @default(false)\n totalTime Int? // Total time in seconds\n restTime Int? // Total rest time in seconds\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n syncedAt DateTime?\n isDeleted Boolean @default(false)\n\n exercises Exercise[]\n}\n\n/// Exercises per workout with detailed tracking\nmodel Exercise {\n id String @id @default(cuid())\n workoutId String\n workout Workout @relation(fields: [workoutId], references: [id])\n name String\n sets Int?\n reps Int?\n weightKg Float?\n duration Int? // Duration in seconds\n distance Float? // Distance in meters\n restTime Int? // Rest time in seconds\n order Int @default(0) // Exercise order in workout\n isCompleted Boolean @default(false)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n syncedAt DateTime?\n isDeleted Boolean @default(false)\n}\n\n/// Meals with meal types\nmodel Meal {\n id String @id @default(cuid())\n userId String\n user User @relation(fields: [userId], references: [id])\n name String\n mealType String // 'breakfast' | 'lunch' | 'dinner' | 'snack'\n calories Int?\n protein Float?\n carbs Float?\n fat Float?\n date DateTime\n notes String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n syncedAt DateTime?\n isDeleted Boolean @default(false)\n\n mealItems MealItem[]\n}\n\n/// Individual food items within meals\nmodel MealItem {\n id String @id @default(cuid())\n mealId String\n meal Meal @relation(fields: [mealId], references: [id])\n userId String\n user User @relation(fields: [userId], references: [id])\n name String\n calories Int?\n protein Float?\n carbs Float?\n fat Float?\n quantity Float? // Quantity in grams or units\n unit String? // Unit of measurement\n isHighInProtein Boolean @default(false)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n syncedAt DateTime?\n isDeleted Boolean @default(false)\n}\n\n/// Daily progress logs (hydration, sleep, mood, weight tracking)\nmodel ProgressLog {\n id String @id @default(cuid())\n userId String\n user User @relation(fields: [userId], references: [id])\n date DateTime\n waterL Float?\n sleepHrs Float?\n mood String? // 'poor' | 'fair' | 'good' | 'excellent'\n weightKg Float?\n steps Int?\n activeMinutes Int?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n syncedAt DateTime?\n isDeleted Boolean @default(false)\n}\n\n/// Individual weight entries with photos and notes\nmodel WeightEntry {\n id String @id @default(cuid())\n userId String\n user User @relation(fields: [userId], references: [id])\n weightKg Float\n date DateTime\n photo String? // URL or path to photo\n notes String?\n bodyFatPercentage Float?\n muscleMassKg Float?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n syncedAt DateTime?\n isDeleted Boolean @default(false)\n}\n\n/// Individual water intake entries\nmodel WaterIntake {\n id String @id @default(cuid())\n userId String\n user User @relation(fields: [userId], references: [id])\n amountMl Int // Amount in milliliters\n date DateTime\n time DateTime // Specific time of intake\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n syncedAt DateTime?\n isDeleted Boolean @default(false)\n}\n\n/// Individual sleep entries with quality tracking\nmodel SleepEntry {\n id String @id @default(cuid())\n userId String\n user User @relation(fields: [userId], references: [id])\n hours Float\n quality String // 'poor' | 'fair' | 'good' | 'excellent'\n date DateTime\n bedtime DateTime?\n wakeTime DateTime?\n notes String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n syncedAt DateTime?\n isDeleted Boolean @default(false)\n}\n\n/// User goals and targets\nmodel Goal {\n id String @id @default(cuid())\n userId String\n user User @relation(fields: [userId], references: [id])\n type String // 'weight' | 'calories' | 'workouts' | 'water' | 'sleep' | 'steps' | 'strength'\n target Float\n current Float @default(0)\n unit String // 'kg' | 'calories' | 'workouts' | 'liters' | 'hours' | 'steps' | 'kg'\n startDate DateTime\n endDate DateTime?\n isActive Boolean @default(true)\n notes String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n syncedAt DateTime?\n isDeleted Boolean @default(false)\n}\n", - inlineSchemaHash: '4ab5ee8c5f1369502128a2e648fbb15d549705ac00ae844af4a66bbf2166bc44', - copyEngine: true, -}; -config.dirname = '/'; - -config.runtimeDataModel = JSON.parse( - '{"models":{"User":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"clerkId","kind":"scalar","isList":false,"isRequired":true,"isUnique":true,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"email","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"healthProfiles","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"HealthProfile","nativeType":null,"relationName":"HealthProfileToUser","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"workouts","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Workout","nativeType":null,"relationName":"UserToWorkout","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"meals","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Meal","nativeType":null,"relationName":"MealToUser","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"mealItems","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"MealItem","nativeType":null,"relationName":"MealItemToUser","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"progressLogs","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ProgressLog","nativeType":null,"relationName":"ProgressLogToUser","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"weightEntries","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"WeightEntry","nativeType":null,"relationName":"UserToWeightEntry","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"waterIntake","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"WaterIntake","nativeType":null,"relationName":"UserToWaterIntake","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"sleepEntries","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"SleepEntry","nativeType":null,"relationName":"SleepEntryToUser","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"goals","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Goal","nativeType":null,"relationName":"GoalToUser","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"Users come from Clerk, but we mirror them locally"},"HealthProfile":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"userId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"user","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"User","nativeType":null,"relationName":"HealthProfileToUser","relationFromFields":["userId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"height","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"weight","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"age","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"gender","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"birthday","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"targetWeight","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"targetCalories","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Int","nativeType":null,"default":2000,"isGenerated":false,"isUpdatedAt":false},{"name":"targetWaterL","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Float","nativeType":null,"default":2,"isGenerated":false,"isUpdatedAt":false},{"name":"activityLevel","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"fitnessGoal","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"heightUnit","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":"cm","isGenerated":false,"isUpdatedAt":false},{"name":"weightUnit","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":"kg","isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"syncedAt","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isDeleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"Health profile holds user settings and preferences"},"Workout":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"userId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"user","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"User","nativeType":null,"relationName":"UserToWorkout","relationFromFields":["userId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"title","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"category","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"durationMin","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"calories","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"date","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"notes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isCompleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false},{"name":"totalTime","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"restTime","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"syncedAt","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isDeleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false},{"name":"exercises","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Exercise","nativeType":null,"relationName":"ExerciseToWorkout","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"Workouts with categories and types"},"Exercise":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"workoutId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"workout","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Workout","nativeType":null,"relationName":"ExerciseToWorkout","relationFromFields":["workoutId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"sets","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"reps","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"weightKg","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"duration","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"distance","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"restTime","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"order","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Int","nativeType":null,"default":0,"isGenerated":false,"isUpdatedAt":false},{"name":"isCompleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"syncedAt","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isDeleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"Exercises per workout with detailed tracking"},"Meal":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"userId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"user","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"User","nativeType":null,"relationName":"MealToUser","relationFromFields":["userId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"mealType","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"calories","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"protein","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"carbs","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"fat","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"date","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"notes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"syncedAt","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isDeleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false},{"name":"mealItems","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"MealItem","nativeType":null,"relationName":"MealToMealItem","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"Meals with meal types"},"MealItem":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"mealId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"meal","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Meal","nativeType":null,"relationName":"MealToMealItem","relationFromFields":["mealId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"userId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"user","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"User","nativeType":null,"relationName":"MealItemToUser","relationFromFields":["userId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"calories","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"protein","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"carbs","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"fat","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"quantity","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"unit","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isHighInProtein","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"syncedAt","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isDeleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"Individual food items within meals"},"ProgressLog":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"userId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"user","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"User","nativeType":null,"relationName":"ProgressLogToUser","relationFromFields":["userId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"date","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"waterL","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"sleepHrs","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"mood","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"weightKg","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"steps","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"activeMinutes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"syncedAt","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isDeleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"Daily progress logs (hydration, sleep, mood, weight tracking)"},"WeightEntry":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"userId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"user","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"User","nativeType":null,"relationName":"UserToWeightEntry","relationFromFields":["userId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"weightKg","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"date","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"photo","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"notes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"bodyFatPercentage","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"muscleMassKg","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"syncedAt","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isDeleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"Individual weight entries with photos and notes"},"WaterIntake":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"userId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"user","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"User","nativeType":null,"relationName":"UserToWaterIntake","relationFromFields":["userId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"amountMl","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"date","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"time","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"syncedAt","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isDeleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"Individual water intake entries"},"SleepEntry":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"userId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"user","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"User","nativeType":null,"relationName":"SleepEntryToUser","relationFromFields":["userId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"hours","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"quality","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"date","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"bedtime","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"wakeTime","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"notes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"syncedAt","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isDeleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"Individual sleep entries with quality tracking"},"Goal":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"userId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"user","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"User","nativeType":null,"relationName":"GoalToUser","relationFromFields":["userId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"type","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"target","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"current","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Float","nativeType":null,"default":0,"isGenerated":false,"isUpdatedAt":false},{"name":"unit","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"startDate","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"endDate","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isActive","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":true,"isGenerated":false,"isUpdatedAt":false},{"name":"notes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"syncedAt","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isDeleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"User goals and targets"}},"enums":{},"types":{}}' -); -defineDmmfProperty(exports.Prisma, config.runtimeDataModel); -config.engineWasm = undefined; -config.compilerWasm = undefined; - -config.injectableEdgeEnv = () => ({ - parsed: { - DATABASE_URL: - (typeof globalThis !== 'undefined' && globalThis['DATABASE_URL']) || - (typeof process !== 'undefined' && process.env && process.env.DATABASE_URL) || - undefined, - }, -}); - -if ( - (typeof globalThis !== 'undefined' && globalThis['DEBUG']) || - (typeof process !== 'undefined' && process.env && process.env.DEBUG) || - undefined -) { - Debug.enable( - (typeof globalThis !== 'undefined' && globalThis['DEBUG']) || - (typeof process !== 'undefined' && process.env && process.env.DEBUG) || - undefined - ); -} - -const PrismaClient = getPrismaClient(config); -exports.PrismaClient = PrismaClient; -Object.assign(exports, Prisma); diff --git a/prisma/generated/client/index-browser.js b/prisma/generated/client/index-browser.js deleted file mode 100644 index 5b0153f..0000000 --- a/prisma/generated/client/index-browser.js +++ /dev/null @@ -1,349 +0,0 @@ -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ - -Object.defineProperty(exports, '__esModule', { value: true }); - -const { Decimal, objectEnumValues, makeStrictEnum, Public, getRuntime, skip } = require('./runtime/index-browser.js'); - -const Prisma = {}; - -exports.Prisma = Prisma; -exports.$Enums = {}; - -/** - * Prisma Client JS version: 6.14.0 - * Query Engine version: 717184b7b35ea05dfa71a3236b7af656013e1e49 - */ -Prisma.prismaVersion = { - client: '6.14.0', - engine: '717184b7b35ea05dfa71a3236b7af656013e1e49', -}; - -Prisma.PrismaClientKnownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; -Prisma.PrismaClientUnknownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; -Prisma.PrismaClientRustPanicError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; -Prisma.PrismaClientInitializationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; -Prisma.PrismaClientValidationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; -Prisma.Decimal = Decimal; - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; -Prisma.empty = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; -Prisma.join = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; -Prisma.raw = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; -Prisma.validator = Public.validator; - -/** - * Extensions - */ -Prisma.getExtensionContext = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; -Prisma.defineExtension = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull; -Prisma.JsonNull = objectEnumValues.instances.JsonNull; -Prisma.AnyNull = objectEnumValues.instances.AnyNull; - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull, -}; - -/** - * Enums - */ - -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable', -}); - -exports.Prisma.UserScalarFieldEnum = { - id: 'id', - clerkId: 'clerkId', - name: 'name', - email: 'email', - createdAt: 'createdAt', - updatedAt: 'updatedAt', -}; - -exports.Prisma.HealthProfileScalarFieldEnum = { - id: 'id', - userId: 'userId', - height: 'height', - weight: 'weight', - age: 'age', - gender: 'gender', - birthday: 'birthday', - targetWeight: 'targetWeight', - targetCalories: 'targetCalories', - targetWaterL: 'targetWaterL', - activityLevel: 'activityLevel', - fitnessGoal: 'fitnessGoal', - heightUnit: 'heightUnit', - weightUnit: 'weightUnit', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.WorkoutScalarFieldEnum = { - id: 'id', - userId: 'userId', - title: 'title', - category: 'category', - durationMin: 'durationMin', - calories: 'calories', - date: 'date', - notes: 'notes', - isCompleted: 'isCompleted', - totalTime: 'totalTime', - restTime: 'restTime', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.ExerciseScalarFieldEnum = { - id: 'id', - workoutId: 'workoutId', - name: 'name', - sets: 'sets', - reps: 'reps', - weightKg: 'weightKg', - duration: 'duration', - distance: 'distance', - restTime: 'restTime', - order: 'order', - isCompleted: 'isCompleted', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.MealScalarFieldEnum = { - id: 'id', - userId: 'userId', - name: 'name', - mealType: 'mealType', - calories: 'calories', - protein: 'protein', - carbs: 'carbs', - fat: 'fat', - date: 'date', - notes: 'notes', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.MealItemScalarFieldEnum = { - id: 'id', - mealId: 'mealId', - userId: 'userId', - name: 'name', - calories: 'calories', - protein: 'protein', - carbs: 'carbs', - fat: 'fat', - quantity: 'quantity', - unit: 'unit', - isHighInProtein: 'isHighInProtein', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.ProgressLogScalarFieldEnum = { - id: 'id', - userId: 'userId', - date: 'date', - waterL: 'waterL', - sleepHrs: 'sleepHrs', - mood: 'mood', - weightKg: 'weightKg', - steps: 'steps', - activeMinutes: 'activeMinutes', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.WeightEntryScalarFieldEnum = { - id: 'id', - userId: 'userId', - weightKg: 'weightKg', - date: 'date', - photo: 'photo', - notes: 'notes', - bodyFatPercentage: 'bodyFatPercentage', - muscleMassKg: 'muscleMassKg', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.WaterIntakeScalarFieldEnum = { - id: 'id', - userId: 'userId', - amountMl: 'amountMl', - date: 'date', - time: 'time', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.SleepEntryScalarFieldEnum = { - id: 'id', - userId: 'userId', - hours: 'hours', - quality: 'quality', - date: 'date', - bedtime: 'bedtime', - wakeTime: 'wakeTime', - notes: 'notes', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.GoalScalarFieldEnum = { - id: 'id', - userId: 'userId', - type: 'type', - target: 'target', - current: 'current', - unit: 'unit', - startDate: 'startDate', - endDate: 'endDate', - isActive: 'isActive', - notes: 'notes', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc', -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive', -}; - -exports.Prisma.NullsOrder = { - first: 'first', - last: 'last', -}; - -exports.Prisma.ModelName = { - User: 'User', - HealthProfile: 'HealthProfile', - Workout: 'Workout', - Exercise: 'Exercise', - Meal: 'Meal', - MealItem: 'MealItem', - ProgressLog: 'ProgressLog', - WeightEntry: 'WeightEntry', - WaterIntake: 'WaterIntake', - SleepEntry: 'SleepEntry', - Goal: 'Goal', -}; - -/** - * This is a stub Prisma Client that will error at runtime if called. - */ -class PrismaClient { - constructor() { - return new Proxy(this, { - get(target, prop) { - let message; - const runtime = getRuntime(); - if (runtime.isEdge) { - message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: -- Use Prisma Accelerate: https://pris.ly/d/accelerate -- Use Driver Adapters: https://pris.ly/d/driver-adapters -`; - } else { - message = - 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + - runtime.prettyName + - '`).'; - } - - message += ` -If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`; - - throw new Error(message); - }, - }); - } -} - -exports.PrismaClient = PrismaClient; - -Object.assign(exports, Prisma); diff --git a/prisma/generated/client/index.d.ts b/prisma/generated/client/index.d.ts deleted file mode 100644 index d66aa33..0000000 --- a/prisma/generated/client/index.d.ts +++ /dev/null @@ -1,23997 +0,0 @@ -/** - * Client - **/ - -import * as runtime from './runtime/library.js'; -import $Types = runtime.Types; // general types -import $Public = runtime.Types.Public; -import $Utils = runtime.Types.Utils; -import $Extensions = runtime.Types.Extensions; -import $Result = runtime.Types.Result; - -export type PrismaPromise = $Public.PrismaPromise; - -/** - * Model User - * Users come from Clerk, but we mirror them locally - */ -export type User = $Result.DefaultSelection; -/** - * Model HealthProfile - * Health profile holds user settings and preferences - */ -export type HealthProfile = $Result.DefaultSelection; -/** - * Model Workout - * Workouts with categories and types - */ -export type Workout = $Result.DefaultSelection; -/** - * Model Exercise - * Exercises per workout with detailed tracking - */ -export type Exercise = $Result.DefaultSelection; -/** - * Model Meal - * Meals with meal types - */ -export type Meal = $Result.DefaultSelection; -/** - * Model MealItem - * Individual food items within meals - */ -export type MealItem = $Result.DefaultSelection; -/** - * Model ProgressLog - * Daily progress logs (hydration, sleep, mood, weight tracking) - */ -export type ProgressLog = $Result.DefaultSelection; -/** - * Model WeightEntry - * Individual weight entries with photos and notes - */ -export type WeightEntry = $Result.DefaultSelection; -/** - * Model WaterIntake - * Individual water intake entries - */ -export type WaterIntake = $Result.DefaultSelection; -/** - * Model SleepEntry - * Individual sleep entries with quality tracking - */ -export type SleepEntry = $Result.DefaultSelection; -/** - * Model Goal - * User goals and targets - */ -export type Goal = $Result.DefaultSelection; - -/** - * ## Prisma Client ʲˢ - * - * Type-safe database client for TypeScript & Node.js - * @example - * ``` - * const prisma = new PrismaClient() - * // Fetch zero or more Users - * const users = await prisma.user.findMany() - * ``` - * - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). - */ -export class PrismaClient< - ClientOptions extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, - const U = 'log' extends keyof ClientOptions - ? ClientOptions['log'] extends Array - ? Prisma.GetEvents - : never - : never, - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, -> { - [K: symbol]: { types: Prisma.TypeMap['other'] }; - - /** - * ## Prisma Client ʲˢ - * - * Type-safe database client for TypeScript & Node.js - * @example - * ``` - * const prisma = new PrismaClient() - * // Fetch zero or more Users - * const users = await prisma.user.findMany() - * ``` - * - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). - */ - - constructor(optionsArg?: Prisma.Subset); - $on( - eventType: V, - callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void - ): PrismaClient; - - /** - * Connect with the database - */ - $connect(): $Utils.JsPromise; - - /** - * Disconnect from the database - */ - $disconnect(): $Utils.JsPromise; - - /** - * Executes a prepared raw query and returns the number of affected rows. - * @example - * ``` - * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};` - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $executeRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; - - /** - * Executes a raw query and returns the number of affected rows. - * Susceptible to SQL injections, see documentation. - * @example - * ``` - * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; - - /** - * Performs a prepared raw query and returns the `SELECT` data. - * @example - * ``` - * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};` - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; - - /** - * Performs a raw query and returns the `SELECT` data. - * Susceptible to SQL injections, see documentation. - * @example - * ``` - * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). - */ - $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; - - /** - * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. - * @example - * ``` - * const [george, bob, alice] = await prisma.$transaction([ - * prisma.user.create({ data: { name: 'George' } }), - * prisma.user.create({ data: { name: 'Bob' } }), - * prisma.user.create({ data: { name: 'Alice' } }), - * ]) - * ``` - * - * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). - */ - $transaction

[]>( - arg: [...P], - options?: { isolationLevel?: Prisma.TransactionIsolationLevel } - ): $Utils.JsPromise>; - - $transaction( - fn: (prisma: Omit) => $Utils.JsPromise, - options?: { maxWait?: number; timeout?: number; isolationLevel?: Prisma.TransactionIsolationLevel } - ): $Utils.JsPromise; - - $extends: $Extensions.ExtendsHook< - 'extends', - Prisma.TypeMapCb, - ExtArgs, - $Utils.Call< - Prisma.TypeMapCb, - { - extArgs: ExtArgs; - } - > - >; - - /** - * `prisma.user`: Exposes CRUD operations for the **User** model. - * Example usage: - * ```ts - * // Fetch zero or more Users - * const users = await prisma.user.findMany() - * ``` - */ - get user(): Prisma.UserDelegate; - - /** - * `prisma.healthProfile`: Exposes CRUD operations for the **HealthProfile** model. - * Example usage: - * ```ts - * // Fetch zero or more HealthProfiles - * const healthProfiles = await prisma.healthProfile.findMany() - * ``` - */ - get healthProfile(): Prisma.HealthProfileDelegate; - - /** - * `prisma.workout`: Exposes CRUD operations for the **Workout** model. - * Example usage: - * ```ts - * // Fetch zero or more Workouts - * const workouts = await prisma.workout.findMany() - * ``` - */ - get workout(): Prisma.WorkoutDelegate; - - /** - * `prisma.exercise`: Exposes CRUD operations for the **Exercise** model. - * Example usage: - * ```ts - * // Fetch zero or more Exercises - * const exercises = await prisma.exercise.findMany() - * ``` - */ - get exercise(): Prisma.ExerciseDelegate; - - /** - * `prisma.meal`: Exposes CRUD operations for the **Meal** model. - * Example usage: - * ```ts - * // Fetch zero or more Meals - * const meals = await prisma.meal.findMany() - * ``` - */ - get meal(): Prisma.MealDelegate; - - /** - * `prisma.mealItem`: Exposes CRUD operations for the **MealItem** model. - * Example usage: - * ```ts - * // Fetch zero or more MealItems - * const mealItems = await prisma.mealItem.findMany() - * ``` - */ - get mealItem(): Prisma.MealItemDelegate; - - /** - * `prisma.progressLog`: Exposes CRUD operations for the **ProgressLog** model. - * Example usage: - * ```ts - * // Fetch zero or more ProgressLogs - * const progressLogs = await prisma.progressLog.findMany() - * ``` - */ - get progressLog(): Prisma.ProgressLogDelegate; - - /** - * `prisma.weightEntry`: Exposes CRUD operations for the **WeightEntry** model. - * Example usage: - * ```ts - * // Fetch zero or more WeightEntries - * const weightEntries = await prisma.weightEntry.findMany() - * ``` - */ - get weightEntry(): Prisma.WeightEntryDelegate; - - /** - * `prisma.waterIntake`: Exposes CRUD operations for the **WaterIntake** model. - * Example usage: - * ```ts - * // Fetch zero or more WaterIntakes - * const waterIntakes = await prisma.waterIntake.findMany() - * ``` - */ - get waterIntake(): Prisma.WaterIntakeDelegate; - - /** - * `prisma.sleepEntry`: Exposes CRUD operations for the **SleepEntry** model. - * Example usage: - * ```ts - * // Fetch zero or more SleepEntries - * const sleepEntries = await prisma.sleepEntry.findMany() - * ``` - */ - get sleepEntry(): Prisma.SleepEntryDelegate; - - /** - * `prisma.goal`: Exposes CRUD operations for the **Goal** model. - * Example usage: - * ```ts - * // Fetch zero or more Goals - * const goals = await prisma.goal.findMany() - * ``` - */ - get goal(): Prisma.GoalDelegate; -} - -export namespace Prisma { - export import DMMF = runtime.DMMF; - - export type PrismaPromise = $Public.PrismaPromise; - - /** - * Validator - */ - export import validator = runtime.Public.validator; - - /** - * Prisma Errors - */ - export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError; - export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError; - export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError; - export import PrismaClientInitializationError = runtime.PrismaClientInitializationError; - export import PrismaClientValidationError = runtime.PrismaClientValidationError; - - /** - * Re-export of sql-template-tag - */ - export import sql = runtime.sqltag; - export import empty = runtime.empty; - export import join = runtime.join; - export import raw = runtime.raw; - export import Sql = runtime.Sql; - - /** - * Decimal.js - */ - export import Decimal = runtime.Decimal; - - export type DecimalJsLike = runtime.DecimalJsLike; - - /** - * Metrics - */ - export type Metrics = runtime.Metrics; - export type Metric = runtime.Metric; - export type MetricHistogram = runtime.MetricHistogram; - export type MetricHistogramBucket = runtime.MetricHistogramBucket; - - /** - * Extensions - */ - export import Extension = $Extensions.UserArgs; - export import getExtensionContext = runtime.Extensions.getExtensionContext; - export import Args = $Public.Args; - export import Payload = $Public.Payload; - export import Result = $Public.Result; - export import Exact = $Public.Exact; - - /** - * Prisma Client JS version: 6.14.0 - * Query Engine version: 717184b7b35ea05dfa71a3236b7af656013e1e49 - */ - export type PrismaVersion = { - client: string; - }; - - export const prismaVersion: PrismaVersion; - - /** - * Utility Types - */ - - export import JsonObject = runtime.JsonObject; - export import JsonArray = runtime.JsonArray; - export import JsonValue = runtime.JsonValue; - export import InputJsonObject = runtime.InputJsonObject; - export import InputJsonArray = runtime.InputJsonArray; - export import InputJsonValue = runtime.InputJsonValue; - - /** - * Types of the values used to represent different kinds of `null` values when working with JSON fields. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - namespace NullTypes { - /** - * Type of `Prisma.DbNull`. - * - * You cannot use other instances of this class. Please use the `Prisma.DbNull` value. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - class DbNull { - private DbNull: never; - private constructor(); - } - - /** - * Type of `Prisma.JsonNull`. - * - * You cannot use other instances of this class. Please use the `Prisma.JsonNull` value. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - class JsonNull { - private JsonNull: never; - private constructor(); - } - - /** - * Type of `Prisma.AnyNull`. - * - * You cannot use other instances of this class. Please use the `Prisma.AnyNull` value. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - class AnyNull { - private AnyNull: never; - private constructor(); - } - } - - /** - * Helper for filtering JSON entries that have `null` on the database (empty on the db) - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - export const DbNull: NullTypes.DbNull; - - /** - * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - export const JsonNull: NullTypes.JsonNull; - - /** - * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field - */ - export const AnyNull: NullTypes.AnyNull; - - type SelectAndInclude = { - select: any; - include: any; - }; - - type SelectAndOmit = { - select: any; - omit: any; - }; - - /** - * Get the type of the value, that the Promise holds. - */ - export type PromiseType> = T extends PromiseLike ? U : T; - - /** - * Get the return type of a function which returns a Promise. - */ - export type PromiseReturnType $Utils.JsPromise> = PromiseType>; - - /** - * From T, pick a set of properties whose keys are in the union K - */ - type Prisma__Pick = { - [P in K]: T[P]; - }; - - export type Enumerable = T | Array; - - export type RequiredKeys = { - [K in keyof T]-?: {} extends Prisma__Pick ? never : K; - }[keyof T]; - - export type TruthyKeys = keyof { - [K in keyof T as T[K] extends false | undefined | null ? never : K]: K; - }; - - export type TrueKeys = TruthyKeys>>; - - /** - * Subset - * @desc From `T` pick properties that exist in `U`. Simple version of Intersection - */ - export type Subset = { - [key in keyof T]: key extends keyof U ? T[key] : never; - }; - - /** - * SelectSubset - * @desc From `T` pick properties that exist in `U`. Simple version of Intersection. - * Additionally, it validates, if both select and include are present. If the case, it errors. - */ - export type SelectSubset = { - [key in keyof T]: key extends keyof U ? T[key] : never; - } & (T extends SelectAndInclude - ? 'Please either choose `select` or `include`.' - : T extends SelectAndOmit - ? 'Please either choose `select` or `omit`.' - : {}); - - /** - * Subset + Intersection - * @desc From `T` pick properties that exist in `U` and intersect `K` - */ - export type SubsetIntersection = { - [key in keyof T]: key extends keyof U ? T[key] : never; - } & K; - - type Without = { [P in Exclude]?: never }; - - /** - * XOR is needed to have a real mutually exclusive union type - * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types - */ - type XOR = T extends object ? (U extends object ? (Without & U) | (Without & T) : U) : T; - - /** - * Is T a Record? - */ - type IsObject = - T extends Array - ? False - : T extends Date - ? False - : T extends Uint8Array - ? False - : T extends BigInt - ? False - : T extends object - ? True - : False; - - /** - * If it's T[], return T - */ - export type UnEnumerate = T extends Array ? U : T; - - /** - * From ts-toolbelt - */ - - type __Either = Omit & - { - // Merge all but K - [P in K]: Prisma__Pick; // With K possibilities - }[K]; - - type EitherStrict = Strict<__Either>; - - type EitherLoose = ComputeRaw<__Either>; - - type _Either = { - 1: EitherStrict; - 0: EitherLoose; - }[strict]; - - type Either = O extends unknown - ? _Either - : never; - - export type Union = any; - - type PatchUndefined = { - [K in keyof O]: O[K] extends undefined ? At : O[K]; - } & {}; - - /** Helper Types for "Merge" **/ - export type IntersectOf = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void - ? I - : never; - - export type Overwrite = { - [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; - } & {}; - - type _Merge = IntersectOf< - Overwrite< - U, - { - [K in keyof U]-?: At; - } - > - >; - - type Key = string | number | symbol; - type AtBasic = K extends keyof O ? O[K] : never; - type AtStrict = O[K & keyof O]; - type AtLoose = O extends unknown ? AtStrict : never; - export type At = { - 1: AtStrict; - 0: AtLoose; - }[strict]; - - export type ComputeRaw = A extends Function - ? A - : { - [K in keyof A]: A[K]; - } & {}; - - export type OptionalFlat = { - [K in keyof O]?: O[K]; - } & {}; - - type _Record = { - [P in K]: T; - }; - - // cause typescript not to expand types and preserve names - type NoExpand = T extends unknown ? T : never; - - // this type assumes the passed object is entirely optional - type AtLeast = NoExpand< - O extends unknown - ? (K extends keyof O ? { [P in K]: O[P] } & O : O) | ({ [P in keyof O as P extends K ? P : never]-?: O[P] } & O) - : never - >; - - type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never; - - export type Strict = ComputeRaw<_Strict>; - /** End Helper Types for "Merge" **/ - - export type Merge = ComputeRaw<_Merge>>; - - /** - A [[Boolean]] - */ - export type Boolean = True | False; - - // /** - // 1 - // */ - export type True = 1; - - /** - 0 - */ - export type False = 0; - - export type Not = { - 0: 1; - 1: 0; - }[B]; - - export type Extends = [A1] extends [never] - ? 0 // anything `never` is false - : A1 extends A2 - ? 1 - : 0; - - export type Has = Not, U1>>; - - export type Or = { - 0: { - 0: 0; - 1: 1; - }; - 1: { - 0: 1; - 1: 1; - }; - }[B1][B2]; - - export type Keys = U extends unknown ? keyof U : never; - - type Cast = A extends B ? A : B; - - export const type: unique symbol; - - /** - * Used by group by - */ - - export type GetScalarType = O extends object - ? { - [P in keyof T]: P extends keyof O ? O[P] : never; - } - : never; - - type FieldPaths> = IsObject extends True ? U : T; - - type GetHavingFields = { - [K in keyof T]: Or, Extends<'AND', K>>, Extends<'NOT', K>> extends True - ? // infer is only needed to not hit TS limit - // based on the brilliant idea of Pierre-Antoine Mills - // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437 - T[K] extends infer TK - ? GetHavingFields extends object ? Merge> : never> - : never - : {} extends FieldPaths - ? never - : K; - }[keyof T]; - - /** - * Convert tuple to union - */ - type _TupleToUnion = T extends (infer E)[] ? E : never; - type TupleToUnion = _TupleToUnion; - type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T; - - /** - * Like `Pick`, but additionally can also accept an array of keys - */ - type PickEnumerable | keyof T> = Prisma__Pick>; - - /** - * Exclude all keys with underscores - */ - type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T; - - export type FieldRef = runtime.FieldRef; - - type FieldRefInputType = Model extends never ? never : FieldRef; - - export const ModelName: { - User: 'User'; - HealthProfile: 'HealthProfile'; - Workout: 'Workout'; - Exercise: 'Exercise'; - Meal: 'Meal'; - MealItem: 'MealItem'; - ProgressLog: 'ProgressLog'; - WeightEntry: 'WeightEntry'; - WaterIntake: 'WaterIntake'; - SleepEntry: 'SleepEntry'; - Goal: 'Goal'; - }; - - export type ModelName = (typeof ModelName)[keyof typeof ModelName]; - - export type Datasources = { - db?: Datasource; - }; - - interface TypeMapCb - extends $Utils.Fn<{ extArgs: $Extensions.InternalArgs }, $Utils.Record> { - returns: Prisma.TypeMap< - this['params']['extArgs'], - ClientOptions extends { omit: infer OmitOptions } ? OmitOptions : {} - >; - } - - export type TypeMap = { - globalOmitOptions: { - omit: GlobalOmitOptions; - }; - meta: { - modelProps: - | 'user' - | 'healthProfile' - | 'workout' - | 'exercise' - | 'meal' - | 'mealItem' - | 'progressLog' - | 'weightEntry' - | 'waterIntake' - | 'sleepEntry' - | 'goal'; - txIsolationLevel: Prisma.TransactionIsolationLevel; - }; - model: { - User: { - payload: Prisma.$UserPayload; - fields: Prisma.UserFieldRefs; - operations: { - findUnique: { - args: Prisma.UserFindUniqueArgs; - result: $Utils.PayloadToResult | null; - }; - findUniqueOrThrow: { - args: Prisma.UserFindUniqueOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findFirst: { - args: Prisma.UserFindFirstArgs; - result: $Utils.PayloadToResult | null; - }; - findFirstOrThrow: { - args: Prisma.UserFindFirstOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findMany: { - args: Prisma.UserFindManyArgs; - result: $Utils.PayloadToResult[]; - }; - create: { - args: Prisma.UserCreateArgs; - result: $Utils.PayloadToResult; - }; - createMany: { - args: Prisma.UserCreateManyArgs; - result: BatchPayload; - }; - createManyAndReturn: { - args: Prisma.UserCreateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - delete: { - args: Prisma.UserDeleteArgs; - result: $Utils.PayloadToResult; - }; - update: { - args: Prisma.UserUpdateArgs; - result: $Utils.PayloadToResult; - }; - deleteMany: { - args: Prisma.UserDeleteManyArgs; - result: BatchPayload; - }; - updateMany: { - args: Prisma.UserUpdateManyArgs; - result: BatchPayload; - }; - updateManyAndReturn: { - args: Prisma.UserUpdateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - upsert: { - args: Prisma.UserUpsertArgs; - result: $Utils.PayloadToResult; - }; - aggregate: { - args: Prisma.UserAggregateArgs; - result: $Utils.Optional; - }; - groupBy: { - args: Prisma.UserGroupByArgs; - result: $Utils.Optional[]; - }; - count: { - args: Prisma.UserCountArgs; - result: $Utils.Optional | number; - }; - }; - }; - HealthProfile: { - payload: Prisma.$HealthProfilePayload; - fields: Prisma.HealthProfileFieldRefs; - operations: { - findUnique: { - args: Prisma.HealthProfileFindUniqueArgs; - result: $Utils.PayloadToResult | null; - }; - findUniqueOrThrow: { - args: Prisma.HealthProfileFindUniqueOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findFirst: { - args: Prisma.HealthProfileFindFirstArgs; - result: $Utils.PayloadToResult | null; - }; - findFirstOrThrow: { - args: Prisma.HealthProfileFindFirstOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findMany: { - args: Prisma.HealthProfileFindManyArgs; - result: $Utils.PayloadToResult[]; - }; - create: { - args: Prisma.HealthProfileCreateArgs; - result: $Utils.PayloadToResult; - }; - createMany: { - args: Prisma.HealthProfileCreateManyArgs; - result: BatchPayload; - }; - createManyAndReturn: { - args: Prisma.HealthProfileCreateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - delete: { - args: Prisma.HealthProfileDeleteArgs; - result: $Utils.PayloadToResult; - }; - update: { - args: Prisma.HealthProfileUpdateArgs; - result: $Utils.PayloadToResult; - }; - deleteMany: { - args: Prisma.HealthProfileDeleteManyArgs; - result: BatchPayload; - }; - updateMany: { - args: Prisma.HealthProfileUpdateManyArgs; - result: BatchPayload; - }; - updateManyAndReturn: { - args: Prisma.HealthProfileUpdateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - upsert: { - args: Prisma.HealthProfileUpsertArgs; - result: $Utils.PayloadToResult; - }; - aggregate: { - args: Prisma.HealthProfileAggregateArgs; - result: $Utils.Optional; - }; - groupBy: { - args: Prisma.HealthProfileGroupByArgs; - result: $Utils.Optional[]; - }; - count: { - args: Prisma.HealthProfileCountArgs; - result: $Utils.Optional | number; - }; - }; - }; - Workout: { - payload: Prisma.$WorkoutPayload; - fields: Prisma.WorkoutFieldRefs; - operations: { - findUnique: { - args: Prisma.WorkoutFindUniqueArgs; - result: $Utils.PayloadToResult | null; - }; - findUniqueOrThrow: { - args: Prisma.WorkoutFindUniqueOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findFirst: { - args: Prisma.WorkoutFindFirstArgs; - result: $Utils.PayloadToResult | null; - }; - findFirstOrThrow: { - args: Prisma.WorkoutFindFirstOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findMany: { - args: Prisma.WorkoutFindManyArgs; - result: $Utils.PayloadToResult[]; - }; - create: { - args: Prisma.WorkoutCreateArgs; - result: $Utils.PayloadToResult; - }; - createMany: { - args: Prisma.WorkoutCreateManyArgs; - result: BatchPayload; - }; - createManyAndReturn: { - args: Prisma.WorkoutCreateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - delete: { - args: Prisma.WorkoutDeleteArgs; - result: $Utils.PayloadToResult; - }; - update: { - args: Prisma.WorkoutUpdateArgs; - result: $Utils.PayloadToResult; - }; - deleteMany: { - args: Prisma.WorkoutDeleteManyArgs; - result: BatchPayload; - }; - updateMany: { - args: Prisma.WorkoutUpdateManyArgs; - result: BatchPayload; - }; - updateManyAndReturn: { - args: Prisma.WorkoutUpdateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - upsert: { - args: Prisma.WorkoutUpsertArgs; - result: $Utils.PayloadToResult; - }; - aggregate: { - args: Prisma.WorkoutAggregateArgs; - result: $Utils.Optional; - }; - groupBy: { - args: Prisma.WorkoutGroupByArgs; - result: $Utils.Optional[]; - }; - count: { - args: Prisma.WorkoutCountArgs; - result: $Utils.Optional | number; - }; - }; - }; - Exercise: { - payload: Prisma.$ExercisePayload; - fields: Prisma.ExerciseFieldRefs; - operations: { - findUnique: { - args: Prisma.ExerciseFindUniqueArgs; - result: $Utils.PayloadToResult | null; - }; - findUniqueOrThrow: { - args: Prisma.ExerciseFindUniqueOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findFirst: { - args: Prisma.ExerciseFindFirstArgs; - result: $Utils.PayloadToResult | null; - }; - findFirstOrThrow: { - args: Prisma.ExerciseFindFirstOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findMany: { - args: Prisma.ExerciseFindManyArgs; - result: $Utils.PayloadToResult[]; - }; - create: { - args: Prisma.ExerciseCreateArgs; - result: $Utils.PayloadToResult; - }; - createMany: { - args: Prisma.ExerciseCreateManyArgs; - result: BatchPayload; - }; - createManyAndReturn: { - args: Prisma.ExerciseCreateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - delete: { - args: Prisma.ExerciseDeleteArgs; - result: $Utils.PayloadToResult; - }; - update: { - args: Prisma.ExerciseUpdateArgs; - result: $Utils.PayloadToResult; - }; - deleteMany: { - args: Prisma.ExerciseDeleteManyArgs; - result: BatchPayload; - }; - updateMany: { - args: Prisma.ExerciseUpdateManyArgs; - result: BatchPayload; - }; - updateManyAndReturn: { - args: Prisma.ExerciseUpdateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - upsert: { - args: Prisma.ExerciseUpsertArgs; - result: $Utils.PayloadToResult; - }; - aggregate: { - args: Prisma.ExerciseAggregateArgs; - result: $Utils.Optional; - }; - groupBy: { - args: Prisma.ExerciseGroupByArgs; - result: $Utils.Optional[]; - }; - count: { - args: Prisma.ExerciseCountArgs; - result: $Utils.Optional | number; - }; - }; - }; - Meal: { - payload: Prisma.$MealPayload; - fields: Prisma.MealFieldRefs; - operations: { - findUnique: { - args: Prisma.MealFindUniqueArgs; - result: $Utils.PayloadToResult | null; - }; - findUniqueOrThrow: { - args: Prisma.MealFindUniqueOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findFirst: { - args: Prisma.MealFindFirstArgs; - result: $Utils.PayloadToResult | null; - }; - findFirstOrThrow: { - args: Prisma.MealFindFirstOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findMany: { - args: Prisma.MealFindManyArgs; - result: $Utils.PayloadToResult[]; - }; - create: { - args: Prisma.MealCreateArgs; - result: $Utils.PayloadToResult; - }; - createMany: { - args: Prisma.MealCreateManyArgs; - result: BatchPayload; - }; - createManyAndReturn: { - args: Prisma.MealCreateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - delete: { - args: Prisma.MealDeleteArgs; - result: $Utils.PayloadToResult; - }; - update: { - args: Prisma.MealUpdateArgs; - result: $Utils.PayloadToResult; - }; - deleteMany: { - args: Prisma.MealDeleteManyArgs; - result: BatchPayload; - }; - updateMany: { - args: Prisma.MealUpdateManyArgs; - result: BatchPayload; - }; - updateManyAndReturn: { - args: Prisma.MealUpdateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - upsert: { - args: Prisma.MealUpsertArgs; - result: $Utils.PayloadToResult; - }; - aggregate: { - args: Prisma.MealAggregateArgs; - result: $Utils.Optional; - }; - groupBy: { - args: Prisma.MealGroupByArgs; - result: $Utils.Optional[]; - }; - count: { - args: Prisma.MealCountArgs; - result: $Utils.Optional | number; - }; - }; - }; - MealItem: { - payload: Prisma.$MealItemPayload; - fields: Prisma.MealItemFieldRefs; - operations: { - findUnique: { - args: Prisma.MealItemFindUniqueArgs; - result: $Utils.PayloadToResult | null; - }; - findUniqueOrThrow: { - args: Prisma.MealItemFindUniqueOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findFirst: { - args: Prisma.MealItemFindFirstArgs; - result: $Utils.PayloadToResult | null; - }; - findFirstOrThrow: { - args: Prisma.MealItemFindFirstOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findMany: { - args: Prisma.MealItemFindManyArgs; - result: $Utils.PayloadToResult[]; - }; - create: { - args: Prisma.MealItemCreateArgs; - result: $Utils.PayloadToResult; - }; - createMany: { - args: Prisma.MealItemCreateManyArgs; - result: BatchPayload; - }; - createManyAndReturn: { - args: Prisma.MealItemCreateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - delete: { - args: Prisma.MealItemDeleteArgs; - result: $Utils.PayloadToResult; - }; - update: { - args: Prisma.MealItemUpdateArgs; - result: $Utils.PayloadToResult; - }; - deleteMany: { - args: Prisma.MealItemDeleteManyArgs; - result: BatchPayload; - }; - updateMany: { - args: Prisma.MealItemUpdateManyArgs; - result: BatchPayload; - }; - updateManyAndReturn: { - args: Prisma.MealItemUpdateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - upsert: { - args: Prisma.MealItemUpsertArgs; - result: $Utils.PayloadToResult; - }; - aggregate: { - args: Prisma.MealItemAggregateArgs; - result: $Utils.Optional; - }; - groupBy: { - args: Prisma.MealItemGroupByArgs; - result: $Utils.Optional[]; - }; - count: { - args: Prisma.MealItemCountArgs; - result: $Utils.Optional | number; - }; - }; - }; - ProgressLog: { - payload: Prisma.$ProgressLogPayload; - fields: Prisma.ProgressLogFieldRefs; - operations: { - findUnique: { - args: Prisma.ProgressLogFindUniqueArgs; - result: $Utils.PayloadToResult | null; - }; - findUniqueOrThrow: { - args: Prisma.ProgressLogFindUniqueOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findFirst: { - args: Prisma.ProgressLogFindFirstArgs; - result: $Utils.PayloadToResult | null; - }; - findFirstOrThrow: { - args: Prisma.ProgressLogFindFirstOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findMany: { - args: Prisma.ProgressLogFindManyArgs; - result: $Utils.PayloadToResult[]; - }; - create: { - args: Prisma.ProgressLogCreateArgs; - result: $Utils.PayloadToResult; - }; - createMany: { - args: Prisma.ProgressLogCreateManyArgs; - result: BatchPayload; - }; - createManyAndReturn: { - args: Prisma.ProgressLogCreateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - delete: { - args: Prisma.ProgressLogDeleteArgs; - result: $Utils.PayloadToResult; - }; - update: { - args: Prisma.ProgressLogUpdateArgs; - result: $Utils.PayloadToResult; - }; - deleteMany: { - args: Prisma.ProgressLogDeleteManyArgs; - result: BatchPayload; - }; - updateMany: { - args: Prisma.ProgressLogUpdateManyArgs; - result: BatchPayload; - }; - updateManyAndReturn: { - args: Prisma.ProgressLogUpdateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - upsert: { - args: Prisma.ProgressLogUpsertArgs; - result: $Utils.PayloadToResult; - }; - aggregate: { - args: Prisma.ProgressLogAggregateArgs; - result: $Utils.Optional; - }; - groupBy: { - args: Prisma.ProgressLogGroupByArgs; - result: $Utils.Optional[]; - }; - count: { - args: Prisma.ProgressLogCountArgs; - result: $Utils.Optional | number; - }; - }; - }; - WeightEntry: { - payload: Prisma.$WeightEntryPayload; - fields: Prisma.WeightEntryFieldRefs; - operations: { - findUnique: { - args: Prisma.WeightEntryFindUniqueArgs; - result: $Utils.PayloadToResult | null; - }; - findUniqueOrThrow: { - args: Prisma.WeightEntryFindUniqueOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findFirst: { - args: Prisma.WeightEntryFindFirstArgs; - result: $Utils.PayloadToResult | null; - }; - findFirstOrThrow: { - args: Prisma.WeightEntryFindFirstOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findMany: { - args: Prisma.WeightEntryFindManyArgs; - result: $Utils.PayloadToResult[]; - }; - create: { - args: Prisma.WeightEntryCreateArgs; - result: $Utils.PayloadToResult; - }; - createMany: { - args: Prisma.WeightEntryCreateManyArgs; - result: BatchPayload; - }; - createManyAndReturn: { - args: Prisma.WeightEntryCreateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - delete: { - args: Prisma.WeightEntryDeleteArgs; - result: $Utils.PayloadToResult; - }; - update: { - args: Prisma.WeightEntryUpdateArgs; - result: $Utils.PayloadToResult; - }; - deleteMany: { - args: Prisma.WeightEntryDeleteManyArgs; - result: BatchPayload; - }; - updateMany: { - args: Prisma.WeightEntryUpdateManyArgs; - result: BatchPayload; - }; - updateManyAndReturn: { - args: Prisma.WeightEntryUpdateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - upsert: { - args: Prisma.WeightEntryUpsertArgs; - result: $Utils.PayloadToResult; - }; - aggregate: { - args: Prisma.WeightEntryAggregateArgs; - result: $Utils.Optional; - }; - groupBy: { - args: Prisma.WeightEntryGroupByArgs; - result: $Utils.Optional[]; - }; - count: { - args: Prisma.WeightEntryCountArgs; - result: $Utils.Optional | number; - }; - }; - }; - WaterIntake: { - payload: Prisma.$WaterIntakePayload; - fields: Prisma.WaterIntakeFieldRefs; - operations: { - findUnique: { - args: Prisma.WaterIntakeFindUniqueArgs; - result: $Utils.PayloadToResult | null; - }; - findUniqueOrThrow: { - args: Prisma.WaterIntakeFindUniqueOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findFirst: { - args: Prisma.WaterIntakeFindFirstArgs; - result: $Utils.PayloadToResult | null; - }; - findFirstOrThrow: { - args: Prisma.WaterIntakeFindFirstOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findMany: { - args: Prisma.WaterIntakeFindManyArgs; - result: $Utils.PayloadToResult[]; - }; - create: { - args: Prisma.WaterIntakeCreateArgs; - result: $Utils.PayloadToResult; - }; - createMany: { - args: Prisma.WaterIntakeCreateManyArgs; - result: BatchPayload; - }; - createManyAndReturn: { - args: Prisma.WaterIntakeCreateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - delete: { - args: Prisma.WaterIntakeDeleteArgs; - result: $Utils.PayloadToResult; - }; - update: { - args: Prisma.WaterIntakeUpdateArgs; - result: $Utils.PayloadToResult; - }; - deleteMany: { - args: Prisma.WaterIntakeDeleteManyArgs; - result: BatchPayload; - }; - updateMany: { - args: Prisma.WaterIntakeUpdateManyArgs; - result: BatchPayload; - }; - updateManyAndReturn: { - args: Prisma.WaterIntakeUpdateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - upsert: { - args: Prisma.WaterIntakeUpsertArgs; - result: $Utils.PayloadToResult; - }; - aggregate: { - args: Prisma.WaterIntakeAggregateArgs; - result: $Utils.Optional; - }; - groupBy: { - args: Prisma.WaterIntakeGroupByArgs; - result: $Utils.Optional[]; - }; - count: { - args: Prisma.WaterIntakeCountArgs; - result: $Utils.Optional | number; - }; - }; - }; - SleepEntry: { - payload: Prisma.$SleepEntryPayload; - fields: Prisma.SleepEntryFieldRefs; - operations: { - findUnique: { - args: Prisma.SleepEntryFindUniqueArgs; - result: $Utils.PayloadToResult | null; - }; - findUniqueOrThrow: { - args: Prisma.SleepEntryFindUniqueOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findFirst: { - args: Prisma.SleepEntryFindFirstArgs; - result: $Utils.PayloadToResult | null; - }; - findFirstOrThrow: { - args: Prisma.SleepEntryFindFirstOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findMany: { - args: Prisma.SleepEntryFindManyArgs; - result: $Utils.PayloadToResult[]; - }; - create: { - args: Prisma.SleepEntryCreateArgs; - result: $Utils.PayloadToResult; - }; - createMany: { - args: Prisma.SleepEntryCreateManyArgs; - result: BatchPayload; - }; - createManyAndReturn: { - args: Prisma.SleepEntryCreateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - delete: { - args: Prisma.SleepEntryDeleteArgs; - result: $Utils.PayloadToResult; - }; - update: { - args: Prisma.SleepEntryUpdateArgs; - result: $Utils.PayloadToResult; - }; - deleteMany: { - args: Prisma.SleepEntryDeleteManyArgs; - result: BatchPayload; - }; - updateMany: { - args: Prisma.SleepEntryUpdateManyArgs; - result: BatchPayload; - }; - updateManyAndReturn: { - args: Prisma.SleepEntryUpdateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - upsert: { - args: Prisma.SleepEntryUpsertArgs; - result: $Utils.PayloadToResult; - }; - aggregate: { - args: Prisma.SleepEntryAggregateArgs; - result: $Utils.Optional; - }; - groupBy: { - args: Prisma.SleepEntryGroupByArgs; - result: $Utils.Optional[]; - }; - count: { - args: Prisma.SleepEntryCountArgs; - result: $Utils.Optional | number; - }; - }; - }; - Goal: { - payload: Prisma.$GoalPayload; - fields: Prisma.GoalFieldRefs; - operations: { - findUnique: { - args: Prisma.GoalFindUniqueArgs; - result: $Utils.PayloadToResult | null; - }; - findUniqueOrThrow: { - args: Prisma.GoalFindUniqueOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findFirst: { - args: Prisma.GoalFindFirstArgs; - result: $Utils.PayloadToResult | null; - }; - findFirstOrThrow: { - args: Prisma.GoalFindFirstOrThrowArgs; - result: $Utils.PayloadToResult; - }; - findMany: { - args: Prisma.GoalFindManyArgs; - result: $Utils.PayloadToResult[]; - }; - create: { - args: Prisma.GoalCreateArgs; - result: $Utils.PayloadToResult; - }; - createMany: { - args: Prisma.GoalCreateManyArgs; - result: BatchPayload; - }; - createManyAndReturn: { - args: Prisma.GoalCreateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - delete: { - args: Prisma.GoalDeleteArgs; - result: $Utils.PayloadToResult; - }; - update: { - args: Prisma.GoalUpdateArgs; - result: $Utils.PayloadToResult; - }; - deleteMany: { - args: Prisma.GoalDeleteManyArgs; - result: BatchPayload; - }; - updateMany: { - args: Prisma.GoalUpdateManyArgs; - result: BatchPayload; - }; - updateManyAndReturn: { - args: Prisma.GoalUpdateManyAndReturnArgs; - result: $Utils.PayloadToResult[]; - }; - upsert: { - args: Prisma.GoalUpsertArgs; - result: $Utils.PayloadToResult; - }; - aggregate: { - args: Prisma.GoalAggregateArgs; - result: $Utils.Optional; - }; - groupBy: { - args: Prisma.GoalGroupByArgs; - result: $Utils.Optional[]; - }; - count: { - args: Prisma.GoalCountArgs; - result: $Utils.Optional | number; - }; - }; - }; - }; - } & { - other: { - payload: any; - operations: { - $executeRaw: { - args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]]; - result: any; - }; - $executeRawUnsafe: { - args: [query: string, ...values: any[]]; - result: any; - }; - $queryRaw: { - args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]]; - result: any; - }; - $queryRawUnsafe: { - args: [query: string, ...values: any[]]; - result: any; - }; - }; - }; - }; - export const defineExtension: $Extensions.ExtendsHook<'define', Prisma.TypeMapCb, $Extensions.DefaultArgs>; - export type DefaultPrismaClient = PrismaClient; - export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'; - export interface PrismaClientOptions { - /** - * Overwrites the datasource url from your schema.prisma file - */ - datasources?: Datasources; - /** - * Overwrites the datasource url from your schema.prisma file - */ - datasourceUrl?: string; - /** - * @default "colorless" - */ - errorFormat?: ErrorFormat; - /** - * @example - * ``` - * // Shorthand for `emit: 'stdout'` - * log: ['query', 'info', 'warn', 'error'] - * - * // Emit as events only - * log: [ - * { emit: 'event', level: 'query' }, - * { emit: 'event', level: 'info' }, - * { emit: 'event', level: 'warn' } - * { emit: 'event', level: 'error' } - * ] - * - * / Emit as events and log to stdout - * og: [ - * { emit: 'stdout', level: 'query' }, - * { emit: 'stdout', level: 'info' }, - * { emit: 'stdout', level: 'warn' } - * { emit: 'stdout', level: 'error' } - * - * ``` - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). - */ - log?: (LogLevel | LogDefinition)[]; - /** - * The default values for transactionOptions - * maxWait ?= 2000 - * timeout ?= 5000 - */ - transactionOptions?: { - maxWait?: number; - timeout?: number; - isolationLevel?: Prisma.TransactionIsolationLevel; - }; - /** - * Global configuration for omitting model fields by default. - * - * @example - * ``` - * const prisma = new PrismaClient({ - * omit: { - * user: { - * password: true - * } - * } - * }) - * ``` - */ - omit?: Prisma.GlobalOmitConfig; - } - export type GlobalOmitConfig = { - user?: UserOmit; - healthProfile?: HealthProfileOmit; - workout?: WorkoutOmit; - exercise?: ExerciseOmit; - meal?: MealOmit; - mealItem?: MealItemOmit; - progressLog?: ProgressLogOmit; - weightEntry?: WeightEntryOmit; - waterIntake?: WaterIntakeOmit; - sleepEntry?: SleepEntryOmit; - goal?: GoalOmit; - }; - - /* Types for Logging */ - export type LogLevel = 'info' | 'query' | 'warn' | 'error'; - export type LogDefinition = { - level: LogLevel; - emit: 'stdout' | 'event'; - }; - - export type CheckIsLogLevel = T extends LogLevel ? T : never; - - export type GetLogType = CheckIsLogLevel; - - export type GetEvents = T extends Array ? GetLogType : never; - - export type QueryEvent = { - timestamp: Date; - query: string; - params: string; - duration: number; - target: string; - }; - - export type LogEvent = { - timestamp: Date; - message: string; - target: string; - }; - /* End Types for Logging */ - - export type PrismaAction = - | 'findUnique' - | 'findUniqueOrThrow' - | 'findMany' - | 'findFirst' - | 'findFirstOrThrow' - | 'create' - | 'createMany' - | 'createManyAndReturn' - | 'update' - | 'updateMany' - | 'updateManyAndReturn' - | 'upsert' - | 'delete' - | 'deleteMany' - | 'executeRaw' - | 'queryRaw' - | 'aggregate' - | 'count' - | 'runCommandRaw' - | 'findRaw' - | 'groupBy'; - - // tested in getLogLevel.test.ts - export function getLogLevel(log: Array): LogLevel | undefined; - - /** - * `PrismaClient` proxy available in interactive transactions. - */ - export type TransactionClient = Omit; - - export type Datasource = { - url?: string; - }; - - /** - * Count Types - */ - - /** - * Count Type UserCountOutputType - */ - - export type UserCountOutputType = { - healthProfiles: number; - workouts: number; - meals: number; - mealItems: number; - progressLogs: number; - weightEntries: number; - waterIntake: number; - sleepEntries: number; - goals: number; - }; - - export type UserCountOutputTypeSelect = { - healthProfiles?: boolean | UserCountOutputTypeCountHealthProfilesArgs; - workouts?: boolean | UserCountOutputTypeCountWorkoutsArgs; - meals?: boolean | UserCountOutputTypeCountMealsArgs; - mealItems?: boolean | UserCountOutputTypeCountMealItemsArgs; - progressLogs?: boolean | UserCountOutputTypeCountProgressLogsArgs; - weightEntries?: boolean | UserCountOutputTypeCountWeightEntriesArgs; - waterIntake?: boolean | UserCountOutputTypeCountWaterIntakeArgs; - sleepEntries?: boolean | UserCountOutputTypeCountSleepEntriesArgs; - goals?: boolean | UserCountOutputTypeCountGoalsArgs; - }; - - // Custom InputTypes - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the UserCountOutputType - */ - select?: UserCountOutputTypeSelect | null; - }; - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountHealthProfilesArgs< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - > = { - where?: HealthProfileWhereInput; - }; - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountWorkoutsArgs = - { - where?: WorkoutWhereInput; - }; - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountMealsArgs = { - where?: MealWhereInput; - }; - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountMealItemsArgs< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - > = { - where?: MealItemWhereInput; - }; - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountProgressLogsArgs< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - > = { - where?: ProgressLogWhereInput; - }; - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountWeightEntriesArgs< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - > = { - where?: WeightEntryWhereInput; - }; - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountWaterIntakeArgs< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - > = { - where?: WaterIntakeWhereInput; - }; - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountSleepEntriesArgs< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - > = { - where?: SleepEntryWhereInput; - }; - - /** - * UserCountOutputType without action - */ - export type UserCountOutputTypeCountGoalsArgs = { - where?: GoalWhereInput; - }; - - /** - * Count Type WorkoutCountOutputType - */ - - export type WorkoutCountOutputType = { - exercises: number; - }; - - export type WorkoutCountOutputTypeSelect = { - exercises?: boolean | WorkoutCountOutputTypeCountExercisesArgs; - }; - - // Custom InputTypes - /** - * WorkoutCountOutputType without action - */ - export type WorkoutCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the WorkoutCountOutputType - */ - select?: WorkoutCountOutputTypeSelect | null; - }; - - /** - * WorkoutCountOutputType without action - */ - export type WorkoutCountOutputTypeCountExercisesArgs< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - > = { - where?: ExerciseWhereInput; - }; - - /** - * Count Type MealCountOutputType - */ - - export type MealCountOutputType = { - mealItems: number; - }; - - export type MealCountOutputTypeSelect = { - mealItems?: boolean | MealCountOutputTypeCountMealItemsArgs; - }; - - // Custom InputTypes - /** - * MealCountOutputType without action - */ - export type MealCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the MealCountOutputType - */ - select?: MealCountOutputTypeSelect | null; - }; - - /** - * MealCountOutputType without action - */ - export type MealCountOutputTypeCountMealItemsArgs< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - > = { - where?: MealItemWhereInput; - }; - - /** - * Models - */ - - /** - * Model User - */ - - export type AggregateUser = { - _count: UserCountAggregateOutputType | null; - _min: UserMinAggregateOutputType | null; - _max: UserMaxAggregateOutputType | null; - }; - - export type UserMinAggregateOutputType = { - id: string | null; - clerkId: string | null; - name: string | null; - email: string | null; - createdAt: Date | null; - updatedAt: Date | null; - }; - - export type UserMaxAggregateOutputType = { - id: string | null; - clerkId: string | null; - name: string | null; - email: string | null; - createdAt: Date | null; - updatedAt: Date | null; - }; - - export type UserCountAggregateOutputType = { - id: number; - clerkId: number; - name: number; - email: number; - createdAt: number; - updatedAt: number; - _all: number; - }; - - export type UserMinAggregateInputType = { - id?: true; - clerkId?: true; - name?: true; - email?: true; - createdAt?: true; - updatedAt?: true; - }; - - export type UserMaxAggregateInputType = { - id?: true; - clerkId?: true; - name?: true; - email?: true; - createdAt?: true; - updatedAt?: true; - }; - - export type UserCountAggregateInputType = { - id?: true; - clerkId?: true; - name?: true; - email?: true; - createdAt?: true; - updatedAt?: true; - _all?: true; - }; - - export type UserAggregateArgs = { - /** - * Filter which User to aggregate. - */ - where?: UserWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Users to fetch. - */ - orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: UserWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Users from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Users. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Users - **/ - _count?: true | UserCountAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: UserMinAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: UserMaxAggregateInputType; - }; - - export type GetUserAggregateType = { - [P in keyof T & keyof AggregateUser]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType; - }; - - export type UserGroupByArgs = { - where?: UserWhereInput; - orderBy?: UserOrderByWithAggregationInput | UserOrderByWithAggregationInput[]; - by: UserScalarFieldEnum[] | UserScalarFieldEnum; - having?: UserScalarWhereWithAggregatesInput; - take?: number; - skip?: number; - _count?: UserCountAggregateInputType | true; - _min?: UserMinAggregateInputType; - _max?: UserMaxAggregateInputType; - }; - - export type UserGroupByOutputType = { - id: string; - clerkId: string; - name: string | null; - email: string | null; - createdAt: Date; - updatedAt: Date; - _count: UserCountAggregateOutputType | null; - _min: UserMinAggregateOutputType | null; - _max: UserMaxAggregateOutputType | null; - }; - - type GetUserGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & { - [P in keyof T & keyof UserGroupByOutputType]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType; - } - > - >; - - export type UserSelect = $Extensions.GetSelect< - { - id?: boolean; - clerkId?: boolean; - name?: boolean; - email?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - healthProfiles?: boolean | User$healthProfilesArgs; - workouts?: boolean | User$workoutsArgs; - meals?: boolean | User$mealsArgs; - mealItems?: boolean | User$mealItemsArgs; - progressLogs?: boolean | User$progressLogsArgs; - weightEntries?: boolean | User$weightEntriesArgs; - waterIntake?: boolean | User$waterIntakeArgs; - sleepEntries?: boolean | User$sleepEntriesArgs; - goals?: boolean | User$goalsArgs; - _count?: boolean | UserCountOutputTypeDefaultArgs; - }, - ExtArgs['result']['user'] - >; - - export type UserSelectCreateManyAndReturn = - $Extensions.GetSelect< - { - id?: boolean; - clerkId?: boolean; - name?: boolean; - email?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - }, - ExtArgs['result']['user'] - >; - - export type UserSelectUpdateManyAndReturn = - $Extensions.GetSelect< - { - id?: boolean; - clerkId?: boolean; - name?: boolean; - email?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - }, - ExtArgs['result']['user'] - >; - - export type UserSelectScalar = { - id?: boolean; - clerkId?: boolean; - name?: boolean; - email?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - }; - - export type UserOmit = $Extensions.GetOmit< - 'id' | 'clerkId' | 'name' | 'email' | 'createdAt' | 'updatedAt', - ExtArgs['result']['user'] - >; - export type UserInclude = { - healthProfiles?: boolean | User$healthProfilesArgs; - workouts?: boolean | User$workoutsArgs; - meals?: boolean | User$mealsArgs; - mealItems?: boolean | User$mealItemsArgs; - progressLogs?: boolean | User$progressLogsArgs; - weightEntries?: boolean | User$weightEntriesArgs; - waterIntake?: boolean | User$waterIntakeArgs; - sleepEntries?: boolean | User$sleepEntriesArgs; - goals?: boolean | User$goalsArgs; - _count?: boolean | UserCountOutputTypeDefaultArgs; - }; - export type UserIncludeCreateManyAndReturn = {}; - export type UserIncludeUpdateManyAndReturn = {}; - - export type $UserPayload = { - name: 'User'; - objects: { - healthProfiles: Prisma.$HealthProfilePayload[]; - workouts: Prisma.$WorkoutPayload[]; - meals: Prisma.$MealPayload[]; - mealItems: Prisma.$MealItemPayload[]; - progressLogs: Prisma.$ProgressLogPayload[]; - weightEntries: Prisma.$WeightEntryPayload[]; - waterIntake: Prisma.$WaterIntakePayload[]; - sleepEntries: Prisma.$SleepEntryPayload[]; - goals: Prisma.$GoalPayload[]; - }; - scalars: $Extensions.GetPayloadResult< - { - id: string; - clerkId: string; - name: string | null; - email: string | null; - createdAt: Date; - updatedAt: Date; - }, - ExtArgs['result']['user'] - >; - composites: {}; - }; - - type UserGetPayload = $Result.GetResult< - Prisma.$UserPayload, - S - >; - - type UserCountArgs = Omit< - UserFindManyArgs, - 'select' | 'include' | 'distinct' | 'omit' - > & { - select?: UserCountAggregateInputType | true; - }; - - export interface UserDelegate< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > { - [K: symbol]: { types: Prisma.TypeMap['model']['User']; meta: { name: 'User' } }; - /** - * Find zero or one User that matches the filter. - * @param {UserFindUniqueArgs} args - Arguments to find a User - * @example - * // Get one User - * const user = await prisma.user.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique( - args: SelectSubset> - ): Prisma__UserClient< - $Result.GetResult, T, 'findUnique', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find one User that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {UserFindUniqueOrThrowArgs} args - Arguments to find a User - * @example - * // Get one User - * const user = await prisma.user.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow( - args: SelectSubset> - ): Prisma__UserClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first User that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserFindFirstArgs} args - Arguments to find a User - * @example - * // Get one User - * const user = await prisma.user.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst( - args?: SelectSubset> - ): Prisma__UserClient< - $Result.GetResult, T, 'findFirst', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first User that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserFindFirstOrThrowArgs} args - Arguments to find a User - * @example - * // Get one User - * const user = await prisma.user.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow( - args?: SelectSubset> - ): Prisma__UserClient< - $Result.GetResult, T, 'findFirstOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find zero or more Users that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Users - * const users = await prisma.user.findMany() - * - * // Get first 10 Users - * const users = await prisma.user.findMany({ take: 10 }) - * - * // Only select the `id` - * const userWithIdOnly = await prisma.user.findMany({ select: { id: true } }) - * - */ - findMany( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany', GlobalOmitOptions>>; - - /** - * Create a User. - * @param {UserCreateArgs} args - Arguments to create a User. - * @example - * // Create one User - * const User = await prisma.user.create({ - * data: { - * // ... data to create a User - * } - * }) - * - */ - create( - args: SelectSubset> - ): Prisma__UserClient< - $Result.GetResult, T, 'create', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Create many Users. - * @param {UserCreateManyArgs} args - Arguments to create many Users. - * @example - * // Create many Users - * const user = await prisma.user.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Create many Users and returns the data saved in the database. - * @param {UserCreateManyAndReturnArgs} args - Arguments to create many Users. - * @example - * // Create many Users - * const user = await prisma.user.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Users and only return the `id` - * const userWithIdOnly = await prisma.user.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn( - args?: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'createManyAndReturn', GlobalOmitOptions> - >; - - /** - * Delete a User. - * @param {UserDeleteArgs} args - Arguments to delete one User. - * @example - * // Delete one User - * const User = await prisma.user.delete({ - * where: { - * // ... filter to delete one User - * } - * }) - * - */ - delete( - args: SelectSubset> - ): Prisma__UserClient< - $Result.GetResult, T, 'delete', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Update one User. - * @param {UserUpdateArgs} args - Arguments to update one User. - * @example - * // Update one User - * const user = await prisma.user.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update( - args: SelectSubset> - ): Prisma__UserClient< - $Result.GetResult, T, 'update', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Delete zero or more Users. - * @param {UserDeleteManyArgs} args - Arguments to filter Users to delete. - * @example - * // Delete a few Users - * const { count } = await prisma.user.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more Users. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Users - * const user = await prisma.user.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany( - args: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more Users and returns the data updated in the database. - * @param {UserUpdateManyAndReturnArgs} args - Arguments to update many Users. - * @example - * // Update many Users - * const user = await prisma.user.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more Users and only return the `id` - * const userWithIdOnly = await prisma.user.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn( - args: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'updateManyAndReturn', GlobalOmitOptions> - >; - - /** - * Create or update one User. - * @param {UserUpsertArgs} args - Arguments to update or create a User. - * @example - * // Update or create a User - * const user = await prisma.user.upsert({ - * create: { - * // ... data to create a User - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the User we want to update - * } - * }) - */ - upsert( - args: SelectSubset> - ): Prisma__UserClient< - $Result.GetResult, T, 'upsert', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Count the number of Users. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserCountArgs} args - Arguments to filter Users to count. - * @example - * // Count the number of Users - * const count = await prisma.user.count({ - * where: { - * // ... the filter for the Users we want to count - * } - * }) - **/ - count( - args?: Subset - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - >; - - /** - * Allows you to perform aggregations operations on a User. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate( - args: Subset - ): Prisma.PrismaPromise>; - - /** - * Group by User. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends UserGroupByArgs, - HasSelectOrTake extends Or>, Extends<'take', Keys>>, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: UserGroupByArgs['orderBy'] } - : { orderBy?: UserGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [Error, 'Field ', P, ` in "having" needs to be provided in "by"`]; - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields], - >( - args: SubsetIntersection & InputErrors - ): {} extends InputErrors ? GetUserGroupByPayload : Prisma.PrismaPromise; - /** - * Fields of the User model - */ - readonly fields: UserFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for User. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__UserClient< - T, - Null = never, - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - healthProfiles = {}>( - args?: Subset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'findMany', GlobalOmitOptions> | Null - >; - workouts = {}>( - args?: Subset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'findMany', GlobalOmitOptions> | Null - >; - meals = {}>( - args?: Subset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany', GlobalOmitOptions> | Null>; - mealItems = {}>( - args?: Subset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'findMany', GlobalOmitOptions> | Null - >; - progressLogs = {}>( - args?: Subset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'findMany', GlobalOmitOptions> | Null - >; - weightEntries = {}>( - args?: Subset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'findMany', GlobalOmitOptions> | Null - >; - waterIntake = {}>( - args?: Subset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'findMany', GlobalOmitOptions> | Null - >; - sleepEntries = {}>( - args?: Subset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'findMany', GlobalOmitOptions> | Null - >; - goals = {}>( - args?: Subset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany', GlobalOmitOptions> | Null>; - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then( - onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, - onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch( - onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; - } - - /** - * Fields of the User model - */ - interface UserFieldRefs { - readonly id: FieldRef<'User', 'String'>; - readonly clerkId: FieldRef<'User', 'String'>; - readonly name: FieldRef<'User', 'String'>; - readonly email: FieldRef<'User', 'String'>; - readonly createdAt: FieldRef<'User', 'DateTime'>; - readonly updatedAt: FieldRef<'User', 'DateTime'>; - } - - // Custom InputTypes - /** - * User findUnique - */ - export type UserFindUniqueArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null; - /** - * Omit specific fields from the User - */ - omit?: UserOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null; - /** - * Filter, which User to fetch. - */ - where: UserWhereUniqueInput; - }; - - /** - * User findUniqueOrThrow - */ - export type UserFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null; - /** - * Omit specific fields from the User - */ - omit?: UserOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null; - /** - * Filter, which User to fetch. - */ - where: UserWhereUniqueInput; - }; - - /** - * User findFirst - */ - export type UserFindFirstArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null; - /** - * Omit specific fields from the User - */ - omit?: UserOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null; - /** - * Filter, which User to fetch. - */ - where?: UserWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Users to fetch. - */ - orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Users. - */ - cursor?: UserWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Users from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Users. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Users. - */ - distinct?: UserScalarFieldEnum | UserScalarFieldEnum[]; - }; - - /** - * User findFirstOrThrow - */ - export type UserFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null; - /** - * Omit specific fields from the User - */ - omit?: UserOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null; - /** - * Filter, which User to fetch. - */ - where?: UserWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Users to fetch. - */ - orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Users. - */ - cursor?: UserWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Users from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Users. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Users. - */ - distinct?: UserScalarFieldEnum | UserScalarFieldEnum[]; - }; - - /** - * User findMany - */ - export type UserFindManyArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null; - /** - * Omit specific fields from the User - */ - omit?: UserOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null; - /** - * Filter, which Users to fetch. - */ - where?: UserWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Users to fetch. - */ - orderBy?: UserOrderByWithRelationInput | UserOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Users. - */ - cursor?: UserWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Users from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Users. - */ - skip?: number; - distinct?: UserScalarFieldEnum | UserScalarFieldEnum[]; - }; - - /** - * User create - */ - export type UserCreateArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null; - /** - * Omit specific fields from the User - */ - omit?: UserOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null; - /** - * The data needed to create a User. - */ - data: XOR; - }; - - /** - * User createMany - */ - export type UserCreateManyArgs = { - /** - * The data used to create many Users. - */ - data: UserCreateManyInput | UserCreateManyInput[]; - skipDuplicates?: boolean; - }; - - /** - * User createManyAndReturn - */ - export type UserCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelectCreateManyAndReturn | null; - /** - * Omit specific fields from the User - */ - omit?: UserOmit | null; - /** - * The data used to create many Users. - */ - data: UserCreateManyInput | UserCreateManyInput[]; - skipDuplicates?: boolean; - }; - - /** - * User update - */ - export type UserUpdateArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null; - /** - * Omit specific fields from the User - */ - omit?: UserOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null; - /** - * The data needed to update a User. - */ - data: XOR; - /** - * Choose, which User to update. - */ - where: UserWhereUniqueInput; - }; - - /** - * User updateMany - */ - export type UserUpdateManyArgs = { - /** - * The data used to update Users. - */ - data: XOR; - /** - * Filter which Users to update - */ - where?: UserWhereInput; - /** - * Limit how many Users to update. - */ - limit?: number; - }; - - /** - * User updateManyAndReturn - */ - export type UserUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelectUpdateManyAndReturn | null; - /** - * Omit specific fields from the User - */ - omit?: UserOmit | null; - /** - * The data used to update Users. - */ - data: XOR; - /** - * Filter which Users to update - */ - where?: UserWhereInput; - /** - * Limit how many Users to update. - */ - limit?: number; - }; - - /** - * User upsert - */ - export type UserUpsertArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null; - /** - * Omit specific fields from the User - */ - omit?: UserOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null; - /** - * The filter to search for the User to update in case it exists. - */ - where: UserWhereUniqueInput; - /** - * In case the User found by the `where` argument doesn't exist, create a new User with this data. - */ - create: XOR; - /** - * In case the User was found with the provided `where` argument, update it with this data. - */ - update: XOR; - }; - - /** - * User delete - */ - export type UserDeleteArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null; - /** - * Omit specific fields from the User - */ - omit?: UserOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null; - /** - * Filter which User to delete. - */ - where: UserWhereUniqueInput; - }; - - /** - * User deleteMany - */ - export type UserDeleteManyArgs = { - /** - * Filter which Users to delete - */ - where?: UserWhereInput; - /** - * Limit how many Users to delete. - */ - limit?: number; - }; - - /** - * User.healthProfiles - */ - export type User$healthProfilesArgs = { - /** - * Select specific fields to fetch from the HealthProfile - */ - select?: HealthProfileSelect | null; - /** - * Omit specific fields from the HealthProfile - */ - omit?: HealthProfileOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: HealthProfileInclude | null; - where?: HealthProfileWhereInput; - orderBy?: HealthProfileOrderByWithRelationInput | HealthProfileOrderByWithRelationInput[]; - cursor?: HealthProfileWhereUniqueInput; - take?: number; - skip?: number; - distinct?: HealthProfileScalarFieldEnum | HealthProfileScalarFieldEnum[]; - }; - - /** - * User.workouts - */ - export type User$workoutsArgs = { - /** - * Select specific fields to fetch from the Workout - */ - select?: WorkoutSelect | null; - /** - * Omit specific fields from the Workout - */ - omit?: WorkoutOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WorkoutInclude | null; - where?: WorkoutWhereInput; - orderBy?: WorkoutOrderByWithRelationInput | WorkoutOrderByWithRelationInput[]; - cursor?: WorkoutWhereUniqueInput; - take?: number; - skip?: number; - distinct?: WorkoutScalarFieldEnum | WorkoutScalarFieldEnum[]; - }; - - /** - * User.meals - */ - export type User$mealsArgs = { - /** - * Select specific fields to fetch from the Meal - */ - select?: MealSelect | null; - /** - * Omit specific fields from the Meal - */ - omit?: MealOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealInclude | null; - where?: MealWhereInput; - orderBy?: MealOrderByWithRelationInput | MealOrderByWithRelationInput[]; - cursor?: MealWhereUniqueInput; - take?: number; - skip?: number; - distinct?: MealScalarFieldEnum | MealScalarFieldEnum[]; - }; - - /** - * User.mealItems - */ - export type User$mealItemsArgs = { - /** - * Select specific fields to fetch from the MealItem - */ - select?: MealItemSelect | null; - /** - * Omit specific fields from the MealItem - */ - omit?: MealItemOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealItemInclude | null; - where?: MealItemWhereInput; - orderBy?: MealItemOrderByWithRelationInput | MealItemOrderByWithRelationInput[]; - cursor?: MealItemWhereUniqueInput; - take?: number; - skip?: number; - distinct?: MealItemScalarFieldEnum | MealItemScalarFieldEnum[]; - }; - - /** - * User.progressLogs - */ - export type User$progressLogsArgs = { - /** - * Select specific fields to fetch from the ProgressLog - */ - select?: ProgressLogSelect | null; - /** - * Omit specific fields from the ProgressLog - */ - omit?: ProgressLogOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ProgressLogInclude | null; - where?: ProgressLogWhereInput; - orderBy?: ProgressLogOrderByWithRelationInput | ProgressLogOrderByWithRelationInput[]; - cursor?: ProgressLogWhereUniqueInput; - take?: number; - skip?: number; - distinct?: ProgressLogScalarFieldEnum | ProgressLogScalarFieldEnum[]; - }; - - /** - * User.weightEntries - */ - export type User$weightEntriesArgs = { - /** - * Select specific fields to fetch from the WeightEntry - */ - select?: WeightEntrySelect | null; - /** - * Omit specific fields from the WeightEntry - */ - omit?: WeightEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WeightEntryInclude | null; - where?: WeightEntryWhereInput; - orderBy?: WeightEntryOrderByWithRelationInput | WeightEntryOrderByWithRelationInput[]; - cursor?: WeightEntryWhereUniqueInput; - take?: number; - skip?: number; - distinct?: WeightEntryScalarFieldEnum | WeightEntryScalarFieldEnum[]; - }; - - /** - * User.waterIntake - */ - export type User$waterIntakeArgs = { - /** - * Select specific fields to fetch from the WaterIntake - */ - select?: WaterIntakeSelect | null; - /** - * Omit specific fields from the WaterIntake - */ - omit?: WaterIntakeOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WaterIntakeInclude | null; - where?: WaterIntakeWhereInput; - orderBy?: WaterIntakeOrderByWithRelationInput | WaterIntakeOrderByWithRelationInput[]; - cursor?: WaterIntakeWhereUniqueInput; - take?: number; - skip?: number; - distinct?: WaterIntakeScalarFieldEnum | WaterIntakeScalarFieldEnum[]; - }; - - /** - * User.sleepEntries - */ - export type User$sleepEntriesArgs = { - /** - * Select specific fields to fetch from the SleepEntry - */ - select?: SleepEntrySelect | null; - /** - * Omit specific fields from the SleepEntry - */ - omit?: SleepEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: SleepEntryInclude | null; - where?: SleepEntryWhereInput; - orderBy?: SleepEntryOrderByWithRelationInput | SleepEntryOrderByWithRelationInput[]; - cursor?: SleepEntryWhereUniqueInput; - take?: number; - skip?: number; - distinct?: SleepEntryScalarFieldEnum | SleepEntryScalarFieldEnum[]; - }; - - /** - * User.goals - */ - export type User$goalsArgs = { - /** - * Select specific fields to fetch from the Goal - */ - select?: GoalSelect | null; - /** - * Omit specific fields from the Goal - */ - omit?: GoalOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: GoalInclude | null; - where?: GoalWhereInput; - orderBy?: GoalOrderByWithRelationInput | GoalOrderByWithRelationInput[]; - cursor?: GoalWhereUniqueInput; - take?: number; - skip?: number; - distinct?: GoalScalarFieldEnum | GoalScalarFieldEnum[]; - }; - - /** - * User without action - */ - export type UserDefaultArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: UserSelect | null; - /** - * Omit specific fields from the User - */ - omit?: UserOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: UserInclude | null; - }; - - /** - * Model HealthProfile - */ - - export type AggregateHealthProfile = { - _count: HealthProfileCountAggregateOutputType | null; - _avg: HealthProfileAvgAggregateOutputType | null; - _sum: HealthProfileSumAggregateOutputType | null; - _min: HealthProfileMinAggregateOutputType | null; - _max: HealthProfileMaxAggregateOutputType | null; - }; - - export type HealthProfileAvgAggregateOutputType = { - height: number | null; - weight: number | null; - age: number | null; - targetWeight: number | null; - targetCalories: number | null; - targetWaterL: number | null; - }; - - export type HealthProfileSumAggregateOutputType = { - height: number | null; - weight: number | null; - age: number | null; - targetWeight: number | null; - targetCalories: number | null; - targetWaterL: number | null; - }; - - export type HealthProfileMinAggregateOutputType = { - id: string | null; - userId: string | null; - height: number | null; - weight: number | null; - age: number | null; - gender: string | null; - birthday: Date | null; - targetWeight: number | null; - targetCalories: number | null; - targetWaterL: number | null; - activityLevel: string | null; - fitnessGoal: string | null; - heightUnit: string | null; - weightUnit: string | null; - createdAt: Date | null; - updatedAt: Date | null; - syncedAt: Date | null; - isDeleted: boolean | null; - }; - - export type HealthProfileMaxAggregateOutputType = { - id: string | null; - userId: string | null; - height: number | null; - weight: number | null; - age: number | null; - gender: string | null; - birthday: Date | null; - targetWeight: number | null; - targetCalories: number | null; - targetWaterL: number | null; - activityLevel: string | null; - fitnessGoal: string | null; - heightUnit: string | null; - weightUnit: string | null; - createdAt: Date | null; - updatedAt: Date | null; - syncedAt: Date | null; - isDeleted: boolean | null; - }; - - export type HealthProfileCountAggregateOutputType = { - id: number; - userId: number; - height: number; - weight: number; - age: number; - gender: number; - birthday: number; - targetWeight: number; - targetCalories: number; - targetWaterL: number; - activityLevel: number; - fitnessGoal: number; - heightUnit: number; - weightUnit: number; - createdAt: number; - updatedAt: number; - syncedAt: number; - isDeleted: number; - _all: number; - }; - - export type HealthProfileAvgAggregateInputType = { - height?: true; - weight?: true; - age?: true; - targetWeight?: true; - targetCalories?: true; - targetWaterL?: true; - }; - - export type HealthProfileSumAggregateInputType = { - height?: true; - weight?: true; - age?: true; - targetWeight?: true; - targetCalories?: true; - targetWaterL?: true; - }; - - export type HealthProfileMinAggregateInputType = { - id?: true; - userId?: true; - height?: true; - weight?: true; - age?: true; - gender?: true; - birthday?: true; - targetWeight?: true; - targetCalories?: true; - targetWaterL?: true; - activityLevel?: true; - fitnessGoal?: true; - heightUnit?: true; - weightUnit?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - }; - - export type HealthProfileMaxAggregateInputType = { - id?: true; - userId?: true; - height?: true; - weight?: true; - age?: true; - gender?: true; - birthday?: true; - targetWeight?: true; - targetCalories?: true; - targetWaterL?: true; - activityLevel?: true; - fitnessGoal?: true; - heightUnit?: true; - weightUnit?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - }; - - export type HealthProfileCountAggregateInputType = { - id?: true; - userId?: true; - height?: true; - weight?: true; - age?: true; - gender?: true; - birthday?: true; - targetWeight?: true; - targetCalories?: true; - targetWaterL?: true; - activityLevel?: true; - fitnessGoal?: true; - heightUnit?: true; - weightUnit?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - _all?: true; - }; - - export type HealthProfileAggregateArgs = { - /** - * Filter which HealthProfile to aggregate. - */ - where?: HealthProfileWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of HealthProfiles to fetch. - */ - orderBy?: HealthProfileOrderByWithRelationInput | HealthProfileOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: HealthProfileWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` HealthProfiles from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` HealthProfiles. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned HealthProfiles - **/ - _count?: true | HealthProfileCountAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: HealthProfileAvgAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: HealthProfileSumAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: HealthProfileMinAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: HealthProfileMaxAggregateInputType; - }; - - export type GetHealthProfileAggregateType = { - [P in keyof T & keyof AggregateHealthProfile]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType; - }; - - export type HealthProfileGroupByArgs = { - where?: HealthProfileWhereInput; - orderBy?: HealthProfileOrderByWithAggregationInput | HealthProfileOrderByWithAggregationInput[]; - by: HealthProfileScalarFieldEnum[] | HealthProfileScalarFieldEnum; - having?: HealthProfileScalarWhereWithAggregatesInput; - take?: number; - skip?: number; - _count?: HealthProfileCountAggregateInputType | true; - _avg?: HealthProfileAvgAggregateInputType; - _sum?: HealthProfileSumAggregateInputType; - _min?: HealthProfileMinAggregateInputType; - _max?: HealthProfileMaxAggregateInputType; - }; - - export type HealthProfileGroupByOutputType = { - id: string; - userId: string; - height: number | null; - weight: number | null; - age: number | null; - gender: string | null; - birthday: Date | null; - targetWeight: number | null; - targetCalories: number | null; - targetWaterL: number | null; - activityLevel: string | null; - fitnessGoal: string | null; - heightUnit: string | null; - weightUnit: string | null; - createdAt: Date; - updatedAt: Date; - syncedAt: Date | null; - isDeleted: boolean; - _count: HealthProfileCountAggregateOutputType | null; - _avg: HealthProfileAvgAggregateOutputType | null; - _sum: HealthProfileSumAggregateOutputType | null; - _min: HealthProfileMinAggregateOutputType | null; - _max: HealthProfileMaxAggregateOutputType | null; - }; - - type GetHealthProfileGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & { - [P in keyof T & keyof HealthProfileGroupByOutputType]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType; - } - > - >; - - export type HealthProfileSelect = - $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - height?: boolean; - weight?: boolean; - age?: boolean; - gender?: boolean; - birthday?: boolean; - targetWeight?: boolean; - targetCalories?: boolean; - targetWaterL?: boolean; - activityLevel?: boolean; - fitnessGoal?: boolean; - heightUnit?: boolean; - weightUnit?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['healthProfile'] - >; - - export type HealthProfileSelectCreateManyAndReturn< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - > = $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - height?: boolean; - weight?: boolean; - age?: boolean; - gender?: boolean; - birthday?: boolean; - targetWeight?: boolean; - targetCalories?: boolean; - targetWaterL?: boolean; - activityLevel?: boolean; - fitnessGoal?: boolean; - heightUnit?: boolean; - weightUnit?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['healthProfile'] - >; - - export type HealthProfileSelectUpdateManyAndReturn< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - > = $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - height?: boolean; - weight?: boolean; - age?: boolean; - gender?: boolean; - birthday?: boolean; - targetWeight?: boolean; - targetCalories?: boolean; - targetWaterL?: boolean; - activityLevel?: boolean; - fitnessGoal?: boolean; - heightUnit?: boolean; - weightUnit?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['healthProfile'] - >; - - export type HealthProfileSelectScalar = { - id?: boolean; - userId?: boolean; - height?: boolean; - weight?: boolean; - age?: boolean; - gender?: boolean; - birthday?: boolean; - targetWeight?: boolean; - targetCalories?: boolean; - targetWaterL?: boolean; - activityLevel?: boolean; - fitnessGoal?: boolean; - heightUnit?: boolean; - weightUnit?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - }; - - export type HealthProfileOmit = - $Extensions.GetOmit< - | 'id' - | 'userId' - | 'height' - | 'weight' - | 'age' - | 'gender' - | 'birthday' - | 'targetWeight' - | 'targetCalories' - | 'targetWaterL' - | 'activityLevel' - | 'fitnessGoal' - | 'heightUnit' - | 'weightUnit' - | 'createdAt' - | 'updatedAt' - | 'syncedAt' - | 'isDeleted', - ExtArgs['result']['healthProfile'] - >; - export type HealthProfileInclude = { - user?: boolean | UserDefaultArgs; - }; - export type HealthProfileIncludeCreateManyAndReturn< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - > = { - user?: boolean | UserDefaultArgs; - }; - export type HealthProfileIncludeUpdateManyAndReturn< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - > = { - user?: boolean | UserDefaultArgs; - }; - - export type $HealthProfilePayload = { - name: 'HealthProfile'; - objects: { - user: Prisma.$UserPayload; - }; - scalars: $Extensions.GetPayloadResult< - { - id: string; - userId: string; - height: number | null; - weight: number | null; - age: number | null; - gender: string | null; - birthday: Date | null; - targetWeight: number | null; - targetCalories: number | null; - targetWaterL: number | null; - activityLevel: string | null; - fitnessGoal: string | null; - heightUnit: string | null; - weightUnit: string | null; - createdAt: Date; - updatedAt: Date; - syncedAt: Date | null; - isDeleted: boolean; - }, - ExtArgs['result']['healthProfile'] - >; - composites: {}; - }; - - type HealthProfileGetPayload = $Result.GetResult< - Prisma.$HealthProfilePayload, - S - >; - - type HealthProfileCountArgs = Omit< - HealthProfileFindManyArgs, - 'select' | 'include' | 'distinct' | 'omit' - > & { - select?: HealthProfileCountAggregateInputType | true; - }; - - export interface HealthProfileDelegate< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > { - [K: symbol]: { types: Prisma.TypeMap['model']['HealthProfile']; meta: { name: 'HealthProfile' } }; - /** - * Find zero or one HealthProfile that matches the filter. - * @param {HealthProfileFindUniqueArgs} args - Arguments to find a HealthProfile - * @example - * // Get one HealthProfile - * const healthProfile = await prisma.healthProfile.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique( - args: SelectSubset> - ): Prisma__HealthProfileClient< - $Result.GetResult, T, 'findUnique', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find one HealthProfile that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {HealthProfileFindUniqueOrThrowArgs} args - Arguments to find a HealthProfile - * @example - * // Get one HealthProfile - * const healthProfile = await prisma.healthProfile.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow( - args: SelectSubset> - ): Prisma__HealthProfileClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first HealthProfile that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {HealthProfileFindFirstArgs} args - Arguments to find a HealthProfile - * @example - * // Get one HealthProfile - * const healthProfile = await prisma.healthProfile.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst( - args?: SelectSubset> - ): Prisma__HealthProfileClient< - $Result.GetResult, T, 'findFirst', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first HealthProfile that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {HealthProfileFindFirstOrThrowArgs} args - Arguments to find a HealthProfile - * @example - * // Get one HealthProfile - * const healthProfile = await prisma.healthProfile.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow( - args?: SelectSubset> - ): Prisma__HealthProfileClient< - $Result.GetResult, T, 'findFirstOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find zero or more HealthProfiles that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {HealthProfileFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all HealthProfiles - * const healthProfiles = await prisma.healthProfile.findMany() - * - * // Get first 10 HealthProfiles - * const healthProfiles = await prisma.healthProfile.findMany({ take: 10 }) - * - * // Only select the `id` - * const healthProfileWithIdOnly = await prisma.healthProfile.findMany({ select: { id: true } }) - * - */ - findMany( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany', GlobalOmitOptions>>; - - /** - * Create a HealthProfile. - * @param {HealthProfileCreateArgs} args - Arguments to create a HealthProfile. - * @example - * // Create one HealthProfile - * const HealthProfile = await prisma.healthProfile.create({ - * data: { - * // ... data to create a HealthProfile - * } - * }) - * - */ - create( - args: SelectSubset> - ): Prisma__HealthProfileClient< - $Result.GetResult, T, 'create', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Create many HealthProfiles. - * @param {HealthProfileCreateManyArgs} args - Arguments to create many HealthProfiles. - * @example - * // Create many HealthProfiles - * const healthProfile = await prisma.healthProfile.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Create many HealthProfiles and returns the data saved in the database. - * @param {HealthProfileCreateManyAndReturnArgs} args - Arguments to create many HealthProfiles. - * @example - * // Create many HealthProfiles - * const healthProfile = await prisma.healthProfile.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many HealthProfiles and only return the `id` - * const healthProfileWithIdOnly = await prisma.healthProfile.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn( - args?: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'createManyAndReturn', GlobalOmitOptions> - >; - - /** - * Delete a HealthProfile. - * @param {HealthProfileDeleteArgs} args - Arguments to delete one HealthProfile. - * @example - * // Delete one HealthProfile - * const HealthProfile = await prisma.healthProfile.delete({ - * where: { - * // ... filter to delete one HealthProfile - * } - * }) - * - */ - delete( - args: SelectSubset> - ): Prisma__HealthProfileClient< - $Result.GetResult, T, 'delete', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Update one HealthProfile. - * @param {HealthProfileUpdateArgs} args - Arguments to update one HealthProfile. - * @example - * // Update one HealthProfile - * const healthProfile = await prisma.healthProfile.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update( - args: SelectSubset> - ): Prisma__HealthProfileClient< - $Result.GetResult, T, 'update', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Delete zero or more HealthProfiles. - * @param {HealthProfileDeleteManyArgs} args - Arguments to filter HealthProfiles to delete. - * @example - * // Delete a few HealthProfiles - * const { count } = await prisma.healthProfile.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more HealthProfiles. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {HealthProfileUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many HealthProfiles - * const healthProfile = await prisma.healthProfile.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany( - args: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more HealthProfiles and returns the data updated in the database. - * @param {HealthProfileUpdateManyAndReturnArgs} args - Arguments to update many HealthProfiles. - * @example - * // Update many HealthProfiles - * const healthProfile = await prisma.healthProfile.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more HealthProfiles and only return the `id` - * const healthProfileWithIdOnly = await prisma.healthProfile.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn( - args: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'updateManyAndReturn', GlobalOmitOptions> - >; - - /** - * Create or update one HealthProfile. - * @param {HealthProfileUpsertArgs} args - Arguments to update or create a HealthProfile. - * @example - * // Update or create a HealthProfile - * const healthProfile = await prisma.healthProfile.upsert({ - * create: { - * // ... data to create a HealthProfile - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the HealthProfile we want to update - * } - * }) - */ - upsert( - args: SelectSubset> - ): Prisma__HealthProfileClient< - $Result.GetResult, T, 'upsert', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Count the number of HealthProfiles. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {HealthProfileCountArgs} args - Arguments to filter HealthProfiles to count. - * @example - * // Count the number of HealthProfiles - * const count = await prisma.healthProfile.count({ - * where: { - * // ... the filter for the HealthProfiles we want to count - * } - * }) - **/ - count( - args?: Subset - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - >; - - /** - * Allows you to perform aggregations operations on a HealthProfile. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {HealthProfileAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate( - args: Subset - ): Prisma.PrismaPromise>; - - /** - * Group by HealthProfile. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {HealthProfileGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends HealthProfileGroupByArgs, - HasSelectOrTake extends Or>, Extends<'take', Keys>>, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: HealthProfileGroupByArgs['orderBy'] } - : { orderBy?: HealthProfileGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [Error, 'Field ', P, ` in "having" needs to be provided in "by"`]; - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields], - >( - args: SubsetIntersection & InputErrors - ): {} extends InputErrors ? GetHealthProfileGroupByPayload : Prisma.PrismaPromise; - /** - * Fields of the HealthProfile model - */ - readonly fields: HealthProfileFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for HealthProfile. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__HealthProfileClient< - T, - Null = never, - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - user = {}>( - args?: Subset> - ): Prisma__UserClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions> | Null, - Null, - ExtArgs, - GlobalOmitOptions - >; - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then( - onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, - onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch( - onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; - } - - /** - * Fields of the HealthProfile model - */ - interface HealthProfileFieldRefs { - readonly id: FieldRef<'HealthProfile', 'String'>; - readonly userId: FieldRef<'HealthProfile', 'String'>; - readonly height: FieldRef<'HealthProfile', 'Float'>; - readonly weight: FieldRef<'HealthProfile', 'Float'>; - readonly age: FieldRef<'HealthProfile', 'Int'>; - readonly gender: FieldRef<'HealthProfile', 'String'>; - readonly birthday: FieldRef<'HealthProfile', 'DateTime'>; - readonly targetWeight: FieldRef<'HealthProfile', 'Float'>; - readonly targetCalories: FieldRef<'HealthProfile', 'Int'>; - readonly targetWaterL: FieldRef<'HealthProfile', 'Float'>; - readonly activityLevel: FieldRef<'HealthProfile', 'String'>; - readonly fitnessGoal: FieldRef<'HealthProfile', 'String'>; - readonly heightUnit: FieldRef<'HealthProfile', 'String'>; - readonly weightUnit: FieldRef<'HealthProfile', 'String'>; - readonly createdAt: FieldRef<'HealthProfile', 'DateTime'>; - readonly updatedAt: FieldRef<'HealthProfile', 'DateTime'>; - readonly syncedAt: FieldRef<'HealthProfile', 'DateTime'>; - readonly isDeleted: FieldRef<'HealthProfile', 'Boolean'>; - } - - // Custom InputTypes - /** - * HealthProfile findUnique - */ - export type HealthProfileFindUniqueArgs = { - /** - * Select specific fields to fetch from the HealthProfile - */ - select?: HealthProfileSelect | null; - /** - * Omit specific fields from the HealthProfile - */ - omit?: HealthProfileOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: HealthProfileInclude | null; - /** - * Filter, which HealthProfile to fetch. - */ - where: HealthProfileWhereUniqueInput; - }; - - /** - * HealthProfile findUniqueOrThrow - */ - export type HealthProfileFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the HealthProfile - */ - select?: HealthProfileSelect | null; - /** - * Omit specific fields from the HealthProfile - */ - omit?: HealthProfileOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: HealthProfileInclude | null; - /** - * Filter, which HealthProfile to fetch. - */ - where: HealthProfileWhereUniqueInput; - }; - - /** - * HealthProfile findFirst - */ - export type HealthProfileFindFirstArgs = { - /** - * Select specific fields to fetch from the HealthProfile - */ - select?: HealthProfileSelect | null; - /** - * Omit specific fields from the HealthProfile - */ - omit?: HealthProfileOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: HealthProfileInclude | null; - /** - * Filter, which HealthProfile to fetch. - */ - where?: HealthProfileWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of HealthProfiles to fetch. - */ - orderBy?: HealthProfileOrderByWithRelationInput | HealthProfileOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for HealthProfiles. - */ - cursor?: HealthProfileWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` HealthProfiles from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` HealthProfiles. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of HealthProfiles. - */ - distinct?: HealthProfileScalarFieldEnum | HealthProfileScalarFieldEnum[]; - }; - - /** - * HealthProfile findFirstOrThrow - */ - export type HealthProfileFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the HealthProfile - */ - select?: HealthProfileSelect | null; - /** - * Omit specific fields from the HealthProfile - */ - omit?: HealthProfileOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: HealthProfileInclude | null; - /** - * Filter, which HealthProfile to fetch. - */ - where?: HealthProfileWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of HealthProfiles to fetch. - */ - orderBy?: HealthProfileOrderByWithRelationInput | HealthProfileOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for HealthProfiles. - */ - cursor?: HealthProfileWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` HealthProfiles from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` HealthProfiles. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of HealthProfiles. - */ - distinct?: HealthProfileScalarFieldEnum | HealthProfileScalarFieldEnum[]; - }; - - /** - * HealthProfile findMany - */ - export type HealthProfileFindManyArgs = { - /** - * Select specific fields to fetch from the HealthProfile - */ - select?: HealthProfileSelect | null; - /** - * Omit specific fields from the HealthProfile - */ - omit?: HealthProfileOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: HealthProfileInclude | null; - /** - * Filter, which HealthProfiles to fetch. - */ - where?: HealthProfileWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of HealthProfiles to fetch. - */ - orderBy?: HealthProfileOrderByWithRelationInput | HealthProfileOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing HealthProfiles. - */ - cursor?: HealthProfileWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` HealthProfiles from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` HealthProfiles. - */ - skip?: number; - distinct?: HealthProfileScalarFieldEnum | HealthProfileScalarFieldEnum[]; - }; - - /** - * HealthProfile create - */ - export type HealthProfileCreateArgs = { - /** - * Select specific fields to fetch from the HealthProfile - */ - select?: HealthProfileSelect | null; - /** - * Omit specific fields from the HealthProfile - */ - omit?: HealthProfileOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: HealthProfileInclude | null; - /** - * The data needed to create a HealthProfile. - */ - data: XOR; - }; - - /** - * HealthProfile createMany - */ - export type HealthProfileCreateManyArgs = { - /** - * The data used to create many HealthProfiles. - */ - data: HealthProfileCreateManyInput | HealthProfileCreateManyInput[]; - skipDuplicates?: boolean; - }; - - /** - * HealthProfile createManyAndReturn - */ - export type HealthProfileCreateManyAndReturnArgs = - { - /** - * Select specific fields to fetch from the HealthProfile - */ - select?: HealthProfileSelectCreateManyAndReturn | null; - /** - * Omit specific fields from the HealthProfile - */ - omit?: HealthProfileOmit | null; - /** - * The data used to create many HealthProfiles. - */ - data: HealthProfileCreateManyInput | HealthProfileCreateManyInput[]; - skipDuplicates?: boolean; - /** - * Choose, which related nodes to fetch as well - */ - include?: HealthProfileIncludeCreateManyAndReturn | null; - }; - - /** - * HealthProfile update - */ - export type HealthProfileUpdateArgs = { - /** - * Select specific fields to fetch from the HealthProfile - */ - select?: HealthProfileSelect | null; - /** - * Omit specific fields from the HealthProfile - */ - omit?: HealthProfileOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: HealthProfileInclude | null; - /** - * The data needed to update a HealthProfile. - */ - data: XOR; - /** - * Choose, which HealthProfile to update. - */ - where: HealthProfileWhereUniqueInput; - }; - - /** - * HealthProfile updateMany - */ - export type HealthProfileUpdateManyArgs = { - /** - * The data used to update HealthProfiles. - */ - data: XOR; - /** - * Filter which HealthProfiles to update - */ - where?: HealthProfileWhereInput; - /** - * Limit how many HealthProfiles to update. - */ - limit?: number; - }; - - /** - * HealthProfile updateManyAndReturn - */ - export type HealthProfileUpdateManyAndReturnArgs = - { - /** - * Select specific fields to fetch from the HealthProfile - */ - select?: HealthProfileSelectUpdateManyAndReturn | null; - /** - * Omit specific fields from the HealthProfile - */ - omit?: HealthProfileOmit | null; - /** - * The data used to update HealthProfiles. - */ - data: XOR; - /** - * Filter which HealthProfiles to update - */ - where?: HealthProfileWhereInput; - /** - * Limit how many HealthProfiles to update. - */ - limit?: number; - /** - * Choose, which related nodes to fetch as well - */ - include?: HealthProfileIncludeUpdateManyAndReturn | null; - }; - - /** - * HealthProfile upsert - */ - export type HealthProfileUpsertArgs = { - /** - * Select specific fields to fetch from the HealthProfile - */ - select?: HealthProfileSelect | null; - /** - * Omit specific fields from the HealthProfile - */ - omit?: HealthProfileOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: HealthProfileInclude | null; - /** - * The filter to search for the HealthProfile to update in case it exists. - */ - where: HealthProfileWhereUniqueInput; - /** - * In case the HealthProfile found by the `where` argument doesn't exist, create a new HealthProfile with this data. - */ - create: XOR; - /** - * In case the HealthProfile was found with the provided `where` argument, update it with this data. - */ - update: XOR; - }; - - /** - * HealthProfile delete - */ - export type HealthProfileDeleteArgs = { - /** - * Select specific fields to fetch from the HealthProfile - */ - select?: HealthProfileSelect | null; - /** - * Omit specific fields from the HealthProfile - */ - omit?: HealthProfileOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: HealthProfileInclude | null; - /** - * Filter which HealthProfile to delete. - */ - where: HealthProfileWhereUniqueInput; - }; - - /** - * HealthProfile deleteMany - */ - export type HealthProfileDeleteManyArgs = { - /** - * Filter which HealthProfiles to delete - */ - where?: HealthProfileWhereInput; - /** - * Limit how many HealthProfiles to delete. - */ - limit?: number; - }; - - /** - * HealthProfile without action - */ - export type HealthProfileDefaultArgs = { - /** - * Select specific fields to fetch from the HealthProfile - */ - select?: HealthProfileSelect | null; - /** - * Omit specific fields from the HealthProfile - */ - omit?: HealthProfileOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: HealthProfileInclude | null; - }; - - /** - * Model Workout - */ - - export type AggregateWorkout = { - _count: WorkoutCountAggregateOutputType | null; - _avg: WorkoutAvgAggregateOutputType | null; - _sum: WorkoutSumAggregateOutputType | null; - _min: WorkoutMinAggregateOutputType | null; - _max: WorkoutMaxAggregateOutputType | null; - }; - - export type WorkoutAvgAggregateOutputType = { - durationMin: number | null; - calories: number | null; - totalTime: number | null; - restTime: number | null; - }; - - export type WorkoutSumAggregateOutputType = { - durationMin: number | null; - calories: number | null; - totalTime: number | null; - restTime: number | null; - }; - - export type WorkoutMinAggregateOutputType = { - id: string | null; - userId: string | null; - title: string | null; - category: string | null; - durationMin: number | null; - calories: number | null; - date: Date | null; - notes: string | null; - isCompleted: boolean | null; - totalTime: number | null; - restTime: number | null; - createdAt: Date | null; - updatedAt: Date | null; - syncedAt: Date | null; - isDeleted: boolean | null; - }; - - export type WorkoutMaxAggregateOutputType = { - id: string | null; - userId: string | null; - title: string | null; - category: string | null; - durationMin: number | null; - calories: number | null; - date: Date | null; - notes: string | null; - isCompleted: boolean | null; - totalTime: number | null; - restTime: number | null; - createdAt: Date | null; - updatedAt: Date | null; - syncedAt: Date | null; - isDeleted: boolean | null; - }; - - export type WorkoutCountAggregateOutputType = { - id: number; - userId: number; - title: number; - category: number; - durationMin: number; - calories: number; - date: number; - notes: number; - isCompleted: number; - totalTime: number; - restTime: number; - createdAt: number; - updatedAt: number; - syncedAt: number; - isDeleted: number; - _all: number; - }; - - export type WorkoutAvgAggregateInputType = { - durationMin?: true; - calories?: true; - totalTime?: true; - restTime?: true; - }; - - export type WorkoutSumAggregateInputType = { - durationMin?: true; - calories?: true; - totalTime?: true; - restTime?: true; - }; - - export type WorkoutMinAggregateInputType = { - id?: true; - userId?: true; - title?: true; - category?: true; - durationMin?: true; - calories?: true; - date?: true; - notes?: true; - isCompleted?: true; - totalTime?: true; - restTime?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - }; - - export type WorkoutMaxAggregateInputType = { - id?: true; - userId?: true; - title?: true; - category?: true; - durationMin?: true; - calories?: true; - date?: true; - notes?: true; - isCompleted?: true; - totalTime?: true; - restTime?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - }; - - export type WorkoutCountAggregateInputType = { - id?: true; - userId?: true; - title?: true; - category?: true; - durationMin?: true; - calories?: true; - date?: true; - notes?: true; - isCompleted?: true; - totalTime?: true; - restTime?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - _all?: true; - }; - - export type WorkoutAggregateArgs = { - /** - * Filter which Workout to aggregate. - */ - where?: WorkoutWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Workouts to fetch. - */ - orderBy?: WorkoutOrderByWithRelationInput | WorkoutOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: WorkoutWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Workouts from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Workouts. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Workouts - **/ - _count?: true | WorkoutCountAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: WorkoutAvgAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: WorkoutSumAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: WorkoutMinAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: WorkoutMaxAggregateInputType; - }; - - export type GetWorkoutAggregateType = { - [P in keyof T & keyof AggregateWorkout]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType; - }; - - export type WorkoutGroupByArgs = { - where?: WorkoutWhereInput; - orderBy?: WorkoutOrderByWithAggregationInput | WorkoutOrderByWithAggregationInput[]; - by: WorkoutScalarFieldEnum[] | WorkoutScalarFieldEnum; - having?: WorkoutScalarWhereWithAggregatesInput; - take?: number; - skip?: number; - _count?: WorkoutCountAggregateInputType | true; - _avg?: WorkoutAvgAggregateInputType; - _sum?: WorkoutSumAggregateInputType; - _min?: WorkoutMinAggregateInputType; - _max?: WorkoutMaxAggregateInputType; - }; - - export type WorkoutGroupByOutputType = { - id: string; - userId: string; - title: string; - category: string; - durationMin: number | null; - calories: number | null; - date: Date; - notes: string | null; - isCompleted: boolean; - totalTime: number | null; - restTime: number | null; - createdAt: Date; - updatedAt: Date; - syncedAt: Date | null; - isDeleted: boolean; - _count: WorkoutCountAggregateOutputType | null; - _avg: WorkoutAvgAggregateOutputType | null; - _sum: WorkoutSumAggregateOutputType | null; - _min: WorkoutMinAggregateOutputType | null; - _max: WorkoutMaxAggregateOutputType | null; - }; - - type GetWorkoutGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & { - [P in keyof T & keyof WorkoutGroupByOutputType]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType; - } - > - >; - - export type WorkoutSelect = $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - title?: boolean; - category?: boolean; - durationMin?: boolean; - calories?: boolean; - date?: boolean; - notes?: boolean; - isCompleted?: boolean; - totalTime?: boolean; - restTime?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - exercises?: boolean | Workout$exercisesArgs; - _count?: boolean | WorkoutCountOutputTypeDefaultArgs; - }, - ExtArgs['result']['workout'] - >; - - export type WorkoutSelectCreateManyAndReturn = - $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - title?: boolean; - category?: boolean; - durationMin?: boolean; - calories?: boolean; - date?: boolean; - notes?: boolean; - isCompleted?: boolean; - totalTime?: boolean; - restTime?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['workout'] - >; - - export type WorkoutSelectUpdateManyAndReturn = - $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - title?: boolean; - category?: boolean; - durationMin?: boolean; - calories?: boolean; - date?: boolean; - notes?: boolean; - isCompleted?: boolean; - totalTime?: boolean; - restTime?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['workout'] - >; - - export type WorkoutSelectScalar = { - id?: boolean; - userId?: boolean; - title?: boolean; - category?: boolean; - durationMin?: boolean; - calories?: boolean; - date?: boolean; - notes?: boolean; - isCompleted?: boolean; - totalTime?: boolean; - restTime?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - }; - - export type WorkoutOmit = $Extensions.GetOmit< - | 'id' - | 'userId' - | 'title' - | 'category' - | 'durationMin' - | 'calories' - | 'date' - | 'notes' - | 'isCompleted' - | 'totalTime' - | 'restTime' - | 'createdAt' - | 'updatedAt' - | 'syncedAt' - | 'isDeleted', - ExtArgs['result']['workout'] - >; - export type WorkoutInclude = { - user?: boolean | UserDefaultArgs; - exercises?: boolean | Workout$exercisesArgs; - _count?: boolean | WorkoutCountOutputTypeDefaultArgs; - }; - export type WorkoutIncludeCreateManyAndReturn = { - user?: boolean | UserDefaultArgs; - }; - export type WorkoutIncludeUpdateManyAndReturn = { - user?: boolean | UserDefaultArgs; - }; - - export type $WorkoutPayload = { - name: 'Workout'; - objects: { - user: Prisma.$UserPayload; - exercises: Prisma.$ExercisePayload[]; - }; - scalars: $Extensions.GetPayloadResult< - { - id: string; - userId: string; - title: string; - category: string; - durationMin: number | null; - calories: number | null; - date: Date; - notes: string | null; - isCompleted: boolean; - totalTime: number | null; - restTime: number | null; - createdAt: Date; - updatedAt: Date; - syncedAt: Date | null; - isDeleted: boolean; - }, - ExtArgs['result']['workout'] - >; - composites: {}; - }; - - type WorkoutGetPayload = $Result.GetResult< - Prisma.$WorkoutPayload, - S - >; - - type WorkoutCountArgs = Omit< - WorkoutFindManyArgs, - 'select' | 'include' | 'distinct' | 'omit' - > & { - select?: WorkoutCountAggregateInputType | true; - }; - - export interface WorkoutDelegate< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > { - [K: symbol]: { types: Prisma.TypeMap['model']['Workout']; meta: { name: 'Workout' } }; - /** - * Find zero or one Workout that matches the filter. - * @param {WorkoutFindUniqueArgs} args - Arguments to find a Workout - * @example - * // Get one Workout - * const workout = await prisma.workout.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique( - args: SelectSubset> - ): Prisma__WorkoutClient< - $Result.GetResult, T, 'findUnique', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find one Workout that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {WorkoutFindUniqueOrThrowArgs} args - Arguments to find a Workout - * @example - * // Get one Workout - * const workout = await prisma.workout.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow( - args: SelectSubset> - ): Prisma__WorkoutClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first Workout that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WorkoutFindFirstArgs} args - Arguments to find a Workout - * @example - * // Get one Workout - * const workout = await prisma.workout.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst( - args?: SelectSubset> - ): Prisma__WorkoutClient< - $Result.GetResult, T, 'findFirst', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first Workout that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WorkoutFindFirstOrThrowArgs} args - Arguments to find a Workout - * @example - * // Get one Workout - * const workout = await prisma.workout.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow( - args?: SelectSubset> - ): Prisma__WorkoutClient< - $Result.GetResult, T, 'findFirstOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find zero or more Workouts that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WorkoutFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Workouts - * const workouts = await prisma.workout.findMany() - * - * // Get first 10 Workouts - * const workouts = await prisma.workout.findMany({ take: 10 }) - * - * // Only select the `id` - * const workoutWithIdOnly = await prisma.workout.findMany({ select: { id: true } }) - * - */ - findMany( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany', GlobalOmitOptions>>; - - /** - * Create a Workout. - * @param {WorkoutCreateArgs} args - Arguments to create a Workout. - * @example - * // Create one Workout - * const Workout = await prisma.workout.create({ - * data: { - * // ... data to create a Workout - * } - * }) - * - */ - create( - args: SelectSubset> - ): Prisma__WorkoutClient< - $Result.GetResult, T, 'create', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Create many Workouts. - * @param {WorkoutCreateManyArgs} args - Arguments to create many Workouts. - * @example - * // Create many Workouts - * const workout = await prisma.workout.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Create many Workouts and returns the data saved in the database. - * @param {WorkoutCreateManyAndReturnArgs} args - Arguments to create many Workouts. - * @example - * // Create many Workouts - * const workout = await prisma.workout.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Workouts and only return the `id` - * const workoutWithIdOnly = await prisma.workout.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn( - args?: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'createManyAndReturn', GlobalOmitOptions> - >; - - /** - * Delete a Workout. - * @param {WorkoutDeleteArgs} args - Arguments to delete one Workout. - * @example - * // Delete one Workout - * const Workout = await prisma.workout.delete({ - * where: { - * // ... filter to delete one Workout - * } - * }) - * - */ - delete( - args: SelectSubset> - ): Prisma__WorkoutClient< - $Result.GetResult, T, 'delete', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Update one Workout. - * @param {WorkoutUpdateArgs} args - Arguments to update one Workout. - * @example - * // Update one Workout - * const workout = await prisma.workout.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update( - args: SelectSubset> - ): Prisma__WorkoutClient< - $Result.GetResult, T, 'update', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Delete zero or more Workouts. - * @param {WorkoutDeleteManyArgs} args - Arguments to filter Workouts to delete. - * @example - * // Delete a few Workouts - * const { count } = await prisma.workout.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more Workouts. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WorkoutUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Workouts - * const workout = await prisma.workout.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany( - args: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more Workouts and returns the data updated in the database. - * @param {WorkoutUpdateManyAndReturnArgs} args - Arguments to update many Workouts. - * @example - * // Update many Workouts - * const workout = await prisma.workout.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more Workouts and only return the `id` - * const workoutWithIdOnly = await prisma.workout.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn( - args: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'updateManyAndReturn', GlobalOmitOptions> - >; - - /** - * Create or update one Workout. - * @param {WorkoutUpsertArgs} args - Arguments to update or create a Workout. - * @example - * // Update or create a Workout - * const workout = await prisma.workout.upsert({ - * create: { - * // ... data to create a Workout - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Workout we want to update - * } - * }) - */ - upsert( - args: SelectSubset> - ): Prisma__WorkoutClient< - $Result.GetResult, T, 'upsert', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Count the number of Workouts. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WorkoutCountArgs} args - Arguments to filter Workouts to count. - * @example - * // Count the number of Workouts - * const count = await prisma.workout.count({ - * where: { - * // ... the filter for the Workouts we want to count - * } - * }) - **/ - count( - args?: Subset - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - >; - - /** - * Allows you to perform aggregations operations on a Workout. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WorkoutAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate( - args: Subset - ): Prisma.PrismaPromise>; - - /** - * Group by Workout. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WorkoutGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends WorkoutGroupByArgs, - HasSelectOrTake extends Or>, Extends<'take', Keys>>, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: WorkoutGroupByArgs['orderBy'] } - : { orderBy?: WorkoutGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [Error, 'Field ', P, ` in "having" needs to be provided in "by"`]; - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields], - >( - args: SubsetIntersection & InputErrors - ): {} extends InputErrors ? GetWorkoutGroupByPayload : Prisma.PrismaPromise; - /** - * Fields of the Workout model - */ - readonly fields: WorkoutFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for Workout. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__WorkoutClient< - T, - Null = never, - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - user = {}>( - args?: Subset> - ): Prisma__UserClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions> | Null, - Null, - ExtArgs, - GlobalOmitOptions - >; - exercises = {}>( - args?: Subset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'findMany', GlobalOmitOptions> | Null - >; - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then( - onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, - onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch( - onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; - } - - /** - * Fields of the Workout model - */ - interface WorkoutFieldRefs { - readonly id: FieldRef<'Workout', 'String'>; - readonly userId: FieldRef<'Workout', 'String'>; - readonly title: FieldRef<'Workout', 'String'>; - readonly category: FieldRef<'Workout', 'String'>; - readonly durationMin: FieldRef<'Workout', 'Int'>; - readonly calories: FieldRef<'Workout', 'Int'>; - readonly date: FieldRef<'Workout', 'DateTime'>; - readonly notes: FieldRef<'Workout', 'String'>; - readonly isCompleted: FieldRef<'Workout', 'Boolean'>; - readonly totalTime: FieldRef<'Workout', 'Int'>; - readonly restTime: FieldRef<'Workout', 'Int'>; - readonly createdAt: FieldRef<'Workout', 'DateTime'>; - readonly updatedAt: FieldRef<'Workout', 'DateTime'>; - readonly syncedAt: FieldRef<'Workout', 'DateTime'>; - readonly isDeleted: FieldRef<'Workout', 'Boolean'>; - } - - // Custom InputTypes - /** - * Workout findUnique - */ - export type WorkoutFindUniqueArgs = { - /** - * Select specific fields to fetch from the Workout - */ - select?: WorkoutSelect | null; - /** - * Omit specific fields from the Workout - */ - omit?: WorkoutOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WorkoutInclude | null; - /** - * Filter, which Workout to fetch. - */ - where: WorkoutWhereUniqueInput; - }; - - /** - * Workout findUniqueOrThrow - */ - export type WorkoutFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Workout - */ - select?: WorkoutSelect | null; - /** - * Omit specific fields from the Workout - */ - omit?: WorkoutOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WorkoutInclude | null; - /** - * Filter, which Workout to fetch. - */ - where: WorkoutWhereUniqueInput; - }; - - /** - * Workout findFirst - */ - export type WorkoutFindFirstArgs = { - /** - * Select specific fields to fetch from the Workout - */ - select?: WorkoutSelect | null; - /** - * Omit specific fields from the Workout - */ - omit?: WorkoutOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WorkoutInclude | null; - /** - * Filter, which Workout to fetch. - */ - where?: WorkoutWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Workouts to fetch. - */ - orderBy?: WorkoutOrderByWithRelationInput | WorkoutOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Workouts. - */ - cursor?: WorkoutWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Workouts from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Workouts. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Workouts. - */ - distinct?: WorkoutScalarFieldEnum | WorkoutScalarFieldEnum[]; - }; - - /** - * Workout findFirstOrThrow - */ - export type WorkoutFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Workout - */ - select?: WorkoutSelect | null; - /** - * Omit specific fields from the Workout - */ - omit?: WorkoutOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WorkoutInclude | null; - /** - * Filter, which Workout to fetch. - */ - where?: WorkoutWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Workouts to fetch. - */ - orderBy?: WorkoutOrderByWithRelationInput | WorkoutOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Workouts. - */ - cursor?: WorkoutWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Workouts from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Workouts. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Workouts. - */ - distinct?: WorkoutScalarFieldEnum | WorkoutScalarFieldEnum[]; - }; - - /** - * Workout findMany - */ - export type WorkoutFindManyArgs = { - /** - * Select specific fields to fetch from the Workout - */ - select?: WorkoutSelect | null; - /** - * Omit specific fields from the Workout - */ - omit?: WorkoutOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WorkoutInclude | null; - /** - * Filter, which Workouts to fetch. - */ - where?: WorkoutWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Workouts to fetch. - */ - orderBy?: WorkoutOrderByWithRelationInput | WorkoutOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Workouts. - */ - cursor?: WorkoutWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Workouts from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Workouts. - */ - skip?: number; - distinct?: WorkoutScalarFieldEnum | WorkoutScalarFieldEnum[]; - }; - - /** - * Workout create - */ - export type WorkoutCreateArgs = { - /** - * Select specific fields to fetch from the Workout - */ - select?: WorkoutSelect | null; - /** - * Omit specific fields from the Workout - */ - omit?: WorkoutOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WorkoutInclude | null; - /** - * The data needed to create a Workout. - */ - data: XOR; - }; - - /** - * Workout createMany - */ - export type WorkoutCreateManyArgs = { - /** - * The data used to create many Workouts. - */ - data: WorkoutCreateManyInput | WorkoutCreateManyInput[]; - skipDuplicates?: boolean; - }; - - /** - * Workout createManyAndReturn - */ - export type WorkoutCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Workout - */ - select?: WorkoutSelectCreateManyAndReturn | null; - /** - * Omit specific fields from the Workout - */ - omit?: WorkoutOmit | null; - /** - * The data used to create many Workouts. - */ - data: WorkoutCreateManyInput | WorkoutCreateManyInput[]; - skipDuplicates?: boolean; - /** - * Choose, which related nodes to fetch as well - */ - include?: WorkoutIncludeCreateManyAndReturn | null; - }; - - /** - * Workout update - */ - export type WorkoutUpdateArgs = { - /** - * Select specific fields to fetch from the Workout - */ - select?: WorkoutSelect | null; - /** - * Omit specific fields from the Workout - */ - omit?: WorkoutOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WorkoutInclude | null; - /** - * The data needed to update a Workout. - */ - data: XOR; - /** - * Choose, which Workout to update. - */ - where: WorkoutWhereUniqueInput; - }; - - /** - * Workout updateMany - */ - export type WorkoutUpdateManyArgs = { - /** - * The data used to update Workouts. - */ - data: XOR; - /** - * Filter which Workouts to update - */ - where?: WorkoutWhereInput; - /** - * Limit how many Workouts to update. - */ - limit?: number; - }; - - /** - * Workout updateManyAndReturn - */ - export type WorkoutUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Workout - */ - select?: WorkoutSelectUpdateManyAndReturn | null; - /** - * Omit specific fields from the Workout - */ - omit?: WorkoutOmit | null; - /** - * The data used to update Workouts. - */ - data: XOR; - /** - * Filter which Workouts to update - */ - where?: WorkoutWhereInput; - /** - * Limit how many Workouts to update. - */ - limit?: number; - /** - * Choose, which related nodes to fetch as well - */ - include?: WorkoutIncludeUpdateManyAndReturn | null; - }; - - /** - * Workout upsert - */ - export type WorkoutUpsertArgs = { - /** - * Select specific fields to fetch from the Workout - */ - select?: WorkoutSelect | null; - /** - * Omit specific fields from the Workout - */ - omit?: WorkoutOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WorkoutInclude | null; - /** - * The filter to search for the Workout to update in case it exists. - */ - where: WorkoutWhereUniqueInput; - /** - * In case the Workout found by the `where` argument doesn't exist, create a new Workout with this data. - */ - create: XOR; - /** - * In case the Workout was found with the provided `where` argument, update it with this data. - */ - update: XOR; - }; - - /** - * Workout delete - */ - export type WorkoutDeleteArgs = { - /** - * Select specific fields to fetch from the Workout - */ - select?: WorkoutSelect | null; - /** - * Omit specific fields from the Workout - */ - omit?: WorkoutOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WorkoutInclude | null; - /** - * Filter which Workout to delete. - */ - where: WorkoutWhereUniqueInput; - }; - - /** - * Workout deleteMany - */ - export type WorkoutDeleteManyArgs = { - /** - * Filter which Workouts to delete - */ - where?: WorkoutWhereInput; - /** - * Limit how many Workouts to delete. - */ - limit?: number; - }; - - /** - * Workout.exercises - */ - export type Workout$exercisesArgs = { - /** - * Select specific fields to fetch from the Exercise - */ - select?: ExerciseSelect | null; - /** - * Omit specific fields from the Exercise - */ - omit?: ExerciseOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ExerciseInclude | null; - where?: ExerciseWhereInput; - orderBy?: ExerciseOrderByWithRelationInput | ExerciseOrderByWithRelationInput[]; - cursor?: ExerciseWhereUniqueInput; - take?: number; - skip?: number; - distinct?: ExerciseScalarFieldEnum | ExerciseScalarFieldEnum[]; - }; - - /** - * Workout without action - */ - export type WorkoutDefaultArgs = { - /** - * Select specific fields to fetch from the Workout - */ - select?: WorkoutSelect | null; - /** - * Omit specific fields from the Workout - */ - omit?: WorkoutOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WorkoutInclude | null; - }; - - /** - * Model Exercise - */ - - export type AggregateExercise = { - _count: ExerciseCountAggregateOutputType | null; - _avg: ExerciseAvgAggregateOutputType | null; - _sum: ExerciseSumAggregateOutputType | null; - _min: ExerciseMinAggregateOutputType | null; - _max: ExerciseMaxAggregateOutputType | null; - }; - - export type ExerciseAvgAggregateOutputType = { - sets: number | null; - reps: number | null; - weightKg: number | null; - duration: number | null; - distance: number | null; - restTime: number | null; - order: number | null; - }; - - export type ExerciseSumAggregateOutputType = { - sets: number | null; - reps: number | null; - weightKg: number | null; - duration: number | null; - distance: number | null; - restTime: number | null; - order: number | null; - }; - - export type ExerciseMinAggregateOutputType = { - id: string | null; - workoutId: string | null; - name: string | null; - sets: number | null; - reps: number | null; - weightKg: number | null; - duration: number | null; - distance: number | null; - restTime: number | null; - order: number | null; - isCompleted: boolean | null; - createdAt: Date | null; - updatedAt: Date | null; - syncedAt: Date | null; - isDeleted: boolean | null; - }; - - export type ExerciseMaxAggregateOutputType = { - id: string | null; - workoutId: string | null; - name: string | null; - sets: number | null; - reps: number | null; - weightKg: number | null; - duration: number | null; - distance: number | null; - restTime: number | null; - order: number | null; - isCompleted: boolean | null; - createdAt: Date | null; - updatedAt: Date | null; - syncedAt: Date | null; - isDeleted: boolean | null; - }; - - export type ExerciseCountAggregateOutputType = { - id: number; - workoutId: number; - name: number; - sets: number; - reps: number; - weightKg: number; - duration: number; - distance: number; - restTime: number; - order: number; - isCompleted: number; - createdAt: number; - updatedAt: number; - syncedAt: number; - isDeleted: number; - _all: number; - }; - - export type ExerciseAvgAggregateInputType = { - sets?: true; - reps?: true; - weightKg?: true; - duration?: true; - distance?: true; - restTime?: true; - order?: true; - }; - - export type ExerciseSumAggregateInputType = { - sets?: true; - reps?: true; - weightKg?: true; - duration?: true; - distance?: true; - restTime?: true; - order?: true; - }; - - export type ExerciseMinAggregateInputType = { - id?: true; - workoutId?: true; - name?: true; - sets?: true; - reps?: true; - weightKg?: true; - duration?: true; - distance?: true; - restTime?: true; - order?: true; - isCompleted?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - }; - - export type ExerciseMaxAggregateInputType = { - id?: true; - workoutId?: true; - name?: true; - sets?: true; - reps?: true; - weightKg?: true; - duration?: true; - distance?: true; - restTime?: true; - order?: true; - isCompleted?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - }; - - export type ExerciseCountAggregateInputType = { - id?: true; - workoutId?: true; - name?: true; - sets?: true; - reps?: true; - weightKg?: true; - duration?: true; - distance?: true; - restTime?: true; - order?: true; - isCompleted?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - _all?: true; - }; - - export type ExerciseAggregateArgs = { - /** - * Filter which Exercise to aggregate. - */ - where?: ExerciseWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Exercises to fetch. - */ - orderBy?: ExerciseOrderByWithRelationInput | ExerciseOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: ExerciseWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Exercises from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Exercises. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Exercises - **/ - _count?: true | ExerciseCountAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: ExerciseAvgAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: ExerciseSumAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: ExerciseMinAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: ExerciseMaxAggregateInputType; - }; - - export type GetExerciseAggregateType = { - [P in keyof T & keyof AggregateExercise]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType; - }; - - export type ExerciseGroupByArgs = { - where?: ExerciseWhereInput; - orderBy?: ExerciseOrderByWithAggregationInput | ExerciseOrderByWithAggregationInput[]; - by: ExerciseScalarFieldEnum[] | ExerciseScalarFieldEnum; - having?: ExerciseScalarWhereWithAggregatesInput; - take?: number; - skip?: number; - _count?: ExerciseCountAggregateInputType | true; - _avg?: ExerciseAvgAggregateInputType; - _sum?: ExerciseSumAggregateInputType; - _min?: ExerciseMinAggregateInputType; - _max?: ExerciseMaxAggregateInputType; - }; - - export type ExerciseGroupByOutputType = { - id: string; - workoutId: string; - name: string; - sets: number | null; - reps: number | null; - weightKg: number | null; - duration: number | null; - distance: number | null; - restTime: number | null; - order: number; - isCompleted: boolean; - createdAt: Date; - updatedAt: Date; - syncedAt: Date | null; - isDeleted: boolean; - _count: ExerciseCountAggregateOutputType | null; - _avg: ExerciseAvgAggregateOutputType | null; - _sum: ExerciseSumAggregateOutputType | null; - _min: ExerciseMinAggregateOutputType | null; - _max: ExerciseMaxAggregateOutputType | null; - }; - - type GetExerciseGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & { - [P in keyof T & keyof ExerciseGroupByOutputType]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType; - } - > - >; - - export type ExerciseSelect = - $Extensions.GetSelect< - { - id?: boolean; - workoutId?: boolean; - name?: boolean; - sets?: boolean; - reps?: boolean; - weightKg?: boolean; - duration?: boolean; - distance?: boolean; - restTime?: boolean; - order?: boolean; - isCompleted?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - workout?: boolean | WorkoutDefaultArgs; - }, - ExtArgs['result']['exercise'] - >; - - export type ExerciseSelectCreateManyAndReturn = - $Extensions.GetSelect< - { - id?: boolean; - workoutId?: boolean; - name?: boolean; - sets?: boolean; - reps?: boolean; - weightKg?: boolean; - duration?: boolean; - distance?: boolean; - restTime?: boolean; - order?: boolean; - isCompleted?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - workout?: boolean | WorkoutDefaultArgs; - }, - ExtArgs['result']['exercise'] - >; - - export type ExerciseSelectUpdateManyAndReturn = - $Extensions.GetSelect< - { - id?: boolean; - workoutId?: boolean; - name?: boolean; - sets?: boolean; - reps?: boolean; - weightKg?: boolean; - duration?: boolean; - distance?: boolean; - restTime?: boolean; - order?: boolean; - isCompleted?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - workout?: boolean | WorkoutDefaultArgs; - }, - ExtArgs['result']['exercise'] - >; - - export type ExerciseSelectScalar = { - id?: boolean; - workoutId?: boolean; - name?: boolean; - sets?: boolean; - reps?: boolean; - weightKg?: boolean; - duration?: boolean; - distance?: boolean; - restTime?: boolean; - order?: boolean; - isCompleted?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - }; - - export type ExerciseOmit = $Extensions.GetOmit< - | 'id' - | 'workoutId' - | 'name' - | 'sets' - | 'reps' - | 'weightKg' - | 'duration' - | 'distance' - | 'restTime' - | 'order' - | 'isCompleted' - | 'createdAt' - | 'updatedAt' - | 'syncedAt' - | 'isDeleted', - ExtArgs['result']['exercise'] - >; - export type ExerciseInclude = { - workout?: boolean | WorkoutDefaultArgs; - }; - export type ExerciseIncludeCreateManyAndReturn = { - workout?: boolean | WorkoutDefaultArgs; - }; - export type ExerciseIncludeUpdateManyAndReturn = { - workout?: boolean | WorkoutDefaultArgs; - }; - - export type $ExercisePayload = { - name: 'Exercise'; - objects: { - workout: Prisma.$WorkoutPayload; - }; - scalars: $Extensions.GetPayloadResult< - { - id: string; - workoutId: string; - name: string; - sets: number | null; - reps: number | null; - weightKg: number | null; - duration: number | null; - distance: number | null; - restTime: number | null; - order: number; - isCompleted: boolean; - createdAt: Date; - updatedAt: Date; - syncedAt: Date | null; - isDeleted: boolean; - }, - ExtArgs['result']['exercise'] - >; - composites: {}; - }; - - type ExerciseGetPayload = $Result.GetResult< - Prisma.$ExercisePayload, - S - >; - - type ExerciseCountArgs = Omit< - ExerciseFindManyArgs, - 'select' | 'include' | 'distinct' | 'omit' - > & { - select?: ExerciseCountAggregateInputType | true; - }; - - export interface ExerciseDelegate< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > { - [K: symbol]: { types: Prisma.TypeMap['model']['Exercise']; meta: { name: 'Exercise' } }; - /** - * Find zero or one Exercise that matches the filter. - * @param {ExerciseFindUniqueArgs} args - Arguments to find a Exercise - * @example - * // Get one Exercise - * const exercise = await prisma.exercise.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique( - args: SelectSubset> - ): Prisma__ExerciseClient< - $Result.GetResult, T, 'findUnique', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find one Exercise that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {ExerciseFindUniqueOrThrowArgs} args - Arguments to find a Exercise - * @example - * // Get one Exercise - * const exercise = await prisma.exercise.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow( - args: SelectSubset> - ): Prisma__ExerciseClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first Exercise that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ExerciseFindFirstArgs} args - Arguments to find a Exercise - * @example - * // Get one Exercise - * const exercise = await prisma.exercise.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst( - args?: SelectSubset> - ): Prisma__ExerciseClient< - $Result.GetResult, T, 'findFirst', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first Exercise that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ExerciseFindFirstOrThrowArgs} args - Arguments to find a Exercise - * @example - * // Get one Exercise - * const exercise = await prisma.exercise.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow( - args?: SelectSubset> - ): Prisma__ExerciseClient< - $Result.GetResult, T, 'findFirstOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find zero or more Exercises that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ExerciseFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Exercises - * const exercises = await prisma.exercise.findMany() - * - * // Get first 10 Exercises - * const exercises = await prisma.exercise.findMany({ take: 10 }) - * - * // Only select the `id` - * const exerciseWithIdOnly = await prisma.exercise.findMany({ select: { id: true } }) - * - */ - findMany( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany', GlobalOmitOptions>>; - - /** - * Create a Exercise. - * @param {ExerciseCreateArgs} args - Arguments to create a Exercise. - * @example - * // Create one Exercise - * const Exercise = await prisma.exercise.create({ - * data: { - * // ... data to create a Exercise - * } - * }) - * - */ - create( - args: SelectSubset> - ): Prisma__ExerciseClient< - $Result.GetResult, T, 'create', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Create many Exercises. - * @param {ExerciseCreateManyArgs} args - Arguments to create many Exercises. - * @example - * // Create many Exercises - * const exercise = await prisma.exercise.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Create many Exercises and returns the data saved in the database. - * @param {ExerciseCreateManyAndReturnArgs} args - Arguments to create many Exercises. - * @example - * // Create many Exercises - * const exercise = await prisma.exercise.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Exercises and only return the `id` - * const exerciseWithIdOnly = await prisma.exercise.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn( - args?: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'createManyAndReturn', GlobalOmitOptions> - >; - - /** - * Delete a Exercise. - * @param {ExerciseDeleteArgs} args - Arguments to delete one Exercise. - * @example - * // Delete one Exercise - * const Exercise = await prisma.exercise.delete({ - * where: { - * // ... filter to delete one Exercise - * } - * }) - * - */ - delete( - args: SelectSubset> - ): Prisma__ExerciseClient< - $Result.GetResult, T, 'delete', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Update one Exercise. - * @param {ExerciseUpdateArgs} args - Arguments to update one Exercise. - * @example - * // Update one Exercise - * const exercise = await prisma.exercise.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update( - args: SelectSubset> - ): Prisma__ExerciseClient< - $Result.GetResult, T, 'update', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Delete zero or more Exercises. - * @param {ExerciseDeleteManyArgs} args - Arguments to filter Exercises to delete. - * @example - * // Delete a few Exercises - * const { count } = await prisma.exercise.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more Exercises. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ExerciseUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Exercises - * const exercise = await prisma.exercise.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany( - args: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more Exercises and returns the data updated in the database. - * @param {ExerciseUpdateManyAndReturnArgs} args - Arguments to update many Exercises. - * @example - * // Update many Exercises - * const exercise = await prisma.exercise.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more Exercises and only return the `id` - * const exerciseWithIdOnly = await prisma.exercise.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn( - args: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'updateManyAndReturn', GlobalOmitOptions> - >; - - /** - * Create or update one Exercise. - * @param {ExerciseUpsertArgs} args - Arguments to update or create a Exercise. - * @example - * // Update or create a Exercise - * const exercise = await prisma.exercise.upsert({ - * create: { - * // ... data to create a Exercise - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Exercise we want to update - * } - * }) - */ - upsert( - args: SelectSubset> - ): Prisma__ExerciseClient< - $Result.GetResult, T, 'upsert', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Count the number of Exercises. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ExerciseCountArgs} args - Arguments to filter Exercises to count. - * @example - * // Count the number of Exercises - * const count = await prisma.exercise.count({ - * where: { - * // ... the filter for the Exercises we want to count - * } - * }) - **/ - count( - args?: Subset - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - >; - - /** - * Allows you to perform aggregations operations on a Exercise. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ExerciseAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate( - args: Subset - ): Prisma.PrismaPromise>; - - /** - * Group by Exercise. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ExerciseGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends ExerciseGroupByArgs, - HasSelectOrTake extends Or>, Extends<'take', Keys>>, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: ExerciseGroupByArgs['orderBy'] } - : { orderBy?: ExerciseGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [Error, 'Field ', P, ` in "having" needs to be provided in "by"`]; - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields], - >( - args: SubsetIntersection & InputErrors - ): {} extends InputErrors ? GetExerciseGroupByPayload : Prisma.PrismaPromise; - /** - * Fields of the Exercise model - */ - readonly fields: ExerciseFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for Exercise. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__ExerciseClient< - T, - Null = never, - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - workout = {}>( - args?: Subset> - ): Prisma__WorkoutClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions> | Null, - Null, - ExtArgs, - GlobalOmitOptions - >; - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then( - onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, - onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch( - onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; - } - - /** - * Fields of the Exercise model - */ - interface ExerciseFieldRefs { - readonly id: FieldRef<'Exercise', 'String'>; - readonly workoutId: FieldRef<'Exercise', 'String'>; - readonly name: FieldRef<'Exercise', 'String'>; - readonly sets: FieldRef<'Exercise', 'Int'>; - readonly reps: FieldRef<'Exercise', 'Int'>; - readonly weightKg: FieldRef<'Exercise', 'Float'>; - readonly duration: FieldRef<'Exercise', 'Int'>; - readonly distance: FieldRef<'Exercise', 'Float'>; - readonly restTime: FieldRef<'Exercise', 'Int'>; - readonly order: FieldRef<'Exercise', 'Int'>; - readonly isCompleted: FieldRef<'Exercise', 'Boolean'>; - readonly createdAt: FieldRef<'Exercise', 'DateTime'>; - readonly updatedAt: FieldRef<'Exercise', 'DateTime'>; - readonly syncedAt: FieldRef<'Exercise', 'DateTime'>; - readonly isDeleted: FieldRef<'Exercise', 'Boolean'>; - } - - // Custom InputTypes - /** - * Exercise findUnique - */ - export type ExerciseFindUniqueArgs = { - /** - * Select specific fields to fetch from the Exercise - */ - select?: ExerciseSelect | null; - /** - * Omit specific fields from the Exercise - */ - omit?: ExerciseOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ExerciseInclude | null; - /** - * Filter, which Exercise to fetch. - */ - where: ExerciseWhereUniqueInput; - }; - - /** - * Exercise findUniqueOrThrow - */ - export type ExerciseFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Exercise - */ - select?: ExerciseSelect | null; - /** - * Omit specific fields from the Exercise - */ - omit?: ExerciseOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ExerciseInclude | null; - /** - * Filter, which Exercise to fetch. - */ - where: ExerciseWhereUniqueInput; - }; - - /** - * Exercise findFirst - */ - export type ExerciseFindFirstArgs = { - /** - * Select specific fields to fetch from the Exercise - */ - select?: ExerciseSelect | null; - /** - * Omit specific fields from the Exercise - */ - omit?: ExerciseOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ExerciseInclude | null; - /** - * Filter, which Exercise to fetch. - */ - where?: ExerciseWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Exercises to fetch. - */ - orderBy?: ExerciseOrderByWithRelationInput | ExerciseOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Exercises. - */ - cursor?: ExerciseWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Exercises from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Exercises. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Exercises. - */ - distinct?: ExerciseScalarFieldEnum | ExerciseScalarFieldEnum[]; - }; - - /** - * Exercise findFirstOrThrow - */ - export type ExerciseFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Exercise - */ - select?: ExerciseSelect | null; - /** - * Omit specific fields from the Exercise - */ - omit?: ExerciseOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ExerciseInclude | null; - /** - * Filter, which Exercise to fetch. - */ - where?: ExerciseWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Exercises to fetch. - */ - orderBy?: ExerciseOrderByWithRelationInput | ExerciseOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Exercises. - */ - cursor?: ExerciseWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Exercises from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Exercises. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Exercises. - */ - distinct?: ExerciseScalarFieldEnum | ExerciseScalarFieldEnum[]; - }; - - /** - * Exercise findMany - */ - export type ExerciseFindManyArgs = { - /** - * Select specific fields to fetch from the Exercise - */ - select?: ExerciseSelect | null; - /** - * Omit specific fields from the Exercise - */ - omit?: ExerciseOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ExerciseInclude | null; - /** - * Filter, which Exercises to fetch. - */ - where?: ExerciseWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Exercises to fetch. - */ - orderBy?: ExerciseOrderByWithRelationInput | ExerciseOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Exercises. - */ - cursor?: ExerciseWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Exercises from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Exercises. - */ - skip?: number; - distinct?: ExerciseScalarFieldEnum | ExerciseScalarFieldEnum[]; - }; - - /** - * Exercise create - */ - export type ExerciseCreateArgs = { - /** - * Select specific fields to fetch from the Exercise - */ - select?: ExerciseSelect | null; - /** - * Omit specific fields from the Exercise - */ - omit?: ExerciseOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ExerciseInclude | null; - /** - * The data needed to create a Exercise. - */ - data: XOR; - }; - - /** - * Exercise createMany - */ - export type ExerciseCreateManyArgs = { - /** - * The data used to create many Exercises. - */ - data: ExerciseCreateManyInput | ExerciseCreateManyInput[]; - skipDuplicates?: boolean; - }; - - /** - * Exercise createManyAndReturn - */ - export type ExerciseCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Exercise - */ - select?: ExerciseSelectCreateManyAndReturn | null; - /** - * Omit specific fields from the Exercise - */ - omit?: ExerciseOmit | null; - /** - * The data used to create many Exercises. - */ - data: ExerciseCreateManyInput | ExerciseCreateManyInput[]; - skipDuplicates?: boolean; - /** - * Choose, which related nodes to fetch as well - */ - include?: ExerciseIncludeCreateManyAndReturn | null; - }; - - /** - * Exercise update - */ - export type ExerciseUpdateArgs = { - /** - * Select specific fields to fetch from the Exercise - */ - select?: ExerciseSelect | null; - /** - * Omit specific fields from the Exercise - */ - omit?: ExerciseOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ExerciseInclude | null; - /** - * The data needed to update a Exercise. - */ - data: XOR; - /** - * Choose, which Exercise to update. - */ - where: ExerciseWhereUniqueInput; - }; - - /** - * Exercise updateMany - */ - export type ExerciseUpdateManyArgs = { - /** - * The data used to update Exercises. - */ - data: XOR; - /** - * Filter which Exercises to update - */ - where?: ExerciseWhereInput; - /** - * Limit how many Exercises to update. - */ - limit?: number; - }; - - /** - * Exercise updateManyAndReturn - */ - export type ExerciseUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Exercise - */ - select?: ExerciseSelectUpdateManyAndReturn | null; - /** - * Omit specific fields from the Exercise - */ - omit?: ExerciseOmit | null; - /** - * The data used to update Exercises. - */ - data: XOR; - /** - * Filter which Exercises to update - */ - where?: ExerciseWhereInput; - /** - * Limit how many Exercises to update. - */ - limit?: number; - /** - * Choose, which related nodes to fetch as well - */ - include?: ExerciseIncludeUpdateManyAndReturn | null; - }; - - /** - * Exercise upsert - */ - export type ExerciseUpsertArgs = { - /** - * Select specific fields to fetch from the Exercise - */ - select?: ExerciseSelect | null; - /** - * Omit specific fields from the Exercise - */ - omit?: ExerciseOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ExerciseInclude | null; - /** - * The filter to search for the Exercise to update in case it exists. - */ - where: ExerciseWhereUniqueInput; - /** - * In case the Exercise found by the `where` argument doesn't exist, create a new Exercise with this data. - */ - create: XOR; - /** - * In case the Exercise was found with the provided `where` argument, update it with this data. - */ - update: XOR; - }; - - /** - * Exercise delete - */ - export type ExerciseDeleteArgs = { - /** - * Select specific fields to fetch from the Exercise - */ - select?: ExerciseSelect | null; - /** - * Omit specific fields from the Exercise - */ - omit?: ExerciseOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ExerciseInclude | null; - /** - * Filter which Exercise to delete. - */ - where: ExerciseWhereUniqueInput; - }; - - /** - * Exercise deleteMany - */ - export type ExerciseDeleteManyArgs = { - /** - * Filter which Exercises to delete - */ - where?: ExerciseWhereInput; - /** - * Limit how many Exercises to delete. - */ - limit?: number; - }; - - /** - * Exercise without action - */ - export type ExerciseDefaultArgs = { - /** - * Select specific fields to fetch from the Exercise - */ - select?: ExerciseSelect | null; - /** - * Omit specific fields from the Exercise - */ - omit?: ExerciseOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ExerciseInclude | null; - }; - - /** - * Model Meal - */ - - export type AggregateMeal = { - _count: MealCountAggregateOutputType | null; - _avg: MealAvgAggregateOutputType | null; - _sum: MealSumAggregateOutputType | null; - _min: MealMinAggregateOutputType | null; - _max: MealMaxAggregateOutputType | null; - }; - - export type MealAvgAggregateOutputType = { - calories: number | null; - protein: number | null; - carbs: number | null; - fat: number | null; - }; - - export type MealSumAggregateOutputType = { - calories: number | null; - protein: number | null; - carbs: number | null; - fat: number | null; - }; - - export type MealMinAggregateOutputType = { - id: string | null; - userId: string | null; - name: string | null; - mealType: string | null; - calories: number | null; - protein: number | null; - carbs: number | null; - fat: number | null; - date: Date | null; - notes: string | null; - createdAt: Date | null; - updatedAt: Date | null; - syncedAt: Date | null; - isDeleted: boolean | null; - }; - - export type MealMaxAggregateOutputType = { - id: string | null; - userId: string | null; - name: string | null; - mealType: string | null; - calories: number | null; - protein: number | null; - carbs: number | null; - fat: number | null; - date: Date | null; - notes: string | null; - createdAt: Date | null; - updatedAt: Date | null; - syncedAt: Date | null; - isDeleted: boolean | null; - }; - - export type MealCountAggregateOutputType = { - id: number; - userId: number; - name: number; - mealType: number; - calories: number; - protein: number; - carbs: number; - fat: number; - date: number; - notes: number; - createdAt: number; - updatedAt: number; - syncedAt: number; - isDeleted: number; - _all: number; - }; - - export type MealAvgAggregateInputType = { - calories?: true; - protein?: true; - carbs?: true; - fat?: true; - }; - - export type MealSumAggregateInputType = { - calories?: true; - protein?: true; - carbs?: true; - fat?: true; - }; - - export type MealMinAggregateInputType = { - id?: true; - userId?: true; - name?: true; - mealType?: true; - calories?: true; - protein?: true; - carbs?: true; - fat?: true; - date?: true; - notes?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - }; - - export type MealMaxAggregateInputType = { - id?: true; - userId?: true; - name?: true; - mealType?: true; - calories?: true; - protein?: true; - carbs?: true; - fat?: true; - date?: true; - notes?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - }; - - export type MealCountAggregateInputType = { - id?: true; - userId?: true; - name?: true; - mealType?: true; - calories?: true; - protein?: true; - carbs?: true; - fat?: true; - date?: true; - notes?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - _all?: true; - }; - - export type MealAggregateArgs = { - /** - * Filter which Meal to aggregate. - */ - where?: MealWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Meals to fetch. - */ - orderBy?: MealOrderByWithRelationInput | MealOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: MealWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Meals from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Meals. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Meals - **/ - _count?: true | MealCountAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: MealAvgAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: MealSumAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: MealMinAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: MealMaxAggregateInputType; - }; - - export type GetMealAggregateType = { - [P in keyof T & keyof AggregateMeal]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType; - }; - - export type MealGroupByArgs = { - where?: MealWhereInput; - orderBy?: MealOrderByWithAggregationInput | MealOrderByWithAggregationInput[]; - by: MealScalarFieldEnum[] | MealScalarFieldEnum; - having?: MealScalarWhereWithAggregatesInput; - take?: number; - skip?: number; - _count?: MealCountAggregateInputType | true; - _avg?: MealAvgAggregateInputType; - _sum?: MealSumAggregateInputType; - _min?: MealMinAggregateInputType; - _max?: MealMaxAggregateInputType; - }; - - export type MealGroupByOutputType = { - id: string; - userId: string; - name: string; - mealType: string; - calories: number | null; - protein: number | null; - carbs: number | null; - fat: number | null; - date: Date; - notes: string | null; - createdAt: Date; - updatedAt: Date; - syncedAt: Date | null; - isDeleted: boolean; - _count: MealCountAggregateOutputType | null; - _avg: MealAvgAggregateOutputType | null; - _sum: MealSumAggregateOutputType | null; - _min: MealMinAggregateOutputType | null; - _max: MealMaxAggregateOutputType | null; - }; - - type GetMealGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & { - [P in keyof T & keyof MealGroupByOutputType]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType; - } - > - >; - - export type MealSelect = $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - name?: boolean; - mealType?: boolean; - calories?: boolean; - protein?: boolean; - carbs?: boolean; - fat?: boolean; - date?: boolean; - notes?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - mealItems?: boolean | Meal$mealItemsArgs; - _count?: boolean | MealCountOutputTypeDefaultArgs; - }, - ExtArgs['result']['meal'] - >; - - export type MealSelectCreateManyAndReturn = - $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - name?: boolean; - mealType?: boolean; - calories?: boolean; - protein?: boolean; - carbs?: boolean; - fat?: boolean; - date?: boolean; - notes?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['meal'] - >; - - export type MealSelectUpdateManyAndReturn = - $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - name?: boolean; - mealType?: boolean; - calories?: boolean; - protein?: boolean; - carbs?: boolean; - fat?: boolean; - date?: boolean; - notes?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['meal'] - >; - - export type MealSelectScalar = { - id?: boolean; - userId?: boolean; - name?: boolean; - mealType?: boolean; - calories?: boolean; - protein?: boolean; - carbs?: boolean; - fat?: boolean; - date?: boolean; - notes?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - }; - - export type MealOmit = $Extensions.GetOmit< - | 'id' - | 'userId' - | 'name' - | 'mealType' - | 'calories' - | 'protein' - | 'carbs' - | 'fat' - | 'date' - | 'notes' - | 'createdAt' - | 'updatedAt' - | 'syncedAt' - | 'isDeleted', - ExtArgs['result']['meal'] - >; - export type MealInclude = { - user?: boolean | UserDefaultArgs; - mealItems?: boolean | Meal$mealItemsArgs; - _count?: boolean | MealCountOutputTypeDefaultArgs; - }; - export type MealIncludeCreateManyAndReturn = { - user?: boolean | UserDefaultArgs; - }; - export type MealIncludeUpdateManyAndReturn = { - user?: boolean | UserDefaultArgs; - }; - - export type $MealPayload = { - name: 'Meal'; - objects: { - user: Prisma.$UserPayload; - mealItems: Prisma.$MealItemPayload[]; - }; - scalars: $Extensions.GetPayloadResult< - { - id: string; - userId: string; - name: string; - mealType: string; - calories: number | null; - protein: number | null; - carbs: number | null; - fat: number | null; - date: Date; - notes: string | null; - createdAt: Date; - updatedAt: Date; - syncedAt: Date | null; - isDeleted: boolean; - }, - ExtArgs['result']['meal'] - >; - composites: {}; - }; - - type MealGetPayload = $Result.GetResult< - Prisma.$MealPayload, - S - >; - - type MealCountArgs = Omit< - MealFindManyArgs, - 'select' | 'include' | 'distinct' | 'omit' - > & { - select?: MealCountAggregateInputType | true; - }; - - export interface MealDelegate< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > { - [K: symbol]: { types: Prisma.TypeMap['model']['Meal']; meta: { name: 'Meal' } }; - /** - * Find zero or one Meal that matches the filter. - * @param {MealFindUniqueArgs} args - Arguments to find a Meal - * @example - * // Get one Meal - * const meal = await prisma.meal.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique( - args: SelectSubset> - ): Prisma__MealClient< - $Result.GetResult, T, 'findUnique', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find one Meal that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {MealFindUniqueOrThrowArgs} args - Arguments to find a Meal - * @example - * // Get one Meal - * const meal = await prisma.meal.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow( - args: SelectSubset> - ): Prisma__MealClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first Meal that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MealFindFirstArgs} args - Arguments to find a Meal - * @example - * // Get one Meal - * const meal = await prisma.meal.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst( - args?: SelectSubset> - ): Prisma__MealClient< - $Result.GetResult, T, 'findFirst', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first Meal that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MealFindFirstOrThrowArgs} args - Arguments to find a Meal - * @example - * // Get one Meal - * const meal = await prisma.meal.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow( - args?: SelectSubset> - ): Prisma__MealClient< - $Result.GetResult, T, 'findFirstOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find zero or more Meals that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MealFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Meals - * const meals = await prisma.meal.findMany() - * - * // Get first 10 Meals - * const meals = await prisma.meal.findMany({ take: 10 }) - * - * // Only select the `id` - * const mealWithIdOnly = await prisma.meal.findMany({ select: { id: true } }) - * - */ - findMany( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany', GlobalOmitOptions>>; - - /** - * Create a Meal. - * @param {MealCreateArgs} args - Arguments to create a Meal. - * @example - * // Create one Meal - * const Meal = await prisma.meal.create({ - * data: { - * // ... data to create a Meal - * } - * }) - * - */ - create( - args: SelectSubset> - ): Prisma__MealClient< - $Result.GetResult, T, 'create', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Create many Meals. - * @param {MealCreateManyArgs} args - Arguments to create many Meals. - * @example - * // Create many Meals - * const meal = await prisma.meal.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Create many Meals and returns the data saved in the database. - * @param {MealCreateManyAndReturnArgs} args - Arguments to create many Meals. - * @example - * // Create many Meals - * const meal = await prisma.meal.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Meals and only return the `id` - * const mealWithIdOnly = await prisma.meal.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn( - args?: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'createManyAndReturn', GlobalOmitOptions> - >; - - /** - * Delete a Meal. - * @param {MealDeleteArgs} args - Arguments to delete one Meal. - * @example - * // Delete one Meal - * const Meal = await prisma.meal.delete({ - * where: { - * // ... filter to delete one Meal - * } - * }) - * - */ - delete( - args: SelectSubset> - ): Prisma__MealClient< - $Result.GetResult, T, 'delete', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Update one Meal. - * @param {MealUpdateArgs} args - Arguments to update one Meal. - * @example - * // Update one Meal - * const meal = await prisma.meal.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update( - args: SelectSubset> - ): Prisma__MealClient< - $Result.GetResult, T, 'update', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Delete zero or more Meals. - * @param {MealDeleteManyArgs} args - Arguments to filter Meals to delete. - * @example - * // Delete a few Meals - * const { count } = await prisma.meal.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more Meals. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MealUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Meals - * const meal = await prisma.meal.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany( - args: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more Meals and returns the data updated in the database. - * @param {MealUpdateManyAndReturnArgs} args - Arguments to update many Meals. - * @example - * // Update many Meals - * const meal = await prisma.meal.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more Meals and only return the `id` - * const mealWithIdOnly = await prisma.meal.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn( - args: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'updateManyAndReturn', GlobalOmitOptions> - >; - - /** - * Create or update one Meal. - * @param {MealUpsertArgs} args - Arguments to update or create a Meal. - * @example - * // Update or create a Meal - * const meal = await prisma.meal.upsert({ - * create: { - * // ... data to create a Meal - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Meal we want to update - * } - * }) - */ - upsert( - args: SelectSubset> - ): Prisma__MealClient< - $Result.GetResult, T, 'upsert', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Count the number of Meals. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MealCountArgs} args - Arguments to filter Meals to count. - * @example - * // Count the number of Meals - * const count = await prisma.meal.count({ - * where: { - * // ... the filter for the Meals we want to count - * } - * }) - **/ - count( - args?: Subset - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - >; - - /** - * Allows you to perform aggregations operations on a Meal. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MealAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate( - args: Subset - ): Prisma.PrismaPromise>; - - /** - * Group by Meal. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MealGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends MealGroupByArgs, - HasSelectOrTake extends Or>, Extends<'take', Keys>>, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: MealGroupByArgs['orderBy'] } - : { orderBy?: MealGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [Error, 'Field ', P, ` in "having" needs to be provided in "by"`]; - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields], - >( - args: SubsetIntersection & InputErrors - ): {} extends InputErrors ? GetMealGroupByPayload : Prisma.PrismaPromise; - /** - * Fields of the Meal model - */ - readonly fields: MealFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for Meal. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__MealClient< - T, - Null = never, - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - user = {}>( - args?: Subset> - ): Prisma__UserClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions> | Null, - Null, - ExtArgs, - GlobalOmitOptions - >; - mealItems = {}>( - args?: Subset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'findMany', GlobalOmitOptions> | Null - >; - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then( - onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, - onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch( - onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; - } - - /** - * Fields of the Meal model - */ - interface MealFieldRefs { - readonly id: FieldRef<'Meal', 'String'>; - readonly userId: FieldRef<'Meal', 'String'>; - readonly name: FieldRef<'Meal', 'String'>; - readonly mealType: FieldRef<'Meal', 'String'>; - readonly calories: FieldRef<'Meal', 'Int'>; - readonly protein: FieldRef<'Meal', 'Float'>; - readonly carbs: FieldRef<'Meal', 'Float'>; - readonly fat: FieldRef<'Meal', 'Float'>; - readonly date: FieldRef<'Meal', 'DateTime'>; - readonly notes: FieldRef<'Meal', 'String'>; - readonly createdAt: FieldRef<'Meal', 'DateTime'>; - readonly updatedAt: FieldRef<'Meal', 'DateTime'>; - readonly syncedAt: FieldRef<'Meal', 'DateTime'>; - readonly isDeleted: FieldRef<'Meal', 'Boolean'>; - } - - // Custom InputTypes - /** - * Meal findUnique - */ - export type MealFindUniqueArgs = { - /** - * Select specific fields to fetch from the Meal - */ - select?: MealSelect | null; - /** - * Omit specific fields from the Meal - */ - omit?: MealOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealInclude | null; - /** - * Filter, which Meal to fetch. - */ - where: MealWhereUniqueInput; - }; - - /** - * Meal findUniqueOrThrow - */ - export type MealFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Meal - */ - select?: MealSelect | null; - /** - * Omit specific fields from the Meal - */ - omit?: MealOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealInclude | null; - /** - * Filter, which Meal to fetch. - */ - where: MealWhereUniqueInput; - }; - - /** - * Meal findFirst - */ - export type MealFindFirstArgs = { - /** - * Select specific fields to fetch from the Meal - */ - select?: MealSelect | null; - /** - * Omit specific fields from the Meal - */ - omit?: MealOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealInclude | null; - /** - * Filter, which Meal to fetch. - */ - where?: MealWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Meals to fetch. - */ - orderBy?: MealOrderByWithRelationInput | MealOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Meals. - */ - cursor?: MealWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Meals from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Meals. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Meals. - */ - distinct?: MealScalarFieldEnum | MealScalarFieldEnum[]; - }; - - /** - * Meal findFirstOrThrow - */ - export type MealFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Meal - */ - select?: MealSelect | null; - /** - * Omit specific fields from the Meal - */ - omit?: MealOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealInclude | null; - /** - * Filter, which Meal to fetch. - */ - where?: MealWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Meals to fetch. - */ - orderBy?: MealOrderByWithRelationInput | MealOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Meals. - */ - cursor?: MealWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Meals from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Meals. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Meals. - */ - distinct?: MealScalarFieldEnum | MealScalarFieldEnum[]; - }; - - /** - * Meal findMany - */ - export type MealFindManyArgs = { - /** - * Select specific fields to fetch from the Meal - */ - select?: MealSelect | null; - /** - * Omit specific fields from the Meal - */ - omit?: MealOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealInclude | null; - /** - * Filter, which Meals to fetch. - */ - where?: MealWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Meals to fetch. - */ - orderBy?: MealOrderByWithRelationInput | MealOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Meals. - */ - cursor?: MealWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Meals from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Meals. - */ - skip?: number; - distinct?: MealScalarFieldEnum | MealScalarFieldEnum[]; - }; - - /** - * Meal create - */ - export type MealCreateArgs = { - /** - * Select specific fields to fetch from the Meal - */ - select?: MealSelect | null; - /** - * Omit specific fields from the Meal - */ - omit?: MealOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealInclude | null; - /** - * The data needed to create a Meal. - */ - data: XOR; - }; - - /** - * Meal createMany - */ - export type MealCreateManyArgs = { - /** - * The data used to create many Meals. - */ - data: MealCreateManyInput | MealCreateManyInput[]; - skipDuplicates?: boolean; - }; - - /** - * Meal createManyAndReturn - */ - export type MealCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Meal - */ - select?: MealSelectCreateManyAndReturn | null; - /** - * Omit specific fields from the Meal - */ - omit?: MealOmit | null; - /** - * The data used to create many Meals. - */ - data: MealCreateManyInput | MealCreateManyInput[]; - skipDuplicates?: boolean; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealIncludeCreateManyAndReturn | null; - }; - - /** - * Meal update - */ - export type MealUpdateArgs = { - /** - * Select specific fields to fetch from the Meal - */ - select?: MealSelect | null; - /** - * Omit specific fields from the Meal - */ - omit?: MealOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealInclude | null; - /** - * The data needed to update a Meal. - */ - data: XOR; - /** - * Choose, which Meal to update. - */ - where: MealWhereUniqueInput; - }; - - /** - * Meal updateMany - */ - export type MealUpdateManyArgs = { - /** - * The data used to update Meals. - */ - data: XOR; - /** - * Filter which Meals to update - */ - where?: MealWhereInput; - /** - * Limit how many Meals to update. - */ - limit?: number; - }; - - /** - * Meal updateManyAndReturn - */ - export type MealUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Meal - */ - select?: MealSelectUpdateManyAndReturn | null; - /** - * Omit specific fields from the Meal - */ - omit?: MealOmit | null; - /** - * The data used to update Meals. - */ - data: XOR; - /** - * Filter which Meals to update - */ - where?: MealWhereInput; - /** - * Limit how many Meals to update. - */ - limit?: number; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealIncludeUpdateManyAndReturn | null; - }; - - /** - * Meal upsert - */ - export type MealUpsertArgs = { - /** - * Select specific fields to fetch from the Meal - */ - select?: MealSelect | null; - /** - * Omit specific fields from the Meal - */ - omit?: MealOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealInclude | null; - /** - * The filter to search for the Meal to update in case it exists. - */ - where: MealWhereUniqueInput; - /** - * In case the Meal found by the `where` argument doesn't exist, create a new Meal with this data. - */ - create: XOR; - /** - * In case the Meal was found with the provided `where` argument, update it with this data. - */ - update: XOR; - }; - - /** - * Meal delete - */ - export type MealDeleteArgs = { - /** - * Select specific fields to fetch from the Meal - */ - select?: MealSelect | null; - /** - * Omit specific fields from the Meal - */ - omit?: MealOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealInclude | null; - /** - * Filter which Meal to delete. - */ - where: MealWhereUniqueInput; - }; - - /** - * Meal deleteMany - */ - export type MealDeleteManyArgs = { - /** - * Filter which Meals to delete - */ - where?: MealWhereInput; - /** - * Limit how many Meals to delete. - */ - limit?: number; - }; - - /** - * Meal.mealItems - */ - export type Meal$mealItemsArgs = { - /** - * Select specific fields to fetch from the MealItem - */ - select?: MealItemSelect | null; - /** - * Omit specific fields from the MealItem - */ - omit?: MealItemOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealItemInclude | null; - where?: MealItemWhereInput; - orderBy?: MealItemOrderByWithRelationInput | MealItemOrderByWithRelationInput[]; - cursor?: MealItemWhereUniqueInput; - take?: number; - skip?: number; - distinct?: MealItemScalarFieldEnum | MealItemScalarFieldEnum[]; - }; - - /** - * Meal without action - */ - export type MealDefaultArgs = { - /** - * Select specific fields to fetch from the Meal - */ - select?: MealSelect | null; - /** - * Omit specific fields from the Meal - */ - omit?: MealOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealInclude | null; - }; - - /** - * Model MealItem - */ - - export type AggregateMealItem = { - _count: MealItemCountAggregateOutputType | null; - _avg: MealItemAvgAggregateOutputType | null; - _sum: MealItemSumAggregateOutputType | null; - _min: MealItemMinAggregateOutputType | null; - _max: MealItemMaxAggregateOutputType | null; - }; - - export type MealItemAvgAggregateOutputType = { - calories: number | null; - protein: number | null; - carbs: number | null; - fat: number | null; - quantity: number | null; - }; - - export type MealItemSumAggregateOutputType = { - calories: number | null; - protein: number | null; - carbs: number | null; - fat: number | null; - quantity: number | null; - }; - - export type MealItemMinAggregateOutputType = { - id: string | null; - mealId: string | null; - userId: string | null; - name: string | null; - calories: number | null; - protein: number | null; - carbs: number | null; - fat: number | null; - quantity: number | null; - unit: string | null; - isHighInProtein: boolean | null; - createdAt: Date | null; - updatedAt: Date | null; - syncedAt: Date | null; - isDeleted: boolean | null; - }; - - export type MealItemMaxAggregateOutputType = { - id: string | null; - mealId: string | null; - userId: string | null; - name: string | null; - calories: number | null; - protein: number | null; - carbs: number | null; - fat: number | null; - quantity: number | null; - unit: string | null; - isHighInProtein: boolean | null; - createdAt: Date | null; - updatedAt: Date | null; - syncedAt: Date | null; - isDeleted: boolean | null; - }; - - export type MealItemCountAggregateOutputType = { - id: number; - mealId: number; - userId: number; - name: number; - calories: number; - protein: number; - carbs: number; - fat: number; - quantity: number; - unit: number; - isHighInProtein: number; - createdAt: number; - updatedAt: number; - syncedAt: number; - isDeleted: number; - _all: number; - }; - - export type MealItemAvgAggregateInputType = { - calories?: true; - protein?: true; - carbs?: true; - fat?: true; - quantity?: true; - }; - - export type MealItemSumAggregateInputType = { - calories?: true; - protein?: true; - carbs?: true; - fat?: true; - quantity?: true; - }; - - export type MealItemMinAggregateInputType = { - id?: true; - mealId?: true; - userId?: true; - name?: true; - calories?: true; - protein?: true; - carbs?: true; - fat?: true; - quantity?: true; - unit?: true; - isHighInProtein?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - }; - - export type MealItemMaxAggregateInputType = { - id?: true; - mealId?: true; - userId?: true; - name?: true; - calories?: true; - protein?: true; - carbs?: true; - fat?: true; - quantity?: true; - unit?: true; - isHighInProtein?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - }; - - export type MealItemCountAggregateInputType = { - id?: true; - mealId?: true; - userId?: true; - name?: true; - calories?: true; - protein?: true; - carbs?: true; - fat?: true; - quantity?: true; - unit?: true; - isHighInProtein?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - _all?: true; - }; - - export type MealItemAggregateArgs = { - /** - * Filter which MealItem to aggregate. - */ - where?: MealItemWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of MealItems to fetch. - */ - orderBy?: MealItemOrderByWithRelationInput | MealItemOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: MealItemWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` MealItems from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` MealItems. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned MealItems - **/ - _count?: true | MealItemCountAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: MealItemAvgAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: MealItemSumAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: MealItemMinAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: MealItemMaxAggregateInputType; - }; - - export type GetMealItemAggregateType = { - [P in keyof T & keyof AggregateMealItem]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType; - }; - - export type MealItemGroupByArgs = { - where?: MealItemWhereInput; - orderBy?: MealItemOrderByWithAggregationInput | MealItemOrderByWithAggregationInput[]; - by: MealItemScalarFieldEnum[] | MealItemScalarFieldEnum; - having?: MealItemScalarWhereWithAggregatesInput; - take?: number; - skip?: number; - _count?: MealItemCountAggregateInputType | true; - _avg?: MealItemAvgAggregateInputType; - _sum?: MealItemSumAggregateInputType; - _min?: MealItemMinAggregateInputType; - _max?: MealItemMaxAggregateInputType; - }; - - export type MealItemGroupByOutputType = { - id: string; - mealId: string; - userId: string; - name: string; - calories: number | null; - protein: number | null; - carbs: number | null; - fat: number | null; - quantity: number | null; - unit: string | null; - isHighInProtein: boolean; - createdAt: Date; - updatedAt: Date; - syncedAt: Date | null; - isDeleted: boolean; - _count: MealItemCountAggregateOutputType | null; - _avg: MealItemAvgAggregateOutputType | null; - _sum: MealItemSumAggregateOutputType | null; - _min: MealItemMinAggregateOutputType | null; - _max: MealItemMaxAggregateOutputType | null; - }; - - type GetMealItemGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & { - [P in keyof T & keyof MealItemGroupByOutputType]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType; - } - > - >; - - export type MealItemSelect = - $Extensions.GetSelect< - { - id?: boolean; - mealId?: boolean; - userId?: boolean; - name?: boolean; - calories?: boolean; - protein?: boolean; - carbs?: boolean; - fat?: boolean; - quantity?: boolean; - unit?: boolean; - isHighInProtein?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - meal?: boolean | MealDefaultArgs; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['mealItem'] - >; - - export type MealItemSelectCreateManyAndReturn = - $Extensions.GetSelect< - { - id?: boolean; - mealId?: boolean; - userId?: boolean; - name?: boolean; - calories?: boolean; - protein?: boolean; - carbs?: boolean; - fat?: boolean; - quantity?: boolean; - unit?: boolean; - isHighInProtein?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - meal?: boolean | MealDefaultArgs; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['mealItem'] - >; - - export type MealItemSelectUpdateManyAndReturn = - $Extensions.GetSelect< - { - id?: boolean; - mealId?: boolean; - userId?: boolean; - name?: boolean; - calories?: boolean; - protein?: boolean; - carbs?: boolean; - fat?: boolean; - quantity?: boolean; - unit?: boolean; - isHighInProtein?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - meal?: boolean | MealDefaultArgs; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['mealItem'] - >; - - export type MealItemSelectScalar = { - id?: boolean; - mealId?: boolean; - userId?: boolean; - name?: boolean; - calories?: boolean; - protein?: boolean; - carbs?: boolean; - fat?: boolean; - quantity?: boolean; - unit?: boolean; - isHighInProtein?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - }; - - export type MealItemOmit = $Extensions.GetOmit< - | 'id' - | 'mealId' - | 'userId' - | 'name' - | 'calories' - | 'protein' - | 'carbs' - | 'fat' - | 'quantity' - | 'unit' - | 'isHighInProtein' - | 'createdAt' - | 'updatedAt' - | 'syncedAt' - | 'isDeleted', - ExtArgs['result']['mealItem'] - >; - export type MealItemInclude = { - meal?: boolean | MealDefaultArgs; - user?: boolean | UserDefaultArgs; - }; - export type MealItemIncludeCreateManyAndReturn = { - meal?: boolean | MealDefaultArgs; - user?: boolean | UserDefaultArgs; - }; - export type MealItemIncludeUpdateManyAndReturn = { - meal?: boolean | MealDefaultArgs; - user?: boolean | UserDefaultArgs; - }; - - export type $MealItemPayload = { - name: 'MealItem'; - objects: { - meal: Prisma.$MealPayload; - user: Prisma.$UserPayload; - }; - scalars: $Extensions.GetPayloadResult< - { - id: string; - mealId: string; - userId: string; - name: string; - calories: number | null; - protein: number | null; - carbs: number | null; - fat: number | null; - quantity: number | null; - unit: string | null; - isHighInProtein: boolean; - createdAt: Date; - updatedAt: Date; - syncedAt: Date | null; - isDeleted: boolean; - }, - ExtArgs['result']['mealItem'] - >; - composites: {}; - }; - - type MealItemGetPayload = $Result.GetResult< - Prisma.$MealItemPayload, - S - >; - - type MealItemCountArgs = Omit< - MealItemFindManyArgs, - 'select' | 'include' | 'distinct' | 'omit' - > & { - select?: MealItemCountAggregateInputType | true; - }; - - export interface MealItemDelegate< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > { - [K: symbol]: { types: Prisma.TypeMap['model']['MealItem']; meta: { name: 'MealItem' } }; - /** - * Find zero or one MealItem that matches the filter. - * @param {MealItemFindUniqueArgs} args - Arguments to find a MealItem - * @example - * // Get one MealItem - * const mealItem = await prisma.mealItem.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique( - args: SelectSubset> - ): Prisma__MealItemClient< - $Result.GetResult, T, 'findUnique', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find one MealItem that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {MealItemFindUniqueOrThrowArgs} args - Arguments to find a MealItem - * @example - * // Get one MealItem - * const mealItem = await prisma.mealItem.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow( - args: SelectSubset> - ): Prisma__MealItemClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first MealItem that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MealItemFindFirstArgs} args - Arguments to find a MealItem - * @example - * // Get one MealItem - * const mealItem = await prisma.mealItem.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst( - args?: SelectSubset> - ): Prisma__MealItemClient< - $Result.GetResult, T, 'findFirst', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first MealItem that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MealItemFindFirstOrThrowArgs} args - Arguments to find a MealItem - * @example - * // Get one MealItem - * const mealItem = await prisma.mealItem.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow( - args?: SelectSubset> - ): Prisma__MealItemClient< - $Result.GetResult, T, 'findFirstOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find zero or more MealItems that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MealItemFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all MealItems - * const mealItems = await prisma.mealItem.findMany() - * - * // Get first 10 MealItems - * const mealItems = await prisma.mealItem.findMany({ take: 10 }) - * - * // Only select the `id` - * const mealItemWithIdOnly = await prisma.mealItem.findMany({ select: { id: true } }) - * - */ - findMany( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany', GlobalOmitOptions>>; - - /** - * Create a MealItem. - * @param {MealItemCreateArgs} args - Arguments to create a MealItem. - * @example - * // Create one MealItem - * const MealItem = await prisma.mealItem.create({ - * data: { - * // ... data to create a MealItem - * } - * }) - * - */ - create( - args: SelectSubset> - ): Prisma__MealItemClient< - $Result.GetResult, T, 'create', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Create many MealItems. - * @param {MealItemCreateManyArgs} args - Arguments to create many MealItems. - * @example - * // Create many MealItems - * const mealItem = await prisma.mealItem.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Create many MealItems and returns the data saved in the database. - * @param {MealItemCreateManyAndReturnArgs} args - Arguments to create many MealItems. - * @example - * // Create many MealItems - * const mealItem = await prisma.mealItem.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many MealItems and only return the `id` - * const mealItemWithIdOnly = await prisma.mealItem.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn( - args?: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'createManyAndReturn', GlobalOmitOptions> - >; - - /** - * Delete a MealItem. - * @param {MealItemDeleteArgs} args - Arguments to delete one MealItem. - * @example - * // Delete one MealItem - * const MealItem = await prisma.mealItem.delete({ - * where: { - * // ... filter to delete one MealItem - * } - * }) - * - */ - delete( - args: SelectSubset> - ): Prisma__MealItemClient< - $Result.GetResult, T, 'delete', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Update one MealItem. - * @param {MealItemUpdateArgs} args - Arguments to update one MealItem. - * @example - * // Update one MealItem - * const mealItem = await prisma.mealItem.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update( - args: SelectSubset> - ): Prisma__MealItemClient< - $Result.GetResult, T, 'update', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Delete zero or more MealItems. - * @param {MealItemDeleteManyArgs} args - Arguments to filter MealItems to delete. - * @example - * // Delete a few MealItems - * const { count } = await prisma.mealItem.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more MealItems. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MealItemUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many MealItems - * const mealItem = await prisma.mealItem.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany( - args: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more MealItems and returns the data updated in the database. - * @param {MealItemUpdateManyAndReturnArgs} args - Arguments to update many MealItems. - * @example - * // Update many MealItems - * const mealItem = await prisma.mealItem.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more MealItems and only return the `id` - * const mealItemWithIdOnly = await prisma.mealItem.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn( - args: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'updateManyAndReturn', GlobalOmitOptions> - >; - - /** - * Create or update one MealItem. - * @param {MealItemUpsertArgs} args - Arguments to update or create a MealItem. - * @example - * // Update or create a MealItem - * const mealItem = await prisma.mealItem.upsert({ - * create: { - * // ... data to create a MealItem - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the MealItem we want to update - * } - * }) - */ - upsert( - args: SelectSubset> - ): Prisma__MealItemClient< - $Result.GetResult, T, 'upsert', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Count the number of MealItems. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MealItemCountArgs} args - Arguments to filter MealItems to count. - * @example - * // Count the number of MealItems - * const count = await prisma.mealItem.count({ - * where: { - * // ... the filter for the MealItems we want to count - * } - * }) - **/ - count( - args?: Subset - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - >; - - /** - * Allows you to perform aggregations operations on a MealItem. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MealItemAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate( - args: Subset - ): Prisma.PrismaPromise>; - - /** - * Group by MealItem. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {MealItemGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends MealItemGroupByArgs, - HasSelectOrTake extends Or>, Extends<'take', Keys>>, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: MealItemGroupByArgs['orderBy'] } - : { orderBy?: MealItemGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [Error, 'Field ', P, ` in "having" needs to be provided in "by"`]; - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields], - >( - args: SubsetIntersection & InputErrors - ): {} extends InputErrors ? GetMealItemGroupByPayload : Prisma.PrismaPromise; - /** - * Fields of the MealItem model - */ - readonly fields: MealItemFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for MealItem. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__MealItemClient< - T, - Null = never, - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - meal = {}>( - args?: Subset> - ): Prisma__MealClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions> | Null, - Null, - ExtArgs, - GlobalOmitOptions - >; - user = {}>( - args?: Subset> - ): Prisma__UserClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions> | Null, - Null, - ExtArgs, - GlobalOmitOptions - >; - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then( - onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, - onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch( - onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; - } - - /** - * Fields of the MealItem model - */ - interface MealItemFieldRefs { - readonly id: FieldRef<'MealItem', 'String'>; - readonly mealId: FieldRef<'MealItem', 'String'>; - readonly userId: FieldRef<'MealItem', 'String'>; - readonly name: FieldRef<'MealItem', 'String'>; - readonly calories: FieldRef<'MealItem', 'Int'>; - readonly protein: FieldRef<'MealItem', 'Float'>; - readonly carbs: FieldRef<'MealItem', 'Float'>; - readonly fat: FieldRef<'MealItem', 'Float'>; - readonly quantity: FieldRef<'MealItem', 'Float'>; - readonly unit: FieldRef<'MealItem', 'String'>; - readonly isHighInProtein: FieldRef<'MealItem', 'Boolean'>; - readonly createdAt: FieldRef<'MealItem', 'DateTime'>; - readonly updatedAt: FieldRef<'MealItem', 'DateTime'>; - readonly syncedAt: FieldRef<'MealItem', 'DateTime'>; - readonly isDeleted: FieldRef<'MealItem', 'Boolean'>; - } - - // Custom InputTypes - /** - * MealItem findUnique - */ - export type MealItemFindUniqueArgs = { - /** - * Select specific fields to fetch from the MealItem - */ - select?: MealItemSelect | null; - /** - * Omit specific fields from the MealItem - */ - omit?: MealItemOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealItemInclude | null; - /** - * Filter, which MealItem to fetch. - */ - where: MealItemWhereUniqueInput; - }; - - /** - * MealItem findUniqueOrThrow - */ - export type MealItemFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the MealItem - */ - select?: MealItemSelect | null; - /** - * Omit specific fields from the MealItem - */ - omit?: MealItemOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealItemInclude | null; - /** - * Filter, which MealItem to fetch. - */ - where: MealItemWhereUniqueInput; - }; - - /** - * MealItem findFirst - */ - export type MealItemFindFirstArgs = { - /** - * Select specific fields to fetch from the MealItem - */ - select?: MealItemSelect | null; - /** - * Omit specific fields from the MealItem - */ - omit?: MealItemOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealItemInclude | null; - /** - * Filter, which MealItem to fetch. - */ - where?: MealItemWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of MealItems to fetch. - */ - orderBy?: MealItemOrderByWithRelationInput | MealItemOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for MealItems. - */ - cursor?: MealItemWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` MealItems from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` MealItems. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of MealItems. - */ - distinct?: MealItemScalarFieldEnum | MealItemScalarFieldEnum[]; - }; - - /** - * MealItem findFirstOrThrow - */ - export type MealItemFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the MealItem - */ - select?: MealItemSelect | null; - /** - * Omit specific fields from the MealItem - */ - omit?: MealItemOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealItemInclude | null; - /** - * Filter, which MealItem to fetch. - */ - where?: MealItemWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of MealItems to fetch. - */ - orderBy?: MealItemOrderByWithRelationInput | MealItemOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for MealItems. - */ - cursor?: MealItemWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` MealItems from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` MealItems. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of MealItems. - */ - distinct?: MealItemScalarFieldEnum | MealItemScalarFieldEnum[]; - }; - - /** - * MealItem findMany - */ - export type MealItemFindManyArgs = { - /** - * Select specific fields to fetch from the MealItem - */ - select?: MealItemSelect | null; - /** - * Omit specific fields from the MealItem - */ - omit?: MealItemOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealItemInclude | null; - /** - * Filter, which MealItems to fetch. - */ - where?: MealItemWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of MealItems to fetch. - */ - orderBy?: MealItemOrderByWithRelationInput | MealItemOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing MealItems. - */ - cursor?: MealItemWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` MealItems from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` MealItems. - */ - skip?: number; - distinct?: MealItemScalarFieldEnum | MealItemScalarFieldEnum[]; - }; - - /** - * MealItem create - */ - export type MealItemCreateArgs = { - /** - * Select specific fields to fetch from the MealItem - */ - select?: MealItemSelect | null; - /** - * Omit specific fields from the MealItem - */ - omit?: MealItemOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealItemInclude | null; - /** - * The data needed to create a MealItem. - */ - data: XOR; - }; - - /** - * MealItem createMany - */ - export type MealItemCreateManyArgs = { - /** - * The data used to create many MealItems. - */ - data: MealItemCreateManyInput | MealItemCreateManyInput[]; - skipDuplicates?: boolean; - }; - - /** - * MealItem createManyAndReturn - */ - export type MealItemCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the MealItem - */ - select?: MealItemSelectCreateManyAndReturn | null; - /** - * Omit specific fields from the MealItem - */ - omit?: MealItemOmit | null; - /** - * The data used to create many MealItems. - */ - data: MealItemCreateManyInput | MealItemCreateManyInput[]; - skipDuplicates?: boolean; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealItemIncludeCreateManyAndReturn | null; - }; - - /** - * MealItem update - */ - export type MealItemUpdateArgs = { - /** - * Select specific fields to fetch from the MealItem - */ - select?: MealItemSelect | null; - /** - * Omit specific fields from the MealItem - */ - omit?: MealItemOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealItemInclude | null; - /** - * The data needed to update a MealItem. - */ - data: XOR; - /** - * Choose, which MealItem to update. - */ - where: MealItemWhereUniqueInput; - }; - - /** - * MealItem updateMany - */ - export type MealItemUpdateManyArgs = { - /** - * The data used to update MealItems. - */ - data: XOR; - /** - * Filter which MealItems to update - */ - where?: MealItemWhereInput; - /** - * Limit how many MealItems to update. - */ - limit?: number; - }; - - /** - * MealItem updateManyAndReturn - */ - export type MealItemUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the MealItem - */ - select?: MealItemSelectUpdateManyAndReturn | null; - /** - * Omit specific fields from the MealItem - */ - omit?: MealItemOmit | null; - /** - * The data used to update MealItems. - */ - data: XOR; - /** - * Filter which MealItems to update - */ - where?: MealItemWhereInput; - /** - * Limit how many MealItems to update. - */ - limit?: number; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealItemIncludeUpdateManyAndReturn | null; - }; - - /** - * MealItem upsert - */ - export type MealItemUpsertArgs = { - /** - * Select specific fields to fetch from the MealItem - */ - select?: MealItemSelect | null; - /** - * Omit specific fields from the MealItem - */ - omit?: MealItemOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealItemInclude | null; - /** - * The filter to search for the MealItem to update in case it exists. - */ - where: MealItemWhereUniqueInput; - /** - * In case the MealItem found by the `where` argument doesn't exist, create a new MealItem with this data. - */ - create: XOR; - /** - * In case the MealItem was found with the provided `where` argument, update it with this data. - */ - update: XOR; - }; - - /** - * MealItem delete - */ - export type MealItemDeleteArgs = { - /** - * Select specific fields to fetch from the MealItem - */ - select?: MealItemSelect | null; - /** - * Omit specific fields from the MealItem - */ - omit?: MealItemOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealItemInclude | null; - /** - * Filter which MealItem to delete. - */ - where: MealItemWhereUniqueInput; - }; - - /** - * MealItem deleteMany - */ - export type MealItemDeleteManyArgs = { - /** - * Filter which MealItems to delete - */ - where?: MealItemWhereInput; - /** - * Limit how many MealItems to delete. - */ - limit?: number; - }; - - /** - * MealItem without action - */ - export type MealItemDefaultArgs = { - /** - * Select specific fields to fetch from the MealItem - */ - select?: MealItemSelect | null; - /** - * Omit specific fields from the MealItem - */ - omit?: MealItemOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: MealItemInclude | null; - }; - - /** - * Model ProgressLog - */ - - export type AggregateProgressLog = { - _count: ProgressLogCountAggregateOutputType | null; - _avg: ProgressLogAvgAggregateOutputType | null; - _sum: ProgressLogSumAggregateOutputType | null; - _min: ProgressLogMinAggregateOutputType | null; - _max: ProgressLogMaxAggregateOutputType | null; - }; - - export type ProgressLogAvgAggregateOutputType = { - waterL: number | null; - sleepHrs: number | null; - weightKg: number | null; - steps: number | null; - activeMinutes: number | null; - }; - - export type ProgressLogSumAggregateOutputType = { - waterL: number | null; - sleepHrs: number | null; - weightKg: number | null; - steps: number | null; - activeMinutes: number | null; - }; - - export type ProgressLogMinAggregateOutputType = { - id: string | null; - userId: string | null; - date: Date | null; - waterL: number | null; - sleepHrs: number | null; - mood: string | null; - weightKg: number | null; - steps: number | null; - activeMinutes: number | null; - createdAt: Date | null; - updatedAt: Date | null; - syncedAt: Date | null; - isDeleted: boolean | null; - }; - - export type ProgressLogMaxAggregateOutputType = { - id: string | null; - userId: string | null; - date: Date | null; - waterL: number | null; - sleepHrs: number | null; - mood: string | null; - weightKg: number | null; - steps: number | null; - activeMinutes: number | null; - createdAt: Date | null; - updatedAt: Date | null; - syncedAt: Date | null; - isDeleted: boolean | null; - }; - - export type ProgressLogCountAggregateOutputType = { - id: number; - userId: number; - date: number; - waterL: number; - sleepHrs: number; - mood: number; - weightKg: number; - steps: number; - activeMinutes: number; - createdAt: number; - updatedAt: number; - syncedAt: number; - isDeleted: number; - _all: number; - }; - - export type ProgressLogAvgAggregateInputType = { - waterL?: true; - sleepHrs?: true; - weightKg?: true; - steps?: true; - activeMinutes?: true; - }; - - export type ProgressLogSumAggregateInputType = { - waterL?: true; - sleepHrs?: true; - weightKg?: true; - steps?: true; - activeMinutes?: true; - }; - - export type ProgressLogMinAggregateInputType = { - id?: true; - userId?: true; - date?: true; - waterL?: true; - sleepHrs?: true; - mood?: true; - weightKg?: true; - steps?: true; - activeMinutes?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - }; - - export type ProgressLogMaxAggregateInputType = { - id?: true; - userId?: true; - date?: true; - waterL?: true; - sleepHrs?: true; - mood?: true; - weightKg?: true; - steps?: true; - activeMinutes?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - }; - - export type ProgressLogCountAggregateInputType = { - id?: true; - userId?: true; - date?: true; - waterL?: true; - sleepHrs?: true; - mood?: true; - weightKg?: true; - steps?: true; - activeMinutes?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - _all?: true; - }; - - export type ProgressLogAggregateArgs = { - /** - * Filter which ProgressLog to aggregate. - */ - where?: ProgressLogWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ProgressLogs to fetch. - */ - orderBy?: ProgressLogOrderByWithRelationInput | ProgressLogOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: ProgressLogWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ProgressLogs from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ProgressLogs. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned ProgressLogs - **/ - _count?: true | ProgressLogCountAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: ProgressLogAvgAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: ProgressLogSumAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: ProgressLogMinAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: ProgressLogMaxAggregateInputType; - }; - - export type GetProgressLogAggregateType = { - [P in keyof T & keyof AggregateProgressLog]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType; - }; - - export type ProgressLogGroupByArgs = { - where?: ProgressLogWhereInput; - orderBy?: ProgressLogOrderByWithAggregationInput | ProgressLogOrderByWithAggregationInput[]; - by: ProgressLogScalarFieldEnum[] | ProgressLogScalarFieldEnum; - having?: ProgressLogScalarWhereWithAggregatesInput; - take?: number; - skip?: number; - _count?: ProgressLogCountAggregateInputType | true; - _avg?: ProgressLogAvgAggregateInputType; - _sum?: ProgressLogSumAggregateInputType; - _min?: ProgressLogMinAggregateInputType; - _max?: ProgressLogMaxAggregateInputType; - }; - - export type ProgressLogGroupByOutputType = { - id: string; - userId: string; - date: Date; - waterL: number | null; - sleepHrs: number | null; - mood: string | null; - weightKg: number | null; - steps: number | null; - activeMinutes: number | null; - createdAt: Date; - updatedAt: Date; - syncedAt: Date | null; - isDeleted: boolean; - _count: ProgressLogCountAggregateOutputType | null; - _avg: ProgressLogAvgAggregateOutputType | null; - _sum: ProgressLogSumAggregateOutputType | null; - _min: ProgressLogMinAggregateOutputType | null; - _max: ProgressLogMaxAggregateOutputType | null; - }; - - type GetProgressLogGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & { - [P in keyof T & keyof ProgressLogGroupByOutputType]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType; - } - > - >; - - export type ProgressLogSelect = - $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - date?: boolean; - waterL?: boolean; - sleepHrs?: boolean; - mood?: boolean; - weightKg?: boolean; - steps?: boolean; - activeMinutes?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['progressLog'] - >; - - export type ProgressLogSelectCreateManyAndReturn = - $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - date?: boolean; - waterL?: boolean; - sleepHrs?: boolean; - mood?: boolean; - weightKg?: boolean; - steps?: boolean; - activeMinutes?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['progressLog'] - >; - - export type ProgressLogSelectUpdateManyAndReturn = - $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - date?: boolean; - waterL?: boolean; - sleepHrs?: boolean; - mood?: boolean; - weightKg?: boolean; - steps?: boolean; - activeMinutes?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['progressLog'] - >; - - export type ProgressLogSelectScalar = { - id?: boolean; - userId?: boolean; - date?: boolean; - waterL?: boolean; - sleepHrs?: boolean; - mood?: boolean; - weightKg?: boolean; - steps?: boolean; - activeMinutes?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - }; - - export type ProgressLogOmit = $Extensions.GetOmit< - | 'id' - | 'userId' - | 'date' - | 'waterL' - | 'sleepHrs' - | 'mood' - | 'weightKg' - | 'steps' - | 'activeMinutes' - | 'createdAt' - | 'updatedAt' - | 'syncedAt' - | 'isDeleted', - ExtArgs['result']['progressLog'] - >; - export type ProgressLogInclude = { - user?: boolean | UserDefaultArgs; - }; - export type ProgressLogIncludeCreateManyAndReturn< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - > = { - user?: boolean | UserDefaultArgs; - }; - export type ProgressLogIncludeUpdateManyAndReturn< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - > = { - user?: boolean | UserDefaultArgs; - }; - - export type $ProgressLogPayload = { - name: 'ProgressLog'; - objects: { - user: Prisma.$UserPayload; - }; - scalars: $Extensions.GetPayloadResult< - { - id: string; - userId: string; - date: Date; - waterL: number | null; - sleepHrs: number | null; - mood: string | null; - weightKg: number | null; - steps: number | null; - activeMinutes: number | null; - createdAt: Date; - updatedAt: Date; - syncedAt: Date | null; - isDeleted: boolean; - }, - ExtArgs['result']['progressLog'] - >; - composites: {}; - }; - - type ProgressLogGetPayload = $Result.GetResult< - Prisma.$ProgressLogPayload, - S - >; - - type ProgressLogCountArgs = Omit< - ProgressLogFindManyArgs, - 'select' | 'include' | 'distinct' | 'omit' - > & { - select?: ProgressLogCountAggregateInputType | true; - }; - - export interface ProgressLogDelegate< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > { - [K: symbol]: { types: Prisma.TypeMap['model']['ProgressLog']; meta: { name: 'ProgressLog' } }; - /** - * Find zero or one ProgressLog that matches the filter. - * @param {ProgressLogFindUniqueArgs} args - Arguments to find a ProgressLog - * @example - * // Get one ProgressLog - * const progressLog = await prisma.progressLog.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique( - args: SelectSubset> - ): Prisma__ProgressLogClient< - $Result.GetResult, T, 'findUnique', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find one ProgressLog that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {ProgressLogFindUniqueOrThrowArgs} args - Arguments to find a ProgressLog - * @example - * // Get one ProgressLog - * const progressLog = await prisma.progressLog.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow( - args: SelectSubset> - ): Prisma__ProgressLogClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first ProgressLog that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProgressLogFindFirstArgs} args - Arguments to find a ProgressLog - * @example - * // Get one ProgressLog - * const progressLog = await prisma.progressLog.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst( - args?: SelectSubset> - ): Prisma__ProgressLogClient< - $Result.GetResult, T, 'findFirst', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first ProgressLog that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProgressLogFindFirstOrThrowArgs} args - Arguments to find a ProgressLog - * @example - * // Get one ProgressLog - * const progressLog = await prisma.progressLog.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow( - args?: SelectSubset> - ): Prisma__ProgressLogClient< - $Result.GetResult, T, 'findFirstOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find zero or more ProgressLogs that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProgressLogFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all ProgressLogs - * const progressLogs = await prisma.progressLog.findMany() - * - * // Get first 10 ProgressLogs - * const progressLogs = await prisma.progressLog.findMany({ take: 10 }) - * - * // Only select the `id` - * const progressLogWithIdOnly = await prisma.progressLog.findMany({ select: { id: true } }) - * - */ - findMany( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany', GlobalOmitOptions>>; - - /** - * Create a ProgressLog. - * @param {ProgressLogCreateArgs} args - Arguments to create a ProgressLog. - * @example - * // Create one ProgressLog - * const ProgressLog = await prisma.progressLog.create({ - * data: { - * // ... data to create a ProgressLog - * } - * }) - * - */ - create( - args: SelectSubset> - ): Prisma__ProgressLogClient< - $Result.GetResult, T, 'create', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Create many ProgressLogs. - * @param {ProgressLogCreateManyArgs} args - Arguments to create many ProgressLogs. - * @example - * // Create many ProgressLogs - * const progressLog = await prisma.progressLog.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Create many ProgressLogs and returns the data saved in the database. - * @param {ProgressLogCreateManyAndReturnArgs} args - Arguments to create many ProgressLogs. - * @example - * // Create many ProgressLogs - * const progressLog = await prisma.progressLog.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many ProgressLogs and only return the `id` - * const progressLogWithIdOnly = await prisma.progressLog.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn( - args?: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'createManyAndReturn', GlobalOmitOptions> - >; - - /** - * Delete a ProgressLog. - * @param {ProgressLogDeleteArgs} args - Arguments to delete one ProgressLog. - * @example - * // Delete one ProgressLog - * const ProgressLog = await prisma.progressLog.delete({ - * where: { - * // ... filter to delete one ProgressLog - * } - * }) - * - */ - delete( - args: SelectSubset> - ): Prisma__ProgressLogClient< - $Result.GetResult, T, 'delete', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Update one ProgressLog. - * @param {ProgressLogUpdateArgs} args - Arguments to update one ProgressLog. - * @example - * // Update one ProgressLog - * const progressLog = await prisma.progressLog.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update( - args: SelectSubset> - ): Prisma__ProgressLogClient< - $Result.GetResult, T, 'update', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Delete zero or more ProgressLogs. - * @param {ProgressLogDeleteManyArgs} args - Arguments to filter ProgressLogs to delete. - * @example - * // Delete a few ProgressLogs - * const { count } = await prisma.progressLog.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more ProgressLogs. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProgressLogUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many ProgressLogs - * const progressLog = await prisma.progressLog.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany( - args: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more ProgressLogs and returns the data updated in the database. - * @param {ProgressLogUpdateManyAndReturnArgs} args - Arguments to update many ProgressLogs. - * @example - * // Update many ProgressLogs - * const progressLog = await prisma.progressLog.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more ProgressLogs and only return the `id` - * const progressLogWithIdOnly = await prisma.progressLog.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn( - args: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'updateManyAndReturn', GlobalOmitOptions> - >; - - /** - * Create or update one ProgressLog. - * @param {ProgressLogUpsertArgs} args - Arguments to update or create a ProgressLog. - * @example - * // Update or create a ProgressLog - * const progressLog = await prisma.progressLog.upsert({ - * create: { - * // ... data to create a ProgressLog - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the ProgressLog we want to update - * } - * }) - */ - upsert( - args: SelectSubset> - ): Prisma__ProgressLogClient< - $Result.GetResult, T, 'upsert', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Count the number of ProgressLogs. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProgressLogCountArgs} args - Arguments to filter ProgressLogs to count. - * @example - * // Count the number of ProgressLogs - * const count = await prisma.progressLog.count({ - * where: { - * // ... the filter for the ProgressLogs we want to count - * } - * }) - **/ - count( - args?: Subset - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - >; - - /** - * Allows you to perform aggregations operations on a ProgressLog. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProgressLogAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate( - args: Subset - ): Prisma.PrismaPromise>; - - /** - * Group by ProgressLog. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProgressLogGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends ProgressLogGroupByArgs, - HasSelectOrTake extends Or>, Extends<'take', Keys>>, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: ProgressLogGroupByArgs['orderBy'] } - : { orderBy?: ProgressLogGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [Error, 'Field ', P, ` in "having" needs to be provided in "by"`]; - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields], - >( - args: SubsetIntersection & InputErrors - ): {} extends InputErrors ? GetProgressLogGroupByPayload : Prisma.PrismaPromise; - /** - * Fields of the ProgressLog model - */ - readonly fields: ProgressLogFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for ProgressLog. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__ProgressLogClient< - T, - Null = never, - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - user = {}>( - args?: Subset> - ): Prisma__UserClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions> | Null, - Null, - ExtArgs, - GlobalOmitOptions - >; - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then( - onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, - onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch( - onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; - } - - /** - * Fields of the ProgressLog model - */ - interface ProgressLogFieldRefs { - readonly id: FieldRef<'ProgressLog', 'String'>; - readonly userId: FieldRef<'ProgressLog', 'String'>; - readonly date: FieldRef<'ProgressLog', 'DateTime'>; - readonly waterL: FieldRef<'ProgressLog', 'Float'>; - readonly sleepHrs: FieldRef<'ProgressLog', 'Float'>; - readonly mood: FieldRef<'ProgressLog', 'String'>; - readonly weightKg: FieldRef<'ProgressLog', 'Float'>; - readonly steps: FieldRef<'ProgressLog', 'Int'>; - readonly activeMinutes: FieldRef<'ProgressLog', 'Int'>; - readonly createdAt: FieldRef<'ProgressLog', 'DateTime'>; - readonly updatedAt: FieldRef<'ProgressLog', 'DateTime'>; - readonly syncedAt: FieldRef<'ProgressLog', 'DateTime'>; - readonly isDeleted: FieldRef<'ProgressLog', 'Boolean'>; - } - - // Custom InputTypes - /** - * ProgressLog findUnique - */ - export type ProgressLogFindUniqueArgs = { - /** - * Select specific fields to fetch from the ProgressLog - */ - select?: ProgressLogSelect | null; - /** - * Omit specific fields from the ProgressLog - */ - omit?: ProgressLogOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ProgressLogInclude | null; - /** - * Filter, which ProgressLog to fetch. - */ - where: ProgressLogWhereUniqueInput; - }; - - /** - * ProgressLog findUniqueOrThrow - */ - export type ProgressLogFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the ProgressLog - */ - select?: ProgressLogSelect | null; - /** - * Omit specific fields from the ProgressLog - */ - omit?: ProgressLogOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ProgressLogInclude | null; - /** - * Filter, which ProgressLog to fetch. - */ - where: ProgressLogWhereUniqueInput; - }; - - /** - * ProgressLog findFirst - */ - export type ProgressLogFindFirstArgs = { - /** - * Select specific fields to fetch from the ProgressLog - */ - select?: ProgressLogSelect | null; - /** - * Omit specific fields from the ProgressLog - */ - omit?: ProgressLogOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ProgressLogInclude | null; - /** - * Filter, which ProgressLog to fetch. - */ - where?: ProgressLogWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ProgressLogs to fetch. - */ - orderBy?: ProgressLogOrderByWithRelationInput | ProgressLogOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for ProgressLogs. - */ - cursor?: ProgressLogWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ProgressLogs from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ProgressLogs. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of ProgressLogs. - */ - distinct?: ProgressLogScalarFieldEnum | ProgressLogScalarFieldEnum[]; - }; - - /** - * ProgressLog findFirstOrThrow - */ - export type ProgressLogFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the ProgressLog - */ - select?: ProgressLogSelect | null; - /** - * Omit specific fields from the ProgressLog - */ - omit?: ProgressLogOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ProgressLogInclude | null; - /** - * Filter, which ProgressLog to fetch. - */ - where?: ProgressLogWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ProgressLogs to fetch. - */ - orderBy?: ProgressLogOrderByWithRelationInput | ProgressLogOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for ProgressLogs. - */ - cursor?: ProgressLogWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ProgressLogs from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ProgressLogs. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of ProgressLogs. - */ - distinct?: ProgressLogScalarFieldEnum | ProgressLogScalarFieldEnum[]; - }; - - /** - * ProgressLog findMany - */ - export type ProgressLogFindManyArgs = { - /** - * Select specific fields to fetch from the ProgressLog - */ - select?: ProgressLogSelect | null; - /** - * Omit specific fields from the ProgressLog - */ - omit?: ProgressLogOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ProgressLogInclude | null; - /** - * Filter, which ProgressLogs to fetch. - */ - where?: ProgressLogWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ProgressLogs to fetch. - */ - orderBy?: ProgressLogOrderByWithRelationInput | ProgressLogOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing ProgressLogs. - */ - cursor?: ProgressLogWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ProgressLogs from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ProgressLogs. - */ - skip?: number; - distinct?: ProgressLogScalarFieldEnum | ProgressLogScalarFieldEnum[]; - }; - - /** - * ProgressLog create - */ - export type ProgressLogCreateArgs = { - /** - * Select specific fields to fetch from the ProgressLog - */ - select?: ProgressLogSelect | null; - /** - * Omit specific fields from the ProgressLog - */ - omit?: ProgressLogOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ProgressLogInclude | null; - /** - * The data needed to create a ProgressLog. - */ - data: XOR; - }; - - /** - * ProgressLog createMany - */ - export type ProgressLogCreateManyArgs = { - /** - * The data used to create many ProgressLogs. - */ - data: ProgressLogCreateManyInput | ProgressLogCreateManyInput[]; - skipDuplicates?: boolean; - }; - - /** - * ProgressLog createManyAndReturn - */ - export type ProgressLogCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the ProgressLog - */ - select?: ProgressLogSelectCreateManyAndReturn | null; - /** - * Omit specific fields from the ProgressLog - */ - omit?: ProgressLogOmit | null; - /** - * The data used to create many ProgressLogs. - */ - data: ProgressLogCreateManyInput | ProgressLogCreateManyInput[]; - skipDuplicates?: boolean; - /** - * Choose, which related nodes to fetch as well - */ - include?: ProgressLogIncludeCreateManyAndReturn | null; - }; - - /** - * ProgressLog update - */ - export type ProgressLogUpdateArgs = { - /** - * Select specific fields to fetch from the ProgressLog - */ - select?: ProgressLogSelect | null; - /** - * Omit specific fields from the ProgressLog - */ - omit?: ProgressLogOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ProgressLogInclude | null; - /** - * The data needed to update a ProgressLog. - */ - data: XOR; - /** - * Choose, which ProgressLog to update. - */ - where: ProgressLogWhereUniqueInput; - }; - - /** - * ProgressLog updateMany - */ - export type ProgressLogUpdateManyArgs = { - /** - * The data used to update ProgressLogs. - */ - data: XOR; - /** - * Filter which ProgressLogs to update - */ - where?: ProgressLogWhereInput; - /** - * Limit how many ProgressLogs to update. - */ - limit?: number; - }; - - /** - * ProgressLog updateManyAndReturn - */ - export type ProgressLogUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the ProgressLog - */ - select?: ProgressLogSelectUpdateManyAndReturn | null; - /** - * Omit specific fields from the ProgressLog - */ - omit?: ProgressLogOmit | null; - /** - * The data used to update ProgressLogs. - */ - data: XOR; - /** - * Filter which ProgressLogs to update - */ - where?: ProgressLogWhereInput; - /** - * Limit how many ProgressLogs to update. - */ - limit?: number; - /** - * Choose, which related nodes to fetch as well - */ - include?: ProgressLogIncludeUpdateManyAndReturn | null; - }; - - /** - * ProgressLog upsert - */ - export type ProgressLogUpsertArgs = { - /** - * Select specific fields to fetch from the ProgressLog - */ - select?: ProgressLogSelect | null; - /** - * Omit specific fields from the ProgressLog - */ - omit?: ProgressLogOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ProgressLogInclude | null; - /** - * The filter to search for the ProgressLog to update in case it exists. - */ - where: ProgressLogWhereUniqueInput; - /** - * In case the ProgressLog found by the `where` argument doesn't exist, create a new ProgressLog with this data. - */ - create: XOR; - /** - * In case the ProgressLog was found with the provided `where` argument, update it with this data. - */ - update: XOR; - }; - - /** - * ProgressLog delete - */ - export type ProgressLogDeleteArgs = { - /** - * Select specific fields to fetch from the ProgressLog - */ - select?: ProgressLogSelect | null; - /** - * Omit specific fields from the ProgressLog - */ - omit?: ProgressLogOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ProgressLogInclude | null; - /** - * Filter which ProgressLog to delete. - */ - where: ProgressLogWhereUniqueInput; - }; - - /** - * ProgressLog deleteMany - */ - export type ProgressLogDeleteManyArgs = { - /** - * Filter which ProgressLogs to delete - */ - where?: ProgressLogWhereInput; - /** - * Limit how many ProgressLogs to delete. - */ - limit?: number; - }; - - /** - * ProgressLog without action - */ - export type ProgressLogDefaultArgs = { - /** - * Select specific fields to fetch from the ProgressLog - */ - select?: ProgressLogSelect | null; - /** - * Omit specific fields from the ProgressLog - */ - omit?: ProgressLogOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: ProgressLogInclude | null; - }; - - /** - * Model WeightEntry - */ - - export type AggregateWeightEntry = { - _count: WeightEntryCountAggregateOutputType | null; - _avg: WeightEntryAvgAggregateOutputType | null; - _sum: WeightEntrySumAggregateOutputType | null; - _min: WeightEntryMinAggregateOutputType | null; - _max: WeightEntryMaxAggregateOutputType | null; - }; - - export type WeightEntryAvgAggregateOutputType = { - weightKg: number | null; - bodyFatPercentage: number | null; - muscleMassKg: number | null; - }; - - export type WeightEntrySumAggregateOutputType = { - weightKg: number | null; - bodyFatPercentage: number | null; - muscleMassKg: number | null; - }; - - export type WeightEntryMinAggregateOutputType = { - id: string | null; - userId: string | null; - weightKg: number | null; - date: Date | null; - photo: string | null; - notes: string | null; - bodyFatPercentage: number | null; - muscleMassKg: number | null; - createdAt: Date | null; - updatedAt: Date | null; - syncedAt: Date | null; - isDeleted: boolean | null; - }; - - export type WeightEntryMaxAggregateOutputType = { - id: string | null; - userId: string | null; - weightKg: number | null; - date: Date | null; - photo: string | null; - notes: string | null; - bodyFatPercentage: number | null; - muscleMassKg: number | null; - createdAt: Date | null; - updatedAt: Date | null; - syncedAt: Date | null; - isDeleted: boolean | null; - }; - - export type WeightEntryCountAggregateOutputType = { - id: number; - userId: number; - weightKg: number; - date: number; - photo: number; - notes: number; - bodyFatPercentage: number; - muscleMassKg: number; - createdAt: number; - updatedAt: number; - syncedAt: number; - isDeleted: number; - _all: number; - }; - - export type WeightEntryAvgAggregateInputType = { - weightKg?: true; - bodyFatPercentage?: true; - muscleMassKg?: true; - }; - - export type WeightEntrySumAggregateInputType = { - weightKg?: true; - bodyFatPercentage?: true; - muscleMassKg?: true; - }; - - export type WeightEntryMinAggregateInputType = { - id?: true; - userId?: true; - weightKg?: true; - date?: true; - photo?: true; - notes?: true; - bodyFatPercentage?: true; - muscleMassKg?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - }; - - export type WeightEntryMaxAggregateInputType = { - id?: true; - userId?: true; - weightKg?: true; - date?: true; - photo?: true; - notes?: true; - bodyFatPercentage?: true; - muscleMassKg?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - }; - - export type WeightEntryCountAggregateInputType = { - id?: true; - userId?: true; - weightKg?: true; - date?: true; - photo?: true; - notes?: true; - bodyFatPercentage?: true; - muscleMassKg?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - _all?: true; - }; - - export type WeightEntryAggregateArgs = { - /** - * Filter which WeightEntry to aggregate. - */ - where?: WeightEntryWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of WeightEntries to fetch. - */ - orderBy?: WeightEntryOrderByWithRelationInput | WeightEntryOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: WeightEntryWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` WeightEntries from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` WeightEntries. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned WeightEntries - **/ - _count?: true | WeightEntryCountAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: WeightEntryAvgAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: WeightEntrySumAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: WeightEntryMinAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: WeightEntryMaxAggregateInputType; - }; - - export type GetWeightEntryAggregateType = { - [P in keyof T & keyof AggregateWeightEntry]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType; - }; - - export type WeightEntryGroupByArgs = { - where?: WeightEntryWhereInput; - orderBy?: WeightEntryOrderByWithAggregationInput | WeightEntryOrderByWithAggregationInput[]; - by: WeightEntryScalarFieldEnum[] | WeightEntryScalarFieldEnum; - having?: WeightEntryScalarWhereWithAggregatesInput; - take?: number; - skip?: number; - _count?: WeightEntryCountAggregateInputType | true; - _avg?: WeightEntryAvgAggregateInputType; - _sum?: WeightEntrySumAggregateInputType; - _min?: WeightEntryMinAggregateInputType; - _max?: WeightEntryMaxAggregateInputType; - }; - - export type WeightEntryGroupByOutputType = { - id: string; - userId: string; - weightKg: number; - date: Date; - photo: string | null; - notes: string | null; - bodyFatPercentage: number | null; - muscleMassKg: number | null; - createdAt: Date; - updatedAt: Date; - syncedAt: Date | null; - isDeleted: boolean; - _count: WeightEntryCountAggregateOutputType | null; - _avg: WeightEntryAvgAggregateOutputType | null; - _sum: WeightEntrySumAggregateOutputType | null; - _min: WeightEntryMinAggregateOutputType | null; - _max: WeightEntryMaxAggregateOutputType | null; - }; - - type GetWeightEntryGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & { - [P in keyof T & keyof WeightEntryGroupByOutputType]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType; - } - > - >; - - export type WeightEntrySelect = - $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - weightKg?: boolean; - date?: boolean; - photo?: boolean; - notes?: boolean; - bodyFatPercentage?: boolean; - muscleMassKg?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['weightEntry'] - >; - - export type WeightEntrySelectCreateManyAndReturn = - $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - weightKg?: boolean; - date?: boolean; - photo?: boolean; - notes?: boolean; - bodyFatPercentage?: boolean; - muscleMassKg?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['weightEntry'] - >; - - export type WeightEntrySelectUpdateManyAndReturn = - $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - weightKg?: boolean; - date?: boolean; - photo?: boolean; - notes?: boolean; - bodyFatPercentage?: boolean; - muscleMassKg?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['weightEntry'] - >; - - export type WeightEntrySelectScalar = { - id?: boolean; - userId?: boolean; - weightKg?: boolean; - date?: boolean; - photo?: boolean; - notes?: boolean; - bodyFatPercentage?: boolean; - muscleMassKg?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - }; - - export type WeightEntryOmit = $Extensions.GetOmit< - | 'id' - | 'userId' - | 'weightKg' - | 'date' - | 'photo' - | 'notes' - | 'bodyFatPercentage' - | 'muscleMassKg' - | 'createdAt' - | 'updatedAt' - | 'syncedAt' - | 'isDeleted', - ExtArgs['result']['weightEntry'] - >; - export type WeightEntryInclude = { - user?: boolean | UserDefaultArgs; - }; - export type WeightEntryIncludeCreateManyAndReturn< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - > = { - user?: boolean | UserDefaultArgs; - }; - export type WeightEntryIncludeUpdateManyAndReturn< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - > = { - user?: boolean | UserDefaultArgs; - }; - - export type $WeightEntryPayload = { - name: 'WeightEntry'; - objects: { - user: Prisma.$UserPayload; - }; - scalars: $Extensions.GetPayloadResult< - { - id: string; - userId: string; - weightKg: number; - date: Date; - photo: string | null; - notes: string | null; - bodyFatPercentage: number | null; - muscleMassKg: number | null; - createdAt: Date; - updatedAt: Date; - syncedAt: Date | null; - isDeleted: boolean; - }, - ExtArgs['result']['weightEntry'] - >; - composites: {}; - }; - - type WeightEntryGetPayload = $Result.GetResult< - Prisma.$WeightEntryPayload, - S - >; - - type WeightEntryCountArgs = Omit< - WeightEntryFindManyArgs, - 'select' | 'include' | 'distinct' | 'omit' - > & { - select?: WeightEntryCountAggregateInputType | true; - }; - - export interface WeightEntryDelegate< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > { - [K: symbol]: { types: Prisma.TypeMap['model']['WeightEntry']; meta: { name: 'WeightEntry' } }; - /** - * Find zero or one WeightEntry that matches the filter. - * @param {WeightEntryFindUniqueArgs} args - Arguments to find a WeightEntry - * @example - * // Get one WeightEntry - * const weightEntry = await prisma.weightEntry.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique( - args: SelectSubset> - ): Prisma__WeightEntryClient< - $Result.GetResult, T, 'findUnique', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find one WeightEntry that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {WeightEntryFindUniqueOrThrowArgs} args - Arguments to find a WeightEntry - * @example - * // Get one WeightEntry - * const weightEntry = await prisma.weightEntry.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow( - args: SelectSubset> - ): Prisma__WeightEntryClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first WeightEntry that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WeightEntryFindFirstArgs} args - Arguments to find a WeightEntry - * @example - * // Get one WeightEntry - * const weightEntry = await prisma.weightEntry.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst( - args?: SelectSubset> - ): Prisma__WeightEntryClient< - $Result.GetResult, T, 'findFirst', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first WeightEntry that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WeightEntryFindFirstOrThrowArgs} args - Arguments to find a WeightEntry - * @example - * // Get one WeightEntry - * const weightEntry = await prisma.weightEntry.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow( - args?: SelectSubset> - ): Prisma__WeightEntryClient< - $Result.GetResult, T, 'findFirstOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find zero or more WeightEntries that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WeightEntryFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all WeightEntries - * const weightEntries = await prisma.weightEntry.findMany() - * - * // Get first 10 WeightEntries - * const weightEntries = await prisma.weightEntry.findMany({ take: 10 }) - * - * // Only select the `id` - * const weightEntryWithIdOnly = await prisma.weightEntry.findMany({ select: { id: true } }) - * - */ - findMany( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany', GlobalOmitOptions>>; - - /** - * Create a WeightEntry. - * @param {WeightEntryCreateArgs} args - Arguments to create a WeightEntry. - * @example - * // Create one WeightEntry - * const WeightEntry = await prisma.weightEntry.create({ - * data: { - * // ... data to create a WeightEntry - * } - * }) - * - */ - create( - args: SelectSubset> - ): Prisma__WeightEntryClient< - $Result.GetResult, T, 'create', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Create many WeightEntries. - * @param {WeightEntryCreateManyArgs} args - Arguments to create many WeightEntries. - * @example - * // Create many WeightEntries - * const weightEntry = await prisma.weightEntry.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Create many WeightEntries and returns the data saved in the database. - * @param {WeightEntryCreateManyAndReturnArgs} args - Arguments to create many WeightEntries. - * @example - * // Create many WeightEntries - * const weightEntry = await prisma.weightEntry.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many WeightEntries and only return the `id` - * const weightEntryWithIdOnly = await prisma.weightEntry.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn( - args?: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'createManyAndReturn', GlobalOmitOptions> - >; - - /** - * Delete a WeightEntry. - * @param {WeightEntryDeleteArgs} args - Arguments to delete one WeightEntry. - * @example - * // Delete one WeightEntry - * const WeightEntry = await prisma.weightEntry.delete({ - * where: { - * // ... filter to delete one WeightEntry - * } - * }) - * - */ - delete( - args: SelectSubset> - ): Prisma__WeightEntryClient< - $Result.GetResult, T, 'delete', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Update one WeightEntry. - * @param {WeightEntryUpdateArgs} args - Arguments to update one WeightEntry. - * @example - * // Update one WeightEntry - * const weightEntry = await prisma.weightEntry.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update( - args: SelectSubset> - ): Prisma__WeightEntryClient< - $Result.GetResult, T, 'update', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Delete zero or more WeightEntries. - * @param {WeightEntryDeleteManyArgs} args - Arguments to filter WeightEntries to delete. - * @example - * // Delete a few WeightEntries - * const { count } = await prisma.weightEntry.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more WeightEntries. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WeightEntryUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many WeightEntries - * const weightEntry = await prisma.weightEntry.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany( - args: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more WeightEntries and returns the data updated in the database. - * @param {WeightEntryUpdateManyAndReturnArgs} args - Arguments to update many WeightEntries. - * @example - * // Update many WeightEntries - * const weightEntry = await prisma.weightEntry.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more WeightEntries and only return the `id` - * const weightEntryWithIdOnly = await prisma.weightEntry.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn( - args: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'updateManyAndReturn', GlobalOmitOptions> - >; - - /** - * Create or update one WeightEntry. - * @param {WeightEntryUpsertArgs} args - Arguments to update or create a WeightEntry. - * @example - * // Update or create a WeightEntry - * const weightEntry = await prisma.weightEntry.upsert({ - * create: { - * // ... data to create a WeightEntry - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the WeightEntry we want to update - * } - * }) - */ - upsert( - args: SelectSubset> - ): Prisma__WeightEntryClient< - $Result.GetResult, T, 'upsert', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Count the number of WeightEntries. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WeightEntryCountArgs} args - Arguments to filter WeightEntries to count. - * @example - * // Count the number of WeightEntries - * const count = await prisma.weightEntry.count({ - * where: { - * // ... the filter for the WeightEntries we want to count - * } - * }) - **/ - count( - args?: Subset - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - >; - - /** - * Allows you to perform aggregations operations on a WeightEntry. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WeightEntryAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate( - args: Subset - ): Prisma.PrismaPromise>; - - /** - * Group by WeightEntry. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WeightEntryGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends WeightEntryGroupByArgs, - HasSelectOrTake extends Or>, Extends<'take', Keys>>, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: WeightEntryGroupByArgs['orderBy'] } - : { orderBy?: WeightEntryGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [Error, 'Field ', P, ` in "having" needs to be provided in "by"`]; - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields], - >( - args: SubsetIntersection & InputErrors - ): {} extends InputErrors ? GetWeightEntryGroupByPayload : Prisma.PrismaPromise; - /** - * Fields of the WeightEntry model - */ - readonly fields: WeightEntryFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for WeightEntry. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__WeightEntryClient< - T, - Null = never, - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - user = {}>( - args?: Subset> - ): Prisma__UserClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions> | Null, - Null, - ExtArgs, - GlobalOmitOptions - >; - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then( - onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, - onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch( - onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; - } - - /** - * Fields of the WeightEntry model - */ - interface WeightEntryFieldRefs { - readonly id: FieldRef<'WeightEntry', 'String'>; - readonly userId: FieldRef<'WeightEntry', 'String'>; - readonly weightKg: FieldRef<'WeightEntry', 'Float'>; - readonly date: FieldRef<'WeightEntry', 'DateTime'>; - readonly photo: FieldRef<'WeightEntry', 'String'>; - readonly notes: FieldRef<'WeightEntry', 'String'>; - readonly bodyFatPercentage: FieldRef<'WeightEntry', 'Float'>; - readonly muscleMassKg: FieldRef<'WeightEntry', 'Float'>; - readonly createdAt: FieldRef<'WeightEntry', 'DateTime'>; - readonly updatedAt: FieldRef<'WeightEntry', 'DateTime'>; - readonly syncedAt: FieldRef<'WeightEntry', 'DateTime'>; - readonly isDeleted: FieldRef<'WeightEntry', 'Boolean'>; - } - - // Custom InputTypes - /** - * WeightEntry findUnique - */ - export type WeightEntryFindUniqueArgs = { - /** - * Select specific fields to fetch from the WeightEntry - */ - select?: WeightEntrySelect | null; - /** - * Omit specific fields from the WeightEntry - */ - omit?: WeightEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WeightEntryInclude | null; - /** - * Filter, which WeightEntry to fetch. - */ - where: WeightEntryWhereUniqueInput; - }; - - /** - * WeightEntry findUniqueOrThrow - */ - export type WeightEntryFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the WeightEntry - */ - select?: WeightEntrySelect | null; - /** - * Omit specific fields from the WeightEntry - */ - omit?: WeightEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WeightEntryInclude | null; - /** - * Filter, which WeightEntry to fetch. - */ - where: WeightEntryWhereUniqueInput; - }; - - /** - * WeightEntry findFirst - */ - export type WeightEntryFindFirstArgs = { - /** - * Select specific fields to fetch from the WeightEntry - */ - select?: WeightEntrySelect | null; - /** - * Omit specific fields from the WeightEntry - */ - omit?: WeightEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WeightEntryInclude | null; - /** - * Filter, which WeightEntry to fetch. - */ - where?: WeightEntryWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of WeightEntries to fetch. - */ - orderBy?: WeightEntryOrderByWithRelationInput | WeightEntryOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for WeightEntries. - */ - cursor?: WeightEntryWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` WeightEntries from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` WeightEntries. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of WeightEntries. - */ - distinct?: WeightEntryScalarFieldEnum | WeightEntryScalarFieldEnum[]; - }; - - /** - * WeightEntry findFirstOrThrow - */ - export type WeightEntryFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the WeightEntry - */ - select?: WeightEntrySelect | null; - /** - * Omit specific fields from the WeightEntry - */ - omit?: WeightEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WeightEntryInclude | null; - /** - * Filter, which WeightEntry to fetch. - */ - where?: WeightEntryWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of WeightEntries to fetch. - */ - orderBy?: WeightEntryOrderByWithRelationInput | WeightEntryOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for WeightEntries. - */ - cursor?: WeightEntryWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` WeightEntries from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` WeightEntries. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of WeightEntries. - */ - distinct?: WeightEntryScalarFieldEnum | WeightEntryScalarFieldEnum[]; - }; - - /** - * WeightEntry findMany - */ - export type WeightEntryFindManyArgs = { - /** - * Select specific fields to fetch from the WeightEntry - */ - select?: WeightEntrySelect | null; - /** - * Omit specific fields from the WeightEntry - */ - omit?: WeightEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WeightEntryInclude | null; - /** - * Filter, which WeightEntries to fetch. - */ - where?: WeightEntryWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of WeightEntries to fetch. - */ - orderBy?: WeightEntryOrderByWithRelationInput | WeightEntryOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing WeightEntries. - */ - cursor?: WeightEntryWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` WeightEntries from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` WeightEntries. - */ - skip?: number; - distinct?: WeightEntryScalarFieldEnum | WeightEntryScalarFieldEnum[]; - }; - - /** - * WeightEntry create - */ - export type WeightEntryCreateArgs = { - /** - * Select specific fields to fetch from the WeightEntry - */ - select?: WeightEntrySelect | null; - /** - * Omit specific fields from the WeightEntry - */ - omit?: WeightEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WeightEntryInclude | null; - /** - * The data needed to create a WeightEntry. - */ - data: XOR; - }; - - /** - * WeightEntry createMany - */ - export type WeightEntryCreateManyArgs = { - /** - * The data used to create many WeightEntries. - */ - data: WeightEntryCreateManyInput | WeightEntryCreateManyInput[]; - skipDuplicates?: boolean; - }; - - /** - * WeightEntry createManyAndReturn - */ - export type WeightEntryCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the WeightEntry - */ - select?: WeightEntrySelectCreateManyAndReturn | null; - /** - * Omit specific fields from the WeightEntry - */ - omit?: WeightEntryOmit | null; - /** - * The data used to create many WeightEntries. - */ - data: WeightEntryCreateManyInput | WeightEntryCreateManyInput[]; - skipDuplicates?: boolean; - /** - * Choose, which related nodes to fetch as well - */ - include?: WeightEntryIncludeCreateManyAndReturn | null; - }; - - /** - * WeightEntry update - */ - export type WeightEntryUpdateArgs = { - /** - * Select specific fields to fetch from the WeightEntry - */ - select?: WeightEntrySelect | null; - /** - * Omit specific fields from the WeightEntry - */ - omit?: WeightEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WeightEntryInclude | null; - /** - * The data needed to update a WeightEntry. - */ - data: XOR; - /** - * Choose, which WeightEntry to update. - */ - where: WeightEntryWhereUniqueInput; - }; - - /** - * WeightEntry updateMany - */ - export type WeightEntryUpdateManyArgs = { - /** - * The data used to update WeightEntries. - */ - data: XOR; - /** - * Filter which WeightEntries to update - */ - where?: WeightEntryWhereInput; - /** - * Limit how many WeightEntries to update. - */ - limit?: number; - }; - - /** - * WeightEntry updateManyAndReturn - */ - export type WeightEntryUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the WeightEntry - */ - select?: WeightEntrySelectUpdateManyAndReturn | null; - /** - * Omit specific fields from the WeightEntry - */ - omit?: WeightEntryOmit | null; - /** - * The data used to update WeightEntries. - */ - data: XOR; - /** - * Filter which WeightEntries to update - */ - where?: WeightEntryWhereInput; - /** - * Limit how many WeightEntries to update. - */ - limit?: number; - /** - * Choose, which related nodes to fetch as well - */ - include?: WeightEntryIncludeUpdateManyAndReturn | null; - }; - - /** - * WeightEntry upsert - */ - export type WeightEntryUpsertArgs = { - /** - * Select specific fields to fetch from the WeightEntry - */ - select?: WeightEntrySelect | null; - /** - * Omit specific fields from the WeightEntry - */ - omit?: WeightEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WeightEntryInclude | null; - /** - * The filter to search for the WeightEntry to update in case it exists. - */ - where: WeightEntryWhereUniqueInput; - /** - * In case the WeightEntry found by the `where` argument doesn't exist, create a new WeightEntry with this data. - */ - create: XOR; - /** - * In case the WeightEntry was found with the provided `where` argument, update it with this data. - */ - update: XOR; - }; - - /** - * WeightEntry delete - */ - export type WeightEntryDeleteArgs = { - /** - * Select specific fields to fetch from the WeightEntry - */ - select?: WeightEntrySelect | null; - /** - * Omit specific fields from the WeightEntry - */ - omit?: WeightEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WeightEntryInclude | null; - /** - * Filter which WeightEntry to delete. - */ - where: WeightEntryWhereUniqueInput; - }; - - /** - * WeightEntry deleteMany - */ - export type WeightEntryDeleteManyArgs = { - /** - * Filter which WeightEntries to delete - */ - where?: WeightEntryWhereInput; - /** - * Limit how many WeightEntries to delete. - */ - limit?: number; - }; - - /** - * WeightEntry without action - */ - export type WeightEntryDefaultArgs = { - /** - * Select specific fields to fetch from the WeightEntry - */ - select?: WeightEntrySelect | null; - /** - * Omit specific fields from the WeightEntry - */ - omit?: WeightEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WeightEntryInclude | null; - }; - - /** - * Model WaterIntake - */ - - export type AggregateWaterIntake = { - _count: WaterIntakeCountAggregateOutputType | null; - _avg: WaterIntakeAvgAggregateOutputType | null; - _sum: WaterIntakeSumAggregateOutputType | null; - _min: WaterIntakeMinAggregateOutputType | null; - _max: WaterIntakeMaxAggregateOutputType | null; - }; - - export type WaterIntakeAvgAggregateOutputType = { - amountMl: number | null; - }; - - export type WaterIntakeSumAggregateOutputType = { - amountMl: number | null; - }; - - export type WaterIntakeMinAggregateOutputType = { - id: string | null; - userId: string | null; - amountMl: number | null; - date: Date | null; - time: Date | null; - createdAt: Date | null; - updatedAt: Date | null; - syncedAt: Date | null; - isDeleted: boolean | null; - }; - - export type WaterIntakeMaxAggregateOutputType = { - id: string | null; - userId: string | null; - amountMl: number | null; - date: Date | null; - time: Date | null; - createdAt: Date | null; - updatedAt: Date | null; - syncedAt: Date | null; - isDeleted: boolean | null; - }; - - export type WaterIntakeCountAggregateOutputType = { - id: number; - userId: number; - amountMl: number; - date: number; - time: number; - createdAt: number; - updatedAt: number; - syncedAt: number; - isDeleted: number; - _all: number; - }; - - export type WaterIntakeAvgAggregateInputType = { - amountMl?: true; - }; - - export type WaterIntakeSumAggregateInputType = { - amountMl?: true; - }; - - export type WaterIntakeMinAggregateInputType = { - id?: true; - userId?: true; - amountMl?: true; - date?: true; - time?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - }; - - export type WaterIntakeMaxAggregateInputType = { - id?: true; - userId?: true; - amountMl?: true; - date?: true; - time?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - }; - - export type WaterIntakeCountAggregateInputType = { - id?: true; - userId?: true; - amountMl?: true; - date?: true; - time?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - _all?: true; - }; - - export type WaterIntakeAggregateArgs = { - /** - * Filter which WaterIntake to aggregate. - */ - where?: WaterIntakeWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of WaterIntakes to fetch. - */ - orderBy?: WaterIntakeOrderByWithRelationInput | WaterIntakeOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: WaterIntakeWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` WaterIntakes from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` WaterIntakes. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned WaterIntakes - **/ - _count?: true | WaterIntakeCountAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: WaterIntakeAvgAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: WaterIntakeSumAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: WaterIntakeMinAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: WaterIntakeMaxAggregateInputType; - }; - - export type GetWaterIntakeAggregateType = { - [P in keyof T & keyof AggregateWaterIntake]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType; - }; - - export type WaterIntakeGroupByArgs = { - where?: WaterIntakeWhereInput; - orderBy?: WaterIntakeOrderByWithAggregationInput | WaterIntakeOrderByWithAggregationInput[]; - by: WaterIntakeScalarFieldEnum[] | WaterIntakeScalarFieldEnum; - having?: WaterIntakeScalarWhereWithAggregatesInput; - take?: number; - skip?: number; - _count?: WaterIntakeCountAggregateInputType | true; - _avg?: WaterIntakeAvgAggregateInputType; - _sum?: WaterIntakeSumAggregateInputType; - _min?: WaterIntakeMinAggregateInputType; - _max?: WaterIntakeMaxAggregateInputType; - }; - - export type WaterIntakeGroupByOutputType = { - id: string; - userId: string; - amountMl: number; - date: Date; - time: Date; - createdAt: Date; - updatedAt: Date; - syncedAt: Date | null; - isDeleted: boolean; - _count: WaterIntakeCountAggregateOutputType | null; - _avg: WaterIntakeAvgAggregateOutputType | null; - _sum: WaterIntakeSumAggregateOutputType | null; - _min: WaterIntakeMinAggregateOutputType | null; - _max: WaterIntakeMaxAggregateOutputType | null; - }; - - type GetWaterIntakeGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & { - [P in keyof T & keyof WaterIntakeGroupByOutputType]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType; - } - > - >; - - export type WaterIntakeSelect = - $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - amountMl?: boolean; - date?: boolean; - time?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['waterIntake'] - >; - - export type WaterIntakeSelectCreateManyAndReturn = - $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - amountMl?: boolean; - date?: boolean; - time?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['waterIntake'] - >; - - export type WaterIntakeSelectUpdateManyAndReturn = - $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - amountMl?: boolean; - date?: boolean; - time?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['waterIntake'] - >; - - export type WaterIntakeSelectScalar = { - id?: boolean; - userId?: boolean; - amountMl?: boolean; - date?: boolean; - time?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - }; - - export type WaterIntakeOmit = $Extensions.GetOmit< - 'id' | 'userId' | 'amountMl' | 'date' | 'time' | 'createdAt' | 'updatedAt' | 'syncedAt' | 'isDeleted', - ExtArgs['result']['waterIntake'] - >; - export type WaterIntakeInclude = { - user?: boolean | UserDefaultArgs; - }; - export type WaterIntakeIncludeCreateManyAndReturn< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - > = { - user?: boolean | UserDefaultArgs; - }; - export type WaterIntakeIncludeUpdateManyAndReturn< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - > = { - user?: boolean | UserDefaultArgs; - }; - - export type $WaterIntakePayload = { - name: 'WaterIntake'; - objects: { - user: Prisma.$UserPayload; - }; - scalars: $Extensions.GetPayloadResult< - { - id: string; - userId: string; - amountMl: number; - date: Date; - time: Date; - createdAt: Date; - updatedAt: Date; - syncedAt: Date | null; - isDeleted: boolean; - }, - ExtArgs['result']['waterIntake'] - >; - composites: {}; - }; - - type WaterIntakeGetPayload = $Result.GetResult< - Prisma.$WaterIntakePayload, - S - >; - - type WaterIntakeCountArgs = Omit< - WaterIntakeFindManyArgs, - 'select' | 'include' | 'distinct' | 'omit' - > & { - select?: WaterIntakeCountAggregateInputType | true; - }; - - export interface WaterIntakeDelegate< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > { - [K: symbol]: { types: Prisma.TypeMap['model']['WaterIntake']; meta: { name: 'WaterIntake' } }; - /** - * Find zero or one WaterIntake that matches the filter. - * @param {WaterIntakeFindUniqueArgs} args - Arguments to find a WaterIntake - * @example - * // Get one WaterIntake - * const waterIntake = await prisma.waterIntake.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique( - args: SelectSubset> - ): Prisma__WaterIntakeClient< - $Result.GetResult, T, 'findUnique', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find one WaterIntake that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {WaterIntakeFindUniqueOrThrowArgs} args - Arguments to find a WaterIntake - * @example - * // Get one WaterIntake - * const waterIntake = await prisma.waterIntake.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow( - args: SelectSubset> - ): Prisma__WaterIntakeClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first WaterIntake that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WaterIntakeFindFirstArgs} args - Arguments to find a WaterIntake - * @example - * // Get one WaterIntake - * const waterIntake = await prisma.waterIntake.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst( - args?: SelectSubset> - ): Prisma__WaterIntakeClient< - $Result.GetResult, T, 'findFirst', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first WaterIntake that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WaterIntakeFindFirstOrThrowArgs} args - Arguments to find a WaterIntake - * @example - * // Get one WaterIntake - * const waterIntake = await prisma.waterIntake.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow( - args?: SelectSubset> - ): Prisma__WaterIntakeClient< - $Result.GetResult, T, 'findFirstOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find zero or more WaterIntakes that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WaterIntakeFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all WaterIntakes - * const waterIntakes = await prisma.waterIntake.findMany() - * - * // Get first 10 WaterIntakes - * const waterIntakes = await prisma.waterIntake.findMany({ take: 10 }) - * - * // Only select the `id` - * const waterIntakeWithIdOnly = await prisma.waterIntake.findMany({ select: { id: true } }) - * - */ - findMany( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany', GlobalOmitOptions>>; - - /** - * Create a WaterIntake. - * @param {WaterIntakeCreateArgs} args - Arguments to create a WaterIntake. - * @example - * // Create one WaterIntake - * const WaterIntake = await prisma.waterIntake.create({ - * data: { - * // ... data to create a WaterIntake - * } - * }) - * - */ - create( - args: SelectSubset> - ): Prisma__WaterIntakeClient< - $Result.GetResult, T, 'create', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Create many WaterIntakes. - * @param {WaterIntakeCreateManyArgs} args - Arguments to create many WaterIntakes. - * @example - * // Create many WaterIntakes - * const waterIntake = await prisma.waterIntake.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Create many WaterIntakes and returns the data saved in the database. - * @param {WaterIntakeCreateManyAndReturnArgs} args - Arguments to create many WaterIntakes. - * @example - * // Create many WaterIntakes - * const waterIntake = await prisma.waterIntake.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many WaterIntakes and only return the `id` - * const waterIntakeWithIdOnly = await prisma.waterIntake.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn( - args?: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'createManyAndReturn', GlobalOmitOptions> - >; - - /** - * Delete a WaterIntake. - * @param {WaterIntakeDeleteArgs} args - Arguments to delete one WaterIntake. - * @example - * // Delete one WaterIntake - * const WaterIntake = await prisma.waterIntake.delete({ - * where: { - * // ... filter to delete one WaterIntake - * } - * }) - * - */ - delete( - args: SelectSubset> - ): Prisma__WaterIntakeClient< - $Result.GetResult, T, 'delete', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Update one WaterIntake. - * @param {WaterIntakeUpdateArgs} args - Arguments to update one WaterIntake. - * @example - * // Update one WaterIntake - * const waterIntake = await prisma.waterIntake.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update( - args: SelectSubset> - ): Prisma__WaterIntakeClient< - $Result.GetResult, T, 'update', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Delete zero or more WaterIntakes. - * @param {WaterIntakeDeleteManyArgs} args - Arguments to filter WaterIntakes to delete. - * @example - * // Delete a few WaterIntakes - * const { count } = await prisma.waterIntake.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more WaterIntakes. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WaterIntakeUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many WaterIntakes - * const waterIntake = await prisma.waterIntake.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany( - args: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more WaterIntakes and returns the data updated in the database. - * @param {WaterIntakeUpdateManyAndReturnArgs} args - Arguments to update many WaterIntakes. - * @example - * // Update many WaterIntakes - * const waterIntake = await prisma.waterIntake.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more WaterIntakes and only return the `id` - * const waterIntakeWithIdOnly = await prisma.waterIntake.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn( - args: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'updateManyAndReturn', GlobalOmitOptions> - >; - - /** - * Create or update one WaterIntake. - * @param {WaterIntakeUpsertArgs} args - Arguments to update or create a WaterIntake. - * @example - * // Update or create a WaterIntake - * const waterIntake = await prisma.waterIntake.upsert({ - * create: { - * // ... data to create a WaterIntake - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the WaterIntake we want to update - * } - * }) - */ - upsert( - args: SelectSubset> - ): Prisma__WaterIntakeClient< - $Result.GetResult, T, 'upsert', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Count the number of WaterIntakes. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WaterIntakeCountArgs} args - Arguments to filter WaterIntakes to count. - * @example - * // Count the number of WaterIntakes - * const count = await prisma.waterIntake.count({ - * where: { - * // ... the filter for the WaterIntakes we want to count - * } - * }) - **/ - count( - args?: Subset - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - >; - - /** - * Allows you to perform aggregations operations on a WaterIntake. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WaterIntakeAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate( - args: Subset - ): Prisma.PrismaPromise>; - - /** - * Group by WaterIntake. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {WaterIntakeGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends WaterIntakeGroupByArgs, - HasSelectOrTake extends Or>, Extends<'take', Keys>>, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: WaterIntakeGroupByArgs['orderBy'] } - : { orderBy?: WaterIntakeGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [Error, 'Field ', P, ` in "having" needs to be provided in "by"`]; - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields], - >( - args: SubsetIntersection & InputErrors - ): {} extends InputErrors ? GetWaterIntakeGroupByPayload : Prisma.PrismaPromise; - /** - * Fields of the WaterIntake model - */ - readonly fields: WaterIntakeFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for WaterIntake. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__WaterIntakeClient< - T, - Null = never, - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - user = {}>( - args?: Subset> - ): Prisma__UserClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions> | Null, - Null, - ExtArgs, - GlobalOmitOptions - >; - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then( - onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, - onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch( - onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; - } - - /** - * Fields of the WaterIntake model - */ - interface WaterIntakeFieldRefs { - readonly id: FieldRef<'WaterIntake', 'String'>; - readonly userId: FieldRef<'WaterIntake', 'String'>; - readonly amountMl: FieldRef<'WaterIntake', 'Int'>; - readonly date: FieldRef<'WaterIntake', 'DateTime'>; - readonly time: FieldRef<'WaterIntake', 'DateTime'>; - readonly createdAt: FieldRef<'WaterIntake', 'DateTime'>; - readonly updatedAt: FieldRef<'WaterIntake', 'DateTime'>; - readonly syncedAt: FieldRef<'WaterIntake', 'DateTime'>; - readonly isDeleted: FieldRef<'WaterIntake', 'Boolean'>; - } - - // Custom InputTypes - /** - * WaterIntake findUnique - */ - export type WaterIntakeFindUniqueArgs = { - /** - * Select specific fields to fetch from the WaterIntake - */ - select?: WaterIntakeSelect | null; - /** - * Omit specific fields from the WaterIntake - */ - omit?: WaterIntakeOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WaterIntakeInclude | null; - /** - * Filter, which WaterIntake to fetch. - */ - where: WaterIntakeWhereUniqueInput; - }; - - /** - * WaterIntake findUniqueOrThrow - */ - export type WaterIntakeFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the WaterIntake - */ - select?: WaterIntakeSelect | null; - /** - * Omit specific fields from the WaterIntake - */ - omit?: WaterIntakeOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WaterIntakeInclude | null; - /** - * Filter, which WaterIntake to fetch. - */ - where: WaterIntakeWhereUniqueInput; - }; - - /** - * WaterIntake findFirst - */ - export type WaterIntakeFindFirstArgs = { - /** - * Select specific fields to fetch from the WaterIntake - */ - select?: WaterIntakeSelect | null; - /** - * Omit specific fields from the WaterIntake - */ - omit?: WaterIntakeOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WaterIntakeInclude | null; - /** - * Filter, which WaterIntake to fetch. - */ - where?: WaterIntakeWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of WaterIntakes to fetch. - */ - orderBy?: WaterIntakeOrderByWithRelationInput | WaterIntakeOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for WaterIntakes. - */ - cursor?: WaterIntakeWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` WaterIntakes from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` WaterIntakes. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of WaterIntakes. - */ - distinct?: WaterIntakeScalarFieldEnum | WaterIntakeScalarFieldEnum[]; - }; - - /** - * WaterIntake findFirstOrThrow - */ - export type WaterIntakeFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the WaterIntake - */ - select?: WaterIntakeSelect | null; - /** - * Omit specific fields from the WaterIntake - */ - omit?: WaterIntakeOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WaterIntakeInclude | null; - /** - * Filter, which WaterIntake to fetch. - */ - where?: WaterIntakeWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of WaterIntakes to fetch. - */ - orderBy?: WaterIntakeOrderByWithRelationInput | WaterIntakeOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for WaterIntakes. - */ - cursor?: WaterIntakeWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` WaterIntakes from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` WaterIntakes. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of WaterIntakes. - */ - distinct?: WaterIntakeScalarFieldEnum | WaterIntakeScalarFieldEnum[]; - }; - - /** - * WaterIntake findMany - */ - export type WaterIntakeFindManyArgs = { - /** - * Select specific fields to fetch from the WaterIntake - */ - select?: WaterIntakeSelect | null; - /** - * Omit specific fields from the WaterIntake - */ - omit?: WaterIntakeOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WaterIntakeInclude | null; - /** - * Filter, which WaterIntakes to fetch. - */ - where?: WaterIntakeWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of WaterIntakes to fetch. - */ - orderBy?: WaterIntakeOrderByWithRelationInput | WaterIntakeOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing WaterIntakes. - */ - cursor?: WaterIntakeWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` WaterIntakes from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` WaterIntakes. - */ - skip?: number; - distinct?: WaterIntakeScalarFieldEnum | WaterIntakeScalarFieldEnum[]; - }; - - /** - * WaterIntake create - */ - export type WaterIntakeCreateArgs = { - /** - * Select specific fields to fetch from the WaterIntake - */ - select?: WaterIntakeSelect | null; - /** - * Omit specific fields from the WaterIntake - */ - omit?: WaterIntakeOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WaterIntakeInclude | null; - /** - * The data needed to create a WaterIntake. - */ - data: XOR; - }; - - /** - * WaterIntake createMany - */ - export type WaterIntakeCreateManyArgs = { - /** - * The data used to create many WaterIntakes. - */ - data: WaterIntakeCreateManyInput | WaterIntakeCreateManyInput[]; - skipDuplicates?: boolean; - }; - - /** - * WaterIntake createManyAndReturn - */ - export type WaterIntakeCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the WaterIntake - */ - select?: WaterIntakeSelectCreateManyAndReturn | null; - /** - * Omit specific fields from the WaterIntake - */ - omit?: WaterIntakeOmit | null; - /** - * The data used to create many WaterIntakes. - */ - data: WaterIntakeCreateManyInput | WaterIntakeCreateManyInput[]; - skipDuplicates?: boolean; - /** - * Choose, which related nodes to fetch as well - */ - include?: WaterIntakeIncludeCreateManyAndReturn | null; - }; - - /** - * WaterIntake update - */ - export type WaterIntakeUpdateArgs = { - /** - * Select specific fields to fetch from the WaterIntake - */ - select?: WaterIntakeSelect | null; - /** - * Omit specific fields from the WaterIntake - */ - omit?: WaterIntakeOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WaterIntakeInclude | null; - /** - * The data needed to update a WaterIntake. - */ - data: XOR; - /** - * Choose, which WaterIntake to update. - */ - where: WaterIntakeWhereUniqueInput; - }; - - /** - * WaterIntake updateMany - */ - export type WaterIntakeUpdateManyArgs = { - /** - * The data used to update WaterIntakes. - */ - data: XOR; - /** - * Filter which WaterIntakes to update - */ - where?: WaterIntakeWhereInput; - /** - * Limit how many WaterIntakes to update. - */ - limit?: number; - }; - - /** - * WaterIntake updateManyAndReturn - */ - export type WaterIntakeUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the WaterIntake - */ - select?: WaterIntakeSelectUpdateManyAndReturn | null; - /** - * Omit specific fields from the WaterIntake - */ - omit?: WaterIntakeOmit | null; - /** - * The data used to update WaterIntakes. - */ - data: XOR; - /** - * Filter which WaterIntakes to update - */ - where?: WaterIntakeWhereInput; - /** - * Limit how many WaterIntakes to update. - */ - limit?: number; - /** - * Choose, which related nodes to fetch as well - */ - include?: WaterIntakeIncludeUpdateManyAndReturn | null; - }; - - /** - * WaterIntake upsert - */ - export type WaterIntakeUpsertArgs = { - /** - * Select specific fields to fetch from the WaterIntake - */ - select?: WaterIntakeSelect | null; - /** - * Omit specific fields from the WaterIntake - */ - omit?: WaterIntakeOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WaterIntakeInclude | null; - /** - * The filter to search for the WaterIntake to update in case it exists. - */ - where: WaterIntakeWhereUniqueInput; - /** - * In case the WaterIntake found by the `where` argument doesn't exist, create a new WaterIntake with this data. - */ - create: XOR; - /** - * In case the WaterIntake was found with the provided `where` argument, update it with this data. - */ - update: XOR; - }; - - /** - * WaterIntake delete - */ - export type WaterIntakeDeleteArgs = { - /** - * Select specific fields to fetch from the WaterIntake - */ - select?: WaterIntakeSelect | null; - /** - * Omit specific fields from the WaterIntake - */ - omit?: WaterIntakeOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WaterIntakeInclude | null; - /** - * Filter which WaterIntake to delete. - */ - where: WaterIntakeWhereUniqueInput; - }; - - /** - * WaterIntake deleteMany - */ - export type WaterIntakeDeleteManyArgs = { - /** - * Filter which WaterIntakes to delete - */ - where?: WaterIntakeWhereInput; - /** - * Limit how many WaterIntakes to delete. - */ - limit?: number; - }; - - /** - * WaterIntake without action - */ - export type WaterIntakeDefaultArgs = { - /** - * Select specific fields to fetch from the WaterIntake - */ - select?: WaterIntakeSelect | null; - /** - * Omit specific fields from the WaterIntake - */ - omit?: WaterIntakeOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: WaterIntakeInclude | null; - }; - - /** - * Model SleepEntry - */ - - export type AggregateSleepEntry = { - _count: SleepEntryCountAggregateOutputType | null; - _avg: SleepEntryAvgAggregateOutputType | null; - _sum: SleepEntrySumAggregateOutputType | null; - _min: SleepEntryMinAggregateOutputType | null; - _max: SleepEntryMaxAggregateOutputType | null; - }; - - export type SleepEntryAvgAggregateOutputType = { - hours: number | null; - }; - - export type SleepEntrySumAggregateOutputType = { - hours: number | null; - }; - - export type SleepEntryMinAggregateOutputType = { - id: string | null; - userId: string | null; - hours: number | null; - quality: string | null; - date: Date | null; - bedtime: Date | null; - wakeTime: Date | null; - notes: string | null; - createdAt: Date | null; - updatedAt: Date | null; - syncedAt: Date | null; - isDeleted: boolean | null; - }; - - export type SleepEntryMaxAggregateOutputType = { - id: string | null; - userId: string | null; - hours: number | null; - quality: string | null; - date: Date | null; - bedtime: Date | null; - wakeTime: Date | null; - notes: string | null; - createdAt: Date | null; - updatedAt: Date | null; - syncedAt: Date | null; - isDeleted: boolean | null; - }; - - export type SleepEntryCountAggregateOutputType = { - id: number; - userId: number; - hours: number; - quality: number; - date: number; - bedtime: number; - wakeTime: number; - notes: number; - createdAt: number; - updatedAt: number; - syncedAt: number; - isDeleted: number; - _all: number; - }; - - export type SleepEntryAvgAggregateInputType = { - hours?: true; - }; - - export type SleepEntrySumAggregateInputType = { - hours?: true; - }; - - export type SleepEntryMinAggregateInputType = { - id?: true; - userId?: true; - hours?: true; - quality?: true; - date?: true; - bedtime?: true; - wakeTime?: true; - notes?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - }; - - export type SleepEntryMaxAggregateInputType = { - id?: true; - userId?: true; - hours?: true; - quality?: true; - date?: true; - bedtime?: true; - wakeTime?: true; - notes?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - }; - - export type SleepEntryCountAggregateInputType = { - id?: true; - userId?: true; - hours?: true; - quality?: true; - date?: true; - bedtime?: true; - wakeTime?: true; - notes?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - _all?: true; - }; - - export type SleepEntryAggregateArgs = { - /** - * Filter which SleepEntry to aggregate. - */ - where?: SleepEntryWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SleepEntries to fetch. - */ - orderBy?: SleepEntryOrderByWithRelationInput | SleepEntryOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: SleepEntryWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SleepEntries from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` SleepEntries. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned SleepEntries - **/ - _count?: true | SleepEntryCountAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: SleepEntryAvgAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: SleepEntrySumAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: SleepEntryMinAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: SleepEntryMaxAggregateInputType; - }; - - export type GetSleepEntryAggregateType = { - [P in keyof T & keyof AggregateSleepEntry]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType; - }; - - export type SleepEntryGroupByArgs = { - where?: SleepEntryWhereInput; - orderBy?: SleepEntryOrderByWithAggregationInput | SleepEntryOrderByWithAggregationInput[]; - by: SleepEntryScalarFieldEnum[] | SleepEntryScalarFieldEnum; - having?: SleepEntryScalarWhereWithAggregatesInput; - take?: number; - skip?: number; - _count?: SleepEntryCountAggregateInputType | true; - _avg?: SleepEntryAvgAggregateInputType; - _sum?: SleepEntrySumAggregateInputType; - _min?: SleepEntryMinAggregateInputType; - _max?: SleepEntryMaxAggregateInputType; - }; - - export type SleepEntryGroupByOutputType = { - id: string; - userId: string; - hours: number; - quality: string; - date: Date; - bedtime: Date | null; - wakeTime: Date | null; - notes: string | null; - createdAt: Date; - updatedAt: Date; - syncedAt: Date | null; - isDeleted: boolean; - _count: SleepEntryCountAggregateOutputType | null; - _avg: SleepEntryAvgAggregateOutputType | null; - _sum: SleepEntrySumAggregateOutputType | null; - _min: SleepEntryMinAggregateOutputType | null; - _max: SleepEntryMaxAggregateOutputType | null; - }; - - type GetSleepEntryGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & { - [P in keyof T & keyof SleepEntryGroupByOutputType]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType; - } - > - >; - - export type SleepEntrySelect = - $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - hours?: boolean; - quality?: boolean; - date?: boolean; - bedtime?: boolean; - wakeTime?: boolean; - notes?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['sleepEntry'] - >; - - export type SleepEntrySelectCreateManyAndReturn = - $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - hours?: boolean; - quality?: boolean; - date?: boolean; - bedtime?: boolean; - wakeTime?: boolean; - notes?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['sleepEntry'] - >; - - export type SleepEntrySelectUpdateManyAndReturn = - $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - hours?: boolean; - quality?: boolean; - date?: boolean; - bedtime?: boolean; - wakeTime?: boolean; - notes?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['sleepEntry'] - >; - - export type SleepEntrySelectScalar = { - id?: boolean; - userId?: boolean; - hours?: boolean; - quality?: boolean; - date?: boolean; - bedtime?: boolean; - wakeTime?: boolean; - notes?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - }; - - export type SleepEntryOmit = $Extensions.GetOmit< - | 'id' - | 'userId' - | 'hours' - | 'quality' - | 'date' - | 'bedtime' - | 'wakeTime' - | 'notes' - | 'createdAt' - | 'updatedAt' - | 'syncedAt' - | 'isDeleted', - ExtArgs['result']['sleepEntry'] - >; - export type SleepEntryInclude = { - user?: boolean | UserDefaultArgs; - }; - export type SleepEntryIncludeCreateManyAndReturn = - { - user?: boolean | UserDefaultArgs; - }; - export type SleepEntryIncludeUpdateManyAndReturn = - { - user?: boolean | UserDefaultArgs; - }; - - export type $SleepEntryPayload = { - name: 'SleepEntry'; - objects: { - user: Prisma.$UserPayload; - }; - scalars: $Extensions.GetPayloadResult< - { - id: string; - userId: string; - hours: number; - quality: string; - date: Date; - bedtime: Date | null; - wakeTime: Date | null; - notes: string | null; - createdAt: Date; - updatedAt: Date; - syncedAt: Date | null; - isDeleted: boolean; - }, - ExtArgs['result']['sleepEntry'] - >; - composites: {}; - }; - - type SleepEntryGetPayload = $Result.GetResult< - Prisma.$SleepEntryPayload, - S - >; - - type SleepEntryCountArgs = Omit< - SleepEntryFindManyArgs, - 'select' | 'include' | 'distinct' | 'omit' - > & { - select?: SleepEntryCountAggregateInputType | true; - }; - - export interface SleepEntryDelegate< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > { - [K: symbol]: { types: Prisma.TypeMap['model']['SleepEntry']; meta: { name: 'SleepEntry' } }; - /** - * Find zero or one SleepEntry that matches the filter. - * @param {SleepEntryFindUniqueArgs} args - Arguments to find a SleepEntry - * @example - * // Get one SleepEntry - * const sleepEntry = await prisma.sleepEntry.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique( - args: SelectSubset> - ): Prisma__SleepEntryClient< - $Result.GetResult, T, 'findUnique', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find one SleepEntry that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {SleepEntryFindUniqueOrThrowArgs} args - Arguments to find a SleepEntry - * @example - * // Get one SleepEntry - * const sleepEntry = await prisma.sleepEntry.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow( - args: SelectSubset> - ): Prisma__SleepEntryClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first SleepEntry that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SleepEntryFindFirstArgs} args - Arguments to find a SleepEntry - * @example - * // Get one SleepEntry - * const sleepEntry = await prisma.sleepEntry.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst( - args?: SelectSubset> - ): Prisma__SleepEntryClient< - $Result.GetResult, T, 'findFirst', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first SleepEntry that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SleepEntryFindFirstOrThrowArgs} args - Arguments to find a SleepEntry - * @example - * // Get one SleepEntry - * const sleepEntry = await prisma.sleepEntry.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow( - args?: SelectSubset> - ): Prisma__SleepEntryClient< - $Result.GetResult, T, 'findFirstOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find zero or more SleepEntries that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SleepEntryFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all SleepEntries - * const sleepEntries = await prisma.sleepEntry.findMany() - * - * // Get first 10 SleepEntries - * const sleepEntries = await prisma.sleepEntry.findMany({ take: 10 }) - * - * // Only select the `id` - * const sleepEntryWithIdOnly = await prisma.sleepEntry.findMany({ select: { id: true } }) - * - */ - findMany( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany', GlobalOmitOptions>>; - - /** - * Create a SleepEntry. - * @param {SleepEntryCreateArgs} args - Arguments to create a SleepEntry. - * @example - * // Create one SleepEntry - * const SleepEntry = await prisma.sleepEntry.create({ - * data: { - * // ... data to create a SleepEntry - * } - * }) - * - */ - create( - args: SelectSubset> - ): Prisma__SleepEntryClient< - $Result.GetResult, T, 'create', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Create many SleepEntries. - * @param {SleepEntryCreateManyArgs} args - Arguments to create many SleepEntries. - * @example - * // Create many SleepEntries - * const sleepEntry = await prisma.sleepEntry.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Create many SleepEntries and returns the data saved in the database. - * @param {SleepEntryCreateManyAndReturnArgs} args - Arguments to create many SleepEntries. - * @example - * // Create many SleepEntries - * const sleepEntry = await prisma.sleepEntry.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many SleepEntries and only return the `id` - * const sleepEntryWithIdOnly = await prisma.sleepEntry.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn( - args?: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'createManyAndReturn', GlobalOmitOptions> - >; - - /** - * Delete a SleepEntry. - * @param {SleepEntryDeleteArgs} args - Arguments to delete one SleepEntry. - * @example - * // Delete one SleepEntry - * const SleepEntry = await prisma.sleepEntry.delete({ - * where: { - * // ... filter to delete one SleepEntry - * } - * }) - * - */ - delete( - args: SelectSubset> - ): Prisma__SleepEntryClient< - $Result.GetResult, T, 'delete', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Update one SleepEntry. - * @param {SleepEntryUpdateArgs} args - Arguments to update one SleepEntry. - * @example - * // Update one SleepEntry - * const sleepEntry = await prisma.sleepEntry.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update( - args: SelectSubset> - ): Prisma__SleepEntryClient< - $Result.GetResult, T, 'update', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Delete zero or more SleepEntries. - * @param {SleepEntryDeleteManyArgs} args - Arguments to filter SleepEntries to delete. - * @example - * // Delete a few SleepEntries - * const { count } = await prisma.sleepEntry.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more SleepEntries. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SleepEntryUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many SleepEntries - * const sleepEntry = await prisma.sleepEntry.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany( - args: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more SleepEntries and returns the data updated in the database. - * @param {SleepEntryUpdateManyAndReturnArgs} args - Arguments to update many SleepEntries. - * @example - * // Update many SleepEntries - * const sleepEntry = await prisma.sleepEntry.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more SleepEntries and only return the `id` - * const sleepEntryWithIdOnly = await prisma.sleepEntry.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn( - args: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'updateManyAndReturn', GlobalOmitOptions> - >; - - /** - * Create or update one SleepEntry. - * @param {SleepEntryUpsertArgs} args - Arguments to update or create a SleepEntry. - * @example - * // Update or create a SleepEntry - * const sleepEntry = await prisma.sleepEntry.upsert({ - * create: { - * // ... data to create a SleepEntry - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the SleepEntry we want to update - * } - * }) - */ - upsert( - args: SelectSubset> - ): Prisma__SleepEntryClient< - $Result.GetResult, T, 'upsert', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Count the number of SleepEntries. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SleepEntryCountArgs} args - Arguments to filter SleepEntries to count. - * @example - * // Count the number of SleepEntries - * const count = await prisma.sleepEntry.count({ - * where: { - * // ... the filter for the SleepEntries we want to count - * } - * }) - **/ - count( - args?: Subset - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - >; - - /** - * Allows you to perform aggregations operations on a SleepEntry. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SleepEntryAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate( - args: Subset - ): Prisma.PrismaPromise>; - - /** - * Group by SleepEntry. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SleepEntryGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends SleepEntryGroupByArgs, - HasSelectOrTake extends Or>, Extends<'take', Keys>>, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: SleepEntryGroupByArgs['orderBy'] } - : { orderBy?: SleepEntryGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [Error, 'Field ', P, ` in "having" needs to be provided in "by"`]; - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields], - >( - args: SubsetIntersection & InputErrors - ): {} extends InputErrors ? GetSleepEntryGroupByPayload : Prisma.PrismaPromise; - /** - * Fields of the SleepEntry model - */ - readonly fields: SleepEntryFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for SleepEntry. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__SleepEntryClient< - T, - Null = never, - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - user = {}>( - args?: Subset> - ): Prisma__UserClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions> | Null, - Null, - ExtArgs, - GlobalOmitOptions - >; - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then( - onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, - onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch( - onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; - } - - /** - * Fields of the SleepEntry model - */ - interface SleepEntryFieldRefs { - readonly id: FieldRef<'SleepEntry', 'String'>; - readonly userId: FieldRef<'SleepEntry', 'String'>; - readonly hours: FieldRef<'SleepEntry', 'Float'>; - readonly quality: FieldRef<'SleepEntry', 'String'>; - readonly date: FieldRef<'SleepEntry', 'DateTime'>; - readonly bedtime: FieldRef<'SleepEntry', 'DateTime'>; - readonly wakeTime: FieldRef<'SleepEntry', 'DateTime'>; - readonly notes: FieldRef<'SleepEntry', 'String'>; - readonly createdAt: FieldRef<'SleepEntry', 'DateTime'>; - readonly updatedAt: FieldRef<'SleepEntry', 'DateTime'>; - readonly syncedAt: FieldRef<'SleepEntry', 'DateTime'>; - readonly isDeleted: FieldRef<'SleepEntry', 'Boolean'>; - } - - // Custom InputTypes - /** - * SleepEntry findUnique - */ - export type SleepEntryFindUniqueArgs = { - /** - * Select specific fields to fetch from the SleepEntry - */ - select?: SleepEntrySelect | null; - /** - * Omit specific fields from the SleepEntry - */ - omit?: SleepEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: SleepEntryInclude | null; - /** - * Filter, which SleepEntry to fetch. - */ - where: SleepEntryWhereUniqueInput; - }; - - /** - * SleepEntry findUniqueOrThrow - */ - export type SleepEntryFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the SleepEntry - */ - select?: SleepEntrySelect | null; - /** - * Omit specific fields from the SleepEntry - */ - omit?: SleepEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: SleepEntryInclude | null; - /** - * Filter, which SleepEntry to fetch. - */ - where: SleepEntryWhereUniqueInput; - }; - - /** - * SleepEntry findFirst - */ - export type SleepEntryFindFirstArgs = { - /** - * Select specific fields to fetch from the SleepEntry - */ - select?: SleepEntrySelect | null; - /** - * Omit specific fields from the SleepEntry - */ - omit?: SleepEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: SleepEntryInclude | null; - /** - * Filter, which SleepEntry to fetch. - */ - where?: SleepEntryWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SleepEntries to fetch. - */ - orderBy?: SleepEntryOrderByWithRelationInput | SleepEntryOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for SleepEntries. - */ - cursor?: SleepEntryWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SleepEntries from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` SleepEntries. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of SleepEntries. - */ - distinct?: SleepEntryScalarFieldEnum | SleepEntryScalarFieldEnum[]; - }; - - /** - * SleepEntry findFirstOrThrow - */ - export type SleepEntryFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the SleepEntry - */ - select?: SleepEntrySelect | null; - /** - * Omit specific fields from the SleepEntry - */ - omit?: SleepEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: SleepEntryInclude | null; - /** - * Filter, which SleepEntry to fetch. - */ - where?: SleepEntryWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SleepEntries to fetch. - */ - orderBy?: SleepEntryOrderByWithRelationInput | SleepEntryOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for SleepEntries. - */ - cursor?: SleepEntryWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SleepEntries from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` SleepEntries. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of SleepEntries. - */ - distinct?: SleepEntryScalarFieldEnum | SleepEntryScalarFieldEnum[]; - }; - - /** - * SleepEntry findMany - */ - export type SleepEntryFindManyArgs = { - /** - * Select specific fields to fetch from the SleepEntry - */ - select?: SleepEntrySelect | null; - /** - * Omit specific fields from the SleepEntry - */ - omit?: SleepEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: SleepEntryInclude | null; - /** - * Filter, which SleepEntries to fetch. - */ - where?: SleepEntryWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SleepEntries to fetch. - */ - orderBy?: SleepEntryOrderByWithRelationInput | SleepEntryOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing SleepEntries. - */ - cursor?: SleepEntryWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SleepEntries from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` SleepEntries. - */ - skip?: number; - distinct?: SleepEntryScalarFieldEnum | SleepEntryScalarFieldEnum[]; - }; - - /** - * SleepEntry create - */ - export type SleepEntryCreateArgs = { - /** - * Select specific fields to fetch from the SleepEntry - */ - select?: SleepEntrySelect | null; - /** - * Omit specific fields from the SleepEntry - */ - omit?: SleepEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: SleepEntryInclude | null; - /** - * The data needed to create a SleepEntry. - */ - data: XOR; - }; - - /** - * SleepEntry createMany - */ - export type SleepEntryCreateManyArgs = { - /** - * The data used to create many SleepEntries. - */ - data: SleepEntryCreateManyInput | SleepEntryCreateManyInput[]; - skipDuplicates?: boolean; - }; - - /** - * SleepEntry createManyAndReturn - */ - export type SleepEntryCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the SleepEntry - */ - select?: SleepEntrySelectCreateManyAndReturn | null; - /** - * Omit specific fields from the SleepEntry - */ - omit?: SleepEntryOmit | null; - /** - * The data used to create many SleepEntries. - */ - data: SleepEntryCreateManyInput | SleepEntryCreateManyInput[]; - skipDuplicates?: boolean; - /** - * Choose, which related nodes to fetch as well - */ - include?: SleepEntryIncludeCreateManyAndReturn | null; - }; - - /** - * SleepEntry update - */ - export type SleepEntryUpdateArgs = { - /** - * Select specific fields to fetch from the SleepEntry - */ - select?: SleepEntrySelect | null; - /** - * Omit specific fields from the SleepEntry - */ - omit?: SleepEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: SleepEntryInclude | null; - /** - * The data needed to update a SleepEntry. - */ - data: XOR; - /** - * Choose, which SleepEntry to update. - */ - where: SleepEntryWhereUniqueInput; - }; - - /** - * SleepEntry updateMany - */ - export type SleepEntryUpdateManyArgs = { - /** - * The data used to update SleepEntries. - */ - data: XOR; - /** - * Filter which SleepEntries to update - */ - where?: SleepEntryWhereInput; - /** - * Limit how many SleepEntries to update. - */ - limit?: number; - }; - - /** - * SleepEntry updateManyAndReturn - */ - export type SleepEntryUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the SleepEntry - */ - select?: SleepEntrySelectUpdateManyAndReturn | null; - /** - * Omit specific fields from the SleepEntry - */ - omit?: SleepEntryOmit | null; - /** - * The data used to update SleepEntries. - */ - data: XOR; - /** - * Filter which SleepEntries to update - */ - where?: SleepEntryWhereInput; - /** - * Limit how many SleepEntries to update. - */ - limit?: number; - /** - * Choose, which related nodes to fetch as well - */ - include?: SleepEntryIncludeUpdateManyAndReturn | null; - }; - - /** - * SleepEntry upsert - */ - export type SleepEntryUpsertArgs = { - /** - * Select specific fields to fetch from the SleepEntry - */ - select?: SleepEntrySelect | null; - /** - * Omit specific fields from the SleepEntry - */ - omit?: SleepEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: SleepEntryInclude | null; - /** - * The filter to search for the SleepEntry to update in case it exists. - */ - where: SleepEntryWhereUniqueInput; - /** - * In case the SleepEntry found by the `where` argument doesn't exist, create a new SleepEntry with this data. - */ - create: XOR; - /** - * In case the SleepEntry was found with the provided `where` argument, update it with this data. - */ - update: XOR; - }; - - /** - * SleepEntry delete - */ - export type SleepEntryDeleteArgs = { - /** - * Select specific fields to fetch from the SleepEntry - */ - select?: SleepEntrySelect | null; - /** - * Omit specific fields from the SleepEntry - */ - omit?: SleepEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: SleepEntryInclude | null; - /** - * Filter which SleepEntry to delete. - */ - where: SleepEntryWhereUniqueInput; - }; - - /** - * SleepEntry deleteMany - */ - export type SleepEntryDeleteManyArgs = { - /** - * Filter which SleepEntries to delete - */ - where?: SleepEntryWhereInput; - /** - * Limit how many SleepEntries to delete. - */ - limit?: number; - }; - - /** - * SleepEntry without action - */ - export type SleepEntryDefaultArgs = { - /** - * Select specific fields to fetch from the SleepEntry - */ - select?: SleepEntrySelect | null; - /** - * Omit specific fields from the SleepEntry - */ - omit?: SleepEntryOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: SleepEntryInclude | null; - }; - - /** - * Model Goal - */ - - export type AggregateGoal = { - _count: GoalCountAggregateOutputType | null; - _avg: GoalAvgAggregateOutputType | null; - _sum: GoalSumAggregateOutputType | null; - _min: GoalMinAggregateOutputType | null; - _max: GoalMaxAggregateOutputType | null; - }; - - export type GoalAvgAggregateOutputType = { - target: number | null; - current: number | null; - }; - - export type GoalSumAggregateOutputType = { - target: number | null; - current: number | null; - }; - - export type GoalMinAggregateOutputType = { - id: string | null; - userId: string | null; - type: string | null; - target: number | null; - current: number | null; - unit: string | null; - startDate: Date | null; - endDate: Date | null; - isActive: boolean | null; - notes: string | null; - createdAt: Date | null; - updatedAt: Date | null; - syncedAt: Date | null; - isDeleted: boolean | null; - }; - - export type GoalMaxAggregateOutputType = { - id: string | null; - userId: string | null; - type: string | null; - target: number | null; - current: number | null; - unit: string | null; - startDate: Date | null; - endDate: Date | null; - isActive: boolean | null; - notes: string | null; - createdAt: Date | null; - updatedAt: Date | null; - syncedAt: Date | null; - isDeleted: boolean | null; - }; - - export type GoalCountAggregateOutputType = { - id: number; - userId: number; - type: number; - target: number; - current: number; - unit: number; - startDate: number; - endDate: number; - isActive: number; - notes: number; - createdAt: number; - updatedAt: number; - syncedAt: number; - isDeleted: number; - _all: number; - }; - - export type GoalAvgAggregateInputType = { - target?: true; - current?: true; - }; - - export type GoalSumAggregateInputType = { - target?: true; - current?: true; - }; - - export type GoalMinAggregateInputType = { - id?: true; - userId?: true; - type?: true; - target?: true; - current?: true; - unit?: true; - startDate?: true; - endDate?: true; - isActive?: true; - notes?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - }; - - export type GoalMaxAggregateInputType = { - id?: true; - userId?: true; - type?: true; - target?: true; - current?: true; - unit?: true; - startDate?: true; - endDate?: true; - isActive?: true; - notes?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - }; - - export type GoalCountAggregateInputType = { - id?: true; - userId?: true; - type?: true; - target?: true; - current?: true; - unit?: true; - startDate?: true; - endDate?: true; - isActive?: true; - notes?: true; - createdAt?: true; - updatedAt?: true; - syncedAt?: true; - isDeleted?: true; - _all?: true; - }; - - export type GoalAggregateArgs = { - /** - * Filter which Goal to aggregate. - */ - where?: GoalWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Goals to fetch. - */ - orderBy?: GoalOrderByWithRelationInput | GoalOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: GoalWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Goals from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Goals. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Goals - **/ - _count?: true | GoalCountAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: GoalAvgAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: GoalSumAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: GoalMinAggregateInputType; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: GoalMaxAggregateInputType; - }; - - export type GetGoalAggregateType = { - [P in keyof T & keyof AggregateGoal]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType; - }; - - export type GoalGroupByArgs = { - where?: GoalWhereInput; - orderBy?: GoalOrderByWithAggregationInput | GoalOrderByWithAggregationInput[]; - by: GoalScalarFieldEnum[] | GoalScalarFieldEnum; - having?: GoalScalarWhereWithAggregatesInput; - take?: number; - skip?: number; - _count?: GoalCountAggregateInputType | true; - _avg?: GoalAvgAggregateInputType; - _sum?: GoalSumAggregateInputType; - _min?: GoalMinAggregateInputType; - _max?: GoalMaxAggregateInputType; - }; - - export type GoalGroupByOutputType = { - id: string; - userId: string; - type: string; - target: number; - current: number; - unit: string; - startDate: Date; - endDate: Date | null; - isActive: boolean; - notes: string | null; - createdAt: Date; - updatedAt: Date; - syncedAt: Date | null; - isDeleted: boolean; - _count: GoalCountAggregateOutputType | null; - _avg: GoalAvgAggregateOutputType | null; - _sum: GoalSumAggregateOutputType | null; - _min: GoalMinAggregateOutputType | null; - _max: GoalMaxAggregateOutputType | null; - }; - - type GetGoalGroupByPayload = Prisma.PrismaPromise< - Array< - PickEnumerable & { - [P in keyof T & keyof GoalGroupByOutputType]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType; - } - > - >; - - export type GoalSelect = $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - type?: boolean; - target?: boolean; - current?: boolean; - unit?: boolean; - startDate?: boolean; - endDate?: boolean; - isActive?: boolean; - notes?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['goal'] - >; - - export type GoalSelectCreateManyAndReturn = - $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - type?: boolean; - target?: boolean; - current?: boolean; - unit?: boolean; - startDate?: boolean; - endDate?: boolean; - isActive?: boolean; - notes?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['goal'] - >; - - export type GoalSelectUpdateManyAndReturn = - $Extensions.GetSelect< - { - id?: boolean; - userId?: boolean; - type?: boolean; - target?: boolean; - current?: boolean; - unit?: boolean; - startDate?: boolean; - endDate?: boolean; - isActive?: boolean; - notes?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - user?: boolean | UserDefaultArgs; - }, - ExtArgs['result']['goal'] - >; - - export type GoalSelectScalar = { - id?: boolean; - userId?: boolean; - type?: boolean; - target?: boolean; - current?: boolean; - unit?: boolean; - startDate?: boolean; - endDate?: boolean; - isActive?: boolean; - notes?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - syncedAt?: boolean; - isDeleted?: boolean; - }; - - export type GoalOmit = $Extensions.GetOmit< - | 'id' - | 'userId' - | 'type' - | 'target' - | 'current' - | 'unit' - | 'startDate' - | 'endDate' - | 'isActive' - | 'notes' - | 'createdAt' - | 'updatedAt' - | 'syncedAt' - | 'isDeleted', - ExtArgs['result']['goal'] - >; - export type GoalInclude = { - user?: boolean | UserDefaultArgs; - }; - export type GoalIncludeCreateManyAndReturn = { - user?: boolean | UserDefaultArgs; - }; - export type GoalIncludeUpdateManyAndReturn = { - user?: boolean | UserDefaultArgs; - }; - - export type $GoalPayload = { - name: 'Goal'; - objects: { - user: Prisma.$UserPayload; - }; - scalars: $Extensions.GetPayloadResult< - { - id: string; - userId: string; - type: string; - target: number; - current: number; - unit: string; - startDate: Date; - endDate: Date | null; - isActive: boolean; - notes: string | null; - createdAt: Date; - updatedAt: Date; - syncedAt: Date | null; - isDeleted: boolean; - }, - ExtArgs['result']['goal'] - >; - composites: {}; - }; - - type GoalGetPayload = $Result.GetResult< - Prisma.$GoalPayload, - S - >; - - type GoalCountArgs = Omit< - GoalFindManyArgs, - 'select' | 'include' | 'distinct' | 'omit' - > & { - select?: GoalCountAggregateInputType | true; - }; - - export interface GoalDelegate< - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > { - [K: symbol]: { types: Prisma.TypeMap['model']['Goal']; meta: { name: 'Goal' } }; - /** - * Find zero or one Goal that matches the filter. - * @param {GoalFindUniqueArgs} args - Arguments to find a Goal - * @example - * // Get one Goal - * const goal = await prisma.goal.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique( - args: SelectSubset> - ): Prisma__GoalClient< - $Result.GetResult, T, 'findUnique', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find one Goal that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {GoalFindUniqueOrThrowArgs} args - Arguments to find a Goal - * @example - * // Get one Goal - * const goal = await prisma.goal.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow( - args: SelectSubset> - ): Prisma__GoalClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first Goal that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {GoalFindFirstArgs} args - Arguments to find a Goal - * @example - * // Get one Goal - * const goal = await prisma.goal.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst( - args?: SelectSubset> - ): Prisma__GoalClient< - $Result.GetResult, T, 'findFirst', GlobalOmitOptions> | null, - null, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find the first Goal that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {GoalFindFirstOrThrowArgs} args - Arguments to find a Goal - * @example - * // Get one Goal - * const goal = await prisma.goal.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow( - args?: SelectSubset> - ): Prisma__GoalClient< - $Result.GetResult, T, 'findFirstOrThrow', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Find zero or more Goals that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {GoalFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Goals - * const goals = await prisma.goal.findMany() - * - * // Get first 10 Goals - * const goals = await prisma.goal.findMany({ take: 10 }) - * - * // Only select the `id` - * const goalWithIdOnly = await prisma.goal.findMany({ select: { id: true } }) - * - */ - findMany( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany', GlobalOmitOptions>>; - - /** - * Create a Goal. - * @param {GoalCreateArgs} args - Arguments to create a Goal. - * @example - * // Create one Goal - * const Goal = await prisma.goal.create({ - * data: { - * // ... data to create a Goal - * } - * }) - * - */ - create( - args: SelectSubset> - ): Prisma__GoalClient< - $Result.GetResult, T, 'create', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Create many Goals. - * @param {GoalCreateManyArgs} args - Arguments to create many Goals. - * @example - * // Create many Goals - * const goal = await prisma.goal.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Create many Goals and returns the data saved in the database. - * @param {GoalCreateManyAndReturnArgs} args - Arguments to create many Goals. - * @example - * // Create many Goals - * const goal = await prisma.goal.createManyAndReturn({ - * data: [ - * // ... provide data here - * ] - * }) - * - * // Create many Goals and only return the `id` - * const goalWithIdOnly = await prisma.goal.createManyAndReturn({ - * select: { id: true }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - createManyAndReturn( - args?: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'createManyAndReturn', GlobalOmitOptions> - >; - - /** - * Delete a Goal. - * @param {GoalDeleteArgs} args - Arguments to delete one Goal. - * @example - * // Delete one Goal - * const Goal = await prisma.goal.delete({ - * where: { - * // ... filter to delete one Goal - * } - * }) - * - */ - delete( - args: SelectSubset> - ): Prisma__GoalClient< - $Result.GetResult, T, 'delete', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Update one Goal. - * @param {GoalUpdateArgs} args - Arguments to update one Goal. - * @example - * // Update one Goal - * const goal = await prisma.goal.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update( - args: SelectSubset> - ): Prisma__GoalClient< - $Result.GetResult, T, 'update', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Delete zero or more Goals. - * @param {GoalDeleteManyArgs} args - Arguments to filter Goals to delete. - * @example - * // Delete a few Goals - * const { count } = await prisma.goal.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany( - args?: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more Goals. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {GoalUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Goals - * const goal = await prisma.goal.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany( - args: SelectSubset> - ): Prisma.PrismaPromise; - - /** - * Update zero or more Goals and returns the data updated in the database. - * @param {GoalUpdateManyAndReturnArgs} args - Arguments to update many Goals. - * @example - * // Update many Goals - * const goal = await prisma.goal.updateManyAndReturn({ - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * - * // Update zero or more Goals and only return the `id` - * const goalWithIdOnly = await prisma.goal.updateManyAndReturn({ - * select: { id: true }, - * where: { - * // ... provide filter here - * }, - * data: [ - * // ... provide data here - * ] - * }) - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * - */ - updateManyAndReturn( - args: SelectSubset> - ): Prisma.PrismaPromise< - $Result.GetResult, T, 'updateManyAndReturn', GlobalOmitOptions> - >; - - /** - * Create or update one Goal. - * @param {GoalUpsertArgs} args - Arguments to update or create a Goal. - * @example - * // Update or create a Goal - * const goal = await prisma.goal.upsert({ - * create: { - * // ... data to create a Goal - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Goal we want to update - * } - * }) - */ - upsert( - args: SelectSubset> - ): Prisma__GoalClient< - $Result.GetResult, T, 'upsert', GlobalOmitOptions>, - never, - ExtArgs, - GlobalOmitOptions - >; - - /** - * Count the number of Goals. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {GoalCountArgs} args - Arguments to filter Goals to count. - * @example - * // Count the number of Goals - * const count = await prisma.goal.count({ - * where: { - * // ... the filter for the Goals we want to count - * } - * }) - **/ - count( - args?: Subset - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - >; - - /** - * Allows you to perform aggregations operations on a Goal. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {GoalAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate( - args: Subset - ): Prisma.PrismaPromise>; - - /** - * Group by Goal. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {GoalGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends GoalGroupByArgs, - HasSelectOrTake extends Or>, Extends<'take', Keys>>, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: GoalGroupByArgs['orderBy'] } - : { orderBy?: GoalGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends MaybeTupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [Error, 'Field ', P, ` in "having" needs to be provided in "by"`]; - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`; - }[OrderFields], - >( - args: SubsetIntersection & InputErrors - ): {} extends InputErrors ? GetGoalGroupByPayload : Prisma.PrismaPromise; - /** - * Fields of the Goal model - */ - readonly fields: GoalFieldRefs; - } - - /** - * The delegate class that acts as a "Promise-like" for Goal. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export interface Prisma__GoalClient< - T, - Null = never, - ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs, - GlobalOmitOptions = {}, - > extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: 'PrismaPromise'; - user = {}>( - args?: Subset> - ): Prisma__UserClient< - $Result.GetResult, T, 'findUniqueOrThrow', GlobalOmitOptions> | Null, - Null, - ExtArgs, - GlobalOmitOptions - >; - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then( - onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, - onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch( - onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null - ): $Utils.JsPromise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; - } - - /** - * Fields of the Goal model - */ - interface GoalFieldRefs { - readonly id: FieldRef<'Goal', 'String'>; - readonly userId: FieldRef<'Goal', 'String'>; - readonly type: FieldRef<'Goal', 'String'>; - readonly target: FieldRef<'Goal', 'Float'>; - readonly current: FieldRef<'Goal', 'Float'>; - readonly unit: FieldRef<'Goal', 'String'>; - readonly startDate: FieldRef<'Goal', 'DateTime'>; - readonly endDate: FieldRef<'Goal', 'DateTime'>; - readonly isActive: FieldRef<'Goal', 'Boolean'>; - readonly notes: FieldRef<'Goal', 'String'>; - readonly createdAt: FieldRef<'Goal', 'DateTime'>; - readonly updatedAt: FieldRef<'Goal', 'DateTime'>; - readonly syncedAt: FieldRef<'Goal', 'DateTime'>; - readonly isDeleted: FieldRef<'Goal', 'Boolean'>; - } - - // Custom InputTypes - /** - * Goal findUnique - */ - export type GoalFindUniqueArgs = { - /** - * Select specific fields to fetch from the Goal - */ - select?: GoalSelect | null; - /** - * Omit specific fields from the Goal - */ - omit?: GoalOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: GoalInclude | null; - /** - * Filter, which Goal to fetch. - */ - where: GoalWhereUniqueInput; - }; - - /** - * Goal findUniqueOrThrow - */ - export type GoalFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Goal - */ - select?: GoalSelect | null; - /** - * Omit specific fields from the Goal - */ - omit?: GoalOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: GoalInclude | null; - /** - * Filter, which Goal to fetch. - */ - where: GoalWhereUniqueInput; - }; - - /** - * Goal findFirst - */ - export type GoalFindFirstArgs = { - /** - * Select specific fields to fetch from the Goal - */ - select?: GoalSelect | null; - /** - * Omit specific fields from the Goal - */ - omit?: GoalOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: GoalInclude | null; - /** - * Filter, which Goal to fetch. - */ - where?: GoalWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Goals to fetch. - */ - orderBy?: GoalOrderByWithRelationInput | GoalOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Goals. - */ - cursor?: GoalWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Goals from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Goals. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Goals. - */ - distinct?: GoalScalarFieldEnum | GoalScalarFieldEnum[]; - }; - - /** - * Goal findFirstOrThrow - */ - export type GoalFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Goal - */ - select?: GoalSelect | null; - /** - * Omit specific fields from the Goal - */ - omit?: GoalOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: GoalInclude | null; - /** - * Filter, which Goal to fetch. - */ - where?: GoalWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Goals to fetch. - */ - orderBy?: GoalOrderByWithRelationInput | GoalOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Goals. - */ - cursor?: GoalWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Goals from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Goals. - */ - skip?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Goals. - */ - distinct?: GoalScalarFieldEnum | GoalScalarFieldEnum[]; - }; - - /** - * Goal findMany - */ - export type GoalFindManyArgs = { - /** - * Select specific fields to fetch from the Goal - */ - select?: GoalSelect | null; - /** - * Omit specific fields from the Goal - */ - omit?: GoalOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: GoalInclude | null; - /** - * Filter, which Goals to fetch. - */ - where?: GoalWhereInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Goals to fetch. - */ - orderBy?: GoalOrderByWithRelationInput | GoalOrderByWithRelationInput[]; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Goals. - */ - cursor?: GoalWhereUniqueInput; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Goals from the position of the cursor. - */ - take?: number; - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Goals. - */ - skip?: number; - distinct?: GoalScalarFieldEnum | GoalScalarFieldEnum[]; - }; - - /** - * Goal create - */ - export type GoalCreateArgs = { - /** - * Select specific fields to fetch from the Goal - */ - select?: GoalSelect | null; - /** - * Omit specific fields from the Goal - */ - omit?: GoalOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: GoalInclude | null; - /** - * The data needed to create a Goal. - */ - data: XOR; - }; - - /** - * Goal createMany - */ - export type GoalCreateManyArgs = { - /** - * The data used to create many Goals. - */ - data: GoalCreateManyInput | GoalCreateManyInput[]; - skipDuplicates?: boolean; - }; - - /** - * Goal createManyAndReturn - */ - export type GoalCreateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Goal - */ - select?: GoalSelectCreateManyAndReturn | null; - /** - * Omit specific fields from the Goal - */ - omit?: GoalOmit | null; - /** - * The data used to create many Goals. - */ - data: GoalCreateManyInput | GoalCreateManyInput[]; - skipDuplicates?: boolean; - /** - * Choose, which related nodes to fetch as well - */ - include?: GoalIncludeCreateManyAndReturn | null; - }; - - /** - * Goal update - */ - export type GoalUpdateArgs = { - /** - * Select specific fields to fetch from the Goal - */ - select?: GoalSelect | null; - /** - * Omit specific fields from the Goal - */ - omit?: GoalOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: GoalInclude | null; - /** - * The data needed to update a Goal. - */ - data: XOR; - /** - * Choose, which Goal to update. - */ - where: GoalWhereUniqueInput; - }; - - /** - * Goal updateMany - */ - export type GoalUpdateManyArgs = { - /** - * The data used to update Goals. - */ - data: XOR; - /** - * Filter which Goals to update - */ - where?: GoalWhereInput; - /** - * Limit how many Goals to update. - */ - limit?: number; - }; - - /** - * Goal updateManyAndReturn - */ - export type GoalUpdateManyAndReturnArgs = { - /** - * Select specific fields to fetch from the Goal - */ - select?: GoalSelectUpdateManyAndReturn | null; - /** - * Omit specific fields from the Goal - */ - omit?: GoalOmit | null; - /** - * The data used to update Goals. - */ - data: XOR; - /** - * Filter which Goals to update - */ - where?: GoalWhereInput; - /** - * Limit how many Goals to update. - */ - limit?: number; - /** - * Choose, which related nodes to fetch as well - */ - include?: GoalIncludeUpdateManyAndReturn | null; - }; - - /** - * Goal upsert - */ - export type GoalUpsertArgs = { - /** - * Select specific fields to fetch from the Goal - */ - select?: GoalSelect | null; - /** - * Omit specific fields from the Goal - */ - omit?: GoalOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: GoalInclude | null; - /** - * The filter to search for the Goal to update in case it exists. - */ - where: GoalWhereUniqueInput; - /** - * In case the Goal found by the `where` argument doesn't exist, create a new Goal with this data. - */ - create: XOR; - /** - * In case the Goal was found with the provided `where` argument, update it with this data. - */ - update: XOR; - }; - - /** - * Goal delete - */ - export type GoalDeleteArgs = { - /** - * Select specific fields to fetch from the Goal - */ - select?: GoalSelect | null; - /** - * Omit specific fields from the Goal - */ - omit?: GoalOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: GoalInclude | null; - /** - * Filter which Goal to delete. - */ - where: GoalWhereUniqueInput; - }; - - /** - * Goal deleteMany - */ - export type GoalDeleteManyArgs = { - /** - * Filter which Goals to delete - */ - where?: GoalWhereInput; - /** - * Limit how many Goals to delete. - */ - limit?: number; - }; - - /** - * Goal without action - */ - export type GoalDefaultArgs = { - /** - * Select specific fields to fetch from the Goal - */ - select?: GoalSelect | null; - /** - * Omit specific fields from the Goal - */ - omit?: GoalOmit | null; - /** - * Choose, which related nodes to fetch as well - */ - include?: GoalInclude | null; - }; - - /** - * Enums - */ - - export const TransactionIsolationLevel: { - ReadUncommitted: 'ReadUncommitted'; - ReadCommitted: 'ReadCommitted'; - RepeatableRead: 'RepeatableRead'; - Serializable: 'Serializable'; - }; - - export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]; - - export const UserScalarFieldEnum: { - id: 'id'; - clerkId: 'clerkId'; - name: 'name'; - email: 'email'; - createdAt: 'createdAt'; - updatedAt: 'updatedAt'; - }; - - export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]; - - export const HealthProfileScalarFieldEnum: { - id: 'id'; - userId: 'userId'; - height: 'height'; - weight: 'weight'; - age: 'age'; - gender: 'gender'; - birthday: 'birthday'; - targetWeight: 'targetWeight'; - targetCalories: 'targetCalories'; - targetWaterL: 'targetWaterL'; - activityLevel: 'activityLevel'; - fitnessGoal: 'fitnessGoal'; - heightUnit: 'heightUnit'; - weightUnit: 'weightUnit'; - createdAt: 'createdAt'; - updatedAt: 'updatedAt'; - syncedAt: 'syncedAt'; - isDeleted: 'isDeleted'; - }; - - export type HealthProfileScalarFieldEnum = - (typeof HealthProfileScalarFieldEnum)[keyof typeof HealthProfileScalarFieldEnum]; - - export const WorkoutScalarFieldEnum: { - id: 'id'; - userId: 'userId'; - title: 'title'; - category: 'category'; - durationMin: 'durationMin'; - calories: 'calories'; - date: 'date'; - notes: 'notes'; - isCompleted: 'isCompleted'; - totalTime: 'totalTime'; - restTime: 'restTime'; - createdAt: 'createdAt'; - updatedAt: 'updatedAt'; - syncedAt: 'syncedAt'; - isDeleted: 'isDeleted'; - }; - - export type WorkoutScalarFieldEnum = (typeof WorkoutScalarFieldEnum)[keyof typeof WorkoutScalarFieldEnum]; - - export const ExerciseScalarFieldEnum: { - id: 'id'; - workoutId: 'workoutId'; - name: 'name'; - sets: 'sets'; - reps: 'reps'; - weightKg: 'weightKg'; - duration: 'duration'; - distance: 'distance'; - restTime: 'restTime'; - order: 'order'; - isCompleted: 'isCompleted'; - createdAt: 'createdAt'; - updatedAt: 'updatedAt'; - syncedAt: 'syncedAt'; - isDeleted: 'isDeleted'; - }; - - export type ExerciseScalarFieldEnum = (typeof ExerciseScalarFieldEnum)[keyof typeof ExerciseScalarFieldEnum]; - - export const MealScalarFieldEnum: { - id: 'id'; - userId: 'userId'; - name: 'name'; - mealType: 'mealType'; - calories: 'calories'; - protein: 'protein'; - carbs: 'carbs'; - fat: 'fat'; - date: 'date'; - notes: 'notes'; - createdAt: 'createdAt'; - updatedAt: 'updatedAt'; - syncedAt: 'syncedAt'; - isDeleted: 'isDeleted'; - }; - - export type MealScalarFieldEnum = (typeof MealScalarFieldEnum)[keyof typeof MealScalarFieldEnum]; - - export const MealItemScalarFieldEnum: { - id: 'id'; - mealId: 'mealId'; - userId: 'userId'; - name: 'name'; - calories: 'calories'; - protein: 'protein'; - carbs: 'carbs'; - fat: 'fat'; - quantity: 'quantity'; - unit: 'unit'; - isHighInProtein: 'isHighInProtein'; - createdAt: 'createdAt'; - updatedAt: 'updatedAt'; - syncedAt: 'syncedAt'; - isDeleted: 'isDeleted'; - }; - - export type MealItemScalarFieldEnum = (typeof MealItemScalarFieldEnum)[keyof typeof MealItemScalarFieldEnum]; - - export const ProgressLogScalarFieldEnum: { - id: 'id'; - userId: 'userId'; - date: 'date'; - waterL: 'waterL'; - sleepHrs: 'sleepHrs'; - mood: 'mood'; - weightKg: 'weightKg'; - steps: 'steps'; - activeMinutes: 'activeMinutes'; - createdAt: 'createdAt'; - updatedAt: 'updatedAt'; - syncedAt: 'syncedAt'; - isDeleted: 'isDeleted'; - }; - - export type ProgressLogScalarFieldEnum = (typeof ProgressLogScalarFieldEnum)[keyof typeof ProgressLogScalarFieldEnum]; - - export const WeightEntryScalarFieldEnum: { - id: 'id'; - userId: 'userId'; - weightKg: 'weightKg'; - date: 'date'; - photo: 'photo'; - notes: 'notes'; - bodyFatPercentage: 'bodyFatPercentage'; - muscleMassKg: 'muscleMassKg'; - createdAt: 'createdAt'; - updatedAt: 'updatedAt'; - syncedAt: 'syncedAt'; - isDeleted: 'isDeleted'; - }; - - export type WeightEntryScalarFieldEnum = (typeof WeightEntryScalarFieldEnum)[keyof typeof WeightEntryScalarFieldEnum]; - - export const WaterIntakeScalarFieldEnum: { - id: 'id'; - userId: 'userId'; - amountMl: 'amountMl'; - date: 'date'; - time: 'time'; - createdAt: 'createdAt'; - updatedAt: 'updatedAt'; - syncedAt: 'syncedAt'; - isDeleted: 'isDeleted'; - }; - - export type WaterIntakeScalarFieldEnum = (typeof WaterIntakeScalarFieldEnum)[keyof typeof WaterIntakeScalarFieldEnum]; - - export const SleepEntryScalarFieldEnum: { - id: 'id'; - userId: 'userId'; - hours: 'hours'; - quality: 'quality'; - date: 'date'; - bedtime: 'bedtime'; - wakeTime: 'wakeTime'; - notes: 'notes'; - createdAt: 'createdAt'; - updatedAt: 'updatedAt'; - syncedAt: 'syncedAt'; - isDeleted: 'isDeleted'; - }; - - export type SleepEntryScalarFieldEnum = (typeof SleepEntryScalarFieldEnum)[keyof typeof SleepEntryScalarFieldEnum]; - - export const GoalScalarFieldEnum: { - id: 'id'; - userId: 'userId'; - type: 'type'; - target: 'target'; - current: 'current'; - unit: 'unit'; - startDate: 'startDate'; - endDate: 'endDate'; - isActive: 'isActive'; - notes: 'notes'; - createdAt: 'createdAt'; - updatedAt: 'updatedAt'; - syncedAt: 'syncedAt'; - isDeleted: 'isDeleted'; - }; - - export type GoalScalarFieldEnum = (typeof GoalScalarFieldEnum)[keyof typeof GoalScalarFieldEnum]; - - export const SortOrder: { - asc: 'asc'; - desc: 'desc'; - }; - - export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]; - - export const QueryMode: { - default: 'default'; - insensitive: 'insensitive'; - }; - - export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]; - - export const NullsOrder: { - first: 'first'; - last: 'last'; - }; - - export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]; - - /** - * Field references - */ - - /** - * Reference to a field of type 'String' - */ - export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'>; - - /** - * Reference to a field of type 'String[]' - */ - export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'>; - - /** - * Reference to a field of type 'DateTime' - */ - export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'>; - - /** - * Reference to a field of type 'DateTime[]' - */ - export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'>; - - /** - * Reference to a field of type 'Float' - */ - export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'>; - - /** - * Reference to a field of type 'Float[]' - */ - export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'>; - - /** - * Reference to a field of type 'Int' - */ - export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'>; - - /** - * Reference to a field of type 'Int[]' - */ - export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'>; - - /** - * Reference to a field of type 'Boolean' - */ - export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'>; - - /** - * Deep Input Types - */ - - export type UserWhereInput = { - AND?: UserWhereInput | UserWhereInput[]; - OR?: UserWhereInput[]; - NOT?: UserWhereInput | UserWhereInput[]; - id?: StringFilter<'User'> | string; - clerkId?: StringFilter<'User'> | string; - name?: StringNullableFilter<'User'> | string | null; - email?: StringNullableFilter<'User'> | string | null; - createdAt?: DateTimeFilter<'User'> | Date | string; - updatedAt?: DateTimeFilter<'User'> | Date | string; - healthProfiles?: HealthProfileListRelationFilter; - workouts?: WorkoutListRelationFilter; - meals?: MealListRelationFilter; - mealItems?: MealItemListRelationFilter; - progressLogs?: ProgressLogListRelationFilter; - weightEntries?: WeightEntryListRelationFilter; - waterIntake?: WaterIntakeListRelationFilter; - sleepEntries?: SleepEntryListRelationFilter; - goals?: GoalListRelationFilter; - }; - - export type UserOrderByWithRelationInput = { - id?: SortOrder; - clerkId?: SortOrder; - name?: SortOrderInput | SortOrder; - email?: SortOrderInput | SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - healthProfiles?: HealthProfileOrderByRelationAggregateInput; - workouts?: WorkoutOrderByRelationAggregateInput; - meals?: MealOrderByRelationAggregateInput; - mealItems?: MealItemOrderByRelationAggregateInput; - progressLogs?: ProgressLogOrderByRelationAggregateInput; - weightEntries?: WeightEntryOrderByRelationAggregateInput; - waterIntake?: WaterIntakeOrderByRelationAggregateInput; - sleepEntries?: SleepEntryOrderByRelationAggregateInput; - goals?: GoalOrderByRelationAggregateInput; - }; - - export type UserWhereUniqueInput = Prisma.AtLeast< - { - id?: string; - clerkId?: string; - AND?: UserWhereInput | UserWhereInput[]; - OR?: UserWhereInput[]; - NOT?: UserWhereInput | UserWhereInput[]; - name?: StringNullableFilter<'User'> | string | null; - email?: StringNullableFilter<'User'> | string | null; - createdAt?: DateTimeFilter<'User'> | Date | string; - updatedAt?: DateTimeFilter<'User'> | Date | string; - healthProfiles?: HealthProfileListRelationFilter; - workouts?: WorkoutListRelationFilter; - meals?: MealListRelationFilter; - mealItems?: MealItemListRelationFilter; - progressLogs?: ProgressLogListRelationFilter; - weightEntries?: WeightEntryListRelationFilter; - waterIntake?: WaterIntakeListRelationFilter; - sleepEntries?: SleepEntryListRelationFilter; - goals?: GoalListRelationFilter; - }, - 'id' | 'clerkId' - >; - - export type UserOrderByWithAggregationInput = { - id?: SortOrder; - clerkId?: SortOrder; - name?: SortOrderInput | SortOrder; - email?: SortOrderInput | SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - _count?: UserCountOrderByAggregateInput; - _max?: UserMaxOrderByAggregateInput; - _min?: UserMinOrderByAggregateInput; - }; - - export type UserScalarWhereWithAggregatesInput = { - AND?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[]; - OR?: UserScalarWhereWithAggregatesInput[]; - NOT?: UserScalarWhereWithAggregatesInput | UserScalarWhereWithAggregatesInput[]; - id?: StringWithAggregatesFilter<'User'> | string; - clerkId?: StringWithAggregatesFilter<'User'> | string; - name?: StringNullableWithAggregatesFilter<'User'> | string | null; - email?: StringNullableWithAggregatesFilter<'User'> | string | null; - createdAt?: DateTimeWithAggregatesFilter<'User'> | Date | string; - updatedAt?: DateTimeWithAggregatesFilter<'User'> | Date | string; - }; - - export type HealthProfileWhereInput = { - AND?: HealthProfileWhereInput | HealthProfileWhereInput[]; - OR?: HealthProfileWhereInput[]; - NOT?: HealthProfileWhereInput | HealthProfileWhereInput[]; - id?: StringFilter<'HealthProfile'> | string; - userId?: StringFilter<'HealthProfile'> | string; - height?: FloatNullableFilter<'HealthProfile'> | number | null; - weight?: FloatNullableFilter<'HealthProfile'> | number | null; - age?: IntNullableFilter<'HealthProfile'> | number | null; - gender?: StringNullableFilter<'HealthProfile'> | string | null; - birthday?: DateTimeNullableFilter<'HealthProfile'> | Date | string | null; - targetWeight?: FloatNullableFilter<'HealthProfile'> | number | null; - targetCalories?: IntNullableFilter<'HealthProfile'> | number | null; - targetWaterL?: FloatNullableFilter<'HealthProfile'> | number | null; - activityLevel?: StringNullableFilter<'HealthProfile'> | string | null; - fitnessGoal?: StringNullableFilter<'HealthProfile'> | string | null; - heightUnit?: StringNullableFilter<'HealthProfile'> | string | null; - weightUnit?: StringNullableFilter<'HealthProfile'> | string | null; - createdAt?: DateTimeFilter<'HealthProfile'> | Date | string; - updatedAt?: DateTimeFilter<'HealthProfile'> | Date | string; - syncedAt?: DateTimeNullableFilter<'HealthProfile'> | Date | string | null; - isDeleted?: BoolFilter<'HealthProfile'> | boolean; - user?: XOR; - }; - - export type HealthProfileOrderByWithRelationInput = { - id?: SortOrder; - userId?: SortOrder; - height?: SortOrderInput | SortOrder; - weight?: SortOrderInput | SortOrder; - age?: SortOrderInput | SortOrder; - gender?: SortOrderInput | SortOrder; - birthday?: SortOrderInput | SortOrder; - targetWeight?: SortOrderInput | SortOrder; - targetCalories?: SortOrderInput | SortOrder; - targetWaterL?: SortOrderInput | SortOrder; - activityLevel?: SortOrderInput | SortOrder; - fitnessGoal?: SortOrderInput | SortOrder; - heightUnit?: SortOrderInput | SortOrder; - weightUnit?: SortOrderInput | SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrderInput | SortOrder; - isDeleted?: SortOrder; - user?: UserOrderByWithRelationInput; - }; - - export type HealthProfileWhereUniqueInput = Prisma.AtLeast< - { - id?: string; - AND?: HealthProfileWhereInput | HealthProfileWhereInput[]; - OR?: HealthProfileWhereInput[]; - NOT?: HealthProfileWhereInput | HealthProfileWhereInput[]; - userId?: StringFilter<'HealthProfile'> | string; - height?: FloatNullableFilter<'HealthProfile'> | number | null; - weight?: FloatNullableFilter<'HealthProfile'> | number | null; - age?: IntNullableFilter<'HealthProfile'> | number | null; - gender?: StringNullableFilter<'HealthProfile'> | string | null; - birthday?: DateTimeNullableFilter<'HealthProfile'> | Date | string | null; - targetWeight?: FloatNullableFilter<'HealthProfile'> | number | null; - targetCalories?: IntNullableFilter<'HealthProfile'> | number | null; - targetWaterL?: FloatNullableFilter<'HealthProfile'> | number | null; - activityLevel?: StringNullableFilter<'HealthProfile'> | string | null; - fitnessGoal?: StringNullableFilter<'HealthProfile'> | string | null; - heightUnit?: StringNullableFilter<'HealthProfile'> | string | null; - weightUnit?: StringNullableFilter<'HealthProfile'> | string | null; - createdAt?: DateTimeFilter<'HealthProfile'> | Date | string; - updatedAt?: DateTimeFilter<'HealthProfile'> | Date | string; - syncedAt?: DateTimeNullableFilter<'HealthProfile'> | Date | string | null; - isDeleted?: BoolFilter<'HealthProfile'> | boolean; - user?: XOR; - }, - 'id' - >; - - export type HealthProfileOrderByWithAggregationInput = { - id?: SortOrder; - userId?: SortOrder; - height?: SortOrderInput | SortOrder; - weight?: SortOrderInput | SortOrder; - age?: SortOrderInput | SortOrder; - gender?: SortOrderInput | SortOrder; - birthday?: SortOrderInput | SortOrder; - targetWeight?: SortOrderInput | SortOrder; - targetCalories?: SortOrderInput | SortOrder; - targetWaterL?: SortOrderInput | SortOrder; - activityLevel?: SortOrderInput | SortOrder; - fitnessGoal?: SortOrderInput | SortOrder; - heightUnit?: SortOrderInput | SortOrder; - weightUnit?: SortOrderInput | SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrderInput | SortOrder; - isDeleted?: SortOrder; - _count?: HealthProfileCountOrderByAggregateInput; - _avg?: HealthProfileAvgOrderByAggregateInput; - _max?: HealthProfileMaxOrderByAggregateInput; - _min?: HealthProfileMinOrderByAggregateInput; - _sum?: HealthProfileSumOrderByAggregateInput; - }; - - export type HealthProfileScalarWhereWithAggregatesInput = { - AND?: HealthProfileScalarWhereWithAggregatesInput | HealthProfileScalarWhereWithAggregatesInput[]; - OR?: HealthProfileScalarWhereWithAggregatesInput[]; - NOT?: HealthProfileScalarWhereWithAggregatesInput | HealthProfileScalarWhereWithAggregatesInput[]; - id?: StringWithAggregatesFilter<'HealthProfile'> | string; - userId?: StringWithAggregatesFilter<'HealthProfile'> | string; - height?: FloatNullableWithAggregatesFilter<'HealthProfile'> | number | null; - weight?: FloatNullableWithAggregatesFilter<'HealthProfile'> | number | null; - age?: IntNullableWithAggregatesFilter<'HealthProfile'> | number | null; - gender?: StringNullableWithAggregatesFilter<'HealthProfile'> | string | null; - birthday?: DateTimeNullableWithAggregatesFilter<'HealthProfile'> | Date | string | null; - targetWeight?: FloatNullableWithAggregatesFilter<'HealthProfile'> | number | null; - targetCalories?: IntNullableWithAggregatesFilter<'HealthProfile'> | number | null; - targetWaterL?: FloatNullableWithAggregatesFilter<'HealthProfile'> | number | null; - activityLevel?: StringNullableWithAggregatesFilter<'HealthProfile'> | string | null; - fitnessGoal?: StringNullableWithAggregatesFilter<'HealthProfile'> | string | null; - heightUnit?: StringNullableWithAggregatesFilter<'HealthProfile'> | string | null; - weightUnit?: StringNullableWithAggregatesFilter<'HealthProfile'> | string | null; - createdAt?: DateTimeWithAggregatesFilter<'HealthProfile'> | Date | string; - updatedAt?: DateTimeWithAggregatesFilter<'HealthProfile'> | Date | string; - syncedAt?: DateTimeNullableWithAggregatesFilter<'HealthProfile'> | Date | string | null; - isDeleted?: BoolWithAggregatesFilter<'HealthProfile'> | boolean; - }; - - export type WorkoutWhereInput = { - AND?: WorkoutWhereInput | WorkoutWhereInput[]; - OR?: WorkoutWhereInput[]; - NOT?: WorkoutWhereInput | WorkoutWhereInput[]; - id?: StringFilter<'Workout'> | string; - userId?: StringFilter<'Workout'> | string; - title?: StringFilter<'Workout'> | string; - category?: StringFilter<'Workout'> | string; - durationMin?: IntNullableFilter<'Workout'> | number | null; - calories?: IntNullableFilter<'Workout'> | number | null; - date?: DateTimeFilter<'Workout'> | Date | string; - notes?: StringNullableFilter<'Workout'> | string | null; - isCompleted?: BoolFilter<'Workout'> | boolean; - totalTime?: IntNullableFilter<'Workout'> | number | null; - restTime?: IntNullableFilter<'Workout'> | number | null; - createdAt?: DateTimeFilter<'Workout'> | Date | string; - updatedAt?: DateTimeFilter<'Workout'> | Date | string; - syncedAt?: DateTimeNullableFilter<'Workout'> | Date | string | null; - isDeleted?: BoolFilter<'Workout'> | boolean; - user?: XOR; - exercises?: ExerciseListRelationFilter; - }; - - export type WorkoutOrderByWithRelationInput = { - id?: SortOrder; - userId?: SortOrder; - title?: SortOrder; - category?: SortOrder; - durationMin?: SortOrderInput | SortOrder; - calories?: SortOrderInput | SortOrder; - date?: SortOrder; - notes?: SortOrderInput | SortOrder; - isCompleted?: SortOrder; - totalTime?: SortOrderInput | SortOrder; - restTime?: SortOrderInput | SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrderInput | SortOrder; - isDeleted?: SortOrder; - user?: UserOrderByWithRelationInput; - exercises?: ExerciseOrderByRelationAggregateInput; - }; - - export type WorkoutWhereUniqueInput = Prisma.AtLeast< - { - id?: string; - AND?: WorkoutWhereInput | WorkoutWhereInput[]; - OR?: WorkoutWhereInput[]; - NOT?: WorkoutWhereInput | WorkoutWhereInput[]; - userId?: StringFilter<'Workout'> | string; - title?: StringFilter<'Workout'> | string; - category?: StringFilter<'Workout'> | string; - durationMin?: IntNullableFilter<'Workout'> | number | null; - calories?: IntNullableFilter<'Workout'> | number | null; - date?: DateTimeFilter<'Workout'> | Date | string; - notes?: StringNullableFilter<'Workout'> | string | null; - isCompleted?: BoolFilter<'Workout'> | boolean; - totalTime?: IntNullableFilter<'Workout'> | number | null; - restTime?: IntNullableFilter<'Workout'> | number | null; - createdAt?: DateTimeFilter<'Workout'> | Date | string; - updatedAt?: DateTimeFilter<'Workout'> | Date | string; - syncedAt?: DateTimeNullableFilter<'Workout'> | Date | string | null; - isDeleted?: BoolFilter<'Workout'> | boolean; - user?: XOR; - exercises?: ExerciseListRelationFilter; - }, - 'id' - >; - - export type WorkoutOrderByWithAggregationInput = { - id?: SortOrder; - userId?: SortOrder; - title?: SortOrder; - category?: SortOrder; - durationMin?: SortOrderInput | SortOrder; - calories?: SortOrderInput | SortOrder; - date?: SortOrder; - notes?: SortOrderInput | SortOrder; - isCompleted?: SortOrder; - totalTime?: SortOrderInput | SortOrder; - restTime?: SortOrderInput | SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrderInput | SortOrder; - isDeleted?: SortOrder; - _count?: WorkoutCountOrderByAggregateInput; - _avg?: WorkoutAvgOrderByAggregateInput; - _max?: WorkoutMaxOrderByAggregateInput; - _min?: WorkoutMinOrderByAggregateInput; - _sum?: WorkoutSumOrderByAggregateInput; - }; - - export type WorkoutScalarWhereWithAggregatesInput = { - AND?: WorkoutScalarWhereWithAggregatesInput | WorkoutScalarWhereWithAggregatesInput[]; - OR?: WorkoutScalarWhereWithAggregatesInput[]; - NOT?: WorkoutScalarWhereWithAggregatesInput | WorkoutScalarWhereWithAggregatesInput[]; - id?: StringWithAggregatesFilter<'Workout'> | string; - userId?: StringWithAggregatesFilter<'Workout'> | string; - title?: StringWithAggregatesFilter<'Workout'> | string; - category?: StringWithAggregatesFilter<'Workout'> | string; - durationMin?: IntNullableWithAggregatesFilter<'Workout'> | number | null; - calories?: IntNullableWithAggregatesFilter<'Workout'> | number | null; - date?: DateTimeWithAggregatesFilter<'Workout'> | Date | string; - notes?: StringNullableWithAggregatesFilter<'Workout'> | string | null; - isCompleted?: BoolWithAggregatesFilter<'Workout'> | boolean; - totalTime?: IntNullableWithAggregatesFilter<'Workout'> | number | null; - restTime?: IntNullableWithAggregatesFilter<'Workout'> | number | null; - createdAt?: DateTimeWithAggregatesFilter<'Workout'> | Date | string; - updatedAt?: DateTimeWithAggregatesFilter<'Workout'> | Date | string; - syncedAt?: DateTimeNullableWithAggregatesFilter<'Workout'> | Date | string | null; - isDeleted?: BoolWithAggregatesFilter<'Workout'> | boolean; - }; - - export type ExerciseWhereInput = { - AND?: ExerciseWhereInput | ExerciseWhereInput[]; - OR?: ExerciseWhereInput[]; - NOT?: ExerciseWhereInput | ExerciseWhereInput[]; - id?: StringFilter<'Exercise'> | string; - workoutId?: StringFilter<'Exercise'> | string; - name?: StringFilter<'Exercise'> | string; - sets?: IntNullableFilter<'Exercise'> | number | null; - reps?: IntNullableFilter<'Exercise'> | number | null; - weightKg?: FloatNullableFilter<'Exercise'> | number | null; - duration?: IntNullableFilter<'Exercise'> | number | null; - distance?: FloatNullableFilter<'Exercise'> | number | null; - restTime?: IntNullableFilter<'Exercise'> | number | null; - order?: IntFilter<'Exercise'> | number; - isCompleted?: BoolFilter<'Exercise'> | boolean; - createdAt?: DateTimeFilter<'Exercise'> | Date | string; - updatedAt?: DateTimeFilter<'Exercise'> | Date | string; - syncedAt?: DateTimeNullableFilter<'Exercise'> | Date | string | null; - isDeleted?: BoolFilter<'Exercise'> | boolean; - workout?: XOR; - }; - - export type ExerciseOrderByWithRelationInput = { - id?: SortOrder; - workoutId?: SortOrder; - name?: SortOrder; - sets?: SortOrderInput | SortOrder; - reps?: SortOrderInput | SortOrder; - weightKg?: SortOrderInput | SortOrder; - duration?: SortOrderInput | SortOrder; - distance?: SortOrderInput | SortOrder; - restTime?: SortOrderInput | SortOrder; - order?: SortOrder; - isCompleted?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrderInput | SortOrder; - isDeleted?: SortOrder; - workout?: WorkoutOrderByWithRelationInput; - }; - - export type ExerciseWhereUniqueInput = Prisma.AtLeast< - { - id?: string; - AND?: ExerciseWhereInput | ExerciseWhereInput[]; - OR?: ExerciseWhereInput[]; - NOT?: ExerciseWhereInput | ExerciseWhereInput[]; - workoutId?: StringFilter<'Exercise'> | string; - name?: StringFilter<'Exercise'> | string; - sets?: IntNullableFilter<'Exercise'> | number | null; - reps?: IntNullableFilter<'Exercise'> | number | null; - weightKg?: FloatNullableFilter<'Exercise'> | number | null; - duration?: IntNullableFilter<'Exercise'> | number | null; - distance?: FloatNullableFilter<'Exercise'> | number | null; - restTime?: IntNullableFilter<'Exercise'> | number | null; - order?: IntFilter<'Exercise'> | number; - isCompleted?: BoolFilter<'Exercise'> | boolean; - createdAt?: DateTimeFilter<'Exercise'> | Date | string; - updatedAt?: DateTimeFilter<'Exercise'> | Date | string; - syncedAt?: DateTimeNullableFilter<'Exercise'> | Date | string | null; - isDeleted?: BoolFilter<'Exercise'> | boolean; - workout?: XOR; - }, - 'id' - >; - - export type ExerciseOrderByWithAggregationInput = { - id?: SortOrder; - workoutId?: SortOrder; - name?: SortOrder; - sets?: SortOrderInput | SortOrder; - reps?: SortOrderInput | SortOrder; - weightKg?: SortOrderInput | SortOrder; - duration?: SortOrderInput | SortOrder; - distance?: SortOrderInput | SortOrder; - restTime?: SortOrderInput | SortOrder; - order?: SortOrder; - isCompleted?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrderInput | SortOrder; - isDeleted?: SortOrder; - _count?: ExerciseCountOrderByAggregateInput; - _avg?: ExerciseAvgOrderByAggregateInput; - _max?: ExerciseMaxOrderByAggregateInput; - _min?: ExerciseMinOrderByAggregateInput; - _sum?: ExerciseSumOrderByAggregateInput; - }; - - export type ExerciseScalarWhereWithAggregatesInput = { - AND?: ExerciseScalarWhereWithAggregatesInput | ExerciseScalarWhereWithAggregatesInput[]; - OR?: ExerciseScalarWhereWithAggregatesInput[]; - NOT?: ExerciseScalarWhereWithAggregatesInput | ExerciseScalarWhereWithAggregatesInput[]; - id?: StringWithAggregatesFilter<'Exercise'> | string; - workoutId?: StringWithAggregatesFilter<'Exercise'> | string; - name?: StringWithAggregatesFilter<'Exercise'> | string; - sets?: IntNullableWithAggregatesFilter<'Exercise'> | number | null; - reps?: IntNullableWithAggregatesFilter<'Exercise'> | number | null; - weightKg?: FloatNullableWithAggregatesFilter<'Exercise'> | number | null; - duration?: IntNullableWithAggregatesFilter<'Exercise'> | number | null; - distance?: FloatNullableWithAggregatesFilter<'Exercise'> | number | null; - restTime?: IntNullableWithAggregatesFilter<'Exercise'> | number | null; - order?: IntWithAggregatesFilter<'Exercise'> | number; - isCompleted?: BoolWithAggregatesFilter<'Exercise'> | boolean; - createdAt?: DateTimeWithAggregatesFilter<'Exercise'> | Date | string; - updatedAt?: DateTimeWithAggregatesFilter<'Exercise'> | Date | string; - syncedAt?: DateTimeNullableWithAggregatesFilter<'Exercise'> | Date | string | null; - isDeleted?: BoolWithAggregatesFilter<'Exercise'> | boolean; - }; - - export type MealWhereInput = { - AND?: MealWhereInput | MealWhereInput[]; - OR?: MealWhereInput[]; - NOT?: MealWhereInput | MealWhereInput[]; - id?: StringFilter<'Meal'> | string; - userId?: StringFilter<'Meal'> | string; - name?: StringFilter<'Meal'> | string; - mealType?: StringFilter<'Meal'> | string; - calories?: IntNullableFilter<'Meal'> | number | null; - protein?: FloatNullableFilter<'Meal'> | number | null; - carbs?: FloatNullableFilter<'Meal'> | number | null; - fat?: FloatNullableFilter<'Meal'> | number | null; - date?: DateTimeFilter<'Meal'> | Date | string; - notes?: StringNullableFilter<'Meal'> | string | null; - createdAt?: DateTimeFilter<'Meal'> | Date | string; - updatedAt?: DateTimeFilter<'Meal'> | Date | string; - syncedAt?: DateTimeNullableFilter<'Meal'> | Date | string | null; - isDeleted?: BoolFilter<'Meal'> | boolean; - user?: XOR; - mealItems?: MealItemListRelationFilter; - }; - - export type MealOrderByWithRelationInput = { - id?: SortOrder; - userId?: SortOrder; - name?: SortOrder; - mealType?: SortOrder; - calories?: SortOrderInput | SortOrder; - protein?: SortOrderInput | SortOrder; - carbs?: SortOrderInput | SortOrder; - fat?: SortOrderInput | SortOrder; - date?: SortOrder; - notes?: SortOrderInput | SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrderInput | SortOrder; - isDeleted?: SortOrder; - user?: UserOrderByWithRelationInput; - mealItems?: MealItemOrderByRelationAggregateInput; - }; - - export type MealWhereUniqueInput = Prisma.AtLeast< - { - id?: string; - AND?: MealWhereInput | MealWhereInput[]; - OR?: MealWhereInput[]; - NOT?: MealWhereInput | MealWhereInput[]; - userId?: StringFilter<'Meal'> | string; - name?: StringFilter<'Meal'> | string; - mealType?: StringFilter<'Meal'> | string; - calories?: IntNullableFilter<'Meal'> | number | null; - protein?: FloatNullableFilter<'Meal'> | number | null; - carbs?: FloatNullableFilter<'Meal'> | number | null; - fat?: FloatNullableFilter<'Meal'> | number | null; - date?: DateTimeFilter<'Meal'> | Date | string; - notes?: StringNullableFilter<'Meal'> | string | null; - createdAt?: DateTimeFilter<'Meal'> | Date | string; - updatedAt?: DateTimeFilter<'Meal'> | Date | string; - syncedAt?: DateTimeNullableFilter<'Meal'> | Date | string | null; - isDeleted?: BoolFilter<'Meal'> | boolean; - user?: XOR; - mealItems?: MealItemListRelationFilter; - }, - 'id' - >; - - export type MealOrderByWithAggregationInput = { - id?: SortOrder; - userId?: SortOrder; - name?: SortOrder; - mealType?: SortOrder; - calories?: SortOrderInput | SortOrder; - protein?: SortOrderInput | SortOrder; - carbs?: SortOrderInput | SortOrder; - fat?: SortOrderInput | SortOrder; - date?: SortOrder; - notes?: SortOrderInput | SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrderInput | SortOrder; - isDeleted?: SortOrder; - _count?: MealCountOrderByAggregateInput; - _avg?: MealAvgOrderByAggregateInput; - _max?: MealMaxOrderByAggregateInput; - _min?: MealMinOrderByAggregateInput; - _sum?: MealSumOrderByAggregateInput; - }; - - export type MealScalarWhereWithAggregatesInput = { - AND?: MealScalarWhereWithAggregatesInput | MealScalarWhereWithAggregatesInput[]; - OR?: MealScalarWhereWithAggregatesInput[]; - NOT?: MealScalarWhereWithAggregatesInput | MealScalarWhereWithAggregatesInput[]; - id?: StringWithAggregatesFilter<'Meal'> | string; - userId?: StringWithAggregatesFilter<'Meal'> | string; - name?: StringWithAggregatesFilter<'Meal'> | string; - mealType?: StringWithAggregatesFilter<'Meal'> | string; - calories?: IntNullableWithAggregatesFilter<'Meal'> | number | null; - protein?: FloatNullableWithAggregatesFilter<'Meal'> | number | null; - carbs?: FloatNullableWithAggregatesFilter<'Meal'> | number | null; - fat?: FloatNullableWithAggregatesFilter<'Meal'> | number | null; - date?: DateTimeWithAggregatesFilter<'Meal'> | Date | string; - notes?: StringNullableWithAggregatesFilter<'Meal'> | string | null; - createdAt?: DateTimeWithAggregatesFilter<'Meal'> | Date | string; - updatedAt?: DateTimeWithAggregatesFilter<'Meal'> | Date | string; - syncedAt?: DateTimeNullableWithAggregatesFilter<'Meal'> | Date | string | null; - isDeleted?: BoolWithAggregatesFilter<'Meal'> | boolean; - }; - - export type MealItemWhereInput = { - AND?: MealItemWhereInput | MealItemWhereInput[]; - OR?: MealItemWhereInput[]; - NOT?: MealItemWhereInput | MealItemWhereInput[]; - id?: StringFilter<'MealItem'> | string; - mealId?: StringFilter<'MealItem'> | string; - userId?: StringFilter<'MealItem'> | string; - name?: StringFilter<'MealItem'> | string; - calories?: IntNullableFilter<'MealItem'> | number | null; - protein?: FloatNullableFilter<'MealItem'> | number | null; - carbs?: FloatNullableFilter<'MealItem'> | number | null; - fat?: FloatNullableFilter<'MealItem'> | number | null; - quantity?: FloatNullableFilter<'MealItem'> | number | null; - unit?: StringNullableFilter<'MealItem'> | string | null; - isHighInProtein?: BoolFilter<'MealItem'> | boolean; - createdAt?: DateTimeFilter<'MealItem'> | Date | string; - updatedAt?: DateTimeFilter<'MealItem'> | Date | string; - syncedAt?: DateTimeNullableFilter<'MealItem'> | Date | string | null; - isDeleted?: BoolFilter<'MealItem'> | boolean; - meal?: XOR; - user?: XOR; - }; - - export type MealItemOrderByWithRelationInput = { - id?: SortOrder; - mealId?: SortOrder; - userId?: SortOrder; - name?: SortOrder; - calories?: SortOrderInput | SortOrder; - protein?: SortOrderInput | SortOrder; - carbs?: SortOrderInput | SortOrder; - fat?: SortOrderInput | SortOrder; - quantity?: SortOrderInput | SortOrder; - unit?: SortOrderInput | SortOrder; - isHighInProtein?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrderInput | SortOrder; - isDeleted?: SortOrder; - meal?: MealOrderByWithRelationInput; - user?: UserOrderByWithRelationInput; - }; - - export type MealItemWhereUniqueInput = Prisma.AtLeast< - { - id?: string; - AND?: MealItemWhereInput | MealItemWhereInput[]; - OR?: MealItemWhereInput[]; - NOT?: MealItemWhereInput | MealItemWhereInput[]; - mealId?: StringFilter<'MealItem'> | string; - userId?: StringFilter<'MealItem'> | string; - name?: StringFilter<'MealItem'> | string; - calories?: IntNullableFilter<'MealItem'> | number | null; - protein?: FloatNullableFilter<'MealItem'> | number | null; - carbs?: FloatNullableFilter<'MealItem'> | number | null; - fat?: FloatNullableFilter<'MealItem'> | number | null; - quantity?: FloatNullableFilter<'MealItem'> | number | null; - unit?: StringNullableFilter<'MealItem'> | string | null; - isHighInProtein?: BoolFilter<'MealItem'> | boolean; - createdAt?: DateTimeFilter<'MealItem'> | Date | string; - updatedAt?: DateTimeFilter<'MealItem'> | Date | string; - syncedAt?: DateTimeNullableFilter<'MealItem'> | Date | string | null; - isDeleted?: BoolFilter<'MealItem'> | boolean; - meal?: XOR; - user?: XOR; - }, - 'id' - >; - - export type MealItemOrderByWithAggregationInput = { - id?: SortOrder; - mealId?: SortOrder; - userId?: SortOrder; - name?: SortOrder; - calories?: SortOrderInput | SortOrder; - protein?: SortOrderInput | SortOrder; - carbs?: SortOrderInput | SortOrder; - fat?: SortOrderInput | SortOrder; - quantity?: SortOrderInput | SortOrder; - unit?: SortOrderInput | SortOrder; - isHighInProtein?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrderInput | SortOrder; - isDeleted?: SortOrder; - _count?: MealItemCountOrderByAggregateInput; - _avg?: MealItemAvgOrderByAggregateInput; - _max?: MealItemMaxOrderByAggregateInput; - _min?: MealItemMinOrderByAggregateInput; - _sum?: MealItemSumOrderByAggregateInput; - }; - - export type MealItemScalarWhereWithAggregatesInput = { - AND?: MealItemScalarWhereWithAggregatesInput | MealItemScalarWhereWithAggregatesInput[]; - OR?: MealItemScalarWhereWithAggregatesInput[]; - NOT?: MealItemScalarWhereWithAggregatesInput | MealItemScalarWhereWithAggregatesInput[]; - id?: StringWithAggregatesFilter<'MealItem'> | string; - mealId?: StringWithAggregatesFilter<'MealItem'> | string; - userId?: StringWithAggregatesFilter<'MealItem'> | string; - name?: StringWithAggregatesFilter<'MealItem'> | string; - calories?: IntNullableWithAggregatesFilter<'MealItem'> | number | null; - protein?: FloatNullableWithAggregatesFilter<'MealItem'> | number | null; - carbs?: FloatNullableWithAggregatesFilter<'MealItem'> | number | null; - fat?: FloatNullableWithAggregatesFilter<'MealItem'> | number | null; - quantity?: FloatNullableWithAggregatesFilter<'MealItem'> | number | null; - unit?: StringNullableWithAggregatesFilter<'MealItem'> | string | null; - isHighInProtein?: BoolWithAggregatesFilter<'MealItem'> | boolean; - createdAt?: DateTimeWithAggregatesFilter<'MealItem'> | Date | string; - updatedAt?: DateTimeWithAggregatesFilter<'MealItem'> | Date | string; - syncedAt?: DateTimeNullableWithAggregatesFilter<'MealItem'> | Date | string | null; - isDeleted?: BoolWithAggregatesFilter<'MealItem'> | boolean; - }; - - export type ProgressLogWhereInput = { - AND?: ProgressLogWhereInput | ProgressLogWhereInput[]; - OR?: ProgressLogWhereInput[]; - NOT?: ProgressLogWhereInput | ProgressLogWhereInput[]; - id?: StringFilter<'ProgressLog'> | string; - userId?: StringFilter<'ProgressLog'> | string; - date?: DateTimeFilter<'ProgressLog'> | Date | string; - waterL?: FloatNullableFilter<'ProgressLog'> | number | null; - sleepHrs?: FloatNullableFilter<'ProgressLog'> | number | null; - mood?: StringNullableFilter<'ProgressLog'> | string | null; - weightKg?: FloatNullableFilter<'ProgressLog'> | number | null; - steps?: IntNullableFilter<'ProgressLog'> | number | null; - activeMinutes?: IntNullableFilter<'ProgressLog'> | number | null; - createdAt?: DateTimeFilter<'ProgressLog'> | Date | string; - updatedAt?: DateTimeFilter<'ProgressLog'> | Date | string; - syncedAt?: DateTimeNullableFilter<'ProgressLog'> | Date | string | null; - isDeleted?: BoolFilter<'ProgressLog'> | boolean; - user?: XOR; - }; - - export type ProgressLogOrderByWithRelationInput = { - id?: SortOrder; - userId?: SortOrder; - date?: SortOrder; - waterL?: SortOrderInput | SortOrder; - sleepHrs?: SortOrderInput | SortOrder; - mood?: SortOrderInput | SortOrder; - weightKg?: SortOrderInput | SortOrder; - steps?: SortOrderInput | SortOrder; - activeMinutes?: SortOrderInput | SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrderInput | SortOrder; - isDeleted?: SortOrder; - user?: UserOrderByWithRelationInput; - }; - - export type ProgressLogWhereUniqueInput = Prisma.AtLeast< - { - id?: string; - AND?: ProgressLogWhereInput | ProgressLogWhereInput[]; - OR?: ProgressLogWhereInput[]; - NOT?: ProgressLogWhereInput | ProgressLogWhereInput[]; - userId?: StringFilter<'ProgressLog'> | string; - date?: DateTimeFilter<'ProgressLog'> | Date | string; - waterL?: FloatNullableFilter<'ProgressLog'> | number | null; - sleepHrs?: FloatNullableFilter<'ProgressLog'> | number | null; - mood?: StringNullableFilter<'ProgressLog'> | string | null; - weightKg?: FloatNullableFilter<'ProgressLog'> | number | null; - steps?: IntNullableFilter<'ProgressLog'> | number | null; - activeMinutes?: IntNullableFilter<'ProgressLog'> | number | null; - createdAt?: DateTimeFilter<'ProgressLog'> | Date | string; - updatedAt?: DateTimeFilter<'ProgressLog'> | Date | string; - syncedAt?: DateTimeNullableFilter<'ProgressLog'> | Date | string | null; - isDeleted?: BoolFilter<'ProgressLog'> | boolean; - user?: XOR; - }, - 'id' - >; - - export type ProgressLogOrderByWithAggregationInput = { - id?: SortOrder; - userId?: SortOrder; - date?: SortOrder; - waterL?: SortOrderInput | SortOrder; - sleepHrs?: SortOrderInput | SortOrder; - mood?: SortOrderInput | SortOrder; - weightKg?: SortOrderInput | SortOrder; - steps?: SortOrderInput | SortOrder; - activeMinutes?: SortOrderInput | SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrderInput | SortOrder; - isDeleted?: SortOrder; - _count?: ProgressLogCountOrderByAggregateInput; - _avg?: ProgressLogAvgOrderByAggregateInput; - _max?: ProgressLogMaxOrderByAggregateInput; - _min?: ProgressLogMinOrderByAggregateInput; - _sum?: ProgressLogSumOrderByAggregateInput; - }; - - export type ProgressLogScalarWhereWithAggregatesInput = { - AND?: ProgressLogScalarWhereWithAggregatesInput | ProgressLogScalarWhereWithAggregatesInput[]; - OR?: ProgressLogScalarWhereWithAggregatesInput[]; - NOT?: ProgressLogScalarWhereWithAggregatesInput | ProgressLogScalarWhereWithAggregatesInput[]; - id?: StringWithAggregatesFilter<'ProgressLog'> | string; - userId?: StringWithAggregatesFilter<'ProgressLog'> | string; - date?: DateTimeWithAggregatesFilter<'ProgressLog'> | Date | string; - waterL?: FloatNullableWithAggregatesFilter<'ProgressLog'> | number | null; - sleepHrs?: FloatNullableWithAggregatesFilter<'ProgressLog'> | number | null; - mood?: StringNullableWithAggregatesFilter<'ProgressLog'> | string | null; - weightKg?: FloatNullableWithAggregatesFilter<'ProgressLog'> | number | null; - steps?: IntNullableWithAggregatesFilter<'ProgressLog'> | number | null; - activeMinutes?: IntNullableWithAggregatesFilter<'ProgressLog'> | number | null; - createdAt?: DateTimeWithAggregatesFilter<'ProgressLog'> | Date | string; - updatedAt?: DateTimeWithAggregatesFilter<'ProgressLog'> | Date | string; - syncedAt?: DateTimeNullableWithAggregatesFilter<'ProgressLog'> | Date | string | null; - isDeleted?: BoolWithAggregatesFilter<'ProgressLog'> | boolean; - }; - - export type WeightEntryWhereInput = { - AND?: WeightEntryWhereInput | WeightEntryWhereInput[]; - OR?: WeightEntryWhereInput[]; - NOT?: WeightEntryWhereInput | WeightEntryWhereInput[]; - id?: StringFilter<'WeightEntry'> | string; - userId?: StringFilter<'WeightEntry'> | string; - weightKg?: FloatFilter<'WeightEntry'> | number; - date?: DateTimeFilter<'WeightEntry'> | Date | string; - photo?: StringNullableFilter<'WeightEntry'> | string | null; - notes?: StringNullableFilter<'WeightEntry'> | string | null; - bodyFatPercentage?: FloatNullableFilter<'WeightEntry'> | number | null; - muscleMassKg?: FloatNullableFilter<'WeightEntry'> | number | null; - createdAt?: DateTimeFilter<'WeightEntry'> | Date | string; - updatedAt?: DateTimeFilter<'WeightEntry'> | Date | string; - syncedAt?: DateTimeNullableFilter<'WeightEntry'> | Date | string | null; - isDeleted?: BoolFilter<'WeightEntry'> | boolean; - user?: XOR; - }; - - export type WeightEntryOrderByWithRelationInput = { - id?: SortOrder; - userId?: SortOrder; - weightKg?: SortOrder; - date?: SortOrder; - photo?: SortOrderInput | SortOrder; - notes?: SortOrderInput | SortOrder; - bodyFatPercentage?: SortOrderInput | SortOrder; - muscleMassKg?: SortOrderInput | SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrderInput | SortOrder; - isDeleted?: SortOrder; - user?: UserOrderByWithRelationInput; - }; - - export type WeightEntryWhereUniqueInput = Prisma.AtLeast< - { - id?: string; - AND?: WeightEntryWhereInput | WeightEntryWhereInput[]; - OR?: WeightEntryWhereInput[]; - NOT?: WeightEntryWhereInput | WeightEntryWhereInput[]; - userId?: StringFilter<'WeightEntry'> | string; - weightKg?: FloatFilter<'WeightEntry'> | number; - date?: DateTimeFilter<'WeightEntry'> | Date | string; - photo?: StringNullableFilter<'WeightEntry'> | string | null; - notes?: StringNullableFilter<'WeightEntry'> | string | null; - bodyFatPercentage?: FloatNullableFilter<'WeightEntry'> | number | null; - muscleMassKg?: FloatNullableFilter<'WeightEntry'> | number | null; - createdAt?: DateTimeFilter<'WeightEntry'> | Date | string; - updatedAt?: DateTimeFilter<'WeightEntry'> | Date | string; - syncedAt?: DateTimeNullableFilter<'WeightEntry'> | Date | string | null; - isDeleted?: BoolFilter<'WeightEntry'> | boolean; - user?: XOR; - }, - 'id' - >; - - export type WeightEntryOrderByWithAggregationInput = { - id?: SortOrder; - userId?: SortOrder; - weightKg?: SortOrder; - date?: SortOrder; - photo?: SortOrderInput | SortOrder; - notes?: SortOrderInput | SortOrder; - bodyFatPercentage?: SortOrderInput | SortOrder; - muscleMassKg?: SortOrderInput | SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrderInput | SortOrder; - isDeleted?: SortOrder; - _count?: WeightEntryCountOrderByAggregateInput; - _avg?: WeightEntryAvgOrderByAggregateInput; - _max?: WeightEntryMaxOrderByAggregateInput; - _min?: WeightEntryMinOrderByAggregateInput; - _sum?: WeightEntrySumOrderByAggregateInput; - }; - - export type WeightEntryScalarWhereWithAggregatesInput = { - AND?: WeightEntryScalarWhereWithAggregatesInput | WeightEntryScalarWhereWithAggregatesInput[]; - OR?: WeightEntryScalarWhereWithAggregatesInput[]; - NOT?: WeightEntryScalarWhereWithAggregatesInput | WeightEntryScalarWhereWithAggregatesInput[]; - id?: StringWithAggregatesFilter<'WeightEntry'> | string; - userId?: StringWithAggregatesFilter<'WeightEntry'> | string; - weightKg?: FloatWithAggregatesFilter<'WeightEntry'> | number; - date?: DateTimeWithAggregatesFilter<'WeightEntry'> | Date | string; - photo?: StringNullableWithAggregatesFilter<'WeightEntry'> | string | null; - notes?: StringNullableWithAggregatesFilter<'WeightEntry'> | string | null; - bodyFatPercentage?: FloatNullableWithAggregatesFilter<'WeightEntry'> | number | null; - muscleMassKg?: FloatNullableWithAggregatesFilter<'WeightEntry'> | number | null; - createdAt?: DateTimeWithAggregatesFilter<'WeightEntry'> | Date | string; - updatedAt?: DateTimeWithAggregatesFilter<'WeightEntry'> | Date | string; - syncedAt?: DateTimeNullableWithAggregatesFilter<'WeightEntry'> | Date | string | null; - isDeleted?: BoolWithAggregatesFilter<'WeightEntry'> | boolean; - }; - - export type WaterIntakeWhereInput = { - AND?: WaterIntakeWhereInput | WaterIntakeWhereInput[]; - OR?: WaterIntakeWhereInput[]; - NOT?: WaterIntakeWhereInput | WaterIntakeWhereInput[]; - id?: StringFilter<'WaterIntake'> | string; - userId?: StringFilter<'WaterIntake'> | string; - amountMl?: IntFilter<'WaterIntake'> | number; - date?: DateTimeFilter<'WaterIntake'> | Date | string; - time?: DateTimeFilter<'WaterIntake'> | Date | string; - createdAt?: DateTimeFilter<'WaterIntake'> | Date | string; - updatedAt?: DateTimeFilter<'WaterIntake'> | Date | string; - syncedAt?: DateTimeNullableFilter<'WaterIntake'> | Date | string | null; - isDeleted?: BoolFilter<'WaterIntake'> | boolean; - user?: XOR; - }; - - export type WaterIntakeOrderByWithRelationInput = { - id?: SortOrder; - userId?: SortOrder; - amountMl?: SortOrder; - date?: SortOrder; - time?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrderInput | SortOrder; - isDeleted?: SortOrder; - user?: UserOrderByWithRelationInput; - }; - - export type WaterIntakeWhereUniqueInput = Prisma.AtLeast< - { - id?: string; - AND?: WaterIntakeWhereInput | WaterIntakeWhereInput[]; - OR?: WaterIntakeWhereInput[]; - NOT?: WaterIntakeWhereInput | WaterIntakeWhereInput[]; - userId?: StringFilter<'WaterIntake'> | string; - amountMl?: IntFilter<'WaterIntake'> | number; - date?: DateTimeFilter<'WaterIntake'> | Date | string; - time?: DateTimeFilter<'WaterIntake'> | Date | string; - createdAt?: DateTimeFilter<'WaterIntake'> | Date | string; - updatedAt?: DateTimeFilter<'WaterIntake'> | Date | string; - syncedAt?: DateTimeNullableFilter<'WaterIntake'> | Date | string | null; - isDeleted?: BoolFilter<'WaterIntake'> | boolean; - user?: XOR; - }, - 'id' - >; - - export type WaterIntakeOrderByWithAggregationInput = { - id?: SortOrder; - userId?: SortOrder; - amountMl?: SortOrder; - date?: SortOrder; - time?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrderInput | SortOrder; - isDeleted?: SortOrder; - _count?: WaterIntakeCountOrderByAggregateInput; - _avg?: WaterIntakeAvgOrderByAggregateInput; - _max?: WaterIntakeMaxOrderByAggregateInput; - _min?: WaterIntakeMinOrderByAggregateInput; - _sum?: WaterIntakeSumOrderByAggregateInput; - }; - - export type WaterIntakeScalarWhereWithAggregatesInput = { - AND?: WaterIntakeScalarWhereWithAggregatesInput | WaterIntakeScalarWhereWithAggregatesInput[]; - OR?: WaterIntakeScalarWhereWithAggregatesInput[]; - NOT?: WaterIntakeScalarWhereWithAggregatesInput | WaterIntakeScalarWhereWithAggregatesInput[]; - id?: StringWithAggregatesFilter<'WaterIntake'> | string; - userId?: StringWithAggregatesFilter<'WaterIntake'> | string; - amountMl?: IntWithAggregatesFilter<'WaterIntake'> | number; - date?: DateTimeWithAggregatesFilter<'WaterIntake'> | Date | string; - time?: DateTimeWithAggregatesFilter<'WaterIntake'> | Date | string; - createdAt?: DateTimeWithAggregatesFilter<'WaterIntake'> | Date | string; - updatedAt?: DateTimeWithAggregatesFilter<'WaterIntake'> | Date | string; - syncedAt?: DateTimeNullableWithAggregatesFilter<'WaterIntake'> | Date | string | null; - isDeleted?: BoolWithAggregatesFilter<'WaterIntake'> | boolean; - }; - - export type SleepEntryWhereInput = { - AND?: SleepEntryWhereInput | SleepEntryWhereInput[]; - OR?: SleepEntryWhereInput[]; - NOT?: SleepEntryWhereInput | SleepEntryWhereInput[]; - id?: StringFilter<'SleepEntry'> | string; - userId?: StringFilter<'SleepEntry'> | string; - hours?: FloatFilter<'SleepEntry'> | number; - quality?: StringFilter<'SleepEntry'> | string; - date?: DateTimeFilter<'SleepEntry'> | Date | string; - bedtime?: DateTimeNullableFilter<'SleepEntry'> | Date | string | null; - wakeTime?: DateTimeNullableFilter<'SleepEntry'> | Date | string | null; - notes?: StringNullableFilter<'SleepEntry'> | string | null; - createdAt?: DateTimeFilter<'SleepEntry'> | Date | string; - updatedAt?: DateTimeFilter<'SleepEntry'> | Date | string; - syncedAt?: DateTimeNullableFilter<'SleepEntry'> | Date | string | null; - isDeleted?: BoolFilter<'SleepEntry'> | boolean; - user?: XOR; - }; - - export type SleepEntryOrderByWithRelationInput = { - id?: SortOrder; - userId?: SortOrder; - hours?: SortOrder; - quality?: SortOrder; - date?: SortOrder; - bedtime?: SortOrderInput | SortOrder; - wakeTime?: SortOrderInput | SortOrder; - notes?: SortOrderInput | SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrderInput | SortOrder; - isDeleted?: SortOrder; - user?: UserOrderByWithRelationInput; - }; - - export type SleepEntryWhereUniqueInput = Prisma.AtLeast< - { - id?: string; - AND?: SleepEntryWhereInput | SleepEntryWhereInput[]; - OR?: SleepEntryWhereInput[]; - NOT?: SleepEntryWhereInput | SleepEntryWhereInput[]; - userId?: StringFilter<'SleepEntry'> | string; - hours?: FloatFilter<'SleepEntry'> | number; - quality?: StringFilter<'SleepEntry'> | string; - date?: DateTimeFilter<'SleepEntry'> | Date | string; - bedtime?: DateTimeNullableFilter<'SleepEntry'> | Date | string | null; - wakeTime?: DateTimeNullableFilter<'SleepEntry'> | Date | string | null; - notes?: StringNullableFilter<'SleepEntry'> | string | null; - createdAt?: DateTimeFilter<'SleepEntry'> | Date | string; - updatedAt?: DateTimeFilter<'SleepEntry'> | Date | string; - syncedAt?: DateTimeNullableFilter<'SleepEntry'> | Date | string | null; - isDeleted?: BoolFilter<'SleepEntry'> | boolean; - user?: XOR; - }, - 'id' - >; - - export type SleepEntryOrderByWithAggregationInput = { - id?: SortOrder; - userId?: SortOrder; - hours?: SortOrder; - quality?: SortOrder; - date?: SortOrder; - bedtime?: SortOrderInput | SortOrder; - wakeTime?: SortOrderInput | SortOrder; - notes?: SortOrderInput | SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrderInput | SortOrder; - isDeleted?: SortOrder; - _count?: SleepEntryCountOrderByAggregateInput; - _avg?: SleepEntryAvgOrderByAggregateInput; - _max?: SleepEntryMaxOrderByAggregateInput; - _min?: SleepEntryMinOrderByAggregateInput; - _sum?: SleepEntrySumOrderByAggregateInput; - }; - - export type SleepEntryScalarWhereWithAggregatesInput = { - AND?: SleepEntryScalarWhereWithAggregatesInput | SleepEntryScalarWhereWithAggregatesInput[]; - OR?: SleepEntryScalarWhereWithAggregatesInput[]; - NOT?: SleepEntryScalarWhereWithAggregatesInput | SleepEntryScalarWhereWithAggregatesInput[]; - id?: StringWithAggregatesFilter<'SleepEntry'> | string; - userId?: StringWithAggregatesFilter<'SleepEntry'> | string; - hours?: FloatWithAggregatesFilter<'SleepEntry'> | number; - quality?: StringWithAggregatesFilter<'SleepEntry'> | string; - date?: DateTimeWithAggregatesFilter<'SleepEntry'> | Date | string; - bedtime?: DateTimeNullableWithAggregatesFilter<'SleepEntry'> | Date | string | null; - wakeTime?: DateTimeNullableWithAggregatesFilter<'SleepEntry'> | Date | string | null; - notes?: StringNullableWithAggregatesFilter<'SleepEntry'> | string | null; - createdAt?: DateTimeWithAggregatesFilter<'SleepEntry'> | Date | string; - updatedAt?: DateTimeWithAggregatesFilter<'SleepEntry'> | Date | string; - syncedAt?: DateTimeNullableWithAggregatesFilter<'SleepEntry'> | Date | string | null; - isDeleted?: BoolWithAggregatesFilter<'SleepEntry'> | boolean; - }; - - export type GoalWhereInput = { - AND?: GoalWhereInput | GoalWhereInput[]; - OR?: GoalWhereInput[]; - NOT?: GoalWhereInput | GoalWhereInput[]; - id?: StringFilter<'Goal'> | string; - userId?: StringFilter<'Goal'> | string; - type?: StringFilter<'Goal'> | string; - target?: FloatFilter<'Goal'> | number; - current?: FloatFilter<'Goal'> | number; - unit?: StringFilter<'Goal'> | string; - startDate?: DateTimeFilter<'Goal'> | Date | string; - endDate?: DateTimeNullableFilter<'Goal'> | Date | string | null; - isActive?: BoolFilter<'Goal'> | boolean; - notes?: StringNullableFilter<'Goal'> | string | null; - createdAt?: DateTimeFilter<'Goal'> | Date | string; - updatedAt?: DateTimeFilter<'Goal'> | Date | string; - syncedAt?: DateTimeNullableFilter<'Goal'> | Date | string | null; - isDeleted?: BoolFilter<'Goal'> | boolean; - user?: XOR; - }; - - export type GoalOrderByWithRelationInput = { - id?: SortOrder; - userId?: SortOrder; - type?: SortOrder; - target?: SortOrder; - current?: SortOrder; - unit?: SortOrder; - startDate?: SortOrder; - endDate?: SortOrderInput | SortOrder; - isActive?: SortOrder; - notes?: SortOrderInput | SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrderInput | SortOrder; - isDeleted?: SortOrder; - user?: UserOrderByWithRelationInput; - }; - - export type GoalWhereUniqueInput = Prisma.AtLeast< - { - id?: string; - AND?: GoalWhereInput | GoalWhereInput[]; - OR?: GoalWhereInput[]; - NOT?: GoalWhereInput | GoalWhereInput[]; - userId?: StringFilter<'Goal'> | string; - type?: StringFilter<'Goal'> | string; - target?: FloatFilter<'Goal'> | number; - current?: FloatFilter<'Goal'> | number; - unit?: StringFilter<'Goal'> | string; - startDate?: DateTimeFilter<'Goal'> | Date | string; - endDate?: DateTimeNullableFilter<'Goal'> | Date | string | null; - isActive?: BoolFilter<'Goal'> | boolean; - notes?: StringNullableFilter<'Goal'> | string | null; - createdAt?: DateTimeFilter<'Goal'> | Date | string; - updatedAt?: DateTimeFilter<'Goal'> | Date | string; - syncedAt?: DateTimeNullableFilter<'Goal'> | Date | string | null; - isDeleted?: BoolFilter<'Goal'> | boolean; - user?: XOR; - }, - 'id' - >; - - export type GoalOrderByWithAggregationInput = { - id?: SortOrder; - userId?: SortOrder; - type?: SortOrder; - target?: SortOrder; - current?: SortOrder; - unit?: SortOrder; - startDate?: SortOrder; - endDate?: SortOrderInput | SortOrder; - isActive?: SortOrder; - notes?: SortOrderInput | SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrderInput | SortOrder; - isDeleted?: SortOrder; - _count?: GoalCountOrderByAggregateInput; - _avg?: GoalAvgOrderByAggregateInput; - _max?: GoalMaxOrderByAggregateInput; - _min?: GoalMinOrderByAggregateInput; - _sum?: GoalSumOrderByAggregateInput; - }; - - export type GoalScalarWhereWithAggregatesInput = { - AND?: GoalScalarWhereWithAggregatesInput | GoalScalarWhereWithAggregatesInput[]; - OR?: GoalScalarWhereWithAggregatesInput[]; - NOT?: GoalScalarWhereWithAggregatesInput | GoalScalarWhereWithAggregatesInput[]; - id?: StringWithAggregatesFilter<'Goal'> | string; - userId?: StringWithAggregatesFilter<'Goal'> | string; - type?: StringWithAggregatesFilter<'Goal'> | string; - target?: FloatWithAggregatesFilter<'Goal'> | number; - current?: FloatWithAggregatesFilter<'Goal'> | number; - unit?: StringWithAggregatesFilter<'Goal'> | string; - startDate?: DateTimeWithAggregatesFilter<'Goal'> | Date | string; - endDate?: DateTimeNullableWithAggregatesFilter<'Goal'> | Date | string | null; - isActive?: BoolWithAggregatesFilter<'Goal'> | boolean; - notes?: StringNullableWithAggregatesFilter<'Goal'> | string | null; - createdAt?: DateTimeWithAggregatesFilter<'Goal'> | Date | string; - updatedAt?: DateTimeWithAggregatesFilter<'Goal'> | Date | string; - syncedAt?: DateTimeNullableWithAggregatesFilter<'Goal'> | Date | string | null; - isDeleted?: BoolWithAggregatesFilter<'Goal'> | boolean; - }; - - export type UserCreateInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - healthProfiles?: HealthProfileCreateNestedManyWithoutUserInput; - workouts?: WorkoutCreateNestedManyWithoutUserInput; - meals?: MealCreateNestedManyWithoutUserInput; - mealItems?: MealItemCreateNestedManyWithoutUserInput; - progressLogs?: ProgressLogCreateNestedManyWithoutUserInput; - weightEntries?: WeightEntryCreateNestedManyWithoutUserInput; - waterIntake?: WaterIntakeCreateNestedManyWithoutUserInput; - sleepEntries?: SleepEntryCreateNestedManyWithoutUserInput; - goals?: GoalCreateNestedManyWithoutUserInput; - }; - - export type UserUncheckedCreateInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - healthProfiles?: HealthProfileUncheckedCreateNestedManyWithoutUserInput; - workouts?: WorkoutUncheckedCreateNestedManyWithoutUserInput; - meals?: MealUncheckedCreateNestedManyWithoutUserInput; - mealItems?: MealItemUncheckedCreateNestedManyWithoutUserInput; - progressLogs?: ProgressLogUncheckedCreateNestedManyWithoutUserInput; - weightEntries?: WeightEntryUncheckedCreateNestedManyWithoutUserInput; - waterIntake?: WaterIntakeUncheckedCreateNestedManyWithoutUserInput; - sleepEntries?: SleepEntryUncheckedCreateNestedManyWithoutUserInput; - goals?: GoalUncheckedCreateNestedManyWithoutUserInput; - }; - - export type UserUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - healthProfiles?: HealthProfileUpdateManyWithoutUserNestedInput; - workouts?: WorkoutUpdateManyWithoutUserNestedInput; - meals?: MealUpdateManyWithoutUserNestedInput; - mealItems?: MealItemUpdateManyWithoutUserNestedInput; - progressLogs?: ProgressLogUpdateManyWithoutUserNestedInput; - weightEntries?: WeightEntryUpdateManyWithoutUserNestedInput; - waterIntake?: WaterIntakeUpdateManyWithoutUserNestedInput; - sleepEntries?: SleepEntryUpdateManyWithoutUserNestedInput; - goals?: GoalUpdateManyWithoutUserNestedInput; - }; - - export type UserUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - healthProfiles?: HealthProfileUncheckedUpdateManyWithoutUserNestedInput; - workouts?: WorkoutUncheckedUpdateManyWithoutUserNestedInput; - meals?: MealUncheckedUpdateManyWithoutUserNestedInput; - mealItems?: MealItemUncheckedUpdateManyWithoutUserNestedInput; - progressLogs?: ProgressLogUncheckedUpdateManyWithoutUserNestedInput; - weightEntries?: WeightEntryUncheckedUpdateManyWithoutUserNestedInput; - waterIntake?: WaterIntakeUncheckedUpdateManyWithoutUserNestedInput; - sleepEntries?: SleepEntryUncheckedUpdateManyWithoutUserNestedInput; - goals?: GoalUncheckedUpdateManyWithoutUserNestedInput; - }; - - export type UserCreateManyInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - }; - - export type UserUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - }; - - export type UserUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - }; - - export type HealthProfileCreateInput = { - id?: string; - height?: number | null; - weight?: number | null; - age?: number | null; - gender?: string | null; - birthday?: Date | string | null; - targetWeight?: number | null; - targetCalories?: number | null; - targetWaterL?: number | null; - activityLevel?: string | null; - fitnessGoal?: string | null; - heightUnit?: string | null; - weightUnit?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - user: UserCreateNestedOneWithoutHealthProfilesInput; - }; - - export type HealthProfileUncheckedCreateInput = { - id?: string; - userId: string; - height?: number | null; - weight?: number | null; - age?: number | null; - gender?: string | null; - birthday?: Date | string | null; - targetWeight?: number | null; - targetCalories?: number | null; - targetWaterL?: number | null; - activityLevel?: string | null; - fitnessGoal?: string | null; - heightUnit?: string | null; - weightUnit?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type HealthProfileUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - height?: NullableFloatFieldUpdateOperationsInput | number | null; - weight?: NullableFloatFieldUpdateOperationsInput | number | null; - age?: NullableIntFieldUpdateOperationsInput | number | null; - gender?: NullableStringFieldUpdateOperationsInput | string | null; - birthday?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - targetWeight?: NullableFloatFieldUpdateOperationsInput | number | null; - targetCalories?: NullableIntFieldUpdateOperationsInput | number | null; - targetWaterL?: NullableFloatFieldUpdateOperationsInput | number | null; - activityLevel?: NullableStringFieldUpdateOperationsInput | string | null; - fitnessGoal?: NullableStringFieldUpdateOperationsInput | string | null; - heightUnit?: NullableStringFieldUpdateOperationsInput | string | null; - weightUnit?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - user?: UserUpdateOneRequiredWithoutHealthProfilesNestedInput; - }; - - export type HealthProfileUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - height?: NullableFloatFieldUpdateOperationsInput | number | null; - weight?: NullableFloatFieldUpdateOperationsInput | number | null; - age?: NullableIntFieldUpdateOperationsInput | number | null; - gender?: NullableStringFieldUpdateOperationsInput | string | null; - birthday?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - targetWeight?: NullableFloatFieldUpdateOperationsInput | number | null; - targetCalories?: NullableIntFieldUpdateOperationsInput | number | null; - targetWaterL?: NullableFloatFieldUpdateOperationsInput | number | null; - activityLevel?: NullableStringFieldUpdateOperationsInput | string | null; - fitnessGoal?: NullableStringFieldUpdateOperationsInput | string | null; - heightUnit?: NullableStringFieldUpdateOperationsInput | string | null; - weightUnit?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type HealthProfileCreateManyInput = { - id?: string; - userId: string; - height?: number | null; - weight?: number | null; - age?: number | null; - gender?: string | null; - birthday?: Date | string | null; - targetWeight?: number | null; - targetCalories?: number | null; - targetWaterL?: number | null; - activityLevel?: string | null; - fitnessGoal?: string | null; - heightUnit?: string | null; - weightUnit?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type HealthProfileUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string; - height?: NullableFloatFieldUpdateOperationsInput | number | null; - weight?: NullableFloatFieldUpdateOperationsInput | number | null; - age?: NullableIntFieldUpdateOperationsInput | number | null; - gender?: NullableStringFieldUpdateOperationsInput | string | null; - birthday?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - targetWeight?: NullableFloatFieldUpdateOperationsInput | number | null; - targetCalories?: NullableIntFieldUpdateOperationsInput | number | null; - targetWaterL?: NullableFloatFieldUpdateOperationsInput | number | null; - activityLevel?: NullableStringFieldUpdateOperationsInput | string | null; - fitnessGoal?: NullableStringFieldUpdateOperationsInput | string | null; - heightUnit?: NullableStringFieldUpdateOperationsInput | string | null; - weightUnit?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type HealthProfileUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - height?: NullableFloatFieldUpdateOperationsInput | number | null; - weight?: NullableFloatFieldUpdateOperationsInput | number | null; - age?: NullableIntFieldUpdateOperationsInput | number | null; - gender?: NullableStringFieldUpdateOperationsInput | string | null; - birthday?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - targetWeight?: NullableFloatFieldUpdateOperationsInput | number | null; - targetCalories?: NullableIntFieldUpdateOperationsInput | number | null; - targetWaterL?: NullableFloatFieldUpdateOperationsInput | number | null; - activityLevel?: NullableStringFieldUpdateOperationsInput | string | null; - fitnessGoal?: NullableStringFieldUpdateOperationsInput | string | null; - heightUnit?: NullableStringFieldUpdateOperationsInput | string | null; - weightUnit?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type WorkoutCreateInput = { - id?: string; - title: string; - category: string; - durationMin?: number | null; - calories?: number | null; - date: Date | string; - notes?: string | null; - isCompleted?: boolean; - totalTime?: number | null; - restTime?: number | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - user: UserCreateNestedOneWithoutWorkoutsInput; - exercises?: ExerciseCreateNestedManyWithoutWorkoutInput; - }; - - export type WorkoutUncheckedCreateInput = { - id?: string; - userId: string; - title: string; - category: string; - durationMin?: number | null; - calories?: number | null; - date: Date | string; - notes?: string | null; - isCompleted?: boolean; - totalTime?: number | null; - restTime?: number | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - exercises?: ExerciseUncheckedCreateNestedManyWithoutWorkoutInput; - }; - - export type WorkoutUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - title?: StringFieldUpdateOperationsInput | string; - category?: StringFieldUpdateOperationsInput | string; - durationMin?: NullableIntFieldUpdateOperationsInput | number | null; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - isCompleted?: BoolFieldUpdateOperationsInput | boolean; - totalTime?: NullableIntFieldUpdateOperationsInput | number | null; - restTime?: NullableIntFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - user?: UserUpdateOneRequiredWithoutWorkoutsNestedInput; - exercises?: ExerciseUpdateManyWithoutWorkoutNestedInput; - }; - - export type WorkoutUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - title?: StringFieldUpdateOperationsInput | string; - category?: StringFieldUpdateOperationsInput | string; - durationMin?: NullableIntFieldUpdateOperationsInput | number | null; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - isCompleted?: BoolFieldUpdateOperationsInput | boolean; - totalTime?: NullableIntFieldUpdateOperationsInput | number | null; - restTime?: NullableIntFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - exercises?: ExerciseUncheckedUpdateManyWithoutWorkoutNestedInput; - }; - - export type WorkoutCreateManyInput = { - id?: string; - userId: string; - title: string; - category: string; - durationMin?: number | null; - calories?: number | null; - date: Date | string; - notes?: string | null; - isCompleted?: boolean; - totalTime?: number | null; - restTime?: number | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type WorkoutUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string; - title?: StringFieldUpdateOperationsInput | string; - category?: StringFieldUpdateOperationsInput | string; - durationMin?: NullableIntFieldUpdateOperationsInput | number | null; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - isCompleted?: BoolFieldUpdateOperationsInput | boolean; - totalTime?: NullableIntFieldUpdateOperationsInput | number | null; - restTime?: NullableIntFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type WorkoutUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - title?: StringFieldUpdateOperationsInput | string; - category?: StringFieldUpdateOperationsInput | string; - durationMin?: NullableIntFieldUpdateOperationsInput | number | null; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - isCompleted?: BoolFieldUpdateOperationsInput | boolean; - totalTime?: NullableIntFieldUpdateOperationsInput | number | null; - restTime?: NullableIntFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type ExerciseCreateInput = { - id?: string; - name: string; - sets?: number | null; - reps?: number | null; - weightKg?: number | null; - duration?: number | null; - distance?: number | null; - restTime?: number | null; - order?: number; - isCompleted?: boolean; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - workout: WorkoutCreateNestedOneWithoutExercisesInput; - }; - - export type ExerciseUncheckedCreateInput = { - id?: string; - workoutId: string; - name: string; - sets?: number | null; - reps?: number | null; - weightKg?: number | null; - duration?: number | null; - distance?: number | null; - restTime?: number | null; - order?: number; - isCompleted?: boolean; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type ExerciseUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - sets?: NullableIntFieldUpdateOperationsInput | number | null; - reps?: NullableIntFieldUpdateOperationsInput | number | null; - weightKg?: NullableFloatFieldUpdateOperationsInput | number | null; - duration?: NullableIntFieldUpdateOperationsInput | number | null; - distance?: NullableFloatFieldUpdateOperationsInput | number | null; - restTime?: NullableIntFieldUpdateOperationsInput | number | null; - order?: IntFieldUpdateOperationsInput | number; - isCompleted?: BoolFieldUpdateOperationsInput | boolean; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - workout?: WorkoutUpdateOneRequiredWithoutExercisesNestedInput; - }; - - export type ExerciseUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - workoutId?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - sets?: NullableIntFieldUpdateOperationsInput | number | null; - reps?: NullableIntFieldUpdateOperationsInput | number | null; - weightKg?: NullableFloatFieldUpdateOperationsInput | number | null; - duration?: NullableIntFieldUpdateOperationsInput | number | null; - distance?: NullableFloatFieldUpdateOperationsInput | number | null; - restTime?: NullableIntFieldUpdateOperationsInput | number | null; - order?: IntFieldUpdateOperationsInput | number; - isCompleted?: BoolFieldUpdateOperationsInput | boolean; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type ExerciseCreateManyInput = { - id?: string; - workoutId: string; - name: string; - sets?: number | null; - reps?: number | null; - weightKg?: number | null; - duration?: number | null; - distance?: number | null; - restTime?: number | null; - order?: number; - isCompleted?: boolean; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type ExerciseUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - sets?: NullableIntFieldUpdateOperationsInput | number | null; - reps?: NullableIntFieldUpdateOperationsInput | number | null; - weightKg?: NullableFloatFieldUpdateOperationsInput | number | null; - duration?: NullableIntFieldUpdateOperationsInput | number | null; - distance?: NullableFloatFieldUpdateOperationsInput | number | null; - restTime?: NullableIntFieldUpdateOperationsInput | number | null; - order?: IntFieldUpdateOperationsInput | number; - isCompleted?: BoolFieldUpdateOperationsInput | boolean; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type ExerciseUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string; - workoutId?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - sets?: NullableIntFieldUpdateOperationsInput | number | null; - reps?: NullableIntFieldUpdateOperationsInput | number | null; - weightKg?: NullableFloatFieldUpdateOperationsInput | number | null; - duration?: NullableIntFieldUpdateOperationsInput | number | null; - distance?: NullableFloatFieldUpdateOperationsInput | number | null; - restTime?: NullableIntFieldUpdateOperationsInput | number | null; - order?: IntFieldUpdateOperationsInput | number; - isCompleted?: BoolFieldUpdateOperationsInput | boolean; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type MealCreateInput = { - id?: string; - name: string; - mealType: string; - calories?: number | null; - protein?: number | null; - carbs?: number | null; - fat?: number | null; - date: Date | string; - notes?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - user: UserCreateNestedOneWithoutMealsInput; - mealItems?: MealItemCreateNestedManyWithoutMealInput; - }; - - export type MealUncheckedCreateInput = { - id?: string; - userId: string; - name: string; - mealType: string; - calories?: number | null; - protein?: number | null; - carbs?: number | null; - fat?: number | null; - date: Date | string; - notes?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - mealItems?: MealItemUncheckedCreateNestedManyWithoutMealInput; - }; - - export type MealUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - mealType?: StringFieldUpdateOperationsInput | string; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - protein?: NullableFloatFieldUpdateOperationsInput | number | null; - carbs?: NullableFloatFieldUpdateOperationsInput | number | null; - fat?: NullableFloatFieldUpdateOperationsInput | number | null; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - user?: UserUpdateOneRequiredWithoutMealsNestedInput; - mealItems?: MealItemUpdateManyWithoutMealNestedInput; - }; - - export type MealUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - mealType?: StringFieldUpdateOperationsInput | string; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - protein?: NullableFloatFieldUpdateOperationsInput | number | null; - carbs?: NullableFloatFieldUpdateOperationsInput | number | null; - fat?: NullableFloatFieldUpdateOperationsInput | number | null; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - mealItems?: MealItemUncheckedUpdateManyWithoutMealNestedInput; - }; - - export type MealCreateManyInput = { - id?: string; - userId: string; - name: string; - mealType: string; - calories?: number | null; - protein?: number | null; - carbs?: number | null; - fat?: number | null; - date: Date | string; - notes?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type MealUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - mealType?: StringFieldUpdateOperationsInput | string; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - protein?: NullableFloatFieldUpdateOperationsInput | number | null; - carbs?: NullableFloatFieldUpdateOperationsInput | number | null; - fat?: NullableFloatFieldUpdateOperationsInput | number | null; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type MealUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - mealType?: StringFieldUpdateOperationsInput | string; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - protein?: NullableFloatFieldUpdateOperationsInput | number | null; - carbs?: NullableFloatFieldUpdateOperationsInput | number | null; - fat?: NullableFloatFieldUpdateOperationsInput | number | null; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type MealItemCreateInput = { - id?: string; - name: string; - calories?: number | null; - protein?: number | null; - carbs?: number | null; - fat?: number | null; - quantity?: number | null; - unit?: string | null; - isHighInProtein?: boolean; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - meal: MealCreateNestedOneWithoutMealItemsInput; - user: UserCreateNestedOneWithoutMealItemsInput; - }; - - export type MealItemUncheckedCreateInput = { - id?: string; - mealId: string; - userId: string; - name: string; - calories?: number | null; - protein?: number | null; - carbs?: number | null; - fat?: number | null; - quantity?: number | null; - unit?: string | null; - isHighInProtein?: boolean; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type MealItemUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - protein?: NullableFloatFieldUpdateOperationsInput | number | null; - carbs?: NullableFloatFieldUpdateOperationsInput | number | null; - fat?: NullableFloatFieldUpdateOperationsInput | number | null; - quantity?: NullableFloatFieldUpdateOperationsInput | number | null; - unit?: NullableStringFieldUpdateOperationsInput | string | null; - isHighInProtein?: BoolFieldUpdateOperationsInput | boolean; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - meal?: MealUpdateOneRequiredWithoutMealItemsNestedInput; - user?: UserUpdateOneRequiredWithoutMealItemsNestedInput; - }; - - export type MealItemUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - mealId?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - protein?: NullableFloatFieldUpdateOperationsInput | number | null; - carbs?: NullableFloatFieldUpdateOperationsInput | number | null; - fat?: NullableFloatFieldUpdateOperationsInput | number | null; - quantity?: NullableFloatFieldUpdateOperationsInput | number | null; - unit?: NullableStringFieldUpdateOperationsInput | string | null; - isHighInProtein?: BoolFieldUpdateOperationsInput | boolean; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type MealItemCreateManyInput = { - id?: string; - mealId: string; - userId: string; - name: string; - calories?: number | null; - protein?: number | null; - carbs?: number | null; - fat?: number | null; - quantity?: number | null; - unit?: string | null; - isHighInProtein?: boolean; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type MealItemUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - protein?: NullableFloatFieldUpdateOperationsInput | number | null; - carbs?: NullableFloatFieldUpdateOperationsInput | number | null; - fat?: NullableFloatFieldUpdateOperationsInput | number | null; - quantity?: NullableFloatFieldUpdateOperationsInput | number | null; - unit?: NullableStringFieldUpdateOperationsInput | string | null; - isHighInProtein?: BoolFieldUpdateOperationsInput | boolean; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type MealItemUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string; - mealId?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - protein?: NullableFloatFieldUpdateOperationsInput | number | null; - carbs?: NullableFloatFieldUpdateOperationsInput | number | null; - fat?: NullableFloatFieldUpdateOperationsInput | number | null; - quantity?: NullableFloatFieldUpdateOperationsInput | number | null; - unit?: NullableStringFieldUpdateOperationsInput | string | null; - isHighInProtein?: BoolFieldUpdateOperationsInput | boolean; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type ProgressLogCreateInput = { - id?: string; - date: Date | string; - waterL?: number | null; - sleepHrs?: number | null; - mood?: string | null; - weightKg?: number | null; - steps?: number | null; - activeMinutes?: number | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - user: UserCreateNestedOneWithoutProgressLogsInput; - }; - - export type ProgressLogUncheckedCreateInput = { - id?: string; - userId: string; - date: Date | string; - waterL?: number | null; - sleepHrs?: number | null; - mood?: string | null; - weightKg?: number | null; - steps?: number | null; - activeMinutes?: number | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type ProgressLogUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - waterL?: NullableFloatFieldUpdateOperationsInput | number | null; - sleepHrs?: NullableFloatFieldUpdateOperationsInput | number | null; - mood?: NullableStringFieldUpdateOperationsInput | string | null; - weightKg?: NullableFloatFieldUpdateOperationsInput | number | null; - steps?: NullableIntFieldUpdateOperationsInput | number | null; - activeMinutes?: NullableIntFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - user?: UserUpdateOneRequiredWithoutProgressLogsNestedInput; - }; - - export type ProgressLogUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - waterL?: NullableFloatFieldUpdateOperationsInput | number | null; - sleepHrs?: NullableFloatFieldUpdateOperationsInput | number | null; - mood?: NullableStringFieldUpdateOperationsInput | string | null; - weightKg?: NullableFloatFieldUpdateOperationsInput | number | null; - steps?: NullableIntFieldUpdateOperationsInput | number | null; - activeMinutes?: NullableIntFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type ProgressLogCreateManyInput = { - id?: string; - userId: string; - date: Date | string; - waterL?: number | null; - sleepHrs?: number | null; - mood?: string | null; - weightKg?: number | null; - steps?: number | null; - activeMinutes?: number | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type ProgressLogUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - waterL?: NullableFloatFieldUpdateOperationsInput | number | null; - sleepHrs?: NullableFloatFieldUpdateOperationsInput | number | null; - mood?: NullableStringFieldUpdateOperationsInput | string | null; - weightKg?: NullableFloatFieldUpdateOperationsInput | number | null; - steps?: NullableIntFieldUpdateOperationsInput | number | null; - activeMinutes?: NullableIntFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type ProgressLogUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - waterL?: NullableFloatFieldUpdateOperationsInput | number | null; - sleepHrs?: NullableFloatFieldUpdateOperationsInput | number | null; - mood?: NullableStringFieldUpdateOperationsInput | string | null; - weightKg?: NullableFloatFieldUpdateOperationsInput | number | null; - steps?: NullableIntFieldUpdateOperationsInput | number | null; - activeMinutes?: NullableIntFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type WeightEntryCreateInput = { - id?: string; - weightKg: number; - date: Date | string; - photo?: string | null; - notes?: string | null; - bodyFatPercentage?: number | null; - muscleMassKg?: number | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - user: UserCreateNestedOneWithoutWeightEntriesInput; - }; - - export type WeightEntryUncheckedCreateInput = { - id?: string; - userId: string; - weightKg: number; - date: Date | string; - photo?: string | null; - notes?: string | null; - bodyFatPercentage?: number | null; - muscleMassKg?: number | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type WeightEntryUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - weightKg?: FloatFieldUpdateOperationsInput | number; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - photo?: NullableStringFieldUpdateOperationsInput | string | null; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - bodyFatPercentage?: NullableFloatFieldUpdateOperationsInput | number | null; - muscleMassKg?: NullableFloatFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - user?: UserUpdateOneRequiredWithoutWeightEntriesNestedInput; - }; - - export type WeightEntryUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - weightKg?: FloatFieldUpdateOperationsInput | number; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - photo?: NullableStringFieldUpdateOperationsInput | string | null; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - bodyFatPercentage?: NullableFloatFieldUpdateOperationsInput | number | null; - muscleMassKg?: NullableFloatFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type WeightEntryCreateManyInput = { - id?: string; - userId: string; - weightKg: number; - date: Date | string; - photo?: string | null; - notes?: string | null; - bodyFatPercentage?: number | null; - muscleMassKg?: number | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type WeightEntryUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string; - weightKg?: FloatFieldUpdateOperationsInput | number; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - photo?: NullableStringFieldUpdateOperationsInput | string | null; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - bodyFatPercentage?: NullableFloatFieldUpdateOperationsInput | number | null; - muscleMassKg?: NullableFloatFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type WeightEntryUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - weightKg?: FloatFieldUpdateOperationsInput | number; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - photo?: NullableStringFieldUpdateOperationsInput | string | null; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - bodyFatPercentage?: NullableFloatFieldUpdateOperationsInput | number | null; - muscleMassKg?: NullableFloatFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type WaterIntakeCreateInput = { - id?: string; - amountMl: number; - date: Date | string; - time: Date | string; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - user: UserCreateNestedOneWithoutWaterIntakeInput; - }; - - export type WaterIntakeUncheckedCreateInput = { - id?: string; - userId: string; - amountMl: number; - date: Date | string; - time: Date | string; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type WaterIntakeUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - amountMl?: IntFieldUpdateOperationsInput | number; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - time?: DateTimeFieldUpdateOperationsInput | Date | string; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - user?: UserUpdateOneRequiredWithoutWaterIntakeNestedInput; - }; - - export type WaterIntakeUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - amountMl?: IntFieldUpdateOperationsInput | number; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - time?: DateTimeFieldUpdateOperationsInput | Date | string; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type WaterIntakeCreateManyInput = { - id?: string; - userId: string; - amountMl: number; - date: Date | string; - time: Date | string; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type WaterIntakeUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string; - amountMl?: IntFieldUpdateOperationsInput | number; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - time?: DateTimeFieldUpdateOperationsInput | Date | string; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type WaterIntakeUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - amountMl?: IntFieldUpdateOperationsInput | number; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - time?: DateTimeFieldUpdateOperationsInput | Date | string; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type SleepEntryCreateInput = { - id?: string; - hours: number; - quality: string; - date: Date | string; - bedtime?: Date | string | null; - wakeTime?: Date | string | null; - notes?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - user: UserCreateNestedOneWithoutSleepEntriesInput; - }; - - export type SleepEntryUncheckedCreateInput = { - id?: string; - userId: string; - hours: number; - quality: string; - date: Date | string; - bedtime?: Date | string | null; - wakeTime?: Date | string | null; - notes?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type SleepEntryUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - hours?: FloatFieldUpdateOperationsInput | number; - quality?: StringFieldUpdateOperationsInput | string; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - bedtime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - wakeTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - user?: UserUpdateOneRequiredWithoutSleepEntriesNestedInput; - }; - - export type SleepEntryUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - hours?: FloatFieldUpdateOperationsInput | number; - quality?: StringFieldUpdateOperationsInput | string; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - bedtime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - wakeTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type SleepEntryCreateManyInput = { - id?: string; - userId: string; - hours: number; - quality: string; - date: Date | string; - bedtime?: Date | string | null; - wakeTime?: Date | string | null; - notes?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type SleepEntryUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string; - hours?: FloatFieldUpdateOperationsInput | number; - quality?: StringFieldUpdateOperationsInput | string; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - bedtime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - wakeTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type SleepEntryUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - hours?: FloatFieldUpdateOperationsInput | number; - quality?: StringFieldUpdateOperationsInput | string; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - bedtime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - wakeTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type GoalCreateInput = { - id?: string; - type: string; - target: number; - current?: number; - unit: string; - startDate: Date | string; - endDate?: Date | string | null; - isActive?: boolean; - notes?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - user: UserCreateNestedOneWithoutGoalsInput; - }; - - export type GoalUncheckedCreateInput = { - id?: string; - userId: string; - type: string; - target: number; - current?: number; - unit: string; - startDate: Date | string; - endDate?: Date | string | null; - isActive?: boolean; - notes?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type GoalUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - type?: StringFieldUpdateOperationsInput | string; - target?: FloatFieldUpdateOperationsInput | number; - current?: FloatFieldUpdateOperationsInput | number; - unit?: StringFieldUpdateOperationsInput | string; - startDate?: DateTimeFieldUpdateOperationsInput | Date | string; - endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isActive?: BoolFieldUpdateOperationsInput | boolean; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - user?: UserUpdateOneRequiredWithoutGoalsNestedInput; - }; - - export type GoalUncheckedUpdateInput = { - id?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - type?: StringFieldUpdateOperationsInput | string; - target?: FloatFieldUpdateOperationsInput | number; - current?: FloatFieldUpdateOperationsInput | number; - unit?: StringFieldUpdateOperationsInput | string; - startDate?: DateTimeFieldUpdateOperationsInput | Date | string; - endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isActive?: BoolFieldUpdateOperationsInput | boolean; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type GoalCreateManyInput = { - id?: string; - userId: string; - type: string; - target: number; - current?: number; - unit: string; - startDate: Date | string; - endDate?: Date | string | null; - isActive?: boolean; - notes?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type GoalUpdateManyMutationInput = { - id?: StringFieldUpdateOperationsInput | string; - type?: StringFieldUpdateOperationsInput | string; - target?: FloatFieldUpdateOperationsInput | number; - current?: FloatFieldUpdateOperationsInput | number; - unit?: StringFieldUpdateOperationsInput | string; - startDate?: DateTimeFieldUpdateOperationsInput | Date | string; - endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isActive?: BoolFieldUpdateOperationsInput | boolean; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type GoalUncheckedUpdateManyInput = { - id?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - type?: StringFieldUpdateOperationsInput | string; - target?: FloatFieldUpdateOperationsInput | number; - current?: FloatFieldUpdateOperationsInput | number; - unit?: StringFieldUpdateOperationsInput | string; - startDate?: DateTimeFieldUpdateOperationsInput | Date | string; - endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isActive?: BoolFieldUpdateOperationsInput | boolean; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type StringFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel>; - in?: string[] | ListStringFieldRefInput<$PrismaModel>; - notIn?: string[] | ListStringFieldRefInput<$PrismaModel>; - lt?: string | StringFieldRefInput<$PrismaModel>; - lte?: string | StringFieldRefInput<$PrismaModel>; - gt?: string | StringFieldRefInput<$PrismaModel>; - gte?: string | StringFieldRefInput<$PrismaModel>; - contains?: string | StringFieldRefInput<$PrismaModel>; - startsWith?: string | StringFieldRefInput<$PrismaModel>; - endsWith?: string | StringFieldRefInput<$PrismaModel>; - mode?: QueryMode; - not?: NestedStringFilter<$PrismaModel> | string; - }; - - export type StringNullableFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> | null; - in?: string[] | ListStringFieldRefInput<$PrismaModel> | null; - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null; - lt?: string | StringFieldRefInput<$PrismaModel>; - lte?: string | StringFieldRefInput<$PrismaModel>; - gt?: string | StringFieldRefInput<$PrismaModel>; - gte?: string | StringFieldRefInput<$PrismaModel>; - contains?: string | StringFieldRefInput<$PrismaModel>; - startsWith?: string | StringFieldRefInput<$PrismaModel>; - endsWith?: string | StringFieldRefInput<$PrismaModel>; - mode?: QueryMode; - not?: NestedStringNullableFilter<$PrismaModel> | string | null; - }; - - export type DateTimeFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>; - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>; - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - not?: NestedDateTimeFilter<$PrismaModel> | Date | string; - }; - - export type HealthProfileListRelationFilter = { - every?: HealthProfileWhereInput; - some?: HealthProfileWhereInput; - none?: HealthProfileWhereInput; - }; - - export type WorkoutListRelationFilter = { - every?: WorkoutWhereInput; - some?: WorkoutWhereInput; - none?: WorkoutWhereInput; - }; - - export type MealListRelationFilter = { - every?: MealWhereInput; - some?: MealWhereInput; - none?: MealWhereInput; - }; - - export type MealItemListRelationFilter = { - every?: MealItemWhereInput; - some?: MealItemWhereInput; - none?: MealItemWhereInput; - }; - - export type ProgressLogListRelationFilter = { - every?: ProgressLogWhereInput; - some?: ProgressLogWhereInput; - none?: ProgressLogWhereInput; - }; - - export type WeightEntryListRelationFilter = { - every?: WeightEntryWhereInput; - some?: WeightEntryWhereInput; - none?: WeightEntryWhereInput; - }; - - export type WaterIntakeListRelationFilter = { - every?: WaterIntakeWhereInput; - some?: WaterIntakeWhereInput; - none?: WaterIntakeWhereInput; - }; - - export type SleepEntryListRelationFilter = { - every?: SleepEntryWhereInput; - some?: SleepEntryWhereInput; - none?: SleepEntryWhereInput; - }; - - export type GoalListRelationFilter = { - every?: GoalWhereInput; - some?: GoalWhereInput; - none?: GoalWhereInput; - }; - - export type SortOrderInput = { - sort: SortOrder; - nulls?: NullsOrder; - }; - - export type HealthProfileOrderByRelationAggregateInput = { - _count?: SortOrder; - }; - - export type WorkoutOrderByRelationAggregateInput = { - _count?: SortOrder; - }; - - export type MealOrderByRelationAggregateInput = { - _count?: SortOrder; - }; - - export type MealItemOrderByRelationAggregateInput = { - _count?: SortOrder; - }; - - export type ProgressLogOrderByRelationAggregateInput = { - _count?: SortOrder; - }; - - export type WeightEntryOrderByRelationAggregateInput = { - _count?: SortOrder; - }; - - export type WaterIntakeOrderByRelationAggregateInput = { - _count?: SortOrder; - }; - - export type SleepEntryOrderByRelationAggregateInput = { - _count?: SortOrder; - }; - - export type GoalOrderByRelationAggregateInput = { - _count?: SortOrder; - }; - - export type UserCountOrderByAggregateInput = { - id?: SortOrder; - clerkId?: SortOrder; - name?: SortOrder; - email?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - }; - - export type UserMaxOrderByAggregateInput = { - id?: SortOrder; - clerkId?: SortOrder; - name?: SortOrder; - email?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - }; - - export type UserMinOrderByAggregateInput = { - id?: SortOrder; - clerkId?: SortOrder; - name?: SortOrder; - email?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - }; - - export type StringWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel>; - in?: string[] | ListStringFieldRefInput<$PrismaModel>; - notIn?: string[] | ListStringFieldRefInput<$PrismaModel>; - lt?: string | StringFieldRefInput<$PrismaModel>; - lte?: string | StringFieldRefInput<$PrismaModel>; - gt?: string | StringFieldRefInput<$PrismaModel>; - gte?: string | StringFieldRefInput<$PrismaModel>; - contains?: string | StringFieldRefInput<$PrismaModel>; - startsWith?: string | StringFieldRefInput<$PrismaModel>; - endsWith?: string | StringFieldRefInput<$PrismaModel>; - mode?: QueryMode; - not?: NestedStringWithAggregatesFilter<$PrismaModel> | string; - _count?: NestedIntFilter<$PrismaModel>; - _min?: NestedStringFilter<$PrismaModel>; - _max?: NestedStringFilter<$PrismaModel>; - }; - - export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> | null; - in?: string[] | ListStringFieldRefInput<$PrismaModel> | null; - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null; - lt?: string | StringFieldRefInput<$PrismaModel>; - lte?: string | StringFieldRefInput<$PrismaModel>; - gt?: string | StringFieldRefInput<$PrismaModel>; - gte?: string | StringFieldRefInput<$PrismaModel>; - contains?: string | StringFieldRefInput<$PrismaModel>; - startsWith?: string | StringFieldRefInput<$PrismaModel>; - endsWith?: string | StringFieldRefInput<$PrismaModel>; - mode?: QueryMode; - not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null; - _count?: NestedIntNullableFilter<$PrismaModel>; - _min?: NestedStringNullableFilter<$PrismaModel>; - _max?: NestedStringNullableFilter<$PrismaModel>; - }; - - export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>; - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>; - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string; - _count?: NestedIntFilter<$PrismaModel>; - _min?: NestedDateTimeFilter<$PrismaModel>; - _max?: NestedDateTimeFilter<$PrismaModel>; - }; - - export type FloatNullableFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> | null; - in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null; - notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null; - lt?: number | FloatFieldRefInput<$PrismaModel>; - lte?: number | FloatFieldRefInput<$PrismaModel>; - gt?: number | FloatFieldRefInput<$PrismaModel>; - gte?: number | FloatFieldRefInput<$PrismaModel>; - not?: NestedFloatNullableFilter<$PrismaModel> | number | null; - }; - - export type IntNullableFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> | null; - in?: number[] | ListIntFieldRefInput<$PrismaModel> | null; - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null; - lt?: number | IntFieldRefInput<$PrismaModel>; - lte?: number | IntFieldRefInput<$PrismaModel>; - gt?: number | IntFieldRefInput<$PrismaModel>; - gte?: number | IntFieldRefInput<$PrismaModel>; - not?: NestedIntNullableFilter<$PrismaModel> | number | null; - }; - - export type DateTimeNullableFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null; - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null; - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null; - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null; - }; - - export type BoolFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel>; - not?: NestedBoolFilter<$PrismaModel> | boolean; - }; - - export type UserScalarRelationFilter = { - is?: UserWhereInput; - isNot?: UserWhereInput; - }; - - export type HealthProfileCountOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - height?: SortOrder; - weight?: SortOrder; - age?: SortOrder; - gender?: SortOrder; - birthday?: SortOrder; - targetWeight?: SortOrder; - targetCalories?: SortOrder; - targetWaterL?: SortOrder; - activityLevel?: SortOrder; - fitnessGoal?: SortOrder; - heightUnit?: SortOrder; - weightUnit?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type HealthProfileAvgOrderByAggregateInput = { - height?: SortOrder; - weight?: SortOrder; - age?: SortOrder; - targetWeight?: SortOrder; - targetCalories?: SortOrder; - targetWaterL?: SortOrder; - }; - - export type HealthProfileMaxOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - height?: SortOrder; - weight?: SortOrder; - age?: SortOrder; - gender?: SortOrder; - birthday?: SortOrder; - targetWeight?: SortOrder; - targetCalories?: SortOrder; - targetWaterL?: SortOrder; - activityLevel?: SortOrder; - fitnessGoal?: SortOrder; - heightUnit?: SortOrder; - weightUnit?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type HealthProfileMinOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - height?: SortOrder; - weight?: SortOrder; - age?: SortOrder; - gender?: SortOrder; - birthday?: SortOrder; - targetWeight?: SortOrder; - targetCalories?: SortOrder; - targetWaterL?: SortOrder; - activityLevel?: SortOrder; - fitnessGoal?: SortOrder; - heightUnit?: SortOrder; - weightUnit?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type HealthProfileSumOrderByAggregateInput = { - height?: SortOrder; - weight?: SortOrder; - age?: SortOrder; - targetWeight?: SortOrder; - targetCalories?: SortOrder; - targetWaterL?: SortOrder; - }; - - export type FloatNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> | null; - in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null; - notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null; - lt?: number | FloatFieldRefInput<$PrismaModel>; - lte?: number | FloatFieldRefInput<$PrismaModel>; - gt?: number | FloatFieldRefInput<$PrismaModel>; - gte?: number | FloatFieldRefInput<$PrismaModel>; - not?: NestedFloatNullableWithAggregatesFilter<$PrismaModel> | number | null; - _count?: NestedIntNullableFilter<$PrismaModel>; - _avg?: NestedFloatNullableFilter<$PrismaModel>; - _sum?: NestedFloatNullableFilter<$PrismaModel>; - _min?: NestedFloatNullableFilter<$PrismaModel>; - _max?: NestedFloatNullableFilter<$PrismaModel>; - }; - - export type IntNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> | null; - in?: number[] | ListIntFieldRefInput<$PrismaModel> | null; - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null; - lt?: number | IntFieldRefInput<$PrismaModel>; - lte?: number | IntFieldRefInput<$PrismaModel>; - gt?: number | IntFieldRefInput<$PrismaModel>; - gte?: number | IntFieldRefInput<$PrismaModel>; - not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null; - _count?: NestedIntNullableFilter<$PrismaModel>; - _avg?: NestedFloatNullableFilter<$PrismaModel>; - _sum?: NestedIntNullableFilter<$PrismaModel>; - _min?: NestedIntNullableFilter<$PrismaModel>; - _max?: NestedIntNullableFilter<$PrismaModel>; - }; - - export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null; - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null; - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null; - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null; - _count?: NestedIntNullableFilter<$PrismaModel>; - _min?: NestedDateTimeNullableFilter<$PrismaModel>; - _max?: NestedDateTimeNullableFilter<$PrismaModel>; - }; - - export type BoolWithAggregatesFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel>; - not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean; - _count?: NestedIntFilter<$PrismaModel>; - _min?: NestedBoolFilter<$PrismaModel>; - _max?: NestedBoolFilter<$PrismaModel>; - }; - - export type ExerciseListRelationFilter = { - every?: ExerciseWhereInput; - some?: ExerciseWhereInput; - none?: ExerciseWhereInput; - }; - - export type ExerciseOrderByRelationAggregateInput = { - _count?: SortOrder; - }; - - export type WorkoutCountOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - title?: SortOrder; - category?: SortOrder; - durationMin?: SortOrder; - calories?: SortOrder; - date?: SortOrder; - notes?: SortOrder; - isCompleted?: SortOrder; - totalTime?: SortOrder; - restTime?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type WorkoutAvgOrderByAggregateInput = { - durationMin?: SortOrder; - calories?: SortOrder; - totalTime?: SortOrder; - restTime?: SortOrder; - }; - - export type WorkoutMaxOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - title?: SortOrder; - category?: SortOrder; - durationMin?: SortOrder; - calories?: SortOrder; - date?: SortOrder; - notes?: SortOrder; - isCompleted?: SortOrder; - totalTime?: SortOrder; - restTime?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type WorkoutMinOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - title?: SortOrder; - category?: SortOrder; - durationMin?: SortOrder; - calories?: SortOrder; - date?: SortOrder; - notes?: SortOrder; - isCompleted?: SortOrder; - totalTime?: SortOrder; - restTime?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type WorkoutSumOrderByAggregateInput = { - durationMin?: SortOrder; - calories?: SortOrder; - totalTime?: SortOrder; - restTime?: SortOrder; - }; - - export type IntFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel>; - in?: number[] | ListIntFieldRefInput<$PrismaModel>; - notIn?: number[] | ListIntFieldRefInput<$PrismaModel>; - lt?: number | IntFieldRefInput<$PrismaModel>; - lte?: number | IntFieldRefInput<$PrismaModel>; - gt?: number | IntFieldRefInput<$PrismaModel>; - gte?: number | IntFieldRefInput<$PrismaModel>; - not?: NestedIntFilter<$PrismaModel> | number; - }; - - export type WorkoutScalarRelationFilter = { - is?: WorkoutWhereInput; - isNot?: WorkoutWhereInput; - }; - - export type ExerciseCountOrderByAggregateInput = { - id?: SortOrder; - workoutId?: SortOrder; - name?: SortOrder; - sets?: SortOrder; - reps?: SortOrder; - weightKg?: SortOrder; - duration?: SortOrder; - distance?: SortOrder; - restTime?: SortOrder; - order?: SortOrder; - isCompleted?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type ExerciseAvgOrderByAggregateInput = { - sets?: SortOrder; - reps?: SortOrder; - weightKg?: SortOrder; - duration?: SortOrder; - distance?: SortOrder; - restTime?: SortOrder; - order?: SortOrder; - }; - - export type ExerciseMaxOrderByAggregateInput = { - id?: SortOrder; - workoutId?: SortOrder; - name?: SortOrder; - sets?: SortOrder; - reps?: SortOrder; - weightKg?: SortOrder; - duration?: SortOrder; - distance?: SortOrder; - restTime?: SortOrder; - order?: SortOrder; - isCompleted?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type ExerciseMinOrderByAggregateInput = { - id?: SortOrder; - workoutId?: SortOrder; - name?: SortOrder; - sets?: SortOrder; - reps?: SortOrder; - weightKg?: SortOrder; - duration?: SortOrder; - distance?: SortOrder; - restTime?: SortOrder; - order?: SortOrder; - isCompleted?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type ExerciseSumOrderByAggregateInput = { - sets?: SortOrder; - reps?: SortOrder; - weightKg?: SortOrder; - duration?: SortOrder; - distance?: SortOrder; - restTime?: SortOrder; - order?: SortOrder; - }; - - export type IntWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel>; - in?: number[] | ListIntFieldRefInput<$PrismaModel>; - notIn?: number[] | ListIntFieldRefInput<$PrismaModel>; - lt?: number | IntFieldRefInput<$PrismaModel>; - lte?: number | IntFieldRefInput<$PrismaModel>; - gt?: number | IntFieldRefInput<$PrismaModel>; - gte?: number | IntFieldRefInput<$PrismaModel>; - not?: NestedIntWithAggregatesFilter<$PrismaModel> | number; - _count?: NestedIntFilter<$PrismaModel>; - _avg?: NestedFloatFilter<$PrismaModel>; - _sum?: NestedIntFilter<$PrismaModel>; - _min?: NestedIntFilter<$PrismaModel>; - _max?: NestedIntFilter<$PrismaModel>; - }; - - export type MealCountOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - name?: SortOrder; - mealType?: SortOrder; - calories?: SortOrder; - protein?: SortOrder; - carbs?: SortOrder; - fat?: SortOrder; - date?: SortOrder; - notes?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type MealAvgOrderByAggregateInput = { - calories?: SortOrder; - protein?: SortOrder; - carbs?: SortOrder; - fat?: SortOrder; - }; - - export type MealMaxOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - name?: SortOrder; - mealType?: SortOrder; - calories?: SortOrder; - protein?: SortOrder; - carbs?: SortOrder; - fat?: SortOrder; - date?: SortOrder; - notes?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type MealMinOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - name?: SortOrder; - mealType?: SortOrder; - calories?: SortOrder; - protein?: SortOrder; - carbs?: SortOrder; - fat?: SortOrder; - date?: SortOrder; - notes?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type MealSumOrderByAggregateInput = { - calories?: SortOrder; - protein?: SortOrder; - carbs?: SortOrder; - fat?: SortOrder; - }; - - export type MealScalarRelationFilter = { - is?: MealWhereInput; - isNot?: MealWhereInput; - }; - - export type MealItemCountOrderByAggregateInput = { - id?: SortOrder; - mealId?: SortOrder; - userId?: SortOrder; - name?: SortOrder; - calories?: SortOrder; - protein?: SortOrder; - carbs?: SortOrder; - fat?: SortOrder; - quantity?: SortOrder; - unit?: SortOrder; - isHighInProtein?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type MealItemAvgOrderByAggregateInput = { - calories?: SortOrder; - protein?: SortOrder; - carbs?: SortOrder; - fat?: SortOrder; - quantity?: SortOrder; - }; - - export type MealItemMaxOrderByAggregateInput = { - id?: SortOrder; - mealId?: SortOrder; - userId?: SortOrder; - name?: SortOrder; - calories?: SortOrder; - protein?: SortOrder; - carbs?: SortOrder; - fat?: SortOrder; - quantity?: SortOrder; - unit?: SortOrder; - isHighInProtein?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type MealItemMinOrderByAggregateInput = { - id?: SortOrder; - mealId?: SortOrder; - userId?: SortOrder; - name?: SortOrder; - calories?: SortOrder; - protein?: SortOrder; - carbs?: SortOrder; - fat?: SortOrder; - quantity?: SortOrder; - unit?: SortOrder; - isHighInProtein?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type MealItemSumOrderByAggregateInput = { - calories?: SortOrder; - protein?: SortOrder; - carbs?: SortOrder; - fat?: SortOrder; - quantity?: SortOrder; - }; - - export type ProgressLogCountOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - date?: SortOrder; - waterL?: SortOrder; - sleepHrs?: SortOrder; - mood?: SortOrder; - weightKg?: SortOrder; - steps?: SortOrder; - activeMinutes?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type ProgressLogAvgOrderByAggregateInput = { - waterL?: SortOrder; - sleepHrs?: SortOrder; - weightKg?: SortOrder; - steps?: SortOrder; - activeMinutes?: SortOrder; - }; - - export type ProgressLogMaxOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - date?: SortOrder; - waterL?: SortOrder; - sleepHrs?: SortOrder; - mood?: SortOrder; - weightKg?: SortOrder; - steps?: SortOrder; - activeMinutes?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type ProgressLogMinOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - date?: SortOrder; - waterL?: SortOrder; - sleepHrs?: SortOrder; - mood?: SortOrder; - weightKg?: SortOrder; - steps?: SortOrder; - activeMinutes?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type ProgressLogSumOrderByAggregateInput = { - waterL?: SortOrder; - sleepHrs?: SortOrder; - weightKg?: SortOrder; - steps?: SortOrder; - activeMinutes?: SortOrder; - }; - - export type FloatFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel>; - in?: number[] | ListFloatFieldRefInput<$PrismaModel>; - notIn?: number[] | ListFloatFieldRefInput<$PrismaModel>; - lt?: number | FloatFieldRefInput<$PrismaModel>; - lte?: number | FloatFieldRefInput<$PrismaModel>; - gt?: number | FloatFieldRefInput<$PrismaModel>; - gte?: number | FloatFieldRefInput<$PrismaModel>; - not?: NestedFloatFilter<$PrismaModel> | number; - }; - - export type WeightEntryCountOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - weightKg?: SortOrder; - date?: SortOrder; - photo?: SortOrder; - notes?: SortOrder; - bodyFatPercentage?: SortOrder; - muscleMassKg?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type WeightEntryAvgOrderByAggregateInput = { - weightKg?: SortOrder; - bodyFatPercentage?: SortOrder; - muscleMassKg?: SortOrder; - }; - - export type WeightEntryMaxOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - weightKg?: SortOrder; - date?: SortOrder; - photo?: SortOrder; - notes?: SortOrder; - bodyFatPercentage?: SortOrder; - muscleMassKg?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type WeightEntryMinOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - weightKg?: SortOrder; - date?: SortOrder; - photo?: SortOrder; - notes?: SortOrder; - bodyFatPercentage?: SortOrder; - muscleMassKg?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type WeightEntrySumOrderByAggregateInput = { - weightKg?: SortOrder; - bodyFatPercentage?: SortOrder; - muscleMassKg?: SortOrder; - }; - - export type FloatWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel>; - in?: number[] | ListFloatFieldRefInput<$PrismaModel>; - notIn?: number[] | ListFloatFieldRefInput<$PrismaModel>; - lt?: number | FloatFieldRefInput<$PrismaModel>; - lte?: number | FloatFieldRefInput<$PrismaModel>; - gt?: number | FloatFieldRefInput<$PrismaModel>; - gte?: number | FloatFieldRefInput<$PrismaModel>; - not?: NestedFloatWithAggregatesFilter<$PrismaModel> | number; - _count?: NestedIntFilter<$PrismaModel>; - _avg?: NestedFloatFilter<$PrismaModel>; - _sum?: NestedFloatFilter<$PrismaModel>; - _min?: NestedFloatFilter<$PrismaModel>; - _max?: NestedFloatFilter<$PrismaModel>; - }; - - export type WaterIntakeCountOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - amountMl?: SortOrder; - date?: SortOrder; - time?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type WaterIntakeAvgOrderByAggregateInput = { - amountMl?: SortOrder; - }; - - export type WaterIntakeMaxOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - amountMl?: SortOrder; - date?: SortOrder; - time?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type WaterIntakeMinOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - amountMl?: SortOrder; - date?: SortOrder; - time?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type WaterIntakeSumOrderByAggregateInput = { - amountMl?: SortOrder; - }; - - export type SleepEntryCountOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - hours?: SortOrder; - quality?: SortOrder; - date?: SortOrder; - bedtime?: SortOrder; - wakeTime?: SortOrder; - notes?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type SleepEntryAvgOrderByAggregateInput = { - hours?: SortOrder; - }; - - export type SleepEntryMaxOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - hours?: SortOrder; - quality?: SortOrder; - date?: SortOrder; - bedtime?: SortOrder; - wakeTime?: SortOrder; - notes?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type SleepEntryMinOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - hours?: SortOrder; - quality?: SortOrder; - date?: SortOrder; - bedtime?: SortOrder; - wakeTime?: SortOrder; - notes?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type SleepEntrySumOrderByAggregateInput = { - hours?: SortOrder; - }; - - export type GoalCountOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - type?: SortOrder; - target?: SortOrder; - current?: SortOrder; - unit?: SortOrder; - startDate?: SortOrder; - endDate?: SortOrder; - isActive?: SortOrder; - notes?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type GoalAvgOrderByAggregateInput = { - target?: SortOrder; - current?: SortOrder; - }; - - export type GoalMaxOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - type?: SortOrder; - target?: SortOrder; - current?: SortOrder; - unit?: SortOrder; - startDate?: SortOrder; - endDate?: SortOrder; - isActive?: SortOrder; - notes?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type GoalMinOrderByAggregateInput = { - id?: SortOrder; - userId?: SortOrder; - type?: SortOrder; - target?: SortOrder; - current?: SortOrder; - unit?: SortOrder; - startDate?: SortOrder; - endDate?: SortOrder; - isActive?: SortOrder; - notes?: SortOrder; - createdAt?: SortOrder; - updatedAt?: SortOrder; - syncedAt?: SortOrder; - isDeleted?: SortOrder; - }; - - export type GoalSumOrderByAggregateInput = { - target?: SortOrder; - current?: SortOrder; - }; - - export type HealthProfileCreateNestedManyWithoutUserInput = { - create?: - | XOR - | HealthProfileCreateWithoutUserInput[] - | HealthProfileUncheckedCreateWithoutUserInput[]; - connectOrCreate?: HealthProfileCreateOrConnectWithoutUserInput | HealthProfileCreateOrConnectWithoutUserInput[]; - createMany?: HealthProfileCreateManyUserInputEnvelope; - connect?: HealthProfileWhereUniqueInput | HealthProfileWhereUniqueInput[]; - }; - - export type WorkoutCreateNestedManyWithoutUserInput = { - create?: - | XOR - | WorkoutCreateWithoutUserInput[] - | WorkoutUncheckedCreateWithoutUserInput[]; - connectOrCreate?: WorkoutCreateOrConnectWithoutUserInput | WorkoutCreateOrConnectWithoutUserInput[]; - createMany?: WorkoutCreateManyUserInputEnvelope; - connect?: WorkoutWhereUniqueInput | WorkoutWhereUniqueInput[]; - }; - - export type MealCreateNestedManyWithoutUserInput = { - create?: - | XOR - | MealCreateWithoutUserInput[] - | MealUncheckedCreateWithoutUserInput[]; - connectOrCreate?: MealCreateOrConnectWithoutUserInput | MealCreateOrConnectWithoutUserInput[]; - createMany?: MealCreateManyUserInputEnvelope; - connect?: MealWhereUniqueInput | MealWhereUniqueInput[]; - }; - - export type MealItemCreateNestedManyWithoutUserInput = { - create?: - | XOR - | MealItemCreateWithoutUserInput[] - | MealItemUncheckedCreateWithoutUserInput[]; - connectOrCreate?: MealItemCreateOrConnectWithoutUserInput | MealItemCreateOrConnectWithoutUserInput[]; - createMany?: MealItemCreateManyUserInputEnvelope; - connect?: MealItemWhereUniqueInput | MealItemWhereUniqueInput[]; - }; - - export type ProgressLogCreateNestedManyWithoutUserInput = { - create?: - | XOR - | ProgressLogCreateWithoutUserInput[] - | ProgressLogUncheckedCreateWithoutUserInput[]; - connectOrCreate?: ProgressLogCreateOrConnectWithoutUserInput | ProgressLogCreateOrConnectWithoutUserInput[]; - createMany?: ProgressLogCreateManyUserInputEnvelope; - connect?: ProgressLogWhereUniqueInput | ProgressLogWhereUniqueInput[]; - }; - - export type WeightEntryCreateNestedManyWithoutUserInput = { - create?: - | XOR - | WeightEntryCreateWithoutUserInput[] - | WeightEntryUncheckedCreateWithoutUserInput[]; - connectOrCreate?: WeightEntryCreateOrConnectWithoutUserInput | WeightEntryCreateOrConnectWithoutUserInput[]; - createMany?: WeightEntryCreateManyUserInputEnvelope; - connect?: WeightEntryWhereUniqueInput | WeightEntryWhereUniqueInput[]; - }; - - export type WaterIntakeCreateNestedManyWithoutUserInput = { - create?: - | XOR - | WaterIntakeCreateWithoutUserInput[] - | WaterIntakeUncheckedCreateWithoutUserInput[]; - connectOrCreate?: WaterIntakeCreateOrConnectWithoutUserInput | WaterIntakeCreateOrConnectWithoutUserInput[]; - createMany?: WaterIntakeCreateManyUserInputEnvelope; - connect?: WaterIntakeWhereUniqueInput | WaterIntakeWhereUniqueInput[]; - }; - - export type SleepEntryCreateNestedManyWithoutUserInput = { - create?: - | XOR - | SleepEntryCreateWithoutUserInput[] - | SleepEntryUncheckedCreateWithoutUserInput[]; - connectOrCreate?: SleepEntryCreateOrConnectWithoutUserInput | SleepEntryCreateOrConnectWithoutUserInput[]; - createMany?: SleepEntryCreateManyUserInputEnvelope; - connect?: SleepEntryWhereUniqueInput | SleepEntryWhereUniqueInput[]; - }; - - export type GoalCreateNestedManyWithoutUserInput = { - create?: - | XOR - | GoalCreateWithoutUserInput[] - | GoalUncheckedCreateWithoutUserInput[]; - connectOrCreate?: GoalCreateOrConnectWithoutUserInput | GoalCreateOrConnectWithoutUserInput[]; - createMany?: GoalCreateManyUserInputEnvelope; - connect?: GoalWhereUniqueInput | GoalWhereUniqueInput[]; - }; - - export type HealthProfileUncheckedCreateNestedManyWithoutUserInput = { - create?: - | XOR - | HealthProfileCreateWithoutUserInput[] - | HealthProfileUncheckedCreateWithoutUserInput[]; - connectOrCreate?: HealthProfileCreateOrConnectWithoutUserInput | HealthProfileCreateOrConnectWithoutUserInput[]; - createMany?: HealthProfileCreateManyUserInputEnvelope; - connect?: HealthProfileWhereUniqueInput | HealthProfileWhereUniqueInput[]; - }; - - export type WorkoutUncheckedCreateNestedManyWithoutUserInput = { - create?: - | XOR - | WorkoutCreateWithoutUserInput[] - | WorkoutUncheckedCreateWithoutUserInput[]; - connectOrCreate?: WorkoutCreateOrConnectWithoutUserInput | WorkoutCreateOrConnectWithoutUserInput[]; - createMany?: WorkoutCreateManyUserInputEnvelope; - connect?: WorkoutWhereUniqueInput | WorkoutWhereUniqueInput[]; - }; - - export type MealUncheckedCreateNestedManyWithoutUserInput = { - create?: - | XOR - | MealCreateWithoutUserInput[] - | MealUncheckedCreateWithoutUserInput[]; - connectOrCreate?: MealCreateOrConnectWithoutUserInput | MealCreateOrConnectWithoutUserInput[]; - createMany?: MealCreateManyUserInputEnvelope; - connect?: MealWhereUniqueInput | MealWhereUniqueInput[]; - }; - - export type MealItemUncheckedCreateNestedManyWithoutUserInput = { - create?: - | XOR - | MealItemCreateWithoutUserInput[] - | MealItemUncheckedCreateWithoutUserInput[]; - connectOrCreate?: MealItemCreateOrConnectWithoutUserInput | MealItemCreateOrConnectWithoutUserInput[]; - createMany?: MealItemCreateManyUserInputEnvelope; - connect?: MealItemWhereUniqueInput | MealItemWhereUniqueInput[]; - }; - - export type ProgressLogUncheckedCreateNestedManyWithoutUserInput = { - create?: - | XOR - | ProgressLogCreateWithoutUserInput[] - | ProgressLogUncheckedCreateWithoutUserInput[]; - connectOrCreate?: ProgressLogCreateOrConnectWithoutUserInput | ProgressLogCreateOrConnectWithoutUserInput[]; - createMany?: ProgressLogCreateManyUserInputEnvelope; - connect?: ProgressLogWhereUniqueInput | ProgressLogWhereUniqueInput[]; - }; - - export type WeightEntryUncheckedCreateNestedManyWithoutUserInput = { - create?: - | XOR - | WeightEntryCreateWithoutUserInput[] - | WeightEntryUncheckedCreateWithoutUserInput[]; - connectOrCreate?: WeightEntryCreateOrConnectWithoutUserInput | WeightEntryCreateOrConnectWithoutUserInput[]; - createMany?: WeightEntryCreateManyUserInputEnvelope; - connect?: WeightEntryWhereUniqueInput | WeightEntryWhereUniqueInput[]; - }; - - export type WaterIntakeUncheckedCreateNestedManyWithoutUserInput = { - create?: - | XOR - | WaterIntakeCreateWithoutUserInput[] - | WaterIntakeUncheckedCreateWithoutUserInput[]; - connectOrCreate?: WaterIntakeCreateOrConnectWithoutUserInput | WaterIntakeCreateOrConnectWithoutUserInput[]; - createMany?: WaterIntakeCreateManyUserInputEnvelope; - connect?: WaterIntakeWhereUniqueInput | WaterIntakeWhereUniqueInput[]; - }; - - export type SleepEntryUncheckedCreateNestedManyWithoutUserInput = { - create?: - | XOR - | SleepEntryCreateWithoutUserInput[] - | SleepEntryUncheckedCreateWithoutUserInput[]; - connectOrCreate?: SleepEntryCreateOrConnectWithoutUserInput | SleepEntryCreateOrConnectWithoutUserInput[]; - createMany?: SleepEntryCreateManyUserInputEnvelope; - connect?: SleepEntryWhereUniqueInput | SleepEntryWhereUniqueInput[]; - }; - - export type GoalUncheckedCreateNestedManyWithoutUserInput = { - create?: - | XOR - | GoalCreateWithoutUserInput[] - | GoalUncheckedCreateWithoutUserInput[]; - connectOrCreate?: GoalCreateOrConnectWithoutUserInput | GoalCreateOrConnectWithoutUserInput[]; - createMany?: GoalCreateManyUserInputEnvelope; - connect?: GoalWhereUniqueInput | GoalWhereUniqueInput[]; - }; - - export type StringFieldUpdateOperationsInput = { - set?: string; - }; - - export type NullableStringFieldUpdateOperationsInput = { - set?: string | null; - }; - - export type DateTimeFieldUpdateOperationsInput = { - set?: Date | string; - }; - - export type HealthProfileUpdateManyWithoutUserNestedInput = { - create?: - | XOR - | HealthProfileCreateWithoutUserInput[] - | HealthProfileUncheckedCreateWithoutUserInput[]; - connectOrCreate?: HealthProfileCreateOrConnectWithoutUserInput | HealthProfileCreateOrConnectWithoutUserInput[]; - upsert?: HealthProfileUpsertWithWhereUniqueWithoutUserInput | HealthProfileUpsertWithWhereUniqueWithoutUserInput[]; - createMany?: HealthProfileCreateManyUserInputEnvelope; - set?: HealthProfileWhereUniqueInput | HealthProfileWhereUniqueInput[]; - disconnect?: HealthProfileWhereUniqueInput | HealthProfileWhereUniqueInput[]; - delete?: HealthProfileWhereUniqueInput | HealthProfileWhereUniqueInput[]; - connect?: HealthProfileWhereUniqueInput | HealthProfileWhereUniqueInput[]; - update?: HealthProfileUpdateWithWhereUniqueWithoutUserInput | HealthProfileUpdateWithWhereUniqueWithoutUserInput[]; - updateMany?: HealthProfileUpdateManyWithWhereWithoutUserInput | HealthProfileUpdateManyWithWhereWithoutUserInput[]; - deleteMany?: HealthProfileScalarWhereInput | HealthProfileScalarWhereInput[]; - }; - - export type WorkoutUpdateManyWithoutUserNestedInput = { - create?: - | XOR - | WorkoutCreateWithoutUserInput[] - | WorkoutUncheckedCreateWithoutUserInput[]; - connectOrCreate?: WorkoutCreateOrConnectWithoutUserInput | WorkoutCreateOrConnectWithoutUserInput[]; - upsert?: WorkoutUpsertWithWhereUniqueWithoutUserInput | WorkoutUpsertWithWhereUniqueWithoutUserInput[]; - createMany?: WorkoutCreateManyUserInputEnvelope; - set?: WorkoutWhereUniqueInput | WorkoutWhereUniqueInput[]; - disconnect?: WorkoutWhereUniqueInput | WorkoutWhereUniqueInput[]; - delete?: WorkoutWhereUniqueInput | WorkoutWhereUniqueInput[]; - connect?: WorkoutWhereUniqueInput | WorkoutWhereUniqueInput[]; - update?: WorkoutUpdateWithWhereUniqueWithoutUserInput | WorkoutUpdateWithWhereUniqueWithoutUserInput[]; - updateMany?: WorkoutUpdateManyWithWhereWithoutUserInput | WorkoutUpdateManyWithWhereWithoutUserInput[]; - deleteMany?: WorkoutScalarWhereInput | WorkoutScalarWhereInput[]; - }; - - export type MealUpdateManyWithoutUserNestedInput = { - create?: - | XOR - | MealCreateWithoutUserInput[] - | MealUncheckedCreateWithoutUserInput[]; - connectOrCreate?: MealCreateOrConnectWithoutUserInput | MealCreateOrConnectWithoutUserInput[]; - upsert?: MealUpsertWithWhereUniqueWithoutUserInput | MealUpsertWithWhereUniqueWithoutUserInput[]; - createMany?: MealCreateManyUserInputEnvelope; - set?: MealWhereUniqueInput | MealWhereUniqueInput[]; - disconnect?: MealWhereUniqueInput | MealWhereUniqueInput[]; - delete?: MealWhereUniqueInput | MealWhereUniqueInput[]; - connect?: MealWhereUniqueInput | MealWhereUniqueInput[]; - update?: MealUpdateWithWhereUniqueWithoutUserInput | MealUpdateWithWhereUniqueWithoutUserInput[]; - updateMany?: MealUpdateManyWithWhereWithoutUserInput | MealUpdateManyWithWhereWithoutUserInput[]; - deleteMany?: MealScalarWhereInput | MealScalarWhereInput[]; - }; - - export type MealItemUpdateManyWithoutUserNestedInput = { - create?: - | XOR - | MealItemCreateWithoutUserInput[] - | MealItemUncheckedCreateWithoutUserInput[]; - connectOrCreate?: MealItemCreateOrConnectWithoutUserInput | MealItemCreateOrConnectWithoutUserInput[]; - upsert?: MealItemUpsertWithWhereUniqueWithoutUserInput | MealItemUpsertWithWhereUniqueWithoutUserInput[]; - createMany?: MealItemCreateManyUserInputEnvelope; - set?: MealItemWhereUniqueInput | MealItemWhereUniqueInput[]; - disconnect?: MealItemWhereUniqueInput | MealItemWhereUniqueInput[]; - delete?: MealItemWhereUniqueInput | MealItemWhereUniqueInput[]; - connect?: MealItemWhereUniqueInput | MealItemWhereUniqueInput[]; - update?: MealItemUpdateWithWhereUniqueWithoutUserInput | MealItemUpdateWithWhereUniqueWithoutUserInput[]; - updateMany?: MealItemUpdateManyWithWhereWithoutUserInput | MealItemUpdateManyWithWhereWithoutUserInput[]; - deleteMany?: MealItemScalarWhereInput | MealItemScalarWhereInput[]; - }; - - export type ProgressLogUpdateManyWithoutUserNestedInput = { - create?: - | XOR - | ProgressLogCreateWithoutUserInput[] - | ProgressLogUncheckedCreateWithoutUserInput[]; - connectOrCreate?: ProgressLogCreateOrConnectWithoutUserInput | ProgressLogCreateOrConnectWithoutUserInput[]; - upsert?: ProgressLogUpsertWithWhereUniqueWithoutUserInput | ProgressLogUpsertWithWhereUniqueWithoutUserInput[]; - createMany?: ProgressLogCreateManyUserInputEnvelope; - set?: ProgressLogWhereUniqueInput | ProgressLogWhereUniqueInput[]; - disconnect?: ProgressLogWhereUniqueInput | ProgressLogWhereUniqueInput[]; - delete?: ProgressLogWhereUniqueInput | ProgressLogWhereUniqueInput[]; - connect?: ProgressLogWhereUniqueInput | ProgressLogWhereUniqueInput[]; - update?: ProgressLogUpdateWithWhereUniqueWithoutUserInput | ProgressLogUpdateWithWhereUniqueWithoutUserInput[]; - updateMany?: ProgressLogUpdateManyWithWhereWithoutUserInput | ProgressLogUpdateManyWithWhereWithoutUserInput[]; - deleteMany?: ProgressLogScalarWhereInput | ProgressLogScalarWhereInput[]; - }; - - export type WeightEntryUpdateManyWithoutUserNestedInput = { - create?: - | XOR - | WeightEntryCreateWithoutUserInput[] - | WeightEntryUncheckedCreateWithoutUserInput[]; - connectOrCreate?: WeightEntryCreateOrConnectWithoutUserInput | WeightEntryCreateOrConnectWithoutUserInput[]; - upsert?: WeightEntryUpsertWithWhereUniqueWithoutUserInput | WeightEntryUpsertWithWhereUniqueWithoutUserInput[]; - createMany?: WeightEntryCreateManyUserInputEnvelope; - set?: WeightEntryWhereUniqueInput | WeightEntryWhereUniqueInput[]; - disconnect?: WeightEntryWhereUniqueInput | WeightEntryWhereUniqueInput[]; - delete?: WeightEntryWhereUniqueInput | WeightEntryWhereUniqueInput[]; - connect?: WeightEntryWhereUniqueInput | WeightEntryWhereUniqueInput[]; - update?: WeightEntryUpdateWithWhereUniqueWithoutUserInput | WeightEntryUpdateWithWhereUniqueWithoutUserInput[]; - updateMany?: WeightEntryUpdateManyWithWhereWithoutUserInput | WeightEntryUpdateManyWithWhereWithoutUserInput[]; - deleteMany?: WeightEntryScalarWhereInput | WeightEntryScalarWhereInput[]; - }; - - export type WaterIntakeUpdateManyWithoutUserNestedInput = { - create?: - | XOR - | WaterIntakeCreateWithoutUserInput[] - | WaterIntakeUncheckedCreateWithoutUserInput[]; - connectOrCreate?: WaterIntakeCreateOrConnectWithoutUserInput | WaterIntakeCreateOrConnectWithoutUserInput[]; - upsert?: WaterIntakeUpsertWithWhereUniqueWithoutUserInput | WaterIntakeUpsertWithWhereUniqueWithoutUserInput[]; - createMany?: WaterIntakeCreateManyUserInputEnvelope; - set?: WaterIntakeWhereUniqueInput | WaterIntakeWhereUniqueInput[]; - disconnect?: WaterIntakeWhereUniqueInput | WaterIntakeWhereUniqueInput[]; - delete?: WaterIntakeWhereUniqueInput | WaterIntakeWhereUniqueInput[]; - connect?: WaterIntakeWhereUniqueInput | WaterIntakeWhereUniqueInput[]; - update?: WaterIntakeUpdateWithWhereUniqueWithoutUserInput | WaterIntakeUpdateWithWhereUniqueWithoutUserInput[]; - updateMany?: WaterIntakeUpdateManyWithWhereWithoutUserInput | WaterIntakeUpdateManyWithWhereWithoutUserInput[]; - deleteMany?: WaterIntakeScalarWhereInput | WaterIntakeScalarWhereInput[]; - }; - - export type SleepEntryUpdateManyWithoutUserNestedInput = { - create?: - | XOR - | SleepEntryCreateWithoutUserInput[] - | SleepEntryUncheckedCreateWithoutUserInput[]; - connectOrCreate?: SleepEntryCreateOrConnectWithoutUserInput | SleepEntryCreateOrConnectWithoutUserInput[]; - upsert?: SleepEntryUpsertWithWhereUniqueWithoutUserInput | SleepEntryUpsertWithWhereUniqueWithoutUserInput[]; - createMany?: SleepEntryCreateManyUserInputEnvelope; - set?: SleepEntryWhereUniqueInput | SleepEntryWhereUniqueInput[]; - disconnect?: SleepEntryWhereUniqueInput | SleepEntryWhereUniqueInput[]; - delete?: SleepEntryWhereUniqueInput | SleepEntryWhereUniqueInput[]; - connect?: SleepEntryWhereUniqueInput | SleepEntryWhereUniqueInput[]; - update?: SleepEntryUpdateWithWhereUniqueWithoutUserInput | SleepEntryUpdateWithWhereUniqueWithoutUserInput[]; - updateMany?: SleepEntryUpdateManyWithWhereWithoutUserInput | SleepEntryUpdateManyWithWhereWithoutUserInput[]; - deleteMany?: SleepEntryScalarWhereInput | SleepEntryScalarWhereInput[]; - }; - - export type GoalUpdateManyWithoutUserNestedInput = { - create?: - | XOR - | GoalCreateWithoutUserInput[] - | GoalUncheckedCreateWithoutUserInput[]; - connectOrCreate?: GoalCreateOrConnectWithoutUserInput | GoalCreateOrConnectWithoutUserInput[]; - upsert?: GoalUpsertWithWhereUniqueWithoutUserInput | GoalUpsertWithWhereUniqueWithoutUserInput[]; - createMany?: GoalCreateManyUserInputEnvelope; - set?: GoalWhereUniqueInput | GoalWhereUniqueInput[]; - disconnect?: GoalWhereUniqueInput | GoalWhereUniqueInput[]; - delete?: GoalWhereUniqueInput | GoalWhereUniqueInput[]; - connect?: GoalWhereUniqueInput | GoalWhereUniqueInput[]; - update?: GoalUpdateWithWhereUniqueWithoutUserInput | GoalUpdateWithWhereUniqueWithoutUserInput[]; - updateMany?: GoalUpdateManyWithWhereWithoutUserInput | GoalUpdateManyWithWhereWithoutUserInput[]; - deleteMany?: GoalScalarWhereInput | GoalScalarWhereInput[]; - }; - - export type HealthProfileUncheckedUpdateManyWithoutUserNestedInput = { - create?: - | XOR - | HealthProfileCreateWithoutUserInput[] - | HealthProfileUncheckedCreateWithoutUserInput[]; - connectOrCreate?: HealthProfileCreateOrConnectWithoutUserInput | HealthProfileCreateOrConnectWithoutUserInput[]; - upsert?: HealthProfileUpsertWithWhereUniqueWithoutUserInput | HealthProfileUpsertWithWhereUniqueWithoutUserInput[]; - createMany?: HealthProfileCreateManyUserInputEnvelope; - set?: HealthProfileWhereUniqueInput | HealthProfileWhereUniqueInput[]; - disconnect?: HealthProfileWhereUniqueInput | HealthProfileWhereUniqueInput[]; - delete?: HealthProfileWhereUniqueInput | HealthProfileWhereUniqueInput[]; - connect?: HealthProfileWhereUniqueInput | HealthProfileWhereUniqueInput[]; - update?: HealthProfileUpdateWithWhereUniqueWithoutUserInput | HealthProfileUpdateWithWhereUniqueWithoutUserInput[]; - updateMany?: HealthProfileUpdateManyWithWhereWithoutUserInput | HealthProfileUpdateManyWithWhereWithoutUserInput[]; - deleteMany?: HealthProfileScalarWhereInput | HealthProfileScalarWhereInput[]; - }; - - export type WorkoutUncheckedUpdateManyWithoutUserNestedInput = { - create?: - | XOR - | WorkoutCreateWithoutUserInput[] - | WorkoutUncheckedCreateWithoutUserInput[]; - connectOrCreate?: WorkoutCreateOrConnectWithoutUserInput | WorkoutCreateOrConnectWithoutUserInput[]; - upsert?: WorkoutUpsertWithWhereUniqueWithoutUserInput | WorkoutUpsertWithWhereUniqueWithoutUserInput[]; - createMany?: WorkoutCreateManyUserInputEnvelope; - set?: WorkoutWhereUniqueInput | WorkoutWhereUniqueInput[]; - disconnect?: WorkoutWhereUniqueInput | WorkoutWhereUniqueInput[]; - delete?: WorkoutWhereUniqueInput | WorkoutWhereUniqueInput[]; - connect?: WorkoutWhereUniqueInput | WorkoutWhereUniqueInput[]; - update?: WorkoutUpdateWithWhereUniqueWithoutUserInput | WorkoutUpdateWithWhereUniqueWithoutUserInput[]; - updateMany?: WorkoutUpdateManyWithWhereWithoutUserInput | WorkoutUpdateManyWithWhereWithoutUserInput[]; - deleteMany?: WorkoutScalarWhereInput | WorkoutScalarWhereInput[]; - }; - - export type MealUncheckedUpdateManyWithoutUserNestedInput = { - create?: - | XOR - | MealCreateWithoutUserInput[] - | MealUncheckedCreateWithoutUserInput[]; - connectOrCreate?: MealCreateOrConnectWithoutUserInput | MealCreateOrConnectWithoutUserInput[]; - upsert?: MealUpsertWithWhereUniqueWithoutUserInput | MealUpsertWithWhereUniqueWithoutUserInput[]; - createMany?: MealCreateManyUserInputEnvelope; - set?: MealWhereUniqueInput | MealWhereUniqueInput[]; - disconnect?: MealWhereUniqueInput | MealWhereUniqueInput[]; - delete?: MealWhereUniqueInput | MealWhereUniqueInput[]; - connect?: MealWhereUniqueInput | MealWhereUniqueInput[]; - update?: MealUpdateWithWhereUniqueWithoutUserInput | MealUpdateWithWhereUniqueWithoutUserInput[]; - updateMany?: MealUpdateManyWithWhereWithoutUserInput | MealUpdateManyWithWhereWithoutUserInput[]; - deleteMany?: MealScalarWhereInput | MealScalarWhereInput[]; - }; - - export type MealItemUncheckedUpdateManyWithoutUserNestedInput = { - create?: - | XOR - | MealItemCreateWithoutUserInput[] - | MealItemUncheckedCreateWithoutUserInput[]; - connectOrCreate?: MealItemCreateOrConnectWithoutUserInput | MealItemCreateOrConnectWithoutUserInput[]; - upsert?: MealItemUpsertWithWhereUniqueWithoutUserInput | MealItemUpsertWithWhereUniqueWithoutUserInput[]; - createMany?: MealItemCreateManyUserInputEnvelope; - set?: MealItemWhereUniqueInput | MealItemWhereUniqueInput[]; - disconnect?: MealItemWhereUniqueInput | MealItemWhereUniqueInput[]; - delete?: MealItemWhereUniqueInput | MealItemWhereUniqueInput[]; - connect?: MealItemWhereUniqueInput | MealItemWhereUniqueInput[]; - update?: MealItemUpdateWithWhereUniqueWithoutUserInput | MealItemUpdateWithWhereUniqueWithoutUserInput[]; - updateMany?: MealItemUpdateManyWithWhereWithoutUserInput | MealItemUpdateManyWithWhereWithoutUserInput[]; - deleteMany?: MealItemScalarWhereInput | MealItemScalarWhereInput[]; - }; - - export type ProgressLogUncheckedUpdateManyWithoutUserNestedInput = { - create?: - | XOR - | ProgressLogCreateWithoutUserInput[] - | ProgressLogUncheckedCreateWithoutUserInput[]; - connectOrCreate?: ProgressLogCreateOrConnectWithoutUserInput | ProgressLogCreateOrConnectWithoutUserInput[]; - upsert?: ProgressLogUpsertWithWhereUniqueWithoutUserInput | ProgressLogUpsertWithWhereUniqueWithoutUserInput[]; - createMany?: ProgressLogCreateManyUserInputEnvelope; - set?: ProgressLogWhereUniqueInput | ProgressLogWhereUniqueInput[]; - disconnect?: ProgressLogWhereUniqueInput | ProgressLogWhereUniqueInput[]; - delete?: ProgressLogWhereUniqueInput | ProgressLogWhereUniqueInput[]; - connect?: ProgressLogWhereUniqueInput | ProgressLogWhereUniqueInput[]; - update?: ProgressLogUpdateWithWhereUniqueWithoutUserInput | ProgressLogUpdateWithWhereUniqueWithoutUserInput[]; - updateMany?: ProgressLogUpdateManyWithWhereWithoutUserInput | ProgressLogUpdateManyWithWhereWithoutUserInput[]; - deleteMany?: ProgressLogScalarWhereInput | ProgressLogScalarWhereInput[]; - }; - - export type WeightEntryUncheckedUpdateManyWithoutUserNestedInput = { - create?: - | XOR - | WeightEntryCreateWithoutUserInput[] - | WeightEntryUncheckedCreateWithoutUserInput[]; - connectOrCreate?: WeightEntryCreateOrConnectWithoutUserInput | WeightEntryCreateOrConnectWithoutUserInput[]; - upsert?: WeightEntryUpsertWithWhereUniqueWithoutUserInput | WeightEntryUpsertWithWhereUniqueWithoutUserInput[]; - createMany?: WeightEntryCreateManyUserInputEnvelope; - set?: WeightEntryWhereUniqueInput | WeightEntryWhereUniqueInput[]; - disconnect?: WeightEntryWhereUniqueInput | WeightEntryWhereUniqueInput[]; - delete?: WeightEntryWhereUniqueInput | WeightEntryWhereUniqueInput[]; - connect?: WeightEntryWhereUniqueInput | WeightEntryWhereUniqueInput[]; - update?: WeightEntryUpdateWithWhereUniqueWithoutUserInput | WeightEntryUpdateWithWhereUniqueWithoutUserInput[]; - updateMany?: WeightEntryUpdateManyWithWhereWithoutUserInput | WeightEntryUpdateManyWithWhereWithoutUserInput[]; - deleteMany?: WeightEntryScalarWhereInput | WeightEntryScalarWhereInput[]; - }; - - export type WaterIntakeUncheckedUpdateManyWithoutUserNestedInput = { - create?: - | XOR - | WaterIntakeCreateWithoutUserInput[] - | WaterIntakeUncheckedCreateWithoutUserInput[]; - connectOrCreate?: WaterIntakeCreateOrConnectWithoutUserInput | WaterIntakeCreateOrConnectWithoutUserInput[]; - upsert?: WaterIntakeUpsertWithWhereUniqueWithoutUserInput | WaterIntakeUpsertWithWhereUniqueWithoutUserInput[]; - createMany?: WaterIntakeCreateManyUserInputEnvelope; - set?: WaterIntakeWhereUniqueInput | WaterIntakeWhereUniqueInput[]; - disconnect?: WaterIntakeWhereUniqueInput | WaterIntakeWhereUniqueInput[]; - delete?: WaterIntakeWhereUniqueInput | WaterIntakeWhereUniqueInput[]; - connect?: WaterIntakeWhereUniqueInput | WaterIntakeWhereUniqueInput[]; - update?: WaterIntakeUpdateWithWhereUniqueWithoutUserInput | WaterIntakeUpdateWithWhereUniqueWithoutUserInput[]; - updateMany?: WaterIntakeUpdateManyWithWhereWithoutUserInput | WaterIntakeUpdateManyWithWhereWithoutUserInput[]; - deleteMany?: WaterIntakeScalarWhereInput | WaterIntakeScalarWhereInput[]; - }; - - export type SleepEntryUncheckedUpdateManyWithoutUserNestedInput = { - create?: - | XOR - | SleepEntryCreateWithoutUserInput[] - | SleepEntryUncheckedCreateWithoutUserInput[]; - connectOrCreate?: SleepEntryCreateOrConnectWithoutUserInput | SleepEntryCreateOrConnectWithoutUserInput[]; - upsert?: SleepEntryUpsertWithWhereUniqueWithoutUserInput | SleepEntryUpsertWithWhereUniqueWithoutUserInput[]; - createMany?: SleepEntryCreateManyUserInputEnvelope; - set?: SleepEntryWhereUniqueInput | SleepEntryWhereUniqueInput[]; - disconnect?: SleepEntryWhereUniqueInput | SleepEntryWhereUniqueInput[]; - delete?: SleepEntryWhereUniqueInput | SleepEntryWhereUniqueInput[]; - connect?: SleepEntryWhereUniqueInput | SleepEntryWhereUniqueInput[]; - update?: SleepEntryUpdateWithWhereUniqueWithoutUserInput | SleepEntryUpdateWithWhereUniqueWithoutUserInput[]; - updateMany?: SleepEntryUpdateManyWithWhereWithoutUserInput | SleepEntryUpdateManyWithWhereWithoutUserInput[]; - deleteMany?: SleepEntryScalarWhereInput | SleepEntryScalarWhereInput[]; - }; - - export type GoalUncheckedUpdateManyWithoutUserNestedInput = { - create?: - | XOR - | GoalCreateWithoutUserInput[] - | GoalUncheckedCreateWithoutUserInput[]; - connectOrCreate?: GoalCreateOrConnectWithoutUserInput | GoalCreateOrConnectWithoutUserInput[]; - upsert?: GoalUpsertWithWhereUniqueWithoutUserInput | GoalUpsertWithWhereUniqueWithoutUserInput[]; - createMany?: GoalCreateManyUserInputEnvelope; - set?: GoalWhereUniqueInput | GoalWhereUniqueInput[]; - disconnect?: GoalWhereUniqueInput | GoalWhereUniqueInput[]; - delete?: GoalWhereUniqueInput | GoalWhereUniqueInput[]; - connect?: GoalWhereUniqueInput | GoalWhereUniqueInput[]; - update?: GoalUpdateWithWhereUniqueWithoutUserInput | GoalUpdateWithWhereUniqueWithoutUserInput[]; - updateMany?: GoalUpdateManyWithWhereWithoutUserInput | GoalUpdateManyWithWhereWithoutUserInput[]; - deleteMany?: GoalScalarWhereInput | GoalScalarWhereInput[]; - }; - - export type UserCreateNestedOneWithoutHealthProfilesInput = { - create?: XOR; - connectOrCreate?: UserCreateOrConnectWithoutHealthProfilesInput; - connect?: UserWhereUniqueInput; - }; - - export type NullableFloatFieldUpdateOperationsInput = { - set?: number | null; - increment?: number; - decrement?: number; - multiply?: number; - divide?: number; - }; - - export type NullableIntFieldUpdateOperationsInput = { - set?: number | null; - increment?: number; - decrement?: number; - multiply?: number; - divide?: number; - }; - - export type NullableDateTimeFieldUpdateOperationsInput = { - set?: Date | string | null; - }; - - export type BoolFieldUpdateOperationsInput = { - set?: boolean; - }; - - export type UserUpdateOneRequiredWithoutHealthProfilesNestedInput = { - create?: XOR; - connectOrCreate?: UserCreateOrConnectWithoutHealthProfilesInput; - upsert?: UserUpsertWithoutHealthProfilesInput; - connect?: UserWhereUniqueInput; - update?: XOR< - XOR, - UserUncheckedUpdateWithoutHealthProfilesInput - >; - }; - - export type UserCreateNestedOneWithoutWorkoutsInput = { - create?: XOR; - connectOrCreate?: UserCreateOrConnectWithoutWorkoutsInput; - connect?: UserWhereUniqueInput; - }; - - export type ExerciseCreateNestedManyWithoutWorkoutInput = { - create?: - | XOR - | ExerciseCreateWithoutWorkoutInput[] - | ExerciseUncheckedCreateWithoutWorkoutInput[]; - connectOrCreate?: ExerciseCreateOrConnectWithoutWorkoutInput | ExerciseCreateOrConnectWithoutWorkoutInput[]; - createMany?: ExerciseCreateManyWorkoutInputEnvelope; - connect?: ExerciseWhereUniqueInput | ExerciseWhereUniqueInput[]; - }; - - export type ExerciseUncheckedCreateNestedManyWithoutWorkoutInput = { - create?: - | XOR - | ExerciseCreateWithoutWorkoutInput[] - | ExerciseUncheckedCreateWithoutWorkoutInput[]; - connectOrCreate?: ExerciseCreateOrConnectWithoutWorkoutInput | ExerciseCreateOrConnectWithoutWorkoutInput[]; - createMany?: ExerciseCreateManyWorkoutInputEnvelope; - connect?: ExerciseWhereUniqueInput | ExerciseWhereUniqueInput[]; - }; - - export type UserUpdateOneRequiredWithoutWorkoutsNestedInput = { - create?: XOR; - connectOrCreate?: UserCreateOrConnectWithoutWorkoutsInput; - upsert?: UserUpsertWithoutWorkoutsInput; - connect?: UserWhereUniqueInput; - update?: XOR< - XOR, - UserUncheckedUpdateWithoutWorkoutsInput - >; - }; - - export type ExerciseUpdateManyWithoutWorkoutNestedInput = { - create?: - | XOR - | ExerciseCreateWithoutWorkoutInput[] - | ExerciseUncheckedCreateWithoutWorkoutInput[]; - connectOrCreate?: ExerciseCreateOrConnectWithoutWorkoutInput | ExerciseCreateOrConnectWithoutWorkoutInput[]; - upsert?: ExerciseUpsertWithWhereUniqueWithoutWorkoutInput | ExerciseUpsertWithWhereUniqueWithoutWorkoutInput[]; - createMany?: ExerciseCreateManyWorkoutInputEnvelope; - set?: ExerciseWhereUniqueInput | ExerciseWhereUniqueInput[]; - disconnect?: ExerciseWhereUniqueInput | ExerciseWhereUniqueInput[]; - delete?: ExerciseWhereUniqueInput | ExerciseWhereUniqueInput[]; - connect?: ExerciseWhereUniqueInput | ExerciseWhereUniqueInput[]; - update?: ExerciseUpdateWithWhereUniqueWithoutWorkoutInput | ExerciseUpdateWithWhereUniqueWithoutWorkoutInput[]; - updateMany?: ExerciseUpdateManyWithWhereWithoutWorkoutInput | ExerciseUpdateManyWithWhereWithoutWorkoutInput[]; - deleteMany?: ExerciseScalarWhereInput | ExerciseScalarWhereInput[]; - }; - - export type ExerciseUncheckedUpdateManyWithoutWorkoutNestedInput = { - create?: - | XOR - | ExerciseCreateWithoutWorkoutInput[] - | ExerciseUncheckedCreateWithoutWorkoutInput[]; - connectOrCreate?: ExerciseCreateOrConnectWithoutWorkoutInput | ExerciseCreateOrConnectWithoutWorkoutInput[]; - upsert?: ExerciseUpsertWithWhereUniqueWithoutWorkoutInput | ExerciseUpsertWithWhereUniqueWithoutWorkoutInput[]; - createMany?: ExerciseCreateManyWorkoutInputEnvelope; - set?: ExerciseWhereUniqueInput | ExerciseWhereUniqueInput[]; - disconnect?: ExerciseWhereUniqueInput | ExerciseWhereUniqueInput[]; - delete?: ExerciseWhereUniqueInput | ExerciseWhereUniqueInput[]; - connect?: ExerciseWhereUniqueInput | ExerciseWhereUniqueInput[]; - update?: ExerciseUpdateWithWhereUniqueWithoutWorkoutInput | ExerciseUpdateWithWhereUniqueWithoutWorkoutInput[]; - updateMany?: ExerciseUpdateManyWithWhereWithoutWorkoutInput | ExerciseUpdateManyWithWhereWithoutWorkoutInput[]; - deleteMany?: ExerciseScalarWhereInput | ExerciseScalarWhereInput[]; - }; - - export type WorkoutCreateNestedOneWithoutExercisesInput = { - create?: XOR; - connectOrCreate?: WorkoutCreateOrConnectWithoutExercisesInput; - connect?: WorkoutWhereUniqueInput; - }; - - export type IntFieldUpdateOperationsInput = { - set?: number; - increment?: number; - decrement?: number; - multiply?: number; - divide?: number; - }; - - export type WorkoutUpdateOneRequiredWithoutExercisesNestedInput = { - create?: XOR; - connectOrCreate?: WorkoutCreateOrConnectWithoutExercisesInput; - upsert?: WorkoutUpsertWithoutExercisesInput; - connect?: WorkoutWhereUniqueInput; - update?: XOR< - XOR, - WorkoutUncheckedUpdateWithoutExercisesInput - >; - }; - - export type UserCreateNestedOneWithoutMealsInput = { - create?: XOR; - connectOrCreate?: UserCreateOrConnectWithoutMealsInput; - connect?: UserWhereUniqueInput; - }; - - export type MealItemCreateNestedManyWithoutMealInput = { - create?: - | XOR - | MealItemCreateWithoutMealInput[] - | MealItemUncheckedCreateWithoutMealInput[]; - connectOrCreate?: MealItemCreateOrConnectWithoutMealInput | MealItemCreateOrConnectWithoutMealInput[]; - createMany?: MealItemCreateManyMealInputEnvelope; - connect?: MealItemWhereUniqueInput | MealItemWhereUniqueInput[]; - }; - - export type MealItemUncheckedCreateNestedManyWithoutMealInput = { - create?: - | XOR - | MealItemCreateWithoutMealInput[] - | MealItemUncheckedCreateWithoutMealInput[]; - connectOrCreate?: MealItemCreateOrConnectWithoutMealInput | MealItemCreateOrConnectWithoutMealInput[]; - createMany?: MealItemCreateManyMealInputEnvelope; - connect?: MealItemWhereUniqueInput | MealItemWhereUniqueInput[]; - }; - - export type UserUpdateOneRequiredWithoutMealsNestedInput = { - create?: XOR; - connectOrCreate?: UserCreateOrConnectWithoutMealsInput; - upsert?: UserUpsertWithoutMealsInput; - connect?: UserWhereUniqueInput; - update?: XOR< - XOR, - UserUncheckedUpdateWithoutMealsInput - >; - }; - - export type MealItemUpdateManyWithoutMealNestedInput = { - create?: - | XOR - | MealItemCreateWithoutMealInput[] - | MealItemUncheckedCreateWithoutMealInput[]; - connectOrCreate?: MealItemCreateOrConnectWithoutMealInput | MealItemCreateOrConnectWithoutMealInput[]; - upsert?: MealItemUpsertWithWhereUniqueWithoutMealInput | MealItemUpsertWithWhereUniqueWithoutMealInput[]; - createMany?: MealItemCreateManyMealInputEnvelope; - set?: MealItemWhereUniqueInput | MealItemWhereUniqueInput[]; - disconnect?: MealItemWhereUniqueInput | MealItemWhereUniqueInput[]; - delete?: MealItemWhereUniqueInput | MealItemWhereUniqueInput[]; - connect?: MealItemWhereUniqueInput | MealItemWhereUniqueInput[]; - update?: MealItemUpdateWithWhereUniqueWithoutMealInput | MealItemUpdateWithWhereUniqueWithoutMealInput[]; - updateMany?: MealItemUpdateManyWithWhereWithoutMealInput | MealItemUpdateManyWithWhereWithoutMealInput[]; - deleteMany?: MealItemScalarWhereInput | MealItemScalarWhereInput[]; - }; - - export type MealItemUncheckedUpdateManyWithoutMealNestedInput = { - create?: - | XOR - | MealItemCreateWithoutMealInput[] - | MealItemUncheckedCreateWithoutMealInput[]; - connectOrCreate?: MealItemCreateOrConnectWithoutMealInput | MealItemCreateOrConnectWithoutMealInput[]; - upsert?: MealItemUpsertWithWhereUniqueWithoutMealInput | MealItemUpsertWithWhereUniqueWithoutMealInput[]; - createMany?: MealItemCreateManyMealInputEnvelope; - set?: MealItemWhereUniqueInput | MealItemWhereUniqueInput[]; - disconnect?: MealItemWhereUniqueInput | MealItemWhereUniqueInput[]; - delete?: MealItemWhereUniqueInput | MealItemWhereUniqueInput[]; - connect?: MealItemWhereUniqueInput | MealItemWhereUniqueInput[]; - update?: MealItemUpdateWithWhereUniqueWithoutMealInput | MealItemUpdateWithWhereUniqueWithoutMealInput[]; - updateMany?: MealItemUpdateManyWithWhereWithoutMealInput | MealItemUpdateManyWithWhereWithoutMealInput[]; - deleteMany?: MealItemScalarWhereInput | MealItemScalarWhereInput[]; - }; - - export type MealCreateNestedOneWithoutMealItemsInput = { - create?: XOR; - connectOrCreate?: MealCreateOrConnectWithoutMealItemsInput; - connect?: MealWhereUniqueInput; - }; - - export type UserCreateNestedOneWithoutMealItemsInput = { - create?: XOR; - connectOrCreate?: UserCreateOrConnectWithoutMealItemsInput; - connect?: UserWhereUniqueInput; - }; - - export type MealUpdateOneRequiredWithoutMealItemsNestedInput = { - create?: XOR; - connectOrCreate?: MealCreateOrConnectWithoutMealItemsInput; - upsert?: MealUpsertWithoutMealItemsInput; - connect?: MealWhereUniqueInput; - update?: XOR< - XOR, - MealUncheckedUpdateWithoutMealItemsInput - >; - }; - - export type UserUpdateOneRequiredWithoutMealItemsNestedInput = { - create?: XOR; - connectOrCreate?: UserCreateOrConnectWithoutMealItemsInput; - upsert?: UserUpsertWithoutMealItemsInput; - connect?: UserWhereUniqueInput; - update?: XOR< - XOR, - UserUncheckedUpdateWithoutMealItemsInput - >; - }; - - export type UserCreateNestedOneWithoutProgressLogsInput = { - create?: XOR; - connectOrCreate?: UserCreateOrConnectWithoutProgressLogsInput; - connect?: UserWhereUniqueInput; - }; - - export type UserUpdateOneRequiredWithoutProgressLogsNestedInput = { - create?: XOR; - connectOrCreate?: UserCreateOrConnectWithoutProgressLogsInput; - upsert?: UserUpsertWithoutProgressLogsInput; - connect?: UserWhereUniqueInput; - update?: XOR< - XOR, - UserUncheckedUpdateWithoutProgressLogsInput - >; - }; - - export type UserCreateNestedOneWithoutWeightEntriesInput = { - create?: XOR; - connectOrCreate?: UserCreateOrConnectWithoutWeightEntriesInput; - connect?: UserWhereUniqueInput; - }; - - export type FloatFieldUpdateOperationsInput = { - set?: number; - increment?: number; - decrement?: number; - multiply?: number; - divide?: number; - }; - - export type UserUpdateOneRequiredWithoutWeightEntriesNestedInput = { - create?: XOR; - connectOrCreate?: UserCreateOrConnectWithoutWeightEntriesInput; - upsert?: UserUpsertWithoutWeightEntriesInput; - connect?: UserWhereUniqueInput; - update?: XOR< - XOR, - UserUncheckedUpdateWithoutWeightEntriesInput - >; - }; - - export type UserCreateNestedOneWithoutWaterIntakeInput = { - create?: XOR; - connectOrCreate?: UserCreateOrConnectWithoutWaterIntakeInput; - connect?: UserWhereUniqueInput; - }; - - export type UserUpdateOneRequiredWithoutWaterIntakeNestedInput = { - create?: XOR; - connectOrCreate?: UserCreateOrConnectWithoutWaterIntakeInput; - upsert?: UserUpsertWithoutWaterIntakeInput; - connect?: UserWhereUniqueInput; - update?: XOR< - XOR, - UserUncheckedUpdateWithoutWaterIntakeInput - >; - }; - - export type UserCreateNestedOneWithoutSleepEntriesInput = { - create?: XOR; - connectOrCreate?: UserCreateOrConnectWithoutSleepEntriesInput; - connect?: UserWhereUniqueInput; - }; - - export type UserUpdateOneRequiredWithoutSleepEntriesNestedInput = { - create?: XOR; - connectOrCreate?: UserCreateOrConnectWithoutSleepEntriesInput; - upsert?: UserUpsertWithoutSleepEntriesInput; - connect?: UserWhereUniqueInput; - update?: XOR< - XOR, - UserUncheckedUpdateWithoutSleepEntriesInput - >; - }; - - export type UserCreateNestedOneWithoutGoalsInput = { - create?: XOR; - connectOrCreate?: UserCreateOrConnectWithoutGoalsInput; - connect?: UserWhereUniqueInput; - }; - - export type UserUpdateOneRequiredWithoutGoalsNestedInput = { - create?: XOR; - connectOrCreate?: UserCreateOrConnectWithoutGoalsInput; - upsert?: UserUpsertWithoutGoalsInput; - connect?: UserWhereUniqueInput; - update?: XOR< - XOR, - UserUncheckedUpdateWithoutGoalsInput - >; - }; - - export type NestedStringFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel>; - in?: string[] | ListStringFieldRefInput<$PrismaModel>; - notIn?: string[] | ListStringFieldRefInput<$PrismaModel>; - lt?: string | StringFieldRefInput<$PrismaModel>; - lte?: string | StringFieldRefInput<$PrismaModel>; - gt?: string | StringFieldRefInput<$PrismaModel>; - gte?: string | StringFieldRefInput<$PrismaModel>; - contains?: string | StringFieldRefInput<$PrismaModel>; - startsWith?: string | StringFieldRefInput<$PrismaModel>; - endsWith?: string | StringFieldRefInput<$PrismaModel>; - not?: NestedStringFilter<$PrismaModel> | string; - }; - - export type NestedStringNullableFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> | null; - in?: string[] | ListStringFieldRefInput<$PrismaModel> | null; - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null; - lt?: string | StringFieldRefInput<$PrismaModel>; - lte?: string | StringFieldRefInput<$PrismaModel>; - gt?: string | StringFieldRefInput<$PrismaModel>; - gte?: string | StringFieldRefInput<$PrismaModel>; - contains?: string | StringFieldRefInput<$PrismaModel>; - startsWith?: string | StringFieldRefInput<$PrismaModel>; - endsWith?: string | StringFieldRefInput<$PrismaModel>; - not?: NestedStringNullableFilter<$PrismaModel> | string | null; - }; - - export type NestedDateTimeFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>; - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>; - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - not?: NestedDateTimeFilter<$PrismaModel> | Date | string; - }; - - export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel>; - in?: string[] | ListStringFieldRefInput<$PrismaModel>; - notIn?: string[] | ListStringFieldRefInput<$PrismaModel>; - lt?: string | StringFieldRefInput<$PrismaModel>; - lte?: string | StringFieldRefInput<$PrismaModel>; - gt?: string | StringFieldRefInput<$PrismaModel>; - gte?: string | StringFieldRefInput<$PrismaModel>; - contains?: string | StringFieldRefInput<$PrismaModel>; - startsWith?: string | StringFieldRefInput<$PrismaModel>; - endsWith?: string | StringFieldRefInput<$PrismaModel>; - not?: NestedStringWithAggregatesFilter<$PrismaModel> | string; - _count?: NestedIntFilter<$PrismaModel>; - _min?: NestedStringFilter<$PrismaModel>; - _max?: NestedStringFilter<$PrismaModel>; - }; - - export type NestedIntFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel>; - in?: number[] | ListIntFieldRefInput<$PrismaModel>; - notIn?: number[] | ListIntFieldRefInput<$PrismaModel>; - lt?: number | IntFieldRefInput<$PrismaModel>; - lte?: number | IntFieldRefInput<$PrismaModel>; - gt?: number | IntFieldRefInput<$PrismaModel>; - gte?: number | IntFieldRefInput<$PrismaModel>; - not?: NestedIntFilter<$PrismaModel> | number; - }; - - export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | StringFieldRefInput<$PrismaModel> | null; - in?: string[] | ListStringFieldRefInput<$PrismaModel> | null; - notIn?: string[] | ListStringFieldRefInput<$PrismaModel> | null; - lt?: string | StringFieldRefInput<$PrismaModel>; - lte?: string | StringFieldRefInput<$PrismaModel>; - gt?: string | StringFieldRefInput<$PrismaModel>; - gte?: string | StringFieldRefInput<$PrismaModel>; - contains?: string | StringFieldRefInput<$PrismaModel>; - startsWith?: string | StringFieldRefInput<$PrismaModel>; - endsWith?: string | StringFieldRefInput<$PrismaModel>; - not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null; - _count?: NestedIntNullableFilter<$PrismaModel>; - _min?: NestedStringNullableFilter<$PrismaModel>; - _max?: NestedStringNullableFilter<$PrismaModel>; - }; - - export type NestedIntNullableFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> | null; - in?: number[] | ListIntFieldRefInput<$PrismaModel> | null; - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null; - lt?: number | IntFieldRefInput<$PrismaModel>; - lte?: number | IntFieldRefInput<$PrismaModel>; - gt?: number | IntFieldRefInput<$PrismaModel>; - gte?: number | IntFieldRefInput<$PrismaModel>; - not?: NestedIntNullableFilter<$PrismaModel> | number | null; - }; - - export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>; - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel>; - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - not?: NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string; - _count?: NestedIntFilter<$PrismaModel>; - _min?: NestedDateTimeFilter<$PrismaModel>; - _max?: NestedDateTimeFilter<$PrismaModel>; - }; - - export type NestedFloatNullableFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> | null; - in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null; - notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null; - lt?: number | FloatFieldRefInput<$PrismaModel>; - lte?: number | FloatFieldRefInput<$PrismaModel>; - gt?: number | FloatFieldRefInput<$PrismaModel>; - gte?: number | FloatFieldRefInput<$PrismaModel>; - not?: NestedFloatNullableFilter<$PrismaModel> | number | null; - }; - - export type NestedDateTimeNullableFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null; - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null; - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null; - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null; - }; - - export type NestedBoolFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel>; - not?: NestedBoolFilter<$PrismaModel> | boolean; - }; - - export type NestedFloatNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel> | null; - in?: number[] | ListFloatFieldRefInput<$PrismaModel> | null; - notIn?: number[] | ListFloatFieldRefInput<$PrismaModel> | null; - lt?: number | FloatFieldRefInput<$PrismaModel>; - lte?: number | FloatFieldRefInput<$PrismaModel>; - gt?: number | FloatFieldRefInput<$PrismaModel>; - gte?: number | FloatFieldRefInput<$PrismaModel>; - not?: NestedFloatNullableWithAggregatesFilter<$PrismaModel> | number | null; - _count?: NestedIntNullableFilter<$PrismaModel>; - _avg?: NestedFloatNullableFilter<$PrismaModel>; - _sum?: NestedFloatNullableFilter<$PrismaModel>; - _min?: NestedFloatNullableFilter<$PrismaModel>; - _max?: NestedFloatNullableFilter<$PrismaModel>; - }; - - export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel> | null; - in?: number[] | ListIntFieldRefInput<$PrismaModel> | null; - notIn?: number[] | ListIntFieldRefInput<$PrismaModel> | null; - lt?: number | IntFieldRefInput<$PrismaModel>; - lte?: number | IntFieldRefInput<$PrismaModel>; - gt?: number | IntFieldRefInput<$PrismaModel>; - gte?: number | IntFieldRefInput<$PrismaModel>; - not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null; - _count?: NestedIntNullableFilter<$PrismaModel>; - _avg?: NestedFloatNullableFilter<$PrismaModel>; - _sum?: NestedIntNullableFilter<$PrismaModel>; - _min?: NestedIntNullableFilter<$PrismaModel>; - _max?: NestedIntNullableFilter<$PrismaModel>; - }; - - export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null; - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null; - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null; - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel>; - not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null; - _count?: NestedIntNullableFilter<$PrismaModel>; - _min?: NestedDateTimeNullableFilter<$PrismaModel>; - _max?: NestedDateTimeNullableFilter<$PrismaModel>; - }; - - export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = { - equals?: boolean | BooleanFieldRefInput<$PrismaModel>; - not?: NestedBoolWithAggregatesFilter<$PrismaModel> | boolean; - _count?: NestedIntFilter<$PrismaModel>; - _min?: NestedBoolFilter<$PrismaModel>; - _max?: NestedBoolFilter<$PrismaModel>; - }; - - export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | IntFieldRefInput<$PrismaModel>; - in?: number[] | ListIntFieldRefInput<$PrismaModel>; - notIn?: number[] | ListIntFieldRefInput<$PrismaModel>; - lt?: number | IntFieldRefInput<$PrismaModel>; - lte?: number | IntFieldRefInput<$PrismaModel>; - gt?: number | IntFieldRefInput<$PrismaModel>; - gte?: number | IntFieldRefInput<$PrismaModel>; - not?: NestedIntWithAggregatesFilter<$PrismaModel> | number; - _count?: NestedIntFilter<$PrismaModel>; - _avg?: NestedFloatFilter<$PrismaModel>; - _sum?: NestedIntFilter<$PrismaModel>; - _min?: NestedIntFilter<$PrismaModel>; - _max?: NestedIntFilter<$PrismaModel>; - }; - - export type NestedFloatFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel>; - in?: number[] | ListFloatFieldRefInput<$PrismaModel>; - notIn?: number[] | ListFloatFieldRefInput<$PrismaModel>; - lt?: number | FloatFieldRefInput<$PrismaModel>; - lte?: number | FloatFieldRefInput<$PrismaModel>; - gt?: number | FloatFieldRefInput<$PrismaModel>; - gte?: number | FloatFieldRefInput<$PrismaModel>; - not?: NestedFloatFilter<$PrismaModel> | number; - }; - - export type NestedFloatWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | FloatFieldRefInput<$PrismaModel>; - in?: number[] | ListFloatFieldRefInput<$PrismaModel>; - notIn?: number[] | ListFloatFieldRefInput<$PrismaModel>; - lt?: number | FloatFieldRefInput<$PrismaModel>; - lte?: number | FloatFieldRefInput<$PrismaModel>; - gt?: number | FloatFieldRefInput<$PrismaModel>; - gte?: number | FloatFieldRefInput<$PrismaModel>; - not?: NestedFloatWithAggregatesFilter<$PrismaModel> | number; - _count?: NestedIntFilter<$PrismaModel>; - _avg?: NestedFloatFilter<$PrismaModel>; - _sum?: NestedFloatFilter<$PrismaModel>; - _min?: NestedFloatFilter<$PrismaModel>; - _max?: NestedFloatFilter<$PrismaModel>; - }; - - export type HealthProfileCreateWithoutUserInput = { - id?: string; - height?: number | null; - weight?: number | null; - age?: number | null; - gender?: string | null; - birthday?: Date | string | null; - targetWeight?: number | null; - targetCalories?: number | null; - targetWaterL?: number | null; - activityLevel?: string | null; - fitnessGoal?: string | null; - heightUnit?: string | null; - weightUnit?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type HealthProfileUncheckedCreateWithoutUserInput = { - id?: string; - height?: number | null; - weight?: number | null; - age?: number | null; - gender?: string | null; - birthday?: Date | string | null; - targetWeight?: number | null; - targetCalories?: number | null; - targetWaterL?: number | null; - activityLevel?: string | null; - fitnessGoal?: string | null; - heightUnit?: string | null; - weightUnit?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type HealthProfileCreateOrConnectWithoutUserInput = { - where: HealthProfileWhereUniqueInput; - create: XOR; - }; - - export type HealthProfileCreateManyUserInputEnvelope = { - data: HealthProfileCreateManyUserInput | HealthProfileCreateManyUserInput[]; - skipDuplicates?: boolean; - }; - - export type WorkoutCreateWithoutUserInput = { - id?: string; - title: string; - category: string; - durationMin?: number | null; - calories?: number | null; - date: Date | string; - notes?: string | null; - isCompleted?: boolean; - totalTime?: number | null; - restTime?: number | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - exercises?: ExerciseCreateNestedManyWithoutWorkoutInput; - }; - - export type WorkoutUncheckedCreateWithoutUserInput = { - id?: string; - title: string; - category: string; - durationMin?: number | null; - calories?: number | null; - date: Date | string; - notes?: string | null; - isCompleted?: boolean; - totalTime?: number | null; - restTime?: number | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - exercises?: ExerciseUncheckedCreateNestedManyWithoutWorkoutInput; - }; - - export type WorkoutCreateOrConnectWithoutUserInput = { - where: WorkoutWhereUniqueInput; - create: XOR; - }; - - export type WorkoutCreateManyUserInputEnvelope = { - data: WorkoutCreateManyUserInput | WorkoutCreateManyUserInput[]; - skipDuplicates?: boolean; - }; - - export type MealCreateWithoutUserInput = { - id?: string; - name: string; - mealType: string; - calories?: number | null; - protein?: number | null; - carbs?: number | null; - fat?: number | null; - date: Date | string; - notes?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - mealItems?: MealItemCreateNestedManyWithoutMealInput; - }; - - export type MealUncheckedCreateWithoutUserInput = { - id?: string; - name: string; - mealType: string; - calories?: number | null; - protein?: number | null; - carbs?: number | null; - fat?: number | null; - date: Date | string; - notes?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - mealItems?: MealItemUncheckedCreateNestedManyWithoutMealInput; - }; - - export type MealCreateOrConnectWithoutUserInput = { - where: MealWhereUniqueInput; - create: XOR; - }; - - export type MealCreateManyUserInputEnvelope = { - data: MealCreateManyUserInput | MealCreateManyUserInput[]; - skipDuplicates?: boolean; - }; - - export type MealItemCreateWithoutUserInput = { - id?: string; - name: string; - calories?: number | null; - protein?: number | null; - carbs?: number | null; - fat?: number | null; - quantity?: number | null; - unit?: string | null; - isHighInProtein?: boolean; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - meal: MealCreateNestedOneWithoutMealItemsInput; - }; - - export type MealItemUncheckedCreateWithoutUserInput = { - id?: string; - mealId: string; - name: string; - calories?: number | null; - protein?: number | null; - carbs?: number | null; - fat?: number | null; - quantity?: number | null; - unit?: string | null; - isHighInProtein?: boolean; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type MealItemCreateOrConnectWithoutUserInput = { - where: MealItemWhereUniqueInput; - create: XOR; - }; - - export type MealItemCreateManyUserInputEnvelope = { - data: MealItemCreateManyUserInput | MealItemCreateManyUserInput[]; - skipDuplicates?: boolean; - }; - - export type ProgressLogCreateWithoutUserInput = { - id?: string; - date: Date | string; - waterL?: number | null; - sleepHrs?: number | null; - mood?: string | null; - weightKg?: number | null; - steps?: number | null; - activeMinutes?: number | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type ProgressLogUncheckedCreateWithoutUserInput = { - id?: string; - date: Date | string; - waterL?: number | null; - sleepHrs?: number | null; - mood?: string | null; - weightKg?: number | null; - steps?: number | null; - activeMinutes?: number | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type ProgressLogCreateOrConnectWithoutUserInput = { - where: ProgressLogWhereUniqueInput; - create: XOR; - }; - - export type ProgressLogCreateManyUserInputEnvelope = { - data: ProgressLogCreateManyUserInput | ProgressLogCreateManyUserInput[]; - skipDuplicates?: boolean; - }; - - export type WeightEntryCreateWithoutUserInput = { - id?: string; - weightKg: number; - date: Date | string; - photo?: string | null; - notes?: string | null; - bodyFatPercentage?: number | null; - muscleMassKg?: number | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type WeightEntryUncheckedCreateWithoutUserInput = { - id?: string; - weightKg: number; - date: Date | string; - photo?: string | null; - notes?: string | null; - bodyFatPercentage?: number | null; - muscleMassKg?: number | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type WeightEntryCreateOrConnectWithoutUserInput = { - where: WeightEntryWhereUniqueInput; - create: XOR; - }; - - export type WeightEntryCreateManyUserInputEnvelope = { - data: WeightEntryCreateManyUserInput | WeightEntryCreateManyUserInput[]; - skipDuplicates?: boolean; - }; - - export type WaterIntakeCreateWithoutUserInput = { - id?: string; - amountMl: number; - date: Date | string; - time: Date | string; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type WaterIntakeUncheckedCreateWithoutUserInput = { - id?: string; - amountMl: number; - date: Date | string; - time: Date | string; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type WaterIntakeCreateOrConnectWithoutUserInput = { - where: WaterIntakeWhereUniqueInput; - create: XOR; - }; - - export type WaterIntakeCreateManyUserInputEnvelope = { - data: WaterIntakeCreateManyUserInput | WaterIntakeCreateManyUserInput[]; - skipDuplicates?: boolean; - }; - - export type SleepEntryCreateWithoutUserInput = { - id?: string; - hours: number; - quality: string; - date: Date | string; - bedtime?: Date | string | null; - wakeTime?: Date | string | null; - notes?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type SleepEntryUncheckedCreateWithoutUserInput = { - id?: string; - hours: number; - quality: string; - date: Date | string; - bedtime?: Date | string | null; - wakeTime?: Date | string | null; - notes?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type SleepEntryCreateOrConnectWithoutUserInput = { - where: SleepEntryWhereUniqueInput; - create: XOR; - }; - - export type SleepEntryCreateManyUserInputEnvelope = { - data: SleepEntryCreateManyUserInput | SleepEntryCreateManyUserInput[]; - skipDuplicates?: boolean; - }; - - export type GoalCreateWithoutUserInput = { - id?: string; - type: string; - target: number; - current?: number; - unit: string; - startDate: Date | string; - endDate?: Date | string | null; - isActive?: boolean; - notes?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type GoalUncheckedCreateWithoutUserInput = { - id?: string; - type: string; - target: number; - current?: number; - unit: string; - startDate: Date | string; - endDate?: Date | string | null; - isActive?: boolean; - notes?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type GoalCreateOrConnectWithoutUserInput = { - where: GoalWhereUniqueInput; - create: XOR; - }; - - export type GoalCreateManyUserInputEnvelope = { - data: GoalCreateManyUserInput | GoalCreateManyUserInput[]; - skipDuplicates?: boolean; - }; - - export type HealthProfileUpsertWithWhereUniqueWithoutUserInput = { - where: HealthProfileWhereUniqueInput; - update: XOR; - create: XOR; - }; - - export type HealthProfileUpdateWithWhereUniqueWithoutUserInput = { - where: HealthProfileWhereUniqueInput; - data: XOR; - }; - - export type HealthProfileUpdateManyWithWhereWithoutUserInput = { - where: HealthProfileScalarWhereInput; - data: XOR; - }; - - export type HealthProfileScalarWhereInput = { - AND?: HealthProfileScalarWhereInput | HealthProfileScalarWhereInput[]; - OR?: HealthProfileScalarWhereInput[]; - NOT?: HealthProfileScalarWhereInput | HealthProfileScalarWhereInput[]; - id?: StringFilter<'HealthProfile'> | string; - userId?: StringFilter<'HealthProfile'> | string; - height?: FloatNullableFilter<'HealthProfile'> | number | null; - weight?: FloatNullableFilter<'HealthProfile'> | number | null; - age?: IntNullableFilter<'HealthProfile'> | number | null; - gender?: StringNullableFilter<'HealthProfile'> | string | null; - birthday?: DateTimeNullableFilter<'HealthProfile'> | Date | string | null; - targetWeight?: FloatNullableFilter<'HealthProfile'> | number | null; - targetCalories?: IntNullableFilter<'HealthProfile'> | number | null; - targetWaterL?: FloatNullableFilter<'HealthProfile'> | number | null; - activityLevel?: StringNullableFilter<'HealthProfile'> | string | null; - fitnessGoal?: StringNullableFilter<'HealthProfile'> | string | null; - heightUnit?: StringNullableFilter<'HealthProfile'> | string | null; - weightUnit?: StringNullableFilter<'HealthProfile'> | string | null; - createdAt?: DateTimeFilter<'HealthProfile'> | Date | string; - updatedAt?: DateTimeFilter<'HealthProfile'> | Date | string; - syncedAt?: DateTimeNullableFilter<'HealthProfile'> | Date | string | null; - isDeleted?: BoolFilter<'HealthProfile'> | boolean; - }; - - export type WorkoutUpsertWithWhereUniqueWithoutUserInput = { - where: WorkoutWhereUniqueInput; - update: XOR; - create: XOR; - }; - - export type WorkoutUpdateWithWhereUniqueWithoutUserInput = { - where: WorkoutWhereUniqueInput; - data: XOR; - }; - - export type WorkoutUpdateManyWithWhereWithoutUserInput = { - where: WorkoutScalarWhereInput; - data: XOR; - }; - - export type WorkoutScalarWhereInput = { - AND?: WorkoutScalarWhereInput | WorkoutScalarWhereInput[]; - OR?: WorkoutScalarWhereInput[]; - NOT?: WorkoutScalarWhereInput | WorkoutScalarWhereInput[]; - id?: StringFilter<'Workout'> | string; - userId?: StringFilter<'Workout'> | string; - title?: StringFilter<'Workout'> | string; - category?: StringFilter<'Workout'> | string; - durationMin?: IntNullableFilter<'Workout'> | number | null; - calories?: IntNullableFilter<'Workout'> | number | null; - date?: DateTimeFilter<'Workout'> | Date | string; - notes?: StringNullableFilter<'Workout'> | string | null; - isCompleted?: BoolFilter<'Workout'> | boolean; - totalTime?: IntNullableFilter<'Workout'> | number | null; - restTime?: IntNullableFilter<'Workout'> | number | null; - createdAt?: DateTimeFilter<'Workout'> | Date | string; - updatedAt?: DateTimeFilter<'Workout'> | Date | string; - syncedAt?: DateTimeNullableFilter<'Workout'> | Date | string | null; - isDeleted?: BoolFilter<'Workout'> | boolean; - }; - - export type MealUpsertWithWhereUniqueWithoutUserInput = { - where: MealWhereUniqueInput; - update: XOR; - create: XOR; - }; - - export type MealUpdateWithWhereUniqueWithoutUserInput = { - where: MealWhereUniqueInput; - data: XOR; - }; - - export type MealUpdateManyWithWhereWithoutUserInput = { - where: MealScalarWhereInput; - data: XOR; - }; - - export type MealScalarWhereInput = { - AND?: MealScalarWhereInput | MealScalarWhereInput[]; - OR?: MealScalarWhereInput[]; - NOT?: MealScalarWhereInput | MealScalarWhereInput[]; - id?: StringFilter<'Meal'> | string; - userId?: StringFilter<'Meal'> | string; - name?: StringFilter<'Meal'> | string; - mealType?: StringFilter<'Meal'> | string; - calories?: IntNullableFilter<'Meal'> | number | null; - protein?: FloatNullableFilter<'Meal'> | number | null; - carbs?: FloatNullableFilter<'Meal'> | number | null; - fat?: FloatNullableFilter<'Meal'> | number | null; - date?: DateTimeFilter<'Meal'> | Date | string; - notes?: StringNullableFilter<'Meal'> | string | null; - createdAt?: DateTimeFilter<'Meal'> | Date | string; - updatedAt?: DateTimeFilter<'Meal'> | Date | string; - syncedAt?: DateTimeNullableFilter<'Meal'> | Date | string | null; - isDeleted?: BoolFilter<'Meal'> | boolean; - }; - - export type MealItemUpsertWithWhereUniqueWithoutUserInput = { - where: MealItemWhereUniqueInput; - update: XOR; - create: XOR; - }; - - export type MealItemUpdateWithWhereUniqueWithoutUserInput = { - where: MealItemWhereUniqueInput; - data: XOR; - }; - - export type MealItemUpdateManyWithWhereWithoutUserInput = { - where: MealItemScalarWhereInput; - data: XOR; - }; - - export type MealItemScalarWhereInput = { - AND?: MealItemScalarWhereInput | MealItemScalarWhereInput[]; - OR?: MealItemScalarWhereInput[]; - NOT?: MealItemScalarWhereInput | MealItemScalarWhereInput[]; - id?: StringFilter<'MealItem'> | string; - mealId?: StringFilter<'MealItem'> | string; - userId?: StringFilter<'MealItem'> | string; - name?: StringFilter<'MealItem'> | string; - calories?: IntNullableFilter<'MealItem'> | number | null; - protein?: FloatNullableFilter<'MealItem'> | number | null; - carbs?: FloatNullableFilter<'MealItem'> | number | null; - fat?: FloatNullableFilter<'MealItem'> | number | null; - quantity?: FloatNullableFilter<'MealItem'> | number | null; - unit?: StringNullableFilter<'MealItem'> | string | null; - isHighInProtein?: BoolFilter<'MealItem'> | boolean; - createdAt?: DateTimeFilter<'MealItem'> | Date | string; - updatedAt?: DateTimeFilter<'MealItem'> | Date | string; - syncedAt?: DateTimeNullableFilter<'MealItem'> | Date | string | null; - isDeleted?: BoolFilter<'MealItem'> | boolean; - }; - - export type ProgressLogUpsertWithWhereUniqueWithoutUserInput = { - where: ProgressLogWhereUniqueInput; - update: XOR; - create: XOR; - }; - - export type ProgressLogUpdateWithWhereUniqueWithoutUserInput = { - where: ProgressLogWhereUniqueInput; - data: XOR; - }; - - export type ProgressLogUpdateManyWithWhereWithoutUserInput = { - where: ProgressLogScalarWhereInput; - data: XOR; - }; - - export type ProgressLogScalarWhereInput = { - AND?: ProgressLogScalarWhereInput | ProgressLogScalarWhereInput[]; - OR?: ProgressLogScalarWhereInput[]; - NOT?: ProgressLogScalarWhereInput | ProgressLogScalarWhereInput[]; - id?: StringFilter<'ProgressLog'> | string; - userId?: StringFilter<'ProgressLog'> | string; - date?: DateTimeFilter<'ProgressLog'> | Date | string; - waterL?: FloatNullableFilter<'ProgressLog'> | number | null; - sleepHrs?: FloatNullableFilter<'ProgressLog'> | number | null; - mood?: StringNullableFilter<'ProgressLog'> | string | null; - weightKg?: FloatNullableFilter<'ProgressLog'> | number | null; - steps?: IntNullableFilter<'ProgressLog'> | number | null; - activeMinutes?: IntNullableFilter<'ProgressLog'> | number | null; - createdAt?: DateTimeFilter<'ProgressLog'> | Date | string; - updatedAt?: DateTimeFilter<'ProgressLog'> | Date | string; - syncedAt?: DateTimeNullableFilter<'ProgressLog'> | Date | string | null; - isDeleted?: BoolFilter<'ProgressLog'> | boolean; - }; - - export type WeightEntryUpsertWithWhereUniqueWithoutUserInput = { - where: WeightEntryWhereUniqueInput; - update: XOR; - create: XOR; - }; - - export type WeightEntryUpdateWithWhereUniqueWithoutUserInput = { - where: WeightEntryWhereUniqueInput; - data: XOR; - }; - - export type WeightEntryUpdateManyWithWhereWithoutUserInput = { - where: WeightEntryScalarWhereInput; - data: XOR; - }; - - export type WeightEntryScalarWhereInput = { - AND?: WeightEntryScalarWhereInput | WeightEntryScalarWhereInput[]; - OR?: WeightEntryScalarWhereInput[]; - NOT?: WeightEntryScalarWhereInput | WeightEntryScalarWhereInput[]; - id?: StringFilter<'WeightEntry'> | string; - userId?: StringFilter<'WeightEntry'> | string; - weightKg?: FloatFilter<'WeightEntry'> | number; - date?: DateTimeFilter<'WeightEntry'> | Date | string; - photo?: StringNullableFilter<'WeightEntry'> | string | null; - notes?: StringNullableFilter<'WeightEntry'> | string | null; - bodyFatPercentage?: FloatNullableFilter<'WeightEntry'> | number | null; - muscleMassKg?: FloatNullableFilter<'WeightEntry'> | number | null; - createdAt?: DateTimeFilter<'WeightEntry'> | Date | string; - updatedAt?: DateTimeFilter<'WeightEntry'> | Date | string; - syncedAt?: DateTimeNullableFilter<'WeightEntry'> | Date | string | null; - isDeleted?: BoolFilter<'WeightEntry'> | boolean; - }; - - export type WaterIntakeUpsertWithWhereUniqueWithoutUserInput = { - where: WaterIntakeWhereUniqueInput; - update: XOR; - create: XOR; - }; - - export type WaterIntakeUpdateWithWhereUniqueWithoutUserInput = { - where: WaterIntakeWhereUniqueInput; - data: XOR; - }; - - export type WaterIntakeUpdateManyWithWhereWithoutUserInput = { - where: WaterIntakeScalarWhereInput; - data: XOR; - }; - - export type WaterIntakeScalarWhereInput = { - AND?: WaterIntakeScalarWhereInput | WaterIntakeScalarWhereInput[]; - OR?: WaterIntakeScalarWhereInput[]; - NOT?: WaterIntakeScalarWhereInput | WaterIntakeScalarWhereInput[]; - id?: StringFilter<'WaterIntake'> | string; - userId?: StringFilter<'WaterIntake'> | string; - amountMl?: IntFilter<'WaterIntake'> | number; - date?: DateTimeFilter<'WaterIntake'> | Date | string; - time?: DateTimeFilter<'WaterIntake'> | Date | string; - createdAt?: DateTimeFilter<'WaterIntake'> | Date | string; - updatedAt?: DateTimeFilter<'WaterIntake'> | Date | string; - syncedAt?: DateTimeNullableFilter<'WaterIntake'> | Date | string | null; - isDeleted?: BoolFilter<'WaterIntake'> | boolean; - }; - - export type SleepEntryUpsertWithWhereUniqueWithoutUserInput = { - where: SleepEntryWhereUniqueInput; - update: XOR; - create: XOR; - }; - - export type SleepEntryUpdateWithWhereUniqueWithoutUserInput = { - where: SleepEntryWhereUniqueInput; - data: XOR; - }; - - export type SleepEntryUpdateManyWithWhereWithoutUserInput = { - where: SleepEntryScalarWhereInput; - data: XOR; - }; - - export type SleepEntryScalarWhereInput = { - AND?: SleepEntryScalarWhereInput | SleepEntryScalarWhereInput[]; - OR?: SleepEntryScalarWhereInput[]; - NOT?: SleepEntryScalarWhereInput | SleepEntryScalarWhereInput[]; - id?: StringFilter<'SleepEntry'> | string; - userId?: StringFilter<'SleepEntry'> | string; - hours?: FloatFilter<'SleepEntry'> | number; - quality?: StringFilter<'SleepEntry'> | string; - date?: DateTimeFilter<'SleepEntry'> | Date | string; - bedtime?: DateTimeNullableFilter<'SleepEntry'> | Date | string | null; - wakeTime?: DateTimeNullableFilter<'SleepEntry'> | Date | string | null; - notes?: StringNullableFilter<'SleepEntry'> | string | null; - createdAt?: DateTimeFilter<'SleepEntry'> | Date | string; - updatedAt?: DateTimeFilter<'SleepEntry'> | Date | string; - syncedAt?: DateTimeNullableFilter<'SleepEntry'> | Date | string | null; - isDeleted?: BoolFilter<'SleepEntry'> | boolean; - }; - - export type GoalUpsertWithWhereUniqueWithoutUserInput = { - where: GoalWhereUniqueInput; - update: XOR; - create: XOR; - }; - - export type GoalUpdateWithWhereUniqueWithoutUserInput = { - where: GoalWhereUniqueInput; - data: XOR; - }; - - export type GoalUpdateManyWithWhereWithoutUserInput = { - where: GoalScalarWhereInput; - data: XOR; - }; - - export type GoalScalarWhereInput = { - AND?: GoalScalarWhereInput | GoalScalarWhereInput[]; - OR?: GoalScalarWhereInput[]; - NOT?: GoalScalarWhereInput | GoalScalarWhereInput[]; - id?: StringFilter<'Goal'> | string; - userId?: StringFilter<'Goal'> | string; - type?: StringFilter<'Goal'> | string; - target?: FloatFilter<'Goal'> | number; - current?: FloatFilter<'Goal'> | number; - unit?: StringFilter<'Goal'> | string; - startDate?: DateTimeFilter<'Goal'> | Date | string; - endDate?: DateTimeNullableFilter<'Goal'> | Date | string | null; - isActive?: BoolFilter<'Goal'> | boolean; - notes?: StringNullableFilter<'Goal'> | string | null; - createdAt?: DateTimeFilter<'Goal'> | Date | string; - updatedAt?: DateTimeFilter<'Goal'> | Date | string; - syncedAt?: DateTimeNullableFilter<'Goal'> | Date | string | null; - isDeleted?: BoolFilter<'Goal'> | boolean; - }; - - export type UserCreateWithoutHealthProfilesInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - workouts?: WorkoutCreateNestedManyWithoutUserInput; - meals?: MealCreateNestedManyWithoutUserInput; - mealItems?: MealItemCreateNestedManyWithoutUserInput; - progressLogs?: ProgressLogCreateNestedManyWithoutUserInput; - weightEntries?: WeightEntryCreateNestedManyWithoutUserInput; - waterIntake?: WaterIntakeCreateNestedManyWithoutUserInput; - sleepEntries?: SleepEntryCreateNestedManyWithoutUserInput; - goals?: GoalCreateNestedManyWithoutUserInput; - }; - - export type UserUncheckedCreateWithoutHealthProfilesInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - workouts?: WorkoutUncheckedCreateNestedManyWithoutUserInput; - meals?: MealUncheckedCreateNestedManyWithoutUserInput; - mealItems?: MealItemUncheckedCreateNestedManyWithoutUserInput; - progressLogs?: ProgressLogUncheckedCreateNestedManyWithoutUserInput; - weightEntries?: WeightEntryUncheckedCreateNestedManyWithoutUserInput; - waterIntake?: WaterIntakeUncheckedCreateNestedManyWithoutUserInput; - sleepEntries?: SleepEntryUncheckedCreateNestedManyWithoutUserInput; - goals?: GoalUncheckedCreateNestedManyWithoutUserInput; - }; - - export type UserCreateOrConnectWithoutHealthProfilesInput = { - where: UserWhereUniqueInput; - create: XOR; - }; - - export type UserUpsertWithoutHealthProfilesInput = { - update: XOR; - create: XOR; - where?: UserWhereInput; - }; - - export type UserUpdateToOneWithWhereWithoutHealthProfilesInput = { - where?: UserWhereInput; - data: XOR; - }; - - export type UserUpdateWithoutHealthProfilesInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - workouts?: WorkoutUpdateManyWithoutUserNestedInput; - meals?: MealUpdateManyWithoutUserNestedInput; - mealItems?: MealItemUpdateManyWithoutUserNestedInput; - progressLogs?: ProgressLogUpdateManyWithoutUserNestedInput; - weightEntries?: WeightEntryUpdateManyWithoutUserNestedInput; - waterIntake?: WaterIntakeUpdateManyWithoutUserNestedInput; - sleepEntries?: SleepEntryUpdateManyWithoutUserNestedInput; - goals?: GoalUpdateManyWithoutUserNestedInput; - }; - - export type UserUncheckedUpdateWithoutHealthProfilesInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - workouts?: WorkoutUncheckedUpdateManyWithoutUserNestedInput; - meals?: MealUncheckedUpdateManyWithoutUserNestedInput; - mealItems?: MealItemUncheckedUpdateManyWithoutUserNestedInput; - progressLogs?: ProgressLogUncheckedUpdateManyWithoutUserNestedInput; - weightEntries?: WeightEntryUncheckedUpdateManyWithoutUserNestedInput; - waterIntake?: WaterIntakeUncheckedUpdateManyWithoutUserNestedInput; - sleepEntries?: SleepEntryUncheckedUpdateManyWithoutUserNestedInput; - goals?: GoalUncheckedUpdateManyWithoutUserNestedInput; - }; - - export type UserCreateWithoutWorkoutsInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - healthProfiles?: HealthProfileCreateNestedManyWithoutUserInput; - meals?: MealCreateNestedManyWithoutUserInput; - mealItems?: MealItemCreateNestedManyWithoutUserInput; - progressLogs?: ProgressLogCreateNestedManyWithoutUserInput; - weightEntries?: WeightEntryCreateNestedManyWithoutUserInput; - waterIntake?: WaterIntakeCreateNestedManyWithoutUserInput; - sleepEntries?: SleepEntryCreateNestedManyWithoutUserInput; - goals?: GoalCreateNestedManyWithoutUserInput; - }; - - export type UserUncheckedCreateWithoutWorkoutsInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - healthProfiles?: HealthProfileUncheckedCreateNestedManyWithoutUserInput; - meals?: MealUncheckedCreateNestedManyWithoutUserInput; - mealItems?: MealItemUncheckedCreateNestedManyWithoutUserInput; - progressLogs?: ProgressLogUncheckedCreateNestedManyWithoutUserInput; - weightEntries?: WeightEntryUncheckedCreateNestedManyWithoutUserInput; - waterIntake?: WaterIntakeUncheckedCreateNestedManyWithoutUserInput; - sleepEntries?: SleepEntryUncheckedCreateNestedManyWithoutUserInput; - goals?: GoalUncheckedCreateNestedManyWithoutUserInput; - }; - - export type UserCreateOrConnectWithoutWorkoutsInput = { - where: UserWhereUniqueInput; - create: XOR; - }; - - export type ExerciseCreateWithoutWorkoutInput = { - id?: string; - name: string; - sets?: number | null; - reps?: number | null; - weightKg?: number | null; - duration?: number | null; - distance?: number | null; - restTime?: number | null; - order?: number; - isCompleted?: boolean; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type ExerciseUncheckedCreateWithoutWorkoutInput = { - id?: string; - name: string; - sets?: number | null; - reps?: number | null; - weightKg?: number | null; - duration?: number | null; - distance?: number | null; - restTime?: number | null; - order?: number; - isCompleted?: boolean; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type ExerciseCreateOrConnectWithoutWorkoutInput = { - where: ExerciseWhereUniqueInput; - create: XOR; - }; - - export type ExerciseCreateManyWorkoutInputEnvelope = { - data: ExerciseCreateManyWorkoutInput | ExerciseCreateManyWorkoutInput[]; - skipDuplicates?: boolean; - }; - - export type UserUpsertWithoutWorkoutsInput = { - update: XOR; - create: XOR; - where?: UserWhereInput; - }; - - export type UserUpdateToOneWithWhereWithoutWorkoutsInput = { - where?: UserWhereInput; - data: XOR; - }; - - export type UserUpdateWithoutWorkoutsInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - healthProfiles?: HealthProfileUpdateManyWithoutUserNestedInput; - meals?: MealUpdateManyWithoutUserNestedInput; - mealItems?: MealItemUpdateManyWithoutUserNestedInput; - progressLogs?: ProgressLogUpdateManyWithoutUserNestedInput; - weightEntries?: WeightEntryUpdateManyWithoutUserNestedInput; - waterIntake?: WaterIntakeUpdateManyWithoutUserNestedInput; - sleepEntries?: SleepEntryUpdateManyWithoutUserNestedInput; - goals?: GoalUpdateManyWithoutUserNestedInput; - }; - - export type UserUncheckedUpdateWithoutWorkoutsInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - healthProfiles?: HealthProfileUncheckedUpdateManyWithoutUserNestedInput; - meals?: MealUncheckedUpdateManyWithoutUserNestedInput; - mealItems?: MealItemUncheckedUpdateManyWithoutUserNestedInput; - progressLogs?: ProgressLogUncheckedUpdateManyWithoutUserNestedInput; - weightEntries?: WeightEntryUncheckedUpdateManyWithoutUserNestedInput; - waterIntake?: WaterIntakeUncheckedUpdateManyWithoutUserNestedInput; - sleepEntries?: SleepEntryUncheckedUpdateManyWithoutUserNestedInput; - goals?: GoalUncheckedUpdateManyWithoutUserNestedInput; - }; - - export type ExerciseUpsertWithWhereUniqueWithoutWorkoutInput = { - where: ExerciseWhereUniqueInput; - update: XOR; - create: XOR; - }; - - export type ExerciseUpdateWithWhereUniqueWithoutWorkoutInput = { - where: ExerciseWhereUniqueInput; - data: XOR; - }; - - export type ExerciseUpdateManyWithWhereWithoutWorkoutInput = { - where: ExerciseScalarWhereInput; - data: XOR; - }; - - export type ExerciseScalarWhereInput = { - AND?: ExerciseScalarWhereInput | ExerciseScalarWhereInput[]; - OR?: ExerciseScalarWhereInput[]; - NOT?: ExerciseScalarWhereInput | ExerciseScalarWhereInput[]; - id?: StringFilter<'Exercise'> | string; - workoutId?: StringFilter<'Exercise'> | string; - name?: StringFilter<'Exercise'> | string; - sets?: IntNullableFilter<'Exercise'> | number | null; - reps?: IntNullableFilter<'Exercise'> | number | null; - weightKg?: FloatNullableFilter<'Exercise'> | number | null; - duration?: IntNullableFilter<'Exercise'> | number | null; - distance?: FloatNullableFilter<'Exercise'> | number | null; - restTime?: IntNullableFilter<'Exercise'> | number | null; - order?: IntFilter<'Exercise'> | number; - isCompleted?: BoolFilter<'Exercise'> | boolean; - createdAt?: DateTimeFilter<'Exercise'> | Date | string; - updatedAt?: DateTimeFilter<'Exercise'> | Date | string; - syncedAt?: DateTimeNullableFilter<'Exercise'> | Date | string | null; - isDeleted?: BoolFilter<'Exercise'> | boolean; - }; - - export type WorkoutCreateWithoutExercisesInput = { - id?: string; - title: string; - category: string; - durationMin?: number | null; - calories?: number | null; - date: Date | string; - notes?: string | null; - isCompleted?: boolean; - totalTime?: number | null; - restTime?: number | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - user: UserCreateNestedOneWithoutWorkoutsInput; - }; - - export type WorkoutUncheckedCreateWithoutExercisesInput = { - id?: string; - userId: string; - title: string; - category: string; - durationMin?: number | null; - calories?: number | null; - date: Date | string; - notes?: string | null; - isCompleted?: boolean; - totalTime?: number | null; - restTime?: number | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type WorkoutCreateOrConnectWithoutExercisesInput = { - where: WorkoutWhereUniqueInput; - create: XOR; - }; - - export type WorkoutUpsertWithoutExercisesInput = { - update: XOR; - create: XOR; - where?: WorkoutWhereInput; - }; - - export type WorkoutUpdateToOneWithWhereWithoutExercisesInput = { - where?: WorkoutWhereInput; - data: XOR; - }; - - export type WorkoutUpdateWithoutExercisesInput = { - id?: StringFieldUpdateOperationsInput | string; - title?: StringFieldUpdateOperationsInput | string; - category?: StringFieldUpdateOperationsInput | string; - durationMin?: NullableIntFieldUpdateOperationsInput | number | null; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - isCompleted?: BoolFieldUpdateOperationsInput | boolean; - totalTime?: NullableIntFieldUpdateOperationsInput | number | null; - restTime?: NullableIntFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - user?: UserUpdateOneRequiredWithoutWorkoutsNestedInput; - }; - - export type WorkoutUncheckedUpdateWithoutExercisesInput = { - id?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - title?: StringFieldUpdateOperationsInput | string; - category?: StringFieldUpdateOperationsInput | string; - durationMin?: NullableIntFieldUpdateOperationsInput | number | null; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - isCompleted?: BoolFieldUpdateOperationsInput | boolean; - totalTime?: NullableIntFieldUpdateOperationsInput | number | null; - restTime?: NullableIntFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type UserCreateWithoutMealsInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - healthProfiles?: HealthProfileCreateNestedManyWithoutUserInput; - workouts?: WorkoutCreateNestedManyWithoutUserInput; - mealItems?: MealItemCreateNestedManyWithoutUserInput; - progressLogs?: ProgressLogCreateNestedManyWithoutUserInput; - weightEntries?: WeightEntryCreateNestedManyWithoutUserInput; - waterIntake?: WaterIntakeCreateNestedManyWithoutUserInput; - sleepEntries?: SleepEntryCreateNestedManyWithoutUserInput; - goals?: GoalCreateNestedManyWithoutUserInput; - }; - - export type UserUncheckedCreateWithoutMealsInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - healthProfiles?: HealthProfileUncheckedCreateNestedManyWithoutUserInput; - workouts?: WorkoutUncheckedCreateNestedManyWithoutUserInput; - mealItems?: MealItemUncheckedCreateNestedManyWithoutUserInput; - progressLogs?: ProgressLogUncheckedCreateNestedManyWithoutUserInput; - weightEntries?: WeightEntryUncheckedCreateNestedManyWithoutUserInput; - waterIntake?: WaterIntakeUncheckedCreateNestedManyWithoutUserInput; - sleepEntries?: SleepEntryUncheckedCreateNestedManyWithoutUserInput; - goals?: GoalUncheckedCreateNestedManyWithoutUserInput; - }; - - export type UserCreateOrConnectWithoutMealsInput = { - where: UserWhereUniqueInput; - create: XOR; - }; - - export type MealItemCreateWithoutMealInput = { - id?: string; - name: string; - calories?: number | null; - protein?: number | null; - carbs?: number | null; - fat?: number | null; - quantity?: number | null; - unit?: string | null; - isHighInProtein?: boolean; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - user: UserCreateNestedOneWithoutMealItemsInput; - }; - - export type MealItemUncheckedCreateWithoutMealInput = { - id?: string; - userId: string; - name: string; - calories?: number | null; - protein?: number | null; - carbs?: number | null; - fat?: number | null; - quantity?: number | null; - unit?: string | null; - isHighInProtein?: boolean; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type MealItemCreateOrConnectWithoutMealInput = { - where: MealItemWhereUniqueInput; - create: XOR; - }; - - export type MealItemCreateManyMealInputEnvelope = { - data: MealItemCreateManyMealInput | MealItemCreateManyMealInput[]; - skipDuplicates?: boolean; - }; - - export type UserUpsertWithoutMealsInput = { - update: XOR; - create: XOR; - where?: UserWhereInput; - }; - - export type UserUpdateToOneWithWhereWithoutMealsInput = { - where?: UserWhereInput; - data: XOR; - }; - - export type UserUpdateWithoutMealsInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - healthProfiles?: HealthProfileUpdateManyWithoutUserNestedInput; - workouts?: WorkoutUpdateManyWithoutUserNestedInput; - mealItems?: MealItemUpdateManyWithoutUserNestedInput; - progressLogs?: ProgressLogUpdateManyWithoutUserNestedInput; - weightEntries?: WeightEntryUpdateManyWithoutUserNestedInput; - waterIntake?: WaterIntakeUpdateManyWithoutUserNestedInput; - sleepEntries?: SleepEntryUpdateManyWithoutUserNestedInput; - goals?: GoalUpdateManyWithoutUserNestedInput; - }; - - export type UserUncheckedUpdateWithoutMealsInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - healthProfiles?: HealthProfileUncheckedUpdateManyWithoutUserNestedInput; - workouts?: WorkoutUncheckedUpdateManyWithoutUserNestedInput; - mealItems?: MealItemUncheckedUpdateManyWithoutUserNestedInput; - progressLogs?: ProgressLogUncheckedUpdateManyWithoutUserNestedInput; - weightEntries?: WeightEntryUncheckedUpdateManyWithoutUserNestedInput; - waterIntake?: WaterIntakeUncheckedUpdateManyWithoutUserNestedInput; - sleepEntries?: SleepEntryUncheckedUpdateManyWithoutUserNestedInput; - goals?: GoalUncheckedUpdateManyWithoutUserNestedInput; - }; - - export type MealItemUpsertWithWhereUniqueWithoutMealInput = { - where: MealItemWhereUniqueInput; - update: XOR; - create: XOR; - }; - - export type MealItemUpdateWithWhereUniqueWithoutMealInput = { - where: MealItemWhereUniqueInput; - data: XOR; - }; - - export type MealItemUpdateManyWithWhereWithoutMealInput = { - where: MealItemScalarWhereInput; - data: XOR; - }; - - export type MealCreateWithoutMealItemsInput = { - id?: string; - name: string; - mealType: string; - calories?: number | null; - protein?: number | null; - carbs?: number | null; - fat?: number | null; - date: Date | string; - notes?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - user: UserCreateNestedOneWithoutMealsInput; - }; - - export type MealUncheckedCreateWithoutMealItemsInput = { - id?: string; - userId: string; - name: string; - mealType: string; - calories?: number | null; - protein?: number | null; - carbs?: number | null; - fat?: number | null; - date: Date | string; - notes?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type MealCreateOrConnectWithoutMealItemsInput = { - where: MealWhereUniqueInput; - create: XOR; - }; - - export type UserCreateWithoutMealItemsInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - healthProfiles?: HealthProfileCreateNestedManyWithoutUserInput; - workouts?: WorkoutCreateNestedManyWithoutUserInput; - meals?: MealCreateNestedManyWithoutUserInput; - progressLogs?: ProgressLogCreateNestedManyWithoutUserInput; - weightEntries?: WeightEntryCreateNestedManyWithoutUserInput; - waterIntake?: WaterIntakeCreateNestedManyWithoutUserInput; - sleepEntries?: SleepEntryCreateNestedManyWithoutUserInput; - goals?: GoalCreateNestedManyWithoutUserInput; - }; - - export type UserUncheckedCreateWithoutMealItemsInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - healthProfiles?: HealthProfileUncheckedCreateNestedManyWithoutUserInput; - workouts?: WorkoutUncheckedCreateNestedManyWithoutUserInput; - meals?: MealUncheckedCreateNestedManyWithoutUserInput; - progressLogs?: ProgressLogUncheckedCreateNestedManyWithoutUserInput; - weightEntries?: WeightEntryUncheckedCreateNestedManyWithoutUserInput; - waterIntake?: WaterIntakeUncheckedCreateNestedManyWithoutUserInput; - sleepEntries?: SleepEntryUncheckedCreateNestedManyWithoutUserInput; - goals?: GoalUncheckedCreateNestedManyWithoutUserInput; - }; - - export type UserCreateOrConnectWithoutMealItemsInput = { - where: UserWhereUniqueInput; - create: XOR; - }; - - export type MealUpsertWithoutMealItemsInput = { - update: XOR; - create: XOR; - where?: MealWhereInput; - }; - - export type MealUpdateToOneWithWhereWithoutMealItemsInput = { - where?: MealWhereInput; - data: XOR; - }; - - export type MealUpdateWithoutMealItemsInput = { - id?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - mealType?: StringFieldUpdateOperationsInput | string; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - protein?: NullableFloatFieldUpdateOperationsInput | number | null; - carbs?: NullableFloatFieldUpdateOperationsInput | number | null; - fat?: NullableFloatFieldUpdateOperationsInput | number | null; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - user?: UserUpdateOneRequiredWithoutMealsNestedInput; - }; - - export type MealUncheckedUpdateWithoutMealItemsInput = { - id?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - mealType?: StringFieldUpdateOperationsInput | string; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - protein?: NullableFloatFieldUpdateOperationsInput | number | null; - carbs?: NullableFloatFieldUpdateOperationsInput | number | null; - fat?: NullableFloatFieldUpdateOperationsInput | number | null; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type UserUpsertWithoutMealItemsInput = { - update: XOR; - create: XOR; - where?: UserWhereInput; - }; - - export type UserUpdateToOneWithWhereWithoutMealItemsInput = { - where?: UserWhereInput; - data: XOR; - }; - - export type UserUpdateWithoutMealItemsInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - healthProfiles?: HealthProfileUpdateManyWithoutUserNestedInput; - workouts?: WorkoutUpdateManyWithoutUserNestedInput; - meals?: MealUpdateManyWithoutUserNestedInput; - progressLogs?: ProgressLogUpdateManyWithoutUserNestedInput; - weightEntries?: WeightEntryUpdateManyWithoutUserNestedInput; - waterIntake?: WaterIntakeUpdateManyWithoutUserNestedInput; - sleepEntries?: SleepEntryUpdateManyWithoutUserNestedInput; - goals?: GoalUpdateManyWithoutUserNestedInput; - }; - - export type UserUncheckedUpdateWithoutMealItemsInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - healthProfiles?: HealthProfileUncheckedUpdateManyWithoutUserNestedInput; - workouts?: WorkoutUncheckedUpdateManyWithoutUserNestedInput; - meals?: MealUncheckedUpdateManyWithoutUserNestedInput; - progressLogs?: ProgressLogUncheckedUpdateManyWithoutUserNestedInput; - weightEntries?: WeightEntryUncheckedUpdateManyWithoutUserNestedInput; - waterIntake?: WaterIntakeUncheckedUpdateManyWithoutUserNestedInput; - sleepEntries?: SleepEntryUncheckedUpdateManyWithoutUserNestedInput; - goals?: GoalUncheckedUpdateManyWithoutUserNestedInput; - }; - - export type UserCreateWithoutProgressLogsInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - healthProfiles?: HealthProfileCreateNestedManyWithoutUserInput; - workouts?: WorkoutCreateNestedManyWithoutUserInput; - meals?: MealCreateNestedManyWithoutUserInput; - mealItems?: MealItemCreateNestedManyWithoutUserInput; - weightEntries?: WeightEntryCreateNestedManyWithoutUserInput; - waterIntake?: WaterIntakeCreateNestedManyWithoutUserInput; - sleepEntries?: SleepEntryCreateNestedManyWithoutUserInput; - goals?: GoalCreateNestedManyWithoutUserInput; - }; - - export type UserUncheckedCreateWithoutProgressLogsInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - healthProfiles?: HealthProfileUncheckedCreateNestedManyWithoutUserInput; - workouts?: WorkoutUncheckedCreateNestedManyWithoutUserInput; - meals?: MealUncheckedCreateNestedManyWithoutUserInput; - mealItems?: MealItemUncheckedCreateNestedManyWithoutUserInput; - weightEntries?: WeightEntryUncheckedCreateNestedManyWithoutUserInput; - waterIntake?: WaterIntakeUncheckedCreateNestedManyWithoutUserInput; - sleepEntries?: SleepEntryUncheckedCreateNestedManyWithoutUserInput; - goals?: GoalUncheckedCreateNestedManyWithoutUserInput; - }; - - export type UserCreateOrConnectWithoutProgressLogsInput = { - where: UserWhereUniqueInput; - create: XOR; - }; - - export type UserUpsertWithoutProgressLogsInput = { - update: XOR; - create: XOR; - where?: UserWhereInput; - }; - - export type UserUpdateToOneWithWhereWithoutProgressLogsInput = { - where?: UserWhereInput; - data: XOR; - }; - - export type UserUpdateWithoutProgressLogsInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - healthProfiles?: HealthProfileUpdateManyWithoutUserNestedInput; - workouts?: WorkoutUpdateManyWithoutUserNestedInput; - meals?: MealUpdateManyWithoutUserNestedInput; - mealItems?: MealItemUpdateManyWithoutUserNestedInput; - weightEntries?: WeightEntryUpdateManyWithoutUserNestedInput; - waterIntake?: WaterIntakeUpdateManyWithoutUserNestedInput; - sleepEntries?: SleepEntryUpdateManyWithoutUserNestedInput; - goals?: GoalUpdateManyWithoutUserNestedInput; - }; - - export type UserUncheckedUpdateWithoutProgressLogsInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - healthProfiles?: HealthProfileUncheckedUpdateManyWithoutUserNestedInput; - workouts?: WorkoutUncheckedUpdateManyWithoutUserNestedInput; - meals?: MealUncheckedUpdateManyWithoutUserNestedInput; - mealItems?: MealItemUncheckedUpdateManyWithoutUserNestedInput; - weightEntries?: WeightEntryUncheckedUpdateManyWithoutUserNestedInput; - waterIntake?: WaterIntakeUncheckedUpdateManyWithoutUserNestedInput; - sleepEntries?: SleepEntryUncheckedUpdateManyWithoutUserNestedInput; - goals?: GoalUncheckedUpdateManyWithoutUserNestedInput; - }; - - export type UserCreateWithoutWeightEntriesInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - healthProfiles?: HealthProfileCreateNestedManyWithoutUserInput; - workouts?: WorkoutCreateNestedManyWithoutUserInput; - meals?: MealCreateNestedManyWithoutUserInput; - mealItems?: MealItemCreateNestedManyWithoutUserInput; - progressLogs?: ProgressLogCreateNestedManyWithoutUserInput; - waterIntake?: WaterIntakeCreateNestedManyWithoutUserInput; - sleepEntries?: SleepEntryCreateNestedManyWithoutUserInput; - goals?: GoalCreateNestedManyWithoutUserInput; - }; - - export type UserUncheckedCreateWithoutWeightEntriesInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - healthProfiles?: HealthProfileUncheckedCreateNestedManyWithoutUserInput; - workouts?: WorkoutUncheckedCreateNestedManyWithoutUserInput; - meals?: MealUncheckedCreateNestedManyWithoutUserInput; - mealItems?: MealItemUncheckedCreateNestedManyWithoutUserInput; - progressLogs?: ProgressLogUncheckedCreateNestedManyWithoutUserInput; - waterIntake?: WaterIntakeUncheckedCreateNestedManyWithoutUserInput; - sleepEntries?: SleepEntryUncheckedCreateNestedManyWithoutUserInput; - goals?: GoalUncheckedCreateNestedManyWithoutUserInput; - }; - - export type UserCreateOrConnectWithoutWeightEntriesInput = { - where: UserWhereUniqueInput; - create: XOR; - }; - - export type UserUpsertWithoutWeightEntriesInput = { - update: XOR; - create: XOR; - where?: UserWhereInput; - }; - - export type UserUpdateToOneWithWhereWithoutWeightEntriesInput = { - where?: UserWhereInput; - data: XOR; - }; - - export type UserUpdateWithoutWeightEntriesInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - healthProfiles?: HealthProfileUpdateManyWithoutUserNestedInput; - workouts?: WorkoutUpdateManyWithoutUserNestedInput; - meals?: MealUpdateManyWithoutUserNestedInput; - mealItems?: MealItemUpdateManyWithoutUserNestedInput; - progressLogs?: ProgressLogUpdateManyWithoutUserNestedInput; - waterIntake?: WaterIntakeUpdateManyWithoutUserNestedInput; - sleepEntries?: SleepEntryUpdateManyWithoutUserNestedInput; - goals?: GoalUpdateManyWithoutUserNestedInput; - }; - - export type UserUncheckedUpdateWithoutWeightEntriesInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - healthProfiles?: HealthProfileUncheckedUpdateManyWithoutUserNestedInput; - workouts?: WorkoutUncheckedUpdateManyWithoutUserNestedInput; - meals?: MealUncheckedUpdateManyWithoutUserNestedInput; - mealItems?: MealItemUncheckedUpdateManyWithoutUserNestedInput; - progressLogs?: ProgressLogUncheckedUpdateManyWithoutUserNestedInput; - waterIntake?: WaterIntakeUncheckedUpdateManyWithoutUserNestedInput; - sleepEntries?: SleepEntryUncheckedUpdateManyWithoutUserNestedInput; - goals?: GoalUncheckedUpdateManyWithoutUserNestedInput; - }; - - export type UserCreateWithoutWaterIntakeInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - healthProfiles?: HealthProfileCreateNestedManyWithoutUserInput; - workouts?: WorkoutCreateNestedManyWithoutUserInput; - meals?: MealCreateNestedManyWithoutUserInput; - mealItems?: MealItemCreateNestedManyWithoutUserInput; - progressLogs?: ProgressLogCreateNestedManyWithoutUserInput; - weightEntries?: WeightEntryCreateNestedManyWithoutUserInput; - sleepEntries?: SleepEntryCreateNestedManyWithoutUserInput; - goals?: GoalCreateNestedManyWithoutUserInput; - }; - - export type UserUncheckedCreateWithoutWaterIntakeInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - healthProfiles?: HealthProfileUncheckedCreateNestedManyWithoutUserInput; - workouts?: WorkoutUncheckedCreateNestedManyWithoutUserInput; - meals?: MealUncheckedCreateNestedManyWithoutUserInput; - mealItems?: MealItemUncheckedCreateNestedManyWithoutUserInput; - progressLogs?: ProgressLogUncheckedCreateNestedManyWithoutUserInput; - weightEntries?: WeightEntryUncheckedCreateNestedManyWithoutUserInput; - sleepEntries?: SleepEntryUncheckedCreateNestedManyWithoutUserInput; - goals?: GoalUncheckedCreateNestedManyWithoutUserInput; - }; - - export type UserCreateOrConnectWithoutWaterIntakeInput = { - where: UserWhereUniqueInput; - create: XOR; - }; - - export type UserUpsertWithoutWaterIntakeInput = { - update: XOR; - create: XOR; - where?: UserWhereInput; - }; - - export type UserUpdateToOneWithWhereWithoutWaterIntakeInput = { - where?: UserWhereInput; - data: XOR; - }; - - export type UserUpdateWithoutWaterIntakeInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - healthProfiles?: HealthProfileUpdateManyWithoutUserNestedInput; - workouts?: WorkoutUpdateManyWithoutUserNestedInput; - meals?: MealUpdateManyWithoutUserNestedInput; - mealItems?: MealItemUpdateManyWithoutUserNestedInput; - progressLogs?: ProgressLogUpdateManyWithoutUserNestedInput; - weightEntries?: WeightEntryUpdateManyWithoutUserNestedInput; - sleepEntries?: SleepEntryUpdateManyWithoutUserNestedInput; - goals?: GoalUpdateManyWithoutUserNestedInput; - }; - - export type UserUncheckedUpdateWithoutWaterIntakeInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - healthProfiles?: HealthProfileUncheckedUpdateManyWithoutUserNestedInput; - workouts?: WorkoutUncheckedUpdateManyWithoutUserNestedInput; - meals?: MealUncheckedUpdateManyWithoutUserNestedInput; - mealItems?: MealItemUncheckedUpdateManyWithoutUserNestedInput; - progressLogs?: ProgressLogUncheckedUpdateManyWithoutUserNestedInput; - weightEntries?: WeightEntryUncheckedUpdateManyWithoutUserNestedInput; - sleepEntries?: SleepEntryUncheckedUpdateManyWithoutUserNestedInput; - goals?: GoalUncheckedUpdateManyWithoutUserNestedInput; - }; - - export type UserCreateWithoutSleepEntriesInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - healthProfiles?: HealthProfileCreateNestedManyWithoutUserInput; - workouts?: WorkoutCreateNestedManyWithoutUserInput; - meals?: MealCreateNestedManyWithoutUserInput; - mealItems?: MealItemCreateNestedManyWithoutUserInput; - progressLogs?: ProgressLogCreateNestedManyWithoutUserInput; - weightEntries?: WeightEntryCreateNestedManyWithoutUserInput; - waterIntake?: WaterIntakeCreateNestedManyWithoutUserInput; - goals?: GoalCreateNestedManyWithoutUserInput; - }; - - export type UserUncheckedCreateWithoutSleepEntriesInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - healthProfiles?: HealthProfileUncheckedCreateNestedManyWithoutUserInput; - workouts?: WorkoutUncheckedCreateNestedManyWithoutUserInput; - meals?: MealUncheckedCreateNestedManyWithoutUserInput; - mealItems?: MealItemUncheckedCreateNestedManyWithoutUserInput; - progressLogs?: ProgressLogUncheckedCreateNestedManyWithoutUserInput; - weightEntries?: WeightEntryUncheckedCreateNestedManyWithoutUserInput; - waterIntake?: WaterIntakeUncheckedCreateNestedManyWithoutUserInput; - goals?: GoalUncheckedCreateNestedManyWithoutUserInput; - }; - - export type UserCreateOrConnectWithoutSleepEntriesInput = { - where: UserWhereUniqueInput; - create: XOR; - }; - - export type UserUpsertWithoutSleepEntriesInput = { - update: XOR; - create: XOR; - where?: UserWhereInput; - }; - - export type UserUpdateToOneWithWhereWithoutSleepEntriesInput = { - where?: UserWhereInput; - data: XOR; - }; - - export type UserUpdateWithoutSleepEntriesInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - healthProfiles?: HealthProfileUpdateManyWithoutUserNestedInput; - workouts?: WorkoutUpdateManyWithoutUserNestedInput; - meals?: MealUpdateManyWithoutUserNestedInput; - mealItems?: MealItemUpdateManyWithoutUserNestedInput; - progressLogs?: ProgressLogUpdateManyWithoutUserNestedInput; - weightEntries?: WeightEntryUpdateManyWithoutUserNestedInput; - waterIntake?: WaterIntakeUpdateManyWithoutUserNestedInput; - goals?: GoalUpdateManyWithoutUserNestedInput; - }; - - export type UserUncheckedUpdateWithoutSleepEntriesInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - healthProfiles?: HealthProfileUncheckedUpdateManyWithoutUserNestedInput; - workouts?: WorkoutUncheckedUpdateManyWithoutUserNestedInput; - meals?: MealUncheckedUpdateManyWithoutUserNestedInput; - mealItems?: MealItemUncheckedUpdateManyWithoutUserNestedInput; - progressLogs?: ProgressLogUncheckedUpdateManyWithoutUserNestedInput; - weightEntries?: WeightEntryUncheckedUpdateManyWithoutUserNestedInput; - waterIntake?: WaterIntakeUncheckedUpdateManyWithoutUserNestedInput; - goals?: GoalUncheckedUpdateManyWithoutUserNestedInput; - }; - - export type UserCreateWithoutGoalsInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - healthProfiles?: HealthProfileCreateNestedManyWithoutUserInput; - workouts?: WorkoutCreateNestedManyWithoutUserInput; - meals?: MealCreateNestedManyWithoutUserInput; - mealItems?: MealItemCreateNestedManyWithoutUserInput; - progressLogs?: ProgressLogCreateNestedManyWithoutUserInput; - weightEntries?: WeightEntryCreateNestedManyWithoutUserInput; - waterIntake?: WaterIntakeCreateNestedManyWithoutUserInput; - sleepEntries?: SleepEntryCreateNestedManyWithoutUserInput; - }; - - export type UserUncheckedCreateWithoutGoalsInput = { - id?: string; - clerkId: string; - name?: string | null; - email?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - healthProfiles?: HealthProfileUncheckedCreateNestedManyWithoutUserInput; - workouts?: WorkoutUncheckedCreateNestedManyWithoutUserInput; - meals?: MealUncheckedCreateNestedManyWithoutUserInput; - mealItems?: MealItemUncheckedCreateNestedManyWithoutUserInput; - progressLogs?: ProgressLogUncheckedCreateNestedManyWithoutUserInput; - weightEntries?: WeightEntryUncheckedCreateNestedManyWithoutUserInput; - waterIntake?: WaterIntakeUncheckedCreateNestedManyWithoutUserInput; - sleepEntries?: SleepEntryUncheckedCreateNestedManyWithoutUserInput; - }; - - export type UserCreateOrConnectWithoutGoalsInput = { - where: UserWhereUniqueInput; - create: XOR; - }; - - export type UserUpsertWithoutGoalsInput = { - update: XOR; - create: XOR; - where?: UserWhereInput; - }; - - export type UserUpdateToOneWithWhereWithoutGoalsInput = { - where?: UserWhereInput; - data: XOR; - }; - - export type UserUpdateWithoutGoalsInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - healthProfiles?: HealthProfileUpdateManyWithoutUserNestedInput; - workouts?: WorkoutUpdateManyWithoutUserNestedInput; - meals?: MealUpdateManyWithoutUserNestedInput; - mealItems?: MealItemUpdateManyWithoutUserNestedInput; - progressLogs?: ProgressLogUpdateManyWithoutUserNestedInput; - weightEntries?: WeightEntryUpdateManyWithoutUserNestedInput; - waterIntake?: WaterIntakeUpdateManyWithoutUserNestedInput; - sleepEntries?: SleepEntryUpdateManyWithoutUserNestedInput; - }; - - export type UserUncheckedUpdateWithoutGoalsInput = { - id?: StringFieldUpdateOperationsInput | string; - clerkId?: StringFieldUpdateOperationsInput | string; - name?: NullableStringFieldUpdateOperationsInput | string | null; - email?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - healthProfiles?: HealthProfileUncheckedUpdateManyWithoutUserNestedInput; - workouts?: WorkoutUncheckedUpdateManyWithoutUserNestedInput; - meals?: MealUncheckedUpdateManyWithoutUserNestedInput; - mealItems?: MealItemUncheckedUpdateManyWithoutUserNestedInput; - progressLogs?: ProgressLogUncheckedUpdateManyWithoutUserNestedInput; - weightEntries?: WeightEntryUncheckedUpdateManyWithoutUserNestedInput; - waterIntake?: WaterIntakeUncheckedUpdateManyWithoutUserNestedInput; - sleepEntries?: SleepEntryUncheckedUpdateManyWithoutUserNestedInput; - }; - - export type HealthProfileCreateManyUserInput = { - id?: string; - height?: number | null; - weight?: number | null; - age?: number | null; - gender?: string | null; - birthday?: Date | string | null; - targetWeight?: number | null; - targetCalories?: number | null; - targetWaterL?: number | null; - activityLevel?: string | null; - fitnessGoal?: string | null; - heightUnit?: string | null; - weightUnit?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type WorkoutCreateManyUserInput = { - id?: string; - title: string; - category: string; - durationMin?: number | null; - calories?: number | null; - date: Date | string; - notes?: string | null; - isCompleted?: boolean; - totalTime?: number | null; - restTime?: number | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type MealCreateManyUserInput = { - id?: string; - name: string; - mealType: string; - calories?: number | null; - protein?: number | null; - carbs?: number | null; - fat?: number | null; - date: Date | string; - notes?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type MealItemCreateManyUserInput = { - id?: string; - mealId: string; - name: string; - calories?: number | null; - protein?: number | null; - carbs?: number | null; - fat?: number | null; - quantity?: number | null; - unit?: string | null; - isHighInProtein?: boolean; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type ProgressLogCreateManyUserInput = { - id?: string; - date: Date | string; - waterL?: number | null; - sleepHrs?: number | null; - mood?: string | null; - weightKg?: number | null; - steps?: number | null; - activeMinutes?: number | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type WeightEntryCreateManyUserInput = { - id?: string; - weightKg: number; - date: Date | string; - photo?: string | null; - notes?: string | null; - bodyFatPercentage?: number | null; - muscleMassKg?: number | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type WaterIntakeCreateManyUserInput = { - id?: string; - amountMl: number; - date: Date | string; - time: Date | string; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type SleepEntryCreateManyUserInput = { - id?: string; - hours: number; - quality: string; - date: Date | string; - bedtime?: Date | string | null; - wakeTime?: Date | string | null; - notes?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type GoalCreateManyUserInput = { - id?: string; - type: string; - target: number; - current?: number; - unit: string; - startDate: Date | string; - endDate?: Date | string | null; - isActive?: boolean; - notes?: string | null; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type HealthProfileUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - height?: NullableFloatFieldUpdateOperationsInput | number | null; - weight?: NullableFloatFieldUpdateOperationsInput | number | null; - age?: NullableIntFieldUpdateOperationsInput | number | null; - gender?: NullableStringFieldUpdateOperationsInput | string | null; - birthday?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - targetWeight?: NullableFloatFieldUpdateOperationsInput | number | null; - targetCalories?: NullableIntFieldUpdateOperationsInput | number | null; - targetWaterL?: NullableFloatFieldUpdateOperationsInput | number | null; - activityLevel?: NullableStringFieldUpdateOperationsInput | string | null; - fitnessGoal?: NullableStringFieldUpdateOperationsInput | string | null; - heightUnit?: NullableStringFieldUpdateOperationsInput | string | null; - weightUnit?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type HealthProfileUncheckedUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - height?: NullableFloatFieldUpdateOperationsInput | number | null; - weight?: NullableFloatFieldUpdateOperationsInput | number | null; - age?: NullableIntFieldUpdateOperationsInput | number | null; - gender?: NullableStringFieldUpdateOperationsInput | string | null; - birthday?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - targetWeight?: NullableFloatFieldUpdateOperationsInput | number | null; - targetCalories?: NullableIntFieldUpdateOperationsInput | number | null; - targetWaterL?: NullableFloatFieldUpdateOperationsInput | number | null; - activityLevel?: NullableStringFieldUpdateOperationsInput | string | null; - fitnessGoal?: NullableStringFieldUpdateOperationsInput | string | null; - heightUnit?: NullableStringFieldUpdateOperationsInput | string | null; - weightUnit?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type HealthProfileUncheckedUpdateManyWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - height?: NullableFloatFieldUpdateOperationsInput | number | null; - weight?: NullableFloatFieldUpdateOperationsInput | number | null; - age?: NullableIntFieldUpdateOperationsInput | number | null; - gender?: NullableStringFieldUpdateOperationsInput | string | null; - birthday?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - targetWeight?: NullableFloatFieldUpdateOperationsInput | number | null; - targetCalories?: NullableIntFieldUpdateOperationsInput | number | null; - targetWaterL?: NullableFloatFieldUpdateOperationsInput | number | null; - activityLevel?: NullableStringFieldUpdateOperationsInput | string | null; - fitnessGoal?: NullableStringFieldUpdateOperationsInput | string | null; - heightUnit?: NullableStringFieldUpdateOperationsInput | string | null; - weightUnit?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type WorkoutUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - title?: StringFieldUpdateOperationsInput | string; - category?: StringFieldUpdateOperationsInput | string; - durationMin?: NullableIntFieldUpdateOperationsInput | number | null; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - isCompleted?: BoolFieldUpdateOperationsInput | boolean; - totalTime?: NullableIntFieldUpdateOperationsInput | number | null; - restTime?: NullableIntFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - exercises?: ExerciseUpdateManyWithoutWorkoutNestedInput; - }; - - export type WorkoutUncheckedUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - title?: StringFieldUpdateOperationsInput | string; - category?: StringFieldUpdateOperationsInput | string; - durationMin?: NullableIntFieldUpdateOperationsInput | number | null; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - isCompleted?: BoolFieldUpdateOperationsInput | boolean; - totalTime?: NullableIntFieldUpdateOperationsInput | number | null; - restTime?: NullableIntFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - exercises?: ExerciseUncheckedUpdateManyWithoutWorkoutNestedInput; - }; - - export type WorkoutUncheckedUpdateManyWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - title?: StringFieldUpdateOperationsInput | string; - category?: StringFieldUpdateOperationsInput | string; - durationMin?: NullableIntFieldUpdateOperationsInput | number | null; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - isCompleted?: BoolFieldUpdateOperationsInput | boolean; - totalTime?: NullableIntFieldUpdateOperationsInput | number | null; - restTime?: NullableIntFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type MealUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - mealType?: StringFieldUpdateOperationsInput | string; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - protein?: NullableFloatFieldUpdateOperationsInput | number | null; - carbs?: NullableFloatFieldUpdateOperationsInput | number | null; - fat?: NullableFloatFieldUpdateOperationsInput | number | null; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - mealItems?: MealItemUpdateManyWithoutMealNestedInput; - }; - - export type MealUncheckedUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - mealType?: StringFieldUpdateOperationsInput | string; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - protein?: NullableFloatFieldUpdateOperationsInput | number | null; - carbs?: NullableFloatFieldUpdateOperationsInput | number | null; - fat?: NullableFloatFieldUpdateOperationsInput | number | null; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - mealItems?: MealItemUncheckedUpdateManyWithoutMealNestedInput; - }; - - export type MealUncheckedUpdateManyWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - mealType?: StringFieldUpdateOperationsInput | string; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - protein?: NullableFloatFieldUpdateOperationsInput | number | null; - carbs?: NullableFloatFieldUpdateOperationsInput | number | null; - fat?: NullableFloatFieldUpdateOperationsInput | number | null; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type MealItemUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - protein?: NullableFloatFieldUpdateOperationsInput | number | null; - carbs?: NullableFloatFieldUpdateOperationsInput | number | null; - fat?: NullableFloatFieldUpdateOperationsInput | number | null; - quantity?: NullableFloatFieldUpdateOperationsInput | number | null; - unit?: NullableStringFieldUpdateOperationsInput | string | null; - isHighInProtein?: BoolFieldUpdateOperationsInput | boolean; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - meal?: MealUpdateOneRequiredWithoutMealItemsNestedInput; - }; - - export type MealItemUncheckedUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - mealId?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - protein?: NullableFloatFieldUpdateOperationsInput | number | null; - carbs?: NullableFloatFieldUpdateOperationsInput | number | null; - fat?: NullableFloatFieldUpdateOperationsInput | number | null; - quantity?: NullableFloatFieldUpdateOperationsInput | number | null; - unit?: NullableStringFieldUpdateOperationsInput | string | null; - isHighInProtein?: BoolFieldUpdateOperationsInput | boolean; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type MealItemUncheckedUpdateManyWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - mealId?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - protein?: NullableFloatFieldUpdateOperationsInput | number | null; - carbs?: NullableFloatFieldUpdateOperationsInput | number | null; - fat?: NullableFloatFieldUpdateOperationsInput | number | null; - quantity?: NullableFloatFieldUpdateOperationsInput | number | null; - unit?: NullableStringFieldUpdateOperationsInput | string | null; - isHighInProtein?: BoolFieldUpdateOperationsInput | boolean; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type ProgressLogUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - waterL?: NullableFloatFieldUpdateOperationsInput | number | null; - sleepHrs?: NullableFloatFieldUpdateOperationsInput | number | null; - mood?: NullableStringFieldUpdateOperationsInput | string | null; - weightKg?: NullableFloatFieldUpdateOperationsInput | number | null; - steps?: NullableIntFieldUpdateOperationsInput | number | null; - activeMinutes?: NullableIntFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type ProgressLogUncheckedUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - waterL?: NullableFloatFieldUpdateOperationsInput | number | null; - sleepHrs?: NullableFloatFieldUpdateOperationsInput | number | null; - mood?: NullableStringFieldUpdateOperationsInput | string | null; - weightKg?: NullableFloatFieldUpdateOperationsInput | number | null; - steps?: NullableIntFieldUpdateOperationsInput | number | null; - activeMinutes?: NullableIntFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type ProgressLogUncheckedUpdateManyWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - waterL?: NullableFloatFieldUpdateOperationsInput | number | null; - sleepHrs?: NullableFloatFieldUpdateOperationsInput | number | null; - mood?: NullableStringFieldUpdateOperationsInput | string | null; - weightKg?: NullableFloatFieldUpdateOperationsInput | number | null; - steps?: NullableIntFieldUpdateOperationsInput | number | null; - activeMinutes?: NullableIntFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type WeightEntryUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - weightKg?: FloatFieldUpdateOperationsInput | number; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - photo?: NullableStringFieldUpdateOperationsInput | string | null; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - bodyFatPercentage?: NullableFloatFieldUpdateOperationsInput | number | null; - muscleMassKg?: NullableFloatFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type WeightEntryUncheckedUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - weightKg?: FloatFieldUpdateOperationsInput | number; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - photo?: NullableStringFieldUpdateOperationsInput | string | null; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - bodyFatPercentage?: NullableFloatFieldUpdateOperationsInput | number | null; - muscleMassKg?: NullableFloatFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type WeightEntryUncheckedUpdateManyWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - weightKg?: FloatFieldUpdateOperationsInput | number; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - photo?: NullableStringFieldUpdateOperationsInput | string | null; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - bodyFatPercentage?: NullableFloatFieldUpdateOperationsInput | number | null; - muscleMassKg?: NullableFloatFieldUpdateOperationsInput | number | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type WaterIntakeUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - amountMl?: IntFieldUpdateOperationsInput | number; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - time?: DateTimeFieldUpdateOperationsInput | Date | string; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type WaterIntakeUncheckedUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - amountMl?: IntFieldUpdateOperationsInput | number; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - time?: DateTimeFieldUpdateOperationsInput | Date | string; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type WaterIntakeUncheckedUpdateManyWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - amountMl?: IntFieldUpdateOperationsInput | number; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - time?: DateTimeFieldUpdateOperationsInput | Date | string; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type SleepEntryUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - hours?: FloatFieldUpdateOperationsInput | number; - quality?: StringFieldUpdateOperationsInput | string; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - bedtime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - wakeTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type SleepEntryUncheckedUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - hours?: FloatFieldUpdateOperationsInput | number; - quality?: StringFieldUpdateOperationsInput | string; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - bedtime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - wakeTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type SleepEntryUncheckedUpdateManyWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - hours?: FloatFieldUpdateOperationsInput | number; - quality?: StringFieldUpdateOperationsInput | string; - date?: DateTimeFieldUpdateOperationsInput | Date | string; - bedtime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - wakeTime?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type GoalUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - type?: StringFieldUpdateOperationsInput | string; - target?: FloatFieldUpdateOperationsInput | number; - current?: FloatFieldUpdateOperationsInput | number; - unit?: StringFieldUpdateOperationsInput | string; - startDate?: DateTimeFieldUpdateOperationsInput | Date | string; - endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isActive?: BoolFieldUpdateOperationsInput | boolean; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type GoalUncheckedUpdateWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - type?: StringFieldUpdateOperationsInput | string; - target?: FloatFieldUpdateOperationsInput | number; - current?: FloatFieldUpdateOperationsInput | number; - unit?: StringFieldUpdateOperationsInput | string; - startDate?: DateTimeFieldUpdateOperationsInput | Date | string; - endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isActive?: BoolFieldUpdateOperationsInput | boolean; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type GoalUncheckedUpdateManyWithoutUserInput = { - id?: StringFieldUpdateOperationsInput | string; - type?: StringFieldUpdateOperationsInput | string; - target?: FloatFieldUpdateOperationsInput | number; - current?: FloatFieldUpdateOperationsInput | number; - unit?: StringFieldUpdateOperationsInput | string; - startDate?: DateTimeFieldUpdateOperationsInput | Date | string; - endDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isActive?: BoolFieldUpdateOperationsInput | boolean; - notes?: NullableStringFieldUpdateOperationsInput | string | null; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type ExerciseCreateManyWorkoutInput = { - id?: string; - name: string; - sets?: number | null; - reps?: number | null; - weightKg?: number | null; - duration?: number | null; - distance?: number | null; - restTime?: number | null; - order?: number; - isCompleted?: boolean; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type ExerciseUpdateWithoutWorkoutInput = { - id?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - sets?: NullableIntFieldUpdateOperationsInput | number | null; - reps?: NullableIntFieldUpdateOperationsInput | number | null; - weightKg?: NullableFloatFieldUpdateOperationsInput | number | null; - duration?: NullableIntFieldUpdateOperationsInput | number | null; - distance?: NullableFloatFieldUpdateOperationsInput | number | null; - restTime?: NullableIntFieldUpdateOperationsInput | number | null; - order?: IntFieldUpdateOperationsInput | number; - isCompleted?: BoolFieldUpdateOperationsInput | boolean; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type ExerciseUncheckedUpdateWithoutWorkoutInput = { - id?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - sets?: NullableIntFieldUpdateOperationsInput | number | null; - reps?: NullableIntFieldUpdateOperationsInput | number | null; - weightKg?: NullableFloatFieldUpdateOperationsInput | number | null; - duration?: NullableIntFieldUpdateOperationsInput | number | null; - distance?: NullableFloatFieldUpdateOperationsInput | number | null; - restTime?: NullableIntFieldUpdateOperationsInput | number | null; - order?: IntFieldUpdateOperationsInput | number; - isCompleted?: BoolFieldUpdateOperationsInput | boolean; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type ExerciseUncheckedUpdateManyWithoutWorkoutInput = { - id?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - sets?: NullableIntFieldUpdateOperationsInput | number | null; - reps?: NullableIntFieldUpdateOperationsInput | number | null; - weightKg?: NullableFloatFieldUpdateOperationsInput | number | null; - duration?: NullableIntFieldUpdateOperationsInput | number | null; - distance?: NullableFloatFieldUpdateOperationsInput | number | null; - restTime?: NullableIntFieldUpdateOperationsInput | number | null; - order?: IntFieldUpdateOperationsInput | number; - isCompleted?: BoolFieldUpdateOperationsInput | boolean; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type MealItemCreateManyMealInput = { - id?: string; - userId: string; - name: string; - calories?: number | null; - protein?: number | null; - carbs?: number | null; - fat?: number | null; - quantity?: number | null; - unit?: string | null; - isHighInProtein?: boolean; - createdAt?: Date | string; - updatedAt?: Date | string; - syncedAt?: Date | string | null; - isDeleted?: boolean; - }; - - export type MealItemUpdateWithoutMealInput = { - id?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - protein?: NullableFloatFieldUpdateOperationsInput | number | null; - carbs?: NullableFloatFieldUpdateOperationsInput | number | null; - fat?: NullableFloatFieldUpdateOperationsInput | number | null; - quantity?: NullableFloatFieldUpdateOperationsInput | number | null; - unit?: NullableStringFieldUpdateOperationsInput | string | null; - isHighInProtein?: BoolFieldUpdateOperationsInput | boolean; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - user?: UserUpdateOneRequiredWithoutMealItemsNestedInput; - }; - - export type MealItemUncheckedUpdateWithoutMealInput = { - id?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - protein?: NullableFloatFieldUpdateOperationsInput | number | null; - carbs?: NullableFloatFieldUpdateOperationsInput | number | null; - fat?: NullableFloatFieldUpdateOperationsInput | number | null; - quantity?: NullableFloatFieldUpdateOperationsInput | number | null; - unit?: NullableStringFieldUpdateOperationsInput | string | null; - isHighInProtein?: BoolFieldUpdateOperationsInput | boolean; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - export type MealItemUncheckedUpdateManyWithoutMealInput = { - id?: StringFieldUpdateOperationsInput | string; - userId?: StringFieldUpdateOperationsInput | string; - name?: StringFieldUpdateOperationsInput | string; - calories?: NullableIntFieldUpdateOperationsInput | number | null; - protein?: NullableFloatFieldUpdateOperationsInput | number | null; - carbs?: NullableFloatFieldUpdateOperationsInput | number | null; - fat?: NullableFloatFieldUpdateOperationsInput | number | null; - quantity?: NullableFloatFieldUpdateOperationsInput | number | null; - unit?: NullableStringFieldUpdateOperationsInput | string | null; - isHighInProtein?: BoolFieldUpdateOperationsInput | boolean; - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string; - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string; - syncedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null; - isDeleted?: BoolFieldUpdateOperationsInput | boolean; - }; - - /** - * Batch Payload for updateMany & deleteMany & createMany - */ - - export type BatchPayload = { - count: number; - }; - - /** - * DMMF - */ - export const dmmf: runtime.BaseDMMF; -} diff --git a/prisma/generated/client/index.js b/prisma/generated/client/index.js deleted file mode 100644 index 45805e9..0000000 --- a/prisma/generated/client/index.js +++ /dev/null @@ -1,386 +0,0 @@ -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ - -Object.defineProperty(exports, '__esModule', { value: true }); - -const { - PrismaClientKnownRequestError, - PrismaClientUnknownRequestError, - PrismaClientRustPanicError, - PrismaClientInitializationError, - PrismaClientValidationError, - getPrismaClient, - sqltag, - empty, - join, - raw, - skip, - Decimal, - Debug, - objectEnumValues, - makeStrictEnum, - Extensions, - warnOnce, - defineDmmfProperty, - Public, - getRuntime, - createParam, -} = require('./runtime/library.js'); - -const Prisma = {}; - -exports.Prisma = Prisma; -exports.$Enums = {}; - -/** - * Prisma Client JS version: 6.14.0 - * Query Engine version: 717184b7b35ea05dfa71a3236b7af656013e1e49 - */ -Prisma.prismaVersion = { - client: '6.14.0', - engine: '717184b7b35ea05dfa71a3236b7af656013e1e49', -}; - -Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; -Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError; -Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError; -Prisma.PrismaClientInitializationError = PrismaClientInitializationError; -Prisma.PrismaClientValidationError = PrismaClientValidationError; -Prisma.Decimal = Decimal; - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = sqltag; -Prisma.empty = empty; -Prisma.join = join; -Prisma.raw = raw; -Prisma.validator = Public.validator; - -/** - * Extensions - */ -Prisma.getExtensionContext = Extensions.getExtensionContext; -Prisma.defineExtension = Extensions.defineExtension; - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull; -Prisma.JsonNull = objectEnumValues.instances.JsonNull; -Prisma.AnyNull = objectEnumValues.instances.AnyNull; - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull, -}; - -const path = require('path'); - -/** - * Enums - */ -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable', -}); - -exports.Prisma.UserScalarFieldEnum = { - id: 'id', - clerkId: 'clerkId', - name: 'name', - email: 'email', - createdAt: 'createdAt', - updatedAt: 'updatedAt', -}; - -exports.Prisma.HealthProfileScalarFieldEnum = { - id: 'id', - userId: 'userId', - height: 'height', - weight: 'weight', - age: 'age', - gender: 'gender', - birthday: 'birthday', - targetWeight: 'targetWeight', - targetCalories: 'targetCalories', - targetWaterL: 'targetWaterL', - activityLevel: 'activityLevel', - fitnessGoal: 'fitnessGoal', - heightUnit: 'heightUnit', - weightUnit: 'weightUnit', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.WorkoutScalarFieldEnum = { - id: 'id', - userId: 'userId', - title: 'title', - category: 'category', - durationMin: 'durationMin', - calories: 'calories', - date: 'date', - notes: 'notes', - isCompleted: 'isCompleted', - totalTime: 'totalTime', - restTime: 'restTime', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.ExerciseScalarFieldEnum = { - id: 'id', - workoutId: 'workoutId', - name: 'name', - sets: 'sets', - reps: 'reps', - weightKg: 'weightKg', - duration: 'duration', - distance: 'distance', - restTime: 'restTime', - order: 'order', - isCompleted: 'isCompleted', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.MealScalarFieldEnum = { - id: 'id', - userId: 'userId', - name: 'name', - mealType: 'mealType', - calories: 'calories', - protein: 'protein', - carbs: 'carbs', - fat: 'fat', - date: 'date', - notes: 'notes', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.MealItemScalarFieldEnum = { - id: 'id', - mealId: 'mealId', - userId: 'userId', - name: 'name', - calories: 'calories', - protein: 'protein', - carbs: 'carbs', - fat: 'fat', - quantity: 'quantity', - unit: 'unit', - isHighInProtein: 'isHighInProtein', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.ProgressLogScalarFieldEnum = { - id: 'id', - userId: 'userId', - date: 'date', - waterL: 'waterL', - sleepHrs: 'sleepHrs', - mood: 'mood', - weightKg: 'weightKg', - steps: 'steps', - activeMinutes: 'activeMinutes', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.WeightEntryScalarFieldEnum = { - id: 'id', - userId: 'userId', - weightKg: 'weightKg', - date: 'date', - photo: 'photo', - notes: 'notes', - bodyFatPercentage: 'bodyFatPercentage', - muscleMassKg: 'muscleMassKg', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.WaterIntakeScalarFieldEnum = { - id: 'id', - userId: 'userId', - amountMl: 'amountMl', - date: 'date', - time: 'time', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.SleepEntryScalarFieldEnum = { - id: 'id', - userId: 'userId', - hours: 'hours', - quality: 'quality', - date: 'date', - bedtime: 'bedtime', - wakeTime: 'wakeTime', - notes: 'notes', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.GoalScalarFieldEnum = { - id: 'id', - userId: 'userId', - type: 'type', - target: 'target', - current: 'current', - unit: 'unit', - startDate: 'startDate', - endDate: 'endDate', - isActive: 'isActive', - notes: 'notes', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc', -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive', -}; - -exports.Prisma.NullsOrder = { - first: 'first', - last: 'last', -}; - -exports.Prisma.ModelName = { - User: 'User', - HealthProfile: 'HealthProfile', - Workout: 'Workout', - Exercise: 'Exercise', - Meal: 'Meal', - MealItem: 'MealItem', - ProgressLog: 'ProgressLog', - WeightEntry: 'WeightEntry', - WaterIntake: 'WaterIntake', - SleepEntry: 'SleepEntry', - Goal: 'Goal', -}; -/** - * Create the Client - */ -const config = { - generator: { - name: 'client', - provider: { - fromEnvVar: null, - value: 'prisma-client-js', - }, - output: { - value: '/Users/jonathangan/Desktop/PrepAI/prisma/generated/client', - fromEnvVar: null, - }, - config: { - engineType: 'library', - }, - binaryTargets: [ - { - fromEnvVar: null, - value: 'darwin-arm64', - native: true, - }, - ], - previewFeatures: [], - sourceFilePath: '/Users/jonathangan/Desktop/PrepAI/prisma/schema.prisma', - isCustomOutput: true, - }, - relativeEnvPaths: { - rootEnvPath: null, - schemaEnvPath: '../../../.env', - }, - relativePath: '../..', - clientVersion: '6.14.0', - engineVersion: '717184b7b35ea05dfa71a3236b7af656013e1e49', - datasourceNames: ['db'], - activeProvider: 'postgresql', - postinstall: false, - inlineDatasources: { - db: { - url: { - fromEnvVar: 'DATABASE_URL', - value: null, - }, - }, - }, - inlineSchema: - "datasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"./generated/client\"\n}\n\n/// Users come from Clerk, but we mirror them locally\nmodel User {\n id String @id @default(cuid()) // local UUID\n clerkId String @unique // Clerk auth userId\n name String?\n email String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n healthProfiles HealthProfile[]\n workouts Workout[]\n meals Meal[]\n mealItems MealItem[]\n progressLogs ProgressLog[]\n weightEntries WeightEntry[]\n waterIntake WaterIntake[]\n sleepEntries SleepEntry[]\n goals Goal[]\n}\n\n/// Health profile holds user settings and preferences\nmodel HealthProfile {\n id String @id @default(cuid())\n userId String\n user User @relation(fields: [userId], references: [id])\n height Float? // Height value (always stored in cm)\n weight Float? // Weight value (always stored in kg)\n age Int?\n gender String? // 'Male' | 'Female'\n birthday DateTime?\n targetWeight Float? // Target weight (always stored in kg)\n targetCalories Int? @default(2000)\n targetWaterL Float? @default(2.0)\n activityLevel String? // 'sedentary' | 'light' | 'moderate' | 'active' | 'very_active'\n fitnessGoal String? // 'lose_weight' | 'gain_weight' | 'maintain' | 'build_muscle' | 'improve_fitness'\n heightUnit String? @default(\"cm\") // 'cm' | 'in'\n weightUnit String? @default(\"kg\") // 'kg' | 'lb'\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n syncedAt DateTime?\n isDeleted Boolean @default(false)\n}\n\n/// Workouts with categories and types\nmodel Workout {\n id String @id @default(cuid())\n userId String\n user User @relation(fields: [userId], references: [id])\n title String\n category String // 'strength' | 'cardio' | 'yoga' | 'pilates' | 'functional' | 'flexibility'\n durationMin Int?\n calories Int?\n date DateTime\n notes String?\n isCompleted Boolean @default(false)\n totalTime Int? // Total time in seconds\n restTime Int? // Total rest time in seconds\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n syncedAt DateTime?\n isDeleted Boolean @default(false)\n\n exercises Exercise[]\n}\n\n/// Exercises per workout with detailed tracking\nmodel Exercise {\n id String @id @default(cuid())\n workoutId String\n workout Workout @relation(fields: [workoutId], references: [id])\n name String\n sets Int?\n reps Int?\n weightKg Float?\n duration Int? // Duration in seconds\n distance Float? // Distance in meters\n restTime Int? // Rest time in seconds\n order Int @default(0) // Exercise order in workout\n isCompleted Boolean @default(false)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n syncedAt DateTime?\n isDeleted Boolean @default(false)\n}\n\n/// Meals with meal types\nmodel Meal {\n id String @id @default(cuid())\n userId String\n user User @relation(fields: [userId], references: [id])\n name String\n mealType String // 'breakfast' | 'lunch' | 'dinner' | 'snack'\n calories Int?\n protein Float?\n carbs Float?\n fat Float?\n date DateTime\n notes String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n syncedAt DateTime?\n isDeleted Boolean @default(false)\n\n mealItems MealItem[]\n}\n\n/// Individual food items within meals\nmodel MealItem {\n id String @id @default(cuid())\n mealId String\n meal Meal @relation(fields: [mealId], references: [id])\n userId String\n user User @relation(fields: [userId], references: [id])\n name String\n calories Int?\n protein Float?\n carbs Float?\n fat Float?\n quantity Float? // Quantity in grams or units\n unit String? // Unit of measurement\n isHighInProtein Boolean @default(false)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n syncedAt DateTime?\n isDeleted Boolean @default(false)\n}\n\n/// Daily progress logs (hydration, sleep, mood, weight tracking)\nmodel ProgressLog {\n id String @id @default(cuid())\n userId String\n user User @relation(fields: [userId], references: [id])\n date DateTime\n waterL Float?\n sleepHrs Float?\n mood String? // 'poor' | 'fair' | 'good' | 'excellent'\n weightKg Float?\n steps Int?\n activeMinutes Int?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n syncedAt DateTime?\n isDeleted Boolean @default(false)\n}\n\n/// Individual weight entries with photos and notes\nmodel WeightEntry {\n id String @id @default(cuid())\n userId String\n user User @relation(fields: [userId], references: [id])\n weightKg Float\n date DateTime\n photo String? // URL or path to photo\n notes String?\n bodyFatPercentage Float?\n muscleMassKg Float?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n syncedAt DateTime?\n isDeleted Boolean @default(false)\n}\n\n/// Individual water intake entries\nmodel WaterIntake {\n id String @id @default(cuid())\n userId String\n user User @relation(fields: [userId], references: [id])\n amountMl Int // Amount in milliliters\n date DateTime\n time DateTime // Specific time of intake\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n syncedAt DateTime?\n isDeleted Boolean @default(false)\n}\n\n/// Individual sleep entries with quality tracking\nmodel SleepEntry {\n id String @id @default(cuid())\n userId String\n user User @relation(fields: [userId], references: [id])\n hours Float\n quality String // 'poor' | 'fair' | 'good' | 'excellent'\n date DateTime\n bedtime DateTime?\n wakeTime DateTime?\n notes String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n syncedAt DateTime?\n isDeleted Boolean @default(false)\n}\n\n/// User goals and targets\nmodel Goal {\n id String @id @default(cuid())\n userId String\n user User @relation(fields: [userId], references: [id])\n type String // 'weight' | 'calories' | 'workouts' | 'water' | 'sleep' | 'steps' | 'strength'\n target Float\n current Float @default(0)\n unit String // 'kg' | 'calories' | 'workouts' | 'liters' | 'hours' | 'steps' | 'kg'\n startDate DateTime\n endDate DateTime?\n isActive Boolean @default(true)\n notes String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n syncedAt DateTime?\n isDeleted Boolean @default(false)\n}\n", - inlineSchemaHash: '4ab5ee8c5f1369502128a2e648fbb15d549705ac00ae844af4a66bbf2166bc44', - copyEngine: true, -}; - -const fs = require('fs'); - -config.dirname = __dirname; -if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { - const alternativePaths = ['prisma/generated/client', 'generated/client']; - - const alternativePath = - alternativePaths.find((altPath) => { - return fs.existsSync(path.join(process.cwd(), altPath, 'schema.prisma')); - }) ?? alternativePaths[0]; - - config.dirname = path.join(process.cwd(), alternativePath); - config.isBundled = true; -} - -config.runtimeDataModel = JSON.parse( - '{"models":{"User":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"clerkId","kind":"scalar","isList":false,"isRequired":true,"isUnique":true,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"email","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"healthProfiles","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"HealthProfile","nativeType":null,"relationName":"HealthProfileToUser","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"workouts","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Workout","nativeType":null,"relationName":"UserToWorkout","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"meals","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Meal","nativeType":null,"relationName":"MealToUser","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"mealItems","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"MealItem","nativeType":null,"relationName":"MealItemToUser","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"progressLogs","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"ProgressLog","nativeType":null,"relationName":"ProgressLogToUser","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"weightEntries","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"WeightEntry","nativeType":null,"relationName":"UserToWeightEntry","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"waterIntake","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"WaterIntake","nativeType":null,"relationName":"UserToWaterIntake","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"sleepEntries","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"SleepEntry","nativeType":null,"relationName":"SleepEntryToUser","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false},{"name":"goals","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Goal","nativeType":null,"relationName":"GoalToUser","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"Users come from Clerk, but we mirror them locally"},"HealthProfile":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"userId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"user","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"User","nativeType":null,"relationName":"HealthProfileToUser","relationFromFields":["userId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"height","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"weight","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"age","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"gender","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"birthday","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"targetWeight","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"targetCalories","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Int","nativeType":null,"default":2000,"isGenerated":false,"isUpdatedAt":false},{"name":"targetWaterL","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Float","nativeType":null,"default":2,"isGenerated":false,"isUpdatedAt":false},{"name":"activityLevel","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"fitnessGoal","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"heightUnit","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":"cm","isGenerated":false,"isUpdatedAt":false},{"name":"weightUnit","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":"kg","isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"syncedAt","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isDeleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"Health profile holds user settings and preferences"},"Workout":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"userId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"user","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"User","nativeType":null,"relationName":"UserToWorkout","relationFromFields":["userId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"title","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"category","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"durationMin","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"calories","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"date","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"notes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isCompleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false},{"name":"totalTime","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"restTime","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"syncedAt","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isDeleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false},{"name":"exercises","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Exercise","nativeType":null,"relationName":"ExerciseToWorkout","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"Workouts with categories and types"},"Exercise":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"workoutId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"workout","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Workout","nativeType":null,"relationName":"ExerciseToWorkout","relationFromFields":["workoutId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"sets","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"reps","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"weightKg","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"duration","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"distance","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"restTime","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"order","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Int","nativeType":null,"default":0,"isGenerated":false,"isUpdatedAt":false},{"name":"isCompleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"syncedAt","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isDeleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"Exercises per workout with detailed tracking"},"Meal":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"userId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"user","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"User","nativeType":null,"relationName":"MealToUser","relationFromFields":["userId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"mealType","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"calories","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"protein","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"carbs","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"fat","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"date","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"notes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"syncedAt","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isDeleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false},{"name":"mealItems","kind":"object","isList":true,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"MealItem","nativeType":null,"relationName":"MealToMealItem","relationFromFields":[],"relationToFields":[],"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"Meals with meal types"},"MealItem":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"mealId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"meal","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Meal","nativeType":null,"relationName":"MealToMealItem","relationFromFields":["mealId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"userId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"user","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"User","nativeType":null,"relationName":"MealItemToUser","relationFromFields":["userId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"name","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"calories","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"protein","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"carbs","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"fat","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"quantity","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"unit","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isHighInProtein","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"syncedAt","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isDeleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"Individual food items within meals"},"ProgressLog":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"userId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"user","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"User","nativeType":null,"relationName":"ProgressLogToUser","relationFromFields":["userId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"date","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"waterL","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"sleepHrs","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"mood","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"weightKg","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"steps","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"activeMinutes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"syncedAt","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isDeleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"Daily progress logs (hydration, sleep, mood, weight tracking)"},"WeightEntry":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"userId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"user","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"User","nativeType":null,"relationName":"UserToWeightEntry","relationFromFields":["userId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"weightKg","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"date","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"photo","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"notes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"bodyFatPercentage","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"muscleMassKg","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"syncedAt","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isDeleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"Individual weight entries with photos and notes"},"WaterIntake":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"userId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"user","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"User","nativeType":null,"relationName":"UserToWaterIntake","relationFromFields":["userId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"amountMl","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Int","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"date","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"time","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"syncedAt","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isDeleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"Individual water intake entries"},"SleepEntry":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"userId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"user","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"User","nativeType":null,"relationName":"SleepEntryToUser","relationFromFields":["userId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"hours","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"quality","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"date","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"bedtime","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"wakeTime","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"notes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"syncedAt","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isDeleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"Individual sleep entries with quality tracking"},"Goal":{"dbName":null,"schema":null,"fields":[{"name":"id","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":true,"isReadOnly":false,"hasDefaultValue":true,"type":"String","nativeType":null,"default":{"name":"cuid","args":[1]},"isGenerated":false,"isUpdatedAt":false},{"name":"userId","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":true,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"user","kind":"object","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"User","nativeType":null,"relationName":"GoalToUser","relationFromFields":["userId"],"relationToFields":["id"],"isGenerated":false,"isUpdatedAt":false},{"name":"type","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"target","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"Float","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"current","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Float","nativeType":null,"default":0,"isGenerated":false,"isUpdatedAt":false},{"name":"unit","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"startDate","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"endDate","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isActive","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":true,"isGenerated":false,"isUpdatedAt":false},{"name":"notes","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"String","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"createdAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"DateTime","nativeType":null,"default":{"name":"now","args":[]},"isGenerated":false,"isUpdatedAt":false},{"name":"updatedAt","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":true},{"name":"syncedAt","kind":"scalar","isList":false,"isRequired":false,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":false,"type":"DateTime","nativeType":null,"isGenerated":false,"isUpdatedAt":false},{"name":"isDeleted","kind":"scalar","isList":false,"isRequired":true,"isUnique":false,"isId":false,"isReadOnly":false,"hasDefaultValue":true,"type":"Boolean","nativeType":null,"default":false,"isGenerated":false,"isUpdatedAt":false}],"primaryKey":null,"uniqueFields":[],"uniqueIndexes":[],"isGenerated":false,"documentation":"User goals and targets"}},"enums":{},"types":{}}' -); -defineDmmfProperty(exports.Prisma, config.runtimeDataModel); -config.engineWasm = undefined; -config.compilerWasm = undefined; - -const { warnEnvConflicts } = require('./runtime/library.js'); - -warnEnvConflicts({ - rootEnvPath: config.relativeEnvPaths.rootEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.rootEnvPath), - schemaEnvPath: - config.relativeEnvPaths.schemaEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.schemaEnvPath), -}); - -const PrismaClient = getPrismaClient(config); -exports.PrismaClient = PrismaClient; -Object.assign(exports, Prisma); - -// file annotations for bundling tools to include these files -path.join(__dirname, 'libquery_engine-darwin-arm64.dylib.node'); -path.join(process.cwd(), 'prisma/generated/client/libquery_engine-darwin-arm64.dylib.node'); -// file annotations for bundling tools to include these files -path.join(__dirname, 'schema.prisma'); -path.join(process.cwd(), 'prisma/generated/client/schema.prisma'); diff --git a/prisma/generated/client/libquery_engine-darwin-arm64.dylib.node b/prisma/generated/client/libquery_engine-darwin-arm64.dylib.node deleted file mode 100755 index 87bc57f..0000000 Binary files a/prisma/generated/client/libquery_engine-darwin-arm64.dylib.node and /dev/null differ diff --git a/prisma/generated/client/package.json b/prisma/generated/client/package.json deleted file mode 100644 index e27f5fa..0000000 --- a/prisma/generated/client/package.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "name": "prisma-client-ed7e25f5491b1195393eaa0c61de73ee650d21d4e54192a2cf30d245141b6562", - "main": "index.js", - "types": "index.d.ts", - "browser": "index-browser.js", - "exports": { - "./client": { - "require": { - "node": "./index.js", - "edge-light": "./wasm.js", - "workerd": "./wasm.js", - "worker": "./wasm.js", - "browser": "./index-browser.js", - "default": "./index.js" - }, - "import": { - "node": "./index.js", - "edge-light": "./wasm.js", - "workerd": "./wasm.js", - "worker": "./wasm.js", - "browser": "./index-browser.js", - "default": "./index.js" - }, - "default": "./index.js" - }, - "./package.json": "./package.json", - ".": { - "require": { - "node": "./index.js", - "edge-light": "./wasm.js", - "workerd": "./wasm.js", - "worker": "./wasm.js", - "browser": "./index-browser.js", - "default": "./index.js" - }, - "import": { - "node": "./index.js", - "edge-light": "./wasm.js", - "workerd": "./wasm.js", - "worker": "./wasm.js", - "browser": "./index-browser.js", - "default": "./index.js" - }, - "default": "./index.js" - }, - "./edge": { - "types": "./edge.d.ts", - "require": "./edge.js", - "import": "./edge.js", - "default": "./edge.js" - }, - "./react-native": { - "types": "./react-native.d.ts", - "require": "./react-native.js", - "import": "./react-native.js", - "default": "./react-native.js" - }, - "./extension": { - "types": "./extension.d.ts", - "require": "./extension.js", - "import": "./extension.js", - "default": "./extension.js" - }, - "./index-browser": { - "types": "./index.d.ts", - "require": "./index-browser.js", - "import": "./index-browser.js", - "default": "./index-browser.js" - }, - "./index": { - "types": "./index.d.ts", - "require": "./index.js", - "import": "./index.js", - "default": "./index.js" - }, - "./wasm": { - "types": "./wasm.d.ts", - "require": "./wasm.js", - "import": "./wasm.mjs", - "default": "./wasm.mjs" - }, - "./runtime/client": { - "types": "./runtime/client.d.ts", - "node": { - "require": "./runtime/client.js", - "default": "./runtime/client.js" - }, - "require": "./runtime/client.js", - "import": "./runtime/client.mjs", - "default": "./runtime/client.mjs" - }, - "./runtime/library": { - "types": "./runtime/library.d.ts", - "require": "./runtime/library.js", - "import": "./runtime/library.mjs", - "default": "./runtime/library.mjs" - }, - "./runtime/binary": { - "types": "./runtime/binary.d.ts", - "require": "./runtime/binary.js", - "import": "./runtime/binary.mjs", - "default": "./runtime/binary.mjs" - }, - "./runtime/wasm-engine-edge": { - "types": "./runtime/wasm-engine-edge.d.ts", - "require": "./runtime/wasm-engine-edge.js", - "import": "./runtime/wasm-engine-edge.mjs", - "default": "./runtime/wasm-engine-edge.mjs" - }, - "./runtime/wasm-compiler-edge": { - "types": "./runtime/wasm-compiler-edge.d.ts", - "require": "./runtime/wasm-compiler-edge.js", - "import": "./runtime/wasm-compiler-edge.mjs", - "default": "./runtime/wasm-compiler-edge.mjs" - }, - "./runtime/edge": { - "types": "./runtime/edge.d.ts", - "require": "./runtime/edge.js", - "import": "./runtime/edge-esm.js", - "default": "./runtime/edge-esm.js" - }, - "./runtime/react-native": { - "types": "./runtime/react-native.d.ts", - "require": "./runtime/react-native.js", - "import": "./runtime/react-native.js", - "default": "./runtime/react-native.js" - }, - "./generator-build": { - "require": "./generator-build/index.js", - "import": "./generator-build/index.js", - "default": "./generator-build/index.js" - }, - "./sql": { - "require": { - "types": "./sql.d.ts", - "node": "./sql.js", - "default": "./sql.js" - }, - "import": { - "types": "./sql.d.ts", - "node": "./sql.mjs", - "default": "./sql.mjs" - }, - "default": "./sql.js" - }, - "./*": "./*" - }, - "version": "6.14.0", - "sideEffects": false -} diff --git a/prisma/generated/client/runtime/edge-esm.js b/prisma/generated/client/runtime/edge-esm.js deleted file mode 100644 index 5cb9688..0000000 --- a/prisma/generated/client/runtime/edge-esm.js +++ /dev/null @@ -1,8836 +0,0 @@ -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ -var fa = Object.create; -var nn = Object.defineProperty; -var da = Object.getOwnPropertyDescriptor; -var ga = Object.getOwnPropertyNames; -var ha = Object.getPrototypeOf, - ya = Object.prototype.hasOwnProperty; -var fe = (e, t) => () => (e && (t = e((e = 0))), t); -var Ce = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), - or = (e, t) => { - for (var r in t) nn(e, r, { get: t[r], enumerable: !0 }); - }, - wa = (e, t, r, n) => { - if ((t && typeof t == 'object') || typeof t == 'function') - for (let i of ga(t)) - !ya.call(e, i) && i !== r && nn(e, i, { get: () => t[i], enumerable: !(n = da(t, i)) || n.enumerable }); - return e; - }; -var Ue = (e, t, r) => ( - (r = e != null ? fa(ha(e)) : {}), - wa(t || !e || !e.__esModule ? nn(r, 'default', { value: e, enumerable: !0 }) : r, e) -); -var y, - b, - u = fe(() => { - 'use strict'; - ((y = { - nextTick: (e, ...t) => { - setTimeout(() => { - e(...t); - }, 0); - }, - env: {}, - version: '', - cwd: () => '/', - stderr: {}, - argv: ['/bin/node'], - pid: 1e4, - }), - ({ cwd: b } = y)); - }); -var x, - c = fe(() => { - 'use strict'; - x = - globalThis.performance ?? - (() => { - let e = Date.now(); - return { now: () => Date.now() - e }; - })(); - }); -var E, - p = fe(() => { - 'use strict'; - E = () => {}; - E.prototype = E; - }); -var m = fe(() => { - 'use strict'; -}); -var vi = Ce((ze) => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); - var ui = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), - Ea = ui((e) => { - 'use strict'; - ((e.byteLength = l), (e.toByteArray = g), (e.fromByteArray = I)); - var t = [], - r = [], - n = typeof Uint8Array < 'u' ? Uint8Array : Array, - i = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - for (o = 0, s = i.length; o < s; ++o) ((t[o] = i[o]), (r[i.charCodeAt(o)] = o)); - var o, s; - ((r[45] = 62), (r[95] = 63)); - function a(S) { - var R = S.length; - if (R % 4 > 0) throw new Error('Invalid string. Length must be a multiple of 4'); - var M = S.indexOf('='); - M === -1 && (M = R); - var F = M === R ? 0 : 4 - (M % 4); - return [M, F]; - } - function l(S) { - var R = a(S), - M = R[0], - F = R[1]; - return ((M + F) * 3) / 4 - F; - } - function d(S, R, M) { - return ((R + M) * 3) / 4 - M; - } - function g(S) { - var R, - M = a(S), - F = M[0], - B = M[1], - O = new n(d(S, F, B)), - L = 0, - oe = B > 0 ? F - 4 : F, - J; - for (J = 0; J < oe; J += 4) - ((R = - (r[S.charCodeAt(J)] << 18) | - (r[S.charCodeAt(J + 1)] << 12) | - (r[S.charCodeAt(J + 2)] << 6) | - r[S.charCodeAt(J + 3)]), - (O[L++] = (R >> 16) & 255), - (O[L++] = (R >> 8) & 255), - (O[L++] = R & 255)); - return ( - B === 2 && ((R = (r[S.charCodeAt(J)] << 2) | (r[S.charCodeAt(J + 1)] >> 4)), (O[L++] = R & 255)), - B === 1 && - ((R = (r[S.charCodeAt(J)] << 10) | (r[S.charCodeAt(J + 1)] << 4) | (r[S.charCodeAt(J + 2)] >> 2)), - (O[L++] = (R >> 8) & 255), - (O[L++] = R & 255)), - O - ); - } - function h(S) { - return t[(S >> 18) & 63] + t[(S >> 12) & 63] + t[(S >> 6) & 63] + t[S & 63]; - } - function T(S, R, M) { - for (var F, B = [], O = R; O < M; O += 3) - ((F = ((S[O] << 16) & 16711680) + ((S[O + 1] << 8) & 65280) + (S[O + 2] & 255)), B.push(h(F))); - return B.join(''); - } - function I(S) { - for (var R, M = S.length, F = M % 3, B = [], O = 16383, L = 0, oe = M - F; L < oe; L += O) - B.push(T(S, L, L + O > oe ? oe : L + O)); - return ( - F === 1 - ? ((R = S[M - 1]), B.push(t[R >> 2] + t[(R << 4) & 63] + '==')) - : F === 2 && - ((R = (S[M - 2] << 8) + S[M - 1]), B.push(t[R >> 10] + t[(R >> 4) & 63] + t[(R << 2) & 63] + '=')), - B.join('') - ); - } - }), - ba = ui((e) => { - ((e.read = function (t, r, n, i, o) { - var s, - a, - l = o * 8 - i - 1, - d = (1 << l) - 1, - g = d >> 1, - h = -7, - T = n ? o - 1 : 0, - I = n ? -1 : 1, - S = t[r + T]; - for (T += I, s = S & ((1 << -h) - 1), S >>= -h, h += l; h > 0; s = s * 256 + t[r + T], T += I, h -= 8); - for (a = s & ((1 << -h) - 1), s >>= -h, h += i; h > 0; a = a * 256 + t[r + T], T += I, h -= 8); - if (s === 0) s = 1 - g; - else { - if (s === d) return a ? NaN : (S ? -1 : 1) * (1 / 0); - ((a = a + Math.pow(2, i)), (s = s - g)); - } - return (S ? -1 : 1) * a * Math.pow(2, s - i); - }), - (e.write = function (t, r, n, i, o, s) { - var a, - l, - d, - g = s * 8 - o - 1, - h = (1 << g) - 1, - T = h >> 1, - I = o === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, - S = i ? 0 : s - 1, - R = i ? 1 : -1, - M = r < 0 || (r === 0 && 1 / r < 0) ? 1 : 0; - for ( - r = Math.abs(r), - isNaN(r) || r === 1 / 0 - ? ((l = isNaN(r) ? 1 : 0), (a = h)) - : ((a = Math.floor(Math.log(r) / Math.LN2)), - r * (d = Math.pow(2, -a)) < 1 && (a--, (d *= 2)), - a + T >= 1 ? (r += I / d) : (r += I * Math.pow(2, 1 - T)), - r * d >= 2 && (a++, (d /= 2)), - a + T >= h - ? ((l = 0), (a = h)) - : a + T >= 1 - ? ((l = (r * d - 1) * Math.pow(2, o)), (a = a + T)) - : ((l = r * Math.pow(2, T - 1) * Math.pow(2, o)), (a = 0))); - o >= 8; - t[n + S] = l & 255, S += R, l /= 256, o -= 8 - ); - for (a = (a << o) | l, g += o; g > 0; t[n + S] = a & 255, S += R, a /= 256, g -= 8); - t[n + S - R] |= M * 128; - })); - }), - on = Ea(), - We = ba(), - oi = - typeof Symbol == 'function' && typeof Symbol.for == 'function' ? Symbol.for('nodejs.util.inspect.custom') : null; - ze.Buffer = A; - ze.SlowBuffer = Ca; - ze.INSPECT_MAX_BYTES = 50; - var sr = 2147483647; - ze.kMaxLength = sr; - A.TYPED_ARRAY_SUPPORT = xa(); - !A.TYPED_ARRAY_SUPPORT && - typeof console < 'u' && - typeof console.error == 'function' && - console.error( - 'This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.' - ); - function xa() { - try { - let e = new Uint8Array(1), - t = { - foo: function () { - return 42; - }, - }; - return (Object.setPrototypeOf(t, Uint8Array.prototype), Object.setPrototypeOf(e, t), e.foo() === 42); - } catch { - return !1; - } - } - Object.defineProperty(A.prototype, 'parent', { - enumerable: !0, - get: function () { - if (A.isBuffer(this)) return this.buffer; - }, - }); - Object.defineProperty(A.prototype, 'offset', { - enumerable: !0, - get: function () { - if (A.isBuffer(this)) return this.byteOffset; - }, - }); - function xe(e) { - if (e > sr) throw new RangeError('The value "' + e + '" is invalid for option "size"'); - let t = new Uint8Array(e); - return (Object.setPrototypeOf(t, A.prototype), t); - } - function A(e, t, r) { - if (typeof e == 'number') { - if (typeof t == 'string') - throw new TypeError('The "string" argument must be of type string. Received type number'); - return ln(e); - } - return ci(e, t, r); - } - A.poolSize = 8192; - function ci(e, t, r) { - if (typeof e == 'string') return va(e, t); - if (ArrayBuffer.isView(e)) return Ta(e); - if (e == null) - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + - typeof e - ); - if ( - de(e, ArrayBuffer) || - (e && de(e.buffer, ArrayBuffer)) || - (typeof SharedArrayBuffer < 'u' && (de(e, SharedArrayBuffer) || (e && de(e.buffer, SharedArrayBuffer)))) - ) - return mi(e, t, r); - if (typeof e == 'number') - throw new TypeError('The "value" argument must not be of type number. Received type number'); - let n = e.valueOf && e.valueOf(); - if (n != null && n !== e) return A.from(n, t, r); - let i = Aa(e); - if (i) return i; - if (typeof Symbol < 'u' && Symbol.toPrimitive != null && typeof e[Symbol.toPrimitive] == 'function') - return A.from(e[Symbol.toPrimitive]('string'), t, r); - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + - typeof e - ); - } - A.from = function (e, t, r) { - return ci(e, t, r); - }; - Object.setPrototypeOf(A.prototype, Uint8Array.prototype); - Object.setPrototypeOf(A, Uint8Array); - function pi(e) { - if (typeof e != 'number') throw new TypeError('"size" argument must be of type number'); - if (e < 0) throw new RangeError('The value "' + e + '" is invalid for option "size"'); - } - function Pa(e, t, r) { - return (pi(e), e <= 0 ? xe(e) : t !== void 0 ? (typeof r == 'string' ? xe(e).fill(t, r) : xe(e).fill(t)) : xe(e)); - } - A.alloc = function (e, t, r) { - return Pa(e, t, r); - }; - function ln(e) { - return (pi(e), xe(e < 0 ? 0 : un(e) | 0)); - } - A.allocUnsafe = function (e) { - return ln(e); - }; - A.allocUnsafeSlow = function (e) { - return ln(e); - }; - function va(e, t) { - if (((typeof t != 'string' || t === '') && (t = 'utf8'), !A.isEncoding(t))) - throw new TypeError('Unknown encoding: ' + t); - let r = fi(e, t) | 0, - n = xe(r), - i = n.write(e, t); - return (i !== r && (n = n.slice(0, i)), n); - } - function sn(e) { - let t = e.length < 0 ? 0 : un(e.length) | 0, - r = xe(t); - for (let n = 0; n < t; n += 1) r[n] = e[n] & 255; - return r; - } - function Ta(e) { - if (de(e, Uint8Array)) { - let t = new Uint8Array(e); - return mi(t.buffer, t.byteOffset, t.byteLength); - } - return sn(e); - } - function mi(e, t, r) { - if (t < 0 || e.byteLength < t) throw new RangeError('"offset" is outside of buffer bounds'); - if (e.byteLength < t + (r || 0)) throw new RangeError('"length" is outside of buffer bounds'); - let n; - return ( - t === void 0 && r === void 0 - ? (n = new Uint8Array(e)) - : r === void 0 - ? (n = new Uint8Array(e, t)) - : (n = new Uint8Array(e, t, r)), - Object.setPrototypeOf(n, A.prototype), - n - ); - } - function Aa(e) { - if (A.isBuffer(e)) { - let t = un(e.length) | 0, - r = xe(t); - return (r.length === 0 || e.copy(r, 0, 0, t), r); - } - if (e.length !== void 0) return typeof e.length != 'number' || pn(e.length) ? xe(0) : sn(e); - if (e.type === 'Buffer' && Array.isArray(e.data)) return sn(e.data); - } - function un(e) { - if (e >= sr) - throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' + sr.toString(16) + ' bytes'); - return e | 0; - } - function Ca(e) { - return (+e != e && (e = 0), A.alloc(+e)); - } - A.isBuffer = function (e) { - return e != null && e._isBuffer === !0 && e !== A.prototype; - }; - A.compare = function (e, t) { - if ( - (de(e, Uint8Array) && (e = A.from(e, e.offset, e.byteLength)), - de(t, Uint8Array) && (t = A.from(t, t.offset, t.byteLength)), - !A.isBuffer(e) || !A.isBuffer(t)) - ) - throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); - if (e === t) return 0; - let r = e.length, - n = t.length; - for (let i = 0, o = Math.min(r, n); i < o; ++i) - if (e[i] !== t[i]) { - ((r = e[i]), (n = t[i])); - break; - } - return r < n ? -1 : n < r ? 1 : 0; - }; - A.isEncoding = function (e) { - switch (String(e).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return !0; - default: - return !1; - } - }; - A.concat = function (e, t) { - if (!Array.isArray(e)) throw new TypeError('"list" argument must be an Array of Buffers'); - if (e.length === 0) return A.alloc(0); - let r; - if (t === void 0) for (t = 0, r = 0; r < e.length; ++r) t += e[r].length; - let n = A.allocUnsafe(t), - i = 0; - for (r = 0; r < e.length; ++r) { - let o = e[r]; - if (de(o, Uint8Array)) - i + o.length > n.length - ? (A.isBuffer(o) || (o = A.from(o)), o.copy(n, i)) - : Uint8Array.prototype.set.call(n, o, i); - else if (A.isBuffer(o)) o.copy(n, i); - else throw new TypeError('"list" argument must be an Array of Buffers'); - i += o.length; - } - return n; - }; - function fi(e, t) { - if (A.isBuffer(e)) return e.length; - if (ArrayBuffer.isView(e) || de(e, ArrayBuffer)) return e.byteLength; - if (typeof e != 'string') - throw new TypeError( - 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof e - ); - let r = e.length, - n = arguments.length > 2 && arguments[2] === !0; - if (!n && r === 0) return 0; - let i = !1; - for (;;) - switch (t) { - case 'ascii': - case 'latin1': - case 'binary': - return r; - case 'utf8': - case 'utf-8': - return an(e).length; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return r * 2; - case 'hex': - return r >>> 1; - case 'base64': - return Pi(e).length; - default: - if (i) return n ? -1 : an(e).length; - ((t = ('' + t).toLowerCase()), (i = !0)); - } - } - A.byteLength = fi; - function Ra(e, t, r) { - let n = !1; - if ( - ((t === void 0 || t < 0) && (t = 0), - t > this.length || - ((r === void 0 || r > this.length) && (r = this.length), r <= 0) || - ((r >>>= 0), (t >>>= 0), r <= t)) - ) - return ''; - for (e || (e = 'utf8'); ; ) - switch (e) { - case 'hex': - return La(this, t, r); - case 'utf8': - case 'utf-8': - return gi(this, t, r); - case 'ascii': - return Na(this, t, r); - case 'latin1': - case 'binary': - return Fa(this, t, r); - case 'base64': - return Ma(this, t, r); - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return Ua(this, t, r); - default: - if (n) throw new TypeError('Unknown encoding: ' + e); - ((e = (e + '').toLowerCase()), (n = !0)); - } - } - A.prototype._isBuffer = !0; - function Be(e, t, r) { - let n = e[t]; - ((e[t] = e[r]), (e[r] = n)); - } - A.prototype.swap16 = function () { - let e = this.length; - if (e % 2 !== 0) throw new RangeError('Buffer size must be a multiple of 16-bits'); - for (let t = 0; t < e; t += 2) Be(this, t, t + 1); - return this; - }; - A.prototype.swap32 = function () { - let e = this.length; - if (e % 4 !== 0) throw new RangeError('Buffer size must be a multiple of 32-bits'); - for (let t = 0; t < e; t += 4) (Be(this, t, t + 3), Be(this, t + 1, t + 2)); - return this; - }; - A.prototype.swap64 = function () { - let e = this.length; - if (e % 8 !== 0) throw new RangeError('Buffer size must be a multiple of 64-bits'); - for (let t = 0; t < e; t += 8) - (Be(this, t, t + 7), Be(this, t + 1, t + 6), Be(this, t + 2, t + 5), Be(this, t + 3, t + 4)); - return this; - }; - A.prototype.toString = function () { - let e = this.length; - return e === 0 ? '' : arguments.length === 0 ? gi(this, 0, e) : Ra.apply(this, arguments); - }; - A.prototype.toLocaleString = A.prototype.toString; - A.prototype.equals = function (e) { - if (!A.isBuffer(e)) throw new TypeError('Argument must be a Buffer'); - return this === e ? !0 : A.compare(this, e) === 0; - }; - A.prototype.inspect = function () { - let e = '', - t = ze.INSPECT_MAX_BYTES; - return ( - (e = this.toString('hex', 0, t) - .replace(/(.{2})/g, '$1 ') - .trim()), - this.length > t && (e += ' ... '), - '' - ); - }; - oi && (A.prototype[oi] = A.prototype.inspect); - A.prototype.compare = function (e, t, r, n, i) { - if ((de(e, Uint8Array) && (e = A.from(e, e.offset, e.byteLength)), !A.isBuffer(e))) - throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e); - if ( - (t === void 0 && (t = 0), - r === void 0 && (r = e ? e.length : 0), - n === void 0 && (n = 0), - i === void 0 && (i = this.length), - t < 0 || r > e.length || n < 0 || i > this.length) - ) - throw new RangeError('out of range index'); - if (n >= i && t >= r) return 0; - if (n >= i) return -1; - if (t >= r) return 1; - if (((t >>>= 0), (r >>>= 0), (n >>>= 0), (i >>>= 0), this === e)) return 0; - let o = i - n, - s = r - t, - a = Math.min(o, s), - l = this.slice(n, i), - d = e.slice(t, r); - for (let g = 0; g < a; ++g) - if (l[g] !== d[g]) { - ((o = l[g]), (s = d[g])); - break; - } - return o < s ? -1 : s < o ? 1 : 0; - }; - function di(e, t, r, n, i) { - if (e.length === 0) return -1; - if ( - (typeof r == 'string' - ? ((n = r), (r = 0)) - : r > 2147483647 - ? (r = 2147483647) - : r < -2147483648 && (r = -2147483648), - (r = +r), - pn(r) && (r = i ? 0 : e.length - 1), - r < 0 && (r = e.length + r), - r >= e.length) - ) { - if (i) return -1; - r = e.length - 1; - } else if (r < 0) - if (i) r = 0; - else return -1; - if ((typeof t == 'string' && (t = A.from(t, n)), A.isBuffer(t))) return t.length === 0 ? -1 : si(e, t, r, n, i); - if (typeof t == 'number') - return ( - (t = t & 255), - typeof Uint8Array.prototype.indexOf == 'function' - ? i - ? Uint8Array.prototype.indexOf.call(e, t, r) - : Uint8Array.prototype.lastIndexOf.call(e, t, r) - : si(e, [t], r, n, i) - ); - throw new TypeError('val must be string, number or Buffer'); - } - function si(e, t, r, n, i) { - let o = 1, - s = e.length, - a = t.length; - if ( - n !== void 0 && - ((n = String(n).toLowerCase()), n === 'ucs2' || n === 'ucs-2' || n === 'utf16le' || n === 'utf-16le') - ) { - if (e.length < 2 || t.length < 2) return -1; - ((o = 2), (s /= 2), (a /= 2), (r /= 2)); - } - function l(g, h) { - return o === 1 ? g[h] : g.readUInt16BE(h * o); - } - let d; - if (i) { - let g = -1; - for (d = r; d < s; d++) - if (l(e, d) === l(t, g === -1 ? 0 : d - g)) { - if ((g === -1 && (g = d), d - g + 1 === a)) return g * o; - } else (g !== -1 && (d -= d - g), (g = -1)); - } else - for (r + a > s && (r = s - a), d = r; d >= 0; d--) { - let g = !0; - for (let h = 0; h < a; h++) - if (l(e, d + h) !== l(t, h)) { - g = !1; - break; - } - if (g) return d; - } - return -1; - } - A.prototype.includes = function (e, t, r) { - return this.indexOf(e, t, r) !== -1; - }; - A.prototype.indexOf = function (e, t, r) { - return di(this, e, t, r, !0); - }; - A.prototype.lastIndexOf = function (e, t, r) { - return di(this, e, t, r, !1); - }; - function Sa(e, t, r, n) { - r = Number(r) || 0; - let i = e.length - r; - n ? ((n = Number(n)), n > i && (n = i)) : (n = i); - let o = t.length; - n > o / 2 && (n = o / 2); - let s; - for (s = 0; s < n; ++s) { - let a = parseInt(t.substr(s * 2, 2), 16); - if (pn(a)) return s; - e[r + s] = a; - } - return s; - } - function Ia(e, t, r, n) { - return ar(an(t, e.length - r), e, r, n); - } - function Oa(e, t, r, n) { - return ar($a(t), e, r, n); - } - function ka(e, t, r, n) { - return ar(Pi(t), e, r, n); - } - function Da(e, t, r, n) { - return ar(ja(t, e.length - r), e, r, n); - } - A.prototype.write = function (e, t, r, n) { - if (t === void 0) ((n = 'utf8'), (r = this.length), (t = 0)); - else if (r === void 0 && typeof t == 'string') ((n = t), (r = this.length), (t = 0)); - else if (isFinite(t)) - ((t = t >>> 0), isFinite(r) ? ((r = r >>> 0), n === void 0 && (n = 'utf8')) : ((n = r), (r = void 0))); - else throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported'); - let i = this.length - t; - if (((r === void 0 || r > i) && (r = i), (e.length > 0 && (r < 0 || t < 0)) || t > this.length)) - throw new RangeError('Attempt to write outside buffer bounds'); - n || (n = 'utf8'); - let o = !1; - for (;;) - switch (n) { - case 'hex': - return Sa(this, e, t, r); - case 'utf8': - case 'utf-8': - return Ia(this, e, t, r); - case 'ascii': - case 'latin1': - case 'binary': - return Oa(this, e, t, r); - case 'base64': - return ka(this, e, t, r); - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return Da(this, e, t, r); - default: - if (o) throw new TypeError('Unknown encoding: ' + n); - ((n = ('' + n).toLowerCase()), (o = !0)); - } - }; - A.prototype.toJSON = function () { - return { type: 'Buffer', data: Array.prototype.slice.call(this._arr || this, 0) }; - }; - function Ma(e, t, r) { - return t === 0 && r === e.length ? on.fromByteArray(e) : on.fromByteArray(e.slice(t, r)); - } - function gi(e, t, r) { - r = Math.min(e.length, r); - let n = [], - i = t; - for (; i < r; ) { - let o = e[i], - s = null, - a = o > 239 ? 4 : o > 223 ? 3 : o > 191 ? 2 : 1; - if (i + a <= r) { - let l, d, g, h; - switch (a) { - case 1: - o < 128 && (s = o); - break; - case 2: - ((l = e[i + 1]), (l & 192) === 128 && ((h = ((o & 31) << 6) | (l & 63)), h > 127 && (s = h))); - break; - case 3: - ((l = e[i + 1]), - (d = e[i + 2]), - (l & 192) === 128 && - (d & 192) === 128 && - ((h = ((o & 15) << 12) | ((l & 63) << 6) | (d & 63)), h > 2047 && (h < 55296 || h > 57343) && (s = h))); - break; - case 4: - ((l = e[i + 1]), - (d = e[i + 2]), - (g = e[i + 3]), - (l & 192) === 128 && - (d & 192) === 128 && - (g & 192) === 128 && - ((h = ((o & 15) << 18) | ((l & 63) << 12) | ((d & 63) << 6) | (g & 63)), - h > 65535 && h < 1114112 && (s = h))); - } - } - (s === null - ? ((s = 65533), (a = 1)) - : s > 65535 && ((s -= 65536), n.push(((s >>> 10) & 1023) | 55296), (s = 56320 | (s & 1023))), - n.push(s), - (i += a)); - } - return _a(n); - } - var ai = 4096; - function _a(e) { - let t = e.length; - if (t <= ai) return String.fromCharCode.apply(String, e); - let r = '', - n = 0; - for (; n < t; ) r += String.fromCharCode.apply(String, e.slice(n, (n += ai))); - return r; - } - function Na(e, t, r) { - let n = ''; - r = Math.min(e.length, r); - for (let i = t; i < r; ++i) n += String.fromCharCode(e[i] & 127); - return n; - } - function Fa(e, t, r) { - let n = ''; - r = Math.min(e.length, r); - for (let i = t; i < r; ++i) n += String.fromCharCode(e[i]); - return n; - } - function La(e, t, r) { - let n = e.length; - ((!t || t < 0) && (t = 0), (!r || r < 0 || r > n) && (r = n)); - let i = ''; - for (let o = t; o < r; ++o) i += Ga[e[o]]; - return i; - } - function Ua(e, t, r) { - let n = e.slice(t, r), - i = ''; - for (let o = 0; o < n.length - 1; o += 2) i += String.fromCharCode(n[o] + n[o + 1] * 256); - return i; - } - A.prototype.slice = function (e, t) { - let r = this.length; - ((e = ~~e), - (t = t === void 0 ? r : ~~t), - e < 0 ? ((e += r), e < 0 && (e = 0)) : e > r && (e = r), - t < 0 ? ((t += r), t < 0 && (t = 0)) : t > r && (t = r), - t < e && (t = e)); - let n = this.subarray(e, t); - return (Object.setPrototypeOf(n, A.prototype), n); - }; - function W(e, t, r) { - if (e % 1 !== 0 || e < 0) throw new RangeError('offset is not uint'); - if (e + t > r) throw new RangeError('Trying to access beyond buffer length'); - } - A.prototype.readUintLE = A.prototype.readUIntLE = function (e, t, r) { - ((e = e >>> 0), (t = t >>> 0), r || W(e, t, this.length)); - let n = this[e], - i = 1, - o = 0; - for (; ++o < t && (i *= 256); ) n += this[e + o] * i; - return n; - }; - A.prototype.readUintBE = A.prototype.readUIntBE = function (e, t, r) { - ((e = e >>> 0), (t = t >>> 0), r || W(e, t, this.length)); - let n = this[e + --t], - i = 1; - for (; t > 0 && (i *= 256); ) n += this[e + --t] * i; - return n; - }; - A.prototype.readUint8 = A.prototype.readUInt8 = function (e, t) { - return ((e = e >>> 0), t || W(e, 1, this.length), this[e]); - }; - A.prototype.readUint16LE = A.prototype.readUInt16LE = function (e, t) { - return ((e = e >>> 0), t || W(e, 2, this.length), this[e] | (this[e + 1] << 8)); - }; - A.prototype.readUint16BE = A.prototype.readUInt16BE = function (e, t) { - return ((e = e >>> 0), t || W(e, 2, this.length), (this[e] << 8) | this[e + 1]); - }; - A.prototype.readUint32LE = A.prototype.readUInt32LE = function (e, t) { - return ( - (e = e >>> 0), - t || W(e, 4, this.length), - (this[e] | (this[e + 1] << 8) | (this[e + 2] << 16)) + this[e + 3] * 16777216 - ); - }; - A.prototype.readUint32BE = A.prototype.readUInt32BE = function (e, t) { - return ( - (e = e >>> 0), - t || W(e, 4, this.length), - this[e] * 16777216 + ((this[e + 1] << 16) | (this[e + 2] << 8) | this[e + 3]) - ); - }; - A.prototype.readBigUInt64LE = Re(function (e) { - ((e = e >>> 0), He(e, 'offset')); - let t = this[e], - r = this[e + 7]; - (t === void 0 || r === void 0) && xt(e, this.length - 8); - let n = t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24, - i = this[++e] + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + r * 2 ** 24; - return BigInt(n) + (BigInt(i) << BigInt(32)); - }); - A.prototype.readBigUInt64BE = Re(function (e) { - ((e = e >>> 0), He(e, 'offset')); - let t = this[e], - r = this[e + 7]; - (t === void 0 || r === void 0) && xt(e, this.length - 8); - let n = t * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e], - i = this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + r; - return (BigInt(n) << BigInt(32)) + BigInt(i); - }); - A.prototype.readIntLE = function (e, t, r) { - ((e = e >>> 0), (t = t >>> 0), r || W(e, t, this.length)); - let n = this[e], - i = 1, - o = 0; - for (; ++o < t && (i *= 256); ) n += this[e + o] * i; - return ((i *= 128), n >= i && (n -= Math.pow(2, 8 * t)), n); - }; - A.prototype.readIntBE = function (e, t, r) { - ((e = e >>> 0), (t = t >>> 0), r || W(e, t, this.length)); - let n = t, - i = 1, - o = this[e + --n]; - for (; n > 0 && (i *= 256); ) o += this[e + --n] * i; - return ((i *= 128), o >= i && (o -= Math.pow(2, 8 * t)), o); - }; - A.prototype.readInt8 = function (e, t) { - return ((e = e >>> 0), t || W(e, 1, this.length), this[e] & 128 ? (255 - this[e] + 1) * -1 : this[e]); - }; - A.prototype.readInt16LE = function (e, t) { - ((e = e >>> 0), t || W(e, 2, this.length)); - let r = this[e] | (this[e + 1] << 8); - return r & 32768 ? r | 4294901760 : r; - }; - A.prototype.readInt16BE = function (e, t) { - ((e = e >>> 0), t || W(e, 2, this.length)); - let r = this[e + 1] | (this[e] << 8); - return r & 32768 ? r | 4294901760 : r; - }; - A.prototype.readInt32LE = function (e, t) { - return ( - (e = e >>> 0), - t || W(e, 4, this.length), - this[e] | (this[e + 1] << 8) | (this[e + 2] << 16) | (this[e + 3] << 24) - ); - }; - A.prototype.readInt32BE = function (e, t) { - return ( - (e = e >>> 0), - t || W(e, 4, this.length), - (this[e] << 24) | (this[e + 1] << 16) | (this[e + 2] << 8) | this[e + 3] - ); - }; - A.prototype.readBigInt64LE = Re(function (e) { - ((e = e >>> 0), He(e, 'offset')); - let t = this[e], - r = this[e + 7]; - (t === void 0 || r === void 0) && xt(e, this.length - 8); - let n = this[e + 4] + this[e + 5] * 2 ** 8 + this[e + 6] * 2 ** 16 + (r << 24); - return (BigInt(n) << BigInt(32)) + BigInt(t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24); - }); - A.prototype.readBigInt64BE = Re(function (e) { - ((e = e >>> 0), He(e, 'offset')); - let t = this[e], - r = this[e + 7]; - (t === void 0 || r === void 0) && xt(e, this.length - 8); - let n = (t << 24) + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e]; - return (BigInt(n) << BigInt(32)) + BigInt(this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + r); - }); - A.prototype.readFloatLE = function (e, t) { - return ((e = e >>> 0), t || W(e, 4, this.length), We.read(this, e, !0, 23, 4)); - }; - A.prototype.readFloatBE = function (e, t) { - return ((e = e >>> 0), t || W(e, 4, this.length), We.read(this, e, !1, 23, 4)); - }; - A.prototype.readDoubleLE = function (e, t) { - return ((e = e >>> 0), t || W(e, 8, this.length), We.read(this, e, !0, 52, 8)); - }; - A.prototype.readDoubleBE = function (e, t) { - return ((e = e >>> 0), t || W(e, 8, this.length), We.read(this, e, !1, 52, 8)); - }; - function re(e, t, r, n, i, o) { - if (!A.isBuffer(e)) throw new TypeError('"buffer" argument must be a Buffer instance'); - if (t > i || t < o) throw new RangeError('"value" argument is out of bounds'); - if (r + n > e.length) throw new RangeError('Index out of range'); - } - A.prototype.writeUintLE = A.prototype.writeUIntLE = function (e, t, r, n) { - if (((e = +e), (t = t >>> 0), (r = r >>> 0), !n)) { - let s = Math.pow(2, 8 * r) - 1; - re(this, e, t, r, s, 0); - } - let i = 1, - o = 0; - for (this[t] = e & 255; ++o < r && (i *= 256); ) this[t + o] = (e / i) & 255; - return t + r; - }; - A.prototype.writeUintBE = A.prototype.writeUIntBE = function (e, t, r, n) { - if (((e = +e), (t = t >>> 0), (r = r >>> 0), !n)) { - let s = Math.pow(2, 8 * r) - 1; - re(this, e, t, r, s, 0); - } - let i = r - 1, - o = 1; - for (this[t + i] = e & 255; --i >= 0 && (o *= 256); ) this[t + i] = (e / o) & 255; - return t + r; - }; - A.prototype.writeUint8 = A.prototype.writeUInt8 = function (e, t, r) { - return ((e = +e), (t = t >>> 0), r || re(this, e, t, 1, 255, 0), (this[t] = e & 255), t + 1); - }; - A.prototype.writeUint16LE = A.prototype.writeUInt16LE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || re(this, e, t, 2, 65535, 0), - (this[t] = e & 255), - (this[t + 1] = e >>> 8), - t + 2 - ); - }; - A.prototype.writeUint16BE = A.prototype.writeUInt16BE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || re(this, e, t, 2, 65535, 0), - (this[t] = e >>> 8), - (this[t + 1] = e & 255), - t + 2 - ); - }; - A.prototype.writeUint32LE = A.prototype.writeUInt32LE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || re(this, e, t, 4, 4294967295, 0), - (this[t + 3] = e >>> 24), - (this[t + 2] = e >>> 16), - (this[t + 1] = e >>> 8), - (this[t] = e & 255), - t + 4 - ); - }; - A.prototype.writeUint32BE = A.prototype.writeUInt32BE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || re(this, e, t, 4, 4294967295, 0), - (this[t] = e >>> 24), - (this[t + 1] = e >>> 16), - (this[t + 2] = e >>> 8), - (this[t + 3] = e & 255), - t + 4 - ); - }; - function hi(e, t, r, n, i) { - xi(t, n, i, e, r, 7); - let o = Number(t & BigInt(4294967295)); - ((e[r++] = o), (o = o >> 8), (e[r++] = o), (o = o >> 8), (e[r++] = o), (o = o >> 8), (e[r++] = o)); - let s = Number((t >> BigInt(32)) & BigInt(4294967295)); - return ((e[r++] = s), (s = s >> 8), (e[r++] = s), (s = s >> 8), (e[r++] = s), (s = s >> 8), (e[r++] = s), r); - } - function yi(e, t, r, n, i) { - xi(t, n, i, e, r, 7); - let o = Number(t & BigInt(4294967295)); - ((e[r + 7] = o), (o = o >> 8), (e[r + 6] = o), (o = o >> 8), (e[r + 5] = o), (o = o >> 8), (e[r + 4] = o)); - let s = Number((t >> BigInt(32)) & BigInt(4294967295)); - return ( - (e[r + 3] = s), - (s = s >> 8), - (e[r + 2] = s), - (s = s >> 8), - (e[r + 1] = s), - (s = s >> 8), - (e[r] = s), - r + 8 - ); - } - A.prototype.writeBigUInt64LE = Re(function (e, t = 0) { - return hi(this, e, t, BigInt(0), BigInt('0xffffffffffffffff')); - }); - A.prototype.writeBigUInt64BE = Re(function (e, t = 0) { - return yi(this, e, t, BigInt(0), BigInt('0xffffffffffffffff')); - }); - A.prototype.writeIntLE = function (e, t, r, n) { - if (((e = +e), (t = t >>> 0), !n)) { - let a = Math.pow(2, 8 * r - 1); - re(this, e, t, r, a - 1, -a); - } - let i = 0, - o = 1, - s = 0; - for (this[t] = e & 255; ++i < r && (o *= 256); ) - (e < 0 && s === 0 && this[t + i - 1] !== 0 && (s = 1), (this[t + i] = (((e / o) >> 0) - s) & 255)); - return t + r; - }; - A.prototype.writeIntBE = function (e, t, r, n) { - if (((e = +e), (t = t >>> 0), !n)) { - let a = Math.pow(2, 8 * r - 1); - re(this, e, t, r, a - 1, -a); - } - let i = r - 1, - o = 1, - s = 0; - for (this[t + i] = e & 255; --i >= 0 && (o *= 256); ) - (e < 0 && s === 0 && this[t + i + 1] !== 0 && (s = 1), (this[t + i] = (((e / o) >> 0) - s) & 255)); - return t + r; - }; - A.prototype.writeInt8 = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || re(this, e, t, 1, 127, -128), - e < 0 && (e = 255 + e + 1), - (this[t] = e & 255), - t + 1 - ); - }; - A.prototype.writeInt16LE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || re(this, e, t, 2, 32767, -32768), - (this[t] = e & 255), - (this[t + 1] = e >>> 8), - t + 2 - ); - }; - A.prototype.writeInt16BE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || re(this, e, t, 2, 32767, -32768), - (this[t] = e >>> 8), - (this[t + 1] = e & 255), - t + 2 - ); - }; - A.prototype.writeInt32LE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || re(this, e, t, 4, 2147483647, -2147483648), - (this[t] = e & 255), - (this[t + 1] = e >>> 8), - (this[t + 2] = e >>> 16), - (this[t + 3] = e >>> 24), - t + 4 - ); - }; - A.prototype.writeInt32BE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || re(this, e, t, 4, 2147483647, -2147483648), - e < 0 && (e = 4294967295 + e + 1), - (this[t] = e >>> 24), - (this[t + 1] = e >>> 16), - (this[t + 2] = e >>> 8), - (this[t + 3] = e & 255), - t + 4 - ); - }; - A.prototype.writeBigInt64LE = Re(function (e, t = 0) { - return hi(this, e, t, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')); - }); - A.prototype.writeBigInt64BE = Re(function (e, t = 0) { - return yi(this, e, t, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')); - }); - function wi(e, t, r, n, i, o) { - if (r + n > e.length) throw new RangeError('Index out of range'); - if (r < 0) throw new RangeError('Index out of range'); - } - function Ei(e, t, r, n, i) { - return ( - (t = +t), - (r = r >>> 0), - i || wi(e, t, r, 4, 34028234663852886e22, -34028234663852886e22), - We.write(e, t, r, n, 23, 4), - r + 4 - ); - } - A.prototype.writeFloatLE = function (e, t, r) { - return Ei(this, e, t, !0, r); - }; - A.prototype.writeFloatBE = function (e, t, r) { - return Ei(this, e, t, !1, r); - }; - function bi(e, t, r, n, i) { - return ( - (t = +t), - (r = r >>> 0), - i || wi(e, t, r, 8, 17976931348623157e292, -17976931348623157e292), - We.write(e, t, r, n, 52, 8), - r + 8 - ); - } - A.prototype.writeDoubleLE = function (e, t, r) { - return bi(this, e, t, !0, r); - }; - A.prototype.writeDoubleBE = function (e, t, r) { - return bi(this, e, t, !1, r); - }; - A.prototype.copy = function (e, t, r, n) { - if (!A.isBuffer(e)) throw new TypeError('argument should be a Buffer'); - if ( - (r || (r = 0), - !n && n !== 0 && (n = this.length), - t >= e.length && (t = e.length), - t || (t = 0), - n > 0 && n < r && (n = r), - n === r || e.length === 0 || this.length === 0) - ) - return 0; - if (t < 0) throw new RangeError('targetStart out of bounds'); - if (r < 0 || r >= this.length) throw new RangeError('Index out of range'); - if (n < 0) throw new RangeError('sourceEnd out of bounds'); - (n > this.length && (n = this.length), e.length - t < n - r && (n = e.length - t + r)); - let i = n - r; - return ( - this === e && typeof Uint8Array.prototype.copyWithin == 'function' - ? this.copyWithin(t, r, n) - : Uint8Array.prototype.set.call(e, this.subarray(r, n), t), - i - ); - }; - A.prototype.fill = function (e, t, r, n) { - if (typeof e == 'string') { - if ( - (typeof t == 'string' - ? ((n = t), (t = 0), (r = this.length)) - : typeof r == 'string' && ((n = r), (r = this.length)), - n !== void 0 && typeof n != 'string') - ) - throw new TypeError('encoding must be a string'); - if (typeof n == 'string' && !A.isEncoding(n)) throw new TypeError('Unknown encoding: ' + n); - if (e.length === 1) { - let o = e.charCodeAt(0); - ((n === 'utf8' && o < 128) || n === 'latin1') && (e = o); - } - } else typeof e == 'number' ? (e = e & 255) : typeof e == 'boolean' && (e = Number(e)); - if (t < 0 || this.length < t || this.length < r) throw new RangeError('Out of range index'); - if (r <= t) return this; - ((t = t >>> 0), (r = r === void 0 ? this.length : r >>> 0), e || (e = 0)); - let i; - if (typeof e == 'number') for (i = t; i < r; ++i) this[i] = e; - else { - let o = A.isBuffer(e) ? e : A.from(e, n), - s = o.length; - if (s === 0) throw new TypeError('The value "' + e + '" is invalid for argument "value"'); - for (i = 0; i < r - t; ++i) this[i + t] = o[i % s]; - } - return this; - }; - var Ke = {}; - function cn(e, t, r) { - Ke[e] = class extends r { - constructor() { - (super(), - Object.defineProperty(this, 'message', { value: t.apply(this, arguments), writable: !0, configurable: !0 }), - (this.name = `${this.name} [${e}]`), - this.stack, - delete this.name); - } - get code() { - return e; - } - set code(n) { - Object.defineProperty(this, 'code', { configurable: !0, enumerable: !0, value: n, writable: !0 }); - } - toString() { - return `${this.name} [${e}]: ${this.message}`; - } - }; - } - cn( - 'ERR_BUFFER_OUT_OF_BOUNDS', - function (e) { - return e ? `${e} is outside of buffer bounds` : 'Attempt to access memory outside buffer bounds'; - }, - RangeError - ); - cn( - 'ERR_INVALID_ARG_TYPE', - function (e, t) { - return `The "${e}" argument must be of type number. Received type ${typeof t}`; - }, - TypeError - ); - cn( - 'ERR_OUT_OF_RANGE', - function (e, t, r) { - let n = `The value of "${e}" is out of range.`, - i = r; - return ( - Number.isInteger(r) && Math.abs(r) > 2 ** 32 - ? (i = li(String(r))) - : typeof r == 'bigint' && - ((i = String(r)), - (r > BigInt(2) ** BigInt(32) || r < -(BigInt(2) ** BigInt(32))) && (i = li(i)), - (i += 'n')), - (n += ` It must be ${t}. Received ${i}`), - n - ); - }, - RangeError - ); - function li(e) { - let t = '', - r = e.length, - n = e[0] === '-' ? 1 : 0; - for (; r >= n + 4; r -= 3) t = `_${e.slice(r - 3, r)}${t}`; - return `${e.slice(0, r)}${t}`; - } - function Ba(e, t, r) { - (He(t, 'offset'), (e[t] === void 0 || e[t + r] === void 0) && xt(t, e.length - (r + 1))); - } - function xi(e, t, r, n, i, o) { - if (e > r || e < t) { - let s = typeof t == 'bigint' ? 'n' : '', - a; - throw ( - o > 3 - ? t === 0 || t === BigInt(0) - ? (a = `>= 0${s} and < 2${s} ** ${(o + 1) * 8}${s}`) - : (a = `>= -(2${s} ** ${(o + 1) * 8 - 1}${s}) and < 2 ** ${(o + 1) * 8 - 1}${s}`) - : (a = `>= ${t}${s} and <= ${r}${s}`), - new Ke.ERR_OUT_OF_RANGE('value', a, e) - ); - } - Ba(n, i, o); - } - function He(e, t) { - if (typeof e != 'number') throw new Ke.ERR_INVALID_ARG_TYPE(t, 'number', e); - } - function xt(e, t, r) { - throw Math.floor(e) !== e - ? (He(e, r), new Ke.ERR_OUT_OF_RANGE(r || 'offset', 'an integer', e)) - : t < 0 - ? new Ke.ERR_BUFFER_OUT_OF_BOUNDS() - : new Ke.ERR_OUT_OF_RANGE(r || 'offset', `>= ${r ? 1 : 0} and <= ${t}`, e); - } - var qa = /[^+/0-9A-Za-z-_]/g; - function Va(e) { - if (((e = e.split('=')[0]), (e = e.trim().replace(qa, '')), e.length < 2)) return ''; - for (; e.length % 4 !== 0; ) e = e + '='; - return e; - } - function an(e, t) { - t = t || 1 / 0; - let r, - n = e.length, - i = null, - o = []; - for (let s = 0; s < n; ++s) { - if (((r = e.charCodeAt(s)), r > 55295 && r < 57344)) { - if (!i) { - if (r > 56319) { - (t -= 3) > -1 && o.push(239, 191, 189); - continue; - } else if (s + 1 === n) { - (t -= 3) > -1 && o.push(239, 191, 189); - continue; - } - i = r; - continue; - } - if (r < 56320) { - ((t -= 3) > -1 && o.push(239, 191, 189), (i = r)); - continue; - } - r = (((i - 55296) << 10) | (r - 56320)) + 65536; - } else i && (t -= 3) > -1 && o.push(239, 191, 189); - if (((i = null), r < 128)) { - if ((t -= 1) < 0) break; - o.push(r); - } else if (r < 2048) { - if ((t -= 2) < 0) break; - o.push((r >> 6) | 192, (r & 63) | 128); - } else if (r < 65536) { - if ((t -= 3) < 0) break; - o.push((r >> 12) | 224, ((r >> 6) & 63) | 128, (r & 63) | 128); - } else if (r < 1114112) { - if ((t -= 4) < 0) break; - o.push((r >> 18) | 240, ((r >> 12) & 63) | 128, ((r >> 6) & 63) | 128, (r & 63) | 128); - } else throw new Error('Invalid code point'); - } - return o; - } - function $a(e) { - let t = []; - for (let r = 0; r < e.length; ++r) t.push(e.charCodeAt(r) & 255); - return t; - } - function ja(e, t) { - let r, - n, - i, - o = []; - for (let s = 0; s < e.length && !((t -= 2) < 0); ++s) - ((r = e.charCodeAt(s)), (n = r >> 8), (i = r % 256), o.push(i), o.push(n)); - return o; - } - function Pi(e) { - return on.toByteArray(Va(e)); - } - function ar(e, t, r, n) { - let i; - for (i = 0; i < n && !(i + r >= t.length || i >= e.length); ++i) t[i + r] = e[i]; - return i; - } - function de(e, t) { - return ( - e instanceof t || - (e != null && e.constructor != null && e.constructor.name != null && e.constructor.name === t.name) - ); - } - function pn(e) { - return e !== e; - } - var Ga = (function () { - let e = '0123456789abcdef', - t = new Array(256); - for (let r = 0; r < 16; ++r) { - let n = r * 16; - for (let i = 0; i < 16; ++i) t[n + i] = e[r] + e[i]; - } - return t; - })(); - function Re(e) { - return typeof BigInt > 'u' ? Ja : e; - } - function Ja() { - throw new Error('BigInt not supported'); - } -}); -var w, - f = fe(() => { - 'use strict'; - w = Ue(vi()); - }); -function Ya() { - return !1; -} -function dn() { - return { - dev: 0, - ino: 0, - mode: 0, - nlink: 0, - uid: 0, - gid: 0, - rdev: 0, - size: 0, - blksize: 0, - blocks: 0, - atimeMs: 0, - mtimeMs: 0, - ctimeMs: 0, - birthtimeMs: 0, - atime: new Date(), - mtime: new Date(), - ctime: new Date(), - birthtime: new Date(), - }; -} -function Za() { - return dn(); -} -function Xa() { - return []; -} -function el(e) { - e(null, []); -} -function tl() { - return ''; -} -function rl() { - return ''; -} -function nl() {} -function il() {} -function ol() {} -function sl() {} -function al() {} -function ll() {} -function ul() {} -function cl() {} -function pl() { - return { close: () => {}, on: () => {}, removeAllListeners: () => {} }; -} -function ml(e, t) { - t(null, dn()); -} -var fl, - dl, - $i, - ji = fe(() => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); - ((fl = {}), - (dl = { - existsSync: Ya, - lstatSync: dn, - stat: ml, - statSync: Za, - readdirSync: Xa, - readdir: el, - readlinkSync: tl, - realpathSync: rl, - chmodSync: nl, - renameSync: il, - mkdirSync: ol, - rmdirSync: sl, - rmSync: al, - unlinkSync: ll, - watchFile: ul, - unwatchFile: cl, - watch: pl, - promises: fl, - }), - ($i = dl)); - }); -function gl(...e) { - return e.join('/'); -} -function hl(...e) { - return e.join('/'); -} -function yl(e) { - let t = Gi(e), - r = Ji(e), - [n, i] = t.split('.'); - return { root: '/', dir: r, base: t, ext: i, name: n }; -} -function Gi(e) { - let t = e.split('/'); - return t[t.length - 1]; -} -function Ji(e) { - return e.split('/').slice(0, -1).join('/'); -} -function El(e) { - let t = e.split('/').filter((i) => i !== '' && i !== '.'), - r = []; - for (let i of t) i === '..' ? r.pop() : r.push(i); - let n = r.join('/'); - return e.startsWith('/') ? '/' + n : n; -} -var Qi, - wl, - bl, - xl, - pr, - Ki = fe(() => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); - ((Qi = '/'), (wl = ':')); - ((bl = { sep: Qi }), - (xl = { - basename: Gi, - delimiter: wl, - dirname: Ji, - join: hl, - normalize: El, - parse: yl, - posix: bl, - resolve: gl, - sep: Qi, - }), - (pr = xl)); - }); -var Wi = Ce((xf, Pl) => { - Pl.exports = { - name: '@prisma/internals', - version: '6.14.0', - description: "This package is intended for Prisma's internal use", - main: 'dist/index.js', - types: 'dist/index.d.ts', - repository: { type: 'git', url: 'https://github.com/prisma/prisma.git', directory: 'packages/internals' }, - homepage: 'https://www.prisma.io', - author: 'Tim Suchanek ', - bugs: 'https://github.com/prisma/prisma/issues', - license: 'Apache-2.0', - scripts: { - dev: 'DEV=true tsx helpers/build.ts', - build: 'tsx helpers/build.ts', - test: 'dotenv -e ../../.db.env -- jest --silent', - prepublishOnly: 'pnpm run build', - }, - files: ['README.md', 'dist', '!**/libquery_engine*', '!dist/get-generators/engines/*', 'scripts'], - devDependencies: { - '@babel/helper-validator-identifier': '7.25.9', - '@opentelemetry/api': '1.9.0', - '@swc/core': '1.11.5', - '@swc/jest': '0.2.37', - '@types/babel__helper-validator-identifier': '7.15.2', - '@types/jest': '29.5.14', - '@types/node': '18.19.76', - '@types/resolve': '1.20.6', - archiver: '6.0.2', - 'checkpoint-client': '1.1.33', - 'cli-truncate': '4.0.0', - dotenv: '16.5.0', - empathic: '2.0.0', - esbuild: '0.25.5', - 'escape-string-regexp': '5.0.0', - execa: '5.1.1', - 'fast-glob': '3.3.3', - 'find-up': '7.0.0', - 'fp-ts': '2.16.9', - 'fs-extra': '11.3.0', - 'fs-jetpack': '5.1.0', - 'global-dirs': '4.0.0', - globby: '11.1.0', - 'identifier-regex': '1.0.0', - 'indent-string': '4.0.0', - 'is-windows': '1.0.2', - 'is-wsl': '3.1.0', - jest: '29.7.0', - 'jest-junit': '16.0.0', - kleur: '4.1.5', - 'mock-stdin': '1.0.0', - 'new-github-issue-url': '0.2.1', - 'node-fetch': '3.3.2', - 'npm-packlist': '5.1.3', - open: '7.4.2', - 'p-map': '4.0.0', - resolve: '1.22.10', - 'string-width': '7.2.0', - 'strip-ansi': '6.0.1', - 'strip-indent': '4.0.0', - 'temp-dir': '2.0.0', - tempy: '1.0.1', - 'terminal-link': '4.0.0', - tmp: '0.2.3', - 'ts-node': '10.9.2', - 'ts-pattern': '5.6.2', - 'ts-toolbelt': '9.6.0', - typescript: '5.4.5', - yarn: '1.22.22', - }, - dependencies: { - '@prisma/config': 'workspace:*', - '@prisma/debug': 'workspace:*', - '@prisma/dmmf': 'workspace:*', - '@prisma/driver-adapter-utils': 'workspace:*', - '@prisma/engines': 'workspace:*', - '@prisma/fetch-engine': 'workspace:*', - '@prisma/generator': 'workspace:*', - '@prisma/generator-helper': 'workspace:*', - '@prisma/get-platform': 'workspace:*', - '@prisma/prisma-schema-wasm': '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - '@prisma/schema-engine-wasm': '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - '@prisma/schema-files-loader': 'workspace:*', - arg: '5.0.2', - prompts: '2.4.2', - }, - peerDependencies: { typescript: '>=5.1.0' }, - peerDependenciesMeta: { typescript: { optional: !0 } }, - sideEffects: !1, - }; -}); -var hn = Ce((_f, Cl) => { - Cl.exports = { - name: '@prisma/engines-version', - version: '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - main: 'index.js', - types: 'index.d.ts', - license: 'Apache-2.0', - author: 'Tim Suchanek ', - prisma: { enginesVersion: '717184b7b35ea05dfa71a3236b7af656013e1e49' }, - repository: { - type: 'git', - url: 'https://github.com/prisma/engines-wrapper.git', - directory: 'packages/engines-version', - }, - devDependencies: { '@types/node': '18.19.76', typescript: '4.9.5' }, - files: ['index.js', 'index.d.ts'], - scripts: { build: 'tsc -d' }, - }; -}); -var Hi = Ce((mr) => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); - Object.defineProperty(mr, '__esModule', { value: !0 }); - mr.enginesVersion = void 0; - mr.enginesVersion = hn().prisma.enginesVersion; -}); -var Zi = Ce((Kf, Yi) => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); - Yi.exports = (e, t = 1, r) => { - if (((r = { indent: ' ', includeEmptyLines: !1, ...r }), typeof e != 'string')) - throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``); - if (typeof t != 'number') throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``); - if (typeof r.indent != 'string') - throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``); - if (t === 0) return e; - let n = r.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - return e.replace(n, r.indent.repeat(t)); - }; -}); -var to = Ce((od, eo) => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); - eo.exports = ({ onlyFirst: e = !1 } = {}) => { - let t = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))', - ].join('|'); - return new RegExp(t, e ? void 0 : 'g'); - }; -}); -var no = Ce((pd, ro) => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); - var kl = to(); - ro.exports = (e) => (typeof e == 'string' ? e.replace(kl(), '') : e); -}); -var Rn = Ce((Jy, Po) => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); - Po.exports = (function () { - function e(t, r, n, i, o) { - return t < r || n < r ? (t > n ? n + 1 : t + 1) : i === o ? r : r + 1; - } - return function (t, r) { - if (t === r) return 0; - if (t.length > r.length) { - var n = t; - ((t = r), (r = n)); - } - for (var i = t.length, o = r.length; i > 0 && t.charCodeAt(i - 1) === r.charCodeAt(o - 1); ) (i--, o--); - for (var s = 0; s < i && t.charCodeAt(s) === r.charCodeAt(s); ) s++; - if (((i -= s), (o -= s), i === 0 || o < 3)) return o; - var a = 0, - l, - d, - g, - h, - T, - I, - S, - R, - M, - F, - B, - O, - L = []; - for (l = 0; l < i; l++) (L.push(l + 1), L.push(t.charCodeAt(s + l))); - for (var oe = L.length - 1; a < o - 3; ) - for ( - M = r.charCodeAt(s + (d = a)), - F = r.charCodeAt(s + (g = a + 1)), - B = r.charCodeAt(s + (h = a + 2)), - O = r.charCodeAt(s + (T = a + 3)), - I = a += 4, - l = 0; - l < oe; - l += 2 - ) - ((S = L[l]), - (R = L[l + 1]), - (d = e(S, d, g, M, R)), - (g = e(d, g, h, F, R)), - (h = e(g, h, T, B, R)), - (I = e(h, T, I, O, R)), - (L[l] = I), - (T = h), - (h = g), - (g = d), - (d = S)); - for (; a < o; ) - for (M = r.charCodeAt(s + (d = a)), I = ++a, l = 0; l < oe; l += 2) - ((S = L[l]), (L[l] = I = e(S, d, I, M, L[l + 1])), (d = S)); - return I; - }; - })(); -}); -var Ro = fe(() => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); -}); -var So = fe(() => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); -}); -var Vr, - Ho = fe(() => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); - Vr = class { - events = {}; - on(t, r) { - return (this.events[t] || (this.events[t] = []), this.events[t].push(r), this); - } - emit(t, ...r) { - return this.events[t] - ? (this.events[t].forEach((n) => { - n(...r); - }), - !0) - : !1; - } - }; - }); -f(); -u(); -c(); -p(); -m(); -var Ci = {}; -or(Ci, { defineExtension: () => Ti, getExtensionContext: () => Ai }); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -function Ti(e) { - return typeof e == 'function' ? e : (t) => t.$extends(e); -} -f(); -u(); -c(); -p(); -m(); -function Ai(e) { - return e; -} -var Si = {}; -or(Si, { validator: () => Ri }); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -function Ri(...e) { - return (t) => t; -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var mn, - Ii, - Oi, - ki, - Di = !0; -typeof y < 'u' && - (({ FORCE_COLOR: mn, NODE_DISABLE_COLORS: Ii, NO_COLOR: Oi, TERM: ki } = y.env || {}), - (Di = y.stdout && y.stdout.isTTY)); -var Qa = { enabled: !Ii && Oi == null && ki !== 'dumb' && ((mn != null && mn !== '0') || Di) }; -function j(e, t) { - let r = new RegExp(`\\x1b\\[${t}m`, 'g'), - n = `\x1B[${e}m`, - i = `\x1B[${t}m`; - return function (o) { - return !Qa.enabled || o == null ? o : n + (~('' + o).indexOf(i) ? o.replace(r, i + n) : o) + i; - }; -} -var vm = j(0, 0), - lr = j(1, 22), - ur = j(2, 22), - Tm = j(3, 23), - Mi = j(4, 24), - Am = j(7, 27), - Cm = j(8, 28), - Rm = j(9, 29), - Sm = j(30, 39), - Ye = j(31, 39), - _i = j(32, 39), - Ni = j(33, 39), - Fi = j(34, 39), - Im = j(35, 39), - Li = j(36, 39), - Om = j(37, 39), - Ui = j(90, 39), - km = j(90, 39), - Dm = j(40, 49), - Mm = j(41, 49), - _m = j(42, 49), - Nm = j(43, 49), - Fm = j(44, 49), - Lm = j(45, 49), - Um = j(46, 49), - Bm = j(47, 49); -f(); -u(); -c(); -p(); -m(); -var Ka = 100, - Bi = ['green', 'yellow', 'blue', 'magenta', 'cyan', 'red'], - cr = [], - qi = Date.now(), - Wa = 0, - fn = typeof y < 'u' ? y.env : {}; -globalThis.DEBUG ??= fn.DEBUG ?? ''; -globalThis.DEBUG_COLORS ??= fn.DEBUG_COLORS ? fn.DEBUG_COLORS === 'true' : !0; -var Pt = { - enable(e) { - typeof e == 'string' && (globalThis.DEBUG = e); - }, - disable() { - let e = globalThis.DEBUG; - return ((globalThis.DEBUG = ''), e); - }, - enabled(e) { - let t = globalThis.DEBUG.split(',').map((i) => i.replace(/[.+?^${}()|[\]\\]/g, '\\$&')), - r = t.some((i) => (i === '' || i[0] === '-' ? !1 : e.match(RegExp(i.split('*').join('.*') + '$')))), - n = t.some((i) => (i === '' || i[0] !== '-' ? !1 : e.match(RegExp(i.slice(1).split('*').join('.*') + '$')))); - return r && !n; - }, - log: (...e) => { - let [t, r, ...n] = e; - (console.warn ?? console.log)(`${t} ${r}`, ...n); - }, - formatters: {}, -}; -function Ha(e) { - let t = { color: Bi[Wa++ % Bi.length], enabled: Pt.enabled(e), namespace: e, log: Pt.log, extend: () => {} }, - r = (...n) => { - let { enabled: i, namespace: o, color: s, log: a } = t; - if ((n.length !== 0 && cr.push([o, ...n]), cr.length > Ka && cr.shift(), Pt.enabled(o) || i)) { - let l = n.map((g) => (typeof g == 'string' ? g : za(g))), - d = `+${Date.now() - qi}ms`; - ((qi = Date.now()), a(o, ...l, d)); - } - }; - return new Proxy(r, { get: (n, i) => t[i], set: (n, i, o) => (t[i] = o) }); -} -var Z = new Proxy(Ha, { get: (e, t) => Pt[t], set: (e, t, r) => (Pt[t] = r) }); -function za(e, t = 2) { - let r = new Set(); - return JSON.stringify( - e, - (n, i) => { - if (typeof i == 'object' && i !== null) { - if (r.has(i)) return '[Circular *]'; - r.add(i); - } else if (typeof i == 'bigint') return i.toString(); - return i; - }, - t - ); -} -function Vi() { - cr.length = 0; -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var vl = Wi(), - gn = vl.version; -f(); -u(); -c(); -p(); -m(); -function Ze(e) { - let t = Tl(); - return ( - t || - (e?.config.engineType === 'library' - ? 'library' - : e?.config.engineType === 'binary' - ? 'binary' - : e?.config.engineType === 'client' - ? 'client' - : Al(e)) - ); -} -function Tl() { - let e = y.env.PRISMA_CLIENT_ENGINE_TYPE; - return e === 'library' ? 'library' : e === 'binary' ? 'binary' : e === 'client' ? 'client' : void 0; -} -function Al(e) { - return e?.previewFeatures.includes('queryCompiler') ? 'client' : 'library'; -} -f(); -u(); -c(); -p(); -m(); -var zi = 'prisma+postgres', - fr = `${zi}:`; -function dr(e) { - return e?.toString().startsWith(`${fr}//`) ?? !1; -} -function yn(e) { - if (!dr(e)) return !1; - let { host: t } = new URL(e); - return t.includes('localhost') || t.includes('127.0.0.1') || t.includes('[::1]'); -} -var Tt = {}; -or(Tt, { - error: () => Il, - info: () => Sl, - log: () => Rl, - query: () => Ol, - should: () => Xi, - tags: () => vt, - warn: () => wn, -}); -f(); -u(); -c(); -p(); -m(); -var vt = { error: Ye('prisma:error'), warn: Ni('prisma:warn'), info: Li('prisma:info'), query: Fi('prisma:query') }, - Xi = { warn: () => !y.env.PRISMA_DISABLE_WARNINGS }; -function Rl(...e) { - console.log(...e); -} -function wn(e, ...t) { - Xi.warn() && console.warn(`${vt.warn} ${e}`, ...t); -} -function Sl(e, ...t) { - console.info(`${vt.info} ${e}`, ...t); -} -function Il(e, ...t) { - console.error(`${vt.error} ${e}`, ...t); -} -function Ol(e, ...t) { - console.log(`${vt.query} ${e}`, ...t); -} -f(); -u(); -c(); -p(); -m(); -function qe(e, t) { - throw new Error(t); -} -f(); -u(); -c(); -p(); -m(); -function En(e, t) { - return Object.prototype.hasOwnProperty.call(e, t); -} -f(); -u(); -c(); -p(); -m(); -function gr(e, t) { - let r = {}; - for (let n of Object.keys(e)) r[n] = t(e[n], n); - return r; -} -f(); -u(); -c(); -p(); -m(); -function bn(e, t) { - if (e.length === 0) return; - let r = e[0]; - for (let n = 1; n < e.length; n++) t(r, e[n]) < 0 && (r = e[n]); - return r; -} -f(); -u(); -c(); -p(); -m(); -function N(e, t) { - Object.defineProperty(e, 'name', { value: t, configurable: !0 }); -} -f(); -u(); -c(); -p(); -m(); -var io = new Set(), - hr = (e, t, ...r) => { - io.has(e) || (io.add(e), wn(t, ...r)); - }; -var Q = class e extends Error { - clientVersion; - errorCode; - retryable; - constructor(t, r, n) { - (super(t), - (this.name = 'PrismaClientInitializationError'), - (this.clientVersion = r), - (this.errorCode = n), - Error.captureStackTrace(e)); - } - get [Symbol.toStringTag]() { - return 'PrismaClientInitializationError'; - } -}; -N(Q, 'PrismaClientInitializationError'); -f(); -u(); -c(); -p(); -m(); -var se = class extends Error { - code; - meta; - clientVersion; - batchRequestIdx; - constructor(t, { code: r, clientVersion: n, meta: i, batchRequestIdx: o }) { - (super(t), - (this.name = 'PrismaClientKnownRequestError'), - (this.code = r), - (this.clientVersion = n), - (this.meta = i), - Object.defineProperty(this, 'batchRequestIdx', { value: o, enumerable: !1, writable: !0 })); - } - get [Symbol.toStringTag]() { - return 'PrismaClientKnownRequestError'; - } -}; -N(se, 'PrismaClientKnownRequestError'); -f(); -u(); -c(); -p(); -m(); -var Se = class extends Error { - clientVersion; - constructor(t, r) { - (super(t), (this.name = 'PrismaClientRustPanicError'), (this.clientVersion = r)); - } - get [Symbol.toStringTag]() { - return 'PrismaClientRustPanicError'; - } -}; -N(Se, 'PrismaClientRustPanicError'); -f(); -u(); -c(); -p(); -m(); -var ae = class extends Error { - clientVersion; - batchRequestIdx; - constructor(t, { clientVersion: r, batchRequestIdx: n }) { - (super(t), - (this.name = 'PrismaClientUnknownRequestError'), - (this.clientVersion = r), - Object.defineProperty(this, 'batchRequestIdx', { value: n, writable: !0, enumerable: !1 })); - } - get [Symbol.toStringTag]() { - return 'PrismaClientUnknownRequestError'; - } -}; -N(ae, 'PrismaClientUnknownRequestError'); -f(); -u(); -c(); -p(); -m(); -var ee = class extends Error { - name = 'PrismaClientValidationError'; - clientVersion; - constructor(t, { clientVersion: r }) { - (super(t), (this.clientVersion = r)); - } - get [Symbol.toStringTag]() { - return 'PrismaClientValidationError'; - } -}; -N(ee, 'PrismaClientValidationError'); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var ge = class { - _map = new Map(); - get(t) { - return this._map.get(t)?.value; - } - set(t, r) { - this._map.set(t, { value: r }); - } - getOrCreate(t, r) { - let n = this._map.get(t); - if (n) return n.value; - let i = r(); - return (this.set(t, i), i); - } -}; -f(); -u(); -c(); -p(); -m(); -function Ie(e) { - return e.substring(0, 1).toLowerCase() + e.substring(1); -} -f(); -u(); -c(); -p(); -m(); -function so(e, t) { - let r = {}; - for (let n of e) { - let i = n[t]; - r[i] = n; - } - return r; -} -f(); -u(); -c(); -p(); -m(); -function At(e) { - let t; - return { - get() { - return (t || (t = { value: e() }), t.value); - }, - }; -} -f(); -u(); -c(); -p(); -m(); -function Dl(e) { - return { models: xn(e.models), enums: xn(e.enums), types: xn(e.types) }; -} -function xn(e) { - let t = {}; - for (let { name: r, ...n } of e) t[r] = n; - return t; -} -f(); -u(); -c(); -p(); -m(); -function Xe(e) { - return e instanceof Date || Object.prototype.toString.call(e) === '[object Date]'; -} -function yr(e) { - return e.toString() !== 'Invalid Date'; -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var et = 9e15, - Me = 1e9, - Pn = '0123456789abcdef', - br = - '2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058', - xr = - '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789', - vn = { precision: 20, rounding: 4, modulo: 1, toExpNeg: -7, toExpPos: 21, minE: -et, maxE: et, crypto: !1 }, - co, - Pe, - _ = !0, - vr = '[DecimalError] ', - De = vr + 'Invalid argument: ', - po = vr + 'Precision limit exceeded', - mo = vr + 'crypto unavailable', - fo = '[object Decimal]', - X = Math.floor, - K = Math.pow, - Ml = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, - _l = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, - Nl = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, - go = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, - pe = 1e7, - D = 7, - Fl = 9007199254740991, - Ll = br.length - 1, - Tn = xr.length - 1, - C = { toStringTag: fo }; -C.absoluteValue = C.abs = function () { - var e = new this.constructor(this); - return (e.s < 0 && (e.s = 1), k(e)); -}; -C.ceil = function () { - return k(new this.constructor(this), this.e + 1, 2); -}; -C.clampedTo = C.clamp = function (e, t) { - var r, - n = this, - i = n.constructor; - if (((e = new i(e)), (t = new i(t)), !e.s || !t.s)) return new i(NaN); - if (e.gt(t)) throw Error(De + t); - return ((r = n.cmp(e)), r < 0 ? e : n.cmp(t) > 0 ? t : new i(n)); -}; -C.comparedTo = C.cmp = function (e) { - var t, - r, - n, - i, - o = this, - s = o.d, - a = (e = new o.constructor(e)).d, - l = o.s, - d = e.s; - if (!s || !a) return !l || !d ? NaN : l !== d ? l : s === a ? 0 : !s ^ (l < 0) ? 1 : -1; - if (!s[0] || !a[0]) return s[0] ? l : a[0] ? -d : 0; - if (l !== d) return l; - if (o.e !== e.e) return (o.e > e.e) ^ (l < 0) ? 1 : -1; - for (n = s.length, i = a.length, t = 0, r = n < i ? n : i; t < r; ++t) - if (s[t] !== a[t]) return (s[t] > a[t]) ^ (l < 0) ? 1 : -1; - return n === i ? 0 : (n > i) ^ (l < 0) ? 1 : -1; -}; -C.cosine = C.cos = function () { - var e, - t, - r = this, - n = r.constructor; - return r.d - ? r.d[0] - ? ((e = n.precision), - (t = n.rounding), - (n.precision = e + Math.max(r.e, r.sd()) + D), - (n.rounding = 1), - (r = Ul(n, bo(n, r))), - (n.precision = e), - (n.rounding = t), - k(Pe == 2 || Pe == 3 ? r.neg() : r, e, t, !0)) - : new n(1) - : new n(NaN); -}; -C.cubeRoot = C.cbrt = function () { - var e, - t, - r, - n, - i, - o, - s, - a, - l, - d, - g = this, - h = g.constructor; - if (!g.isFinite() || g.isZero()) return new h(g); - for ( - _ = !1, - o = g.s * K(g.s * g, 1 / 3), - !o || Math.abs(o) == 1 / 0 - ? ((r = z(g.d)), - (e = g.e), - (o = (e - r.length + 1) % 3) && (r += o == 1 || o == -2 ? '0' : '00'), - (o = K(r, 1 / 3)), - (e = X((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2))), - o == 1 / 0 ? (r = '5e' + e) : ((r = o.toExponential()), (r = r.slice(0, r.indexOf('e') + 1) + e)), - (n = new h(r)), - (n.s = g.s)) - : (n = new h(o.toString())), - s = (e = h.precision) + 3; - ; - - ) - if ( - ((a = n), - (l = a.times(a).times(a)), - (d = l.plus(g)), - (n = V(d.plus(g).times(a), d.plus(l), s + 2, 1)), - z(a.d).slice(0, s) === (r = z(n.d)).slice(0, s)) - ) - if (((r = r.slice(s - 3, s + 1)), r == '9999' || (!i && r == '4999'))) { - if (!i && (k(a, e + 1, 0), a.times(a).times(a).eq(g))) { - n = a; - break; - } - ((s += 4), (i = 1)); - } else { - (!+r || (!+r.slice(1) && r.charAt(0) == '5')) && (k(n, e + 1, 1), (t = !n.times(n).times(n).eq(g))); - break; - } - return ((_ = !0), k(n, e, h.rounding, t)); -}; -C.decimalPlaces = C.dp = function () { - var e, - t = this.d, - r = NaN; - if (t) { - if (((e = t.length - 1), (r = (e - X(this.e / D)) * D), (e = t[e]), e)) for (; e % 10 == 0; e /= 10) r--; - r < 0 && (r = 0); - } - return r; -}; -C.dividedBy = C.div = function (e) { - return V(this, new this.constructor(e)); -}; -C.dividedToIntegerBy = C.divToInt = function (e) { - var t = this, - r = t.constructor; - return k(V(t, new r(e), 0, 1, 1), r.precision, r.rounding); -}; -C.equals = C.eq = function (e) { - return this.cmp(e) === 0; -}; -C.floor = function () { - return k(new this.constructor(this), this.e + 1, 3); -}; -C.greaterThan = C.gt = function (e) { - return this.cmp(e) > 0; -}; -C.greaterThanOrEqualTo = C.gte = function (e) { - var t = this.cmp(e); - return t == 1 || t === 0; -}; -C.hyperbolicCosine = C.cosh = function () { - var e, - t, - r, - n, - i, - o = this, - s = o.constructor, - a = new s(1); - if (!o.isFinite()) return new s(o.s ? 1 / 0 : NaN); - if (o.isZero()) return a; - ((r = s.precision), - (n = s.rounding), - (s.precision = r + Math.max(o.e, o.sd()) + 4), - (s.rounding = 1), - (i = o.d.length), - i < 32 - ? ((e = Math.ceil(i / 3)), (t = (1 / Ar(4, e)).toString())) - : ((e = 16), (t = '2.3283064365386962890625e-10')), - (o = tt(s, 1, o.times(t), new s(1), !0))); - for (var l, d = e, g = new s(8); d--; ) ((l = o.times(o)), (o = a.minus(l.times(g.minus(l.times(g)))))); - return k(o, (s.precision = r), (s.rounding = n), !0); -}; -C.hyperbolicSine = C.sinh = function () { - var e, - t, - r, - n, - i = this, - o = i.constructor; - if (!i.isFinite() || i.isZero()) return new o(i); - if ( - ((t = o.precision), - (r = o.rounding), - (o.precision = t + Math.max(i.e, i.sd()) + 4), - (o.rounding = 1), - (n = i.d.length), - n < 3) - ) - i = tt(o, 2, i, i, !0); - else { - ((e = 1.4 * Math.sqrt(n)), (e = e > 16 ? 16 : e | 0), (i = i.times(1 / Ar(5, e))), (i = tt(o, 2, i, i, !0))); - for (var s, a = new o(5), l = new o(16), d = new o(20); e--; ) - ((s = i.times(i)), (i = i.times(a.plus(s.times(l.times(s).plus(d)))))); - } - return ((o.precision = t), (o.rounding = r), k(i, t, r, !0)); -}; -C.hyperbolicTangent = C.tanh = function () { - var e, - t, - r = this, - n = r.constructor; - return r.isFinite() - ? r.isZero() - ? new n(r) - : ((e = n.precision), - (t = n.rounding), - (n.precision = e + 7), - (n.rounding = 1), - V(r.sinh(), r.cosh(), (n.precision = e), (n.rounding = t))) - : new n(r.s); -}; -C.inverseCosine = C.acos = function () { - var e = this, - t = e.constructor, - r = e.abs().cmp(1), - n = t.precision, - i = t.rounding; - return r !== -1 - ? r === 0 - ? e.isNeg() - ? he(t, n, i) - : new t(0) - : new t(NaN) - : e.isZero() - ? he(t, n + 4, i).times(0.5) - : ((t.precision = n + 6), - (t.rounding = 1), - (e = new t(1).minus(e).div(e.plus(1)).sqrt().atan()), - (t.precision = n), - (t.rounding = i), - e.times(2)); -}; -C.inverseHyperbolicCosine = C.acosh = function () { - var e, - t, - r = this, - n = r.constructor; - return r.lte(1) - ? new n(r.eq(1) ? 0 : NaN) - : r.isFinite() - ? ((e = n.precision), - (t = n.rounding), - (n.precision = e + Math.max(Math.abs(r.e), r.sd()) + 4), - (n.rounding = 1), - (_ = !1), - (r = r.times(r).minus(1).sqrt().plus(r)), - (_ = !0), - (n.precision = e), - (n.rounding = t), - r.ln()) - : new n(r); -}; -C.inverseHyperbolicSine = C.asinh = function () { - var e, - t, - r = this, - n = r.constructor; - return !r.isFinite() || r.isZero() - ? new n(r) - : ((e = n.precision), - (t = n.rounding), - (n.precision = e + 2 * Math.max(Math.abs(r.e), r.sd()) + 6), - (n.rounding = 1), - (_ = !1), - (r = r.times(r).plus(1).sqrt().plus(r)), - (_ = !0), - (n.precision = e), - (n.rounding = t), - r.ln()); -}; -C.inverseHyperbolicTangent = C.atanh = function () { - var e, - t, - r, - n, - i = this, - o = i.constructor; - return i.isFinite() - ? i.e >= 0 - ? new o(i.abs().eq(1) ? i.s / 0 : i.isZero() ? i : NaN) - : ((e = o.precision), - (t = o.rounding), - (n = i.sd()), - Math.max(n, e) < 2 * -i.e - 1 - ? k(new o(i), e, t, !0) - : ((o.precision = r = n - i.e), - (i = V(i.plus(1), new o(1).minus(i), r + e, 1)), - (o.precision = e + 4), - (o.rounding = 1), - (i = i.ln()), - (o.precision = e), - (o.rounding = t), - i.times(0.5))) - : new o(NaN); -}; -C.inverseSine = C.asin = function () { - var e, - t, - r, - n, - i = this, - o = i.constructor; - return i.isZero() - ? new o(i) - : ((t = i.abs().cmp(1)), - (r = o.precision), - (n = o.rounding), - t !== -1 - ? t === 0 - ? ((e = he(o, r + 4, n).times(0.5)), (e.s = i.s), e) - : new o(NaN) - : ((o.precision = r + 6), - (o.rounding = 1), - (i = i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan()), - (o.precision = r), - (o.rounding = n), - i.times(2))); -}; -C.inverseTangent = C.atan = function () { - var e, - t, - r, - n, - i, - o, - s, - a, - l, - d = this, - g = d.constructor, - h = g.precision, - T = g.rounding; - if (d.isFinite()) { - if (d.isZero()) return new g(d); - if (d.abs().eq(1) && h + 4 <= Tn) return ((s = he(g, h + 4, T).times(0.25)), (s.s = d.s), s); - } else { - if (!d.s) return new g(NaN); - if (h + 4 <= Tn) return ((s = he(g, h + 4, T).times(0.5)), (s.s = d.s), s); - } - for (g.precision = a = h + 10, g.rounding = 1, r = Math.min(28, (a / D + 2) | 0), e = r; e; --e) - d = d.div(d.times(d).plus(1).sqrt().plus(1)); - for (_ = !1, t = Math.ceil(a / D), n = 1, l = d.times(d), s = new g(d), i = d; e !== -1; ) - if ( - ((i = i.times(l)), - (o = s.minus(i.div((n += 2)))), - (i = i.times(l)), - (s = o.plus(i.div((n += 2)))), - s.d[t] !== void 0) - ) - for (e = t; s.d[e] === o.d[e] && e--; ); - return (r && (s = s.times(2 << (r - 1))), (_ = !0), k(s, (g.precision = h), (g.rounding = T), !0)); -}; -C.isFinite = function () { - return !!this.d; -}; -C.isInteger = C.isInt = function () { - return !!this.d && X(this.e / D) > this.d.length - 2; -}; -C.isNaN = function () { - return !this.s; -}; -C.isNegative = C.isNeg = function () { - return this.s < 0; -}; -C.isPositive = C.isPos = function () { - return this.s > 0; -}; -C.isZero = function () { - return !!this.d && this.d[0] === 0; -}; -C.lessThan = C.lt = function (e) { - return this.cmp(e) < 0; -}; -C.lessThanOrEqualTo = C.lte = function (e) { - return this.cmp(e) < 1; -}; -C.logarithm = C.log = function (e) { - var t, - r, - n, - i, - o, - s, - a, - l, - d = this, - g = d.constructor, - h = g.precision, - T = g.rounding, - I = 5; - if (e == null) ((e = new g(10)), (t = !0)); - else { - if (((e = new g(e)), (r = e.d), e.s < 0 || !r || !r[0] || e.eq(1))) return new g(NaN); - t = e.eq(10); - } - if (((r = d.d), d.s < 0 || !r || !r[0] || d.eq(1))) - return new g(r && !r[0] ? -1 / 0 : d.s != 1 ? NaN : r ? 0 : 1 / 0); - if (t) - if (r.length > 1) o = !0; - else { - for (i = r[0]; i % 10 === 0; ) i /= 10; - o = i !== 1; - } - if ( - ((_ = !1), - (a = h + I), - (s = ke(d, a)), - (n = t ? Pr(g, a + 10) : ke(e, a)), - (l = V(s, n, a, 1)), - Ct(l.d, (i = h), T)) - ) - do - if (((a += 10), (s = ke(d, a)), (n = t ? Pr(g, a + 10) : ke(e, a)), (l = V(s, n, a, 1)), !o)) { - +z(l.d).slice(i + 1, i + 15) + 1 == 1e14 && (l = k(l, h + 1, 0)); - break; - } - while (Ct(l.d, (i += 10), T)); - return ((_ = !0), k(l, h, T)); -}; -C.minus = C.sub = function (e) { - var t, - r, - n, - i, - o, - s, - a, - l, - d, - g, - h, - T, - I = this, - S = I.constructor; - if (((e = new S(e)), !I.d || !e.d)) - return (!I.s || !e.s ? (e = new S(NaN)) : I.d ? (e.s = -e.s) : (e = new S(e.d || I.s !== e.s ? I : NaN)), e); - if (I.s != e.s) return ((e.s = -e.s), I.plus(e)); - if (((d = I.d), (T = e.d), (a = S.precision), (l = S.rounding), !d[0] || !T[0])) { - if (T[0]) e.s = -e.s; - else if (d[0]) e = new S(I); - else return new S(l === 3 ? -0 : 0); - return _ ? k(e, a, l) : e; - } - if (((r = X(e.e / D)), (g = X(I.e / D)), (d = d.slice()), (o = g - r), o)) { - for ( - h = o < 0, - h ? ((t = d), (o = -o), (s = T.length)) : ((t = T), (r = g), (s = d.length)), - n = Math.max(Math.ceil(a / D), s) + 2, - o > n && ((o = n), (t.length = 1)), - t.reverse(), - n = o; - n--; - - ) - t.push(0); - t.reverse(); - } else { - for (n = d.length, s = T.length, h = n < s, h && (s = n), n = 0; n < s; n++) - if (d[n] != T[n]) { - h = d[n] < T[n]; - break; - } - o = 0; - } - for (h && ((t = d), (d = T), (T = t), (e.s = -e.s)), s = d.length, n = T.length - s; n > 0; --n) d[s++] = 0; - for (n = T.length; n > o; ) { - if (d[--n] < T[n]) { - for (i = n; i && d[--i] === 0; ) d[i] = pe - 1; - (--d[i], (d[n] += pe)); - } - d[n] -= T[n]; - } - for (; d[--s] === 0; ) d.pop(); - for (; d[0] === 0; d.shift()) --r; - return d[0] ? ((e.d = d), (e.e = Tr(d, r)), _ ? k(e, a, l) : e) : new S(l === 3 ? -0 : 0); -}; -C.modulo = C.mod = function (e) { - var t, - r = this, - n = r.constructor; - return ( - (e = new n(e)), - !r.d || !e.s || (e.d && !e.d[0]) - ? new n(NaN) - : !e.d || (r.d && !r.d[0]) - ? k(new n(r), n.precision, n.rounding) - : ((_ = !1), - n.modulo == 9 ? ((t = V(r, e.abs(), 0, 3, 1)), (t.s *= e.s)) : (t = V(r, e, 0, n.modulo, 1)), - (t = t.times(e)), - (_ = !0), - r.minus(t)) - ); -}; -C.naturalExponential = C.exp = function () { - return An(this); -}; -C.naturalLogarithm = C.ln = function () { - return ke(this); -}; -C.negated = C.neg = function () { - var e = new this.constructor(this); - return ((e.s = -e.s), k(e)); -}; -C.plus = C.add = function (e) { - var t, - r, - n, - i, - o, - s, - a, - l, - d, - g, - h = this, - T = h.constructor; - if (((e = new T(e)), !h.d || !e.d)) - return (!h.s || !e.s ? (e = new T(NaN)) : h.d || (e = new T(e.d || h.s === e.s ? h : NaN)), e); - if (h.s != e.s) return ((e.s = -e.s), h.minus(e)); - if (((d = h.d), (g = e.d), (a = T.precision), (l = T.rounding), !d[0] || !g[0])) - return (g[0] || (e = new T(h)), _ ? k(e, a, l) : e); - if (((o = X(h.e / D)), (n = X(e.e / D)), (d = d.slice()), (i = o - n), i)) { - for ( - i < 0 ? ((r = d), (i = -i), (s = g.length)) : ((r = g), (n = o), (s = d.length)), - o = Math.ceil(a / D), - s = o > s ? o + 1 : s + 1, - i > s && ((i = s), (r.length = 1)), - r.reverse(); - i--; - - ) - r.push(0); - r.reverse(); - } - for (s = d.length, i = g.length, s - i < 0 && ((i = s), (r = g), (g = d), (d = r)), t = 0; i; ) - ((t = ((d[--i] = d[i] + g[i] + t) / pe) | 0), (d[i] %= pe)); - for (t && (d.unshift(t), ++n), s = d.length; d[--s] == 0; ) d.pop(); - return ((e.d = d), (e.e = Tr(d, n)), _ ? k(e, a, l) : e); -}; -C.precision = C.sd = function (e) { - var t, - r = this; - if (e !== void 0 && e !== !!e && e !== 1 && e !== 0) throw Error(De + e); - return (r.d ? ((t = ho(r.d)), e && r.e + 1 > t && (t = r.e + 1)) : (t = NaN), t); -}; -C.round = function () { - var e = this, - t = e.constructor; - return k(new t(e), e.e + 1, t.rounding); -}; -C.sine = C.sin = function () { - var e, - t, - r = this, - n = r.constructor; - return r.isFinite() - ? r.isZero() - ? new n(r) - : ((e = n.precision), - (t = n.rounding), - (n.precision = e + Math.max(r.e, r.sd()) + D), - (n.rounding = 1), - (r = ql(n, bo(n, r))), - (n.precision = e), - (n.rounding = t), - k(Pe > 2 ? r.neg() : r, e, t, !0)) - : new n(NaN); -}; -C.squareRoot = C.sqrt = function () { - var e, - t, - r, - n, - i, - o, - s = this, - a = s.d, - l = s.e, - d = s.s, - g = s.constructor; - if (d !== 1 || !a || !a[0]) return new g(!d || (d < 0 && (!a || a[0])) ? NaN : a ? s : 1 / 0); - for ( - _ = !1, - d = Math.sqrt(+s), - d == 0 || d == 1 / 0 - ? ((t = z(a)), - (t.length + l) % 2 == 0 && (t += '0'), - (d = Math.sqrt(t)), - (l = X((l + 1) / 2) - (l < 0 || l % 2)), - d == 1 / 0 ? (t = '5e' + l) : ((t = d.toExponential()), (t = t.slice(0, t.indexOf('e') + 1) + l)), - (n = new g(t))) - : (n = new g(d.toString())), - r = (l = g.precision) + 3; - ; - - ) - if (((o = n), (n = o.plus(V(s, o, r + 2, 1)).times(0.5)), z(o.d).slice(0, r) === (t = z(n.d)).slice(0, r))) - if (((t = t.slice(r - 3, r + 1)), t == '9999' || (!i && t == '4999'))) { - if (!i && (k(o, l + 1, 0), o.times(o).eq(s))) { - n = o; - break; - } - ((r += 4), (i = 1)); - } else { - (!+t || (!+t.slice(1) && t.charAt(0) == '5')) && (k(n, l + 1, 1), (e = !n.times(n).eq(s))); - break; - } - return ((_ = !0), k(n, l, g.rounding, e)); -}; -C.tangent = C.tan = function () { - var e, - t, - r = this, - n = r.constructor; - return r.isFinite() - ? r.isZero() - ? new n(r) - : ((e = n.precision), - (t = n.rounding), - (n.precision = e + 10), - (n.rounding = 1), - (r = r.sin()), - (r.s = 1), - (r = V(r, new n(1).minus(r.times(r)).sqrt(), e + 10, 0)), - (n.precision = e), - (n.rounding = t), - k(Pe == 2 || Pe == 4 ? r.neg() : r, e, t, !0)) - : new n(NaN); -}; -C.times = C.mul = function (e) { - var t, - r, - n, - i, - o, - s, - a, - l, - d, - g = this, - h = g.constructor, - T = g.d, - I = (e = new h(e)).d; - if (((e.s *= g.s), !T || !T[0] || !I || !I[0])) - return new h(!e.s || (T && !T[0] && !I) || (I && !I[0] && !T) ? NaN : !T || !I ? e.s / 0 : e.s * 0); - for ( - r = X(g.e / D) + X(e.e / D), - l = T.length, - d = I.length, - l < d && ((o = T), (T = I), (I = o), (s = l), (l = d), (d = s)), - o = [], - s = l + d, - n = s; - n--; - - ) - o.push(0); - for (n = d; --n >= 0; ) { - for (t = 0, i = l + n; i > n; ) ((a = o[i] + I[n] * T[i - n - 1] + t), (o[i--] = a % pe | 0), (t = (a / pe) | 0)); - o[i] = (o[i] + t) % pe | 0; - } - for (; !o[--s]; ) o.pop(); - return (t ? ++r : o.shift(), (e.d = o), (e.e = Tr(o, r)), _ ? k(e, h.precision, h.rounding) : e); -}; -C.toBinary = function (e, t) { - return Cn(this, 2, e, t); -}; -C.toDecimalPlaces = C.toDP = function (e, t) { - var r = this, - n = r.constructor; - return ( - (r = new n(r)), - e === void 0 ? r : (ne(e, 0, Me), t === void 0 ? (t = n.rounding) : ne(t, 0, 8), k(r, e + r.e + 1, t)) - ); -}; -C.toExponential = function (e, t) { - var r, - n = this, - i = n.constructor; - return ( - e === void 0 - ? (r = ye(n, !0)) - : (ne(e, 0, Me), - t === void 0 ? (t = i.rounding) : ne(t, 0, 8), - (n = k(new i(n), e + 1, t)), - (r = ye(n, !0, e + 1))), - n.isNeg() && !n.isZero() ? '-' + r : r - ); -}; -C.toFixed = function (e, t) { - var r, - n, - i = this, - o = i.constructor; - return ( - e === void 0 - ? (r = ye(i)) - : (ne(e, 0, Me), - t === void 0 ? (t = o.rounding) : ne(t, 0, 8), - (n = k(new o(i), e + i.e + 1, t)), - (r = ye(n, !1, e + n.e + 1))), - i.isNeg() && !i.isZero() ? '-' + r : r - ); -}; -C.toFraction = function (e) { - var t, - r, - n, - i, - o, - s, - a, - l, - d, - g, - h, - T, - I = this, - S = I.d, - R = I.constructor; - if (!S) return new R(I); - if ( - ((d = r = new R(1)), - (n = l = new R(0)), - (t = new R(n)), - (o = t.e = ho(S) - I.e - 1), - (s = o % D), - (t.d[0] = K(10, s < 0 ? D + s : s)), - e == null) - ) - e = o > 0 ? t : d; - else { - if (((a = new R(e)), !a.isInt() || a.lt(d))) throw Error(De + a); - e = a.gt(t) ? (o > 0 ? t : d) : a; - } - for ( - _ = !1, a = new R(z(S)), g = R.precision, R.precision = o = S.length * D * 2; - (h = V(a, t, 0, 1, 1)), (i = r.plus(h.times(n))), i.cmp(e) != 1; - - ) - ((r = n), (n = i), (i = d), (d = l.plus(h.times(i))), (l = i), (i = t), (t = a.minus(h.times(i))), (a = i)); - return ( - (i = V(e.minus(r), n, 0, 1, 1)), - (l = l.plus(i.times(d))), - (r = r.plus(i.times(n))), - (l.s = d.s = I.s), - (T = - V(d, n, o, 1) - .minus(I) - .abs() - .cmp(V(l, r, o, 1).minus(I).abs()) < 1 - ? [d, n] - : [l, r]), - (R.precision = g), - (_ = !0), - T - ); -}; -C.toHexadecimal = C.toHex = function (e, t) { - return Cn(this, 16, e, t); -}; -C.toNearest = function (e, t) { - var r = this, - n = r.constructor; - if (((r = new n(r)), e == null)) { - if (!r.d) return r; - ((e = new n(1)), (t = n.rounding)); - } else { - if (((e = new n(e)), t === void 0 ? (t = n.rounding) : ne(t, 0, 8), !r.d)) return e.s ? r : e; - if (!e.d) return (e.s && (e.s = r.s), e); - } - return (e.d[0] ? ((_ = !1), (r = V(r, e, 0, t, 1).times(e)), (_ = !0), k(r)) : ((e.s = r.s), (r = e)), r); -}; -C.toNumber = function () { - return +this; -}; -C.toOctal = function (e, t) { - return Cn(this, 8, e, t); -}; -C.toPower = C.pow = function (e) { - var t, - r, - n, - i, - o, - s, - a = this, - l = a.constructor, - d = +(e = new l(e)); - if (!a.d || !e.d || !a.d[0] || !e.d[0]) return new l(K(+a, d)); - if (((a = new l(a)), a.eq(1))) return a; - if (((n = l.precision), (o = l.rounding), e.eq(1))) return k(a, n, o); - if (((t = X(e.e / D)), t >= e.d.length - 1 && (r = d < 0 ? -d : d) <= Fl)) - return ((i = yo(l, a, r, n)), e.s < 0 ? new l(1).div(i) : k(i, n, o)); - if (((s = a.s), s < 0)) { - if (t < e.d.length - 1) return new l(NaN); - if (((e.d[t] & 1) == 0 && (s = 1), a.e == 0 && a.d[0] == 1 && a.d.length == 1)) return ((a.s = s), a); - } - return ( - (r = K(+a, d)), - (t = r == 0 || !isFinite(r) ? X(d * (Math.log('0.' + z(a.d)) / Math.LN10 + a.e + 1)) : new l(r + '').e), - t > l.maxE + 1 || t < l.minE - 1 - ? new l(t > 0 ? s / 0 : 0) - : ((_ = !1), - (l.rounding = a.s = 1), - (r = Math.min(12, (t + '').length)), - (i = An(e.times(ke(a, n + r)), n)), - i.d && - ((i = k(i, n + 5, 1)), - Ct(i.d, n, o) && - ((t = n + 10), - (i = k(An(e.times(ke(a, t + r)), t), t + 5, 1)), - +z(i.d).slice(n + 1, n + 15) + 1 == 1e14 && (i = k(i, n + 1, 0)))), - (i.s = s), - (_ = !0), - (l.rounding = o), - k(i, n, o)) - ); -}; -C.toPrecision = function (e, t) { - var r, - n = this, - i = n.constructor; - return ( - e === void 0 - ? (r = ye(n, n.e <= i.toExpNeg || n.e >= i.toExpPos)) - : (ne(e, 1, Me), - t === void 0 ? (t = i.rounding) : ne(t, 0, 8), - (n = k(new i(n), e, t)), - (r = ye(n, e <= n.e || n.e <= i.toExpNeg, e))), - n.isNeg() && !n.isZero() ? '-' + r : r - ); -}; -C.toSignificantDigits = C.toSD = function (e, t) { - var r = this, - n = r.constructor; - return ( - e === void 0 - ? ((e = n.precision), (t = n.rounding)) - : (ne(e, 1, Me), t === void 0 ? (t = n.rounding) : ne(t, 0, 8)), - k(new n(r), e, t) - ); -}; -C.toString = function () { - var e = this, - t = e.constructor, - r = ye(e, e.e <= t.toExpNeg || e.e >= t.toExpPos); - return e.isNeg() && !e.isZero() ? '-' + r : r; -}; -C.truncated = C.trunc = function () { - return k(new this.constructor(this), this.e + 1, 1); -}; -C.valueOf = C.toJSON = function () { - var e = this, - t = e.constructor, - r = ye(e, e.e <= t.toExpNeg || e.e >= t.toExpPos); - return e.isNeg() ? '-' + r : r; -}; -function z(e) { - var t, - r, - n, - i = e.length - 1, - o = '', - s = e[0]; - if (i > 0) { - for (o += s, t = 1; t < i; t++) ((n = e[t] + ''), (r = D - n.length), r && (o += Oe(r)), (o += n)); - ((s = e[t]), (n = s + ''), (r = D - n.length), r && (o += Oe(r))); - } else if (s === 0) return '0'; - for (; s % 10 === 0; ) s /= 10; - return o + s; -} -function ne(e, t, r) { - if (e !== ~~e || e < t || e > r) throw Error(De + e); -} -function Ct(e, t, r, n) { - var i, o, s, a; - for (o = e[0]; o >= 10; o /= 10) --t; - return ( - --t < 0 ? ((t += D), (i = 0)) : ((i = Math.ceil((t + 1) / D)), (t %= D)), - (o = K(10, D - t)), - (a = e[i] % o | 0), - n == null - ? t < 3 - ? (t == 0 ? (a = (a / 100) | 0) : t == 1 && (a = (a / 10) | 0), - (s = (r < 4 && a == 99999) || (r > 3 && a == 49999) || a == 5e4 || a == 0)) - : (s = - (((r < 4 && a + 1 == o) || (r > 3 && a + 1 == o / 2)) && ((e[i + 1] / o / 100) | 0) == K(10, t - 2) - 1) || - ((a == o / 2 || a == 0) && ((e[i + 1] / o / 100) | 0) == 0)) - : t < 4 - ? (t == 0 ? (a = (a / 1e3) | 0) : t == 1 ? (a = (a / 100) | 0) : t == 2 && (a = (a / 10) | 0), - (s = ((n || r < 4) && a == 9999) || (!n && r > 3 && a == 4999))) - : (s = - (((n || r < 4) && a + 1 == o) || (!n && r > 3 && a + 1 == o / 2)) && - ((e[i + 1] / o / 1e3) | 0) == K(10, t - 3) - 1), - s - ); -} -function wr(e, t, r) { - for (var n, i = [0], o, s = 0, a = e.length; s < a; ) { - for (o = i.length; o--; ) i[o] *= t; - for (i[0] += Pn.indexOf(e.charAt(s++)), n = 0; n < i.length; n++) - i[n] > r - 1 && (i[n + 1] === void 0 && (i[n + 1] = 0), (i[n + 1] += (i[n] / r) | 0), (i[n] %= r)); - } - return i.reverse(); -} -function Ul(e, t) { - var r, n, i; - if (t.isZero()) return t; - ((n = t.d.length), - n < 32 - ? ((r = Math.ceil(n / 3)), (i = (1 / Ar(4, r)).toString())) - : ((r = 16), (i = '2.3283064365386962890625e-10')), - (e.precision += r), - (t = tt(e, 1, t.times(i), new e(1)))); - for (var o = r; o--; ) { - var s = t.times(t); - t = s.times(s).minus(s).times(8).plus(1); - } - return ((e.precision -= r), t); -} -var V = (function () { - function e(n, i, o) { - var s, - a = 0, - l = n.length; - for (n = n.slice(); l--; ) ((s = n[l] * i + a), (n[l] = s % o | 0), (a = (s / o) | 0)); - return (a && n.unshift(a), n); - } - function t(n, i, o, s) { - var a, l; - if (o != s) l = o > s ? 1 : -1; - else - for (a = l = 0; a < o; a++) - if (n[a] != i[a]) { - l = n[a] > i[a] ? 1 : -1; - break; - } - return l; - } - function r(n, i, o, s) { - for (var a = 0; o--; ) ((n[o] -= a), (a = n[o] < i[o] ? 1 : 0), (n[o] = a * s + n[o] - i[o])); - for (; !n[0] && n.length > 1; ) n.shift(); - } - return function (n, i, o, s, a, l) { - var d, - g, - h, - T, - I, - S, - R, - M, - F, - B, - O, - L, - oe, - J, - en, - rr, - bt, - tn, - ce, - nr, - ir = n.constructor, - rn = n.s == i.s ? 1 : -1, - Y = n.d, - $ = i.d; - if (!Y || !Y[0] || !$ || !$[0]) - return new ir(!n.s || !i.s || (Y ? $ && Y[0] == $[0] : !$) ? NaN : (Y && Y[0] == 0) || !$ ? rn * 0 : rn / 0); - for ( - l ? ((I = 1), (g = n.e - i.e)) : ((l = pe), (I = D), (g = X(n.e / I) - X(i.e / I))), - ce = $.length, - bt = Y.length, - F = new ir(rn), - B = F.d = [], - h = 0; - $[h] == (Y[h] || 0); - h++ - ); - if ( - ($[h] > (Y[h] || 0) && g--, - o == null ? ((J = o = ir.precision), (s = ir.rounding)) : a ? (J = o + (n.e - i.e) + 1) : (J = o), - J < 0) - ) - (B.push(1), (S = !0)); - else { - if (((J = (J / I + 2) | 0), (h = 0), ce == 1)) { - for (T = 0, $ = $[0], J++; (h < bt || T) && J--; h++) - ((en = T * l + (Y[h] || 0)), (B[h] = (en / $) | 0), (T = en % $ | 0)); - S = T || h < bt; - } else { - for ( - T = (l / ($[0] + 1)) | 0, - T > 1 && (($ = e($, T, l)), (Y = e(Y, T, l)), (ce = $.length), (bt = Y.length)), - rr = ce, - O = Y.slice(0, ce), - L = O.length; - L < ce; - - ) - O[L++] = 0; - ((nr = $.slice()), nr.unshift(0), (tn = $[0]), $[1] >= l / 2 && ++tn); - do - ((T = 0), - (d = t($, O, ce, L)), - d < 0 - ? ((oe = O[0]), - ce != L && (oe = oe * l + (O[1] || 0)), - (T = (oe / tn) | 0), - T > 1 - ? (T >= l && (T = l - 1), - (R = e($, T, l)), - (M = R.length), - (L = O.length), - (d = t(R, O, M, L)), - d == 1 && (T--, r(R, ce < M ? nr : $, M, l))) - : (T == 0 && (d = T = 1), (R = $.slice())), - (M = R.length), - M < L && R.unshift(0), - r(O, R, L, l), - d == -1 && ((L = O.length), (d = t($, O, ce, L)), d < 1 && (T++, r(O, ce < L ? nr : $, L, l))), - (L = O.length)) - : d === 0 && (T++, (O = [0])), - (B[h++] = T), - d && O[0] ? (O[L++] = Y[rr] || 0) : ((O = [Y[rr]]), (L = 1))); - while ((rr++ < bt || O[0] !== void 0) && J--); - S = O[0] !== void 0; - } - B[0] || B.shift(); - } - if (I == 1) ((F.e = g), (co = S)); - else { - for (h = 1, T = B[0]; T >= 10; T /= 10) h++; - ((F.e = h + g * I - 1), k(F, a ? o + F.e + 1 : o, s, S)); - } - return F; - }; -})(); -function k(e, t, r, n) { - var i, - o, - s, - a, - l, - d, - g, - h, - T, - I = e.constructor; - e: if (t != null) { - if (((h = e.d), !h)) return e; - for (i = 1, a = h[0]; a >= 10; a /= 10) i++; - if (((o = t - i), o < 0)) ((o += D), (s = t), (g = h[(T = 0)]), (l = (g / K(10, i - s - 1)) % 10 | 0)); - else if (((T = Math.ceil((o + 1) / D)), (a = h.length), T >= a)) - if (n) { - for (; a++ <= T; ) h.push(0); - ((g = l = 0), (i = 1), (o %= D), (s = o - D + 1)); - } else break e; - else { - for (g = a = h[T], i = 1; a >= 10; a /= 10) i++; - ((o %= D), (s = o - D + i), (l = s < 0 ? 0 : (g / K(10, i - s - 1)) % 10 | 0)); - } - if ( - ((n = n || t < 0 || h[T + 1] !== void 0 || (s < 0 ? g : g % K(10, i - s - 1))), - (d = - r < 4 - ? (l || n) && (r == 0 || r == (e.s < 0 ? 3 : 2)) - : l > 5 || - (l == 5 && - (r == 4 || - n || - (r == 6 && (o > 0 ? (s > 0 ? g / K(10, i - s) : 0) : h[T - 1]) % 10 & 1) || - r == (e.s < 0 ? 8 : 7)))), - t < 1 || !h[0]) - ) - return ( - (h.length = 0), - d ? ((t -= e.e + 1), (h[0] = K(10, (D - (t % D)) % D)), (e.e = -t || 0)) : (h[0] = e.e = 0), - e - ); - if ( - (o == 0 - ? ((h.length = T), (a = 1), T--) - : ((h.length = T + 1), (a = K(10, D - o)), (h[T] = s > 0 ? ((g / K(10, i - s)) % K(10, s) | 0) * a : 0)), - d) - ) - for (;;) - if (T == 0) { - for (o = 1, s = h[0]; s >= 10; s /= 10) o++; - for (s = h[0] += a, a = 1; s >= 10; s /= 10) a++; - o != a && (e.e++, h[0] == pe && (h[0] = 1)); - break; - } else { - if (((h[T] += a), h[T] != pe)) break; - ((h[T--] = 0), (a = 1)); - } - for (o = h.length; h[--o] === 0; ) h.pop(); - } - return (_ && (e.e > I.maxE ? ((e.d = null), (e.e = NaN)) : e.e < I.minE && ((e.e = 0), (e.d = [0]))), e); -} -function ye(e, t, r) { - if (!e.isFinite()) return Eo(e); - var n, - i = e.e, - o = z(e.d), - s = o.length; - return ( - t - ? (r && (n = r - s) > 0 - ? (o = o.charAt(0) + '.' + o.slice(1) + Oe(n)) - : s > 1 && (o = o.charAt(0) + '.' + o.slice(1)), - (o = o + (e.e < 0 ? 'e' : 'e+') + e.e)) - : i < 0 - ? ((o = '0.' + Oe(-i - 1) + o), r && (n = r - s) > 0 && (o += Oe(n))) - : i >= s - ? ((o += Oe(i + 1 - s)), r && (n = r - i - 1) > 0 && (o = o + '.' + Oe(n))) - : ((n = i + 1) < s && (o = o.slice(0, n) + '.' + o.slice(n)), - r && (n = r - s) > 0 && (i + 1 === s && (o += '.'), (o += Oe(n)))), - o - ); -} -function Tr(e, t) { - var r = e[0]; - for (t *= D; r >= 10; r /= 10) t++; - return t; -} -function Pr(e, t, r) { - if (t > Ll) throw ((_ = !0), r && (e.precision = r), Error(po)); - return k(new e(br), t, 1, !0); -} -function he(e, t, r) { - if (t > Tn) throw Error(po); - return k(new e(xr), t, r, !0); -} -function ho(e) { - var t = e.length - 1, - r = t * D + 1; - if (((t = e[t]), t)) { - for (; t % 10 == 0; t /= 10) r--; - for (t = e[0]; t >= 10; t /= 10) r++; - } - return r; -} -function Oe(e) { - for (var t = ''; e--; ) t += '0'; - return t; -} -function yo(e, t, r, n) { - var i, - o = new e(1), - s = Math.ceil(n / D + 4); - for (_ = !1; ; ) { - if ((r % 2 && ((o = o.times(t)), lo(o.d, s) && (i = !0)), (r = X(r / 2)), r === 0)) { - ((r = o.d.length - 1), i && o.d[r] === 0 && ++o.d[r]); - break; - } - ((t = t.times(t)), lo(t.d, s)); - } - return ((_ = !0), o); -} -function ao(e) { - return e.d[e.d.length - 1] & 1; -} -function wo(e, t, r) { - for (var n, i, o = new e(t[0]), s = 0; ++s < t.length; ) { - if (((i = new e(t[s])), !i.s)) { - o = i; - break; - } - ((n = o.cmp(i)), (n === r || (n === 0 && o.s === r)) && (o = i)); - } - return o; -} -function An(e, t) { - var r, - n, - i, - o, - s, - a, - l, - d = 0, - g = 0, - h = 0, - T = e.constructor, - I = T.rounding, - S = T.precision; - if (!e.d || !e.d[0] || e.e > 17) - return new T(e.d ? (e.d[0] ? (e.s < 0 ? 0 : 1 / 0) : 1) : e.s ? (e.s < 0 ? 0 : e) : NaN); - for (t == null ? ((_ = !1), (l = S)) : (l = t), a = new T(0.03125); e.e > -2; ) ((e = e.times(a)), (h += 5)); - for (n = ((Math.log(K(2, h)) / Math.LN10) * 2 + 5) | 0, l += n, r = o = s = new T(1), T.precision = l; ; ) { - if ( - ((o = k(o.times(e), l, 1)), - (r = r.times(++g)), - (a = s.plus(V(o, r, l, 1))), - z(a.d).slice(0, l) === z(s.d).slice(0, l)) - ) { - for (i = h; i--; ) s = k(s.times(s), l, 1); - if (t == null) - if (d < 3 && Ct(s.d, l - n, I, d)) ((T.precision = l += 10), (r = o = a = new T(1)), (g = 0), d++); - else return k(s, (T.precision = S), I, (_ = !0)); - else return ((T.precision = S), s); - } - s = a; - } -} -function ke(e, t) { - var r, - n, - i, - o, - s, - a, - l, - d, - g, - h, - T, - I = 1, - S = 10, - R = e, - M = R.d, - F = R.constructor, - B = F.rounding, - O = F.precision; - if (R.s < 0 || !M || !M[0] || (!R.e && M[0] == 1 && M.length == 1)) - return new F(M && !M[0] ? -1 / 0 : R.s != 1 ? NaN : M ? 0 : R); - if ( - (t == null ? ((_ = !1), (g = O)) : (g = t), - (F.precision = g += S), - (r = z(M)), - (n = r.charAt(0)), - Math.abs((o = R.e)) < 15e14) - ) { - for (; (n < 7 && n != 1) || (n == 1 && r.charAt(1) > 3); ) ((R = R.times(e)), (r = z(R.d)), (n = r.charAt(0)), I++); - ((o = R.e), n > 1 ? ((R = new F('0.' + r)), o++) : (R = new F(n + '.' + r.slice(1)))); - } else - return ( - (d = Pr(F, g + 2, O).times(o + '')), - (R = ke(new F(n + '.' + r.slice(1)), g - S).plus(d)), - (F.precision = O), - t == null ? k(R, O, B, (_ = !0)) : R - ); - for (h = R, l = s = R = V(R.minus(1), R.plus(1), g, 1), T = k(R.times(R), g, 1), i = 3; ; ) { - if (((s = k(s.times(T), g, 1)), (d = l.plus(V(s, new F(i), g, 1))), z(d.d).slice(0, g) === z(l.d).slice(0, g))) - if ( - ((l = l.times(2)), - o !== 0 && (l = l.plus(Pr(F, g + 2, O).times(o + ''))), - (l = V(l, new F(I), g, 1)), - t == null) - ) - if (Ct(l.d, g - S, B, a)) - ((F.precision = g += S), - (d = s = R = V(h.minus(1), h.plus(1), g, 1)), - (T = k(R.times(R), g, 1)), - (i = a = 1)); - else return k(l, (F.precision = O), B, (_ = !0)); - else return ((F.precision = O), l); - ((l = d), (i += 2)); - } -} -function Eo(e) { - return String((e.s * e.s) / 0); -} -function Er(e, t) { - var r, n, i; - for ( - (r = t.indexOf('.')) > -1 && (t = t.replace('.', '')), - (n = t.search(/e/i)) > 0 - ? (r < 0 && (r = n), (r += +t.slice(n + 1)), (t = t.substring(0, n))) - : r < 0 && (r = t.length), - n = 0; - t.charCodeAt(n) === 48; - n++ - ); - for (i = t.length; t.charCodeAt(i - 1) === 48; --i); - if (((t = t.slice(n, i)), t)) { - if (((i -= n), (e.e = r = r - n - 1), (e.d = []), (n = (r + 1) % D), r < 0 && (n += D), n < i)) { - for (n && e.d.push(+t.slice(0, n)), i -= D; n < i; ) e.d.push(+t.slice(n, (n += D))); - ((t = t.slice(n)), (n = D - t.length)); - } else n -= i; - for (; n--; ) t += '0'; - (e.d.push(+t), - _ && - (e.e > e.constructor.maxE - ? ((e.d = null), (e.e = NaN)) - : e.e < e.constructor.minE && ((e.e = 0), (e.d = [0])))); - } else ((e.e = 0), (e.d = [0])); - return e; -} -function Bl(e, t) { - var r, n, i, o, s, a, l, d, g; - if (t.indexOf('_') > -1) { - if (((t = t.replace(/(\d)_(?=\d)/g, '$1')), go.test(t))) return Er(e, t); - } else if (t === 'Infinity' || t === 'NaN') return (+t || (e.s = NaN), (e.e = NaN), (e.d = null), e); - if (_l.test(t)) ((r = 16), (t = t.toLowerCase())); - else if (Ml.test(t)) r = 2; - else if (Nl.test(t)) r = 8; - else throw Error(De + t); - for ( - o = t.search(/p/i), - o > 0 ? ((l = +t.slice(o + 1)), (t = t.substring(2, o))) : (t = t.slice(2)), - o = t.indexOf('.'), - s = o >= 0, - n = e.constructor, - s && ((t = t.replace('.', '')), (a = t.length), (o = a - o), (i = yo(n, new n(r), o, o * 2))), - d = wr(t, r, pe), - g = d.length - 1, - o = g; - d[o] === 0; - --o - ) - d.pop(); - return o < 0 - ? new n(e.s * 0) - : ((e.e = Tr(d, g)), - (e.d = d), - (_ = !1), - s && (e = V(e, i, a * 4)), - l && (e = e.times(Math.abs(l) < 54 ? K(2, l) : ve.pow(2, l))), - (_ = !0), - e); -} -function ql(e, t) { - var r, - n = t.d.length; - if (n < 3) return t.isZero() ? t : tt(e, 2, t, t); - ((r = 1.4 * Math.sqrt(n)), (r = r > 16 ? 16 : r | 0), (t = t.times(1 / Ar(5, r))), (t = tt(e, 2, t, t))); - for (var i, o = new e(5), s = new e(16), a = new e(20); r--; ) - ((i = t.times(t)), (t = t.times(o.plus(i.times(s.times(i).minus(a)))))); - return t; -} -function tt(e, t, r, n, i) { - var o, - s, - a, - l, - d = 1, - g = e.precision, - h = Math.ceil(g / D); - for (_ = !1, l = r.times(r), a = new e(n); ; ) { - if ( - ((s = V(a.times(l), new e(t++ * t++), g, 1)), - (a = i ? n.plus(s) : n.minus(s)), - (n = V(s.times(l), new e(t++ * t++), g, 1)), - (s = a.plus(n)), - s.d[h] !== void 0) - ) { - for (o = h; s.d[o] === a.d[o] && o--; ); - if (o == -1) break; - } - ((o = a), (a = n), (n = s), (s = o), d++); - } - return ((_ = !0), (s.d.length = h + 1), s); -} -function Ar(e, t) { - for (var r = e; --t; ) r *= e; - return r; -} -function bo(e, t) { - var r, - n = t.s < 0, - i = he(e, e.precision, 1), - o = i.times(0.5); - if (((t = t.abs()), t.lte(o))) return ((Pe = n ? 4 : 1), t); - if (((r = t.divToInt(i)), r.isZero())) Pe = n ? 3 : 2; - else { - if (((t = t.minus(r.times(i))), t.lte(o))) return ((Pe = ao(r) ? (n ? 2 : 3) : n ? 4 : 1), t); - Pe = ao(r) ? (n ? 1 : 4) : n ? 3 : 2; - } - return t.minus(i).abs(); -} -function Cn(e, t, r, n) { - var i, - o, - s, - a, - l, - d, - g, - h, - T, - I = e.constructor, - S = r !== void 0; - if ( - (S ? (ne(r, 1, Me), n === void 0 ? (n = I.rounding) : ne(n, 0, 8)) : ((r = I.precision), (n = I.rounding)), - !e.isFinite()) - ) - g = Eo(e); - else { - for ( - g = ye(e), - s = g.indexOf('.'), - S ? ((i = 2), t == 16 ? (r = r * 4 - 3) : t == 8 && (r = r * 3 - 2)) : (i = t), - s >= 0 && - ((g = g.replace('.', '')), - (T = new I(1)), - (T.e = g.length - s), - (T.d = wr(ye(T), 10, i)), - (T.e = T.d.length)), - h = wr(g, 10, i), - o = l = h.length; - h[--l] == 0; - - ) - h.pop(); - if (!h[0]) g = S ? '0p+0' : '0'; - else { - if ( - (s < 0 - ? o-- - : ((e = new I(e)), (e.d = h), (e.e = o), (e = V(e, T, r, n, 0, i)), (h = e.d), (o = e.e), (d = co)), - (s = h[r]), - (a = i / 2), - (d = d || h[r + 1] !== void 0), - (d = - n < 4 - ? (s !== void 0 || d) && (n === 0 || n === (e.s < 0 ? 3 : 2)) - : s > a || (s === a && (n === 4 || d || (n === 6 && h[r - 1] & 1) || n === (e.s < 0 ? 8 : 7)))), - (h.length = r), - d) - ) - for (; ++h[--r] > i - 1; ) ((h[r] = 0), r || (++o, h.unshift(1))); - for (l = h.length; !h[l - 1]; --l); - for (s = 0, g = ''; s < l; s++) g += Pn.charAt(h[s]); - if (S) { - if (l > 1) - if (t == 16 || t == 8) { - for (s = t == 16 ? 4 : 3, --l; l % s; l++) g += '0'; - for (h = wr(g, i, t), l = h.length; !h[l - 1]; --l); - for (s = 1, g = '1.'; s < l; s++) g += Pn.charAt(h[s]); - } else g = g.charAt(0) + '.' + g.slice(1); - g = g + (o < 0 ? 'p' : 'p+') + o; - } else if (o < 0) { - for (; ++o; ) g = '0' + g; - g = '0.' + g; - } else if (++o > l) for (o -= l; o--; ) g += '0'; - else o < l && (g = g.slice(0, o) + '.' + g.slice(o)); - } - g = (t == 16 ? '0x' : t == 2 ? '0b' : t == 8 ? '0o' : '') + g; - } - return e.s < 0 ? '-' + g : g; -} -function lo(e, t) { - if (e.length > t) return ((e.length = t), !0); -} -function Vl(e) { - return new this(e).abs(); -} -function $l(e) { - return new this(e).acos(); -} -function jl(e) { - return new this(e).acosh(); -} -function Gl(e, t) { - return new this(e).plus(t); -} -function Jl(e) { - return new this(e).asin(); -} -function Ql(e) { - return new this(e).asinh(); -} -function Kl(e) { - return new this(e).atan(); -} -function Wl(e) { - return new this(e).atanh(); -} -function Hl(e, t) { - ((e = new this(e)), (t = new this(t))); - var r, - n = this.precision, - i = this.rounding, - o = n + 4; - return ( - !e.s || !t.s - ? (r = new this(NaN)) - : !e.d && !t.d - ? ((r = he(this, o, 1).times(t.s > 0 ? 0.25 : 0.75)), (r.s = e.s)) - : !t.d || e.isZero() - ? ((r = t.s < 0 ? he(this, n, i) : new this(0)), (r.s = e.s)) - : !e.d || t.isZero() - ? ((r = he(this, o, 1).times(0.5)), (r.s = e.s)) - : t.s < 0 - ? ((this.precision = o), - (this.rounding = 1), - (r = this.atan(V(e, t, o, 1))), - (t = he(this, o, 1)), - (this.precision = n), - (this.rounding = i), - (r = e.s < 0 ? r.minus(t) : r.plus(t))) - : (r = this.atan(V(e, t, o, 1))), - r - ); -} -function zl(e) { - return new this(e).cbrt(); -} -function Yl(e) { - return k((e = new this(e)), e.e + 1, 2); -} -function Zl(e, t, r) { - return new this(e).clamp(t, r); -} -function Xl(e) { - if (!e || typeof e != 'object') throw Error(vr + 'Object expected'); - var t, - r, - n, - i = e.defaults === !0, - o = [ - 'precision', - 1, - Me, - 'rounding', - 0, - 8, - 'toExpNeg', - -et, - 0, - 'toExpPos', - 0, - et, - 'maxE', - 0, - et, - 'minE', - -et, - 0, - 'modulo', - 0, - 9, - ]; - for (t = 0; t < o.length; t += 3) - if (((r = o[t]), i && (this[r] = vn[r]), (n = e[r]) !== void 0)) - if (X(n) === n && n >= o[t + 1] && n <= o[t + 2]) this[r] = n; - else throw Error(De + r + ': ' + n); - if (((r = 'crypto'), i && (this[r] = vn[r]), (n = e[r]) !== void 0)) - if (n === !0 || n === !1 || n === 0 || n === 1) - if (n) - if (typeof crypto < 'u' && crypto && (crypto.getRandomValues || crypto.randomBytes)) this[r] = !0; - else throw Error(mo); - else this[r] = !1; - else throw Error(De + r + ': ' + n); - return this; -} -function eu(e) { - return new this(e).cos(); -} -function tu(e) { - return new this(e).cosh(); -} -function xo(e) { - var t, r, n; - function i(o) { - var s, - a, - l, - d = this; - if (!(d instanceof i)) return new i(o); - if (((d.constructor = i), uo(o))) { - ((d.s = o.s), - _ - ? !o.d || o.e > i.maxE - ? ((d.e = NaN), (d.d = null)) - : o.e < i.minE - ? ((d.e = 0), (d.d = [0])) - : ((d.e = o.e), (d.d = o.d.slice())) - : ((d.e = o.e), (d.d = o.d ? o.d.slice() : o.d))); - return; - } - if (((l = typeof o), l === 'number')) { - if (o === 0) { - ((d.s = 1 / o < 0 ? -1 : 1), (d.e = 0), (d.d = [0])); - return; - } - if ((o < 0 ? ((o = -o), (d.s = -1)) : (d.s = 1), o === ~~o && o < 1e7)) { - for (s = 0, a = o; a >= 10; a /= 10) s++; - _ - ? s > i.maxE - ? ((d.e = NaN), (d.d = null)) - : s < i.minE - ? ((d.e = 0), (d.d = [0])) - : ((d.e = s), (d.d = [o])) - : ((d.e = s), (d.d = [o])); - return; - } - if (o * 0 !== 0) { - (o || (d.s = NaN), (d.e = NaN), (d.d = null)); - return; - } - return Er(d, o.toString()); - } - if (l === 'string') - return ( - (a = o.charCodeAt(0)) === 45 ? ((o = o.slice(1)), (d.s = -1)) : (a === 43 && (o = o.slice(1)), (d.s = 1)), - go.test(o) ? Er(d, o) : Bl(d, o) - ); - if (l === 'bigint') return (o < 0 ? ((o = -o), (d.s = -1)) : (d.s = 1), Er(d, o.toString())); - throw Error(De + o); - } - if ( - ((i.prototype = C), - (i.ROUND_UP = 0), - (i.ROUND_DOWN = 1), - (i.ROUND_CEIL = 2), - (i.ROUND_FLOOR = 3), - (i.ROUND_HALF_UP = 4), - (i.ROUND_HALF_DOWN = 5), - (i.ROUND_HALF_EVEN = 6), - (i.ROUND_HALF_CEIL = 7), - (i.ROUND_HALF_FLOOR = 8), - (i.EUCLID = 9), - (i.config = i.set = Xl), - (i.clone = xo), - (i.isDecimal = uo), - (i.abs = Vl), - (i.acos = $l), - (i.acosh = jl), - (i.add = Gl), - (i.asin = Jl), - (i.asinh = Ql), - (i.atan = Kl), - (i.atanh = Wl), - (i.atan2 = Hl), - (i.cbrt = zl), - (i.ceil = Yl), - (i.clamp = Zl), - (i.cos = eu), - (i.cosh = tu), - (i.div = ru), - (i.exp = nu), - (i.floor = iu), - (i.hypot = ou), - (i.ln = su), - (i.log = au), - (i.log10 = uu), - (i.log2 = lu), - (i.max = cu), - (i.min = pu), - (i.mod = mu), - (i.mul = fu), - (i.pow = du), - (i.random = gu), - (i.round = hu), - (i.sign = yu), - (i.sin = wu), - (i.sinh = Eu), - (i.sqrt = bu), - (i.sub = xu), - (i.sum = Pu), - (i.tan = vu), - (i.tanh = Tu), - (i.trunc = Au), - e === void 0 && (e = {}), - e && e.defaults !== !0) - ) - for ( - n = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'maxE', 'minE', 'modulo', 'crypto'], t = 0; - t < n.length; - - ) - e.hasOwnProperty((r = n[t++])) || (e[r] = this[r]); - return (i.config(e), i); -} -function ru(e, t) { - return new this(e).div(t); -} -function nu(e) { - return new this(e).exp(); -} -function iu(e) { - return k((e = new this(e)), e.e + 1, 3); -} -function ou() { - var e, - t, - r = new this(0); - for (_ = !1, e = 0; e < arguments.length; ) - if (((t = new this(arguments[e++])), t.d)) r.d && (r = r.plus(t.times(t))); - else { - if (t.s) return ((_ = !0), new this(1 / 0)); - r = t; - } - return ((_ = !0), r.sqrt()); -} -function uo(e) { - return e instanceof ve || (e && e.toStringTag === fo) || !1; -} -function su(e) { - return new this(e).ln(); -} -function au(e, t) { - return new this(e).log(t); -} -function lu(e) { - return new this(e).log(2); -} -function uu(e) { - return new this(e).log(10); -} -function cu() { - return wo(this, arguments, -1); -} -function pu() { - return wo(this, arguments, 1); -} -function mu(e, t) { - return new this(e).mod(t); -} -function fu(e, t) { - return new this(e).mul(t); -} -function du(e, t) { - return new this(e).pow(t); -} -function gu(e) { - var t, - r, - n, - i, - o = 0, - s = new this(1), - a = []; - if ((e === void 0 ? (e = this.precision) : ne(e, 1, Me), (n = Math.ceil(e / D)), this.crypto)) - if (crypto.getRandomValues) - for (t = crypto.getRandomValues(new Uint32Array(n)); o < n; ) - ((i = t[o]), i >= 429e7 ? (t[o] = crypto.getRandomValues(new Uint32Array(1))[0]) : (a[o++] = i % 1e7)); - else if (crypto.randomBytes) { - for (t = crypto.randomBytes((n *= 4)); o < n; ) - ((i = t[o] + (t[o + 1] << 8) + (t[o + 2] << 16) + ((t[o + 3] & 127) << 24)), - i >= 214e7 ? crypto.randomBytes(4).copy(t, o) : (a.push(i % 1e7), (o += 4))); - o = n / 4; - } else throw Error(mo); - else for (; o < n; ) a[o++] = (Math.random() * 1e7) | 0; - for (n = a[--o], e %= D, n && e && ((i = K(10, D - e)), (a[o] = ((n / i) | 0) * i)); a[o] === 0; o--) a.pop(); - if (o < 0) ((r = 0), (a = [0])); - else { - for (r = -1; a[0] === 0; r -= D) a.shift(); - for (n = 1, i = a[0]; i >= 10; i /= 10) n++; - n < D && (r -= D - n); - } - return ((s.e = r), (s.d = a), s); -} -function hu(e) { - return k((e = new this(e)), e.e + 1, this.rounding); -} -function yu(e) { - return ((e = new this(e)), e.d ? (e.d[0] ? e.s : 0 * e.s) : e.s || NaN); -} -function wu(e) { - return new this(e).sin(); -} -function Eu(e) { - return new this(e).sinh(); -} -function bu(e) { - return new this(e).sqrt(); -} -function xu(e, t) { - return new this(e).sub(t); -} -function Pu() { - var e = 0, - t = arguments, - r = new this(t[e]); - for (_ = !1; r.s && ++e < t.length; ) r = r.plus(t[e]); - return ((_ = !0), k(r, this.precision, this.rounding)); -} -function vu(e) { - return new this(e).tan(); -} -function Tu(e) { - return new this(e).tanh(); -} -function Au(e) { - return k((e = new this(e)), e.e + 1, 1); -} -C[Symbol.for('nodejs.util.inspect.custom')] = C.toString; -C[Symbol.toStringTag] = 'Decimal'; -var ve = (C.constructor = xo(vn)); -br = new ve(br); -xr = new ve(xr); -var _e = ve; -function rt(e) { - return ve.isDecimal(e) - ? !0 - : e !== null && - typeof e == 'object' && - typeof e.s == 'number' && - typeof e.e == 'number' && - typeof e.toFixed == 'function' && - Array.isArray(e.d); -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Cr = {}; -or(Cr, { ModelAction: () => Rt, datamodelEnumToSchemaEnum: () => Cu }); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -function Cu(e) { - return { name: e.name, values: e.values.map((t) => t.name) }; -} -f(); -u(); -c(); -p(); -m(); -var Rt = ((O) => ( - (O.findUnique = 'findUnique'), - (O.findUniqueOrThrow = 'findUniqueOrThrow'), - (O.findFirst = 'findFirst'), - (O.findFirstOrThrow = 'findFirstOrThrow'), - (O.findMany = 'findMany'), - (O.create = 'create'), - (O.createMany = 'createMany'), - (O.createManyAndReturn = 'createManyAndReturn'), - (O.update = 'update'), - (O.updateMany = 'updateMany'), - (O.updateManyAndReturn = 'updateManyAndReturn'), - (O.upsert = 'upsert'), - (O.delete = 'delete'), - (O.deleteMany = 'deleteMany'), - (O.groupBy = 'groupBy'), - (O.count = 'count'), - (O.aggregate = 'aggregate'), - (O.findRaw = 'findRaw'), - (O.aggregateRaw = 'aggregateRaw'), - O -))(Rt || {}); -var Ru = Ue(Zi()); -var Su = { red: Ye, gray: Ui, dim: ur, bold: lr, underline: Mi, highlightSource: (e) => e.highlight() }, - Iu = { red: (e) => e, gray: (e) => e, dim: (e) => e, bold: (e) => e, underline: (e) => e, highlightSource: (e) => e }; -function Ou({ message: e, originalMethod: t, isPanic: r, callArguments: n }) { - return { functionName: `prisma.${t}()`, message: e, isPanic: r ?? !1, callArguments: n }; -} -function ku({ functionName: e, location: t, message: r, isPanic: n, contextLines: i, callArguments: o }, s) { - let a = [''], - l = t ? ' in' : ':'; - if ( - (n - ? (a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold('on us')}, you did nothing wrong.`)), - a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))) - : a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)), - t && a.push(s.underline(Du(t))), - i) - ) { - a.push(''); - let d = [i.toString()]; - (o && (d.push(o), d.push(s.dim(')'))), a.push(d.join('')), o && a.push('')); - } else (a.push(''), o && a.push(o), a.push('')); - return ( - a.push(r), - a.join(` -`) - ); -} -function Du(e) { - let t = [e.fileName]; - return (e.lineNumber && t.push(String(e.lineNumber)), e.columnNumber && t.push(String(e.columnNumber)), t.join(':')); -} -function Rr(e) { - let t = e.showColors ? Su : Iu, - r; - return (typeof $getTemplateParameters < 'u' ? (r = $getTemplateParameters(e, t)) : (r = Ou(e)), ku(r, t)); -} -f(); -u(); -c(); -p(); -m(); -var Oo = Ue(Rn()); -f(); -u(); -c(); -p(); -m(); -function Ao(e, t, r) { - let n = Co(e), - i = Mu(n), - o = Nu(i); - o ? Sr(o, t, r) : t.addErrorMessage(() => 'Unknown error'); -} -function Co(e) { - return e.errors.flatMap((t) => (t.kind === 'Union' ? Co(t) : [t])); -} -function Mu(e) { - let t = new Map(), - r = []; - for (let n of e) { - if (n.kind !== 'InvalidArgumentType') { - r.push(n); - continue; - } - let i = `${n.selectionPath.join('.')}:${n.argumentPath.join('.')}`, - o = t.get(i); - o - ? t.set(i, { ...n, argument: { ...n.argument, typeNames: _u(o.argument.typeNames, n.argument.typeNames) } }) - : t.set(i, n); - } - return (r.push(...t.values()), r); -} -function _u(e, t) { - return [...new Set(e.concat(t))]; -} -function Nu(e) { - return bn(e, (t, r) => { - let n = vo(t), - i = vo(r); - return n !== i ? n - i : To(t) - To(r); - }); -} -function vo(e) { - let t = 0; - return ( - Array.isArray(e.selectionPath) && (t += e.selectionPath.length), - Array.isArray(e.argumentPath) && (t += e.argumentPath.length), - t - ); -} -function To(e) { - switch (e.kind) { - case 'InvalidArgumentValue': - case 'ValueTooLarge': - return 20; - case 'InvalidArgumentType': - return 10; - case 'RequiredArgumentMissing': - return -10; - default: - return 0; - } -} -f(); -u(); -c(); -p(); -m(); -var le = class { - constructor(t, r) { - this.name = t; - this.value = r; - } - isRequired = !1; - makeRequired() { - return ((this.isRequired = !0), this); - } - write(t) { - let { - colors: { green: r }, - } = t.context; - (t.addMarginSymbol(r(this.isRequired ? '+' : '?')), - t.write(r(this.name)), - this.isRequired || t.write(r('?')), - t.write(r(': ')), - typeof this.value == 'string' ? t.write(r(this.value)) : t.write(this.value)); - } -}; -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -So(); -f(); -u(); -c(); -p(); -m(); -var nt = class { - constructor(t = 0, r) { - this.context = r; - this.currentIndent = t; - } - lines = []; - currentLine = ''; - currentIndent = 0; - marginSymbol; - afterNextNewLineCallback; - write(t) { - return (typeof t == 'string' ? (this.currentLine += t) : t.write(this), this); - } - writeJoined(t, r, n = (i, o) => o.write(i)) { - let i = r.length - 1; - for (let o = 0; o < r.length; o++) (n(r[o], this), o !== i && this.write(t)); - return this; - } - writeLine(t) { - return this.write(t).newLine(); - } - newLine() { - (this.lines.push(this.indentedCurrentLine()), (this.currentLine = ''), (this.marginSymbol = void 0)); - let t = this.afterNextNewLineCallback; - return ((this.afterNextNewLineCallback = void 0), t?.(), this); - } - withIndent(t) { - return (this.indent(), t(this), this.unindent(), this); - } - afterNextNewline(t) { - return ((this.afterNextNewLineCallback = t), this); - } - indent() { - return (this.currentIndent++, this); - } - unindent() { - return (this.currentIndent > 0 && this.currentIndent--, this); - } - addMarginSymbol(t) { - return ((this.marginSymbol = t), this); - } - toString() { - return this.lines.concat(this.indentedCurrentLine()).join(` -`); - } - getCurrentLineLength() { - return this.currentLine.length; - } - indentedCurrentLine() { - let t = this.currentLine.padStart(this.currentLine.length + 2 * this.currentIndent); - return this.marginSymbol ? this.marginSymbol + t.slice(1) : t; - } -}; -Ro(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Ir = class { - constructor(t) { - this.value = t; - } - write(t) { - t.write(this.value); - } - markAsError() { - this.value.markAsError(); - } -}; -f(); -u(); -c(); -p(); -m(); -var Or = (e) => e, - kr = { bold: Or, red: Or, green: Or, dim: Or, enabled: !1 }, - Io = { bold: lr, red: Ye, green: _i, dim: ur, enabled: !0 }, - it = { - write(e) { - e.writeLine(','); - }, - }; -f(); -u(); -c(); -p(); -m(); -var we = class { - constructor(t) { - this.contents = t; - } - isUnderlined = !1; - color = (t) => t; - underline() { - return ((this.isUnderlined = !0), this); - } - setColor(t) { - return ((this.color = t), this); - } - write(t) { - let r = t.getCurrentLineLength(); - (t.write(this.color(this.contents)), - this.isUnderlined && - t.afterNextNewline(() => { - t.write(' '.repeat(r)).writeLine(this.color('~'.repeat(this.contents.length))); - })); - } -}; -f(); -u(); -c(); -p(); -m(); -var Ne = class { - hasError = !1; - markAsError() { - return ((this.hasError = !0), this); - } -}; -var ot = class extends Ne { - items = []; - addItem(t) { - return (this.items.push(new Ir(t)), this); - } - getField(t) { - return this.items[t]; - } - getPrintWidth() { - return this.items.length === 0 ? 2 : Math.max(...this.items.map((r) => r.value.getPrintWidth())) + 2; - } - write(t) { - if (this.items.length === 0) { - this.writeEmpty(t); - return; - } - this.writeWithItems(t); - } - writeEmpty(t) { - let r = new we('[]'); - (this.hasError && r.setColor(t.context.colors.red).underline(), t.write(r)); - } - writeWithItems(t) { - let { colors: r } = t.context; - (t - .writeLine('[') - .withIndent(() => t.writeJoined(it, this.items).newLine()) - .write(']'), - this.hasError && - t.afterNextNewline(() => { - t.writeLine(r.red('~'.repeat(this.getPrintWidth()))); - })); - } - asObject() {} -}; -var st = class e extends Ne { - fields = {}; - suggestions = []; - addField(t) { - this.fields[t.name] = t; - } - addSuggestion(t) { - this.suggestions.push(t); - } - getField(t) { - return this.fields[t]; - } - getDeepField(t) { - let [r, ...n] = t, - i = this.getField(r); - if (!i) return; - let o = i; - for (let s of n) { - let a; - if ( - (o.value instanceof e ? (a = o.value.getField(s)) : o.value instanceof ot && (a = o.value.getField(Number(s))), - !a) - ) - return; - o = a; - } - return o; - } - getDeepFieldValue(t) { - return t.length === 0 ? this : this.getDeepField(t)?.value; - } - hasField(t) { - return !!this.getField(t); - } - removeAllFields() { - this.fields = {}; - } - removeField(t) { - delete this.fields[t]; - } - getFields() { - return this.fields; - } - isEmpty() { - return Object.keys(this.fields).length === 0; - } - getFieldValue(t) { - return this.getField(t)?.value; - } - getDeepSubSelectionValue(t) { - let r = this; - for (let n of t) { - if (!(r instanceof e)) return; - let i = r.getSubSelectionValue(n); - if (!i) return; - r = i; - } - return r; - } - getDeepSelectionParent(t) { - let r = this.getSelectionParent(); - if (!r) return; - let n = r; - for (let i of t) { - let o = n.value.getFieldValue(i); - if (!o || !(o instanceof e)) return; - let s = o.getSelectionParent(); - if (!s) return; - n = s; - } - return n; - } - getSelectionParent() { - let t = this.getField('select')?.value.asObject(); - if (t) return { kind: 'select', value: t }; - let r = this.getField('include')?.value.asObject(); - if (r) return { kind: 'include', value: r }; - } - getSubSelectionValue(t) { - return this.getSelectionParent()?.value.fields[t].value; - } - getPrintWidth() { - let t = Object.values(this.fields); - return t.length == 0 ? 2 : Math.max(...t.map((n) => n.getPrintWidth())) + 2; - } - write(t) { - let r = Object.values(this.fields); - if (r.length === 0 && this.suggestions.length === 0) { - this.writeEmpty(t); - return; - } - this.writeWithContents(t, r); - } - asObject() { - return this; - } - writeEmpty(t) { - let r = new we('{}'); - (this.hasError && r.setColor(t.context.colors.red).underline(), t.write(r)); - } - writeWithContents(t, r) { - (t.writeLine('{').withIndent(() => { - t.writeJoined(it, [...r, ...this.suggestions]).newLine(); - }), - t.write('}'), - this.hasError && - t.afterNextNewline(() => { - t.writeLine(t.context.colors.red('~'.repeat(this.getPrintWidth()))); - })); - } -}; -f(); -u(); -c(); -p(); -m(); -var H = class extends Ne { - constructor(r) { - super(); - this.text = r; - } - getPrintWidth() { - return this.text.length; - } - write(r) { - let n = new we(this.text); - (this.hasError && n.underline().setColor(r.context.colors.red), r.write(n)); - } - asObject() {} -}; -f(); -u(); -c(); -p(); -m(); -var St = class { - fields = []; - addField(t, r) { - return ( - this.fields.push({ - write(n) { - let { green: i, dim: o } = n.context.colors; - n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o('+'))); - }, - }), - this - ); - } - write(t) { - let { - colors: { green: r }, - } = t.context; - t.writeLine(r('{')) - .withIndent(() => { - t.writeJoined(it, this.fields).newLine(); - }) - .write(r('}')) - .addMarginSymbol(r('+')); - } -}; -function Sr(e, t, r) { - switch (e.kind) { - case 'MutuallyExclusiveFields': - Fu(e, t); - break; - case 'IncludeOnScalar': - Lu(e, t); - break; - case 'EmptySelection': - Uu(e, t, r); - break; - case 'UnknownSelectionField': - $u(e, t); - break; - case 'InvalidSelectionValue': - ju(e, t); - break; - case 'UnknownArgument': - Gu(e, t); - break; - case 'UnknownInputField': - Ju(e, t); - break; - case 'RequiredArgumentMissing': - Qu(e, t); - break; - case 'InvalidArgumentType': - Ku(e, t); - break; - case 'InvalidArgumentValue': - Wu(e, t); - break; - case 'ValueTooLarge': - Hu(e, t); - break; - case 'SomeFieldsMissing': - zu(e, t); - break; - case 'TooManyFieldsGiven': - Yu(e, t); - break; - case 'Union': - Ao(e, t, r); - break; - default: - throw new Error('not implemented: ' + e.kind); - } -} -function Fu(e, t) { - let r = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - (r && (r.getField(e.firstField)?.markAsError(), r.getField(e.secondField)?.markAsError()), - t.addErrorMessage( - (n) => - `Please ${n.bold('either')} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red('not both')} at the same time.` - )); -} -function Lu(e, t) { - let [r, n] = at(e.selectionPath), - i = e.outputType, - o = t.arguments.getDeepSelectionParent(r)?.value; - if (o && (o.getField(n)?.markAsError(), i)) - for (let s of i.fields) s.isRelation && o.addSuggestion(new le(s.name, 'true')); - t.addErrorMessage((s) => { - let a = `Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold('include')} statement`; - return ( - i ? (a += ` on model ${s.bold(i.name)}. ${It(s)}`) : (a += '.'), - (a += ` -Note that ${s.bold('include')} statements only accept relation fields.`), - a - ); - }); -} -function Uu(e, t, r) { - let n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - if (n) { - let i = n.getField('omit')?.value.asObject(); - if (i) { - Bu(e, t, i); - return; - } - if (n.hasField('select')) { - qu(e, t); - return; - } - } - if (r?.[Ie(e.outputType.name)]) { - Vu(e, t); - return; - } - t.addErrorMessage(() => `Unknown field at "${e.selectionPath.join('.')} selection"`); -} -function Bu(e, t, r) { - r.removeAllFields(); - for (let n of e.outputType.fields) r.addSuggestion(new le(n.name, 'false')); - t.addErrorMessage( - (n) => - `The ${n.red('omit')} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result` - ); -} -function qu(e, t) { - let r = e.outputType, - n = t.arguments.getDeepSelectionParent(e.selectionPath)?.value, - i = n?.isEmpty() ?? !1; - (n && (n.removeAllFields(), Mo(n, r)), - t.addErrorMessage((o) => - i - ? `The ${o.red('`select`')} statement for type ${o.bold(r.name)} must not be empty. ${It(o)}` - : `The ${o.red('`select`')} statement for type ${o.bold(r.name)} needs ${o.bold('at least one truthy value')}.` - )); -} -function Vu(e, t) { - let r = new St(); - for (let i of e.outputType.fields) i.isRelation || r.addField(i.name, 'false'); - let n = new le('omit', r).makeRequired(); - if (e.selectionPath.length === 0) t.arguments.addSuggestion(n); - else { - let [i, o] = at(e.selectionPath), - a = t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o); - if (a) { - let l = a?.value.asObject() ?? new st(); - (l.addSuggestion(n), (a.value = l)); - } - } - t.addErrorMessage( - (i) => - `The global ${i.red('omit')} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result` - ); -} -function $u(e, t) { - let r = _o(e.selectionPath, t); - if (r.parentKind !== 'unknown') { - r.field.markAsError(); - let n = r.parent; - switch (r.parentKind) { - case 'select': - Mo(n, e.outputType); - break; - case 'include': - Zu(n, e.outputType); - break; - case 'omit': - Xu(n, e.outputType); - break; - } - } - t.addErrorMessage((n) => { - let i = [`Unknown field ${n.red(`\`${r.fieldName}\``)}`]; - return ( - r.parentKind !== 'unknown' && i.push(`for ${n.bold(r.parentKind)} statement`), - i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`), - i.push(It(n)), - i.join(' ') - ); - }); -} -function ju(e, t) { - let r = _o(e.selectionPath, t); - (r.parentKind !== 'unknown' && r.field.value.markAsError(), - t.addErrorMessage((n) => `Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)); -} -function Gu(e, t) { - let r = e.argumentPath[0], - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - (n && (n.getField(r)?.markAsError(), ec(n, e.arguments)), - t.addErrorMessage((i) => - ko( - i, - r, - e.arguments.map((o) => o.name) - ) - )); -} -function Ju(e, t) { - let [r, n] = at(e.argumentPath), - i = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - if (i) { - i.getDeepField(e.argumentPath)?.markAsError(); - let o = i.getDeepFieldValue(r)?.asObject(); - o && No(o, e.inputType); - } - t.addErrorMessage((o) => - ko( - o, - n, - e.inputType.fields.map((s) => s.name) - ) - ); -} -function ko(e, t, r) { - let n = [`Unknown argument \`${e.red(t)}\`.`], - i = rc(t, r); - return (i && n.push(`Did you mean \`${e.green(i)}\`?`), r.length > 0 && n.push(It(e)), n.join(' ')); -} -function Qu(e, t) { - let r; - t.addErrorMessage((l) => - r?.value instanceof H && r.value.text === 'null' - ? `Argument \`${l.green(o)}\` must not be ${l.red('null')}.` - : `Argument \`${l.green(o)}\` is missing.` - ); - let n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - if (!n) return; - let [i, o] = at(e.argumentPath), - s = new St(), - a = n.getDeepFieldValue(i)?.asObject(); - if (a) { - if (((r = a.getField(o)), r && a.removeField(o), e.inputTypes.length === 1 && e.inputTypes[0].kind === 'object')) { - for (let l of e.inputTypes[0].fields) s.addField(l.name, l.typeNames.join(' | ')); - a.addSuggestion(new le(o, s).makeRequired()); - } else { - let l = e.inputTypes.map(Do).join(' | '); - a.addSuggestion(new le(o, l).makeRequired()); - } - if (e.dependentArgumentPath) { - n.getDeepField(e.dependentArgumentPath)?.markAsError(); - let [, l] = at(e.dependentArgumentPath); - t.addErrorMessage( - (d) => `Argument \`${d.green(o)}\` is required because argument \`${d.green(l)}\` was provided.` - ); - } - } -} -function Do(e) { - return e.kind === 'list' ? `${Do(e.elementType)}[]` : e.name; -} -function Ku(e, t) { - let r = e.argument.name, - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - (n && n.getDeepFieldValue(e.argumentPath)?.markAsError(), - t.addErrorMessage((i) => { - let o = Dr( - 'or', - e.argument.typeNames.map((s) => i.green(s)) - ); - return `Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`; - })); -} -function Wu(e, t) { - let r = e.argument.name, - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - (n && n.getDeepFieldValue(e.argumentPath)?.markAsError(), - t.addErrorMessage((i) => { - let o = [`Invalid value for argument \`${i.bold(r)}\``]; - if ((e.underlyingError && o.push(`: ${e.underlyingError}`), o.push('.'), e.argument.typeNames.length > 0)) { - let s = Dr( - 'or', - e.argument.typeNames.map((a) => i.green(a)) - ); - o.push(` Expected ${s}.`); - } - return o.join(''); - })); -} -function Hu(e, t) { - let r = e.argument.name, - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(), - i; - if (n) { - let s = n.getDeepField(e.argumentPath)?.value; - (s?.markAsError(), s instanceof H && (i = s.text)); - } - t.addErrorMessage((o) => { - let s = ['Unable to fit value']; - return (i && s.push(o.red(i)), s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``), s.join(' ')); - }); -} -function zu(e, t) { - let r = e.argumentPath[e.argumentPath.length - 1], - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - if (n) { - let i = n.getDeepFieldValue(e.argumentPath)?.asObject(); - i && No(i, e.inputType); - } - t.addErrorMessage((i) => { - let o = [`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`]; - return ( - e.constraints.minFieldCount === 1 - ? e.constraints.requiredFields - ? o.push( - `${i.green('at least one of')} ${Dr( - 'or', - e.constraints.requiredFields.map((s) => `\`${i.bold(s)}\``) - )} arguments.` - ) - : o.push(`${i.green('at least one')} argument.`) - : o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`), - o.push(It(i)), - o.join(' ') - ); - }); -} -function Yu(e, t) { - let r = e.argumentPath[e.argumentPath.length - 1], - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(), - i = []; - if (n) { - let o = n.getDeepFieldValue(e.argumentPath)?.asObject(); - o && (o.markAsError(), (i = Object.keys(o.getFields()))); - } - t.addErrorMessage((o) => { - let s = [`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`]; - return ( - e.constraints.minFieldCount === 1 && e.constraints.maxFieldCount == 1 - ? s.push(`${o.green('exactly one')} argument,`) - : e.constraints.maxFieldCount == 1 - ? s.push(`${o.green('at most one')} argument,`) - : s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`), - s.push( - `but you provided ${Dr( - 'and', - i.map((a) => o.red(a)) - )}. Please choose` - ), - e.constraints.maxFieldCount === 1 ? s.push('one.') : s.push(`${e.constraints.maxFieldCount}.`), - s.join(' ') - ); - }); -} -function Mo(e, t) { - for (let r of t.fields) e.hasField(r.name) || e.addSuggestion(new le(r.name, 'true')); -} -function Zu(e, t) { - for (let r of t.fields) r.isRelation && !e.hasField(r.name) && e.addSuggestion(new le(r.name, 'true')); -} -function Xu(e, t) { - for (let r of t.fields) !e.hasField(r.name) && !r.isRelation && e.addSuggestion(new le(r.name, 'true')); -} -function ec(e, t) { - for (let r of t) e.hasField(r.name) || e.addSuggestion(new le(r.name, r.typeNames.join(' | '))); -} -function _o(e, t) { - let [r, n] = at(e), - i = t.arguments.getDeepSubSelectionValue(r)?.asObject(); - if (!i) return { parentKind: 'unknown', fieldName: n }; - let o = i.getFieldValue('select')?.asObject(), - s = i.getFieldValue('include')?.asObject(), - a = i.getFieldValue('omit')?.asObject(), - l = o?.getField(n); - return o && l - ? { parentKind: 'select', parent: o, field: l, fieldName: n } - : ((l = s?.getField(n)), - s && l - ? { parentKind: 'include', field: l, parent: s, fieldName: n } - : ((l = a?.getField(n)), - a && l - ? { parentKind: 'omit', field: l, parent: a, fieldName: n } - : { parentKind: 'unknown', fieldName: n })); -} -function No(e, t) { - if (t.kind === 'object') - for (let r of t.fields) e.hasField(r.name) || e.addSuggestion(new le(r.name, r.typeNames.join(' | '))); -} -function at(e) { - let t = [...e], - r = t.pop(); - if (!r) throw new Error('unexpected empty path'); - return [t, r]; -} -function It({ green: e, enabled: t }) { - return 'Available options are ' + (t ? `listed in ${e('green')}` : 'marked with ?') + '.'; -} -function Dr(e, t) { - if (t.length === 1) return t[0]; - let r = [...t], - n = r.pop(); - return `${r.join(', ')} ${e} ${n}`; -} -var tc = 3; -function rc(e, t) { - let r = 1 / 0, - n; - for (let i of t) { - let o = (0, Oo.default)(e, i); - o > tc || (o < r && ((r = o), (n = i))); - } - return n; -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Ot = class { - modelName; - name; - typeName; - isList; - isEnum; - constructor(t, r, n, i, o) { - ((this.modelName = t), (this.name = r), (this.typeName = n), (this.isList = i), (this.isEnum = o)); - } - _toGraphQLInputType() { - let t = this.isList ? 'List' : '', - r = this.isEnum ? 'Enum' : ''; - return `${t}${r}${this.typeName}FieldRefInput<${this.modelName}>`; - } -}; -function lt(e) { - return e instanceof Ot; -} -f(); -u(); -c(); -p(); -m(); -var Mr = Symbol(), - In = new WeakMap(), - Te = class { - constructor(t) { - t === Mr - ? In.set(this, `Prisma.${this._getName()}`) - : In.set(this, `new Prisma.${this._getNamespace()}.${this._getName()}()`); - } - _getName() { - return this.constructor.name; - } - toString() { - return In.get(this); - } - }, - kt = class extends Te { - _getNamespace() { - return 'NullTypes'; - } - }, - Dt = class extends kt { - #e; - }; -kn(Dt, 'DbNull'); -var Mt = class extends kt { - #e; -}; -kn(Mt, 'JsonNull'); -var _t = class extends kt { - #e; -}; -kn(_t, 'AnyNull'); -var On = { - classes: { DbNull: Dt, JsonNull: Mt, AnyNull: _t }, - instances: { DbNull: new Dt(Mr), JsonNull: new Mt(Mr), AnyNull: new _t(Mr) }, -}; -function kn(e, t) { - Object.defineProperty(e, 'name', { value: t, configurable: !0 }); -} -f(); -u(); -c(); -p(); -m(); -var Fo = ': ', - _r = class { - constructor(t, r) { - this.name = t; - this.value = r; - } - hasError = !1; - markAsError() { - this.hasError = !0; - } - getPrintWidth() { - return this.name.length + this.value.getPrintWidth() + Fo.length; - } - write(t) { - let r = new we(this.name); - (this.hasError && r.underline().setColor(t.context.colors.red), t.write(r).write(Fo).write(this.value)); - } - }; -var Dn = class { - arguments; - errorMessages = []; - constructor(t) { - this.arguments = t; - } - write(t) { - t.write(this.arguments); - } - addErrorMessage(t) { - this.errorMessages.push(t); - } - renderAllMessages(t) { - return this.errorMessages.map((r) => r(t)).join(` -`); - } -}; -function ut(e) { - return new Dn(Lo(e)); -} -function Lo(e) { - let t = new st(); - for (let [r, n] of Object.entries(e)) { - let i = new _r(r, Uo(n)); - t.addField(i); - } - return t; -} -function Uo(e) { - if (typeof e == 'string') return new H(JSON.stringify(e)); - if (typeof e == 'number' || typeof e == 'boolean') return new H(String(e)); - if (typeof e == 'bigint') return new H(`${e}n`); - if (e === null) return new H('null'); - if (e === void 0) return new H('undefined'); - if (rt(e)) return new H(`new Prisma.Decimal("${e.toFixed()}")`); - if (e instanceof Uint8Array) - return w.Buffer.isBuffer(e) ? new H(`Buffer.alloc(${e.byteLength})`) : new H(`new Uint8Array(${e.byteLength})`); - if (e instanceof Date) { - let t = yr(e) ? e.toISOString() : 'Invalid Date'; - return new H(`new Date("${t}")`); - } - return e instanceof Te - ? new H(`Prisma.${e._getName()}`) - : lt(e) - ? new H(`prisma.${Ie(e.modelName)}.$fields.${e.name}`) - : Array.isArray(e) - ? nc(e) - : typeof e == 'object' - ? Lo(e) - : new H(Object.prototype.toString.call(e)); -} -function nc(e) { - let t = new ot(); - for (let r of e) t.addItem(Uo(r)); - return t; -} -function Nr(e, t) { - let r = t === 'pretty' ? Io : kr, - n = e.renderAllMessages(r), - i = new nt(0, { colors: r }).write(e).toString(); - return { message: n, args: i }; -} -function Fr({ args: e, errors: t, errorFormat: r, callsite: n, originalMethod: i, clientVersion: o, globalOmit: s }) { - let a = ut(e); - for (let h of t) Sr(h, a, s); - let { message: l, args: d } = Nr(a, r), - g = Rr({ message: l, callsite: n, originalMethod: i, showColors: r === 'pretty', callArguments: d }); - throw new ee(g, { clientVersion: o }); -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -function Ee(e) { - return e.replace(/^./, (t) => t.toLowerCase()); -} -f(); -u(); -c(); -p(); -m(); -function qo(e, t, r) { - let n = Ee(r); - return !t.result || !(t.result.$allModels || t.result[n]) - ? e - : ic({ ...e, ...Bo(t.name, e, t.result.$allModels), ...Bo(t.name, e, t.result[n]) }); -} -function ic(e) { - let t = new ge(), - r = (n, i) => - t.getOrCreate(n, () => (i.has(n) ? [n] : (i.add(n), e[n] ? e[n].needs.flatMap((o) => r(o, i)) : [n]))); - return gr(e, (n) => ({ ...n, needs: r(n.name, new Set()) })); -} -function Bo(e, t, r) { - return r - ? gr(r, ({ needs: n, compute: i }, o) => ({ - name: o, - needs: n ? Object.keys(n).filter((s) => n[s]) : [], - compute: oc(t, o, i), - })) - : {}; -} -function oc(e, t, r) { - let n = e?.[t]?.compute; - return n ? (i) => r({ ...i, [t]: n(i) }) : r; -} -function Vo(e, t) { - if (!t) return e; - let r = { ...e }; - for (let n of Object.values(t)) if (e[n.name]) for (let i of n.needs) r[i] = !0; - return r; -} -function $o(e, t) { - if (!t) return e; - let r = { ...e }; - for (let n of Object.values(t)) if (!e[n.name]) for (let i of n.needs) delete r[i]; - return r; -} -var Lr = class { - constructor(t, r) { - this.extension = t; - this.previous = r; - } - computedFieldsCache = new ge(); - modelExtensionsCache = new ge(); - queryCallbacksCache = new ge(); - clientExtensions = At(() => - this.extension.client - ? { ...this.previous?.getAllClientExtensions(), ...this.extension.client } - : this.previous?.getAllClientExtensions() - ); - batchCallbacks = At(() => { - let t = this.previous?.getAllBatchQueryCallbacks() ?? [], - r = this.extension.query?.$__internalBatch; - return r ? t.concat(r) : t; - }); - getAllComputedFields(t) { - return this.computedFieldsCache.getOrCreate(t, () => - qo(this.previous?.getAllComputedFields(t), this.extension, t) - ); - } - getAllClientExtensions() { - return this.clientExtensions.get(); - } - getAllModelExtensions(t) { - return this.modelExtensionsCache.getOrCreate(t, () => { - let r = Ee(t); - return !this.extension.model || !(this.extension.model[r] || this.extension.model.$allModels) - ? this.previous?.getAllModelExtensions(t) - : { - ...this.previous?.getAllModelExtensions(t), - ...this.extension.model.$allModels, - ...this.extension.model[r], - }; - }); - } - getAllQueryCallbacks(t, r) { - return this.queryCallbacksCache.getOrCreate(`${t}:${r}`, () => { - let n = this.previous?.getAllQueryCallbacks(t, r) ?? [], - i = [], - o = this.extension.query; - return !o || !(o[t] || o.$allModels || o[r] || o.$allOperations) - ? n - : (o[t] !== void 0 && - (o[t][r] !== void 0 && i.push(o[t][r]), o[t].$allOperations !== void 0 && i.push(o[t].$allOperations)), - t !== '$none' && - o.$allModels !== void 0 && - (o.$allModels[r] !== void 0 && i.push(o.$allModels[r]), - o.$allModels.$allOperations !== void 0 && i.push(o.$allModels.$allOperations)), - o[r] !== void 0 && i.push(o[r]), - o.$allOperations !== void 0 && i.push(o.$allOperations), - n.concat(i)); - }); - } - getAllBatchQueryCallbacks() { - return this.batchCallbacks.get(); - } - }, - ct = class e { - constructor(t) { - this.head = t; - } - static empty() { - return new e(); - } - static single(t) { - return new e(new Lr(t)); - } - isEmpty() { - return this.head === void 0; - } - append(t) { - return new e(new Lr(t, this.head)); - } - getAllComputedFields(t) { - return this.head?.getAllComputedFields(t); - } - getAllClientExtensions() { - return this.head?.getAllClientExtensions(); - } - getAllModelExtensions(t) { - return this.head?.getAllModelExtensions(t); - } - getAllQueryCallbacks(t, r) { - return this.head?.getAllQueryCallbacks(t, r) ?? []; - } - getAllBatchQueryCallbacks() { - return this.head?.getAllBatchQueryCallbacks() ?? []; - } - }; -f(); -u(); -c(); -p(); -m(); -var Ur = class { - constructor(t) { - this.name = t; - } -}; -function jo(e) { - return e instanceof Ur; -} -function sc(e) { - return new Ur(e); -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Go = Symbol(), - Nt = class { - constructor(t) { - if (t !== Go) throw new Error('Skip instance can not be constructed directly'); - } - ifUndefined(t) { - return t === void 0 ? Mn : t; - } - }, - Mn = new Nt(Go); -function be(e) { - return e instanceof Nt; -} -var ac = { - findUnique: 'findUnique', - findUniqueOrThrow: 'findUniqueOrThrow', - findFirst: 'findFirst', - findFirstOrThrow: 'findFirstOrThrow', - findMany: 'findMany', - count: 'aggregate', - create: 'createOne', - createMany: 'createMany', - createManyAndReturn: 'createManyAndReturn', - update: 'updateOne', - updateMany: 'updateMany', - updateManyAndReturn: 'updateManyAndReturn', - upsert: 'upsertOne', - delete: 'deleteOne', - deleteMany: 'deleteMany', - executeRaw: 'executeRaw', - queryRaw: 'queryRaw', - aggregate: 'aggregate', - groupBy: 'groupBy', - runCommandRaw: 'runCommandRaw', - findRaw: 'findRaw', - aggregateRaw: 'aggregateRaw', - }, - Jo = 'explicitly `undefined` values are not allowed'; -function Nn({ - modelName: e, - action: t, - args: r, - runtimeDataModel: n, - extensions: i = ct.empty(), - callsite: o, - clientMethod: s, - errorFormat: a, - clientVersion: l, - previewFeatures: d, - globalOmit: g, -}) { - let h = new _n({ - runtimeDataModel: n, - modelName: e, - action: t, - rootArgs: r, - callsite: o, - extensions: i, - selectionPath: [], - argumentPath: [], - originalMethod: s, - errorFormat: a, - clientVersion: l, - previewFeatures: d, - globalOmit: g, - }); - return { modelName: e, action: ac[t], query: Ft(r, h) }; -} -function Ft({ select: e, include: t, ...r } = {}, n) { - let i = r.omit; - return (delete r.omit, { arguments: Ko(r, n), selection: lc(e, t, i, n) }); -} -function lc(e, t, r, n) { - return e - ? (t - ? n.throwValidationError({ - kind: 'MutuallyExclusiveFields', - firstField: 'include', - secondField: 'select', - selectionPath: n.getSelectionPath(), - }) - : r && - n.throwValidationError({ - kind: 'MutuallyExclusiveFields', - firstField: 'omit', - secondField: 'select', - selectionPath: n.getSelectionPath(), - }), - mc(e, n)) - : uc(n, t, r); -} -function uc(e, t, r) { - let n = {}; - return ( - e.modelOrType && !e.isRawAction() && ((n.$composites = !0), (n.$scalars = !0)), - t && cc(n, t, e), - pc(n, r, e), - n - ); -} -function cc(e, t, r) { - for (let [n, i] of Object.entries(t)) { - if (be(i)) continue; - let o = r.nestSelection(n); - if ((Fn(i, o), i === !1 || i === void 0)) { - e[n] = !1; - continue; - } - let s = r.findField(n); - if ( - (s && - s.kind !== 'object' && - r.throwValidationError({ - kind: 'IncludeOnScalar', - selectionPath: r.getSelectionPath().concat(n), - outputType: r.getOutputTypeDescription(), - }), - s) - ) { - e[n] = Ft(i === !0 ? {} : i, o); - continue; - } - if (i === !0) { - e[n] = !0; - continue; - } - e[n] = Ft(i, o); - } -} -function pc(e, t, r) { - let n = r.getComputedFields(), - i = { ...r.getGlobalOmit(), ...t }, - o = $o(i, n); - for (let [s, a] of Object.entries(o)) { - if (be(a)) continue; - Fn(a, r.nestSelection(s)); - let l = r.findField(s); - (n?.[s] && !l) || (e[s] = !a); - } -} -function mc(e, t) { - let r = {}, - n = t.getComputedFields(), - i = Vo(e, n); - for (let [o, s] of Object.entries(i)) { - if (be(s)) continue; - let a = t.nestSelection(o); - Fn(s, a); - let l = t.findField(o); - if (!(n?.[o] && !l)) { - if (s === !1 || s === void 0 || be(s)) { - r[o] = !1; - continue; - } - if (s === !0) { - l?.kind === 'object' ? (r[o] = Ft({}, a)) : (r[o] = !0); - continue; - } - r[o] = Ft(s, a); - } - } - return r; -} -function Qo(e, t) { - if (e === null) return null; - if (typeof e == 'string' || typeof e == 'number' || typeof e == 'boolean') return e; - if (typeof e == 'bigint') return { $type: 'BigInt', value: String(e) }; - if (Xe(e)) { - if (yr(e)) return { $type: 'DateTime', value: e.toISOString() }; - t.throwValidationError({ - kind: 'InvalidArgumentValue', - selectionPath: t.getSelectionPath(), - argumentPath: t.getArgumentPath(), - argument: { name: t.getArgumentName(), typeNames: ['Date'] }, - underlyingError: 'Provided Date object is invalid', - }); - } - if (jo(e)) return { $type: 'Param', value: e.name }; - if (lt(e)) return { $type: 'FieldRef', value: { _ref: e.name, _container: e.modelName } }; - if (Array.isArray(e)) return fc(e, t); - if (ArrayBuffer.isView(e)) { - let { buffer: r, byteOffset: n, byteLength: i } = e; - return { $type: 'Bytes', value: w.Buffer.from(r, n, i).toString('base64') }; - } - if (dc(e)) return e.values; - if (rt(e)) return { $type: 'Decimal', value: e.toFixed() }; - if (e instanceof Te) { - if (e !== On.instances[e._getName()]) throw new Error('Invalid ObjectEnumValue'); - return { $type: 'Enum', value: e._getName() }; - } - if (gc(e)) return e.toJSON(); - if (typeof e == 'object') return Ko(e, t); - t.throwValidationError({ - kind: 'InvalidArgumentValue', - selectionPath: t.getSelectionPath(), - argumentPath: t.getArgumentPath(), - argument: { name: t.getArgumentName(), typeNames: [] }, - underlyingError: `We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`, - }); -} -function Ko(e, t) { - if (e.$type) return { $type: 'Raw', value: e }; - let r = {}; - for (let n in e) { - let i = e[n], - o = t.nestArgument(n); - be(i) || - (i !== void 0 - ? (r[n] = Qo(i, o)) - : t.isPreviewFeatureOn('strictUndefinedChecks') && - t.throwValidationError({ - kind: 'InvalidArgumentValue', - argumentPath: o.getArgumentPath(), - selectionPath: t.getSelectionPath(), - argument: { name: t.getArgumentName(), typeNames: [] }, - underlyingError: Jo, - })); - } - return r; -} -function fc(e, t) { - let r = []; - for (let n = 0; n < e.length; n++) { - let i = t.nestArgument(String(n)), - o = e[n]; - if (o === void 0 || be(o)) { - let s = o === void 0 ? 'undefined' : 'Prisma.skip'; - t.throwValidationError({ - kind: 'InvalidArgumentValue', - selectionPath: i.getSelectionPath(), - argumentPath: i.getArgumentPath(), - argument: { name: `${t.getArgumentName()}[${n}]`, typeNames: [] }, - underlyingError: `Can not use \`${s}\` value within array. Use \`null\` or filter out \`${s}\` values`, - }); - } - r.push(Qo(o, i)); - } - return r; -} -function dc(e) { - return typeof e == 'object' && e !== null && e.__prismaRawParameters__ === !0; -} -function gc(e) { - return typeof e == 'object' && e !== null && typeof e.toJSON == 'function'; -} -function Fn(e, t) { - e === void 0 && - t.isPreviewFeatureOn('strictUndefinedChecks') && - t.throwValidationError({ kind: 'InvalidSelectionValue', selectionPath: t.getSelectionPath(), underlyingError: Jo }); -} -var _n = class e { - constructor(t) { - this.params = t; - this.params.modelName && - (this.modelOrType = - this.params.runtimeDataModel.models[this.params.modelName] ?? - this.params.runtimeDataModel.types[this.params.modelName]); - } - modelOrType; - throwValidationError(t) { - Fr({ - errors: [t], - originalMethod: this.params.originalMethod, - args: this.params.rootArgs ?? {}, - callsite: this.params.callsite, - errorFormat: this.params.errorFormat, - clientVersion: this.params.clientVersion, - globalOmit: this.params.globalOmit, - }); - } - getSelectionPath() { - return this.params.selectionPath; - } - getArgumentPath() { - return this.params.argumentPath; - } - getArgumentName() { - return this.params.argumentPath[this.params.argumentPath.length - 1]; - } - getOutputTypeDescription() { - if (!(!this.params.modelName || !this.modelOrType)) - return { - name: this.params.modelName, - fields: this.modelOrType.fields.map((t) => ({ - name: t.name, - typeName: 'boolean', - isRelation: t.kind === 'object', - })), - }; - } - isRawAction() { - return ['executeRaw', 'queryRaw', 'runCommandRaw', 'findRaw', 'aggregateRaw'].includes(this.params.action); - } - isPreviewFeatureOn(t) { - return this.params.previewFeatures.includes(t); - } - getComputedFields() { - if (this.params.modelName) return this.params.extensions.getAllComputedFields(this.params.modelName); - } - findField(t) { - return this.modelOrType?.fields.find((r) => r.name === t); - } - nestSelection(t) { - let r = this.findField(t), - n = r?.kind === 'object' ? r.type : void 0; - return new e({ ...this.params, modelName: n, selectionPath: this.params.selectionPath.concat(t) }); - } - getGlobalOmit() { - return this.params.modelName && this.shouldApplyGlobalOmit() - ? (this.params.globalOmit?.[Ie(this.params.modelName)] ?? {}) - : {}; - } - shouldApplyGlobalOmit() { - switch (this.params.action) { - case 'findFirst': - case 'findFirstOrThrow': - case 'findUniqueOrThrow': - case 'findMany': - case 'upsert': - case 'findUnique': - case 'createManyAndReturn': - case 'create': - case 'update': - case 'updateManyAndReturn': - case 'delete': - return !0; - case 'executeRaw': - case 'aggregateRaw': - case 'runCommandRaw': - case 'findRaw': - case 'createMany': - case 'deleteMany': - case 'groupBy': - case 'updateMany': - case 'count': - case 'aggregate': - case 'queryRaw': - return !1; - default: - qe(this.params.action, 'Unknown action'); - } - } - nestArgument(t) { - return new e({ ...this.params, argumentPath: this.params.argumentPath.concat(t) }); - } -}; -f(); -u(); -c(); -p(); -m(); -function Wo(e) { - if (!e._hasPreviewFlag('metrics')) - throw new ee('`metrics` preview feature must be enabled in order to access metrics API', { - clientVersion: e._clientVersion, - }); -} -var Lt = class { - _client; - constructor(t) { - this._client = t; - } - prometheus(t) { - return (Wo(this._client), this._client._engine.metrics({ format: 'prometheus', ...t })); - } - json(t) { - return (Wo(this._client), this._client._engine.metrics({ format: 'json', ...t })); - } -}; -f(); -u(); -c(); -p(); -m(); -function hc(e, t) { - let r = At(() => yc(t)); - Object.defineProperty(e, 'dmmf', { get: () => r.get() }); -} -function yc(e) { - return { datamodel: { models: Ln(e.models), enums: Ln(e.enums), types: Ln(e.types) } }; -} -function Ln(e) { - return Object.entries(e).map(([t, r]) => ({ name: t, ...r })); -} -f(); -u(); -c(); -p(); -m(); -var Un = new WeakMap(), - Br = '$$PrismaTypedSql', - Ut = class { - constructor(t, r) { - (Un.set(this, { sql: t, values: r }), Object.defineProperty(this, Br, { value: Br })); - } - get sql() { - return Un.get(this).sql; - } - get values() { - return Un.get(this).values; - } - }; -function wc(e) { - return (...t) => new Ut(e, t); -} -function qr(e) { - return e != null && e[Br] === Br; -} -f(); -u(); -c(); -p(); -m(); -var ma = Ue(hn()); -f(); -u(); -c(); -p(); -m(); -Ho(); -ji(); -Ki(); -f(); -u(); -c(); -p(); -m(); -var ue = class e { - constructor(t, r) { - if (t.length - 1 !== r.length) - throw t.length === 0 - ? new TypeError('Expected at least 1 string') - : new TypeError(`Expected ${t.length} strings to have ${t.length - 1} values`); - let n = r.reduce((s, a) => s + (a instanceof e ? a.values.length : 1), 0); - ((this.values = new Array(n)), (this.strings = new Array(n + 1)), (this.strings[0] = t[0])); - let i = 0, - o = 0; - for (; i < r.length; ) { - let s = r[i++], - a = t[i]; - if (s instanceof e) { - this.strings[o] += s.strings[0]; - let l = 0; - for (; l < s.values.length; ) ((this.values[o++] = s.values[l++]), (this.strings[o] = s.strings[l])); - this.strings[o] += a; - } else ((this.values[o++] = s), (this.strings[o] = a)); - } - } - get sql() { - let t = this.strings.length, - r = 1, - n = this.strings[0]; - for (; r < t; ) n += `?${this.strings[r++]}`; - return n; - } - get statement() { - let t = this.strings.length, - r = 1, - n = this.strings[0]; - for (; r < t; ) n += `:${r}${this.strings[r++]}`; - return n; - } - get text() { - let t = this.strings.length, - r = 1, - n = this.strings[0]; - for (; r < t; ) n += `$${r}${this.strings[r++]}`; - return n; - } - inspect() { - return { sql: this.sql, statement: this.statement, text: this.text, values: this.values }; - } -}; -function Ec(e, t = ',', r = '', n = '') { - if (e.length === 0) - throw new TypeError('Expected `join([])` to be called with an array of multiple elements, but got an empty array'); - return new ue([r, ...Array(e.length - 1).fill(t), n], e); -} -function zo(e) { - return new ue([e], []); -} -var bc = zo(''); -function Yo(e, ...t) { - return new ue(e, t); -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -function Bt(e) { - return { - getKeys() { - return Object.keys(e); - }, - getPropertyValue(t) { - return e[t]; - }, - }; -} -f(); -u(); -c(); -p(); -m(); -function te(e, t) { - return { - getKeys() { - return [e]; - }, - getPropertyValue() { - return t(); - }, - }; -} -f(); -u(); -c(); -p(); -m(); -function Ve(e) { - let t = new ge(); - return { - getKeys() { - return e.getKeys(); - }, - getPropertyValue(r) { - return t.getOrCreate(r, () => e.getPropertyValue(r)); - }, - getPropertyDescriptor(r) { - return e.getPropertyDescriptor?.(r); - }, - }; -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var $r = { enumerable: !0, configurable: !0, writable: !0 }; -function jr(e) { - let t = new Set(e); - return { - getPrototypeOf: () => Object.prototype, - getOwnPropertyDescriptor: () => $r, - has: (r, n) => t.has(n), - set: (r, n, i) => t.add(n) && Reflect.set(r, n, i), - ownKeys: () => [...t], - }; -} -var Zo = Symbol.for('nodejs.util.inspect.custom'); -function me(e, t) { - let r = xc(t), - n = new Set(), - i = new Proxy(e, { - get(o, s) { - if (n.has(s)) return o[s]; - let a = r.get(s); - return a ? a.getPropertyValue(s) : o[s]; - }, - has(o, s) { - if (n.has(s)) return !0; - let a = r.get(s); - return a ? (a.has?.(s) ?? !0) : Reflect.has(o, s); - }, - ownKeys(o) { - let s = Xo(Reflect.ownKeys(o), r), - a = Xo(Array.from(r.keys()), r); - return [...new Set([...s, ...a, ...n])]; - }, - set(o, s, a) { - return r.get(s)?.getPropertyDescriptor?.(s)?.writable === !1 ? !1 : (n.add(s), Reflect.set(o, s, a)); - }, - getOwnPropertyDescriptor(o, s) { - let a = Reflect.getOwnPropertyDescriptor(o, s); - if (a && !a.configurable) return a; - let l = r.get(s); - return l ? (l.getPropertyDescriptor ? { ...$r, ...l?.getPropertyDescriptor(s) } : $r) : a; - }, - defineProperty(o, s, a) { - return (n.add(s), Reflect.defineProperty(o, s, a)); - }, - getPrototypeOf: () => Object.prototype, - }); - return ( - (i[Zo] = function () { - let o = { ...this }; - return (delete o[Zo], o); - }), - i - ); -} -function xc(e) { - let t = new Map(); - for (let r of e) { - let n = r.getKeys(); - for (let i of n) t.set(i, r); - } - return t; -} -function Xo(e, t) { - return e.filter((r) => t.get(r)?.has?.(r) ?? !0); -} -f(); -u(); -c(); -p(); -m(); -function pt(e) { - return { - getKeys() { - return e; - }, - has() { - return !1; - }, - getPropertyValue() {}, - }; -} -f(); -u(); -c(); -p(); -m(); -function Gr(e, t) { - return { batch: e, transaction: t?.kind === 'batch' ? { isolationLevel: t.options.isolationLevel } : void 0 }; -} -f(); -u(); -c(); -p(); -m(); -function es(e) { - if (e === void 0) return ''; - let t = ut(e); - return new nt(0, { colors: kr }).write(t).toString(); -} -f(); -u(); -c(); -p(); -m(); -var Pc = 'P2037'; -function Jr({ error: e, user_facing_error: t }, r, n) { - return t.error_code - ? new se(vc(t, n), { code: t.error_code, clientVersion: r, meta: t.meta, batchRequestIdx: t.batch_request_idx }) - : new ae(e, { clientVersion: r, batchRequestIdx: t.batch_request_idx }); -} -function vc(e, t) { - let r = e.message; - return ( - (t === 'postgresql' || t === 'postgres' || t === 'mysql') && - e.error_code === Pc && - (r += ` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`), - r - ); -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Bn = class { - getLocation() { - return null; - } -}; -function Fe(e) { - return typeof $EnabledCallSite == 'function' && e !== 'minimal' ? new $EnabledCallSite() : new Bn(); -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var ts = { _avg: !0, _count: !0, _sum: !0, _min: !0, _max: !0 }; -function mt(e = {}) { - let t = Ac(e); - return Object.entries(t).reduce((n, [i, o]) => (ts[i] !== void 0 ? (n.select[i] = { select: o }) : (n[i] = o), n), { - select: {}, - }); -} -function Ac(e = {}) { - return typeof e._count == 'boolean' ? { ...e, _count: { _all: e._count } } : e; -} -function Qr(e = {}) { - return (t) => (typeof e._count == 'boolean' && (t._count = t._count._all), t); -} -function rs(e, t) { - let r = Qr(e); - return t({ action: 'aggregate', unpacker: r, argsMapper: mt })(e); -} -f(); -u(); -c(); -p(); -m(); -function Cc(e = {}) { - let { select: t, ...r } = e; - return typeof t == 'object' ? mt({ ...r, _count: t }) : mt({ ...r, _count: { _all: !0 } }); -} -function Rc(e = {}) { - return typeof e.select == 'object' ? (t) => Qr(e)(t)._count : (t) => Qr(e)(t)._count._all; -} -function ns(e, t) { - return t({ action: 'count', unpacker: Rc(e), argsMapper: Cc })(e); -} -f(); -u(); -c(); -p(); -m(); -function Sc(e = {}) { - let t = mt(e); - if (Array.isArray(t.by)) for (let r of t.by) typeof r == 'string' && (t.select[r] = !0); - else typeof t.by == 'string' && (t.select[t.by] = !0); - return t; -} -function Ic(e = {}) { - return (t) => ( - typeof e?._count == 'boolean' && - t.forEach((r) => { - r._count = r._count._all; - }), - t - ); -} -function is(e, t) { - return t({ action: 'groupBy', unpacker: Ic(e), argsMapper: Sc })(e); -} -function os(e, t, r) { - if (t === 'aggregate') return (n) => rs(n, r); - if (t === 'count') return (n) => ns(n, r); - if (t === 'groupBy') return (n) => is(n, r); -} -f(); -u(); -c(); -p(); -m(); -function ss(e, t) { - let r = t.fields.filter((i) => !i.relationName), - n = so(r, 'name'); - return new Proxy( - {}, - { - get(i, o) { - if (o in i || typeof o == 'symbol') return i[o]; - let s = n[o]; - if (s) return new Ot(e, o, s.type, s.isList, s.kind === 'enum'); - }, - ...jr(Object.keys(n)), - } - ); -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var as = (e) => (Array.isArray(e) ? e : e.split('.')), - qn = (e, t) => as(t).reduce((r, n) => r && r[n], e), - ls = (e, t, r) => as(t).reduceRight((n, i, o, s) => Object.assign({}, qn(e, s.slice(0, o)), { [i]: n }), r); -function Oc(e, t) { - return e === void 0 || t === void 0 ? [] : [...t, 'select', e]; -} -function kc(e, t, r) { - return t === void 0 ? (e ?? {}) : ls(t, r, e || !0); -} -function Vn(e, t, r, n, i, o) { - let a = e._runtimeDataModel.models[t].fields.reduce((l, d) => ({ ...l, [d.name]: d }), {}); - return (l) => { - let d = Fe(e._errorFormat), - g = Oc(n, i), - h = kc(l, o, g), - T = r({ dataPath: g, callsite: d })(h), - I = Dc(e, t); - return new Proxy(T, { - get(S, R) { - if (!I.includes(R)) return S[R]; - let F = [a[R].type, r, R], - B = [g, h]; - return Vn(e, ...F, ...B); - }, - ...jr([...I, ...Object.getOwnPropertyNames(T)]), - }); - }; -} -function Dc(e, t) { - return e._runtimeDataModel.models[t].fields.filter((r) => r.kind === 'object').map((r) => r.name); -} -var Mc = ['findUnique', 'findUniqueOrThrow', 'findFirst', 'findFirstOrThrow', 'create', 'update', 'upsert', 'delete'], - _c = ['aggregate', 'count', 'groupBy']; -function $n(e, t) { - let r = e._extensions.getAllModelExtensions(t) ?? {}, - n = [Nc(e, t), Lc(e, t), Bt(r), te('name', () => t), te('$name', () => t), te('$parent', () => e._appliedParent)]; - return me({}, n); -} -function Nc(e, t) { - let r = Ee(t), - n = Object.keys(Rt).concat('count'); - return { - getKeys() { - return n; - }, - getPropertyValue(i) { - let o = i, - s = (a) => (l) => { - let d = Fe(e._errorFormat); - return e._createPrismaPromise( - (g) => { - let h = { - args: l, - dataPath: [], - action: o, - model: t, - clientMethod: `${r}.${i}`, - jsModelName: r, - transaction: g, - callsite: d, - }; - return e._request({ ...h, ...a }); - }, - { action: o, args: l, model: t } - ); - }; - return Mc.includes(o) ? Vn(e, t, s) : Fc(i) ? os(e, i, s) : s({}); - }, - }; -} -function Fc(e) { - return _c.includes(e); -} -function Lc(e, t) { - return Ve( - te('fields', () => { - let r = e._runtimeDataModel.models[t]; - return ss(t, r); - }) - ); -} -f(); -u(); -c(); -p(); -m(); -function us(e) { - return e.replace(/^./, (t) => t.toUpperCase()); -} -var jn = Symbol(); -function qt(e) { - let t = [Uc(e), Bc(e), te(jn, () => e), te('$parent', () => e._appliedParent)], - r = e._extensions.getAllClientExtensions(); - return (r && t.push(Bt(r)), me(e, t)); -} -function Uc(e) { - let t = Object.getPrototypeOf(e._originalClient), - r = [...new Set(Object.getOwnPropertyNames(t))]; - return { - getKeys() { - return r; - }, - getPropertyValue(n) { - return e[n]; - }, - }; -} -function Bc(e) { - let t = Object.keys(e._runtimeDataModel.models), - r = t.map(Ee), - n = [...new Set(t.concat(r))]; - return Ve({ - getKeys() { - return n; - }, - getPropertyValue(i) { - let o = us(i); - if (e._runtimeDataModel.models[o] !== void 0) return $n(e, o); - if (e._runtimeDataModel.models[i] !== void 0) return $n(e, i); - }, - getPropertyDescriptor(i) { - if (!r.includes(i)) return { enumerable: !1 }; - }, - }); -} -function cs(e) { - return e[jn] ? e[jn] : e; -} -function ps(e) { - if (typeof e == 'function') return e(this); - if (e.client?.__AccelerateEngine) { - let r = e.client.__AccelerateEngine; - this._originalClient._engine = new r(this._originalClient._accelerateEngineConfig); - } - let t = Object.create(this._originalClient, { - _extensions: { value: this._extensions.append(e) }, - _appliedParent: { value: this, configurable: !0 }, - $on: { value: void 0 }, - }); - return qt(t); -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -function ms({ result: e, modelName: t, select: r, omit: n, extensions: i }) { - let o = i.getAllComputedFields(t); - if (!o) return e; - let s = [], - a = []; - for (let l of Object.values(o)) { - if (n) { - if (n[l.name]) continue; - let d = l.needs.filter((g) => n[g]); - d.length > 0 && a.push(pt(d)); - } else if (r) { - if (!r[l.name]) continue; - let d = l.needs.filter((g) => !r[g]); - d.length > 0 && a.push(pt(d)); - } - qc(e, l.needs) && s.push(Vc(l, me(e, s))); - } - return s.length > 0 || a.length > 0 ? me(e, [...s, ...a]) : e; -} -function qc(e, t) { - return t.every((r) => En(e, r)); -} -function Vc(e, t) { - return Ve(te(e.name, () => e.compute(t))); -} -f(); -u(); -c(); -p(); -m(); -function Kr({ visitor: e, result: t, args: r, runtimeDataModel: n, modelName: i }) { - if (Array.isArray(t)) { - for (let s = 0; s < t.length; s++) - t[s] = Kr({ result: t[s], args: r, modelName: i, runtimeDataModel: n, visitor: e }); - return t; - } - let o = e(t, i, r) ?? t; - return ( - r.include && fs({ includeOrSelect: r.include, result: o, parentModelName: i, runtimeDataModel: n, visitor: e }), - r.select && fs({ includeOrSelect: r.select, result: o, parentModelName: i, runtimeDataModel: n, visitor: e }), - o - ); -} -function fs({ includeOrSelect: e, result: t, parentModelName: r, runtimeDataModel: n, visitor: i }) { - for (let [o, s] of Object.entries(e)) { - if (!s || t[o] == null || be(s)) continue; - let l = n.models[r].fields.find((g) => g.name === o); - if (!l || l.kind !== 'object' || !l.relationName) continue; - let d = typeof s == 'object' ? s : {}; - t[o] = Kr({ visitor: i, result: t[o], args: d, modelName: l.type, runtimeDataModel: n }); - } -} -function ds({ result: e, modelName: t, args: r, extensions: n, runtimeDataModel: i, globalOmit: o }) { - return n.isEmpty() || e == null || typeof e != 'object' || !i.models[t] - ? e - : Kr({ - result: e, - args: r ?? {}, - modelName: t, - runtimeDataModel: i, - visitor: (a, l, d) => { - let g = Ee(l); - return ms({ - result: a, - modelName: g, - select: d.select, - omit: d.select ? void 0 : { ...o?.[g], ...d.omit }, - extensions: n, - }); - }, - }); -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var $c = ['$connect', '$disconnect', '$on', '$transaction', '$extends'], - gs = $c; -function hs(e) { - if (e instanceof ue) return jc(e); - if (qr(e)) return Gc(e); - if (Array.isArray(e)) { - let r = [e[0]]; - for (let n = 1; n < e.length; n++) r[n] = Vt(e[n]); - return r; - } - let t = {}; - for (let r in e) t[r] = Vt(e[r]); - return t; -} -function jc(e) { - return new ue(e.strings, e.values); -} -function Gc(e) { - return new Ut(e.sql, e.values); -} -function Vt(e) { - if (typeof e != 'object' || e == null || e instanceof Te || lt(e)) return e; - if (rt(e)) return new _e(e.toFixed()); - if (Xe(e)) return new Date(+e); - if (ArrayBuffer.isView(e)) return e.slice(0); - if (Array.isArray(e)) { - let t = e.length, - r; - for (r = Array(t); t--; ) r[t] = Vt(e[t]); - return r; - } - if (typeof e == 'object') { - let t = {}; - for (let r in e) - r === '__proto__' - ? Object.defineProperty(t, r, { value: Vt(e[r]), configurable: !0, enumerable: !0, writable: !0 }) - : (t[r] = Vt(e[r])); - return t; - } - qe(e, 'Unknown value'); -} -function ws(e, t, r, n = 0) { - return e._createPrismaPromise((i) => { - let o = t.customDataProxyFetch; - return ( - 'transaction' in t && - i !== void 0 && - (t.transaction?.kind === 'batch' && t.transaction.lock.then(), (t.transaction = i)), - n === r.length - ? e._executeRequest(t) - : r[n]({ - model: t.model, - operation: t.model ? t.action : t.clientMethod, - args: hs(t.args ?? {}), - __internalParams: t, - query: (s, a = t) => { - let l = a.customDataProxyFetch; - return ((a.customDataProxyFetch = Ps(o, l)), (a.args = s), ws(e, a, r, n + 1)); - }, - }) - ); - }); -} -function Es(e, t) { - let { jsModelName: r, action: n, clientMethod: i } = t, - o = r ? n : i; - if (e._extensions.isEmpty()) return e._executeRequest(t); - let s = e._extensions.getAllQueryCallbacks(r ?? '$none', o); - return ws(e, t, s); -} -function bs(e) { - return (t) => { - let r = { requests: t }, - n = t[0].extensions.getAllBatchQueryCallbacks(); - return n.length ? xs(r, n, 0, e) : e(r); - }; -} -function xs(e, t, r, n) { - if (r === t.length) return n(e); - let i = e.customDataProxyFetch, - o = e.requests[0].transaction; - return t[r]({ - args: { - queries: e.requests.map((s) => ({ model: s.modelName, operation: s.action, args: s.args })), - transaction: o ? { isolationLevel: o.kind === 'batch' ? o.isolationLevel : void 0 } : void 0, - }, - __internalParams: e, - query(s, a = e) { - let l = a.customDataProxyFetch; - return ((a.customDataProxyFetch = Ps(i, l)), xs(a, t, r + 1, n)); - }, - }); -} -var ys = (e) => e; -function Ps(e = ys, t = ys) { - return (r) => e(t(r)); -} -f(); -u(); -c(); -p(); -m(); -var vs = Z('prisma:client'), - Ts = { Vercel: 'vercel', 'Netlify CI': 'netlify' }; -function As({ postinstall: e, ciName: t, clientVersion: r }) { - if ((vs('checkPlatformCaching:postinstall', e), vs('checkPlatformCaching:ciName', t), e === !0 && t && t in Ts)) { - let n = `Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${Ts[t]}-build`; - throw (console.error(n), new Q(n, r)); - } -} -f(); -u(); -c(); -p(); -m(); -function Cs(e, t) { - return e ? (e.datasources ? e.datasources : e.datasourceUrl ? { [t[0]]: { url: e.datasourceUrl } } : {}) : {}; -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Jc = () => globalThis.process?.release?.name === 'node', - Qc = () => !!globalThis.Bun || !!globalThis.process?.versions?.bun, - Kc = () => !!globalThis.Deno, - Wc = () => typeof globalThis.Netlify == 'object', - Hc = () => typeof globalThis.EdgeRuntime == 'object', - zc = () => globalThis.navigator?.userAgent === 'Cloudflare-Workers'; -function Yc() { - return ( - [ - [Wc, 'netlify'], - [Hc, 'edge-light'], - [zc, 'workerd'], - [Kc, 'deno'], - [Qc, 'bun'], - [Jc, 'node'], - ] - .flatMap((r) => (r[0]() ? [r[1]] : [])) - .at(0) ?? '' - ); -} -var Zc = { - node: 'Node.js', - workerd: 'Cloudflare Workers', - deno: 'Deno and Deno Deploy', - netlify: 'Netlify Edge Functions', - 'edge-light': - 'Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)', -}; -function Gn() { - let e = Yc(); - return { id: e, prettyName: Zc[e] || e, isEdge: ['workerd', 'deno', 'netlify', 'edge-light'].includes(e) }; -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -function Rs(e, t) { - throw new Error(t); -} -function Xc(e) { - return e !== null && typeof e == 'object' && typeof e.$type == 'string'; -} -function ep(e, t) { - let r = {}; - for (let n of Object.keys(e)) r[n] = t(e[n], n); - return r; -} -function $t(e) { - return e === null - ? e - : Array.isArray(e) - ? e.map($t) - : typeof e == 'object' - ? Xc(e) - ? tp(e) - : e.constructor !== null && e.constructor.name !== 'Object' - ? e - : ep(e, $t) - : e; -} -function tp({ $type: e, value: t }) { - switch (e) { - case 'BigInt': - return BigInt(t); - case 'Bytes': { - let { buffer: r, byteOffset: n, byteLength: i } = w.Buffer.from(t, 'base64'); - return new Uint8Array(r, n, i); - } - case 'DateTime': - return new Date(t); - case 'Decimal': - return new ve(t); - case 'Json': - return JSON.parse(t); - default: - Rs(t, 'Unknown tagged value'); - } -} -var Ss = '6.14.0'; -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -function ft({ inlineDatasources: e, overrideDatasources: t, env: r, clientVersion: n }) { - let i, - o = Object.keys(e)[0], - s = e[o]?.url, - a = t[o]?.url; - if ( - (o === void 0 ? (i = void 0) : a ? (i = a) : s?.value ? (i = s.value) : s?.fromEnvVar && (i = r[s.fromEnvVar]), - s?.fromEnvVar !== void 0 && i === void 0) - ) - throw Gn().id === 'workerd' - ? new Q( - `error: Environment variable not found: ${s.fromEnvVar}. - -In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`, - n - ) - : new Q(`error: Environment variable not found: ${s.fromEnvVar}.`, n); - if (i === void 0) throw new Q('error: Missing URL environment variable, value, or override.', n); - return i; -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Wr = class extends Error { - clientVersion; - cause; - constructor(t, r) { - (super(t), (this.clientVersion = r.clientVersion), (this.cause = r.cause)); - } - get [Symbol.toStringTag]() { - return this.name; - } -}; -var ie = class extends Wr { - isRetryable; - constructor(t, r) { - (super(t, r), (this.isRetryable = r.isRetryable ?? !0)); - } -}; -f(); -u(); -c(); -p(); -m(); -function U(e, t) { - return { ...e, isRetryable: t }; -} -var $e = class extends ie { - name = 'InvalidDatasourceError'; - code = 'P6001'; - constructor(t, r) { - super(t, U(r, !1)); - } -}; -N($e, 'InvalidDatasourceError'); -function Is(e) { - let t = { clientVersion: e.clientVersion }, - r = Object.keys(e.inlineDatasources)[0], - n = ft({ - inlineDatasources: e.inlineDatasources, - overrideDatasources: e.overrideDatasources, - clientVersion: e.clientVersion, - env: { ...e.env, ...(typeof y < 'u' ? y.env : {}) }, - }), - i; - try { - i = new URL(n); - } catch { - throw new $e(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``, t); - } - let { protocol: o, searchParams: s } = i; - if (o !== 'prisma:' && o !== fr) - throw new $e( - `Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``, - t - ); - let a = s.get('api_key'); - if (a === null || a.length < 1) - throw new $e(`Error validating datasource \`${r}\`: the URL must contain a valid API key`, t); - let l = yn(i) ? 'http:' : 'https:', - d = new URL(i.href.replace(o, l)); - return { apiKey: a, url: d }; -} -f(); -u(); -c(); -p(); -m(); -var Os = Ue(Hi()), - Hr = class { - apiKey; - tracingHelper; - logLevel; - logQueries; - engineHash; - constructor({ apiKey: t, tracingHelper: r, logLevel: n, logQueries: i, engineHash: o }) { - ((this.apiKey = t), (this.tracingHelper = r), (this.logLevel = n), (this.logQueries = i), (this.engineHash = o)); - } - build({ traceparent: t, transactionId: r } = {}) { - let n = { - Accept: 'application/json', - Authorization: `Bearer ${this.apiKey}`, - 'Content-Type': 'application/json', - 'Prisma-Engine-Hash': this.engineHash, - 'Prisma-Engine-Version': Os.enginesVersion, - }; - (this.tracingHelper.isEnabled() && (n.traceparent = t ?? this.tracingHelper.getTraceParent()), - r && (n['X-Transaction-Id'] = r)); - let i = this.#e(); - return (i.length > 0 && (n['X-Capture-Telemetry'] = i.join(', ')), n); - } - #e() { - let t = []; - return ( - this.tracingHelper.isEnabled() && t.push('tracing'), - this.logLevel && t.push(this.logLevel), - this.logQueries && t.push('query'), - t - ); - } - }; -f(); -u(); -c(); -p(); -m(); -function np(e) { - return e[0] * 1e3 + e[1] / 1e6; -} -function Jn(e) { - return new Date(np(e)); -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var dt = class extends ie { - name = 'ForcedRetryError'; - code = 'P5001'; - constructor(t) { - super('This request must be retried', U(t, !0)); - } -}; -N(dt, 'ForcedRetryError'); -f(); -u(); -c(); -p(); -m(); -var je = class extends ie { - name = 'NotImplementedYetError'; - code = 'P5004'; - constructor(t, r) { - super(t, U(r, !1)); - } -}; -N(je, 'NotImplementedYetError'); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var G = class extends ie { - response; - constructor(t, r) { - (super(t, r), (this.response = r.response)); - let n = this.response.headers.get('prisma-request-id'); - if (n) { - let i = `(The request id was: ${n})`; - this.message = this.message + ' ' + i; - } - } -}; -var Ge = class extends G { - name = 'SchemaMissingError'; - code = 'P5005'; - constructor(t) { - super('Schema needs to be uploaded', U(t, !0)); - } -}; -N(Ge, 'SchemaMissingError'); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Qn = 'This request could not be understood by the server', - jt = class extends G { - name = 'BadRequestError'; - code = 'P5000'; - constructor(t, r, n) { - (super(r || Qn, U(t, !1)), n && (this.code = n)); - } - }; -N(jt, 'BadRequestError'); -f(); -u(); -c(); -p(); -m(); -var Gt = class extends G { - name = 'HealthcheckTimeoutError'; - code = 'P5013'; - logs; - constructor(t, r) { - (super('Engine not started: healthcheck timeout', U(t, !0)), (this.logs = r)); - } -}; -N(Gt, 'HealthcheckTimeoutError'); -f(); -u(); -c(); -p(); -m(); -var Jt = class extends G { - name = 'EngineStartupError'; - code = 'P5014'; - logs; - constructor(t, r, n) { - (super(r, U(t, !0)), (this.logs = n)); - } -}; -N(Jt, 'EngineStartupError'); -f(); -u(); -c(); -p(); -m(); -var Qt = class extends G { - name = 'EngineVersionNotSupportedError'; - code = 'P5012'; - constructor(t) { - super('Engine version is not supported', U(t, !1)); - } -}; -N(Qt, 'EngineVersionNotSupportedError'); -f(); -u(); -c(); -p(); -m(); -var Kn = 'Request timed out', - Kt = class extends G { - name = 'GatewayTimeoutError'; - code = 'P5009'; - constructor(t, r = Kn) { - super(r, U(t, !1)); - } - }; -N(Kt, 'GatewayTimeoutError'); -f(); -u(); -c(); -p(); -m(); -var ip = 'Interactive transaction error', - Wt = class extends G { - name = 'InteractiveTransactionError'; - code = 'P5015'; - constructor(t, r = ip) { - super(r, U(t, !1)); - } - }; -N(Wt, 'InteractiveTransactionError'); -f(); -u(); -c(); -p(); -m(); -var op = 'Request parameters are invalid', - Ht = class extends G { - name = 'InvalidRequestError'; - code = 'P5011'; - constructor(t, r = op) { - super(r, U(t, !1)); - } - }; -N(Ht, 'InvalidRequestError'); -f(); -u(); -c(); -p(); -m(); -var Wn = 'Requested resource does not exist', - zt = class extends G { - name = 'NotFoundError'; - code = 'P5003'; - constructor(t, r = Wn) { - super(r, U(t, !1)); - } - }; -N(zt, 'NotFoundError'); -f(); -u(); -c(); -p(); -m(); -var Hn = 'Unknown server error', - gt = class extends G { - name = 'ServerError'; - code = 'P5006'; - logs; - constructor(t, r, n) { - (super(r || Hn, U(t, !0)), (this.logs = n)); - } - }; -N(gt, 'ServerError'); -f(); -u(); -c(); -p(); -m(); -var zn = 'Unauthorized, check your connection string', - Yt = class extends G { - name = 'UnauthorizedError'; - code = 'P5007'; - constructor(t, r = zn) { - super(r, U(t, !1)); - } - }; -N(Yt, 'UnauthorizedError'); -f(); -u(); -c(); -p(); -m(); -var Yn = 'Usage exceeded, retry again later', - Zt = class extends G { - name = 'UsageExceededError'; - code = 'P5008'; - constructor(t, r = Yn) { - super(r, U(t, !0)); - } - }; -N(Zt, 'UsageExceededError'); -async function sp(e) { - let t; - try { - t = await e.text(); - } catch { - return { type: 'EmptyError' }; - } - try { - let r = JSON.parse(t); - if (typeof r == 'string') - switch (r) { - case 'InternalDataProxyError': - return { type: 'DataProxyError', body: r }; - default: - return { type: 'UnknownTextError', body: r }; - } - if (typeof r == 'object' && r !== null) { - if ('is_panic' in r && 'message' in r && 'error_code' in r) return { type: 'QueryEngineError', body: r }; - if ('EngineNotStarted' in r || 'InteractiveTransactionMisrouted' in r || 'InvalidRequestError' in r) { - let n = Object.values(r)[0].reason; - return typeof n == 'string' && !['SchemaMissing', 'EngineVersionNotSupported'].includes(n) - ? { type: 'UnknownJsonError', body: r } - : { type: 'DataProxyError', body: r }; - } - } - return { type: 'UnknownJsonError', body: r }; - } catch { - return t === '' ? { type: 'EmptyError' } : { type: 'UnknownTextError', body: t }; - } -} -async function Xt(e, t) { - if (e.ok) return; - let r = { clientVersion: t, response: e }, - n = await sp(e); - if (n.type === 'QueryEngineError') throw new se(n.body.message, { code: n.body.error_code, clientVersion: t }); - if (n.type === 'DataProxyError') { - if (n.body === 'InternalDataProxyError') throw new gt(r, 'Internal Data Proxy error'); - if ('EngineNotStarted' in n.body) { - if (n.body.EngineNotStarted.reason === 'SchemaMissing') return new Ge(r); - if (n.body.EngineNotStarted.reason === 'EngineVersionNotSupported') throw new Qt(r); - if ('EngineStartupError' in n.body.EngineNotStarted.reason) { - let { msg: i, logs: o } = n.body.EngineNotStarted.reason.EngineStartupError; - throw new Jt(r, i, o); - } - if ('KnownEngineStartupError' in n.body.EngineNotStarted.reason) { - let { msg: i, error_code: o } = n.body.EngineNotStarted.reason.KnownEngineStartupError; - throw new Q(i, t, o); - } - if ('HealthcheckTimeout' in n.body.EngineNotStarted.reason) { - let { logs: i } = n.body.EngineNotStarted.reason.HealthcheckTimeout; - throw new Gt(r, i); - } - } - if ('InteractiveTransactionMisrouted' in n.body) { - let i = { - IDParseError: 'Could not parse interactive transaction ID', - NoQueryEngineFoundError: 'Could not find Query Engine for the specified host and transaction ID', - TransactionStartError: 'Could not start interactive transaction', - }; - throw new Wt(r, i[n.body.InteractiveTransactionMisrouted.reason]); - } - if ('InvalidRequestError' in n.body) throw new Ht(r, n.body.InvalidRequestError.reason); - } - if (e.status === 401 || e.status === 403) throw new Yt(r, ht(zn, n)); - if (e.status === 404) return new zt(r, ht(Wn, n)); - if (e.status === 429) throw new Zt(r, ht(Yn, n)); - if (e.status === 504) throw new Kt(r, ht(Kn, n)); - if (e.status >= 500) throw new gt(r, ht(Hn, n)); - if (e.status >= 400) throw new jt(r, ht(Qn, n)); -} -function ht(e, t) { - return t.type === 'EmptyError' ? e : `${e}: ${JSON.stringify(t)}`; -} -f(); -u(); -c(); -p(); -m(); -function ks(e) { - let t = Math.pow(2, e) * 50, - r = Math.ceil(Math.random() * t) - Math.ceil(t / 2), - n = t + r; - return new Promise((i) => setTimeout(() => i(n), n)); -} -f(); -u(); -c(); -p(); -m(); -var Ae = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; -function Ds(e) { - let t = new TextEncoder().encode(e), - r = '', - n = t.byteLength, - i = n % 3, - o = n - i, - s, - a, - l, - d, - g; - for (let h = 0; h < o; h = h + 3) - ((g = (t[h] << 16) | (t[h + 1] << 8) | t[h + 2]), - (s = (g & 16515072) >> 18), - (a = (g & 258048) >> 12), - (l = (g & 4032) >> 6), - (d = g & 63), - (r += Ae[s] + Ae[a] + Ae[l] + Ae[d])); - return ( - i == 1 - ? ((g = t[o]), (s = (g & 252) >> 2), (a = (g & 3) << 4), (r += Ae[s] + Ae[a] + '==')) - : i == 2 && - ((g = (t[o] << 8) | t[o + 1]), - (s = (g & 64512) >> 10), - (a = (g & 1008) >> 4), - (l = (g & 15) << 2), - (r += Ae[s] + Ae[a] + Ae[l] + '=')), - r - ); -} -f(); -u(); -c(); -p(); -m(); -function Ms(e) { - if (!!e.generator?.previewFeatures.some((r) => r.toLowerCase().includes('metrics'))) - throw new Q( - 'The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate', - e.clientVersion - ); -} -f(); -u(); -c(); -p(); -m(); -var _s = { - '@prisma/debug': 'workspace:*', - '@prisma/engines-version': '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - '@prisma/fetch-engine': 'workspace:*', - '@prisma/get-platform': 'workspace:*', -}; -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var er = class extends ie { - name = 'RequestError'; - code = 'P5010'; - constructor(t, r) { - super( - `Cannot fetch data from service: -${t}`, - U(r, !0) - ); - } -}; -N(er, 'RequestError'); -async function Je(e, t, r = (n) => n) { - let { clientVersion: n, ...i } = t, - o = r(fetch); - try { - return await o(e, i); - } catch (s) { - let a = s.message ?? 'Unknown error'; - throw new er(a, { clientVersion: n, cause: s }); - } -} -var lp = /^[1-9][0-9]*\.[0-9]+\.[0-9]+$/, - Ns = Z('prisma:client:dataproxyEngine'); -async function up(e, t) { - let r = _s['@prisma/engines-version'], - n = t.clientVersion ?? 'unknown'; - if (y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION || globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION) - return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION || globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION; - if (e.includes('accelerate') && n !== '0.0.0' && n !== 'in-memory') return n; - let [i, o] = n?.split('-') ?? []; - if (o === void 0 && lp.test(i)) return i; - if (o !== void 0 || n === '0.0.0' || n === 'in-memory') { - let [s] = r.split('-') ?? [], - [a, l, d] = s.split('.'), - g = cp(`<=${a}.${l}.${d}`), - h = await Je(g, { clientVersion: n }); - if (!h.ok) - throw new Error( - `Failed to fetch stable Prisma version, unpkg.com status ${h.status} ${h.statusText}, response body: ${(await h.text()) || ''}` - ); - let T = await h.text(); - Ns('length of body fetched from unpkg.com', T.length); - let I; - try { - I = JSON.parse(T); - } catch (S) { - throw (console.error('JSON.parse error: body fetched from unpkg.com: ', T), S); - } - return I.version; - } - throw new je('Only `major.minor.patch` versions are supported by Accelerate.', { clientVersion: n }); -} -async function Fs(e, t) { - let r = await up(e, t); - return (Ns('version', r), r); -} -function cp(e) { - return encodeURI(`https://unpkg.com/prisma@${e}/package.json`); -} -var Ls = 3, - tr = Z('prisma:client:dataproxyEngine'), - yt = class { - name = 'DataProxyEngine'; - inlineSchema; - inlineSchemaHash; - inlineDatasources; - config; - logEmitter; - env; - clientVersion; - engineHash; - tracingHelper; - remoteClientVersion; - host; - headerBuilder; - startPromise; - protocol; - constructor(t) { - (Ms(t), - (this.config = t), - (this.env = t.env), - (this.inlineSchema = Ds(t.inlineSchema)), - (this.inlineDatasources = t.inlineDatasources), - (this.inlineSchemaHash = t.inlineSchemaHash), - (this.clientVersion = t.clientVersion), - (this.engineHash = t.engineVersion), - (this.logEmitter = t.logEmitter), - (this.tracingHelper = t.tracingHelper)); - } - apiKey() { - return this.headerBuilder.apiKey; - } - version() { - return this.engineHash; - } - async start() { - (this.startPromise !== void 0 && (await this.startPromise), - (this.startPromise = (async () => { - let { apiKey: t, url: r } = this.getURLAndAPIKey(); - ((this.host = r.host), - (this.protocol = r.protocol), - (this.headerBuilder = new Hr({ - apiKey: t, - tracingHelper: this.tracingHelper, - logLevel: this.config.logLevel ?? 'error', - logQueries: this.config.logQueries, - engineHash: this.engineHash, - })), - (this.remoteClientVersion = await Fs(this.host, this.config)), - tr('host', this.host), - tr('protocol', this.protocol)); - })()), - await this.startPromise); - } - async stop() {} - propagateResponseExtensions(t) { - (t?.logs?.length && - t.logs.forEach((r) => { - switch (r.level) { - case 'debug': - case 'trace': - tr(r); - break; - case 'error': - case 'warn': - case 'info': { - this.logEmitter.emit(r.level, { - timestamp: Jn(r.timestamp), - message: r.attributes.message ?? '', - target: r.target, - }); - break; - } - case 'query': { - this.logEmitter.emit('query', { - query: r.attributes.query ?? '', - timestamp: Jn(r.timestamp), - duration: r.attributes.duration_ms ?? 0, - params: r.attributes.params ?? '', - target: r.target, - }); - break; - } - default: - r.level; - } - }), - t?.traces?.length && this.tracingHelper.dispatchEngineSpans(t.traces)); - } - onBeforeExit() { - throw new Error('"beforeExit" hook is not applicable to the remote query engine'); - } - async url(t) { - return ( - await this.start(), - `${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}` - ); - } - async uploadSchema() { - let t = { name: 'schemaUpload', internal: !0 }; - return this.tracingHelper.runInChildSpan(t, async () => { - let r = await Je(await this.url('schema'), { - method: 'PUT', - headers: this.headerBuilder.build(), - body: this.inlineSchema, - clientVersion: this.clientVersion, - }); - r.ok || tr('schema response status', r.status); - let n = await Xt(r, this.clientVersion); - if (n) - throw ( - this.logEmitter.emit('warn', { - message: `Error while uploading schema: ${n.message}`, - timestamp: new Date(), - target: '', - }), - n - ); - this.logEmitter.emit('info', { - message: `Schema (re)uploaded (hash: ${this.inlineSchemaHash})`, - timestamp: new Date(), - target: '', - }); - }); - } - request(t, { traceparent: r, interactiveTransaction: n, customDataProxyFetch: i }) { - return this.requestInternal({ body: t, traceparent: r, interactiveTransaction: n, customDataProxyFetch: i }); - } - async requestBatch(t, { traceparent: r, transaction: n, customDataProxyFetch: i }) { - let o = n?.kind === 'itx' ? n.options : void 0, - s = Gr(t, n); - return ( - await this.requestInternal({ body: s, customDataProxyFetch: i, interactiveTransaction: o, traceparent: r }) - ).map( - (l) => ( - l.extensions && this.propagateResponseExtensions(l.extensions), - 'errors' in l ? this.convertProtocolErrorsToClientError(l.errors) : l - ) - ); - } - requestInternal({ body: t, traceparent: r, customDataProxyFetch: n, interactiveTransaction: i }) { - return this.withRetry({ - actionGerund: 'querying', - callback: async ({ logHttpCall: o }) => { - let s = i ? `${i.payload.endpoint}/graphql` : await this.url('graphql'); - o(s); - let a = await Je( - s, - { - method: 'POST', - headers: this.headerBuilder.build({ traceparent: r, transactionId: i?.id }), - body: JSON.stringify(t), - clientVersion: this.clientVersion, - }, - n - ); - (a.ok || tr('graphql response status', a.status), await this.handleError(await Xt(a, this.clientVersion))); - let l = await a.json(); - if ((l.extensions && this.propagateResponseExtensions(l.extensions), 'errors' in l)) - throw this.convertProtocolErrorsToClientError(l.errors); - return 'batchResult' in l ? l.batchResult : l; - }, - }); - } - async transaction(t, r, n) { - let i = { start: 'starting', commit: 'committing', rollback: 'rolling back' }; - return this.withRetry({ - actionGerund: `${i[t]} transaction`, - callback: async ({ logHttpCall: o }) => { - if (t === 'start') { - let s = JSON.stringify({ max_wait: n.maxWait, timeout: n.timeout, isolation_level: n.isolationLevel }), - a = await this.url('transaction/start'); - o(a); - let l = await Je(a, { - method: 'POST', - headers: this.headerBuilder.build({ traceparent: r.traceparent }), - body: s, - clientVersion: this.clientVersion, - }); - await this.handleError(await Xt(l, this.clientVersion)); - let d = await l.json(), - { extensions: g } = d; - g && this.propagateResponseExtensions(g); - let h = d.id, - T = d['data-proxy'].endpoint; - return { id: h, payload: { endpoint: T } }; - } else { - let s = `${n.payload.endpoint}/${t}`; - o(s); - let a = await Je(s, { - method: 'POST', - headers: this.headerBuilder.build({ traceparent: r.traceparent }), - clientVersion: this.clientVersion, - }); - await this.handleError(await Xt(a, this.clientVersion)); - let l = await a.json(), - { extensions: d } = l; - d && this.propagateResponseExtensions(d); - return; - } - }, - }); - } - getURLAndAPIKey() { - return Is({ - clientVersion: this.clientVersion, - env: this.env, - inlineDatasources: this.inlineDatasources, - overrideDatasources: this.config.overrideDatasources, - }); - } - metrics() { - throw new je('Metrics are not yet supported for Accelerate', { clientVersion: this.clientVersion }); - } - async withRetry(t) { - for (let r = 0; ; r++) { - let n = (i) => { - this.logEmitter.emit('info', { message: `Calling ${i} (n=${r})`, timestamp: new Date(), target: '' }); - }; - try { - return await t.callback({ logHttpCall: n }); - } catch (i) { - if (!(i instanceof ie) || !i.isRetryable) throw i; - if (r >= Ls) throw i instanceof dt ? i.cause : i; - this.logEmitter.emit('warn', { - message: `Attempt ${r + 1}/${Ls} failed for ${t.actionGerund}: ${i.message ?? '(unknown)'}`, - timestamp: new Date(), - target: '', - }); - let o = await ks(r); - this.logEmitter.emit('warn', { message: `Retrying after ${o}ms`, timestamp: new Date(), target: '' }); - } - } - } - async handleError(t) { - if (t instanceof Ge) throw (await this.uploadSchema(), new dt({ clientVersion: this.clientVersion, cause: t })); - if (t) throw t; - } - convertProtocolErrorsToClientError(t) { - return t.length === 1 - ? Jr(t[0], this.config.clientVersion, this.config.activeProvider) - : new ae(JSON.stringify(t), { clientVersion: this.config.clientVersion }); - } - applyPendingMigrations() { - throw new Error('Method not implemented.'); - } - }; -f(); -u(); -c(); -p(); -m(); -function Us({ url: e, adapter: t, copyEngine: r, targetBuildType: n }) { - let i = [], - o = [], - s = (R) => { - i.push({ _tag: 'warning', value: R }); - }, - a = (R) => { - let M = R.join(` -`); - o.push({ _tag: 'error', value: M }); - }, - l = !!e?.startsWith('prisma://'), - d = dr(e), - g = !!t, - h = l || d; - !g && - r && - h && - s([ - 'recommend--no-engine', - 'In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)', - ]); - let T = h || !r; - g && - (T || n === 'edge') && - (n === 'edge' - ? a([ - 'Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.', - 'Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor.', - ]) - : r - ? l && - a([ - 'Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.', - 'Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor.', - ]) - : a([ - 'Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.', - 'Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter.', - ])); - let I = { accelerate: T, ppg: d, driverAdapters: g }; - function S(R) { - return R.length > 0; - } - return S(o) - ? { ok: !1, diagnostics: { warnings: i, errors: o }, isUsing: I } - : { ok: !0, diagnostics: { warnings: i }, isUsing: I }; -} -function Bs({ copyEngine: e = !0 }, t) { - let r; - try { - r = ft({ - inlineDatasources: t.inlineDatasources, - overrideDatasources: t.overrideDatasources, - env: { ...t.env, ...y.env }, - clientVersion: t.clientVersion, - }); - } catch {} - let { - ok: n, - isUsing: i, - diagnostics: o, - } = Us({ url: r, adapter: t.adapter, copyEngine: e, targetBuildType: 'edge' }); - for (let h of o.warnings) hr(...h.value); - if (!n) { - let h = o.errors[0]; - throw new ee(h.value, { clientVersion: t.clientVersion }); - } - let s = Ze(t.generator), - a = s === 'library', - l = s === 'binary', - d = s === 'client', - g = (i.accelerate || i.ppg) && !i.driverAdapters; - return i.accelerate ? new yt(t) : (i.driverAdapters, i.accelerate, new yt(t)); -} -f(); -u(); -c(); -p(); -m(); -function zr({ generator: e }) { - return e?.previewFeatures ?? []; -} -f(); -u(); -c(); -p(); -m(); -var qs = (e) => ({ command: e }); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Vs = (e) => e.strings.reduce((t, r, n) => `${t}@P${n}${r}`); -f(); -u(); -c(); -p(); -m(); -function wt(e) { - try { - return $s(e, 'fast'); - } catch { - return $s(e, 'slow'); - } -} -function $s(e, t) { - return JSON.stringify(e.map((r) => Gs(r, t))); -} -function Gs(e, t) { - if (Array.isArray(e)) return e.map((r) => Gs(r, t)); - if (typeof e == 'bigint') return { prisma__type: 'bigint', prisma__value: e.toString() }; - if (Xe(e)) return { prisma__type: 'date', prisma__value: e.toJSON() }; - if (_e.isDecimal(e)) return { prisma__type: 'decimal', prisma__value: e.toJSON() }; - if (w.Buffer.isBuffer(e)) return { prisma__type: 'bytes', prisma__value: e.toString('base64') }; - if (pp(e)) return { prisma__type: 'bytes', prisma__value: w.Buffer.from(e).toString('base64') }; - if (ArrayBuffer.isView(e)) { - let { buffer: r, byteOffset: n, byteLength: i } = e; - return { prisma__type: 'bytes', prisma__value: w.Buffer.from(r, n, i).toString('base64') }; - } - return typeof e == 'object' && t === 'slow' ? Js(e) : e; -} -function pp(e) { - return e instanceof ArrayBuffer || e instanceof SharedArrayBuffer - ? !0 - : typeof e == 'object' && e !== null - ? e[Symbol.toStringTag] === 'ArrayBuffer' || e[Symbol.toStringTag] === 'SharedArrayBuffer' - : !1; -} -function Js(e) { - if (typeof e != 'object' || e === null) return e; - if (typeof e.toJSON == 'function') return e.toJSON(); - if (Array.isArray(e)) return e.map(js); - let t = {}; - for (let r of Object.keys(e)) t[r] = js(e[r]); - return t; -} -function js(e) { - return typeof e == 'bigint' ? e.toString() : Js(e); -} -var mp = /^(\s*alter\s)/i, - Qs = Z('prisma:client'); -function Zn(e, t, r, n) { - if (!(e !== 'postgresql' && e !== 'cockroachdb') && r.length > 0 && mp.exec(t)) - throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`); -} -var Xn = - ({ clientMethod: e, activeProvider: t }) => - (r) => { - let n = '', - i; - if (qr(r)) ((n = r.sql), (i = { values: wt(r.values), __prismaRawParameters__: !0 })); - else if (Array.isArray(r)) { - let [o, ...s] = r; - ((n = o), (i = { values: wt(s || []), __prismaRawParameters__: !0 })); - } else - switch (t) { - case 'sqlite': - case 'mysql': { - ((n = r.sql), (i = { values: wt(r.values), __prismaRawParameters__: !0 })); - break; - } - case 'cockroachdb': - case 'postgresql': - case 'postgres': { - ((n = r.text), (i = { values: wt(r.values), __prismaRawParameters__: !0 })); - break; - } - case 'sqlserver': { - ((n = Vs(r)), (i = { values: wt(r.values), __prismaRawParameters__: !0 })); - break; - } - default: - throw new Error(`The ${t} provider does not support ${e}`); - } - return (i?.values ? Qs(`prisma.${e}(${n}, ${i.values})`) : Qs(`prisma.${e}(${n})`), { query: n, parameters: i }); - }, - Ks = { - requestArgsToMiddlewareArgs(e) { - return [e.strings, ...e.values]; - }, - middlewareArgsToRequestArgs(e) { - let [t, ...r] = e; - return new ue(t, r); - }, - }, - Ws = { - requestArgsToMiddlewareArgs(e) { - return [e]; - }, - middlewareArgsToRequestArgs(e) { - return e[0]; - }, - }; -f(); -u(); -c(); -p(); -m(); -function ei(e) { - return function (r, n) { - let i, - o = (s = e) => { - try { - return s === void 0 || s?.kind === 'itx' ? (i ??= Hs(r(s))) : Hs(r(s)); - } catch (a) { - return Promise.reject(a); - } - }; - return { - get spec() { - return n; - }, - then(s, a) { - return o().then(s, a); - }, - catch(s) { - return o().catch(s); - }, - finally(s) { - return o().finally(s); - }, - requestTransaction(s) { - let a = o(s); - return a.requestTransaction ? a.requestTransaction(s) : a; - }, - [Symbol.toStringTag]: 'PrismaPromise', - }; - }; -} -function Hs(e) { - return typeof e.then == 'function' ? e : Promise.resolve(e); -} -f(); -u(); -c(); -p(); -m(); -var fp = gn.split('.')[0], - dp = { - isEnabled() { - return !1; - }, - getTraceParent() { - return '00-10-10-00'; - }, - dispatchEngineSpans() {}, - getActiveContext() {}, - runInChildSpan(e, t) { - return t(); - }, - }, - ti = class { - isEnabled() { - return this.getGlobalTracingHelper().isEnabled(); - } - getTraceParent(t) { - return this.getGlobalTracingHelper().getTraceParent(t); - } - dispatchEngineSpans(t) { - return this.getGlobalTracingHelper().dispatchEngineSpans(t); - } - getActiveContext() { - return this.getGlobalTracingHelper().getActiveContext(); - } - runInChildSpan(t, r) { - return this.getGlobalTracingHelper().runInChildSpan(t, r); - } - getGlobalTracingHelper() { - let t = globalThis[`V${fp}_PRISMA_INSTRUMENTATION`], - r = globalThis.PRISMA_INSTRUMENTATION; - return t?.helper ?? r?.helper ?? dp; - } - }; -function zs() { - return new ti(); -} -f(); -u(); -c(); -p(); -m(); -function Ys(e, t = () => {}) { - let r, - n = new Promise((i) => (r = i)); - return { - then(i) { - return (--e === 0 && r(t()), i?.(n)); - }, - }; -} -f(); -u(); -c(); -p(); -m(); -function Zs(e) { - return typeof e == 'string' - ? e - : e.reduce( - (t, r) => { - let n = typeof r == 'string' ? r : r.level; - return n === 'query' ? t : t && (r === 'info' || t === 'info') ? 'info' : n; - }, - void 0 - ); -} -f(); -u(); -c(); -p(); -m(); -var ea = Ue(no()); -f(); -u(); -c(); -p(); -m(); -function Yr(e) { - return typeof e.batchRequestIdx == 'number'; -} -f(); -u(); -c(); -p(); -m(); -function Xs(e) { - if (e.action !== 'findUnique' && e.action !== 'findUniqueOrThrow') return; - let t = []; - return ( - e.modelName && t.push(e.modelName), - e.query.arguments && t.push(ri(e.query.arguments)), - t.push(ri(e.query.selection)), - t.join('') - ); -} -function ri(e) { - return `(${Object.keys(e) - .sort() - .map((r) => { - let n = e[r]; - return typeof n == 'object' && n !== null ? `(${r} ${ri(n)})` : r; - }) - .join(' ')})`; -} -f(); -u(); -c(); -p(); -m(); -var gp = { - aggregate: !1, - aggregateRaw: !1, - createMany: !0, - createManyAndReturn: !0, - createOne: !0, - deleteMany: !0, - deleteOne: !0, - executeRaw: !0, - findFirst: !1, - findFirstOrThrow: !1, - findMany: !1, - findRaw: !1, - findUnique: !1, - findUniqueOrThrow: !1, - groupBy: !1, - queryRaw: !1, - runCommandRaw: !0, - updateMany: !0, - updateManyAndReturn: !0, - updateOne: !0, - upsertOne: !0, -}; -function ni(e) { - return gp[e]; -} -f(); -u(); -c(); -p(); -m(); -var Zr = class { - constructor(t) { - this.options = t; - this.batches = {}; - } - batches; - tickActive = !1; - request(t) { - let r = this.options.batchBy(t); - return r - ? (this.batches[r] || - ((this.batches[r] = []), - this.tickActive || - ((this.tickActive = !0), - y.nextTick(() => { - (this.dispatchBatches(), (this.tickActive = !1)); - }))), - new Promise((n, i) => { - this.batches[r].push({ request: t, resolve: n, reject: i }); - })) - : this.options.singleLoader(t); - } - dispatchBatches() { - for (let t in this.batches) { - let r = this.batches[t]; - (delete this.batches[t], - r.length === 1 - ? this.options - .singleLoader(r[0].request) - .then((n) => { - n instanceof Error ? r[0].reject(n) : r[0].resolve(n); - }) - .catch((n) => { - r[0].reject(n); - }) - : (r.sort((n, i) => this.options.batchOrder(n.request, i.request)), - this.options - .batchLoader(r.map((n) => n.request)) - .then((n) => { - if (n instanceof Error) for (let i = 0; i < r.length; i++) r[i].reject(n); - else - for (let i = 0; i < r.length; i++) { - let o = n[i]; - o instanceof Error ? r[i].reject(o) : r[i].resolve(o); - } - }) - .catch((n) => { - for (let i = 0; i < r.length; i++) r[i].reject(n); - }))); - } - } - get [Symbol.toStringTag]() { - return 'DataLoader'; - } -}; -f(); -u(); -c(); -p(); -m(); -function Qe(e, t) { - if (t === null) return t; - switch (e) { - case 'bigint': - return BigInt(t); - case 'bytes': { - let { buffer: r, byteOffset: n, byteLength: i } = w.Buffer.from(t, 'base64'); - return new Uint8Array(r, n, i); - } - case 'decimal': - return new _e(t); - case 'datetime': - case 'date': - return new Date(t); - case 'time': - return new Date(`1970-01-01T${t}Z`); - case 'bigint-array': - return t.map((r) => Qe('bigint', r)); - case 'bytes-array': - return t.map((r) => Qe('bytes', r)); - case 'decimal-array': - return t.map((r) => Qe('decimal', r)); - case 'datetime-array': - return t.map((r) => Qe('datetime', r)); - case 'date-array': - return t.map((r) => Qe('date', r)); - case 'time-array': - return t.map((r) => Qe('time', r)); - default: - return t; - } -} -function ii(e) { - let t = [], - r = hp(e); - for (let n = 0; n < e.rows.length; n++) { - let i = e.rows[n], - o = { ...r }; - for (let s = 0; s < i.length; s++) o[e.columns[s]] = Qe(e.types[s], i[s]); - t.push(o); - } - return t; -} -function hp(e) { - let t = {}; - for (let r = 0; r < e.columns.length; r++) t[e.columns[r]] = null; - return t; -} -var yp = Z('prisma:client:request_handler'), - Xr = class { - client; - dataloader; - logEmitter; - constructor(t, r) { - ((this.logEmitter = r), - (this.client = t), - (this.dataloader = new Zr({ - batchLoader: bs(async ({ requests: n, customDataProxyFetch: i }) => { - let { transaction: o, otelParentCtx: s } = n[0], - a = n.map((h) => h.protocolQuery), - l = this.client._tracingHelper.getTraceParent(s), - d = n.some((h) => ni(h.protocolQuery.action)); - return ( - await this.client._engine.requestBatch(a, { - traceparent: l, - transaction: wp(o), - containsWrite: d, - customDataProxyFetch: i, - }) - ).map((h, T) => { - if (h instanceof Error) return h; - try { - return this.mapQueryEngineResult(n[T], h); - } catch (I) { - return I; - } - }); - }), - singleLoader: async (n) => { - let i = n.transaction?.kind === 'itx' ? ta(n.transaction) : void 0, - o = await this.client._engine.request(n.protocolQuery, { - traceparent: this.client._tracingHelper.getTraceParent(), - interactiveTransaction: i, - isWrite: ni(n.protocolQuery.action), - customDataProxyFetch: n.customDataProxyFetch, - }); - return this.mapQueryEngineResult(n, o); - }, - batchBy: (n) => (n.transaction?.id ? `transaction-${n.transaction.id}` : Xs(n.protocolQuery)), - batchOrder(n, i) { - return n.transaction?.kind === 'batch' && i.transaction?.kind === 'batch' - ? n.transaction.index - i.transaction.index - : 0; - }, - }))); - } - async request(t) { - try { - return await this.dataloader.request(t); - } catch (r) { - let { clientMethod: n, callsite: i, transaction: o, args: s, modelName: a } = t; - this.handleAndLogRequestError({ - error: r, - clientMethod: n, - callsite: i, - transaction: o, - args: s, - modelName: a, - globalOmit: t.globalOmit, - }); - } - } - mapQueryEngineResult({ dataPath: t, unpacker: r }, n) { - let i = n?.data, - o = this.unpack(i, t, r); - return y.env.PRISMA_CLIENT_GET_TIME ? { data: o } : o; - } - handleAndLogRequestError(t) { - try { - this.handleRequestError(t); - } catch (r) { - throw ( - this.logEmitter && - this.logEmitter.emit('error', { message: r.message, target: t.clientMethod, timestamp: new Date() }), - r - ); - } - } - handleRequestError({ - error: t, - clientMethod: r, - callsite: n, - transaction: i, - args: o, - modelName: s, - globalOmit: a, - }) { - if ((yp(t), Ep(t, i))) throw t; - if (t instanceof se && bp(t)) { - let d = ra(t.meta); - Fr({ - args: o, - errors: [d], - callsite: n, - errorFormat: this.client._errorFormat, - originalMethod: r, - clientVersion: this.client._clientVersion, - globalOmit: a, - }); - } - let l = t.message; - if ( - (n && - (l = Rr({ - callsite: n, - originalMethod: r, - isPanic: t.isPanic, - showColors: this.client._errorFormat === 'pretty', - message: l, - })), - (l = this.sanitizeMessage(l)), - t.code) - ) { - let d = s ? { modelName: s, ...t.meta } : t.meta; - throw new se(l, { - code: t.code, - clientVersion: this.client._clientVersion, - meta: d, - batchRequestIdx: t.batchRequestIdx, - }); - } else { - if (t.isPanic) throw new Se(l, this.client._clientVersion); - if (t instanceof ae) - throw new ae(l, { clientVersion: this.client._clientVersion, batchRequestIdx: t.batchRequestIdx }); - if (t instanceof Q) throw new Q(l, this.client._clientVersion); - if (t instanceof Se) throw new Se(l, this.client._clientVersion); - } - throw ((t.clientVersion = this.client._clientVersion), t); - } - sanitizeMessage(t) { - return this.client._errorFormat && this.client._errorFormat !== 'pretty' ? (0, ea.default)(t) : t; - } - unpack(t, r, n) { - if (!t || (t.data && (t = t.data), !t)) return t; - let i = Object.keys(t)[0], - o = Object.values(t)[0], - s = r.filter((d) => d !== 'select' && d !== 'include'), - a = qn(o, s), - l = i === 'queryRaw' ? ii(a) : $t(a); - return n ? n(l) : l; - } - get [Symbol.toStringTag]() { - return 'RequestHandler'; - } - }; -function wp(e) { - if (e) { - if (e.kind === 'batch') return { kind: 'batch', options: { isolationLevel: e.isolationLevel } }; - if (e.kind === 'itx') return { kind: 'itx', options: ta(e) }; - qe(e, 'Unknown transaction kind'); - } -} -function ta(e) { - return { id: e.id, payload: e.payload }; -} -function Ep(e, t) { - return Yr(e) && t?.kind === 'batch' && e.batchRequestIdx !== t.index; -} -function bp(e) { - return e.code === 'P2009' || e.code === 'P2012'; -} -function ra(e) { - if (e.kind === 'Union') return { kind: 'Union', errors: e.errors.map(ra) }; - if (Array.isArray(e.selectionPath)) { - let [, ...t] = e.selectionPath; - return { ...e, selectionPath: t }; - } - return e; -} -f(); -u(); -c(); -p(); -m(); -var na = Ss; -f(); -u(); -c(); -p(); -m(); -var la = Ue(Rn()); -f(); -u(); -c(); -p(); -m(); -var q = class extends Error { - constructor(t) { - (super( - t + - ` -Read more at https://pris.ly/d/client-constructor` - ), - (this.name = 'PrismaClientConstructorValidationError')); - } - get [Symbol.toStringTag]() { - return 'PrismaClientConstructorValidationError'; - } -}; -N(q, 'PrismaClientConstructorValidationError'); -var ia = ['datasources', 'datasourceUrl', 'errorFormat', 'adapter', 'log', 'transactionOptions', 'omit', '__internal'], - oa = ['pretty', 'colorless', 'minimal'], - sa = ['info', 'query', 'warn', 'error'], - xp = { - datasources: (e, { datasourceNames: t }) => { - if (e) { - if (typeof e != 'object' || Array.isArray(e)) - throw new q(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`); - for (let [r, n] of Object.entries(e)) { - if (!t.includes(r)) { - let i = Et(r, t) || ` Available datasources: ${t.join(', ')}`; - throw new q(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`); - } - if (typeof n != 'object' || Array.isArray(n)) - throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`); - if (n && typeof n == 'object') - for (let [i, o] of Object.entries(n)) { - if (i !== 'url') - throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`); - if (typeof o != 'string') - throw new q(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`); - } - } - } - }, - adapter: (e, t) => { - if (!e && Ze(t.generator) === 'client') - throw new q('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.'); - if (e === null) return; - if (e === void 0) - throw new q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.'); - if (!zr(t).includes('driverAdapters')) - throw new q( - '"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.' - ); - if (Ze(t.generator) === 'binary') - throw new q( - 'Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.' - ); - }, - datasourceUrl: (e) => { - if (typeof e < 'u' && typeof e != 'string') - throw new q(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`); - }, - errorFormat: (e) => { - if (e) { - if (typeof e != 'string') - throw new q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`); - if (!oa.includes(e)) { - let t = Et(e, oa); - throw new q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`); - } - } - }, - log: (e) => { - if (!e) return; - if (!Array.isArray(e)) - throw new q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`); - function t(r) { - if (typeof r == 'string' && !sa.includes(r)) { - let n = Et(r, sa); - throw new q(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`); - } - } - for (let r of e) { - t(r); - let n = { - level: t, - emit: (i) => { - let o = ['stdout', 'event']; - if (!o.includes(i)) { - let s = Et(i, o); - throw new q( - `Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}` - ); - } - }, - }; - if (r && typeof r == 'object') - for (let [i, o] of Object.entries(r)) - if (n[i]) n[i](o); - else throw new q(`Invalid property ${i} for "log" provided to PrismaClient constructor`); - } - }, - transactionOptions: (e) => { - if (!e) return; - let t = e.maxWait; - if (t != null && t <= 0) - throw new q( - `Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0` - ); - let r = e.timeout; - if (r != null && r <= 0) - throw new q( - `Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0` - ); - }, - omit: (e, t) => { - if (typeof e != 'object') throw new q('"omit" option is expected to be an object.'); - if (e === null) throw new q('"omit" option can not be `null`'); - let r = []; - for (let [n, i] of Object.entries(e)) { - let o = vp(n, t.runtimeDataModel); - if (!o) { - r.push({ kind: 'UnknownModel', modelKey: n }); - continue; - } - for (let [s, a] of Object.entries(i)) { - let l = o.fields.find((d) => d.name === s); - if (!l) { - r.push({ kind: 'UnknownField', modelKey: n, fieldName: s }); - continue; - } - if (l.relationName) { - r.push({ kind: 'RelationInOmit', modelKey: n, fieldName: s }); - continue; - } - typeof a != 'boolean' && r.push({ kind: 'InvalidFieldValue', modelKey: n, fieldName: s }); - } - } - if (r.length > 0) throw new q(Tp(e, r)); - }, - __internal: (e) => { - if (!e) return; - let t = ['debug', 'engine', 'configOverride']; - if (typeof e != 'object') - throw new q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`); - for (let [r] of Object.entries(e)) - if (!t.includes(r)) { - let n = Et(r, t); - throw new q( - `Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}` - ); - } - }, - }; -function ua(e, t) { - for (let [r, n] of Object.entries(e)) { - if (!ia.includes(r)) { - let i = Et(r, ia); - throw new q(`Unknown property ${r} provided to PrismaClient constructor.${i}`); - } - xp[r](n, t); - } - if (e.datasourceUrl && e.datasources) - throw new q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them'); -} -function Et(e, t) { - if (t.length === 0 || typeof e != 'string') return ''; - let r = Pp(e, t); - return r ? ` Did you mean "${r}"?` : ''; -} -function Pp(e, t) { - if (t.length === 0) return null; - let r = t.map((i) => ({ value: i, distance: (0, la.default)(e, i) })); - r.sort((i, o) => (i.distance < o.distance ? -1 : 1)); - let n = r[0]; - return n.distance < 3 ? n.value : null; -} -function vp(e, t) { - return aa(t.models, e) ?? aa(t.types, e); -} -function aa(e, t) { - let r = Object.keys(e).find((n) => Ie(n) === t); - if (r) return e[r]; -} -function Tp(e, t) { - let r = ut(e); - for (let o of t) - switch (o.kind) { - case 'UnknownModel': - (r.arguments.getField(o.modelKey)?.markAsError(), - r.addErrorMessage(() => `Unknown model name: ${o.modelKey}.`)); - break; - case 'UnknownField': - (r.arguments.getDeepField([o.modelKey, o.fieldName])?.markAsError(), - r.addErrorMessage(() => `Model "${o.modelKey}" does not have a field named "${o.fieldName}".`)); - break; - case 'RelationInOmit': - (r.arguments.getDeepField([o.modelKey, o.fieldName])?.markAsError(), - r.addErrorMessage(() => 'Relations are already excluded by default and can not be specified in "omit".')); - break; - case 'InvalidFieldValue': - (r.arguments.getDeepFieldValue([o.modelKey, o.fieldName])?.markAsError(), - r.addErrorMessage(() => 'Omit field option value must be a boolean.')); - break; - } - let { message: n, args: i } = Nr(r, 'colorless'); - return `Error validating "omit" option: - -${i} - -${n}`; -} -f(); -u(); -c(); -p(); -m(); -function ca(e) { - return e.length === 0 - ? Promise.resolve([]) - : new Promise((t, r) => { - let n = new Array(e.length), - i = null, - o = !1, - s = 0, - a = () => { - o || (s++, s === e.length && ((o = !0), i ? r(i) : t(n))); - }, - l = (d) => { - o || ((o = !0), r(d)); - }; - for (let d = 0; d < e.length; d++) - e[d].then( - (g) => { - ((n[d] = g), a()); - }, - (g) => { - if (!Yr(g)) { - l(g); - return; - } - g.batchRequestIdx === d ? l(g) : (i || (i = g), a()); - } - ); - }); -} -var Le = Z('prisma:client'); -typeof globalThis == 'object' && (globalThis.NODE_CLIENT = !0); -var Ap = { requestArgsToMiddlewareArgs: (e) => e, middlewareArgsToRequestArgs: (e) => e }, - Cp = Symbol.for('prisma.client.transaction.id'), - Rp = { - id: 0, - nextId() { - return ++this.id; - }, - }; -function Sp(e) { - class t { - _originalClient = this; - _runtimeDataModel; - _requestHandler; - _connectionPromise; - _disconnectionPromise; - _engineConfig; - _accelerateEngineConfig; - _clientVersion; - _errorFormat; - _tracingHelper; - _previewFeatures; - _activeProvider; - _globalOmit; - _extensions; - _engine; - _appliedParent; - _createPrismaPromise = ei(); - constructor(n) { - ((e = n?.__internal?.configOverride?.(e) ?? e), As(e), n && ua(n, e)); - let i = new Vr().on('error', () => {}); - ((this._extensions = ct.empty()), - (this._previewFeatures = zr(e)), - (this._clientVersion = e.clientVersion ?? na), - (this._activeProvider = e.activeProvider), - (this._globalOmit = n?.omit), - (this._tracingHelper = zs())); - let o = e.relativeEnvPaths && { - rootEnvPath: e.relativeEnvPaths.rootEnvPath && pr.resolve(e.dirname, e.relativeEnvPaths.rootEnvPath), - schemaEnvPath: e.relativeEnvPaths.schemaEnvPath && pr.resolve(e.dirname, e.relativeEnvPaths.schemaEnvPath), - }, - s; - if (n?.adapter) { - s = n.adapter; - let l = e.activeProvider === 'postgresql' || e.activeProvider === 'cockroachdb' ? 'postgres' : e.activeProvider; - if (s.provider !== l) - throw new Q( - `The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`, - this._clientVersion - ); - if (n.datasources || n.datasourceUrl !== void 0) - throw new Q( - 'Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.', - this._clientVersion - ); - } - let a = e.injectableEdgeEnv?.(); - try { - let l = n ?? {}, - d = l.__internal ?? {}, - g = d.debug === !0; - g && Z.enable('prisma:client'); - let h = pr.resolve(e.dirname, e.relativePath); - ($i.existsSync(h) || (h = e.dirname), - Le('dirname', e.dirname), - Le('relativePath', e.relativePath), - Le('cwd', h)); - let T = d.engine || {}; - if ( - (l.errorFormat - ? (this._errorFormat = l.errorFormat) - : y.env.NODE_ENV === 'production' - ? (this._errorFormat = 'minimal') - : y.env.NO_COLOR - ? (this._errorFormat = 'colorless') - : (this._errorFormat = 'colorless'), - (this._runtimeDataModel = e.runtimeDataModel), - (this._engineConfig = { - cwd: h, - dirname: e.dirname, - enableDebugLogs: g, - allowTriggerPanic: T.allowTriggerPanic, - prismaPath: T.binaryPath ?? void 0, - engineEndpoint: T.endpoint, - generator: e.generator, - showColors: this._errorFormat === 'pretty', - logLevel: l.log && Zs(l.log), - logQueries: - l.log && - !!(typeof l.log == 'string' - ? l.log === 'query' - : l.log.find((I) => (typeof I == 'string' ? I === 'query' : I.level === 'query'))), - env: a?.parsed ?? {}, - flags: [], - engineWasm: e.engineWasm, - compilerWasm: e.compilerWasm, - clientVersion: e.clientVersion, - engineVersion: e.engineVersion, - previewFeatures: this._previewFeatures, - activeProvider: e.activeProvider, - inlineSchema: e.inlineSchema, - overrideDatasources: Cs(l, e.datasourceNames), - inlineDatasources: e.inlineDatasources, - inlineSchemaHash: e.inlineSchemaHash, - tracingHelper: this._tracingHelper, - transactionOptions: { - maxWait: l.transactionOptions?.maxWait ?? 2e3, - timeout: l.transactionOptions?.timeout ?? 5e3, - isolationLevel: l.transactionOptions?.isolationLevel, - }, - logEmitter: i, - isBundled: e.isBundled, - adapter: s, - }), - (this._accelerateEngineConfig = { - ...this._engineConfig, - accelerateUtils: { - resolveDatasourceUrl: ft, - getBatchRequestPayload: Gr, - prismaGraphQLToJSError: Jr, - PrismaClientUnknownRequestError: ae, - PrismaClientInitializationError: Q, - PrismaClientKnownRequestError: se, - debug: Z('prisma:client:accelerateEngine'), - engineVersion: ma.version, - clientVersion: e.clientVersion, - }, - }), - Le('clientVersion', e.clientVersion), - (this._engine = Bs(e, this._engineConfig)), - (this._requestHandler = new Xr(this, i)), - l.log) - ) - for (let I of l.log) { - let S = typeof I == 'string' ? I : I.emit === 'stdout' ? I.level : null; - S && - this.$on(S, (R) => { - Tt.log(`${Tt.tags[S] ?? ''}`, R.message || R.query); - }); - } - } catch (l) { - throw ((l.clientVersion = this._clientVersion), l); - } - return (this._appliedParent = qt(this)); - } - get [Symbol.toStringTag]() { - return 'PrismaClient'; - } - $on(n, i) { - return (n === 'beforeExit' ? this._engine.onBeforeExit(i) : n && this._engineConfig.logEmitter.on(n, i), this); - } - $connect() { - try { - return this._engine.start(); - } catch (n) { - throw ((n.clientVersion = this._clientVersion), n); - } - } - async $disconnect() { - try { - await this._engine.stop(); - } catch (n) { - throw ((n.clientVersion = this._clientVersion), n); - } finally { - Vi(); - } - } - $executeRawInternal(n, i, o, s) { - let a = this._activeProvider; - return this._request({ - action: 'executeRaw', - args: o, - transaction: n, - clientMethod: i, - argsMapper: Xn({ clientMethod: i, activeProvider: a }), - callsite: Fe(this._errorFormat), - dataPath: [], - middlewareArgsMapper: s, - }); - } - $executeRaw(n, ...i) { - return this._createPrismaPromise((o) => { - if (n.raw !== void 0 || n.sql !== void 0) { - let [s, a] = pa(n, i); - return ( - Zn( - this._activeProvider, - s.text, - s.values, - Array.isArray(n) ? 'prisma.$executeRaw``' : 'prisma.$executeRaw(sql``)' - ), - this.$executeRawInternal(o, '$executeRaw', s, a) - ); - } - throw new ee( - "`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n", - { clientVersion: this._clientVersion } - ); - }); - } - $executeRawUnsafe(n, ...i) { - return this._createPrismaPromise( - (o) => ( - Zn(this._activeProvider, n, i, 'prisma.$executeRawUnsafe(, [...values])'), - this.$executeRawInternal(o, '$executeRawUnsafe', [n, ...i]) - ) - ); - } - $runCommandRaw(n) { - if (e.activeProvider !== 'mongodb') - throw new ee(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`, { - clientVersion: this._clientVersion, - }); - return this._createPrismaPromise((i) => - this._request({ - args: n, - clientMethod: '$runCommandRaw', - dataPath: [], - action: 'runCommandRaw', - argsMapper: qs, - callsite: Fe(this._errorFormat), - transaction: i, - }) - ); - } - async $queryRawInternal(n, i, o, s) { - let a = this._activeProvider; - return this._request({ - action: 'queryRaw', - args: o, - transaction: n, - clientMethod: i, - argsMapper: Xn({ clientMethod: i, activeProvider: a }), - callsite: Fe(this._errorFormat), - dataPath: [], - middlewareArgsMapper: s, - }); - } - $queryRaw(n, ...i) { - return this._createPrismaPromise((o) => { - if (n.raw !== void 0 || n.sql !== void 0) return this.$queryRawInternal(o, '$queryRaw', ...pa(n, i)); - throw new ee( - "`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n", - { clientVersion: this._clientVersion } - ); - }); - } - $queryRawTyped(n) { - return this._createPrismaPromise((i) => { - if (!this._hasPreviewFlag('typedSql')) - throw new ee('`typedSql` preview feature must be enabled in order to access $queryRawTyped API', { - clientVersion: this._clientVersion, - }); - return this.$queryRawInternal(i, '$queryRawTyped', n); - }); - } - $queryRawUnsafe(n, ...i) { - return this._createPrismaPromise((o) => this.$queryRawInternal(o, '$queryRawUnsafe', [n, ...i])); - } - _transactionWithArray({ promises: n, options: i }) { - let o = Rp.nextId(), - s = Ys(n.length), - a = n.map((l, d) => { - if (l?.[Symbol.toStringTag] !== 'PrismaPromise') - throw new Error( - 'All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.' - ); - let g = i?.isolationLevel ?? this._engineConfig.transactionOptions.isolationLevel, - h = { kind: 'batch', id: o, index: d, isolationLevel: g, lock: s }; - return l.requestTransaction?.(h) ?? l; - }); - return ca(a); - } - async _transactionWithCallback({ callback: n, options: i }) { - let o = { traceparent: this._tracingHelper.getTraceParent() }, - s = { - maxWait: i?.maxWait ?? this._engineConfig.transactionOptions.maxWait, - timeout: i?.timeout ?? this._engineConfig.transactionOptions.timeout, - isolationLevel: i?.isolationLevel ?? this._engineConfig.transactionOptions.isolationLevel, - }, - a = await this._engine.transaction('start', o, s), - l; - try { - let d = { kind: 'itx', ...a }; - ((l = await n(this._createItxClient(d))), await this._engine.transaction('commit', o, a)); - } catch (d) { - throw (await this._engine.transaction('rollback', o, a).catch(() => {}), d); - } - return l; - } - _createItxClient(n) { - return me( - qt( - me(cs(this), [ - te('_appliedParent', () => this._appliedParent._createItxClient(n)), - te('_createPrismaPromise', () => ei(n)), - te(Cp, () => n.id), - ]) - ), - [pt(gs)] - ); - } - $transaction(n, i) { - let o; - typeof n == 'function' - ? this._engineConfig.adapter?.adapterName === '@prisma/adapter-d1' - ? (o = () => { - throw new Error( - 'Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.' - ); - }) - : (o = () => this._transactionWithCallback({ callback: n, options: i })) - : (o = () => this._transactionWithArray({ promises: n, options: i })); - let s = { name: 'transaction', attributes: { method: '$transaction' } }; - return this._tracingHelper.runInChildSpan(s, o); - } - _request(n) { - n.otelParentCtx = this._tracingHelper.getActiveContext(); - let i = n.middlewareArgsMapper ?? Ap, - o = { - args: i.requestArgsToMiddlewareArgs(n.args), - dataPath: n.dataPath, - runInTransaction: !!n.transaction, - action: n.action, - model: n.model, - }, - s = { - operation: { - name: 'operation', - attributes: { method: o.action, model: o.model, name: o.model ? `${o.model}.${o.action}` : o.action }, - }, - }, - a = async (l) => { - let { runInTransaction: d, args: g, ...h } = l, - T = { ...n, ...h }; - (g && (T.args = i.middlewareArgsToRequestArgs(g)), - n.transaction !== void 0 && d === !1 && delete T.transaction); - let I = await Es(this, T); - return T.model - ? ds({ - result: I, - modelName: T.model, - args: T.args, - extensions: this._extensions, - runtimeDataModel: this._runtimeDataModel, - globalOmit: this._globalOmit, - }) - : I; - }; - return this._tracingHelper.runInChildSpan(s.operation, () => a(o)); - } - async _executeRequest({ - args: n, - clientMethod: i, - dataPath: o, - callsite: s, - action: a, - model: l, - argsMapper: d, - transaction: g, - unpacker: h, - otelParentCtx: T, - customDataProxyFetch: I, - }) { - try { - n = d ? d(n) : n; - let S = { name: 'serialize' }, - R = this._tracingHelper.runInChildSpan(S, () => - Nn({ - modelName: l, - runtimeDataModel: this._runtimeDataModel, - action: a, - args: n, - clientMethod: i, - callsite: s, - extensions: this._extensions, - errorFormat: this._errorFormat, - clientVersion: this._clientVersion, - previewFeatures: this._previewFeatures, - globalOmit: this._globalOmit, - }) - ); - return ( - Z.enabled('prisma:client') && - (Le('Prisma Client call:'), - Le(`prisma.${i}(${es(n)})`), - Le('Generated request:'), - Le( - JSON.stringify(R, null, 2) + - ` -` - )), - g?.kind === 'batch' && (await g.lock), - this._requestHandler.request({ - protocolQuery: R, - modelName: l, - action: a, - clientMethod: i, - dataPath: o, - callsite: s, - args: n, - extensions: this._extensions, - transaction: g, - unpacker: h, - otelParentCtx: T, - otelChildCtx: this._tracingHelper.getActiveContext(), - globalOmit: this._globalOmit, - customDataProxyFetch: I, - }) - ); - } catch (S) { - throw ((S.clientVersion = this._clientVersion), S); - } - } - $metrics = new Lt(this); - _hasPreviewFlag(n) { - return !!this._engineConfig.previewFeatures?.includes(n); - } - $applyPendingMigrations() { - return this._engine.applyPendingMigrations(); - } - $extends = ps; - } - return t; -} -function pa(e, t) { - return Ip(e) ? [new ue(e, t), Ks] : [e, Ws]; -} -function Ip(e) { - return Array.isArray(e) && Array.isArray(e.raw); -} -f(); -u(); -c(); -p(); -m(); -var Op = new Set([ - 'toJSON', - '$$typeof', - 'asymmetricMatch', - Symbol.iterator, - Symbol.toStringTag, - Symbol.isConcatSpreadable, - Symbol.toPrimitive, -]); -function kp(e) { - return new Proxy(e, { - get(t, r) { - if (r in t) return t[r]; - if (!Op.has(r)) throw new TypeError(`Invalid enum value: ${String(r)}`); - }, - }); -} -f(); -u(); -c(); -p(); -m(); -var export_warnEnvConflicts = void 0; -export { - Cr as DMMF, - Z as Debug, - _e as Decimal, - Ci as Extensions, - Lt as MetricsClient, - Q as PrismaClientInitializationError, - se as PrismaClientKnownRequestError, - Se as PrismaClientRustPanicError, - ae as PrismaClientUnknownRequestError, - ee as PrismaClientValidationError, - Si as Public, - ue as Sql, - sc as createParam, - hc as defineDmmfProperty, - $t as deserializeJsonResponse, - ii as deserializeRawResult, - Dl as dmmfToRuntimeDataModel, - bc as empty, - Sp as getPrismaClient, - Gn as getRuntime, - Ec as join, - kp as makeStrictEnum, - wc as makeTypedQueryFactory, - On as objectEnumValues, - zo as raw, - Nn as serializeJsonQuery, - Mn as skip, - Yo as sqltag, - export_warnEnvConflicts as warnEnvConflicts, - hr as warnOnce, -}; -//# sourceMappingURL=edge-esm.js.map diff --git a/prisma/generated/client/runtime/edge.js b/prisma/generated/client/runtime/edge.js deleted file mode 100644 index 9d088d6..0000000 --- a/prisma/generated/client/runtime/edge.js +++ /dev/null @@ -1,8872 +0,0 @@ -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ -'use strict'; -var va = Object.create; -var lr = Object.defineProperty; -var Ta = Object.getOwnPropertyDescriptor; -var Aa = Object.getOwnPropertyNames; -var Ca = Object.getPrototypeOf, - Ra = Object.prototype.hasOwnProperty; -var fe = (e, t) => () => (e && (t = e((e = 0))), t); -var Se = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), - vt = (e, t) => { - for (var r in t) lr(e, r, { get: t[r], enumerable: !0 }); - }, - ui = (e, t, r, n) => { - if ((t && typeof t == 'object') || typeof t == 'function') - for (let i of Aa(t)) - !Ra.call(e, i) && i !== r && lr(e, i, { get: () => t[i], enumerable: !(n = Ta(t, i)) || n.enumerable }); - return e; - }; -var Ue = (e, t, r) => ( - (r = e != null ? va(Ca(e)) : {}), - ui(t || !e || !e.__esModule ? lr(r, 'default', { value: e, enumerable: !0 }) : r, e) - ), - Sa = (e) => ui(lr({}, '__esModule', { value: !0 }), e); -var y, - b, - u = fe(() => { - 'use strict'; - ((y = { - nextTick: (e, ...t) => { - setTimeout(() => { - e(...t); - }, 0); - }, - env: {}, - version: '', - cwd: () => '/', - stderr: {}, - argv: ['/bin/node'], - pid: 1e4, - }), - ({ cwd: b } = y)); - }); -var x, - c = fe(() => { - 'use strict'; - x = - globalThis.performance ?? - (() => { - let e = Date.now(); - return { now: () => Date.now() - e }; - })(); - }); -var E, - p = fe(() => { - 'use strict'; - E = () => {}; - E.prototype = E; - }); -var m = fe(() => { - 'use strict'; -}); -var Si = Se((ze) => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); - var di = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), - Ia = di((e) => { - 'use strict'; - ((e.byteLength = l), (e.toByteArray = g), (e.fromByteArray = I)); - var t = [], - r = [], - n = typeof Uint8Array < 'u' ? Uint8Array : Array, - i = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - for (o = 0, s = i.length; o < s; ++o) ((t[o] = i[o]), (r[i.charCodeAt(o)] = o)); - var o, s; - ((r[45] = 62), (r[95] = 63)); - function a(S) { - var R = S.length; - if (R % 4 > 0) throw new Error('Invalid string. Length must be a multiple of 4'); - var M = S.indexOf('='); - M === -1 && (M = R); - var F = M === R ? 0 : 4 - (M % 4); - return [M, F]; - } - function l(S) { - var R = a(S), - M = R[0], - F = R[1]; - return ((M + F) * 3) / 4 - F; - } - function d(S, R, M) { - return ((R + M) * 3) / 4 - M; - } - function g(S) { - var R, - M = a(S), - F = M[0], - B = M[1], - O = new n(d(S, F, B)), - L = 0, - le = B > 0 ? F - 4 : F, - J; - for (J = 0; J < le; J += 4) - ((R = - (r[S.charCodeAt(J)] << 18) | - (r[S.charCodeAt(J + 1)] << 12) | - (r[S.charCodeAt(J + 2)] << 6) | - r[S.charCodeAt(J + 3)]), - (O[L++] = (R >> 16) & 255), - (O[L++] = (R >> 8) & 255), - (O[L++] = R & 255)); - return ( - B === 2 && ((R = (r[S.charCodeAt(J)] << 2) | (r[S.charCodeAt(J + 1)] >> 4)), (O[L++] = R & 255)), - B === 1 && - ((R = (r[S.charCodeAt(J)] << 10) | (r[S.charCodeAt(J + 1)] << 4) | (r[S.charCodeAt(J + 2)] >> 2)), - (O[L++] = (R >> 8) & 255), - (O[L++] = R & 255)), - O - ); - } - function h(S) { - return t[(S >> 18) & 63] + t[(S >> 12) & 63] + t[(S >> 6) & 63] + t[S & 63]; - } - function T(S, R, M) { - for (var F, B = [], O = R; O < M; O += 3) - ((F = ((S[O] << 16) & 16711680) + ((S[O + 1] << 8) & 65280) + (S[O + 2] & 255)), B.push(h(F))); - return B.join(''); - } - function I(S) { - for (var R, M = S.length, F = M % 3, B = [], O = 16383, L = 0, le = M - F; L < le; L += O) - B.push(T(S, L, L + O > le ? le : L + O)); - return ( - F === 1 - ? ((R = S[M - 1]), B.push(t[R >> 2] + t[(R << 4) & 63] + '==')) - : F === 2 && - ((R = (S[M - 2] << 8) + S[M - 1]), B.push(t[R >> 10] + t[(R >> 4) & 63] + t[(R << 2) & 63] + '=')), - B.join('') - ); - } - }), - Oa = di((e) => { - ((e.read = function (t, r, n, i, o) { - var s, - a, - l = o * 8 - i - 1, - d = (1 << l) - 1, - g = d >> 1, - h = -7, - T = n ? o - 1 : 0, - I = n ? -1 : 1, - S = t[r + T]; - for (T += I, s = S & ((1 << -h) - 1), S >>= -h, h += l; h > 0; s = s * 256 + t[r + T], T += I, h -= 8); - for (a = s & ((1 << -h) - 1), s >>= -h, h += i; h > 0; a = a * 256 + t[r + T], T += I, h -= 8); - if (s === 0) s = 1 - g; - else { - if (s === d) return a ? NaN : (S ? -1 : 1) * (1 / 0); - ((a = a + Math.pow(2, i)), (s = s - g)); - } - return (S ? -1 : 1) * a * Math.pow(2, s - i); - }), - (e.write = function (t, r, n, i, o, s) { - var a, - l, - d, - g = s * 8 - o - 1, - h = (1 << g) - 1, - T = h >> 1, - I = o === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, - S = i ? 0 : s - 1, - R = i ? 1 : -1, - M = r < 0 || (r === 0 && 1 / r < 0) ? 1 : 0; - for ( - r = Math.abs(r), - isNaN(r) || r === 1 / 0 - ? ((l = isNaN(r) ? 1 : 0), (a = h)) - : ((a = Math.floor(Math.log(r) / Math.LN2)), - r * (d = Math.pow(2, -a)) < 1 && (a--, (d *= 2)), - a + T >= 1 ? (r += I / d) : (r += I * Math.pow(2, 1 - T)), - r * d >= 2 && (a++, (d /= 2)), - a + T >= h - ? ((l = 0), (a = h)) - : a + T >= 1 - ? ((l = (r * d - 1) * Math.pow(2, o)), (a = a + T)) - : ((l = r * Math.pow(2, T - 1) * Math.pow(2, o)), (a = 0))); - o >= 8; - t[n + S] = l & 255, S += R, l /= 256, o -= 8 - ); - for (a = (a << o) | l, g += o; g > 0; t[n + S] = a & 255, S += R, a /= 256, g -= 8); - t[n + S - R] |= M * 128; - })); - }), - cn = Ia(), - We = Oa(), - ci = - typeof Symbol == 'function' && typeof Symbol.for == 'function' ? Symbol.for('nodejs.util.inspect.custom') : null; - ze.Buffer = A; - ze.SlowBuffer = Fa; - ze.INSPECT_MAX_BYTES = 50; - var ur = 2147483647; - ze.kMaxLength = ur; - A.TYPED_ARRAY_SUPPORT = ka(); - !A.TYPED_ARRAY_SUPPORT && - typeof console < 'u' && - typeof console.error == 'function' && - console.error( - 'This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.' - ); - function ka() { - try { - let e = new Uint8Array(1), - t = { - foo: function () { - return 42; - }, - }; - return (Object.setPrototypeOf(t, Uint8Array.prototype), Object.setPrototypeOf(e, t), e.foo() === 42); - } catch { - return !1; - } - } - Object.defineProperty(A.prototype, 'parent', { - enumerable: !0, - get: function () { - if (A.isBuffer(this)) return this.buffer; - }, - }); - Object.defineProperty(A.prototype, 'offset', { - enumerable: !0, - get: function () { - if (A.isBuffer(this)) return this.byteOffset; - }, - }); - function xe(e) { - if (e > ur) throw new RangeError('The value "' + e + '" is invalid for option "size"'); - let t = new Uint8Array(e); - return (Object.setPrototypeOf(t, A.prototype), t); - } - function A(e, t, r) { - if (typeof e == 'number') { - if (typeof t == 'string') - throw new TypeError('The "string" argument must be of type string. Received type number'); - return fn(e); - } - return gi(e, t, r); - } - A.poolSize = 8192; - function gi(e, t, r) { - if (typeof e == 'string') return Ma(e, t); - if (ArrayBuffer.isView(e)) return _a(e); - if (e == null) - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + - typeof e - ); - if ( - de(e, ArrayBuffer) || - (e && de(e.buffer, ArrayBuffer)) || - (typeof SharedArrayBuffer < 'u' && (de(e, SharedArrayBuffer) || (e && de(e.buffer, SharedArrayBuffer)))) - ) - return yi(e, t, r); - if (typeof e == 'number') - throw new TypeError('The "value" argument must not be of type number. Received type number'); - let n = e.valueOf && e.valueOf(); - if (n != null && n !== e) return A.from(n, t, r); - let i = Na(e); - if (i) return i; - if (typeof Symbol < 'u' && Symbol.toPrimitive != null && typeof e[Symbol.toPrimitive] == 'function') - return A.from(e[Symbol.toPrimitive]('string'), t, r); - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + - typeof e - ); - } - A.from = function (e, t, r) { - return gi(e, t, r); - }; - Object.setPrototypeOf(A.prototype, Uint8Array.prototype); - Object.setPrototypeOf(A, Uint8Array); - function hi(e) { - if (typeof e != 'number') throw new TypeError('"size" argument must be of type number'); - if (e < 0) throw new RangeError('The value "' + e + '" is invalid for option "size"'); - } - function Da(e, t, r) { - return (hi(e), e <= 0 ? xe(e) : t !== void 0 ? (typeof r == 'string' ? xe(e).fill(t, r) : xe(e).fill(t)) : xe(e)); - } - A.alloc = function (e, t, r) { - return Da(e, t, r); - }; - function fn(e) { - return (hi(e), xe(e < 0 ? 0 : dn(e) | 0)); - } - A.allocUnsafe = function (e) { - return fn(e); - }; - A.allocUnsafeSlow = function (e) { - return fn(e); - }; - function Ma(e, t) { - if (((typeof t != 'string' || t === '') && (t = 'utf8'), !A.isEncoding(t))) - throw new TypeError('Unknown encoding: ' + t); - let r = wi(e, t) | 0, - n = xe(r), - i = n.write(e, t); - return (i !== r && (n = n.slice(0, i)), n); - } - function pn(e) { - let t = e.length < 0 ? 0 : dn(e.length) | 0, - r = xe(t); - for (let n = 0; n < t; n += 1) r[n] = e[n] & 255; - return r; - } - function _a(e) { - if (de(e, Uint8Array)) { - let t = new Uint8Array(e); - return yi(t.buffer, t.byteOffset, t.byteLength); - } - return pn(e); - } - function yi(e, t, r) { - if (t < 0 || e.byteLength < t) throw new RangeError('"offset" is outside of buffer bounds'); - if (e.byteLength < t + (r || 0)) throw new RangeError('"length" is outside of buffer bounds'); - let n; - return ( - t === void 0 && r === void 0 - ? (n = new Uint8Array(e)) - : r === void 0 - ? (n = new Uint8Array(e, t)) - : (n = new Uint8Array(e, t, r)), - Object.setPrototypeOf(n, A.prototype), - n - ); - } - function Na(e) { - if (A.isBuffer(e)) { - let t = dn(e.length) | 0, - r = xe(t); - return (r.length === 0 || e.copy(r, 0, 0, t), r); - } - if (e.length !== void 0) return typeof e.length != 'number' || hn(e.length) ? xe(0) : pn(e); - if (e.type === 'Buffer' && Array.isArray(e.data)) return pn(e.data); - } - function dn(e) { - if (e >= ur) - throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' + ur.toString(16) + ' bytes'); - return e | 0; - } - function Fa(e) { - return (+e != e && (e = 0), A.alloc(+e)); - } - A.isBuffer = function (e) { - return e != null && e._isBuffer === !0 && e !== A.prototype; - }; - A.compare = function (e, t) { - if ( - (de(e, Uint8Array) && (e = A.from(e, e.offset, e.byteLength)), - de(t, Uint8Array) && (t = A.from(t, t.offset, t.byteLength)), - !A.isBuffer(e) || !A.isBuffer(t)) - ) - throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); - if (e === t) return 0; - let r = e.length, - n = t.length; - for (let i = 0, o = Math.min(r, n); i < o; ++i) - if (e[i] !== t[i]) { - ((r = e[i]), (n = t[i])); - break; - } - return r < n ? -1 : n < r ? 1 : 0; - }; - A.isEncoding = function (e) { - switch (String(e).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return !0; - default: - return !1; - } - }; - A.concat = function (e, t) { - if (!Array.isArray(e)) throw new TypeError('"list" argument must be an Array of Buffers'); - if (e.length === 0) return A.alloc(0); - let r; - if (t === void 0) for (t = 0, r = 0; r < e.length; ++r) t += e[r].length; - let n = A.allocUnsafe(t), - i = 0; - for (r = 0; r < e.length; ++r) { - let o = e[r]; - if (de(o, Uint8Array)) - i + o.length > n.length - ? (A.isBuffer(o) || (o = A.from(o)), o.copy(n, i)) - : Uint8Array.prototype.set.call(n, o, i); - else if (A.isBuffer(o)) o.copy(n, i); - else throw new TypeError('"list" argument must be an Array of Buffers'); - i += o.length; - } - return n; - }; - function wi(e, t) { - if (A.isBuffer(e)) return e.length; - if (ArrayBuffer.isView(e) || de(e, ArrayBuffer)) return e.byteLength; - if (typeof e != 'string') - throw new TypeError( - 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof e - ); - let r = e.length, - n = arguments.length > 2 && arguments[2] === !0; - if (!n && r === 0) return 0; - let i = !1; - for (;;) - switch (t) { - case 'ascii': - case 'latin1': - case 'binary': - return r; - case 'utf8': - case 'utf-8': - return mn(e).length; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return r * 2; - case 'hex': - return r >>> 1; - case 'base64': - return Ri(e).length; - default: - if (i) return n ? -1 : mn(e).length; - ((t = ('' + t).toLowerCase()), (i = !0)); - } - } - A.byteLength = wi; - function La(e, t, r) { - let n = !1; - if ( - ((t === void 0 || t < 0) && (t = 0), - t > this.length || - ((r === void 0 || r > this.length) && (r = this.length), r <= 0) || - ((r >>>= 0), (t >>>= 0), r <= t)) - ) - return ''; - for (e || (e = 'utf8'); ; ) - switch (e) { - case 'hex': - return Ka(this, t, r); - case 'utf8': - case 'utf-8': - return bi(this, t, r); - case 'ascii': - return Ja(this, t, r); - case 'latin1': - case 'binary': - return Qa(this, t, r); - case 'base64': - return ja(this, t, r); - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return Wa(this, t, r); - default: - if (n) throw new TypeError('Unknown encoding: ' + e); - ((e = (e + '').toLowerCase()), (n = !0)); - } - } - A.prototype._isBuffer = !0; - function Be(e, t, r) { - let n = e[t]; - ((e[t] = e[r]), (e[r] = n)); - } - A.prototype.swap16 = function () { - let e = this.length; - if (e % 2 !== 0) throw new RangeError('Buffer size must be a multiple of 16-bits'); - for (let t = 0; t < e; t += 2) Be(this, t, t + 1); - return this; - }; - A.prototype.swap32 = function () { - let e = this.length; - if (e % 4 !== 0) throw new RangeError('Buffer size must be a multiple of 32-bits'); - for (let t = 0; t < e; t += 4) (Be(this, t, t + 3), Be(this, t + 1, t + 2)); - return this; - }; - A.prototype.swap64 = function () { - let e = this.length; - if (e % 8 !== 0) throw new RangeError('Buffer size must be a multiple of 64-bits'); - for (let t = 0; t < e; t += 8) - (Be(this, t, t + 7), Be(this, t + 1, t + 6), Be(this, t + 2, t + 5), Be(this, t + 3, t + 4)); - return this; - }; - A.prototype.toString = function () { - let e = this.length; - return e === 0 ? '' : arguments.length === 0 ? bi(this, 0, e) : La.apply(this, arguments); - }; - A.prototype.toLocaleString = A.prototype.toString; - A.prototype.equals = function (e) { - if (!A.isBuffer(e)) throw new TypeError('Argument must be a Buffer'); - return this === e ? !0 : A.compare(this, e) === 0; - }; - A.prototype.inspect = function () { - let e = '', - t = ze.INSPECT_MAX_BYTES; - return ( - (e = this.toString('hex', 0, t) - .replace(/(.{2})/g, '$1 ') - .trim()), - this.length > t && (e += ' ... '), - '' - ); - }; - ci && (A.prototype[ci] = A.prototype.inspect); - A.prototype.compare = function (e, t, r, n, i) { - if ((de(e, Uint8Array) && (e = A.from(e, e.offset, e.byteLength)), !A.isBuffer(e))) - throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e); - if ( - (t === void 0 && (t = 0), - r === void 0 && (r = e ? e.length : 0), - n === void 0 && (n = 0), - i === void 0 && (i = this.length), - t < 0 || r > e.length || n < 0 || i > this.length) - ) - throw new RangeError('out of range index'); - if (n >= i && t >= r) return 0; - if (n >= i) return -1; - if (t >= r) return 1; - if (((t >>>= 0), (r >>>= 0), (n >>>= 0), (i >>>= 0), this === e)) return 0; - let o = i - n, - s = r - t, - a = Math.min(o, s), - l = this.slice(n, i), - d = e.slice(t, r); - for (let g = 0; g < a; ++g) - if (l[g] !== d[g]) { - ((o = l[g]), (s = d[g])); - break; - } - return o < s ? -1 : s < o ? 1 : 0; - }; - function Ei(e, t, r, n, i) { - if (e.length === 0) return -1; - if ( - (typeof r == 'string' - ? ((n = r), (r = 0)) - : r > 2147483647 - ? (r = 2147483647) - : r < -2147483648 && (r = -2147483648), - (r = +r), - hn(r) && (r = i ? 0 : e.length - 1), - r < 0 && (r = e.length + r), - r >= e.length) - ) { - if (i) return -1; - r = e.length - 1; - } else if (r < 0) - if (i) r = 0; - else return -1; - if ((typeof t == 'string' && (t = A.from(t, n)), A.isBuffer(t))) return t.length === 0 ? -1 : pi(e, t, r, n, i); - if (typeof t == 'number') - return ( - (t = t & 255), - typeof Uint8Array.prototype.indexOf == 'function' - ? i - ? Uint8Array.prototype.indexOf.call(e, t, r) - : Uint8Array.prototype.lastIndexOf.call(e, t, r) - : pi(e, [t], r, n, i) - ); - throw new TypeError('val must be string, number or Buffer'); - } - function pi(e, t, r, n, i) { - let o = 1, - s = e.length, - a = t.length; - if ( - n !== void 0 && - ((n = String(n).toLowerCase()), n === 'ucs2' || n === 'ucs-2' || n === 'utf16le' || n === 'utf-16le') - ) { - if (e.length < 2 || t.length < 2) return -1; - ((o = 2), (s /= 2), (a /= 2), (r /= 2)); - } - function l(g, h) { - return o === 1 ? g[h] : g.readUInt16BE(h * o); - } - let d; - if (i) { - let g = -1; - for (d = r; d < s; d++) - if (l(e, d) === l(t, g === -1 ? 0 : d - g)) { - if ((g === -1 && (g = d), d - g + 1 === a)) return g * o; - } else (g !== -1 && (d -= d - g), (g = -1)); - } else - for (r + a > s && (r = s - a), d = r; d >= 0; d--) { - let g = !0; - for (let h = 0; h < a; h++) - if (l(e, d + h) !== l(t, h)) { - g = !1; - break; - } - if (g) return d; - } - return -1; - } - A.prototype.includes = function (e, t, r) { - return this.indexOf(e, t, r) !== -1; - }; - A.prototype.indexOf = function (e, t, r) { - return Ei(this, e, t, r, !0); - }; - A.prototype.lastIndexOf = function (e, t, r) { - return Ei(this, e, t, r, !1); - }; - function Ua(e, t, r, n) { - r = Number(r) || 0; - let i = e.length - r; - n ? ((n = Number(n)), n > i && (n = i)) : (n = i); - let o = t.length; - n > o / 2 && (n = o / 2); - let s; - for (s = 0; s < n; ++s) { - let a = parseInt(t.substr(s * 2, 2), 16); - if (hn(a)) return s; - e[r + s] = a; - } - return s; - } - function Ba(e, t, r, n) { - return cr(mn(t, e.length - r), e, r, n); - } - function qa(e, t, r, n) { - return cr(Za(t), e, r, n); - } - function Va(e, t, r, n) { - return cr(Ri(t), e, r, n); - } - function $a(e, t, r, n) { - return cr(Xa(t, e.length - r), e, r, n); - } - A.prototype.write = function (e, t, r, n) { - if (t === void 0) ((n = 'utf8'), (r = this.length), (t = 0)); - else if (r === void 0 && typeof t == 'string') ((n = t), (r = this.length), (t = 0)); - else if (isFinite(t)) - ((t = t >>> 0), isFinite(r) ? ((r = r >>> 0), n === void 0 && (n = 'utf8')) : ((n = r), (r = void 0))); - else throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported'); - let i = this.length - t; - if (((r === void 0 || r > i) && (r = i), (e.length > 0 && (r < 0 || t < 0)) || t > this.length)) - throw new RangeError('Attempt to write outside buffer bounds'); - n || (n = 'utf8'); - let o = !1; - for (;;) - switch (n) { - case 'hex': - return Ua(this, e, t, r); - case 'utf8': - case 'utf-8': - return Ba(this, e, t, r); - case 'ascii': - case 'latin1': - case 'binary': - return qa(this, e, t, r); - case 'base64': - return Va(this, e, t, r); - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return $a(this, e, t, r); - default: - if (o) throw new TypeError('Unknown encoding: ' + n); - ((n = ('' + n).toLowerCase()), (o = !0)); - } - }; - A.prototype.toJSON = function () { - return { type: 'Buffer', data: Array.prototype.slice.call(this._arr || this, 0) }; - }; - function ja(e, t, r) { - return t === 0 && r === e.length ? cn.fromByteArray(e) : cn.fromByteArray(e.slice(t, r)); - } - function bi(e, t, r) { - r = Math.min(e.length, r); - let n = [], - i = t; - for (; i < r; ) { - let o = e[i], - s = null, - a = o > 239 ? 4 : o > 223 ? 3 : o > 191 ? 2 : 1; - if (i + a <= r) { - let l, d, g, h; - switch (a) { - case 1: - o < 128 && (s = o); - break; - case 2: - ((l = e[i + 1]), (l & 192) === 128 && ((h = ((o & 31) << 6) | (l & 63)), h > 127 && (s = h))); - break; - case 3: - ((l = e[i + 1]), - (d = e[i + 2]), - (l & 192) === 128 && - (d & 192) === 128 && - ((h = ((o & 15) << 12) | ((l & 63) << 6) | (d & 63)), h > 2047 && (h < 55296 || h > 57343) && (s = h))); - break; - case 4: - ((l = e[i + 1]), - (d = e[i + 2]), - (g = e[i + 3]), - (l & 192) === 128 && - (d & 192) === 128 && - (g & 192) === 128 && - ((h = ((o & 15) << 18) | ((l & 63) << 12) | ((d & 63) << 6) | (g & 63)), - h > 65535 && h < 1114112 && (s = h))); - } - } - (s === null - ? ((s = 65533), (a = 1)) - : s > 65535 && ((s -= 65536), n.push(((s >>> 10) & 1023) | 55296), (s = 56320 | (s & 1023))), - n.push(s), - (i += a)); - } - return Ga(n); - } - var mi = 4096; - function Ga(e) { - let t = e.length; - if (t <= mi) return String.fromCharCode.apply(String, e); - let r = '', - n = 0; - for (; n < t; ) r += String.fromCharCode.apply(String, e.slice(n, (n += mi))); - return r; - } - function Ja(e, t, r) { - let n = ''; - r = Math.min(e.length, r); - for (let i = t; i < r; ++i) n += String.fromCharCode(e[i] & 127); - return n; - } - function Qa(e, t, r) { - let n = ''; - r = Math.min(e.length, r); - for (let i = t; i < r; ++i) n += String.fromCharCode(e[i]); - return n; - } - function Ka(e, t, r) { - let n = e.length; - ((!t || t < 0) && (t = 0), (!r || r < 0 || r > n) && (r = n)); - let i = ''; - for (let o = t; o < r; ++o) i += el[e[o]]; - return i; - } - function Wa(e, t, r) { - let n = e.slice(t, r), - i = ''; - for (let o = 0; o < n.length - 1; o += 2) i += String.fromCharCode(n[o] + n[o + 1] * 256); - return i; - } - A.prototype.slice = function (e, t) { - let r = this.length; - ((e = ~~e), - (t = t === void 0 ? r : ~~t), - e < 0 ? ((e += r), e < 0 && (e = 0)) : e > r && (e = r), - t < 0 ? ((t += r), t < 0 && (t = 0)) : t > r && (t = r), - t < e && (t = e)); - let n = this.subarray(e, t); - return (Object.setPrototypeOf(n, A.prototype), n); - }; - function W(e, t, r) { - if (e % 1 !== 0 || e < 0) throw new RangeError('offset is not uint'); - if (e + t > r) throw new RangeError('Trying to access beyond buffer length'); - } - A.prototype.readUintLE = A.prototype.readUIntLE = function (e, t, r) { - ((e = e >>> 0), (t = t >>> 0), r || W(e, t, this.length)); - let n = this[e], - i = 1, - o = 0; - for (; ++o < t && (i *= 256); ) n += this[e + o] * i; - return n; - }; - A.prototype.readUintBE = A.prototype.readUIntBE = function (e, t, r) { - ((e = e >>> 0), (t = t >>> 0), r || W(e, t, this.length)); - let n = this[e + --t], - i = 1; - for (; t > 0 && (i *= 256); ) n += this[e + --t] * i; - return n; - }; - A.prototype.readUint8 = A.prototype.readUInt8 = function (e, t) { - return ((e = e >>> 0), t || W(e, 1, this.length), this[e]); - }; - A.prototype.readUint16LE = A.prototype.readUInt16LE = function (e, t) { - return ((e = e >>> 0), t || W(e, 2, this.length), this[e] | (this[e + 1] << 8)); - }; - A.prototype.readUint16BE = A.prototype.readUInt16BE = function (e, t) { - return ((e = e >>> 0), t || W(e, 2, this.length), (this[e] << 8) | this[e + 1]); - }; - A.prototype.readUint32LE = A.prototype.readUInt32LE = function (e, t) { - return ( - (e = e >>> 0), - t || W(e, 4, this.length), - (this[e] | (this[e + 1] << 8) | (this[e + 2] << 16)) + this[e + 3] * 16777216 - ); - }; - A.prototype.readUint32BE = A.prototype.readUInt32BE = function (e, t) { - return ( - (e = e >>> 0), - t || W(e, 4, this.length), - this[e] * 16777216 + ((this[e + 1] << 16) | (this[e + 2] << 8) | this[e + 3]) - ); - }; - A.prototype.readBigUInt64LE = Ie(function (e) { - ((e = e >>> 0), He(e, 'offset')); - let t = this[e], - r = this[e + 7]; - (t === void 0 || r === void 0) && Tt(e, this.length - 8); - let n = t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24, - i = this[++e] + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + r * 2 ** 24; - return BigInt(n) + (BigInt(i) << BigInt(32)); - }); - A.prototype.readBigUInt64BE = Ie(function (e) { - ((e = e >>> 0), He(e, 'offset')); - let t = this[e], - r = this[e + 7]; - (t === void 0 || r === void 0) && Tt(e, this.length - 8); - let n = t * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e], - i = this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + r; - return (BigInt(n) << BigInt(32)) + BigInt(i); - }); - A.prototype.readIntLE = function (e, t, r) { - ((e = e >>> 0), (t = t >>> 0), r || W(e, t, this.length)); - let n = this[e], - i = 1, - o = 0; - for (; ++o < t && (i *= 256); ) n += this[e + o] * i; - return ((i *= 128), n >= i && (n -= Math.pow(2, 8 * t)), n); - }; - A.prototype.readIntBE = function (e, t, r) { - ((e = e >>> 0), (t = t >>> 0), r || W(e, t, this.length)); - let n = t, - i = 1, - o = this[e + --n]; - for (; n > 0 && (i *= 256); ) o += this[e + --n] * i; - return ((i *= 128), o >= i && (o -= Math.pow(2, 8 * t)), o); - }; - A.prototype.readInt8 = function (e, t) { - return ((e = e >>> 0), t || W(e, 1, this.length), this[e] & 128 ? (255 - this[e] + 1) * -1 : this[e]); - }; - A.prototype.readInt16LE = function (e, t) { - ((e = e >>> 0), t || W(e, 2, this.length)); - let r = this[e] | (this[e + 1] << 8); - return r & 32768 ? r | 4294901760 : r; - }; - A.prototype.readInt16BE = function (e, t) { - ((e = e >>> 0), t || W(e, 2, this.length)); - let r = this[e + 1] | (this[e] << 8); - return r & 32768 ? r | 4294901760 : r; - }; - A.prototype.readInt32LE = function (e, t) { - return ( - (e = e >>> 0), - t || W(e, 4, this.length), - this[e] | (this[e + 1] << 8) | (this[e + 2] << 16) | (this[e + 3] << 24) - ); - }; - A.prototype.readInt32BE = function (e, t) { - return ( - (e = e >>> 0), - t || W(e, 4, this.length), - (this[e] << 24) | (this[e + 1] << 16) | (this[e + 2] << 8) | this[e + 3] - ); - }; - A.prototype.readBigInt64LE = Ie(function (e) { - ((e = e >>> 0), He(e, 'offset')); - let t = this[e], - r = this[e + 7]; - (t === void 0 || r === void 0) && Tt(e, this.length - 8); - let n = this[e + 4] + this[e + 5] * 2 ** 8 + this[e + 6] * 2 ** 16 + (r << 24); - return (BigInt(n) << BigInt(32)) + BigInt(t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24); - }); - A.prototype.readBigInt64BE = Ie(function (e) { - ((e = e >>> 0), He(e, 'offset')); - let t = this[e], - r = this[e + 7]; - (t === void 0 || r === void 0) && Tt(e, this.length - 8); - let n = (t << 24) + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e]; - return (BigInt(n) << BigInt(32)) + BigInt(this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + r); - }); - A.prototype.readFloatLE = function (e, t) { - return ((e = e >>> 0), t || W(e, 4, this.length), We.read(this, e, !0, 23, 4)); - }; - A.prototype.readFloatBE = function (e, t) { - return ((e = e >>> 0), t || W(e, 4, this.length), We.read(this, e, !1, 23, 4)); - }; - A.prototype.readDoubleLE = function (e, t) { - return ((e = e >>> 0), t || W(e, 8, this.length), We.read(this, e, !0, 52, 8)); - }; - A.prototype.readDoubleBE = function (e, t) { - return ((e = e >>> 0), t || W(e, 8, this.length), We.read(this, e, !1, 52, 8)); - }; - function re(e, t, r, n, i, o) { - if (!A.isBuffer(e)) throw new TypeError('"buffer" argument must be a Buffer instance'); - if (t > i || t < o) throw new RangeError('"value" argument is out of bounds'); - if (r + n > e.length) throw new RangeError('Index out of range'); - } - A.prototype.writeUintLE = A.prototype.writeUIntLE = function (e, t, r, n) { - if (((e = +e), (t = t >>> 0), (r = r >>> 0), !n)) { - let s = Math.pow(2, 8 * r) - 1; - re(this, e, t, r, s, 0); - } - let i = 1, - o = 0; - for (this[t] = e & 255; ++o < r && (i *= 256); ) this[t + o] = (e / i) & 255; - return t + r; - }; - A.prototype.writeUintBE = A.prototype.writeUIntBE = function (e, t, r, n) { - if (((e = +e), (t = t >>> 0), (r = r >>> 0), !n)) { - let s = Math.pow(2, 8 * r) - 1; - re(this, e, t, r, s, 0); - } - let i = r - 1, - o = 1; - for (this[t + i] = e & 255; --i >= 0 && (o *= 256); ) this[t + i] = (e / o) & 255; - return t + r; - }; - A.prototype.writeUint8 = A.prototype.writeUInt8 = function (e, t, r) { - return ((e = +e), (t = t >>> 0), r || re(this, e, t, 1, 255, 0), (this[t] = e & 255), t + 1); - }; - A.prototype.writeUint16LE = A.prototype.writeUInt16LE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || re(this, e, t, 2, 65535, 0), - (this[t] = e & 255), - (this[t + 1] = e >>> 8), - t + 2 - ); - }; - A.prototype.writeUint16BE = A.prototype.writeUInt16BE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || re(this, e, t, 2, 65535, 0), - (this[t] = e >>> 8), - (this[t + 1] = e & 255), - t + 2 - ); - }; - A.prototype.writeUint32LE = A.prototype.writeUInt32LE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || re(this, e, t, 4, 4294967295, 0), - (this[t + 3] = e >>> 24), - (this[t + 2] = e >>> 16), - (this[t + 1] = e >>> 8), - (this[t] = e & 255), - t + 4 - ); - }; - A.prototype.writeUint32BE = A.prototype.writeUInt32BE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || re(this, e, t, 4, 4294967295, 0), - (this[t] = e >>> 24), - (this[t + 1] = e >>> 16), - (this[t + 2] = e >>> 8), - (this[t + 3] = e & 255), - t + 4 - ); - }; - function xi(e, t, r, n, i) { - Ci(t, n, i, e, r, 7); - let o = Number(t & BigInt(4294967295)); - ((e[r++] = o), (o = o >> 8), (e[r++] = o), (o = o >> 8), (e[r++] = o), (o = o >> 8), (e[r++] = o)); - let s = Number((t >> BigInt(32)) & BigInt(4294967295)); - return ((e[r++] = s), (s = s >> 8), (e[r++] = s), (s = s >> 8), (e[r++] = s), (s = s >> 8), (e[r++] = s), r); - } - function Pi(e, t, r, n, i) { - Ci(t, n, i, e, r, 7); - let o = Number(t & BigInt(4294967295)); - ((e[r + 7] = o), (o = o >> 8), (e[r + 6] = o), (o = o >> 8), (e[r + 5] = o), (o = o >> 8), (e[r + 4] = o)); - let s = Number((t >> BigInt(32)) & BigInt(4294967295)); - return ( - (e[r + 3] = s), - (s = s >> 8), - (e[r + 2] = s), - (s = s >> 8), - (e[r + 1] = s), - (s = s >> 8), - (e[r] = s), - r + 8 - ); - } - A.prototype.writeBigUInt64LE = Ie(function (e, t = 0) { - return xi(this, e, t, BigInt(0), BigInt('0xffffffffffffffff')); - }); - A.prototype.writeBigUInt64BE = Ie(function (e, t = 0) { - return Pi(this, e, t, BigInt(0), BigInt('0xffffffffffffffff')); - }); - A.prototype.writeIntLE = function (e, t, r, n) { - if (((e = +e), (t = t >>> 0), !n)) { - let a = Math.pow(2, 8 * r - 1); - re(this, e, t, r, a - 1, -a); - } - let i = 0, - o = 1, - s = 0; - for (this[t] = e & 255; ++i < r && (o *= 256); ) - (e < 0 && s === 0 && this[t + i - 1] !== 0 && (s = 1), (this[t + i] = (((e / o) >> 0) - s) & 255)); - return t + r; - }; - A.prototype.writeIntBE = function (e, t, r, n) { - if (((e = +e), (t = t >>> 0), !n)) { - let a = Math.pow(2, 8 * r - 1); - re(this, e, t, r, a - 1, -a); - } - let i = r - 1, - o = 1, - s = 0; - for (this[t + i] = e & 255; --i >= 0 && (o *= 256); ) - (e < 0 && s === 0 && this[t + i + 1] !== 0 && (s = 1), (this[t + i] = (((e / o) >> 0) - s) & 255)); - return t + r; - }; - A.prototype.writeInt8 = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || re(this, e, t, 1, 127, -128), - e < 0 && (e = 255 + e + 1), - (this[t] = e & 255), - t + 1 - ); - }; - A.prototype.writeInt16LE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || re(this, e, t, 2, 32767, -32768), - (this[t] = e & 255), - (this[t + 1] = e >>> 8), - t + 2 - ); - }; - A.prototype.writeInt16BE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || re(this, e, t, 2, 32767, -32768), - (this[t] = e >>> 8), - (this[t + 1] = e & 255), - t + 2 - ); - }; - A.prototype.writeInt32LE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || re(this, e, t, 4, 2147483647, -2147483648), - (this[t] = e & 255), - (this[t + 1] = e >>> 8), - (this[t + 2] = e >>> 16), - (this[t + 3] = e >>> 24), - t + 4 - ); - }; - A.prototype.writeInt32BE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || re(this, e, t, 4, 2147483647, -2147483648), - e < 0 && (e = 4294967295 + e + 1), - (this[t] = e >>> 24), - (this[t + 1] = e >>> 16), - (this[t + 2] = e >>> 8), - (this[t + 3] = e & 255), - t + 4 - ); - }; - A.prototype.writeBigInt64LE = Ie(function (e, t = 0) { - return xi(this, e, t, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')); - }); - A.prototype.writeBigInt64BE = Ie(function (e, t = 0) { - return Pi(this, e, t, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')); - }); - function vi(e, t, r, n, i, o) { - if (r + n > e.length) throw new RangeError('Index out of range'); - if (r < 0) throw new RangeError('Index out of range'); - } - function Ti(e, t, r, n, i) { - return ( - (t = +t), - (r = r >>> 0), - i || vi(e, t, r, 4, 34028234663852886e22, -34028234663852886e22), - We.write(e, t, r, n, 23, 4), - r + 4 - ); - } - A.prototype.writeFloatLE = function (e, t, r) { - return Ti(this, e, t, !0, r); - }; - A.prototype.writeFloatBE = function (e, t, r) { - return Ti(this, e, t, !1, r); - }; - function Ai(e, t, r, n, i) { - return ( - (t = +t), - (r = r >>> 0), - i || vi(e, t, r, 8, 17976931348623157e292, -17976931348623157e292), - We.write(e, t, r, n, 52, 8), - r + 8 - ); - } - A.prototype.writeDoubleLE = function (e, t, r) { - return Ai(this, e, t, !0, r); - }; - A.prototype.writeDoubleBE = function (e, t, r) { - return Ai(this, e, t, !1, r); - }; - A.prototype.copy = function (e, t, r, n) { - if (!A.isBuffer(e)) throw new TypeError('argument should be a Buffer'); - if ( - (r || (r = 0), - !n && n !== 0 && (n = this.length), - t >= e.length && (t = e.length), - t || (t = 0), - n > 0 && n < r && (n = r), - n === r || e.length === 0 || this.length === 0) - ) - return 0; - if (t < 0) throw new RangeError('targetStart out of bounds'); - if (r < 0 || r >= this.length) throw new RangeError('Index out of range'); - if (n < 0) throw new RangeError('sourceEnd out of bounds'); - (n > this.length && (n = this.length), e.length - t < n - r && (n = e.length - t + r)); - let i = n - r; - return ( - this === e && typeof Uint8Array.prototype.copyWithin == 'function' - ? this.copyWithin(t, r, n) - : Uint8Array.prototype.set.call(e, this.subarray(r, n), t), - i - ); - }; - A.prototype.fill = function (e, t, r, n) { - if (typeof e == 'string') { - if ( - (typeof t == 'string' - ? ((n = t), (t = 0), (r = this.length)) - : typeof r == 'string' && ((n = r), (r = this.length)), - n !== void 0 && typeof n != 'string') - ) - throw new TypeError('encoding must be a string'); - if (typeof n == 'string' && !A.isEncoding(n)) throw new TypeError('Unknown encoding: ' + n); - if (e.length === 1) { - let o = e.charCodeAt(0); - ((n === 'utf8' && o < 128) || n === 'latin1') && (e = o); - } - } else typeof e == 'number' ? (e = e & 255) : typeof e == 'boolean' && (e = Number(e)); - if (t < 0 || this.length < t || this.length < r) throw new RangeError('Out of range index'); - if (r <= t) return this; - ((t = t >>> 0), (r = r === void 0 ? this.length : r >>> 0), e || (e = 0)); - let i; - if (typeof e == 'number') for (i = t; i < r; ++i) this[i] = e; - else { - let o = A.isBuffer(e) ? e : A.from(e, n), - s = o.length; - if (s === 0) throw new TypeError('The value "' + e + '" is invalid for argument "value"'); - for (i = 0; i < r - t; ++i) this[i + t] = o[i % s]; - } - return this; - }; - var Ke = {}; - function gn(e, t, r) { - Ke[e] = class extends r { - constructor() { - (super(), - Object.defineProperty(this, 'message', { value: t.apply(this, arguments), writable: !0, configurable: !0 }), - (this.name = `${this.name} [${e}]`), - this.stack, - delete this.name); - } - get code() { - return e; - } - set code(n) { - Object.defineProperty(this, 'code', { configurable: !0, enumerable: !0, value: n, writable: !0 }); - } - toString() { - return `${this.name} [${e}]: ${this.message}`; - } - }; - } - gn( - 'ERR_BUFFER_OUT_OF_BOUNDS', - function (e) { - return e ? `${e} is outside of buffer bounds` : 'Attempt to access memory outside buffer bounds'; - }, - RangeError - ); - gn( - 'ERR_INVALID_ARG_TYPE', - function (e, t) { - return `The "${e}" argument must be of type number. Received type ${typeof t}`; - }, - TypeError - ); - gn( - 'ERR_OUT_OF_RANGE', - function (e, t, r) { - let n = `The value of "${e}" is out of range.`, - i = r; - return ( - Number.isInteger(r) && Math.abs(r) > 2 ** 32 - ? (i = fi(String(r))) - : typeof r == 'bigint' && - ((i = String(r)), - (r > BigInt(2) ** BigInt(32) || r < -(BigInt(2) ** BigInt(32))) && (i = fi(i)), - (i += 'n')), - (n += ` It must be ${t}. Received ${i}`), - n - ); - }, - RangeError - ); - function fi(e) { - let t = '', - r = e.length, - n = e[0] === '-' ? 1 : 0; - for (; r >= n + 4; r -= 3) t = `_${e.slice(r - 3, r)}${t}`; - return `${e.slice(0, r)}${t}`; - } - function Ha(e, t, r) { - (He(t, 'offset'), (e[t] === void 0 || e[t + r] === void 0) && Tt(t, e.length - (r + 1))); - } - function Ci(e, t, r, n, i, o) { - if (e > r || e < t) { - let s = typeof t == 'bigint' ? 'n' : '', - a; - throw ( - o > 3 - ? t === 0 || t === BigInt(0) - ? (a = `>= 0${s} and < 2${s} ** ${(o + 1) * 8}${s}`) - : (a = `>= -(2${s} ** ${(o + 1) * 8 - 1}${s}) and < 2 ** ${(o + 1) * 8 - 1}${s}`) - : (a = `>= ${t}${s} and <= ${r}${s}`), - new Ke.ERR_OUT_OF_RANGE('value', a, e) - ); - } - Ha(n, i, o); - } - function He(e, t) { - if (typeof e != 'number') throw new Ke.ERR_INVALID_ARG_TYPE(t, 'number', e); - } - function Tt(e, t, r) { - throw Math.floor(e) !== e - ? (He(e, r), new Ke.ERR_OUT_OF_RANGE(r || 'offset', 'an integer', e)) - : t < 0 - ? new Ke.ERR_BUFFER_OUT_OF_BOUNDS() - : new Ke.ERR_OUT_OF_RANGE(r || 'offset', `>= ${r ? 1 : 0} and <= ${t}`, e); - } - var za = /[^+/0-9A-Za-z-_]/g; - function Ya(e) { - if (((e = e.split('=')[0]), (e = e.trim().replace(za, '')), e.length < 2)) return ''; - for (; e.length % 4 !== 0; ) e = e + '='; - return e; - } - function mn(e, t) { - t = t || 1 / 0; - let r, - n = e.length, - i = null, - o = []; - for (let s = 0; s < n; ++s) { - if (((r = e.charCodeAt(s)), r > 55295 && r < 57344)) { - if (!i) { - if (r > 56319) { - (t -= 3) > -1 && o.push(239, 191, 189); - continue; - } else if (s + 1 === n) { - (t -= 3) > -1 && o.push(239, 191, 189); - continue; - } - i = r; - continue; - } - if (r < 56320) { - ((t -= 3) > -1 && o.push(239, 191, 189), (i = r)); - continue; - } - r = (((i - 55296) << 10) | (r - 56320)) + 65536; - } else i && (t -= 3) > -1 && o.push(239, 191, 189); - if (((i = null), r < 128)) { - if ((t -= 1) < 0) break; - o.push(r); - } else if (r < 2048) { - if ((t -= 2) < 0) break; - o.push((r >> 6) | 192, (r & 63) | 128); - } else if (r < 65536) { - if ((t -= 3) < 0) break; - o.push((r >> 12) | 224, ((r >> 6) & 63) | 128, (r & 63) | 128); - } else if (r < 1114112) { - if ((t -= 4) < 0) break; - o.push((r >> 18) | 240, ((r >> 12) & 63) | 128, ((r >> 6) & 63) | 128, (r & 63) | 128); - } else throw new Error('Invalid code point'); - } - return o; - } - function Za(e) { - let t = []; - for (let r = 0; r < e.length; ++r) t.push(e.charCodeAt(r) & 255); - return t; - } - function Xa(e, t) { - let r, - n, - i, - o = []; - for (let s = 0; s < e.length && !((t -= 2) < 0); ++s) - ((r = e.charCodeAt(s)), (n = r >> 8), (i = r % 256), o.push(i), o.push(n)); - return o; - } - function Ri(e) { - return cn.toByteArray(Ya(e)); - } - function cr(e, t, r, n) { - let i; - for (i = 0; i < n && !(i + r >= t.length || i >= e.length); ++i) t[i + r] = e[i]; - return i; - } - function de(e, t) { - return ( - e instanceof t || - (e != null && e.constructor != null && e.constructor.name != null && e.constructor.name === t.name) - ); - } - function hn(e) { - return e !== e; - } - var el = (function () { - let e = '0123456789abcdef', - t = new Array(256); - for (let r = 0; r < 16; ++r) { - let n = r * 16; - for (let i = 0; i < 16; ++i) t[n + i] = e[r] + e[i]; - } - return t; - })(); - function Ie(e) { - return typeof BigInt > 'u' ? tl : e; - } - function tl() { - throw new Error('BigInt not supported'); - } -}); -var w, - f = fe(() => { - 'use strict'; - w = Ue(Si()); - }); -function al() { - return !1; -} -function xn() { - return { - dev: 0, - ino: 0, - mode: 0, - nlink: 0, - uid: 0, - gid: 0, - rdev: 0, - size: 0, - blksize: 0, - blocks: 0, - atimeMs: 0, - mtimeMs: 0, - ctimeMs: 0, - birthtimeMs: 0, - atime: new Date(), - mtime: new Date(), - ctime: new Date(), - birthtime: new Date(), - }; -} -function ll() { - return xn(); -} -function ul() { - return []; -} -function cl(e) { - e(null, []); -} -function pl() { - return ''; -} -function ml() { - return ''; -} -function fl() {} -function dl() {} -function gl() {} -function hl() {} -function yl() {} -function wl() {} -function El() {} -function bl() {} -function xl() { - return { close: () => {}, on: () => {}, removeAllListeners: () => {} }; -} -function Pl(e, t) { - t(null, xn()); -} -var vl, - Tl, - Ji, - Qi = fe(() => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); - ((vl = {}), - (Tl = { - existsSync: al, - lstatSync: xn, - stat: Pl, - statSync: ll, - readdirSync: ul, - readdir: cl, - readlinkSync: pl, - realpathSync: ml, - chmodSync: fl, - renameSync: dl, - mkdirSync: gl, - rmdirSync: hl, - rmSync: yl, - unlinkSync: wl, - watchFile: El, - unwatchFile: bl, - watch: xl, - promises: vl, - }), - (Ji = Tl)); - }); -function Al(...e) { - return e.join('/'); -} -function Cl(...e) { - return e.join('/'); -} -function Rl(e) { - let t = Ki(e), - r = Wi(e), - [n, i] = t.split('.'); - return { root: '/', dir: r, base: t, ext: i, name: n }; -} -function Ki(e) { - let t = e.split('/'); - return t[t.length - 1]; -} -function Wi(e) { - return e.split('/').slice(0, -1).join('/'); -} -function Il(e) { - let t = e.split('/').filter((i) => i !== '' && i !== '.'), - r = []; - for (let i of t) i === '..' ? r.pop() : r.push(i); - let n = r.join('/'); - return e.startsWith('/') ? '/' + n : n; -} -var Hi, - Sl, - Ol, - kl, - dr, - zi = fe(() => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); - ((Hi = '/'), (Sl = ':')); - ((Ol = { sep: Hi }), - (kl = { - basename: Ki, - delimiter: Sl, - dirname: Wi, - join: Cl, - normalize: Il, - parse: Rl, - posix: Ol, - resolve: Al, - sep: Hi, - }), - (dr = kl)); - }); -var Yi = Se((vf, Dl) => { - Dl.exports = { - name: '@prisma/internals', - version: '6.14.0', - description: "This package is intended for Prisma's internal use", - main: 'dist/index.js', - types: 'dist/index.d.ts', - repository: { type: 'git', url: 'https://github.com/prisma/prisma.git', directory: 'packages/internals' }, - homepage: 'https://www.prisma.io', - author: 'Tim Suchanek ', - bugs: 'https://github.com/prisma/prisma/issues', - license: 'Apache-2.0', - scripts: { - dev: 'DEV=true tsx helpers/build.ts', - build: 'tsx helpers/build.ts', - test: 'dotenv -e ../../.db.env -- jest --silent', - prepublishOnly: 'pnpm run build', - }, - files: ['README.md', 'dist', '!**/libquery_engine*', '!dist/get-generators/engines/*', 'scripts'], - devDependencies: { - '@babel/helper-validator-identifier': '7.25.9', - '@opentelemetry/api': '1.9.0', - '@swc/core': '1.11.5', - '@swc/jest': '0.2.37', - '@types/babel__helper-validator-identifier': '7.15.2', - '@types/jest': '29.5.14', - '@types/node': '18.19.76', - '@types/resolve': '1.20.6', - archiver: '6.0.2', - 'checkpoint-client': '1.1.33', - 'cli-truncate': '4.0.0', - dotenv: '16.5.0', - empathic: '2.0.0', - esbuild: '0.25.5', - 'escape-string-regexp': '5.0.0', - execa: '5.1.1', - 'fast-glob': '3.3.3', - 'find-up': '7.0.0', - 'fp-ts': '2.16.9', - 'fs-extra': '11.3.0', - 'fs-jetpack': '5.1.0', - 'global-dirs': '4.0.0', - globby: '11.1.0', - 'identifier-regex': '1.0.0', - 'indent-string': '4.0.0', - 'is-windows': '1.0.2', - 'is-wsl': '3.1.0', - jest: '29.7.0', - 'jest-junit': '16.0.0', - kleur: '4.1.5', - 'mock-stdin': '1.0.0', - 'new-github-issue-url': '0.2.1', - 'node-fetch': '3.3.2', - 'npm-packlist': '5.1.3', - open: '7.4.2', - 'p-map': '4.0.0', - resolve: '1.22.10', - 'string-width': '7.2.0', - 'strip-ansi': '6.0.1', - 'strip-indent': '4.0.0', - 'temp-dir': '2.0.0', - tempy: '1.0.1', - 'terminal-link': '4.0.0', - tmp: '0.2.3', - 'ts-node': '10.9.2', - 'ts-pattern': '5.6.2', - 'ts-toolbelt': '9.6.0', - typescript: '5.4.5', - yarn: '1.22.22', - }, - dependencies: { - '@prisma/config': 'workspace:*', - '@prisma/debug': 'workspace:*', - '@prisma/dmmf': 'workspace:*', - '@prisma/driver-adapter-utils': 'workspace:*', - '@prisma/engines': 'workspace:*', - '@prisma/fetch-engine': 'workspace:*', - '@prisma/generator': 'workspace:*', - '@prisma/generator-helper': 'workspace:*', - '@prisma/get-platform': 'workspace:*', - '@prisma/prisma-schema-wasm': '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - '@prisma/schema-engine-wasm': '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - '@prisma/schema-files-loader': 'workspace:*', - arg: '5.0.2', - prompts: '2.4.2', - }, - peerDependencies: { typescript: '>=5.1.0' }, - peerDependenciesMeta: { typescript: { optional: !0 } }, - sideEffects: !1, - }; -}); -var vn = Se((Ff, Fl) => { - Fl.exports = { - name: '@prisma/engines-version', - version: '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - main: 'index.js', - types: 'index.d.ts', - license: 'Apache-2.0', - author: 'Tim Suchanek ', - prisma: { enginesVersion: '717184b7b35ea05dfa71a3236b7af656013e1e49' }, - repository: { - type: 'git', - url: 'https://github.com/prisma/engines-wrapper.git', - directory: 'packages/engines-version', - }, - devDependencies: { '@types/node': '18.19.76', typescript: '4.9.5' }, - files: ['index.js', 'index.d.ts'], - scripts: { build: 'tsc -d' }, - }; -}); -var Zi = Se((gr) => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); - Object.defineProperty(gr, '__esModule', { value: !0 }); - gr.enginesVersion = void 0; - gr.enginesVersion = vn().prisma.enginesVersion; -}); -var to = Se((Hf, eo) => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); - eo.exports = (e, t = 1, r) => { - if (((r = { indent: ' ', includeEmptyLines: !1, ...r }), typeof e != 'string')) - throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``); - if (typeof t != 'number') throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``); - if (typeof r.indent != 'string') - throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``); - if (t === 0) return e; - let n = r.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - return e.replace(n, r.indent.repeat(t)); - }; -}); -var io = Se((ad, no) => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); - no.exports = ({ onlyFirst: e = !1 } = {}) => { - let t = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))', - ].join('|'); - return new RegExp(t, e ? void 0 : 'g'); - }; -}); -var so = Se((fd, oo) => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); - var Vl = io(); - oo.exports = (e) => (typeof e == 'string' ? e.replace(Vl(), '') : e); -}); -var _n = Se((Ky, Co) => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); - Co.exports = (function () { - function e(t, r, n, i, o) { - return t < r || n < r ? (t > n ? n + 1 : t + 1) : i === o ? r : r + 1; - } - return function (t, r) { - if (t === r) return 0; - if (t.length > r.length) { - var n = t; - ((t = r), (r = n)); - } - for (var i = t.length, o = r.length; i > 0 && t.charCodeAt(i - 1) === r.charCodeAt(o - 1); ) (i--, o--); - for (var s = 0; s < i && t.charCodeAt(s) === r.charCodeAt(s); ) s++; - if (((i -= s), (o -= s), i === 0 || o < 3)) return o; - var a = 0, - l, - d, - g, - h, - T, - I, - S, - R, - M, - F, - B, - O, - L = []; - for (l = 0; l < i; l++) (L.push(l + 1), L.push(t.charCodeAt(s + l))); - for (var le = L.length - 1; a < o - 3; ) - for ( - M = r.charCodeAt(s + (d = a)), - F = r.charCodeAt(s + (g = a + 1)), - B = r.charCodeAt(s + (h = a + 2)), - O = r.charCodeAt(s + (T = a + 3)), - I = a += 4, - l = 0; - l < le; - l += 2 - ) - ((S = L[l]), - (R = L[l + 1]), - (d = e(S, d, g, M, R)), - (g = e(d, g, h, F, R)), - (h = e(g, h, T, B, R)), - (I = e(h, T, I, O, R)), - (L[l] = I), - (T = h), - (h = g), - (g = d), - (d = S)); - for (; a < o; ) - for (M = r.charCodeAt(s + (d = a)), I = ++a, l = 0; l < le; l += 2) - ((S = L[l]), (L[l] = I = e(S, d, I, M, L[l + 1])), (d = S)); - return I; - }; - })(); -}); -var ko = fe(() => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); -}); -var Do = fe(() => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); -}); -var Jr, - rs = fe(() => { - 'use strict'; - f(); - u(); - c(); - p(); - m(); - Jr = class { - events = {}; - on(t, r) { - return (this.events[t] || (this.events[t] = []), this.events[t].push(r), this); - } - emit(t, ...r) { - return this.events[t] - ? (this.events[t].forEach((n) => { - n(...r); - }), - !0) - : !1; - } - }; - }); -var _p = {}; -vt(_p, { - DMMF: () => Dt, - Debug: () => z, - Decimal: () => Ae, - Extensions: () => yn, - MetricsClient: () => pt, - PrismaClientInitializationError: () => Q, - PrismaClientKnownRequestError: () => ne, - PrismaClientRustPanicError: () => Pe, - PrismaClientUnknownRequestError: () => ie, - PrismaClientValidationError: () => X, - Public: () => wn, - Sql: () => se, - createParam: () => Wo, - defineDmmfProperty: () => es, - deserializeJsonResponse: () => dt, - deserializeRawResult: () => on, - dmmfToRuntimeDataModel: () => co, - empty: () => is, - getPrismaClient: () => ba, - getRuntime: () => Zr, - join: () => ns, - makeStrictEnum: () => xa, - makeTypedQueryFactory: () => ts, - objectEnumValues: () => Nr, - raw: () => jn, - serializeJsonQuery: () => $r, - skip: () => Vr, - sqltag: () => Gn, - warnEnvConflicts: () => void 0, - warnOnce: () => St, -}); -module.exports = Sa(_p); -f(); -u(); -c(); -p(); -m(); -var yn = {}; -vt(yn, { defineExtension: () => Ii, getExtensionContext: () => Oi }); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -function Ii(e) { - return typeof e == 'function' ? e : (t) => t.$extends(e); -} -f(); -u(); -c(); -p(); -m(); -function Oi(e) { - return e; -} -var wn = {}; -vt(wn, { validator: () => ki }); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -function ki(...e) { - return (t) => t; -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var En, - Di, - Mi, - _i, - Ni = !0; -typeof y < 'u' && - (({ FORCE_COLOR: En, NODE_DISABLE_COLORS: Di, NO_COLOR: Mi, TERM: _i } = y.env || {}), - (Ni = y.stdout && y.stdout.isTTY)); -var rl = { enabled: !Di && Mi == null && _i !== 'dumb' && ((En != null && En !== '0') || Ni) }; -function j(e, t) { - let r = new RegExp(`\\x1b\\[${t}m`, 'g'), - n = `\x1B[${e}m`, - i = `\x1B[${t}m`; - return function (o) { - return !rl.enabled || o == null ? o : n + (~('' + o).indexOf(i) ? o.replace(r, i + n) : o) + i; - }; -} -var Am = j(0, 0), - pr = j(1, 22), - mr = j(2, 22), - Cm = j(3, 23), - Fi = j(4, 24), - Rm = j(7, 27), - Sm = j(8, 28), - Im = j(9, 29), - Om = j(30, 39), - Ye = j(31, 39), - Li = j(32, 39), - Ui = j(33, 39), - Bi = j(34, 39), - km = j(35, 39), - qi = j(36, 39), - Dm = j(37, 39), - Vi = j(90, 39), - Mm = j(90, 39), - _m = j(40, 49), - Nm = j(41, 49), - Fm = j(42, 49), - Lm = j(43, 49), - Um = j(44, 49), - Bm = j(45, 49), - qm = j(46, 49), - Vm = j(47, 49); -f(); -u(); -c(); -p(); -m(); -var nl = 100, - $i = ['green', 'yellow', 'blue', 'magenta', 'cyan', 'red'], - fr = [], - ji = Date.now(), - il = 0, - bn = typeof y < 'u' ? y.env : {}; -globalThis.DEBUG ??= bn.DEBUG ?? ''; -globalThis.DEBUG_COLORS ??= bn.DEBUG_COLORS ? bn.DEBUG_COLORS === 'true' : !0; -var At = { - enable(e) { - typeof e == 'string' && (globalThis.DEBUG = e); - }, - disable() { - let e = globalThis.DEBUG; - return ((globalThis.DEBUG = ''), e); - }, - enabled(e) { - let t = globalThis.DEBUG.split(',').map((i) => i.replace(/[.+?^${}()|[\]\\]/g, '\\$&')), - r = t.some((i) => (i === '' || i[0] === '-' ? !1 : e.match(RegExp(i.split('*').join('.*') + '$')))), - n = t.some((i) => (i === '' || i[0] !== '-' ? !1 : e.match(RegExp(i.slice(1).split('*').join('.*') + '$')))); - return r && !n; - }, - log: (...e) => { - let [t, r, ...n] = e; - (console.warn ?? console.log)(`${t} ${r}`, ...n); - }, - formatters: {}, -}; -function ol(e) { - let t = { color: $i[il++ % $i.length], enabled: At.enabled(e), namespace: e, log: At.log, extend: () => {} }, - r = (...n) => { - let { enabled: i, namespace: o, color: s, log: a } = t; - if ((n.length !== 0 && fr.push([o, ...n]), fr.length > nl && fr.shift(), At.enabled(o) || i)) { - let l = n.map((g) => (typeof g == 'string' ? g : sl(g))), - d = `+${Date.now() - ji}ms`; - ((ji = Date.now()), a(o, ...l, d)); - } - }; - return new Proxy(r, { get: (n, i) => t[i], set: (n, i, o) => (t[i] = o) }); -} -var z = new Proxy(ol, { get: (e, t) => At[t], set: (e, t, r) => (At[t] = r) }); -function sl(e, t = 2) { - let r = new Set(); - return JSON.stringify( - e, - (n, i) => { - if (typeof i == 'object' && i !== null) { - if (r.has(i)) return '[Circular *]'; - r.add(i); - } else if (typeof i == 'bigint') return i.toString(); - return i; - }, - t - ); -} -function Gi() { - fr.length = 0; -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Ml = Yi(), - Pn = Ml.version; -f(); -u(); -c(); -p(); -m(); -function Ze(e) { - let t = _l(); - return ( - t || - (e?.config.engineType === 'library' - ? 'library' - : e?.config.engineType === 'binary' - ? 'binary' - : e?.config.engineType === 'client' - ? 'client' - : Nl(e)) - ); -} -function _l() { - let e = y.env.PRISMA_CLIENT_ENGINE_TYPE; - return e === 'library' ? 'library' : e === 'binary' ? 'binary' : e === 'client' ? 'client' : void 0; -} -function Nl(e) { - return e?.previewFeatures.includes('queryCompiler') ? 'client' : 'library'; -} -f(); -u(); -c(); -p(); -m(); -var Xi = 'prisma+postgres', - hr = `${Xi}:`; -function yr(e) { - return e?.toString().startsWith(`${hr}//`) ?? !1; -} -function Tn(e) { - if (!yr(e)) return !1; - let { host: t } = new URL(e); - return t.includes('localhost') || t.includes('127.0.0.1') || t.includes('[::1]'); -} -var Rt = {}; -vt(Rt, { - error: () => Bl, - info: () => Ul, - log: () => Ll, - query: () => ql, - should: () => ro, - tags: () => Ct, - warn: () => An, -}); -f(); -u(); -c(); -p(); -m(); -var Ct = { error: Ye('prisma:error'), warn: Ui('prisma:warn'), info: qi('prisma:info'), query: Bi('prisma:query') }, - ro = { warn: () => !y.env.PRISMA_DISABLE_WARNINGS }; -function Ll(...e) { - console.log(...e); -} -function An(e, ...t) { - ro.warn() && console.warn(`${Ct.warn} ${e}`, ...t); -} -function Ul(e, ...t) { - console.info(`${Ct.info} ${e}`, ...t); -} -function Bl(e, ...t) { - console.error(`${Ct.error} ${e}`, ...t); -} -function ql(e, ...t) { - console.log(`${Ct.query} ${e}`, ...t); -} -f(); -u(); -c(); -p(); -m(); -function qe(e, t) { - throw new Error(t); -} -f(); -u(); -c(); -p(); -m(); -function Cn(e, t) { - return Object.prototype.hasOwnProperty.call(e, t); -} -f(); -u(); -c(); -p(); -m(); -function wr(e, t) { - let r = {}; - for (let n of Object.keys(e)) r[n] = t(e[n], n); - return r; -} -f(); -u(); -c(); -p(); -m(); -function Rn(e, t) { - if (e.length === 0) return; - let r = e[0]; - for (let n = 1; n < e.length; n++) t(r, e[n]) < 0 && (r = e[n]); - return r; -} -f(); -u(); -c(); -p(); -m(); -function N(e, t) { - Object.defineProperty(e, 'name', { value: t, configurable: !0 }); -} -f(); -u(); -c(); -p(); -m(); -var ao = new Set(), - St = (e, t, ...r) => { - ao.has(e) || (ao.add(e), An(t, ...r)); - }; -var Q = class e extends Error { - clientVersion; - errorCode; - retryable; - constructor(t, r, n) { - (super(t), - (this.name = 'PrismaClientInitializationError'), - (this.clientVersion = r), - (this.errorCode = n), - Error.captureStackTrace(e)); - } - get [Symbol.toStringTag]() { - return 'PrismaClientInitializationError'; - } -}; -N(Q, 'PrismaClientInitializationError'); -f(); -u(); -c(); -p(); -m(); -var ne = class extends Error { - code; - meta; - clientVersion; - batchRequestIdx; - constructor(t, { code: r, clientVersion: n, meta: i, batchRequestIdx: o }) { - (super(t), - (this.name = 'PrismaClientKnownRequestError'), - (this.code = r), - (this.clientVersion = n), - (this.meta = i), - Object.defineProperty(this, 'batchRequestIdx', { value: o, enumerable: !1, writable: !0 })); - } - get [Symbol.toStringTag]() { - return 'PrismaClientKnownRequestError'; - } -}; -N(ne, 'PrismaClientKnownRequestError'); -f(); -u(); -c(); -p(); -m(); -var Pe = class extends Error { - clientVersion; - constructor(t, r) { - (super(t), (this.name = 'PrismaClientRustPanicError'), (this.clientVersion = r)); - } - get [Symbol.toStringTag]() { - return 'PrismaClientRustPanicError'; - } -}; -N(Pe, 'PrismaClientRustPanicError'); -f(); -u(); -c(); -p(); -m(); -var ie = class extends Error { - clientVersion; - batchRequestIdx; - constructor(t, { clientVersion: r, batchRequestIdx: n }) { - (super(t), - (this.name = 'PrismaClientUnknownRequestError'), - (this.clientVersion = r), - Object.defineProperty(this, 'batchRequestIdx', { value: n, writable: !0, enumerable: !1 })); - } - get [Symbol.toStringTag]() { - return 'PrismaClientUnknownRequestError'; - } -}; -N(ie, 'PrismaClientUnknownRequestError'); -f(); -u(); -c(); -p(); -m(); -var X = class extends Error { - name = 'PrismaClientValidationError'; - clientVersion; - constructor(t, { clientVersion: r }) { - (super(t), (this.clientVersion = r)); - } - get [Symbol.toStringTag]() { - return 'PrismaClientValidationError'; - } -}; -N(X, 'PrismaClientValidationError'); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var ge = class { - _map = new Map(); - get(t) { - return this._map.get(t)?.value; - } - set(t, r) { - this._map.set(t, { value: r }); - } - getOrCreate(t, r) { - let n = this._map.get(t); - if (n) return n.value; - let i = r(); - return (this.set(t, i), i); - } -}; -f(); -u(); -c(); -p(); -m(); -function Oe(e) { - return e.substring(0, 1).toLowerCase() + e.substring(1); -} -f(); -u(); -c(); -p(); -m(); -function uo(e, t) { - let r = {}; - for (let n of e) { - let i = n[t]; - r[i] = n; - } - return r; -} -f(); -u(); -c(); -p(); -m(); -function It(e) { - let t; - return { - get() { - return (t || (t = { value: e() }), t.value); - }, - }; -} -f(); -u(); -c(); -p(); -m(); -function co(e) { - return { models: Sn(e.models), enums: Sn(e.enums), types: Sn(e.types) }; -} -function Sn(e) { - let t = {}; - for (let { name: r, ...n } of e) t[r] = n; - return t; -} -f(); -u(); -c(); -p(); -m(); -function Xe(e) { - return e instanceof Date || Object.prototype.toString.call(e) === '[object Date]'; -} -function Er(e) { - return e.toString() !== 'Invalid Date'; -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var et = 9e15, - _e = 1e9, - In = '0123456789abcdef', - Pr = - '2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058', - vr = - '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789', - On = { precision: 20, rounding: 4, modulo: 1, toExpNeg: -7, toExpPos: 21, minE: -et, maxE: et, crypto: !1 }, - go, - ve, - _ = !0, - Ar = '[DecimalError] ', - Me = Ar + 'Invalid argument: ', - ho = Ar + 'Precision limit exceeded', - yo = Ar + 'crypto unavailable', - wo = '[object Decimal]', - ee = Math.floor, - K = Math.pow, - $l = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, - jl = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, - Gl = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, - Eo = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, - pe = 1e7, - D = 7, - Jl = 9007199254740991, - Ql = Pr.length - 1, - kn = vr.length - 1, - C = { toStringTag: wo }; -C.absoluteValue = C.abs = function () { - var e = new this.constructor(this); - return (e.s < 0 && (e.s = 1), k(e)); -}; -C.ceil = function () { - return k(new this.constructor(this), this.e + 1, 2); -}; -C.clampedTo = C.clamp = function (e, t) { - var r, - n = this, - i = n.constructor; - if (((e = new i(e)), (t = new i(t)), !e.s || !t.s)) return new i(NaN); - if (e.gt(t)) throw Error(Me + t); - return ((r = n.cmp(e)), r < 0 ? e : n.cmp(t) > 0 ? t : new i(n)); -}; -C.comparedTo = C.cmp = function (e) { - var t, - r, - n, - i, - o = this, - s = o.d, - a = (e = new o.constructor(e)).d, - l = o.s, - d = e.s; - if (!s || !a) return !l || !d ? NaN : l !== d ? l : s === a ? 0 : !s ^ (l < 0) ? 1 : -1; - if (!s[0] || !a[0]) return s[0] ? l : a[0] ? -d : 0; - if (l !== d) return l; - if (o.e !== e.e) return (o.e > e.e) ^ (l < 0) ? 1 : -1; - for (n = s.length, i = a.length, t = 0, r = n < i ? n : i; t < r; ++t) - if (s[t] !== a[t]) return (s[t] > a[t]) ^ (l < 0) ? 1 : -1; - return n === i ? 0 : (n > i) ^ (l < 0) ? 1 : -1; -}; -C.cosine = C.cos = function () { - var e, - t, - r = this, - n = r.constructor; - return r.d - ? r.d[0] - ? ((e = n.precision), - (t = n.rounding), - (n.precision = e + Math.max(r.e, r.sd()) + D), - (n.rounding = 1), - (r = Kl(n, To(n, r))), - (n.precision = e), - (n.rounding = t), - k(ve == 2 || ve == 3 ? r.neg() : r, e, t, !0)) - : new n(1) - : new n(NaN); -}; -C.cubeRoot = C.cbrt = function () { - var e, - t, - r, - n, - i, - o, - s, - a, - l, - d, - g = this, - h = g.constructor; - if (!g.isFinite() || g.isZero()) return new h(g); - for ( - _ = !1, - o = g.s * K(g.s * g, 1 / 3), - !o || Math.abs(o) == 1 / 0 - ? ((r = Y(g.d)), - (e = g.e), - (o = (e - r.length + 1) % 3) && (r += o == 1 || o == -2 ? '0' : '00'), - (o = K(r, 1 / 3)), - (e = ee((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2))), - o == 1 / 0 ? (r = '5e' + e) : ((r = o.toExponential()), (r = r.slice(0, r.indexOf('e') + 1) + e)), - (n = new h(r)), - (n.s = g.s)) - : (n = new h(o.toString())), - s = (e = h.precision) + 3; - ; - - ) - if ( - ((a = n), - (l = a.times(a).times(a)), - (d = l.plus(g)), - (n = V(d.plus(g).times(a), d.plus(l), s + 2, 1)), - Y(a.d).slice(0, s) === (r = Y(n.d)).slice(0, s)) - ) - if (((r = r.slice(s - 3, s + 1)), r == '9999' || (!i && r == '4999'))) { - if (!i && (k(a, e + 1, 0), a.times(a).times(a).eq(g))) { - n = a; - break; - } - ((s += 4), (i = 1)); - } else { - (!+r || (!+r.slice(1) && r.charAt(0) == '5')) && (k(n, e + 1, 1), (t = !n.times(n).times(n).eq(g))); - break; - } - return ((_ = !0), k(n, e, h.rounding, t)); -}; -C.decimalPlaces = C.dp = function () { - var e, - t = this.d, - r = NaN; - if (t) { - if (((e = t.length - 1), (r = (e - ee(this.e / D)) * D), (e = t[e]), e)) for (; e % 10 == 0; e /= 10) r--; - r < 0 && (r = 0); - } - return r; -}; -C.dividedBy = C.div = function (e) { - return V(this, new this.constructor(e)); -}; -C.dividedToIntegerBy = C.divToInt = function (e) { - var t = this, - r = t.constructor; - return k(V(t, new r(e), 0, 1, 1), r.precision, r.rounding); -}; -C.equals = C.eq = function (e) { - return this.cmp(e) === 0; -}; -C.floor = function () { - return k(new this.constructor(this), this.e + 1, 3); -}; -C.greaterThan = C.gt = function (e) { - return this.cmp(e) > 0; -}; -C.greaterThanOrEqualTo = C.gte = function (e) { - var t = this.cmp(e); - return t == 1 || t === 0; -}; -C.hyperbolicCosine = C.cosh = function () { - var e, - t, - r, - n, - i, - o = this, - s = o.constructor, - a = new s(1); - if (!o.isFinite()) return new s(o.s ? 1 / 0 : NaN); - if (o.isZero()) return a; - ((r = s.precision), - (n = s.rounding), - (s.precision = r + Math.max(o.e, o.sd()) + 4), - (s.rounding = 1), - (i = o.d.length), - i < 32 - ? ((e = Math.ceil(i / 3)), (t = (1 / Rr(4, e)).toString())) - : ((e = 16), (t = '2.3283064365386962890625e-10')), - (o = tt(s, 1, o.times(t), new s(1), !0))); - for (var l, d = e, g = new s(8); d--; ) ((l = o.times(o)), (o = a.minus(l.times(g.minus(l.times(g)))))); - return k(o, (s.precision = r), (s.rounding = n), !0); -}; -C.hyperbolicSine = C.sinh = function () { - var e, - t, - r, - n, - i = this, - o = i.constructor; - if (!i.isFinite() || i.isZero()) return new o(i); - if ( - ((t = o.precision), - (r = o.rounding), - (o.precision = t + Math.max(i.e, i.sd()) + 4), - (o.rounding = 1), - (n = i.d.length), - n < 3) - ) - i = tt(o, 2, i, i, !0); - else { - ((e = 1.4 * Math.sqrt(n)), (e = e > 16 ? 16 : e | 0), (i = i.times(1 / Rr(5, e))), (i = tt(o, 2, i, i, !0))); - for (var s, a = new o(5), l = new o(16), d = new o(20); e--; ) - ((s = i.times(i)), (i = i.times(a.plus(s.times(l.times(s).plus(d)))))); - } - return ((o.precision = t), (o.rounding = r), k(i, t, r, !0)); -}; -C.hyperbolicTangent = C.tanh = function () { - var e, - t, - r = this, - n = r.constructor; - return r.isFinite() - ? r.isZero() - ? new n(r) - : ((e = n.precision), - (t = n.rounding), - (n.precision = e + 7), - (n.rounding = 1), - V(r.sinh(), r.cosh(), (n.precision = e), (n.rounding = t))) - : new n(r.s); -}; -C.inverseCosine = C.acos = function () { - var e = this, - t = e.constructor, - r = e.abs().cmp(1), - n = t.precision, - i = t.rounding; - return r !== -1 - ? r === 0 - ? e.isNeg() - ? he(t, n, i) - : new t(0) - : new t(NaN) - : e.isZero() - ? he(t, n + 4, i).times(0.5) - : ((t.precision = n + 6), - (t.rounding = 1), - (e = new t(1).minus(e).div(e.plus(1)).sqrt().atan()), - (t.precision = n), - (t.rounding = i), - e.times(2)); -}; -C.inverseHyperbolicCosine = C.acosh = function () { - var e, - t, - r = this, - n = r.constructor; - return r.lte(1) - ? new n(r.eq(1) ? 0 : NaN) - : r.isFinite() - ? ((e = n.precision), - (t = n.rounding), - (n.precision = e + Math.max(Math.abs(r.e), r.sd()) + 4), - (n.rounding = 1), - (_ = !1), - (r = r.times(r).minus(1).sqrt().plus(r)), - (_ = !0), - (n.precision = e), - (n.rounding = t), - r.ln()) - : new n(r); -}; -C.inverseHyperbolicSine = C.asinh = function () { - var e, - t, - r = this, - n = r.constructor; - return !r.isFinite() || r.isZero() - ? new n(r) - : ((e = n.precision), - (t = n.rounding), - (n.precision = e + 2 * Math.max(Math.abs(r.e), r.sd()) + 6), - (n.rounding = 1), - (_ = !1), - (r = r.times(r).plus(1).sqrt().plus(r)), - (_ = !0), - (n.precision = e), - (n.rounding = t), - r.ln()); -}; -C.inverseHyperbolicTangent = C.atanh = function () { - var e, - t, - r, - n, - i = this, - o = i.constructor; - return i.isFinite() - ? i.e >= 0 - ? new o(i.abs().eq(1) ? i.s / 0 : i.isZero() ? i : NaN) - : ((e = o.precision), - (t = o.rounding), - (n = i.sd()), - Math.max(n, e) < 2 * -i.e - 1 - ? k(new o(i), e, t, !0) - : ((o.precision = r = n - i.e), - (i = V(i.plus(1), new o(1).minus(i), r + e, 1)), - (o.precision = e + 4), - (o.rounding = 1), - (i = i.ln()), - (o.precision = e), - (o.rounding = t), - i.times(0.5))) - : new o(NaN); -}; -C.inverseSine = C.asin = function () { - var e, - t, - r, - n, - i = this, - o = i.constructor; - return i.isZero() - ? new o(i) - : ((t = i.abs().cmp(1)), - (r = o.precision), - (n = o.rounding), - t !== -1 - ? t === 0 - ? ((e = he(o, r + 4, n).times(0.5)), (e.s = i.s), e) - : new o(NaN) - : ((o.precision = r + 6), - (o.rounding = 1), - (i = i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan()), - (o.precision = r), - (o.rounding = n), - i.times(2))); -}; -C.inverseTangent = C.atan = function () { - var e, - t, - r, - n, - i, - o, - s, - a, - l, - d = this, - g = d.constructor, - h = g.precision, - T = g.rounding; - if (d.isFinite()) { - if (d.isZero()) return new g(d); - if (d.abs().eq(1) && h + 4 <= kn) return ((s = he(g, h + 4, T).times(0.25)), (s.s = d.s), s); - } else { - if (!d.s) return new g(NaN); - if (h + 4 <= kn) return ((s = he(g, h + 4, T).times(0.5)), (s.s = d.s), s); - } - for (g.precision = a = h + 10, g.rounding = 1, r = Math.min(28, (a / D + 2) | 0), e = r; e; --e) - d = d.div(d.times(d).plus(1).sqrt().plus(1)); - for (_ = !1, t = Math.ceil(a / D), n = 1, l = d.times(d), s = new g(d), i = d; e !== -1; ) - if ( - ((i = i.times(l)), - (o = s.minus(i.div((n += 2)))), - (i = i.times(l)), - (s = o.plus(i.div((n += 2)))), - s.d[t] !== void 0) - ) - for (e = t; s.d[e] === o.d[e] && e--; ); - return (r && (s = s.times(2 << (r - 1))), (_ = !0), k(s, (g.precision = h), (g.rounding = T), !0)); -}; -C.isFinite = function () { - return !!this.d; -}; -C.isInteger = C.isInt = function () { - return !!this.d && ee(this.e / D) > this.d.length - 2; -}; -C.isNaN = function () { - return !this.s; -}; -C.isNegative = C.isNeg = function () { - return this.s < 0; -}; -C.isPositive = C.isPos = function () { - return this.s > 0; -}; -C.isZero = function () { - return !!this.d && this.d[0] === 0; -}; -C.lessThan = C.lt = function (e) { - return this.cmp(e) < 0; -}; -C.lessThanOrEqualTo = C.lte = function (e) { - return this.cmp(e) < 1; -}; -C.logarithm = C.log = function (e) { - var t, - r, - n, - i, - o, - s, - a, - l, - d = this, - g = d.constructor, - h = g.precision, - T = g.rounding, - I = 5; - if (e == null) ((e = new g(10)), (t = !0)); - else { - if (((e = new g(e)), (r = e.d), e.s < 0 || !r || !r[0] || e.eq(1))) return new g(NaN); - t = e.eq(10); - } - if (((r = d.d), d.s < 0 || !r || !r[0] || d.eq(1))) - return new g(r && !r[0] ? -1 / 0 : d.s != 1 ? NaN : r ? 0 : 1 / 0); - if (t) - if (r.length > 1) o = !0; - else { - for (i = r[0]; i % 10 === 0; ) i /= 10; - o = i !== 1; - } - if ( - ((_ = !1), - (a = h + I), - (s = De(d, a)), - (n = t ? Tr(g, a + 10) : De(e, a)), - (l = V(s, n, a, 1)), - Ot(l.d, (i = h), T)) - ) - do - if (((a += 10), (s = De(d, a)), (n = t ? Tr(g, a + 10) : De(e, a)), (l = V(s, n, a, 1)), !o)) { - +Y(l.d).slice(i + 1, i + 15) + 1 == 1e14 && (l = k(l, h + 1, 0)); - break; - } - while (Ot(l.d, (i += 10), T)); - return ((_ = !0), k(l, h, T)); -}; -C.minus = C.sub = function (e) { - var t, - r, - n, - i, - o, - s, - a, - l, - d, - g, - h, - T, - I = this, - S = I.constructor; - if (((e = new S(e)), !I.d || !e.d)) - return (!I.s || !e.s ? (e = new S(NaN)) : I.d ? (e.s = -e.s) : (e = new S(e.d || I.s !== e.s ? I : NaN)), e); - if (I.s != e.s) return ((e.s = -e.s), I.plus(e)); - if (((d = I.d), (T = e.d), (a = S.precision), (l = S.rounding), !d[0] || !T[0])) { - if (T[0]) e.s = -e.s; - else if (d[0]) e = new S(I); - else return new S(l === 3 ? -0 : 0); - return _ ? k(e, a, l) : e; - } - if (((r = ee(e.e / D)), (g = ee(I.e / D)), (d = d.slice()), (o = g - r), o)) { - for ( - h = o < 0, - h ? ((t = d), (o = -o), (s = T.length)) : ((t = T), (r = g), (s = d.length)), - n = Math.max(Math.ceil(a / D), s) + 2, - o > n && ((o = n), (t.length = 1)), - t.reverse(), - n = o; - n--; - - ) - t.push(0); - t.reverse(); - } else { - for (n = d.length, s = T.length, h = n < s, h && (s = n), n = 0; n < s; n++) - if (d[n] != T[n]) { - h = d[n] < T[n]; - break; - } - o = 0; - } - for (h && ((t = d), (d = T), (T = t), (e.s = -e.s)), s = d.length, n = T.length - s; n > 0; --n) d[s++] = 0; - for (n = T.length; n > o; ) { - if (d[--n] < T[n]) { - for (i = n; i && d[--i] === 0; ) d[i] = pe - 1; - (--d[i], (d[n] += pe)); - } - d[n] -= T[n]; - } - for (; d[--s] === 0; ) d.pop(); - for (; d[0] === 0; d.shift()) --r; - return d[0] ? ((e.d = d), (e.e = Cr(d, r)), _ ? k(e, a, l) : e) : new S(l === 3 ? -0 : 0); -}; -C.modulo = C.mod = function (e) { - var t, - r = this, - n = r.constructor; - return ( - (e = new n(e)), - !r.d || !e.s || (e.d && !e.d[0]) - ? new n(NaN) - : !e.d || (r.d && !r.d[0]) - ? k(new n(r), n.precision, n.rounding) - : ((_ = !1), - n.modulo == 9 ? ((t = V(r, e.abs(), 0, 3, 1)), (t.s *= e.s)) : (t = V(r, e, 0, n.modulo, 1)), - (t = t.times(e)), - (_ = !0), - r.minus(t)) - ); -}; -C.naturalExponential = C.exp = function () { - return Dn(this); -}; -C.naturalLogarithm = C.ln = function () { - return De(this); -}; -C.negated = C.neg = function () { - var e = new this.constructor(this); - return ((e.s = -e.s), k(e)); -}; -C.plus = C.add = function (e) { - var t, - r, - n, - i, - o, - s, - a, - l, - d, - g, - h = this, - T = h.constructor; - if (((e = new T(e)), !h.d || !e.d)) - return (!h.s || !e.s ? (e = new T(NaN)) : h.d || (e = new T(e.d || h.s === e.s ? h : NaN)), e); - if (h.s != e.s) return ((e.s = -e.s), h.minus(e)); - if (((d = h.d), (g = e.d), (a = T.precision), (l = T.rounding), !d[0] || !g[0])) - return (g[0] || (e = new T(h)), _ ? k(e, a, l) : e); - if (((o = ee(h.e / D)), (n = ee(e.e / D)), (d = d.slice()), (i = o - n), i)) { - for ( - i < 0 ? ((r = d), (i = -i), (s = g.length)) : ((r = g), (n = o), (s = d.length)), - o = Math.ceil(a / D), - s = o > s ? o + 1 : s + 1, - i > s && ((i = s), (r.length = 1)), - r.reverse(); - i--; - - ) - r.push(0); - r.reverse(); - } - for (s = d.length, i = g.length, s - i < 0 && ((i = s), (r = g), (g = d), (d = r)), t = 0; i; ) - ((t = ((d[--i] = d[i] + g[i] + t) / pe) | 0), (d[i] %= pe)); - for (t && (d.unshift(t), ++n), s = d.length; d[--s] == 0; ) d.pop(); - return ((e.d = d), (e.e = Cr(d, n)), _ ? k(e, a, l) : e); -}; -C.precision = C.sd = function (e) { - var t, - r = this; - if (e !== void 0 && e !== !!e && e !== 1 && e !== 0) throw Error(Me + e); - return (r.d ? ((t = bo(r.d)), e && r.e + 1 > t && (t = r.e + 1)) : (t = NaN), t); -}; -C.round = function () { - var e = this, - t = e.constructor; - return k(new t(e), e.e + 1, t.rounding); -}; -C.sine = C.sin = function () { - var e, - t, - r = this, - n = r.constructor; - return r.isFinite() - ? r.isZero() - ? new n(r) - : ((e = n.precision), - (t = n.rounding), - (n.precision = e + Math.max(r.e, r.sd()) + D), - (n.rounding = 1), - (r = Hl(n, To(n, r))), - (n.precision = e), - (n.rounding = t), - k(ve > 2 ? r.neg() : r, e, t, !0)) - : new n(NaN); -}; -C.squareRoot = C.sqrt = function () { - var e, - t, - r, - n, - i, - o, - s = this, - a = s.d, - l = s.e, - d = s.s, - g = s.constructor; - if (d !== 1 || !a || !a[0]) return new g(!d || (d < 0 && (!a || a[0])) ? NaN : a ? s : 1 / 0); - for ( - _ = !1, - d = Math.sqrt(+s), - d == 0 || d == 1 / 0 - ? ((t = Y(a)), - (t.length + l) % 2 == 0 && (t += '0'), - (d = Math.sqrt(t)), - (l = ee((l + 1) / 2) - (l < 0 || l % 2)), - d == 1 / 0 ? (t = '5e' + l) : ((t = d.toExponential()), (t = t.slice(0, t.indexOf('e') + 1) + l)), - (n = new g(t))) - : (n = new g(d.toString())), - r = (l = g.precision) + 3; - ; - - ) - if (((o = n), (n = o.plus(V(s, o, r + 2, 1)).times(0.5)), Y(o.d).slice(0, r) === (t = Y(n.d)).slice(0, r))) - if (((t = t.slice(r - 3, r + 1)), t == '9999' || (!i && t == '4999'))) { - if (!i && (k(o, l + 1, 0), o.times(o).eq(s))) { - n = o; - break; - } - ((r += 4), (i = 1)); - } else { - (!+t || (!+t.slice(1) && t.charAt(0) == '5')) && (k(n, l + 1, 1), (e = !n.times(n).eq(s))); - break; - } - return ((_ = !0), k(n, l, g.rounding, e)); -}; -C.tangent = C.tan = function () { - var e, - t, - r = this, - n = r.constructor; - return r.isFinite() - ? r.isZero() - ? new n(r) - : ((e = n.precision), - (t = n.rounding), - (n.precision = e + 10), - (n.rounding = 1), - (r = r.sin()), - (r.s = 1), - (r = V(r, new n(1).minus(r.times(r)).sqrt(), e + 10, 0)), - (n.precision = e), - (n.rounding = t), - k(ve == 2 || ve == 4 ? r.neg() : r, e, t, !0)) - : new n(NaN); -}; -C.times = C.mul = function (e) { - var t, - r, - n, - i, - o, - s, - a, - l, - d, - g = this, - h = g.constructor, - T = g.d, - I = (e = new h(e)).d; - if (((e.s *= g.s), !T || !T[0] || !I || !I[0])) - return new h(!e.s || (T && !T[0] && !I) || (I && !I[0] && !T) ? NaN : !T || !I ? e.s / 0 : e.s * 0); - for ( - r = ee(g.e / D) + ee(e.e / D), - l = T.length, - d = I.length, - l < d && ((o = T), (T = I), (I = o), (s = l), (l = d), (d = s)), - o = [], - s = l + d, - n = s; - n--; - - ) - o.push(0); - for (n = d; --n >= 0; ) { - for (t = 0, i = l + n; i > n; ) ((a = o[i] + I[n] * T[i - n - 1] + t), (o[i--] = a % pe | 0), (t = (a / pe) | 0)); - o[i] = (o[i] + t) % pe | 0; - } - for (; !o[--s]; ) o.pop(); - return (t ? ++r : o.shift(), (e.d = o), (e.e = Cr(o, r)), _ ? k(e, h.precision, h.rounding) : e); -}; -C.toBinary = function (e, t) { - return Mn(this, 2, e, t); -}; -C.toDecimalPlaces = C.toDP = function (e, t) { - var r = this, - n = r.constructor; - return ( - (r = new n(r)), - e === void 0 ? r : (oe(e, 0, _e), t === void 0 ? (t = n.rounding) : oe(t, 0, 8), k(r, e + r.e + 1, t)) - ); -}; -C.toExponential = function (e, t) { - var r, - n = this, - i = n.constructor; - return ( - e === void 0 - ? (r = ye(n, !0)) - : (oe(e, 0, _e), - t === void 0 ? (t = i.rounding) : oe(t, 0, 8), - (n = k(new i(n), e + 1, t)), - (r = ye(n, !0, e + 1))), - n.isNeg() && !n.isZero() ? '-' + r : r - ); -}; -C.toFixed = function (e, t) { - var r, - n, - i = this, - o = i.constructor; - return ( - e === void 0 - ? (r = ye(i)) - : (oe(e, 0, _e), - t === void 0 ? (t = o.rounding) : oe(t, 0, 8), - (n = k(new o(i), e + i.e + 1, t)), - (r = ye(n, !1, e + n.e + 1))), - i.isNeg() && !i.isZero() ? '-' + r : r - ); -}; -C.toFraction = function (e) { - var t, - r, - n, - i, - o, - s, - a, - l, - d, - g, - h, - T, - I = this, - S = I.d, - R = I.constructor; - if (!S) return new R(I); - if ( - ((d = r = new R(1)), - (n = l = new R(0)), - (t = new R(n)), - (o = t.e = bo(S) - I.e - 1), - (s = o % D), - (t.d[0] = K(10, s < 0 ? D + s : s)), - e == null) - ) - e = o > 0 ? t : d; - else { - if (((a = new R(e)), !a.isInt() || a.lt(d))) throw Error(Me + a); - e = a.gt(t) ? (o > 0 ? t : d) : a; - } - for ( - _ = !1, a = new R(Y(S)), g = R.precision, R.precision = o = S.length * D * 2; - (h = V(a, t, 0, 1, 1)), (i = r.plus(h.times(n))), i.cmp(e) != 1; - - ) - ((r = n), (n = i), (i = d), (d = l.plus(h.times(i))), (l = i), (i = t), (t = a.minus(h.times(i))), (a = i)); - return ( - (i = V(e.minus(r), n, 0, 1, 1)), - (l = l.plus(i.times(d))), - (r = r.plus(i.times(n))), - (l.s = d.s = I.s), - (T = - V(d, n, o, 1) - .minus(I) - .abs() - .cmp(V(l, r, o, 1).minus(I).abs()) < 1 - ? [d, n] - : [l, r]), - (R.precision = g), - (_ = !0), - T - ); -}; -C.toHexadecimal = C.toHex = function (e, t) { - return Mn(this, 16, e, t); -}; -C.toNearest = function (e, t) { - var r = this, - n = r.constructor; - if (((r = new n(r)), e == null)) { - if (!r.d) return r; - ((e = new n(1)), (t = n.rounding)); - } else { - if (((e = new n(e)), t === void 0 ? (t = n.rounding) : oe(t, 0, 8), !r.d)) return e.s ? r : e; - if (!e.d) return (e.s && (e.s = r.s), e); - } - return (e.d[0] ? ((_ = !1), (r = V(r, e, 0, t, 1).times(e)), (_ = !0), k(r)) : ((e.s = r.s), (r = e)), r); -}; -C.toNumber = function () { - return +this; -}; -C.toOctal = function (e, t) { - return Mn(this, 8, e, t); -}; -C.toPower = C.pow = function (e) { - var t, - r, - n, - i, - o, - s, - a = this, - l = a.constructor, - d = +(e = new l(e)); - if (!a.d || !e.d || !a.d[0] || !e.d[0]) return new l(K(+a, d)); - if (((a = new l(a)), a.eq(1))) return a; - if (((n = l.precision), (o = l.rounding), e.eq(1))) return k(a, n, o); - if (((t = ee(e.e / D)), t >= e.d.length - 1 && (r = d < 0 ? -d : d) <= Jl)) - return ((i = xo(l, a, r, n)), e.s < 0 ? new l(1).div(i) : k(i, n, o)); - if (((s = a.s), s < 0)) { - if (t < e.d.length - 1) return new l(NaN); - if (((e.d[t] & 1) == 0 && (s = 1), a.e == 0 && a.d[0] == 1 && a.d.length == 1)) return ((a.s = s), a); - } - return ( - (r = K(+a, d)), - (t = r == 0 || !isFinite(r) ? ee(d * (Math.log('0.' + Y(a.d)) / Math.LN10 + a.e + 1)) : new l(r + '').e), - t > l.maxE + 1 || t < l.minE - 1 - ? new l(t > 0 ? s / 0 : 0) - : ((_ = !1), - (l.rounding = a.s = 1), - (r = Math.min(12, (t + '').length)), - (i = Dn(e.times(De(a, n + r)), n)), - i.d && - ((i = k(i, n + 5, 1)), - Ot(i.d, n, o) && - ((t = n + 10), - (i = k(Dn(e.times(De(a, t + r)), t), t + 5, 1)), - +Y(i.d).slice(n + 1, n + 15) + 1 == 1e14 && (i = k(i, n + 1, 0)))), - (i.s = s), - (_ = !0), - (l.rounding = o), - k(i, n, o)) - ); -}; -C.toPrecision = function (e, t) { - var r, - n = this, - i = n.constructor; - return ( - e === void 0 - ? (r = ye(n, n.e <= i.toExpNeg || n.e >= i.toExpPos)) - : (oe(e, 1, _e), - t === void 0 ? (t = i.rounding) : oe(t, 0, 8), - (n = k(new i(n), e, t)), - (r = ye(n, e <= n.e || n.e <= i.toExpNeg, e))), - n.isNeg() && !n.isZero() ? '-' + r : r - ); -}; -C.toSignificantDigits = C.toSD = function (e, t) { - var r = this, - n = r.constructor; - return ( - e === void 0 - ? ((e = n.precision), (t = n.rounding)) - : (oe(e, 1, _e), t === void 0 ? (t = n.rounding) : oe(t, 0, 8)), - k(new n(r), e, t) - ); -}; -C.toString = function () { - var e = this, - t = e.constructor, - r = ye(e, e.e <= t.toExpNeg || e.e >= t.toExpPos); - return e.isNeg() && !e.isZero() ? '-' + r : r; -}; -C.truncated = C.trunc = function () { - return k(new this.constructor(this), this.e + 1, 1); -}; -C.valueOf = C.toJSON = function () { - var e = this, - t = e.constructor, - r = ye(e, e.e <= t.toExpNeg || e.e >= t.toExpPos); - return e.isNeg() ? '-' + r : r; -}; -function Y(e) { - var t, - r, - n, - i = e.length - 1, - o = '', - s = e[0]; - if (i > 0) { - for (o += s, t = 1; t < i; t++) ((n = e[t] + ''), (r = D - n.length), r && (o += ke(r)), (o += n)); - ((s = e[t]), (n = s + ''), (r = D - n.length), r && (o += ke(r))); - } else if (s === 0) return '0'; - for (; s % 10 === 0; ) s /= 10; - return o + s; -} -function oe(e, t, r) { - if (e !== ~~e || e < t || e > r) throw Error(Me + e); -} -function Ot(e, t, r, n) { - var i, o, s, a; - for (o = e[0]; o >= 10; o /= 10) --t; - return ( - --t < 0 ? ((t += D), (i = 0)) : ((i = Math.ceil((t + 1) / D)), (t %= D)), - (o = K(10, D - t)), - (a = e[i] % o | 0), - n == null - ? t < 3 - ? (t == 0 ? (a = (a / 100) | 0) : t == 1 && (a = (a / 10) | 0), - (s = (r < 4 && a == 99999) || (r > 3 && a == 49999) || a == 5e4 || a == 0)) - : (s = - (((r < 4 && a + 1 == o) || (r > 3 && a + 1 == o / 2)) && ((e[i + 1] / o / 100) | 0) == K(10, t - 2) - 1) || - ((a == o / 2 || a == 0) && ((e[i + 1] / o / 100) | 0) == 0)) - : t < 4 - ? (t == 0 ? (a = (a / 1e3) | 0) : t == 1 ? (a = (a / 100) | 0) : t == 2 && (a = (a / 10) | 0), - (s = ((n || r < 4) && a == 9999) || (!n && r > 3 && a == 4999))) - : (s = - (((n || r < 4) && a + 1 == o) || (!n && r > 3 && a + 1 == o / 2)) && - ((e[i + 1] / o / 1e3) | 0) == K(10, t - 3) - 1), - s - ); -} -function br(e, t, r) { - for (var n, i = [0], o, s = 0, a = e.length; s < a; ) { - for (o = i.length; o--; ) i[o] *= t; - for (i[0] += In.indexOf(e.charAt(s++)), n = 0; n < i.length; n++) - i[n] > r - 1 && (i[n + 1] === void 0 && (i[n + 1] = 0), (i[n + 1] += (i[n] / r) | 0), (i[n] %= r)); - } - return i.reverse(); -} -function Kl(e, t) { - var r, n, i; - if (t.isZero()) return t; - ((n = t.d.length), - n < 32 - ? ((r = Math.ceil(n / 3)), (i = (1 / Rr(4, r)).toString())) - : ((r = 16), (i = '2.3283064365386962890625e-10')), - (e.precision += r), - (t = tt(e, 1, t.times(i), new e(1)))); - for (var o = r; o--; ) { - var s = t.times(t); - t = s.times(s).minus(s).times(8).plus(1); - } - return ((e.precision -= r), t); -} -var V = (function () { - function e(n, i, o) { - var s, - a = 0, - l = n.length; - for (n = n.slice(); l--; ) ((s = n[l] * i + a), (n[l] = s % o | 0), (a = (s / o) | 0)); - return (a && n.unshift(a), n); - } - function t(n, i, o, s) { - var a, l; - if (o != s) l = o > s ? 1 : -1; - else - for (a = l = 0; a < o; a++) - if (n[a] != i[a]) { - l = n[a] > i[a] ? 1 : -1; - break; - } - return l; - } - function r(n, i, o, s) { - for (var a = 0; o--; ) ((n[o] -= a), (a = n[o] < i[o] ? 1 : 0), (n[o] = a * s + n[o] - i[o])); - for (; !n[0] && n.length > 1; ) n.shift(); - } - return function (n, i, o, s, a, l) { - var d, - g, - h, - T, - I, - S, - R, - M, - F, - B, - O, - L, - le, - J, - an, - or, - Pt, - ln, - ce, - sr, - ar = n.constructor, - un = n.s == i.s ? 1 : -1, - Z = n.d, - $ = i.d; - if (!Z || !Z[0] || !$ || !$[0]) - return new ar(!n.s || !i.s || (Z ? $ && Z[0] == $[0] : !$) ? NaN : (Z && Z[0] == 0) || !$ ? un * 0 : un / 0); - for ( - l ? ((I = 1), (g = n.e - i.e)) : ((l = pe), (I = D), (g = ee(n.e / I) - ee(i.e / I))), - ce = $.length, - Pt = Z.length, - F = new ar(un), - B = F.d = [], - h = 0; - $[h] == (Z[h] || 0); - h++ - ); - if ( - ($[h] > (Z[h] || 0) && g--, - o == null ? ((J = o = ar.precision), (s = ar.rounding)) : a ? (J = o + (n.e - i.e) + 1) : (J = o), - J < 0) - ) - (B.push(1), (S = !0)); - else { - if (((J = (J / I + 2) | 0), (h = 0), ce == 1)) { - for (T = 0, $ = $[0], J++; (h < Pt || T) && J--; h++) - ((an = T * l + (Z[h] || 0)), (B[h] = (an / $) | 0), (T = an % $ | 0)); - S = T || h < Pt; - } else { - for ( - T = (l / ($[0] + 1)) | 0, - T > 1 && (($ = e($, T, l)), (Z = e(Z, T, l)), (ce = $.length), (Pt = Z.length)), - or = ce, - O = Z.slice(0, ce), - L = O.length; - L < ce; - - ) - O[L++] = 0; - ((sr = $.slice()), sr.unshift(0), (ln = $[0]), $[1] >= l / 2 && ++ln); - do - ((T = 0), - (d = t($, O, ce, L)), - d < 0 - ? ((le = O[0]), - ce != L && (le = le * l + (O[1] || 0)), - (T = (le / ln) | 0), - T > 1 - ? (T >= l && (T = l - 1), - (R = e($, T, l)), - (M = R.length), - (L = O.length), - (d = t(R, O, M, L)), - d == 1 && (T--, r(R, ce < M ? sr : $, M, l))) - : (T == 0 && (d = T = 1), (R = $.slice())), - (M = R.length), - M < L && R.unshift(0), - r(O, R, L, l), - d == -1 && ((L = O.length), (d = t($, O, ce, L)), d < 1 && (T++, r(O, ce < L ? sr : $, L, l))), - (L = O.length)) - : d === 0 && (T++, (O = [0])), - (B[h++] = T), - d && O[0] ? (O[L++] = Z[or] || 0) : ((O = [Z[or]]), (L = 1))); - while ((or++ < Pt || O[0] !== void 0) && J--); - S = O[0] !== void 0; - } - B[0] || B.shift(); - } - if (I == 1) ((F.e = g), (go = S)); - else { - for (h = 1, T = B[0]; T >= 10; T /= 10) h++; - ((F.e = h + g * I - 1), k(F, a ? o + F.e + 1 : o, s, S)); - } - return F; - }; -})(); -function k(e, t, r, n) { - var i, - o, - s, - a, - l, - d, - g, - h, - T, - I = e.constructor; - e: if (t != null) { - if (((h = e.d), !h)) return e; - for (i = 1, a = h[0]; a >= 10; a /= 10) i++; - if (((o = t - i), o < 0)) ((o += D), (s = t), (g = h[(T = 0)]), (l = (g / K(10, i - s - 1)) % 10 | 0)); - else if (((T = Math.ceil((o + 1) / D)), (a = h.length), T >= a)) - if (n) { - for (; a++ <= T; ) h.push(0); - ((g = l = 0), (i = 1), (o %= D), (s = o - D + 1)); - } else break e; - else { - for (g = a = h[T], i = 1; a >= 10; a /= 10) i++; - ((o %= D), (s = o - D + i), (l = s < 0 ? 0 : (g / K(10, i - s - 1)) % 10 | 0)); - } - if ( - ((n = n || t < 0 || h[T + 1] !== void 0 || (s < 0 ? g : g % K(10, i - s - 1))), - (d = - r < 4 - ? (l || n) && (r == 0 || r == (e.s < 0 ? 3 : 2)) - : l > 5 || - (l == 5 && - (r == 4 || - n || - (r == 6 && (o > 0 ? (s > 0 ? g / K(10, i - s) : 0) : h[T - 1]) % 10 & 1) || - r == (e.s < 0 ? 8 : 7)))), - t < 1 || !h[0]) - ) - return ( - (h.length = 0), - d ? ((t -= e.e + 1), (h[0] = K(10, (D - (t % D)) % D)), (e.e = -t || 0)) : (h[0] = e.e = 0), - e - ); - if ( - (o == 0 - ? ((h.length = T), (a = 1), T--) - : ((h.length = T + 1), (a = K(10, D - o)), (h[T] = s > 0 ? ((g / K(10, i - s)) % K(10, s) | 0) * a : 0)), - d) - ) - for (;;) - if (T == 0) { - for (o = 1, s = h[0]; s >= 10; s /= 10) o++; - for (s = h[0] += a, a = 1; s >= 10; s /= 10) a++; - o != a && (e.e++, h[0] == pe && (h[0] = 1)); - break; - } else { - if (((h[T] += a), h[T] != pe)) break; - ((h[T--] = 0), (a = 1)); - } - for (o = h.length; h[--o] === 0; ) h.pop(); - } - return (_ && (e.e > I.maxE ? ((e.d = null), (e.e = NaN)) : e.e < I.minE && ((e.e = 0), (e.d = [0]))), e); -} -function ye(e, t, r) { - if (!e.isFinite()) return vo(e); - var n, - i = e.e, - o = Y(e.d), - s = o.length; - return ( - t - ? (r && (n = r - s) > 0 - ? (o = o.charAt(0) + '.' + o.slice(1) + ke(n)) - : s > 1 && (o = o.charAt(0) + '.' + o.slice(1)), - (o = o + (e.e < 0 ? 'e' : 'e+') + e.e)) - : i < 0 - ? ((o = '0.' + ke(-i - 1) + o), r && (n = r - s) > 0 && (o += ke(n))) - : i >= s - ? ((o += ke(i + 1 - s)), r && (n = r - i - 1) > 0 && (o = o + '.' + ke(n))) - : ((n = i + 1) < s && (o = o.slice(0, n) + '.' + o.slice(n)), - r && (n = r - s) > 0 && (i + 1 === s && (o += '.'), (o += ke(n)))), - o - ); -} -function Cr(e, t) { - var r = e[0]; - for (t *= D; r >= 10; r /= 10) t++; - return t; -} -function Tr(e, t, r) { - if (t > Ql) throw ((_ = !0), r && (e.precision = r), Error(ho)); - return k(new e(Pr), t, 1, !0); -} -function he(e, t, r) { - if (t > kn) throw Error(ho); - return k(new e(vr), t, r, !0); -} -function bo(e) { - var t = e.length - 1, - r = t * D + 1; - if (((t = e[t]), t)) { - for (; t % 10 == 0; t /= 10) r--; - for (t = e[0]; t >= 10; t /= 10) r++; - } - return r; -} -function ke(e) { - for (var t = ''; e--; ) t += '0'; - return t; -} -function xo(e, t, r, n) { - var i, - o = new e(1), - s = Math.ceil(n / D + 4); - for (_ = !1; ; ) { - if ((r % 2 && ((o = o.times(t)), mo(o.d, s) && (i = !0)), (r = ee(r / 2)), r === 0)) { - ((r = o.d.length - 1), i && o.d[r] === 0 && ++o.d[r]); - break; - } - ((t = t.times(t)), mo(t.d, s)); - } - return ((_ = !0), o); -} -function po(e) { - return e.d[e.d.length - 1] & 1; -} -function Po(e, t, r) { - for (var n, i, o = new e(t[0]), s = 0; ++s < t.length; ) { - if (((i = new e(t[s])), !i.s)) { - o = i; - break; - } - ((n = o.cmp(i)), (n === r || (n === 0 && o.s === r)) && (o = i)); - } - return o; -} -function Dn(e, t) { - var r, - n, - i, - o, - s, - a, - l, - d = 0, - g = 0, - h = 0, - T = e.constructor, - I = T.rounding, - S = T.precision; - if (!e.d || !e.d[0] || e.e > 17) - return new T(e.d ? (e.d[0] ? (e.s < 0 ? 0 : 1 / 0) : 1) : e.s ? (e.s < 0 ? 0 : e) : NaN); - for (t == null ? ((_ = !1), (l = S)) : (l = t), a = new T(0.03125); e.e > -2; ) ((e = e.times(a)), (h += 5)); - for (n = ((Math.log(K(2, h)) / Math.LN10) * 2 + 5) | 0, l += n, r = o = s = new T(1), T.precision = l; ; ) { - if ( - ((o = k(o.times(e), l, 1)), - (r = r.times(++g)), - (a = s.plus(V(o, r, l, 1))), - Y(a.d).slice(0, l) === Y(s.d).slice(0, l)) - ) { - for (i = h; i--; ) s = k(s.times(s), l, 1); - if (t == null) - if (d < 3 && Ot(s.d, l - n, I, d)) ((T.precision = l += 10), (r = o = a = new T(1)), (g = 0), d++); - else return k(s, (T.precision = S), I, (_ = !0)); - else return ((T.precision = S), s); - } - s = a; - } -} -function De(e, t) { - var r, - n, - i, - o, - s, - a, - l, - d, - g, - h, - T, - I = 1, - S = 10, - R = e, - M = R.d, - F = R.constructor, - B = F.rounding, - O = F.precision; - if (R.s < 0 || !M || !M[0] || (!R.e && M[0] == 1 && M.length == 1)) - return new F(M && !M[0] ? -1 / 0 : R.s != 1 ? NaN : M ? 0 : R); - if ( - (t == null ? ((_ = !1), (g = O)) : (g = t), - (F.precision = g += S), - (r = Y(M)), - (n = r.charAt(0)), - Math.abs((o = R.e)) < 15e14) - ) { - for (; (n < 7 && n != 1) || (n == 1 && r.charAt(1) > 3); ) ((R = R.times(e)), (r = Y(R.d)), (n = r.charAt(0)), I++); - ((o = R.e), n > 1 ? ((R = new F('0.' + r)), o++) : (R = new F(n + '.' + r.slice(1)))); - } else - return ( - (d = Tr(F, g + 2, O).times(o + '')), - (R = De(new F(n + '.' + r.slice(1)), g - S).plus(d)), - (F.precision = O), - t == null ? k(R, O, B, (_ = !0)) : R - ); - for (h = R, l = s = R = V(R.minus(1), R.plus(1), g, 1), T = k(R.times(R), g, 1), i = 3; ; ) { - if (((s = k(s.times(T), g, 1)), (d = l.plus(V(s, new F(i), g, 1))), Y(d.d).slice(0, g) === Y(l.d).slice(0, g))) - if ( - ((l = l.times(2)), - o !== 0 && (l = l.plus(Tr(F, g + 2, O).times(o + ''))), - (l = V(l, new F(I), g, 1)), - t == null) - ) - if (Ot(l.d, g - S, B, a)) - ((F.precision = g += S), - (d = s = R = V(h.minus(1), h.plus(1), g, 1)), - (T = k(R.times(R), g, 1)), - (i = a = 1)); - else return k(l, (F.precision = O), B, (_ = !0)); - else return ((F.precision = O), l); - ((l = d), (i += 2)); - } -} -function vo(e) { - return String((e.s * e.s) / 0); -} -function xr(e, t) { - var r, n, i; - for ( - (r = t.indexOf('.')) > -1 && (t = t.replace('.', '')), - (n = t.search(/e/i)) > 0 - ? (r < 0 && (r = n), (r += +t.slice(n + 1)), (t = t.substring(0, n))) - : r < 0 && (r = t.length), - n = 0; - t.charCodeAt(n) === 48; - n++ - ); - for (i = t.length; t.charCodeAt(i - 1) === 48; --i); - if (((t = t.slice(n, i)), t)) { - if (((i -= n), (e.e = r = r - n - 1), (e.d = []), (n = (r + 1) % D), r < 0 && (n += D), n < i)) { - for (n && e.d.push(+t.slice(0, n)), i -= D; n < i; ) e.d.push(+t.slice(n, (n += D))); - ((t = t.slice(n)), (n = D - t.length)); - } else n -= i; - for (; n--; ) t += '0'; - (e.d.push(+t), - _ && - (e.e > e.constructor.maxE - ? ((e.d = null), (e.e = NaN)) - : e.e < e.constructor.minE && ((e.e = 0), (e.d = [0])))); - } else ((e.e = 0), (e.d = [0])); - return e; -} -function Wl(e, t) { - var r, n, i, o, s, a, l, d, g; - if (t.indexOf('_') > -1) { - if (((t = t.replace(/(\d)_(?=\d)/g, '$1')), Eo.test(t))) return xr(e, t); - } else if (t === 'Infinity' || t === 'NaN') return (+t || (e.s = NaN), (e.e = NaN), (e.d = null), e); - if (jl.test(t)) ((r = 16), (t = t.toLowerCase())); - else if ($l.test(t)) r = 2; - else if (Gl.test(t)) r = 8; - else throw Error(Me + t); - for ( - o = t.search(/p/i), - o > 0 ? ((l = +t.slice(o + 1)), (t = t.substring(2, o))) : (t = t.slice(2)), - o = t.indexOf('.'), - s = o >= 0, - n = e.constructor, - s && ((t = t.replace('.', '')), (a = t.length), (o = a - o), (i = xo(n, new n(r), o, o * 2))), - d = br(t, r, pe), - g = d.length - 1, - o = g; - d[o] === 0; - --o - ) - d.pop(); - return o < 0 - ? new n(e.s * 0) - : ((e.e = Cr(d, g)), - (e.d = d), - (_ = !1), - s && (e = V(e, i, a * 4)), - l && (e = e.times(Math.abs(l) < 54 ? K(2, l) : Te.pow(2, l))), - (_ = !0), - e); -} -function Hl(e, t) { - var r, - n = t.d.length; - if (n < 3) return t.isZero() ? t : tt(e, 2, t, t); - ((r = 1.4 * Math.sqrt(n)), (r = r > 16 ? 16 : r | 0), (t = t.times(1 / Rr(5, r))), (t = tt(e, 2, t, t))); - for (var i, o = new e(5), s = new e(16), a = new e(20); r--; ) - ((i = t.times(t)), (t = t.times(o.plus(i.times(s.times(i).minus(a)))))); - return t; -} -function tt(e, t, r, n, i) { - var o, - s, - a, - l, - d = 1, - g = e.precision, - h = Math.ceil(g / D); - for (_ = !1, l = r.times(r), a = new e(n); ; ) { - if ( - ((s = V(a.times(l), new e(t++ * t++), g, 1)), - (a = i ? n.plus(s) : n.minus(s)), - (n = V(s.times(l), new e(t++ * t++), g, 1)), - (s = a.plus(n)), - s.d[h] !== void 0) - ) { - for (o = h; s.d[o] === a.d[o] && o--; ); - if (o == -1) break; - } - ((o = a), (a = n), (n = s), (s = o), d++); - } - return ((_ = !0), (s.d.length = h + 1), s); -} -function Rr(e, t) { - for (var r = e; --t; ) r *= e; - return r; -} -function To(e, t) { - var r, - n = t.s < 0, - i = he(e, e.precision, 1), - o = i.times(0.5); - if (((t = t.abs()), t.lte(o))) return ((ve = n ? 4 : 1), t); - if (((r = t.divToInt(i)), r.isZero())) ve = n ? 3 : 2; - else { - if (((t = t.minus(r.times(i))), t.lte(o))) return ((ve = po(r) ? (n ? 2 : 3) : n ? 4 : 1), t); - ve = po(r) ? (n ? 1 : 4) : n ? 3 : 2; - } - return t.minus(i).abs(); -} -function Mn(e, t, r, n) { - var i, - o, - s, - a, - l, - d, - g, - h, - T, - I = e.constructor, - S = r !== void 0; - if ( - (S ? (oe(r, 1, _e), n === void 0 ? (n = I.rounding) : oe(n, 0, 8)) : ((r = I.precision), (n = I.rounding)), - !e.isFinite()) - ) - g = vo(e); - else { - for ( - g = ye(e), - s = g.indexOf('.'), - S ? ((i = 2), t == 16 ? (r = r * 4 - 3) : t == 8 && (r = r * 3 - 2)) : (i = t), - s >= 0 && - ((g = g.replace('.', '')), - (T = new I(1)), - (T.e = g.length - s), - (T.d = br(ye(T), 10, i)), - (T.e = T.d.length)), - h = br(g, 10, i), - o = l = h.length; - h[--l] == 0; - - ) - h.pop(); - if (!h[0]) g = S ? '0p+0' : '0'; - else { - if ( - (s < 0 - ? o-- - : ((e = new I(e)), (e.d = h), (e.e = o), (e = V(e, T, r, n, 0, i)), (h = e.d), (o = e.e), (d = go)), - (s = h[r]), - (a = i / 2), - (d = d || h[r + 1] !== void 0), - (d = - n < 4 - ? (s !== void 0 || d) && (n === 0 || n === (e.s < 0 ? 3 : 2)) - : s > a || (s === a && (n === 4 || d || (n === 6 && h[r - 1] & 1) || n === (e.s < 0 ? 8 : 7)))), - (h.length = r), - d) - ) - for (; ++h[--r] > i - 1; ) ((h[r] = 0), r || (++o, h.unshift(1))); - for (l = h.length; !h[l - 1]; --l); - for (s = 0, g = ''; s < l; s++) g += In.charAt(h[s]); - if (S) { - if (l > 1) - if (t == 16 || t == 8) { - for (s = t == 16 ? 4 : 3, --l; l % s; l++) g += '0'; - for (h = br(g, i, t), l = h.length; !h[l - 1]; --l); - for (s = 1, g = '1.'; s < l; s++) g += In.charAt(h[s]); - } else g = g.charAt(0) + '.' + g.slice(1); - g = g + (o < 0 ? 'p' : 'p+') + o; - } else if (o < 0) { - for (; ++o; ) g = '0' + g; - g = '0.' + g; - } else if (++o > l) for (o -= l; o--; ) g += '0'; - else o < l && (g = g.slice(0, o) + '.' + g.slice(o)); - } - g = (t == 16 ? '0x' : t == 2 ? '0b' : t == 8 ? '0o' : '') + g; - } - return e.s < 0 ? '-' + g : g; -} -function mo(e, t) { - if (e.length > t) return ((e.length = t), !0); -} -function zl(e) { - return new this(e).abs(); -} -function Yl(e) { - return new this(e).acos(); -} -function Zl(e) { - return new this(e).acosh(); -} -function Xl(e, t) { - return new this(e).plus(t); -} -function eu(e) { - return new this(e).asin(); -} -function tu(e) { - return new this(e).asinh(); -} -function ru(e) { - return new this(e).atan(); -} -function nu(e) { - return new this(e).atanh(); -} -function iu(e, t) { - ((e = new this(e)), (t = new this(t))); - var r, - n = this.precision, - i = this.rounding, - o = n + 4; - return ( - !e.s || !t.s - ? (r = new this(NaN)) - : !e.d && !t.d - ? ((r = he(this, o, 1).times(t.s > 0 ? 0.25 : 0.75)), (r.s = e.s)) - : !t.d || e.isZero() - ? ((r = t.s < 0 ? he(this, n, i) : new this(0)), (r.s = e.s)) - : !e.d || t.isZero() - ? ((r = he(this, o, 1).times(0.5)), (r.s = e.s)) - : t.s < 0 - ? ((this.precision = o), - (this.rounding = 1), - (r = this.atan(V(e, t, o, 1))), - (t = he(this, o, 1)), - (this.precision = n), - (this.rounding = i), - (r = e.s < 0 ? r.minus(t) : r.plus(t))) - : (r = this.atan(V(e, t, o, 1))), - r - ); -} -function ou(e) { - return new this(e).cbrt(); -} -function su(e) { - return k((e = new this(e)), e.e + 1, 2); -} -function au(e, t, r) { - return new this(e).clamp(t, r); -} -function lu(e) { - if (!e || typeof e != 'object') throw Error(Ar + 'Object expected'); - var t, - r, - n, - i = e.defaults === !0, - o = [ - 'precision', - 1, - _e, - 'rounding', - 0, - 8, - 'toExpNeg', - -et, - 0, - 'toExpPos', - 0, - et, - 'maxE', - 0, - et, - 'minE', - -et, - 0, - 'modulo', - 0, - 9, - ]; - for (t = 0; t < o.length; t += 3) - if (((r = o[t]), i && (this[r] = On[r]), (n = e[r]) !== void 0)) - if (ee(n) === n && n >= o[t + 1] && n <= o[t + 2]) this[r] = n; - else throw Error(Me + r + ': ' + n); - if (((r = 'crypto'), i && (this[r] = On[r]), (n = e[r]) !== void 0)) - if (n === !0 || n === !1 || n === 0 || n === 1) - if (n) - if (typeof crypto < 'u' && crypto && (crypto.getRandomValues || crypto.randomBytes)) this[r] = !0; - else throw Error(yo); - else this[r] = !1; - else throw Error(Me + r + ': ' + n); - return this; -} -function uu(e) { - return new this(e).cos(); -} -function cu(e) { - return new this(e).cosh(); -} -function Ao(e) { - var t, r, n; - function i(o) { - var s, - a, - l, - d = this; - if (!(d instanceof i)) return new i(o); - if (((d.constructor = i), fo(o))) { - ((d.s = o.s), - _ - ? !o.d || o.e > i.maxE - ? ((d.e = NaN), (d.d = null)) - : o.e < i.minE - ? ((d.e = 0), (d.d = [0])) - : ((d.e = o.e), (d.d = o.d.slice())) - : ((d.e = o.e), (d.d = o.d ? o.d.slice() : o.d))); - return; - } - if (((l = typeof o), l === 'number')) { - if (o === 0) { - ((d.s = 1 / o < 0 ? -1 : 1), (d.e = 0), (d.d = [0])); - return; - } - if ((o < 0 ? ((o = -o), (d.s = -1)) : (d.s = 1), o === ~~o && o < 1e7)) { - for (s = 0, a = o; a >= 10; a /= 10) s++; - _ - ? s > i.maxE - ? ((d.e = NaN), (d.d = null)) - : s < i.minE - ? ((d.e = 0), (d.d = [0])) - : ((d.e = s), (d.d = [o])) - : ((d.e = s), (d.d = [o])); - return; - } - if (o * 0 !== 0) { - (o || (d.s = NaN), (d.e = NaN), (d.d = null)); - return; - } - return xr(d, o.toString()); - } - if (l === 'string') - return ( - (a = o.charCodeAt(0)) === 45 ? ((o = o.slice(1)), (d.s = -1)) : (a === 43 && (o = o.slice(1)), (d.s = 1)), - Eo.test(o) ? xr(d, o) : Wl(d, o) - ); - if (l === 'bigint') return (o < 0 ? ((o = -o), (d.s = -1)) : (d.s = 1), xr(d, o.toString())); - throw Error(Me + o); - } - if ( - ((i.prototype = C), - (i.ROUND_UP = 0), - (i.ROUND_DOWN = 1), - (i.ROUND_CEIL = 2), - (i.ROUND_FLOOR = 3), - (i.ROUND_HALF_UP = 4), - (i.ROUND_HALF_DOWN = 5), - (i.ROUND_HALF_EVEN = 6), - (i.ROUND_HALF_CEIL = 7), - (i.ROUND_HALF_FLOOR = 8), - (i.EUCLID = 9), - (i.config = i.set = lu), - (i.clone = Ao), - (i.isDecimal = fo), - (i.abs = zl), - (i.acos = Yl), - (i.acosh = Zl), - (i.add = Xl), - (i.asin = eu), - (i.asinh = tu), - (i.atan = ru), - (i.atanh = nu), - (i.atan2 = iu), - (i.cbrt = ou), - (i.ceil = su), - (i.clamp = au), - (i.cos = uu), - (i.cosh = cu), - (i.div = pu), - (i.exp = mu), - (i.floor = fu), - (i.hypot = du), - (i.ln = gu), - (i.log = hu), - (i.log10 = wu), - (i.log2 = yu), - (i.max = Eu), - (i.min = bu), - (i.mod = xu), - (i.mul = Pu), - (i.pow = vu), - (i.random = Tu), - (i.round = Au), - (i.sign = Cu), - (i.sin = Ru), - (i.sinh = Su), - (i.sqrt = Iu), - (i.sub = Ou), - (i.sum = ku), - (i.tan = Du), - (i.tanh = Mu), - (i.trunc = _u), - e === void 0 && (e = {}), - e && e.defaults !== !0) - ) - for ( - n = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'maxE', 'minE', 'modulo', 'crypto'], t = 0; - t < n.length; - - ) - e.hasOwnProperty((r = n[t++])) || (e[r] = this[r]); - return (i.config(e), i); -} -function pu(e, t) { - return new this(e).div(t); -} -function mu(e) { - return new this(e).exp(); -} -function fu(e) { - return k((e = new this(e)), e.e + 1, 3); -} -function du() { - var e, - t, - r = new this(0); - for (_ = !1, e = 0; e < arguments.length; ) - if (((t = new this(arguments[e++])), t.d)) r.d && (r = r.plus(t.times(t))); - else { - if (t.s) return ((_ = !0), new this(1 / 0)); - r = t; - } - return ((_ = !0), r.sqrt()); -} -function fo(e) { - return e instanceof Te || (e && e.toStringTag === wo) || !1; -} -function gu(e) { - return new this(e).ln(); -} -function hu(e, t) { - return new this(e).log(t); -} -function yu(e) { - return new this(e).log(2); -} -function wu(e) { - return new this(e).log(10); -} -function Eu() { - return Po(this, arguments, -1); -} -function bu() { - return Po(this, arguments, 1); -} -function xu(e, t) { - return new this(e).mod(t); -} -function Pu(e, t) { - return new this(e).mul(t); -} -function vu(e, t) { - return new this(e).pow(t); -} -function Tu(e) { - var t, - r, - n, - i, - o = 0, - s = new this(1), - a = []; - if ((e === void 0 ? (e = this.precision) : oe(e, 1, _e), (n = Math.ceil(e / D)), this.crypto)) - if (crypto.getRandomValues) - for (t = crypto.getRandomValues(new Uint32Array(n)); o < n; ) - ((i = t[o]), i >= 429e7 ? (t[o] = crypto.getRandomValues(new Uint32Array(1))[0]) : (a[o++] = i % 1e7)); - else if (crypto.randomBytes) { - for (t = crypto.randomBytes((n *= 4)); o < n; ) - ((i = t[o] + (t[o + 1] << 8) + (t[o + 2] << 16) + ((t[o + 3] & 127) << 24)), - i >= 214e7 ? crypto.randomBytes(4).copy(t, o) : (a.push(i % 1e7), (o += 4))); - o = n / 4; - } else throw Error(yo); - else for (; o < n; ) a[o++] = (Math.random() * 1e7) | 0; - for (n = a[--o], e %= D, n && e && ((i = K(10, D - e)), (a[o] = ((n / i) | 0) * i)); a[o] === 0; o--) a.pop(); - if (o < 0) ((r = 0), (a = [0])); - else { - for (r = -1; a[0] === 0; r -= D) a.shift(); - for (n = 1, i = a[0]; i >= 10; i /= 10) n++; - n < D && (r -= D - n); - } - return ((s.e = r), (s.d = a), s); -} -function Au(e) { - return k((e = new this(e)), e.e + 1, this.rounding); -} -function Cu(e) { - return ((e = new this(e)), e.d ? (e.d[0] ? e.s : 0 * e.s) : e.s || NaN); -} -function Ru(e) { - return new this(e).sin(); -} -function Su(e) { - return new this(e).sinh(); -} -function Iu(e) { - return new this(e).sqrt(); -} -function Ou(e, t) { - return new this(e).sub(t); -} -function ku() { - var e = 0, - t = arguments, - r = new this(t[e]); - for (_ = !1; r.s && ++e < t.length; ) r = r.plus(t[e]); - return ((_ = !0), k(r, this.precision, this.rounding)); -} -function Du(e) { - return new this(e).tan(); -} -function Mu(e) { - return new this(e).tanh(); -} -function _u(e) { - return k((e = new this(e)), e.e + 1, 1); -} -C[Symbol.for('nodejs.util.inspect.custom')] = C.toString; -C[Symbol.toStringTag] = 'Decimal'; -var Te = (C.constructor = Ao(On)); -Pr = new Te(Pr); -vr = new Te(vr); -var Ae = Te; -function rt(e) { - return Te.isDecimal(e) - ? !0 - : e !== null && - typeof e == 'object' && - typeof e.s == 'number' && - typeof e.e == 'number' && - typeof e.toFixed == 'function' && - Array.isArray(e.d); -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Dt = {}; -vt(Dt, { ModelAction: () => kt, datamodelEnumToSchemaEnum: () => Nu }); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -function Nu(e) { - return { name: e.name, values: e.values.map((t) => t.name) }; -} -f(); -u(); -c(); -p(); -m(); -var kt = ((O) => ( - (O.findUnique = 'findUnique'), - (O.findUniqueOrThrow = 'findUniqueOrThrow'), - (O.findFirst = 'findFirst'), - (O.findFirstOrThrow = 'findFirstOrThrow'), - (O.findMany = 'findMany'), - (O.create = 'create'), - (O.createMany = 'createMany'), - (O.createManyAndReturn = 'createManyAndReturn'), - (O.update = 'update'), - (O.updateMany = 'updateMany'), - (O.updateManyAndReturn = 'updateManyAndReturn'), - (O.upsert = 'upsert'), - (O.delete = 'delete'), - (O.deleteMany = 'deleteMany'), - (O.groupBy = 'groupBy'), - (O.count = 'count'), - (O.aggregate = 'aggregate'), - (O.findRaw = 'findRaw'), - (O.aggregateRaw = 'aggregateRaw'), - O -))(kt || {}); -var Fu = Ue(to()); -var Lu = { red: Ye, gray: Vi, dim: mr, bold: pr, underline: Fi, highlightSource: (e) => e.highlight() }, - Uu = { red: (e) => e, gray: (e) => e, dim: (e) => e, bold: (e) => e, underline: (e) => e, highlightSource: (e) => e }; -function Bu({ message: e, originalMethod: t, isPanic: r, callArguments: n }) { - return { functionName: `prisma.${t}()`, message: e, isPanic: r ?? !1, callArguments: n }; -} -function qu({ functionName: e, location: t, message: r, isPanic: n, contextLines: i, callArguments: o }, s) { - let a = [''], - l = t ? ' in' : ':'; - if ( - (n - ? (a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold('on us')}, you did nothing wrong.`)), - a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))) - : a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)), - t && a.push(s.underline(Vu(t))), - i) - ) { - a.push(''); - let d = [i.toString()]; - (o && (d.push(o), d.push(s.dim(')'))), a.push(d.join('')), o && a.push('')); - } else (a.push(''), o && a.push(o), a.push('')); - return ( - a.push(r), - a.join(` -`) - ); -} -function Vu(e) { - let t = [e.fileName]; - return (e.lineNumber && t.push(String(e.lineNumber)), e.columnNumber && t.push(String(e.columnNumber)), t.join(':')); -} -function Sr(e) { - let t = e.showColors ? Lu : Uu, - r; - return (typeof $getTemplateParameters < 'u' ? (r = $getTemplateParameters(e, t)) : (r = Bu(e)), qu(r, t)); -} -f(); -u(); -c(); -p(); -m(); -var _o = Ue(_n()); -f(); -u(); -c(); -p(); -m(); -function Io(e, t, r) { - let n = Oo(e), - i = $u(n), - o = Gu(i); - o ? Ir(o, t, r) : t.addErrorMessage(() => 'Unknown error'); -} -function Oo(e) { - return e.errors.flatMap((t) => (t.kind === 'Union' ? Oo(t) : [t])); -} -function $u(e) { - let t = new Map(), - r = []; - for (let n of e) { - if (n.kind !== 'InvalidArgumentType') { - r.push(n); - continue; - } - let i = `${n.selectionPath.join('.')}:${n.argumentPath.join('.')}`, - o = t.get(i); - o - ? t.set(i, { ...n, argument: { ...n.argument, typeNames: ju(o.argument.typeNames, n.argument.typeNames) } }) - : t.set(i, n); - } - return (r.push(...t.values()), r); -} -function ju(e, t) { - return [...new Set(e.concat(t))]; -} -function Gu(e) { - return Rn(e, (t, r) => { - let n = Ro(t), - i = Ro(r); - return n !== i ? n - i : So(t) - So(r); - }); -} -function Ro(e) { - let t = 0; - return ( - Array.isArray(e.selectionPath) && (t += e.selectionPath.length), - Array.isArray(e.argumentPath) && (t += e.argumentPath.length), - t - ); -} -function So(e) { - switch (e.kind) { - case 'InvalidArgumentValue': - case 'ValueTooLarge': - return 20; - case 'InvalidArgumentType': - return 10; - case 'RequiredArgumentMissing': - return -10; - default: - return 0; - } -} -f(); -u(); -c(); -p(); -m(); -var ue = class { - constructor(t, r) { - this.name = t; - this.value = r; - } - isRequired = !1; - makeRequired() { - return ((this.isRequired = !0), this); - } - write(t) { - let { - colors: { green: r }, - } = t.context; - (t.addMarginSymbol(r(this.isRequired ? '+' : '?')), - t.write(r(this.name)), - this.isRequired || t.write(r('?')), - t.write(r(': ')), - typeof this.value == 'string' ? t.write(r(this.value)) : t.write(this.value)); - } -}; -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -Do(); -f(); -u(); -c(); -p(); -m(); -var nt = class { - constructor(t = 0, r) { - this.context = r; - this.currentIndent = t; - } - lines = []; - currentLine = ''; - currentIndent = 0; - marginSymbol; - afterNextNewLineCallback; - write(t) { - return (typeof t == 'string' ? (this.currentLine += t) : t.write(this), this); - } - writeJoined(t, r, n = (i, o) => o.write(i)) { - let i = r.length - 1; - for (let o = 0; o < r.length; o++) (n(r[o], this), o !== i && this.write(t)); - return this; - } - writeLine(t) { - return this.write(t).newLine(); - } - newLine() { - (this.lines.push(this.indentedCurrentLine()), (this.currentLine = ''), (this.marginSymbol = void 0)); - let t = this.afterNextNewLineCallback; - return ((this.afterNextNewLineCallback = void 0), t?.(), this); - } - withIndent(t) { - return (this.indent(), t(this), this.unindent(), this); - } - afterNextNewline(t) { - return ((this.afterNextNewLineCallback = t), this); - } - indent() { - return (this.currentIndent++, this); - } - unindent() { - return (this.currentIndent > 0 && this.currentIndent--, this); - } - addMarginSymbol(t) { - return ((this.marginSymbol = t), this); - } - toString() { - return this.lines.concat(this.indentedCurrentLine()).join(` -`); - } - getCurrentLineLength() { - return this.currentLine.length; - } - indentedCurrentLine() { - let t = this.currentLine.padStart(this.currentLine.length + 2 * this.currentIndent); - return this.marginSymbol ? this.marginSymbol + t.slice(1) : t; - } -}; -ko(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Or = class { - constructor(t) { - this.value = t; - } - write(t) { - t.write(this.value); - } - markAsError() { - this.value.markAsError(); - } -}; -f(); -u(); -c(); -p(); -m(); -var kr = (e) => e, - Dr = { bold: kr, red: kr, green: kr, dim: kr, enabled: !1 }, - Mo = { bold: pr, red: Ye, green: Li, dim: mr, enabled: !0 }, - it = { - write(e) { - e.writeLine(','); - }, - }; -f(); -u(); -c(); -p(); -m(); -var we = class { - constructor(t) { - this.contents = t; - } - isUnderlined = !1; - color = (t) => t; - underline() { - return ((this.isUnderlined = !0), this); - } - setColor(t) { - return ((this.color = t), this); - } - write(t) { - let r = t.getCurrentLineLength(); - (t.write(this.color(this.contents)), - this.isUnderlined && - t.afterNextNewline(() => { - t.write(' '.repeat(r)).writeLine(this.color('~'.repeat(this.contents.length))); - })); - } -}; -f(); -u(); -c(); -p(); -m(); -var Ne = class { - hasError = !1; - markAsError() { - return ((this.hasError = !0), this); - } -}; -var ot = class extends Ne { - items = []; - addItem(t) { - return (this.items.push(new Or(t)), this); - } - getField(t) { - return this.items[t]; - } - getPrintWidth() { - return this.items.length === 0 ? 2 : Math.max(...this.items.map((r) => r.value.getPrintWidth())) + 2; - } - write(t) { - if (this.items.length === 0) { - this.writeEmpty(t); - return; - } - this.writeWithItems(t); - } - writeEmpty(t) { - let r = new we('[]'); - (this.hasError && r.setColor(t.context.colors.red).underline(), t.write(r)); - } - writeWithItems(t) { - let { colors: r } = t.context; - (t - .writeLine('[') - .withIndent(() => t.writeJoined(it, this.items).newLine()) - .write(']'), - this.hasError && - t.afterNextNewline(() => { - t.writeLine(r.red('~'.repeat(this.getPrintWidth()))); - })); - } - asObject() {} -}; -var st = class e extends Ne { - fields = {}; - suggestions = []; - addField(t) { - this.fields[t.name] = t; - } - addSuggestion(t) { - this.suggestions.push(t); - } - getField(t) { - return this.fields[t]; - } - getDeepField(t) { - let [r, ...n] = t, - i = this.getField(r); - if (!i) return; - let o = i; - for (let s of n) { - let a; - if ( - (o.value instanceof e ? (a = o.value.getField(s)) : o.value instanceof ot && (a = o.value.getField(Number(s))), - !a) - ) - return; - o = a; - } - return o; - } - getDeepFieldValue(t) { - return t.length === 0 ? this : this.getDeepField(t)?.value; - } - hasField(t) { - return !!this.getField(t); - } - removeAllFields() { - this.fields = {}; - } - removeField(t) { - delete this.fields[t]; - } - getFields() { - return this.fields; - } - isEmpty() { - return Object.keys(this.fields).length === 0; - } - getFieldValue(t) { - return this.getField(t)?.value; - } - getDeepSubSelectionValue(t) { - let r = this; - for (let n of t) { - if (!(r instanceof e)) return; - let i = r.getSubSelectionValue(n); - if (!i) return; - r = i; - } - return r; - } - getDeepSelectionParent(t) { - let r = this.getSelectionParent(); - if (!r) return; - let n = r; - for (let i of t) { - let o = n.value.getFieldValue(i); - if (!o || !(o instanceof e)) return; - let s = o.getSelectionParent(); - if (!s) return; - n = s; - } - return n; - } - getSelectionParent() { - let t = this.getField('select')?.value.asObject(); - if (t) return { kind: 'select', value: t }; - let r = this.getField('include')?.value.asObject(); - if (r) return { kind: 'include', value: r }; - } - getSubSelectionValue(t) { - return this.getSelectionParent()?.value.fields[t].value; - } - getPrintWidth() { - let t = Object.values(this.fields); - return t.length == 0 ? 2 : Math.max(...t.map((n) => n.getPrintWidth())) + 2; - } - write(t) { - let r = Object.values(this.fields); - if (r.length === 0 && this.suggestions.length === 0) { - this.writeEmpty(t); - return; - } - this.writeWithContents(t, r); - } - asObject() { - return this; - } - writeEmpty(t) { - let r = new we('{}'); - (this.hasError && r.setColor(t.context.colors.red).underline(), t.write(r)); - } - writeWithContents(t, r) { - (t.writeLine('{').withIndent(() => { - t.writeJoined(it, [...r, ...this.suggestions]).newLine(); - }), - t.write('}'), - this.hasError && - t.afterNextNewline(() => { - t.writeLine(t.context.colors.red('~'.repeat(this.getPrintWidth()))); - })); - } -}; -f(); -u(); -c(); -p(); -m(); -var H = class extends Ne { - constructor(r) { - super(); - this.text = r; - } - getPrintWidth() { - return this.text.length; - } - write(r) { - let n = new we(this.text); - (this.hasError && n.underline().setColor(r.context.colors.red), r.write(n)); - } - asObject() {} -}; -f(); -u(); -c(); -p(); -m(); -var Mt = class { - fields = []; - addField(t, r) { - return ( - this.fields.push({ - write(n) { - let { green: i, dim: o } = n.context.colors; - n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o('+'))); - }, - }), - this - ); - } - write(t) { - let { - colors: { green: r }, - } = t.context; - t.writeLine(r('{')) - .withIndent(() => { - t.writeJoined(it, this.fields).newLine(); - }) - .write(r('}')) - .addMarginSymbol(r('+')); - } -}; -function Ir(e, t, r) { - switch (e.kind) { - case 'MutuallyExclusiveFields': - Ju(e, t); - break; - case 'IncludeOnScalar': - Qu(e, t); - break; - case 'EmptySelection': - Ku(e, t, r); - break; - case 'UnknownSelectionField': - Yu(e, t); - break; - case 'InvalidSelectionValue': - Zu(e, t); - break; - case 'UnknownArgument': - Xu(e, t); - break; - case 'UnknownInputField': - ec(e, t); - break; - case 'RequiredArgumentMissing': - tc(e, t); - break; - case 'InvalidArgumentType': - rc(e, t); - break; - case 'InvalidArgumentValue': - nc(e, t); - break; - case 'ValueTooLarge': - ic(e, t); - break; - case 'SomeFieldsMissing': - oc(e, t); - break; - case 'TooManyFieldsGiven': - sc(e, t); - break; - case 'Union': - Io(e, t, r); - break; - default: - throw new Error('not implemented: ' + e.kind); - } -} -function Ju(e, t) { - let r = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - (r && (r.getField(e.firstField)?.markAsError(), r.getField(e.secondField)?.markAsError()), - t.addErrorMessage( - (n) => - `Please ${n.bold('either')} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red('not both')} at the same time.` - )); -} -function Qu(e, t) { - let [r, n] = at(e.selectionPath), - i = e.outputType, - o = t.arguments.getDeepSelectionParent(r)?.value; - if (o && (o.getField(n)?.markAsError(), i)) - for (let s of i.fields) s.isRelation && o.addSuggestion(new ue(s.name, 'true')); - t.addErrorMessage((s) => { - let a = `Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold('include')} statement`; - return ( - i ? (a += ` on model ${s.bold(i.name)}. ${_t(s)}`) : (a += '.'), - (a += ` -Note that ${s.bold('include')} statements only accept relation fields.`), - a - ); - }); -} -function Ku(e, t, r) { - let n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - if (n) { - let i = n.getField('omit')?.value.asObject(); - if (i) { - Wu(e, t, i); - return; - } - if (n.hasField('select')) { - Hu(e, t); - return; - } - } - if (r?.[Oe(e.outputType.name)]) { - zu(e, t); - return; - } - t.addErrorMessage(() => `Unknown field at "${e.selectionPath.join('.')} selection"`); -} -function Wu(e, t, r) { - r.removeAllFields(); - for (let n of e.outputType.fields) r.addSuggestion(new ue(n.name, 'false')); - t.addErrorMessage( - (n) => - `The ${n.red('omit')} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result` - ); -} -function Hu(e, t) { - let r = e.outputType, - n = t.arguments.getDeepSelectionParent(e.selectionPath)?.value, - i = n?.isEmpty() ?? !1; - (n && (n.removeAllFields(), Lo(n, r)), - t.addErrorMessage((o) => - i - ? `The ${o.red('`select`')} statement for type ${o.bold(r.name)} must not be empty. ${_t(o)}` - : `The ${o.red('`select`')} statement for type ${o.bold(r.name)} needs ${o.bold('at least one truthy value')}.` - )); -} -function zu(e, t) { - let r = new Mt(); - for (let i of e.outputType.fields) i.isRelation || r.addField(i.name, 'false'); - let n = new ue('omit', r).makeRequired(); - if (e.selectionPath.length === 0) t.arguments.addSuggestion(n); - else { - let [i, o] = at(e.selectionPath), - a = t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o); - if (a) { - let l = a?.value.asObject() ?? new st(); - (l.addSuggestion(n), (a.value = l)); - } - } - t.addErrorMessage( - (i) => - `The global ${i.red('omit')} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result` - ); -} -function Yu(e, t) { - let r = Uo(e.selectionPath, t); - if (r.parentKind !== 'unknown') { - r.field.markAsError(); - let n = r.parent; - switch (r.parentKind) { - case 'select': - Lo(n, e.outputType); - break; - case 'include': - ac(n, e.outputType); - break; - case 'omit': - lc(n, e.outputType); - break; - } - } - t.addErrorMessage((n) => { - let i = [`Unknown field ${n.red(`\`${r.fieldName}\``)}`]; - return ( - r.parentKind !== 'unknown' && i.push(`for ${n.bold(r.parentKind)} statement`), - i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`), - i.push(_t(n)), - i.join(' ') - ); - }); -} -function Zu(e, t) { - let r = Uo(e.selectionPath, t); - (r.parentKind !== 'unknown' && r.field.value.markAsError(), - t.addErrorMessage((n) => `Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)); -} -function Xu(e, t) { - let r = e.argumentPath[0], - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - (n && (n.getField(r)?.markAsError(), uc(n, e.arguments)), - t.addErrorMessage((i) => - No( - i, - r, - e.arguments.map((o) => o.name) - ) - )); -} -function ec(e, t) { - let [r, n] = at(e.argumentPath), - i = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - if (i) { - i.getDeepField(e.argumentPath)?.markAsError(); - let o = i.getDeepFieldValue(r)?.asObject(); - o && Bo(o, e.inputType); - } - t.addErrorMessage((o) => - No( - o, - n, - e.inputType.fields.map((s) => s.name) - ) - ); -} -function No(e, t, r) { - let n = [`Unknown argument \`${e.red(t)}\`.`], - i = pc(t, r); - return (i && n.push(`Did you mean \`${e.green(i)}\`?`), r.length > 0 && n.push(_t(e)), n.join(' ')); -} -function tc(e, t) { - let r; - t.addErrorMessage((l) => - r?.value instanceof H && r.value.text === 'null' - ? `Argument \`${l.green(o)}\` must not be ${l.red('null')}.` - : `Argument \`${l.green(o)}\` is missing.` - ); - let n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - if (!n) return; - let [i, o] = at(e.argumentPath), - s = new Mt(), - a = n.getDeepFieldValue(i)?.asObject(); - if (a) { - if (((r = a.getField(o)), r && a.removeField(o), e.inputTypes.length === 1 && e.inputTypes[0].kind === 'object')) { - for (let l of e.inputTypes[0].fields) s.addField(l.name, l.typeNames.join(' | ')); - a.addSuggestion(new ue(o, s).makeRequired()); - } else { - let l = e.inputTypes.map(Fo).join(' | '); - a.addSuggestion(new ue(o, l).makeRequired()); - } - if (e.dependentArgumentPath) { - n.getDeepField(e.dependentArgumentPath)?.markAsError(); - let [, l] = at(e.dependentArgumentPath); - t.addErrorMessage( - (d) => `Argument \`${d.green(o)}\` is required because argument \`${d.green(l)}\` was provided.` - ); - } - } -} -function Fo(e) { - return e.kind === 'list' ? `${Fo(e.elementType)}[]` : e.name; -} -function rc(e, t) { - let r = e.argument.name, - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - (n && n.getDeepFieldValue(e.argumentPath)?.markAsError(), - t.addErrorMessage((i) => { - let o = Mr( - 'or', - e.argument.typeNames.map((s) => i.green(s)) - ); - return `Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`; - })); -} -function nc(e, t) { - let r = e.argument.name, - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - (n && n.getDeepFieldValue(e.argumentPath)?.markAsError(), - t.addErrorMessage((i) => { - let o = [`Invalid value for argument \`${i.bold(r)}\``]; - if ((e.underlyingError && o.push(`: ${e.underlyingError}`), o.push('.'), e.argument.typeNames.length > 0)) { - let s = Mr( - 'or', - e.argument.typeNames.map((a) => i.green(a)) - ); - o.push(` Expected ${s}.`); - } - return o.join(''); - })); -} -function ic(e, t) { - let r = e.argument.name, - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(), - i; - if (n) { - let s = n.getDeepField(e.argumentPath)?.value; - (s?.markAsError(), s instanceof H && (i = s.text)); - } - t.addErrorMessage((o) => { - let s = ['Unable to fit value']; - return (i && s.push(o.red(i)), s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``), s.join(' ')); - }); -} -function oc(e, t) { - let r = e.argumentPath[e.argumentPath.length - 1], - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - if (n) { - let i = n.getDeepFieldValue(e.argumentPath)?.asObject(); - i && Bo(i, e.inputType); - } - t.addErrorMessage((i) => { - let o = [`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`]; - return ( - e.constraints.minFieldCount === 1 - ? e.constraints.requiredFields - ? o.push( - `${i.green('at least one of')} ${Mr( - 'or', - e.constraints.requiredFields.map((s) => `\`${i.bold(s)}\``) - )} arguments.` - ) - : o.push(`${i.green('at least one')} argument.`) - : o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`), - o.push(_t(i)), - o.join(' ') - ); - }); -} -function sc(e, t) { - let r = e.argumentPath[e.argumentPath.length - 1], - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(), - i = []; - if (n) { - let o = n.getDeepFieldValue(e.argumentPath)?.asObject(); - o && (o.markAsError(), (i = Object.keys(o.getFields()))); - } - t.addErrorMessage((o) => { - let s = [`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`]; - return ( - e.constraints.minFieldCount === 1 && e.constraints.maxFieldCount == 1 - ? s.push(`${o.green('exactly one')} argument,`) - : e.constraints.maxFieldCount == 1 - ? s.push(`${o.green('at most one')} argument,`) - : s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`), - s.push( - `but you provided ${Mr( - 'and', - i.map((a) => o.red(a)) - )}. Please choose` - ), - e.constraints.maxFieldCount === 1 ? s.push('one.') : s.push(`${e.constraints.maxFieldCount}.`), - s.join(' ') - ); - }); -} -function Lo(e, t) { - for (let r of t.fields) e.hasField(r.name) || e.addSuggestion(new ue(r.name, 'true')); -} -function ac(e, t) { - for (let r of t.fields) r.isRelation && !e.hasField(r.name) && e.addSuggestion(new ue(r.name, 'true')); -} -function lc(e, t) { - for (let r of t.fields) !e.hasField(r.name) && !r.isRelation && e.addSuggestion(new ue(r.name, 'true')); -} -function uc(e, t) { - for (let r of t) e.hasField(r.name) || e.addSuggestion(new ue(r.name, r.typeNames.join(' | '))); -} -function Uo(e, t) { - let [r, n] = at(e), - i = t.arguments.getDeepSubSelectionValue(r)?.asObject(); - if (!i) return { parentKind: 'unknown', fieldName: n }; - let o = i.getFieldValue('select')?.asObject(), - s = i.getFieldValue('include')?.asObject(), - a = i.getFieldValue('omit')?.asObject(), - l = o?.getField(n); - return o && l - ? { parentKind: 'select', parent: o, field: l, fieldName: n } - : ((l = s?.getField(n)), - s && l - ? { parentKind: 'include', field: l, parent: s, fieldName: n } - : ((l = a?.getField(n)), - a && l - ? { parentKind: 'omit', field: l, parent: a, fieldName: n } - : { parentKind: 'unknown', fieldName: n })); -} -function Bo(e, t) { - if (t.kind === 'object') - for (let r of t.fields) e.hasField(r.name) || e.addSuggestion(new ue(r.name, r.typeNames.join(' | '))); -} -function at(e) { - let t = [...e], - r = t.pop(); - if (!r) throw new Error('unexpected empty path'); - return [t, r]; -} -function _t({ green: e, enabled: t }) { - return 'Available options are ' + (t ? `listed in ${e('green')}` : 'marked with ?') + '.'; -} -function Mr(e, t) { - if (t.length === 1) return t[0]; - let r = [...t], - n = r.pop(); - return `${r.join(', ')} ${e} ${n}`; -} -var cc = 3; -function pc(e, t) { - let r = 1 / 0, - n; - for (let i of t) { - let o = (0, _o.default)(e, i); - o > cc || (o < r && ((r = o), (n = i))); - } - return n; -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Nt = class { - modelName; - name; - typeName; - isList; - isEnum; - constructor(t, r, n, i, o) { - ((this.modelName = t), (this.name = r), (this.typeName = n), (this.isList = i), (this.isEnum = o)); - } - _toGraphQLInputType() { - let t = this.isList ? 'List' : '', - r = this.isEnum ? 'Enum' : ''; - return `${t}${r}${this.typeName}FieldRefInput<${this.modelName}>`; - } -}; -function lt(e) { - return e instanceof Nt; -} -f(); -u(); -c(); -p(); -m(); -var _r = Symbol(), - Fn = new WeakMap(), - Ce = class { - constructor(t) { - t === _r - ? Fn.set(this, `Prisma.${this._getName()}`) - : Fn.set(this, `new Prisma.${this._getNamespace()}.${this._getName()}()`); - } - _getName() { - return this.constructor.name; - } - toString() { - return Fn.get(this); - } - }, - Ft = class extends Ce { - _getNamespace() { - return 'NullTypes'; - } - }, - Lt = class extends Ft { - #e; - }; -Ln(Lt, 'DbNull'); -var Ut = class extends Ft { - #e; -}; -Ln(Ut, 'JsonNull'); -var Bt = class extends Ft { - #e; -}; -Ln(Bt, 'AnyNull'); -var Nr = { - classes: { DbNull: Lt, JsonNull: Ut, AnyNull: Bt }, - instances: { DbNull: new Lt(_r), JsonNull: new Ut(_r), AnyNull: new Bt(_r) }, -}; -function Ln(e, t) { - Object.defineProperty(e, 'name', { value: t, configurable: !0 }); -} -f(); -u(); -c(); -p(); -m(); -var qo = ': ', - Fr = class { - constructor(t, r) { - this.name = t; - this.value = r; - } - hasError = !1; - markAsError() { - this.hasError = !0; - } - getPrintWidth() { - return this.name.length + this.value.getPrintWidth() + qo.length; - } - write(t) { - let r = new we(this.name); - (this.hasError && r.underline().setColor(t.context.colors.red), t.write(r).write(qo).write(this.value)); - } - }; -var Un = class { - arguments; - errorMessages = []; - constructor(t) { - this.arguments = t; - } - write(t) { - t.write(this.arguments); - } - addErrorMessage(t) { - this.errorMessages.push(t); - } - renderAllMessages(t) { - return this.errorMessages.map((r) => r(t)).join(` -`); - } -}; -function ut(e) { - return new Un(Vo(e)); -} -function Vo(e) { - let t = new st(); - for (let [r, n] of Object.entries(e)) { - let i = new Fr(r, $o(n)); - t.addField(i); - } - return t; -} -function $o(e) { - if (typeof e == 'string') return new H(JSON.stringify(e)); - if (typeof e == 'number' || typeof e == 'boolean') return new H(String(e)); - if (typeof e == 'bigint') return new H(`${e}n`); - if (e === null) return new H('null'); - if (e === void 0) return new H('undefined'); - if (rt(e)) return new H(`new Prisma.Decimal("${e.toFixed()}")`); - if (e instanceof Uint8Array) - return w.Buffer.isBuffer(e) ? new H(`Buffer.alloc(${e.byteLength})`) : new H(`new Uint8Array(${e.byteLength})`); - if (e instanceof Date) { - let t = Er(e) ? e.toISOString() : 'Invalid Date'; - return new H(`new Date("${t}")`); - } - return e instanceof Ce - ? new H(`Prisma.${e._getName()}`) - : lt(e) - ? new H(`prisma.${Oe(e.modelName)}.$fields.${e.name}`) - : Array.isArray(e) - ? mc(e) - : typeof e == 'object' - ? Vo(e) - : new H(Object.prototype.toString.call(e)); -} -function mc(e) { - let t = new ot(); - for (let r of e) t.addItem($o(r)); - return t; -} -function Lr(e, t) { - let r = t === 'pretty' ? Mo : Dr, - n = e.renderAllMessages(r), - i = new nt(0, { colors: r }).write(e).toString(); - return { message: n, args: i }; -} -function Ur({ args: e, errors: t, errorFormat: r, callsite: n, originalMethod: i, clientVersion: o, globalOmit: s }) { - let a = ut(e); - for (let h of t) Ir(h, a, s); - let { message: l, args: d } = Lr(a, r), - g = Sr({ message: l, callsite: n, originalMethod: i, showColors: r === 'pretty', callArguments: d }); - throw new X(g, { clientVersion: o }); -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -function Ee(e) { - return e.replace(/^./, (t) => t.toLowerCase()); -} -f(); -u(); -c(); -p(); -m(); -function Go(e, t, r) { - let n = Ee(r); - return !t.result || !(t.result.$allModels || t.result[n]) - ? e - : fc({ ...e, ...jo(t.name, e, t.result.$allModels), ...jo(t.name, e, t.result[n]) }); -} -function fc(e) { - let t = new ge(), - r = (n, i) => - t.getOrCreate(n, () => (i.has(n) ? [n] : (i.add(n), e[n] ? e[n].needs.flatMap((o) => r(o, i)) : [n]))); - return wr(e, (n) => ({ ...n, needs: r(n.name, new Set()) })); -} -function jo(e, t, r) { - return r - ? wr(r, ({ needs: n, compute: i }, o) => ({ - name: o, - needs: n ? Object.keys(n).filter((s) => n[s]) : [], - compute: dc(t, o, i), - })) - : {}; -} -function dc(e, t, r) { - let n = e?.[t]?.compute; - return n ? (i) => r({ ...i, [t]: n(i) }) : r; -} -function Jo(e, t) { - if (!t) return e; - let r = { ...e }; - for (let n of Object.values(t)) if (e[n.name]) for (let i of n.needs) r[i] = !0; - return r; -} -function Qo(e, t) { - if (!t) return e; - let r = { ...e }; - for (let n of Object.values(t)) if (!e[n.name]) for (let i of n.needs) delete r[i]; - return r; -} -var Br = class { - constructor(t, r) { - this.extension = t; - this.previous = r; - } - computedFieldsCache = new ge(); - modelExtensionsCache = new ge(); - queryCallbacksCache = new ge(); - clientExtensions = It(() => - this.extension.client - ? { ...this.previous?.getAllClientExtensions(), ...this.extension.client } - : this.previous?.getAllClientExtensions() - ); - batchCallbacks = It(() => { - let t = this.previous?.getAllBatchQueryCallbacks() ?? [], - r = this.extension.query?.$__internalBatch; - return r ? t.concat(r) : t; - }); - getAllComputedFields(t) { - return this.computedFieldsCache.getOrCreate(t, () => - Go(this.previous?.getAllComputedFields(t), this.extension, t) - ); - } - getAllClientExtensions() { - return this.clientExtensions.get(); - } - getAllModelExtensions(t) { - return this.modelExtensionsCache.getOrCreate(t, () => { - let r = Ee(t); - return !this.extension.model || !(this.extension.model[r] || this.extension.model.$allModels) - ? this.previous?.getAllModelExtensions(t) - : { - ...this.previous?.getAllModelExtensions(t), - ...this.extension.model.$allModels, - ...this.extension.model[r], - }; - }); - } - getAllQueryCallbacks(t, r) { - return this.queryCallbacksCache.getOrCreate(`${t}:${r}`, () => { - let n = this.previous?.getAllQueryCallbacks(t, r) ?? [], - i = [], - o = this.extension.query; - return !o || !(o[t] || o.$allModels || o[r] || o.$allOperations) - ? n - : (o[t] !== void 0 && - (o[t][r] !== void 0 && i.push(o[t][r]), o[t].$allOperations !== void 0 && i.push(o[t].$allOperations)), - t !== '$none' && - o.$allModels !== void 0 && - (o.$allModels[r] !== void 0 && i.push(o.$allModels[r]), - o.$allModels.$allOperations !== void 0 && i.push(o.$allModels.$allOperations)), - o[r] !== void 0 && i.push(o[r]), - o.$allOperations !== void 0 && i.push(o.$allOperations), - n.concat(i)); - }); - } - getAllBatchQueryCallbacks() { - return this.batchCallbacks.get(); - } - }, - ct = class e { - constructor(t) { - this.head = t; - } - static empty() { - return new e(); - } - static single(t) { - return new e(new Br(t)); - } - isEmpty() { - return this.head === void 0; - } - append(t) { - return new e(new Br(t, this.head)); - } - getAllComputedFields(t) { - return this.head?.getAllComputedFields(t); - } - getAllClientExtensions() { - return this.head?.getAllClientExtensions(); - } - getAllModelExtensions(t) { - return this.head?.getAllModelExtensions(t); - } - getAllQueryCallbacks(t, r) { - return this.head?.getAllQueryCallbacks(t, r) ?? []; - } - getAllBatchQueryCallbacks() { - return this.head?.getAllBatchQueryCallbacks() ?? []; - } - }; -f(); -u(); -c(); -p(); -m(); -var qr = class { - constructor(t) { - this.name = t; - } -}; -function Ko(e) { - return e instanceof qr; -} -function Wo(e) { - return new qr(e); -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Ho = Symbol(), - qt = class { - constructor(t) { - if (t !== Ho) throw new Error('Skip instance can not be constructed directly'); - } - ifUndefined(t) { - return t === void 0 ? Vr : t; - } - }, - Vr = new qt(Ho); -function be(e) { - return e instanceof qt; -} -var gc = { - findUnique: 'findUnique', - findUniqueOrThrow: 'findUniqueOrThrow', - findFirst: 'findFirst', - findFirstOrThrow: 'findFirstOrThrow', - findMany: 'findMany', - count: 'aggregate', - create: 'createOne', - createMany: 'createMany', - createManyAndReturn: 'createManyAndReturn', - update: 'updateOne', - updateMany: 'updateMany', - updateManyAndReturn: 'updateManyAndReturn', - upsert: 'upsertOne', - delete: 'deleteOne', - deleteMany: 'deleteMany', - executeRaw: 'executeRaw', - queryRaw: 'queryRaw', - aggregate: 'aggregate', - groupBy: 'groupBy', - runCommandRaw: 'runCommandRaw', - findRaw: 'findRaw', - aggregateRaw: 'aggregateRaw', - }, - zo = 'explicitly `undefined` values are not allowed'; -function $r({ - modelName: e, - action: t, - args: r, - runtimeDataModel: n, - extensions: i = ct.empty(), - callsite: o, - clientMethod: s, - errorFormat: a, - clientVersion: l, - previewFeatures: d, - globalOmit: g, -}) { - let h = new Bn({ - runtimeDataModel: n, - modelName: e, - action: t, - rootArgs: r, - callsite: o, - extensions: i, - selectionPath: [], - argumentPath: [], - originalMethod: s, - errorFormat: a, - clientVersion: l, - previewFeatures: d, - globalOmit: g, - }); - return { modelName: e, action: gc[t], query: Vt(r, h) }; -} -function Vt({ select: e, include: t, ...r } = {}, n) { - let i = r.omit; - return (delete r.omit, { arguments: Zo(r, n), selection: hc(e, t, i, n) }); -} -function hc(e, t, r, n) { - return e - ? (t - ? n.throwValidationError({ - kind: 'MutuallyExclusiveFields', - firstField: 'include', - secondField: 'select', - selectionPath: n.getSelectionPath(), - }) - : r && - n.throwValidationError({ - kind: 'MutuallyExclusiveFields', - firstField: 'omit', - secondField: 'select', - selectionPath: n.getSelectionPath(), - }), - bc(e, n)) - : yc(n, t, r); -} -function yc(e, t, r) { - let n = {}; - return ( - e.modelOrType && !e.isRawAction() && ((n.$composites = !0), (n.$scalars = !0)), - t && wc(n, t, e), - Ec(n, r, e), - n - ); -} -function wc(e, t, r) { - for (let [n, i] of Object.entries(t)) { - if (be(i)) continue; - let o = r.nestSelection(n); - if ((qn(i, o), i === !1 || i === void 0)) { - e[n] = !1; - continue; - } - let s = r.findField(n); - if ( - (s && - s.kind !== 'object' && - r.throwValidationError({ - kind: 'IncludeOnScalar', - selectionPath: r.getSelectionPath().concat(n), - outputType: r.getOutputTypeDescription(), - }), - s) - ) { - e[n] = Vt(i === !0 ? {} : i, o); - continue; - } - if (i === !0) { - e[n] = !0; - continue; - } - e[n] = Vt(i, o); - } -} -function Ec(e, t, r) { - let n = r.getComputedFields(), - i = { ...r.getGlobalOmit(), ...t }, - o = Qo(i, n); - for (let [s, a] of Object.entries(o)) { - if (be(a)) continue; - qn(a, r.nestSelection(s)); - let l = r.findField(s); - (n?.[s] && !l) || (e[s] = !a); - } -} -function bc(e, t) { - let r = {}, - n = t.getComputedFields(), - i = Jo(e, n); - for (let [o, s] of Object.entries(i)) { - if (be(s)) continue; - let a = t.nestSelection(o); - qn(s, a); - let l = t.findField(o); - if (!(n?.[o] && !l)) { - if (s === !1 || s === void 0 || be(s)) { - r[o] = !1; - continue; - } - if (s === !0) { - l?.kind === 'object' ? (r[o] = Vt({}, a)) : (r[o] = !0); - continue; - } - r[o] = Vt(s, a); - } - } - return r; -} -function Yo(e, t) { - if (e === null) return null; - if (typeof e == 'string' || typeof e == 'number' || typeof e == 'boolean') return e; - if (typeof e == 'bigint') return { $type: 'BigInt', value: String(e) }; - if (Xe(e)) { - if (Er(e)) return { $type: 'DateTime', value: e.toISOString() }; - t.throwValidationError({ - kind: 'InvalidArgumentValue', - selectionPath: t.getSelectionPath(), - argumentPath: t.getArgumentPath(), - argument: { name: t.getArgumentName(), typeNames: ['Date'] }, - underlyingError: 'Provided Date object is invalid', - }); - } - if (Ko(e)) return { $type: 'Param', value: e.name }; - if (lt(e)) return { $type: 'FieldRef', value: { _ref: e.name, _container: e.modelName } }; - if (Array.isArray(e)) return xc(e, t); - if (ArrayBuffer.isView(e)) { - let { buffer: r, byteOffset: n, byteLength: i } = e; - return { $type: 'Bytes', value: w.Buffer.from(r, n, i).toString('base64') }; - } - if (Pc(e)) return e.values; - if (rt(e)) return { $type: 'Decimal', value: e.toFixed() }; - if (e instanceof Ce) { - if (e !== Nr.instances[e._getName()]) throw new Error('Invalid ObjectEnumValue'); - return { $type: 'Enum', value: e._getName() }; - } - if (vc(e)) return e.toJSON(); - if (typeof e == 'object') return Zo(e, t); - t.throwValidationError({ - kind: 'InvalidArgumentValue', - selectionPath: t.getSelectionPath(), - argumentPath: t.getArgumentPath(), - argument: { name: t.getArgumentName(), typeNames: [] }, - underlyingError: `We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`, - }); -} -function Zo(e, t) { - if (e.$type) return { $type: 'Raw', value: e }; - let r = {}; - for (let n in e) { - let i = e[n], - o = t.nestArgument(n); - be(i) || - (i !== void 0 - ? (r[n] = Yo(i, o)) - : t.isPreviewFeatureOn('strictUndefinedChecks') && - t.throwValidationError({ - kind: 'InvalidArgumentValue', - argumentPath: o.getArgumentPath(), - selectionPath: t.getSelectionPath(), - argument: { name: t.getArgumentName(), typeNames: [] }, - underlyingError: zo, - })); - } - return r; -} -function xc(e, t) { - let r = []; - for (let n = 0; n < e.length; n++) { - let i = t.nestArgument(String(n)), - o = e[n]; - if (o === void 0 || be(o)) { - let s = o === void 0 ? 'undefined' : 'Prisma.skip'; - t.throwValidationError({ - kind: 'InvalidArgumentValue', - selectionPath: i.getSelectionPath(), - argumentPath: i.getArgumentPath(), - argument: { name: `${t.getArgumentName()}[${n}]`, typeNames: [] }, - underlyingError: `Can not use \`${s}\` value within array. Use \`null\` or filter out \`${s}\` values`, - }); - } - r.push(Yo(o, i)); - } - return r; -} -function Pc(e) { - return typeof e == 'object' && e !== null && e.__prismaRawParameters__ === !0; -} -function vc(e) { - return typeof e == 'object' && e !== null && typeof e.toJSON == 'function'; -} -function qn(e, t) { - e === void 0 && - t.isPreviewFeatureOn('strictUndefinedChecks') && - t.throwValidationError({ kind: 'InvalidSelectionValue', selectionPath: t.getSelectionPath(), underlyingError: zo }); -} -var Bn = class e { - constructor(t) { - this.params = t; - this.params.modelName && - (this.modelOrType = - this.params.runtimeDataModel.models[this.params.modelName] ?? - this.params.runtimeDataModel.types[this.params.modelName]); - } - modelOrType; - throwValidationError(t) { - Ur({ - errors: [t], - originalMethod: this.params.originalMethod, - args: this.params.rootArgs ?? {}, - callsite: this.params.callsite, - errorFormat: this.params.errorFormat, - clientVersion: this.params.clientVersion, - globalOmit: this.params.globalOmit, - }); - } - getSelectionPath() { - return this.params.selectionPath; - } - getArgumentPath() { - return this.params.argumentPath; - } - getArgumentName() { - return this.params.argumentPath[this.params.argumentPath.length - 1]; - } - getOutputTypeDescription() { - if (!(!this.params.modelName || !this.modelOrType)) - return { - name: this.params.modelName, - fields: this.modelOrType.fields.map((t) => ({ - name: t.name, - typeName: 'boolean', - isRelation: t.kind === 'object', - })), - }; - } - isRawAction() { - return ['executeRaw', 'queryRaw', 'runCommandRaw', 'findRaw', 'aggregateRaw'].includes(this.params.action); - } - isPreviewFeatureOn(t) { - return this.params.previewFeatures.includes(t); - } - getComputedFields() { - if (this.params.modelName) return this.params.extensions.getAllComputedFields(this.params.modelName); - } - findField(t) { - return this.modelOrType?.fields.find((r) => r.name === t); - } - nestSelection(t) { - let r = this.findField(t), - n = r?.kind === 'object' ? r.type : void 0; - return new e({ ...this.params, modelName: n, selectionPath: this.params.selectionPath.concat(t) }); - } - getGlobalOmit() { - return this.params.modelName && this.shouldApplyGlobalOmit() - ? (this.params.globalOmit?.[Oe(this.params.modelName)] ?? {}) - : {}; - } - shouldApplyGlobalOmit() { - switch (this.params.action) { - case 'findFirst': - case 'findFirstOrThrow': - case 'findUniqueOrThrow': - case 'findMany': - case 'upsert': - case 'findUnique': - case 'createManyAndReturn': - case 'create': - case 'update': - case 'updateManyAndReturn': - case 'delete': - return !0; - case 'executeRaw': - case 'aggregateRaw': - case 'runCommandRaw': - case 'findRaw': - case 'createMany': - case 'deleteMany': - case 'groupBy': - case 'updateMany': - case 'count': - case 'aggregate': - case 'queryRaw': - return !1; - default: - qe(this.params.action, 'Unknown action'); - } - } - nestArgument(t) { - return new e({ ...this.params, argumentPath: this.params.argumentPath.concat(t) }); - } -}; -f(); -u(); -c(); -p(); -m(); -function Xo(e) { - if (!e._hasPreviewFlag('metrics')) - throw new X('`metrics` preview feature must be enabled in order to access metrics API', { - clientVersion: e._clientVersion, - }); -} -var pt = class { - _client; - constructor(t) { - this._client = t; - } - prometheus(t) { - return (Xo(this._client), this._client._engine.metrics({ format: 'prometheus', ...t })); - } - json(t) { - return (Xo(this._client), this._client._engine.metrics({ format: 'json', ...t })); - } -}; -f(); -u(); -c(); -p(); -m(); -function es(e, t) { - let r = It(() => Tc(t)); - Object.defineProperty(e, 'dmmf', { get: () => r.get() }); -} -function Tc(e) { - return { datamodel: { models: Vn(e.models), enums: Vn(e.enums), types: Vn(e.types) } }; -} -function Vn(e) { - return Object.entries(e).map(([t, r]) => ({ name: t, ...r })); -} -f(); -u(); -c(); -p(); -m(); -var $n = new WeakMap(), - jr = '$$PrismaTypedSql', - $t = class { - constructor(t, r) { - ($n.set(this, { sql: t, values: r }), Object.defineProperty(this, jr, { value: jr })); - } - get sql() { - return $n.get(this).sql; - } - get values() { - return $n.get(this).values; - } - }; -function ts(e) { - return (...t) => new $t(e, t); -} -function Gr(e) { - return e != null && e[jr] === jr; -} -f(); -u(); -c(); -p(); -m(); -var Ea = Ue(vn()); -f(); -u(); -c(); -p(); -m(); -rs(); -Qi(); -zi(); -f(); -u(); -c(); -p(); -m(); -var se = class e { - constructor(t, r) { - if (t.length - 1 !== r.length) - throw t.length === 0 - ? new TypeError('Expected at least 1 string') - : new TypeError(`Expected ${t.length} strings to have ${t.length - 1} values`); - let n = r.reduce((s, a) => s + (a instanceof e ? a.values.length : 1), 0); - ((this.values = new Array(n)), (this.strings = new Array(n + 1)), (this.strings[0] = t[0])); - let i = 0, - o = 0; - for (; i < r.length; ) { - let s = r[i++], - a = t[i]; - if (s instanceof e) { - this.strings[o] += s.strings[0]; - let l = 0; - for (; l < s.values.length; ) ((this.values[o++] = s.values[l++]), (this.strings[o] = s.strings[l])); - this.strings[o] += a; - } else ((this.values[o++] = s), (this.strings[o] = a)); - } - } - get sql() { - let t = this.strings.length, - r = 1, - n = this.strings[0]; - for (; r < t; ) n += `?${this.strings[r++]}`; - return n; - } - get statement() { - let t = this.strings.length, - r = 1, - n = this.strings[0]; - for (; r < t; ) n += `:${r}${this.strings[r++]}`; - return n; - } - get text() { - let t = this.strings.length, - r = 1, - n = this.strings[0]; - for (; r < t; ) n += `$${r}${this.strings[r++]}`; - return n; - } - inspect() { - return { sql: this.sql, statement: this.statement, text: this.text, values: this.values }; - } -}; -function ns(e, t = ',', r = '', n = '') { - if (e.length === 0) - throw new TypeError('Expected `join([])` to be called with an array of multiple elements, but got an empty array'); - return new se([r, ...Array(e.length - 1).fill(t), n], e); -} -function jn(e) { - return new se([e], []); -} -var is = jn(''); -function Gn(e, ...t) { - return new se(e, t); -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -function jt(e) { - return { - getKeys() { - return Object.keys(e); - }, - getPropertyValue(t) { - return e[t]; - }, - }; -} -f(); -u(); -c(); -p(); -m(); -function te(e, t) { - return { - getKeys() { - return [e]; - }, - getPropertyValue() { - return t(); - }, - }; -} -f(); -u(); -c(); -p(); -m(); -function Ve(e) { - let t = new ge(); - return { - getKeys() { - return e.getKeys(); - }, - getPropertyValue(r) { - return t.getOrCreate(r, () => e.getPropertyValue(r)); - }, - getPropertyDescriptor(r) { - return e.getPropertyDescriptor?.(r); - }, - }; -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Qr = { enumerable: !0, configurable: !0, writable: !0 }; -function Kr(e) { - let t = new Set(e); - return { - getPrototypeOf: () => Object.prototype, - getOwnPropertyDescriptor: () => Qr, - has: (r, n) => t.has(n), - set: (r, n, i) => t.add(n) && Reflect.set(r, n, i), - ownKeys: () => [...t], - }; -} -var os = Symbol.for('nodejs.util.inspect.custom'); -function me(e, t) { - let r = Ac(t), - n = new Set(), - i = new Proxy(e, { - get(o, s) { - if (n.has(s)) return o[s]; - let a = r.get(s); - return a ? a.getPropertyValue(s) : o[s]; - }, - has(o, s) { - if (n.has(s)) return !0; - let a = r.get(s); - return a ? (a.has?.(s) ?? !0) : Reflect.has(o, s); - }, - ownKeys(o) { - let s = ss(Reflect.ownKeys(o), r), - a = ss(Array.from(r.keys()), r); - return [...new Set([...s, ...a, ...n])]; - }, - set(o, s, a) { - return r.get(s)?.getPropertyDescriptor?.(s)?.writable === !1 ? !1 : (n.add(s), Reflect.set(o, s, a)); - }, - getOwnPropertyDescriptor(o, s) { - let a = Reflect.getOwnPropertyDescriptor(o, s); - if (a && !a.configurable) return a; - let l = r.get(s); - return l ? (l.getPropertyDescriptor ? { ...Qr, ...l?.getPropertyDescriptor(s) } : Qr) : a; - }, - defineProperty(o, s, a) { - return (n.add(s), Reflect.defineProperty(o, s, a)); - }, - getPrototypeOf: () => Object.prototype, - }); - return ( - (i[os] = function () { - let o = { ...this }; - return (delete o[os], o); - }), - i - ); -} -function Ac(e) { - let t = new Map(); - for (let r of e) { - let n = r.getKeys(); - for (let i of n) t.set(i, r); - } - return t; -} -function ss(e, t) { - return e.filter((r) => t.get(r)?.has?.(r) ?? !0); -} -f(); -u(); -c(); -p(); -m(); -function mt(e) { - return { - getKeys() { - return e; - }, - has() { - return !1; - }, - getPropertyValue() {}, - }; -} -f(); -u(); -c(); -p(); -m(); -function Wr(e, t) { - return { batch: e, transaction: t?.kind === 'batch' ? { isolationLevel: t.options.isolationLevel } : void 0 }; -} -f(); -u(); -c(); -p(); -m(); -function as(e) { - if (e === void 0) return ''; - let t = ut(e); - return new nt(0, { colors: Dr }).write(t).toString(); -} -f(); -u(); -c(); -p(); -m(); -var Cc = 'P2037'; -function Hr({ error: e, user_facing_error: t }, r, n) { - return t.error_code - ? new ne(Rc(t, n), { code: t.error_code, clientVersion: r, meta: t.meta, batchRequestIdx: t.batch_request_idx }) - : new ie(e, { clientVersion: r, batchRequestIdx: t.batch_request_idx }); -} -function Rc(e, t) { - let r = e.message; - return ( - (t === 'postgresql' || t === 'postgres' || t === 'mysql') && - e.error_code === Cc && - (r += ` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`), - r - ); -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Jn = class { - getLocation() { - return null; - } -}; -function Fe(e) { - return typeof $EnabledCallSite == 'function' && e !== 'minimal' ? new $EnabledCallSite() : new Jn(); -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var ls = { _avg: !0, _count: !0, _sum: !0, _min: !0, _max: !0 }; -function ft(e = {}) { - let t = Ic(e); - return Object.entries(t).reduce((n, [i, o]) => (ls[i] !== void 0 ? (n.select[i] = { select: o }) : (n[i] = o), n), { - select: {}, - }); -} -function Ic(e = {}) { - return typeof e._count == 'boolean' ? { ...e, _count: { _all: e._count } } : e; -} -function zr(e = {}) { - return (t) => (typeof e._count == 'boolean' && (t._count = t._count._all), t); -} -function us(e, t) { - let r = zr(e); - return t({ action: 'aggregate', unpacker: r, argsMapper: ft })(e); -} -f(); -u(); -c(); -p(); -m(); -function Oc(e = {}) { - let { select: t, ...r } = e; - return typeof t == 'object' ? ft({ ...r, _count: t }) : ft({ ...r, _count: { _all: !0 } }); -} -function kc(e = {}) { - return typeof e.select == 'object' ? (t) => zr(e)(t)._count : (t) => zr(e)(t)._count._all; -} -function cs(e, t) { - return t({ action: 'count', unpacker: kc(e), argsMapper: Oc })(e); -} -f(); -u(); -c(); -p(); -m(); -function Dc(e = {}) { - let t = ft(e); - if (Array.isArray(t.by)) for (let r of t.by) typeof r == 'string' && (t.select[r] = !0); - else typeof t.by == 'string' && (t.select[t.by] = !0); - return t; -} -function Mc(e = {}) { - return (t) => ( - typeof e?._count == 'boolean' && - t.forEach((r) => { - r._count = r._count._all; - }), - t - ); -} -function ps(e, t) { - return t({ action: 'groupBy', unpacker: Mc(e), argsMapper: Dc })(e); -} -function ms(e, t, r) { - if (t === 'aggregate') return (n) => us(n, r); - if (t === 'count') return (n) => cs(n, r); - if (t === 'groupBy') return (n) => ps(n, r); -} -f(); -u(); -c(); -p(); -m(); -function fs(e, t) { - let r = t.fields.filter((i) => !i.relationName), - n = uo(r, 'name'); - return new Proxy( - {}, - { - get(i, o) { - if (o in i || typeof o == 'symbol') return i[o]; - let s = n[o]; - if (s) return new Nt(e, o, s.type, s.isList, s.kind === 'enum'); - }, - ...Kr(Object.keys(n)), - } - ); -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var ds = (e) => (Array.isArray(e) ? e : e.split('.')), - Qn = (e, t) => ds(t).reduce((r, n) => r && r[n], e), - gs = (e, t, r) => ds(t).reduceRight((n, i, o, s) => Object.assign({}, Qn(e, s.slice(0, o)), { [i]: n }), r); -function _c(e, t) { - return e === void 0 || t === void 0 ? [] : [...t, 'select', e]; -} -function Nc(e, t, r) { - return t === void 0 ? (e ?? {}) : gs(t, r, e || !0); -} -function Kn(e, t, r, n, i, o) { - let a = e._runtimeDataModel.models[t].fields.reduce((l, d) => ({ ...l, [d.name]: d }), {}); - return (l) => { - let d = Fe(e._errorFormat), - g = _c(n, i), - h = Nc(l, o, g), - T = r({ dataPath: g, callsite: d })(h), - I = Fc(e, t); - return new Proxy(T, { - get(S, R) { - if (!I.includes(R)) return S[R]; - let F = [a[R].type, r, R], - B = [g, h]; - return Kn(e, ...F, ...B); - }, - ...Kr([...I, ...Object.getOwnPropertyNames(T)]), - }); - }; -} -function Fc(e, t) { - return e._runtimeDataModel.models[t].fields.filter((r) => r.kind === 'object').map((r) => r.name); -} -var Lc = ['findUnique', 'findUniqueOrThrow', 'findFirst', 'findFirstOrThrow', 'create', 'update', 'upsert', 'delete'], - Uc = ['aggregate', 'count', 'groupBy']; -function Wn(e, t) { - let r = e._extensions.getAllModelExtensions(t) ?? {}, - n = [Bc(e, t), Vc(e, t), jt(r), te('name', () => t), te('$name', () => t), te('$parent', () => e._appliedParent)]; - return me({}, n); -} -function Bc(e, t) { - let r = Ee(t), - n = Object.keys(kt).concat('count'); - return { - getKeys() { - return n; - }, - getPropertyValue(i) { - let o = i, - s = (a) => (l) => { - let d = Fe(e._errorFormat); - return e._createPrismaPromise( - (g) => { - let h = { - args: l, - dataPath: [], - action: o, - model: t, - clientMethod: `${r}.${i}`, - jsModelName: r, - transaction: g, - callsite: d, - }; - return e._request({ ...h, ...a }); - }, - { action: o, args: l, model: t } - ); - }; - return Lc.includes(o) ? Kn(e, t, s) : qc(i) ? ms(e, i, s) : s({}); - }, - }; -} -function qc(e) { - return Uc.includes(e); -} -function Vc(e, t) { - return Ve( - te('fields', () => { - let r = e._runtimeDataModel.models[t]; - return fs(t, r); - }) - ); -} -f(); -u(); -c(); -p(); -m(); -function hs(e) { - return e.replace(/^./, (t) => t.toUpperCase()); -} -var Hn = Symbol(); -function Gt(e) { - let t = [$c(e), jc(e), te(Hn, () => e), te('$parent', () => e._appliedParent)], - r = e._extensions.getAllClientExtensions(); - return (r && t.push(jt(r)), me(e, t)); -} -function $c(e) { - let t = Object.getPrototypeOf(e._originalClient), - r = [...new Set(Object.getOwnPropertyNames(t))]; - return { - getKeys() { - return r; - }, - getPropertyValue(n) { - return e[n]; - }, - }; -} -function jc(e) { - let t = Object.keys(e._runtimeDataModel.models), - r = t.map(Ee), - n = [...new Set(t.concat(r))]; - return Ve({ - getKeys() { - return n; - }, - getPropertyValue(i) { - let o = hs(i); - if (e._runtimeDataModel.models[o] !== void 0) return Wn(e, o); - if (e._runtimeDataModel.models[i] !== void 0) return Wn(e, i); - }, - getPropertyDescriptor(i) { - if (!r.includes(i)) return { enumerable: !1 }; - }, - }); -} -function ys(e) { - return e[Hn] ? e[Hn] : e; -} -function ws(e) { - if (typeof e == 'function') return e(this); - if (e.client?.__AccelerateEngine) { - let r = e.client.__AccelerateEngine; - this._originalClient._engine = new r(this._originalClient._accelerateEngineConfig); - } - let t = Object.create(this._originalClient, { - _extensions: { value: this._extensions.append(e) }, - _appliedParent: { value: this, configurable: !0 }, - $on: { value: void 0 }, - }); - return Gt(t); -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -function Es({ result: e, modelName: t, select: r, omit: n, extensions: i }) { - let o = i.getAllComputedFields(t); - if (!o) return e; - let s = [], - a = []; - for (let l of Object.values(o)) { - if (n) { - if (n[l.name]) continue; - let d = l.needs.filter((g) => n[g]); - d.length > 0 && a.push(mt(d)); - } else if (r) { - if (!r[l.name]) continue; - let d = l.needs.filter((g) => !r[g]); - d.length > 0 && a.push(mt(d)); - } - Gc(e, l.needs) && s.push(Jc(l, me(e, s))); - } - return s.length > 0 || a.length > 0 ? me(e, [...s, ...a]) : e; -} -function Gc(e, t) { - return t.every((r) => Cn(e, r)); -} -function Jc(e, t) { - return Ve(te(e.name, () => e.compute(t))); -} -f(); -u(); -c(); -p(); -m(); -function Yr({ visitor: e, result: t, args: r, runtimeDataModel: n, modelName: i }) { - if (Array.isArray(t)) { - for (let s = 0; s < t.length; s++) - t[s] = Yr({ result: t[s], args: r, modelName: i, runtimeDataModel: n, visitor: e }); - return t; - } - let o = e(t, i, r) ?? t; - return ( - r.include && bs({ includeOrSelect: r.include, result: o, parentModelName: i, runtimeDataModel: n, visitor: e }), - r.select && bs({ includeOrSelect: r.select, result: o, parentModelName: i, runtimeDataModel: n, visitor: e }), - o - ); -} -function bs({ includeOrSelect: e, result: t, parentModelName: r, runtimeDataModel: n, visitor: i }) { - for (let [o, s] of Object.entries(e)) { - if (!s || t[o] == null || be(s)) continue; - let l = n.models[r].fields.find((g) => g.name === o); - if (!l || l.kind !== 'object' || !l.relationName) continue; - let d = typeof s == 'object' ? s : {}; - t[o] = Yr({ visitor: i, result: t[o], args: d, modelName: l.type, runtimeDataModel: n }); - } -} -function xs({ result: e, modelName: t, args: r, extensions: n, runtimeDataModel: i, globalOmit: o }) { - return n.isEmpty() || e == null || typeof e != 'object' || !i.models[t] - ? e - : Yr({ - result: e, - args: r ?? {}, - modelName: t, - runtimeDataModel: i, - visitor: (a, l, d) => { - let g = Ee(l); - return Es({ - result: a, - modelName: g, - select: d.select, - omit: d.select ? void 0 : { ...o?.[g], ...d.omit }, - extensions: n, - }); - }, - }); -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Qc = ['$connect', '$disconnect', '$on', '$transaction', '$extends'], - Ps = Qc; -function vs(e) { - if (e instanceof se) return Kc(e); - if (Gr(e)) return Wc(e); - if (Array.isArray(e)) { - let r = [e[0]]; - for (let n = 1; n < e.length; n++) r[n] = Jt(e[n]); - return r; - } - let t = {}; - for (let r in e) t[r] = Jt(e[r]); - return t; -} -function Kc(e) { - return new se(e.strings, e.values); -} -function Wc(e) { - return new $t(e.sql, e.values); -} -function Jt(e) { - if (typeof e != 'object' || e == null || e instanceof Ce || lt(e)) return e; - if (rt(e)) return new Ae(e.toFixed()); - if (Xe(e)) return new Date(+e); - if (ArrayBuffer.isView(e)) return e.slice(0); - if (Array.isArray(e)) { - let t = e.length, - r; - for (r = Array(t); t--; ) r[t] = Jt(e[t]); - return r; - } - if (typeof e == 'object') { - let t = {}; - for (let r in e) - r === '__proto__' - ? Object.defineProperty(t, r, { value: Jt(e[r]), configurable: !0, enumerable: !0, writable: !0 }) - : (t[r] = Jt(e[r])); - return t; - } - qe(e, 'Unknown value'); -} -function As(e, t, r, n = 0) { - return e._createPrismaPromise((i) => { - let o = t.customDataProxyFetch; - return ( - 'transaction' in t && - i !== void 0 && - (t.transaction?.kind === 'batch' && t.transaction.lock.then(), (t.transaction = i)), - n === r.length - ? e._executeRequest(t) - : r[n]({ - model: t.model, - operation: t.model ? t.action : t.clientMethod, - args: vs(t.args ?? {}), - __internalParams: t, - query: (s, a = t) => { - let l = a.customDataProxyFetch; - return ((a.customDataProxyFetch = Is(o, l)), (a.args = s), As(e, a, r, n + 1)); - }, - }) - ); - }); -} -function Cs(e, t) { - let { jsModelName: r, action: n, clientMethod: i } = t, - o = r ? n : i; - if (e._extensions.isEmpty()) return e._executeRequest(t); - let s = e._extensions.getAllQueryCallbacks(r ?? '$none', o); - return As(e, t, s); -} -function Rs(e) { - return (t) => { - let r = { requests: t }, - n = t[0].extensions.getAllBatchQueryCallbacks(); - return n.length ? Ss(r, n, 0, e) : e(r); - }; -} -function Ss(e, t, r, n) { - if (r === t.length) return n(e); - let i = e.customDataProxyFetch, - o = e.requests[0].transaction; - return t[r]({ - args: { - queries: e.requests.map((s) => ({ model: s.modelName, operation: s.action, args: s.args })), - transaction: o ? { isolationLevel: o.kind === 'batch' ? o.isolationLevel : void 0 } : void 0, - }, - __internalParams: e, - query(s, a = e) { - let l = a.customDataProxyFetch; - return ((a.customDataProxyFetch = Is(i, l)), Ss(a, t, r + 1, n)); - }, - }); -} -var Ts = (e) => e; -function Is(e = Ts, t = Ts) { - return (r) => e(t(r)); -} -f(); -u(); -c(); -p(); -m(); -var Os = z('prisma:client'), - ks = { Vercel: 'vercel', 'Netlify CI': 'netlify' }; -function Ds({ postinstall: e, ciName: t, clientVersion: r }) { - if ((Os('checkPlatformCaching:postinstall', e), Os('checkPlatformCaching:ciName', t), e === !0 && t && t in ks)) { - let n = `Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${ks[t]}-build`; - throw (console.error(n), new Q(n, r)); - } -} -f(); -u(); -c(); -p(); -m(); -function Ms(e, t) { - return e ? (e.datasources ? e.datasources : e.datasourceUrl ? { [t[0]]: { url: e.datasourceUrl } } : {}) : {}; -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Hc = () => globalThis.process?.release?.name === 'node', - zc = () => !!globalThis.Bun || !!globalThis.process?.versions?.bun, - Yc = () => !!globalThis.Deno, - Zc = () => typeof globalThis.Netlify == 'object', - Xc = () => typeof globalThis.EdgeRuntime == 'object', - ep = () => globalThis.navigator?.userAgent === 'Cloudflare-Workers'; -function tp() { - return ( - [ - [Zc, 'netlify'], - [Xc, 'edge-light'], - [ep, 'workerd'], - [Yc, 'deno'], - [zc, 'bun'], - [Hc, 'node'], - ] - .flatMap((r) => (r[0]() ? [r[1]] : [])) - .at(0) ?? '' - ); -} -var rp = { - node: 'Node.js', - workerd: 'Cloudflare Workers', - deno: 'Deno and Deno Deploy', - netlify: 'Netlify Edge Functions', - 'edge-light': - 'Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)', -}; -function Zr() { - let e = tp(); - return { id: e, prettyName: rp[e] || e, isEdge: ['workerd', 'deno', 'netlify', 'edge-light'].includes(e) }; -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -function _s(e, t) { - throw new Error(t); -} -function np(e) { - return e !== null && typeof e == 'object' && typeof e.$type == 'string'; -} -function ip(e, t) { - let r = {}; - for (let n of Object.keys(e)) r[n] = t(e[n], n); - return r; -} -function dt(e) { - return e === null - ? e - : Array.isArray(e) - ? e.map(dt) - : typeof e == 'object' - ? np(e) - ? op(e) - : e.constructor !== null && e.constructor.name !== 'Object' - ? e - : ip(e, dt) - : e; -} -function op({ $type: e, value: t }) { - switch (e) { - case 'BigInt': - return BigInt(t); - case 'Bytes': { - let { buffer: r, byteOffset: n, byteLength: i } = w.Buffer.from(t, 'base64'); - return new Uint8Array(r, n, i); - } - case 'DateTime': - return new Date(t); - case 'Decimal': - return new Te(t); - case 'Json': - return JSON.parse(t); - default: - _s(t, 'Unknown tagged value'); - } -} -var Ns = '6.14.0'; -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -function gt({ inlineDatasources: e, overrideDatasources: t, env: r, clientVersion: n }) { - let i, - o = Object.keys(e)[0], - s = e[o]?.url, - a = t[o]?.url; - if ( - (o === void 0 ? (i = void 0) : a ? (i = a) : s?.value ? (i = s.value) : s?.fromEnvVar && (i = r[s.fromEnvVar]), - s?.fromEnvVar !== void 0 && i === void 0) - ) - throw Zr().id === 'workerd' - ? new Q( - `error: Environment variable not found: ${s.fromEnvVar}. - -In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`, - n - ) - : new Q(`error: Environment variable not found: ${s.fromEnvVar}.`, n); - if (i === void 0) throw new Q('error: Missing URL environment variable, value, or override.', n); - return i; -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Xr = class extends Error { - clientVersion; - cause; - constructor(t, r) { - (super(t), (this.clientVersion = r.clientVersion), (this.cause = r.cause)); - } - get [Symbol.toStringTag]() { - return this.name; - } -}; -var ae = class extends Xr { - isRetryable; - constructor(t, r) { - (super(t, r), (this.isRetryable = r.isRetryable ?? !0)); - } -}; -f(); -u(); -c(); -p(); -m(); -function U(e, t) { - return { ...e, isRetryable: t }; -} -var $e = class extends ae { - name = 'InvalidDatasourceError'; - code = 'P6001'; - constructor(t, r) { - super(t, U(r, !1)); - } -}; -N($e, 'InvalidDatasourceError'); -function Fs(e) { - let t = { clientVersion: e.clientVersion }, - r = Object.keys(e.inlineDatasources)[0], - n = gt({ - inlineDatasources: e.inlineDatasources, - overrideDatasources: e.overrideDatasources, - clientVersion: e.clientVersion, - env: { ...e.env, ...(typeof y < 'u' ? y.env : {}) }, - }), - i; - try { - i = new URL(n); - } catch { - throw new $e(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``, t); - } - let { protocol: o, searchParams: s } = i; - if (o !== 'prisma:' && o !== hr) - throw new $e( - `Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``, - t - ); - let a = s.get('api_key'); - if (a === null || a.length < 1) - throw new $e(`Error validating datasource \`${r}\`: the URL must contain a valid API key`, t); - let l = Tn(i) ? 'http:' : 'https:', - d = new URL(i.href.replace(o, l)); - return { apiKey: a, url: d }; -} -f(); -u(); -c(); -p(); -m(); -var Ls = Ue(Zi()), - en = class { - apiKey; - tracingHelper; - logLevel; - logQueries; - engineHash; - constructor({ apiKey: t, tracingHelper: r, logLevel: n, logQueries: i, engineHash: o }) { - ((this.apiKey = t), (this.tracingHelper = r), (this.logLevel = n), (this.logQueries = i), (this.engineHash = o)); - } - build({ traceparent: t, transactionId: r } = {}) { - let n = { - Accept: 'application/json', - Authorization: `Bearer ${this.apiKey}`, - 'Content-Type': 'application/json', - 'Prisma-Engine-Hash': this.engineHash, - 'Prisma-Engine-Version': Ls.enginesVersion, - }; - (this.tracingHelper.isEnabled() && (n.traceparent = t ?? this.tracingHelper.getTraceParent()), - r && (n['X-Transaction-Id'] = r)); - let i = this.#e(); - return (i.length > 0 && (n['X-Capture-Telemetry'] = i.join(', ')), n); - } - #e() { - let t = []; - return ( - this.tracingHelper.isEnabled() && t.push('tracing'), - this.logLevel && t.push(this.logLevel), - this.logQueries && t.push('query'), - t - ); - } - }; -f(); -u(); -c(); -p(); -m(); -function ap(e) { - return e[0] * 1e3 + e[1] / 1e6; -} -function zn(e) { - return new Date(ap(e)); -} -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var ht = class extends ae { - name = 'ForcedRetryError'; - code = 'P5001'; - constructor(t) { - super('This request must be retried', U(t, !0)); - } -}; -N(ht, 'ForcedRetryError'); -f(); -u(); -c(); -p(); -m(); -var je = class extends ae { - name = 'NotImplementedYetError'; - code = 'P5004'; - constructor(t, r) { - super(t, U(r, !1)); - } -}; -N(je, 'NotImplementedYetError'); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var G = class extends ae { - response; - constructor(t, r) { - (super(t, r), (this.response = r.response)); - let n = this.response.headers.get('prisma-request-id'); - if (n) { - let i = `(The request id was: ${n})`; - this.message = this.message + ' ' + i; - } - } -}; -var Ge = class extends G { - name = 'SchemaMissingError'; - code = 'P5005'; - constructor(t) { - super('Schema needs to be uploaded', U(t, !0)); - } -}; -N(Ge, 'SchemaMissingError'); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Yn = 'This request could not be understood by the server', - Qt = class extends G { - name = 'BadRequestError'; - code = 'P5000'; - constructor(t, r, n) { - (super(r || Yn, U(t, !1)), n && (this.code = n)); - } - }; -N(Qt, 'BadRequestError'); -f(); -u(); -c(); -p(); -m(); -var Kt = class extends G { - name = 'HealthcheckTimeoutError'; - code = 'P5013'; - logs; - constructor(t, r) { - (super('Engine not started: healthcheck timeout', U(t, !0)), (this.logs = r)); - } -}; -N(Kt, 'HealthcheckTimeoutError'); -f(); -u(); -c(); -p(); -m(); -var Wt = class extends G { - name = 'EngineStartupError'; - code = 'P5014'; - logs; - constructor(t, r, n) { - (super(r, U(t, !0)), (this.logs = n)); - } -}; -N(Wt, 'EngineStartupError'); -f(); -u(); -c(); -p(); -m(); -var Ht = class extends G { - name = 'EngineVersionNotSupportedError'; - code = 'P5012'; - constructor(t) { - super('Engine version is not supported', U(t, !1)); - } -}; -N(Ht, 'EngineVersionNotSupportedError'); -f(); -u(); -c(); -p(); -m(); -var Zn = 'Request timed out', - zt = class extends G { - name = 'GatewayTimeoutError'; - code = 'P5009'; - constructor(t, r = Zn) { - super(r, U(t, !1)); - } - }; -N(zt, 'GatewayTimeoutError'); -f(); -u(); -c(); -p(); -m(); -var lp = 'Interactive transaction error', - Yt = class extends G { - name = 'InteractiveTransactionError'; - code = 'P5015'; - constructor(t, r = lp) { - super(r, U(t, !1)); - } - }; -N(Yt, 'InteractiveTransactionError'); -f(); -u(); -c(); -p(); -m(); -var up = 'Request parameters are invalid', - Zt = class extends G { - name = 'InvalidRequestError'; - code = 'P5011'; - constructor(t, r = up) { - super(r, U(t, !1)); - } - }; -N(Zt, 'InvalidRequestError'); -f(); -u(); -c(); -p(); -m(); -var Xn = 'Requested resource does not exist', - Xt = class extends G { - name = 'NotFoundError'; - code = 'P5003'; - constructor(t, r = Xn) { - super(r, U(t, !1)); - } - }; -N(Xt, 'NotFoundError'); -f(); -u(); -c(); -p(); -m(); -var ei = 'Unknown server error', - yt = class extends G { - name = 'ServerError'; - code = 'P5006'; - logs; - constructor(t, r, n) { - (super(r || ei, U(t, !0)), (this.logs = n)); - } - }; -N(yt, 'ServerError'); -f(); -u(); -c(); -p(); -m(); -var ti = 'Unauthorized, check your connection string', - er = class extends G { - name = 'UnauthorizedError'; - code = 'P5007'; - constructor(t, r = ti) { - super(r, U(t, !1)); - } - }; -N(er, 'UnauthorizedError'); -f(); -u(); -c(); -p(); -m(); -var ri = 'Usage exceeded, retry again later', - tr = class extends G { - name = 'UsageExceededError'; - code = 'P5008'; - constructor(t, r = ri) { - super(r, U(t, !0)); - } - }; -N(tr, 'UsageExceededError'); -async function cp(e) { - let t; - try { - t = await e.text(); - } catch { - return { type: 'EmptyError' }; - } - try { - let r = JSON.parse(t); - if (typeof r == 'string') - switch (r) { - case 'InternalDataProxyError': - return { type: 'DataProxyError', body: r }; - default: - return { type: 'UnknownTextError', body: r }; - } - if (typeof r == 'object' && r !== null) { - if ('is_panic' in r && 'message' in r && 'error_code' in r) return { type: 'QueryEngineError', body: r }; - if ('EngineNotStarted' in r || 'InteractiveTransactionMisrouted' in r || 'InvalidRequestError' in r) { - let n = Object.values(r)[0].reason; - return typeof n == 'string' && !['SchemaMissing', 'EngineVersionNotSupported'].includes(n) - ? { type: 'UnknownJsonError', body: r } - : { type: 'DataProxyError', body: r }; - } - } - return { type: 'UnknownJsonError', body: r }; - } catch { - return t === '' ? { type: 'EmptyError' } : { type: 'UnknownTextError', body: t }; - } -} -async function rr(e, t) { - if (e.ok) return; - let r = { clientVersion: t, response: e }, - n = await cp(e); - if (n.type === 'QueryEngineError') throw new ne(n.body.message, { code: n.body.error_code, clientVersion: t }); - if (n.type === 'DataProxyError') { - if (n.body === 'InternalDataProxyError') throw new yt(r, 'Internal Data Proxy error'); - if ('EngineNotStarted' in n.body) { - if (n.body.EngineNotStarted.reason === 'SchemaMissing') return new Ge(r); - if (n.body.EngineNotStarted.reason === 'EngineVersionNotSupported') throw new Ht(r); - if ('EngineStartupError' in n.body.EngineNotStarted.reason) { - let { msg: i, logs: o } = n.body.EngineNotStarted.reason.EngineStartupError; - throw new Wt(r, i, o); - } - if ('KnownEngineStartupError' in n.body.EngineNotStarted.reason) { - let { msg: i, error_code: o } = n.body.EngineNotStarted.reason.KnownEngineStartupError; - throw new Q(i, t, o); - } - if ('HealthcheckTimeout' in n.body.EngineNotStarted.reason) { - let { logs: i } = n.body.EngineNotStarted.reason.HealthcheckTimeout; - throw new Kt(r, i); - } - } - if ('InteractiveTransactionMisrouted' in n.body) { - let i = { - IDParseError: 'Could not parse interactive transaction ID', - NoQueryEngineFoundError: 'Could not find Query Engine for the specified host and transaction ID', - TransactionStartError: 'Could not start interactive transaction', - }; - throw new Yt(r, i[n.body.InteractiveTransactionMisrouted.reason]); - } - if ('InvalidRequestError' in n.body) throw new Zt(r, n.body.InvalidRequestError.reason); - } - if (e.status === 401 || e.status === 403) throw new er(r, wt(ti, n)); - if (e.status === 404) return new Xt(r, wt(Xn, n)); - if (e.status === 429) throw new tr(r, wt(ri, n)); - if (e.status === 504) throw new zt(r, wt(Zn, n)); - if (e.status >= 500) throw new yt(r, wt(ei, n)); - if (e.status >= 400) throw new Qt(r, wt(Yn, n)); -} -function wt(e, t) { - return t.type === 'EmptyError' ? e : `${e}: ${JSON.stringify(t)}`; -} -f(); -u(); -c(); -p(); -m(); -function Us(e) { - let t = Math.pow(2, e) * 50, - r = Math.ceil(Math.random() * t) - Math.ceil(t / 2), - n = t + r; - return new Promise((i) => setTimeout(() => i(n), n)); -} -f(); -u(); -c(); -p(); -m(); -var Re = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; -function Bs(e) { - let t = new TextEncoder().encode(e), - r = '', - n = t.byteLength, - i = n % 3, - o = n - i, - s, - a, - l, - d, - g; - for (let h = 0; h < o; h = h + 3) - ((g = (t[h] << 16) | (t[h + 1] << 8) | t[h + 2]), - (s = (g & 16515072) >> 18), - (a = (g & 258048) >> 12), - (l = (g & 4032) >> 6), - (d = g & 63), - (r += Re[s] + Re[a] + Re[l] + Re[d])); - return ( - i == 1 - ? ((g = t[o]), (s = (g & 252) >> 2), (a = (g & 3) << 4), (r += Re[s] + Re[a] + '==')) - : i == 2 && - ((g = (t[o] << 8) | t[o + 1]), - (s = (g & 64512) >> 10), - (a = (g & 1008) >> 4), - (l = (g & 15) << 2), - (r += Re[s] + Re[a] + Re[l] + '=')), - r - ); -} -f(); -u(); -c(); -p(); -m(); -function qs(e) { - if (!!e.generator?.previewFeatures.some((r) => r.toLowerCase().includes('metrics'))) - throw new Q( - 'The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate', - e.clientVersion - ); -} -f(); -u(); -c(); -p(); -m(); -var Vs = { - '@prisma/debug': 'workspace:*', - '@prisma/engines-version': '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - '@prisma/fetch-engine': 'workspace:*', - '@prisma/get-platform': 'workspace:*', -}; -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var nr = class extends ae { - name = 'RequestError'; - code = 'P5010'; - constructor(t, r) { - super( - `Cannot fetch data from service: -${t}`, - U(r, !0) - ); - } -}; -N(nr, 'RequestError'); -async function Je(e, t, r = (n) => n) { - let { clientVersion: n, ...i } = t, - o = r(fetch); - try { - return await o(e, i); - } catch (s) { - let a = s.message ?? 'Unknown error'; - throw new nr(a, { clientVersion: n, cause: s }); - } -} -var mp = /^[1-9][0-9]*\.[0-9]+\.[0-9]+$/, - $s = z('prisma:client:dataproxyEngine'); -async function fp(e, t) { - let r = Vs['@prisma/engines-version'], - n = t.clientVersion ?? 'unknown'; - if (y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION || globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION) - return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION || globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION; - if (e.includes('accelerate') && n !== '0.0.0' && n !== 'in-memory') return n; - let [i, o] = n?.split('-') ?? []; - if (o === void 0 && mp.test(i)) return i; - if (o !== void 0 || n === '0.0.0' || n === 'in-memory') { - let [s] = r.split('-') ?? [], - [a, l, d] = s.split('.'), - g = dp(`<=${a}.${l}.${d}`), - h = await Je(g, { clientVersion: n }); - if (!h.ok) - throw new Error( - `Failed to fetch stable Prisma version, unpkg.com status ${h.status} ${h.statusText}, response body: ${(await h.text()) || ''}` - ); - let T = await h.text(); - $s('length of body fetched from unpkg.com', T.length); - let I; - try { - I = JSON.parse(T); - } catch (S) { - throw (console.error('JSON.parse error: body fetched from unpkg.com: ', T), S); - } - return I.version; - } - throw new je('Only `major.minor.patch` versions are supported by Accelerate.', { clientVersion: n }); -} -async function js(e, t) { - let r = await fp(e, t); - return ($s('version', r), r); -} -function dp(e) { - return encodeURI(`https://unpkg.com/prisma@${e}/package.json`); -} -var Gs = 3, - ir = z('prisma:client:dataproxyEngine'), - Et = class { - name = 'DataProxyEngine'; - inlineSchema; - inlineSchemaHash; - inlineDatasources; - config; - logEmitter; - env; - clientVersion; - engineHash; - tracingHelper; - remoteClientVersion; - host; - headerBuilder; - startPromise; - protocol; - constructor(t) { - (qs(t), - (this.config = t), - (this.env = t.env), - (this.inlineSchema = Bs(t.inlineSchema)), - (this.inlineDatasources = t.inlineDatasources), - (this.inlineSchemaHash = t.inlineSchemaHash), - (this.clientVersion = t.clientVersion), - (this.engineHash = t.engineVersion), - (this.logEmitter = t.logEmitter), - (this.tracingHelper = t.tracingHelper)); - } - apiKey() { - return this.headerBuilder.apiKey; - } - version() { - return this.engineHash; - } - async start() { - (this.startPromise !== void 0 && (await this.startPromise), - (this.startPromise = (async () => { - let { apiKey: t, url: r } = this.getURLAndAPIKey(); - ((this.host = r.host), - (this.protocol = r.protocol), - (this.headerBuilder = new en({ - apiKey: t, - tracingHelper: this.tracingHelper, - logLevel: this.config.logLevel ?? 'error', - logQueries: this.config.logQueries, - engineHash: this.engineHash, - })), - (this.remoteClientVersion = await js(this.host, this.config)), - ir('host', this.host), - ir('protocol', this.protocol)); - })()), - await this.startPromise); - } - async stop() {} - propagateResponseExtensions(t) { - (t?.logs?.length && - t.logs.forEach((r) => { - switch (r.level) { - case 'debug': - case 'trace': - ir(r); - break; - case 'error': - case 'warn': - case 'info': { - this.logEmitter.emit(r.level, { - timestamp: zn(r.timestamp), - message: r.attributes.message ?? '', - target: r.target, - }); - break; - } - case 'query': { - this.logEmitter.emit('query', { - query: r.attributes.query ?? '', - timestamp: zn(r.timestamp), - duration: r.attributes.duration_ms ?? 0, - params: r.attributes.params ?? '', - target: r.target, - }); - break; - } - default: - r.level; - } - }), - t?.traces?.length && this.tracingHelper.dispatchEngineSpans(t.traces)); - } - onBeforeExit() { - throw new Error('"beforeExit" hook is not applicable to the remote query engine'); - } - async url(t) { - return ( - await this.start(), - `${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}` - ); - } - async uploadSchema() { - let t = { name: 'schemaUpload', internal: !0 }; - return this.tracingHelper.runInChildSpan(t, async () => { - let r = await Je(await this.url('schema'), { - method: 'PUT', - headers: this.headerBuilder.build(), - body: this.inlineSchema, - clientVersion: this.clientVersion, - }); - r.ok || ir('schema response status', r.status); - let n = await rr(r, this.clientVersion); - if (n) - throw ( - this.logEmitter.emit('warn', { - message: `Error while uploading schema: ${n.message}`, - timestamp: new Date(), - target: '', - }), - n - ); - this.logEmitter.emit('info', { - message: `Schema (re)uploaded (hash: ${this.inlineSchemaHash})`, - timestamp: new Date(), - target: '', - }); - }); - } - request(t, { traceparent: r, interactiveTransaction: n, customDataProxyFetch: i }) { - return this.requestInternal({ body: t, traceparent: r, interactiveTransaction: n, customDataProxyFetch: i }); - } - async requestBatch(t, { traceparent: r, transaction: n, customDataProxyFetch: i }) { - let o = n?.kind === 'itx' ? n.options : void 0, - s = Wr(t, n); - return ( - await this.requestInternal({ body: s, customDataProxyFetch: i, interactiveTransaction: o, traceparent: r }) - ).map( - (l) => ( - l.extensions && this.propagateResponseExtensions(l.extensions), - 'errors' in l ? this.convertProtocolErrorsToClientError(l.errors) : l - ) - ); - } - requestInternal({ body: t, traceparent: r, customDataProxyFetch: n, interactiveTransaction: i }) { - return this.withRetry({ - actionGerund: 'querying', - callback: async ({ logHttpCall: o }) => { - let s = i ? `${i.payload.endpoint}/graphql` : await this.url('graphql'); - o(s); - let a = await Je( - s, - { - method: 'POST', - headers: this.headerBuilder.build({ traceparent: r, transactionId: i?.id }), - body: JSON.stringify(t), - clientVersion: this.clientVersion, - }, - n - ); - (a.ok || ir('graphql response status', a.status), await this.handleError(await rr(a, this.clientVersion))); - let l = await a.json(); - if ((l.extensions && this.propagateResponseExtensions(l.extensions), 'errors' in l)) - throw this.convertProtocolErrorsToClientError(l.errors); - return 'batchResult' in l ? l.batchResult : l; - }, - }); - } - async transaction(t, r, n) { - let i = { start: 'starting', commit: 'committing', rollback: 'rolling back' }; - return this.withRetry({ - actionGerund: `${i[t]} transaction`, - callback: async ({ logHttpCall: o }) => { - if (t === 'start') { - let s = JSON.stringify({ max_wait: n.maxWait, timeout: n.timeout, isolation_level: n.isolationLevel }), - a = await this.url('transaction/start'); - o(a); - let l = await Je(a, { - method: 'POST', - headers: this.headerBuilder.build({ traceparent: r.traceparent }), - body: s, - clientVersion: this.clientVersion, - }); - await this.handleError(await rr(l, this.clientVersion)); - let d = await l.json(), - { extensions: g } = d; - g && this.propagateResponseExtensions(g); - let h = d.id, - T = d['data-proxy'].endpoint; - return { id: h, payload: { endpoint: T } }; - } else { - let s = `${n.payload.endpoint}/${t}`; - o(s); - let a = await Je(s, { - method: 'POST', - headers: this.headerBuilder.build({ traceparent: r.traceparent }), - clientVersion: this.clientVersion, - }); - await this.handleError(await rr(a, this.clientVersion)); - let l = await a.json(), - { extensions: d } = l; - d && this.propagateResponseExtensions(d); - return; - } - }, - }); - } - getURLAndAPIKey() { - return Fs({ - clientVersion: this.clientVersion, - env: this.env, - inlineDatasources: this.inlineDatasources, - overrideDatasources: this.config.overrideDatasources, - }); - } - metrics() { - throw new je('Metrics are not yet supported for Accelerate', { clientVersion: this.clientVersion }); - } - async withRetry(t) { - for (let r = 0; ; r++) { - let n = (i) => { - this.logEmitter.emit('info', { message: `Calling ${i} (n=${r})`, timestamp: new Date(), target: '' }); - }; - try { - return await t.callback({ logHttpCall: n }); - } catch (i) { - if (!(i instanceof ae) || !i.isRetryable) throw i; - if (r >= Gs) throw i instanceof ht ? i.cause : i; - this.logEmitter.emit('warn', { - message: `Attempt ${r + 1}/${Gs} failed for ${t.actionGerund}: ${i.message ?? '(unknown)'}`, - timestamp: new Date(), - target: '', - }); - let o = await Us(r); - this.logEmitter.emit('warn', { message: `Retrying after ${o}ms`, timestamp: new Date(), target: '' }); - } - } - } - async handleError(t) { - if (t instanceof Ge) throw (await this.uploadSchema(), new ht({ clientVersion: this.clientVersion, cause: t })); - if (t) throw t; - } - convertProtocolErrorsToClientError(t) { - return t.length === 1 - ? Hr(t[0], this.config.clientVersion, this.config.activeProvider) - : new ie(JSON.stringify(t), { clientVersion: this.config.clientVersion }); - } - applyPendingMigrations() { - throw new Error('Method not implemented.'); - } - }; -f(); -u(); -c(); -p(); -m(); -function Js({ url: e, adapter: t, copyEngine: r, targetBuildType: n }) { - let i = [], - o = [], - s = (R) => { - i.push({ _tag: 'warning', value: R }); - }, - a = (R) => { - let M = R.join(` -`); - o.push({ _tag: 'error', value: M }); - }, - l = !!e?.startsWith('prisma://'), - d = yr(e), - g = !!t, - h = l || d; - !g && - r && - h && - s([ - 'recommend--no-engine', - 'In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)', - ]); - let T = h || !r; - g && - (T || n === 'edge') && - (n === 'edge' - ? a([ - 'Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.', - 'Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor.', - ]) - : r - ? l && - a([ - 'Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.', - 'Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor.', - ]) - : a([ - 'Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.', - 'Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter.', - ])); - let I = { accelerate: T, ppg: d, driverAdapters: g }; - function S(R) { - return R.length > 0; - } - return S(o) - ? { ok: !1, diagnostics: { warnings: i, errors: o }, isUsing: I } - : { ok: !0, diagnostics: { warnings: i }, isUsing: I }; -} -function Qs({ copyEngine: e = !0 }, t) { - let r; - try { - r = gt({ - inlineDatasources: t.inlineDatasources, - overrideDatasources: t.overrideDatasources, - env: { ...t.env, ...y.env }, - clientVersion: t.clientVersion, - }); - } catch {} - let { - ok: n, - isUsing: i, - diagnostics: o, - } = Js({ url: r, adapter: t.adapter, copyEngine: e, targetBuildType: 'edge' }); - for (let h of o.warnings) St(...h.value); - if (!n) { - let h = o.errors[0]; - throw new X(h.value, { clientVersion: t.clientVersion }); - } - let s = Ze(t.generator), - a = s === 'library', - l = s === 'binary', - d = s === 'client', - g = (i.accelerate || i.ppg) && !i.driverAdapters; - return i.accelerate ? new Et(t) : (i.driverAdapters, i.accelerate, new Et(t)); -} -f(); -u(); -c(); -p(); -m(); -function tn({ generator: e }) { - return e?.previewFeatures ?? []; -} -f(); -u(); -c(); -p(); -m(); -var Ks = (e) => ({ command: e }); -f(); -u(); -c(); -p(); -m(); -f(); -u(); -c(); -p(); -m(); -var Ws = (e) => e.strings.reduce((t, r, n) => `${t}@P${n}${r}`); -f(); -u(); -c(); -p(); -m(); -function bt(e) { - try { - return Hs(e, 'fast'); - } catch { - return Hs(e, 'slow'); - } -} -function Hs(e, t) { - return JSON.stringify(e.map((r) => Ys(r, t))); -} -function Ys(e, t) { - if (Array.isArray(e)) return e.map((r) => Ys(r, t)); - if (typeof e == 'bigint') return { prisma__type: 'bigint', prisma__value: e.toString() }; - if (Xe(e)) return { prisma__type: 'date', prisma__value: e.toJSON() }; - if (Ae.isDecimal(e)) return { prisma__type: 'decimal', prisma__value: e.toJSON() }; - if (w.Buffer.isBuffer(e)) return { prisma__type: 'bytes', prisma__value: e.toString('base64') }; - if (gp(e)) return { prisma__type: 'bytes', prisma__value: w.Buffer.from(e).toString('base64') }; - if (ArrayBuffer.isView(e)) { - let { buffer: r, byteOffset: n, byteLength: i } = e; - return { prisma__type: 'bytes', prisma__value: w.Buffer.from(r, n, i).toString('base64') }; - } - return typeof e == 'object' && t === 'slow' ? Zs(e) : e; -} -function gp(e) { - return e instanceof ArrayBuffer || e instanceof SharedArrayBuffer - ? !0 - : typeof e == 'object' && e !== null - ? e[Symbol.toStringTag] === 'ArrayBuffer' || e[Symbol.toStringTag] === 'SharedArrayBuffer' - : !1; -} -function Zs(e) { - if (typeof e != 'object' || e === null) return e; - if (typeof e.toJSON == 'function') return e.toJSON(); - if (Array.isArray(e)) return e.map(zs); - let t = {}; - for (let r of Object.keys(e)) t[r] = zs(e[r]); - return t; -} -function zs(e) { - return typeof e == 'bigint' ? e.toString() : Zs(e); -} -var hp = /^(\s*alter\s)/i, - Xs = z('prisma:client'); -function ni(e, t, r, n) { - if (!(e !== 'postgresql' && e !== 'cockroachdb') && r.length > 0 && hp.exec(t)) - throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`); -} -var ii = - ({ clientMethod: e, activeProvider: t }) => - (r) => { - let n = '', - i; - if (Gr(r)) ((n = r.sql), (i = { values: bt(r.values), __prismaRawParameters__: !0 })); - else if (Array.isArray(r)) { - let [o, ...s] = r; - ((n = o), (i = { values: bt(s || []), __prismaRawParameters__: !0 })); - } else - switch (t) { - case 'sqlite': - case 'mysql': { - ((n = r.sql), (i = { values: bt(r.values), __prismaRawParameters__: !0 })); - break; - } - case 'cockroachdb': - case 'postgresql': - case 'postgres': { - ((n = r.text), (i = { values: bt(r.values), __prismaRawParameters__: !0 })); - break; - } - case 'sqlserver': { - ((n = Ws(r)), (i = { values: bt(r.values), __prismaRawParameters__: !0 })); - break; - } - default: - throw new Error(`The ${t} provider does not support ${e}`); - } - return (i?.values ? Xs(`prisma.${e}(${n}, ${i.values})`) : Xs(`prisma.${e}(${n})`), { query: n, parameters: i }); - }, - ea = { - requestArgsToMiddlewareArgs(e) { - return [e.strings, ...e.values]; - }, - middlewareArgsToRequestArgs(e) { - let [t, ...r] = e; - return new se(t, r); - }, - }, - ta = { - requestArgsToMiddlewareArgs(e) { - return [e]; - }, - middlewareArgsToRequestArgs(e) { - return e[0]; - }, - }; -f(); -u(); -c(); -p(); -m(); -function oi(e) { - return function (r, n) { - let i, - o = (s = e) => { - try { - return s === void 0 || s?.kind === 'itx' ? (i ??= ra(r(s))) : ra(r(s)); - } catch (a) { - return Promise.reject(a); - } - }; - return { - get spec() { - return n; - }, - then(s, a) { - return o().then(s, a); - }, - catch(s) { - return o().catch(s); - }, - finally(s) { - return o().finally(s); - }, - requestTransaction(s) { - let a = o(s); - return a.requestTransaction ? a.requestTransaction(s) : a; - }, - [Symbol.toStringTag]: 'PrismaPromise', - }; - }; -} -function ra(e) { - return typeof e.then == 'function' ? e : Promise.resolve(e); -} -f(); -u(); -c(); -p(); -m(); -var yp = Pn.split('.')[0], - wp = { - isEnabled() { - return !1; - }, - getTraceParent() { - return '00-10-10-00'; - }, - dispatchEngineSpans() {}, - getActiveContext() {}, - runInChildSpan(e, t) { - return t(); - }, - }, - si = class { - isEnabled() { - return this.getGlobalTracingHelper().isEnabled(); - } - getTraceParent(t) { - return this.getGlobalTracingHelper().getTraceParent(t); - } - dispatchEngineSpans(t) { - return this.getGlobalTracingHelper().dispatchEngineSpans(t); - } - getActiveContext() { - return this.getGlobalTracingHelper().getActiveContext(); - } - runInChildSpan(t, r) { - return this.getGlobalTracingHelper().runInChildSpan(t, r); - } - getGlobalTracingHelper() { - let t = globalThis[`V${yp}_PRISMA_INSTRUMENTATION`], - r = globalThis.PRISMA_INSTRUMENTATION; - return t?.helper ?? r?.helper ?? wp; - } - }; -function na() { - return new si(); -} -f(); -u(); -c(); -p(); -m(); -function ia(e, t = () => {}) { - let r, - n = new Promise((i) => (r = i)); - return { - then(i) { - return (--e === 0 && r(t()), i?.(n)); - }, - }; -} -f(); -u(); -c(); -p(); -m(); -function oa(e) { - return typeof e == 'string' - ? e - : e.reduce( - (t, r) => { - let n = typeof r == 'string' ? r : r.level; - return n === 'query' ? t : t && (r === 'info' || t === 'info') ? 'info' : n; - }, - void 0 - ); -} -f(); -u(); -c(); -p(); -m(); -var aa = Ue(so()); -f(); -u(); -c(); -p(); -m(); -function rn(e) { - return typeof e.batchRequestIdx == 'number'; -} -f(); -u(); -c(); -p(); -m(); -function sa(e) { - if (e.action !== 'findUnique' && e.action !== 'findUniqueOrThrow') return; - let t = []; - return ( - e.modelName && t.push(e.modelName), - e.query.arguments && t.push(ai(e.query.arguments)), - t.push(ai(e.query.selection)), - t.join('') - ); -} -function ai(e) { - return `(${Object.keys(e) - .sort() - .map((r) => { - let n = e[r]; - return typeof n == 'object' && n !== null ? `(${r} ${ai(n)})` : r; - }) - .join(' ')})`; -} -f(); -u(); -c(); -p(); -m(); -var Ep = { - aggregate: !1, - aggregateRaw: !1, - createMany: !0, - createManyAndReturn: !0, - createOne: !0, - deleteMany: !0, - deleteOne: !0, - executeRaw: !0, - findFirst: !1, - findFirstOrThrow: !1, - findMany: !1, - findRaw: !1, - findUnique: !1, - findUniqueOrThrow: !1, - groupBy: !1, - queryRaw: !1, - runCommandRaw: !0, - updateMany: !0, - updateManyAndReturn: !0, - updateOne: !0, - upsertOne: !0, -}; -function li(e) { - return Ep[e]; -} -f(); -u(); -c(); -p(); -m(); -var nn = class { - constructor(t) { - this.options = t; - this.batches = {}; - } - batches; - tickActive = !1; - request(t) { - let r = this.options.batchBy(t); - return r - ? (this.batches[r] || - ((this.batches[r] = []), - this.tickActive || - ((this.tickActive = !0), - y.nextTick(() => { - (this.dispatchBatches(), (this.tickActive = !1)); - }))), - new Promise((n, i) => { - this.batches[r].push({ request: t, resolve: n, reject: i }); - })) - : this.options.singleLoader(t); - } - dispatchBatches() { - for (let t in this.batches) { - let r = this.batches[t]; - (delete this.batches[t], - r.length === 1 - ? this.options - .singleLoader(r[0].request) - .then((n) => { - n instanceof Error ? r[0].reject(n) : r[0].resolve(n); - }) - .catch((n) => { - r[0].reject(n); - }) - : (r.sort((n, i) => this.options.batchOrder(n.request, i.request)), - this.options - .batchLoader(r.map((n) => n.request)) - .then((n) => { - if (n instanceof Error) for (let i = 0; i < r.length; i++) r[i].reject(n); - else - for (let i = 0; i < r.length; i++) { - let o = n[i]; - o instanceof Error ? r[i].reject(o) : r[i].resolve(o); - } - }) - .catch((n) => { - for (let i = 0; i < r.length; i++) r[i].reject(n); - }))); - } - } - get [Symbol.toStringTag]() { - return 'DataLoader'; - } -}; -f(); -u(); -c(); -p(); -m(); -function Qe(e, t) { - if (t === null) return t; - switch (e) { - case 'bigint': - return BigInt(t); - case 'bytes': { - let { buffer: r, byteOffset: n, byteLength: i } = w.Buffer.from(t, 'base64'); - return new Uint8Array(r, n, i); - } - case 'decimal': - return new Ae(t); - case 'datetime': - case 'date': - return new Date(t); - case 'time': - return new Date(`1970-01-01T${t}Z`); - case 'bigint-array': - return t.map((r) => Qe('bigint', r)); - case 'bytes-array': - return t.map((r) => Qe('bytes', r)); - case 'decimal-array': - return t.map((r) => Qe('decimal', r)); - case 'datetime-array': - return t.map((r) => Qe('datetime', r)); - case 'date-array': - return t.map((r) => Qe('date', r)); - case 'time-array': - return t.map((r) => Qe('time', r)); - default: - return t; - } -} -function on(e) { - let t = [], - r = bp(e); - for (let n = 0; n < e.rows.length; n++) { - let i = e.rows[n], - o = { ...r }; - for (let s = 0; s < i.length; s++) o[e.columns[s]] = Qe(e.types[s], i[s]); - t.push(o); - } - return t; -} -function bp(e) { - let t = {}; - for (let r = 0; r < e.columns.length; r++) t[e.columns[r]] = null; - return t; -} -var xp = z('prisma:client:request_handler'), - sn = class { - client; - dataloader; - logEmitter; - constructor(t, r) { - ((this.logEmitter = r), - (this.client = t), - (this.dataloader = new nn({ - batchLoader: Rs(async ({ requests: n, customDataProxyFetch: i }) => { - let { transaction: o, otelParentCtx: s } = n[0], - a = n.map((h) => h.protocolQuery), - l = this.client._tracingHelper.getTraceParent(s), - d = n.some((h) => li(h.protocolQuery.action)); - return ( - await this.client._engine.requestBatch(a, { - traceparent: l, - transaction: Pp(o), - containsWrite: d, - customDataProxyFetch: i, - }) - ).map((h, T) => { - if (h instanceof Error) return h; - try { - return this.mapQueryEngineResult(n[T], h); - } catch (I) { - return I; - } - }); - }), - singleLoader: async (n) => { - let i = n.transaction?.kind === 'itx' ? la(n.transaction) : void 0, - o = await this.client._engine.request(n.protocolQuery, { - traceparent: this.client._tracingHelper.getTraceParent(), - interactiveTransaction: i, - isWrite: li(n.protocolQuery.action), - customDataProxyFetch: n.customDataProxyFetch, - }); - return this.mapQueryEngineResult(n, o); - }, - batchBy: (n) => (n.transaction?.id ? `transaction-${n.transaction.id}` : sa(n.protocolQuery)), - batchOrder(n, i) { - return n.transaction?.kind === 'batch' && i.transaction?.kind === 'batch' - ? n.transaction.index - i.transaction.index - : 0; - }, - }))); - } - async request(t) { - try { - return await this.dataloader.request(t); - } catch (r) { - let { clientMethod: n, callsite: i, transaction: o, args: s, modelName: a } = t; - this.handleAndLogRequestError({ - error: r, - clientMethod: n, - callsite: i, - transaction: o, - args: s, - modelName: a, - globalOmit: t.globalOmit, - }); - } - } - mapQueryEngineResult({ dataPath: t, unpacker: r }, n) { - let i = n?.data, - o = this.unpack(i, t, r); - return y.env.PRISMA_CLIENT_GET_TIME ? { data: o } : o; - } - handleAndLogRequestError(t) { - try { - this.handleRequestError(t); - } catch (r) { - throw ( - this.logEmitter && - this.logEmitter.emit('error', { message: r.message, target: t.clientMethod, timestamp: new Date() }), - r - ); - } - } - handleRequestError({ - error: t, - clientMethod: r, - callsite: n, - transaction: i, - args: o, - modelName: s, - globalOmit: a, - }) { - if ((xp(t), vp(t, i))) throw t; - if (t instanceof ne && Tp(t)) { - let d = ua(t.meta); - Ur({ - args: o, - errors: [d], - callsite: n, - errorFormat: this.client._errorFormat, - originalMethod: r, - clientVersion: this.client._clientVersion, - globalOmit: a, - }); - } - let l = t.message; - if ( - (n && - (l = Sr({ - callsite: n, - originalMethod: r, - isPanic: t.isPanic, - showColors: this.client._errorFormat === 'pretty', - message: l, - })), - (l = this.sanitizeMessage(l)), - t.code) - ) { - let d = s ? { modelName: s, ...t.meta } : t.meta; - throw new ne(l, { - code: t.code, - clientVersion: this.client._clientVersion, - meta: d, - batchRequestIdx: t.batchRequestIdx, - }); - } else { - if (t.isPanic) throw new Pe(l, this.client._clientVersion); - if (t instanceof ie) - throw new ie(l, { clientVersion: this.client._clientVersion, batchRequestIdx: t.batchRequestIdx }); - if (t instanceof Q) throw new Q(l, this.client._clientVersion); - if (t instanceof Pe) throw new Pe(l, this.client._clientVersion); - } - throw ((t.clientVersion = this.client._clientVersion), t); - } - sanitizeMessage(t) { - return this.client._errorFormat && this.client._errorFormat !== 'pretty' ? (0, aa.default)(t) : t; - } - unpack(t, r, n) { - if (!t || (t.data && (t = t.data), !t)) return t; - let i = Object.keys(t)[0], - o = Object.values(t)[0], - s = r.filter((d) => d !== 'select' && d !== 'include'), - a = Qn(o, s), - l = i === 'queryRaw' ? on(a) : dt(a); - return n ? n(l) : l; - } - get [Symbol.toStringTag]() { - return 'RequestHandler'; - } - }; -function Pp(e) { - if (e) { - if (e.kind === 'batch') return { kind: 'batch', options: { isolationLevel: e.isolationLevel } }; - if (e.kind === 'itx') return { kind: 'itx', options: la(e) }; - qe(e, 'Unknown transaction kind'); - } -} -function la(e) { - return { id: e.id, payload: e.payload }; -} -function vp(e, t) { - return rn(e) && t?.kind === 'batch' && e.batchRequestIdx !== t.index; -} -function Tp(e) { - return e.code === 'P2009' || e.code === 'P2012'; -} -function ua(e) { - if (e.kind === 'Union') return { kind: 'Union', errors: e.errors.map(ua) }; - if (Array.isArray(e.selectionPath)) { - let [, ...t] = e.selectionPath; - return { ...e, selectionPath: t }; - } - return e; -} -f(); -u(); -c(); -p(); -m(); -var ca = Ns; -f(); -u(); -c(); -p(); -m(); -var ga = Ue(_n()); -f(); -u(); -c(); -p(); -m(); -var q = class extends Error { - constructor(t) { - (super( - t + - ` -Read more at https://pris.ly/d/client-constructor` - ), - (this.name = 'PrismaClientConstructorValidationError')); - } - get [Symbol.toStringTag]() { - return 'PrismaClientConstructorValidationError'; - } -}; -N(q, 'PrismaClientConstructorValidationError'); -var pa = ['datasources', 'datasourceUrl', 'errorFormat', 'adapter', 'log', 'transactionOptions', 'omit', '__internal'], - ma = ['pretty', 'colorless', 'minimal'], - fa = ['info', 'query', 'warn', 'error'], - Ap = { - datasources: (e, { datasourceNames: t }) => { - if (e) { - if (typeof e != 'object' || Array.isArray(e)) - throw new q(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`); - for (let [r, n] of Object.entries(e)) { - if (!t.includes(r)) { - let i = xt(r, t) || ` Available datasources: ${t.join(', ')}`; - throw new q(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`); - } - if (typeof n != 'object' || Array.isArray(n)) - throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`); - if (n && typeof n == 'object') - for (let [i, o] of Object.entries(n)) { - if (i !== 'url') - throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`); - if (typeof o != 'string') - throw new q(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`); - } - } - } - }, - adapter: (e, t) => { - if (!e && Ze(t.generator) === 'client') - throw new q('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.'); - if (e === null) return; - if (e === void 0) - throw new q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.'); - if (!tn(t).includes('driverAdapters')) - throw new q( - '"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.' - ); - if (Ze(t.generator) === 'binary') - throw new q( - 'Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.' - ); - }, - datasourceUrl: (e) => { - if (typeof e < 'u' && typeof e != 'string') - throw new q(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`); - }, - errorFormat: (e) => { - if (e) { - if (typeof e != 'string') - throw new q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`); - if (!ma.includes(e)) { - let t = xt(e, ma); - throw new q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`); - } - } - }, - log: (e) => { - if (!e) return; - if (!Array.isArray(e)) - throw new q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`); - function t(r) { - if (typeof r == 'string' && !fa.includes(r)) { - let n = xt(r, fa); - throw new q(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`); - } - } - for (let r of e) { - t(r); - let n = { - level: t, - emit: (i) => { - let o = ['stdout', 'event']; - if (!o.includes(i)) { - let s = xt(i, o); - throw new q( - `Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}` - ); - } - }, - }; - if (r && typeof r == 'object') - for (let [i, o] of Object.entries(r)) - if (n[i]) n[i](o); - else throw new q(`Invalid property ${i} for "log" provided to PrismaClient constructor`); - } - }, - transactionOptions: (e) => { - if (!e) return; - let t = e.maxWait; - if (t != null && t <= 0) - throw new q( - `Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0` - ); - let r = e.timeout; - if (r != null && r <= 0) - throw new q( - `Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0` - ); - }, - omit: (e, t) => { - if (typeof e != 'object') throw new q('"omit" option is expected to be an object.'); - if (e === null) throw new q('"omit" option can not be `null`'); - let r = []; - for (let [n, i] of Object.entries(e)) { - let o = Rp(n, t.runtimeDataModel); - if (!o) { - r.push({ kind: 'UnknownModel', modelKey: n }); - continue; - } - for (let [s, a] of Object.entries(i)) { - let l = o.fields.find((d) => d.name === s); - if (!l) { - r.push({ kind: 'UnknownField', modelKey: n, fieldName: s }); - continue; - } - if (l.relationName) { - r.push({ kind: 'RelationInOmit', modelKey: n, fieldName: s }); - continue; - } - typeof a != 'boolean' && r.push({ kind: 'InvalidFieldValue', modelKey: n, fieldName: s }); - } - } - if (r.length > 0) throw new q(Sp(e, r)); - }, - __internal: (e) => { - if (!e) return; - let t = ['debug', 'engine', 'configOverride']; - if (typeof e != 'object') - throw new q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`); - for (let [r] of Object.entries(e)) - if (!t.includes(r)) { - let n = xt(r, t); - throw new q( - `Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}` - ); - } - }, - }; -function ha(e, t) { - for (let [r, n] of Object.entries(e)) { - if (!pa.includes(r)) { - let i = xt(r, pa); - throw new q(`Unknown property ${r} provided to PrismaClient constructor.${i}`); - } - Ap[r](n, t); - } - if (e.datasourceUrl && e.datasources) - throw new q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them'); -} -function xt(e, t) { - if (t.length === 0 || typeof e != 'string') return ''; - let r = Cp(e, t); - return r ? ` Did you mean "${r}"?` : ''; -} -function Cp(e, t) { - if (t.length === 0) return null; - let r = t.map((i) => ({ value: i, distance: (0, ga.default)(e, i) })); - r.sort((i, o) => (i.distance < o.distance ? -1 : 1)); - let n = r[0]; - return n.distance < 3 ? n.value : null; -} -function Rp(e, t) { - return da(t.models, e) ?? da(t.types, e); -} -function da(e, t) { - let r = Object.keys(e).find((n) => Oe(n) === t); - if (r) return e[r]; -} -function Sp(e, t) { - let r = ut(e); - for (let o of t) - switch (o.kind) { - case 'UnknownModel': - (r.arguments.getField(o.modelKey)?.markAsError(), - r.addErrorMessage(() => `Unknown model name: ${o.modelKey}.`)); - break; - case 'UnknownField': - (r.arguments.getDeepField([o.modelKey, o.fieldName])?.markAsError(), - r.addErrorMessage(() => `Model "${o.modelKey}" does not have a field named "${o.fieldName}".`)); - break; - case 'RelationInOmit': - (r.arguments.getDeepField([o.modelKey, o.fieldName])?.markAsError(), - r.addErrorMessage(() => 'Relations are already excluded by default and can not be specified in "omit".')); - break; - case 'InvalidFieldValue': - (r.arguments.getDeepFieldValue([o.modelKey, o.fieldName])?.markAsError(), - r.addErrorMessage(() => 'Omit field option value must be a boolean.')); - break; - } - let { message: n, args: i } = Lr(r, 'colorless'); - return `Error validating "omit" option: - -${i} - -${n}`; -} -f(); -u(); -c(); -p(); -m(); -function ya(e) { - return e.length === 0 - ? Promise.resolve([]) - : new Promise((t, r) => { - let n = new Array(e.length), - i = null, - o = !1, - s = 0, - a = () => { - o || (s++, s === e.length && ((o = !0), i ? r(i) : t(n))); - }, - l = (d) => { - o || ((o = !0), r(d)); - }; - for (let d = 0; d < e.length; d++) - e[d].then( - (g) => { - ((n[d] = g), a()); - }, - (g) => { - if (!rn(g)) { - l(g); - return; - } - g.batchRequestIdx === d ? l(g) : (i || (i = g), a()); - } - ); - }); -} -var Le = z('prisma:client'); -typeof globalThis == 'object' && (globalThis.NODE_CLIENT = !0); -var Ip = { requestArgsToMiddlewareArgs: (e) => e, middlewareArgsToRequestArgs: (e) => e }, - Op = Symbol.for('prisma.client.transaction.id'), - kp = { - id: 0, - nextId() { - return ++this.id; - }, - }; -function ba(e) { - class t { - _originalClient = this; - _runtimeDataModel; - _requestHandler; - _connectionPromise; - _disconnectionPromise; - _engineConfig; - _accelerateEngineConfig; - _clientVersion; - _errorFormat; - _tracingHelper; - _previewFeatures; - _activeProvider; - _globalOmit; - _extensions; - _engine; - _appliedParent; - _createPrismaPromise = oi(); - constructor(n) { - ((e = n?.__internal?.configOverride?.(e) ?? e), Ds(e), n && ha(n, e)); - let i = new Jr().on('error', () => {}); - ((this._extensions = ct.empty()), - (this._previewFeatures = tn(e)), - (this._clientVersion = e.clientVersion ?? ca), - (this._activeProvider = e.activeProvider), - (this._globalOmit = n?.omit), - (this._tracingHelper = na())); - let o = e.relativeEnvPaths && { - rootEnvPath: e.relativeEnvPaths.rootEnvPath && dr.resolve(e.dirname, e.relativeEnvPaths.rootEnvPath), - schemaEnvPath: e.relativeEnvPaths.schemaEnvPath && dr.resolve(e.dirname, e.relativeEnvPaths.schemaEnvPath), - }, - s; - if (n?.adapter) { - s = n.adapter; - let l = e.activeProvider === 'postgresql' || e.activeProvider === 'cockroachdb' ? 'postgres' : e.activeProvider; - if (s.provider !== l) - throw new Q( - `The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`, - this._clientVersion - ); - if (n.datasources || n.datasourceUrl !== void 0) - throw new Q( - 'Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.', - this._clientVersion - ); - } - let a = e.injectableEdgeEnv?.(); - try { - let l = n ?? {}, - d = l.__internal ?? {}, - g = d.debug === !0; - g && z.enable('prisma:client'); - let h = dr.resolve(e.dirname, e.relativePath); - (Ji.existsSync(h) || (h = e.dirname), - Le('dirname', e.dirname), - Le('relativePath', e.relativePath), - Le('cwd', h)); - let T = d.engine || {}; - if ( - (l.errorFormat - ? (this._errorFormat = l.errorFormat) - : y.env.NODE_ENV === 'production' - ? (this._errorFormat = 'minimal') - : y.env.NO_COLOR - ? (this._errorFormat = 'colorless') - : (this._errorFormat = 'colorless'), - (this._runtimeDataModel = e.runtimeDataModel), - (this._engineConfig = { - cwd: h, - dirname: e.dirname, - enableDebugLogs: g, - allowTriggerPanic: T.allowTriggerPanic, - prismaPath: T.binaryPath ?? void 0, - engineEndpoint: T.endpoint, - generator: e.generator, - showColors: this._errorFormat === 'pretty', - logLevel: l.log && oa(l.log), - logQueries: - l.log && - !!(typeof l.log == 'string' - ? l.log === 'query' - : l.log.find((I) => (typeof I == 'string' ? I === 'query' : I.level === 'query'))), - env: a?.parsed ?? {}, - flags: [], - engineWasm: e.engineWasm, - compilerWasm: e.compilerWasm, - clientVersion: e.clientVersion, - engineVersion: e.engineVersion, - previewFeatures: this._previewFeatures, - activeProvider: e.activeProvider, - inlineSchema: e.inlineSchema, - overrideDatasources: Ms(l, e.datasourceNames), - inlineDatasources: e.inlineDatasources, - inlineSchemaHash: e.inlineSchemaHash, - tracingHelper: this._tracingHelper, - transactionOptions: { - maxWait: l.transactionOptions?.maxWait ?? 2e3, - timeout: l.transactionOptions?.timeout ?? 5e3, - isolationLevel: l.transactionOptions?.isolationLevel, - }, - logEmitter: i, - isBundled: e.isBundled, - adapter: s, - }), - (this._accelerateEngineConfig = { - ...this._engineConfig, - accelerateUtils: { - resolveDatasourceUrl: gt, - getBatchRequestPayload: Wr, - prismaGraphQLToJSError: Hr, - PrismaClientUnknownRequestError: ie, - PrismaClientInitializationError: Q, - PrismaClientKnownRequestError: ne, - debug: z('prisma:client:accelerateEngine'), - engineVersion: Ea.version, - clientVersion: e.clientVersion, - }, - }), - Le('clientVersion', e.clientVersion), - (this._engine = Qs(e, this._engineConfig)), - (this._requestHandler = new sn(this, i)), - l.log) - ) - for (let I of l.log) { - let S = typeof I == 'string' ? I : I.emit === 'stdout' ? I.level : null; - S && - this.$on(S, (R) => { - Rt.log(`${Rt.tags[S] ?? ''}`, R.message || R.query); - }); - } - } catch (l) { - throw ((l.clientVersion = this._clientVersion), l); - } - return (this._appliedParent = Gt(this)); - } - get [Symbol.toStringTag]() { - return 'PrismaClient'; - } - $on(n, i) { - return (n === 'beforeExit' ? this._engine.onBeforeExit(i) : n && this._engineConfig.logEmitter.on(n, i), this); - } - $connect() { - try { - return this._engine.start(); - } catch (n) { - throw ((n.clientVersion = this._clientVersion), n); - } - } - async $disconnect() { - try { - await this._engine.stop(); - } catch (n) { - throw ((n.clientVersion = this._clientVersion), n); - } finally { - Gi(); - } - } - $executeRawInternal(n, i, o, s) { - let a = this._activeProvider; - return this._request({ - action: 'executeRaw', - args: o, - transaction: n, - clientMethod: i, - argsMapper: ii({ clientMethod: i, activeProvider: a }), - callsite: Fe(this._errorFormat), - dataPath: [], - middlewareArgsMapper: s, - }); - } - $executeRaw(n, ...i) { - return this._createPrismaPromise((o) => { - if (n.raw !== void 0 || n.sql !== void 0) { - let [s, a] = wa(n, i); - return ( - ni( - this._activeProvider, - s.text, - s.values, - Array.isArray(n) ? 'prisma.$executeRaw``' : 'prisma.$executeRaw(sql``)' - ), - this.$executeRawInternal(o, '$executeRaw', s, a) - ); - } - throw new X( - "`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n", - { clientVersion: this._clientVersion } - ); - }); - } - $executeRawUnsafe(n, ...i) { - return this._createPrismaPromise( - (o) => ( - ni(this._activeProvider, n, i, 'prisma.$executeRawUnsafe(, [...values])'), - this.$executeRawInternal(o, '$executeRawUnsafe', [n, ...i]) - ) - ); - } - $runCommandRaw(n) { - if (e.activeProvider !== 'mongodb') - throw new X(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`, { - clientVersion: this._clientVersion, - }); - return this._createPrismaPromise((i) => - this._request({ - args: n, - clientMethod: '$runCommandRaw', - dataPath: [], - action: 'runCommandRaw', - argsMapper: Ks, - callsite: Fe(this._errorFormat), - transaction: i, - }) - ); - } - async $queryRawInternal(n, i, o, s) { - let a = this._activeProvider; - return this._request({ - action: 'queryRaw', - args: o, - transaction: n, - clientMethod: i, - argsMapper: ii({ clientMethod: i, activeProvider: a }), - callsite: Fe(this._errorFormat), - dataPath: [], - middlewareArgsMapper: s, - }); - } - $queryRaw(n, ...i) { - return this._createPrismaPromise((o) => { - if (n.raw !== void 0 || n.sql !== void 0) return this.$queryRawInternal(o, '$queryRaw', ...wa(n, i)); - throw new X( - "`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n", - { clientVersion: this._clientVersion } - ); - }); - } - $queryRawTyped(n) { - return this._createPrismaPromise((i) => { - if (!this._hasPreviewFlag('typedSql')) - throw new X('`typedSql` preview feature must be enabled in order to access $queryRawTyped API', { - clientVersion: this._clientVersion, - }); - return this.$queryRawInternal(i, '$queryRawTyped', n); - }); - } - $queryRawUnsafe(n, ...i) { - return this._createPrismaPromise((o) => this.$queryRawInternal(o, '$queryRawUnsafe', [n, ...i])); - } - _transactionWithArray({ promises: n, options: i }) { - let o = kp.nextId(), - s = ia(n.length), - a = n.map((l, d) => { - if (l?.[Symbol.toStringTag] !== 'PrismaPromise') - throw new Error( - 'All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.' - ); - let g = i?.isolationLevel ?? this._engineConfig.transactionOptions.isolationLevel, - h = { kind: 'batch', id: o, index: d, isolationLevel: g, lock: s }; - return l.requestTransaction?.(h) ?? l; - }); - return ya(a); - } - async _transactionWithCallback({ callback: n, options: i }) { - let o = { traceparent: this._tracingHelper.getTraceParent() }, - s = { - maxWait: i?.maxWait ?? this._engineConfig.transactionOptions.maxWait, - timeout: i?.timeout ?? this._engineConfig.transactionOptions.timeout, - isolationLevel: i?.isolationLevel ?? this._engineConfig.transactionOptions.isolationLevel, - }, - a = await this._engine.transaction('start', o, s), - l; - try { - let d = { kind: 'itx', ...a }; - ((l = await n(this._createItxClient(d))), await this._engine.transaction('commit', o, a)); - } catch (d) { - throw (await this._engine.transaction('rollback', o, a).catch(() => {}), d); - } - return l; - } - _createItxClient(n) { - return me( - Gt( - me(ys(this), [ - te('_appliedParent', () => this._appliedParent._createItxClient(n)), - te('_createPrismaPromise', () => oi(n)), - te(Op, () => n.id), - ]) - ), - [mt(Ps)] - ); - } - $transaction(n, i) { - let o; - typeof n == 'function' - ? this._engineConfig.adapter?.adapterName === '@prisma/adapter-d1' - ? (o = () => { - throw new Error( - 'Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.' - ); - }) - : (o = () => this._transactionWithCallback({ callback: n, options: i })) - : (o = () => this._transactionWithArray({ promises: n, options: i })); - let s = { name: 'transaction', attributes: { method: '$transaction' } }; - return this._tracingHelper.runInChildSpan(s, o); - } - _request(n) { - n.otelParentCtx = this._tracingHelper.getActiveContext(); - let i = n.middlewareArgsMapper ?? Ip, - o = { - args: i.requestArgsToMiddlewareArgs(n.args), - dataPath: n.dataPath, - runInTransaction: !!n.transaction, - action: n.action, - model: n.model, - }, - s = { - operation: { - name: 'operation', - attributes: { method: o.action, model: o.model, name: o.model ? `${o.model}.${o.action}` : o.action }, - }, - }, - a = async (l) => { - let { runInTransaction: d, args: g, ...h } = l, - T = { ...n, ...h }; - (g && (T.args = i.middlewareArgsToRequestArgs(g)), - n.transaction !== void 0 && d === !1 && delete T.transaction); - let I = await Cs(this, T); - return T.model - ? xs({ - result: I, - modelName: T.model, - args: T.args, - extensions: this._extensions, - runtimeDataModel: this._runtimeDataModel, - globalOmit: this._globalOmit, - }) - : I; - }; - return this._tracingHelper.runInChildSpan(s.operation, () => a(o)); - } - async _executeRequest({ - args: n, - clientMethod: i, - dataPath: o, - callsite: s, - action: a, - model: l, - argsMapper: d, - transaction: g, - unpacker: h, - otelParentCtx: T, - customDataProxyFetch: I, - }) { - try { - n = d ? d(n) : n; - let S = { name: 'serialize' }, - R = this._tracingHelper.runInChildSpan(S, () => - $r({ - modelName: l, - runtimeDataModel: this._runtimeDataModel, - action: a, - args: n, - clientMethod: i, - callsite: s, - extensions: this._extensions, - errorFormat: this._errorFormat, - clientVersion: this._clientVersion, - previewFeatures: this._previewFeatures, - globalOmit: this._globalOmit, - }) - ); - return ( - z.enabled('prisma:client') && - (Le('Prisma Client call:'), - Le(`prisma.${i}(${as(n)})`), - Le('Generated request:'), - Le( - JSON.stringify(R, null, 2) + - ` -` - )), - g?.kind === 'batch' && (await g.lock), - this._requestHandler.request({ - protocolQuery: R, - modelName: l, - action: a, - clientMethod: i, - dataPath: o, - callsite: s, - args: n, - extensions: this._extensions, - transaction: g, - unpacker: h, - otelParentCtx: T, - otelChildCtx: this._tracingHelper.getActiveContext(), - globalOmit: this._globalOmit, - customDataProxyFetch: I, - }) - ); - } catch (S) { - throw ((S.clientVersion = this._clientVersion), S); - } - } - $metrics = new pt(this); - _hasPreviewFlag(n) { - return !!this._engineConfig.previewFeatures?.includes(n); - } - $applyPendingMigrations() { - return this._engine.applyPendingMigrations(); - } - $extends = ws; - } - return t; -} -function wa(e, t) { - return Dp(e) ? [new se(e, t), ea] : [e, ta]; -} -function Dp(e) { - return Array.isArray(e) && Array.isArray(e.raw); -} -f(); -u(); -c(); -p(); -m(); -var Mp = new Set([ - 'toJSON', - '$$typeof', - 'asymmetricMatch', - Symbol.iterator, - Symbol.toStringTag, - Symbol.isConcatSpreadable, - Symbol.toPrimitive, -]); -function xa(e) { - return new Proxy(e, { - get(t, r) { - if (r in t) return t[r]; - if (!Mp.has(r)) throw new TypeError(`Invalid enum value: ${String(r)}`); - }, - }); -} -f(); -u(); -c(); -p(); -m(); -0 && - (module.exports = { - DMMF, - Debug, - Decimal, - Extensions, - MetricsClient, - PrismaClientInitializationError, - PrismaClientKnownRequestError, - PrismaClientRustPanicError, - PrismaClientUnknownRequestError, - PrismaClientValidationError, - Public, - Sql, - createParam, - defineDmmfProperty, - deserializeJsonResponse, - deserializeRawResult, - dmmfToRuntimeDataModel, - empty, - getPrismaClient, - getRuntime, - join, - makeStrictEnum, - makeTypedQueryFactory, - objectEnumValues, - raw, - serializeJsonQuery, - skip, - sqltag, - warnEnvConflicts, - warnOnce, - }); -//# sourceMappingURL=edge.js.map diff --git a/prisma/generated/client/runtime/index-browser.d.ts b/prisma/generated/client/runtime/index-browser.d.ts deleted file mode 100644 index 6562cbc..0000000 --- a/prisma/generated/client/runtime/index-browser.d.ts +++ /dev/null @@ -1,409 +0,0 @@ -declare class AnyNull extends NullTypesEnumValue { - #private; -} - -declare type Args = T extends { - [K: symbol]: { - types: { - operations: { - [K in F]: { - args: any; - }; - }; - }; - }; -} - ? T[symbol]['types']['operations'][F]['args'] - : any; - -declare class DbNull extends NullTypesEnumValue { - #private; -} - -export declare function Decimal(n: Decimal.Value): Decimal; - -export declare namespace Decimal { - export type Constructor = typeof Decimal; - export type Instance = Decimal; - export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; - export type Modulo = Rounding | 9; - export type Value = string | number | Decimal; - - // http://mikemcl.github.io/decimal.js/#constructor-properties - export interface Config { - precision?: number; - rounding?: Rounding; - toExpNeg?: number; - toExpPos?: number; - minE?: number; - maxE?: number; - crypto?: boolean; - modulo?: Modulo; - defaults?: boolean; - } -} - -export declare class Decimal { - readonly d: number[]; - readonly e: number; - readonly s: number; - - constructor(n: Decimal.Value); - - absoluteValue(): Decimal; - abs(): Decimal; - - ceil(): Decimal; - - clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; - clamp(min: Decimal.Value, max: Decimal.Value): Decimal; - - comparedTo(n: Decimal.Value): number; - cmp(n: Decimal.Value): number; - - cosine(): Decimal; - cos(): Decimal; - - cubeRoot(): Decimal; - cbrt(): Decimal; - - decimalPlaces(): number; - dp(): number; - - dividedBy(n: Decimal.Value): Decimal; - div(n: Decimal.Value): Decimal; - - dividedToIntegerBy(n: Decimal.Value): Decimal; - divToInt(n: Decimal.Value): Decimal; - - equals(n: Decimal.Value): boolean; - eq(n: Decimal.Value): boolean; - - floor(): Decimal; - - greaterThan(n: Decimal.Value): boolean; - gt(n: Decimal.Value): boolean; - - greaterThanOrEqualTo(n: Decimal.Value): boolean; - gte(n: Decimal.Value): boolean; - - hyperbolicCosine(): Decimal; - cosh(): Decimal; - - hyperbolicSine(): Decimal; - sinh(): Decimal; - - hyperbolicTangent(): Decimal; - tanh(): Decimal; - - inverseCosine(): Decimal; - acos(): Decimal; - - inverseHyperbolicCosine(): Decimal; - acosh(): Decimal; - - inverseHyperbolicSine(): Decimal; - asinh(): Decimal; - - inverseHyperbolicTangent(): Decimal; - atanh(): Decimal; - - inverseSine(): Decimal; - asin(): Decimal; - - inverseTangent(): Decimal; - atan(): Decimal; - - isFinite(): boolean; - - isInteger(): boolean; - isInt(): boolean; - - isNaN(): boolean; - - isNegative(): boolean; - isNeg(): boolean; - - isPositive(): boolean; - isPos(): boolean; - - isZero(): boolean; - - lessThan(n: Decimal.Value): boolean; - lt(n: Decimal.Value): boolean; - - lessThanOrEqualTo(n: Decimal.Value): boolean; - lte(n: Decimal.Value): boolean; - - logarithm(n?: Decimal.Value): Decimal; - log(n?: Decimal.Value): Decimal; - - minus(n: Decimal.Value): Decimal; - sub(n: Decimal.Value): Decimal; - - modulo(n: Decimal.Value): Decimal; - mod(n: Decimal.Value): Decimal; - - naturalExponential(): Decimal; - exp(): Decimal; - - naturalLogarithm(): Decimal; - ln(): Decimal; - - negated(): Decimal; - neg(): Decimal; - - plus(n: Decimal.Value): Decimal; - add(n: Decimal.Value): Decimal; - - precision(includeZeros?: boolean): number; - sd(includeZeros?: boolean): number; - - round(): Decimal; - - sine(): Decimal; - sin(): Decimal; - - squareRoot(): Decimal; - sqrt(): Decimal; - - tangent(): Decimal; - tan(): Decimal; - - times(n: Decimal.Value): Decimal; - mul(n: Decimal.Value): Decimal; - - toBinary(significantDigits?: number): string; - toBinary(significantDigits: number, rounding: Decimal.Rounding): string; - - toDecimalPlaces(decimalPlaces?: number): Decimal; - toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - toDP(decimalPlaces?: number): Decimal; - toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - - toExponential(decimalPlaces?: number): string; - toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFixed(decimalPlaces?: number): string; - toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFraction(max_denominator?: Decimal.Value): Decimal[]; - - toHexadecimal(significantDigits?: number): string; - toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; - toHex(significantDigits?: number): string; - toHex(significantDigits: number, rounding?: Decimal.Rounding): string; - - toJSON(): string; - - toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; - - toNumber(): number; - - toOctal(significantDigits?: number): string; - toOctal(significantDigits: number, rounding: Decimal.Rounding): string; - - toPower(n: Decimal.Value): Decimal; - pow(n: Decimal.Value): Decimal; - - toPrecision(significantDigits?: number): string; - toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; - - toSignificantDigits(significantDigits?: number): Decimal; - toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; - toSD(significantDigits?: number): Decimal; - toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; - - toString(): string; - - truncated(): Decimal; - trunc(): Decimal; - - valueOf(): string; - - static abs(n: Decimal.Value): Decimal; - static acos(n: Decimal.Value): Decimal; - static acosh(n: Decimal.Value): Decimal; - static add(x: Decimal.Value, y: Decimal.Value): Decimal; - static asin(n: Decimal.Value): Decimal; - static asinh(n: Decimal.Value): Decimal; - static atan(n: Decimal.Value): Decimal; - static atanh(n: Decimal.Value): Decimal; - static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; - static cbrt(n: Decimal.Value): Decimal; - static ceil(n: Decimal.Value): Decimal; - static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; - static clone(object?: Decimal.Config): Decimal.Constructor; - static config(object: Decimal.Config): Decimal.Constructor; - static cos(n: Decimal.Value): Decimal; - static cosh(n: Decimal.Value): Decimal; - static div(x: Decimal.Value, y: Decimal.Value): Decimal; - static exp(n: Decimal.Value): Decimal; - static floor(n: Decimal.Value): Decimal; - static hypot(...n: Decimal.Value[]): Decimal; - static isDecimal(object: any): object is Decimal; - static ln(n: Decimal.Value): Decimal; - static log(n: Decimal.Value, base?: Decimal.Value): Decimal; - static log2(n: Decimal.Value): Decimal; - static log10(n: Decimal.Value): Decimal; - static max(...n: Decimal.Value[]): Decimal; - static min(...n: Decimal.Value[]): Decimal; - static mod(x: Decimal.Value, y: Decimal.Value): Decimal; - static mul(x: Decimal.Value, y: Decimal.Value): Decimal; - static noConflict(): Decimal.Constructor; // Browser only - static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; - static random(significantDigits?: number): Decimal; - static round(n: Decimal.Value): Decimal; - static set(object: Decimal.Config): Decimal.Constructor; - static sign(n: Decimal.Value): number; - static sin(n: Decimal.Value): Decimal; - static sinh(n: Decimal.Value): Decimal; - static sqrt(n: Decimal.Value): Decimal; - static sub(x: Decimal.Value, y: Decimal.Value): Decimal; - static sum(...n: Decimal.Value[]): Decimal; - static tan(n: Decimal.Value): Decimal; - static tanh(n: Decimal.Value): Decimal; - static trunc(n: Decimal.Value): Decimal; - - static readonly default?: Decimal.Constructor; - static readonly Decimal?: Decimal.Constructor; - - static readonly precision: number; - static readonly rounding: Decimal.Rounding; - static readonly toExpNeg: number; - static readonly toExpPos: number; - static readonly minE: number; - static readonly maxE: number; - static readonly crypto: boolean; - static readonly modulo: Decimal.Modulo; - - static readonly ROUND_UP: 0; - static readonly ROUND_DOWN: 1; - static readonly ROUND_CEIL: 2; - static readonly ROUND_FLOOR: 3; - static readonly ROUND_HALF_UP: 4; - static readonly ROUND_HALF_DOWN: 5; - static readonly ROUND_HALF_EVEN: 6; - static readonly ROUND_HALF_CEIL: 7; - static readonly ROUND_HALF_FLOOR: 8; - static readonly EUCLID: 9; -} - -declare type Exact = - | (A extends unknown - ? W extends A - ? { - [K in keyof A]: Exact; - } - : W - : never) - | (A extends Narrowable ? A : never); - -export declare function getRuntime(): GetRuntimeOutput; - -declare type GetRuntimeOutput = { - id: RuntimeName; - prettyName: string; - isEdge: boolean; -}; - -declare class JsonNull extends NullTypesEnumValue { - #private; -} - -/** - * Generates more strict variant of an enum which, unlike regular enum, - * throws on non-existing property access. This can be useful in following situations: - * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input - * - enum values are generated dynamically from DMMF. - * - * In that case, if using normal enums and no compile-time typechecking, using non-existing property - * will result in `undefined` value being used, which will be accepted. Using strict enum - * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. - * - * Note: if you need to check for existence of a value in the enum you can still use either - * `in` operator or `hasOwnProperty` function. - * - * @param definition - * @returns - */ -export declare function makeStrictEnum>(definition: T): T; - -declare type Narrowable = string | number | bigint | boolean | []; - -declare class NullTypesEnumValue extends ObjectEnumValue { - _getNamespace(): string; -} - -/** - * Base class for unique values of object-valued enums. - */ -declare abstract class ObjectEnumValue { - constructor(arg?: symbol); - abstract _getNamespace(): string; - _getName(): string; - toString(): string; -} - -export declare const objectEnumValues: { - classes: { - DbNull: typeof DbNull; - JsonNull: typeof JsonNull; - AnyNull: typeof AnyNull; - }; - instances: { - DbNull: DbNull; - JsonNull: JsonNull; - AnyNull: AnyNull; - }; -}; - -declare type Operation = - | 'findFirst' - | 'findFirstOrThrow' - | 'findUnique' - | 'findUniqueOrThrow' - | 'findMany' - | 'create' - | 'createMany' - | 'createManyAndReturn' - | 'update' - | 'updateMany' - | 'updateManyAndReturn' - | 'upsert' - | 'delete' - | 'deleteMany' - | 'aggregate' - | 'count' - | 'groupBy' - | '$queryRaw' - | '$executeRaw' - | '$queryRawUnsafe' - | '$executeRawUnsafe' - | 'findRaw' - | 'aggregateRaw' - | '$runCommandRaw'; - -declare namespace Public { - export { validator }; -} -export { Public }; - -declare type RuntimeName = 'workerd' | 'deno' | 'netlify' | 'node' | 'bun' | 'edge-light' | ''; - -declare function validator(): (select: Exact) => S; - -declare function validator, O extends keyof C[M] & Operation>( - client: C, - model: M, - operation: O -): (select: Exact>) => S; - -declare function validator< - C, - M extends Exclude, - O extends keyof C[M] & Operation, - P extends keyof Args, ->(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; - -export {}; diff --git a/prisma/generated/client/runtime/index-browser.js b/prisma/generated/client/runtime/index-browser.js deleted file mode 100644 index e4911c0..0000000 --- a/prisma/generated/client/runtime/index-browser.js +++ /dev/null @@ -1,1947 +0,0 @@ -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ -'use strict'; -var pe = Object.defineProperty; -var Xe = Object.getOwnPropertyDescriptor; -var Ke = Object.getOwnPropertyNames; -var Qe = Object.prototype.hasOwnProperty; -var Ye = (e) => { - throw TypeError(e); -}; -var Oe = (e, n) => { - for (var i in n) pe(e, i, { get: n[i], enumerable: !0 }); - }, - xe = (e, n, i, t) => { - if ((n && typeof n == 'object') || typeof n == 'function') - for (let r of Ke(n)) - !Qe.call(e, r) && r !== i && pe(e, r, { get: () => n[r], enumerable: !(t = Xe(n, r)) || t.enumerable }); - return e; - }; -var ze = (e) => xe(pe({}, '__esModule', { value: !0 }), e); -var ne = (e, n, i) => - n.has(e) ? Ye('Cannot add the same private member more than once') : n instanceof WeakSet ? n.add(e) : n.set(e, i); -var ii = {}; -Oe(ii, { - Decimal: () => Je, - Public: () => ge, - getRuntime: () => _e, - makeStrictEnum: () => qe, - objectEnumValues: () => Ae, -}); -module.exports = ze(ii); -var ge = {}; -Oe(ge, { validator: () => Re }); -function Re(...e) { - return (n) => n; -} -var ie = Symbol(), - me = new WeakMap(), - we = class { - constructor(n) { - n === ie - ? me.set(this, 'Prisma.'.concat(this._getName())) - : me.set(this, 'new Prisma.'.concat(this._getNamespace(), '.').concat(this._getName(), '()')); - } - _getName() { - return this.constructor.name; - } - toString() { - return me.get(this); - } - }, - G = class extends we { - _getNamespace() { - return 'NullTypes'; - } - }, - Ne, - J = class extends G { - constructor() { - super(...arguments); - ne(this, Ne); - } - }; -Ne = new WeakMap(); -ke(J, 'DbNull'); -var ve, - X = class extends G { - constructor() { - super(...arguments); - ne(this, ve); - } - }; -ve = new WeakMap(); -ke(X, 'JsonNull'); -var Ee, - K = class extends G { - constructor() { - super(...arguments); - ne(this, Ee); - } - }; -Ee = new WeakMap(); -ke(K, 'AnyNull'); -var Ae = { - classes: { DbNull: J, JsonNull: X, AnyNull: K }, - instances: { DbNull: new J(ie), JsonNull: new X(ie), AnyNull: new K(ie) }, -}; -function ke(e, n) { - Object.defineProperty(e, 'name', { value: n, configurable: !0 }); -} -var ye = new Set([ - 'toJSON', - '$$typeof', - 'asymmetricMatch', - Symbol.iterator, - Symbol.toStringTag, - Symbol.isConcatSpreadable, - Symbol.toPrimitive, -]); -function qe(e) { - return new Proxy(e, { - get(n, i) { - if (i in n) return n[i]; - if (!ye.has(i)) throw new TypeError('Invalid enum value: '.concat(String(i))); - }, - }); -} -var en = () => { - var e, n; - return ((n = (e = globalThis.process) == null ? void 0 : e.release) == null ? void 0 : n.name) === 'node'; - }, - nn = () => { - var e, n; - return !!globalThis.Bun || !!((n = (e = globalThis.process) == null ? void 0 : e.versions) != null && n.bun); - }, - tn = () => !!globalThis.Deno, - rn = () => typeof globalThis.Netlify == 'object', - sn = () => typeof globalThis.EdgeRuntime == 'object', - on = () => { - var e; - return ((e = globalThis.navigator) == null ? void 0 : e.userAgent) === 'Cloudflare-Workers'; - }; -function un() { - var i; - return (i = [ - [rn, 'netlify'], - [sn, 'edge-light'], - [on, 'workerd'], - [tn, 'deno'], - [nn, 'bun'], - [en, 'node'], - ] - .flatMap((t) => (t[0]() ? [t[1]] : [])) - .at(0)) != null - ? i - : ''; -} -var fn = { - node: 'Node.js', - workerd: 'Cloudflare Workers', - deno: 'Deno and Deno Deploy', - netlify: 'Netlify Edge Functions', - 'edge-light': - 'Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)', -}; -function _e() { - let e = un(); - return { id: e, prettyName: fn[e] || e, isEdge: ['workerd', 'deno', 'netlify', 'edge-light'].includes(e) }; -} -var V = 9e15, - H = 1e9, - Se = '0123456789abcdef', - se = - '2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058', - oe = - '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789', - Me = { precision: 20, rounding: 4, modulo: 1, toExpNeg: -7, toExpPos: 21, minE: -V, maxE: V, crypto: !1 }, - Le, - Z, - w = !0, - fe = '[DecimalError] ', - $ = fe + 'Invalid argument: ', - Ie = fe + 'Precision limit exceeded', - Ze = fe + 'crypto unavailable', - Ue = '[object Decimal]', - R = Math.floor, - C = Math.pow, - cn = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, - ln = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, - an = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, - Be = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, - D = 1e7, - m = 7, - dn = 9007199254740991, - hn = se.length - 1, - Ce = oe.length - 1, - h = { toStringTag: Ue }; -h.absoluteValue = h.abs = function () { - var e = new this.constructor(this); - return (e.s < 0 && (e.s = 1), p(e)); -}; -h.ceil = function () { - return p(new this.constructor(this), this.e + 1, 2); -}; -h.clampedTo = h.clamp = function (e, n) { - var i, - t = this, - r = t.constructor; - if (((e = new r(e)), (n = new r(n)), !e.s || !n.s)) return new r(NaN); - if (e.gt(n)) throw Error($ + n); - return ((i = t.cmp(e)), i < 0 ? e : t.cmp(n) > 0 ? n : new r(t)); -}; -h.comparedTo = h.cmp = function (e) { - var n, - i, - t, - r, - s = this, - o = s.d, - u = (e = new s.constructor(e)).d, - c = s.s, - f = e.s; - if (!o || !u) return !c || !f ? NaN : c !== f ? c : o === u ? 0 : !o ^ (c < 0) ? 1 : -1; - if (!o[0] || !u[0]) return o[0] ? c : u[0] ? -f : 0; - if (c !== f) return c; - if (s.e !== e.e) return (s.e > e.e) ^ (c < 0) ? 1 : -1; - for (t = o.length, r = u.length, n = 0, i = t < r ? t : r; n < i; ++n) - if (o[n] !== u[n]) return (o[n] > u[n]) ^ (c < 0) ? 1 : -1; - return t === r ? 0 : (t > r) ^ (c < 0) ? 1 : -1; -}; -h.cosine = h.cos = function () { - var e, - n, - i = this, - t = i.constructor; - return i.d - ? i.d[0] - ? ((e = t.precision), - (n = t.rounding), - (t.precision = e + Math.max(i.e, i.sd()) + m), - (t.rounding = 1), - (i = pn(t, We(t, i))), - (t.precision = e), - (t.rounding = n), - p(Z == 2 || Z == 3 ? i.neg() : i, e, n, !0)) - : new t(1) - : new t(NaN); -}; -h.cubeRoot = h.cbrt = function () { - var e, - n, - i, - t, - r, - s, - o, - u, - c, - f, - l = this, - a = l.constructor; - if (!l.isFinite() || l.isZero()) return new a(l); - for ( - w = !1, - s = l.s * C(l.s * l, 1 / 3), - !s || Math.abs(s) == 1 / 0 - ? ((i = b(l.d)), - (e = l.e), - (s = (e - i.length + 1) % 3) && (i += s == 1 || s == -2 ? '0' : '00'), - (s = C(i, 1 / 3)), - (e = R((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2))), - s == 1 / 0 ? (i = '5e' + e) : ((i = s.toExponential()), (i = i.slice(0, i.indexOf('e') + 1) + e)), - (t = new a(i)), - (t.s = l.s)) - : (t = new a(s.toString())), - o = (e = a.precision) + 3; - ; - - ) - if ( - ((u = t), - (c = u.times(u).times(u)), - (f = c.plus(l)), - (t = k(f.plus(l).times(u), f.plus(c), o + 2, 1)), - b(u.d).slice(0, o) === (i = b(t.d)).slice(0, o)) - ) - if (((i = i.slice(o - 3, o + 1)), i == '9999' || (!r && i == '4999'))) { - if (!r && (p(u, e + 1, 0), u.times(u).times(u).eq(l))) { - t = u; - break; - } - ((o += 4), (r = 1)); - } else { - (!+i || (!+i.slice(1) && i.charAt(0) == '5')) && (p(t, e + 1, 1), (n = !t.times(t).times(t).eq(l))); - break; - } - return ((w = !0), p(t, e, a.rounding, n)); -}; -h.decimalPlaces = h.dp = function () { - var e, - n = this.d, - i = NaN; - if (n) { - if (((e = n.length - 1), (i = (e - R(this.e / m)) * m), (e = n[e]), e)) for (; e % 10 == 0; e /= 10) i--; - i < 0 && (i = 0); - } - return i; -}; -h.dividedBy = h.div = function (e) { - return k(this, new this.constructor(e)); -}; -h.dividedToIntegerBy = h.divToInt = function (e) { - var n = this, - i = n.constructor; - return p(k(n, new i(e), 0, 1, 1), i.precision, i.rounding); -}; -h.equals = h.eq = function (e) { - return this.cmp(e) === 0; -}; -h.floor = function () { - return p(new this.constructor(this), this.e + 1, 3); -}; -h.greaterThan = h.gt = function (e) { - return this.cmp(e) > 0; -}; -h.greaterThanOrEqualTo = h.gte = function (e) { - var n = this.cmp(e); - return n == 1 || n === 0; -}; -h.hyperbolicCosine = h.cosh = function () { - var e, - n, - i, - t, - r, - s = this, - o = s.constructor, - u = new o(1); - if (!s.isFinite()) return new o(s.s ? 1 / 0 : NaN); - if (s.isZero()) return u; - ((i = o.precision), - (t = o.rounding), - (o.precision = i + Math.max(s.e, s.sd()) + 4), - (o.rounding = 1), - (r = s.d.length), - r < 32 - ? ((e = Math.ceil(r / 3)), (n = (1 / le(4, e)).toString())) - : ((e = 16), (n = '2.3283064365386962890625e-10')), - (s = j(o, 1, s.times(n), new o(1), !0))); - for (var c, f = e, l = new o(8); f--; ) ((c = s.times(s)), (s = u.minus(c.times(l.minus(c.times(l)))))); - return p(s, (o.precision = i), (o.rounding = t), !0); -}; -h.hyperbolicSine = h.sinh = function () { - var e, - n, - i, - t, - r = this, - s = r.constructor; - if (!r.isFinite() || r.isZero()) return new s(r); - if ( - ((n = s.precision), - (i = s.rounding), - (s.precision = n + Math.max(r.e, r.sd()) + 4), - (s.rounding = 1), - (t = r.d.length), - t < 3) - ) - r = j(s, 2, r, r, !0); - else { - ((e = 1.4 * Math.sqrt(t)), (e = e > 16 ? 16 : e | 0), (r = r.times(1 / le(5, e))), (r = j(s, 2, r, r, !0))); - for (var o, u = new s(5), c = new s(16), f = new s(20); e--; ) - ((o = r.times(r)), (r = r.times(u.plus(o.times(c.times(o).plus(f)))))); - } - return ((s.precision = n), (s.rounding = i), p(r, n, i, !0)); -}; -h.hyperbolicTangent = h.tanh = function () { - var e, - n, - i = this, - t = i.constructor; - return i.isFinite() - ? i.isZero() - ? new t(i) - : ((e = t.precision), - (n = t.rounding), - (t.precision = e + 7), - (t.rounding = 1), - k(i.sinh(), i.cosh(), (t.precision = e), (t.rounding = n))) - : new t(i.s); -}; -h.inverseCosine = h.acos = function () { - var e = this, - n = e.constructor, - i = e.abs().cmp(1), - t = n.precision, - r = n.rounding; - return i !== -1 - ? i === 0 - ? e.isNeg() - ? F(n, t, r) - : new n(0) - : new n(NaN) - : e.isZero() - ? F(n, t + 4, r).times(0.5) - : ((n.precision = t + 6), - (n.rounding = 1), - (e = new n(1).minus(e).div(e.plus(1)).sqrt().atan()), - (n.precision = t), - (n.rounding = r), - e.times(2)); -}; -h.inverseHyperbolicCosine = h.acosh = function () { - var e, - n, - i = this, - t = i.constructor; - return i.lte(1) - ? new t(i.eq(1) ? 0 : NaN) - : i.isFinite() - ? ((e = t.precision), - (n = t.rounding), - (t.precision = e + Math.max(Math.abs(i.e), i.sd()) + 4), - (t.rounding = 1), - (w = !1), - (i = i.times(i).minus(1).sqrt().plus(i)), - (w = !0), - (t.precision = e), - (t.rounding = n), - i.ln()) - : new t(i); -}; -h.inverseHyperbolicSine = h.asinh = function () { - var e, - n, - i = this, - t = i.constructor; - return !i.isFinite() || i.isZero() - ? new t(i) - : ((e = t.precision), - (n = t.rounding), - (t.precision = e + 2 * Math.max(Math.abs(i.e), i.sd()) + 6), - (t.rounding = 1), - (w = !1), - (i = i.times(i).plus(1).sqrt().plus(i)), - (w = !0), - (t.precision = e), - (t.rounding = n), - i.ln()); -}; -h.inverseHyperbolicTangent = h.atanh = function () { - var e, - n, - i, - t, - r = this, - s = r.constructor; - return r.isFinite() - ? r.e >= 0 - ? new s(r.abs().eq(1) ? r.s / 0 : r.isZero() ? r : NaN) - : ((e = s.precision), - (n = s.rounding), - (t = r.sd()), - Math.max(t, e) < 2 * -r.e - 1 - ? p(new s(r), e, n, !0) - : ((s.precision = i = t - r.e), - (r = k(r.plus(1), new s(1).minus(r), i + e, 1)), - (s.precision = e + 4), - (s.rounding = 1), - (r = r.ln()), - (s.precision = e), - (s.rounding = n), - r.times(0.5))) - : new s(NaN); -}; -h.inverseSine = h.asin = function () { - var e, - n, - i, - t, - r = this, - s = r.constructor; - return r.isZero() - ? new s(r) - : ((n = r.abs().cmp(1)), - (i = s.precision), - (t = s.rounding), - n !== -1 - ? n === 0 - ? ((e = F(s, i + 4, t).times(0.5)), (e.s = r.s), e) - : new s(NaN) - : ((s.precision = i + 6), - (s.rounding = 1), - (r = r.div(new s(1).minus(r.times(r)).sqrt().plus(1)).atan()), - (s.precision = i), - (s.rounding = t), - r.times(2))); -}; -h.inverseTangent = h.atan = function () { - var e, - n, - i, - t, - r, - s, - o, - u, - c, - f = this, - l = f.constructor, - a = l.precision, - d = l.rounding; - if (f.isFinite()) { - if (f.isZero()) return new l(f); - if (f.abs().eq(1) && a + 4 <= Ce) return ((o = F(l, a + 4, d).times(0.25)), (o.s = f.s), o); - } else { - if (!f.s) return new l(NaN); - if (a + 4 <= Ce) return ((o = F(l, a + 4, d).times(0.5)), (o.s = f.s), o); - } - for (l.precision = u = a + 10, l.rounding = 1, i = Math.min(28, (u / m + 2) | 0), e = i; e; --e) - f = f.div(f.times(f).plus(1).sqrt().plus(1)); - for (w = !1, n = Math.ceil(u / m), t = 1, c = f.times(f), o = new l(f), r = f; e !== -1; ) - if ( - ((r = r.times(c)), - (s = o.minus(r.div((t += 2)))), - (r = r.times(c)), - (o = s.plus(r.div((t += 2)))), - o.d[n] !== void 0) - ) - for (e = n; o.d[e] === s.d[e] && e--; ); - return (i && (o = o.times(2 << (i - 1))), (w = !0), p(o, (l.precision = a), (l.rounding = d), !0)); -}; -h.isFinite = function () { - return !!this.d; -}; -h.isInteger = h.isInt = function () { - return !!this.d && R(this.e / m) > this.d.length - 2; -}; -h.isNaN = function () { - return !this.s; -}; -h.isNegative = h.isNeg = function () { - return this.s < 0; -}; -h.isPositive = h.isPos = function () { - return this.s > 0; -}; -h.isZero = function () { - return !!this.d && this.d[0] === 0; -}; -h.lessThan = h.lt = function (e) { - return this.cmp(e) < 0; -}; -h.lessThanOrEqualTo = h.lte = function (e) { - return this.cmp(e) < 1; -}; -h.logarithm = h.log = function (e) { - var n, - i, - t, - r, - s, - o, - u, - c, - f = this, - l = f.constructor, - a = l.precision, - d = l.rounding, - g = 5; - if (e == null) ((e = new l(10)), (n = !0)); - else { - if (((e = new l(e)), (i = e.d), e.s < 0 || !i || !i[0] || e.eq(1))) return new l(NaN); - n = e.eq(10); - } - if (((i = f.d), f.s < 0 || !i || !i[0] || f.eq(1))) - return new l(i && !i[0] ? -1 / 0 : f.s != 1 ? NaN : i ? 0 : 1 / 0); - if (n) - if (i.length > 1) s = !0; - else { - for (r = i[0]; r % 10 === 0; ) r /= 10; - s = r !== 1; - } - if ( - ((w = !1), (u = a + g), (o = B(f, u)), (t = n ? ue(l, u + 10) : B(e, u)), (c = k(o, t, u, 1)), Q(c.d, (r = a), d)) - ) - do - if (((u += 10), (o = B(f, u)), (t = n ? ue(l, u + 10) : B(e, u)), (c = k(o, t, u, 1)), !s)) { - +b(c.d).slice(r + 1, r + 15) + 1 == 1e14 && (c = p(c, a + 1, 0)); - break; - } - while (Q(c.d, (r += 10), d)); - return ((w = !0), p(c, a, d)); -}; -h.minus = h.sub = function (e) { - var n, - i, - t, - r, - s, - o, - u, - c, - f, - l, - a, - d, - g = this, - v = g.constructor; - if (((e = new v(e)), !g.d || !e.d)) - return (!g.s || !e.s ? (e = new v(NaN)) : g.d ? (e.s = -e.s) : (e = new v(e.d || g.s !== e.s ? g : NaN)), e); - if (g.s != e.s) return ((e.s = -e.s), g.plus(e)); - if (((f = g.d), (d = e.d), (u = v.precision), (c = v.rounding), !f[0] || !d[0])) { - if (d[0]) e.s = -e.s; - else if (f[0]) e = new v(g); - else return new v(c === 3 ? -0 : 0); - return w ? p(e, u, c) : e; - } - if (((i = R(e.e / m)), (l = R(g.e / m)), (f = f.slice()), (s = l - i), s)) { - for ( - a = s < 0, - a ? ((n = f), (s = -s), (o = d.length)) : ((n = d), (i = l), (o = f.length)), - t = Math.max(Math.ceil(u / m), o) + 2, - s > t && ((s = t), (n.length = 1)), - n.reverse(), - t = s; - t--; - - ) - n.push(0); - n.reverse(); - } else { - for (t = f.length, o = d.length, a = t < o, a && (o = t), t = 0; t < o; t++) - if (f[t] != d[t]) { - a = f[t] < d[t]; - break; - } - s = 0; - } - for (a && ((n = f), (f = d), (d = n), (e.s = -e.s)), o = f.length, t = d.length - o; t > 0; --t) f[o++] = 0; - for (t = d.length; t > s; ) { - if (f[--t] < d[t]) { - for (r = t; r && f[--r] === 0; ) f[r] = D - 1; - (--f[r], (f[t] += D)); - } - f[t] -= d[t]; - } - for (; f[--o] === 0; ) f.pop(); - for (; f[0] === 0; f.shift()) --i; - return f[0] ? ((e.d = f), (e.e = ce(f, i)), w ? p(e, u, c) : e) : new v(c === 3 ? -0 : 0); -}; -h.modulo = h.mod = function (e) { - var n, - i = this, - t = i.constructor; - return ( - (e = new t(e)), - !i.d || !e.s || (e.d && !e.d[0]) - ? new t(NaN) - : !e.d || (i.d && !i.d[0]) - ? p(new t(i), t.precision, t.rounding) - : ((w = !1), - t.modulo == 9 ? ((n = k(i, e.abs(), 0, 3, 1)), (n.s *= e.s)) : (n = k(i, e, 0, t.modulo, 1)), - (n = n.times(e)), - (w = !0), - i.minus(n)) - ); -}; -h.naturalExponential = h.exp = function () { - return be(this); -}; -h.naturalLogarithm = h.ln = function () { - return B(this); -}; -h.negated = h.neg = function () { - var e = new this.constructor(this); - return ((e.s = -e.s), p(e)); -}; -h.plus = h.add = function (e) { - var n, - i, - t, - r, - s, - o, - u, - c, - f, - l, - a = this, - d = a.constructor; - if (((e = new d(e)), !a.d || !e.d)) - return (!a.s || !e.s ? (e = new d(NaN)) : a.d || (e = new d(e.d || a.s === e.s ? a : NaN)), e); - if (a.s != e.s) return ((e.s = -e.s), a.minus(e)); - if (((f = a.d), (l = e.d), (u = d.precision), (c = d.rounding), !f[0] || !l[0])) - return (l[0] || (e = new d(a)), w ? p(e, u, c) : e); - if (((s = R(a.e / m)), (t = R(e.e / m)), (f = f.slice()), (r = s - t), r)) { - for ( - r < 0 ? ((i = f), (r = -r), (o = l.length)) : ((i = l), (t = s), (o = f.length)), - s = Math.ceil(u / m), - o = s > o ? s + 1 : o + 1, - r > o && ((r = o), (i.length = 1)), - i.reverse(); - r--; - - ) - i.push(0); - i.reverse(); - } - for (o = f.length, r = l.length, o - r < 0 && ((r = o), (i = l), (l = f), (f = i)), n = 0; r; ) - ((n = ((f[--r] = f[r] + l[r] + n) / D) | 0), (f[r] %= D)); - for (n && (f.unshift(n), ++t), o = f.length; f[--o] == 0; ) f.pop(); - return ((e.d = f), (e.e = ce(f, t)), w ? p(e, u, c) : e); -}; -h.precision = h.sd = function (e) { - var n, - i = this; - if (e !== void 0 && e !== !!e && e !== 1 && e !== 0) throw Error($ + e); - return (i.d ? ((n = $e(i.d)), e && i.e + 1 > n && (n = i.e + 1)) : (n = NaN), n); -}; -h.round = function () { - var e = this, - n = e.constructor; - return p(new n(e), e.e + 1, n.rounding); -}; -h.sine = h.sin = function () { - var e, - n, - i = this, - t = i.constructor; - return i.isFinite() - ? i.isZero() - ? new t(i) - : ((e = t.precision), - (n = t.rounding), - (t.precision = e + Math.max(i.e, i.sd()) + m), - (t.rounding = 1), - (i = mn(t, We(t, i))), - (t.precision = e), - (t.rounding = n), - p(Z > 2 ? i.neg() : i, e, n, !0)) - : new t(NaN); -}; -h.squareRoot = h.sqrt = function () { - var e, - n, - i, - t, - r, - s, - o = this, - u = o.d, - c = o.e, - f = o.s, - l = o.constructor; - if (f !== 1 || !u || !u[0]) return new l(!f || (f < 0 && (!u || u[0])) ? NaN : u ? o : 1 / 0); - for ( - w = !1, - f = Math.sqrt(+o), - f == 0 || f == 1 / 0 - ? ((n = b(u)), - (n.length + c) % 2 == 0 && (n += '0'), - (f = Math.sqrt(n)), - (c = R((c + 1) / 2) - (c < 0 || c % 2)), - f == 1 / 0 ? (n = '5e' + c) : ((n = f.toExponential()), (n = n.slice(0, n.indexOf('e') + 1) + c)), - (t = new l(n))) - : (t = new l(f.toString())), - i = (c = l.precision) + 3; - ; - - ) - if (((s = t), (t = s.plus(k(o, s, i + 2, 1)).times(0.5)), b(s.d).slice(0, i) === (n = b(t.d)).slice(0, i))) - if (((n = n.slice(i - 3, i + 1)), n == '9999' || (!r && n == '4999'))) { - if (!r && (p(s, c + 1, 0), s.times(s).eq(o))) { - t = s; - break; - } - ((i += 4), (r = 1)); - } else { - (!+n || (!+n.slice(1) && n.charAt(0) == '5')) && (p(t, c + 1, 1), (e = !t.times(t).eq(o))); - break; - } - return ((w = !0), p(t, c, l.rounding, e)); -}; -h.tangent = h.tan = function () { - var e, - n, - i = this, - t = i.constructor; - return i.isFinite() - ? i.isZero() - ? new t(i) - : ((e = t.precision), - (n = t.rounding), - (t.precision = e + 10), - (t.rounding = 1), - (i = i.sin()), - (i.s = 1), - (i = k(i, new t(1).minus(i.times(i)).sqrt(), e + 10, 0)), - (t.precision = e), - (t.rounding = n), - p(Z == 2 || Z == 4 ? i.neg() : i, e, n, !0)) - : new t(NaN); -}; -h.times = h.mul = function (e) { - var n, - i, - t, - r, - s, - o, - u, - c, - f, - l = this, - a = l.constructor, - d = l.d, - g = (e = new a(e)).d; - if (((e.s *= l.s), !d || !d[0] || !g || !g[0])) - return new a(!e.s || (d && !d[0] && !g) || (g && !g[0] && !d) ? NaN : !d || !g ? e.s / 0 : e.s * 0); - for ( - i = R(l.e / m) + R(e.e / m), - c = d.length, - f = g.length, - c < f && ((s = d), (d = g), (g = s), (o = c), (c = f), (f = o)), - s = [], - o = c + f, - t = o; - t--; - - ) - s.push(0); - for (t = f; --t >= 0; ) { - for (n = 0, r = c + t; r > t; ) ((u = s[r] + g[t] * d[r - t - 1] + n), (s[r--] = u % D | 0), (n = (u / D) | 0)); - s[r] = (s[r] + n) % D | 0; - } - for (; !s[--o]; ) s.pop(); - return (n ? ++i : s.shift(), (e.d = s), (e.e = ce(s, i)), w ? p(e, a.precision, a.rounding) : e); -}; -h.toBinary = function (e, n) { - return Pe(this, 2, e, n); -}; -h.toDecimalPlaces = h.toDP = function (e, n) { - var i = this, - t = i.constructor; - return ( - (i = new t(i)), - e === void 0 ? i : (q(e, 0, H), n === void 0 ? (n = t.rounding) : q(n, 0, 8), p(i, e + i.e + 1, n)) - ); -}; -h.toExponential = function (e, n) { - var i, - t = this, - r = t.constructor; - return ( - e === void 0 - ? (i = L(t, !0)) - : (q(e, 0, H), n === void 0 ? (n = r.rounding) : q(n, 0, 8), (t = p(new r(t), e + 1, n)), (i = L(t, !0, e + 1))), - t.isNeg() && !t.isZero() ? '-' + i : i - ); -}; -h.toFixed = function (e, n) { - var i, - t, - r = this, - s = r.constructor; - return ( - e === void 0 - ? (i = L(r)) - : (q(e, 0, H), - n === void 0 ? (n = s.rounding) : q(n, 0, 8), - (t = p(new s(r), e + r.e + 1, n)), - (i = L(t, !1, e + t.e + 1))), - r.isNeg() && !r.isZero() ? '-' + i : i - ); -}; -h.toFraction = function (e) { - var n, - i, - t, - r, - s, - o, - u, - c, - f, - l, - a, - d, - g = this, - v = g.d, - N = g.constructor; - if (!v) return new N(g); - if ( - ((f = i = new N(1)), - (t = c = new N(0)), - (n = new N(t)), - (s = n.e = $e(v) - g.e - 1), - (o = s % m), - (n.d[0] = C(10, o < 0 ? m + o : o)), - e == null) - ) - e = s > 0 ? n : f; - else { - if (((u = new N(e)), !u.isInt() || u.lt(f))) throw Error($ + u); - e = u.gt(n) ? (s > 0 ? n : f) : u; - } - for ( - w = !1, u = new N(b(v)), l = N.precision, N.precision = s = v.length * m * 2; - (a = k(u, n, 0, 1, 1)), (r = i.plus(a.times(t))), r.cmp(e) != 1; - - ) - ((i = t), (t = r), (r = f), (f = c.plus(a.times(r))), (c = r), (r = n), (n = u.minus(a.times(r))), (u = r)); - return ( - (r = k(e.minus(i), t, 0, 1, 1)), - (c = c.plus(r.times(f))), - (i = i.plus(r.times(t))), - (c.s = f.s = g.s), - (d = - k(f, t, s, 1) - .minus(g) - .abs() - .cmp(k(c, i, s, 1).minus(g).abs()) < 1 - ? [f, t] - : [c, i]), - (N.precision = l), - (w = !0), - d - ); -}; -h.toHexadecimal = h.toHex = function (e, n) { - return Pe(this, 16, e, n); -}; -h.toNearest = function (e, n) { - var i = this, - t = i.constructor; - if (((i = new t(i)), e == null)) { - if (!i.d) return i; - ((e = new t(1)), (n = t.rounding)); - } else { - if (((e = new t(e)), n === void 0 ? (n = t.rounding) : q(n, 0, 8), !i.d)) return e.s ? i : e; - if (!e.d) return (e.s && (e.s = i.s), e); - } - return (e.d[0] ? ((w = !1), (i = k(i, e, 0, n, 1).times(e)), (w = !0), p(i)) : ((e.s = i.s), (i = e)), i); -}; -h.toNumber = function () { - return +this; -}; -h.toOctal = function (e, n) { - return Pe(this, 8, e, n); -}; -h.toPower = h.pow = function (e) { - var n, - i, - t, - r, - s, - o, - u = this, - c = u.constructor, - f = +(e = new c(e)); - if (!u.d || !e.d || !u.d[0] || !e.d[0]) return new c(C(+u, f)); - if (((u = new c(u)), u.eq(1))) return u; - if (((t = c.precision), (s = c.rounding), e.eq(1))) return p(u, t, s); - if (((n = R(e.e / m)), n >= e.d.length - 1 && (i = f < 0 ? -f : f) <= dn)) - return ((r = He(c, u, i, t)), e.s < 0 ? new c(1).div(r) : p(r, t, s)); - if (((o = u.s), o < 0)) { - if (n < e.d.length - 1) return new c(NaN); - if (((e.d[n] & 1) == 0 && (o = 1), u.e == 0 && u.d[0] == 1 && u.d.length == 1)) return ((u.s = o), u); - } - return ( - (i = C(+u, f)), - (n = i == 0 || !isFinite(i) ? R(f * (Math.log('0.' + b(u.d)) / Math.LN10 + u.e + 1)) : new c(i + '').e), - n > c.maxE + 1 || n < c.minE - 1 - ? new c(n > 0 ? o / 0 : 0) - : ((w = !1), - (c.rounding = u.s = 1), - (i = Math.min(12, (n + '').length)), - (r = be(e.times(B(u, t + i)), t)), - r.d && - ((r = p(r, t + 5, 1)), - Q(r.d, t, s) && - ((n = t + 10), - (r = p(be(e.times(B(u, n + i)), n), n + 5, 1)), - +b(r.d).slice(t + 1, t + 15) + 1 == 1e14 && (r = p(r, t + 1, 0)))), - (r.s = o), - (w = !0), - (c.rounding = s), - p(r, t, s)) - ); -}; -h.toPrecision = function (e, n) { - var i, - t = this, - r = t.constructor; - return ( - e === void 0 - ? (i = L(t, t.e <= r.toExpNeg || t.e >= r.toExpPos)) - : (q(e, 1, H), - n === void 0 ? (n = r.rounding) : q(n, 0, 8), - (t = p(new r(t), e, n)), - (i = L(t, e <= t.e || t.e <= r.toExpNeg, e))), - t.isNeg() && !t.isZero() ? '-' + i : i - ); -}; -h.toSignificantDigits = h.toSD = function (e, n) { - var i = this, - t = i.constructor; - return ( - e === void 0 ? ((e = t.precision), (n = t.rounding)) : (q(e, 1, H), n === void 0 ? (n = t.rounding) : q(n, 0, 8)), - p(new t(i), e, n) - ); -}; -h.toString = function () { - var e = this, - n = e.constructor, - i = L(e, e.e <= n.toExpNeg || e.e >= n.toExpPos); - return e.isNeg() && !e.isZero() ? '-' + i : i; -}; -h.truncated = h.trunc = function () { - return p(new this.constructor(this), this.e + 1, 1); -}; -h.valueOf = h.toJSON = function () { - var e = this, - n = e.constructor, - i = L(e, e.e <= n.toExpNeg || e.e >= n.toExpPos); - return e.isNeg() ? '-' + i : i; -}; -function b(e) { - var n, - i, - t, - r = e.length - 1, - s = '', - o = e[0]; - if (r > 0) { - for (s += o, n = 1; n < r; n++) ((t = e[n] + ''), (i = m - t.length), i && (s += U(i)), (s += t)); - ((o = e[n]), (t = o + ''), (i = m - t.length), i && (s += U(i))); - } else if (o === 0) return '0'; - for (; o % 10 === 0; ) o /= 10; - return s + o; -} -function q(e, n, i) { - if (e !== ~~e || e < n || e > i) throw Error($ + e); -} -function Q(e, n, i, t) { - var r, s, o, u; - for (s = e[0]; s >= 10; s /= 10) --n; - return ( - --n < 0 ? ((n += m), (r = 0)) : ((r = Math.ceil((n + 1) / m)), (n %= m)), - (s = C(10, m - n)), - (u = e[r] % s | 0), - t == null - ? n < 3 - ? (n == 0 ? (u = (u / 100) | 0) : n == 1 && (u = (u / 10) | 0), - (o = (i < 4 && u == 99999) || (i > 3 && u == 49999) || u == 5e4 || u == 0)) - : (o = - (((i < 4 && u + 1 == s) || (i > 3 && u + 1 == s / 2)) && ((e[r + 1] / s / 100) | 0) == C(10, n - 2) - 1) || - ((u == s / 2 || u == 0) && ((e[r + 1] / s / 100) | 0) == 0)) - : n < 4 - ? (n == 0 ? (u = (u / 1e3) | 0) : n == 1 ? (u = (u / 100) | 0) : n == 2 && (u = (u / 10) | 0), - (o = ((t || i < 4) && u == 9999) || (!t && i > 3 && u == 4999))) - : (o = - (((t || i < 4) && u + 1 == s) || (!t && i > 3 && u + 1 == s / 2)) && - ((e[r + 1] / s / 1e3) | 0) == C(10, n - 3) - 1), - o - ); -} -function te(e, n, i) { - for (var t, r = [0], s, o = 0, u = e.length; o < u; ) { - for (s = r.length; s--; ) r[s] *= n; - for (r[0] += Se.indexOf(e.charAt(o++)), t = 0; t < r.length; t++) - r[t] > i - 1 && (r[t + 1] === void 0 && (r[t + 1] = 0), (r[t + 1] += (r[t] / i) | 0), (r[t] %= i)); - } - return r.reverse(); -} -function pn(e, n) { - var i, t, r; - if (n.isZero()) return n; - ((t = n.d.length), - t < 32 - ? ((i = Math.ceil(t / 3)), (r = (1 / le(4, i)).toString())) - : ((i = 16), (r = '2.3283064365386962890625e-10')), - (e.precision += i), - (n = j(e, 1, n.times(r), new e(1)))); - for (var s = i; s--; ) { - var o = n.times(n); - n = o.times(o).minus(o).times(8).plus(1); - } - return ((e.precision -= i), n); -} -var k = (function () { - function e(t, r, s) { - var o, - u = 0, - c = t.length; - for (t = t.slice(); c--; ) ((o = t[c] * r + u), (t[c] = o % s | 0), (u = (o / s) | 0)); - return (u && t.unshift(u), t); - } - function n(t, r, s, o) { - var u, c; - if (s != o) c = s > o ? 1 : -1; - else - for (u = c = 0; u < s; u++) - if (t[u] != r[u]) { - c = t[u] > r[u] ? 1 : -1; - break; - } - return c; - } - function i(t, r, s, o) { - for (var u = 0; s--; ) ((t[s] -= u), (u = t[s] < r[s] ? 1 : 0), (t[s] = u * o + t[s] - r[s])); - for (; !t[0] && t.length > 1; ) t.shift(); - } - return function (t, r, s, o, u, c) { - var f, - l, - a, - d, - g, - v, - N, - A, - M, - _, - E, - P, - x, - I, - ae, - z, - W, - de, - T, - y, - ee = t.constructor, - he = t.s == r.s ? 1 : -1, - O = t.d, - S = r.d; - if (!O || !O[0] || !S || !S[0]) - return new ee(!t.s || !r.s || (O ? S && O[0] == S[0] : !S) ? NaN : (O && O[0] == 0) || !S ? he * 0 : he / 0); - for ( - c ? ((g = 1), (l = t.e - r.e)) : ((c = D), (g = m), (l = R(t.e / g) - R(r.e / g))), - T = S.length, - W = O.length, - M = new ee(he), - _ = M.d = [], - a = 0; - S[a] == (O[a] || 0); - a++ - ); - if ( - (S[a] > (O[a] || 0) && l--, - s == null ? ((I = s = ee.precision), (o = ee.rounding)) : u ? (I = s + (t.e - r.e) + 1) : (I = s), - I < 0) - ) - (_.push(1), (v = !0)); - else { - if (((I = (I / g + 2) | 0), (a = 0), T == 1)) { - for (d = 0, S = S[0], I++; (a < W || d) && I--; a++) - ((ae = d * c + (O[a] || 0)), (_[a] = (ae / S) | 0), (d = ae % S | 0)); - v = d || a < W; - } else { - for ( - d = (c / (S[0] + 1)) | 0, - d > 1 && ((S = e(S, d, c)), (O = e(O, d, c)), (T = S.length), (W = O.length)), - z = T, - E = O.slice(0, T), - P = E.length; - P < T; - - ) - E[P++] = 0; - ((y = S.slice()), y.unshift(0), (de = S[0]), S[1] >= c / 2 && ++de); - do - ((d = 0), - (f = n(S, E, T, P)), - f < 0 - ? ((x = E[0]), - T != P && (x = x * c + (E[1] || 0)), - (d = (x / de) | 0), - d > 1 - ? (d >= c && (d = c - 1), - (N = e(S, d, c)), - (A = N.length), - (P = E.length), - (f = n(N, E, A, P)), - f == 1 && (d--, i(N, T < A ? y : S, A, c))) - : (d == 0 && (f = d = 1), (N = S.slice())), - (A = N.length), - A < P && N.unshift(0), - i(E, N, P, c), - f == -1 && ((P = E.length), (f = n(S, E, T, P)), f < 1 && (d++, i(E, T < P ? y : S, P, c))), - (P = E.length)) - : f === 0 && (d++, (E = [0])), - (_[a++] = d), - f && E[0] ? (E[P++] = O[z] || 0) : ((E = [O[z]]), (P = 1))); - while ((z++ < W || E[0] !== void 0) && I--); - v = E[0] !== void 0; - } - _[0] || _.shift(); - } - if (g == 1) ((M.e = l), (Le = v)); - else { - for (a = 1, d = _[0]; d >= 10; d /= 10) a++; - ((M.e = a + l * g - 1), p(M, u ? s + M.e + 1 : s, o, v)); - } - return M; - }; -})(); -function p(e, n, i, t) { - var r, - s, - o, - u, - c, - f, - l, - a, - d, - g = e.constructor; - e: if (n != null) { - if (((a = e.d), !a)) return e; - for (r = 1, u = a[0]; u >= 10; u /= 10) r++; - if (((s = n - r), s < 0)) ((s += m), (o = n), (l = a[(d = 0)]), (c = (l / C(10, r - o - 1)) % 10 | 0)); - else if (((d = Math.ceil((s + 1) / m)), (u = a.length), d >= u)) - if (t) { - for (; u++ <= d; ) a.push(0); - ((l = c = 0), (r = 1), (s %= m), (o = s - m + 1)); - } else break e; - else { - for (l = u = a[d], r = 1; u >= 10; u /= 10) r++; - ((s %= m), (o = s - m + r), (c = o < 0 ? 0 : (l / C(10, r - o - 1)) % 10 | 0)); - } - if ( - ((t = t || n < 0 || a[d + 1] !== void 0 || (o < 0 ? l : l % C(10, r - o - 1))), - (f = - i < 4 - ? (c || t) && (i == 0 || i == (e.s < 0 ? 3 : 2)) - : c > 5 || - (c == 5 && - (i == 4 || - t || - (i == 6 && (s > 0 ? (o > 0 ? l / C(10, r - o) : 0) : a[d - 1]) % 10 & 1) || - i == (e.s < 0 ? 8 : 7)))), - n < 1 || !a[0]) - ) - return ( - (a.length = 0), - f ? ((n -= e.e + 1), (a[0] = C(10, (m - (n % m)) % m)), (e.e = -n || 0)) : (a[0] = e.e = 0), - e - ); - if ( - (s == 0 - ? ((a.length = d), (u = 1), d--) - : ((a.length = d + 1), (u = C(10, m - s)), (a[d] = o > 0 ? ((l / C(10, r - o)) % C(10, o) | 0) * u : 0)), - f) - ) - for (;;) - if (d == 0) { - for (s = 1, o = a[0]; o >= 10; o /= 10) s++; - for (o = a[0] += u, u = 1; o >= 10; o /= 10) u++; - s != u && (e.e++, a[0] == D && (a[0] = 1)); - break; - } else { - if (((a[d] += u), a[d] != D)) break; - ((a[d--] = 0), (u = 1)); - } - for (s = a.length; a[--s] === 0; ) a.pop(); - } - return (w && (e.e > g.maxE ? ((e.d = null), (e.e = NaN)) : e.e < g.minE && ((e.e = 0), (e.d = [0]))), e); -} -function L(e, n, i) { - if (!e.isFinite()) return je(e); - var t, - r = e.e, - s = b(e.d), - o = s.length; - return ( - n - ? (i && (t = i - o) > 0 - ? (s = s.charAt(0) + '.' + s.slice(1) + U(t)) - : o > 1 && (s = s.charAt(0) + '.' + s.slice(1)), - (s = s + (e.e < 0 ? 'e' : 'e+') + e.e)) - : r < 0 - ? ((s = '0.' + U(-r - 1) + s), i && (t = i - o) > 0 && (s += U(t))) - : r >= o - ? ((s += U(r + 1 - o)), i && (t = i - r - 1) > 0 && (s = s + '.' + U(t))) - : ((t = r + 1) < o && (s = s.slice(0, t) + '.' + s.slice(t)), - i && (t = i - o) > 0 && (r + 1 === o && (s += '.'), (s += U(t)))), - s - ); -} -function ce(e, n) { - var i = e[0]; - for (n *= m; i >= 10; i /= 10) n++; - return n; -} -function ue(e, n, i) { - if (n > hn) throw ((w = !0), i && (e.precision = i), Error(Ie)); - return p(new e(se), n, 1, !0); -} -function F(e, n, i) { - if (n > Ce) throw Error(Ie); - return p(new e(oe), n, i, !0); -} -function $e(e) { - var n = e.length - 1, - i = n * m + 1; - if (((n = e[n]), n)) { - for (; n % 10 == 0; n /= 10) i--; - for (n = e[0]; n >= 10; n /= 10) i++; - } - return i; -} -function U(e) { - for (var n = ''; e--; ) n += '0'; - return n; -} -function He(e, n, i, t) { - var r, - s = new e(1), - o = Math.ceil(t / m + 4); - for (w = !1; ; ) { - if ((i % 2 && ((s = s.times(n)), De(s.d, o) && (r = !0)), (i = R(i / 2)), i === 0)) { - ((i = s.d.length - 1), r && s.d[i] === 0 && ++s.d[i]); - break; - } - ((n = n.times(n)), De(n.d, o)); - } - return ((w = !0), s); -} -function Te(e) { - return e.d[e.d.length - 1] & 1; -} -function Ve(e, n, i) { - for (var t, r, s = new e(n[0]), o = 0; ++o < n.length; ) { - if (((r = new e(n[o])), !r.s)) { - s = r; - break; - } - ((t = s.cmp(r)), (t === i || (t === 0 && s.s === i)) && (s = r)); - } - return s; -} -function be(e, n) { - var i, - t, - r, - s, - o, - u, - c, - f = 0, - l = 0, - a = 0, - d = e.constructor, - g = d.rounding, - v = d.precision; - if (!e.d || !e.d[0] || e.e > 17) - return new d(e.d ? (e.d[0] ? (e.s < 0 ? 0 : 1 / 0) : 1) : e.s ? (e.s < 0 ? 0 : e) : NaN); - for (n == null ? ((w = !1), (c = v)) : (c = n), u = new d(0.03125); e.e > -2; ) ((e = e.times(u)), (a += 5)); - for (t = ((Math.log(C(2, a)) / Math.LN10) * 2 + 5) | 0, c += t, i = s = o = new d(1), d.precision = c; ; ) { - if ( - ((s = p(s.times(e), c, 1)), - (i = i.times(++l)), - (u = o.plus(k(s, i, c, 1))), - b(u.d).slice(0, c) === b(o.d).slice(0, c)) - ) { - for (r = a; r--; ) o = p(o.times(o), c, 1); - if (n == null) - if (f < 3 && Q(o.d, c - t, g, f)) ((d.precision = c += 10), (i = s = u = new d(1)), (l = 0), f++); - else return p(o, (d.precision = v), g, (w = !0)); - else return ((d.precision = v), o); - } - o = u; - } -} -function B(e, n) { - var i, - t, - r, - s, - o, - u, - c, - f, - l, - a, - d, - g = 1, - v = 10, - N = e, - A = N.d, - M = N.constructor, - _ = M.rounding, - E = M.precision; - if (N.s < 0 || !A || !A[0] || (!N.e && A[0] == 1 && A.length == 1)) - return new M(A && !A[0] ? -1 / 0 : N.s != 1 ? NaN : A ? 0 : N); - if ( - (n == null ? ((w = !1), (l = E)) : (l = n), - (M.precision = l += v), - (i = b(A)), - (t = i.charAt(0)), - Math.abs((s = N.e)) < 15e14) - ) { - for (; (t < 7 && t != 1) || (t == 1 && i.charAt(1) > 3); ) ((N = N.times(e)), (i = b(N.d)), (t = i.charAt(0)), g++); - ((s = N.e), t > 1 ? ((N = new M('0.' + i)), s++) : (N = new M(t + '.' + i.slice(1)))); - } else - return ( - (f = ue(M, l + 2, E).times(s + '')), - (N = B(new M(t + '.' + i.slice(1)), l - v).plus(f)), - (M.precision = E), - n == null ? p(N, E, _, (w = !0)) : N - ); - for (a = N, c = o = N = k(N.minus(1), N.plus(1), l, 1), d = p(N.times(N), l, 1), r = 3; ; ) { - if (((o = p(o.times(d), l, 1)), (f = c.plus(k(o, new M(r), l, 1))), b(f.d).slice(0, l) === b(c.d).slice(0, l))) - if ( - ((c = c.times(2)), - s !== 0 && (c = c.plus(ue(M, l + 2, E).times(s + ''))), - (c = k(c, new M(g), l, 1)), - n == null) - ) - if (Q(c.d, l - v, _, u)) - ((M.precision = l += v), - (f = o = N = k(a.minus(1), a.plus(1), l, 1)), - (d = p(N.times(N), l, 1)), - (r = u = 1)); - else return p(c, (M.precision = E), _, (w = !0)); - else return ((M.precision = E), c); - ((c = f), (r += 2)); - } -} -function je(e) { - return String((e.s * e.s) / 0); -} -function re(e, n) { - var i, t, r; - for ( - (i = n.indexOf('.')) > -1 && (n = n.replace('.', '')), - (t = n.search(/e/i)) > 0 - ? (i < 0 && (i = t), (i += +n.slice(t + 1)), (n = n.substring(0, t))) - : i < 0 && (i = n.length), - t = 0; - n.charCodeAt(t) === 48; - t++ - ); - for (r = n.length; n.charCodeAt(r - 1) === 48; --r); - if (((n = n.slice(t, r)), n)) { - if (((r -= t), (e.e = i = i - t - 1), (e.d = []), (t = (i + 1) % m), i < 0 && (t += m), t < r)) { - for (t && e.d.push(+n.slice(0, t)), r -= m; t < r; ) e.d.push(+n.slice(t, (t += m))); - ((n = n.slice(t)), (t = m - n.length)); - } else t -= r; - for (; t--; ) n += '0'; - (e.d.push(+n), - w && - (e.e > e.constructor.maxE - ? ((e.d = null), (e.e = NaN)) - : e.e < e.constructor.minE && ((e.e = 0), (e.d = [0])))); - } else ((e.e = 0), (e.d = [0])); - return e; -} -function gn(e, n) { - var i, t, r, s, o, u, c, f, l; - if (n.indexOf('_') > -1) { - if (((n = n.replace(/(\d)_(?=\d)/g, '$1')), Be.test(n))) return re(e, n); - } else if (n === 'Infinity' || n === 'NaN') return (+n || (e.s = NaN), (e.e = NaN), (e.d = null), e); - if (ln.test(n)) ((i = 16), (n = n.toLowerCase())); - else if (cn.test(n)) i = 2; - else if (an.test(n)) i = 8; - else throw Error($ + n); - for ( - s = n.search(/p/i), - s > 0 ? ((c = +n.slice(s + 1)), (n = n.substring(2, s))) : (n = n.slice(2)), - s = n.indexOf('.'), - o = s >= 0, - t = e.constructor, - o && ((n = n.replace('.', '')), (u = n.length), (s = u - s), (r = He(t, new t(i), s, s * 2))), - f = te(n, i, D), - l = f.length - 1, - s = l; - f[s] === 0; - --s - ) - f.pop(); - return s < 0 - ? new t(e.s * 0) - : ((e.e = ce(f, l)), - (e.d = f), - (w = !1), - o && (e = k(e, r, u * 4)), - c && (e = e.times(Math.abs(c) < 54 ? C(2, c) : Y.pow(2, c))), - (w = !0), - e); -} -function mn(e, n) { - var i, - t = n.d.length; - if (t < 3) return n.isZero() ? n : j(e, 2, n, n); - ((i = 1.4 * Math.sqrt(t)), (i = i > 16 ? 16 : i | 0), (n = n.times(1 / le(5, i))), (n = j(e, 2, n, n))); - for (var r, s = new e(5), o = new e(16), u = new e(20); i--; ) - ((r = n.times(n)), (n = n.times(s.plus(r.times(o.times(r).minus(u)))))); - return n; -} -function j(e, n, i, t, r) { - var s, - o, - u, - c, - f = 1, - l = e.precision, - a = Math.ceil(l / m); - for (w = !1, c = i.times(i), u = new e(t); ; ) { - if ( - ((o = k(u.times(c), new e(n++ * n++), l, 1)), - (u = r ? t.plus(o) : t.minus(o)), - (t = k(o.times(c), new e(n++ * n++), l, 1)), - (o = u.plus(t)), - o.d[a] !== void 0) - ) { - for (s = a; o.d[s] === u.d[s] && s--; ); - if (s == -1) break; - } - ((s = u), (u = t), (t = o), (o = s), f++); - } - return ((w = !0), (o.d.length = a + 1), o); -} -function le(e, n) { - for (var i = e; --n; ) i *= e; - return i; -} -function We(e, n) { - var i, - t = n.s < 0, - r = F(e, e.precision, 1), - s = r.times(0.5); - if (((n = n.abs()), n.lte(s))) return ((Z = t ? 4 : 1), n); - if (((i = n.divToInt(r)), i.isZero())) Z = t ? 3 : 2; - else { - if (((n = n.minus(i.times(r))), n.lte(s))) return ((Z = Te(i) ? (t ? 2 : 3) : t ? 4 : 1), n); - Z = Te(i) ? (t ? 1 : 4) : t ? 3 : 2; - } - return n.minus(r).abs(); -} -function Pe(e, n, i, t) { - var r, - s, - o, - u, - c, - f, - l, - a, - d, - g = e.constructor, - v = i !== void 0; - if ( - (v ? (q(i, 1, H), t === void 0 ? (t = g.rounding) : q(t, 0, 8)) : ((i = g.precision), (t = g.rounding)), - !e.isFinite()) - ) - l = je(e); - else { - for ( - l = L(e), - o = l.indexOf('.'), - v ? ((r = 2), n == 16 ? (i = i * 4 - 3) : n == 8 && (i = i * 3 - 2)) : (r = n), - o >= 0 && - ((l = l.replace('.', '')), (d = new g(1)), (d.e = l.length - o), (d.d = te(L(d), 10, r)), (d.e = d.d.length)), - a = te(l, 10, r), - s = c = a.length; - a[--c] == 0; - - ) - a.pop(); - if (!a[0]) l = v ? '0p+0' : '0'; - else { - if ( - (o < 0 - ? s-- - : ((e = new g(e)), (e.d = a), (e.e = s), (e = k(e, d, i, t, 0, r)), (a = e.d), (s = e.e), (f = Le)), - (o = a[i]), - (u = r / 2), - (f = f || a[i + 1] !== void 0), - (f = - t < 4 - ? (o !== void 0 || f) && (t === 0 || t === (e.s < 0 ? 3 : 2)) - : o > u || (o === u && (t === 4 || f || (t === 6 && a[i - 1] & 1) || t === (e.s < 0 ? 8 : 7)))), - (a.length = i), - f) - ) - for (; ++a[--i] > r - 1; ) ((a[i] = 0), i || (++s, a.unshift(1))); - for (c = a.length; !a[c - 1]; --c); - for (o = 0, l = ''; o < c; o++) l += Se.charAt(a[o]); - if (v) { - if (c > 1) - if (n == 16 || n == 8) { - for (o = n == 16 ? 4 : 3, --c; c % o; c++) l += '0'; - for (a = te(l, r, n), c = a.length; !a[c - 1]; --c); - for (o = 1, l = '1.'; o < c; o++) l += Se.charAt(a[o]); - } else l = l.charAt(0) + '.' + l.slice(1); - l = l + (s < 0 ? 'p' : 'p+') + s; - } else if (s < 0) { - for (; ++s; ) l = '0' + l; - l = '0.' + l; - } else if (++s > c) for (s -= c; s--; ) l += '0'; - else s < c && (l = l.slice(0, s) + '.' + l.slice(s)); - } - l = (n == 16 ? '0x' : n == 2 ? '0b' : n == 8 ? '0o' : '') + l; - } - return e.s < 0 ? '-' + l : l; -} -function De(e, n) { - if (e.length > n) return ((e.length = n), !0); -} -function wn(e) { - return new this(e).abs(); -} -function Nn(e) { - return new this(e).acos(); -} -function vn(e) { - return new this(e).acosh(); -} -function En(e, n) { - return new this(e).plus(n); -} -function kn(e) { - return new this(e).asin(); -} -function Sn(e) { - return new this(e).asinh(); -} -function Mn(e) { - return new this(e).atan(); -} -function Cn(e) { - return new this(e).atanh(); -} -function bn(e, n) { - ((e = new this(e)), (n = new this(n))); - var i, - t = this.precision, - r = this.rounding, - s = t + 4; - return ( - !e.s || !n.s - ? (i = new this(NaN)) - : !e.d && !n.d - ? ((i = F(this, s, 1).times(n.s > 0 ? 0.25 : 0.75)), (i.s = e.s)) - : !n.d || e.isZero() - ? ((i = n.s < 0 ? F(this, t, r) : new this(0)), (i.s = e.s)) - : !e.d || n.isZero() - ? ((i = F(this, s, 1).times(0.5)), (i.s = e.s)) - : n.s < 0 - ? ((this.precision = s), - (this.rounding = 1), - (i = this.atan(k(e, n, s, 1))), - (n = F(this, s, 1)), - (this.precision = t), - (this.rounding = r), - (i = e.s < 0 ? i.minus(n) : i.plus(n))) - : (i = this.atan(k(e, n, s, 1))), - i - ); -} -function Pn(e) { - return new this(e).cbrt(); -} -function On(e) { - return p((e = new this(e)), e.e + 1, 2); -} -function Rn(e, n, i) { - return new this(e).clamp(n, i); -} -function An(e) { - if (!e || typeof e != 'object') throw Error(fe + 'Object expected'); - var n, - i, - t, - r = e.defaults === !0, - s = [ - 'precision', - 1, - H, - 'rounding', - 0, - 8, - 'toExpNeg', - -V, - 0, - 'toExpPos', - 0, - V, - 'maxE', - 0, - V, - 'minE', - -V, - 0, - 'modulo', - 0, - 9, - ]; - for (n = 0; n < s.length; n += 3) - if (((i = s[n]), r && (this[i] = Me[i]), (t = e[i]) !== void 0)) - if (R(t) === t && t >= s[n + 1] && t <= s[n + 2]) this[i] = t; - else throw Error($ + i + ': ' + t); - if (((i = 'crypto'), r && (this[i] = Me[i]), (t = e[i]) !== void 0)) - if (t === !0 || t === !1 || t === 0 || t === 1) - if (t) - if (typeof crypto < 'u' && crypto && (crypto.getRandomValues || crypto.randomBytes)) this[i] = !0; - else throw Error(Ze); - else this[i] = !1; - else throw Error($ + i + ': ' + t); - return this; -} -function qn(e) { - return new this(e).cos(); -} -function _n(e) { - return new this(e).cosh(); -} -function Ge(e) { - var n, i, t; - function r(s) { - var o, - u, - c, - f = this; - if (!(f instanceof r)) return new r(s); - if (((f.constructor = r), Fe(s))) { - ((f.s = s.s), - w - ? !s.d || s.e > r.maxE - ? ((f.e = NaN), (f.d = null)) - : s.e < r.minE - ? ((f.e = 0), (f.d = [0])) - : ((f.e = s.e), (f.d = s.d.slice())) - : ((f.e = s.e), (f.d = s.d ? s.d.slice() : s.d))); - return; - } - if (((c = typeof s), c === 'number')) { - if (s === 0) { - ((f.s = 1 / s < 0 ? -1 : 1), (f.e = 0), (f.d = [0])); - return; - } - if ((s < 0 ? ((s = -s), (f.s = -1)) : (f.s = 1), s === ~~s && s < 1e7)) { - for (o = 0, u = s; u >= 10; u /= 10) o++; - w - ? o > r.maxE - ? ((f.e = NaN), (f.d = null)) - : o < r.minE - ? ((f.e = 0), (f.d = [0])) - : ((f.e = o), (f.d = [s])) - : ((f.e = o), (f.d = [s])); - return; - } - if (s * 0 !== 0) { - (s || (f.s = NaN), (f.e = NaN), (f.d = null)); - return; - } - return re(f, s.toString()); - } - if (c === 'string') - return ( - (u = s.charCodeAt(0)) === 45 ? ((s = s.slice(1)), (f.s = -1)) : (u === 43 && (s = s.slice(1)), (f.s = 1)), - Be.test(s) ? re(f, s) : gn(f, s) - ); - if (c === 'bigint') return (s < 0 ? ((s = -s), (f.s = -1)) : (f.s = 1), re(f, s.toString())); - throw Error($ + s); - } - if ( - ((r.prototype = h), - (r.ROUND_UP = 0), - (r.ROUND_DOWN = 1), - (r.ROUND_CEIL = 2), - (r.ROUND_FLOOR = 3), - (r.ROUND_HALF_UP = 4), - (r.ROUND_HALF_DOWN = 5), - (r.ROUND_HALF_EVEN = 6), - (r.ROUND_HALF_CEIL = 7), - (r.ROUND_HALF_FLOOR = 8), - (r.EUCLID = 9), - (r.config = r.set = An), - (r.clone = Ge), - (r.isDecimal = Fe), - (r.abs = wn), - (r.acos = Nn), - (r.acosh = vn), - (r.add = En), - (r.asin = kn), - (r.asinh = Sn), - (r.atan = Mn), - (r.atanh = Cn), - (r.atan2 = bn), - (r.cbrt = Pn), - (r.ceil = On), - (r.clamp = Rn), - (r.cos = qn), - (r.cosh = _n), - (r.div = Tn), - (r.exp = Dn), - (r.floor = Fn), - (r.hypot = Ln), - (r.ln = In), - (r.log = Zn), - (r.log10 = Bn), - (r.log2 = Un), - (r.max = $n), - (r.min = Hn), - (r.mod = Vn), - (r.mul = jn), - (r.pow = Wn), - (r.random = Gn), - (r.round = Jn), - (r.sign = Xn), - (r.sin = Kn), - (r.sinh = Qn), - (r.sqrt = Yn), - (r.sub = xn), - (r.sum = zn), - (r.tan = yn), - (r.tanh = ei), - (r.trunc = ni), - e === void 0 && (e = {}), - e && e.defaults !== !0) - ) - for ( - t = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'maxE', 'minE', 'modulo', 'crypto'], n = 0; - n < t.length; - - ) - e.hasOwnProperty((i = t[n++])) || (e[i] = this[i]); - return (r.config(e), r); -} -function Tn(e, n) { - return new this(e).div(n); -} -function Dn(e) { - return new this(e).exp(); -} -function Fn(e) { - return p((e = new this(e)), e.e + 1, 3); -} -function Ln() { - var e, - n, - i = new this(0); - for (w = !1, e = 0; e < arguments.length; ) - if (((n = new this(arguments[e++])), n.d)) i.d && (i = i.plus(n.times(n))); - else { - if (n.s) return ((w = !0), new this(1 / 0)); - i = n; - } - return ((w = !0), i.sqrt()); -} -function Fe(e) { - return e instanceof Y || (e && e.toStringTag === Ue) || !1; -} -function In(e) { - return new this(e).ln(); -} -function Zn(e, n) { - return new this(e).log(n); -} -function Un(e) { - return new this(e).log(2); -} -function Bn(e) { - return new this(e).log(10); -} -function $n() { - return Ve(this, arguments, -1); -} -function Hn() { - return Ve(this, arguments, 1); -} -function Vn(e, n) { - return new this(e).mod(n); -} -function jn(e, n) { - return new this(e).mul(n); -} -function Wn(e, n) { - return new this(e).pow(n); -} -function Gn(e) { - var n, - i, - t, - r, - s = 0, - o = new this(1), - u = []; - if ((e === void 0 ? (e = this.precision) : q(e, 1, H), (t = Math.ceil(e / m)), this.crypto)) - if (crypto.getRandomValues) - for (n = crypto.getRandomValues(new Uint32Array(t)); s < t; ) - ((r = n[s]), r >= 429e7 ? (n[s] = crypto.getRandomValues(new Uint32Array(1))[0]) : (u[s++] = r % 1e7)); - else if (crypto.randomBytes) { - for (n = crypto.randomBytes((t *= 4)); s < t; ) - ((r = n[s] + (n[s + 1] << 8) + (n[s + 2] << 16) + ((n[s + 3] & 127) << 24)), - r >= 214e7 ? crypto.randomBytes(4).copy(n, s) : (u.push(r % 1e7), (s += 4))); - s = t / 4; - } else throw Error(Ze); - else for (; s < t; ) u[s++] = (Math.random() * 1e7) | 0; - for (t = u[--s], e %= m, t && e && ((r = C(10, m - e)), (u[s] = ((t / r) | 0) * r)); u[s] === 0; s--) u.pop(); - if (s < 0) ((i = 0), (u = [0])); - else { - for (i = -1; u[0] === 0; i -= m) u.shift(); - for (t = 1, r = u[0]; r >= 10; r /= 10) t++; - t < m && (i -= m - t); - } - return ((o.e = i), (o.d = u), o); -} -function Jn(e) { - return p((e = new this(e)), e.e + 1, this.rounding); -} -function Xn(e) { - return ((e = new this(e)), e.d ? (e.d[0] ? e.s : 0 * e.s) : e.s || NaN); -} -function Kn(e) { - return new this(e).sin(); -} -function Qn(e) { - return new this(e).sinh(); -} -function Yn(e) { - return new this(e).sqrt(); -} -function xn(e, n) { - return new this(e).sub(n); -} -function zn() { - var e = 0, - n = arguments, - i = new this(n[e]); - for (w = !1; i.s && ++e < n.length; ) i = i.plus(n[e]); - return ((w = !0), p(i, this.precision, this.rounding)); -} -function yn(e) { - return new this(e).tan(); -} -function ei(e) { - return new this(e).tanh(); -} -function ni(e) { - return p((e = new this(e)), e.e + 1, 1); -} -h[Symbol.for('nodejs.util.inspect.custom')] = h.toString; -h[Symbol.toStringTag] = 'Decimal'; -var Y = (h.constructor = Ge(Me)); -se = new Y(se); -oe = new Y(oe); -var Je = Y; -0 && (module.exports = { Decimal, Public, getRuntime, makeStrictEnum, objectEnumValues }); -/*! Bundled license information: - -decimal.js/decimal.mjs: - (*! - * decimal.js v10.5.0 - * An arbitrary-precision Decimal type for JavaScript. - * https://github.com/MikeMcl/decimal.js - * Copyright (c) 2025 Michael Mclaughlin - * MIT Licence - *) -*/ -//# sourceMappingURL=index-browser.js.map diff --git a/prisma/generated/client/runtime/library.d.ts b/prisma/generated/client/runtime/library.d.ts deleted file mode 100644 index 417dee3..0000000 --- a/prisma/generated/client/runtime/library.d.ts +++ /dev/null @@ -1,4729 +0,0 @@ -/** - * @param this - */ -declare function $extends(this: Client, extension: ExtensionArgs | ((client: Client) => Client)): Client; - -declare type AccelerateEngineConfig = { - inlineSchema: EngineConfig['inlineSchema']; - inlineSchemaHash: EngineConfig['inlineSchemaHash']; - env: EngineConfig['env']; - generator?: { - previewFeatures: string[]; - }; - inlineDatasources: EngineConfig['inlineDatasources']; - overrideDatasources: EngineConfig['overrideDatasources']; - clientVersion: EngineConfig['clientVersion']; - engineVersion: EngineConfig['engineVersion']; - logEmitter: EngineConfig['logEmitter']; - logQueries?: EngineConfig['logQueries']; - logLevel?: EngineConfig['logLevel']; - tracingHelper: EngineConfig['tracingHelper']; - accelerateUtils?: AccelerateUtils; -}; - -declare type AccelerateUtils = EngineConfig['accelerateUtils']; - -export declare type Action = keyof typeof DMMF_2.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw'; - -declare type ActiveConnectorType = Exclude; - -/** - * An interface that exposes some basic information about the - * adapter like its name and provider type. - */ -declare interface AdapterInfo { - readonly provider: Provider; - readonly adapterName: (typeof officialPrismaAdapters)[number] | (string & {}); -} - -export declare type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum'; - -export declare type AllModelsToStringIndex< - TypeMap extends TypeMapDef, - Args extends Record, - K extends PropertyKey, -> = Args extends { - [P in K]: { - $allModels: infer AllModels; - }; -} - ? { - [P in K]: Record; - } - : {}; - -declare class AnyNull extends NullTypesEnumValue { - #private; -} - -export declare type ApplyOmit = Compute<{ - [K in keyof T as OmitValue extends true ? never : K]: T[K]; -}>; - -export declare type Args = T extends { - [K: symbol]: { - types: { - operations: { - [K in F]: { - args: any; - }; - }; - }; - }; -} - ? T[symbol]['types']['operations'][F]['args'] - : any; - -export declare type Args_3 = Args; - -/** - * Original `quaint::ValueType` enum tag from Prisma's `quaint`. - * Query arguments marked with this type are sanitized before being sent to the database. - * Notice while a query argument may be `null`, `ArgType` is guaranteed to be defined. - */ -declare type ArgType = - | 'Int32' - | 'Int64' - | 'Float' - | 'Double' - | 'Text' - | 'Enum' - | 'EnumArray' - | 'Bytes' - | 'Boolean' - | 'Char' - | 'Array' - | 'Numeric' - | 'Json' - | 'Xml' - | 'Uuid' - | 'DateTime' - | 'Date' - | 'Time' - | 'Unknown'; - -/** - * Attributes is a map from string to attribute values. - * - * Note: only the own enumerable keys are counted as valid attribute keys. - */ -declare interface Attributes { - [attributeKey: string]: AttributeValue | undefined; -} - -/** - * Attribute values may be any non-nullish primitive value except an object. - * - * null or undefined attribute values are invalid and will result in undefined behavior. - */ -declare type AttributeValue = - | string - | number - | boolean - | Array - | Array - | Array; - -export declare type BaseDMMF = { - readonly datamodel: Omit; -}; - -declare type BatchArgs = { - queries: BatchQuery[]; - transaction?: { - isolationLevel?: IsolationLevel_2; - }; -}; - -declare type BatchInternalParams = { - requests: RequestParams[]; - customDataProxyFetch?: CustomDataProxyFetch; -}; - -declare type BatchQuery = { - model: string | undefined; - operation: string; - args: JsArgs | RawQueryArgs; -}; - -declare type BatchQueryEngineResult = QueryEngineResultData | Error; - -declare type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise; - -declare type BatchQueryOptionsCbArgs = { - args: BatchArgs; - query: (args: BatchArgs, __internalParams?: BatchInternalParams) => Promise; - __internalParams: BatchInternalParams; -}; - -declare type BatchResponse = MultiBatchResponse | CompactedBatchResponse; - -declare type BatchTransactionOptions = { - isolationLevel?: Transaction_2.IsolationLevel; -}; - -declare interface BinaryTargetsEnvValue { - fromEnvVar: string | null; - value: string; - native?: boolean; -} - -export declare type Call = (F & { - params: P; -})['returns']; - -declare interface CallSite { - getLocation(): LocationInFile | null; -} - -export declare type Cast = A extends W ? A : W; - -declare type Client = ReturnType extends new () => infer T ? T : never; - -export declare type ClientArg = { - [MethodName in string]: unknown; -}; - -export declare type ClientArgs = { - client: ClientArg; -}; - -export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin; - -export declare type ClientOptionDef = - | undefined - | { - [K in string]: any; - }; - -export declare type ClientOtherOps = { - $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; - $queryRawTyped(query: TypedSql): PrismaPromise; - $queryRawUnsafe(query: string, ...values: any[]): PrismaPromise; - $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; - $executeRawUnsafe(query: string, ...values: any[]): PrismaPromise; - $runCommandRaw(command: InputJsonObject): PrismaPromise; -}; - -declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum]; - -declare const ColumnTypeEnum: { - readonly Int32: 0; - readonly Int64: 1; - readonly Float: 2; - readonly Double: 3; - readonly Numeric: 4; - readonly Boolean: 5; - readonly Character: 6; - readonly Text: 7; - readonly Date: 8; - readonly Time: 9; - readonly DateTime: 10; - readonly Json: 11; - readonly Enum: 12; - readonly Bytes: 13; - readonly Set: 14; - readonly Uuid: 15; - readonly Int32Array: 64; - readonly Int64Array: 65; - readonly FloatArray: 66; - readonly DoubleArray: 67; - readonly NumericArray: 68; - readonly BooleanArray: 69; - readonly CharacterArray: 70; - readonly TextArray: 71; - readonly DateArray: 72; - readonly TimeArray: 73; - readonly DateTimeArray: 74; - readonly JsonArray: 75; - readonly EnumArray: 76; - readonly BytesArray: 77; - readonly UuidArray: 78; - readonly UnknownNumber: 128; -}; - -declare type CompactedBatchResponse = { - type: 'compacted'; - plan: QueryPlanNode; - arguments: Record[]; - nestedSelection: string[]; - keys: string[]; - expectNonEmpty: boolean; -}; - -declare type CompilerWasmLoadingConfig = { - /** - * WASM-bindgen runtime for corresponding module - */ - getRuntime: () => Promise<{ - __wbg_set_wasm(exports: unknown): void; - QueryCompiler: QueryCompilerConstructor; - }>; - /** - * Loads the raw wasm module for the wasm compiler engine. This configuration is - * generated specifically for each type of client, eg. Node.js client and Edge - * clients will have different implementations. - * @remarks this is a callback on purpose, we only load the wasm if needed. - * @remarks only used by ClientEngine - */ - getQueryCompilerWasmModule: () => Promise; -}; - -export declare type Compute = T extends Function - ? T - : { - [K in keyof T]: T[K]; - } & unknown; - -export declare type ComputeDeep = T extends Function - ? T - : { - [K in keyof T]: ComputeDeep; - } & unknown; - -declare type ComputedField = { - name: string; - needs: string[]; - compute: ResultArgsFieldCompute; -}; - -declare type ComputedFieldsMap = { - [fieldName: string]: ComputedField; -}; - -declare type ConnectionInfo = { - schemaName?: string; - maxBindValues?: number; - supportsRelationJoins: boolean; -}; - -declare type ConnectorType = - | 'mysql' - | 'mongodb' - | 'sqlite' - | 'postgresql' - | 'postgres' - | 'prisma+postgres' - | 'sqlserver' - | 'cockroachdb'; - -declare interface Context { - /** - * Get a value from the context. - * - * @param key key which identifies a context value - */ - getValue(key: symbol): unknown; - /** - * Create a new context which inherits from this context and has - * the given key set to the given value. - * - * @param key context key for which to set the value - * @param value value to set for the given key - */ - setValue(key: symbol, value: unknown): Context; - /** - * Return a new context which inherits from this context but does - * not contain a value for the given key. - * - * @param key context key for which to clear a value - */ - deleteValue(key: symbol): Context; -} - -declare type Context_2 = T extends { - [K: symbol]: { - ctx: infer C; - }; -} - ? C & - T & { - /** - * @deprecated Use `$name` instead. - */ - name?: string; - $name?: string; - $parent?: unknown; - } - : T & { - /** - * @deprecated Use `$name` instead. - */ - name?: string; - $name?: string; - $parent?: unknown; - }; - -export declare type Count = { - [K in keyof O]: Count; -} & {}; - -export declare function createParam(name: string): Param; - -/** - * Custom fetch function for `DataProxyEngine`. - * - * We can't use the actual type of `globalThis.fetch` because this will result - * in API Extractor referencing Node.js type definitions in the `.d.ts` bundle - * for the client runtime. We can only use such types in internal types that - * don't end up exported anywhere. - - * It's also not possible to write a definition of `fetch` that would accept the - * actual `fetch` function from different environments such as Node.js and - * Cloudflare Workers (with their extensions to `RequestInit` and `Response`). - * `fetch` is used in both covariant and contravariant positions in - * `CustomDataProxyFetch`, making it invariant, so we need the exact same type. - * Even if we removed the argument and left `fetch` in covariant position only, - * then for an extension-supplied function to be assignable to `customDataProxyFetch`, - * the platform-specific (or custom) `fetch` function needs to be assignable - * to our `fetch` definition. This, in turn, requires the third-party `Response` - * to be a subtype of our `Response` (which is not a problem, we could declare - * a minimal `Response` type that only includes what we use) *and* requires the - * third-party `RequestInit` to be a supertype of our `RequestInit` (i.e. we - * have to declare all properties any `RequestInit` implementation in existence - * could possibly have), which is not possible. - * - * Since `@prisma/extension-accelerate` redefines the type of - * `__internalParams.customDataProxyFetch` to its own type anyway (probably for - * exactly this reason), our definition is never actually used and is completely - * ignored, so it doesn't matter, and we can just use `unknown` as the type of - * `fetch` here. - */ -declare type CustomDataProxyFetch = (fetch: unknown) => unknown; - -declare class DataLoader { - private options; - batches: { - [key: string]: Job[]; - }; - private tickActive; - constructor(options: DataLoaderOptions); - request(request: T): Promise; - private dispatchBatches; - get [Symbol.toStringTag](): string; -} - -declare type DataLoaderOptions = { - singleLoader: (request: T) => Promise; - batchLoader: (request: T[]) => Promise; - batchBy: (request: T) => string | undefined; - batchOrder: (requestA: T, requestB: T) => number; -}; - -declare type Datamodel = ReadonlyDeep_2<{ - models: Model[]; - enums: DatamodelEnum[]; - types: Model[]; - indexes: Index[]; -}>; - -declare type DatamodelEnum = ReadonlyDeep_2<{ - name: string; - values: EnumValue[]; - dbName?: string | null; - documentation?: string; -}>; - -declare function datamodelEnumToSchemaEnum(datamodelEnum: DatamodelEnum): SchemaEnum; - -declare type DataRule = - | { - type: 'rowCountEq'; - args: number; - } - | { - type: 'rowCountNeq'; - args: number; - } - | { - type: 'affectedRowCountEq'; - args: number; - } - | { - type: 'never'; - }; - -declare type Datasource = { - url?: string; -}; - -declare type Datasources = { - [name in string]: Datasource; -}; - -declare class DbNull extends NullTypesEnumValue { - #private; -} - -export declare const Debug: typeof debugCreate & { - enable(namespace: any): void; - disable(): any; - enabled(namespace: string): boolean; - log: (...args: string[]) => void; - formatters: {}; -}; - -/** - * Create a new debug instance with the given namespace. - * - * @example - * ```ts - * import Debug from '@prisma/debug' - * const debug = Debug('prisma:client') - * debug('Hello World') - * ``` - */ -declare function debugCreate(namespace: string): ((...args: any[]) => void) & { - color: string; - enabled: boolean; - namespace: string; - log: (...args: string[]) => void; - extend: () => void; -}; - -export declare function Decimal(n: Decimal.Value): Decimal; - -export declare namespace Decimal { - export type Constructor = typeof Decimal; - export type Instance = Decimal; - export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; - export type Modulo = Rounding | 9; - export type Value = string | number | Decimal; - - // http://mikemcl.github.io/decimal.js/#constructor-properties - export interface Config { - precision?: number; - rounding?: Rounding; - toExpNeg?: number; - toExpPos?: number; - minE?: number; - maxE?: number; - crypto?: boolean; - modulo?: Modulo; - defaults?: boolean; - } -} - -export declare class Decimal { - readonly d: number[]; - readonly e: number; - readonly s: number; - - constructor(n: Decimal.Value); - - absoluteValue(): Decimal; - abs(): Decimal; - - ceil(): Decimal; - - clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; - clamp(min: Decimal.Value, max: Decimal.Value): Decimal; - - comparedTo(n: Decimal.Value): number; - cmp(n: Decimal.Value): number; - - cosine(): Decimal; - cos(): Decimal; - - cubeRoot(): Decimal; - cbrt(): Decimal; - - decimalPlaces(): number; - dp(): number; - - dividedBy(n: Decimal.Value): Decimal; - div(n: Decimal.Value): Decimal; - - dividedToIntegerBy(n: Decimal.Value): Decimal; - divToInt(n: Decimal.Value): Decimal; - - equals(n: Decimal.Value): boolean; - eq(n: Decimal.Value): boolean; - - floor(): Decimal; - - greaterThan(n: Decimal.Value): boolean; - gt(n: Decimal.Value): boolean; - - greaterThanOrEqualTo(n: Decimal.Value): boolean; - gte(n: Decimal.Value): boolean; - - hyperbolicCosine(): Decimal; - cosh(): Decimal; - - hyperbolicSine(): Decimal; - sinh(): Decimal; - - hyperbolicTangent(): Decimal; - tanh(): Decimal; - - inverseCosine(): Decimal; - acos(): Decimal; - - inverseHyperbolicCosine(): Decimal; - acosh(): Decimal; - - inverseHyperbolicSine(): Decimal; - asinh(): Decimal; - - inverseHyperbolicTangent(): Decimal; - atanh(): Decimal; - - inverseSine(): Decimal; - asin(): Decimal; - - inverseTangent(): Decimal; - atan(): Decimal; - - isFinite(): boolean; - - isInteger(): boolean; - isInt(): boolean; - - isNaN(): boolean; - - isNegative(): boolean; - isNeg(): boolean; - - isPositive(): boolean; - isPos(): boolean; - - isZero(): boolean; - - lessThan(n: Decimal.Value): boolean; - lt(n: Decimal.Value): boolean; - - lessThanOrEqualTo(n: Decimal.Value): boolean; - lte(n: Decimal.Value): boolean; - - logarithm(n?: Decimal.Value): Decimal; - log(n?: Decimal.Value): Decimal; - - minus(n: Decimal.Value): Decimal; - sub(n: Decimal.Value): Decimal; - - modulo(n: Decimal.Value): Decimal; - mod(n: Decimal.Value): Decimal; - - naturalExponential(): Decimal; - exp(): Decimal; - - naturalLogarithm(): Decimal; - ln(): Decimal; - - negated(): Decimal; - neg(): Decimal; - - plus(n: Decimal.Value): Decimal; - add(n: Decimal.Value): Decimal; - - precision(includeZeros?: boolean): number; - sd(includeZeros?: boolean): number; - - round(): Decimal; - - sine(): Decimal; - sin(): Decimal; - - squareRoot(): Decimal; - sqrt(): Decimal; - - tangent(): Decimal; - tan(): Decimal; - - times(n: Decimal.Value): Decimal; - mul(n: Decimal.Value): Decimal; - - toBinary(significantDigits?: number): string; - toBinary(significantDigits: number, rounding: Decimal.Rounding): string; - - toDecimalPlaces(decimalPlaces?: number): Decimal; - toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - toDP(decimalPlaces?: number): Decimal; - toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; - - toExponential(decimalPlaces?: number): string; - toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFixed(decimalPlaces?: number): string; - toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; - - toFraction(max_denominator?: Decimal.Value): Decimal[]; - - toHexadecimal(significantDigits?: number): string; - toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; - toHex(significantDigits?: number): string; - toHex(significantDigits: number, rounding?: Decimal.Rounding): string; - - toJSON(): string; - - toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; - - toNumber(): number; - - toOctal(significantDigits?: number): string; - toOctal(significantDigits: number, rounding: Decimal.Rounding): string; - - toPower(n: Decimal.Value): Decimal; - pow(n: Decimal.Value): Decimal; - - toPrecision(significantDigits?: number): string; - toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; - - toSignificantDigits(significantDigits?: number): Decimal; - toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; - toSD(significantDigits?: number): Decimal; - toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; - - toString(): string; - - truncated(): Decimal; - trunc(): Decimal; - - valueOf(): string; - - static abs(n: Decimal.Value): Decimal; - static acos(n: Decimal.Value): Decimal; - static acosh(n: Decimal.Value): Decimal; - static add(x: Decimal.Value, y: Decimal.Value): Decimal; - static asin(n: Decimal.Value): Decimal; - static asinh(n: Decimal.Value): Decimal; - static atan(n: Decimal.Value): Decimal; - static atanh(n: Decimal.Value): Decimal; - static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; - static cbrt(n: Decimal.Value): Decimal; - static ceil(n: Decimal.Value): Decimal; - static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; - static clone(object?: Decimal.Config): Decimal.Constructor; - static config(object: Decimal.Config): Decimal.Constructor; - static cos(n: Decimal.Value): Decimal; - static cosh(n: Decimal.Value): Decimal; - static div(x: Decimal.Value, y: Decimal.Value): Decimal; - static exp(n: Decimal.Value): Decimal; - static floor(n: Decimal.Value): Decimal; - static hypot(...n: Decimal.Value[]): Decimal; - static isDecimal(object: any): object is Decimal; - static ln(n: Decimal.Value): Decimal; - static log(n: Decimal.Value, base?: Decimal.Value): Decimal; - static log2(n: Decimal.Value): Decimal; - static log10(n: Decimal.Value): Decimal; - static max(...n: Decimal.Value[]): Decimal; - static min(...n: Decimal.Value[]): Decimal; - static mod(x: Decimal.Value, y: Decimal.Value): Decimal; - static mul(x: Decimal.Value, y: Decimal.Value): Decimal; - static noConflict(): Decimal.Constructor; // Browser only - static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; - static random(significantDigits?: number): Decimal; - static round(n: Decimal.Value): Decimal; - static set(object: Decimal.Config): Decimal.Constructor; - static sign(n: Decimal.Value): number; - static sin(n: Decimal.Value): Decimal; - static sinh(n: Decimal.Value): Decimal; - static sqrt(n: Decimal.Value): Decimal; - static sub(x: Decimal.Value, y: Decimal.Value): Decimal; - static sum(...n: Decimal.Value[]): Decimal; - static tan(n: Decimal.Value): Decimal; - static tanh(n: Decimal.Value): Decimal; - static trunc(n: Decimal.Value): Decimal; - - static readonly default?: Decimal.Constructor; - static readonly Decimal?: Decimal.Constructor; - - static readonly precision: number; - static readonly rounding: Decimal.Rounding; - static readonly toExpNeg: number; - static readonly toExpPos: number; - static readonly minE: number; - static readonly maxE: number; - static readonly crypto: boolean; - static readonly modulo: Decimal.Modulo; - - static readonly ROUND_UP: 0; - static readonly ROUND_DOWN: 1; - static readonly ROUND_CEIL: 2; - static readonly ROUND_FLOOR: 3; - static readonly ROUND_HALF_UP: 4; - static readonly ROUND_HALF_DOWN: 5; - static readonly ROUND_HALF_EVEN: 6; - static readonly ROUND_HALF_CEIL: 7; - static readonly ROUND_HALF_FLOOR: 8; - static readonly EUCLID: 9; -} - -/** - * Interface for any Decimal.js-like library - * Allows us to accept Decimal.js from different - * versions and some compatible alternatives - */ -export declare interface DecimalJsLike { - d: number[]; - e: number; - s: number; - toFixed(): string; -} - -export declare type DefaultArgs = InternalArgs<{}, {}, {}, {}>; - -export declare type DefaultSelection< - Payload extends OperationPayload, - Args = {}, - GlobalOmitOptions = {}, -> = Args extends { - omit: infer LocalOmit; -} - ? ApplyOmit< - UnwrapPayload<{ - default: Payload; - }>['default'], - PatchFlat>> - > - : ApplyOmit< - UnwrapPayload<{ - default: Payload; - }>['default'], - ExtractGlobalOmit> - >; - -export declare function defineDmmfProperty(target: object, runtimeDataModel: RuntimeDataModel): void; - -declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Client)): (client: Client) => Client; - -declare const denylist: readonly ['$connect', '$disconnect', '$on', '$transaction', '$extends']; - -declare type Deprecation = ReadonlyDeep_2<{ - sinceVersion: string; - reason: string; - plannedRemovalVersion?: string; -}>; - -declare type DeserializedResponse = Array>; - -export declare function deserializeJsonResponse(result: unknown): unknown; - -export declare function deserializeRawResult(response: RawResponse): DeserializedResponse; - -export declare type DevTypeMapDef = { - meta: { - modelProps: string; - }; - model: { - [Model in PropertyKey]: { - [Operation in PropertyKey]: DevTypeMapFnDef; - }; - }; - other: { - [Operation in PropertyKey]: DevTypeMapFnDef; - }; -}; - -export declare type DevTypeMapFnDef = { - args: any; - result: any; - payload: OperationPayload; -}; - -export declare namespace DMMF { - export { - datamodelEnumToSchemaEnum, - Document_2 as Document, - Mappings, - OtherOperationMappings, - DatamodelEnum, - SchemaEnum, - EnumValue, - Datamodel, - uniqueIndex, - PrimaryKey, - Model, - FieldKind, - FieldNamespace, - FieldLocation, - Field, - FieldDefault, - FieldDefaultScalar, - Index, - IndexType, - IndexField, - SortOrder, - Schema, - Query, - QueryOutput, - TypeRef, - InputTypeRef, - SchemaArg, - OutputType, - SchemaField, - OutputTypeRef, - Deprecation, - InputType, - FieldRefType, - FieldRefAllowType, - ModelMapping, - ModelAction, - }; -} - -declare namespace DMMF_2 { - export { - datamodelEnumToSchemaEnum, - Document_2 as Document, - Mappings, - OtherOperationMappings, - DatamodelEnum, - SchemaEnum, - EnumValue, - Datamodel, - uniqueIndex, - PrimaryKey, - Model, - FieldKind, - FieldNamespace, - FieldLocation, - Field, - FieldDefault, - FieldDefaultScalar, - Index, - IndexType, - IndexField, - SortOrder, - Schema, - Query, - QueryOutput, - TypeRef, - InputTypeRef, - SchemaArg, - OutputType, - SchemaField, - OutputTypeRef, - Deprecation, - InputType, - FieldRefType, - FieldRefAllowType, - ModelMapping, - ModelAction, - }; -} - -export declare function dmmfToRuntimeDataModel(dmmfDataModel: DMMF_2.Datamodel): RuntimeDataModel; - -declare type Document_2 = ReadonlyDeep_2<{ - datamodel: Datamodel; - schema: Schema; - mappings: Mappings; -}>; - -/** - * A generic driver adapter factory that allows the user to instantiate a - * driver adapter. The query and result types are specific to the adapter. - */ -declare interface DriverAdapterFactory extends AdapterInfo { - /** - * Instantiate a driver adapter. - */ - connect(): Promise>; -} - -/** Client */ -export declare type DynamicClientExtensionArgs< - C_, - TypeMap extends TypeMapDef, - TypeMapCb extends TypeMapCbDef, - ExtArgs extends Record, -> = { - [P in keyof C_]: unknown; -} & { - [K: symbol]: { - ctx: Optional, ITXClientDenyList> & { - $parent: Optional, ITXClientDenyList>; - }; - }; -}; - -export declare type DynamicClientExtensionThis< - TypeMap extends TypeMapDef, - TypeMapCb extends TypeMapCbDef, - ExtArgs extends Record, -> = { - [P in keyof ExtArgs['client']]: Return; -} & { - [P in Exclude]: DynamicModelExtensionThis< - TypeMap, - ModelKey, - ExtArgs - >; -} & { - [P in Exclude]: P extends keyof ClientOtherOps - ? ClientOtherOps[P] - : never; -} & { - [P in Exclude]: DynamicClientExtensionThisBuiltin< - TypeMap, - TypeMapCb, - ExtArgs - >[P]; -} & { - [K: symbol]: { - types: TypeMap['other']; - }; -}; - -export declare type DynamicClientExtensionThisBuiltin< - TypeMap extends TypeMapDef, - TypeMapCb extends TypeMapCbDef, - ExtArgs extends Record, -> = { - $extends: ExtendsHook< - 'extends', - TypeMapCb, - ExtArgs, - Call< - TypeMapCb, - { - extArgs: ExtArgs; - } - > - >; - $transaction

[]>( - arg: [...P], - options?: { - isolationLevel?: TypeMap['meta']['txIsolationLevel']; - } - ): Promise>; - $transaction( - fn: (client: Omit, ITXClientDenyList>) => Promise, - options?: { - maxWait?: number; - timeout?: number; - isolationLevel?: TypeMap['meta']['txIsolationLevel']; - } - ): Promise; - $disconnect(): Promise; - $connect(): Promise; -}; - -/** Model */ -export declare type DynamicModelExtensionArgs< - M_, - TypeMap extends TypeMapDef, - TypeMapCb extends TypeMapCbDef, - ExtArgs extends Record, -> = { - [K in keyof M_]: K extends '$allModels' - ? { - [P in keyof M_[K]]?: unknown; - } & { - [K: symbol]: {}; - } - : K extends TypeMap['meta']['modelProps'] - ? { - [P in keyof M_[K]]?: unknown; - } & { - [K: symbol]: { - ctx: DynamicModelExtensionThis, ExtArgs> & { - $parent: DynamicClientExtensionThis; - } & { - $name: ModelKey; - } & { - /** - * @deprecated Use `$name` instead. - */ - name: ModelKey; - }; - }; - } - : never; -}; - -export declare type DynamicModelExtensionFluentApi< - TypeMap extends TypeMapDef, - M extends PropertyKey, - P extends PropertyKey, - Null, -> = { - [K in keyof TypeMap['model'][M]['payload']['objects']]: ( - args?: Exact> - ) => PrismaPromise< - | Path< - DynamicModelExtensionFnResultBase< - TypeMap, - M, - { - select: { - [P in K]: A; - }; - }, - P - >, - [K] - > - | Null - > & - DynamicModelExtensionFluentApi< - TypeMap, - (TypeMap['model'][M]['payload']['objects'][K] & {})['name'], - P, - Null | Select - >; -}; - -export declare type DynamicModelExtensionFnResult< - TypeMap extends TypeMapDef, - M extends PropertyKey, - A, - P extends PropertyKey, - Null, -> = P extends FluentOperation - ? DynamicModelExtensionFluentApi & - PrismaPromise | Null> - : PrismaPromise>; - -export declare type DynamicModelExtensionFnResultBase< - TypeMap extends TypeMapDef, - M extends PropertyKey, - A, - P extends PropertyKey, -> = GetResult; - -export declare type DynamicModelExtensionFnResultNull

= P extends 'findUnique' | 'findFirst' - ? null - : never; - -export declare type DynamicModelExtensionOperationFn< - TypeMap extends TypeMapDef, - M extends PropertyKey, - P extends PropertyKey, -> = {} extends TypeMap['model'][M]['operations'][P]['args'] - ? ( - args?: Exact - ) => DynamicModelExtensionFnResult> - : ( - args: Exact - ) => DynamicModelExtensionFnResult>; - -export declare type DynamicModelExtensionThis< - TypeMap extends TypeMapDef, - M extends PropertyKey, - ExtArgs extends Record, -> = { - [P in keyof ExtArgs['model'][Uncapitalize]]: Return][P]>; -} & { - [P in Exclude< - keyof TypeMap['model'][M]['operations'], - keyof ExtArgs['model'][Uncapitalize] - >]: DynamicModelExtensionOperationFn; -} & { - [P in Exclude<'fields', keyof ExtArgs['model'][Uncapitalize]>]: TypeMap['model'][M]['fields']; -} & { - [K: symbol]: { - types: TypeMap['model'][M]; - }; -}; - -/** Query */ -export declare type DynamicQueryExtensionArgs = { - [K in keyof Q_]: K extends '$allOperations' - ? (args: { model?: string; operation: string; args: any; query: (args: any) => PrismaPromise }) => Promise - : K extends '$allModels' - ? { - [P in - | keyof Q_[K] - | keyof TypeMap['model'][keyof TypeMap['model']]['operations'] - | '$allOperations']?: P extends '$allOperations' - ? DynamicQueryExtensionCb< - TypeMap, - 'model', - keyof TypeMap['model'], - keyof TypeMap['model'][keyof TypeMap['model']]['operations'] - > - : P extends keyof TypeMap['model'][keyof TypeMap['model']]['operations'] - ? DynamicQueryExtensionCb - : never; - } - : K extends TypeMap['meta']['modelProps'] - ? { - [P in - | keyof Q_[K] - | keyof TypeMap['model'][ModelKey]['operations'] - | '$allOperations']?: P extends '$allOperations' - ? DynamicQueryExtensionCb< - TypeMap, - 'model', - ModelKey, - keyof TypeMap['model'][ModelKey]['operations'] - > - : P extends keyof TypeMap['model'][ModelKey]['operations'] - ? DynamicQueryExtensionCb, P> - : never; - } - : K extends keyof TypeMap['other']['operations'] - ? DynamicQueryExtensionCb<[TypeMap], 0, 'other', K> - : never; -}; - -export declare type DynamicQueryExtensionCb< - TypeMap extends TypeMapDef, - _0 extends PropertyKey, - _1 extends PropertyKey, - _2 extends PropertyKey, -> = >(args: A) => Promise; - -export declare type DynamicQueryExtensionCbArgs< - TypeMap extends TypeMapDef, - _0 extends PropertyKey, - _1 extends PropertyKey, - _2 extends PropertyKey, -> = (_1 extends unknown - ? _2 extends unknown - ? { - args: DynamicQueryExtensionCbArgsArgs; - model: _0 extends 0 ? undefined : _1; - operation: _2; - query: >( - args: A - ) => PrismaPromise; - } - : never - : never) & { - query: ( - args: DynamicQueryExtensionCbArgsArgs - ) => PrismaPromise; -}; - -export declare type DynamicQueryExtensionCbArgsArgs< - TypeMap extends TypeMapDef, - _0 extends PropertyKey, - _1 extends PropertyKey, - _2 extends PropertyKey, -> = _2 extends '$queryRaw' | '$executeRaw' ? Sql : TypeMap[_0][_1]['operations'][_2]['args']; - -/** Result */ -export declare type DynamicResultExtensionArgs = { - [K in keyof R_]: { - [P in keyof R_[K]]?: { - needs?: DynamicResultExtensionNeeds, R_[K][P]>; - compute(data: DynamicResultExtensionData, R_[K][P]>): any; - }; - }; -}; - -export declare type DynamicResultExtensionData = GetFindResult< - TypeMap['model'][M]['payload'], - { - select: S; - }, - {} ->; - -export declare type DynamicResultExtensionNeeds = { - [K in keyof S]: K extends keyof TypeMap['model'][M]['payload']['scalars'] ? S[K] : never; -} & { - [N in keyof TypeMap['model'][M]['payload']['scalars']]?: boolean; -}; - -/** - * Placeholder value for "no text". - */ -export declare const empty: Sql; - -export declare type EmptyToUnknown = T; - -declare interface Engine { - /** The name of the engine. This is meant to be consumed externally */ - readonly name: string; - onBeforeExit(callback: () => Promise): void; - start(): Promise; - stop(): Promise; - version(forceRun?: boolean): Promise | string; - request( - query: JsonQuery, - options: RequestOptions - ): Promise>; - requestBatch( - queries: JsonQuery[], - options: RequestBatchOptions - ): Promise[]>; - transaction( - action: 'start', - headers: Transaction_2.TransactionHeaders, - options: Transaction_2.Options - ): Promise>; - transaction( - action: 'commit', - headers: Transaction_2.TransactionHeaders, - info: Transaction_2.InteractiveTransactionInfo - ): Promise; - transaction( - action: 'rollback', - headers: Transaction_2.TransactionHeaders, - info: Transaction_2.InteractiveTransactionInfo - ): Promise; - metrics(options: MetricsOptionsJson): Promise; - metrics(options: MetricsOptionsPrometheus): Promise; - applyPendingMigrations(): Promise; -} - -declare interface EngineConfig { - cwd: string; - dirname: string; - enableDebugLogs?: boolean; - allowTriggerPanic?: boolean; - prismaPath?: string; - generator?: GeneratorConfig; - /** - * @remarks this field is used internally by Policy, do not rename or remove - */ - overrideDatasources: Datasources; - showColors?: boolean; - logQueries?: boolean; - logLevel?: 'info' | 'warn'; - env: Record; - flags?: string[]; - clientVersion: string; - engineVersion: string; - previewFeatures?: string[]; - engineEndpoint?: string; - activeProvider?: string; - logEmitter: LogEmitter; - transactionOptions: Transaction_2.Options; - /** - * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`. - * If set, this is only used in the library engine, and all queries would be performed through it, - * rather than Prisma's Rust drivers. - * @remarks only used by LibraryEngine.ts - */ - adapter?: SqlDriverAdapterFactory; - /** - * The contents of the schema encoded into a string - */ - inlineSchema: string; - /** - * The contents of the datasource url saved in a string - * @remarks only used by DataProxyEngine.ts - * @remarks this field is used internally by Policy, do not rename or remove - */ - inlineDatasources: GetPrismaClientConfig['inlineDatasources']; - /** - * The string hash that was produced for a given schema - * @remarks only used by DataProxyEngine.ts - */ - inlineSchemaHash: string; - /** - * The helper for interaction with OTEL tracing - * @remarks enabling is determined by the client and @prisma/instrumentation package - */ - tracingHelper: TracingHelper; - /** - * Information about whether we have not found a schema.prisma file in the - * default location, and that we fell back to finding the schema.prisma file - * in the current working directory. This usually means it has been bundled. - */ - isBundled?: boolean; - /** - * Web Assembly module loading configuration - */ - engineWasm?: EngineWasmLoadingConfig; - compilerWasm?: CompilerWasmLoadingConfig; - /** - * Allows Accelerate to use runtime utilities from the client. These are - * necessary for the AccelerateEngine to function correctly. - */ - accelerateUtils?: { - resolveDatasourceUrl: typeof resolveDatasourceUrl; - getBatchRequestPayload: typeof getBatchRequestPayload; - prismaGraphQLToJSError: typeof prismaGraphQLToJSError; - PrismaClientUnknownRequestError: typeof PrismaClientUnknownRequestError; - PrismaClientInitializationError: typeof PrismaClientInitializationError; - PrismaClientKnownRequestError: typeof PrismaClientKnownRequestError; - debug: (...args: any[]) => void; - engineVersion: string; - clientVersion: string; - }; -} - -declare type EngineEvent = E extends QueryEventType ? QueryEvent : LogEvent; - -declare type EngineEventType = QueryEventType | LogEventType; - -declare type EngineSpan = { - id: EngineSpanId; - parentId: string | null; - name: string; - startTime: HrTime; - endTime: HrTime; - kind: EngineSpanKind; - attributes?: Record; - links?: EngineSpanId[]; -}; - -declare type EngineSpanId = string; - -declare type EngineSpanKind = 'client' | 'internal'; - -declare type EngineWasmLoadingConfig = { - /** - * WASM-bindgen runtime for corresponding module - */ - getRuntime: () => Promise<{ - __wbg_set_wasm(exports: unknown): void; - QueryEngine: QueryEngineConstructor; - }>; - /** - * Loads the raw wasm module for the wasm query engine. This configuration is - * generated specifically for each type of client, eg. Node.js client and Edge - * clients will have different implementations. - * @remarks this is a callback on purpose, we only load the wasm if needed. - * @remarks only used by LibraryEngine - */ - getQueryEngineWasmModule: () => Promise; -}; - -declare type EnumValue = ReadonlyDeep_2<{ - name: string; - dbName: string | null; -}>; - -declare type EnvPaths = { - rootEnvPath: string | null; - schemaEnvPath: string | undefined; -}; - -declare interface EnvValue { - fromEnvVar: null | string; - value: null | string; -} - -export declare type Equals = (() => T extends A ? 1 : 2) extends () => T extends B ? 1 : 2 ? 1 : 0; - -declare type Error_2 = MappedError & { - originalCode?: string; - originalMessage?: string; -}; - -declare type ErrorCapturingFunction = T extends (...args: infer A) => Promise - ? (...args: A) => Promise>> - : T extends (...args: infer A) => infer R - ? (...args: A) => Result_4> - : T; - -declare type ErrorCapturingInterface = { - [K in keyof T]: ErrorCapturingFunction; -}; - -declare interface ErrorCapturingSqlDriverAdapter extends ErrorCapturingInterface { - readonly errorRegistry: ErrorRegistry; -} - -declare type ErrorFormat = 'pretty' | 'colorless' | 'minimal'; - -declare type ErrorRecord = { - error: unknown; -}; - -declare interface ErrorRegistry { - consumeError(id: number): ErrorRecord | undefined; -} - -declare interface ErrorWithBatchIndex { - batchRequestIdx?: number; -} - -declare type EventCallback = [E] extends ['beforeExit'] - ? () => Promise - : [E] extends [LogLevel] - ? (event: EngineEvent) => void - : never; - -export declare type Exact = - | (A extends unknown - ? W extends A - ? { - [K in keyof A]: Exact; - } - : W - : never) - | (A extends Narrowable ? A : never); - -/** - * Defines Exception. - * - * string or an object with one of (message or name or code) and optional stack - */ -declare type Exception = ExceptionWithCode | ExceptionWithMessage | ExceptionWithName | string; - -declare interface ExceptionWithCode { - code: string | number; - name?: string; - message?: string; - stack?: string; -} - -declare interface ExceptionWithMessage { - code?: string | number; - message: string; - name?: string; - stack?: string; -} - -declare interface ExceptionWithName { - code?: string | number; - message?: string; - name: string; - stack?: string; -} - -declare type ExtendedEventType = LogLevel | 'beforeExit'; - -declare type ExtendedSpanOptions = SpanOptions & { - /** The name of the span */ - name: string; - internal?: boolean; - /** Whether it propagates context (?=true) */ - active?: boolean; - /** The context to append the span to */ - context?: Context; -}; - -/** $extends, defineExtension */ -export declare interface ExtendsHook< - Variant extends 'extends' | 'define', - TypeMapCb extends TypeMapCbDef, - ExtArgs extends Record, - TypeMap extends TypeMapDef = Call< - TypeMapCb, - { - extArgs: ExtArgs; - } - >, -> { - extArgs: ExtArgs; - < - R_ extends { - [K in TypeMap['meta']['modelProps'] | '$allModels']?: unknown; - }, - R, - M_ extends { - [K in TypeMap['meta']['modelProps'] | '$allModels']?: unknown; - }, - M, - Q_ extends { - [K in - | TypeMap['meta']['modelProps'] - | '$allModels' - | keyof TypeMap['other']['operations'] - | '$allOperations']?: unknown; - }, - C_ extends { - [K in string]?: unknown; - }, - C, - Args extends InternalArgs = InternalArgs, - MergedArgs extends InternalArgs = MergeExtArgs, - >( - extension: - | ((client: DynamicClientExtensionThis) => { - $extends: { - extArgs: Args; - }; - }) - | { - name?: string; - query?: DynamicQueryExtensionArgs; - result?: DynamicResultExtensionArgs & R; - model?: DynamicModelExtensionArgs & M; - client?: DynamicClientExtensionArgs & C; - } - ): { - extends: DynamicClientExtensionThis< - Call< - TypeMapCb, - { - extArgs: MergedArgs; - } - >, - TypeMapCb, - MergedArgs - >; - define: (client: any) => { - $extends: { - extArgs: Args; - }; - }; - }[Variant]; -} - -export declare type ExtensionArgs = Optional; - -declare namespace Extensions { - export { defineExtension, getExtensionContext }; -} -export { Extensions }; - -declare namespace Extensions_2 { - export { - InternalArgs, - DefaultArgs, - GetPayloadResultExtensionKeys, - GetPayloadResultExtensionObject, - GetPayloadResult, - GetSelect, - GetOmit, - DynamicQueryExtensionArgs, - DynamicQueryExtensionCb, - DynamicQueryExtensionCbArgs, - DynamicQueryExtensionCbArgsArgs, - DynamicResultExtensionArgs, - DynamicResultExtensionNeeds, - DynamicResultExtensionData, - DynamicModelExtensionArgs, - DynamicModelExtensionThis, - DynamicModelExtensionOperationFn, - DynamicModelExtensionFnResult, - DynamicModelExtensionFnResultBase, - DynamicModelExtensionFluentApi, - DynamicModelExtensionFnResultNull, - DynamicClientExtensionArgs, - DynamicClientExtensionThis, - ClientBuiltInProp, - DynamicClientExtensionThisBuiltin, - ExtendsHook, - MergeExtArgs, - AllModelsToStringIndex, - TypeMapDef, - DevTypeMapDef, - DevTypeMapFnDef, - ClientOptionDef, - ClientOtherOps, - TypeMapCbDef, - ModelKey, - RequiredExtensionArgs as UserArgs, - }; -} - -export declare type ExtractGlobalOmit = Options extends { - omit: { - [K in ModelName]: infer GlobalOmit; - }; -} - ? GlobalOmit - : {}; - -declare type Field = ReadonlyDeep_2<{ - kind: FieldKind; - name: string; - isRequired: boolean; - isList: boolean; - isUnique: boolean; - isId: boolean; - isReadOnly: boolean; - isGenerated?: boolean; - isUpdatedAt?: boolean; - /** - * Describes the data type in the same the way it is defined in the Prisma schema: - * BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName - */ - type: string; - /** - * Native database type, if specified. - * For example, `@db.VarChar(191)` is encoded as `['VarChar', ['191']]`, - * `@db.Text` is encoded as `['Text', []]`. - */ - nativeType?: [string, string[]] | null; - dbName?: string | null; - hasDefaultValue: boolean; - default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[]; - relationFromFields?: string[]; - relationToFields?: string[]; - relationOnDelete?: string; - relationOnUpdate?: string; - relationName?: string; - documentation?: string; -}>; - -declare type FieldDefault = ReadonlyDeep_2<{ - name: string; - args: Array; -}>; - -declare type FieldDefaultScalar = string | boolean | number; - -declare type FieldInitializer = - | { - type: 'value'; - value: PrismaValue; - } - | { - type: 'lastInsertId'; - }; - -declare type FieldKind = 'scalar' | 'object' | 'enum' | 'unsupported'; - -declare type FieldLocation = 'scalar' | 'inputObjectTypes' | 'outputObjectTypes' | 'enumTypes' | 'fieldRefTypes'; - -declare type FieldNamespace = 'model' | 'prisma'; - -declare type FieldOperation = - | { - type: 'set'; - value: PrismaValue; - } - | { - type: 'add'; - value: PrismaValue; - } - | { - type: 'subtract'; - value: PrismaValue; - } - | { - type: 'multiply'; - value: PrismaValue; - } - | { - type: 'divide'; - value: PrismaValue; - }; - -/** - * A reference to a specific field of a specific model - */ -export declare interface FieldRef { - readonly modelName: Model; - readonly name: string; - readonly typeName: FieldType; - readonly isList: boolean; -} - -declare type FieldRefAllowType = TypeRef<'scalar' | 'enumTypes'>; - -declare type FieldRefType = ReadonlyDeep_2<{ - name: string; - allowTypes: FieldRefAllowType[]; - fields: SchemaArg[]; -}>; - -declare type FluentOperation = - | 'findUnique' - | 'findUniqueOrThrow' - | 'findFirst' - | 'findFirstOrThrow' - | 'create' - | 'update' - | 'upsert' - | 'delete'; - -export declare interface Fn { - params: Params; - returns: Returns; -} - -declare type Fragment = - | { - type: 'stringChunk'; - chunk: string; - } - | { - type: 'parameter'; - } - | { - type: 'parameterTuple'; - } - | { - type: 'parameterTupleList'; - itemPrefix: string; - itemSeparator: string; - itemSuffix: string; - groupSeparator: string; - }; - -declare interface GeneratorConfig { - name: string; - output: EnvValue | null; - isCustomOutput?: boolean; - provider: EnvValue; - config: { - /** `output` is a reserved name and will only be available directly at `generator.output` */ - output?: never; - /** `provider` is a reserved name and will only be available directly at `generator.provider` */ - provider?: never; - /** `binaryTargets` is a reserved name and will only be available directly at `generator.binaryTargets` */ - binaryTargets?: never; - /** `previewFeatures` is a reserved name and will only be available directly at `generator.previewFeatures` */ - previewFeatures?: never; - } & { - [key: string]: string | string[] | undefined; - }; - binaryTargets: BinaryTargetsEnvValue[]; - previewFeatures: string[]; - envPaths?: EnvPaths; - sourceFilePath: string; -} - -export declare type GetAggregateResult

= { - [K in keyof A as K extends Aggregate ? K : never]: K extends '_count' - ? A[K] extends true - ? number - : Count - : { - [J in keyof A[K] & string]: P['scalars'][J] | null; - }; -}; - -declare function getBatchRequestPayload( - batch: JsonQuery[], - transaction?: TransactionOptions_2 -): QueryEngineBatchRequest; - -export declare type GetBatchResult = { - count: number; -}; - -export declare type GetCountResult = A extends { - select: infer S; -} - ? S extends true - ? number - : Count - : number; - -declare function getExtensionContext(that: T): Context_2; - -export declare type GetFindResult

= - Equals extends 1 - ? DefaultSelection - : A extends - | ({ - select: infer S extends object; - } & Record) - | ({ - include: infer I extends object; - } & Record) - ? { - [K in keyof S | keyof I as (S & I)[K] extends false | undefined | Skip | null ? never : K]: (S & - I)[K] extends object - ? P extends SelectablePayloadFields - ? O extends OperationPayload - ? GetFindResult[] - : never - : P extends SelectablePayloadFields - ? O extends OperationPayload - ? GetFindResult | (SelectField & null) - : never - : K extends '_count' - ? Count> - : never - : P extends SelectablePayloadFields - ? O extends OperationPayload - ? DefaultSelection[] - : never - : P extends SelectablePayloadFields - ? O extends OperationPayload - ? DefaultSelection | (SelectField & null) - : never - : P extends { - scalars: { - [k in K]: infer O; - }; - } - ? O - : K extends '_count' - ? Count - : never; - } & (A extends { - include: any; - } & Record - ? DefaultSelection< - P, - A & { - omit: A['omit']; - }, - GlobalOmitOptions - > - : unknown) - : DefaultSelection; - -export declare type GetGroupByResult

= A extends { - by: string[]; -} - ? Array< - GetAggregateResult & { - [K in A['by'][number]]: P['scalars'][K]; - } - > - : A extends { - by: string; - } - ? Array< - GetAggregateResult & { - [K in A['by']]: P['scalars'][K]; - } - > - : {}[]; - -export declare type GetOmit = { - [K in (string extends keyof R ? never : keyof R) | BaseKeys]?: boolean | ExtraType; -}; - -export declare type GetPayloadResult, R extends InternalArgs['result'][string]> = Omit< - Base, - GetPayloadResultExtensionKeys -> & - GetPayloadResultExtensionObject; - -export declare type GetPayloadResultExtensionKeys< - R extends InternalArgs['result'][string], - KR extends keyof R = string extends keyof R ? never : keyof R, -> = KR; - -export declare type GetPayloadResultExtensionObject = { - [K in GetPayloadResultExtensionKeys]: R[K] extends () => { - compute: (...args: any) => infer C; - } - ? C - : never; -}; - -export declare function getPrismaClient(config: GetPrismaClientConfig): { - new (optionsArg?: PrismaClientOptions): { - _originalClient: any; - _runtimeDataModel: RuntimeDataModel; - _requestHandler: RequestHandler; - _connectionPromise?: Promise | undefined; - _disconnectionPromise?: Promise | undefined; - _engineConfig: EngineConfig; - _accelerateEngineConfig: AccelerateEngineConfig; - _clientVersion: string; - _errorFormat: ErrorFormat; - _tracingHelper: TracingHelper; - _previewFeatures: string[]; - _activeProvider: string; - _globalOmit?: GlobalOmitOptions | undefined; - _extensions: MergedExtensionsList; - /** - * @remarks This is used internally by Policy, do not rename or remove - */ - _engine: Engine; - /** - * A fully constructed/applied Client that references the parent - * PrismaClient. This is used for Client extensions only. - */ - _appliedParent: any; - _createPrismaPromise: PrismaPromiseFactory; - $on(eventType: E, callback: EventCallback): any; - $connect(): Promise; - /** - * Disconnect from the database - */ - $disconnect(): Promise; - /** - * Executes a raw query and always returns a number - */ - $executeRawInternal( - transaction: PrismaPromiseTransaction | undefined, - clientMethod: string, - args: RawQueryArgs, - middlewareArgsMapper?: MiddlewareArgsMapper - ): Promise; - /** - * Executes a raw query provided through a safe tag function - * @see https://github.com/prisma/prisma/issues/7142 - * - * @param query - * @param values - * @returns - */ - $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; - /** - * Unsafe counterpart of `$executeRaw` that is susceptible to SQL injections - * @see https://github.com/prisma/prisma/issues/7142 - * - * @param query - * @param values - * @returns - */ - $executeRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; - /** - * Executes a raw command only for MongoDB - * - * @param command - * @returns - */ - $runCommandRaw(command: Record): PrismaPromise_2; - /** - * Executes a raw query and returns selected data - */ - $queryRawInternal( - transaction: PrismaPromiseTransaction | undefined, - clientMethod: string, - args: RawQueryArgs, - middlewareArgsMapper?: MiddlewareArgsMapper - ): Promise; - /** - * Executes a raw query provided through a safe tag function - * @see https://github.com/prisma/prisma/issues/7142 - * - * @param query - * @param values - * @returns - */ - $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; - /** - * Counterpart to $queryRaw, that returns strongly typed results - * @param typedSql - */ - $queryRawTyped(typedSql: UnknownTypedSql): PrismaPromise_2; - /** - * Unsafe counterpart of `$queryRaw` that is susceptible to SQL injections - * @see https://github.com/prisma/prisma/issues/7142 - * - * @param query - * @param values - * @returns - */ - $queryRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; - /** - * Execute a batch of requests in a transaction - * @param requests - * @param options - */ - _transactionWithArray({ - promises, - options, - }: { - promises: Array>; - options?: BatchTransactionOptions; - }): Promise; - /** - * Perform a long-running transaction - * @param callback - * @param options - * @returns - */ - _transactionWithCallback({ - callback, - options, - }: { - callback: (client: Client) => Promise; - options?: Options; - }): Promise; - _createItxClient(transaction: PrismaPromiseInteractiveTransaction): Client; - /** - * Execute queries within a transaction - * @param input a callback or a query list - * @param options to set timeouts (callback) - * @returns - */ - $transaction(input: any, options?: any): Promise; - /** - * Runs the middlewares over params before executing a request - * @param internalParams - * @returns - */ - _request(internalParams: InternalRequestParams): Promise; - _executeRequest({ - args, - clientMethod, - dataPath, - callsite, - action, - model, - argsMapper, - transaction, - unpacker, - otelParentCtx, - customDataProxyFetch, - }: InternalRequestParams): Promise; - $metrics: MetricsClient; - /** - * Shortcut for checking a preview flag - * @param feature preview flag - * @returns - */ - _hasPreviewFlag(feature: string): boolean; - $applyPendingMigrations(): Promise; - $extends: typeof $extends; - readonly [Symbol.toStringTag]: string; - }; -}; - -/** - * Config that is stored into the generated client. When the generated client is - * loaded, this same config is passed to {@link getPrismaClient} which creates a - * closure with that config around a non-instantiated [[PrismaClient]]. - */ -export declare type GetPrismaClientConfig = { - runtimeDataModel: RuntimeDataModel; - generator?: GeneratorConfig; - relativeEnvPaths?: { - rootEnvPath?: string | null; - schemaEnvPath?: string | null; - }; - relativePath: string; - dirname: string; - clientVersion: string; - engineVersion: string; - datasourceNames: string[]; - activeProvider: ActiveConnectorType; - /** - * The contents of the schema encoded into a string - * @remarks only used for the purpose of data proxy - */ - inlineSchema: string; - /** - * A special env object just for the data proxy edge runtime. - * Allows bundlers to inject their own env variables (Vercel). - * Allows platforms to declare global variables as env (Workers). - * @remarks only used for the purpose of data proxy - */ - injectableEdgeEnv?: () => LoadedEnv; - /** - * The contents of the datasource url saved in a string. - * This can either be an env var name or connection string. - * It is needed by the client to connect to the Data Proxy. - * @remarks only used for the purpose of data proxy - */ - inlineDatasources: { - [name in string]: { - url: EnvValue; - }; - }; - /** - * The string hash that was produced for a given schema - * @remarks only used for the purpose of data proxy - */ - inlineSchemaHash: string; - /** - * A marker to indicate that the client was not generated via `prisma - * generate` but was generated via `generate --postinstall` script instead. - * @remarks used to error for Vercel/Netlify for schema caching issues - */ - postinstall?: boolean; - /** - * Information about the CI where the Prisma Client has been generated. The - * name of the CI environment is stored at generation time because CI - * information is not always available at runtime. Moreover, the edge client - * has no notion of environment variables, so this works around that. - * @remarks used to error for Vercel/Netlify for schema caching issues - */ - ciName?: string; - /** - * Information about whether we have not found a schema.prisma file in the - * default location, and that we fell back to finding the schema.prisma file - * in the current working directory. This usually means it has been bundled. - */ - isBundled?: boolean; - /** - * A boolean that is `false` when the client was generated with --no-engine. At - * runtime, this means the client will be bound to be using the Data Proxy. - */ - copyEngine?: boolean; - /** - * Optional wasm loading configuration - */ - engineWasm?: EngineWasmLoadingConfig; - compilerWasm?: CompilerWasmLoadingConfig; -}; - -export declare type GetResult< - Payload extends OperationPayload, - Args, - OperationName extends Operation = 'findUniqueOrThrow', - GlobalOmitOptions = {}, -> = { - findUnique: GetFindResult | null; - findUniqueOrThrow: GetFindResult; - findFirst: GetFindResult | null; - findFirstOrThrow: GetFindResult; - findMany: GetFindResult[]; - create: GetFindResult; - createMany: GetBatchResult; - createManyAndReturn: GetFindResult[]; - update: GetFindResult; - updateMany: GetBatchResult; - updateManyAndReturn: GetFindResult[]; - upsert: GetFindResult; - delete: GetFindResult; - deleteMany: GetBatchResult; - aggregate: GetAggregateResult; - count: GetCountResult; - groupBy: GetGroupByResult; - $queryRaw: unknown; - $queryRawTyped: unknown; - $executeRaw: number; - $queryRawUnsafe: unknown; - $executeRawUnsafe: number; - $runCommandRaw: JsonObject; - findRaw: JsonObject; - aggregateRaw: JsonObject; -}[OperationName]; - -export declare function getRuntime(): GetRuntimeOutput; - -declare type GetRuntimeOutput = { - id: RuntimeName; - prettyName: string; - isEdge: boolean; -}; - -export declare type GetSelect< - Base extends Record, - R extends InternalArgs['result'][string], - KR extends keyof R = string extends keyof R ? never : keyof R, -> = { - [K in KR | keyof Base]?: K extends KR ? boolean : Base[K]; -}; - -declare type GlobalOmitOptions = { - [modelName: string]: { - [fieldName: string]: boolean; - }; -}; - -declare type HandleErrorParams = { - args: JsArgs; - error: any; - clientMethod: string; - callsite?: CallSite; - transaction?: PrismaPromiseTransaction; - modelName?: string; - globalOmit?: GlobalOmitOptions; -}; - -declare type HrTime = [number, number]; - -/** - * Defines High-Resolution Time. - * - * The first number, HrTime[0], is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970. - * The second number, HrTime[1], represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds. - * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150. - * The first number is calculated by converting and truncating the Epoch time in milliseconds to seconds: - * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210. - * The second number is calculated by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds: - * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000. - * This is represented in HrTime format as [1609504210, 150000000]. - */ -declare type HrTime_2 = [number, number]; - -declare type Index = ReadonlyDeep_2<{ - model: string; - type: IndexType; - isDefinedOnField: boolean; - name?: string; - dbName?: string; - algorithm?: string; - clustered?: boolean; - fields: IndexField[]; -}>; - -declare type IndexField = ReadonlyDeep_2<{ - name: string; - sortOrder?: SortOrder; - length?: number; - operatorClass?: string; -}>; - -declare type IndexType = 'id' | 'normal' | 'unique' | 'fulltext'; - -declare type InMemoryOps = { - pagination: Pagination | null; - distinct: string[] | null; - reverse: boolean; - linkingFields: string[] | null; - nested: Record; -}; - -/** - * Matches a JSON array. - * Unlike \`JsonArray\`, readonly arrays are assignable to this type. - */ -export declare interface InputJsonArray extends ReadonlyArray {} - -/** - * Matches a JSON object. - * Unlike \`JsonObject\`, this type allows undefined and read-only properties. - */ -export declare type InputJsonObject = { - readonly [Key in string]?: InputJsonValue | null; -}; - -/** - * Matches any valid value that can be used as an input for operations like - * create and update as the value of a JSON field. Unlike \`JsonValue\`, this - * type allows read-only arrays and read-only object properties and disallows - * \`null\` at the top level. - * - * \`null\` cannot be used as the value of a JSON field because its meaning - * would be ambiguous. Use \`Prisma.JsonNull\` to store the JSON null value or - * \`Prisma.DbNull\` to clear the JSON value and set the field to the database - * NULL value instead. - * - * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values - */ -export declare type InputJsonValue = - | string - | number - | boolean - | InputJsonObject - | InputJsonArray - | { - toJSON(): unknown; - }; - -declare type InputType = ReadonlyDeep_2<{ - name: string; - constraints: { - maxNumFields: number | null; - minNumFields: number | null; - fields?: string[]; - }; - meta?: { - source?: string; - grouping?: string; - }; - fields: SchemaArg[]; -}>; - -declare type InputTypeRef = TypeRef<'scalar' | 'inputObjectTypes' | 'enumTypes' | 'fieldRefTypes'>; - -declare type InteractiveTransactionInfo = { - /** - * Transaction ID returned by the query engine. - */ - id: string; - /** - * Arbitrary payload the meaning of which depends on the `Engine` implementation. - * For example, `DataProxyEngine` needs to associate different API endpoints with transactions. - * In `LibraryEngine` and `BinaryEngine` it is currently not used. - */ - payload: Payload; -}; - -declare type InteractiveTransactionOptions = Transaction_2.InteractiveTransactionInfo; - -export declare type InternalArgs< - R = { - [K in string]: { - [K in string]: unknown; - }; - }, - M = { - [K in string]: { - [K in string]: unknown; - }; - }, - Q = { - [K in string]: { - [K in string]: unknown; - }; - }, - C = { - [K in string]: unknown; - }, -> = { - result: { - [K in keyof R]: { - [P in keyof R[K]]: () => R[K][P]; - }; - }; - model: { - [K in keyof M]: { - [P in keyof M[K]]: () => M[K][P]; - }; - }; - query: { - [K in keyof Q]: { - [P in keyof Q[K]]: () => Q[K][P]; - }; - }; - client: { - [K in keyof C]: () => C[K]; - }; -}; - -declare type InternalRequestParams = { - /** - * The original client method being called. - * Even though the rootField / operation can be changed, - * this method stays as it is, as it's what the user's - * code looks like - */ - clientMethod: string; - /** - * Name of js model that triggered the request. Might be used - * for warnings or error messages - */ - jsModelName?: string; - callsite?: CallSite; - transaction?: PrismaPromiseTransaction; - unpacker?: Unpacker; - otelParentCtx?: Context; - /** Used to "desugar" a user input into an "expanded" one */ - argsMapper?: (args?: UserArgs_2) => UserArgs_2; - /** Used to convert args for middleware and back */ - middlewareArgsMapper?: MiddlewareArgsMapper; - /** Used for Accelerate client extension via Data Proxy */ - customDataProxyFetch?: CustomDataProxyFetch; -} & Omit; - -declare type IsolationLevel = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABLE READ' | 'SNAPSHOT' | 'SERIALIZABLE'; - -declare type IsolationLevel_2 = 'ReadUncommitted' | 'ReadCommitted' | 'RepeatableRead' | 'Snapshot' | 'Serializable'; - -declare function isSkip(value: unknown): value is Skip; - -export declare function isTypedSql(value: unknown): value is UnknownTypedSql; - -export declare type ITXClientDenyList = (typeof denylist)[number]; - -export declare const itxClientDenyList: readonly (string | symbol)[]; - -declare interface Job { - resolve: (data: any) => void; - reject: (data: any) => void; - request: any; -} - -/** - * Create a SQL query for a list of values. - */ -export declare function join(values: readonly RawValue[], separator?: string, prefix?: string, suffix?: string): Sql; - -declare type JoinExpression = { - child: QueryPlanNode; - on: [left: string, right: string][]; - parentField: string; - isRelationUnique: boolean; -}; - -export declare type JsArgs = { - select?: Selection_2; - include?: Selection_2; - omit?: Omission; - [argName: string]: JsInputValue; -}; - -export declare type JsInputValue = - | null - | undefined - | string - | number - | boolean - | bigint - | Uint8Array - | Date - | DecimalJsLike - | ObjectEnumValue - | RawParameters - | JsonConvertible - | FieldRef - | JsInputValue[] - | Skip - | { - [key: string]: JsInputValue; - }; - -declare type JsonArgumentValue = - | number - | string - | boolean - | null - | RawTaggedValue - | JsonArgumentValue[] - | { - [key: string]: JsonArgumentValue; - }; - -/** - * From https://github.com/sindresorhus/type-fest/ - * Matches a JSON array. - */ -export declare interface JsonArray extends Array {} - -export declare type JsonBatchQuery = { - batch: JsonQuery[]; - transaction?: { - isolationLevel?: IsolationLevel_2; - }; -}; - -export declare interface JsonConvertible { - toJSON(): unknown; -} - -declare type JsonFieldSelection = { - arguments?: Record | RawTaggedValue; - selection: JsonSelectionSet; -}; - -declare class JsonNull extends NullTypesEnumValue { - #private; -} - -/** - * From https://github.com/sindresorhus/type-fest/ - * Matches a JSON object. - * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. - */ -export declare type JsonObject = { - [Key in string]?: JsonValue; -}; - -export declare type JsonQuery = { - modelName?: string; - action: JsonQueryAction; - query: JsonFieldSelection; -}; - -declare type JsonQueryAction = - | 'findUnique' - | 'findUniqueOrThrow' - | 'findFirst' - | 'findFirstOrThrow' - | 'findMany' - | 'createOne' - | 'createMany' - | 'createManyAndReturn' - | 'updateOne' - | 'updateMany' - | 'updateManyAndReturn' - | 'deleteOne' - | 'deleteMany' - | 'upsertOne' - | 'aggregate' - | 'groupBy' - | 'executeRaw' - | 'queryRaw' - | 'runCommandRaw' - | 'findRaw' - | 'aggregateRaw'; - -declare type JsonSelectionSet = { - $scalars?: boolean; - $composites?: boolean; -} & { - [fieldName: string]: boolean | JsonFieldSelection; -}; - -/** - * From https://github.com/sindresorhus/type-fest/ - * Matches any valid JSON value. - */ -export declare type JsonValue = string | number | boolean | JsonObject | JsonArray | null; - -export declare type JsOutputValue = - | null - | string - | number - | boolean - | bigint - | Uint8Array - | Date - | Decimal - | JsOutputValue[] - | { - [key: string]: JsOutputValue; - }; - -export declare type JsPromise = Promise & {}; - -declare type KnownErrorParams = { - code: string; - clientVersion: string; - meta?: Record; - batchRequestIdx?: number; -}; - -/** - * A pointer from the current {@link Span} to another span in the same trace or - * in a different trace. - * Few examples of Link usage. - * 1. Batch Processing: A batch of elements may contain elements associated - * with one or more traces/spans. Since there can only be one parent - * SpanContext, Link is used to keep reference to SpanContext of all - * elements in the batch. - * 2. Public Endpoint: A SpanContext in incoming client request on a public - * endpoint is untrusted from service provider perspective. In such case it - * is advisable to start a new trace with appropriate sampling decision. - * However, it is desirable to associate incoming SpanContext to new trace - * initiated on service provider side so two traces (from Client and from - * Service Provider) can be correlated. - */ -declare interface Link { - /** The {@link SpanContext} of a linked span. */ - context: SpanContext; - /** A set of {@link SpanAttributes} on the link. */ - attributes?: SpanAttributes; - /** Count of attributes of the link that were dropped due to collection limits */ - droppedAttributesCount?: number; -} - -declare type LoadedEnv = - | { - message?: string; - parsed: { - [x: string]: string; - }; - } - | undefined; - -declare type LocationInFile = { - fileName: string; - lineNumber: number | null; - columnNumber: number | null; -}; - -declare type LogDefinition = { - level: LogLevel; - emit: 'stdout' | 'event'; -}; - -/** - * Typings for the events we emit. - * - * @remarks - * If this is updated, our edge runtime shim needs to be updated as well. - */ -declare type LogEmitter = { - on(event: E, listener: (event: EngineEvent) => void): LogEmitter; - emit(event: QueryEventType, payload: QueryEvent): boolean; - emit(event: LogEventType, payload: LogEvent): boolean; -}; - -declare type LogEvent = { - timestamp: Date; - message: string; - target: string; -}; - -declare type LogEventType = 'info' | 'warn' | 'error'; - -declare type LogLevel = 'info' | 'query' | 'warn' | 'error'; - -/** - * Generates more strict variant of an enum which, unlike regular enum, - * throws on non-existing property access. This can be useful in following situations: - * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input - * - enum values are generated dynamically from DMMF. - * - * In that case, if using normal enums and no compile-time typechecking, using non-existing property - * will result in `undefined` value being used, which will be accepted. Using strict enum - * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. - * - * Note: if you need to check for existence of a value in the enum you can still use either - * `in` operator or `hasOwnProperty` function. - * - * @param definition - * @returns - */ -export declare function makeStrictEnum>(definition: T): T; - -export declare function makeTypedQueryFactory(sql: string): (...values: any[]) => TypedSql; - -declare type MappedError = - | { - kind: 'GenericJs'; - id: number; - } - | { - kind: 'UnsupportedNativeDataType'; - type: string; - } - | { - kind: 'InvalidIsolationLevel'; - level: string; - } - | { - kind: 'LengthMismatch'; - column?: string; - } - | { - kind: 'UniqueConstraintViolation'; - constraint?: - | { - fields: string[]; - } - | { - index: string; - } - | { - foreignKey: {}; - }; - } - | { - kind: 'NullConstraintViolation'; - constraint?: - | { - fields: string[]; - } - | { - index: string; - } - | { - foreignKey: {}; - }; - } - | { - kind: 'ForeignKeyConstraintViolation'; - constraint?: - | { - fields: string[]; - } - | { - index: string; - } - | { - foreignKey: {}; - }; - } - | { - kind: 'DatabaseNotReachable'; - host?: string; - port?: number; - } - | { - kind: 'DatabaseDoesNotExist'; - db?: string; - } - | { - kind: 'DatabaseAlreadyExists'; - db?: string; - } - | { - kind: 'DatabaseAccessDenied'; - db?: string; - } - | { - kind: 'ConnectionClosed'; - } - | { - kind: 'TlsConnectionError'; - reason: string; - } - | { - kind: 'AuthenticationFailed'; - user?: string; - } - | { - kind: 'TransactionWriteConflict'; - } - | { - kind: 'TableDoesNotExist'; - table?: string; - } - | { - kind: 'ColumnNotFound'; - column?: string; - } - | { - kind: 'TooManyConnections'; - cause: string; - } - | { - kind: 'ValueOutOfRange'; - cause: string; - } - | { - kind: 'MissingFullTextSearchIndex'; - } - | { - kind: 'SocketTimeout'; - } - | { - kind: 'InconsistentColumnData'; - cause: string; - } - | { - kind: 'TransactionAlreadyClosed'; - cause: string; - } - | { - kind: 'postgres'; - code: string; - severity: string; - message: string; - detail: string | undefined; - column: string | undefined; - hint: string | undefined; - } - | { - kind: 'mysql'; - code: number; - message: string; - state: string; - } - | { - kind: 'sqlite'; - /** - * Sqlite extended error code: https://www.sqlite.org/rescode.html - */ - extendedCode: number; - message: string; - } - | { - kind: 'mssql'; - code: number; - message: string; - }; - -declare type Mappings = ReadonlyDeep_2<{ - modelOperations: ModelMapping[]; - otherOperations: { - read: string[]; - write: string[]; - }; -}>; - -/** - * Class that holds the list of all extensions, applied to particular instance, - * as well as resolved versions of the components that need to apply on - * different levels. Main idea of this class: avoid re-resolving as much of the - * stuff as possible when new extensions are added while also delaying the - * resolve until the point it is actually needed. For example, computed fields - * of the model won't be resolved unless the model is actually queried. Neither - * adding extensions with `client` component only cause other components to - * recompute. - */ -declare class MergedExtensionsList { - private head?; - private constructor(); - static empty(): MergedExtensionsList; - static single(extension: ExtensionArgs): MergedExtensionsList; - isEmpty(): boolean; - append(extension: ExtensionArgs): MergedExtensionsList; - getAllComputedFields(dmmfModelName: string): ComputedFieldsMap | undefined; - getAllClientExtensions(): ClientArg | undefined; - getAllModelExtensions(dmmfModelName: string): ModelArg | undefined; - getAllQueryCallbacks(jsModelName: string, operation: string): any; - getAllBatchQueryCallbacks(): BatchQueryOptionsCb[]; -} - -export declare type MergeExtArgs< - TypeMap extends TypeMapDef, - ExtArgs extends Record, - Args extends Record, -> = ComputeDeep< - ExtArgs & Args & AllModelsToStringIndex & AllModelsToStringIndex ->; - -export declare type Metric = { - key: string; - value: T; - labels: Record; - description: string; -}; - -export declare type MetricHistogram = { - buckets: MetricHistogramBucket[]; - sum: number; - count: number; -}; - -export declare type MetricHistogramBucket = [maxValue: number, count: number]; - -export declare type Metrics = { - counters: Metric[]; - gauges: Metric[]; - histograms: Metric[]; -}; - -export declare class MetricsClient { - private _client; - constructor(client: Client); - /** - * Returns all metrics gathered up to this point in prometheus format. - * Result of this call can be exposed directly to prometheus scraping endpoint - * - * @param options - * @returns - */ - prometheus(options?: MetricsOptions): Promise; - /** - * Returns all metrics gathered up to this point in prometheus format. - * - * @param options - * @returns - */ - json(options?: MetricsOptions): Promise; -} - -declare type MetricsOptions = { - /** - * Labels to add to every metrics in key-value format - */ - globalLabels?: Record; -}; - -declare type MetricsOptionsCommon = { - globalLabels?: Record; -}; - -declare type MetricsOptionsJson = { - format: 'json'; -} & MetricsOptionsCommon; - -declare type MetricsOptionsPrometheus = { - format: 'prometheus'; -} & MetricsOptionsCommon; - -declare type MiddlewareArgsMapper = { - requestArgsToMiddlewareArgs(requestArgs: RequestArgs): MiddlewareArgs; - middlewareArgsToRequestArgs(middlewareArgs: MiddlewareArgs): RequestArgs; -}; - -declare type Model = ReadonlyDeep_2<{ - name: string; - dbName: string | null; - schema: string | null; - fields: Field[]; - uniqueFields: string[][]; - uniqueIndexes: uniqueIndex[]; - documentation?: string; - primaryKey: PrimaryKey | null; - isGenerated?: boolean; -}>; - -declare enum ModelAction { - findUnique = 'findUnique', - findUniqueOrThrow = 'findUniqueOrThrow', - findFirst = 'findFirst', - findFirstOrThrow = 'findFirstOrThrow', - findMany = 'findMany', - create = 'create', - createMany = 'createMany', - createManyAndReturn = 'createManyAndReturn', - update = 'update', - updateMany = 'updateMany', - updateManyAndReturn = 'updateManyAndReturn', - upsert = 'upsert', - delete = 'delete', - deleteMany = 'deleteMany', - groupBy = 'groupBy', - count = 'count', // TODO: count does not actually exist in DMMF - aggregate = 'aggregate', - findRaw = 'findRaw', - aggregateRaw = 'aggregateRaw', -} - -export declare type ModelArg = { - [MethodName in string]: unknown; -}; - -export declare type ModelArgs = { - model: { - [ModelName in string]: ModelArg; - }; -}; - -export declare type ModelKey = M extends keyof TypeMap['model'] - ? M - : Capitalize; - -declare type ModelMapping = ReadonlyDeep_2<{ - model: string; - plural: string; - findUnique?: string | null; - findUniqueOrThrow?: string | null; - findFirst?: string | null; - findFirstOrThrow?: string | null; - findMany?: string | null; - create?: string | null; - createMany?: string | null; - createManyAndReturn?: string | null; - update?: string | null; - updateMany?: string | null; - updateManyAndReturn?: string | null; - upsert?: string | null; - delete?: string | null; - deleteMany?: string | null; - aggregate?: string | null; - groupBy?: string | null; - count?: string | null; - findRaw?: string | null; - aggregateRaw?: string | null; -}>; - -export declare type ModelQueryOptionsCb = (args: ModelQueryOptionsCbArgs) => Promise; - -export declare type ModelQueryOptionsCbArgs = { - model: string; - operation: string; - args: JsArgs; - query: (args: JsArgs) => Promise; -}; - -declare type MultiBatchResponse = { - type: 'multi'; - plans: QueryPlanNode[]; -}; - -export declare type NameArgs = { - name?: string; -}; - -export declare type Narrow = - | { - [K in keyof A]: A[K] extends Function ? A[K] : Narrow; - } - | (A extends Narrowable ? A : never); - -export declare type Narrowable = string | number | bigint | boolean | []; - -export declare type NeverToUnknown = [T] extends [never] ? unknown : T; - -declare class NullTypesEnumValue extends ObjectEnumValue { - _getNamespace(): string; -} - -/** - * Base class for unique values of object-valued enums. - */ -export declare abstract class ObjectEnumValue { - constructor(arg?: symbol); - abstract _getNamespace(): string; - _getName(): string; - toString(): string; -} - -export declare const objectEnumValues: { - classes: { - DbNull: typeof DbNull; - JsonNull: typeof JsonNull; - AnyNull: typeof AnyNull; - }; - instances: { - DbNull: DbNull; - JsonNull: JsonNull; - AnyNull: AnyNull; - }; -}; - -declare const officialPrismaAdapters: readonly [ - '@prisma/adapter-planetscale', - '@prisma/adapter-neon', - '@prisma/adapter-libsql', - '@prisma/adapter-better-sqlite3', - '@prisma/adapter-d1', - '@prisma/adapter-pg', - '@prisma/adapter-mssql', - '@prisma/adapter-mariadb', -]; - -export declare type Omission = Record; - -declare type Omit_2 = { - [P in keyof T as P extends K ? never : P]: T[P]; -}; -export { Omit_2 as Omit }; - -export declare type OmitValue = Key extends keyof Omit ? Omit[Key] : false; - -export declare type Operation = - | 'findFirst' - | 'findFirstOrThrow' - | 'findUnique' - | 'findUniqueOrThrow' - | 'findMany' - | 'create' - | 'createMany' - | 'createManyAndReturn' - | 'update' - | 'updateMany' - | 'updateManyAndReturn' - | 'upsert' - | 'delete' - | 'deleteMany' - | 'aggregate' - | 'count' - | 'groupBy' - | '$queryRaw' - | '$executeRaw' - | '$queryRawUnsafe' - | '$executeRawUnsafe' - | 'findRaw' - | 'aggregateRaw' - | '$runCommandRaw'; - -export declare type OperationPayload = { - name: string; - scalars: { - [ScalarName in string]: unknown; - }; - objects: { - [ObjectName in string]: unknown; - }; - composites: { - [CompositeName in string]: unknown; - }; -}; - -export declare type Optional = { - [P in K & keyof O]?: O[P]; -} & { - [P in Exclude]: O[P]; -}; - -export declare type OptionalFlat = { - [K in keyof T]?: T[K]; -}; - -export declare type OptionalKeys = { - [K in keyof O]-?: {} extends Pick_2 ? K : never; -}[keyof O]; - -declare type Options = { - /** Timeout for starting the transaction */ - maxWait?: number; - /** Timeout for the transaction body */ - timeout?: number; - /** Transaction isolation level */ - isolationLevel?: IsolationLevel_2; -}; - -declare type Options_2 = { - clientVersion: string; -}; - -export declare type Or = { - 0: { - 0: 0; - 1: 1; - }; - 1: { - 0: 1; - 1: 1; - }; -}[A][B]; - -declare type OtherOperationMappings = ReadonlyDeep_2<{ - read: string[]; - write: string[]; -}>; - -declare type OutputType = ReadonlyDeep_2<{ - name: string; - fields: SchemaField[]; -}>; - -declare type OutputTypeRef = TypeRef<'scalar' | 'outputObjectTypes' | 'enumTypes'>; - -declare type Pagination = { - cursor: Record | null; - take: number | null; - skip: number | null; -}; - -export declare function Param<$Type, $Value extends string>(name: $Value): Param<$Type, $Value>; - -export declare type Param = { - readonly name: $Value; -}; - -export declare type PatchFlat = O1 & Omit_2; - -export declare type Path = O extends unknown - ? P extends [infer K, ...infer R] - ? K extends keyof O - ? Path - : Default - : O - : never; - -export declare type Payload = T extends { - [K: symbol]: { - types: { - payload: any; - }; - }; -} - ? T[symbol]['types']['payload'] - : any; - -export declare type PayloadToResult = RenameAndNestPayloadKeys

> = { - [K in keyof O]?: O[K][K] extends any[] - ? PayloadToResult[] - : O[K][K] extends object - ? PayloadToResult - : O[K][K]; -}; - -declare type Pick_2 = { - [P in keyof T as P extends K ? P : never]: T[P]; -}; -export { Pick_2 as Pick }; - -declare interface PlaceholderFormat { - prefix: string; - hasNumbering: boolean; -} - -declare type PrimaryKey = ReadonlyDeep_2<{ - name: string | null; - fields: string[]; -}>; - -export declare class PrismaClientInitializationError extends Error { - clientVersion: string; - errorCode?: string; - retryable?: boolean; - constructor(message: string, clientVersion: string, errorCode?: string); - get [Symbol.toStringTag](): string; -} - -export declare class PrismaClientKnownRequestError extends Error implements ErrorWithBatchIndex { - code: string; - meta?: Record; - clientVersion: string; - batchRequestIdx?: number; - constructor(message: string, { code, clientVersion, meta, batchRequestIdx }: KnownErrorParams); - get [Symbol.toStringTag](): string; -} - -export declare type PrismaClientOptions = { - /** - * Overwrites the primary datasource url from your schema.prisma file - */ - datasourceUrl?: string; - /** - * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale. - */ - adapter?: SqlDriverAdapterFactory | null; - /** - * Overwrites the datasource url from your schema.prisma file - */ - datasources?: Datasources; - /** - * @default "colorless" - */ - errorFormat?: ErrorFormat; - /** - * The default values for Transaction options - * maxWait ?= 2000 - * timeout ?= 5000 - */ - transactionOptions?: Transaction_2.Options; - /** - * @example - * \`\`\` - * // Defaults to stdout - * log: ['query', 'info', 'warn'] - * - * // Emit as events - * log: [ - * { emit: 'stdout', level: 'query' }, - * { emit: 'stdout', level: 'info' }, - * { emit: 'stdout', level: 'warn' } - * ] - * \`\`\` - * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). - */ - log?: Array; - omit?: GlobalOmitOptions; - /** - * @internal - * You probably don't want to use this. \`__internal\` is used by internal tooling. - */ - __internal?: { - debug?: boolean; - engine?: { - cwd?: string; - binaryPath?: string; - endpoint?: string; - allowTriggerPanic?: boolean; - }; - /** This can be used for testing purposes */ - configOverride?: (config: GetPrismaClientConfig) => GetPrismaClientConfig; - }; -}; - -export declare class PrismaClientRustPanicError extends Error { - clientVersion: string; - constructor(message: string, clientVersion: string); - get [Symbol.toStringTag](): string; -} - -export declare class PrismaClientUnknownRequestError extends Error implements ErrorWithBatchIndex { - clientVersion: string; - batchRequestIdx?: number; - constructor(message: string, { clientVersion, batchRequestIdx }: UnknownErrorParams); - get [Symbol.toStringTag](): string; -} - -export declare class PrismaClientValidationError extends Error { - name: string; - clientVersion: string; - constructor(message: string, { clientVersion }: Options_2); - get [Symbol.toStringTag](): string; -} - -declare function prismaGraphQLToJSError( - { error, user_facing_error }: RequestError, - clientVersion: string, - activeProvider: string -): PrismaClientKnownRequestError | PrismaClientUnknownRequestError; - -declare type PrismaOperationSpec = { - args: TArgs; - action: TAction; - model: string; -}; - -export declare interface PrismaPromise extends Promise { - [Symbol.toStringTag]: 'PrismaPromise'; -} - -/** - * Prisma's `Promise` that is backwards-compatible. All additions on top of the - * original `Promise` are optional so that it can be backwards-compatible. - * @see [[createPrismaPromise]] - */ -declare interface PrismaPromise_2 = any> extends Promise { - get spec(): TSpec; - /** - * Extension of the original `.then` function - * @param onfulfilled same as regular promises - * @param onrejected same as regular promises - * @param transaction transaction options - */ - then( - onfulfilled?: (value: TResult) => R1 | PromiseLike, - onrejected?: (error: unknown) => R2 | PromiseLike, - transaction?: PrismaPromiseTransaction - ): Promise; - /** - * Extension of the original `.catch` function - * @param onrejected same as regular promises - * @param transaction transaction options - */ - catch( - onrejected?: ((reason: any) => R | PromiseLike) | undefined | null, - transaction?: PrismaPromiseTransaction - ): Promise; - /** - * Extension of the original `.finally` function - * @param onfinally same as regular promises - * @param transaction transaction options - */ - finally(onfinally?: (() => void) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; - /** - * Called when executing a batch of regular tx - * @param transaction transaction options for batch tx - */ - requestTransaction?(transaction: PrismaPromiseBatchTransaction): PromiseLike; -} - -declare type PrismaPromiseBatchTransaction = { - kind: 'batch'; - id: number; - isolationLevel?: IsolationLevel_2; - index: number; - lock: PromiseLike; -}; - -declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => Promise; - -/** - * Creates a [[PrismaPromise]]. It is Prisma's implementation of `Promise` which - * is essentially a proxy for `Promise`. All the transaction-compatible client - * methods return one, this allows for pre-preparing queries without executing - * them until `.then` is called. It's the foundation of Prisma's query batching. - * @param callback that will be wrapped within our promise implementation - * @see [[PrismaPromise]] - * @returns - */ -declare type PrismaPromiseFactory = >( - callback: PrismaPromiseCallback, - op?: T -) => PrismaPromise_2; - -declare type PrismaPromiseInteractiveTransaction = { - kind: 'itx'; - id: string; - payload: PayloadType; -}; - -declare type PrismaPromiseTransaction = - | PrismaPromiseBatchTransaction - | PrismaPromiseInteractiveTransaction; - -declare type PrismaValue = - | string - | boolean - | number - | PrismaValue[] - | null - | Record - | PrismaValuePlaceholder - | PrismaValueGenerator - | PrismaValueBytes - | PrismaValueBigInt; - -declare type PrismaValueBigInt = { - prisma__type: 'bigint'; - prisma__value: string; -}; - -declare type PrismaValueBytes = { - prisma__type: 'bytes'; - prisma__value: string; -}; - -declare type PrismaValueGenerator = { - prisma__type: 'generatorCall'; - prisma__value: { - name: string; - args: PrismaValue[]; - }; -}; - -declare type PrismaValuePlaceholder = { - prisma__type: 'param'; - prisma__value: { - name: string; - type: string; - }; -}; - -declare type PrismaValueType = - | { - type: 'Any'; - } - | { - type: 'String'; - } - | { - type: 'Int'; - } - | { - type: 'BigInt'; - } - | { - type: 'Float'; - } - | { - type: 'Boolean'; - } - | { - type: 'Decimal'; - } - | { - type: 'Date'; - } - | { - type: 'Time'; - } - | { - type: 'Array'; - inner: PrismaValueType; - } - | { - type: 'Json'; - } - | { - type: 'Object'; - } - | { - type: 'Bytes'; - } - | { - type: 'Enum'; - inner: string; - }; - -export declare const PrivateResultType: unique symbol; - -declare type Provider = 'mysql' | 'postgres' | 'sqlite' | 'sqlserver'; - -declare namespace Public { - export { validator }; -} -export { Public }; - -declare namespace Public_2 { - export { Args, Result, Payload, PrismaPromise, Operation, Exact }; -} - -declare type Query = ReadonlyDeep_2<{ - name: string; - args: SchemaArg[]; - output: QueryOutput; -}>; - -declare interface Queryable extends AdapterInfo { - /** - * Execute a query and return its result. - */ - queryRaw(params: Query): Promise; - /** - * Execute a query and return the number of affected rows. - */ - executeRaw(params: Query): Promise; -} - -declare type QueryCompiler = { - compile(request: string): {}; - compileBatch(batchRequest: string): BatchResponse; - free(): void; -}; - -declare interface QueryCompilerConstructor { - new (options: QueryCompilerOptions): QueryCompiler; -} - -declare type QueryCompilerOptions = { - datamodel: string; - provider: Provider; - connectionInfo: ConnectionInfo; -}; - -declare type QueryEngineBatchGraphQLRequest = { - batch: QueryEngineRequest[]; - transaction?: boolean; - isolationLevel?: IsolationLevel_2; -}; - -declare type QueryEngineBatchRequest = QueryEngineBatchGraphQLRequest | JsonBatchQuery; - -declare type QueryEngineConfig = { - datamodel: string; - configDir: string; - logQueries: boolean; - ignoreEnvVarErrors: boolean; - datasourceOverrides: Record; - env: Record; - logLevel: QueryEngineLogLevel; - engineProtocol: QueryEngineProtocol; - enableTracing: boolean; -}; - -declare interface QueryEngineConstructor { - new ( - config: QueryEngineConfig, - logger: (log: string) => void, - adapter?: ErrorCapturingSqlDriverAdapter - ): QueryEngineInstance; -} - -declare type QueryEngineInstance = { - connect(headers: string, requestId: string): Promise; - disconnect(headers: string, requestId: string): Promise; - /** - * Frees any resources allocated by the engine's WASM instance. This method is automatically created by WASM bindgen. - * Noop for other engines. - */ - free?(): void; - /** - * @param requestStr JSON.stringified `QueryEngineRequest | QueryEngineBatchRequest` - * @param headersStr JSON.stringified `QueryEngineRequestHeaders` - */ - query(requestStr: string, headersStr: string, transactionId: string | undefined, requestId: string): Promise; - sdlSchema?(): Promise; - startTransaction(options: string, traceHeaders: string, requestId: string): Promise; - commitTransaction(id: string, traceHeaders: string, requestId: string): Promise; - rollbackTransaction(id: string, traceHeaders: string, requestId: string): Promise; - metrics?(options: string): Promise; - applyPendingMigrations?(): Promise; - trace(requestId: string): Promise; -}; - -declare type QueryEngineLogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'off'; - -declare type QueryEngineProtocol = 'graphql' | 'json'; - -declare type QueryEngineRequest = { - query: string; - variables: Object; -}; - -declare type QueryEngineResultData = { - data: T; -}; - -declare type QueryEvent = { - timestamp: Date; - query: string; - params: string; - duration: number; - target: string; -}; - -declare type QueryEventType = 'query'; - -declare type QueryIntrospectionBuiltinType = - | 'int' - | 'bigint' - | 'float' - | 'double' - | 'string' - | 'enum' - | 'bytes' - | 'bool' - | 'char' - | 'decimal' - | 'json' - | 'xml' - | 'uuid' - | 'datetime' - | 'date' - | 'time' - | 'int-array' - | 'bigint-array' - | 'float-array' - | 'double-array' - | 'string-array' - | 'char-array' - | 'bytes-array' - | 'bool-array' - | 'decimal-array' - | 'json-array' - | 'xml-array' - | 'uuid-array' - | 'datetime-array' - | 'date-array' - | 'time-array' - | 'null' - | 'unknown'; - -declare type QueryMiddlewareParams = { - /** The model this is executed on */ - model?: string; - /** The action that is being handled */ - action: Action; - /** TODO what is this */ - dataPath: string[]; - /** TODO what is this */ - runInTransaction: boolean; - args?: UserArgs_2; -}; - -export declare type QueryOptions = { - query: { - [ModelName in string]: - | { - [ModelAction in string]: ModelQueryOptionsCb; - } - | QueryOptionsCb; - }; -}; - -export declare type QueryOptionsCb = (args: QueryOptionsCbArgs) => Promise; - -export declare type QueryOptionsCbArgs = { - model?: string; - operation: string; - args: JsArgs | RawQueryArgs; - query: (args: JsArgs | RawQueryArgs) => Promise; -}; - -declare type QueryOutput = ReadonlyDeep_2<{ - name: string; - isRequired: boolean; - isList: boolean; -}>; - -declare type QueryPlanBinding = { - name: string; - expr: QueryPlanNode; -}; - -declare type QueryPlanDbQuery = - | { - type: 'rawSql'; - sql: string; - params: PrismaValue[]; - } - | { - type: 'templateSql'; - fragments: Fragment[]; - placeholderFormat: PlaceholderFormat; - params: PrismaValue[]; - chunkable: boolean; - }; - -declare type QueryPlanNode = - | { - type: 'value'; - args: PrismaValue; - } - | { - type: 'seq'; - args: QueryPlanNode[]; - } - | { - type: 'get'; - args: { - name: string; - }; - } - | { - type: 'let'; - args: { - bindings: QueryPlanBinding[]; - expr: QueryPlanNode; - }; - } - | { - type: 'getFirstNonEmpty'; - args: { - names: string[]; - }; - } - | { - type: 'query'; - args: QueryPlanDbQuery; - } - | { - type: 'execute'; - args: QueryPlanDbQuery; - } - | { - type: 'reverse'; - args: QueryPlanNode; - } - | { - type: 'sum'; - args: QueryPlanNode[]; - } - | { - type: 'concat'; - args: QueryPlanNode[]; - } - | { - type: 'unique'; - args: QueryPlanNode; - } - | { - type: 'required'; - args: QueryPlanNode; - } - | { - type: 'join'; - args: { - parent: QueryPlanNode; - children: JoinExpression[]; - }; - } - | { - type: 'mapField'; - args: { - field: string; - records: QueryPlanNode; - }; - } - | { - type: 'transaction'; - args: QueryPlanNode; - } - | { - type: 'dataMap'; - args: { - expr: QueryPlanNode; - structure: ResultNode; - enums: Record>; - }; - } - | { - type: 'validate'; - args: { - expr: QueryPlanNode; - rules: DataRule[]; - } & ValidationError; - } - | { - type: 'if'; - args: { - value: QueryPlanNode; - rule: DataRule; - then: QueryPlanNode; - else: QueryPlanNode; - }; - } - | { - type: 'unit'; - } - | { - type: 'diff'; - args: { - from: QueryPlanNode; - to: QueryPlanNode; - }; - } - | { - type: 'initializeRecord'; - args: { - expr: QueryPlanNode; - fields: Record; - }; - } - | { - type: 'mapRecord'; - args: { - expr: QueryPlanNode; - fields: Record; - }; - } - | { - type: 'process'; - args: { - expr: QueryPlanNode; - operations: InMemoryOps; - }; - }; - -/** - * Create raw SQL statement. - */ -export declare function raw(value: string): Sql; - -export declare type RawParameters = { - __prismaRawParameters__: true; - values: string; -}; - -export declare type RawQueryArgs = Sql | UnknownTypedSql | [query: string, ...values: RawValue[]]; - -declare type RawResponse = { - columns: string[]; - types: QueryIntrospectionBuiltinType[]; - rows: unknown[][]; -}; - -declare type RawTaggedValue = { - $type: 'Raw'; - value: unknown; -}; - -/** - * Supported value or SQL instance. - */ -export declare type RawValue = Value | Sql; - -export declare type ReadonlyDeep = { - readonly [K in keyof T]: ReadonlyDeep; -}; - -declare type ReadonlyDeep_2 = { - +readonly [K in keyof O]: ReadonlyDeep_2; -}; - -declare type Record_2 = { - [P in T]: U; -}; -export { Record_2 as Record }; - -export declare type RenameAndNestPayloadKeys

= { - [K in keyof P as K extends 'scalars' | 'objects' | 'composites' ? keyof P[K] : never]: P[K]; -}; - -declare type RequestBatchOptions = { - transaction?: TransactionOptions_2; - traceparent?: string; - numTry?: number; - containsWrite: boolean; - customDataProxyFetch?: CustomDataProxyFetch; -}; - -declare interface RequestError { - error: string; - user_facing_error: { - is_panic: boolean; - message: string; - meta?: Record; - error_code?: string; - batch_request_idx?: number; - }; -} - -declare class RequestHandler { - client: Client; - dataloader: DataLoader; - private logEmitter?; - constructor(client: Client, logEmitter?: LogEmitter); - request(params: RequestParams): Promise; - mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResultData): any; - /** - * Handles the error and logs it, logging the error is done synchronously waiting for the event - * handlers to finish. - */ - handleAndLogRequestError(params: HandleErrorParams): never; - handleRequestError({ - error, - clientMethod, - callsite, - transaction, - args, - modelName, - globalOmit, - }: HandleErrorParams): never; - sanitizeMessage(message: any): any; - unpack(data: unknown, dataPath: string[], unpacker?: Unpacker): any; - get [Symbol.toStringTag](): string; -} - -declare type RequestOptions = { - traceparent?: string; - numTry?: number; - interactiveTransaction?: InteractiveTransactionOptions; - isWrite: boolean; - customDataProxyFetch?: CustomDataProxyFetch; -}; - -declare type RequestParams = { - modelName?: string; - action: Action; - protocolQuery: JsonQuery; - dataPath: string[]; - clientMethod: string; - callsite?: CallSite; - transaction?: PrismaPromiseTransaction; - extensions: MergedExtensionsList; - args?: any; - headers?: Record; - unpacker?: Unpacker; - otelParentCtx?: Context; - otelChildCtx?: Context; - globalOmit?: GlobalOmitOptions; - customDataProxyFetch?: CustomDataProxyFetch; -}; - -declare type RequiredExtensionArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions; -export { RequiredExtensionArgs }; -export { RequiredExtensionArgs as UserArgs }; - -export declare type RequiredKeys = { - [K in keyof O]-?: {} extends Pick_2 ? never : K; -}[keyof O]; - -declare function resolveDatasourceUrl({ - inlineDatasources, - overrideDatasources, - env, - clientVersion, -}: { - inlineDatasources: GetPrismaClientConfig['inlineDatasources']; - overrideDatasources: Datasources; - env: Record; - clientVersion: string; -}): string; - -export declare type Result = T extends { - [K: symbol]: { - types: { - payload: any; - }; - }; -} - ? GetResult - : GetResult< - { - composites: {}; - objects: {}; - scalars: {}; - name: ''; - }, - {}, - F - >; - -export declare type Result_2 = Result; - -declare namespace Result_3 { - export { - Count, - GetFindResult, - SelectablePayloadFields, - SelectField, - DefaultSelection, - UnwrapPayload, - ApplyOmit, - OmitValue, - GetCountResult, - Aggregate, - GetAggregateResult, - GetBatchResult, - GetGroupByResult, - GetResult, - ExtractGlobalOmit, - }; -} - -declare type Result_4 = { - map(fn: (value: T) => U): Result_4; - flatMap(fn: (value: T) => Result_4): Result_4; -} & ( - | { - readonly ok: true; - readonly value: T; - } - | { - readonly ok: false; - readonly error: Error_2; - } -); - -export declare type ResultArg = { - [FieldName in string]: ResultFieldDefinition; -}; - -export declare type ResultArgs = { - result: { - [ModelName in string]: ResultArg; - }; -}; - -export declare type ResultArgsFieldCompute = (model: any) => unknown; - -export declare type ResultFieldDefinition = { - needs?: { - [FieldName in string]: boolean; - }; - compute: ResultArgsFieldCompute; -}; - -declare type ResultNode = - | { - type: 'AffectedRows'; - } - | { - type: 'Object'; - fields: Record; - serializedName: string | null; - skipNulls: boolean; - } - | { - type: 'Value'; - dbName: string; - resultType: PrismaValueType; - }; - -export declare type Return = T extends (...args: any[]) => infer R ? R : T; - -export declare type RuntimeDataModel = { - readonly models: Record; - readonly enums: Record; - readonly types: Record; -}; - -declare type RuntimeEnum = Omit; - -declare type RuntimeModel = Omit; - -declare type RuntimeName = 'workerd' | 'deno' | 'netlify' | 'node' | 'bun' | 'edge-light' | ''; - -declare type Schema = ReadonlyDeep_2<{ - rootQueryType?: string; - rootMutationType?: string; - inputObjectTypes: { - model?: InputType[]; - prisma: InputType[]; - }; - outputObjectTypes: { - model: OutputType[]; - prisma: OutputType[]; - }; - enumTypes: { - model?: SchemaEnum[]; - prisma: SchemaEnum[]; - }; - fieldRefTypes: { - prisma?: FieldRefType[]; - }; -}>; - -declare type SchemaArg = ReadonlyDeep_2<{ - name: string; - comment?: string; - isNullable: boolean; - isRequired: boolean; - inputTypes: InputTypeRef[]; - requiresOtherFields?: string[]; - deprecation?: Deprecation; -}>; - -declare type SchemaEnum = ReadonlyDeep_2<{ - name: string; - values: string[]; -}>; - -declare type SchemaField = ReadonlyDeep_2<{ - name: string; - isNullable?: boolean; - outputType: OutputTypeRef; - args: SchemaArg[]; - deprecation?: Deprecation; - documentation?: string; -}>; - -export declare type Select = T extends U ? T : never; - -export declare type SelectablePayloadFields = - | { - objects: { - [k in K]: O; - }; - } - | { - composites: { - [k in K]: O; - }; - }; - -export declare type SelectField

, K extends PropertyKey> = P extends { - objects: Record; -} - ? P['objects'][K] - : P extends { - composites: Record; - } - ? P['composites'][K] - : never; - -declare type Selection_2 = Record; -export { Selection_2 as Selection }; - -export declare function serializeJsonQuery({ - modelName, - action, - args, - runtimeDataModel, - extensions, - callsite, - clientMethod, - errorFormat, - clientVersion, - previewFeatures, - globalOmit, -}: SerializeParams): JsonQuery; - -declare type SerializeParams = { - runtimeDataModel: RuntimeDataModel; - modelName?: string; - action: Action; - args?: JsArgs; - extensions?: MergedExtensionsList; - callsite?: CallSite; - clientMethod: string; - clientVersion: string; - errorFormat: ErrorFormat; - previewFeatures: string[]; - globalOmit?: GlobalOmitOptions; -}; - -declare class Skip { - constructor(param?: symbol); - ifUndefined(value: T | undefined): T | Skip; -} - -export declare const skip: Skip; - -declare type SortOrder = 'asc' | 'desc'; - -/** - * An interface that represents a span. A span represents a single operation - * within a trace. Examples of span might include remote procedure calls or a - * in-process function calls to sub-components. A Trace has a single, top-level - * "root" Span that in turn may have zero or more child Spans, which in turn - * may have children. - * - * Spans are created by the {@link Tracer.startSpan} method. - */ -declare interface Span { - /** - * Returns the {@link SpanContext} object associated with this Span. - * - * Get an immutable, serializable identifier for this span that can be used - * to create new child spans. Returned SpanContext is usable even after the - * span ends. - * - * @returns the SpanContext object associated with this Span. - */ - spanContext(): SpanContext; - /** - * Sets an attribute to the span. - * - * Sets a single Attribute with the key and value passed as arguments. - * - * @param key the key for this attribute. - * @param value the value for this attribute. Setting a value null or - * undefined is invalid and will result in undefined behavior. - */ - setAttribute(key: string, value: SpanAttributeValue): this; - /** - * Sets attributes to the span. - * - * @param attributes the attributes that will be added. - * null or undefined attribute values - * are invalid and will result in undefined behavior. - */ - setAttributes(attributes: SpanAttributes): this; - /** - * Adds an event to the Span. - * - * @param name the name of the event. - * @param [attributesOrStartTime] the attributes that will be added; these are - * associated with this event. Can be also a start time - * if type is {@type TimeInput} and 3rd param is undefined - * @param [startTime] start time of the event. - */ - addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, startTime?: TimeInput): this; - /** - * Adds a single link to the span. - * - * Links added after the creation will not affect the sampling decision. - * It is preferred span links be added at span creation. - * - * @param link the link to add. - */ - addLink(link: Link): this; - /** - * Adds multiple links to the span. - * - * Links added after the creation will not affect the sampling decision. - * It is preferred span links be added at span creation. - * - * @param links the links to add. - */ - addLinks(links: Link[]): this; - /** - * Sets a status to the span. If used, this will override the default Span - * status. Default is {@link SpanStatusCode.UNSET}. SetStatus overrides the value - * of previous calls to SetStatus on the Span. - * - * @param status the SpanStatus to set. - */ - setStatus(status: SpanStatus): this; - /** - * Updates the Span name. - * - * This will override the name provided via {@link Tracer.startSpan}. - * - * Upon this update, any sampling behavior based on Span name will depend on - * the implementation. - * - * @param name the Span name. - */ - updateName(name: string): this; - /** - * Marks the end of Span execution. - * - * Call to End of a Span MUST not have any effects on child spans. Those may - * still be running and can be ended later. - * - * Do not return `this`. The Span generally should not be used after it - * is ended so chaining is not desired in this context. - * - * @param [endTime] the time to set as Span's end time. If not provided, - * use the current time as the span's end time. - */ - end(endTime?: TimeInput): void; - /** - * Returns the flag whether this span will be recorded. - * - * @returns true if this Span is active and recording information like events - * with the `AddEvent` operation and attributes using `setAttributes`. - */ - isRecording(): boolean; - /** - * Sets exception as a span event - * @param exception the exception the only accepted values are string or Error - * @param [time] the time to set as Span's event time. If not provided, - * use the current time. - */ - recordException(exception: Exception, time?: TimeInput): void; -} - -/** - * @deprecated please use {@link Attributes} - */ -declare type SpanAttributes = Attributes; - -/** - * @deprecated please use {@link AttributeValue} - */ -declare type SpanAttributeValue = AttributeValue; - -declare type SpanCallback = (span?: Span, context?: Context) => R; - -/** - * A SpanContext represents the portion of a {@link Span} which must be - * serialized and propagated along side of a {@link Baggage}. - */ -declare interface SpanContext { - /** - * The ID of the trace that this span belongs to. It is worldwide unique - * with practically sufficient probability by being made as 16 randomly - * generated bytes, encoded as a 32 lowercase hex characters corresponding to - * 128 bits. - */ - traceId: string; - /** - * The ID of the Span. It is globally unique with practically sufficient - * probability by being made as 8 randomly generated bytes, encoded as a 16 - * lowercase hex characters corresponding to 64 bits. - */ - spanId: string; - /** - * Only true if the SpanContext was propagated from a remote parent. - */ - isRemote?: boolean; - /** - * Trace flags to propagate. - * - * It is represented as 1 byte (bitmap). Bit to represent whether trace is - * sampled or not. When set, the least significant bit documents that the - * caller may have recorded trace data. A caller who does not record trace - * data out-of-band leaves this flag unset. - * - * see {@link TraceFlags} for valid flag values. - */ - traceFlags: number; - /** - * Tracing-system-specific info to propagate. - * - * The tracestate field value is a `list` as defined below. The `list` is a - * series of `list-members` separated by commas `,`, and a list-member is a - * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs - * surrounding `list-members` are ignored. There can be a maximum of 32 - * `list-members` in a `list`. - * More Info: https://www.w3.org/TR/trace-context/#tracestate-field - * - * Examples: - * Single tracing system (generic format): - * tracestate: rojo=00f067aa0ba902b7 - * Multiple tracing systems (with different formatting): - * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE - */ - traceState?: TraceState; -} - -declare enum SpanKind { - /** Default value. Indicates that the span is used internally. */ - INTERNAL = 0, - /** - * Indicates that the span covers server-side handling of an RPC or other - * remote request. - */ - SERVER = 1, - /** - * Indicates that the span covers the client-side wrapper around an RPC or - * other remote request. - */ - CLIENT = 2, - /** - * Indicates that the span describes producer sending a message to a - * broker. Unlike client and server, there is no direct critical path latency - * relationship between producer and consumer spans. - */ - PRODUCER = 3, - /** - * Indicates that the span describes consumer receiving a message from a - * broker. Unlike client and server, there is no direct critical path latency - * relationship between producer and consumer spans. - */ - CONSUMER = 4, -} - -/** - * Options needed for span creation - */ -declare interface SpanOptions { - /** - * The SpanKind of a span - * @default {@link SpanKind.INTERNAL} - */ - kind?: SpanKind; - /** A span's attributes */ - attributes?: SpanAttributes; - /** {@link Link}s span to other spans */ - links?: Link[]; - /** A manually specified start time for the created `Span` object. */ - startTime?: TimeInput; - /** The new span should be a root span. (Ignore parent from context). */ - root?: boolean; -} - -declare interface SpanStatus { - /** The status code of this message. */ - code: SpanStatusCode; - /** A developer-facing error message. */ - message?: string; -} - -/** - * An enumeration of status codes. - */ -declare enum SpanStatusCode { - /** - * The default status. - */ - UNSET = 0, - /** - * The operation has been validated by an Application developer or - * Operator to have completed successfully. - */ - OK = 1, - /** - * The operation contains an error. - */ - ERROR = 2, -} - -/** - * A SQL instance can be nested within each other to build SQL strings. - */ -export declare class Sql { - readonly values: Value[]; - readonly strings: string[]; - constructor(rawStrings: readonly string[], rawValues: readonly RawValue[]); - get sql(): string; - get statement(): string; - get text(): string; - inspect(): { - sql: string; - statement: string; - text: string; - values: unknown[]; - }; -} - -declare interface SqlDriverAdapter extends SqlQueryable { - /** - * Execute multiple SQL statements separated by semicolon. - */ - executeScript(script: string): Promise; - /** - * Start new transaction. - */ - startTransaction(isolationLevel?: IsolationLevel): Promise; - /** - * Optional method that returns extra connection info - */ - getConnectionInfo?(): ConnectionInfo; - /** - * Dispose of the connection and release any resources. - */ - dispose(): Promise; -} - -export declare interface SqlDriverAdapterFactory extends DriverAdapterFactory { - connect(): Promise; -} - -declare type SqlQuery = { - sql: string; - args: Array; - argTypes: Array; -}; - -declare interface SqlQueryable extends Queryable {} - -declare interface SqlResultSet { - /** - * List of column types appearing in a database query, in the same order as `columnNames`. - * They are used within the Query Engine to convert values from JS to Quaint values. - */ - columnTypes: Array; - /** - * List of column names appearing in a database query, in the same order as `columnTypes`. - */ - columnNames: Array; - /** - * List of rows retrieved from a database query. - * Each row is a list of values, whose length matches `columnNames` and `columnTypes`. - */ - rows: Array>; - /** - * The last ID of an `INSERT` statement, if any. - * This is required for `AUTO_INCREMENT` columns in databases based on MySQL and SQLite. - */ - lastInsertId?: string; -} - -/** - * Create a SQL object from a template string. - */ -export declare function sqltag(strings: readonly string[], ...values: readonly RawValue[]): Sql; - -/** - * Defines TimeInput. - * - * hrtime, epoch milliseconds, performance.now() or Date - */ -declare type TimeInput = HrTime_2 | number | Date; - -export declare type ToTuple = T extends any[] ? T : [T]; - -declare interface TraceState { - /** - * Create a new TraceState which inherits from this TraceState and has the - * given key set. - * The new entry will always be added in the front of the list of states. - * - * @param key key of the TraceState entry. - * @param value value of the TraceState entry. - */ - set(key: string, value: string): TraceState; - /** - * Return a new TraceState which inherits from this TraceState but does not - * contain the given key. - * - * @param key the key for the TraceState entry to be removed. - */ - unset(key: string): TraceState; - /** - * Returns the value to which the specified key is mapped, or `undefined` if - * this map contains no mapping for the key. - * - * @param key with which the specified value is to be associated. - * @returns the value to which the specified key is mapped, or `undefined` if - * this map contains no mapping for the key. - */ - get(key: string): string | undefined; - /** - * Serializes the TraceState to a `list` as defined below. The `list` is a - * series of `list-members` separated by commas `,`, and a list-member is a - * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs - * surrounding `list-members` are ignored. There can be a maximum of 32 - * `list-members` in a `list`. - * - * @returns the serialized string. - */ - serialize(): string; -} - -declare interface TracingHelper { - isEnabled(): boolean; - getTraceParent(context?: Context): string; - dispatchEngineSpans(spans: EngineSpan[]): void; - getActiveContext(): Context | undefined; - runInChildSpan(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback): R; -} - -declare interface Transaction extends AdapterInfo, SqlQueryable { - /** - * Transaction options. - */ - readonly options: TransactionOptions; - /** - * Commit the transaction. - */ - commit(): Promise; - /** - * Roll back the transaction. - */ - rollback(): Promise; -} - -declare namespace Transaction_2 { - export { Options, IsolationLevel_2 as IsolationLevel, InteractiveTransactionInfo, TransactionHeaders }; -} - -declare type TransactionHeaders = { - traceparent?: string; -}; - -declare type TransactionOptions = { - usePhantomQuery: boolean; -}; - -declare type TransactionOptions_2 = - | { - kind: 'itx'; - options: InteractiveTransactionOptions; - } - | { - kind: 'batch'; - options: BatchTransactionOptions; - }; - -export declare class TypedSql { - [PrivateResultType]: Result; - constructor(sql: string, values: Values); - get sql(): string; - get values(): Values; -} - -export declare type TypeMapCbDef = Fn< - { - extArgs: InternalArgs; - }, - TypeMapDef ->; - -/** Shared */ -export declare type TypeMapDef = Record; - -declare type TypeRef = { - isList: boolean; - type: string; - location: AllowedLocations; - namespace?: FieldNamespace; -}; - -declare namespace Types { - export { - Result_3 as Result, - Extensions_2 as Extensions, - Utils, - Public_2 as Public, - isSkip, - Skip, - skip, - UnknownTypedSql, - OperationPayload as Payload, - }; -} -export { Types }; - -declare type uniqueIndex = ReadonlyDeep_2<{ - name: string; - fields: string[]; -}>; - -declare type UnknownErrorParams = { - clientVersion: string; - batchRequestIdx?: number; -}; - -export declare type UnknownTypedSql = TypedSql; - -declare type Unpacker = (data: any) => any; - -export declare type UnwrapPayload

= {} extends P - ? unknown - : { - [K in keyof P]: P[K] extends { - scalars: infer S; - composites: infer C; - }[] - ? Array> - : P[K] extends { - scalars: infer S; - composites: infer C; - } | null - ? (S & UnwrapPayload) | Select - : never; - }; - -export declare type UnwrapPromise

= P extends Promise ? R : P; - -export declare type UnwrapTuple = { - [K in keyof Tuple]: K extends `${number}` - ? Tuple[K] extends PrismaPromise - ? X - : UnwrapPromise - : UnwrapPromise; -}; - -/** - * Input that flows from the user into the Client. - */ -declare type UserArgs_2 = any; - -declare namespace Utils { - export { - EmptyToUnknown, - NeverToUnknown, - PatchFlat, - Omit_2 as Omit, - Pick_2 as Pick, - ComputeDeep, - Compute, - OptionalFlat, - ReadonlyDeep, - Narrowable, - Narrow, - Exact, - Cast, - Record_2 as Record, - UnwrapPromise, - UnwrapTuple, - Path, - Fn, - Call, - RequiredKeys, - OptionalKeys, - Optional, - Return, - ToTuple, - RenameAndNestPayloadKeys, - PayloadToResult, - Select, - Equals, - Or, - JsPromise, - }; -} - -declare type ValidationError = - | { - error_identifier: 'RELATION_VIOLATION'; - context: { - relation: string; - modelA: string; - modelB: string; - }; - } - | { - error_identifier: 'MISSING_RELATED_RECORD'; - context: { - model: string; - relation: string; - relationType: string; - operation: string; - neededFor?: string; - }; - } - | { - error_identifier: 'MISSING_RECORD'; - context: { - operation: string; - }; - } - | { - error_identifier: 'INCOMPLETE_CONNECT_INPUT'; - context: { - expectedRows: number; - }; - } - | { - error_identifier: 'INCOMPLETE_CONNECT_OUTPUT'; - context: { - expectedRows: number; - relation: string; - relationType: string; - }; - } - | { - error_identifier: 'RECORDS_NOT_CONNECTED'; - context: { - relation: string; - parent: string; - child: string; - }; - }; - -declare function validator(): (select: Exact) => S; - -declare function validator, O extends keyof C[M] & Operation>( - client: C, - model: M, - operation: O -): (select: Exact>) => S; - -declare function validator< - C, - M extends Exclude, - O extends keyof C[M] & Operation, - P extends keyof Args, ->(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; - -/** - * Values supported by SQL engine. - */ -export declare type Value = unknown; - -export declare function warnEnvConflicts(envPaths: any): void; - -export declare const warnOnce: (key: string, message: string, ...args: unknown[]) => void; - -export {}; diff --git a/prisma/generated/client/runtime/library.js b/prisma/generated/client/runtime/library.js deleted file mode 100644 index d9ef8ce..0000000 --- a/prisma/generated/client/runtime/library.js +++ /dev/null @@ -1,9197 +0,0 @@ -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ -'use strict'; -var xu = Object.create; -var Vt = Object.defineProperty; -var Pu = Object.getOwnPropertyDescriptor; -var vu = Object.getOwnPropertyNames; -var Tu = Object.getPrototypeOf, - Su = Object.prototype.hasOwnProperty; -var Oo = (e, r) => () => (e && (r = e((e = 0))), r); -var ne = (e, r) => () => (r || e((r = { exports: {} }).exports, r), r.exports), - tr = (e, r) => { - for (var t in r) Vt(e, t, { get: r[t], enumerable: !0 }); - }, - ko = (e, r, t, n) => { - if ((r && typeof r == 'object') || typeof r == 'function') - for (let i of vu(r)) - !Su.call(e, i) && i !== t && Vt(e, i, { get: () => r[i], enumerable: !(n = Pu(r, i)) || n.enumerable }); - return e; - }; -var A = (e, r, t) => ( - (t = e != null ? xu(Tu(e)) : {}), - ko(r || !e || !e.__esModule ? Vt(t, 'default', { value: e, enumerable: !0 }) : t, e) - ), - Ru = (e) => ko(Vt({}, '__esModule', { value: !0 }), e); -var hi = ne((Mg, os) => { - 'use strict'; - os.exports = (e, r = process.argv) => { - let t = e.startsWith('-') ? '' : e.length === 1 ? '-' : '--', - n = r.indexOf(t + e), - i = r.indexOf('--'); - return n !== -1 && (i === -1 || n < i); - }; -}); -var ls = ne(($g, as) => { - 'use strict'; - var Vc = require('node:os'), - ss = require('node:tty'), - de = hi(), - { env: G } = process, - Qe; - de('no-color') || de('no-colors') || de('color=false') || de('color=never') - ? (Qe = 0) - : (de('color') || de('colors') || de('color=true') || de('color=always')) && (Qe = 1); - 'FORCE_COLOR' in G && - (G.FORCE_COLOR === 'true' - ? (Qe = 1) - : G.FORCE_COLOR === 'false' - ? (Qe = 0) - : (Qe = G.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(G.FORCE_COLOR, 10), 3))); - function yi(e) { - return e === 0 ? !1 : { level: e, hasBasic: !0, has256: e >= 2, has16m: e >= 3 }; - } - function bi(e, r) { - if (Qe === 0) return 0; - if (de('color=16m') || de('color=full') || de('color=truecolor')) return 3; - if (de('color=256')) return 2; - if (e && !r && Qe === void 0) return 0; - let t = Qe || 0; - if (G.TERM === 'dumb') return t; - if (process.platform === 'win32') { - let n = Vc.release().split('.'); - return Number(n[0]) >= 10 && Number(n[2]) >= 10586 ? (Number(n[2]) >= 14931 ? 3 : 2) : 1; - } - if ('CI' in G) - return ['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some((n) => n in G) || - G.CI_NAME === 'codeship' - ? 1 - : t; - if ('TEAMCITY_VERSION' in G) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(G.TEAMCITY_VERSION) ? 1 : 0; - if (G.COLORTERM === 'truecolor') return 3; - if ('TERM_PROGRAM' in G) { - let n = parseInt((G.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - switch (G.TERM_PROGRAM) { - case 'iTerm.app': - return n >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - } - } - return /-256(color)?$/i.test(G.TERM) - ? 2 - : /^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(G.TERM) || 'COLORTERM' in G - ? 1 - : t; - } - function jc(e) { - let r = bi(e, e && e.isTTY); - return yi(r); - } - as.exports = { supportsColor: jc, stdout: yi(bi(!0, ss.isatty(1))), stderr: yi(bi(!0, ss.isatty(2))) }; -}); -var ps = ne((qg, cs) => { - 'use strict'; - var Bc = ls(), - br = hi(); - function us(e) { - if (/^\d{3,4}$/.test(e)) { - let t = /(\d{1,2})(\d{2})/.exec(e) || []; - return { major: 0, minor: parseInt(t[1], 10), patch: parseInt(t[2], 10) }; - } - let r = (e || '').split('.').map((t) => parseInt(t, 10)); - return { major: r[0], minor: r[1], patch: r[2] }; - } - function Ei(e) { - let { - CI: r, - FORCE_HYPERLINK: t, - NETLIFY: n, - TEAMCITY_VERSION: i, - TERM_PROGRAM: o, - TERM_PROGRAM_VERSION: s, - VTE_VERSION: a, - TERM: l, - } = process.env; - if (t) return !(t.length > 0 && parseInt(t, 10) === 0); - if (br('no-hyperlink') || br('no-hyperlinks') || br('hyperlink=false') || br('hyperlink=never')) return !1; - if (br('hyperlink=true') || br('hyperlink=always') || n) return !0; - if (!Bc.supportsColor(e) || (e && !e.isTTY)) return !1; - if ('WT_SESSION' in process.env) return !0; - if (process.platform === 'win32' || r || i) return !1; - if (o) { - let u = us(s || ''); - switch (o) { - case 'iTerm.app': - return u.major === 3 ? u.minor >= 1 : u.major > 3; - case 'WezTerm': - return u.major >= 20200620; - case 'vscode': - return u.major > 1 || (u.major === 1 && u.minor >= 72); - case 'ghostty': - return !0; - } - } - if (a) { - if (a === '0.50.0') return !1; - let u = us(a); - return u.major > 0 || u.minor >= 50; - } - switch (l) { - case 'alacritty': - return !0; - } - return !1; - } - cs.exports = { supportsHyperlink: Ei, stdout: Ei(process.stdout), stderr: Ei(process.stderr) }; -}); -var ds = ne((Zg, Uc) => { - Uc.exports = { - name: '@prisma/internals', - version: '6.14.0', - description: "This package is intended for Prisma's internal use", - main: 'dist/index.js', - types: 'dist/index.d.ts', - repository: { type: 'git', url: 'https://github.com/prisma/prisma.git', directory: 'packages/internals' }, - homepage: 'https://www.prisma.io', - author: 'Tim Suchanek ', - bugs: 'https://github.com/prisma/prisma/issues', - license: 'Apache-2.0', - scripts: { - dev: 'DEV=true tsx helpers/build.ts', - build: 'tsx helpers/build.ts', - test: 'dotenv -e ../../.db.env -- jest --silent', - prepublishOnly: 'pnpm run build', - }, - files: ['README.md', 'dist', '!**/libquery_engine*', '!dist/get-generators/engines/*', 'scripts'], - devDependencies: { - '@babel/helper-validator-identifier': '7.25.9', - '@opentelemetry/api': '1.9.0', - '@swc/core': '1.11.5', - '@swc/jest': '0.2.37', - '@types/babel__helper-validator-identifier': '7.15.2', - '@types/jest': '29.5.14', - '@types/node': '18.19.76', - '@types/resolve': '1.20.6', - archiver: '6.0.2', - 'checkpoint-client': '1.1.33', - 'cli-truncate': '4.0.0', - dotenv: '16.5.0', - empathic: '2.0.0', - esbuild: '0.25.5', - 'escape-string-regexp': '5.0.0', - execa: '5.1.1', - 'fast-glob': '3.3.3', - 'find-up': '7.0.0', - 'fp-ts': '2.16.9', - 'fs-extra': '11.3.0', - 'fs-jetpack': '5.1.0', - 'global-dirs': '4.0.0', - globby: '11.1.0', - 'identifier-regex': '1.0.0', - 'indent-string': '4.0.0', - 'is-windows': '1.0.2', - 'is-wsl': '3.1.0', - jest: '29.7.0', - 'jest-junit': '16.0.0', - kleur: '4.1.5', - 'mock-stdin': '1.0.0', - 'new-github-issue-url': '0.2.1', - 'node-fetch': '3.3.2', - 'npm-packlist': '5.1.3', - open: '7.4.2', - 'p-map': '4.0.0', - resolve: '1.22.10', - 'string-width': '7.2.0', - 'strip-ansi': '6.0.1', - 'strip-indent': '4.0.0', - 'temp-dir': '2.0.0', - tempy: '1.0.1', - 'terminal-link': '4.0.0', - tmp: '0.2.3', - 'ts-node': '10.9.2', - 'ts-pattern': '5.6.2', - 'ts-toolbelt': '9.6.0', - typescript: '5.4.5', - yarn: '1.22.22', - }, - dependencies: { - '@prisma/config': 'workspace:*', - '@prisma/debug': 'workspace:*', - '@prisma/dmmf': 'workspace:*', - '@prisma/driver-adapter-utils': 'workspace:*', - '@prisma/engines': 'workspace:*', - '@prisma/fetch-engine': 'workspace:*', - '@prisma/generator': 'workspace:*', - '@prisma/generator-helper': 'workspace:*', - '@prisma/get-platform': 'workspace:*', - '@prisma/prisma-schema-wasm': '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - '@prisma/schema-engine-wasm': '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - '@prisma/schema-files-loader': 'workspace:*', - arg: '5.0.2', - prompts: '2.4.2', - }, - peerDependencies: { typescript: '>=5.1.0' }, - peerDependenciesMeta: { typescript: { optional: !0 } }, - sideEffects: !1, - }; -}); -var Ti = ne((Eh, Hc) => { - Hc.exports = { - name: '@prisma/engines-version', - version: '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - main: 'index.js', - types: 'index.d.ts', - license: 'Apache-2.0', - author: 'Tim Suchanek ', - prisma: { enginesVersion: '717184b7b35ea05dfa71a3236b7af656013e1e49' }, - repository: { - type: 'git', - url: 'https://github.com/prisma/engines-wrapper.git', - directory: 'packages/engines-version', - }, - devDependencies: { '@types/node': '18.19.76', typescript: '4.9.5' }, - files: ['index.js', 'index.d.ts'], - scripts: { build: 'tsc -d' }, - }; -}); -var nn = ne((tn) => { - 'use strict'; - Object.defineProperty(tn, '__esModule', { value: !0 }); - tn.enginesVersion = void 0; - tn.enginesVersion = Ti().prisma.enginesVersion; -}); -var ys = ne((_h, hs) => { - 'use strict'; - hs.exports = (e) => { - let r = e.match(/^[ \t]*(?=\S)/gm); - return r ? r.reduce((t, n) => Math.min(t, n.length), 1 / 0) : 0; - }; -}); -var Di = ne((Fh, ws) => { - 'use strict'; - ws.exports = (e, r = 1, t) => { - if (((t = { indent: ' ', includeEmptyLines: !1, ...t }), typeof e != 'string')) - throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``); - if (typeof r != 'number') throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof r}\``); - if (typeof t.indent != 'string') - throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof t.indent}\``); - if (r === 0) return e; - let n = t.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - return e.replace(n, t.indent.repeat(r)); - }; -}); -var Ts = ne((qh, vs) => { - 'use strict'; - vs.exports = ({ onlyFirst: e = !1 } = {}) => { - let r = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))', - ].join('|'); - return new RegExp(r, e ? void 0 : 'g'); - }; -}); -var Ni = ne((Vh, Ss) => { - 'use strict'; - var op = Ts(); - Ss.exports = (e) => (typeof e == 'string' ? e.replace(op(), '') : e); -}); -var Rs = ne((Gh, sp) => { - sp.exports = { - name: 'dotenv', - version: '16.5.0', - description: 'Loads environment variables from .env file', - main: 'lib/main.js', - types: 'lib/main.d.ts', - exports: { - '.': { types: './lib/main.d.ts', require: './lib/main.js', default: './lib/main.js' }, - './config': './config.js', - './config.js': './config.js', - './lib/env-options': './lib/env-options.js', - './lib/env-options.js': './lib/env-options.js', - './lib/cli-options': './lib/cli-options.js', - './lib/cli-options.js': './lib/cli-options.js', - './package.json': './package.json', - }, - scripts: { - 'dts-check': 'tsc --project tests/types/tsconfig.json', - lint: 'standard', - pretest: 'npm run lint && npm run dts-check', - test: 'tap run --allow-empty-coverage --disable-coverage --timeout=60000', - 'test:coverage': 'tap run --show-full-coverage --timeout=60000 --coverage-report=lcov', - prerelease: 'npm test', - release: 'standard-version', - }, - repository: { type: 'git', url: 'git://github.com/motdotla/dotenv.git' }, - homepage: 'https://github.com/motdotla/dotenv#readme', - funding: 'https://dotenvx.com', - keywords: ['dotenv', 'env', '.env', 'environment', 'variables', 'config', 'settings'], - readmeFilename: 'README.md', - license: 'BSD-2-Clause', - devDependencies: { - '@types/node': '^18.11.3', - decache: '^4.6.2', - sinon: '^14.0.1', - standard: '^17.0.0', - 'standard-version': '^9.5.0', - tap: '^19.2.0', - typescript: '^4.8.4', - }, - engines: { node: '>=12' }, - browser: { fs: !1 }, - }; -}); -var Os = ne((Qh, _e) => { - 'use strict'; - var Fi = require('node:fs'), - Mi = require('node:path'), - ap = require('node:os'), - lp = require('node:crypto'), - up = Rs(), - Cs = up.version, - cp = - /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm; - function pp(e) { - let r = {}, - t = e.toString(); - t = t.replace( - /\r\n?/gm, - ` -` - ); - let n; - for (; (n = cp.exec(t)) != null; ) { - let i = n[1], - o = n[2] || ''; - o = o.trim(); - let s = o[0]; - ((o = o.replace(/^(['"`])([\s\S]*)\1$/gm, '$2')), - s === '"' && - ((o = o.replace( - /\\n/g, - ` -` - )), - (o = o.replace(/\\r/g, '\r'))), - (r[i] = o)); - } - return r; - } - function dp(e) { - let r = Ds(e), - t = B.configDotenv({ path: r }); - if (!t.parsed) { - let s = new Error(`MISSING_DATA: Cannot parse ${r} for an unknown reason`); - throw ((s.code = 'MISSING_DATA'), s); - } - let n = Is(e).split(','), - i = n.length, - o; - for (let s = 0; s < i; s++) - try { - let a = n[s].trim(), - l = fp(t, a); - o = B.decrypt(l.ciphertext, l.key); - break; - } catch (a) { - if (s + 1 >= i) throw a; - } - return B.parse(o); - } - function mp(e) { - console.log(`[dotenv@${Cs}][WARN] ${e}`); - } - function it(e) { - console.log(`[dotenv@${Cs}][DEBUG] ${e}`); - } - function Is(e) { - return e && e.DOTENV_KEY && e.DOTENV_KEY.length > 0 - ? e.DOTENV_KEY - : process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0 - ? process.env.DOTENV_KEY - : ''; - } - function fp(e, r) { - let t; - try { - t = new URL(r); - } catch (a) { - if (a.code === 'ERR_INVALID_URL') { - let l = new Error( - 'INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development' - ); - throw ((l.code = 'INVALID_DOTENV_KEY'), l); - } - throw a; - } - let n = t.password; - if (!n) { - let a = new Error('INVALID_DOTENV_KEY: Missing key part'); - throw ((a.code = 'INVALID_DOTENV_KEY'), a); - } - let i = t.searchParams.get('environment'); - if (!i) { - let a = new Error('INVALID_DOTENV_KEY: Missing environment part'); - throw ((a.code = 'INVALID_DOTENV_KEY'), a); - } - let o = `DOTENV_VAULT_${i.toUpperCase()}`, - s = e.parsed[o]; - if (!s) { - let a = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${o} in your .env.vault file.`); - throw ((a.code = 'NOT_FOUND_DOTENV_ENVIRONMENT'), a); - } - return { ciphertext: s, key: n }; - } - function Ds(e) { - let r = null; - if (e && e.path && e.path.length > 0) - if (Array.isArray(e.path)) - for (let t of e.path) Fi.existsSync(t) && (r = t.endsWith('.vault') ? t : `${t}.vault`); - else r = e.path.endsWith('.vault') ? e.path : `${e.path}.vault`; - else r = Mi.resolve(process.cwd(), '.env.vault'); - return Fi.existsSync(r) ? r : null; - } - function As(e) { - return e[0] === '~' ? Mi.join(ap.homedir(), e.slice(1)) : e; - } - function gp(e) { - !!(e && e.debug) && it('Loading env from encrypted .env.vault'); - let t = B._parseVault(e), - n = process.env; - return (e && e.processEnv != null && (n = e.processEnv), B.populate(n, t, e), { parsed: t }); - } - function hp(e) { - let r = Mi.resolve(process.cwd(), '.env'), - t = 'utf8', - n = !!(e && e.debug); - e && e.encoding ? (t = e.encoding) : n && it('No encoding is specified. UTF-8 is used by default'); - let i = [r]; - if (e && e.path) - if (!Array.isArray(e.path)) i = [As(e.path)]; - else { - i = []; - for (let l of e.path) i.push(As(l)); - } - let o, - s = {}; - for (let l of i) - try { - let u = B.parse(Fi.readFileSync(l, { encoding: t })); - B.populate(s, u, e); - } catch (u) { - (n && it(`Failed to load ${l} ${u.message}`), (o = u)); - } - let a = process.env; - return ( - e && e.processEnv != null && (a = e.processEnv), - B.populate(a, s, e), - o ? { parsed: s, error: o } : { parsed: s } - ); - } - function yp(e) { - if (Is(e).length === 0) return B.configDotenv(e); - let r = Ds(e); - return r - ? B._configVault(e) - : (mp(`You set DOTENV_KEY but you are missing a .env.vault file at ${r}. Did you forget to build it?`), - B.configDotenv(e)); - } - function bp(e, r) { - let t = Buffer.from(r.slice(-64), 'hex'), - n = Buffer.from(e, 'base64'), - i = n.subarray(0, 12), - o = n.subarray(-16); - n = n.subarray(12, -16); - try { - let s = lp.createDecipheriv('aes-256-gcm', t, i); - return (s.setAuthTag(o), `${s.update(n)}${s.final()}`); - } catch (s) { - let a = s instanceof RangeError, - l = s.message === 'Invalid key length', - u = s.message === 'Unsupported state or unable to authenticate data'; - if (a || l) { - let c = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)'); - throw ((c.code = 'INVALID_DOTENV_KEY'), c); - } else if (u) { - let c = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY'); - throw ((c.code = 'DECRYPTION_FAILED'), c); - } else throw s; - } - } - function Ep(e, r, t = {}) { - let n = !!(t && t.debug), - i = !!(t && t.override); - if (typeof r != 'object') { - let o = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate'); - throw ((o.code = 'OBJECT_REQUIRED'), o); - } - for (let o of Object.keys(r)) - Object.prototype.hasOwnProperty.call(e, o) - ? (i === !0 && (e[o] = r[o]), - n && - it( - i === !0 - ? `"${o}" is already defined and WAS overwritten` - : `"${o}" is already defined and was NOT overwritten` - )) - : (e[o] = r[o]); - } - var B = { configDotenv: hp, _configVault: gp, _parseVault: dp, config: yp, decrypt: bp, parse: pp, populate: Ep }; - _e.exports.configDotenv = B.configDotenv; - _e.exports._configVault = B._configVault; - _e.exports._parseVault = B._parseVault; - _e.exports.config = B.config; - _e.exports.decrypt = B.decrypt; - _e.exports.parse = B.parse; - _e.exports.populate = B.populate; - _e.exports = B; -}); -var Ls = ne((zh, un) => { - 'use strict'; - un.exports = (e = {}) => { - let r; - if (e.repoUrl) r = e.repoUrl; - else if (e.user && e.repo) r = `https://github.com/${e.user}/${e.repo}`; - else throw new Error('You need to specify either the `repoUrl` option or both the `user` and `repo` options'); - let t = new URL(`${r}/issues/new`), - n = ['body', 'title', 'labels', 'template', 'milestone', 'assignee', 'projects']; - for (let i of n) { - let o = e[i]; - if (o !== void 0) { - if (i === 'labels' || i === 'projects') { - if (!Array.isArray(o)) throw new TypeError(`The \`${i}\` option should be an array`); - o = o.join(','); - } - t.searchParams.set(i, o); - } - } - return t.toString(); - }; - un.exports.default = un.exports; -}); -var Ki = ne((Sb, ia) => { - 'use strict'; - ia.exports = (function () { - function e(r, t, n, i, o) { - return r < t || n < t ? (r > n ? n + 1 : r + 1) : i === o ? t : t + 1; - } - return function (r, t) { - if (r === t) return 0; - if (r.length > t.length) { - var n = r; - ((r = t), (t = n)); - } - for (var i = r.length, o = t.length; i > 0 && r.charCodeAt(i - 1) === t.charCodeAt(o - 1); ) (i--, o--); - for (var s = 0; s < i && r.charCodeAt(s) === t.charCodeAt(s); ) s++; - if (((i -= s), (o -= s), i === 0 || o < 3)) return o; - var a = 0, - l, - u, - c, - p, - d, - f, - h, - g, - D, - T, - S, - b, - O = []; - for (l = 0; l < i; l++) (O.push(l + 1), O.push(r.charCodeAt(s + l))); - for (var me = O.length - 1; a < o - 3; ) - for ( - D = t.charCodeAt(s + (u = a)), - T = t.charCodeAt(s + (c = a + 1)), - S = t.charCodeAt(s + (p = a + 2)), - b = t.charCodeAt(s + (d = a + 3)), - f = a += 4, - l = 0; - l < me; - l += 2 - ) - ((h = O[l]), - (g = O[l + 1]), - (u = e(h, u, c, D, g)), - (c = e(u, c, p, T, g)), - (p = e(c, p, d, S, g)), - (f = e(p, d, f, b, g)), - (O[l] = f), - (d = p), - (p = c), - (c = u), - (u = h)); - for (; a < o; ) - for (D = t.charCodeAt(s + (u = a)), f = ++a, l = 0; l < me; l += 2) - ((h = O[l]), (O[l] = f = e(h, u, f, D, O[l + 1])), (u = h)); - return f; - }; - })(); -}); -var ua = Oo(() => { - 'use strict'; -}); -var ca = Oo(() => { - 'use strict'; -}); -var Qf = {}; -tr(Qf, { - DMMF: () => ut, - Debug: () => N, - Decimal: () => Fe, - Extensions: () => ni, - MetricsClient: () => Nr, - PrismaClientInitializationError: () => v, - PrismaClientKnownRequestError: () => z, - PrismaClientRustPanicError: () => le, - PrismaClientUnknownRequestError: () => V, - PrismaClientValidationError: () => Z, - Public: () => ii, - Sql: () => oe, - createParam: () => Ra, - defineDmmfProperty: () => ka, - deserializeJsonResponse: () => qr, - deserializeRawResult: () => Xn, - dmmfToRuntimeDataModel: () => $s, - empty: () => La, - getPrismaClient: () => bu, - getRuntime: () => Gn, - join: () => Na, - makeStrictEnum: () => Eu, - makeTypedQueryFactory: () => _a, - objectEnumValues: () => Dn, - raw: () => no, - serializeJsonQuery: () => Mn, - skip: () => Fn, - sqltag: () => io, - warnEnvConflicts: () => wu, - warnOnce: () => st, -}); -module.exports = Ru(Qf); -var ni = {}; -tr(ni, { defineExtension: () => _o, getExtensionContext: () => No }); -function _o(e) { - return typeof e == 'function' ? e : (r) => r.$extends(e); -} -function No(e) { - return e; -} -var ii = {}; -tr(ii, { validator: () => Lo }); -function Lo(...e) { - return (r) => r; -} -var jt = {}; -tr(jt, { - $: () => Vo, - bgBlack: () => Fu, - bgBlue: () => Vu, - bgCyan: () => Bu, - bgGreen: () => $u, - bgMagenta: () => ju, - bgRed: () => Mu, - bgWhite: () => Uu, - bgYellow: () => qu, - black: () => ku, - blue: () => nr, - bold: () => W, - cyan: () => De, - dim: () => Ce, - gray: () => Kr, - green: () => qe, - grey: () => Lu, - hidden: () => Du, - inverse: () => Iu, - italic: () => Cu, - magenta: () => _u, - red: () => ce, - reset: () => Au, - strikethrough: () => Ou, - underline: () => Y, - white: () => Nu, - yellow: () => Ie, -}); -var oi, - Fo, - Mo, - $o, - qo = !0; -typeof process < 'u' && - (({ FORCE_COLOR: oi, NODE_DISABLE_COLORS: Fo, NO_COLOR: Mo, TERM: $o } = process.env || {}), - (qo = process.stdout && process.stdout.isTTY)); -var Vo = { enabled: !Fo && Mo == null && $o !== 'dumb' && ((oi != null && oi !== '0') || qo) }; -function F(e, r) { - let t = new RegExp(`\\x1b\\[${r}m`, 'g'), - n = `\x1B[${e}m`, - i = `\x1B[${r}m`; - return function (o) { - return !Vo.enabled || o == null ? o : n + (~('' + o).indexOf(i) ? o.replace(t, i + n) : o) + i; - }; -} -var Au = F(0, 0), - W = F(1, 22), - Ce = F(2, 22), - Cu = F(3, 23), - Y = F(4, 24), - Iu = F(7, 27), - Du = F(8, 28), - Ou = F(9, 29), - ku = F(30, 39), - ce = F(31, 39), - qe = F(32, 39), - Ie = F(33, 39), - nr = F(34, 39), - _u = F(35, 39), - De = F(36, 39), - Nu = F(37, 39), - Kr = F(90, 39), - Lu = F(90, 39), - Fu = F(40, 49), - Mu = F(41, 49), - $u = F(42, 49), - qu = F(43, 49), - Vu = F(44, 49), - ju = F(45, 49), - Bu = F(46, 49), - Uu = F(47, 49); -var Gu = 100, - jo = ['green', 'yellow', 'blue', 'magenta', 'cyan', 'red'], - Hr = [], - Bo = Date.now(), - Qu = 0, - si = typeof process < 'u' ? process.env : {}; -globalThis.DEBUG ??= si.DEBUG ?? ''; -globalThis.DEBUG_COLORS ??= si.DEBUG_COLORS ? si.DEBUG_COLORS === 'true' : !0; -var Yr = { - enable(e) { - typeof e == 'string' && (globalThis.DEBUG = e); - }, - disable() { - let e = globalThis.DEBUG; - return ((globalThis.DEBUG = ''), e); - }, - enabled(e) { - let r = globalThis.DEBUG.split(',').map((i) => i.replace(/[.+?^${}()|[\]\\]/g, '\\$&')), - t = r.some((i) => (i === '' || i[0] === '-' ? !1 : e.match(RegExp(i.split('*').join('.*') + '$')))), - n = r.some((i) => (i === '' || i[0] !== '-' ? !1 : e.match(RegExp(i.slice(1).split('*').join('.*') + '$')))); - return t && !n; - }, - log: (...e) => { - let [r, t, ...n] = e; - (console.warn ?? console.log)(`${r} ${t}`, ...n); - }, - formatters: {}, -}; -function Wu(e) { - let r = { color: jo[Qu++ % jo.length], enabled: Yr.enabled(e), namespace: e, log: Yr.log, extend: () => {} }, - t = (...n) => { - let { enabled: i, namespace: o, color: s, log: a } = r; - if ((n.length !== 0 && Hr.push([o, ...n]), Hr.length > Gu && Hr.shift(), Yr.enabled(o) || i)) { - let l = n.map((c) => (typeof c == 'string' ? c : Ju(c))), - u = `+${Date.now() - Bo}ms`; - ((Bo = Date.now()), globalThis.DEBUG_COLORS ? a(jt[s](W(o)), ...l, jt[s](u)) : a(o, ...l, u)); - } - }; - return new Proxy(t, { get: (n, i) => r[i], set: (n, i, o) => (r[i] = o) }); -} -var N = new Proxy(Wu, { get: (e, r) => Yr[r], set: (e, r, t) => (Yr[r] = t) }); -function Ju(e, r = 2) { - let t = new Set(); - return JSON.stringify( - e, - (n, i) => { - if (typeof i == 'object' && i !== null) { - if (t.has(i)) return '[Circular *]'; - t.add(i); - } else if (typeof i == 'bigint') return i.toString(); - return i; - }, - r - ); -} -function Uo(e = 7500) { - let r = Hr.map(([t, ...n]) => `${t} ${n.map((i) => (typeof i == 'string' ? i : JSON.stringify(i))).join(' ')}`).join(` -`); - return r.length < e ? r : r.slice(-e); -} -function Go() { - Hr.length = 0; -} -var gr = N; -var Qo = A(require('node:fs')); -function ai() { - let e = process.env.PRISMA_QUERY_ENGINE_LIBRARY; - if (!(e && Qo.default.existsSync(e)) && process.arch === 'ia32') - throw new Error( - 'The default query engine type (Node-API, "library") is currently not supported for 32bit Node. Please set `engineType = "binary"` in the "generator" block of your "schema.prisma" file (or use the environment variables "PRISMA_CLIENT_ENGINE_TYPE=binary" and/or "PRISMA_CLI_QUERY_ENGINE_TYPE=binary".)' - ); -} -var li = [ - 'darwin', - 'darwin-arm64', - 'debian-openssl-1.0.x', - 'debian-openssl-1.1.x', - 'debian-openssl-3.0.x', - 'rhel-openssl-1.0.x', - 'rhel-openssl-1.1.x', - 'rhel-openssl-3.0.x', - 'linux-arm64-openssl-1.1.x', - 'linux-arm64-openssl-1.0.x', - 'linux-arm64-openssl-3.0.x', - 'linux-arm-openssl-1.1.x', - 'linux-arm-openssl-1.0.x', - 'linux-arm-openssl-3.0.x', - 'linux-musl', - 'linux-musl-openssl-3.0.x', - 'linux-musl-arm64-openssl-1.1.x', - 'linux-musl-arm64-openssl-3.0.x', - 'linux-nixos', - 'linux-static-x64', - 'linux-static-arm64', - 'windows', - 'freebsd11', - 'freebsd12', - 'freebsd13', - 'freebsd14', - 'freebsd15', - 'openbsd', - 'netbsd', - 'arm', -]; -var Bt = 'libquery_engine'; -function Ut(e, r) { - let t = r === 'url'; - return e.includes('windows') - ? t - ? 'query_engine.dll.node' - : `query_engine-${e}.dll.node` - : e.includes('darwin') - ? t - ? `${Bt}.dylib.node` - : `${Bt}-${e}.dylib.node` - : t - ? `${Bt}.so.node` - : `${Bt}-${e}.so.node`; -} -var Ho = A(require('node:child_process')), - mi = A(require('node:fs/promises')), - Kt = A(require('node:os')); -var Oe = Symbol.for('@ts-pattern/matcher'), - Ku = Symbol.for('@ts-pattern/isVariadic'), - Qt = '@ts-pattern/anonymous-select-key', - ui = (e) => !!(e && typeof e == 'object'), - Gt = (e) => e && !!e[Oe], - Ee = (e, r, t) => { - if (Gt(e)) { - let n = e[Oe](), - { matched: i, selections: o } = n.match(r); - return (i && o && Object.keys(o).forEach((s) => t(s, o[s])), i); - } - if (ui(e)) { - if (!ui(r)) return !1; - if (Array.isArray(e)) { - if (!Array.isArray(r)) return !1; - let n = [], - i = [], - o = []; - for (let s of e.keys()) { - let a = e[s]; - Gt(a) && a[Ku] ? o.push(a) : o.length ? i.push(a) : n.push(a); - } - if (o.length) { - if (o.length > 1) - throw new Error('Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.'); - if (r.length < n.length + i.length) return !1; - let s = r.slice(0, n.length), - a = i.length === 0 ? [] : r.slice(-i.length), - l = r.slice(n.length, i.length === 0 ? 1 / 0 : -i.length); - return ( - n.every((u, c) => Ee(u, s[c], t)) && i.every((u, c) => Ee(u, a[c], t)) && (o.length === 0 || Ee(o[0], l, t)) - ); - } - return e.length === r.length && e.every((s, a) => Ee(s, r[a], t)); - } - return Reflect.ownKeys(e).every((n) => { - let i = e[n]; - return (n in r || (Gt((o = i)) && o[Oe]().matcherType === 'optional')) && Ee(i, r[n], t); - var o; - }); - } - return Object.is(r, e); - }, - Ge = (e) => { - var r, t, n; - return ui(e) - ? Gt(e) - ? (r = (t = (n = e[Oe]()).getSelectionKeys) == null ? void 0 : t.call(n)) != null - ? r - : [] - : Array.isArray(e) - ? zr(e, Ge) - : zr(Object.values(e), Ge) - : []; - }, - zr = (e, r) => e.reduce((t, n) => t.concat(r(n)), []); -function pe(e) { - return Object.assign(e, { - optional: () => Hu(e), - and: (r) => q(e, r), - or: (r) => Yu(e, r), - select: (r) => (r === void 0 ? Wo(e) : Wo(r, e)), - }); -} -function Hu(e) { - return pe({ - [Oe]: () => ({ - match: (r) => { - let t = {}, - n = (i, o) => { - t[i] = o; - }; - return r === void 0 - ? (Ge(e).forEach((i) => n(i, void 0)), { matched: !0, selections: t }) - : { matched: Ee(e, r, n), selections: t }; - }, - getSelectionKeys: () => Ge(e), - matcherType: 'optional', - }), - }); -} -function q(...e) { - return pe({ - [Oe]: () => ({ - match: (r) => { - let t = {}, - n = (i, o) => { - t[i] = o; - }; - return { matched: e.every((i) => Ee(i, r, n)), selections: t }; - }, - getSelectionKeys: () => zr(e, Ge), - matcherType: 'and', - }), - }); -} -function Yu(...e) { - return pe({ - [Oe]: () => ({ - match: (r) => { - let t = {}, - n = (i, o) => { - t[i] = o; - }; - return (zr(e, Ge).forEach((i) => n(i, void 0)), { matched: e.some((i) => Ee(i, r, n)), selections: t }); - }, - getSelectionKeys: () => zr(e, Ge), - matcherType: 'or', - }), - }); -} -function C(e) { - return { [Oe]: () => ({ match: (r) => ({ matched: !!e(r) }) }) }; -} -function Wo(...e) { - let r = typeof e[0] == 'string' ? e[0] : void 0, - t = e.length === 2 ? e[1] : typeof e[0] == 'string' ? void 0 : e[0]; - return pe({ - [Oe]: () => ({ - match: (n) => { - let i = { [r ?? Qt]: n }; - return { - matched: - t === void 0 || - Ee(t, n, (o, s) => { - i[o] = s; - }), - selections: i, - }; - }, - getSelectionKeys: () => [r ?? Qt].concat(t === void 0 ? [] : Ge(t)), - }), - }); -} -function ye(e) { - return typeof e == 'number'; -} -function Ve(e) { - return typeof e == 'string'; -} -function je(e) { - return typeof e == 'bigint'; -} -var ig = pe( - C(function (e) { - return !0; - }) -); -var Be = (e) => - Object.assign(pe(e), { - startsWith: (r) => { - return Be(q(e, ((t = r), C((n) => Ve(n) && n.startsWith(t))))); - var t; - }, - endsWith: (r) => { - return Be(q(e, ((t = r), C((n) => Ve(n) && n.endsWith(t))))); - var t; - }, - minLength: (r) => Be(q(e, ((t) => C((n) => Ve(n) && n.length >= t))(r))), - length: (r) => Be(q(e, ((t) => C((n) => Ve(n) && n.length === t))(r))), - maxLength: (r) => Be(q(e, ((t) => C((n) => Ve(n) && n.length <= t))(r))), - includes: (r) => { - return Be(q(e, ((t = r), C((n) => Ve(n) && n.includes(t))))); - var t; - }, - regex: (r) => { - return Be(q(e, ((t = r), C((n) => Ve(n) && !!n.match(t))))); - var t; - }, - }), - og = Be(C(Ve)), - be = (e) => - Object.assign(pe(e), { - between: (r, t) => be(q(e, ((n, i) => C((o) => ye(o) && n <= o && i >= o))(r, t))), - lt: (r) => be(q(e, ((t) => C((n) => ye(n) && n < t))(r))), - gt: (r) => be(q(e, ((t) => C((n) => ye(n) && n > t))(r))), - lte: (r) => be(q(e, ((t) => C((n) => ye(n) && n <= t))(r))), - gte: (r) => be(q(e, ((t) => C((n) => ye(n) && n >= t))(r))), - int: () => - be( - q( - e, - C((r) => ye(r) && Number.isInteger(r)) - ) - ), - finite: () => - be( - q( - e, - C((r) => ye(r) && Number.isFinite(r)) - ) - ), - positive: () => - be( - q( - e, - C((r) => ye(r) && r > 0) - ) - ), - negative: () => - be( - q( - e, - C((r) => ye(r) && r < 0) - ) - ), - }), - sg = be(C(ye)), - Ue = (e) => - Object.assign(pe(e), { - between: (r, t) => Ue(q(e, ((n, i) => C((o) => je(o) && n <= o && i >= o))(r, t))), - lt: (r) => Ue(q(e, ((t) => C((n) => je(n) && n < t))(r))), - gt: (r) => Ue(q(e, ((t) => C((n) => je(n) && n > t))(r))), - lte: (r) => Ue(q(e, ((t) => C((n) => je(n) && n <= t))(r))), - gte: (r) => Ue(q(e, ((t) => C((n) => je(n) && n >= t))(r))), - positive: () => - Ue( - q( - e, - C((r) => je(r) && r > 0) - ) - ), - negative: () => - Ue( - q( - e, - C((r) => je(r) && r < 0) - ) - ), - }), - ag = Ue(C(je)), - lg = pe( - C(function (e) { - return typeof e == 'boolean'; - }) - ), - ug = pe( - C(function (e) { - return typeof e == 'symbol'; - }) - ), - cg = pe( - C(function (e) { - return e == null; - }) - ), - pg = pe( - C(function (e) { - return e != null; - }) - ); -var ci = class extends Error { - constructor(r) { - let t; - try { - t = JSON.stringify(r); - } catch { - t = r; - } - (super(`Pattern matching error: no pattern matches value ${t}`), (this.input = void 0), (this.input = r)); - } - }, - pi = { matched: !1, value: void 0 }; -function hr(e) { - return new di(e, pi); -} -var di = class e { - constructor(r, t) { - ((this.input = void 0), (this.state = void 0), (this.input = r), (this.state = t)); - } - with(...r) { - if (this.state.matched) return this; - let t = r[r.length - 1], - n = [r[0]], - i; - r.length === 3 && typeof r[1] == 'function' ? (i = r[1]) : r.length > 2 && n.push(...r.slice(1, r.length - 1)); - let o = !1, - s = {}, - a = (u, c) => { - ((o = !0), (s[u] = c)); - }, - l = - !n.some((u) => Ee(u, this.input, a)) || (i && !i(this.input)) - ? pi - : { matched: !0, value: t(o ? (Qt in s ? s[Qt] : s) : this.input, this.input) }; - return new e(this.input, l); - } - when(r, t) { - if (this.state.matched) return this; - let n = !!r(this.input); - return new e(this.input, n ? { matched: !0, value: t(this.input, this.input) } : pi); - } - otherwise(r) { - return this.state.matched ? this.state.value : r(this.input); - } - exhaustive() { - if (this.state.matched) return this.state.value; - throw new ci(this.input); - } - run() { - return this.exhaustive(); - } - returnType() { - return this; - } -}; -var Yo = require('node:util'); -var zu = { warn: Ie('prisma:warn') }, - Zu = { warn: () => !process.env.PRISMA_DISABLE_WARNINGS }; -function Wt(e, ...r) { - Zu.warn() && console.warn(`${zu.warn} ${e}`, ...r); -} -var Xu = (0, Yo.promisify)(Ho.default.exec), - ee = gr('prisma:get-platform'), - ec = ['1.0.x', '1.1.x', '3.0.x']; -async function zo() { - let e = Kt.default.platform(), - r = process.arch; - if (e === 'freebsd') { - let s = await Ht('freebsd-version'); - if (s && s.trim().length > 0) { - let l = /^(\d+)\.?/.exec(s); - if (l) return { platform: 'freebsd', targetDistro: `freebsd${l[1]}`, arch: r }; - } - } - if (e !== 'linux') return { platform: e, arch: r }; - let t = await tc(), - n = await cc(), - i = ic({ arch: r, archFromUname: n, familyDistro: t.familyDistro }), - { libssl: o } = await oc(i); - return { platform: 'linux', libssl: o, arch: r, archFromUname: n, ...t }; -} -function rc(e) { - let r = /^ID="?([^"\n]*)"?$/im, - t = /^ID_LIKE="?([^"\n]*)"?$/im, - n = r.exec(e), - i = (n && n[1] && n[1].toLowerCase()) || '', - o = t.exec(e), - s = (o && o[1] && o[1].toLowerCase()) || '', - a = hr({ id: i, idLike: s }) - .with({ id: 'alpine' }, ({ id: l }) => ({ targetDistro: 'musl', familyDistro: l, originalDistro: l })) - .with({ id: 'raspbian' }, ({ id: l }) => ({ targetDistro: 'arm', familyDistro: 'debian', originalDistro: l })) - .with({ id: 'nixos' }, ({ id: l }) => ({ targetDistro: 'nixos', originalDistro: l, familyDistro: 'nixos' })) - .with({ id: 'debian' }, { id: 'ubuntu' }, ({ id: l }) => ({ - targetDistro: 'debian', - familyDistro: 'debian', - originalDistro: l, - })) - .with({ id: 'rhel' }, { id: 'centos' }, { id: 'fedora' }, ({ id: l }) => ({ - targetDistro: 'rhel', - familyDistro: 'rhel', - originalDistro: l, - })) - .when( - ({ idLike: l }) => l.includes('debian') || l.includes('ubuntu'), - ({ id: l }) => ({ targetDistro: 'debian', familyDistro: 'debian', originalDistro: l }) - ) - .when( - ({ idLike: l }) => i === 'arch' || l.includes('arch'), - ({ id: l }) => ({ targetDistro: 'debian', familyDistro: 'arch', originalDistro: l }) - ) - .when( - ({ idLike: l }) => l.includes('centos') || l.includes('fedora') || l.includes('rhel') || l.includes('suse'), - ({ id: l }) => ({ targetDistro: 'rhel', familyDistro: 'rhel', originalDistro: l }) - ) - .otherwise(({ id: l }) => ({ targetDistro: void 0, familyDistro: void 0, originalDistro: l })); - return ( - ee(`Found distro info: -${JSON.stringify(a, null, 2)}`), - a - ); -} -async function tc() { - let e = '/etc/os-release'; - try { - let r = await mi.default.readFile(e, { encoding: 'utf-8' }); - return rc(r); - } catch { - return { targetDistro: void 0, familyDistro: void 0, originalDistro: void 0 }; - } -} -function nc(e) { - let r = /^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e); - if (r) { - let t = `${r[1]}.x`; - return Zo(t); - } -} -function Jo(e) { - let r = /libssl\.so\.(\d)(\.\d)?/.exec(e); - if (r) { - let t = `${r[1]}${r[2] ?? '.0'}.x`; - return Zo(t); - } -} -function Zo(e) { - let r = (() => { - if (es(e)) return e; - let t = e.split('.'); - return ((t[1] = '0'), t.join('.')); - })(); - if (ec.includes(r)) return r; -} -function ic(e) { - return hr(e) - .with({ familyDistro: 'musl' }, () => (ee('Trying platform-specific paths for "alpine"'), ['/lib', '/usr/lib'])) - .with( - { familyDistro: 'debian' }, - ({ archFromUname: r }) => ( - ee('Trying platform-specific paths for "debian" (and "ubuntu")'), - [`/usr/lib/${r}-linux-gnu`, `/lib/${r}-linux-gnu`] - ) - ) - .with({ familyDistro: 'rhel' }, () => (ee('Trying platform-specific paths for "rhel"'), ['/lib64', '/usr/lib64'])) - .otherwise( - ({ familyDistro: r, arch: t, archFromUname: n }) => ( - ee(`Don't know any platform-specific paths for "${r}" on ${t} (${n})`), - [] - ) - ); -} -async function oc(e) { - let r = 'grep -v "libssl.so.0"', - t = await Ko(e); - if (t) { - ee(`Found libssl.so file using platform-specific paths: ${t}`); - let o = Jo(t); - if ((ee(`The parsed libssl version is: ${o}`), o)) return { libssl: o, strategy: 'libssl-specific-path' }; - } - ee('Falling back to "ldconfig" and other generic paths'); - let n = await Ht(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${r}`); - if ((n || (n = await Ko(['/lib64', '/usr/lib64', '/lib', '/usr/lib'])), n)) { - ee(`Found libssl.so file using "ldconfig" or other generic paths: ${n}`); - let o = Jo(n); - if ((ee(`The parsed libssl version is: ${o}`), o)) return { libssl: o, strategy: 'ldconfig' }; - } - let i = await Ht('openssl version -v'); - if (i) { - ee(`Found openssl binary with version: ${i}`); - let o = nc(i); - if ((ee(`The parsed openssl version is: ${o}`), o)) return { libssl: o, strategy: 'openssl-binary' }; - } - return (ee("Couldn't find any version of libssl or OpenSSL in the system"), {}); -} -async function Ko(e) { - for (let r of e) { - let t = await sc(r); - if (t) return t; - } -} -async function sc(e) { - try { - return (await mi.default.readdir(e)).find((t) => t.startsWith('libssl.so.') && !t.startsWith('libssl.so.0')); - } catch (r) { - if (r.code === 'ENOENT') return; - throw r; - } -} -async function ir() { - let { binaryTarget: e } = await Xo(); - return e; -} -function ac(e) { - return e.binaryTarget !== void 0; -} -async function fi() { - let { memoized: e, ...r } = await Xo(); - return r; -} -var Jt = {}; -async function Xo() { - if (ac(Jt)) return Promise.resolve({ ...Jt, memoized: !0 }); - let e = await zo(), - r = lc(e); - return ((Jt = { ...e, binaryTarget: r }), { ...Jt, memoized: !1 }); -} -function lc(e) { - let { platform: r, arch: t, archFromUname: n, libssl: i, targetDistro: o, familyDistro: s, originalDistro: a } = e; - r === 'linux' && - !['x64', 'arm64'].includes(t) && - Wt( - `Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures (detected "${t}" instead). If you are using your own custom Prisma engines, you can ignore this warning, as long as you've compiled the engines for your system architecture "${n}".` - ); - let l = '1.1.x'; - if (r === 'linux' && i === void 0) { - let c = hr({ familyDistro: s }) - .with( - { familyDistro: 'debian' }, - () => - "Please manually install OpenSSL via `apt-get update -y && apt-get install -y openssl` and try installing Prisma again. If you're running Prisma on Docker, add this command to your Dockerfile, or switch to an image that already has OpenSSL installed." - ) - .otherwise(() => 'Please manually install OpenSSL and try installing Prisma again.'); - Wt(`Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-${l}". -${c}`); - } - let u = 'debian'; - if ( - (r === 'linux' && o === void 0 && ee(`Distro is "${a}". Falling back to Prisma engines built for "${u}".`), - r === 'darwin' && t === 'arm64') - ) - return 'darwin-arm64'; - if (r === 'darwin') return 'darwin'; - if (r === 'win32') return 'windows'; - if (r === 'freebsd') return o; - if (r === 'openbsd') return 'openbsd'; - if (r === 'netbsd') return 'netbsd'; - if (r === 'linux' && o === 'nixos') return 'linux-nixos'; - if (r === 'linux' && t === 'arm64') return `${o === 'musl' ? 'linux-musl-arm64' : 'linux-arm64'}-openssl-${i || l}`; - if (r === 'linux' && t === 'arm') return `linux-arm-openssl-${i || l}`; - if (r === 'linux' && o === 'musl') { - let c = 'linux-musl'; - return !i || es(i) ? c : `${c}-openssl-${i}`; - } - return r === 'linux' && o && i - ? `${o}-openssl-${i}` - : (r !== 'linux' && Wt(`Prisma detected unknown OS "${r}" and may not work as expected. Defaulting to "linux".`), - i ? `${u}-openssl-${i}` : o ? `${o}-openssl-${l}` : `${u}-openssl-${l}`); -} -async function uc(e) { - try { - return await e(); - } catch { - return; - } -} -function Ht(e) { - return uc(async () => { - let r = await Xu(e); - return (ee(`Command "${e}" successfully returned "${r.stdout}"`), r.stdout); - }); -} -async function cc() { - return typeof Kt.default.machine == 'function' ? Kt.default.machine() : (await Ht('uname -m'))?.trim(); -} -function es(e) { - return e.startsWith('1.'); -} -var Zt = {}; -tr(Zt, { - beep: () => Fc, - clearScreen: () => kc, - clearTerminal: () => _c, - cursorBackward: () => yc, - cursorDown: () => gc, - cursorForward: () => hc, - cursorGetPosition: () => wc, - cursorHide: () => vc, - cursorLeft: () => ns, - cursorMove: () => fc, - cursorNextLine: () => xc, - cursorPrevLine: () => Pc, - cursorRestorePosition: () => Ec, - cursorSavePosition: () => bc, - cursorShow: () => Tc, - cursorTo: () => mc, - cursorUp: () => ts, - enterAlternativeScreen: () => Nc, - eraseDown: () => Cc, - eraseEndLine: () => Rc, - eraseLine: () => is, - eraseLines: () => Sc, - eraseScreen: () => gi, - eraseStartLine: () => Ac, - eraseUp: () => Ic, - exitAlternativeScreen: () => Lc, - iTerm: () => qc, - image: () => $c, - link: () => Mc, - scrollDown: () => Oc, - scrollUp: () => Dc, -}); -var zt = A(require('node:process'), 1); -var Yt = globalThis.window?.document !== void 0, - Eg = globalThis.process?.versions?.node !== void 0, - wg = globalThis.process?.versions?.bun !== void 0, - xg = globalThis.Deno?.version?.deno !== void 0, - Pg = globalThis.process?.versions?.electron !== void 0, - vg = globalThis.navigator?.userAgent?.includes('jsdom') === !0, - Tg = typeof WorkerGlobalScope < 'u' && globalThis instanceof WorkerGlobalScope, - Sg = typeof DedicatedWorkerGlobalScope < 'u' && globalThis instanceof DedicatedWorkerGlobalScope, - Rg = typeof SharedWorkerGlobalScope < 'u' && globalThis instanceof SharedWorkerGlobalScope, - Ag = typeof ServiceWorkerGlobalScope < 'u' && globalThis instanceof ServiceWorkerGlobalScope, - Zr = globalThis.navigator?.userAgentData?.platform, - Cg = - Zr === 'macOS' || - globalThis.navigator?.platform === 'MacIntel' || - globalThis.navigator?.userAgent?.includes(' Mac ') === !0 || - globalThis.process?.platform === 'darwin', - Ig = Zr === 'Windows' || globalThis.navigator?.platform === 'Win32' || globalThis.process?.platform === 'win32', - Dg = - Zr === 'Linux' || - globalThis.navigator?.platform?.startsWith('Linux') === !0 || - globalThis.navigator?.userAgent?.includes(' Linux ') === !0 || - globalThis.process?.platform === 'linux', - Og = - Zr === 'iOS' || - (globalThis.navigator?.platform === 'MacIntel' && globalThis.navigator?.maxTouchPoints > 1) || - /iPad|iPhone|iPod/.test(globalThis.navigator?.platform), - kg = - Zr === 'Android' || - globalThis.navigator?.platform === 'Android' || - globalThis.navigator?.userAgent?.includes(' Android ') === !0 || - globalThis.process?.platform === 'android'; -var I = '\x1B[', - et = '\x1B]', - yr = '\x07', - Xr = ';', - rs = !Yt && zt.default.env.TERM_PROGRAM === 'Apple_Terminal', - pc = !Yt && zt.default.platform === 'win32', - dc = Yt - ? () => { - throw new Error('`process.cwd()` only works in Node.js, not the browser.'); - } - : zt.default.cwd, - mc = (e, r) => { - if (typeof e != 'number') throw new TypeError('The `x` argument is required'); - return typeof r != 'number' ? I + (e + 1) + 'G' : I + (r + 1) + Xr + (e + 1) + 'H'; - }, - fc = (e, r) => { - if (typeof e != 'number') throw new TypeError('The `x` argument is required'); - let t = ''; - return ( - e < 0 ? (t += I + -e + 'D') : e > 0 && (t += I + e + 'C'), - r < 0 ? (t += I + -r + 'A') : r > 0 && (t += I + r + 'B'), - t - ); - }, - ts = (e = 1) => I + e + 'A', - gc = (e = 1) => I + e + 'B', - hc = (e = 1) => I + e + 'C', - yc = (e = 1) => I + e + 'D', - ns = I + 'G', - bc = rs ? '\x1B7' : I + 's', - Ec = rs ? '\x1B8' : I + 'u', - wc = I + '6n', - xc = I + 'E', - Pc = I + 'F', - vc = I + '?25l', - Tc = I + '?25h', - Sc = (e) => { - let r = ''; - for (let t = 0; t < e; t++) r += is + (t < e - 1 ? ts() : ''); - return (e && (r += ns), r); - }, - Rc = I + 'K', - Ac = I + '1K', - is = I + '2K', - Cc = I + 'J', - Ic = I + '1J', - gi = I + '2J', - Dc = I + 'S', - Oc = I + 'T', - kc = '\x1Bc', - _c = pc ? `${gi}${I}0f` : `${gi}${I}3J${I}H`, - Nc = I + '?1049h', - Lc = I + '?1049l', - Fc = yr, - Mc = (e, r) => [et, '8', Xr, Xr, r, yr, e, et, '8', Xr, Xr, yr].join(''), - $c = (e, r = {}) => { - let t = `${et}1337;File=inline=1`; - return ( - r.width && (t += `;width=${r.width}`), - r.height && (t += `;height=${r.height}`), - r.preserveAspectRatio === !1 && (t += ';preserveAspectRatio=0'), - t + ':' + Buffer.from(e).toString('base64') + yr - ); - }, - qc = { - setCwd: (e = dc()) => `${et}50;CurrentDir=${e}${yr}`, - annotation(e, r = {}) { - let t = `${et}1337;`, - n = r.x !== void 0, - i = r.y !== void 0; - if ((n || i) && !(n && i && r.length !== void 0)) - throw new Error('`x`, `y` and `length` must be defined when `x` or `y` is defined'); - return ( - (e = e.replaceAll('|', '')), - (t += r.isHidden ? 'AddHiddenAnnotation=' : 'AddAnnotation='), - r.length > 0 ? (t += (n ? [e, r.length, r.x, r.y] : [r.length, e]).join('|')) : (t += e), - t + yr - ); - }, - }; -var Xt = A(ps(), 1); -function or(e, r, { target: t = 'stdout', ...n } = {}) { - return Xt.default[t] - ? Zt.link(e, r) - : n.fallback === !1 - ? e - : typeof n.fallback == 'function' - ? n.fallback(e, r) - : `${e} (\u200B${r}\u200B)`; -} -or.isSupported = Xt.default.stdout; -or.stderr = (e, r, t = {}) => or(e, r, { target: 'stderr', ...t }); -or.stderr.isSupported = Xt.default.stderr; -function wi(e) { - return or(e, e, { fallback: Y }); -} -var Gc = ds(), - xi = Gc.version; -function Er(e) { - let r = Qc(); - return ( - r || - (e?.config.engineType === 'library' - ? 'library' - : e?.config.engineType === 'binary' - ? 'binary' - : e?.config.engineType === 'client' - ? 'client' - : Wc(e)) - ); -} -function Qc() { - let e = process.env.PRISMA_CLIENT_ENGINE_TYPE; - return e === 'library' ? 'library' : e === 'binary' ? 'binary' : e === 'client' ? 'client' : void 0; -} -function Wc(e) { - return e?.previewFeatures.includes('queryCompiler') ? 'client' : 'library'; -} -function Pi(e) { - return e.name === 'DriverAdapterError' && typeof e.cause == 'object'; -} -function en(e) { - return { - ok: !0, - value: e, - map(r) { - return en(r(e)); - }, - flatMap(r) { - return r(e); - }, - }; -} -function sr(e) { - return { - ok: !1, - error: e, - map() { - return sr(e); - }, - flatMap() { - return sr(e); - }, - }; -} -var ms = N('driver-adapter-utils'), - vi = class { - registeredErrors = []; - consumeError(r) { - return this.registeredErrors[r]; - } - registerNewError(r) { - let t = 0; - for (; this.registeredErrors[t] !== void 0; ) t++; - return ((this.registeredErrors[t] = { error: r }), t); - } - }; -var rn = (e, r = new vi()) => { - let t = { - adapterName: e.adapterName, - errorRegistry: r, - queryRaw: ke(r, e.queryRaw.bind(e)), - executeRaw: ke(r, e.executeRaw.bind(e)), - executeScript: ke(r, e.executeScript.bind(e)), - dispose: ke(r, e.dispose.bind(e)), - provider: e.provider, - startTransaction: async (...n) => (await ke(r, e.startTransaction.bind(e))(...n)).map((o) => Jc(r, o)), - }; - return (e.getConnectionInfo && (t.getConnectionInfo = Kc(r, e.getConnectionInfo.bind(e))), t); - }, - Jc = (e, r) => ({ - adapterName: r.adapterName, - provider: r.provider, - options: r.options, - queryRaw: ke(e, r.queryRaw.bind(r)), - executeRaw: ke(e, r.executeRaw.bind(r)), - commit: ke(e, r.commit.bind(r)), - rollback: ke(e, r.rollback.bind(r)), - }); -function ke(e, r) { - return async (...t) => { - try { - return en(await r(...t)); - } catch (n) { - if ((ms('[error@wrapAsync]', n), Pi(n))) return sr(n.cause); - let i = e.registerNewError(n); - return sr({ kind: 'GenericJs', id: i }); - } - }; -} -function Kc(e, r) { - return (...t) => { - try { - return en(r(...t)); - } catch (n) { - if ((ms('[error@wrapSync]', n), Pi(n))) return sr(n.cause); - let i = e.registerNewError(n); - return sr({ kind: 'GenericJs', id: i }); - } - }; -} -var Yc = A(nn()); -var M = A(require('node:path')), - zc = A(nn()), - Th = N('prisma:engines'); -function fs() { - return M.default.join(__dirname, '../'); -} -var Sh = 'libquery-engine'; -M.default.join(__dirname, '../query-engine-darwin'); -M.default.join(__dirname, '../query-engine-darwin-arm64'); -M.default.join(__dirname, '../query-engine-debian-openssl-1.0.x'); -M.default.join(__dirname, '../query-engine-debian-openssl-1.1.x'); -M.default.join(__dirname, '../query-engine-debian-openssl-3.0.x'); -M.default.join(__dirname, '../query-engine-linux-static-x64'); -M.default.join(__dirname, '../query-engine-linux-static-arm64'); -M.default.join(__dirname, '../query-engine-rhel-openssl-1.0.x'); -M.default.join(__dirname, '../query-engine-rhel-openssl-1.1.x'); -M.default.join(__dirname, '../query-engine-rhel-openssl-3.0.x'); -M.default.join(__dirname, '../libquery_engine-darwin.dylib.node'); -M.default.join(__dirname, '../libquery_engine-darwin-arm64.dylib.node'); -M.default.join(__dirname, '../libquery_engine-debian-openssl-1.0.x.so.node'); -M.default.join(__dirname, '../libquery_engine-debian-openssl-1.1.x.so.node'); -M.default.join(__dirname, '../libquery_engine-debian-openssl-3.0.x.so.node'); -M.default.join(__dirname, '../libquery_engine-linux-arm64-openssl-1.0.x.so.node'); -M.default.join(__dirname, '../libquery_engine-linux-arm64-openssl-1.1.x.so.node'); -M.default.join(__dirname, '../libquery_engine-linux-arm64-openssl-3.0.x.so.node'); -M.default.join(__dirname, '../libquery_engine-linux-musl.so.node'); -M.default.join(__dirname, '../libquery_engine-linux-musl-openssl-3.0.x.so.node'); -M.default.join(__dirname, '../libquery_engine-rhel-openssl-1.0.x.so.node'); -M.default.join(__dirname, '../libquery_engine-rhel-openssl-1.1.x.so.node'); -M.default.join(__dirname, '../libquery_engine-rhel-openssl-3.0.x.so.node'); -M.default.join(__dirname, '../query_engine-windows.dll.node'); -var Si = A(require('node:fs')), - gs = gr('chmodPlusX'); -function Ri(e) { - if (process.platform === 'win32') return; - let r = Si.default.statSync(e), - t = r.mode | 64 | 8 | 1; - if (r.mode === t) { - gs(`Execution permissions of ${e} are fine`); - return; - } - let n = t.toString(8).slice(-3); - (gs(`Have to call chmodPlusX on ${e}`), Si.default.chmodSync(e, n)); -} -function Ai(e) { - let r = e.e, - t = (a) => `Prisma cannot find the required \`${a}\` system library in your system`, - n = r.message.includes('cannot open shared object file'), - i = `Please refer to the documentation about Prisma's system requirements: ${wi('https://pris.ly/d/system-requirements')}`, - o = `Unable to require(\`${Ce(e.id)}\`).`, - s = hr({ message: r.message, code: r.code }) - .with({ code: 'ENOENT' }, () => 'File does not exist.') - .when( - ({ message: a }) => n && a.includes('libz'), - () => `${t('libz')}. Please install it and try again.` - ) - .when( - ({ message: a }) => n && a.includes('libgcc_s'), - () => `${t('libgcc_s')}. Please install it and try again.` - ) - .when( - ({ message: a }) => n && a.includes('libssl'), - () => { - let a = e.platformInfo.libssl ? `openssl-${e.platformInfo.libssl}` : 'openssl'; - return `${t('libssl')}. Please install ${a} and try again.`; - } - ) - .when( - ({ message: a }) => a.includes('GLIBC'), - () => - `Prisma has detected an incompatible version of the \`glibc\` C standard library installed in your system. This probably means your system may be too old to run Prisma. ${i}` - ) - .when( - ({ message: a }) => e.platformInfo.platform === 'linux' && a.includes('symbol not found'), - () => - `The Prisma engines are not compatible with your system ${e.platformInfo.originalDistro} on (${e.platformInfo.archFromUname}) which uses the \`${e.platformInfo.binaryTarget}\` binaryTarget by default. ${i}` - ) - .otherwise(() => `The Prisma engines do not seem to be compatible with your system. ${i}`); - return `${o} -${s} - -Details: ${r.message}`; -} -var bs = A(ys(), 1); -function Ci(e) { - let r = (0, bs.default)(e); - if (r === 0) return e; - let t = new RegExp(`^[ \\t]{${r}}`, 'gm'); - return e.replace(t, ''); -} -var Es = 'prisma+postgres', - on = `${Es}:`; -function sn(e) { - return e?.toString().startsWith(`${on}//`) ?? !1; -} -function Ii(e) { - if (!sn(e)) return !1; - let { host: r } = new URL(e); - return r.includes('localhost') || r.includes('127.0.0.1') || r.includes('[::1]'); -} -var xs = A(Di()); -function ki(e) { - return String(new Oi(e)); -} -var Oi = class { - constructor(r) { - this.config = r; - } - toString() { - let { config: r } = this, - t = r.provider.fromEnvVar ? `env("${r.provider.fromEnvVar}")` : r.provider.value, - n = JSON.parse(JSON.stringify({ provider: t, binaryTargets: Zc(r.binaryTargets) })); - return `generator ${r.name} { -${(0, xs.default)(Xc(n), 2)} -}`; - } -}; -function Zc(e) { - let r; - if (e.length > 0) { - let t = e.find((n) => n.fromEnvVar !== null); - t ? (r = `env("${t.fromEnvVar}")`) : (r = e.map((n) => (n.native ? 'native' : n.value))); - } else r = void 0; - return r; -} -function Xc(e) { - let r = Object.keys(e).reduce((t, n) => Math.max(t, n.length), 0); - return Object.entries(e).map(([t, n]) => `${t.padEnd(r)} = ${ep(n)}`).join(` -`); -} -function ep(e) { - return JSON.parse( - JSON.stringify(e, (r, t) => - Array.isArray(t) ? `[${t.map((n) => JSON.stringify(n)).join(', ')}]` : JSON.stringify(t) - ) - ); -} -var tt = {}; -tr(tt, { - error: () => np, - info: () => tp, - log: () => rp, - query: () => ip, - should: () => Ps, - tags: () => rt, - warn: () => _i, -}); -var rt = { error: ce('prisma:error'), warn: Ie('prisma:warn'), info: De('prisma:info'), query: nr('prisma:query') }, - Ps = { warn: () => !process.env.PRISMA_DISABLE_WARNINGS }; -function rp(...e) { - console.log(...e); -} -function _i(e, ...r) { - Ps.warn() && console.warn(`${rt.warn} ${e}`, ...r); -} -function tp(e, ...r) { - console.info(`${rt.info} ${e}`, ...r); -} -function np(e, ...r) { - console.error(`${rt.error} ${e}`, ...r); -} -function ip(e, ...r) { - console.log(`${rt.query} ${e}`, ...r); -} -function an(e, r) { - if (!e) - throw new Error( - `${r}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report` - ); -} -function ar(e, r) { - throw new Error(r); -} -var nt = A(require('node:path')); -function Li(e) { - return nt.default.sep === nt.default.posix.sep ? e : e.split(nt.default.sep).join(nt.default.posix.sep); -} -var qi = A(Os()), - ln = A(require('node:fs')); -var wr = A(require('node:path')); -function ks(e) { - let r = e.ignoreProcessEnv ? {} : process.env, - t = (n) => - n.match(/(.?\${(?:[a-zA-Z0-9_]+)?})/g)?.reduce(function (o, s) { - let a = /(.?)\${([a-zA-Z0-9_]+)?}/g.exec(s); - if (!a) return o; - let l = a[1], - u, - c; - if (l === '\\') ((c = a[0]), (u = c.replace('\\$', '$'))); - else { - let p = a[2]; - ((c = a[0].substring(l.length)), - (u = Object.hasOwnProperty.call(r, p) ? r[p] : e.parsed[p] || ''), - (u = t(u))); - } - return o.replace(c, u); - }, n) ?? n; - for (let n in e.parsed) { - let i = Object.hasOwnProperty.call(r, n) ? r[n] : e.parsed[n]; - e.parsed[n] = t(i); - } - for (let n in e.parsed) r[n] = e.parsed[n]; - return e; -} -var $i = gr('prisma:tryLoadEnv'); -function ot({ rootEnvPath: e, schemaEnvPath: r }, t = { conflictCheck: 'none' }) { - let n = _s(e); - t.conflictCheck !== 'none' && wp(n, r, t.conflictCheck); - let i = null; - return ( - Ns(n?.path, r) || (i = _s(r)), - !n && !i && $i('No Environment variables loaded'), - i?.dotenvResult.error - ? console.error(ce(W('Schema Env Error: ')) + i.dotenvResult.error) - : { - message: [n?.message, i?.message].filter(Boolean).join(` -`), - parsed: { ...n?.dotenvResult?.parsed, ...i?.dotenvResult?.parsed }, - } - ); -} -function wp(e, r, t) { - let n = e?.dotenvResult.parsed, - i = !Ns(e?.path, r); - if (n && r && i && ln.default.existsSync(r)) { - let o = qi.default.parse(ln.default.readFileSync(r)), - s = []; - for (let a in o) n[a] === o[a] && s.push(a); - if (s.length > 0) { - let a = wr.default.relative(process.cwd(), e.path), - l = wr.default.relative(process.cwd(), r); - if (t === 'error') { - let u = `There is a conflict between env var${s.length > 1 ? 's' : ''} in ${Y(a)} and ${Y(l)} -Conflicting env vars: -${s.map((c) => ` ${W(c)}`).join(` -`)} - -We suggest to move the contents of ${Y(l)} to ${Y(a)} to consolidate your env vars. -`; - throw new Error(u); - } else if (t === 'warn') { - let u = `Conflict for env var${s.length > 1 ? 's' : ''} ${s.map((c) => W(c)).join(', ')} in ${Y(a)} and ${Y(l)} -Env vars from ${Y(l)} overwrite the ones from ${Y(a)} - `; - console.warn(`${Ie('warn(prisma)')} ${u}`); - } - } - } -} -function _s(e) { - if (xp(e)) { - $i(`Environment variables loaded from ${e}`); - let r = qi.default.config({ path: e, debug: process.env.DOTENV_CONFIG_DEBUG ? !0 : void 0 }); - return { - dotenvResult: ks(r), - message: Ce(`Environment variables loaded from ${wr.default.relative(process.cwd(), e)}`), - path: e, - }; - } else $i(`Environment variables not found at ${e}`); - return null; -} -function Ns(e, r) { - return e && r && wr.default.resolve(e) === wr.default.resolve(r); -} -function xp(e) { - return !!(e && ln.default.existsSync(e)); -} -function Vi(e, r) { - return Object.prototype.hasOwnProperty.call(e, r); -} -function cn(e, r) { - let t = {}; - for (let n of Object.keys(e)) t[n] = r(e[n], n); - return t; -} -function ji(e, r) { - if (e.length === 0) return; - let t = e[0]; - for (let n = 1; n < e.length; n++) r(t, e[n]) < 0 && (t = e[n]); - return t; -} -function x(e, r) { - Object.defineProperty(e, 'name', { value: r, configurable: !0 }); -} -var Fs = new Set(), - st = (e, r, ...t) => { - Fs.has(e) || (Fs.add(e), _i(r, ...t)); - }; -var v = class e extends Error { - clientVersion; - errorCode; - retryable; - constructor(r, t, n) { - (super(r), - (this.name = 'PrismaClientInitializationError'), - (this.clientVersion = t), - (this.errorCode = n), - Error.captureStackTrace(e)); - } - get [Symbol.toStringTag]() { - return 'PrismaClientInitializationError'; - } -}; -x(v, 'PrismaClientInitializationError'); -var z = class extends Error { - code; - meta; - clientVersion; - batchRequestIdx; - constructor(r, { code: t, clientVersion: n, meta: i, batchRequestIdx: o }) { - (super(r), - (this.name = 'PrismaClientKnownRequestError'), - (this.code = t), - (this.clientVersion = n), - (this.meta = i), - Object.defineProperty(this, 'batchRequestIdx', { value: o, enumerable: !1, writable: !0 })); - } - get [Symbol.toStringTag]() { - return 'PrismaClientKnownRequestError'; - } -}; -x(z, 'PrismaClientKnownRequestError'); -var le = class extends Error { - clientVersion; - constructor(r, t) { - (super(r), (this.name = 'PrismaClientRustPanicError'), (this.clientVersion = t)); - } - get [Symbol.toStringTag]() { - return 'PrismaClientRustPanicError'; - } -}; -x(le, 'PrismaClientRustPanicError'); -var V = class extends Error { - clientVersion; - batchRequestIdx; - constructor(r, { clientVersion: t, batchRequestIdx: n }) { - (super(r), - (this.name = 'PrismaClientUnknownRequestError'), - (this.clientVersion = t), - Object.defineProperty(this, 'batchRequestIdx', { value: n, writable: !0, enumerable: !1 })); - } - get [Symbol.toStringTag]() { - return 'PrismaClientUnknownRequestError'; - } -}; -x(V, 'PrismaClientUnknownRequestError'); -var Z = class extends Error { - name = 'PrismaClientValidationError'; - clientVersion; - constructor(r, { clientVersion: t }) { - (super(r), (this.clientVersion = t)); - } - get [Symbol.toStringTag]() { - return 'PrismaClientValidationError'; - } -}; -x(Z, 'PrismaClientValidationError'); -var we = class { - _map = new Map(); - get(r) { - return this._map.get(r)?.value; - } - set(r, t) { - this._map.set(r, { value: t }); - } - getOrCreate(r, t) { - let n = this._map.get(r); - if (n) return n.value; - let i = t(); - return (this.set(r, i), i); - } -}; -function We(e) { - return e.substring(0, 1).toLowerCase() + e.substring(1); -} -function Ms(e, r) { - let t = {}; - for (let n of e) { - let i = n[r]; - t[i] = n; - } - return t; -} -function at(e) { - let r; - return { - get() { - return (r || (r = { value: e() }), r.value); - }, - }; -} -function $s(e) { - return { models: Bi(e.models), enums: Bi(e.enums), types: Bi(e.types) }; -} -function Bi(e) { - let r = {}; - for (let { name: t, ...n } of e) r[t] = n; - return r; -} -function xr(e) { - return e instanceof Date || Object.prototype.toString.call(e) === '[object Date]'; -} -function dn(e) { - return e.toString() !== 'Invalid Date'; -} -var Pr = 9e15, - Ye = 1e9, - Ui = '0123456789abcdef', - gn = - '2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058', - hn = - '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789', - Gi = { precision: 20, rounding: 4, modulo: 1, toExpNeg: -7, toExpPos: 21, minE: -Pr, maxE: Pr, crypto: !1 }, - Bs, - Ne, - w = !0, - bn = '[DecimalError] ', - He = bn + 'Invalid argument: ', - Us = bn + 'Precision limit exceeded', - Gs = bn + 'crypto unavailable', - Qs = '[object Decimal]', - X = Math.floor, - U = Math.pow, - Pp = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, - vp = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, - Tp = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, - Ws = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, - fe = 1e7, - E = 7, - Sp = 9007199254740991, - Rp = gn.length - 1, - Qi = hn.length - 1, - m = { toStringTag: Qs }; -m.absoluteValue = m.abs = function () { - var e = new this.constructor(this); - return (e.s < 0 && (e.s = 1), y(e)); -}; -m.ceil = function () { - return y(new this.constructor(this), this.e + 1, 2); -}; -m.clampedTo = m.clamp = function (e, r) { - var t, - n = this, - i = n.constructor; - if (((e = new i(e)), (r = new i(r)), !e.s || !r.s)) return new i(NaN); - if (e.gt(r)) throw Error(He + r); - return ((t = n.cmp(e)), t < 0 ? e : n.cmp(r) > 0 ? r : new i(n)); -}; -m.comparedTo = m.cmp = function (e) { - var r, - t, - n, - i, - o = this, - s = o.d, - a = (e = new o.constructor(e)).d, - l = o.s, - u = e.s; - if (!s || !a) return !l || !u ? NaN : l !== u ? l : s === a ? 0 : !s ^ (l < 0) ? 1 : -1; - if (!s[0] || !a[0]) return s[0] ? l : a[0] ? -u : 0; - if (l !== u) return l; - if (o.e !== e.e) return (o.e > e.e) ^ (l < 0) ? 1 : -1; - for (n = s.length, i = a.length, r = 0, t = n < i ? n : i; r < t; ++r) - if (s[r] !== a[r]) return (s[r] > a[r]) ^ (l < 0) ? 1 : -1; - return n === i ? 0 : (n > i) ^ (l < 0) ? 1 : -1; -}; -m.cosine = m.cos = function () { - var e, - r, - t = this, - n = t.constructor; - return t.d - ? t.d[0] - ? ((e = n.precision), - (r = n.rounding), - (n.precision = e + Math.max(t.e, t.sd()) + E), - (n.rounding = 1), - (t = Ap(n, zs(n, t))), - (n.precision = e), - (n.rounding = r), - y(Ne == 2 || Ne == 3 ? t.neg() : t, e, r, !0)) - : new n(1) - : new n(NaN); -}; -m.cubeRoot = m.cbrt = function () { - var e, - r, - t, - n, - i, - o, - s, - a, - l, - u, - c = this, - p = c.constructor; - if (!c.isFinite() || c.isZero()) return new p(c); - for ( - w = !1, - o = c.s * U(c.s * c, 1 / 3), - !o || Math.abs(o) == 1 / 0 - ? ((t = J(c.d)), - (e = c.e), - (o = (e - t.length + 1) % 3) && (t += o == 1 || o == -2 ? '0' : '00'), - (o = U(t, 1 / 3)), - (e = X((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2))), - o == 1 / 0 ? (t = '5e' + e) : ((t = o.toExponential()), (t = t.slice(0, t.indexOf('e') + 1) + e)), - (n = new p(t)), - (n.s = c.s)) - : (n = new p(o.toString())), - s = (e = p.precision) + 3; - ; - - ) - if ( - ((a = n), - (l = a.times(a).times(a)), - (u = l.plus(c)), - (n = L(u.plus(c).times(a), u.plus(l), s + 2, 1)), - J(a.d).slice(0, s) === (t = J(n.d)).slice(0, s)) - ) - if (((t = t.slice(s - 3, s + 1)), t == '9999' || (!i && t == '4999'))) { - if (!i && (y(a, e + 1, 0), a.times(a).times(a).eq(c))) { - n = a; - break; - } - ((s += 4), (i = 1)); - } else { - (!+t || (!+t.slice(1) && t.charAt(0) == '5')) && (y(n, e + 1, 1), (r = !n.times(n).times(n).eq(c))); - break; - } - return ((w = !0), y(n, e, p.rounding, r)); -}; -m.decimalPlaces = m.dp = function () { - var e, - r = this.d, - t = NaN; - if (r) { - if (((e = r.length - 1), (t = (e - X(this.e / E)) * E), (e = r[e]), e)) for (; e % 10 == 0; e /= 10) t--; - t < 0 && (t = 0); - } - return t; -}; -m.dividedBy = m.div = function (e) { - return L(this, new this.constructor(e)); -}; -m.dividedToIntegerBy = m.divToInt = function (e) { - var r = this, - t = r.constructor; - return y(L(r, new t(e), 0, 1, 1), t.precision, t.rounding); -}; -m.equals = m.eq = function (e) { - return this.cmp(e) === 0; -}; -m.floor = function () { - return y(new this.constructor(this), this.e + 1, 3); -}; -m.greaterThan = m.gt = function (e) { - return this.cmp(e) > 0; -}; -m.greaterThanOrEqualTo = m.gte = function (e) { - var r = this.cmp(e); - return r == 1 || r === 0; -}; -m.hyperbolicCosine = m.cosh = function () { - var e, - r, - t, - n, - i, - o = this, - s = o.constructor, - a = new s(1); - if (!o.isFinite()) return new s(o.s ? 1 / 0 : NaN); - if (o.isZero()) return a; - ((t = s.precision), - (n = s.rounding), - (s.precision = t + Math.max(o.e, o.sd()) + 4), - (s.rounding = 1), - (i = o.d.length), - i < 32 - ? ((e = Math.ceil(i / 3)), (r = (1 / wn(4, e)).toString())) - : ((e = 16), (r = '2.3283064365386962890625e-10')), - (o = vr(s, 1, o.times(r), new s(1), !0))); - for (var l, u = e, c = new s(8); u--; ) ((l = o.times(o)), (o = a.minus(l.times(c.minus(l.times(c)))))); - return y(o, (s.precision = t), (s.rounding = n), !0); -}; -m.hyperbolicSine = m.sinh = function () { - var e, - r, - t, - n, - i = this, - o = i.constructor; - if (!i.isFinite() || i.isZero()) return new o(i); - if ( - ((r = o.precision), - (t = o.rounding), - (o.precision = r + Math.max(i.e, i.sd()) + 4), - (o.rounding = 1), - (n = i.d.length), - n < 3) - ) - i = vr(o, 2, i, i, !0); - else { - ((e = 1.4 * Math.sqrt(n)), (e = e > 16 ? 16 : e | 0), (i = i.times(1 / wn(5, e))), (i = vr(o, 2, i, i, !0))); - for (var s, a = new o(5), l = new o(16), u = new o(20); e--; ) - ((s = i.times(i)), (i = i.times(a.plus(s.times(l.times(s).plus(u)))))); - } - return ((o.precision = r), (o.rounding = t), y(i, r, t, !0)); -}; -m.hyperbolicTangent = m.tanh = function () { - var e, - r, - t = this, - n = t.constructor; - return t.isFinite() - ? t.isZero() - ? new n(t) - : ((e = n.precision), - (r = n.rounding), - (n.precision = e + 7), - (n.rounding = 1), - L(t.sinh(), t.cosh(), (n.precision = e), (n.rounding = r))) - : new n(t.s); -}; -m.inverseCosine = m.acos = function () { - var e = this, - r = e.constructor, - t = e.abs().cmp(1), - n = r.precision, - i = r.rounding; - return t !== -1 - ? t === 0 - ? e.isNeg() - ? xe(r, n, i) - : new r(0) - : new r(NaN) - : e.isZero() - ? xe(r, n + 4, i).times(0.5) - : ((r.precision = n + 6), - (r.rounding = 1), - (e = new r(1).minus(e).div(e.plus(1)).sqrt().atan()), - (r.precision = n), - (r.rounding = i), - e.times(2)); -}; -m.inverseHyperbolicCosine = m.acosh = function () { - var e, - r, - t = this, - n = t.constructor; - return t.lte(1) - ? new n(t.eq(1) ? 0 : NaN) - : t.isFinite() - ? ((e = n.precision), - (r = n.rounding), - (n.precision = e + Math.max(Math.abs(t.e), t.sd()) + 4), - (n.rounding = 1), - (w = !1), - (t = t.times(t).minus(1).sqrt().plus(t)), - (w = !0), - (n.precision = e), - (n.rounding = r), - t.ln()) - : new n(t); -}; -m.inverseHyperbolicSine = m.asinh = function () { - var e, - r, - t = this, - n = t.constructor; - return !t.isFinite() || t.isZero() - ? new n(t) - : ((e = n.precision), - (r = n.rounding), - (n.precision = e + 2 * Math.max(Math.abs(t.e), t.sd()) + 6), - (n.rounding = 1), - (w = !1), - (t = t.times(t).plus(1).sqrt().plus(t)), - (w = !0), - (n.precision = e), - (n.rounding = r), - t.ln()); -}; -m.inverseHyperbolicTangent = m.atanh = function () { - var e, - r, - t, - n, - i = this, - o = i.constructor; - return i.isFinite() - ? i.e >= 0 - ? new o(i.abs().eq(1) ? i.s / 0 : i.isZero() ? i : NaN) - : ((e = o.precision), - (r = o.rounding), - (n = i.sd()), - Math.max(n, e) < 2 * -i.e - 1 - ? y(new o(i), e, r, !0) - : ((o.precision = t = n - i.e), - (i = L(i.plus(1), new o(1).minus(i), t + e, 1)), - (o.precision = e + 4), - (o.rounding = 1), - (i = i.ln()), - (o.precision = e), - (o.rounding = r), - i.times(0.5))) - : new o(NaN); -}; -m.inverseSine = m.asin = function () { - var e, - r, - t, - n, - i = this, - o = i.constructor; - return i.isZero() - ? new o(i) - : ((r = i.abs().cmp(1)), - (t = o.precision), - (n = o.rounding), - r !== -1 - ? r === 0 - ? ((e = xe(o, t + 4, n).times(0.5)), (e.s = i.s), e) - : new o(NaN) - : ((o.precision = t + 6), - (o.rounding = 1), - (i = i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan()), - (o.precision = t), - (o.rounding = n), - i.times(2))); -}; -m.inverseTangent = m.atan = function () { - var e, - r, - t, - n, - i, - o, - s, - a, - l, - u = this, - c = u.constructor, - p = c.precision, - d = c.rounding; - if (u.isFinite()) { - if (u.isZero()) return new c(u); - if (u.abs().eq(1) && p + 4 <= Qi) return ((s = xe(c, p + 4, d).times(0.25)), (s.s = u.s), s); - } else { - if (!u.s) return new c(NaN); - if (p + 4 <= Qi) return ((s = xe(c, p + 4, d).times(0.5)), (s.s = u.s), s); - } - for (c.precision = a = p + 10, c.rounding = 1, t = Math.min(28, (a / E + 2) | 0), e = t; e; --e) - u = u.div(u.times(u).plus(1).sqrt().plus(1)); - for (w = !1, r = Math.ceil(a / E), n = 1, l = u.times(u), s = new c(u), i = u; e !== -1; ) - if ( - ((i = i.times(l)), - (o = s.minus(i.div((n += 2)))), - (i = i.times(l)), - (s = o.plus(i.div((n += 2)))), - s.d[r] !== void 0) - ) - for (e = r; s.d[e] === o.d[e] && e--; ); - return (t && (s = s.times(2 << (t - 1))), (w = !0), y(s, (c.precision = p), (c.rounding = d), !0)); -}; -m.isFinite = function () { - return !!this.d; -}; -m.isInteger = m.isInt = function () { - return !!this.d && X(this.e / E) > this.d.length - 2; -}; -m.isNaN = function () { - return !this.s; -}; -m.isNegative = m.isNeg = function () { - return this.s < 0; -}; -m.isPositive = m.isPos = function () { - return this.s > 0; -}; -m.isZero = function () { - return !!this.d && this.d[0] === 0; -}; -m.lessThan = m.lt = function (e) { - return this.cmp(e) < 0; -}; -m.lessThanOrEqualTo = m.lte = function (e) { - return this.cmp(e) < 1; -}; -m.logarithm = m.log = function (e) { - var r, - t, - n, - i, - o, - s, - a, - l, - u = this, - c = u.constructor, - p = c.precision, - d = c.rounding, - f = 5; - if (e == null) ((e = new c(10)), (r = !0)); - else { - if (((e = new c(e)), (t = e.d), e.s < 0 || !t || !t[0] || e.eq(1))) return new c(NaN); - r = e.eq(10); - } - if (((t = u.d), u.s < 0 || !t || !t[0] || u.eq(1))) - return new c(t && !t[0] ? -1 / 0 : u.s != 1 ? NaN : t ? 0 : 1 / 0); - if (r) - if (t.length > 1) o = !0; - else { - for (i = t[0]; i % 10 === 0; ) i /= 10; - o = i !== 1; - } - if ( - ((w = !1), - (a = p + f), - (s = Ke(u, a)), - (n = r ? yn(c, a + 10) : Ke(e, a)), - (l = L(s, n, a, 1)), - lt(l.d, (i = p), d)) - ) - do - if (((a += 10), (s = Ke(u, a)), (n = r ? yn(c, a + 10) : Ke(e, a)), (l = L(s, n, a, 1)), !o)) { - +J(l.d).slice(i + 1, i + 15) + 1 == 1e14 && (l = y(l, p + 1, 0)); - break; - } - while (lt(l.d, (i += 10), d)); - return ((w = !0), y(l, p, d)); -}; -m.minus = m.sub = function (e) { - var r, - t, - n, - i, - o, - s, - a, - l, - u, - c, - p, - d, - f = this, - h = f.constructor; - if (((e = new h(e)), !f.d || !e.d)) - return (!f.s || !e.s ? (e = new h(NaN)) : f.d ? (e.s = -e.s) : (e = new h(e.d || f.s !== e.s ? f : NaN)), e); - if (f.s != e.s) return ((e.s = -e.s), f.plus(e)); - if (((u = f.d), (d = e.d), (a = h.precision), (l = h.rounding), !u[0] || !d[0])) { - if (d[0]) e.s = -e.s; - else if (u[0]) e = new h(f); - else return new h(l === 3 ? -0 : 0); - return w ? y(e, a, l) : e; - } - if (((t = X(e.e / E)), (c = X(f.e / E)), (u = u.slice()), (o = c - t), o)) { - for ( - p = o < 0, - p ? ((r = u), (o = -o), (s = d.length)) : ((r = d), (t = c), (s = u.length)), - n = Math.max(Math.ceil(a / E), s) + 2, - o > n && ((o = n), (r.length = 1)), - r.reverse(), - n = o; - n--; - - ) - r.push(0); - r.reverse(); - } else { - for (n = u.length, s = d.length, p = n < s, p && (s = n), n = 0; n < s; n++) - if (u[n] != d[n]) { - p = u[n] < d[n]; - break; - } - o = 0; - } - for (p && ((r = u), (u = d), (d = r), (e.s = -e.s)), s = u.length, n = d.length - s; n > 0; --n) u[s++] = 0; - for (n = d.length; n > o; ) { - if (u[--n] < d[n]) { - for (i = n; i && u[--i] === 0; ) u[i] = fe - 1; - (--u[i], (u[n] += fe)); - } - u[n] -= d[n]; - } - for (; u[--s] === 0; ) u.pop(); - for (; u[0] === 0; u.shift()) --t; - return u[0] ? ((e.d = u), (e.e = En(u, t)), w ? y(e, a, l) : e) : new h(l === 3 ? -0 : 0); -}; -m.modulo = m.mod = function (e) { - var r, - t = this, - n = t.constructor; - return ( - (e = new n(e)), - !t.d || !e.s || (e.d && !e.d[0]) - ? new n(NaN) - : !e.d || (t.d && !t.d[0]) - ? y(new n(t), n.precision, n.rounding) - : ((w = !1), - n.modulo == 9 ? ((r = L(t, e.abs(), 0, 3, 1)), (r.s *= e.s)) : (r = L(t, e, 0, n.modulo, 1)), - (r = r.times(e)), - (w = !0), - t.minus(r)) - ); -}; -m.naturalExponential = m.exp = function () { - return Wi(this); -}; -m.naturalLogarithm = m.ln = function () { - return Ke(this); -}; -m.negated = m.neg = function () { - var e = new this.constructor(this); - return ((e.s = -e.s), y(e)); -}; -m.plus = m.add = function (e) { - var r, - t, - n, - i, - o, - s, - a, - l, - u, - c, - p = this, - d = p.constructor; - if (((e = new d(e)), !p.d || !e.d)) - return (!p.s || !e.s ? (e = new d(NaN)) : p.d || (e = new d(e.d || p.s === e.s ? p : NaN)), e); - if (p.s != e.s) return ((e.s = -e.s), p.minus(e)); - if (((u = p.d), (c = e.d), (a = d.precision), (l = d.rounding), !u[0] || !c[0])) - return (c[0] || (e = new d(p)), w ? y(e, a, l) : e); - if (((o = X(p.e / E)), (n = X(e.e / E)), (u = u.slice()), (i = o - n), i)) { - for ( - i < 0 ? ((t = u), (i = -i), (s = c.length)) : ((t = c), (n = o), (s = u.length)), - o = Math.ceil(a / E), - s = o > s ? o + 1 : s + 1, - i > s && ((i = s), (t.length = 1)), - t.reverse(); - i--; - - ) - t.push(0); - t.reverse(); - } - for (s = u.length, i = c.length, s - i < 0 && ((i = s), (t = c), (c = u), (u = t)), r = 0; i; ) - ((r = ((u[--i] = u[i] + c[i] + r) / fe) | 0), (u[i] %= fe)); - for (r && (u.unshift(r), ++n), s = u.length; u[--s] == 0; ) u.pop(); - return ((e.d = u), (e.e = En(u, n)), w ? y(e, a, l) : e); -}; -m.precision = m.sd = function (e) { - var r, - t = this; - if (e !== void 0 && e !== !!e && e !== 1 && e !== 0) throw Error(He + e); - return (t.d ? ((r = Js(t.d)), e && t.e + 1 > r && (r = t.e + 1)) : (r = NaN), r); -}; -m.round = function () { - var e = this, - r = e.constructor; - return y(new r(e), e.e + 1, r.rounding); -}; -m.sine = m.sin = function () { - var e, - r, - t = this, - n = t.constructor; - return t.isFinite() - ? t.isZero() - ? new n(t) - : ((e = n.precision), - (r = n.rounding), - (n.precision = e + Math.max(t.e, t.sd()) + E), - (n.rounding = 1), - (t = Ip(n, zs(n, t))), - (n.precision = e), - (n.rounding = r), - y(Ne > 2 ? t.neg() : t, e, r, !0)) - : new n(NaN); -}; -m.squareRoot = m.sqrt = function () { - var e, - r, - t, - n, - i, - o, - s = this, - a = s.d, - l = s.e, - u = s.s, - c = s.constructor; - if (u !== 1 || !a || !a[0]) return new c(!u || (u < 0 && (!a || a[0])) ? NaN : a ? s : 1 / 0); - for ( - w = !1, - u = Math.sqrt(+s), - u == 0 || u == 1 / 0 - ? ((r = J(a)), - (r.length + l) % 2 == 0 && (r += '0'), - (u = Math.sqrt(r)), - (l = X((l + 1) / 2) - (l < 0 || l % 2)), - u == 1 / 0 ? (r = '5e' + l) : ((r = u.toExponential()), (r = r.slice(0, r.indexOf('e') + 1) + l)), - (n = new c(r))) - : (n = new c(u.toString())), - t = (l = c.precision) + 3; - ; - - ) - if (((o = n), (n = o.plus(L(s, o, t + 2, 1)).times(0.5)), J(o.d).slice(0, t) === (r = J(n.d)).slice(0, t))) - if (((r = r.slice(t - 3, t + 1)), r == '9999' || (!i && r == '4999'))) { - if (!i && (y(o, l + 1, 0), o.times(o).eq(s))) { - n = o; - break; - } - ((t += 4), (i = 1)); - } else { - (!+r || (!+r.slice(1) && r.charAt(0) == '5')) && (y(n, l + 1, 1), (e = !n.times(n).eq(s))); - break; - } - return ((w = !0), y(n, l, c.rounding, e)); -}; -m.tangent = m.tan = function () { - var e, - r, - t = this, - n = t.constructor; - return t.isFinite() - ? t.isZero() - ? new n(t) - : ((e = n.precision), - (r = n.rounding), - (n.precision = e + 10), - (n.rounding = 1), - (t = t.sin()), - (t.s = 1), - (t = L(t, new n(1).minus(t.times(t)).sqrt(), e + 10, 0)), - (n.precision = e), - (n.rounding = r), - y(Ne == 2 || Ne == 4 ? t.neg() : t, e, r, !0)) - : new n(NaN); -}; -m.times = m.mul = function (e) { - var r, - t, - n, - i, - o, - s, - a, - l, - u, - c = this, - p = c.constructor, - d = c.d, - f = (e = new p(e)).d; - if (((e.s *= c.s), !d || !d[0] || !f || !f[0])) - return new p(!e.s || (d && !d[0] && !f) || (f && !f[0] && !d) ? NaN : !d || !f ? e.s / 0 : e.s * 0); - for ( - t = X(c.e / E) + X(e.e / E), - l = d.length, - u = f.length, - l < u && ((o = d), (d = f), (f = o), (s = l), (l = u), (u = s)), - o = [], - s = l + u, - n = s; - n--; - - ) - o.push(0); - for (n = u; --n >= 0; ) { - for (r = 0, i = l + n; i > n; ) ((a = o[i] + f[n] * d[i - n - 1] + r), (o[i--] = a % fe | 0), (r = (a / fe) | 0)); - o[i] = (o[i] + r) % fe | 0; - } - for (; !o[--s]; ) o.pop(); - return (r ? ++t : o.shift(), (e.d = o), (e.e = En(o, t)), w ? y(e, p.precision, p.rounding) : e); -}; -m.toBinary = function (e, r) { - return Ji(this, 2, e, r); -}; -m.toDecimalPlaces = m.toDP = function (e, r) { - var t = this, - n = t.constructor; - return ( - (t = new n(t)), - e === void 0 ? t : (ie(e, 0, Ye), r === void 0 ? (r = n.rounding) : ie(r, 0, 8), y(t, e + t.e + 1, r)) - ); -}; -m.toExponential = function (e, r) { - var t, - n = this, - i = n.constructor; - return ( - e === void 0 - ? (t = Pe(n, !0)) - : (ie(e, 0, Ye), - r === void 0 ? (r = i.rounding) : ie(r, 0, 8), - (n = y(new i(n), e + 1, r)), - (t = Pe(n, !0, e + 1))), - n.isNeg() && !n.isZero() ? '-' + t : t - ); -}; -m.toFixed = function (e, r) { - var t, - n, - i = this, - o = i.constructor; - return ( - e === void 0 - ? (t = Pe(i)) - : (ie(e, 0, Ye), - r === void 0 ? (r = o.rounding) : ie(r, 0, 8), - (n = y(new o(i), e + i.e + 1, r)), - (t = Pe(n, !1, e + n.e + 1))), - i.isNeg() && !i.isZero() ? '-' + t : t - ); -}; -m.toFraction = function (e) { - var r, - t, - n, - i, - o, - s, - a, - l, - u, - c, - p, - d, - f = this, - h = f.d, - g = f.constructor; - if (!h) return new g(f); - if ( - ((u = t = new g(1)), - (n = l = new g(0)), - (r = new g(n)), - (o = r.e = Js(h) - f.e - 1), - (s = o % E), - (r.d[0] = U(10, s < 0 ? E + s : s)), - e == null) - ) - e = o > 0 ? r : u; - else { - if (((a = new g(e)), !a.isInt() || a.lt(u))) throw Error(He + a); - e = a.gt(r) ? (o > 0 ? r : u) : a; - } - for ( - w = !1, a = new g(J(h)), c = g.precision, g.precision = o = h.length * E * 2; - (p = L(a, r, 0, 1, 1)), (i = t.plus(p.times(n))), i.cmp(e) != 1; - - ) - ((t = n), (n = i), (i = u), (u = l.plus(p.times(i))), (l = i), (i = r), (r = a.minus(p.times(i))), (a = i)); - return ( - (i = L(e.minus(t), n, 0, 1, 1)), - (l = l.plus(i.times(u))), - (t = t.plus(i.times(n))), - (l.s = u.s = f.s), - (d = - L(u, n, o, 1) - .minus(f) - .abs() - .cmp(L(l, t, o, 1).minus(f).abs()) < 1 - ? [u, n] - : [l, t]), - (g.precision = c), - (w = !0), - d - ); -}; -m.toHexadecimal = m.toHex = function (e, r) { - return Ji(this, 16, e, r); -}; -m.toNearest = function (e, r) { - var t = this, - n = t.constructor; - if (((t = new n(t)), e == null)) { - if (!t.d) return t; - ((e = new n(1)), (r = n.rounding)); - } else { - if (((e = new n(e)), r === void 0 ? (r = n.rounding) : ie(r, 0, 8), !t.d)) return e.s ? t : e; - if (!e.d) return (e.s && (e.s = t.s), e); - } - return (e.d[0] ? ((w = !1), (t = L(t, e, 0, r, 1).times(e)), (w = !0), y(t)) : ((e.s = t.s), (t = e)), t); -}; -m.toNumber = function () { - return +this; -}; -m.toOctal = function (e, r) { - return Ji(this, 8, e, r); -}; -m.toPower = m.pow = function (e) { - var r, - t, - n, - i, - o, - s, - a = this, - l = a.constructor, - u = +(e = new l(e)); - if (!a.d || !e.d || !a.d[0] || !e.d[0]) return new l(U(+a, u)); - if (((a = new l(a)), a.eq(1))) return a; - if (((n = l.precision), (o = l.rounding), e.eq(1))) return y(a, n, o); - if (((r = X(e.e / E)), r >= e.d.length - 1 && (t = u < 0 ? -u : u) <= Sp)) - return ((i = Ks(l, a, t, n)), e.s < 0 ? new l(1).div(i) : y(i, n, o)); - if (((s = a.s), s < 0)) { - if (r < e.d.length - 1) return new l(NaN); - if (((e.d[r] & 1) == 0 && (s = 1), a.e == 0 && a.d[0] == 1 && a.d.length == 1)) return ((a.s = s), a); - } - return ( - (t = U(+a, u)), - (r = t == 0 || !isFinite(t) ? X(u * (Math.log('0.' + J(a.d)) / Math.LN10 + a.e + 1)) : new l(t + '').e), - r > l.maxE + 1 || r < l.minE - 1 - ? new l(r > 0 ? s / 0 : 0) - : ((w = !1), - (l.rounding = a.s = 1), - (t = Math.min(12, (r + '').length)), - (i = Wi(e.times(Ke(a, n + t)), n)), - i.d && - ((i = y(i, n + 5, 1)), - lt(i.d, n, o) && - ((r = n + 10), - (i = y(Wi(e.times(Ke(a, r + t)), r), r + 5, 1)), - +J(i.d).slice(n + 1, n + 15) + 1 == 1e14 && (i = y(i, n + 1, 0)))), - (i.s = s), - (w = !0), - (l.rounding = o), - y(i, n, o)) - ); -}; -m.toPrecision = function (e, r) { - var t, - n = this, - i = n.constructor; - return ( - e === void 0 - ? (t = Pe(n, n.e <= i.toExpNeg || n.e >= i.toExpPos)) - : (ie(e, 1, Ye), - r === void 0 ? (r = i.rounding) : ie(r, 0, 8), - (n = y(new i(n), e, r)), - (t = Pe(n, e <= n.e || n.e <= i.toExpNeg, e))), - n.isNeg() && !n.isZero() ? '-' + t : t - ); -}; -m.toSignificantDigits = m.toSD = function (e, r) { - var t = this, - n = t.constructor; - return ( - e === void 0 - ? ((e = n.precision), (r = n.rounding)) - : (ie(e, 1, Ye), r === void 0 ? (r = n.rounding) : ie(r, 0, 8)), - y(new n(t), e, r) - ); -}; -m.toString = function () { - var e = this, - r = e.constructor, - t = Pe(e, e.e <= r.toExpNeg || e.e >= r.toExpPos); - return e.isNeg() && !e.isZero() ? '-' + t : t; -}; -m.truncated = m.trunc = function () { - return y(new this.constructor(this), this.e + 1, 1); -}; -m.valueOf = m.toJSON = function () { - var e = this, - r = e.constructor, - t = Pe(e, e.e <= r.toExpNeg || e.e >= r.toExpPos); - return e.isNeg() ? '-' + t : t; -}; -function J(e) { - var r, - t, - n, - i = e.length - 1, - o = '', - s = e[0]; - if (i > 0) { - for (o += s, r = 1; r < i; r++) ((n = e[r] + ''), (t = E - n.length), t && (o += Je(t)), (o += n)); - ((s = e[r]), (n = s + ''), (t = E - n.length), t && (o += Je(t))); - } else if (s === 0) return '0'; - for (; s % 10 === 0; ) s /= 10; - return o + s; -} -function ie(e, r, t) { - if (e !== ~~e || e < r || e > t) throw Error(He + e); -} -function lt(e, r, t, n) { - var i, o, s, a; - for (o = e[0]; o >= 10; o /= 10) --r; - return ( - --r < 0 ? ((r += E), (i = 0)) : ((i = Math.ceil((r + 1) / E)), (r %= E)), - (o = U(10, E - r)), - (a = e[i] % o | 0), - n == null - ? r < 3 - ? (r == 0 ? (a = (a / 100) | 0) : r == 1 && (a = (a / 10) | 0), - (s = (t < 4 && a == 99999) || (t > 3 && a == 49999) || a == 5e4 || a == 0)) - : (s = - (((t < 4 && a + 1 == o) || (t > 3 && a + 1 == o / 2)) && ((e[i + 1] / o / 100) | 0) == U(10, r - 2) - 1) || - ((a == o / 2 || a == 0) && ((e[i + 1] / o / 100) | 0) == 0)) - : r < 4 - ? (r == 0 ? (a = (a / 1e3) | 0) : r == 1 ? (a = (a / 100) | 0) : r == 2 && (a = (a / 10) | 0), - (s = ((n || t < 4) && a == 9999) || (!n && t > 3 && a == 4999))) - : (s = - (((n || t < 4) && a + 1 == o) || (!n && t > 3 && a + 1 == o / 2)) && - ((e[i + 1] / o / 1e3) | 0) == U(10, r - 3) - 1), - s - ); -} -function mn(e, r, t) { - for (var n, i = [0], o, s = 0, a = e.length; s < a; ) { - for (o = i.length; o--; ) i[o] *= r; - for (i[0] += Ui.indexOf(e.charAt(s++)), n = 0; n < i.length; n++) - i[n] > t - 1 && (i[n + 1] === void 0 && (i[n + 1] = 0), (i[n + 1] += (i[n] / t) | 0), (i[n] %= t)); - } - return i.reverse(); -} -function Ap(e, r) { - var t, n, i; - if (r.isZero()) return r; - ((n = r.d.length), - n < 32 - ? ((t = Math.ceil(n / 3)), (i = (1 / wn(4, t)).toString())) - : ((t = 16), (i = '2.3283064365386962890625e-10')), - (e.precision += t), - (r = vr(e, 1, r.times(i), new e(1)))); - for (var o = t; o--; ) { - var s = r.times(r); - r = s.times(s).minus(s).times(8).plus(1); - } - return ((e.precision -= t), r); -} -var L = (function () { - function e(n, i, o) { - var s, - a = 0, - l = n.length; - for (n = n.slice(); l--; ) ((s = n[l] * i + a), (n[l] = s % o | 0), (a = (s / o) | 0)); - return (a && n.unshift(a), n); - } - function r(n, i, o, s) { - var a, l; - if (o != s) l = o > s ? 1 : -1; - else - for (a = l = 0; a < o; a++) - if (n[a] != i[a]) { - l = n[a] > i[a] ? 1 : -1; - break; - } - return l; - } - function t(n, i, o, s) { - for (var a = 0; o--; ) ((n[o] -= a), (a = n[o] < i[o] ? 1 : 0), (n[o] = a * s + n[o] - i[o])); - for (; !n[0] && n.length > 1; ) n.shift(); - } - return function (n, i, o, s, a, l) { - var u, - c, - p, - d, - f, - h, - g, - D, - T, - S, - b, - O, - me, - ae, - Jr, - j, - te, - Ae, - K, - fr, - qt = n.constructor, - ti = n.s == i.s ? 1 : -1, - H = n.d, - _ = i.d; - if (!H || !H[0] || !_ || !_[0]) - return new qt(!n.s || !i.s || (H ? _ && H[0] == _[0] : !_) ? NaN : (H && H[0] == 0) || !_ ? ti * 0 : ti / 0); - for ( - l ? ((f = 1), (c = n.e - i.e)) : ((l = fe), (f = E), (c = X(n.e / f) - X(i.e / f))), - K = _.length, - te = H.length, - T = new qt(ti), - S = T.d = [], - p = 0; - _[p] == (H[p] || 0); - p++ - ); - if ( - (_[p] > (H[p] || 0) && c--, - o == null ? ((ae = o = qt.precision), (s = qt.rounding)) : a ? (ae = o + (n.e - i.e) + 1) : (ae = o), - ae < 0) - ) - (S.push(1), (h = !0)); - else { - if (((ae = (ae / f + 2) | 0), (p = 0), K == 1)) { - for (d = 0, _ = _[0], ae++; (p < te || d) && ae--; p++) - ((Jr = d * l + (H[p] || 0)), (S[p] = (Jr / _) | 0), (d = Jr % _ | 0)); - h = d || p < te; - } else { - for ( - d = (l / (_[0] + 1)) | 0, - d > 1 && ((_ = e(_, d, l)), (H = e(H, d, l)), (K = _.length), (te = H.length)), - j = K, - b = H.slice(0, K), - O = b.length; - O < K; - - ) - b[O++] = 0; - ((fr = _.slice()), fr.unshift(0), (Ae = _[0]), _[1] >= l / 2 && ++Ae); - do - ((d = 0), - (u = r(_, b, K, O)), - u < 0 - ? ((me = b[0]), - K != O && (me = me * l + (b[1] || 0)), - (d = (me / Ae) | 0), - d > 1 - ? (d >= l && (d = l - 1), - (g = e(_, d, l)), - (D = g.length), - (O = b.length), - (u = r(g, b, D, O)), - u == 1 && (d--, t(g, K < D ? fr : _, D, l))) - : (d == 0 && (u = d = 1), (g = _.slice())), - (D = g.length), - D < O && g.unshift(0), - t(b, g, O, l), - u == -1 && ((O = b.length), (u = r(_, b, K, O)), u < 1 && (d++, t(b, K < O ? fr : _, O, l))), - (O = b.length)) - : u === 0 && (d++, (b = [0])), - (S[p++] = d), - u && b[0] ? (b[O++] = H[j] || 0) : ((b = [H[j]]), (O = 1))); - while ((j++ < te || b[0] !== void 0) && ae--); - h = b[0] !== void 0; - } - S[0] || S.shift(); - } - if (f == 1) ((T.e = c), (Bs = h)); - else { - for (p = 1, d = S[0]; d >= 10; d /= 10) p++; - ((T.e = p + c * f - 1), y(T, a ? o + T.e + 1 : o, s, h)); - } - return T; - }; -})(); -function y(e, r, t, n) { - var i, - o, - s, - a, - l, - u, - c, - p, - d, - f = e.constructor; - e: if (r != null) { - if (((p = e.d), !p)) return e; - for (i = 1, a = p[0]; a >= 10; a /= 10) i++; - if (((o = r - i), o < 0)) ((o += E), (s = r), (c = p[(d = 0)]), (l = (c / U(10, i - s - 1)) % 10 | 0)); - else if (((d = Math.ceil((o + 1) / E)), (a = p.length), d >= a)) - if (n) { - for (; a++ <= d; ) p.push(0); - ((c = l = 0), (i = 1), (o %= E), (s = o - E + 1)); - } else break e; - else { - for (c = a = p[d], i = 1; a >= 10; a /= 10) i++; - ((o %= E), (s = o - E + i), (l = s < 0 ? 0 : (c / U(10, i - s - 1)) % 10 | 0)); - } - if ( - ((n = n || r < 0 || p[d + 1] !== void 0 || (s < 0 ? c : c % U(10, i - s - 1))), - (u = - t < 4 - ? (l || n) && (t == 0 || t == (e.s < 0 ? 3 : 2)) - : l > 5 || - (l == 5 && - (t == 4 || - n || - (t == 6 && (o > 0 ? (s > 0 ? c / U(10, i - s) : 0) : p[d - 1]) % 10 & 1) || - t == (e.s < 0 ? 8 : 7)))), - r < 1 || !p[0]) - ) - return ( - (p.length = 0), - u ? ((r -= e.e + 1), (p[0] = U(10, (E - (r % E)) % E)), (e.e = -r || 0)) : (p[0] = e.e = 0), - e - ); - if ( - (o == 0 - ? ((p.length = d), (a = 1), d--) - : ((p.length = d + 1), (a = U(10, E - o)), (p[d] = s > 0 ? ((c / U(10, i - s)) % U(10, s) | 0) * a : 0)), - u) - ) - for (;;) - if (d == 0) { - for (o = 1, s = p[0]; s >= 10; s /= 10) o++; - for (s = p[0] += a, a = 1; s >= 10; s /= 10) a++; - o != a && (e.e++, p[0] == fe && (p[0] = 1)); - break; - } else { - if (((p[d] += a), p[d] != fe)) break; - ((p[d--] = 0), (a = 1)); - } - for (o = p.length; p[--o] === 0; ) p.pop(); - } - return (w && (e.e > f.maxE ? ((e.d = null), (e.e = NaN)) : e.e < f.minE && ((e.e = 0), (e.d = [0]))), e); -} -function Pe(e, r, t) { - if (!e.isFinite()) return Ys(e); - var n, - i = e.e, - o = J(e.d), - s = o.length; - return ( - r - ? (t && (n = t - s) > 0 - ? (o = o.charAt(0) + '.' + o.slice(1) + Je(n)) - : s > 1 && (o = o.charAt(0) + '.' + o.slice(1)), - (o = o + (e.e < 0 ? 'e' : 'e+') + e.e)) - : i < 0 - ? ((o = '0.' + Je(-i - 1) + o), t && (n = t - s) > 0 && (o += Je(n))) - : i >= s - ? ((o += Je(i + 1 - s)), t && (n = t - i - 1) > 0 && (o = o + '.' + Je(n))) - : ((n = i + 1) < s && (o = o.slice(0, n) + '.' + o.slice(n)), - t && (n = t - s) > 0 && (i + 1 === s && (o += '.'), (o += Je(n)))), - o - ); -} -function En(e, r) { - var t = e[0]; - for (r *= E; t >= 10; t /= 10) r++; - return r; -} -function yn(e, r, t) { - if (r > Rp) throw ((w = !0), t && (e.precision = t), Error(Us)); - return y(new e(gn), r, 1, !0); -} -function xe(e, r, t) { - if (r > Qi) throw Error(Us); - return y(new e(hn), r, t, !0); -} -function Js(e) { - var r = e.length - 1, - t = r * E + 1; - if (((r = e[r]), r)) { - for (; r % 10 == 0; r /= 10) t--; - for (r = e[0]; r >= 10; r /= 10) t++; - } - return t; -} -function Je(e) { - for (var r = ''; e--; ) r += '0'; - return r; -} -function Ks(e, r, t, n) { - var i, - o = new e(1), - s = Math.ceil(n / E + 4); - for (w = !1; ; ) { - if ((t % 2 && ((o = o.times(r)), Vs(o.d, s) && (i = !0)), (t = X(t / 2)), t === 0)) { - ((t = o.d.length - 1), i && o.d[t] === 0 && ++o.d[t]); - break; - } - ((r = r.times(r)), Vs(r.d, s)); - } - return ((w = !0), o); -} -function qs(e) { - return e.d[e.d.length - 1] & 1; -} -function Hs(e, r, t) { - for (var n, i, o = new e(r[0]), s = 0; ++s < r.length; ) { - if (((i = new e(r[s])), !i.s)) { - o = i; - break; - } - ((n = o.cmp(i)), (n === t || (n === 0 && o.s === t)) && (o = i)); - } - return o; -} -function Wi(e, r) { - var t, - n, - i, - o, - s, - a, - l, - u = 0, - c = 0, - p = 0, - d = e.constructor, - f = d.rounding, - h = d.precision; - if (!e.d || !e.d[0] || e.e > 17) - return new d(e.d ? (e.d[0] ? (e.s < 0 ? 0 : 1 / 0) : 1) : e.s ? (e.s < 0 ? 0 : e) : NaN); - for (r == null ? ((w = !1), (l = h)) : (l = r), a = new d(0.03125); e.e > -2; ) ((e = e.times(a)), (p += 5)); - for (n = ((Math.log(U(2, p)) / Math.LN10) * 2 + 5) | 0, l += n, t = o = s = new d(1), d.precision = l; ; ) { - if ( - ((o = y(o.times(e), l, 1)), - (t = t.times(++c)), - (a = s.plus(L(o, t, l, 1))), - J(a.d).slice(0, l) === J(s.d).slice(0, l)) - ) { - for (i = p; i--; ) s = y(s.times(s), l, 1); - if (r == null) - if (u < 3 && lt(s.d, l - n, f, u)) ((d.precision = l += 10), (t = o = a = new d(1)), (c = 0), u++); - else return y(s, (d.precision = h), f, (w = !0)); - else return ((d.precision = h), s); - } - s = a; - } -} -function Ke(e, r) { - var t, - n, - i, - o, - s, - a, - l, - u, - c, - p, - d, - f = 1, - h = 10, - g = e, - D = g.d, - T = g.constructor, - S = T.rounding, - b = T.precision; - if (g.s < 0 || !D || !D[0] || (!g.e && D[0] == 1 && D.length == 1)) - return new T(D && !D[0] ? -1 / 0 : g.s != 1 ? NaN : D ? 0 : g); - if ( - (r == null ? ((w = !1), (c = b)) : (c = r), - (T.precision = c += h), - (t = J(D)), - (n = t.charAt(0)), - Math.abs((o = g.e)) < 15e14) - ) { - for (; (n < 7 && n != 1) || (n == 1 && t.charAt(1) > 3); ) ((g = g.times(e)), (t = J(g.d)), (n = t.charAt(0)), f++); - ((o = g.e), n > 1 ? ((g = new T('0.' + t)), o++) : (g = new T(n + '.' + t.slice(1)))); - } else - return ( - (u = yn(T, c + 2, b).times(o + '')), - (g = Ke(new T(n + '.' + t.slice(1)), c - h).plus(u)), - (T.precision = b), - r == null ? y(g, b, S, (w = !0)) : g - ); - for (p = g, l = s = g = L(g.minus(1), g.plus(1), c, 1), d = y(g.times(g), c, 1), i = 3; ; ) { - if (((s = y(s.times(d), c, 1)), (u = l.plus(L(s, new T(i), c, 1))), J(u.d).slice(0, c) === J(l.d).slice(0, c))) - if ( - ((l = l.times(2)), - o !== 0 && (l = l.plus(yn(T, c + 2, b).times(o + ''))), - (l = L(l, new T(f), c, 1)), - r == null) - ) - if (lt(l.d, c - h, S, a)) - ((T.precision = c += h), - (u = s = g = L(p.minus(1), p.plus(1), c, 1)), - (d = y(g.times(g), c, 1)), - (i = a = 1)); - else return y(l, (T.precision = b), S, (w = !0)); - else return ((T.precision = b), l); - ((l = u), (i += 2)); - } -} -function Ys(e) { - return String((e.s * e.s) / 0); -} -function fn(e, r) { - var t, n, i; - for ( - (t = r.indexOf('.')) > -1 && (r = r.replace('.', '')), - (n = r.search(/e/i)) > 0 - ? (t < 0 && (t = n), (t += +r.slice(n + 1)), (r = r.substring(0, n))) - : t < 0 && (t = r.length), - n = 0; - r.charCodeAt(n) === 48; - n++ - ); - for (i = r.length; r.charCodeAt(i - 1) === 48; --i); - if (((r = r.slice(n, i)), r)) { - if (((i -= n), (e.e = t = t - n - 1), (e.d = []), (n = (t + 1) % E), t < 0 && (n += E), n < i)) { - for (n && e.d.push(+r.slice(0, n)), i -= E; n < i; ) e.d.push(+r.slice(n, (n += E))); - ((r = r.slice(n)), (n = E - r.length)); - } else n -= i; - for (; n--; ) r += '0'; - (e.d.push(+r), - w && - (e.e > e.constructor.maxE - ? ((e.d = null), (e.e = NaN)) - : e.e < e.constructor.minE && ((e.e = 0), (e.d = [0])))); - } else ((e.e = 0), (e.d = [0])); - return e; -} -function Cp(e, r) { - var t, n, i, o, s, a, l, u, c; - if (r.indexOf('_') > -1) { - if (((r = r.replace(/(\d)_(?=\d)/g, '$1')), Ws.test(r))) return fn(e, r); - } else if (r === 'Infinity' || r === 'NaN') return (+r || (e.s = NaN), (e.e = NaN), (e.d = null), e); - if (vp.test(r)) ((t = 16), (r = r.toLowerCase())); - else if (Pp.test(r)) t = 2; - else if (Tp.test(r)) t = 8; - else throw Error(He + r); - for ( - o = r.search(/p/i), - o > 0 ? ((l = +r.slice(o + 1)), (r = r.substring(2, o))) : (r = r.slice(2)), - o = r.indexOf('.'), - s = o >= 0, - n = e.constructor, - s && ((r = r.replace('.', '')), (a = r.length), (o = a - o), (i = Ks(n, new n(t), o, o * 2))), - u = mn(r, t, fe), - c = u.length - 1, - o = c; - u[o] === 0; - --o - ) - u.pop(); - return o < 0 - ? new n(e.s * 0) - : ((e.e = En(u, c)), - (e.d = u), - (w = !1), - s && (e = L(e, i, a * 4)), - l && (e = e.times(Math.abs(l) < 54 ? U(2, l) : Le.pow(2, l))), - (w = !0), - e); -} -function Ip(e, r) { - var t, - n = r.d.length; - if (n < 3) return r.isZero() ? r : vr(e, 2, r, r); - ((t = 1.4 * Math.sqrt(n)), (t = t > 16 ? 16 : t | 0), (r = r.times(1 / wn(5, t))), (r = vr(e, 2, r, r))); - for (var i, o = new e(5), s = new e(16), a = new e(20); t--; ) - ((i = r.times(r)), (r = r.times(o.plus(i.times(s.times(i).minus(a)))))); - return r; -} -function vr(e, r, t, n, i) { - var o, - s, - a, - l, - u = 1, - c = e.precision, - p = Math.ceil(c / E); - for (w = !1, l = t.times(t), a = new e(n); ; ) { - if ( - ((s = L(a.times(l), new e(r++ * r++), c, 1)), - (a = i ? n.plus(s) : n.minus(s)), - (n = L(s.times(l), new e(r++ * r++), c, 1)), - (s = a.plus(n)), - s.d[p] !== void 0) - ) { - for (o = p; s.d[o] === a.d[o] && o--; ); - if (o == -1) break; - } - ((o = a), (a = n), (n = s), (s = o), u++); - } - return ((w = !0), (s.d.length = p + 1), s); -} -function wn(e, r) { - for (var t = e; --r; ) t *= e; - return t; -} -function zs(e, r) { - var t, - n = r.s < 0, - i = xe(e, e.precision, 1), - o = i.times(0.5); - if (((r = r.abs()), r.lte(o))) return ((Ne = n ? 4 : 1), r); - if (((t = r.divToInt(i)), t.isZero())) Ne = n ? 3 : 2; - else { - if (((r = r.minus(t.times(i))), r.lte(o))) return ((Ne = qs(t) ? (n ? 2 : 3) : n ? 4 : 1), r); - Ne = qs(t) ? (n ? 1 : 4) : n ? 3 : 2; - } - return r.minus(i).abs(); -} -function Ji(e, r, t, n) { - var i, - o, - s, - a, - l, - u, - c, - p, - d, - f = e.constructor, - h = t !== void 0; - if ( - (h ? (ie(t, 1, Ye), n === void 0 ? (n = f.rounding) : ie(n, 0, 8)) : ((t = f.precision), (n = f.rounding)), - !e.isFinite()) - ) - c = Ys(e); - else { - for ( - c = Pe(e), - s = c.indexOf('.'), - h ? ((i = 2), r == 16 ? (t = t * 4 - 3) : r == 8 && (t = t * 3 - 2)) : (i = r), - s >= 0 && - ((c = c.replace('.', '')), - (d = new f(1)), - (d.e = c.length - s), - (d.d = mn(Pe(d), 10, i)), - (d.e = d.d.length)), - p = mn(c, 10, i), - o = l = p.length; - p[--l] == 0; - - ) - p.pop(); - if (!p[0]) c = h ? '0p+0' : '0'; - else { - if ( - (s < 0 - ? o-- - : ((e = new f(e)), (e.d = p), (e.e = o), (e = L(e, d, t, n, 0, i)), (p = e.d), (o = e.e), (u = Bs)), - (s = p[t]), - (a = i / 2), - (u = u || p[t + 1] !== void 0), - (u = - n < 4 - ? (s !== void 0 || u) && (n === 0 || n === (e.s < 0 ? 3 : 2)) - : s > a || (s === a && (n === 4 || u || (n === 6 && p[t - 1] & 1) || n === (e.s < 0 ? 8 : 7)))), - (p.length = t), - u) - ) - for (; ++p[--t] > i - 1; ) ((p[t] = 0), t || (++o, p.unshift(1))); - for (l = p.length; !p[l - 1]; --l); - for (s = 0, c = ''; s < l; s++) c += Ui.charAt(p[s]); - if (h) { - if (l > 1) - if (r == 16 || r == 8) { - for (s = r == 16 ? 4 : 3, --l; l % s; l++) c += '0'; - for (p = mn(c, i, r), l = p.length; !p[l - 1]; --l); - for (s = 1, c = '1.'; s < l; s++) c += Ui.charAt(p[s]); - } else c = c.charAt(0) + '.' + c.slice(1); - c = c + (o < 0 ? 'p' : 'p+') + o; - } else if (o < 0) { - for (; ++o; ) c = '0' + c; - c = '0.' + c; - } else if (++o > l) for (o -= l; o--; ) c += '0'; - else o < l && (c = c.slice(0, o) + '.' + c.slice(o)); - } - c = (r == 16 ? '0x' : r == 2 ? '0b' : r == 8 ? '0o' : '') + c; - } - return e.s < 0 ? '-' + c : c; -} -function Vs(e, r) { - if (e.length > r) return ((e.length = r), !0); -} -function Dp(e) { - return new this(e).abs(); -} -function Op(e) { - return new this(e).acos(); -} -function kp(e) { - return new this(e).acosh(); -} -function _p(e, r) { - return new this(e).plus(r); -} -function Np(e) { - return new this(e).asin(); -} -function Lp(e) { - return new this(e).asinh(); -} -function Fp(e) { - return new this(e).atan(); -} -function Mp(e) { - return new this(e).atanh(); -} -function $p(e, r) { - ((e = new this(e)), (r = new this(r))); - var t, - n = this.precision, - i = this.rounding, - o = n + 4; - return ( - !e.s || !r.s - ? (t = new this(NaN)) - : !e.d && !r.d - ? ((t = xe(this, o, 1).times(r.s > 0 ? 0.25 : 0.75)), (t.s = e.s)) - : !r.d || e.isZero() - ? ((t = r.s < 0 ? xe(this, n, i) : new this(0)), (t.s = e.s)) - : !e.d || r.isZero() - ? ((t = xe(this, o, 1).times(0.5)), (t.s = e.s)) - : r.s < 0 - ? ((this.precision = o), - (this.rounding = 1), - (t = this.atan(L(e, r, o, 1))), - (r = xe(this, o, 1)), - (this.precision = n), - (this.rounding = i), - (t = e.s < 0 ? t.minus(r) : t.plus(r))) - : (t = this.atan(L(e, r, o, 1))), - t - ); -} -function qp(e) { - return new this(e).cbrt(); -} -function Vp(e) { - return y((e = new this(e)), e.e + 1, 2); -} -function jp(e, r, t) { - return new this(e).clamp(r, t); -} -function Bp(e) { - if (!e || typeof e != 'object') throw Error(bn + 'Object expected'); - var r, - t, - n, - i = e.defaults === !0, - o = [ - 'precision', - 1, - Ye, - 'rounding', - 0, - 8, - 'toExpNeg', - -Pr, - 0, - 'toExpPos', - 0, - Pr, - 'maxE', - 0, - Pr, - 'minE', - -Pr, - 0, - 'modulo', - 0, - 9, - ]; - for (r = 0; r < o.length; r += 3) - if (((t = o[r]), i && (this[t] = Gi[t]), (n = e[t]) !== void 0)) - if (X(n) === n && n >= o[r + 1] && n <= o[r + 2]) this[t] = n; - else throw Error(He + t + ': ' + n); - if (((t = 'crypto'), i && (this[t] = Gi[t]), (n = e[t]) !== void 0)) - if (n === !0 || n === !1 || n === 0 || n === 1) - if (n) - if (typeof crypto < 'u' && crypto && (crypto.getRandomValues || crypto.randomBytes)) this[t] = !0; - else throw Error(Gs); - else this[t] = !1; - else throw Error(He + t + ': ' + n); - return this; -} -function Up(e) { - return new this(e).cos(); -} -function Gp(e) { - return new this(e).cosh(); -} -function Zs(e) { - var r, t, n; - function i(o) { - var s, - a, - l, - u = this; - if (!(u instanceof i)) return new i(o); - if (((u.constructor = i), js(o))) { - ((u.s = o.s), - w - ? !o.d || o.e > i.maxE - ? ((u.e = NaN), (u.d = null)) - : o.e < i.minE - ? ((u.e = 0), (u.d = [0])) - : ((u.e = o.e), (u.d = o.d.slice())) - : ((u.e = o.e), (u.d = o.d ? o.d.slice() : o.d))); - return; - } - if (((l = typeof o), l === 'number')) { - if (o === 0) { - ((u.s = 1 / o < 0 ? -1 : 1), (u.e = 0), (u.d = [0])); - return; - } - if ((o < 0 ? ((o = -o), (u.s = -1)) : (u.s = 1), o === ~~o && o < 1e7)) { - for (s = 0, a = o; a >= 10; a /= 10) s++; - w - ? s > i.maxE - ? ((u.e = NaN), (u.d = null)) - : s < i.minE - ? ((u.e = 0), (u.d = [0])) - : ((u.e = s), (u.d = [o])) - : ((u.e = s), (u.d = [o])); - return; - } - if (o * 0 !== 0) { - (o || (u.s = NaN), (u.e = NaN), (u.d = null)); - return; - } - return fn(u, o.toString()); - } - if (l === 'string') - return ( - (a = o.charCodeAt(0)) === 45 ? ((o = o.slice(1)), (u.s = -1)) : (a === 43 && (o = o.slice(1)), (u.s = 1)), - Ws.test(o) ? fn(u, o) : Cp(u, o) - ); - if (l === 'bigint') return (o < 0 ? ((o = -o), (u.s = -1)) : (u.s = 1), fn(u, o.toString())); - throw Error(He + o); - } - if ( - ((i.prototype = m), - (i.ROUND_UP = 0), - (i.ROUND_DOWN = 1), - (i.ROUND_CEIL = 2), - (i.ROUND_FLOOR = 3), - (i.ROUND_HALF_UP = 4), - (i.ROUND_HALF_DOWN = 5), - (i.ROUND_HALF_EVEN = 6), - (i.ROUND_HALF_CEIL = 7), - (i.ROUND_HALF_FLOOR = 8), - (i.EUCLID = 9), - (i.config = i.set = Bp), - (i.clone = Zs), - (i.isDecimal = js), - (i.abs = Dp), - (i.acos = Op), - (i.acosh = kp), - (i.add = _p), - (i.asin = Np), - (i.asinh = Lp), - (i.atan = Fp), - (i.atanh = Mp), - (i.atan2 = $p), - (i.cbrt = qp), - (i.ceil = Vp), - (i.clamp = jp), - (i.cos = Up), - (i.cosh = Gp), - (i.div = Qp), - (i.exp = Wp), - (i.floor = Jp), - (i.hypot = Kp), - (i.ln = Hp), - (i.log = Yp), - (i.log10 = Zp), - (i.log2 = zp), - (i.max = Xp), - (i.min = ed), - (i.mod = rd), - (i.mul = td), - (i.pow = nd), - (i.random = id), - (i.round = od), - (i.sign = sd), - (i.sin = ad), - (i.sinh = ld), - (i.sqrt = ud), - (i.sub = cd), - (i.sum = pd), - (i.tan = dd), - (i.tanh = md), - (i.trunc = fd), - e === void 0 && (e = {}), - e && e.defaults !== !0) - ) - for ( - n = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'maxE', 'minE', 'modulo', 'crypto'], r = 0; - r < n.length; - - ) - e.hasOwnProperty((t = n[r++])) || (e[t] = this[t]); - return (i.config(e), i); -} -function Qp(e, r) { - return new this(e).div(r); -} -function Wp(e) { - return new this(e).exp(); -} -function Jp(e) { - return y((e = new this(e)), e.e + 1, 3); -} -function Kp() { - var e, - r, - t = new this(0); - for (w = !1, e = 0; e < arguments.length; ) - if (((r = new this(arguments[e++])), r.d)) t.d && (t = t.plus(r.times(r))); - else { - if (r.s) return ((w = !0), new this(1 / 0)); - t = r; - } - return ((w = !0), t.sqrt()); -} -function js(e) { - return e instanceof Le || (e && e.toStringTag === Qs) || !1; -} -function Hp(e) { - return new this(e).ln(); -} -function Yp(e, r) { - return new this(e).log(r); -} -function zp(e) { - return new this(e).log(2); -} -function Zp(e) { - return new this(e).log(10); -} -function Xp() { - return Hs(this, arguments, -1); -} -function ed() { - return Hs(this, arguments, 1); -} -function rd(e, r) { - return new this(e).mod(r); -} -function td(e, r) { - return new this(e).mul(r); -} -function nd(e, r) { - return new this(e).pow(r); -} -function id(e) { - var r, - t, - n, - i, - o = 0, - s = new this(1), - a = []; - if ((e === void 0 ? (e = this.precision) : ie(e, 1, Ye), (n = Math.ceil(e / E)), this.crypto)) - if (crypto.getRandomValues) - for (r = crypto.getRandomValues(new Uint32Array(n)); o < n; ) - ((i = r[o]), i >= 429e7 ? (r[o] = crypto.getRandomValues(new Uint32Array(1))[0]) : (a[o++] = i % 1e7)); - else if (crypto.randomBytes) { - for (r = crypto.randomBytes((n *= 4)); o < n; ) - ((i = r[o] + (r[o + 1] << 8) + (r[o + 2] << 16) + ((r[o + 3] & 127) << 24)), - i >= 214e7 ? crypto.randomBytes(4).copy(r, o) : (a.push(i % 1e7), (o += 4))); - o = n / 4; - } else throw Error(Gs); - else for (; o < n; ) a[o++] = (Math.random() * 1e7) | 0; - for (n = a[--o], e %= E, n && e && ((i = U(10, E - e)), (a[o] = ((n / i) | 0) * i)); a[o] === 0; o--) a.pop(); - if (o < 0) ((t = 0), (a = [0])); - else { - for (t = -1; a[0] === 0; t -= E) a.shift(); - for (n = 1, i = a[0]; i >= 10; i /= 10) n++; - n < E && (t -= E - n); - } - return ((s.e = t), (s.d = a), s); -} -function od(e) { - return y((e = new this(e)), e.e + 1, this.rounding); -} -function sd(e) { - return ((e = new this(e)), e.d ? (e.d[0] ? e.s : 0 * e.s) : e.s || NaN); -} -function ad(e) { - return new this(e).sin(); -} -function ld(e) { - return new this(e).sinh(); -} -function ud(e) { - return new this(e).sqrt(); -} -function cd(e, r) { - return new this(e).sub(r); -} -function pd() { - var e = 0, - r = arguments, - t = new this(r[e]); - for (w = !1; t.s && ++e < r.length; ) t = t.plus(r[e]); - return ((w = !0), y(t, this.precision, this.rounding)); -} -function dd(e) { - return new this(e).tan(); -} -function md(e) { - return new this(e).tanh(); -} -function fd(e) { - return y((e = new this(e)), e.e + 1, 1); -} -m[Symbol.for('nodejs.util.inspect.custom')] = m.toString; -m[Symbol.toStringTag] = 'Decimal'; -var Le = (m.constructor = Zs(Gi)); -gn = new Le(gn); -hn = new Le(hn); -var Fe = Le; -function Tr(e) { - return Le.isDecimal(e) - ? !0 - : e !== null && - typeof e == 'object' && - typeof e.s == 'number' && - typeof e.e == 'number' && - typeof e.toFixed == 'function' && - Array.isArray(e.d); -} -var ut = {}; -tr(ut, { ModelAction: () => Sr, datamodelEnumToSchemaEnum: () => gd }); -function gd(e) { - return { name: e.name, values: e.values.map((r) => r.name) }; -} -var Sr = ((b) => ( - (b.findUnique = 'findUnique'), - (b.findUniqueOrThrow = 'findUniqueOrThrow'), - (b.findFirst = 'findFirst'), - (b.findFirstOrThrow = 'findFirstOrThrow'), - (b.findMany = 'findMany'), - (b.create = 'create'), - (b.createMany = 'createMany'), - (b.createManyAndReturn = 'createManyAndReturn'), - (b.update = 'update'), - (b.updateMany = 'updateMany'), - (b.updateManyAndReturn = 'updateManyAndReturn'), - (b.upsert = 'upsert'), - (b.delete = 'delete'), - (b.deleteMany = 'deleteMany'), - (b.groupBy = 'groupBy'), - (b.count = 'count'), - (b.aggregate = 'aggregate'), - (b.findRaw = 'findRaw'), - (b.aggregateRaw = 'aggregateRaw'), - b -))(Sr || {}); -var na = A(Di()); -var ta = A(require('node:fs')); -var Xs = { - keyword: De, - entity: De, - value: (e) => W(nr(e)), - punctuation: nr, - directive: De, - function: De, - variable: (e) => W(nr(e)), - string: (e) => W(qe(e)), - boolean: Ie, - number: De, - comment: Kr, -}; -var hd = (e) => e, - xn = {}, - yd = 0, - P = { - manual: xn.Prism && xn.Prism.manual, - disableWorkerMessageHandler: xn.Prism && xn.Prism.disableWorkerMessageHandler, - util: { - encode: function (e) { - if (e instanceof ge) { - let r = e; - return new ge(r.type, P.util.encode(r.content), r.alias); - } else - return Array.isArray(e) - ? e.map(P.util.encode) - : e - .replace(/&/g, '&') - .replace(/ e.length) return; - if (Ae instanceof ge) continue; - if (me && j != r.length - 1) { - S.lastIndex = te; - var p = S.exec(e); - if (!p) break; - var c = p.index + (O ? p[1].length : 0), - d = p.index + p[0].length, - a = j, - l = te; - for (let _ = r.length; a < _ && (l < d || (!r[a].type && !r[a - 1].greedy)); ++a) - ((l += r[a].length), c >= l && (++j, (te = l))); - if (r[j] instanceof ge) continue; - ((u = a - j), (Ae = e.slice(te, l)), (p.index -= te)); - } else { - S.lastIndex = 0; - var p = S.exec(Ae), - u = 1; - } - if (!p) { - if (o) break; - continue; - } - O && (ae = p[1] ? p[1].length : 0); - var c = p.index + ae, - p = p[0].slice(ae), - d = c + p.length, - f = Ae.slice(0, c), - h = Ae.slice(d); - let K = [j, u]; - f && (++j, (te += f.length), K.push(f)); - let fr = new ge(g, b ? P.tokenize(p, b) : p, Jr, p, me); - if ( - (K.push(fr), - h && K.push(h), - Array.prototype.splice.apply(r, K), - u != 1 && P.matchGrammar(e, r, t, j, te, !0, g), - o) - ) - break; - } - } - } - }, - tokenize: function (e, r) { - let t = [e], - n = r.rest; - if (n) { - for (let i in n) r[i] = n[i]; - delete r.rest; - } - return (P.matchGrammar(e, t, r, 0, 0, !1), t); - }, - hooks: { - all: {}, - add: function (e, r) { - let t = P.hooks.all; - ((t[e] = t[e] || []), t[e].push(r)); - }, - run: function (e, r) { - let t = P.hooks.all[e]; - if (!(!t || !t.length)) for (var n = 0, i; (i = t[n++]); ) i(r); - }, - }, - Token: ge, - }; -P.languages.clike = { - comment: [ - { pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0 }, - { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }, - ], - string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: !0 }, - 'class-name': { - pattern: /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i, - lookbehind: !0, - inside: { punctuation: /[.\\]/ }, - }, - keyword: /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/, - boolean: /\b(?:true|false)\b/, - function: /\w+(?=\()/, - number: /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i, - operator: /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/, - punctuation: /[{}[\];(),.:]/, -}; -P.languages.javascript = P.languages.extend('clike', { - 'class-name': [ - P.languages.clike['class-name'], - { - pattern: /(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/, - lookbehind: !0, - }, - ], - keyword: [ - { pattern: /((?:^|})\s*)(?:catch|finally)\b/, lookbehind: !0 }, - { - pattern: - /(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, - lookbehind: !0, - }, - ], - number: - /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/, - function: /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, - operator: /-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/, -}); -P.languages.javascript['class-name'][0].pattern = - /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/; -P.languages.insertBefore('javascript', 'keyword', { - regex: { - pattern: - /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/, - lookbehind: !0, - greedy: !0, - }, - 'function-variable': { - pattern: - /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/, - alias: 'function', - }, - parameter: [ - { - pattern: /(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/, - lookbehind: !0, - inside: P.languages.javascript, - }, - { pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i, inside: P.languages.javascript }, - { pattern: /(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/, lookbehind: !0, inside: P.languages.javascript }, - { - pattern: - /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/, - lookbehind: !0, - inside: P.languages.javascript, - }, - ], - constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/, -}); -P.languages.markup && P.languages.markup.tag.addInlined('script', 'javascript'); -P.languages.js = P.languages.javascript; -P.languages.typescript = P.languages.extend('javascript', { - keyword: - /\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/, - builtin: /\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/, -}); -P.languages.ts = P.languages.typescript; -function ge(e, r, t, n, i) { - ((this.type = e), (this.content = r), (this.alias = t), (this.length = (n || '').length | 0), (this.greedy = !!i)); -} -ge.stringify = function (e, r) { - return typeof e == 'string' - ? e - : Array.isArray(e) - ? e - .map(function (t) { - return ge.stringify(t, r); - }) - .join('') - : bd(e.type)(e.content); -}; -function bd(e) { - return Xs[e] || hd; -} -function ea(e) { - return Ed(e, P.languages.javascript); -} -function Ed(e, r) { - return P.tokenize(e, r) - .map((n) => ge.stringify(n)) - .join(''); -} -function ra(e) { - return Ci(e); -} -var Pn = class e { - firstLineNumber; - lines; - static read(r) { - let t; - try { - t = ta.default.readFileSync(r, 'utf-8'); - } catch { - return null; - } - return e.fromContent(t); - } - static fromContent(r) { - let t = r.split(/\r?\n/); - return new e(1, t); - } - constructor(r, t) { - ((this.firstLineNumber = r), (this.lines = t)); - } - get lastLineNumber() { - return this.firstLineNumber + this.lines.length - 1; - } - mapLineAt(r, t) { - if (r < this.firstLineNumber || r > this.lines.length + this.firstLineNumber) return this; - let n = r - this.firstLineNumber, - i = [...this.lines]; - return ((i[n] = t(i[n])), new e(this.firstLineNumber, i)); - } - mapLines(r) { - return new e( - this.firstLineNumber, - this.lines.map((t, n) => r(t, this.firstLineNumber + n)) - ); - } - lineAt(r) { - return this.lines[r - this.firstLineNumber]; - } - prependSymbolAt(r, t) { - return this.mapLines((n, i) => (i === r ? `${t} ${n}` : ` ${n}`)); - } - slice(r, t) { - let n = this.lines.slice(r - 1, t).join(` -`); - return new e( - r, - ra(n).split(` -`) - ); - } - highlight() { - let r = ea(this.toString()); - return new e( - this.firstLineNumber, - r.split(` -`) - ); - } - toString() { - return this.lines.join(` -`); - } -}; -var wd = { red: ce, gray: Kr, dim: Ce, bold: W, underline: Y, highlightSource: (e) => e.highlight() }, - xd = { red: (e) => e, gray: (e) => e, dim: (e) => e, bold: (e) => e, underline: (e) => e, highlightSource: (e) => e }; -function Pd({ message: e, originalMethod: r, isPanic: t, callArguments: n }) { - return { functionName: `prisma.${r}()`, message: e, isPanic: t ?? !1, callArguments: n }; -} -function vd({ callsite: e, message: r, originalMethod: t, isPanic: n, callArguments: i }, o) { - let s = Pd({ message: r, originalMethod: t, isPanic: n, callArguments: i }); - if (!e || typeof window < 'u' || process.env.NODE_ENV === 'production') return s; - let a = e.getLocation(); - if (!a || !a.lineNumber || !a.columnNumber) return s; - let l = Math.max(1, a.lineNumber - 3), - u = Pn.read(a.fileName)?.slice(l, a.lineNumber), - c = u?.lineAt(a.lineNumber); - if (u && c) { - let p = Sd(c), - d = Td(c); - if (!d) return s; - ((s.functionName = `${d.code})`), - (s.location = a), - n || (u = u.mapLineAt(a.lineNumber, (h) => h.slice(0, d.openingBraceIndex))), - (u = o.highlightSource(u))); - let f = String(u.lastLineNumber).length; - if ( - ((s.contextLines = u - .mapLines((h, g) => o.gray(String(g).padStart(f)) + ' ' + h) - .mapLines((h) => o.dim(h)) - .prependSymbolAt(a.lineNumber, o.bold(o.red('\u2192')))), - i) - ) { - let h = p + f + 1; - ((h += 2), (s.callArguments = (0, na.default)(i, h).slice(h))); - } - } - return s; -} -function Td(e) { - let r = Object.keys(Sr).join('|'), - n = new RegExp(String.raw`\.(${r})\(`).exec(e); - if (n) { - let i = n.index + n[0].length, - o = e.lastIndexOf(' ', n.index) + 1; - return { code: e.slice(o, i), openingBraceIndex: i }; - } - return null; -} -function Sd(e) { - let r = 0; - for (let t = 0; t < e.length; t++) { - if (e.charAt(t) !== ' ') return r; - r++; - } - return r; -} -function Rd({ functionName: e, location: r, message: t, isPanic: n, contextLines: i, callArguments: o }, s) { - let a = [''], - l = r ? ' in' : ':'; - if ( - (n - ? (a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold('on us')}, you did nothing wrong.`)), - a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))) - : a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)), - r && a.push(s.underline(Ad(r))), - i) - ) { - a.push(''); - let u = [i.toString()]; - (o && (u.push(o), u.push(s.dim(')'))), a.push(u.join('')), o && a.push('')); - } else (a.push(''), o && a.push(o), a.push('')); - return ( - a.push(t), - a.join(` -`) - ); -} -function Ad(e) { - let r = [e.fileName]; - return (e.lineNumber && r.push(String(e.lineNumber)), e.columnNumber && r.push(String(e.columnNumber)), r.join(':')); -} -function vn(e) { - let r = e.showColors ? wd : xd, - t; - return ((t = vd(e, r)), Rd(t, r)); -} -var da = A(Ki()); -function aa(e, r, t) { - let n = la(e), - i = Cd(n), - o = Dd(i); - o ? Tn(o, r, t) : r.addErrorMessage(() => 'Unknown error'); -} -function la(e) { - return e.errors.flatMap((r) => (r.kind === 'Union' ? la(r) : [r])); -} -function Cd(e) { - let r = new Map(), - t = []; - for (let n of e) { - if (n.kind !== 'InvalidArgumentType') { - t.push(n); - continue; - } - let i = `${n.selectionPath.join('.')}:${n.argumentPath.join('.')}`, - o = r.get(i); - o - ? r.set(i, { ...n, argument: { ...n.argument, typeNames: Id(o.argument.typeNames, n.argument.typeNames) } }) - : r.set(i, n); - } - return (t.push(...r.values()), t); -} -function Id(e, r) { - return [...new Set(e.concat(r))]; -} -function Dd(e) { - return ji(e, (r, t) => { - let n = oa(r), - i = oa(t); - return n !== i ? n - i : sa(r) - sa(t); - }); -} -function oa(e) { - let r = 0; - return ( - Array.isArray(e.selectionPath) && (r += e.selectionPath.length), - Array.isArray(e.argumentPath) && (r += e.argumentPath.length), - r - ); -} -function sa(e) { - switch (e.kind) { - case 'InvalidArgumentValue': - case 'ValueTooLarge': - return 20; - case 'InvalidArgumentType': - return 10; - case 'RequiredArgumentMissing': - return -10; - default: - return 0; - } -} -var ue = class { - constructor(r, t) { - this.name = r; - this.value = t; - } - isRequired = !1; - makeRequired() { - return ((this.isRequired = !0), this); - } - write(r) { - let { - colors: { green: t }, - } = r.context; - (r.addMarginSymbol(t(this.isRequired ? '+' : '?')), - r.write(t(this.name)), - this.isRequired || r.write(t('?')), - r.write(t(': ')), - typeof this.value == 'string' ? r.write(t(this.value)) : r.write(this.value)); - } -}; -ca(); -var Rr = class { - constructor(r = 0, t) { - this.context = t; - this.currentIndent = r; - } - lines = []; - currentLine = ''; - currentIndent = 0; - marginSymbol; - afterNextNewLineCallback; - write(r) { - return (typeof r == 'string' ? (this.currentLine += r) : r.write(this), this); - } - writeJoined(r, t, n = (i, o) => o.write(i)) { - let i = t.length - 1; - for (let o = 0; o < t.length; o++) (n(t[o], this), o !== i && this.write(r)); - return this; - } - writeLine(r) { - return this.write(r).newLine(); - } - newLine() { - (this.lines.push(this.indentedCurrentLine()), (this.currentLine = ''), (this.marginSymbol = void 0)); - let r = this.afterNextNewLineCallback; - return ((this.afterNextNewLineCallback = void 0), r?.(), this); - } - withIndent(r) { - return (this.indent(), r(this), this.unindent(), this); - } - afterNextNewline(r) { - return ((this.afterNextNewLineCallback = r), this); - } - indent() { - return (this.currentIndent++, this); - } - unindent() { - return (this.currentIndent > 0 && this.currentIndent--, this); - } - addMarginSymbol(r) { - return ((this.marginSymbol = r), this); - } - toString() { - return this.lines.concat(this.indentedCurrentLine()).join(` -`); - } - getCurrentLineLength() { - return this.currentLine.length; - } - indentedCurrentLine() { - let r = this.currentLine.padStart(this.currentLine.length + 2 * this.currentIndent); - return this.marginSymbol ? this.marginSymbol + r.slice(1) : r; - } -}; -ua(); -var Sn = class { - constructor(r) { - this.value = r; - } - write(r) { - r.write(this.value); - } - markAsError() { - this.value.markAsError(); - } -}; -var Rn = (e) => e, - An = { bold: Rn, red: Rn, green: Rn, dim: Rn, enabled: !1 }, - pa = { bold: W, red: ce, green: qe, dim: Ce, enabled: !0 }, - Ar = { - write(e) { - e.writeLine(','); - }, - }; -var ve = class { - constructor(r) { - this.contents = r; - } - isUnderlined = !1; - color = (r) => r; - underline() { - return ((this.isUnderlined = !0), this); - } - setColor(r) { - return ((this.color = r), this); - } - write(r) { - let t = r.getCurrentLineLength(); - (r.write(this.color(this.contents)), - this.isUnderlined && - r.afterNextNewline(() => { - r.write(' '.repeat(t)).writeLine(this.color('~'.repeat(this.contents.length))); - })); - } -}; -var ze = class { - hasError = !1; - markAsError() { - return ((this.hasError = !0), this); - } -}; -var Cr = class extends ze { - items = []; - addItem(r) { - return (this.items.push(new Sn(r)), this); - } - getField(r) { - return this.items[r]; - } - getPrintWidth() { - return this.items.length === 0 ? 2 : Math.max(...this.items.map((t) => t.value.getPrintWidth())) + 2; - } - write(r) { - if (this.items.length === 0) { - this.writeEmpty(r); - return; - } - this.writeWithItems(r); - } - writeEmpty(r) { - let t = new ve('[]'); - (this.hasError && t.setColor(r.context.colors.red).underline(), r.write(t)); - } - writeWithItems(r) { - let { colors: t } = r.context; - (r - .writeLine('[') - .withIndent(() => r.writeJoined(Ar, this.items).newLine()) - .write(']'), - this.hasError && - r.afterNextNewline(() => { - r.writeLine(t.red('~'.repeat(this.getPrintWidth()))); - })); - } - asObject() {} -}; -var Ir = class e extends ze { - fields = {}; - suggestions = []; - addField(r) { - this.fields[r.name] = r; - } - addSuggestion(r) { - this.suggestions.push(r); - } - getField(r) { - return this.fields[r]; - } - getDeepField(r) { - let [t, ...n] = r, - i = this.getField(t); - if (!i) return; - let o = i; - for (let s of n) { - let a; - if ( - (o.value instanceof e ? (a = o.value.getField(s)) : o.value instanceof Cr && (a = o.value.getField(Number(s))), - !a) - ) - return; - o = a; - } - return o; - } - getDeepFieldValue(r) { - return r.length === 0 ? this : this.getDeepField(r)?.value; - } - hasField(r) { - return !!this.getField(r); - } - removeAllFields() { - this.fields = {}; - } - removeField(r) { - delete this.fields[r]; - } - getFields() { - return this.fields; - } - isEmpty() { - return Object.keys(this.fields).length === 0; - } - getFieldValue(r) { - return this.getField(r)?.value; - } - getDeepSubSelectionValue(r) { - let t = this; - for (let n of r) { - if (!(t instanceof e)) return; - let i = t.getSubSelectionValue(n); - if (!i) return; - t = i; - } - return t; - } - getDeepSelectionParent(r) { - let t = this.getSelectionParent(); - if (!t) return; - let n = t; - for (let i of r) { - let o = n.value.getFieldValue(i); - if (!o || !(o instanceof e)) return; - let s = o.getSelectionParent(); - if (!s) return; - n = s; - } - return n; - } - getSelectionParent() { - let r = this.getField('select')?.value.asObject(); - if (r) return { kind: 'select', value: r }; - let t = this.getField('include')?.value.asObject(); - if (t) return { kind: 'include', value: t }; - } - getSubSelectionValue(r) { - return this.getSelectionParent()?.value.fields[r].value; - } - getPrintWidth() { - let r = Object.values(this.fields); - return r.length == 0 ? 2 : Math.max(...r.map((n) => n.getPrintWidth())) + 2; - } - write(r) { - let t = Object.values(this.fields); - if (t.length === 0 && this.suggestions.length === 0) { - this.writeEmpty(r); - return; - } - this.writeWithContents(r, t); - } - asObject() { - return this; - } - writeEmpty(r) { - let t = new ve('{}'); - (this.hasError && t.setColor(r.context.colors.red).underline(), r.write(t)); - } - writeWithContents(r, t) { - (r.writeLine('{').withIndent(() => { - r.writeJoined(Ar, [...t, ...this.suggestions]).newLine(); - }), - r.write('}'), - this.hasError && - r.afterNextNewline(() => { - r.writeLine(r.context.colors.red('~'.repeat(this.getPrintWidth()))); - })); - } -}; -var Q = class extends ze { - constructor(t) { - super(); - this.text = t; - } - getPrintWidth() { - return this.text.length; - } - write(t) { - let n = new ve(this.text); - (this.hasError && n.underline().setColor(t.context.colors.red), t.write(n)); - } - asObject() {} -}; -var ct = class { - fields = []; - addField(r, t) { - return ( - this.fields.push({ - write(n) { - let { green: i, dim: o } = n.context.colors; - n.write(i(o(`${r}: ${t}`))).addMarginSymbol(i(o('+'))); - }, - }), - this - ); - } - write(r) { - let { - colors: { green: t }, - } = r.context; - r.writeLine(t('{')) - .withIndent(() => { - r.writeJoined(Ar, this.fields).newLine(); - }) - .write(t('}')) - .addMarginSymbol(t('+')); - } -}; -function Tn(e, r, t) { - switch (e.kind) { - case 'MutuallyExclusiveFields': - Od(e, r); - break; - case 'IncludeOnScalar': - kd(e, r); - break; - case 'EmptySelection': - _d(e, r, t); - break; - case 'UnknownSelectionField': - Md(e, r); - break; - case 'InvalidSelectionValue': - $d(e, r); - break; - case 'UnknownArgument': - qd(e, r); - break; - case 'UnknownInputField': - Vd(e, r); - break; - case 'RequiredArgumentMissing': - jd(e, r); - break; - case 'InvalidArgumentType': - Bd(e, r); - break; - case 'InvalidArgumentValue': - Ud(e, r); - break; - case 'ValueTooLarge': - Gd(e, r); - break; - case 'SomeFieldsMissing': - Qd(e, r); - break; - case 'TooManyFieldsGiven': - Wd(e, r); - break; - case 'Union': - aa(e, r, t); - break; - default: - throw new Error('not implemented: ' + e.kind); - } -} -function Od(e, r) { - let t = r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - (t && (t.getField(e.firstField)?.markAsError(), t.getField(e.secondField)?.markAsError()), - r.addErrorMessage( - (n) => - `Please ${n.bold('either')} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red('not both')} at the same time.` - )); -} -function kd(e, r) { - let [t, n] = Dr(e.selectionPath), - i = e.outputType, - o = r.arguments.getDeepSelectionParent(t)?.value; - if (o && (o.getField(n)?.markAsError(), i)) - for (let s of i.fields) s.isRelation && o.addSuggestion(new ue(s.name, 'true')); - r.addErrorMessage((s) => { - let a = `Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold('include')} statement`; - return ( - i ? (a += ` on model ${s.bold(i.name)}. ${pt(s)}`) : (a += '.'), - (a += ` -Note that ${s.bold('include')} statements only accept relation fields.`), - a - ); - }); -} -function _d(e, r, t) { - let n = r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - if (n) { - let i = n.getField('omit')?.value.asObject(); - if (i) { - Nd(e, r, i); - return; - } - if (n.hasField('select')) { - Ld(e, r); - return; - } - } - if (t?.[We(e.outputType.name)]) { - Fd(e, r); - return; - } - r.addErrorMessage(() => `Unknown field at "${e.selectionPath.join('.')} selection"`); -} -function Nd(e, r, t) { - t.removeAllFields(); - for (let n of e.outputType.fields) t.addSuggestion(new ue(n.name, 'false')); - r.addErrorMessage( - (n) => - `The ${n.red('omit')} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result` - ); -} -function Ld(e, r) { - let t = e.outputType, - n = r.arguments.getDeepSelectionParent(e.selectionPath)?.value, - i = n?.isEmpty() ?? !1; - (n && (n.removeAllFields(), ga(n, t)), - r.addErrorMessage((o) => - i - ? `The ${o.red('`select`')} statement for type ${o.bold(t.name)} must not be empty. ${pt(o)}` - : `The ${o.red('`select`')} statement for type ${o.bold(t.name)} needs ${o.bold('at least one truthy value')}.` - )); -} -function Fd(e, r) { - let t = new ct(); - for (let i of e.outputType.fields) i.isRelation || t.addField(i.name, 'false'); - let n = new ue('omit', t).makeRequired(); - if (e.selectionPath.length === 0) r.arguments.addSuggestion(n); - else { - let [i, o] = Dr(e.selectionPath), - a = r.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o); - if (a) { - let l = a?.value.asObject() ?? new Ir(); - (l.addSuggestion(n), (a.value = l)); - } - } - r.addErrorMessage( - (i) => - `The global ${i.red('omit')} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result` - ); -} -function Md(e, r) { - let t = ha(e.selectionPath, r); - if (t.parentKind !== 'unknown') { - t.field.markAsError(); - let n = t.parent; - switch (t.parentKind) { - case 'select': - ga(n, e.outputType); - break; - case 'include': - Jd(n, e.outputType); - break; - case 'omit': - Kd(n, e.outputType); - break; - } - } - r.addErrorMessage((n) => { - let i = [`Unknown field ${n.red(`\`${t.fieldName}\``)}`]; - return ( - t.parentKind !== 'unknown' && i.push(`for ${n.bold(t.parentKind)} statement`), - i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`), - i.push(pt(n)), - i.join(' ') - ); - }); -} -function $d(e, r) { - let t = ha(e.selectionPath, r); - (t.parentKind !== 'unknown' && t.field.value.markAsError(), - r.addErrorMessage((n) => `Invalid value for selection field \`${n.red(t.fieldName)}\`: ${e.underlyingError}`)); -} -function qd(e, r) { - let t = e.argumentPath[0], - n = r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - (n && (n.getField(t)?.markAsError(), Hd(n, e.arguments)), - r.addErrorMessage((i) => - ma( - i, - t, - e.arguments.map((o) => o.name) - ) - )); -} -function Vd(e, r) { - let [t, n] = Dr(e.argumentPath), - i = r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - if (i) { - i.getDeepField(e.argumentPath)?.markAsError(); - let o = i.getDeepFieldValue(t)?.asObject(); - o && ya(o, e.inputType); - } - r.addErrorMessage((o) => - ma( - o, - n, - e.inputType.fields.map((s) => s.name) - ) - ); -} -function ma(e, r, t) { - let n = [`Unknown argument \`${e.red(r)}\`.`], - i = zd(r, t); - return (i && n.push(`Did you mean \`${e.green(i)}\`?`), t.length > 0 && n.push(pt(e)), n.join(' ')); -} -function jd(e, r) { - let t; - r.addErrorMessage((l) => - t?.value instanceof Q && t.value.text === 'null' - ? `Argument \`${l.green(o)}\` must not be ${l.red('null')}.` - : `Argument \`${l.green(o)}\` is missing.` - ); - let n = r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - if (!n) return; - let [i, o] = Dr(e.argumentPath), - s = new ct(), - a = n.getDeepFieldValue(i)?.asObject(); - if (a) { - if (((t = a.getField(o)), t && a.removeField(o), e.inputTypes.length === 1 && e.inputTypes[0].kind === 'object')) { - for (let l of e.inputTypes[0].fields) s.addField(l.name, l.typeNames.join(' | ')); - a.addSuggestion(new ue(o, s).makeRequired()); - } else { - let l = e.inputTypes.map(fa).join(' | '); - a.addSuggestion(new ue(o, l).makeRequired()); - } - if (e.dependentArgumentPath) { - n.getDeepField(e.dependentArgumentPath)?.markAsError(); - let [, l] = Dr(e.dependentArgumentPath); - r.addErrorMessage( - (u) => `Argument \`${u.green(o)}\` is required because argument \`${u.green(l)}\` was provided.` - ); - } - } -} -function fa(e) { - return e.kind === 'list' ? `${fa(e.elementType)}[]` : e.name; -} -function Bd(e, r) { - let t = e.argument.name, - n = r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - (n && n.getDeepFieldValue(e.argumentPath)?.markAsError(), - r.addErrorMessage((i) => { - let o = Cn( - 'or', - e.argument.typeNames.map((s) => i.green(s)) - ); - return `Argument \`${i.bold(t)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`; - })); -} -function Ud(e, r) { - let t = e.argument.name, - n = r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - (n && n.getDeepFieldValue(e.argumentPath)?.markAsError(), - r.addErrorMessage((i) => { - let o = [`Invalid value for argument \`${i.bold(t)}\``]; - if ((e.underlyingError && o.push(`: ${e.underlyingError}`), o.push('.'), e.argument.typeNames.length > 0)) { - let s = Cn( - 'or', - e.argument.typeNames.map((a) => i.green(a)) - ); - o.push(` Expected ${s}.`); - } - return o.join(''); - })); -} -function Gd(e, r) { - let t = e.argument.name, - n = r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(), - i; - if (n) { - let s = n.getDeepField(e.argumentPath)?.value; - (s?.markAsError(), s instanceof Q && (i = s.text)); - } - r.addErrorMessage((o) => { - let s = ['Unable to fit value']; - return (i && s.push(o.red(i)), s.push(`into a 64-bit signed integer for field \`${o.bold(t)}\``), s.join(' ')); - }); -} -function Qd(e, r) { - let t = e.argumentPath[e.argumentPath.length - 1], - n = r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - if (n) { - let i = n.getDeepFieldValue(e.argumentPath)?.asObject(); - i && ya(i, e.inputType); - } - r.addErrorMessage((i) => { - let o = [`Argument \`${i.bold(t)}\` of type ${i.bold(e.inputType.name)} needs`]; - return ( - e.constraints.minFieldCount === 1 - ? e.constraints.requiredFields - ? o.push( - `${i.green('at least one of')} ${Cn( - 'or', - e.constraints.requiredFields.map((s) => `\`${i.bold(s)}\``) - )} arguments.` - ) - : o.push(`${i.green('at least one')} argument.`) - : o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`), - o.push(pt(i)), - o.join(' ') - ); - }); -} -function Wd(e, r) { - let t = e.argumentPath[e.argumentPath.length - 1], - n = r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(), - i = []; - if (n) { - let o = n.getDeepFieldValue(e.argumentPath)?.asObject(); - o && (o.markAsError(), (i = Object.keys(o.getFields()))); - } - r.addErrorMessage((o) => { - let s = [`Argument \`${o.bold(t)}\` of type ${o.bold(e.inputType.name)} needs`]; - return ( - e.constraints.minFieldCount === 1 && e.constraints.maxFieldCount == 1 - ? s.push(`${o.green('exactly one')} argument,`) - : e.constraints.maxFieldCount == 1 - ? s.push(`${o.green('at most one')} argument,`) - : s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`), - s.push( - `but you provided ${Cn( - 'and', - i.map((a) => o.red(a)) - )}. Please choose` - ), - e.constraints.maxFieldCount === 1 ? s.push('one.') : s.push(`${e.constraints.maxFieldCount}.`), - s.join(' ') - ); - }); -} -function ga(e, r) { - for (let t of r.fields) e.hasField(t.name) || e.addSuggestion(new ue(t.name, 'true')); -} -function Jd(e, r) { - for (let t of r.fields) t.isRelation && !e.hasField(t.name) && e.addSuggestion(new ue(t.name, 'true')); -} -function Kd(e, r) { - for (let t of r.fields) !e.hasField(t.name) && !t.isRelation && e.addSuggestion(new ue(t.name, 'true')); -} -function Hd(e, r) { - for (let t of r) e.hasField(t.name) || e.addSuggestion(new ue(t.name, t.typeNames.join(' | '))); -} -function ha(e, r) { - let [t, n] = Dr(e), - i = r.arguments.getDeepSubSelectionValue(t)?.asObject(); - if (!i) return { parentKind: 'unknown', fieldName: n }; - let o = i.getFieldValue('select')?.asObject(), - s = i.getFieldValue('include')?.asObject(), - a = i.getFieldValue('omit')?.asObject(), - l = o?.getField(n); - return o && l - ? { parentKind: 'select', parent: o, field: l, fieldName: n } - : ((l = s?.getField(n)), - s && l - ? { parentKind: 'include', field: l, parent: s, fieldName: n } - : ((l = a?.getField(n)), - a && l - ? { parentKind: 'omit', field: l, parent: a, fieldName: n } - : { parentKind: 'unknown', fieldName: n })); -} -function ya(e, r) { - if (r.kind === 'object') - for (let t of r.fields) e.hasField(t.name) || e.addSuggestion(new ue(t.name, t.typeNames.join(' | '))); -} -function Dr(e) { - let r = [...e], - t = r.pop(); - if (!t) throw new Error('unexpected empty path'); - return [r, t]; -} -function pt({ green: e, enabled: r }) { - return 'Available options are ' + (r ? `listed in ${e('green')}` : 'marked with ?') + '.'; -} -function Cn(e, r) { - if (r.length === 1) return r[0]; - let t = [...r], - n = t.pop(); - return `${t.join(', ')} ${e} ${n}`; -} -var Yd = 3; -function zd(e, r) { - let t = 1 / 0, - n; - for (let i of r) { - let o = (0, da.default)(e, i); - o > Yd || (o < t && ((t = o), (n = i))); - } - return n; -} -var dt = class { - modelName; - name; - typeName; - isList; - isEnum; - constructor(r, t, n, i, o) { - ((this.modelName = r), (this.name = t), (this.typeName = n), (this.isList = i), (this.isEnum = o)); - } - _toGraphQLInputType() { - let r = this.isList ? 'List' : '', - t = this.isEnum ? 'Enum' : ''; - return `${r}${t}${this.typeName}FieldRefInput<${this.modelName}>`; - } -}; -function Or(e) { - return e instanceof dt; -} -var In = Symbol(), - Yi = new WeakMap(), - Me = class { - constructor(r) { - r === In - ? Yi.set(this, `Prisma.${this._getName()}`) - : Yi.set(this, `new Prisma.${this._getNamespace()}.${this._getName()}()`); - } - _getName() { - return this.constructor.name; - } - toString() { - return Yi.get(this); - } - }, - mt = class extends Me { - _getNamespace() { - return 'NullTypes'; - } - }, - ft = class extends mt { - #e; - }; -zi(ft, 'DbNull'); -var gt = class extends mt { - #e; -}; -zi(gt, 'JsonNull'); -var ht = class extends mt { - #e; -}; -zi(ht, 'AnyNull'); -var Dn = { - classes: { DbNull: ft, JsonNull: gt, AnyNull: ht }, - instances: { DbNull: new ft(In), JsonNull: new gt(In), AnyNull: new ht(In) }, -}; -function zi(e, r) { - Object.defineProperty(e, 'name', { value: r, configurable: !0 }); -} -var ba = ': ', - On = class { - constructor(r, t) { - this.name = r; - this.value = t; - } - hasError = !1; - markAsError() { - this.hasError = !0; - } - getPrintWidth() { - return this.name.length + this.value.getPrintWidth() + ba.length; - } - write(r) { - let t = new ve(this.name); - (this.hasError && t.underline().setColor(r.context.colors.red), r.write(t).write(ba).write(this.value)); - } - }; -var Zi = class { - arguments; - errorMessages = []; - constructor(r) { - this.arguments = r; - } - write(r) { - r.write(this.arguments); - } - addErrorMessage(r) { - this.errorMessages.push(r); - } - renderAllMessages(r) { - return this.errorMessages.map((t) => t(r)).join(` -`); - } -}; -function kr(e) { - return new Zi(Ea(e)); -} -function Ea(e) { - let r = new Ir(); - for (let [t, n] of Object.entries(e)) { - let i = new On(t, wa(n)); - r.addField(i); - } - return r; -} -function wa(e) { - if (typeof e == 'string') return new Q(JSON.stringify(e)); - if (typeof e == 'number' || typeof e == 'boolean') return new Q(String(e)); - if (typeof e == 'bigint') return new Q(`${e}n`); - if (e === null) return new Q('null'); - if (e === void 0) return new Q('undefined'); - if (Tr(e)) return new Q(`new Prisma.Decimal("${e.toFixed()}")`); - if (e instanceof Uint8Array) - return Buffer.isBuffer(e) ? new Q(`Buffer.alloc(${e.byteLength})`) : new Q(`new Uint8Array(${e.byteLength})`); - if (e instanceof Date) { - let r = dn(e) ? e.toISOString() : 'Invalid Date'; - return new Q(`new Date("${r}")`); - } - return e instanceof Me - ? new Q(`Prisma.${e._getName()}`) - : Or(e) - ? new Q(`prisma.${We(e.modelName)}.$fields.${e.name}`) - : Array.isArray(e) - ? Zd(e) - : typeof e == 'object' - ? Ea(e) - : new Q(Object.prototype.toString.call(e)); -} -function Zd(e) { - let r = new Cr(); - for (let t of e) r.addItem(wa(t)); - return r; -} -function kn(e, r) { - let t = r === 'pretty' ? pa : An, - n = e.renderAllMessages(t), - i = new Rr(0, { colors: t }).write(e).toString(); - return { message: n, args: i }; -} -function _n({ args: e, errors: r, errorFormat: t, callsite: n, originalMethod: i, clientVersion: o, globalOmit: s }) { - let a = kr(e); - for (let p of r) Tn(p, a, s); - let { message: l, args: u } = kn(a, t), - c = vn({ message: l, callsite: n, originalMethod: i, showColors: t === 'pretty', callArguments: u }); - throw new Z(c, { clientVersion: o }); -} -function Te(e) { - return e.replace(/^./, (r) => r.toLowerCase()); -} -function Pa(e, r, t) { - let n = Te(t); - return !r.result || !(r.result.$allModels || r.result[n]) - ? e - : Xd({ ...e, ...xa(r.name, e, r.result.$allModels), ...xa(r.name, e, r.result[n]) }); -} -function Xd(e) { - let r = new we(), - t = (n, i) => - r.getOrCreate(n, () => (i.has(n) ? [n] : (i.add(n), e[n] ? e[n].needs.flatMap((o) => t(o, i)) : [n]))); - return cn(e, (n) => ({ ...n, needs: t(n.name, new Set()) })); -} -function xa(e, r, t) { - return t - ? cn(t, ({ needs: n, compute: i }, o) => ({ - name: o, - needs: n ? Object.keys(n).filter((s) => n[s]) : [], - compute: em(r, o, i), - })) - : {}; -} -function em(e, r, t) { - let n = e?.[r]?.compute; - return n ? (i) => t({ ...i, [r]: n(i) }) : t; -} -function va(e, r) { - if (!r) return e; - let t = { ...e }; - for (let n of Object.values(r)) if (e[n.name]) for (let i of n.needs) t[i] = !0; - return t; -} -function Ta(e, r) { - if (!r) return e; - let t = { ...e }; - for (let n of Object.values(r)) if (!e[n.name]) for (let i of n.needs) delete t[i]; - return t; -} -var Nn = class { - constructor(r, t) { - this.extension = r; - this.previous = t; - } - computedFieldsCache = new we(); - modelExtensionsCache = new we(); - queryCallbacksCache = new we(); - clientExtensions = at(() => - this.extension.client - ? { ...this.previous?.getAllClientExtensions(), ...this.extension.client } - : this.previous?.getAllClientExtensions() - ); - batchCallbacks = at(() => { - let r = this.previous?.getAllBatchQueryCallbacks() ?? [], - t = this.extension.query?.$__internalBatch; - return t ? r.concat(t) : r; - }); - getAllComputedFields(r) { - return this.computedFieldsCache.getOrCreate(r, () => - Pa(this.previous?.getAllComputedFields(r), this.extension, r) - ); - } - getAllClientExtensions() { - return this.clientExtensions.get(); - } - getAllModelExtensions(r) { - return this.modelExtensionsCache.getOrCreate(r, () => { - let t = Te(r); - return !this.extension.model || !(this.extension.model[t] || this.extension.model.$allModels) - ? this.previous?.getAllModelExtensions(r) - : { - ...this.previous?.getAllModelExtensions(r), - ...this.extension.model.$allModels, - ...this.extension.model[t], - }; - }); - } - getAllQueryCallbacks(r, t) { - return this.queryCallbacksCache.getOrCreate(`${r}:${t}`, () => { - let n = this.previous?.getAllQueryCallbacks(r, t) ?? [], - i = [], - o = this.extension.query; - return !o || !(o[r] || o.$allModels || o[t] || o.$allOperations) - ? n - : (o[r] !== void 0 && - (o[r][t] !== void 0 && i.push(o[r][t]), o[r].$allOperations !== void 0 && i.push(o[r].$allOperations)), - r !== '$none' && - o.$allModels !== void 0 && - (o.$allModels[t] !== void 0 && i.push(o.$allModels[t]), - o.$allModels.$allOperations !== void 0 && i.push(o.$allModels.$allOperations)), - o[t] !== void 0 && i.push(o[t]), - o.$allOperations !== void 0 && i.push(o.$allOperations), - n.concat(i)); - }); - } - getAllBatchQueryCallbacks() { - return this.batchCallbacks.get(); - } - }, - _r = class e { - constructor(r) { - this.head = r; - } - static empty() { - return new e(); - } - static single(r) { - return new e(new Nn(r)); - } - isEmpty() { - return this.head === void 0; - } - append(r) { - return new e(new Nn(r, this.head)); - } - getAllComputedFields(r) { - return this.head?.getAllComputedFields(r); - } - getAllClientExtensions() { - return this.head?.getAllClientExtensions(); - } - getAllModelExtensions(r) { - return this.head?.getAllModelExtensions(r); - } - getAllQueryCallbacks(r, t) { - return this.head?.getAllQueryCallbacks(r, t) ?? []; - } - getAllBatchQueryCallbacks() { - return this.head?.getAllBatchQueryCallbacks() ?? []; - } - }; -var Ln = class { - constructor(r) { - this.name = r; - } -}; -function Sa(e) { - return e instanceof Ln; -} -function Ra(e) { - return new Ln(e); -} -var Aa = Symbol(), - yt = class { - constructor(r) { - if (r !== Aa) throw new Error('Skip instance can not be constructed directly'); - } - ifUndefined(r) { - return r === void 0 ? Fn : r; - } - }, - Fn = new yt(Aa); -function Se(e) { - return e instanceof yt; -} -var rm = { - findUnique: 'findUnique', - findUniqueOrThrow: 'findUniqueOrThrow', - findFirst: 'findFirst', - findFirstOrThrow: 'findFirstOrThrow', - findMany: 'findMany', - count: 'aggregate', - create: 'createOne', - createMany: 'createMany', - createManyAndReturn: 'createManyAndReturn', - update: 'updateOne', - updateMany: 'updateMany', - updateManyAndReturn: 'updateManyAndReturn', - upsert: 'upsertOne', - delete: 'deleteOne', - deleteMany: 'deleteMany', - executeRaw: 'executeRaw', - queryRaw: 'queryRaw', - aggregate: 'aggregate', - groupBy: 'groupBy', - runCommandRaw: 'runCommandRaw', - findRaw: 'findRaw', - aggregateRaw: 'aggregateRaw', - }, - Ca = 'explicitly `undefined` values are not allowed'; -function Mn({ - modelName: e, - action: r, - args: t, - runtimeDataModel: n, - extensions: i = _r.empty(), - callsite: o, - clientMethod: s, - errorFormat: a, - clientVersion: l, - previewFeatures: u, - globalOmit: c, -}) { - let p = new Xi({ - runtimeDataModel: n, - modelName: e, - action: r, - rootArgs: t, - callsite: o, - extensions: i, - selectionPath: [], - argumentPath: [], - originalMethod: s, - errorFormat: a, - clientVersion: l, - previewFeatures: u, - globalOmit: c, - }); - return { modelName: e, action: rm[r], query: bt(t, p) }; -} -function bt({ select: e, include: r, ...t } = {}, n) { - let i = t.omit; - return (delete t.omit, { arguments: Da(t, n), selection: tm(e, r, i, n) }); -} -function tm(e, r, t, n) { - return e - ? (r - ? n.throwValidationError({ - kind: 'MutuallyExclusiveFields', - firstField: 'include', - secondField: 'select', - selectionPath: n.getSelectionPath(), - }) - : t && - n.throwValidationError({ - kind: 'MutuallyExclusiveFields', - firstField: 'omit', - secondField: 'select', - selectionPath: n.getSelectionPath(), - }), - sm(e, n)) - : nm(n, r, t); -} -function nm(e, r, t) { - let n = {}; - return ( - e.modelOrType && !e.isRawAction() && ((n.$composites = !0), (n.$scalars = !0)), - r && im(n, r, e), - om(n, t, e), - n - ); -} -function im(e, r, t) { - for (let [n, i] of Object.entries(r)) { - if (Se(i)) continue; - let o = t.nestSelection(n); - if ((eo(i, o), i === !1 || i === void 0)) { - e[n] = !1; - continue; - } - let s = t.findField(n); - if ( - (s && - s.kind !== 'object' && - t.throwValidationError({ - kind: 'IncludeOnScalar', - selectionPath: t.getSelectionPath().concat(n), - outputType: t.getOutputTypeDescription(), - }), - s) - ) { - e[n] = bt(i === !0 ? {} : i, o); - continue; - } - if (i === !0) { - e[n] = !0; - continue; - } - e[n] = bt(i, o); - } -} -function om(e, r, t) { - let n = t.getComputedFields(), - i = { ...t.getGlobalOmit(), ...r }, - o = Ta(i, n); - for (let [s, a] of Object.entries(o)) { - if (Se(a)) continue; - eo(a, t.nestSelection(s)); - let l = t.findField(s); - (n?.[s] && !l) || (e[s] = !a); - } -} -function sm(e, r) { - let t = {}, - n = r.getComputedFields(), - i = va(e, n); - for (let [o, s] of Object.entries(i)) { - if (Se(s)) continue; - let a = r.nestSelection(o); - eo(s, a); - let l = r.findField(o); - if (!(n?.[o] && !l)) { - if (s === !1 || s === void 0 || Se(s)) { - t[o] = !1; - continue; - } - if (s === !0) { - l?.kind === 'object' ? (t[o] = bt({}, a)) : (t[o] = !0); - continue; - } - t[o] = bt(s, a); - } - } - return t; -} -function Ia(e, r) { - if (e === null) return null; - if (typeof e == 'string' || typeof e == 'number' || typeof e == 'boolean') return e; - if (typeof e == 'bigint') return { $type: 'BigInt', value: String(e) }; - if (xr(e)) { - if (dn(e)) return { $type: 'DateTime', value: e.toISOString() }; - r.throwValidationError({ - kind: 'InvalidArgumentValue', - selectionPath: r.getSelectionPath(), - argumentPath: r.getArgumentPath(), - argument: { name: r.getArgumentName(), typeNames: ['Date'] }, - underlyingError: 'Provided Date object is invalid', - }); - } - if (Sa(e)) return { $type: 'Param', value: e.name }; - if (Or(e)) return { $type: 'FieldRef', value: { _ref: e.name, _container: e.modelName } }; - if (Array.isArray(e)) return am(e, r); - if (ArrayBuffer.isView(e)) { - let { buffer: t, byteOffset: n, byteLength: i } = e; - return { $type: 'Bytes', value: Buffer.from(t, n, i).toString('base64') }; - } - if (lm(e)) return e.values; - if (Tr(e)) return { $type: 'Decimal', value: e.toFixed() }; - if (e instanceof Me) { - if (e !== Dn.instances[e._getName()]) throw new Error('Invalid ObjectEnumValue'); - return { $type: 'Enum', value: e._getName() }; - } - if (um(e)) return e.toJSON(); - if (typeof e == 'object') return Da(e, r); - r.throwValidationError({ - kind: 'InvalidArgumentValue', - selectionPath: r.getSelectionPath(), - argumentPath: r.getArgumentPath(), - argument: { name: r.getArgumentName(), typeNames: [] }, - underlyingError: `We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`, - }); -} -function Da(e, r) { - if (e.$type) return { $type: 'Raw', value: e }; - let t = {}; - for (let n in e) { - let i = e[n], - o = r.nestArgument(n); - Se(i) || - (i !== void 0 - ? (t[n] = Ia(i, o)) - : r.isPreviewFeatureOn('strictUndefinedChecks') && - r.throwValidationError({ - kind: 'InvalidArgumentValue', - argumentPath: o.getArgumentPath(), - selectionPath: r.getSelectionPath(), - argument: { name: r.getArgumentName(), typeNames: [] }, - underlyingError: Ca, - })); - } - return t; -} -function am(e, r) { - let t = []; - for (let n = 0; n < e.length; n++) { - let i = r.nestArgument(String(n)), - o = e[n]; - if (o === void 0 || Se(o)) { - let s = o === void 0 ? 'undefined' : 'Prisma.skip'; - r.throwValidationError({ - kind: 'InvalidArgumentValue', - selectionPath: i.getSelectionPath(), - argumentPath: i.getArgumentPath(), - argument: { name: `${r.getArgumentName()}[${n}]`, typeNames: [] }, - underlyingError: `Can not use \`${s}\` value within array. Use \`null\` or filter out \`${s}\` values`, - }); - } - t.push(Ia(o, i)); - } - return t; -} -function lm(e) { - return typeof e == 'object' && e !== null && e.__prismaRawParameters__ === !0; -} -function um(e) { - return typeof e == 'object' && e !== null && typeof e.toJSON == 'function'; -} -function eo(e, r) { - e === void 0 && - r.isPreviewFeatureOn('strictUndefinedChecks') && - r.throwValidationError({ kind: 'InvalidSelectionValue', selectionPath: r.getSelectionPath(), underlyingError: Ca }); -} -var Xi = class e { - constructor(r) { - this.params = r; - this.params.modelName && - (this.modelOrType = - this.params.runtimeDataModel.models[this.params.modelName] ?? - this.params.runtimeDataModel.types[this.params.modelName]); - } - modelOrType; - throwValidationError(r) { - _n({ - errors: [r], - originalMethod: this.params.originalMethod, - args: this.params.rootArgs ?? {}, - callsite: this.params.callsite, - errorFormat: this.params.errorFormat, - clientVersion: this.params.clientVersion, - globalOmit: this.params.globalOmit, - }); - } - getSelectionPath() { - return this.params.selectionPath; - } - getArgumentPath() { - return this.params.argumentPath; - } - getArgumentName() { - return this.params.argumentPath[this.params.argumentPath.length - 1]; - } - getOutputTypeDescription() { - if (!(!this.params.modelName || !this.modelOrType)) - return { - name: this.params.modelName, - fields: this.modelOrType.fields.map((r) => ({ - name: r.name, - typeName: 'boolean', - isRelation: r.kind === 'object', - })), - }; - } - isRawAction() { - return ['executeRaw', 'queryRaw', 'runCommandRaw', 'findRaw', 'aggregateRaw'].includes(this.params.action); - } - isPreviewFeatureOn(r) { - return this.params.previewFeatures.includes(r); - } - getComputedFields() { - if (this.params.modelName) return this.params.extensions.getAllComputedFields(this.params.modelName); - } - findField(r) { - return this.modelOrType?.fields.find((t) => t.name === r); - } - nestSelection(r) { - let t = this.findField(r), - n = t?.kind === 'object' ? t.type : void 0; - return new e({ ...this.params, modelName: n, selectionPath: this.params.selectionPath.concat(r) }); - } - getGlobalOmit() { - return this.params.modelName && this.shouldApplyGlobalOmit() - ? (this.params.globalOmit?.[We(this.params.modelName)] ?? {}) - : {}; - } - shouldApplyGlobalOmit() { - switch (this.params.action) { - case 'findFirst': - case 'findFirstOrThrow': - case 'findUniqueOrThrow': - case 'findMany': - case 'upsert': - case 'findUnique': - case 'createManyAndReturn': - case 'create': - case 'update': - case 'updateManyAndReturn': - case 'delete': - return !0; - case 'executeRaw': - case 'aggregateRaw': - case 'runCommandRaw': - case 'findRaw': - case 'createMany': - case 'deleteMany': - case 'groupBy': - case 'updateMany': - case 'count': - case 'aggregate': - case 'queryRaw': - return !1; - default: - ar(this.params.action, 'Unknown action'); - } - } - nestArgument(r) { - return new e({ ...this.params, argumentPath: this.params.argumentPath.concat(r) }); - } -}; -function Oa(e) { - if (!e._hasPreviewFlag('metrics')) - throw new Z('`metrics` preview feature must be enabled in order to access metrics API', { - clientVersion: e._clientVersion, - }); -} -var Nr = class { - _client; - constructor(r) { - this._client = r; - } - prometheus(r) { - return (Oa(this._client), this._client._engine.metrics({ format: 'prometheus', ...r })); - } - json(r) { - return (Oa(this._client), this._client._engine.metrics({ format: 'json', ...r })); - } -}; -function ka(e, r) { - let t = at(() => cm(r)); - Object.defineProperty(e, 'dmmf', { get: () => t.get() }); -} -function cm(e) { - return { datamodel: { models: ro(e.models), enums: ro(e.enums), types: ro(e.types) } }; -} -function ro(e) { - return Object.entries(e).map(([r, t]) => ({ name: r, ...t })); -} -var to = new WeakMap(), - $n = '$$PrismaTypedSql', - Et = class { - constructor(r, t) { - (to.set(this, { sql: r, values: t }), Object.defineProperty(this, $n, { value: $n })); - } - get sql() { - return to.get(this).sql; - } - get values() { - return to.get(this).values; - } - }; -function _a(e) { - return (...r) => new Et(e, r); -} -function qn(e) { - return e != null && e[$n] === $n; -} -var fu = A(Ti()); -var gu = require('node:async_hooks'), - hu = require('node:events'), - yu = A(require('node:fs')), - ri = A(require('node:path')); -var oe = class e { - constructor(r, t) { - if (r.length - 1 !== t.length) - throw r.length === 0 - ? new TypeError('Expected at least 1 string') - : new TypeError(`Expected ${r.length} strings to have ${r.length - 1} values`); - let n = t.reduce((s, a) => s + (a instanceof e ? a.values.length : 1), 0); - ((this.values = new Array(n)), (this.strings = new Array(n + 1)), (this.strings[0] = r[0])); - let i = 0, - o = 0; - for (; i < t.length; ) { - let s = t[i++], - a = r[i]; - if (s instanceof e) { - this.strings[o] += s.strings[0]; - let l = 0; - for (; l < s.values.length; ) ((this.values[o++] = s.values[l++]), (this.strings[o] = s.strings[l])); - this.strings[o] += a; - } else ((this.values[o++] = s), (this.strings[o] = a)); - } - } - get sql() { - let r = this.strings.length, - t = 1, - n = this.strings[0]; - for (; t < r; ) n += `?${this.strings[t++]}`; - return n; - } - get statement() { - let r = this.strings.length, - t = 1, - n = this.strings[0]; - for (; t < r; ) n += `:${t}${this.strings[t++]}`; - return n; - } - get text() { - let r = this.strings.length, - t = 1, - n = this.strings[0]; - for (; t < r; ) n += `$${t}${this.strings[t++]}`; - return n; - } - inspect() { - return { sql: this.sql, statement: this.statement, text: this.text, values: this.values }; - } -}; -function Na(e, r = ',', t = '', n = '') { - if (e.length === 0) - throw new TypeError('Expected `join([])` to be called with an array of multiple elements, but got an empty array'); - return new oe([t, ...Array(e.length - 1).fill(r), n], e); -} -function no(e) { - return new oe([e], []); -} -var La = no(''); -function io(e, ...r) { - return new oe(e, r); -} -function wt(e) { - return { - getKeys() { - return Object.keys(e); - }, - getPropertyValue(r) { - return e[r]; - }, - }; -} -function re(e, r) { - return { - getKeys() { - return [e]; - }, - getPropertyValue() { - return r(); - }, - }; -} -function lr(e) { - let r = new we(); - return { - getKeys() { - return e.getKeys(); - }, - getPropertyValue(t) { - return r.getOrCreate(t, () => e.getPropertyValue(t)); - }, - getPropertyDescriptor(t) { - return e.getPropertyDescriptor?.(t); - }, - }; -} -var Vn = { enumerable: !0, configurable: !0, writable: !0 }; -function jn(e) { - let r = new Set(e); - return { - getPrototypeOf: () => Object.prototype, - getOwnPropertyDescriptor: () => Vn, - has: (t, n) => r.has(n), - set: (t, n, i) => r.add(n) && Reflect.set(t, n, i), - ownKeys: () => [...r], - }; -} -var Fa = Symbol.for('nodejs.util.inspect.custom'); -function he(e, r) { - let t = pm(r), - n = new Set(), - i = new Proxy(e, { - get(o, s) { - if (n.has(s)) return o[s]; - let a = t.get(s); - return a ? a.getPropertyValue(s) : o[s]; - }, - has(o, s) { - if (n.has(s)) return !0; - let a = t.get(s); - return a ? (a.has?.(s) ?? !0) : Reflect.has(o, s); - }, - ownKeys(o) { - let s = Ma(Reflect.ownKeys(o), t), - a = Ma(Array.from(t.keys()), t); - return [...new Set([...s, ...a, ...n])]; - }, - set(o, s, a) { - return t.get(s)?.getPropertyDescriptor?.(s)?.writable === !1 ? !1 : (n.add(s), Reflect.set(o, s, a)); - }, - getOwnPropertyDescriptor(o, s) { - let a = Reflect.getOwnPropertyDescriptor(o, s); - if (a && !a.configurable) return a; - let l = t.get(s); - return l ? (l.getPropertyDescriptor ? { ...Vn, ...l?.getPropertyDescriptor(s) } : Vn) : a; - }, - defineProperty(o, s, a) { - return (n.add(s), Reflect.defineProperty(o, s, a)); - }, - getPrototypeOf: () => Object.prototype, - }); - return ( - (i[Fa] = function () { - let o = { ...this }; - return (delete o[Fa], o); - }), - i - ); -} -function pm(e) { - let r = new Map(); - for (let t of e) { - let n = t.getKeys(); - for (let i of n) r.set(i, t); - } - return r; -} -function Ma(e, r) { - return e.filter((t) => r.get(t)?.has?.(t) ?? !0); -} -function Lr(e) { - return { - getKeys() { - return e; - }, - has() { - return !1; - }, - getPropertyValue() {}, - }; -} -function Fr(e, r) { - return { batch: e, transaction: r?.kind === 'batch' ? { isolationLevel: r.options.isolationLevel } : void 0 }; -} -function $a(e) { - if (e === void 0) return ''; - let r = kr(e); - return new Rr(0, { colors: An }).write(r).toString(); -} -var dm = 'P2037'; -function Mr({ error: e, user_facing_error: r }, t, n) { - return r.error_code - ? new z(mm(r, n), { code: r.error_code, clientVersion: t, meta: r.meta, batchRequestIdx: r.batch_request_idx }) - : new V(e, { clientVersion: t, batchRequestIdx: r.batch_request_idx }); -} -function mm(e, r) { - let t = e.message; - return ( - (r === 'postgresql' || r === 'postgres' || r === 'mysql') && - e.error_code === dm && - (t += ` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`), - t - ); -} -var xt = ''; -function qa(e) { - var r = e.split(` -`); - return r.reduce(function (t, n) { - var i = hm(n) || bm(n) || xm(n) || Sm(n) || vm(n); - return (i && t.push(i), t); - }, []); -} -var fm = - /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|rsc||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, - gm = /\((\S*)(?::(\d+))(?::(\d+))\)/; -function hm(e) { - var r = fm.exec(e); - if (!r) return null; - var t = r[2] && r[2].indexOf('native') === 0, - n = r[2] && r[2].indexOf('eval') === 0, - i = gm.exec(r[2]); - return ( - n && i != null && ((r[2] = i[1]), (r[3] = i[2]), (r[4] = i[3])), - { - file: t ? null : r[2], - methodName: r[1] || xt, - arguments: t ? [r[2]] : [], - lineNumber: r[3] ? +r[3] : null, - column: r[4] ? +r[4] : null, - } - ); -} -var ym = - /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|rsc|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i; -function bm(e) { - var r = ym.exec(e); - return r - ? { file: r[2], methodName: r[1] || xt, arguments: [], lineNumber: +r[3], column: r[4] ? +r[4] : null } - : null; -} -var Em = - /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|rsc|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i, - wm = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i; -function xm(e) { - var r = Em.exec(e); - if (!r) return null; - var t = r[3] && r[3].indexOf(' > eval') > -1, - n = wm.exec(r[3]); - return ( - t && n != null && ((r[3] = n[1]), (r[4] = n[2]), (r[5] = null)), - { - file: r[3], - methodName: r[1] || xt, - arguments: r[2] ? r[2].split(',') : [], - lineNumber: r[4] ? +r[4] : null, - column: r[5] ? +r[5] : null, - } - ); -} -var Pm = /^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i; -function vm(e) { - var r = Pm.exec(e); - return r - ? { file: r[3], methodName: r[1] || xt, arguments: [], lineNumber: +r[4], column: r[5] ? +r[5] : null } - : null; -} -var Tm = /^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i; -function Sm(e) { - var r = Tm.exec(e); - return r - ? { file: r[2], methodName: r[1] || xt, arguments: [], lineNumber: +r[3], column: r[4] ? +r[4] : null } - : null; -} -var oo = class { - getLocation() { - return null; - } - }, - so = class { - _error; - constructor() { - this._error = new Error(); - } - getLocation() { - let r = this._error.stack; - if (!r) return null; - let n = qa(r).find((i) => { - if (!i.file) return !1; - let o = Li(i.file); - return ( - o !== '' && - !o.includes('@prisma') && - !o.includes('/packages/client/src/runtime/') && - !o.endsWith('/runtime/binary.js') && - !o.endsWith('/runtime/library.js') && - !o.endsWith('/runtime/edge.js') && - !o.endsWith('/runtime/edge-esm.js') && - !o.startsWith('internal/') && - !i.methodName.includes('new ') && - !i.methodName.includes('getCallSite') && - !i.methodName.includes('Proxy.') && - i.methodName.split('.').length < 4 - ); - }); - return !n || !n.file ? null : { fileName: n.file, lineNumber: n.lineNumber, columnNumber: n.column }; - } - }; -function Ze(e) { - return e === 'minimal' - ? typeof $EnabledCallSite == 'function' && e !== 'minimal' - ? new $EnabledCallSite() - : new oo() - : new so(); -} -var Va = { _avg: !0, _count: !0, _sum: !0, _min: !0, _max: !0 }; -function $r(e = {}) { - let r = Am(e); - return Object.entries(r).reduce((n, [i, o]) => (Va[i] !== void 0 ? (n.select[i] = { select: o }) : (n[i] = o), n), { - select: {}, - }); -} -function Am(e = {}) { - return typeof e._count == 'boolean' ? { ...e, _count: { _all: e._count } } : e; -} -function Bn(e = {}) { - return (r) => (typeof e._count == 'boolean' && (r._count = r._count._all), r); -} -function ja(e, r) { - let t = Bn(e); - return r({ action: 'aggregate', unpacker: t, argsMapper: $r })(e); -} -function Cm(e = {}) { - let { select: r, ...t } = e; - return typeof r == 'object' ? $r({ ...t, _count: r }) : $r({ ...t, _count: { _all: !0 } }); -} -function Im(e = {}) { - return typeof e.select == 'object' ? (r) => Bn(e)(r)._count : (r) => Bn(e)(r)._count._all; -} -function Ba(e, r) { - return r({ action: 'count', unpacker: Im(e), argsMapper: Cm })(e); -} -function Dm(e = {}) { - let r = $r(e); - if (Array.isArray(r.by)) for (let t of r.by) typeof t == 'string' && (r.select[t] = !0); - else typeof r.by == 'string' && (r.select[r.by] = !0); - return r; -} -function Om(e = {}) { - return (r) => ( - typeof e?._count == 'boolean' && - r.forEach((t) => { - t._count = t._count._all; - }), - r - ); -} -function Ua(e, r) { - return r({ action: 'groupBy', unpacker: Om(e), argsMapper: Dm })(e); -} -function Ga(e, r, t) { - if (r === 'aggregate') return (n) => ja(n, t); - if (r === 'count') return (n) => Ba(n, t); - if (r === 'groupBy') return (n) => Ua(n, t); -} -function Qa(e, r) { - let t = r.fields.filter((i) => !i.relationName), - n = Ms(t, 'name'); - return new Proxy( - {}, - { - get(i, o) { - if (o in i || typeof o == 'symbol') return i[o]; - let s = n[o]; - if (s) return new dt(e, o, s.type, s.isList, s.kind === 'enum'); - }, - ...jn(Object.keys(n)), - } - ); -} -var Wa = (e) => (Array.isArray(e) ? e : e.split('.')), - ao = (e, r) => Wa(r).reduce((t, n) => t && t[n], e), - Ja = (e, r, t) => Wa(r).reduceRight((n, i, o, s) => Object.assign({}, ao(e, s.slice(0, o)), { [i]: n }), t); -function km(e, r) { - return e === void 0 || r === void 0 ? [] : [...r, 'select', e]; -} -function _m(e, r, t) { - return r === void 0 ? (e ?? {}) : Ja(r, t, e || !0); -} -function lo(e, r, t, n, i, o) { - let a = e._runtimeDataModel.models[r].fields.reduce((l, u) => ({ ...l, [u.name]: u }), {}); - return (l) => { - let u = Ze(e._errorFormat), - c = km(n, i), - p = _m(l, o, c), - d = t({ dataPath: c, callsite: u })(p), - f = Nm(e, r); - return new Proxy(d, { - get(h, g) { - if (!f.includes(g)) return h[g]; - let T = [a[g].type, t, g], - S = [c, p]; - return lo(e, ...T, ...S); - }, - ...jn([...f, ...Object.getOwnPropertyNames(d)]), - }); - }; -} -function Nm(e, r) { - return e._runtimeDataModel.models[r].fields.filter((t) => t.kind === 'object').map((t) => t.name); -} -var Lm = ['findUnique', 'findUniqueOrThrow', 'findFirst', 'findFirstOrThrow', 'create', 'update', 'upsert', 'delete'], - Fm = ['aggregate', 'count', 'groupBy']; -function uo(e, r) { - let t = e._extensions.getAllModelExtensions(r) ?? {}, - n = [Mm(e, r), qm(e, r), wt(t), re('name', () => r), re('$name', () => r), re('$parent', () => e._appliedParent)]; - return he({}, n); -} -function Mm(e, r) { - let t = Te(r), - n = Object.keys(Sr).concat('count'); - return { - getKeys() { - return n; - }, - getPropertyValue(i) { - let o = i, - s = (a) => (l) => { - let u = Ze(e._errorFormat); - return e._createPrismaPromise( - (c) => { - let p = { - args: l, - dataPath: [], - action: o, - model: r, - clientMethod: `${t}.${i}`, - jsModelName: t, - transaction: c, - callsite: u, - }; - return e._request({ ...p, ...a }); - }, - { action: o, args: l, model: r } - ); - }; - return Lm.includes(o) ? lo(e, r, s) : $m(i) ? Ga(e, i, s) : s({}); - }, - }; -} -function $m(e) { - return Fm.includes(e); -} -function qm(e, r) { - return lr( - re('fields', () => { - let t = e._runtimeDataModel.models[r]; - return Qa(r, t); - }) - ); -} -function Ka(e) { - return e.replace(/^./, (r) => r.toUpperCase()); -} -var co = Symbol(); -function Pt(e) { - let r = [Vm(e), jm(e), re(co, () => e), re('$parent', () => e._appliedParent)], - t = e._extensions.getAllClientExtensions(); - return (t && r.push(wt(t)), he(e, r)); -} -function Vm(e) { - let r = Object.getPrototypeOf(e._originalClient), - t = [...new Set(Object.getOwnPropertyNames(r))]; - return { - getKeys() { - return t; - }, - getPropertyValue(n) { - return e[n]; - }, - }; -} -function jm(e) { - let r = Object.keys(e._runtimeDataModel.models), - t = r.map(Te), - n = [...new Set(r.concat(t))]; - return lr({ - getKeys() { - return n; - }, - getPropertyValue(i) { - let o = Ka(i); - if (e._runtimeDataModel.models[o] !== void 0) return uo(e, o); - if (e._runtimeDataModel.models[i] !== void 0) return uo(e, i); - }, - getPropertyDescriptor(i) { - if (!t.includes(i)) return { enumerable: !1 }; - }, - }); -} -function Ha(e) { - return e[co] ? e[co] : e; -} -function Ya(e) { - if (typeof e == 'function') return e(this); - if (e.client?.__AccelerateEngine) { - let t = e.client.__AccelerateEngine; - this._originalClient._engine = new t(this._originalClient._accelerateEngineConfig); - } - let r = Object.create(this._originalClient, { - _extensions: { value: this._extensions.append(e) }, - _appliedParent: { value: this, configurable: !0 }, - $on: { value: void 0 }, - }); - return Pt(r); -} -function za({ result: e, modelName: r, select: t, omit: n, extensions: i }) { - let o = i.getAllComputedFields(r); - if (!o) return e; - let s = [], - a = []; - for (let l of Object.values(o)) { - if (n) { - if (n[l.name]) continue; - let u = l.needs.filter((c) => n[c]); - u.length > 0 && a.push(Lr(u)); - } else if (t) { - if (!t[l.name]) continue; - let u = l.needs.filter((c) => !t[c]); - u.length > 0 && a.push(Lr(u)); - } - Bm(e, l.needs) && s.push(Um(l, he(e, s))); - } - return s.length > 0 || a.length > 0 ? he(e, [...s, ...a]) : e; -} -function Bm(e, r) { - return r.every((t) => Vi(e, t)); -} -function Um(e, r) { - return lr(re(e.name, () => e.compute(r))); -} -function Un({ visitor: e, result: r, args: t, runtimeDataModel: n, modelName: i }) { - if (Array.isArray(r)) { - for (let s = 0; s < r.length; s++) - r[s] = Un({ result: r[s], args: t, modelName: i, runtimeDataModel: n, visitor: e }); - return r; - } - let o = e(r, i, t) ?? r; - return ( - t.include && Za({ includeOrSelect: t.include, result: o, parentModelName: i, runtimeDataModel: n, visitor: e }), - t.select && Za({ includeOrSelect: t.select, result: o, parentModelName: i, runtimeDataModel: n, visitor: e }), - o - ); -} -function Za({ includeOrSelect: e, result: r, parentModelName: t, runtimeDataModel: n, visitor: i }) { - for (let [o, s] of Object.entries(e)) { - if (!s || r[o] == null || Se(s)) continue; - let l = n.models[t].fields.find((c) => c.name === o); - if (!l || l.kind !== 'object' || !l.relationName) continue; - let u = typeof s == 'object' ? s : {}; - r[o] = Un({ visitor: i, result: r[o], args: u, modelName: l.type, runtimeDataModel: n }); - } -} -function Xa({ result: e, modelName: r, args: t, extensions: n, runtimeDataModel: i, globalOmit: o }) { - return n.isEmpty() || e == null || typeof e != 'object' || !i.models[r] - ? e - : Un({ - result: e, - args: t ?? {}, - modelName: r, - runtimeDataModel: i, - visitor: (a, l, u) => { - let c = Te(l); - return za({ - result: a, - modelName: c, - select: u.select, - omit: u.select ? void 0 : { ...o?.[c], ...u.omit }, - extensions: n, - }); - }, - }); -} -var Gm = ['$connect', '$disconnect', '$on', '$transaction', '$extends'], - el = Gm; -function rl(e) { - if (e instanceof oe) return Qm(e); - if (qn(e)) return Wm(e); - if (Array.isArray(e)) { - let t = [e[0]]; - for (let n = 1; n < e.length; n++) t[n] = vt(e[n]); - return t; - } - let r = {}; - for (let t in e) r[t] = vt(e[t]); - return r; -} -function Qm(e) { - return new oe(e.strings, e.values); -} -function Wm(e) { - return new Et(e.sql, e.values); -} -function vt(e) { - if (typeof e != 'object' || e == null || e instanceof Me || Or(e)) return e; - if (Tr(e)) return new Fe(e.toFixed()); - if (xr(e)) return new Date(+e); - if (ArrayBuffer.isView(e)) return e.slice(0); - if (Array.isArray(e)) { - let r = e.length, - t; - for (t = Array(r); r--; ) t[r] = vt(e[r]); - return t; - } - if (typeof e == 'object') { - let r = {}; - for (let t in e) - t === '__proto__' - ? Object.defineProperty(r, t, { value: vt(e[t]), configurable: !0, enumerable: !0, writable: !0 }) - : (r[t] = vt(e[t])); - return r; - } - ar(e, 'Unknown value'); -} -function nl(e, r, t, n = 0) { - return e._createPrismaPromise((i) => { - let o = r.customDataProxyFetch; - return ( - 'transaction' in r && - i !== void 0 && - (r.transaction?.kind === 'batch' && r.transaction.lock.then(), (r.transaction = i)), - n === t.length - ? e._executeRequest(r) - : t[n]({ - model: r.model, - operation: r.model ? r.action : r.clientMethod, - args: rl(r.args ?? {}), - __internalParams: r, - query: (s, a = r) => { - let l = a.customDataProxyFetch; - return ((a.customDataProxyFetch = al(o, l)), (a.args = s), nl(e, a, t, n + 1)); - }, - }) - ); - }); -} -function il(e, r) { - let { jsModelName: t, action: n, clientMethod: i } = r, - o = t ? n : i; - if (e._extensions.isEmpty()) return e._executeRequest(r); - let s = e._extensions.getAllQueryCallbacks(t ?? '$none', o); - return nl(e, r, s); -} -function ol(e) { - return (r) => { - let t = { requests: r }, - n = r[0].extensions.getAllBatchQueryCallbacks(); - return n.length ? sl(t, n, 0, e) : e(t); - }; -} -function sl(e, r, t, n) { - if (t === r.length) return n(e); - let i = e.customDataProxyFetch, - o = e.requests[0].transaction; - return r[t]({ - args: { - queries: e.requests.map((s) => ({ model: s.modelName, operation: s.action, args: s.args })), - transaction: o ? { isolationLevel: o.kind === 'batch' ? o.isolationLevel : void 0 } : void 0, - }, - __internalParams: e, - query(s, a = e) { - let l = a.customDataProxyFetch; - return ((a.customDataProxyFetch = al(i, l)), sl(a, r, t + 1, n)); - }, - }); -} -var tl = (e) => e; -function al(e = tl, r = tl) { - return (t) => e(r(t)); -} -var ll = N('prisma:client'), - ul = { Vercel: 'vercel', 'Netlify CI': 'netlify' }; -function cl({ postinstall: e, ciName: r, clientVersion: t }) { - if ((ll('checkPlatformCaching:postinstall', e), ll('checkPlatformCaching:ciName', r), e === !0 && r && r in ul)) { - let n = `Prisma has detected that this project was built on ${r}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${ul[r]}-build`; - throw (console.error(n), new v(n, t)); - } -} -function pl(e, r) { - return e ? (e.datasources ? e.datasources : e.datasourceUrl ? { [r[0]]: { url: e.datasourceUrl } } : {}) : {}; -} -var Jm = () => globalThis.process?.release?.name === 'node', - Km = () => !!globalThis.Bun || !!globalThis.process?.versions?.bun, - Hm = () => !!globalThis.Deno, - Ym = () => typeof globalThis.Netlify == 'object', - zm = () => typeof globalThis.EdgeRuntime == 'object', - Zm = () => globalThis.navigator?.userAgent === 'Cloudflare-Workers'; -function Xm() { - return ( - [ - [Ym, 'netlify'], - [zm, 'edge-light'], - [Zm, 'workerd'], - [Hm, 'deno'], - [Km, 'bun'], - [Jm, 'node'], - ] - .flatMap((t) => (t[0]() ? [t[1]] : [])) - .at(0) ?? '' - ); -} -var ef = { - node: 'Node.js', - workerd: 'Cloudflare Workers', - deno: 'Deno and Deno Deploy', - netlify: 'Netlify Edge Functions', - 'edge-light': - 'Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)', -}; -function Gn() { - let e = Xm(); - return { id: e, prettyName: ef[e] || e, isEdge: ['workerd', 'deno', 'netlify', 'edge-light'].includes(e) }; -} -var hl = A(require('node:fs')), - Tt = A(require('node:path')); -function Qn(e) { - let { runtimeBinaryTarget: r } = e; - return `Add "${r}" to \`binaryTargets\` in the "schema.prisma" file and run \`prisma generate\` after saving it: - -${rf(e)}`; -} -function rf(e) { - let { generator: r, generatorBinaryTargets: t, runtimeBinaryTarget: n } = e, - i = { fromEnvVar: null, value: n }, - o = [...t, i]; - return ki({ ...r, binaryTargets: o }); -} -function Xe(e) { - let { runtimeBinaryTarget: r } = e; - return `Prisma Client could not locate the Query Engine for runtime "${r}".`; -} -function er(e) { - let { searchedLocations: r } = e; - return `The following locations have been searched: -${[...new Set(r)].map((i) => ` ${i}`).join(` -`)}`; -} -function dl(e) { - let { runtimeBinaryTarget: r } = e; - return `${Xe(e)} - -This happened because \`binaryTargets\` have been pinned, but the actual deployment also required "${r}". -${Qn(e)} - -${er(e)}`; -} -function Wn(e) { - return `We would appreciate if you could take the time to share some information with us. -Please help us by answering a few questions: https://pris.ly/${e}`; -} -function Jn(e) { - let { errorStack: r } = e; - return r?.match(/\/\.next|\/next@|\/next\//) - ? ` - -We detected that you are using Next.js, learn how to fix this: https://pris.ly/d/engine-not-found-nextjs.` - : ''; -} -function ml(e) { - let { queryEngineName: r } = e; - return `${Xe(e)}${Jn(e)} - -This is likely caused by a bundler that has not copied "${r}" next to the resulting bundle. -Ensure that "${r}" has been copied next to the bundle or in "${e.expectedLocation}". - -${Wn('engine-not-found-bundler-investigation')} - -${er(e)}`; -} -function fl(e) { - let { runtimeBinaryTarget: r, generatorBinaryTargets: t } = e, - n = t.find((i) => i.native); - return `${Xe(e)} - -This happened because Prisma Client was generated for "${n?.value ?? 'unknown'}", but the actual deployment required "${r}". -${Qn(e)} - -${er(e)}`; -} -function gl(e) { - let { queryEngineName: r } = e; - return `${Xe(e)}${Jn(e)} - -This is likely caused by tooling that has not copied "${r}" to the deployment folder. -Ensure that you ran \`prisma generate\` and that "${r}" has been copied to "${e.expectedLocation}". - -${Wn('engine-not-found-tooling-investigation')} - -${er(e)}`; -} -var tf = N('prisma:client:engines:resolveEnginePath'), - nf = () => new RegExp('runtime[\\\\/]library\\.m?js$'); -async function yl(e, r) { - let t = - { binary: process.env.PRISMA_QUERY_ENGINE_BINARY, library: process.env.PRISMA_QUERY_ENGINE_LIBRARY }[e] ?? - r.prismaPath; - if (t !== void 0) return t; - let { enginePath: n, searchedLocations: i } = await of(e, r); - if ((tf('enginePath', n), n !== void 0 && e === 'binary' && Ri(n), n !== void 0)) return (r.prismaPath = n); - let o = await ir(), - s = r.generator?.binaryTargets ?? [], - a = s.some((d) => d.native), - l = !s.some((d) => d.value === o), - u = __filename.match(nf()) === null, - c = { - searchedLocations: i, - generatorBinaryTargets: s, - generator: r.generator, - runtimeBinaryTarget: o, - queryEngineName: bl(e, o), - expectedLocation: Tt.default.relative(process.cwd(), r.dirname), - errorStack: new Error().stack, - }, - p; - throw (a && l ? (p = fl(c)) : l ? (p = dl(c)) : u ? (p = ml(c)) : (p = gl(c)), new v(p, r.clientVersion)); -} -async function of(e, r) { - let t = await ir(), - n = [], - i = [ - r.dirname, - Tt.default.resolve(__dirname, '..'), - r.generator?.output?.value ?? __dirname, - Tt.default.resolve(__dirname, '../../../.prisma/client'), - '/tmp/prisma-engines', - r.cwd, - ]; - __filename.includes('resolveEnginePath') && i.push(fs()); - for (let o of i) { - let s = bl(e, t), - a = Tt.default.join(o, s); - if ((n.push(o), hl.default.existsSync(a))) return { enginePath: a, searchedLocations: n }; - } - return { enginePath: void 0, searchedLocations: n }; -} -function bl(e, r) { - return e === 'library' ? Ut(r, 'fs') : `query-engine-${r}${r === 'windows' ? '.exe' : ''}`; -} -var po = A(Ni()); -function El(e) { - return e ? e.replace(/".*"/g, '"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g, (r) => `${r[0]}5`) : ''; -} -function wl(e) { - return e - .split( - ` -` - ) - .map((r) => - r - .replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/, '') - .replace(/\+\d+\s*ms$/, '') - ).join(` -`); -} -var xl = A(Ls()); -function Pl({ title: e, user: r = 'prisma', repo: t = 'prisma', template: n = 'bug_report.yml', body: i }) { - return (0, xl.default)({ user: r, repo: t, template: n, title: e, body: i }); -} -function vl({ version: e, binaryTarget: r, title: t, description: n, engineVersion: i, database: o, query: s }) { - let a = Uo(6e3 - (s?.length ?? 0)), - l = wl((0, po.default)(a)), - u = n - ? `# Description -\`\`\` -${n} -\`\`\`` - : '', - c = (0, po.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: -## Versions - -| Name | Version | -|-----------------|--------------------| -| Node | ${process.version?.padEnd(19)}| -| OS | ${r?.padEnd(19)}| -| Prisma Client | ${e?.padEnd(19)}| -| Query Engine | ${i?.padEnd(19)}| -| Database | ${o?.padEnd(19)}| - -${u} - -## Logs -\`\`\` -${l} -\`\`\` - -## Client Snippet -\`\`\`ts -// PLEASE FILL YOUR CODE SNIPPET HERE -\`\`\` - -## Schema -\`\`\`prisma -// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE -\`\`\` - -## Prisma Engine Query -\`\`\` -${s ? El(s) : ''} -\`\`\` -`), - p = Pl({ title: t, body: c }); - return `${t} - -This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. - -${Y(p)} - -If you want the Prisma team to look into it, please open the link above \u{1F64F} -To increase the chance of success, please post your schema and a snippet of -how you used Prisma Client in the issue. -`; -} -function Tl(e, r) { - throw new Error(r); -} -function sf(e) { - return e !== null && typeof e == 'object' && typeof e.$type == 'string'; -} -function af(e, r) { - let t = {}; - for (let n of Object.keys(e)) t[n] = r(e[n], n); - return t; -} -function qr(e) { - return e === null - ? e - : Array.isArray(e) - ? e.map(qr) - : typeof e == 'object' - ? sf(e) - ? lf(e) - : e.constructor !== null && e.constructor.name !== 'Object' - ? e - : af(e, qr) - : e; -} -function lf({ $type: e, value: r }) { - switch (e) { - case 'BigInt': - return BigInt(r); - case 'Bytes': { - let { buffer: t, byteOffset: n, byteLength: i } = Buffer.from(r, 'base64'); - return new Uint8Array(t, n, i); - } - case 'DateTime': - return new Date(r); - case 'Decimal': - return new Le(r); - case 'Json': - return JSON.parse(r); - default: - Tl(r, 'Unknown tagged value'); - } -} -var Sl = '6.14.0'; -function Vr({ inlineDatasources: e, overrideDatasources: r, env: t, clientVersion: n }) { - let i, - o = Object.keys(e)[0], - s = e[o]?.url, - a = r[o]?.url; - if ( - (o === void 0 ? (i = void 0) : a ? (i = a) : s?.value ? (i = s.value) : s?.fromEnvVar && (i = t[s.fromEnvVar]), - s?.fromEnvVar !== void 0 && i === void 0) - ) - throw new v(`error: Environment variable not found: ${s.fromEnvVar}.`, n); - if (i === void 0) throw new v('error: Missing URL environment variable, value, or override.', n); - return i; -} -var Kn = class extends Error { - clientVersion; - cause; - constructor(r, t) { - (super(r), (this.clientVersion = t.clientVersion), (this.cause = t.cause)); - } - get [Symbol.toStringTag]() { - return this.name; - } -}; -var se = class extends Kn { - isRetryable; - constructor(r, t) { - (super(r, t), (this.isRetryable = t.isRetryable ?? !0)); - } -}; -function R(e, r) { - return { ...e, isRetryable: r }; -} -var ur = class extends se { - name = 'InvalidDatasourceError'; - code = 'P6001'; - constructor(r, t) { - super(r, R(t, !1)); - } -}; -x(ur, 'InvalidDatasourceError'); -function Rl(e) { - let r = { clientVersion: e.clientVersion }, - t = Object.keys(e.inlineDatasources)[0], - n = Vr({ - inlineDatasources: e.inlineDatasources, - overrideDatasources: e.overrideDatasources, - clientVersion: e.clientVersion, - env: { ...e.env, ...(typeof process < 'u' ? process.env : {}) }, - }), - i; - try { - i = new URL(n); - } catch { - throw new ur(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``, r); - } - let { protocol: o, searchParams: s } = i; - if (o !== 'prisma:' && o !== on) - throw new ur( - `Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``, - r - ); - let a = s.get('api_key'); - if (a === null || a.length < 1) - throw new ur(`Error validating datasource \`${t}\`: the URL must contain a valid API key`, r); - let l = Ii(i) ? 'http:' : 'https:', - u = new URL(i.href.replace(o, l)); - return { apiKey: a, url: u }; -} -var Al = A(nn()), - Hn = class { - apiKey; - tracingHelper; - logLevel; - logQueries; - engineHash; - constructor({ apiKey: r, tracingHelper: t, logLevel: n, logQueries: i, engineHash: o }) { - ((this.apiKey = r), (this.tracingHelper = t), (this.logLevel = n), (this.logQueries = i), (this.engineHash = o)); - } - build({ traceparent: r, transactionId: t } = {}) { - let n = { - Accept: 'application/json', - Authorization: `Bearer ${this.apiKey}`, - 'Content-Type': 'application/json', - 'Prisma-Engine-Hash': this.engineHash, - 'Prisma-Engine-Version': Al.enginesVersion, - }; - (this.tracingHelper.isEnabled() && (n.traceparent = r ?? this.tracingHelper.getTraceParent()), - t && (n['X-Transaction-Id'] = t)); - let i = this.#e(); - return (i.length > 0 && (n['X-Capture-Telemetry'] = i.join(', ')), n); - } - #e() { - let r = []; - return ( - this.tracingHelper.isEnabled() && r.push('tracing'), - this.logLevel && r.push(this.logLevel), - this.logQueries && r.push('query'), - r - ); - } - }; -function cf(e) { - return e[0] * 1e3 + e[1] / 1e6; -} -function mo(e) { - return new Date(cf(e)); -} -var jr = class extends se { - name = 'ForcedRetryError'; - code = 'P5001'; - constructor(r) { - super('This request must be retried', R(r, !0)); - } -}; -x(jr, 'ForcedRetryError'); -var cr = class extends se { - name = 'NotImplementedYetError'; - code = 'P5004'; - constructor(r, t) { - super(r, R(t, !1)); - } -}; -x(cr, 'NotImplementedYetError'); -var $ = class extends se { - response; - constructor(r, t) { - (super(r, t), (this.response = t.response)); - let n = this.response.headers.get('prisma-request-id'); - if (n) { - let i = `(The request id was: ${n})`; - this.message = this.message + ' ' + i; - } - } -}; -var pr = class extends $ { - name = 'SchemaMissingError'; - code = 'P5005'; - constructor(r) { - super('Schema needs to be uploaded', R(r, !0)); - } -}; -x(pr, 'SchemaMissingError'); -var fo = 'This request could not be understood by the server', - St = class extends $ { - name = 'BadRequestError'; - code = 'P5000'; - constructor(r, t, n) { - (super(t || fo, R(r, !1)), n && (this.code = n)); - } - }; -x(St, 'BadRequestError'); -var Rt = class extends $ { - name = 'HealthcheckTimeoutError'; - code = 'P5013'; - logs; - constructor(r, t) { - (super('Engine not started: healthcheck timeout', R(r, !0)), (this.logs = t)); - } -}; -x(Rt, 'HealthcheckTimeoutError'); -var At = class extends $ { - name = 'EngineStartupError'; - code = 'P5014'; - logs; - constructor(r, t, n) { - (super(t, R(r, !0)), (this.logs = n)); - } -}; -x(At, 'EngineStartupError'); -var Ct = class extends $ { - name = 'EngineVersionNotSupportedError'; - code = 'P5012'; - constructor(r) { - super('Engine version is not supported', R(r, !1)); - } -}; -x(Ct, 'EngineVersionNotSupportedError'); -var go = 'Request timed out', - It = class extends $ { - name = 'GatewayTimeoutError'; - code = 'P5009'; - constructor(r, t = go) { - super(t, R(r, !1)); - } - }; -x(It, 'GatewayTimeoutError'); -var pf = 'Interactive transaction error', - Dt = class extends $ { - name = 'InteractiveTransactionError'; - code = 'P5015'; - constructor(r, t = pf) { - super(t, R(r, !1)); - } - }; -x(Dt, 'InteractiveTransactionError'); -var df = 'Request parameters are invalid', - Ot = class extends $ { - name = 'InvalidRequestError'; - code = 'P5011'; - constructor(r, t = df) { - super(t, R(r, !1)); - } - }; -x(Ot, 'InvalidRequestError'); -var ho = 'Requested resource does not exist', - kt = class extends $ { - name = 'NotFoundError'; - code = 'P5003'; - constructor(r, t = ho) { - super(t, R(r, !1)); - } - }; -x(kt, 'NotFoundError'); -var yo = 'Unknown server error', - Br = class extends $ { - name = 'ServerError'; - code = 'P5006'; - logs; - constructor(r, t, n) { - (super(t || yo, R(r, !0)), (this.logs = n)); - } - }; -x(Br, 'ServerError'); -var bo = 'Unauthorized, check your connection string', - _t = class extends $ { - name = 'UnauthorizedError'; - code = 'P5007'; - constructor(r, t = bo) { - super(t, R(r, !1)); - } - }; -x(_t, 'UnauthorizedError'); -var Eo = 'Usage exceeded, retry again later', - Nt = class extends $ { - name = 'UsageExceededError'; - code = 'P5008'; - constructor(r, t = Eo) { - super(t, R(r, !0)); - } - }; -x(Nt, 'UsageExceededError'); -async function mf(e) { - let r; - try { - r = await e.text(); - } catch { - return { type: 'EmptyError' }; - } - try { - let t = JSON.parse(r); - if (typeof t == 'string') - switch (t) { - case 'InternalDataProxyError': - return { type: 'DataProxyError', body: t }; - default: - return { type: 'UnknownTextError', body: t }; - } - if (typeof t == 'object' && t !== null) { - if ('is_panic' in t && 'message' in t && 'error_code' in t) return { type: 'QueryEngineError', body: t }; - if ('EngineNotStarted' in t || 'InteractiveTransactionMisrouted' in t || 'InvalidRequestError' in t) { - let n = Object.values(t)[0].reason; - return typeof n == 'string' && !['SchemaMissing', 'EngineVersionNotSupported'].includes(n) - ? { type: 'UnknownJsonError', body: t } - : { type: 'DataProxyError', body: t }; - } - } - return { type: 'UnknownJsonError', body: t }; - } catch { - return r === '' ? { type: 'EmptyError' } : { type: 'UnknownTextError', body: r }; - } -} -async function Lt(e, r) { - if (e.ok) return; - let t = { clientVersion: r, response: e }, - n = await mf(e); - if (n.type === 'QueryEngineError') throw new z(n.body.message, { code: n.body.error_code, clientVersion: r }); - if (n.type === 'DataProxyError') { - if (n.body === 'InternalDataProxyError') throw new Br(t, 'Internal Data Proxy error'); - if ('EngineNotStarted' in n.body) { - if (n.body.EngineNotStarted.reason === 'SchemaMissing') return new pr(t); - if (n.body.EngineNotStarted.reason === 'EngineVersionNotSupported') throw new Ct(t); - if ('EngineStartupError' in n.body.EngineNotStarted.reason) { - let { msg: i, logs: o } = n.body.EngineNotStarted.reason.EngineStartupError; - throw new At(t, i, o); - } - if ('KnownEngineStartupError' in n.body.EngineNotStarted.reason) { - let { msg: i, error_code: o } = n.body.EngineNotStarted.reason.KnownEngineStartupError; - throw new v(i, r, o); - } - if ('HealthcheckTimeout' in n.body.EngineNotStarted.reason) { - let { logs: i } = n.body.EngineNotStarted.reason.HealthcheckTimeout; - throw new Rt(t, i); - } - } - if ('InteractiveTransactionMisrouted' in n.body) { - let i = { - IDParseError: 'Could not parse interactive transaction ID', - NoQueryEngineFoundError: 'Could not find Query Engine for the specified host and transaction ID', - TransactionStartError: 'Could not start interactive transaction', - }; - throw new Dt(t, i[n.body.InteractiveTransactionMisrouted.reason]); - } - if ('InvalidRequestError' in n.body) throw new Ot(t, n.body.InvalidRequestError.reason); - } - if (e.status === 401 || e.status === 403) throw new _t(t, Ur(bo, n)); - if (e.status === 404) return new kt(t, Ur(ho, n)); - if (e.status === 429) throw new Nt(t, Ur(Eo, n)); - if (e.status === 504) throw new It(t, Ur(go, n)); - if (e.status >= 500) throw new Br(t, Ur(yo, n)); - if (e.status >= 400) throw new St(t, Ur(fo, n)); -} -function Ur(e, r) { - return r.type === 'EmptyError' ? e : `${e}: ${JSON.stringify(r)}`; -} -function Cl(e) { - let r = Math.pow(2, e) * 50, - t = Math.ceil(Math.random() * r) - Math.ceil(r / 2), - n = r + t; - return new Promise((i) => setTimeout(() => i(n), n)); -} -var $e = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; -function Il(e) { - let r = new TextEncoder().encode(e), - t = '', - n = r.byteLength, - i = n % 3, - o = n - i, - s, - a, - l, - u, - c; - for (let p = 0; p < o; p = p + 3) - ((c = (r[p] << 16) | (r[p + 1] << 8) | r[p + 2]), - (s = (c & 16515072) >> 18), - (a = (c & 258048) >> 12), - (l = (c & 4032) >> 6), - (u = c & 63), - (t += $e[s] + $e[a] + $e[l] + $e[u])); - return ( - i == 1 - ? ((c = r[o]), (s = (c & 252) >> 2), (a = (c & 3) << 4), (t += $e[s] + $e[a] + '==')) - : i == 2 && - ((c = (r[o] << 8) | r[o + 1]), - (s = (c & 64512) >> 10), - (a = (c & 1008) >> 4), - (l = (c & 15) << 2), - (t += $e[s] + $e[a] + $e[l] + '=')), - t - ); -} -function Dl(e) { - if (!!e.generator?.previewFeatures.some((t) => t.toLowerCase().includes('metrics'))) - throw new v( - 'The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate', - e.clientVersion - ); -} -var Ol = { - '@prisma/debug': 'workspace:*', - '@prisma/engines-version': '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - '@prisma/fetch-engine': 'workspace:*', - '@prisma/get-platform': 'workspace:*', -}; -var Ft = class extends se { - name = 'RequestError'; - code = 'P5010'; - constructor(r, t) { - super( - `Cannot fetch data from service: -${r}`, - R(t, !0) - ); - } -}; -x(Ft, 'RequestError'); -async function dr(e, r, t = (n) => n) { - let { clientVersion: n, ...i } = r, - o = t(fetch); - try { - return await o(e, i); - } catch (s) { - let a = s.message ?? 'Unknown error'; - throw new Ft(a, { clientVersion: n, cause: s }); - } -} -var gf = /^[1-9][0-9]*\.[0-9]+\.[0-9]+$/, - kl = N('prisma:client:dataproxyEngine'); -async function hf(e, r) { - let t = Ol['@prisma/engines-version'], - n = r.clientVersion ?? 'unknown'; - if (process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION || globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION) - return process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION || globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION; - if (e.includes('accelerate') && n !== '0.0.0' && n !== 'in-memory') return n; - let [i, o] = n?.split('-') ?? []; - if (o === void 0 && gf.test(i)) return i; - if (o !== void 0 || n === '0.0.0' || n === 'in-memory') { - let [s] = t.split('-') ?? [], - [a, l, u] = s.split('.'), - c = yf(`<=${a}.${l}.${u}`), - p = await dr(c, { clientVersion: n }); - if (!p.ok) - throw new Error( - `Failed to fetch stable Prisma version, unpkg.com status ${p.status} ${p.statusText}, response body: ${(await p.text()) || ''}` - ); - let d = await p.text(); - kl('length of body fetched from unpkg.com', d.length); - let f; - try { - f = JSON.parse(d); - } catch (h) { - throw (console.error('JSON.parse error: body fetched from unpkg.com: ', d), h); - } - return f.version; - } - throw new cr('Only `major.minor.patch` versions are supported by Accelerate.', { clientVersion: n }); -} -async function _l(e, r) { - let t = await hf(e, r); - return (kl('version', t), t); -} -function yf(e) { - return encodeURI(`https://unpkg.com/prisma@${e}/package.json`); -} -var Nl = 3, - Mt = N('prisma:client:dataproxyEngine'), - $t = class { - name = 'DataProxyEngine'; - inlineSchema; - inlineSchemaHash; - inlineDatasources; - config; - logEmitter; - env; - clientVersion; - engineHash; - tracingHelper; - remoteClientVersion; - host; - headerBuilder; - startPromise; - protocol; - constructor(r) { - (Dl(r), - (this.config = r), - (this.env = r.env), - (this.inlineSchema = Il(r.inlineSchema)), - (this.inlineDatasources = r.inlineDatasources), - (this.inlineSchemaHash = r.inlineSchemaHash), - (this.clientVersion = r.clientVersion), - (this.engineHash = r.engineVersion), - (this.logEmitter = r.logEmitter), - (this.tracingHelper = r.tracingHelper)); - } - apiKey() { - return this.headerBuilder.apiKey; - } - version() { - return this.engineHash; - } - async start() { - (this.startPromise !== void 0 && (await this.startPromise), - (this.startPromise = (async () => { - let { apiKey: r, url: t } = this.getURLAndAPIKey(); - ((this.host = t.host), - (this.protocol = t.protocol), - (this.headerBuilder = new Hn({ - apiKey: r, - tracingHelper: this.tracingHelper, - logLevel: this.config.logLevel ?? 'error', - logQueries: this.config.logQueries, - engineHash: this.engineHash, - })), - (this.remoteClientVersion = await _l(this.host, this.config)), - Mt('host', this.host), - Mt('protocol', this.protocol)); - })()), - await this.startPromise); - } - async stop() {} - propagateResponseExtensions(r) { - (r?.logs?.length && - r.logs.forEach((t) => { - switch (t.level) { - case 'debug': - case 'trace': - Mt(t); - break; - case 'error': - case 'warn': - case 'info': { - this.logEmitter.emit(t.level, { - timestamp: mo(t.timestamp), - message: t.attributes.message ?? '', - target: t.target, - }); - break; - } - case 'query': { - this.logEmitter.emit('query', { - query: t.attributes.query ?? '', - timestamp: mo(t.timestamp), - duration: t.attributes.duration_ms ?? 0, - params: t.attributes.params ?? '', - target: t.target, - }); - break; - } - default: - t.level; - } - }), - r?.traces?.length && this.tracingHelper.dispatchEngineSpans(r.traces)); - } - onBeforeExit() { - throw new Error('"beforeExit" hook is not applicable to the remote query engine'); - } - async url(r) { - return ( - await this.start(), - `${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${r}` - ); - } - async uploadSchema() { - let r = { name: 'schemaUpload', internal: !0 }; - return this.tracingHelper.runInChildSpan(r, async () => { - let t = await dr(await this.url('schema'), { - method: 'PUT', - headers: this.headerBuilder.build(), - body: this.inlineSchema, - clientVersion: this.clientVersion, - }); - t.ok || Mt('schema response status', t.status); - let n = await Lt(t, this.clientVersion); - if (n) - throw ( - this.logEmitter.emit('warn', { - message: `Error while uploading schema: ${n.message}`, - timestamp: new Date(), - target: '', - }), - n - ); - this.logEmitter.emit('info', { - message: `Schema (re)uploaded (hash: ${this.inlineSchemaHash})`, - timestamp: new Date(), - target: '', - }); - }); - } - request(r, { traceparent: t, interactiveTransaction: n, customDataProxyFetch: i }) { - return this.requestInternal({ body: r, traceparent: t, interactiveTransaction: n, customDataProxyFetch: i }); - } - async requestBatch(r, { traceparent: t, transaction: n, customDataProxyFetch: i }) { - let o = n?.kind === 'itx' ? n.options : void 0, - s = Fr(r, n); - return ( - await this.requestInternal({ body: s, customDataProxyFetch: i, interactiveTransaction: o, traceparent: t }) - ).map( - (l) => ( - l.extensions && this.propagateResponseExtensions(l.extensions), - 'errors' in l ? this.convertProtocolErrorsToClientError(l.errors) : l - ) - ); - } - requestInternal({ body: r, traceparent: t, customDataProxyFetch: n, interactiveTransaction: i }) { - return this.withRetry({ - actionGerund: 'querying', - callback: async ({ logHttpCall: o }) => { - let s = i ? `${i.payload.endpoint}/graphql` : await this.url('graphql'); - o(s); - let a = await dr( - s, - { - method: 'POST', - headers: this.headerBuilder.build({ traceparent: t, transactionId: i?.id }), - body: JSON.stringify(r), - clientVersion: this.clientVersion, - }, - n - ); - (a.ok || Mt('graphql response status', a.status), await this.handleError(await Lt(a, this.clientVersion))); - let l = await a.json(); - if ((l.extensions && this.propagateResponseExtensions(l.extensions), 'errors' in l)) - throw this.convertProtocolErrorsToClientError(l.errors); - return 'batchResult' in l ? l.batchResult : l; - }, - }); - } - async transaction(r, t, n) { - let i = { start: 'starting', commit: 'committing', rollback: 'rolling back' }; - return this.withRetry({ - actionGerund: `${i[r]} transaction`, - callback: async ({ logHttpCall: o }) => { - if (r === 'start') { - let s = JSON.stringify({ max_wait: n.maxWait, timeout: n.timeout, isolation_level: n.isolationLevel }), - a = await this.url('transaction/start'); - o(a); - let l = await dr(a, { - method: 'POST', - headers: this.headerBuilder.build({ traceparent: t.traceparent }), - body: s, - clientVersion: this.clientVersion, - }); - await this.handleError(await Lt(l, this.clientVersion)); - let u = await l.json(), - { extensions: c } = u; - c && this.propagateResponseExtensions(c); - let p = u.id, - d = u['data-proxy'].endpoint; - return { id: p, payload: { endpoint: d } }; - } else { - let s = `${n.payload.endpoint}/${r}`; - o(s); - let a = await dr(s, { - method: 'POST', - headers: this.headerBuilder.build({ traceparent: t.traceparent }), - clientVersion: this.clientVersion, - }); - await this.handleError(await Lt(a, this.clientVersion)); - let l = await a.json(), - { extensions: u } = l; - u && this.propagateResponseExtensions(u); - return; - } - }, - }); - } - getURLAndAPIKey() { - return Rl({ - clientVersion: this.clientVersion, - env: this.env, - inlineDatasources: this.inlineDatasources, - overrideDatasources: this.config.overrideDatasources, - }); - } - metrics() { - throw new cr('Metrics are not yet supported for Accelerate', { clientVersion: this.clientVersion }); - } - async withRetry(r) { - for (let t = 0; ; t++) { - let n = (i) => { - this.logEmitter.emit('info', { message: `Calling ${i} (n=${t})`, timestamp: new Date(), target: '' }); - }; - try { - return await r.callback({ logHttpCall: n }); - } catch (i) { - if (!(i instanceof se) || !i.isRetryable) throw i; - if (t >= Nl) throw i instanceof jr ? i.cause : i; - this.logEmitter.emit('warn', { - message: `Attempt ${t + 1}/${Nl} failed for ${r.actionGerund}: ${i.message ?? '(unknown)'}`, - timestamp: new Date(), - target: '', - }); - let o = await Cl(t); - this.logEmitter.emit('warn', { message: `Retrying after ${o}ms`, timestamp: new Date(), target: '' }); - } - } - } - async handleError(r) { - if (r instanceof pr) throw (await this.uploadSchema(), new jr({ clientVersion: this.clientVersion, cause: r })); - if (r) throw r; - } - convertProtocolErrorsToClientError(r) { - return r.length === 1 - ? Mr(r[0], this.config.clientVersion, this.config.activeProvider) - : new V(JSON.stringify(r), { clientVersion: this.config.clientVersion }); - } - applyPendingMigrations() { - throw new Error('Method not implemented.'); - } - }; -function Ll(e) { - if (e?.kind === 'itx') return e.options.id; -} -var xo = A(require('node:os')), - Fl = A(require('node:path')); -var wo = Symbol('PrismaLibraryEngineCache'); -function bf() { - let e = globalThis; - return (e[wo] === void 0 && (e[wo] = {}), e[wo]); -} -function Ef(e) { - let r = bf(); - if (r[e] !== void 0) return r[e]; - let t = Fl.default.toNamespacedPath(e), - n = { exports: {} }, - i = 0; - return ( - process.platform !== 'win32' && - (i = xo.default.constants.dlopen.RTLD_LAZY | xo.default.constants.dlopen.RTLD_DEEPBIND), - process.dlopen(n, t, i), - (r[e] = n.exports), - n.exports - ); -} -var Ml = { - async loadLibrary(e) { - let r = await fi(), - t = await yl('library', e); - try { - return e.tracingHelper.runInChildSpan({ name: 'loadLibrary', internal: !0 }, () => Ef(t)); - } catch (n) { - let i = Ai({ e: n, platformInfo: r, id: t }); - throw new v(i, e.clientVersion); - } - }, -}; -var Po, - $l = { - async loadLibrary(e) { - let { clientVersion: r, adapter: t, engineWasm: n } = e; - if (t === void 0) - throw new v(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Gn().prettyName})`, r); - if (n === void 0) throw new v('WASM engine was unexpectedly `undefined`', r); - Po === void 0 && - (Po = (async () => { - let o = await n.getRuntime(), - s = await n.getQueryEngineWasmModule(); - if (s == null) throw new v('The loaded wasm module was unexpectedly `undefined` or `null` once loaded', r); - let a = { './query_engine_bg.js': o }, - l = new WebAssembly.Instance(s, a), - u = l.exports.__wbindgen_start; - return (o.__wbg_set_wasm(l.exports), u(), o.QueryEngine); - })()); - let i = await Po; - return { - debugPanic() { - return Promise.reject('{}'); - }, - dmmf() { - return Promise.resolve('{}'); - }, - version() { - return { commit: 'unknown', version: 'unknown' }; - }, - QueryEngine: i, - }; - }, - }; -var wf = 'P2036', - Re = N('prisma:client:libraryEngine'); -function xf(e) { - return e.item_type === 'query' && 'query' in e; -} -function Pf(e) { - return 'level' in e ? e.level === 'error' && e.message === 'PANIC' : !1; -} -var ql = [...li, 'native'], - vf = 0xffffffffffffffffn, - vo = 1n; -function Tf() { - let e = vo++; - return (vo > vf && (vo = 1n), e); -} -var Gr = class { - name = 'LibraryEngine'; - engine; - libraryInstantiationPromise; - libraryStartingPromise; - libraryStoppingPromise; - libraryStarted; - executingQueryPromise; - config; - QueryEngineConstructor; - libraryLoader; - library; - logEmitter; - libQueryEnginePath; - binaryTarget; - datasourceOverrides; - datamodel; - logQueries; - logLevel; - lastQuery; - loggerRustPanic; - tracingHelper; - adapterPromise; - versionInfo; - constructor(r, t) { - ((this.libraryLoader = t ?? Ml), - r.engineWasm !== void 0 && (this.libraryLoader = t ?? $l), - (this.config = r), - (this.libraryStarted = !1), - (this.logQueries = r.logQueries ?? !1), - (this.logLevel = r.logLevel ?? 'error'), - (this.logEmitter = r.logEmitter), - (this.datamodel = r.inlineSchema), - (this.tracingHelper = r.tracingHelper), - r.enableDebugLogs && (this.logLevel = 'debug')); - let n = Object.keys(r.overrideDatasources)[0], - i = r.overrideDatasources[n]?.url; - (n !== void 0 && i !== void 0 && (this.datasourceOverrides = { [n]: i }), - (this.libraryInstantiationPromise = this.instantiateLibrary())); - } - wrapEngine(r) { - return { - applyPendingMigrations: r.applyPendingMigrations?.bind(r), - commitTransaction: this.withRequestId(r.commitTransaction.bind(r)), - connect: this.withRequestId(r.connect.bind(r)), - disconnect: this.withRequestId(r.disconnect.bind(r)), - metrics: r.metrics?.bind(r), - query: this.withRequestId(r.query.bind(r)), - rollbackTransaction: this.withRequestId(r.rollbackTransaction.bind(r)), - sdlSchema: r.sdlSchema?.bind(r), - startTransaction: this.withRequestId(r.startTransaction.bind(r)), - trace: r.trace.bind(r), - free: r.free?.bind(r), - }; - } - withRequestId(r) { - return async (...t) => { - let n = Tf().toString(); - try { - return await r(...t, n); - } finally { - if (this.tracingHelper.isEnabled()) { - let i = await this.engine?.trace(n); - if (i) { - let o = JSON.parse(i); - this.tracingHelper.dispatchEngineSpans(o.spans); - } - } - } - }; - } - async applyPendingMigrations() { - throw new Error('Cannot call this method from this type of engine instance'); - } - async transaction(r, t, n) { - await this.start(); - let i = await this.adapterPromise, - o = JSON.stringify(t), - s; - if (r === 'start') { - let l = JSON.stringify({ max_wait: n.maxWait, timeout: n.timeout, isolation_level: n.isolationLevel }); - s = await this.engine?.startTransaction(l, o); - } else - r === 'commit' - ? (s = await this.engine?.commitTransaction(n.id, o)) - : r === 'rollback' && (s = await this.engine?.rollbackTransaction(n.id, o)); - let a = this.parseEngineResponse(s); - if (Sf(a)) { - let l = this.getExternalAdapterError(a, i?.errorRegistry); - throw l - ? l.error - : new z(a.message, { code: a.error_code, clientVersion: this.config.clientVersion, meta: a.meta }); - } else if (typeof a.message == 'string') throw new V(a.message, { clientVersion: this.config.clientVersion }); - return a; - } - async instantiateLibrary() { - if ((Re('internalSetup'), this.libraryInstantiationPromise)) return this.libraryInstantiationPromise; - (ai(), - (this.binaryTarget = await this.getCurrentBinaryTarget()), - await this.tracingHelper.runInChildSpan('load_engine', () => this.loadEngine()), - this.version()); - } - async getCurrentBinaryTarget() { - { - if (this.binaryTarget) return this.binaryTarget; - let r = await this.tracingHelper.runInChildSpan('detect_platform', () => ir()); - if (!ql.includes(r)) - throw new v( - `Unknown ${ce('PRISMA_QUERY_ENGINE_LIBRARY')} ${ce(W(r))}. Possible binaryTargets: ${qe(ql.join(', '))} or a path to the query engine library. -You may have to run ${qe('prisma generate')} for your changes to take effect.`, - this.config.clientVersion - ); - return r; - } - } - parseEngineResponse(r) { - if (!r) throw new V('Response from the Engine was empty', { clientVersion: this.config.clientVersion }); - try { - return JSON.parse(r); - } catch { - throw new V('Unable to JSON.parse response from engine', { clientVersion: this.config.clientVersion }); - } - } - async loadEngine() { - if (!this.engine) { - this.QueryEngineConstructor || - ((this.library = await this.libraryLoader.loadLibrary(this.config)), - (this.QueryEngineConstructor = this.library.QueryEngine)); - try { - let r = new WeakRef(this); - this.adapterPromise || (this.adapterPromise = this.config.adapter?.connect()?.then(rn)); - let t = await this.adapterPromise; - (t && Re('Using driver adapter: %O', t), - (this.engine = this.wrapEngine( - new this.QueryEngineConstructor( - { - datamodel: this.datamodel, - env: process.env, - logQueries: this.config.logQueries ?? !1, - ignoreEnvVarErrors: !0, - datasourceOverrides: this.datasourceOverrides ?? {}, - logLevel: this.logLevel, - configDir: this.config.cwd, - engineProtocol: 'json', - enableTracing: this.tracingHelper.isEnabled(), - }, - (n) => { - r.deref()?.logger(n); - }, - t - ) - ))); - } catch (r) { - let t = r, - n = this.parseInitError(t.message); - throw typeof n == 'string' ? t : new v(n.message, this.config.clientVersion, n.error_code); - } - } - } - logger(r) { - let t = this.parseEngineResponse(r); - t && - ((t.level = t?.level.toLowerCase() ?? 'unknown'), - xf(t) - ? this.logEmitter.emit('query', { - timestamp: new Date(), - query: t.query, - params: t.params, - duration: Number(t.duration_ms), - target: t.module_path, - }) - : Pf(t) - ? (this.loggerRustPanic = new le( - To(this, `${t.message}: ${t.reason} in ${t.file}:${t.line}:${t.column}`), - this.config.clientVersion - )) - : this.logEmitter.emit(t.level, { timestamp: new Date(), message: t.message, target: t.module_path })); - } - parseInitError(r) { - try { - return JSON.parse(r); - } catch {} - return r; - } - parseRequestError(r) { - try { - return JSON.parse(r); - } catch {} - return r; - } - onBeforeExit() { - throw new Error( - '"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.' - ); - } - async start() { - if ( - (this.libraryInstantiationPromise || (this.libraryInstantiationPromise = this.instantiateLibrary()), - await this.libraryInstantiationPromise, - await this.libraryStoppingPromise, - this.libraryStartingPromise) - ) - return (Re(`library already starting, this.libraryStarted: ${this.libraryStarted}`), this.libraryStartingPromise); - if (this.libraryStarted) return; - let r = async () => { - Re('library starting'); - try { - let t = { traceparent: this.tracingHelper.getTraceParent() }; - (await this.engine?.connect(JSON.stringify(t)), - (this.libraryStarted = !0), - this.adapterPromise || (this.adapterPromise = this.config.adapter?.connect()?.then(rn)), - await this.adapterPromise, - Re('library started')); - } catch (t) { - let n = this.parseInitError(t.message); - throw typeof n == 'string' ? t : new v(n.message, this.config.clientVersion, n.error_code); - } finally { - this.libraryStartingPromise = void 0; - } - }; - return ( - (this.libraryStartingPromise = this.tracingHelper.runInChildSpan('connect', r)), - this.libraryStartingPromise - ); - } - async stop() { - if ( - (await this.libraryInstantiationPromise, - await this.libraryStartingPromise, - await this.executingQueryPromise, - this.libraryStoppingPromise) - ) - return (Re('library is already stopping'), this.libraryStoppingPromise); - if (!this.libraryStarted) { - (await (await this.adapterPromise)?.dispose(), (this.adapterPromise = void 0)); - return; - } - let r = async () => { - (await new Promise((n) => setImmediate(n)), Re('library stopping')); - let t = { traceparent: this.tracingHelper.getTraceParent() }; - (await this.engine?.disconnect(JSON.stringify(t)), - this.engine?.free && this.engine.free(), - (this.engine = void 0), - (this.libraryStarted = !1), - (this.libraryStoppingPromise = void 0), - (this.libraryInstantiationPromise = void 0), - await (await this.adapterPromise)?.dispose(), - (this.adapterPromise = void 0), - Re('library stopped')); - }; - return ( - (this.libraryStoppingPromise = this.tracingHelper.runInChildSpan('disconnect', r)), - this.libraryStoppingPromise - ); - } - version() { - return ((this.versionInfo = this.library?.version()), this.versionInfo?.version ?? 'unknown'); - } - debugPanic(r) { - return this.library?.debugPanic(r); - } - async request(r, { traceparent: t, interactiveTransaction: n }) { - Re(`sending request, this.libraryStarted: ${this.libraryStarted}`); - let i = JSON.stringify({ traceparent: t }), - o = JSON.stringify(r); - try { - await this.start(); - let s = await this.adapterPromise; - ((this.executingQueryPromise = this.engine?.query(o, i, n?.id)), (this.lastQuery = o)); - let a = this.parseEngineResponse(await this.executingQueryPromise); - if (a.errors) - throw a.errors.length === 1 - ? this.buildQueryError(a.errors[0], s?.errorRegistry) - : new V(JSON.stringify(a.errors), { clientVersion: this.config.clientVersion }); - if (this.loggerRustPanic) throw this.loggerRustPanic; - return { data: a }; - } catch (s) { - if (s instanceof v) throw s; - if (s.code === 'GenericFailure' && s.message?.startsWith('PANIC:')) - throw new le(To(this, s.message), this.config.clientVersion); - let a = this.parseRequestError(s.message); - throw typeof a == 'string' - ? s - : new V( - `${a.message} -${a.backtrace}`, - { clientVersion: this.config.clientVersion } - ); - } - } - async requestBatch(r, { transaction: t, traceparent: n }) { - Re('requestBatch'); - let i = Fr(r, t); - await this.start(); - let o = await this.adapterPromise; - ((this.lastQuery = JSON.stringify(i)), - (this.executingQueryPromise = this.engine?.query(this.lastQuery, JSON.stringify({ traceparent: n }), Ll(t)))); - let s = await this.executingQueryPromise, - a = this.parseEngineResponse(s); - if (a.errors) - throw a.errors.length === 1 - ? this.buildQueryError(a.errors[0], o?.errorRegistry) - : new V(JSON.stringify(a.errors), { clientVersion: this.config.clientVersion }); - let { batchResult: l, errors: u } = a; - if (Array.isArray(l)) - return l.map((c) => - c.errors && c.errors.length > 0 - ? (this.loggerRustPanic ?? this.buildQueryError(c.errors[0], o?.errorRegistry)) - : { data: c } - ); - throw u && u.length === 1 ? new Error(u[0].error) : new Error(JSON.stringify(a)); - } - buildQueryError(r, t) { - if (r.user_facing_error.is_panic) return new le(To(this, r.user_facing_error.message), this.config.clientVersion); - let n = this.getExternalAdapterError(r.user_facing_error, t); - return n ? n.error : Mr(r, this.config.clientVersion, this.config.activeProvider); - } - getExternalAdapterError(r, t) { - if (r.error_code === wf && t) { - let n = r.meta?.id; - an(typeof n == 'number', 'Malformed external JS error received from the engine'); - let i = t.consumeError(n); - return (an(i, 'External error with reported id was not registered'), i); - } - } - async metrics(r) { - await this.start(); - let t = await this.engine.metrics(JSON.stringify(r)); - return r.format === 'prometheus' ? t : this.parseEngineResponse(t); - } -}; -function Sf(e) { - return typeof e == 'object' && e !== null && e.error_code !== void 0; -} -function To(e, r) { - return vl({ - binaryTarget: e.binaryTarget, - title: r, - version: e.config.clientVersion, - engineVersion: e.versionInfo?.commit, - database: e.config.activeProvider, - query: e.lastQuery, - }); -} -function Vl({ url: e, adapter: r, copyEngine: t, targetBuildType: n }) { - let i = [], - o = [], - s = (g) => { - i.push({ _tag: 'warning', value: g }); - }, - a = (g) => { - let D = g.join(` -`); - o.push({ _tag: 'error', value: D }); - }, - l = !!e?.startsWith('prisma://'), - u = sn(e), - c = !!r, - p = l || u; - !c && - t && - p && - s([ - 'recommend--no-engine', - 'In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)', - ]); - let d = p || !t; - c && - (d || n === 'edge') && - (n === 'edge' - ? a([ - 'Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.', - 'Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor.', - ]) - : t - ? l && - a([ - 'Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.', - 'Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor.', - ]) - : a([ - 'Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.', - 'Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter.', - ])); - let f = { accelerate: d, ppg: u, driverAdapters: c }; - function h(g) { - return g.length > 0; - } - return h(o) - ? { ok: !1, diagnostics: { warnings: i, errors: o }, isUsing: f } - : { ok: !0, diagnostics: { warnings: i }, isUsing: f }; -} -function jl({ copyEngine: e = !0 }, r) { - let t; - try { - t = Vr({ - inlineDatasources: r.inlineDatasources, - overrideDatasources: r.overrideDatasources, - env: { ...r.env, ...process.env }, - clientVersion: r.clientVersion, - }); - } catch {} - let { - ok: n, - isUsing: i, - diagnostics: o, - } = Vl({ url: t, adapter: r.adapter, copyEngine: e, targetBuildType: 'library' }); - for (let p of o.warnings) st(...p.value); - if (!n) { - let p = o.errors[0]; - throw new Z(p.value, { clientVersion: r.clientVersion }); - } - let s = Er(r.generator), - a = s === 'library', - l = s === 'binary', - u = s === 'client', - c = (i.accelerate || i.ppg) && !i.driverAdapters; - return i.accelerate ? new $t(r) : (i.driverAdapters, a ? new Gr(r) : (i.accelerate, new Gr(r))); -} -function Yn({ generator: e }) { - return e?.previewFeatures ?? []; -} -var Bl = (e) => ({ command: e }); -var Ul = (e) => e.strings.reduce((r, t, n) => `${r}@P${n}${t}`); -function Qr(e) { - try { - return Gl(e, 'fast'); - } catch { - return Gl(e, 'slow'); - } -} -function Gl(e, r) { - return JSON.stringify(e.map((t) => Wl(t, r))); -} -function Wl(e, r) { - if (Array.isArray(e)) return e.map((t) => Wl(t, r)); - if (typeof e == 'bigint') return { prisma__type: 'bigint', prisma__value: e.toString() }; - if (xr(e)) return { prisma__type: 'date', prisma__value: e.toJSON() }; - if (Fe.isDecimal(e)) return { prisma__type: 'decimal', prisma__value: e.toJSON() }; - if (Buffer.isBuffer(e)) return { prisma__type: 'bytes', prisma__value: e.toString('base64') }; - if (Rf(e)) return { prisma__type: 'bytes', prisma__value: Buffer.from(e).toString('base64') }; - if (ArrayBuffer.isView(e)) { - let { buffer: t, byteOffset: n, byteLength: i } = e; - return { prisma__type: 'bytes', prisma__value: Buffer.from(t, n, i).toString('base64') }; - } - return typeof e == 'object' && r === 'slow' ? Jl(e) : e; -} -function Rf(e) { - return e instanceof ArrayBuffer || e instanceof SharedArrayBuffer - ? !0 - : typeof e == 'object' && e !== null - ? e[Symbol.toStringTag] === 'ArrayBuffer' || e[Symbol.toStringTag] === 'SharedArrayBuffer' - : !1; -} -function Jl(e) { - if (typeof e != 'object' || e === null) return e; - if (typeof e.toJSON == 'function') return e.toJSON(); - if (Array.isArray(e)) return e.map(Ql); - let r = {}; - for (let t of Object.keys(e)) r[t] = Ql(e[t]); - return r; -} -function Ql(e) { - return typeof e == 'bigint' ? e.toString() : Jl(e); -} -var Af = /^(\s*alter\s)/i, - Kl = N('prisma:client'); -function So(e, r, t, n) { - if (!(e !== 'postgresql' && e !== 'cockroachdb') && t.length > 0 && Af.exec(r)) - throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`); -} -var Ro = - ({ clientMethod: e, activeProvider: r }) => - (t) => { - let n = '', - i; - if (qn(t)) ((n = t.sql), (i = { values: Qr(t.values), __prismaRawParameters__: !0 })); - else if (Array.isArray(t)) { - let [o, ...s] = t; - ((n = o), (i = { values: Qr(s || []), __prismaRawParameters__: !0 })); - } else - switch (r) { - case 'sqlite': - case 'mysql': { - ((n = t.sql), (i = { values: Qr(t.values), __prismaRawParameters__: !0 })); - break; - } - case 'cockroachdb': - case 'postgresql': - case 'postgres': { - ((n = t.text), (i = { values: Qr(t.values), __prismaRawParameters__: !0 })); - break; - } - case 'sqlserver': { - ((n = Ul(t)), (i = { values: Qr(t.values), __prismaRawParameters__: !0 })); - break; - } - default: - throw new Error(`The ${r} provider does not support ${e}`); - } - return (i?.values ? Kl(`prisma.${e}(${n}, ${i.values})`) : Kl(`prisma.${e}(${n})`), { query: n, parameters: i }); - }, - Hl = { - requestArgsToMiddlewareArgs(e) { - return [e.strings, ...e.values]; - }, - middlewareArgsToRequestArgs(e) { - let [r, ...t] = e; - return new oe(r, t); - }, - }, - Yl = { - requestArgsToMiddlewareArgs(e) { - return [e]; - }, - middlewareArgsToRequestArgs(e) { - return e[0]; - }, - }; -function Ao(e) { - return function (t, n) { - let i, - o = (s = e) => { - try { - return s === void 0 || s?.kind === 'itx' ? (i ??= zl(t(s))) : zl(t(s)); - } catch (a) { - return Promise.reject(a); - } - }; - return { - get spec() { - return n; - }, - then(s, a) { - return o().then(s, a); - }, - catch(s) { - return o().catch(s); - }, - finally(s) { - return o().finally(s); - }, - requestTransaction(s) { - let a = o(s); - return a.requestTransaction ? a.requestTransaction(s) : a; - }, - [Symbol.toStringTag]: 'PrismaPromise', - }; - }; -} -function zl(e) { - return typeof e.then == 'function' ? e : Promise.resolve(e); -} -var Cf = xi.split('.')[0], - If = { - isEnabled() { - return !1; - }, - getTraceParent() { - return '00-10-10-00'; - }, - dispatchEngineSpans() {}, - getActiveContext() {}, - runInChildSpan(e, r) { - return r(); - }, - }, - Co = class { - isEnabled() { - return this.getGlobalTracingHelper().isEnabled(); - } - getTraceParent(r) { - return this.getGlobalTracingHelper().getTraceParent(r); - } - dispatchEngineSpans(r) { - return this.getGlobalTracingHelper().dispatchEngineSpans(r); - } - getActiveContext() { - return this.getGlobalTracingHelper().getActiveContext(); - } - runInChildSpan(r, t) { - return this.getGlobalTracingHelper().runInChildSpan(r, t); - } - getGlobalTracingHelper() { - let r = globalThis[`V${Cf}_PRISMA_INSTRUMENTATION`], - t = globalThis.PRISMA_INSTRUMENTATION; - return r?.helper ?? t?.helper ?? If; - } - }; -function Zl() { - return new Co(); -} -function Xl(e, r = () => {}) { - let t, - n = new Promise((i) => (t = i)); - return { - then(i) { - return (--e === 0 && t(r()), i?.(n)); - }, - }; -} -function eu(e) { - return typeof e == 'string' - ? e - : e.reduce( - (r, t) => { - let n = typeof t == 'string' ? t : t.level; - return n === 'query' ? r : r && (t === 'info' || r === 'info') ? 'info' : n; - }, - void 0 - ); -} -var tu = A(Ni()); -function zn(e) { - return typeof e.batchRequestIdx == 'number'; -} -function ru(e) { - if (e.action !== 'findUnique' && e.action !== 'findUniqueOrThrow') return; - let r = []; - return ( - e.modelName && r.push(e.modelName), - e.query.arguments && r.push(Io(e.query.arguments)), - r.push(Io(e.query.selection)), - r.join('') - ); -} -function Io(e) { - return `(${Object.keys(e) - .sort() - .map((t) => { - let n = e[t]; - return typeof n == 'object' && n !== null ? `(${t} ${Io(n)})` : t; - }) - .join(' ')})`; -} -var Df = { - aggregate: !1, - aggregateRaw: !1, - createMany: !0, - createManyAndReturn: !0, - createOne: !0, - deleteMany: !0, - deleteOne: !0, - executeRaw: !0, - findFirst: !1, - findFirstOrThrow: !1, - findMany: !1, - findRaw: !1, - findUnique: !1, - findUniqueOrThrow: !1, - groupBy: !1, - queryRaw: !1, - runCommandRaw: !0, - updateMany: !0, - updateManyAndReturn: !0, - updateOne: !0, - upsertOne: !0, -}; -function Do(e) { - return Df[e]; -} -var Zn = class { - constructor(r) { - this.options = r; - this.batches = {}; - } - batches; - tickActive = !1; - request(r) { - let t = this.options.batchBy(r); - return t - ? (this.batches[t] || - ((this.batches[t] = []), - this.tickActive || - ((this.tickActive = !0), - process.nextTick(() => { - (this.dispatchBatches(), (this.tickActive = !1)); - }))), - new Promise((n, i) => { - this.batches[t].push({ request: r, resolve: n, reject: i }); - })) - : this.options.singleLoader(r); - } - dispatchBatches() { - for (let r in this.batches) { - let t = this.batches[r]; - (delete this.batches[r], - t.length === 1 - ? this.options - .singleLoader(t[0].request) - .then((n) => { - n instanceof Error ? t[0].reject(n) : t[0].resolve(n); - }) - .catch((n) => { - t[0].reject(n); - }) - : (t.sort((n, i) => this.options.batchOrder(n.request, i.request)), - this.options - .batchLoader(t.map((n) => n.request)) - .then((n) => { - if (n instanceof Error) for (let i = 0; i < t.length; i++) t[i].reject(n); - else - for (let i = 0; i < t.length; i++) { - let o = n[i]; - o instanceof Error ? t[i].reject(o) : t[i].resolve(o); - } - }) - .catch((n) => { - for (let i = 0; i < t.length; i++) t[i].reject(n); - }))); - } - } - get [Symbol.toStringTag]() { - return 'DataLoader'; - } -}; -function mr(e, r) { - if (r === null) return r; - switch (e) { - case 'bigint': - return BigInt(r); - case 'bytes': { - let { buffer: t, byteOffset: n, byteLength: i } = Buffer.from(r, 'base64'); - return new Uint8Array(t, n, i); - } - case 'decimal': - return new Fe(r); - case 'datetime': - case 'date': - return new Date(r); - case 'time': - return new Date(`1970-01-01T${r}Z`); - case 'bigint-array': - return r.map((t) => mr('bigint', t)); - case 'bytes-array': - return r.map((t) => mr('bytes', t)); - case 'decimal-array': - return r.map((t) => mr('decimal', t)); - case 'datetime-array': - return r.map((t) => mr('datetime', t)); - case 'date-array': - return r.map((t) => mr('date', t)); - case 'time-array': - return r.map((t) => mr('time', t)); - default: - return r; - } -} -function Xn(e) { - let r = [], - t = Of(e); - for (let n = 0; n < e.rows.length; n++) { - let i = e.rows[n], - o = { ...t }; - for (let s = 0; s < i.length; s++) o[e.columns[s]] = mr(e.types[s], i[s]); - r.push(o); - } - return r; -} -function Of(e) { - let r = {}; - for (let t = 0; t < e.columns.length; t++) r[e.columns[t]] = null; - return r; -} -var kf = N('prisma:client:request_handler'), - ei = class { - client; - dataloader; - logEmitter; - constructor(r, t) { - ((this.logEmitter = t), - (this.client = r), - (this.dataloader = new Zn({ - batchLoader: ol(async ({ requests: n, customDataProxyFetch: i }) => { - let { transaction: o, otelParentCtx: s } = n[0], - a = n.map((p) => p.protocolQuery), - l = this.client._tracingHelper.getTraceParent(s), - u = n.some((p) => Do(p.protocolQuery.action)); - return ( - await this.client._engine.requestBatch(a, { - traceparent: l, - transaction: _f(o), - containsWrite: u, - customDataProxyFetch: i, - }) - ).map((p, d) => { - if (p instanceof Error) return p; - try { - return this.mapQueryEngineResult(n[d], p); - } catch (f) { - return f; - } - }); - }), - singleLoader: async (n) => { - let i = n.transaction?.kind === 'itx' ? nu(n.transaction) : void 0, - o = await this.client._engine.request(n.protocolQuery, { - traceparent: this.client._tracingHelper.getTraceParent(), - interactiveTransaction: i, - isWrite: Do(n.protocolQuery.action), - customDataProxyFetch: n.customDataProxyFetch, - }); - return this.mapQueryEngineResult(n, o); - }, - batchBy: (n) => (n.transaction?.id ? `transaction-${n.transaction.id}` : ru(n.protocolQuery)), - batchOrder(n, i) { - return n.transaction?.kind === 'batch' && i.transaction?.kind === 'batch' - ? n.transaction.index - i.transaction.index - : 0; - }, - }))); - } - async request(r) { - try { - return await this.dataloader.request(r); - } catch (t) { - let { clientMethod: n, callsite: i, transaction: o, args: s, modelName: a } = r; - this.handleAndLogRequestError({ - error: t, - clientMethod: n, - callsite: i, - transaction: o, - args: s, - modelName: a, - globalOmit: r.globalOmit, - }); - } - } - mapQueryEngineResult({ dataPath: r, unpacker: t }, n) { - let i = n?.data, - o = this.unpack(i, r, t); - return process.env.PRISMA_CLIENT_GET_TIME ? { data: o } : o; - } - handleAndLogRequestError(r) { - try { - this.handleRequestError(r); - } catch (t) { - throw ( - this.logEmitter && - this.logEmitter.emit('error', { message: t.message, target: r.clientMethod, timestamp: new Date() }), - t - ); - } - } - handleRequestError({ - error: r, - clientMethod: t, - callsite: n, - transaction: i, - args: o, - modelName: s, - globalOmit: a, - }) { - if ((kf(r), Nf(r, i))) throw r; - if (r instanceof z && Lf(r)) { - let u = iu(r.meta); - _n({ - args: o, - errors: [u], - callsite: n, - errorFormat: this.client._errorFormat, - originalMethod: t, - clientVersion: this.client._clientVersion, - globalOmit: a, - }); - } - let l = r.message; - if ( - (n && - (l = vn({ - callsite: n, - originalMethod: t, - isPanic: r.isPanic, - showColors: this.client._errorFormat === 'pretty', - message: l, - })), - (l = this.sanitizeMessage(l)), - r.code) - ) { - let u = s ? { modelName: s, ...r.meta } : r.meta; - throw new z(l, { - code: r.code, - clientVersion: this.client._clientVersion, - meta: u, - batchRequestIdx: r.batchRequestIdx, - }); - } else { - if (r.isPanic) throw new le(l, this.client._clientVersion); - if (r instanceof V) - throw new V(l, { clientVersion: this.client._clientVersion, batchRequestIdx: r.batchRequestIdx }); - if (r instanceof v) throw new v(l, this.client._clientVersion); - if (r instanceof le) throw new le(l, this.client._clientVersion); - } - throw ((r.clientVersion = this.client._clientVersion), r); - } - sanitizeMessage(r) { - return this.client._errorFormat && this.client._errorFormat !== 'pretty' ? (0, tu.default)(r) : r; - } - unpack(r, t, n) { - if (!r || (r.data && (r = r.data), !r)) return r; - let i = Object.keys(r)[0], - o = Object.values(r)[0], - s = t.filter((u) => u !== 'select' && u !== 'include'), - a = ao(o, s), - l = i === 'queryRaw' ? Xn(a) : qr(a); - return n ? n(l) : l; - } - get [Symbol.toStringTag]() { - return 'RequestHandler'; - } - }; -function _f(e) { - if (e) { - if (e.kind === 'batch') return { kind: 'batch', options: { isolationLevel: e.isolationLevel } }; - if (e.kind === 'itx') return { kind: 'itx', options: nu(e) }; - ar(e, 'Unknown transaction kind'); - } -} -function nu(e) { - return { id: e.id, payload: e.payload }; -} -function Nf(e, r) { - return zn(e) && r?.kind === 'batch' && e.batchRequestIdx !== r.index; -} -function Lf(e) { - return e.code === 'P2009' || e.code === 'P2012'; -} -function iu(e) { - if (e.kind === 'Union') return { kind: 'Union', errors: e.errors.map(iu) }; - if (Array.isArray(e.selectionPath)) { - let [, ...r] = e.selectionPath; - return { ...e, selectionPath: r }; - } - return e; -} -var ou = Sl; -var cu = A(Ki()); -var k = class extends Error { - constructor(r) { - (super( - r + - ` -Read more at https://pris.ly/d/client-constructor` - ), - (this.name = 'PrismaClientConstructorValidationError')); - } - get [Symbol.toStringTag]() { - return 'PrismaClientConstructorValidationError'; - } -}; -x(k, 'PrismaClientConstructorValidationError'); -var su = ['datasources', 'datasourceUrl', 'errorFormat', 'adapter', 'log', 'transactionOptions', 'omit', '__internal'], - au = ['pretty', 'colorless', 'minimal'], - lu = ['info', 'query', 'warn', 'error'], - Ff = { - datasources: (e, { datasourceNames: r }) => { - if (e) { - if (typeof e != 'object' || Array.isArray(e)) - throw new k(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`); - for (let [t, n] of Object.entries(e)) { - if (!r.includes(t)) { - let i = Wr(t, r) || ` Available datasources: ${r.join(', ')}`; - throw new k(`Unknown datasource ${t} provided to PrismaClient constructor.${i}`); - } - if (typeof n != 'object' || Array.isArray(n)) - throw new k(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`); - if (n && typeof n == 'object') - for (let [i, o] of Object.entries(n)) { - if (i !== 'url') - throw new k(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`); - if (typeof o != 'string') - throw new k(`Invalid value ${JSON.stringify(o)} for datasource "${t}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`); - } - } - } - }, - adapter: (e, r) => { - if (!e && Er(r.generator) === 'client') - throw new k('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.'); - if (e === null) return; - if (e === void 0) - throw new k('"adapter" property must not be undefined, use null to conditionally disable driver adapters.'); - if (!Yn(r).includes('driverAdapters')) - throw new k( - '"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.' - ); - if (Er(r.generator) === 'binary') - throw new k( - 'Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.' - ); - }, - datasourceUrl: (e) => { - if (typeof e < 'u' && typeof e != 'string') - throw new k(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`); - }, - errorFormat: (e) => { - if (e) { - if (typeof e != 'string') - throw new k(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`); - if (!au.includes(e)) { - let r = Wr(e, au); - throw new k(`Invalid errorFormat ${e} provided to PrismaClient constructor.${r}`); - } - } - }, - log: (e) => { - if (!e) return; - if (!Array.isArray(e)) - throw new k(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`); - function r(t) { - if (typeof t == 'string' && !lu.includes(t)) { - let n = Wr(t, lu); - throw new k(`Invalid log level "${t}" provided to PrismaClient constructor.${n}`); - } - } - for (let t of e) { - r(t); - let n = { - level: r, - emit: (i) => { - let o = ['stdout', 'event']; - if (!o.includes(i)) { - let s = Wr(i, o); - throw new k( - `Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}` - ); - } - }, - }; - if (t && typeof t == 'object') - for (let [i, o] of Object.entries(t)) - if (n[i]) n[i](o); - else throw new k(`Invalid property ${i} for "log" provided to PrismaClient constructor`); - } - }, - transactionOptions: (e) => { - if (!e) return; - let r = e.maxWait; - if (r != null && r <= 0) - throw new k( - `Invalid value ${r} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0` - ); - let t = e.timeout; - if (t != null && t <= 0) - throw new k( - `Invalid value ${t} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0` - ); - }, - omit: (e, r) => { - if (typeof e != 'object') throw new k('"omit" option is expected to be an object.'); - if (e === null) throw new k('"omit" option can not be `null`'); - let t = []; - for (let [n, i] of Object.entries(e)) { - let o = $f(n, r.runtimeDataModel); - if (!o) { - t.push({ kind: 'UnknownModel', modelKey: n }); - continue; - } - for (let [s, a] of Object.entries(i)) { - let l = o.fields.find((u) => u.name === s); - if (!l) { - t.push({ kind: 'UnknownField', modelKey: n, fieldName: s }); - continue; - } - if (l.relationName) { - t.push({ kind: 'RelationInOmit', modelKey: n, fieldName: s }); - continue; - } - typeof a != 'boolean' && t.push({ kind: 'InvalidFieldValue', modelKey: n, fieldName: s }); - } - } - if (t.length > 0) throw new k(qf(e, t)); - }, - __internal: (e) => { - if (!e) return; - let r = ['debug', 'engine', 'configOverride']; - if (typeof e != 'object') - throw new k(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`); - for (let [t] of Object.entries(e)) - if (!r.includes(t)) { - let n = Wr(t, r); - throw new k( - `Invalid property ${JSON.stringify(t)} for "__internal" provided to PrismaClient constructor.${n}` - ); - } - }, - }; -function pu(e, r) { - for (let [t, n] of Object.entries(e)) { - if (!su.includes(t)) { - let i = Wr(t, su); - throw new k(`Unknown property ${t} provided to PrismaClient constructor.${i}`); - } - Ff[t](n, r); - } - if (e.datasourceUrl && e.datasources) - throw new k('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them'); -} -function Wr(e, r) { - if (r.length === 0 || typeof e != 'string') return ''; - let t = Mf(e, r); - return t ? ` Did you mean "${t}"?` : ''; -} -function Mf(e, r) { - if (r.length === 0) return null; - let t = r.map((i) => ({ value: i, distance: (0, cu.default)(e, i) })); - t.sort((i, o) => (i.distance < o.distance ? -1 : 1)); - let n = t[0]; - return n.distance < 3 ? n.value : null; -} -function $f(e, r) { - return uu(r.models, e) ?? uu(r.types, e); -} -function uu(e, r) { - let t = Object.keys(e).find((n) => We(n) === r); - if (t) return e[t]; -} -function qf(e, r) { - let t = kr(e); - for (let o of r) - switch (o.kind) { - case 'UnknownModel': - (t.arguments.getField(o.modelKey)?.markAsError(), - t.addErrorMessage(() => `Unknown model name: ${o.modelKey}.`)); - break; - case 'UnknownField': - (t.arguments.getDeepField([o.modelKey, o.fieldName])?.markAsError(), - t.addErrorMessage(() => `Model "${o.modelKey}" does not have a field named "${o.fieldName}".`)); - break; - case 'RelationInOmit': - (t.arguments.getDeepField([o.modelKey, o.fieldName])?.markAsError(), - t.addErrorMessage(() => 'Relations are already excluded by default and can not be specified in "omit".')); - break; - case 'InvalidFieldValue': - (t.arguments.getDeepFieldValue([o.modelKey, o.fieldName])?.markAsError(), - t.addErrorMessage(() => 'Omit field option value must be a boolean.')); - break; - } - let { message: n, args: i } = kn(t, 'colorless'); - return `Error validating "omit" option: - -${i} - -${n}`; -} -function du(e) { - return e.length === 0 - ? Promise.resolve([]) - : new Promise((r, t) => { - let n = new Array(e.length), - i = null, - o = !1, - s = 0, - a = () => { - o || (s++, s === e.length && ((o = !0), i ? t(i) : r(n))); - }, - l = (u) => { - o || ((o = !0), t(u)); - }; - for (let u = 0; u < e.length; u++) - e[u].then( - (c) => { - ((n[u] = c), a()); - }, - (c) => { - if (!zn(c)) { - l(c); - return; - } - c.batchRequestIdx === u ? l(c) : (i || (i = c), a()); - } - ); - }); -} -var rr = N('prisma:client'); -typeof globalThis == 'object' && (globalThis.NODE_CLIENT = !0); -var Vf = { requestArgsToMiddlewareArgs: (e) => e, middlewareArgsToRequestArgs: (e) => e }, - jf = Symbol.for('prisma.client.transaction.id'), - Bf = { - id: 0, - nextId() { - return ++this.id; - }, - }; -function bu(e) { - class r { - _originalClient = this; - _runtimeDataModel; - _requestHandler; - _connectionPromise; - _disconnectionPromise; - _engineConfig; - _accelerateEngineConfig; - _clientVersion; - _errorFormat; - _tracingHelper; - _previewFeatures; - _activeProvider; - _globalOmit; - _extensions; - _engine; - _appliedParent; - _createPrismaPromise = Ao(); - constructor(n) { - ((e = n?.__internal?.configOverride?.(e) ?? e), cl(e), n && pu(n, e)); - let i = new hu.EventEmitter().on('error', () => {}); - ((this._extensions = _r.empty()), - (this._previewFeatures = Yn(e)), - (this._clientVersion = e.clientVersion ?? ou), - (this._activeProvider = e.activeProvider), - (this._globalOmit = n?.omit), - (this._tracingHelper = Zl())); - let o = e.relativeEnvPaths && { - rootEnvPath: e.relativeEnvPaths.rootEnvPath && ri.default.resolve(e.dirname, e.relativeEnvPaths.rootEnvPath), - schemaEnvPath: - e.relativeEnvPaths.schemaEnvPath && ri.default.resolve(e.dirname, e.relativeEnvPaths.schemaEnvPath), - }, - s; - if (n?.adapter) { - s = n.adapter; - let l = e.activeProvider === 'postgresql' || e.activeProvider === 'cockroachdb' ? 'postgres' : e.activeProvider; - if (s.provider !== l) - throw new v( - `The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`, - this._clientVersion - ); - if (n.datasources || n.datasourceUrl !== void 0) - throw new v( - 'Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.', - this._clientVersion - ); - } - let a = (!s && o && ot(o, { conflictCheck: 'none' })) || e.injectableEdgeEnv?.(); - try { - let l = n ?? {}, - u = l.__internal ?? {}, - c = u.debug === !0; - c && N.enable('prisma:client'); - let p = ri.default.resolve(e.dirname, e.relativePath); - (yu.default.existsSync(p) || (p = e.dirname), - rr('dirname', e.dirname), - rr('relativePath', e.relativePath), - rr('cwd', p)); - let d = u.engine || {}; - if ( - (l.errorFormat - ? (this._errorFormat = l.errorFormat) - : process.env.NODE_ENV === 'production' - ? (this._errorFormat = 'minimal') - : process.env.NO_COLOR - ? (this._errorFormat = 'colorless') - : (this._errorFormat = 'colorless'), - (this._runtimeDataModel = e.runtimeDataModel), - (this._engineConfig = { - cwd: p, - dirname: e.dirname, - enableDebugLogs: c, - allowTriggerPanic: d.allowTriggerPanic, - prismaPath: d.binaryPath ?? void 0, - engineEndpoint: d.endpoint, - generator: e.generator, - showColors: this._errorFormat === 'pretty', - logLevel: l.log && eu(l.log), - logQueries: - l.log && - !!(typeof l.log == 'string' - ? l.log === 'query' - : l.log.find((f) => (typeof f == 'string' ? f === 'query' : f.level === 'query'))), - env: a?.parsed ?? {}, - flags: [], - engineWasm: e.engineWasm, - compilerWasm: e.compilerWasm, - clientVersion: e.clientVersion, - engineVersion: e.engineVersion, - previewFeatures: this._previewFeatures, - activeProvider: e.activeProvider, - inlineSchema: e.inlineSchema, - overrideDatasources: pl(l, e.datasourceNames), - inlineDatasources: e.inlineDatasources, - inlineSchemaHash: e.inlineSchemaHash, - tracingHelper: this._tracingHelper, - transactionOptions: { - maxWait: l.transactionOptions?.maxWait ?? 2e3, - timeout: l.transactionOptions?.timeout ?? 5e3, - isolationLevel: l.transactionOptions?.isolationLevel, - }, - logEmitter: i, - isBundled: e.isBundled, - adapter: s, - }), - (this._accelerateEngineConfig = { - ...this._engineConfig, - accelerateUtils: { - resolveDatasourceUrl: Vr, - getBatchRequestPayload: Fr, - prismaGraphQLToJSError: Mr, - PrismaClientUnknownRequestError: V, - PrismaClientInitializationError: v, - PrismaClientKnownRequestError: z, - debug: N('prisma:client:accelerateEngine'), - engineVersion: fu.version, - clientVersion: e.clientVersion, - }, - }), - rr('clientVersion', e.clientVersion), - (this._engine = jl(e, this._engineConfig)), - (this._requestHandler = new ei(this, i)), - l.log) - ) - for (let f of l.log) { - let h = typeof f == 'string' ? f : f.emit === 'stdout' ? f.level : null; - h && - this.$on(h, (g) => { - tt.log(`${tt.tags[h] ?? ''}`, g.message || g.query); - }); - } - } catch (l) { - throw ((l.clientVersion = this._clientVersion), l); - } - return (this._appliedParent = Pt(this)); - } - get [Symbol.toStringTag]() { - return 'PrismaClient'; - } - $on(n, i) { - return (n === 'beforeExit' ? this._engine.onBeforeExit(i) : n && this._engineConfig.logEmitter.on(n, i), this); - } - $connect() { - try { - return this._engine.start(); - } catch (n) { - throw ((n.clientVersion = this._clientVersion), n); - } - } - async $disconnect() { - try { - await this._engine.stop(); - } catch (n) { - throw ((n.clientVersion = this._clientVersion), n); - } finally { - Go(); - } - } - $executeRawInternal(n, i, o, s) { - let a = this._activeProvider; - return this._request({ - action: 'executeRaw', - args: o, - transaction: n, - clientMethod: i, - argsMapper: Ro({ clientMethod: i, activeProvider: a }), - callsite: Ze(this._errorFormat), - dataPath: [], - middlewareArgsMapper: s, - }); - } - $executeRaw(n, ...i) { - return this._createPrismaPromise((o) => { - if (n.raw !== void 0 || n.sql !== void 0) { - let [s, a] = mu(n, i); - return ( - So( - this._activeProvider, - s.text, - s.values, - Array.isArray(n) ? 'prisma.$executeRaw``' : 'prisma.$executeRaw(sql``)' - ), - this.$executeRawInternal(o, '$executeRaw', s, a) - ); - } - throw new Z( - "`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n", - { clientVersion: this._clientVersion } - ); - }); - } - $executeRawUnsafe(n, ...i) { - return this._createPrismaPromise( - (o) => ( - So(this._activeProvider, n, i, 'prisma.$executeRawUnsafe(, [...values])'), - this.$executeRawInternal(o, '$executeRawUnsafe', [n, ...i]) - ) - ); - } - $runCommandRaw(n) { - if (e.activeProvider !== 'mongodb') - throw new Z(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`, { - clientVersion: this._clientVersion, - }); - return this._createPrismaPromise((i) => - this._request({ - args: n, - clientMethod: '$runCommandRaw', - dataPath: [], - action: 'runCommandRaw', - argsMapper: Bl, - callsite: Ze(this._errorFormat), - transaction: i, - }) - ); - } - async $queryRawInternal(n, i, o, s) { - let a = this._activeProvider; - return this._request({ - action: 'queryRaw', - args: o, - transaction: n, - clientMethod: i, - argsMapper: Ro({ clientMethod: i, activeProvider: a }), - callsite: Ze(this._errorFormat), - dataPath: [], - middlewareArgsMapper: s, - }); - } - $queryRaw(n, ...i) { - return this._createPrismaPromise((o) => { - if (n.raw !== void 0 || n.sql !== void 0) return this.$queryRawInternal(o, '$queryRaw', ...mu(n, i)); - throw new Z( - "`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n", - { clientVersion: this._clientVersion } - ); - }); - } - $queryRawTyped(n) { - return this._createPrismaPromise((i) => { - if (!this._hasPreviewFlag('typedSql')) - throw new Z('`typedSql` preview feature must be enabled in order to access $queryRawTyped API', { - clientVersion: this._clientVersion, - }); - return this.$queryRawInternal(i, '$queryRawTyped', n); - }); - } - $queryRawUnsafe(n, ...i) { - return this._createPrismaPromise((o) => this.$queryRawInternal(o, '$queryRawUnsafe', [n, ...i])); - } - _transactionWithArray({ promises: n, options: i }) { - let o = Bf.nextId(), - s = Xl(n.length), - a = n.map((l, u) => { - if (l?.[Symbol.toStringTag] !== 'PrismaPromise') - throw new Error( - 'All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.' - ); - let c = i?.isolationLevel ?? this._engineConfig.transactionOptions.isolationLevel, - p = { kind: 'batch', id: o, index: u, isolationLevel: c, lock: s }; - return l.requestTransaction?.(p) ?? l; - }); - return du(a); - } - async _transactionWithCallback({ callback: n, options: i }) { - let o = { traceparent: this._tracingHelper.getTraceParent() }, - s = { - maxWait: i?.maxWait ?? this._engineConfig.transactionOptions.maxWait, - timeout: i?.timeout ?? this._engineConfig.transactionOptions.timeout, - isolationLevel: i?.isolationLevel ?? this._engineConfig.transactionOptions.isolationLevel, - }, - a = await this._engine.transaction('start', o, s), - l; - try { - let u = { kind: 'itx', ...a }; - ((l = await n(this._createItxClient(u))), await this._engine.transaction('commit', o, a)); - } catch (u) { - throw (await this._engine.transaction('rollback', o, a).catch(() => {}), u); - } - return l; - } - _createItxClient(n) { - return he( - Pt( - he(Ha(this), [ - re('_appliedParent', () => this._appliedParent._createItxClient(n)), - re('_createPrismaPromise', () => Ao(n)), - re(jf, () => n.id), - ]) - ), - [Lr(el)] - ); - } - $transaction(n, i) { - let o; - typeof n == 'function' - ? this._engineConfig.adapter?.adapterName === '@prisma/adapter-d1' - ? (o = () => { - throw new Error( - 'Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.' - ); - }) - : (o = () => this._transactionWithCallback({ callback: n, options: i })) - : (o = () => this._transactionWithArray({ promises: n, options: i })); - let s = { name: 'transaction', attributes: { method: '$transaction' } }; - return this._tracingHelper.runInChildSpan(s, o); - } - _request(n) { - n.otelParentCtx = this._tracingHelper.getActiveContext(); - let i = n.middlewareArgsMapper ?? Vf, - o = { - args: i.requestArgsToMiddlewareArgs(n.args), - dataPath: n.dataPath, - runInTransaction: !!n.transaction, - action: n.action, - model: n.model, - }, - s = { - operation: { - name: 'operation', - attributes: { method: o.action, model: o.model, name: o.model ? `${o.model}.${o.action}` : o.action }, - }, - }, - a = async (l) => { - let { runInTransaction: u, args: c, ...p } = l, - d = { ...n, ...p }; - (c && (d.args = i.middlewareArgsToRequestArgs(c)), - n.transaction !== void 0 && u === !1 && delete d.transaction); - let f = await il(this, d); - return d.model - ? Xa({ - result: f, - modelName: d.model, - args: d.args, - extensions: this._extensions, - runtimeDataModel: this._runtimeDataModel, - globalOmit: this._globalOmit, - }) - : f; - }; - return this._tracingHelper.runInChildSpan(s.operation, () => - new gu.AsyncResource('prisma-client-request').runInAsyncScope(() => a(o)) - ); - } - async _executeRequest({ - args: n, - clientMethod: i, - dataPath: o, - callsite: s, - action: a, - model: l, - argsMapper: u, - transaction: c, - unpacker: p, - otelParentCtx: d, - customDataProxyFetch: f, - }) { - try { - n = u ? u(n) : n; - let h = { name: 'serialize' }, - g = this._tracingHelper.runInChildSpan(h, () => - Mn({ - modelName: l, - runtimeDataModel: this._runtimeDataModel, - action: a, - args: n, - clientMethod: i, - callsite: s, - extensions: this._extensions, - errorFormat: this._errorFormat, - clientVersion: this._clientVersion, - previewFeatures: this._previewFeatures, - globalOmit: this._globalOmit, - }) - ); - return ( - N.enabled('prisma:client') && - (rr('Prisma Client call:'), - rr(`prisma.${i}(${$a(n)})`), - rr('Generated request:'), - rr( - JSON.stringify(g, null, 2) + - ` -` - )), - c?.kind === 'batch' && (await c.lock), - this._requestHandler.request({ - protocolQuery: g, - modelName: l, - action: a, - clientMethod: i, - dataPath: o, - callsite: s, - args: n, - extensions: this._extensions, - transaction: c, - unpacker: p, - otelParentCtx: d, - otelChildCtx: this._tracingHelper.getActiveContext(), - globalOmit: this._globalOmit, - customDataProxyFetch: f, - }) - ); - } catch (h) { - throw ((h.clientVersion = this._clientVersion), h); - } - } - $metrics = new Nr(this); - _hasPreviewFlag(n) { - return !!this._engineConfig.previewFeatures?.includes(n); - } - $applyPendingMigrations() { - return this._engine.applyPendingMigrations(); - } - $extends = Ya; - } - return r; -} -function mu(e, r) { - return Uf(e) ? [new oe(e, r), Hl] : [e, Yl]; -} -function Uf(e) { - return Array.isArray(e) && Array.isArray(e.raw); -} -var Gf = new Set([ - 'toJSON', - '$$typeof', - 'asymmetricMatch', - Symbol.iterator, - Symbol.toStringTag, - Symbol.isConcatSpreadable, - Symbol.toPrimitive, -]); -function Eu(e) { - return new Proxy(e, { - get(r, t) { - if (t in r) return r[t]; - if (!Gf.has(t)) throw new TypeError(`Invalid enum value: ${String(t)}`); - }, - }); -} -function wu(e) { - ot(e, { conflictCheck: 'warn' }); -} -0 && - (module.exports = { - DMMF, - Debug, - Decimal, - Extensions, - MetricsClient, - PrismaClientInitializationError, - PrismaClientKnownRequestError, - PrismaClientRustPanicError, - PrismaClientUnknownRequestError, - PrismaClientValidationError, - Public, - Sql, - createParam, - defineDmmfProperty, - deserializeJsonResponse, - deserializeRawResult, - dmmfToRuntimeDataModel, - empty, - getPrismaClient, - getRuntime, - join, - makeStrictEnum, - makeTypedQueryFactory, - objectEnumValues, - raw, - serializeJsonQuery, - skip, - sqltag, - warnEnvConflicts, - warnOnce, - }); -/*! Bundled license information: - -decimal.js/decimal.mjs: - (*! - * decimal.js v10.5.0 - * An arbitrary-precision Decimal type for JavaScript. - * https://github.com/MikeMcl/decimal.js - * Copyright (c) 2025 Michael Mclaughlin - * MIT Licence - *) -*/ -//# sourceMappingURL=library.js.map diff --git a/prisma/generated/client/runtime/react-native.js b/prisma/generated/client/runtime/react-native.js deleted file mode 100644 index aaa3d7f..0000000 --- a/prisma/generated/client/runtime/react-native.js +++ /dev/null @@ -1,9372 +0,0 @@ -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ -'use strict'; -var Ea = Object.create; -var tr = Object.defineProperty; -var xa = Object.getOwnPropertyDescriptor; -var Pa = Object.getOwnPropertyNames; -var va = Object.getPrototypeOf, - Ta = Object.prototype.hasOwnProperty; -var he = (e, t) => () => (e && (t = e((e = 0))), t); -var Ae = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), - Xe = (e, t) => { - for (var r in t) tr(e, r, { get: t[r], enumerable: !0 }); - }, - ii = (e, t, r, n) => { - if ((t && typeof t == 'object') || typeof t == 'function') - for (let i of Pa(t)) - !Ta.call(e, i) && i !== r && tr(e, i, { get: () => t[i], enumerable: !(n = xa(t, i)) || n.enumerable }); - return e; - }; -var Se = (e, t, r) => ( - (r = e != null ? Ea(va(e)) : {}), - ii(t || !e || !e.__esModule ? tr(r, 'default', { value: e, enumerable: !0 }) : r, e) - ), - Ca = (e) => ii(tr({}, '__esModule', { value: !0 }), e); -var y, - x, - c = he(() => { - 'use strict'; - ((y = { - nextTick: (e, ...t) => { - setTimeout(() => { - e(...t); - }, 0); - }, - env: {}, - version: '', - cwd: () => '/', - stderr: {}, - argv: ['/bin/node'], - pid: 1e4, - }), - ({ cwd: x } = y)); - }); -var P, - p = he(() => { - 'use strict'; - P = - globalThis.performance ?? - (() => { - let e = Date.now(); - return { now: () => Date.now() - e }; - })(); - }); -var E, - d = he(() => { - 'use strict'; - E = () => {}; - E.prototype = E; - }); -var b, - f = he(() => { - 'use strict'; - b = class { - value; - constructor(t) { - this.value = t; - } - deref() { - return this.value; - } - }; - }); -var vi = Ae((nt) => { - 'use strict'; - m(); - c(); - p(); - d(); - f(); - var ui = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), - Aa = ui((e) => { - 'use strict'; - ((e.byteLength = l), (e.toByteArray = g), (e.fromByteArray = k)); - var t = [], - r = [], - n = typeof Uint8Array < 'u' ? Uint8Array : Array, - i = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - for (o = 0, s = i.length; o < s; ++o) ((t[o] = i[o]), (r[i.charCodeAt(o)] = o)); - var o, s; - ((r[45] = 62), (r[95] = 63)); - function a(A) { - var S = A.length; - if (S % 4 > 0) throw new Error('Invalid string. Length must be a multiple of 4'); - var F = A.indexOf('='); - F === -1 && (F = S); - var _ = F === S ? 0 : 4 - (F % 4); - return [F, _]; - } - function l(A) { - var S = a(A), - F = S[0], - _ = S[1]; - return ((F + _) * 3) / 4 - _; - } - function u(A, S, F) { - return ((S + F) * 3) / 4 - F; - } - function g(A) { - var S, - F = a(A), - _ = F[0], - L = F[1], - O = new n(u(A, _, L)), - q = 0, - Y = L > 0 ? _ - 4 : _, - $; - for ($ = 0; $ < Y; $ += 4) - ((S = - (r[A.charCodeAt($)] << 18) | - (r[A.charCodeAt($ + 1)] << 12) | - (r[A.charCodeAt($ + 2)] << 6) | - r[A.charCodeAt($ + 3)]), - (O[q++] = (S >> 16) & 255), - (O[q++] = (S >> 8) & 255), - (O[q++] = S & 255)); - return ( - L === 2 && ((S = (r[A.charCodeAt($)] << 2) | (r[A.charCodeAt($ + 1)] >> 4)), (O[q++] = S & 255)), - L === 1 && - ((S = (r[A.charCodeAt($)] << 10) | (r[A.charCodeAt($ + 1)] << 4) | (r[A.charCodeAt($ + 2)] >> 2)), - (O[q++] = (S >> 8) & 255), - (O[q++] = S & 255)), - O - ); - } - function h(A) { - return t[(A >> 18) & 63] + t[(A >> 12) & 63] + t[(A >> 6) & 63] + t[A & 63]; - } - function T(A, S, F) { - for (var _, L = [], O = S; O < F; O += 3) - ((_ = ((A[O] << 16) & 16711680) + ((A[O + 1] << 8) & 65280) + (A[O + 2] & 255)), L.push(h(_))); - return L.join(''); - } - function k(A) { - for (var S, F = A.length, _ = F % 3, L = [], O = 16383, q = 0, Y = F - _; q < Y; q += O) - L.push(T(A, q, q + O > Y ? Y : q + O)); - return ( - _ === 1 - ? ((S = A[F - 1]), L.push(t[S >> 2] + t[(S << 4) & 63] + '==')) - : _ === 2 && - ((S = (A[F - 2] << 8) + A[F - 1]), L.push(t[S >> 10] + t[(S >> 4) & 63] + t[(S << 2) & 63] + '=')), - L.join('') - ); - } - }), - Sa = ui((e) => { - ((e.read = function (t, r, n, i, o) { - var s, - a, - l = o * 8 - i - 1, - u = (1 << l) - 1, - g = u >> 1, - h = -7, - T = n ? o - 1 : 0, - k = n ? -1 : 1, - A = t[r + T]; - for (T += k, s = A & ((1 << -h) - 1), A >>= -h, h += l; h > 0; s = s * 256 + t[r + T], T += k, h -= 8); - for (a = s & ((1 << -h) - 1), s >>= -h, h += i; h > 0; a = a * 256 + t[r + T], T += k, h -= 8); - if (s === 0) s = 1 - g; - else { - if (s === u) return a ? NaN : (A ? -1 : 1) * (1 / 0); - ((a = a + Math.pow(2, i)), (s = s - g)); - } - return (A ? -1 : 1) * a * Math.pow(2, s - i); - }), - (e.write = function (t, r, n, i, o, s) { - var a, - l, - u, - g = s * 8 - o - 1, - h = (1 << g) - 1, - T = h >> 1, - k = o === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, - A = i ? 0 : s - 1, - S = i ? 1 : -1, - F = r < 0 || (r === 0 && 1 / r < 0) ? 1 : 0; - for ( - r = Math.abs(r), - isNaN(r) || r === 1 / 0 - ? ((l = isNaN(r) ? 1 : 0), (a = h)) - : ((a = Math.floor(Math.log(r) / Math.LN2)), - r * (u = Math.pow(2, -a)) < 1 && (a--, (u *= 2)), - a + T >= 1 ? (r += k / u) : (r += k * Math.pow(2, 1 - T)), - r * u >= 2 && (a++, (u /= 2)), - a + T >= h - ? ((l = 0), (a = h)) - : a + T >= 1 - ? ((l = (r * u - 1) * Math.pow(2, o)), (a = a + T)) - : ((l = r * Math.pow(2, T - 1) * Math.pow(2, o)), (a = 0))); - o >= 8; - t[n + A] = l & 255, A += S, l /= 256, o -= 8 - ); - for (a = (a << o) | l, g += o; g > 0; t[n + A] = a & 255, A += S, a /= 256, g -= 8); - t[n + A - S] |= F * 128; - })); - }), - Xr = Aa(), - tt = Sa(), - oi = - typeof Symbol == 'function' && typeof Symbol.for == 'function' ? Symbol.for('nodejs.util.inspect.custom') : null; - nt.Buffer = C; - nt.SlowBuffer = Ma; - nt.INSPECT_MAX_BYTES = 50; - var rr = 2147483647; - nt.kMaxLength = rr; - C.TYPED_ARRAY_SUPPORT = Ra(); - !C.TYPED_ARRAY_SUPPORT && - typeof console < 'u' && - typeof console.error == 'function' && - console.error( - 'This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.' - ); - function Ra() { - try { - let e = new Uint8Array(1), - t = { - foo: function () { - return 42; - }, - }; - return (Object.setPrototypeOf(t, Uint8Array.prototype), Object.setPrototypeOf(e, t), e.foo() === 42); - } catch { - return !1; - } - } - Object.defineProperty(C.prototype, 'parent', { - enumerable: !0, - get: function () { - if (C.isBuffer(this)) return this.buffer; - }, - }); - Object.defineProperty(C.prototype, 'offset', { - enumerable: !0, - get: function () { - if (C.isBuffer(this)) return this.byteOffset; - }, - }); - function Re(e) { - if (e > rr) throw new RangeError('The value "' + e + '" is invalid for option "size"'); - let t = new Uint8Array(e); - return (Object.setPrototypeOf(t, C.prototype), t); - } - function C(e, t, r) { - if (typeof e == 'number') { - if (typeof t == 'string') - throw new TypeError('The "string" argument must be of type string. Received type number'); - return rn(e); - } - return ci(e, t, r); - } - C.poolSize = 8192; - function ci(e, t, r) { - if (typeof e == 'string') return Oa(e, t); - if (ArrayBuffer.isView(e)) return Ia(e); - if (e == null) - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + - typeof e - ); - if ( - ye(e, ArrayBuffer) || - (e && ye(e.buffer, ArrayBuffer)) || - (typeof SharedArrayBuffer < 'u' && (ye(e, SharedArrayBuffer) || (e && ye(e.buffer, SharedArrayBuffer)))) - ) - return di(e, t, r); - if (typeof e == 'number') - throw new TypeError('The "value" argument must not be of type number. Received type number'); - let n = e.valueOf && e.valueOf(); - if (n != null && n !== e) return C.from(n, t, r); - let i = Fa(e); - if (i) return i; - if (typeof Symbol < 'u' && Symbol.toPrimitive != null && typeof e[Symbol.toPrimitive] == 'function') - return C.from(e[Symbol.toPrimitive]('string'), t, r); - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + - typeof e - ); - } - C.from = function (e, t, r) { - return ci(e, t, r); - }; - Object.setPrototypeOf(C.prototype, Uint8Array.prototype); - Object.setPrototypeOf(C, Uint8Array); - function pi(e) { - if (typeof e != 'number') throw new TypeError('"size" argument must be of type number'); - if (e < 0) throw new RangeError('The value "' + e + '" is invalid for option "size"'); - } - function ka(e, t, r) { - return (pi(e), e <= 0 ? Re(e) : t !== void 0 ? (typeof r == 'string' ? Re(e).fill(t, r) : Re(e).fill(t)) : Re(e)); - } - C.alloc = function (e, t, r) { - return ka(e, t, r); - }; - function rn(e) { - return (pi(e), Re(e < 0 ? 0 : nn(e) | 0)); - } - C.allocUnsafe = function (e) { - return rn(e); - }; - C.allocUnsafeSlow = function (e) { - return rn(e); - }; - function Oa(e, t) { - if (((typeof t != 'string' || t === '') && (t = 'utf8'), !C.isEncoding(t))) - throw new TypeError('Unknown encoding: ' + t); - let r = fi(e, t) | 0, - n = Re(r), - i = n.write(e, t); - return (i !== r && (n = n.slice(0, i)), n); - } - function en(e) { - let t = e.length < 0 ? 0 : nn(e.length) | 0, - r = Re(t); - for (let n = 0; n < t; n += 1) r[n] = e[n] & 255; - return r; - } - function Ia(e) { - if (ye(e, Uint8Array)) { - let t = new Uint8Array(e); - return di(t.buffer, t.byteOffset, t.byteLength); - } - return en(e); - } - function di(e, t, r) { - if (t < 0 || e.byteLength < t) throw new RangeError('"offset" is outside of buffer bounds'); - if (e.byteLength < t + (r || 0)) throw new RangeError('"length" is outside of buffer bounds'); - let n; - return ( - t === void 0 && r === void 0 - ? (n = new Uint8Array(e)) - : r === void 0 - ? (n = new Uint8Array(e, t)) - : (n = new Uint8Array(e, t, r)), - Object.setPrototypeOf(n, C.prototype), - n - ); - } - function Fa(e) { - if (C.isBuffer(e)) { - let t = nn(e.length) | 0, - r = Re(t); - return (r.length === 0 || e.copy(r, 0, 0, t), r); - } - if (e.length !== void 0) return typeof e.length != 'number' || sn(e.length) ? Re(0) : en(e); - if (e.type === 'Buffer' && Array.isArray(e.data)) return en(e.data); - } - function nn(e) { - if (e >= rr) - throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' + rr.toString(16) + ' bytes'); - return e | 0; - } - function Ma(e) { - return (+e != e && (e = 0), C.alloc(+e)); - } - C.isBuffer = function (e) { - return e != null && e._isBuffer === !0 && e !== C.prototype; - }; - C.compare = function (e, t) { - if ( - (ye(e, Uint8Array) && (e = C.from(e, e.offset, e.byteLength)), - ye(t, Uint8Array) && (t = C.from(t, t.offset, t.byteLength)), - !C.isBuffer(e) || !C.isBuffer(t)) - ) - throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); - if (e === t) return 0; - let r = e.length, - n = t.length; - for (let i = 0, o = Math.min(r, n); i < o; ++i) - if (e[i] !== t[i]) { - ((r = e[i]), (n = t[i])); - break; - } - return r < n ? -1 : n < r ? 1 : 0; - }; - C.isEncoding = function (e) { - switch (String(e).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return !0; - default: - return !1; - } - }; - C.concat = function (e, t) { - if (!Array.isArray(e)) throw new TypeError('"list" argument must be an Array of Buffers'); - if (e.length === 0) return C.alloc(0); - let r; - if (t === void 0) for (t = 0, r = 0; r < e.length; ++r) t += e[r].length; - let n = C.allocUnsafe(t), - i = 0; - for (r = 0; r < e.length; ++r) { - let o = e[r]; - if (ye(o, Uint8Array)) - i + o.length > n.length - ? (C.isBuffer(o) || (o = C.from(o)), o.copy(n, i)) - : Uint8Array.prototype.set.call(n, o, i); - else if (C.isBuffer(o)) o.copy(n, i); - else throw new TypeError('"list" argument must be an Array of Buffers'); - i += o.length; - } - return n; - }; - function fi(e, t) { - if (C.isBuffer(e)) return e.length; - if (ArrayBuffer.isView(e) || ye(e, ArrayBuffer)) return e.byteLength; - if (typeof e != 'string') - throw new TypeError( - 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof e - ); - let r = e.length, - n = arguments.length > 2 && arguments[2] === !0; - if (!n && r === 0) return 0; - let i = !1; - for (;;) - switch (t) { - case 'ascii': - case 'latin1': - case 'binary': - return r; - case 'utf8': - case 'utf-8': - return tn(e).length; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return r * 2; - case 'hex': - return r >>> 1; - case 'base64': - return Pi(e).length; - default: - if (i) return n ? -1 : tn(e).length; - ((t = ('' + t).toLowerCase()), (i = !0)); - } - } - C.byteLength = fi; - function _a(e, t, r) { - let n = !1; - if ( - ((t === void 0 || t < 0) && (t = 0), - t > this.length || - ((r === void 0 || r > this.length) && (r = this.length), r <= 0) || - ((r >>>= 0), (t >>>= 0), r <= t)) - ) - return ''; - for (e || (e = 'utf8'); ; ) - switch (e) { - case 'hex': - return Qa(this, t, r); - case 'utf8': - case 'utf-8': - return gi(this, t, r); - case 'ascii': - return $a(this, t, r); - case 'latin1': - case 'binary': - return Va(this, t, r); - case 'base64': - return ja(this, t, r); - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return Ja(this, t, r); - default: - if (n) throw new TypeError('Unknown encoding: ' + e); - ((e = (e + '').toLowerCase()), (n = !0)); - } - } - C.prototype._isBuffer = !0; - function Je(e, t, r) { - let n = e[t]; - ((e[t] = e[r]), (e[r] = n)); - } - C.prototype.swap16 = function () { - let e = this.length; - if (e % 2 !== 0) throw new RangeError('Buffer size must be a multiple of 16-bits'); - for (let t = 0; t < e; t += 2) Je(this, t, t + 1); - return this; - }; - C.prototype.swap32 = function () { - let e = this.length; - if (e % 4 !== 0) throw new RangeError('Buffer size must be a multiple of 32-bits'); - for (let t = 0; t < e; t += 4) (Je(this, t, t + 3), Je(this, t + 1, t + 2)); - return this; - }; - C.prototype.swap64 = function () { - let e = this.length; - if (e % 8 !== 0) throw new RangeError('Buffer size must be a multiple of 64-bits'); - for (let t = 0; t < e; t += 8) - (Je(this, t, t + 7), Je(this, t + 1, t + 6), Je(this, t + 2, t + 5), Je(this, t + 3, t + 4)); - return this; - }; - C.prototype.toString = function () { - let e = this.length; - return e === 0 ? '' : arguments.length === 0 ? gi(this, 0, e) : _a.apply(this, arguments); - }; - C.prototype.toLocaleString = C.prototype.toString; - C.prototype.equals = function (e) { - if (!C.isBuffer(e)) throw new TypeError('Argument must be a Buffer'); - return this === e ? !0 : C.compare(this, e) === 0; - }; - C.prototype.inspect = function () { - let e = '', - t = nt.INSPECT_MAX_BYTES; - return ( - (e = this.toString('hex', 0, t) - .replace(/(.{2})/g, '$1 ') - .trim()), - this.length > t && (e += ' ... '), - '' - ); - }; - oi && (C.prototype[oi] = C.prototype.inspect); - C.prototype.compare = function (e, t, r, n, i) { - if ((ye(e, Uint8Array) && (e = C.from(e, e.offset, e.byteLength)), !C.isBuffer(e))) - throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e); - if ( - (t === void 0 && (t = 0), - r === void 0 && (r = e ? e.length : 0), - n === void 0 && (n = 0), - i === void 0 && (i = this.length), - t < 0 || r > e.length || n < 0 || i > this.length) - ) - throw new RangeError('out of range index'); - if (n >= i && t >= r) return 0; - if (n >= i) return -1; - if (t >= r) return 1; - if (((t >>>= 0), (r >>>= 0), (n >>>= 0), (i >>>= 0), this === e)) return 0; - let o = i - n, - s = r - t, - a = Math.min(o, s), - l = this.slice(n, i), - u = e.slice(t, r); - for (let g = 0; g < a; ++g) - if (l[g] !== u[g]) { - ((o = l[g]), (s = u[g])); - break; - } - return o < s ? -1 : s < o ? 1 : 0; - }; - function mi(e, t, r, n, i) { - if (e.length === 0) return -1; - if ( - (typeof r == 'string' - ? ((n = r), (r = 0)) - : r > 2147483647 - ? (r = 2147483647) - : r < -2147483648 && (r = -2147483648), - (r = +r), - sn(r) && (r = i ? 0 : e.length - 1), - r < 0 && (r = e.length + r), - r >= e.length) - ) { - if (i) return -1; - r = e.length - 1; - } else if (r < 0) - if (i) r = 0; - else return -1; - if ((typeof t == 'string' && (t = C.from(t, n)), C.isBuffer(t))) return t.length === 0 ? -1 : si(e, t, r, n, i); - if (typeof t == 'number') - return ( - (t = t & 255), - typeof Uint8Array.prototype.indexOf == 'function' - ? i - ? Uint8Array.prototype.indexOf.call(e, t, r) - : Uint8Array.prototype.lastIndexOf.call(e, t, r) - : si(e, [t], r, n, i) - ); - throw new TypeError('val must be string, number or Buffer'); - } - function si(e, t, r, n, i) { - let o = 1, - s = e.length, - a = t.length; - if ( - n !== void 0 && - ((n = String(n).toLowerCase()), n === 'ucs2' || n === 'ucs-2' || n === 'utf16le' || n === 'utf-16le') - ) { - if (e.length < 2 || t.length < 2) return -1; - ((o = 2), (s /= 2), (a /= 2), (r /= 2)); - } - function l(g, h) { - return o === 1 ? g[h] : g.readUInt16BE(h * o); - } - let u; - if (i) { - let g = -1; - for (u = r; u < s; u++) - if (l(e, u) === l(t, g === -1 ? 0 : u - g)) { - if ((g === -1 && (g = u), u - g + 1 === a)) return g * o; - } else (g !== -1 && (u -= u - g), (g = -1)); - } else - for (r + a > s && (r = s - a), u = r; u >= 0; u--) { - let g = !0; - for (let h = 0; h < a; h++) - if (l(e, u + h) !== l(t, h)) { - g = !1; - break; - } - if (g) return u; - } - return -1; - } - C.prototype.includes = function (e, t, r) { - return this.indexOf(e, t, r) !== -1; - }; - C.prototype.indexOf = function (e, t, r) { - return mi(this, e, t, r, !0); - }; - C.prototype.lastIndexOf = function (e, t, r) { - return mi(this, e, t, r, !1); - }; - function Da(e, t, r, n) { - r = Number(r) || 0; - let i = e.length - r; - n ? ((n = Number(n)), n > i && (n = i)) : (n = i); - let o = t.length; - n > o / 2 && (n = o / 2); - let s; - for (s = 0; s < n; ++s) { - let a = parseInt(t.substr(s * 2, 2), 16); - if (sn(a)) return s; - e[r + s] = a; - } - return s; - } - function La(e, t, r, n) { - return nr(tn(t, e.length - r), e, r, n); - } - function Na(e, t, r, n) { - return nr(za(t), e, r, n); - } - function qa(e, t, r, n) { - return nr(Pi(t), e, r, n); - } - function Ba(e, t, r, n) { - return nr(Ha(t, e.length - r), e, r, n); - } - C.prototype.write = function (e, t, r, n) { - if (t === void 0) ((n = 'utf8'), (r = this.length), (t = 0)); - else if (r === void 0 && typeof t == 'string') ((n = t), (r = this.length), (t = 0)); - else if (isFinite(t)) - ((t = t >>> 0), isFinite(r) ? ((r = r >>> 0), n === void 0 && (n = 'utf8')) : ((n = r), (r = void 0))); - else throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported'); - let i = this.length - t; - if (((r === void 0 || r > i) && (r = i), (e.length > 0 && (r < 0 || t < 0)) || t > this.length)) - throw new RangeError('Attempt to write outside buffer bounds'); - n || (n = 'utf8'); - let o = !1; - for (;;) - switch (n) { - case 'hex': - return Da(this, e, t, r); - case 'utf8': - case 'utf-8': - return La(this, e, t, r); - case 'ascii': - case 'latin1': - case 'binary': - return Na(this, e, t, r); - case 'base64': - return qa(this, e, t, r); - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return Ba(this, e, t, r); - default: - if (o) throw new TypeError('Unknown encoding: ' + n); - ((n = ('' + n).toLowerCase()), (o = !0)); - } - }; - C.prototype.toJSON = function () { - return { type: 'Buffer', data: Array.prototype.slice.call(this._arr || this, 0) }; - }; - function ja(e, t, r) { - return t === 0 && r === e.length ? Xr.fromByteArray(e) : Xr.fromByteArray(e.slice(t, r)); - } - function gi(e, t, r) { - r = Math.min(e.length, r); - let n = [], - i = t; - for (; i < r; ) { - let o = e[i], - s = null, - a = o > 239 ? 4 : o > 223 ? 3 : o > 191 ? 2 : 1; - if (i + a <= r) { - let l, u, g, h; - switch (a) { - case 1: - o < 128 && (s = o); - break; - case 2: - ((l = e[i + 1]), (l & 192) === 128 && ((h = ((o & 31) << 6) | (l & 63)), h > 127 && (s = h))); - break; - case 3: - ((l = e[i + 1]), - (u = e[i + 2]), - (l & 192) === 128 && - (u & 192) === 128 && - ((h = ((o & 15) << 12) | ((l & 63) << 6) | (u & 63)), h > 2047 && (h < 55296 || h > 57343) && (s = h))); - break; - case 4: - ((l = e[i + 1]), - (u = e[i + 2]), - (g = e[i + 3]), - (l & 192) === 128 && - (u & 192) === 128 && - (g & 192) === 128 && - ((h = ((o & 15) << 18) | ((l & 63) << 12) | ((u & 63) << 6) | (g & 63)), - h > 65535 && h < 1114112 && (s = h))); - } - } - (s === null - ? ((s = 65533), (a = 1)) - : s > 65535 && ((s -= 65536), n.push(((s >>> 10) & 1023) | 55296), (s = 56320 | (s & 1023))), - n.push(s), - (i += a)); - } - return Ua(n); - } - var ai = 4096; - function Ua(e) { - let t = e.length; - if (t <= ai) return String.fromCharCode.apply(String, e); - let r = '', - n = 0; - for (; n < t; ) r += String.fromCharCode.apply(String, e.slice(n, (n += ai))); - return r; - } - function $a(e, t, r) { - let n = ''; - r = Math.min(e.length, r); - for (let i = t; i < r; ++i) n += String.fromCharCode(e[i] & 127); - return n; - } - function Va(e, t, r) { - let n = ''; - r = Math.min(e.length, r); - for (let i = t; i < r; ++i) n += String.fromCharCode(e[i]); - return n; - } - function Qa(e, t, r) { - let n = e.length; - ((!t || t < 0) && (t = 0), (!r || r < 0 || r > n) && (r = n)); - let i = ''; - for (let o = t; o < r; ++o) i += Ya[e[o]]; - return i; - } - function Ja(e, t, r) { - let n = e.slice(t, r), - i = ''; - for (let o = 0; o < n.length - 1; o += 2) i += String.fromCharCode(n[o] + n[o + 1] * 256); - return i; - } - C.prototype.slice = function (e, t) { - let r = this.length; - ((e = ~~e), - (t = t === void 0 ? r : ~~t), - e < 0 ? ((e += r), e < 0 && (e = 0)) : e > r && (e = r), - t < 0 ? ((t += r), t < 0 && (t = 0)) : t > r && (t = r), - t < e && (t = e)); - let n = this.subarray(e, t); - return (Object.setPrototypeOf(n, C.prototype), n); - }; - function K(e, t, r) { - if (e % 1 !== 0 || e < 0) throw new RangeError('offset is not uint'); - if (e + t > r) throw new RangeError('Trying to access beyond buffer length'); - } - C.prototype.readUintLE = C.prototype.readUIntLE = function (e, t, r) { - ((e = e >>> 0), (t = t >>> 0), r || K(e, t, this.length)); - let n = this[e], - i = 1, - o = 0; - for (; ++o < t && (i *= 256); ) n += this[e + o] * i; - return n; - }; - C.prototype.readUintBE = C.prototype.readUIntBE = function (e, t, r) { - ((e = e >>> 0), (t = t >>> 0), r || K(e, t, this.length)); - let n = this[e + --t], - i = 1; - for (; t > 0 && (i *= 256); ) n += this[e + --t] * i; - return n; - }; - C.prototype.readUint8 = C.prototype.readUInt8 = function (e, t) { - return ((e = e >>> 0), t || K(e, 1, this.length), this[e]); - }; - C.prototype.readUint16LE = C.prototype.readUInt16LE = function (e, t) { - return ((e = e >>> 0), t || K(e, 2, this.length), this[e] | (this[e + 1] << 8)); - }; - C.prototype.readUint16BE = C.prototype.readUInt16BE = function (e, t) { - return ((e = e >>> 0), t || K(e, 2, this.length), (this[e] << 8) | this[e + 1]); - }; - C.prototype.readUint32LE = C.prototype.readUInt32LE = function (e, t) { - return ( - (e = e >>> 0), - t || K(e, 4, this.length), - (this[e] | (this[e + 1] << 8) | (this[e + 2] << 16)) + this[e + 3] * 16777216 - ); - }; - C.prototype.readUint32BE = C.prototype.readUInt32BE = function (e, t) { - return ( - (e = e >>> 0), - t || K(e, 4, this.length), - this[e] * 16777216 + ((this[e + 1] << 16) | (this[e + 2] << 8) | this[e + 3]) - ); - }; - C.prototype.readBigUInt64LE = Le(function (e) { - ((e = e >>> 0), rt(e, 'offset')); - let t = this[e], - r = this[e + 7]; - (t === void 0 || r === void 0) && Ct(e, this.length - 8); - let n = t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24, - i = this[++e] + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + r * 2 ** 24; - return BigInt(n) + (BigInt(i) << BigInt(32)); - }); - C.prototype.readBigUInt64BE = Le(function (e) { - ((e = e >>> 0), rt(e, 'offset')); - let t = this[e], - r = this[e + 7]; - (t === void 0 || r === void 0) && Ct(e, this.length - 8); - let n = t * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e], - i = this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + r; - return (BigInt(n) << BigInt(32)) + BigInt(i); - }); - C.prototype.readIntLE = function (e, t, r) { - ((e = e >>> 0), (t = t >>> 0), r || K(e, t, this.length)); - let n = this[e], - i = 1, - o = 0; - for (; ++o < t && (i *= 256); ) n += this[e + o] * i; - return ((i *= 128), n >= i && (n -= Math.pow(2, 8 * t)), n); - }; - C.prototype.readIntBE = function (e, t, r) { - ((e = e >>> 0), (t = t >>> 0), r || K(e, t, this.length)); - let n = t, - i = 1, - o = this[e + --n]; - for (; n > 0 && (i *= 256); ) o += this[e + --n] * i; - return ((i *= 128), o >= i && (o -= Math.pow(2, 8 * t)), o); - }; - C.prototype.readInt8 = function (e, t) { - return ((e = e >>> 0), t || K(e, 1, this.length), this[e] & 128 ? (255 - this[e] + 1) * -1 : this[e]); - }; - C.prototype.readInt16LE = function (e, t) { - ((e = e >>> 0), t || K(e, 2, this.length)); - let r = this[e] | (this[e + 1] << 8); - return r & 32768 ? r | 4294901760 : r; - }; - C.prototype.readInt16BE = function (e, t) { - ((e = e >>> 0), t || K(e, 2, this.length)); - let r = this[e + 1] | (this[e] << 8); - return r & 32768 ? r | 4294901760 : r; - }; - C.prototype.readInt32LE = function (e, t) { - return ( - (e = e >>> 0), - t || K(e, 4, this.length), - this[e] | (this[e + 1] << 8) | (this[e + 2] << 16) | (this[e + 3] << 24) - ); - }; - C.prototype.readInt32BE = function (e, t) { - return ( - (e = e >>> 0), - t || K(e, 4, this.length), - (this[e] << 24) | (this[e + 1] << 16) | (this[e + 2] << 8) | this[e + 3] - ); - }; - C.prototype.readBigInt64LE = Le(function (e) { - ((e = e >>> 0), rt(e, 'offset')); - let t = this[e], - r = this[e + 7]; - (t === void 0 || r === void 0) && Ct(e, this.length - 8); - let n = this[e + 4] + this[e + 5] * 2 ** 8 + this[e + 6] * 2 ** 16 + (r << 24); - return (BigInt(n) << BigInt(32)) + BigInt(t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24); - }); - C.prototype.readBigInt64BE = Le(function (e) { - ((e = e >>> 0), rt(e, 'offset')); - let t = this[e], - r = this[e + 7]; - (t === void 0 || r === void 0) && Ct(e, this.length - 8); - let n = (t << 24) + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e]; - return (BigInt(n) << BigInt(32)) + BigInt(this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + r); - }); - C.prototype.readFloatLE = function (e, t) { - return ((e = e >>> 0), t || K(e, 4, this.length), tt.read(this, e, !0, 23, 4)); - }; - C.prototype.readFloatBE = function (e, t) { - return ((e = e >>> 0), t || K(e, 4, this.length), tt.read(this, e, !1, 23, 4)); - }; - C.prototype.readDoubleLE = function (e, t) { - return ((e = e >>> 0), t || K(e, 8, this.length), tt.read(this, e, !0, 52, 8)); - }; - C.prototype.readDoubleBE = function (e, t) { - return ((e = e >>> 0), t || K(e, 8, this.length), tt.read(this, e, !1, 52, 8)); - }; - function oe(e, t, r, n, i, o) { - if (!C.isBuffer(e)) throw new TypeError('"buffer" argument must be a Buffer instance'); - if (t > i || t < o) throw new RangeError('"value" argument is out of bounds'); - if (r + n > e.length) throw new RangeError('Index out of range'); - } - C.prototype.writeUintLE = C.prototype.writeUIntLE = function (e, t, r, n) { - if (((e = +e), (t = t >>> 0), (r = r >>> 0), !n)) { - let s = Math.pow(2, 8 * r) - 1; - oe(this, e, t, r, s, 0); - } - let i = 1, - o = 0; - for (this[t] = e & 255; ++o < r && (i *= 256); ) this[t + o] = (e / i) & 255; - return t + r; - }; - C.prototype.writeUintBE = C.prototype.writeUIntBE = function (e, t, r, n) { - if (((e = +e), (t = t >>> 0), (r = r >>> 0), !n)) { - let s = Math.pow(2, 8 * r) - 1; - oe(this, e, t, r, s, 0); - } - let i = r - 1, - o = 1; - for (this[t + i] = e & 255; --i >= 0 && (o *= 256); ) this[t + i] = (e / o) & 255; - return t + r; - }; - C.prototype.writeUint8 = C.prototype.writeUInt8 = function (e, t, r) { - return ((e = +e), (t = t >>> 0), r || oe(this, e, t, 1, 255, 0), (this[t] = e & 255), t + 1); - }; - C.prototype.writeUint16LE = C.prototype.writeUInt16LE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || oe(this, e, t, 2, 65535, 0), - (this[t] = e & 255), - (this[t + 1] = e >>> 8), - t + 2 - ); - }; - C.prototype.writeUint16BE = C.prototype.writeUInt16BE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || oe(this, e, t, 2, 65535, 0), - (this[t] = e >>> 8), - (this[t + 1] = e & 255), - t + 2 - ); - }; - C.prototype.writeUint32LE = C.prototype.writeUInt32LE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || oe(this, e, t, 4, 4294967295, 0), - (this[t + 3] = e >>> 24), - (this[t + 2] = e >>> 16), - (this[t + 1] = e >>> 8), - (this[t] = e & 255), - t + 4 - ); - }; - C.prototype.writeUint32BE = C.prototype.writeUInt32BE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || oe(this, e, t, 4, 4294967295, 0), - (this[t] = e >>> 24), - (this[t + 1] = e >>> 16), - (this[t + 2] = e >>> 8), - (this[t + 3] = e & 255), - t + 4 - ); - }; - function hi(e, t, r, n, i) { - xi(t, n, i, e, r, 7); - let o = Number(t & BigInt(4294967295)); - ((e[r++] = o), (o = o >> 8), (e[r++] = o), (o = o >> 8), (e[r++] = o), (o = o >> 8), (e[r++] = o)); - let s = Number((t >> BigInt(32)) & BigInt(4294967295)); - return ((e[r++] = s), (s = s >> 8), (e[r++] = s), (s = s >> 8), (e[r++] = s), (s = s >> 8), (e[r++] = s), r); - } - function yi(e, t, r, n, i) { - xi(t, n, i, e, r, 7); - let o = Number(t & BigInt(4294967295)); - ((e[r + 7] = o), (o = o >> 8), (e[r + 6] = o), (o = o >> 8), (e[r + 5] = o), (o = o >> 8), (e[r + 4] = o)); - let s = Number((t >> BigInt(32)) & BigInt(4294967295)); - return ( - (e[r + 3] = s), - (s = s >> 8), - (e[r + 2] = s), - (s = s >> 8), - (e[r + 1] = s), - (s = s >> 8), - (e[r] = s), - r + 8 - ); - } - C.prototype.writeBigUInt64LE = Le(function (e, t = 0) { - return hi(this, e, t, BigInt(0), BigInt('0xffffffffffffffff')); - }); - C.prototype.writeBigUInt64BE = Le(function (e, t = 0) { - return yi(this, e, t, BigInt(0), BigInt('0xffffffffffffffff')); - }); - C.prototype.writeIntLE = function (e, t, r, n) { - if (((e = +e), (t = t >>> 0), !n)) { - let a = Math.pow(2, 8 * r - 1); - oe(this, e, t, r, a - 1, -a); - } - let i = 0, - o = 1, - s = 0; - for (this[t] = e & 255; ++i < r && (o *= 256); ) - (e < 0 && s === 0 && this[t + i - 1] !== 0 && (s = 1), (this[t + i] = (((e / o) >> 0) - s) & 255)); - return t + r; - }; - C.prototype.writeIntBE = function (e, t, r, n) { - if (((e = +e), (t = t >>> 0), !n)) { - let a = Math.pow(2, 8 * r - 1); - oe(this, e, t, r, a - 1, -a); - } - let i = r - 1, - o = 1, - s = 0; - for (this[t + i] = e & 255; --i >= 0 && (o *= 256); ) - (e < 0 && s === 0 && this[t + i + 1] !== 0 && (s = 1), (this[t + i] = (((e / o) >> 0) - s) & 255)); - return t + r; - }; - C.prototype.writeInt8 = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || oe(this, e, t, 1, 127, -128), - e < 0 && (e = 255 + e + 1), - (this[t] = e & 255), - t + 1 - ); - }; - C.prototype.writeInt16LE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || oe(this, e, t, 2, 32767, -32768), - (this[t] = e & 255), - (this[t + 1] = e >>> 8), - t + 2 - ); - }; - C.prototype.writeInt16BE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || oe(this, e, t, 2, 32767, -32768), - (this[t] = e >>> 8), - (this[t + 1] = e & 255), - t + 2 - ); - }; - C.prototype.writeInt32LE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || oe(this, e, t, 4, 2147483647, -2147483648), - (this[t] = e & 255), - (this[t + 1] = e >>> 8), - (this[t + 2] = e >>> 16), - (this[t + 3] = e >>> 24), - t + 4 - ); - }; - C.prototype.writeInt32BE = function (e, t, r) { - return ( - (e = +e), - (t = t >>> 0), - r || oe(this, e, t, 4, 2147483647, -2147483648), - e < 0 && (e = 4294967295 + e + 1), - (this[t] = e >>> 24), - (this[t + 1] = e >>> 16), - (this[t + 2] = e >>> 8), - (this[t + 3] = e & 255), - t + 4 - ); - }; - C.prototype.writeBigInt64LE = Le(function (e, t = 0) { - return hi(this, e, t, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')); - }); - C.prototype.writeBigInt64BE = Le(function (e, t = 0) { - return yi(this, e, t, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')); - }); - function wi(e, t, r, n, i, o) { - if (r + n > e.length) throw new RangeError('Index out of range'); - if (r < 0) throw new RangeError('Index out of range'); - } - function bi(e, t, r, n, i) { - return ( - (t = +t), - (r = r >>> 0), - i || wi(e, t, r, 4, 34028234663852886e22, -34028234663852886e22), - tt.write(e, t, r, n, 23, 4), - r + 4 - ); - } - C.prototype.writeFloatLE = function (e, t, r) { - return bi(this, e, t, !0, r); - }; - C.prototype.writeFloatBE = function (e, t, r) { - return bi(this, e, t, !1, r); - }; - function Ei(e, t, r, n, i) { - return ( - (t = +t), - (r = r >>> 0), - i || wi(e, t, r, 8, 17976931348623157e292, -17976931348623157e292), - tt.write(e, t, r, n, 52, 8), - r + 8 - ); - } - C.prototype.writeDoubleLE = function (e, t, r) { - return Ei(this, e, t, !0, r); - }; - C.prototype.writeDoubleBE = function (e, t, r) { - return Ei(this, e, t, !1, r); - }; - C.prototype.copy = function (e, t, r, n) { - if (!C.isBuffer(e)) throw new TypeError('argument should be a Buffer'); - if ( - (r || (r = 0), - !n && n !== 0 && (n = this.length), - t >= e.length && (t = e.length), - t || (t = 0), - n > 0 && n < r && (n = r), - n === r || e.length === 0 || this.length === 0) - ) - return 0; - if (t < 0) throw new RangeError('targetStart out of bounds'); - if (r < 0 || r >= this.length) throw new RangeError('Index out of range'); - if (n < 0) throw new RangeError('sourceEnd out of bounds'); - (n > this.length && (n = this.length), e.length - t < n - r && (n = e.length - t + r)); - let i = n - r; - return ( - this === e && typeof Uint8Array.prototype.copyWithin == 'function' - ? this.copyWithin(t, r, n) - : Uint8Array.prototype.set.call(e, this.subarray(r, n), t), - i - ); - }; - C.prototype.fill = function (e, t, r, n) { - if (typeof e == 'string') { - if ( - (typeof t == 'string' - ? ((n = t), (t = 0), (r = this.length)) - : typeof r == 'string' && ((n = r), (r = this.length)), - n !== void 0 && typeof n != 'string') - ) - throw new TypeError('encoding must be a string'); - if (typeof n == 'string' && !C.isEncoding(n)) throw new TypeError('Unknown encoding: ' + n); - if (e.length === 1) { - let o = e.charCodeAt(0); - ((n === 'utf8' && o < 128) || n === 'latin1') && (e = o); - } - } else typeof e == 'number' ? (e = e & 255) : typeof e == 'boolean' && (e = Number(e)); - if (t < 0 || this.length < t || this.length < r) throw new RangeError('Out of range index'); - if (r <= t) return this; - ((t = t >>> 0), (r = r === void 0 ? this.length : r >>> 0), e || (e = 0)); - let i; - if (typeof e == 'number') for (i = t; i < r; ++i) this[i] = e; - else { - let o = C.isBuffer(e) ? e : C.from(e, n), - s = o.length; - if (s === 0) throw new TypeError('The value "' + e + '" is invalid for argument "value"'); - for (i = 0; i < r - t; ++i) this[i + t] = o[i % s]; - } - return this; - }; - var et = {}; - function on(e, t, r) { - et[e] = class extends r { - constructor() { - (super(), - Object.defineProperty(this, 'message', { value: t.apply(this, arguments), writable: !0, configurable: !0 }), - (this.name = `${this.name} [${e}]`), - this.stack, - delete this.name); - } - get code() { - return e; - } - set code(n) { - Object.defineProperty(this, 'code', { configurable: !0, enumerable: !0, value: n, writable: !0 }); - } - toString() { - return `${this.name} [${e}]: ${this.message}`; - } - }; - } - on( - 'ERR_BUFFER_OUT_OF_BOUNDS', - function (e) { - return e ? `${e} is outside of buffer bounds` : 'Attempt to access memory outside buffer bounds'; - }, - RangeError - ); - on( - 'ERR_INVALID_ARG_TYPE', - function (e, t) { - return `The "${e}" argument must be of type number. Received type ${typeof t}`; - }, - TypeError - ); - on( - 'ERR_OUT_OF_RANGE', - function (e, t, r) { - let n = `The value of "${e}" is out of range.`, - i = r; - return ( - Number.isInteger(r) && Math.abs(r) > 2 ** 32 - ? (i = li(String(r))) - : typeof r == 'bigint' && - ((i = String(r)), - (r > BigInt(2) ** BigInt(32) || r < -(BigInt(2) ** BigInt(32))) && (i = li(i)), - (i += 'n')), - (n += ` It must be ${t}. Received ${i}`), - n - ); - }, - RangeError - ); - function li(e) { - let t = '', - r = e.length, - n = e[0] === '-' ? 1 : 0; - for (; r >= n + 4; r -= 3) t = `_${e.slice(r - 3, r)}${t}`; - return `${e.slice(0, r)}${t}`; - } - function Ga(e, t, r) { - (rt(t, 'offset'), (e[t] === void 0 || e[t + r] === void 0) && Ct(t, e.length - (r + 1))); - } - function xi(e, t, r, n, i, o) { - if (e > r || e < t) { - let s = typeof t == 'bigint' ? 'n' : '', - a; - throw ( - o > 3 - ? t === 0 || t === BigInt(0) - ? (a = `>= 0${s} and < 2${s} ** ${(o + 1) * 8}${s}`) - : (a = `>= -(2${s} ** ${(o + 1) * 8 - 1}${s}) and < 2 ** ${(o + 1) * 8 - 1}${s}`) - : (a = `>= ${t}${s} and <= ${r}${s}`), - new et.ERR_OUT_OF_RANGE('value', a, e) - ); - } - Ga(n, i, o); - } - function rt(e, t) { - if (typeof e != 'number') throw new et.ERR_INVALID_ARG_TYPE(t, 'number', e); - } - function Ct(e, t, r) { - throw Math.floor(e) !== e - ? (rt(e, r), new et.ERR_OUT_OF_RANGE(r || 'offset', 'an integer', e)) - : t < 0 - ? new et.ERR_BUFFER_OUT_OF_BOUNDS() - : new et.ERR_OUT_OF_RANGE(r || 'offset', `>= ${r ? 1 : 0} and <= ${t}`, e); - } - var Wa = /[^+/0-9A-Za-z-_]/g; - function Ka(e) { - if (((e = e.split('=')[0]), (e = e.trim().replace(Wa, '')), e.length < 2)) return ''; - for (; e.length % 4 !== 0; ) e = e + '='; - return e; - } - function tn(e, t) { - t = t || 1 / 0; - let r, - n = e.length, - i = null, - o = []; - for (let s = 0; s < n; ++s) { - if (((r = e.charCodeAt(s)), r > 55295 && r < 57344)) { - if (!i) { - if (r > 56319) { - (t -= 3) > -1 && o.push(239, 191, 189); - continue; - } else if (s + 1 === n) { - (t -= 3) > -1 && o.push(239, 191, 189); - continue; - } - i = r; - continue; - } - if (r < 56320) { - ((t -= 3) > -1 && o.push(239, 191, 189), (i = r)); - continue; - } - r = (((i - 55296) << 10) | (r - 56320)) + 65536; - } else i && (t -= 3) > -1 && o.push(239, 191, 189); - if (((i = null), r < 128)) { - if ((t -= 1) < 0) break; - o.push(r); - } else if (r < 2048) { - if ((t -= 2) < 0) break; - o.push((r >> 6) | 192, (r & 63) | 128); - } else if (r < 65536) { - if ((t -= 3) < 0) break; - o.push((r >> 12) | 224, ((r >> 6) & 63) | 128, (r & 63) | 128); - } else if (r < 1114112) { - if ((t -= 4) < 0) break; - o.push((r >> 18) | 240, ((r >> 12) & 63) | 128, ((r >> 6) & 63) | 128, (r & 63) | 128); - } else throw new Error('Invalid code point'); - } - return o; - } - function za(e) { - let t = []; - for (let r = 0; r < e.length; ++r) t.push(e.charCodeAt(r) & 255); - return t; - } - function Ha(e, t) { - let r, - n, - i, - o = []; - for (let s = 0; s < e.length && !((t -= 2) < 0); ++s) - ((r = e.charCodeAt(s)), (n = r >> 8), (i = r % 256), o.push(i), o.push(n)); - return o; - } - function Pi(e) { - return Xr.toByteArray(Ka(e)); - } - function nr(e, t, r, n) { - let i; - for (i = 0; i < n && !(i + r >= t.length || i >= e.length); ++i) t[i + r] = e[i]; - return i; - } - function ye(e, t) { - return ( - e instanceof t || - (e != null && e.constructor != null && e.constructor.name != null && e.constructor.name === t.name) - ); - } - function sn(e) { - return e !== e; - } - var Ya = (function () { - let e = '0123456789abcdef', - t = new Array(256); - for (let r = 0; r < 16; ++r) { - let n = r * 16; - for (let i = 0; i < 16; ++i) t[n + i] = e[r] + e[i]; - } - return t; - })(); - function Le(e) { - return typeof BigInt > 'u' ? Za : e; - } - function Za() { - throw new Error('BigInt not supported'); - } -}); -var w, - m = he(() => { - 'use strict'; - w = Se(vi()); - }); -function El() { - return !1; -} -function pn() { - return { - dev: 0, - ino: 0, - mode: 0, - nlink: 0, - uid: 0, - gid: 0, - rdev: 0, - size: 0, - blksize: 0, - blocks: 0, - atimeMs: 0, - mtimeMs: 0, - ctimeMs: 0, - birthtimeMs: 0, - atime: new Date(), - mtime: new Date(), - ctime: new Date(), - birthtime: new Date(), - }; -} -function xl() { - return pn(); -} -function Pl() { - return []; -} -function vl(e) { - e(null, []); -} -function Tl() { - return ''; -} -function Cl() { - return ''; -} -function Al() {} -function Sl() {} -function Rl() {} -function kl() {} -function Ol() {} -function Il() {} -function Fl() {} -function Ml() {} -function _l() { - return { close: () => {}, on: () => {}, removeAllListeners: () => {} }; -} -function Dl(e, t) { - t(null, pn()); -} -var Ll, - Nl, - or, - dn = he(() => { - 'use strict'; - m(); - c(); - p(); - d(); - f(); - ((Ll = {}), - (Nl = { - existsSync: El, - lstatSync: pn, - stat: Dl, - statSync: xl, - readdirSync: Pl, - readdir: vl, - readlinkSync: Tl, - realpathSync: Cl, - chmodSync: Al, - renameSync: Sl, - mkdirSync: Rl, - rmdirSync: kl, - rmSync: Ol, - unlinkSync: Il, - watchFile: Fl, - unwatchFile: Ml, - watch: _l, - promises: Ll, - }), - (or = Nl)); - }); -function ql(...e) { - return e.join('/'); -} -function Bl(...e) { - return e.join('/'); -} -function jl(e) { - let t = Li(e), - r = Ni(e), - [n, i] = t.split('.'); - return { root: '/', dir: r, base: t, ext: i, name: n }; -} -function Li(e) { - let t = e.split('/'); - return t[t.length - 1]; -} -function Ni(e) { - return e.split('/').slice(0, -1).join('/'); -} -function $l(e) { - let t = e.split('/').filter((i) => i !== '' && i !== '.'), - r = []; - for (let i of t) i === '..' ? r.pop() : r.push(i); - let n = r.join('/'); - return e.startsWith('/') ? '/' + n : n; -} -var qi, - Ul, - Vl, - Ql, - Oe, - mn = he(() => { - 'use strict'; - m(); - c(); - p(); - d(); - f(); - ((qi = '/'), (Ul = ':')); - ((Vl = { sep: qi }), - (Ql = { - basename: Li, - delimiter: Ul, - dirname: Ni, - join: Bl, - normalize: $l, - parse: jl, - posix: Vl, - resolve: ql, - sep: qi, - }), - (Oe = Ql)); - }); -var Bi = Ae((Uf, Jl) => { - Jl.exports = { - name: '@prisma/internals', - version: '6.14.0', - description: "This package is intended for Prisma's internal use", - main: 'dist/index.js', - types: 'dist/index.d.ts', - repository: { type: 'git', url: 'https://github.com/prisma/prisma.git', directory: 'packages/internals' }, - homepage: 'https://www.prisma.io', - author: 'Tim Suchanek ', - bugs: 'https://github.com/prisma/prisma/issues', - license: 'Apache-2.0', - scripts: { - dev: 'DEV=true tsx helpers/build.ts', - build: 'tsx helpers/build.ts', - test: 'dotenv -e ../../.db.env -- jest --silent', - prepublishOnly: 'pnpm run build', - }, - files: ['README.md', 'dist', '!**/libquery_engine*', '!dist/get-generators/engines/*', 'scripts'], - devDependencies: { - '@babel/helper-validator-identifier': '7.25.9', - '@opentelemetry/api': '1.9.0', - '@swc/core': '1.11.5', - '@swc/jest': '0.2.37', - '@types/babel__helper-validator-identifier': '7.15.2', - '@types/jest': '29.5.14', - '@types/node': '18.19.76', - '@types/resolve': '1.20.6', - archiver: '6.0.2', - 'checkpoint-client': '1.1.33', - 'cli-truncate': '4.0.0', - dotenv: '16.5.0', - empathic: '2.0.0', - esbuild: '0.25.5', - 'escape-string-regexp': '5.0.0', - execa: '5.1.1', - 'fast-glob': '3.3.3', - 'find-up': '7.0.0', - 'fp-ts': '2.16.9', - 'fs-extra': '11.3.0', - 'fs-jetpack': '5.1.0', - 'global-dirs': '4.0.0', - globby: '11.1.0', - 'identifier-regex': '1.0.0', - 'indent-string': '4.0.0', - 'is-windows': '1.0.2', - 'is-wsl': '3.1.0', - jest: '29.7.0', - 'jest-junit': '16.0.0', - kleur: '4.1.5', - 'mock-stdin': '1.0.0', - 'new-github-issue-url': '0.2.1', - 'node-fetch': '3.3.2', - 'npm-packlist': '5.1.3', - open: '7.4.2', - 'p-map': '4.0.0', - resolve: '1.22.10', - 'string-width': '7.2.0', - 'strip-ansi': '6.0.1', - 'strip-indent': '4.0.0', - 'temp-dir': '2.0.0', - tempy: '1.0.1', - 'terminal-link': '4.0.0', - tmp: '0.2.3', - 'ts-node': '10.9.2', - 'ts-pattern': '5.6.2', - 'ts-toolbelt': '9.6.0', - typescript: '5.4.5', - yarn: '1.22.22', - }, - dependencies: { - '@prisma/config': 'workspace:*', - '@prisma/debug': 'workspace:*', - '@prisma/dmmf': 'workspace:*', - '@prisma/driver-adapter-utils': 'workspace:*', - '@prisma/engines': 'workspace:*', - '@prisma/fetch-engine': 'workspace:*', - '@prisma/generator': 'workspace:*', - '@prisma/generator-helper': 'workspace:*', - '@prisma/get-platform': 'workspace:*', - '@prisma/prisma-schema-wasm': '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - '@prisma/schema-engine-wasm': '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - '@prisma/schema-files-loader': 'workspace:*', - arg: '5.0.2', - prompts: '2.4.2', - }, - peerDependencies: { typescript: '>=5.1.0' }, - peerDependenciesMeta: { typescript: { optional: !0 } }, - sideEffects: !1, - }; -}); -var $i = Ae((Bm, Ui) => { - 'use strict'; - m(); - c(); - p(); - d(); - f(); - Ui.exports = (e) => { - let t = e.match(/^[ \t]*(?=\S)/gm); - return t ? t.reduce((r, n) => Math.min(r, n.length), 1 / 0) : 0; - }; -}); -var Wi = Ae((ng, Gi) => { - 'use strict'; - m(); - c(); - p(); - d(); - f(); - Gi.exports = (e, t = 1, r) => { - if (((r = { indent: ' ', includeEmptyLines: !1, ...r }), typeof e != 'string')) - throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``); - if (typeof t != 'number') throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``); - if (typeof r.indent != 'string') - throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``); - if (t === 0) return e; - let n = r.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - return e.replace(n, r.indent.repeat(t)); - }; -}); -var Hi = Ae((gg, zi) => { - 'use strict'; - m(); - c(); - p(); - d(); - f(); - zi.exports = ({ onlyFirst: e = !1 } = {}) => { - let t = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))', - ].join('|'); - return new RegExp(t, e ? void 0 : 'g'); - }; -}); -var xn = Ae((xg, Yi) => { - 'use strict'; - m(); - c(); - p(); - d(); - f(); - var tu = Hi(); - Yi.exports = (e) => (typeof e == 'string' ? e.replace(tu(), '') : e); -}); -var Zi = Ae((Gg, ur) => { - 'use strict'; - m(); - c(); - p(); - d(); - f(); - ur.exports = (e = {}) => { - let t; - if (e.repoUrl) t = e.repoUrl; - else if (e.user && e.repo) t = `https://github.com/${e.user}/${e.repo}`; - else throw new Error('You need to specify either the `repoUrl` option or both the `user` and `repo` options'); - let r = new URL(`${t}/issues/new`), - n = ['body', 'title', 'labels', 'template', 'milestone', 'assignee', 'projects']; - for (let i of n) { - let o = e[i]; - if (o !== void 0) { - if (i === 'labels' || i === 'projects') { - if (!Array.isArray(o)) throw new TypeError(`The \`${i}\` option should be an array`); - o = o.join(','); - } - r.searchParams.set(i, o); - } - } - return r.toString(); - }; - ur.exports.default = ur.exports; -}); -var In = Ae((l0, Po) => { - 'use strict'; - m(); - c(); - p(); - d(); - f(); - Po.exports = (function () { - function e(t, r, n, i, o) { - return t < r || n < r ? (t > n ? n + 1 : t + 1) : i === o ? r : r + 1; - } - return function (t, r) { - if (t === r) return 0; - if (t.length > r.length) { - var n = t; - ((t = r), (r = n)); - } - for (var i = t.length, o = r.length; i > 0 && t.charCodeAt(i - 1) === r.charCodeAt(o - 1); ) (i--, o--); - for (var s = 0; s < i && t.charCodeAt(s) === r.charCodeAt(s); ) s++; - if (((i -= s), (o -= s), i === 0 || o < 3)) return o; - var a = 0, - l, - u, - g, - h, - T, - k, - A, - S, - F, - _, - L, - O, - q = []; - for (l = 0; l < i; l++) (q.push(l + 1), q.push(t.charCodeAt(s + l))); - for (var Y = q.length - 1; a < o - 3; ) - for ( - F = r.charCodeAt(s + (u = a)), - _ = r.charCodeAt(s + (g = a + 1)), - L = r.charCodeAt(s + (h = a + 2)), - O = r.charCodeAt(s + (T = a + 3)), - k = a += 4, - l = 0; - l < Y; - l += 2 - ) - ((A = q[l]), - (S = q[l + 1]), - (u = e(A, u, g, F, S)), - (g = e(u, g, h, _, S)), - (h = e(g, h, T, L, S)), - (k = e(h, T, k, O, S)), - (q[l] = k), - (T = h), - (h = g), - (g = u), - (u = A)); - for (; a < o; ) - for (F = r.charCodeAt(s + (u = a)), k = ++a, l = 0; l < Y; l += 2) - ((A = q[l]), (q[l] = k = e(A, u, k, F, q[l + 1])), (u = A)); - return k; - }; - })(); -}); -var So = he(() => { - 'use strict'; - m(); - c(); - p(); - d(); - f(); -}); -var Ro = he(() => { - 'use strict'; - m(); - c(); - p(); - d(); - f(); -}); -var Zo = Ae((Fv, Jc) => { - Jc.exports = { - name: '@prisma/engines-version', - version: '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - main: 'index.js', - types: 'index.d.ts', - license: 'Apache-2.0', - author: 'Tim Suchanek ', - prisma: { enginesVersion: '717184b7b35ea05dfa71a3236b7af656013e1e49' }, - repository: { - type: 'git', - url: 'https://github.com/prisma/engines-wrapper.git', - directory: 'packages/engines-version', - }, - devDependencies: { '@types/node': '18.19.76', typescript: '4.9.5' }, - files: ['index.js', 'index.d.ts'], - scripts: { build: 'tsc -d' }, - }; -}); -var Br, - Xo = he(() => { - 'use strict'; - m(); - c(); - p(); - d(); - f(); - Br = class { - events = {}; - on(t, r) { - return (this.events[t] || (this.events[t] = []), this.events[t].push(r), this); - } - emit(t, ...r) { - return this.events[t] - ? (this.events[t].forEach((n) => { - n(...r); - }), - !0) - : !1; - } - }; - }); -var pd = {}; -Xe(pd, { - DMMF: () => qt, - Debug: () => z, - Decimal: () => _e, - Extensions: () => an, - MetricsClient: () => wt, - PrismaClientInitializationError: () => Q, - PrismaClientKnownRequestError: () => se, - PrismaClientRustPanicError: () => ce, - PrismaClientUnknownRequestError: () => G, - PrismaClientValidationError: () => te, - Public: () => ln, - Sql: () => le, - createParam: () => Qo, - defineDmmfProperty: () => Ho, - deserializeJsonResponse: () => xt, - deserializeRawResult: () => Hr, - dmmfToRuntimeDataModel: () => ro, - empty: () => ts, - getPrismaClient: () => ya, - getRuntime: () => Fs, - join: () => es, - makeStrictEnum: () => wa, - makeTypedQueryFactory: () => Yo, - objectEnumValues: () => kr, - raw: () => jn, - serializeJsonQuery: () => Lr, - skip: () => Dr, - sqltag: () => Un, - warnEnvConflicts: () => void 0, - warnOnce: () => Dt, -}); -module.exports = Ca(pd); -m(); -c(); -p(); -d(); -f(); -var an = {}; -Xe(an, { defineExtension: () => Ti, getExtensionContext: () => Ci }); -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -function Ti(e) { - return typeof e == 'function' ? e : (t) => t.$extends(e); -} -m(); -c(); -p(); -d(); -f(); -function Ci(e) { - return e; -} -var ln = {}; -Xe(ln, { validator: () => Ai }); -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -function Ai(...e) { - return (t) => t; -} -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -var ir = {}; -Xe(ir, { - $: () => Ii, - bgBlack: () => ll, - bgBlue: () => dl, - bgCyan: () => ml, - bgGreen: () => cl, - bgMagenta: () => fl, - bgRed: () => ul, - bgWhite: () => gl, - bgYellow: () => pl, - black: () => il, - blue: () => We, - bold: () => de, - cyan: () => ke, - dim: () => At, - gray: () => Ot, - green: () => Rt, - grey: () => al, - hidden: () => rl, - inverse: () => tl, - italic: () => el, - magenta: () => ol, - red: () => Ge, - reset: () => Xa, - strikethrough: () => nl, - underline: () => St, - white: () => sl, - yellow: () => kt, -}); -m(); -c(); -p(); -d(); -f(); -var un, - Si, - Ri, - ki, - Oi = !0; -typeof y < 'u' && - (({ FORCE_COLOR: un, NODE_DISABLE_COLORS: Si, NO_COLOR: Ri, TERM: ki } = y.env || {}), - (Oi = y.stdout && y.stdout.isTTY)); -var Ii = { enabled: !Si && Ri == null && ki !== 'dumb' && ((un != null && un !== '0') || Oi) }; -function V(e, t) { - let r = new RegExp(`\\x1b\\[${t}m`, 'g'), - n = `\x1B[${e}m`, - i = `\x1B[${t}m`; - return function (o) { - return !Ii.enabled || o == null ? o : n + (~('' + o).indexOf(i) ? o.replace(r, i + n) : o) + i; - }; -} -var Xa = V(0, 0), - de = V(1, 22), - At = V(2, 22), - el = V(3, 23), - St = V(4, 24), - tl = V(7, 27), - rl = V(8, 28), - nl = V(9, 29), - il = V(30, 39), - Ge = V(31, 39), - Rt = V(32, 39), - kt = V(33, 39), - We = V(34, 39), - ol = V(35, 39), - ke = V(36, 39), - sl = V(37, 39), - Ot = V(90, 39), - al = V(90, 39), - ll = V(40, 49), - ul = V(41, 49), - cl = V(42, 49), - pl = V(43, 49), - dl = V(44, 49), - fl = V(45, 49), - ml = V(46, 49), - gl = V(47, 49); -m(); -c(); -p(); -d(); -f(); -var hl = 100, - Fi = ['green', 'yellow', 'blue', 'magenta', 'cyan', 'red'], - It = [], - Mi = Date.now(), - yl = 0, - cn = typeof y < 'u' ? y.env : {}; -globalThis.DEBUG ??= cn.DEBUG ?? ''; -globalThis.DEBUG_COLORS ??= cn.DEBUG_COLORS ? cn.DEBUG_COLORS === 'true' : !0; -var Ft = { - enable(e) { - typeof e == 'string' && (globalThis.DEBUG = e); - }, - disable() { - let e = globalThis.DEBUG; - return ((globalThis.DEBUG = ''), e); - }, - enabled(e) { - let t = globalThis.DEBUG.split(',').map((i) => i.replace(/[.+?^${}()|[\]\\]/g, '\\$&')), - r = t.some((i) => (i === '' || i[0] === '-' ? !1 : e.match(RegExp(i.split('*').join('.*') + '$')))), - n = t.some((i) => (i === '' || i[0] !== '-' ? !1 : e.match(RegExp(i.slice(1).split('*').join('.*') + '$')))); - return r && !n; - }, - log: (...e) => { - let [t, r, ...n] = e; - (console.warn ?? console.log)(`${t} ${r}`, ...n); - }, - formatters: {}, -}; -function wl(e) { - let t = { color: Fi[yl++ % Fi.length], enabled: Ft.enabled(e), namespace: e, log: Ft.log, extend: () => {} }, - r = (...n) => { - let { enabled: i, namespace: o, color: s, log: a } = t; - if ((n.length !== 0 && It.push([o, ...n]), It.length > hl && It.shift(), Ft.enabled(o) || i)) { - let l = n.map((g) => (typeof g == 'string' ? g : bl(g))), - u = `+${Date.now() - Mi}ms`; - ((Mi = Date.now()), globalThis.DEBUG_COLORS ? a(ir[s](de(o)), ...l, ir[s](u)) : a(o, ...l, u)); - } - }; - return new Proxy(r, { get: (n, i) => t[i], set: (n, i, o) => (t[i] = o) }); -} -var z = new Proxy(wl, { get: (e, t) => Ft[t], set: (e, t, r) => (Ft[t] = r) }); -function bl(e, t = 2) { - let r = new Set(); - return JSON.stringify( - e, - (n, i) => { - if (typeof i == 'object' && i !== null) { - if (r.has(i)) return '[Circular *]'; - r.add(i); - } else if (typeof i == 'bigint') return i.toString(); - return i; - }, - t - ); -} -function _i(e = 7500) { - let t = It.map(([r, ...n]) => `${r} ${n.map((i) => (typeof i == 'string' ? i : JSON.stringify(i))).join(' ')}`).join(` -`); - return t.length < e ? t : t.slice(-e); -} -function Di() { - It.length = 0; -} -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -var fn = [ - 'darwin', - 'darwin-arm64', - 'debian-openssl-1.0.x', - 'debian-openssl-1.1.x', - 'debian-openssl-3.0.x', - 'rhel-openssl-1.0.x', - 'rhel-openssl-1.1.x', - 'rhel-openssl-3.0.x', - 'linux-arm64-openssl-1.1.x', - 'linux-arm64-openssl-1.0.x', - 'linux-arm64-openssl-3.0.x', - 'linux-arm-openssl-1.1.x', - 'linux-arm-openssl-1.0.x', - 'linux-arm-openssl-3.0.x', - 'linux-musl', - 'linux-musl-openssl-3.0.x', - 'linux-musl-arm64-openssl-1.1.x', - 'linux-musl-arm64-openssl-3.0.x', - 'linux-nixos', - 'linux-static-x64', - 'linux-static-arm64', - 'windows', - 'freebsd11', - 'freebsd12', - 'freebsd13', - 'freebsd14', - 'freebsd15', - 'openbsd', - 'netbsd', - 'arm', -]; -m(); -c(); -p(); -d(); -f(); -var Gl = Bi(), - gn = Gl.version; -m(); -c(); -p(); -d(); -f(); -function it(e) { - let t = Wl(); - return ( - t || - (e?.config.engineType === 'library' - ? 'library' - : e?.config.engineType === 'binary' - ? 'binary' - : e?.config.engineType === 'client' - ? 'client' - : Kl(e)) - ); -} -function Wl() { - let e = y.env.PRISMA_CLIENT_ENGINE_TYPE; - return e === 'library' ? 'library' : e === 'binary' ? 'binary' : e === 'client' ? 'client' : void 0; -} -function Kl(e) { - return e?.previewFeatures.includes('queryCompiler') ? 'client' : 'library'; -} -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -function hn(e) { - return e.name === 'DriverAdapterError' && typeof e.cause == 'object'; -} -m(); -c(); -p(); -d(); -f(); -function sr(e) { - return { - ok: !0, - value: e, - map(t) { - return sr(t(e)); - }, - flatMap(t) { - return t(e); - }, - }; -} -function Ke(e) { - return { - ok: !1, - error: e, - map() { - return Ke(e); - }, - flatMap() { - return Ke(e); - }, - }; -} -var ji = z('driver-adapter-utils'), - yn = class { - registeredErrors = []; - consumeError(t) { - return this.registeredErrors[t]; - } - registerNewError(t) { - let r = 0; - for (; this.registeredErrors[r] !== void 0; ) r++; - return ((this.registeredErrors[r] = { error: t }), r); - } - }; -var ar = (e, t = new yn()) => { - let r = { - adapterName: e.adapterName, - errorRegistry: t, - queryRaw: Ie(t, e.queryRaw.bind(e)), - executeRaw: Ie(t, e.executeRaw.bind(e)), - executeScript: Ie(t, e.executeScript.bind(e)), - dispose: Ie(t, e.dispose.bind(e)), - provider: e.provider, - startTransaction: async (...n) => (await Ie(t, e.startTransaction.bind(e))(...n)).map((o) => zl(t, o)), - }; - return (e.getConnectionInfo && (r.getConnectionInfo = Hl(t, e.getConnectionInfo.bind(e))), r); - }, - zl = (e, t) => ({ - adapterName: t.adapterName, - provider: t.provider, - options: t.options, - queryRaw: Ie(e, t.queryRaw.bind(t)), - executeRaw: Ie(e, t.executeRaw.bind(t)), - commit: Ie(e, t.commit.bind(t)), - rollback: Ie(e, t.rollback.bind(t)), - }); -function Ie(e, t) { - return async (...r) => { - try { - return sr(await t(...r)); - } catch (n) { - if ((ji('[error@wrapAsync]', n), hn(n))) return Ke(n.cause); - let i = e.registerNewError(n); - return Ke({ kind: 'GenericJs', id: i }); - } - }; -} -function Hl(e, t) { - return (...r) => { - try { - return sr(t(...r)); - } catch (n) { - if ((ji('[error@wrapSync]', n), hn(n))) return Ke(n.cause); - let i = e.registerNewError(n); - return Ke({ kind: 'GenericJs', id: i }); - } - }; -} -m(); -c(); -p(); -d(); -f(); -var Vi = Se($i(), 1); -function wn(e) { - let t = (0, Vi.default)(e); - if (t === 0) return e; - let r = new RegExp(`^[ \\t]{${t}}`, 'gm'); - return e.replace(r, ''); -} -m(); -c(); -p(); -d(); -f(); -var Qi = 'prisma+postgres', - Ji = `${Qi}:`; -function bn(e) { - return e?.toString().startsWith(`${Ji}//`) ?? !1; -} -var _t = {}; -Xe(_t, { - error: () => Xl, - info: () => Zl, - log: () => Yl, - query: () => eu, - should: () => Ki, - tags: () => Mt, - warn: () => En, -}); -m(); -c(); -p(); -d(); -f(); -var Mt = { error: Ge('prisma:error'), warn: kt('prisma:warn'), info: ke('prisma:info'), query: We('prisma:query') }, - Ki = { warn: () => !y.env.PRISMA_DISABLE_WARNINGS }; -function Yl(...e) { - console.log(...e); -} -function En(e, ...t) { - Ki.warn() && console.warn(`${Mt.warn} ${e}`, ...t); -} -function Zl(e, ...t) { - console.info(`${Mt.info} ${e}`, ...t); -} -function Xl(e, ...t) { - console.error(`${Mt.error} ${e}`, ...t); -} -function eu(e, ...t) { - console.log(`${Mt.query} ${e}`, ...t); -} -m(); -c(); -p(); -d(); -f(); -function lr(e, t) { - if (!e) - throw new Error( - `${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report` - ); -} -m(); -c(); -p(); -d(); -f(); -function ze(e, t) { - throw new Error(t); -} -m(); -c(); -p(); -d(); -f(); -mn(); -function Pn(e) { - return Oe.sep === Oe.posix.sep ? e : e.split(Oe.sep).join(Oe.posix.sep); -} -m(); -c(); -p(); -d(); -f(); -function vn(e, t) { - return Object.prototype.hasOwnProperty.call(e, t); -} -m(); -c(); -p(); -d(); -f(); -function cr(e, t) { - let r = {}; - for (let n of Object.keys(e)) r[n] = t(e[n], n); - return r; -} -m(); -c(); -p(); -d(); -f(); -function Tn(e, t) { - if (e.length === 0) return; - let r = e[0]; - for (let n = 1; n < e.length; n++) t(r, e[n]) < 0 && (r = e[n]); - return r; -} -m(); -c(); -p(); -d(); -f(); -function ue(e, t) { - Object.defineProperty(e, 'name', { value: t, configurable: !0 }); -} -m(); -c(); -p(); -d(); -f(); -var Xi = new Set(), - Dt = (e, t, ...r) => { - Xi.has(e) || (Xi.add(e), En(t, ...r)); - }; -var Q = class e extends Error { - clientVersion; - errorCode; - retryable; - constructor(t, r, n) { - (super(t), - (this.name = 'PrismaClientInitializationError'), - (this.clientVersion = r), - (this.errorCode = n), - Error.captureStackTrace(e)); - } - get [Symbol.toStringTag]() { - return 'PrismaClientInitializationError'; - } -}; -ue(Q, 'PrismaClientInitializationError'); -m(); -c(); -p(); -d(); -f(); -var se = class extends Error { - code; - meta; - clientVersion; - batchRequestIdx; - constructor(t, { code: r, clientVersion: n, meta: i, batchRequestIdx: o }) { - (super(t), - (this.name = 'PrismaClientKnownRequestError'), - (this.code = r), - (this.clientVersion = n), - (this.meta = i), - Object.defineProperty(this, 'batchRequestIdx', { value: o, enumerable: !1, writable: !0 })); - } - get [Symbol.toStringTag]() { - return 'PrismaClientKnownRequestError'; - } -}; -ue(se, 'PrismaClientKnownRequestError'); -m(); -c(); -p(); -d(); -f(); -var ce = class extends Error { - clientVersion; - constructor(t, r) { - (super(t), (this.name = 'PrismaClientRustPanicError'), (this.clientVersion = r)); - } - get [Symbol.toStringTag]() { - return 'PrismaClientRustPanicError'; - } -}; -ue(ce, 'PrismaClientRustPanicError'); -m(); -c(); -p(); -d(); -f(); -var G = class extends Error { - clientVersion; - batchRequestIdx; - constructor(t, { clientVersion: r, batchRequestIdx: n }) { - (super(t), - (this.name = 'PrismaClientUnknownRequestError'), - (this.clientVersion = r), - Object.defineProperty(this, 'batchRequestIdx', { value: n, writable: !0, enumerable: !1 })); - } - get [Symbol.toStringTag]() { - return 'PrismaClientUnknownRequestError'; - } -}; -ue(G, 'PrismaClientUnknownRequestError'); -m(); -c(); -p(); -d(); -f(); -var te = class extends Error { - name = 'PrismaClientValidationError'; - clientVersion; - constructor(t, { clientVersion: r }) { - (super(t), (this.clientVersion = r)); - } - get [Symbol.toStringTag]() { - return 'PrismaClientValidationError'; - } -}; -ue(te, 'PrismaClientValidationError'); -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -var we = class { - _map = new Map(); - get(t) { - return this._map.get(t)?.value; - } - set(t, r) { - this._map.set(t, { value: r }); - } - getOrCreate(t, r) { - let n = this._map.get(t); - if (n) return n.value; - let i = r(); - return (this.set(t, i), i); - } -}; -m(); -c(); -p(); -d(); -f(); -function Ne(e) { - return e.substring(0, 1).toLowerCase() + e.substring(1); -} -m(); -c(); -p(); -d(); -f(); -function to(e, t) { - let r = {}; - for (let n of e) { - let i = n[t]; - r[i] = n; - } - return r; -} -m(); -c(); -p(); -d(); -f(); -function Lt(e) { - let t; - return { - get() { - return (t || (t = { value: e() }), t.value); - }, - }; -} -m(); -c(); -p(); -d(); -f(); -function ro(e) { - return { models: Cn(e.models), enums: Cn(e.enums), types: Cn(e.types) }; -} -function Cn(e) { - let t = {}; - for (let { name: r, ...n } of e) t[r] = n; - return t; -} -m(); -c(); -p(); -d(); -f(); -function ot(e) { - return e instanceof Date || Object.prototype.toString.call(e) === '[object Date]'; -} -function pr(e) { - return e.toString() !== 'Invalid Date'; -} -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -var st = 9e15, - Ue = 1e9, - An = '0123456789abcdef', - mr = - '2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058', - gr = - '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789', - Sn = { precision: 20, rounding: 4, modulo: 1, toExpNeg: -7, toExpPos: 21, minE: -st, maxE: st, crypto: !1 }, - so, - Fe, - D = !0, - yr = '[DecimalError] ', - je = yr + 'Invalid argument: ', - ao = yr + 'Precision limit exceeded', - lo = yr + 'crypto unavailable', - uo = '[object Decimal]', - re = Math.floor, - W = Math.pow, - ru = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, - nu = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, - iu = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, - co = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, - fe = 1e7, - M = 7, - ou = 9007199254740991, - su = mr.length - 1, - Rn = gr.length - 1, - R = { toStringTag: uo }; -R.absoluteValue = R.abs = function () { - var e = new this.constructor(this); - return (e.s < 0 && (e.s = 1), I(e)); -}; -R.ceil = function () { - return I(new this.constructor(this), this.e + 1, 2); -}; -R.clampedTo = R.clamp = function (e, t) { - var r, - n = this, - i = n.constructor; - if (((e = new i(e)), (t = new i(t)), !e.s || !t.s)) return new i(NaN); - if (e.gt(t)) throw Error(je + t); - return ((r = n.cmp(e)), r < 0 ? e : n.cmp(t) > 0 ? t : new i(n)); -}; -R.comparedTo = R.cmp = function (e) { - var t, - r, - n, - i, - o = this, - s = o.d, - a = (e = new o.constructor(e)).d, - l = o.s, - u = e.s; - if (!s || !a) return !l || !u ? NaN : l !== u ? l : s === a ? 0 : !s ^ (l < 0) ? 1 : -1; - if (!s[0] || !a[0]) return s[0] ? l : a[0] ? -u : 0; - if (l !== u) return l; - if (o.e !== e.e) return (o.e > e.e) ^ (l < 0) ? 1 : -1; - for (n = s.length, i = a.length, t = 0, r = n < i ? n : i; t < r; ++t) - if (s[t] !== a[t]) return (s[t] > a[t]) ^ (l < 0) ? 1 : -1; - return n === i ? 0 : (n > i) ^ (l < 0) ? 1 : -1; -}; -R.cosine = R.cos = function () { - var e, - t, - r = this, - n = r.constructor; - return r.d - ? r.d[0] - ? ((e = n.precision), - (t = n.rounding), - (n.precision = e + Math.max(r.e, r.sd()) + M), - (n.rounding = 1), - (r = au(n, ho(n, r))), - (n.precision = e), - (n.rounding = t), - I(Fe == 2 || Fe == 3 ? r.neg() : r, e, t, !0)) - : new n(1) - : new n(NaN); -}; -R.cubeRoot = R.cbrt = function () { - var e, - t, - r, - n, - i, - o, - s, - a, - l, - u, - g = this, - h = g.constructor; - if (!g.isFinite() || g.isZero()) return new h(g); - for ( - D = !1, - o = g.s * W(g.s * g, 1 / 3), - !o || Math.abs(o) == 1 / 0 - ? ((r = Z(g.d)), - (e = g.e), - (o = (e - r.length + 1) % 3) && (r += o == 1 || o == -2 ? '0' : '00'), - (o = W(r, 1 / 3)), - (e = re((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2))), - o == 1 / 0 ? (r = '5e' + e) : ((r = o.toExponential()), (r = r.slice(0, r.indexOf('e') + 1) + e)), - (n = new h(r)), - (n.s = g.s)) - : (n = new h(o.toString())), - s = (e = h.precision) + 3; - ; - - ) - if ( - ((a = n), - (l = a.times(a).times(a)), - (u = l.plus(g)), - (n = U(u.plus(g).times(a), u.plus(l), s + 2, 1)), - Z(a.d).slice(0, s) === (r = Z(n.d)).slice(0, s)) - ) - if (((r = r.slice(s - 3, s + 1)), r == '9999' || (!i && r == '4999'))) { - if (!i && (I(a, e + 1, 0), a.times(a).times(a).eq(g))) { - n = a; - break; - } - ((s += 4), (i = 1)); - } else { - (!+r || (!+r.slice(1) && r.charAt(0) == '5')) && (I(n, e + 1, 1), (t = !n.times(n).times(n).eq(g))); - break; - } - return ((D = !0), I(n, e, h.rounding, t)); -}; -R.decimalPlaces = R.dp = function () { - var e, - t = this.d, - r = NaN; - if (t) { - if (((e = t.length - 1), (r = (e - re(this.e / M)) * M), (e = t[e]), e)) for (; e % 10 == 0; e /= 10) r--; - r < 0 && (r = 0); - } - return r; -}; -R.dividedBy = R.div = function (e) { - return U(this, new this.constructor(e)); -}; -R.dividedToIntegerBy = R.divToInt = function (e) { - var t = this, - r = t.constructor; - return I(U(t, new r(e), 0, 1, 1), r.precision, r.rounding); -}; -R.equals = R.eq = function (e) { - return this.cmp(e) === 0; -}; -R.floor = function () { - return I(new this.constructor(this), this.e + 1, 3); -}; -R.greaterThan = R.gt = function (e) { - return this.cmp(e) > 0; -}; -R.greaterThanOrEqualTo = R.gte = function (e) { - var t = this.cmp(e); - return t == 1 || t === 0; -}; -R.hyperbolicCosine = R.cosh = function () { - var e, - t, - r, - n, - i, - o = this, - s = o.constructor, - a = new s(1); - if (!o.isFinite()) return new s(o.s ? 1 / 0 : NaN); - if (o.isZero()) return a; - ((r = s.precision), - (n = s.rounding), - (s.precision = r + Math.max(o.e, o.sd()) + 4), - (s.rounding = 1), - (i = o.d.length), - i < 32 - ? ((e = Math.ceil(i / 3)), (t = (1 / br(4, e)).toString())) - : ((e = 16), (t = '2.3283064365386962890625e-10')), - (o = at(s, 1, o.times(t), new s(1), !0))); - for (var l, u = e, g = new s(8); u--; ) ((l = o.times(o)), (o = a.minus(l.times(g.minus(l.times(g)))))); - return I(o, (s.precision = r), (s.rounding = n), !0); -}; -R.hyperbolicSine = R.sinh = function () { - var e, - t, - r, - n, - i = this, - o = i.constructor; - if (!i.isFinite() || i.isZero()) return new o(i); - if ( - ((t = o.precision), - (r = o.rounding), - (o.precision = t + Math.max(i.e, i.sd()) + 4), - (o.rounding = 1), - (n = i.d.length), - n < 3) - ) - i = at(o, 2, i, i, !0); - else { - ((e = 1.4 * Math.sqrt(n)), (e = e > 16 ? 16 : e | 0), (i = i.times(1 / br(5, e))), (i = at(o, 2, i, i, !0))); - for (var s, a = new o(5), l = new o(16), u = new o(20); e--; ) - ((s = i.times(i)), (i = i.times(a.plus(s.times(l.times(s).plus(u)))))); - } - return ((o.precision = t), (o.rounding = r), I(i, t, r, !0)); -}; -R.hyperbolicTangent = R.tanh = function () { - var e, - t, - r = this, - n = r.constructor; - return r.isFinite() - ? r.isZero() - ? new n(r) - : ((e = n.precision), - (t = n.rounding), - (n.precision = e + 7), - (n.rounding = 1), - U(r.sinh(), r.cosh(), (n.precision = e), (n.rounding = t))) - : new n(r.s); -}; -R.inverseCosine = R.acos = function () { - var e = this, - t = e.constructor, - r = e.abs().cmp(1), - n = t.precision, - i = t.rounding; - return r !== -1 - ? r === 0 - ? e.isNeg() - ? be(t, n, i) - : new t(0) - : new t(NaN) - : e.isZero() - ? be(t, n + 4, i).times(0.5) - : ((t.precision = n + 6), - (t.rounding = 1), - (e = new t(1).minus(e).div(e.plus(1)).sqrt().atan()), - (t.precision = n), - (t.rounding = i), - e.times(2)); -}; -R.inverseHyperbolicCosine = R.acosh = function () { - var e, - t, - r = this, - n = r.constructor; - return r.lte(1) - ? new n(r.eq(1) ? 0 : NaN) - : r.isFinite() - ? ((e = n.precision), - (t = n.rounding), - (n.precision = e + Math.max(Math.abs(r.e), r.sd()) + 4), - (n.rounding = 1), - (D = !1), - (r = r.times(r).minus(1).sqrt().plus(r)), - (D = !0), - (n.precision = e), - (n.rounding = t), - r.ln()) - : new n(r); -}; -R.inverseHyperbolicSine = R.asinh = function () { - var e, - t, - r = this, - n = r.constructor; - return !r.isFinite() || r.isZero() - ? new n(r) - : ((e = n.precision), - (t = n.rounding), - (n.precision = e + 2 * Math.max(Math.abs(r.e), r.sd()) + 6), - (n.rounding = 1), - (D = !1), - (r = r.times(r).plus(1).sqrt().plus(r)), - (D = !0), - (n.precision = e), - (n.rounding = t), - r.ln()); -}; -R.inverseHyperbolicTangent = R.atanh = function () { - var e, - t, - r, - n, - i = this, - o = i.constructor; - return i.isFinite() - ? i.e >= 0 - ? new o(i.abs().eq(1) ? i.s / 0 : i.isZero() ? i : NaN) - : ((e = o.precision), - (t = o.rounding), - (n = i.sd()), - Math.max(n, e) < 2 * -i.e - 1 - ? I(new o(i), e, t, !0) - : ((o.precision = r = n - i.e), - (i = U(i.plus(1), new o(1).minus(i), r + e, 1)), - (o.precision = e + 4), - (o.rounding = 1), - (i = i.ln()), - (o.precision = e), - (o.rounding = t), - i.times(0.5))) - : new o(NaN); -}; -R.inverseSine = R.asin = function () { - var e, - t, - r, - n, - i = this, - o = i.constructor; - return i.isZero() - ? new o(i) - : ((t = i.abs().cmp(1)), - (r = o.precision), - (n = o.rounding), - t !== -1 - ? t === 0 - ? ((e = be(o, r + 4, n).times(0.5)), (e.s = i.s), e) - : new o(NaN) - : ((o.precision = r + 6), - (o.rounding = 1), - (i = i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan()), - (o.precision = r), - (o.rounding = n), - i.times(2))); -}; -R.inverseTangent = R.atan = function () { - var e, - t, - r, - n, - i, - o, - s, - a, - l, - u = this, - g = u.constructor, - h = g.precision, - T = g.rounding; - if (u.isFinite()) { - if (u.isZero()) return new g(u); - if (u.abs().eq(1) && h + 4 <= Rn) return ((s = be(g, h + 4, T).times(0.25)), (s.s = u.s), s); - } else { - if (!u.s) return new g(NaN); - if (h + 4 <= Rn) return ((s = be(g, h + 4, T).times(0.5)), (s.s = u.s), s); - } - for (g.precision = a = h + 10, g.rounding = 1, r = Math.min(28, (a / M + 2) | 0), e = r; e; --e) - u = u.div(u.times(u).plus(1).sqrt().plus(1)); - for (D = !1, t = Math.ceil(a / M), n = 1, l = u.times(u), s = new g(u), i = u; e !== -1; ) - if ( - ((i = i.times(l)), - (o = s.minus(i.div((n += 2)))), - (i = i.times(l)), - (s = o.plus(i.div((n += 2)))), - s.d[t] !== void 0) - ) - for (e = t; s.d[e] === o.d[e] && e--; ); - return (r && (s = s.times(2 << (r - 1))), (D = !0), I(s, (g.precision = h), (g.rounding = T), !0)); -}; -R.isFinite = function () { - return !!this.d; -}; -R.isInteger = R.isInt = function () { - return !!this.d && re(this.e / M) > this.d.length - 2; -}; -R.isNaN = function () { - return !this.s; -}; -R.isNegative = R.isNeg = function () { - return this.s < 0; -}; -R.isPositive = R.isPos = function () { - return this.s > 0; -}; -R.isZero = function () { - return !!this.d && this.d[0] === 0; -}; -R.lessThan = R.lt = function (e) { - return this.cmp(e) < 0; -}; -R.lessThanOrEqualTo = R.lte = function (e) { - return this.cmp(e) < 1; -}; -R.logarithm = R.log = function (e) { - var t, - r, - n, - i, - o, - s, - a, - l, - u = this, - g = u.constructor, - h = g.precision, - T = g.rounding, - k = 5; - if (e == null) ((e = new g(10)), (t = !0)); - else { - if (((e = new g(e)), (r = e.d), e.s < 0 || !r || !r[0] || e.eq(1))) return new g(NaN); - t = e.eq(10); - } - if (((r = u.d), u.s < 0 || !r || !r[0] || u.eq(1))) - return new g(r && !r[0] ? -1 / 0 : u.s != 1 ? NaN : r ? 0 : 1 / 0); - if (t) - if (r.length > 1) o = !0; - else { - for (i = r[0]; i % 10 === 0; ) i /= 10; - o = i !== 1; - } - if ( - ((D = !1), - (a = h + k), - (s = Be(u, a)), - (n = t ? hr(g, a + 10) : Be(e, a)), - (l = U(s, n, a, 1)), - Nt(l.d, (i = h), T)) - ) - do - if (((a += 10), (s = Be(u, a)), (n = t ? hr(g, a + 10) : Be(e, a)), (l = U(s, n, a, 1)), !o)) { - +Z(l.d).slice(i + 1, i + 15) + 1 == 1e14 && (l = I(l, h + 1, 0)); - break; - } - while (Nt(l.d, (i += 10), T)); - return ((D = !0), I(l, h, T)); -}; -R.minus = R.sub = function (e) { - var t, - r, - n, - i, - o, - s, - a, - l, - u, - g, - h, - T, - k = this, - A = k.constructor; - if (((e = new A(e)), !k.d || !e.d)) - return (!k.s || !e.s ? (e = new A(NaN)) : k.d ? (e.s = -e.s) : (e = new A(e.d || k.s !== e.s ? k : NaN)), e); - if (k.s != e.s) return ((e.s = -e.s), k.plus(e)); - if (((u = k.d), (T = e.d), (a = A.precision), (l = A.rounding), !u[0] || !T[0])) { - if (T[0]) e.s = -e.s; - else if (u[0]) e = new A(k); - else return new A(l === 3 ? -0 : 0); - return D ? I(e, a, l) : e; - } - if (((r = re(e.e / M)), (g = re(k.e / M)), (u = u.slice()), (o = g - r), o)) { - for ( - h = o < 0, - h ? ((t = u), (o = -o), (s = T.length)) : ((t = T), (r = g), (s = u.length)), - n = Math.max(Math.ceil(a / M), s) + 2, - o > n && ((o = n), (t.length = 1)), - t.reverse(), - n = o; - n--; - - ) - t.push(0); - t.reverse(); - } else { - for (n = u.length, s = T.length, h = n < s, h && (s = n), n = 0; n < s; n++) - if (u[n] != T[n]) { - h = u[n] < T[n]; - break; - } - o = 0; - } - for (h && ((t = u), (u = T), (T = t), (e.s = -e.s)), s = u.length, n = T.length - s; n > 0; --n) u[s++] = 0; - for (n = T.length; n > o; ) { - if (u[--n] < T[n]) { - for (i = n; i && u[--i] === 0; ) u[i] = fe - 1; - (--u[i], (u[n] += fe)); - } - u[n] -= T[n]; - } - for (; u[--s] === 0; ) u.pop(); - for (; u[0] === 0; u.shift()) --r; - return u[0] ? ((e.d = u), (e.e = wr(u, r)), D ? I(e, a, l) : e) : new A(l === 3 ? -0 : 0); -}; -R.modulo = R.mod = function (e) { - var t, - r = this, - n = r.constructor; - return ( - (e = new n(e)), - !r.d || !e.s || (e.d && !e.d[0]) - ? new n(NaN) - : !e.d || (r.d && !r.d[0]) - ? I(new n(r), n.precision, n.rounding) - : ((D = !1), - n.modulo == 9 ? ((t = U(r, e.abs(), 0, 3, 1)), (t.s *= e.s)) : (t = U(r, e, 0, n.modulo, 1)), - (t = t.times(e)), - (D = !0), - r.minus(t)) - ); -}; -R.naturalExponential = R.exp = function () { - return kn(this); -}; -R.naturalLogarithm = R.ln = function () { - return Be(this); -}; -R.negated = R.neg = function () { - var e = new this.constructor(this); - return ((e.s = -e.s), I(e)); -}; -R.plus = R.add = function (e) { - var t, - r, - n, - i, - o, - s, - a, - l, - u, - g, - h = this, - T = h.constructor; - if (((e = new T(e)), !h.d || !e.d)) - return (!h.s || !e.s ? (e = new T(NaN)) : h.d || (e = new T(e.d || h.s === e.s ? h : NaN)), e); - if (h.s != e.s) return ((e.s = -e.s), h.minus(e)); - if (((u = h.d), (g = e.d), (a = T.precision), (l = T.rounding), !u[0] || !g[0])) - return (g[0] || (e = new T(h)), D ? I(e, a, l) : e); - if (((o = re(h.e / M)), (n = re(e.e / M)), (u = u.slice()), (i = o - n), i)) { - for ( - i < 0 ? ((r = u), (i = -i), (s = g.length)) : ((r = g), (n = o), (s = u.length)), - o = Math.ceil(a / M), - s = o > s ? o + 1 : s + 1, - i > s && ((i = s), (r.length = 1)), - r.reverse(); - i--; - - ) - r.push(0); - r.reverse(); - } - for (s = u.length, i = g.length, s - i < 0 && ((i = s), (r = g), (g = u), (u = r)), t = 0; i; ) - ((t = ((u[--i] = u[i] + g[i] + t) / fe) | 0), (u[i] %= fe)); - for (t && (u.unshift(t), ++n), s = u.length; u[--s] == 0; ) u.pop(); - return ((e.d = u), (e.e = wr(u, n)), D ? I(e, a, l) : e); -}; -R.precision = R.sd = function (e) { - var t, - r = this; - if (e !== void 0 && e !== !!e && e !== 1 && e !== 0) throw Error(je + e); - return (r.d ? ((t = po(r.d)), e && r.e + 1 > t && (t = r.e + 1)) : (t = NaN), t); -}; -R.round = function () { - var e = this, - t = e.constructor; - return I(new t(e), e.e + 1, t.rounding); -}; -R.sine = R.sin = function () { - var e, - t, - r = this, - n = r.constructor; - return r.isFinite() - ? r.isZero() - ? new n(r) - : ((e = n.precision), - (t = n.rounding), - (n.precision = e + Math.max(r.e, r.sd()) + M), - (n.rounding = 1), - (r = uu(n, ho(n, r))), - (n.precision = e), - (n.rounding = t), - I(Fe > 2 ? r.neg() : r, e, t, !0)) - : new n(NaN); -}; -R.squareRoot = R.sqrt = function () { - var e, - t, - r, - n, - i, - o, - s = this, - a = s.d, - l = s.e, - u = s.s, - g = s.constructor; - if (u !== 1 || !a || !a[0]) return new g(!u || (u < 0 && (!a || a[0])) ? NaN : a ? s : 1 / 0); - for ( - D = !1, - u = Math.sqrt(+s), - u == 0 || u == 1 / 0 - ? ((t = Z(a)), - (t.length + l) % 2 == 0 && (t += '0'), - (u = Math.sqrt(t)), - (l = re((l + 1) / 2) - (l < 0 || l % 2)), - u == 1 / 0 ? (t = '5e' + l) : ((t = u.toExponential()), (t = t.slice(0, t.indexOf('e') + 1) + l)), - (n = new g(t))) - : (n = new g(u.toString())), - r = (l = g.precision) + 3; - ; - - ) - if (((o = n), (n = o.plus(U(s, o, r + 2, 1)).times(0.5)), Z(o.d).slice(0, r) === (t = Z(n.d)).slice(0, r))) - if (((t = t.slice(r - 3, r + 1)), t == '9999' || (!i && t == '4999'))) { - if (!i && (I(o, l + 1, 0), o.times(o).eq(s))) { - n = o; - break; - } - ((r += 4), (i = 1)); - } else { - (!+t || (!+t.slice(1) && t.charAt(0) == '5')) && (I(n, l + 1, 1), (e = !n.times(n).eq(s))); - break; - } - return ((D = !0), I(n, l, g.rounding, e)); -}; -R.tangent = R.tan = function () { - var e, - t, - r = this, - n = r.constructor; - return r.isFinite() - ? r.isZero() - ? new n(r) - : ((e = n.precision), - (t = n.rounding), - (n.precision = e + 10), - (n.rounding = 1), - (r = r.sin()), - (r.s = 1), - (r = U(r, new n(1).minus(r.times(r)).sqrt(), e + 10, 0)), - (n.precision = e), - (n.rounding = t), - I(Fe == 2 || Fe == 4 ? r.neg() : r, e, t, !0)) - : new n(NaN); -}; -R.times = R.mul = function (e) { - var t, - r, - n, - i, - o, - s, - a, - l, - u, - g = this, - h = g.constructor, - T = g.d, - k = (e = new h(e)).d; - if (((e.s *= g.s), !T || !T[0] || !k || !k[0])) - return new h(!e.s || (T && !T[0] && !k) || (k && !k[0] && !T) ? NaN : !T || !k ? e.s / 0 : e.s * 0); - for ( - r = re(g.e / M) + re(e.e / M), - l = T.length, - u = k.length, - l < u && ((o = T), (T = k), (k = o), (s = l), (l = u), (u = s)), - o = [], - s = l + u, - n = s; - n--; - - ) - o.push(0); - for (n = u; --n >= 0; ) { - for (t = 0, i = l + n; i > n; ) ((a = o[i] + k[n] * T[i - n - 1] + t), (o[i--] = a % fe | 0), (t = (a / fe) | 0)); - o[i] = (o[i] + t) % fe | 0; - } - for (; !o[--s]; ) o.pop(); - return (t ? ++r : o.shift(), (e.d = o), (e.e = wr(o, r)), D ? I(e, h.precision, h.rounding) : e); -}; -R.toBinary = function (e, t) { - return On(this, 2, e, t); -}; -R.toDecimalPlaces = R.toDP = function (e, t) { - var r = this, - n = r.constructor; - return ( - (r = new n(r)), - e === void 0 ? r : (ae(e, 0, Ue), t === void 0 ? (t = n.rounding) : ae(t, 0, 8), I(r, e + r.e + 1, t)) - ); -}; -R.toExponential = function (e, t) { - var r, - n = this, - i = n.constructor; - return ( - e === void 0 - ? (r = Ee(n, !0)) - : (ae(e, 0, Ue), - t === void 0 ? (t = i.rounding) : ae(t, 0, 8), - (n = I(new i(n), e + 1, t)), - (r = Ee(n, !0, e + 1))), - n.isNeg() && !n.isZero() ? '-' + r : r - ); -}; -R.toFixed = function (e, t) { - var r, - n, - i = this, - o = i.constructor; - return ( - e === void 0 - ? (r = Ee(i)) - : (ae(e, 0, Ue), - t === void 0 ? (t = o.rounding) : ae(t, 0, 8), - (n = I(new o(i), e + i.e + 1, t)), - (r = Ee(n, !1, e + n.e + 1))), - i.isNeg() && !i.isZero() ? '-' + r : r - ); -}; -R.toFraction = function (e) { - var t, - r, - n, - i, - o, - s, - a, - l, - u, - g, - h, - T, - k = this, - A = k.d, - S = k.constructor; - if (!A) return new S(k); - if ( - ((u = r = new S(1)), - (n = l = new S(0)), - (t = new S(n)), - (o = t.e = po(A) - k.e - 1), - (s = o % M), - (t.d[0] = W(10, s < 0 ? M + s : s)), - e == null) - ) - e = o > 0 ? t : u; - else { - if (((a = new S(e)), !a.isInt() || a.lt(u))) throw Error(je + a); - e = a.gt(t) ? (o > 0 ? t : u) : a; - } - for ( - D = !1, a = new S(Z(A)), g = S.precision, S.precision = o = A.length * M * 2; - (h = U(a, t, 0, 1, 1)), (i = r.plus(h.times(n))), i.cmp(e) != 1; - - ) - ((r = n), (n = i), (i = u), (u = l.plus(h.times(i))), (l = i), (i = t), (t = a.minus(h.times(i))), (a = i)); - return ( - (i = U(e.minus(r), n, 0, 1, 1)), - (l = l.plus(i.times(u))), - (r = r.plus(i.times(n))), - (l.s = u.s = k.s), - (T = - U(u, n, o, 1) - .minus(k) - .abs() - .cmp(U(l, r, o, 1).minus(k).abs()) < 1 - ? [u, n] - : [l, r]), - (S.precision = g), - (D = !0), - T - ); -}; -R.toHexadecimal = R.toHex = function (e, t) { - return On(this, 16, e, t); -}; -R.toNearest = function (e, t) { - var r = this, - n = r.constructor; - if (((r = new n(r)), e == null)) { - if (!r.d) return r; - ((e = new n(1)), (t = n.rounding)); - } else { - if (((e = new n(e)), t === void 0 ? (t = n.rounding) : ae(t, 0, 8), !r.d)) return e.s ? r : e; - if (!e.d) return (e.s && (e.s = r.s), e); - } - return (e.d[0] ? ((D = !1), (r = U(r, e, 0, t, 1).times(e)), (D = !0), I(r)) : ((e.s = r.s), (r = e)), r); -}; -R.toNumber = function () { - return +this; -}; -R.toOctal = function (e, t) { - return On(this, 8, e, t); -}; -R.toPower = R.pow = function (e) { - var t, - r, - n, - i, - o, - s, - a = this, - l = a.constructor, - u = +(e = new l(e)); - if (!a.d || !e.d || !a.d[0] || !e.d[0]) return new l(W(+a, u)); - if (((a = new l(a)), a.eq(1))) return a; - if (((n = l.precision), (o = l.rounding), e.eq(1))) return I(a, n, o); - if (((t = re(e.e / M)), t >= e.d.length - 1 && (r = u < 0 ? -u : u) <= ou)) - return ((i = fo(l, a, r, n)), e.s < 0 ? new l(1).div(i) : I(i, n, o)); - if (((s = a.s), s < 0)) { - if (t < e.d.length - 1) return new l(NaN); - if (((e.d[t] & 1) == 0 && (s = 1), a.e == 0 && a.d[0] == 1 && a.d.length == 1)) return ((a.s = s), a); - } - return ( - (r = W(+a, u)), - (t = r == 0 || !isFinite(r) ? re(u * (Math.log('0.' + Z(a.d)) / Math.LN10 + a.e + 1)) : new l(r + '').e), - t > l.maxE + 1 || t < l.minE - 1 - ? new l(t > 0 ? s / 0 : 0) - : ((D = !1), - (l.rounding = a.s = 1), - (r = Math.min(12, (t + '').length)), - (i = kn(e.times(Be(a, n + r)), n)), - i.d && - ((i = I(i, n + 5, 1)), - Nt(i.d, n, o) && - ((t = n + 10), - (i = I(kn(e.times(Be(a, t + r)), t), t + 5, 1)), - +Z(i.d).slice(n + 1, n + 15) + 1 == 1e14 && (i = I(i, n + 1, 0)))), - (i.s = s), - (D = !0), - (l.rounding = o), - I(i, n, o)) - ); -}; -R.toPrecision = function (e, t) { - var r, - n = this, - i = n.constructor; - return ( - e === void 0 - ? (r = Ee(n, n.e <= i.toExpNeg || n.e >= i.toExpPos)) - : (ae(e, 1, Ue), - t === void 0 ? (t = i.rounding) : ae(t, 0, 8), - (n = I(new i(n), e, t)), - (r = Ee(n, e <= n.e || n.e <= i.toExpNeg, e))), - n.isNeg() && !n.isZero() ? '-' + r : r - ); -}; -R.toSignificantDigits = R.toSD = function (e, t) { - var r = this, - n = r.constructor; - return ( - e === void 0 - ? ((e = n.precision), (t = n.rounding)) - : (ae(e, 1, Ue), t === void 0 ? (t = n.rounding) : ae(t, 0, 8)), - I(new n(r), e, t) - ); -}; -R.toString = function () { - var e = this, - t = e.constructor, - r = Ee(e, e.e <= t.toExpNeg || e.e >= t.toExpPos); - return e.isNeg() && !e.isZero() ? '-' + r : r; -}; -R.truncated = R.trunc = function () { - return I(new this.constructor(this), this.e + 1, 1); -}; -R.valueOf = R.toJSON = function () { - var e = this, - t = e.constructor, - r = Ee(e, e.e <= t.toExpNeg || e.e >= t.toExpPos); - return e.isNeg() ? '-' + r : r; -}; -function Z(e) { - var t, - r, - n, - i = e.length - 1, - o = '', - s = e[0]; - if (i > 0) { - for (o += s, t = 1; t < i; t++) ((n = e[t] + ''), (r = M - n.length), r && (o += qe(r)), (o += n)); - ((s = e[t]), (n = s + ''), (r = M - n.length), r && (o += qe(r))); - } else if (s === 0) return '0'; - for (; s % 10 === 0; ) s /= 10; - return o + s; -} -function ae(e, t, r) { - if (e !== ~~e || e < t || e > r) throw Error(je + e); -} -function Nt(e, t, r, n) { - var i, o, s, a; - for (o = e[0]; o >= 10; o /= 10) --t; - return ( - --t < 0 ? ((t += M), (i = 0)) : ((i = Math.ceil((t + 1) / M)), (t %= M)), - (o = W(10, M - t)), - (a = e[i] % o | 0), - n == null - ? t < 3 - ? (t == 0 ? (a = (a / 100) | 0) : t == 1 && (a = (a / 10) | 0), - (s = (r < 4 && a == 99999) || (r > 3 && a == 49999) || a == 5e4 || a == 0)) - : (s = - (((r < 4 && a + 1 == o) || (r > 3 && a + 1 == o / 2)) && ((e[i + 1] / o / 100) | 0) == W(10, t - 2) - 1) || - ((a == o / 2 || a == 0) && ((e[i + 1] / o / 100) | 0) == 0)) - : t < 4 - ? (t == 0 ? (a = (a / 1e3) | 0) : t == 1 ? (a = (a / 100) | 0) : t == 2 && (a = (a / 10) | 0), - (s = ((n || r < 4) && a == 9999) || (!n && r > 3 && a == 4999))) - : (s = - (((n || r < 4) && a + 1 == o) || (!n && r > 3 && a + 1 == o / 2)) && - ((e[i + 1] / o / 1e3) | 0) == W(10, t - 3) - 1), - s - ); -} -function dr(e, t, r) { - for (var n, i = [0], o, s = 0, a = e.length; s < a; ) { - for (o = i.length; o--; ) i[o] *= t; - for (i[0] += An.indexOf(e.charAt(s++)), n = 0; n < i.length; n++) - i[n] > r - 1 && (i[n + 1] === void 0 && (i[n + 1] = 0), (i[n + 1] += (i[n] / r) | 0), (i[n] %= r)); - } - return i.reverse(); -} -function au(e, t) { - var r, n, i; - if (t.isZero()) return t; - ((n = t.d.length), - n < 32 - ? ((r = Math.ceil(n / 3)), (i = (1 / br(4, r)).toString())) - : ((r = 16), (i = '2.3283064365386962890625e-10')), - (e.precision += r), - (t = at(e, 1, t.times(i), new e(1)))); - for (var o = r; o--; ) { - var s = t.times(t); - t = s.times(s).minus(s).times(8).plus(1); - } - return ((e.precision -= r), t); -} -var U = (function () { - function e(n, i, o) { - var s, - a = 0, - l = n.length; - for (n = n.slice(); l--; ) ((s = n[l] * i + a), (n[l] = s % o | 0), (a = (s / o) | 0)); - return (a && n.unshift(a), n); - } - function t(n, i, o, s) { - var a, l; - if (o != s) l = o > s ? 1 : -1; - else - for (a = l = 0; a < o; a++) - if (n[a] != i[a]) { - l = n[a] > i[a] ? 1 : -1; - break; - } - return l; - } - function r(n, i, o, s) { - for (var a = 0; o--; ) ((n[o] -= a), (a = n[o] < i[o] ? 1 : 0), (n[o] = a * s + n[o] - i[o])); - for (; !n[0] && n.length > 1; ) n.shift(); - } - return function (n, i, o, s, a, l) { - var u, - g, - h, - T, - k, - A, - S, - F, - _, - L, - O, - q, - Y, - $, - Tt, - J, - ie, - Ce, - X, - Ze, - er = n.constructor, - Zr = n.s == i.s ? 1 : -1, - ee = n.d, - j = i.d; - if (!ee || !ee[0] || !j || !j[0]) - return new er(!n.s || !i.s || (ee ? j && ee[0] == j[0] : !j) ? NaN : (ee && ee[0] == 0) || !j ? Zr * 0 : Zr / 0); - for ( - l ? ((k = 1), (g = n.e - i.e)) : ((l = fe), (k = M), (g = re(n.e / k) - re(i.e / k))), - X = j.length, - ie = ee.length, - _ = new er(Zr), - L = _.d = [], - h = 0; - j[h] == (ee[h] || 0); - h++ - ); - if ( - (j[h] > (ee[h] || 0) && g--, - o == null ? (($ = o = er.precision), (s = er.rounding)) : a ? ($ = o + (n.e - i.e) + 1) : ($ = o), - $ < 0) - ) - (L.push(1), (A = !0)); - else { - if ((($ = ($ / k + 2) | 0), (h = 0), X == 1)) { - for (T = 0, j = j[0], $++; (h < ie || T) && $--; h++) - ((Tt = T * l + (ee[h] || 0)), (L[h] = (Tt / j) | 0), (T = Tt % j | 0)); - A = T || h < ie; - } else { - for ( - T = (l / (j[0] + 1)) | 0, - T > 1 && ((j = e(j, T, l)), (ee = e(ee, T, l)), (X = j.length), (ie = ee.length)), - J = X, - O = ee.slice(0, X), - q = O.length; - q < X; - - ) - O[q++] = 0; - ((Ze = j.slice()), Ze.unshift(0), (Ce = j[0]), j[1] >= l / 2 && ++Ce); - do - ((T = 0), - (u = t(j, O, X, q)), - u < 0 - ? ((Y = O[0]), - X != q && (Y = Y * l + (O[1] || 0)), - (T = (Y / Ce) | 0), - T > 1 - ? (T >= l && (T = l - 1), - (S = e(j, T, l)), - (F = S.length), - (q = O.length), - (u = t(S, O, F, q)), - u == 1 && (T--, r(S, X < F ? Ze : j, F, l))) - : (T == 0 && (u = T = 1), (S = j.slice())), - (F = S.length), - F < q && S.unshift(0), - r(O, S, q, l), - u == -1 && ((q = O.length), (u = t(j, O, X, q)), u < 1 && (T++, r(O, X < q ? Ze : j, q, l))), - (q = O.length)) - : u === 0 && (T++, (O = [0])), - (L[h++] = T), - u && O[0] ? (O[q++] = ee[J] || 0) : ((O = [ee[J]]), (q = 1))); - while ((J++ < ie || O[0] !== void 0) && $--); - A = O[0] !== void 0; - } - L[0] || L.shift(); - } - if (k == 1) ((_.e = g), (so = A)); - else { - for (h = 1, T = L[0]; T >= 10; T /= 10) h++; - ((_.e = h + g * k - 1), I(_, a ? o + _.e + 1 : o, s, A)); - } - return _; - }; -})(); -function I(e, t, r, n) { - var i, - o, - s, - a, - l, - u, - g, - h, - T, - k = e.constructor; - e: if (t != null) { - if (((h = e.d), !h)) return e; - for (i = 1, a = h[0]; a >= 10; a /= 10) i++; - if (((o = t - i), o < 0)) ((o += M), (s = t), (g = h[(T = 0)]), (l = (g / W(10, i - s - 1)) % 10 | 0)); - else if (((T = Math.ceil((o + 1) / M)), (a = h.length), T >= a)) - if (n) { - for (; a++ <= T; ) h.push(0); - ((g = l = 0), (i = 1), (o %= M), (s = o - M + 1)); - } else break e; - else { - for (g = a = h[T], i = 1; a >= 10; a /= 10) i++; - ((o %= M), (s = o - M + i), (l = s < 0 ? 0 : (g / W(10, i - s - 1)) % 10 | 0)); - } - if ( - ((n = n || t < 0 || h[T + 1] !== void 0 || (s < 0 ? g : g % W(10, i - s - 1))), - (u = - r < 4 - ? (l || n) && (r == 0 || r == (e.s < 0 ? 3 : 2)) - : l > 5 || - (l == 5 && - (r == 4 || - n || - (r == 6 && (o > 0 ? (s > 0 ? g / W(10, i - s) : 0) : h[T - 1]) % 10 & 1) || - r == (e.s < 0 ? 8 : 7)))), - t < 1 || !h[0]) - ) - return ( - (h.length = 0), - u ? ((t -= e.e + 1), (h[0] = W(10, (M - (t % M)) % M)), (e.e = -t || 0)) : (h[0] = e.e = 0), - e - ); - if ( - (o == 0 - ? ((h.length = T), (a = 1), T--) - : ((h.length = T + 1), (a = W(10, M - o)), (h[T] = s > 0 ? ((g / W(10, i - s)) % W(10, s) | 0) * a : 0)), - u) - ) - for (;;) - if (T == 0) { - for (o = 1, s = h[0]; s >= 10; s /= 10) o++; - for (s = h[0] += a, a = 1; s >= 10; s /= 10) a++; - o != a && (e.e++, h[0] == fe && (h[0] = 1)); - break; - } else { - if (((h[T] += a), h[T] != fe)) break; - ((h[T--] = 0), (a = 1)); - } - for (o = h.length; h[--o] === 0; ) h.pop(); - } - return (D && (e.e > k.maxE ? ((e.d = null), (e.e = NaN)) : e.e < k.minE && ((e.e = 0), (e.d = [0]))), e); -} -function Ee(e, t, r) { - if (!e.isFinite()) return go(e); - var n, - i = e.e, - o = Z(e.d), - s = o.length; - return ( - t - ? (r && (n = r - s) > 0 - ? (o = o.charAt(0) + '.' + o.slice(1) + qe(n)) - : s > 1 && (o = o.charAt(0) + '.' + o.slice(1)), - (o = o + (e.e < 0 ? 'e' : 'e+') + e.e)) - : i < 0 - ? ((o = '0.' + qe(-i - 1) + o), r && (n = r - s) > 0 && (o += qe(n))) - : i >= s - ? ((o += qe(i + 1 - s)), r && (n = r - i - 1) > 0 && (o = o + '.' + qe(n))) - : ((n = i + 1) < s && (o = o.slice(0, n) + '.' + o.slice(n)), - r && (n = r - s) > 0 && (i + 1 === s && (o += '.'), (o += qe(n)))), - o - ); -} -function wr(e, t) { - var r = e[0]; - for (t *= M; r >= 10; r /= 10) t++; - return t; -} -function hr(e, t, r) { - if (t > su) throw ((D = !0), r && (e.precision = r), Error(ao)); - return I(new e(mr), t, 1, !0); -} -function be(e, t, r) { - if (t > Rn) throw Error(ao); - return I(new e(gr), t, r, !0); -} -function po(e) { - var t = e.length - 1, - r = t * M + 1; - if (((t = e[t]), t)) { - for (; t % 10 == 0; t /= 10) r--; - for (t = e[0]; t >= 10; t /= 10) r++; - } - return r; -} -function qe(e) { - for (var t = ''; e--; ) t += '0'; - return t; -} -function fo(e, t, r, n) { - var i, - o = new e(1), - s = Math.ceil(n / M + 4); - for (D = !1; ; ) { - if ((r % 2 && ((o = o.times(t)), io(o.d, s) && (i = !0)), (r = re(r / 2)), r === 0)) { - ((r = o.d.length - 1), i && o.d[r] === 0 && ++o.d[r]); - break; - } - ((t = t.times(t)), io(t.d, s)); - } - return ((D = !0), o); -} -function no(e) { - return e.d[e.d.length - 1] & 1; -} -function mo(e, t, r) { - for (var n, i, o = new e(t[0]), s = 0; ++s < t.length; ) { - if (((i = new e(t[s])), !i.s)) { - o = i; - break; - } - ((n = o.cmp(i)), (n === r || (n === 0 && o.s === r)) && (o = i)); - } - return o; -} -function kn(e, t) { - var r, - n, - i, - o, - s, - a, - l, - u = 0, - g = 0, - h = 0, - T = e.constructor, - k = T.rounding, - A = T.precision; - if (!e.d || !e.d[0] || e.e > 17) - return new T(e.d ? (e.d[0] ? (e.s < 0 ? 0 : 1 / 0) : 1) : e.s ? (e.s < 0 ? 0 : e) : NaN); - for (t == null ? ((D = !1), (l = A)) : (l = t), a = new T(0.03125); e.e > -2; ) ((e = e.times(a)), (h += 5)); - for (n = ((Math.log(W(2, h)) / Math.LN10) * 2 + 5) | 0, l += n, r = o = s = new T(1), T.precision = l; ; ) { - if ( - ((o = I(o.times(e), l, 1)), - (r = r.times(++g)), - (a = s.plus(U(o, r, l, 1))), - Z(a.d).slice(0, l) === Z(s.d).slice(0, l)) - ) { - for (i = h; i--; ) s = I(s.times(s), l, 1); - if (t == null) - if (u < 3 && Nt(s.d, l - n, k, u)) ((T.precision = l += 10), (r = o = a = new T(1)), (g = 0), u++); - else return I(s, (T.precision = A), k, (D = !0)); - else return ((T.precision = A), s); - } - s = a; - } -} -function Be(e, t) { - var r, - n, - i, - o, - s, - a, - l, - u, - g, - h, - T, - k = 1, - A = 10, - S = e, - F = S.d, - _ = S.constructor, - L = _.rounding, - O = _.precision; - if (S.s < 0 || !F || !F[0] || (!S.e && F[0] == 1 && F.length == 1)) - return new _(F && !F[0] ? -1 / 0 : S.s != 1 ? NaN : F ? 0 : S); - if ( - (t == null ? ((D = !1), (g = O)) : (g = t), - (_.precision = g += A), - (r = Z(F)), - (n = r.charAt(0)), - Math.abs((o = S.e)) < 15e14) - ) { - for (; (n < 7 && n != 1) || (n == 1 && r.charAt(1) > 3); ) ((S = S.times(e)), (r = Z(S.d)), (n = r.charAt(0)), k++); - ((o = S.e), n > 1 ? ((S = new _('0.' + r)), o++) : (S = new _(n + '.' + r.slice(1)))); - } else - return ( - (u = hr(_, g + 2, O).times(o + '')), - (S = Be(new _(n + '.' + r.slice(1)), g - A).plus(u)), - (_.precision = O), - t == null ? I(S, O, L, (D = !0)) : S - ); - for (h = S, l = s = S = U(S.minus(1), S.plus(1), g, 1), T = I(S.times(S), g, 1), i = 3; ; ) { - if (((s = I(s.times(T), g, 1)), (u = l.plus(U(s, new _(i), g, 1))), Z(u.d).slice(0, g) === Z(l.d).slice(0, g))) - if ( - ((l = l.times(2)), - o !== 0 && (l = l.plus(hr(_, g + 2, O).times(o + ''))), - (l = U(l, new _(k), g, 1)), - t == null) - ) - if (Nt(l.d, g - A, L, a)) - ((_.precision = g += A), - (u = s = S = U(h.minus(1), h.plus(1), g, 1)), - (T = I(S.times(S), g, 1)), - (i = a = 1)); - else return I(l, (_.precision = O), L, (D = !0)); - else return ((_.precision = O), l); - ((l = u), (i += 2)); - } -} -function go(e) { - return String((e.s * e.s) / 0); -} -function fr(e, t) { - var r, n, i; - for ( - (r = t.indexOf('.')) > -1 && (t = t.replace('.', '')), - (n = t.search(/e/i)) > 0 - ? (r < 0 && (r = n), (r += +t.slice(n + 1)), (t = t.substring(0, n))) - : r < 0 && (r = t.length), - n = 0; - t.charCodeAt(n) === 48; - n++ - ); - for (i = t.length; t.charCodeAt(i - 1) === 48; --i); - if (((t = t.slice(n, i)), t)) { - if (((i -= n), (e.e = r = r - n - 1), (e.d = []), (n = (r + 1) % M), r < 0 && (n += M), n < i)) { - for (n && e.d.push(+t.slice(0, n)), i -= M; n < i; ) e.d.push(+t.slice(n, (n += M))); - ((t = t.slice(n)), (n = M - t.length)); - } else n -= i; - for (; n--; ) t += '0'; - (e.d.push(+t), - D && - (e.e > e.constructor.maxE - ? ((e.d = null), (e.e = NaN)) - : e.e < e.constructor.minE && ((e.e = 0), (e.d = [0])))); - } else ((e.e = 0), (e.d = [0])); - return e; -} -function lu(e, t) { - var r, n, i, o, s, a, l, u, g; - if (t.indexOf('_') > -1) { - if (((t = t.replace(/(\d)_(?=\d)/g, '$1')), co.test(t))) return fr(e, t); - } else if (t === 'Infinity' || t === 'NaN') return (+t || (e.s = NaN), (e.e = NaN), (e.d = null), e); - if (nu.test(t)) ((r = 16), (t = t.toLowerCase())); - else if (ru.test(t)) r = 2; - else if (iu.test(t)) r = 8; - else throw Error(je + t); - for ( - o = t.search(/p/i), - o > 0 ? ((l = +t.slice(o + 1)), (t = t.substring(2, o))) : (t = t.slice(2)), - o = t.indexOf('.'), - s = o >= 0, - n = e.constructor, - s && ((t = t.replace('.', '')), (a = t.length), (o = a - o), (i = fo(n, new n(r), o, o * 2))), - u = dr(t, r, fe), - g = u.length - 1, - o = g; - u[o] === 0; - --o - ) - u.pop(); - return o < 0 - ? new n(e.s * 0) - : ((e.e = wr(u, g)), - (e.d = u), - (D = !1), - s && (e = U(e, i, a * 4)), - l && (e = e.times(Math.abs(l) < 54 ? W(2, l) : Me.pow(2, l))), - (D = !0), - e); -} -function uu(e, t) { - var r, - n = t.d.length; - if (n < 3) return t.isZero() ? t : at(e, 2, t, t); - ((r = 1.4 * Math.sqrt(n)), (r = r > 16 ? 16 : r | 0), (t = t.times(1 / br(5, r))), (t = at(e, 2, t, t))); - for (var i, o = new e(5), s = new e(16), a = new e(20); r--; ) - ((i = t.times(t)), (t = t.times(o.plus(i.times(s.times(i).minus(a)))))); - return t; -} -function at(e, t, r, n, i) { - var o, - s, - a, - l, - u = 1, - g = e.precision, - h = Math.ceil(g / M); - for (D = !1, l = r.times(r), a = new e(n); ; ) { - if ( - ((s = U(a.times(l), new e(t++ * t++), g, 1)), - (a = i ? n.plus(s) : n.minus(s)), - (n = U(s.times(l), new e(t++ * t++), g, 1)), - (s = a.plus(n)), - s.d[h] !== void 0) - ) { - for (o = h; s.d[o] === a.d[o] && o--; ); - if (o == -1) break; - } - ((o = a), (a = n), (n = s), (s = o), u++); - } - return ((D = !0), (s.d.length = h + 1), s); -} -function br(e, t) { - for (var r = e; --t; ) r *= e; - return r; -} -function ho(e, t) { - var r, - n = t.s < 0, - i = be(e, e.precision, 1), - o = i.times(0.5); - if (((t = t.abs()), t.lte(o))) return ((Fe = n ? 4 : 1), t); - if (((r = t.divToInt(i)), r.isZero())) Fe = n ? 3 : 2; - else { - if (((t = t.minus(r.times(i))), t.lte(o))) return ((Fe = no(r) ? (n ? 2 : 3) : n ? 4 : 1), t); - Fe = no(r) ? (n ? 1 : 4) : n ? 3 : 2; - } - return t.minus(i).abs(); -} -function On(e, t, r, n) { - var i, - o, - s, - a, - l, - u, - g, - h, - T, - k = e.constructor, - A = r !== void 0; - if ( - (A ? (ae(r, 1, Ue), n === void 0 ? (n = k.rounding) : ae(n, 0, 8)) : ((r = k.precision), (n = k.rounding)), - !e.isFinite()) - ) - g = go(e); - else { - for ( - g = Ee(e), - s = g.indexOf('.'), - A ? ((i = 2), t == 16 ? (r = r * 4 - 3) : t == 8 && (r = r * 3 - 2)) : (i = t), - s >= 0 && - ((g = g.replace('.', '')), - (T = new k(1)), - (T.e = g.length - s), - (T.d = dr(Ee(T), 10, i)), - (T.e = T.d.length)), - h = dr(g, 10, i), - o = l = h.length; - h[--l] == 0; - - ) - h.pop(); - if (!h[0]) g = A ? '0p+0' : '0'; - else { - if ( - (s < 0 - ? o-- - : ((e = new k(e)), (e.d = h), (e.e = o), (e = U(e, T, r, n, 0, i)), (h = e.d), (o = e.e), (u = so)), - (s = h[r]), - (a = i / 2), - (u = u || h[r + 1] !== void 0), - (u = - n < 4 - ? (s !== void 0 || u) && (n === 0 || n === (e.s < 0 ? 3 : 2)) - : s > a || (s === a && (n === 4 || u || (n === 6 && h[r - 1] & 1) || n === (e.s < 0 ? 8 : 7)))), - (h.length = r), - u) - ) - for (; ++h[--r] > i - 1; ) ((h[r] = 0), r || (++o, h.unshift(1))); - for (l = h.length; !h[l - 1]; --l); - for (s = 0, g = ''; s < l; s++) g += An.charAt(h[s]); - if (A) { - if (l > 1) - if (t == 16 || t == 8) { - for (s = t == 16 ? 4 : 3, --l; l % s; l++) g += '0'; - for (h = dr(g, i, t), l = h.length; !h[l - 1]; --l); - for (s = 1, g = '1.'; s < l; s++) g += An.charAt(h[s]); - } else g = g.charAt(0) + '.' + g.slice(1); - g = g + (o < 0 ? 'p' : 'p+') + o; - } else if (o < 0) { - for (; ++o; ) g = '0' + g; - g = '0.' + g; - } else if (++o > l) for (o -= l; o--; ) g += '0'; - else o < l && (g = g.slice(0, o) + '.' + g.slice(o)); - } - g = (t == 16 ? '0x' : t == 2 ? '0b' : t == 8 ? '0o' : '') + g; - } - return e.s < 0 ? '-' + g : g; -} -function io(e, t) { - if (e.length > t) return ((e.length = t), !0); -} -function cu(e) { - return new this(e).abs(); -} -function pu(e) { - return new this(e).acos(); -} -function du(e) { - return new this(e).acosh(); -} -function fu(e, t) { - return new this(e).plus(t); -} -function mu(e) { - return new this(e).asin(); -} -function gu(e) { - return new this(e).asinh(); -} -function hu(e) { - return new this(e).atan(); -} -function yu(e) { - return new this(e).atanh(); -} -function wu(e, t) { - ((e = new this(e)), (t = new this(t))); - var r, - n = this.precision, - i = this.rounding, - o = n + 4; - return ( - !e.s || !t.s - ? (r = new this(NaN)) - : !e.d && !t.d - ? ((r = be(this, o, 1).times(t.s > 0 ? 0.25 : 0.75)), (r.s = e.s)) - : !t.d || e.isZero() - ? ((r = t.s < 0 ? be(this, n, i) : new this(0)), (r.s = e.s)) - : !e.d || t.isZero() - ? ((r = be(this, o, 1).times(0.5)), (r.s = e.s)) - : t.s < 0 - ? ((this.precision = o), - (this.rounding = 1), - (r = this.atan(U(e, t, o, 1))), - (t = be(this, o, 1)), - (this.precision = n), - (this.rounding = i), - (r = e.s < 0 ? r.minus(t) : r.plus(t))) - : (r = this.atan(U(e, t, o, 1))), - r - ); -} -function bu(e) { - return new this(e).cbrt(); -} -function Eu(e) { - return I((e = new this(e)), e.e + 1, 2); -} -function xu(e, t, r) { - return new this(e).clamp(t, r); -} -function Pu(e) { - if (!e || typeof e != 'object') throw Error(yr + 'Object expected'); - var t, - r, - n, - i = e.defaults === !0, - o = [ - 'precision', - 1, - Ue, - 'rounding', - 0, - 8, - 'toExpNeg', - -st, - 0, - 'toExpPos', - 0, - st, - 'maxE', - 0, - st, - 'minE', - -st, - 0, - 'modulo', - 0, - 9, - ]; - for (t = 0; t < o.length; t += 3) - if (((r = o[t]), i && (this[r] = Sn[r]), (n = e[r]) !== void 0)) - if (re(n) === n && n >= o[t + 1] && n <= o[t + 2]) this[r] = n; - else throw Error(je + r + ': ' + n); - if (((r = 'crypto'), i && (this[r] = Sn[r]), (n = e[r]) !== void 0)) - if (n === !0 || n === !1 || n === 0 || n === 1) - if (n) - if (typeof crypto < 'u' && crypto && (crypto.getRandomValues || crypto.randomBytes)) this[r] = !0; - else throw Error(lo); - else this[r] = !1; - else throw Error(je + r + ': ' + n); - return this; -} -function vu(e) { - return new this(e).cos(); -} -function Tu(e) { - return new this(e).cosh(); -} -function yo(e) { - var t, r, n; - function i(o) { - var s, - a, - l, - u = this; - if (!(u instanceof i)) return new i(o); - if (((u.constructor = i), oo(o))) { - ((u.s = o.s), - D - ? !o.d || o.e > i.maxE - ? ((u.e = NaN), (u.d = null)) - : o.e < i.minE - ? ((u.e = 0), (u.d = [0])) - : ((u.e = o.e), (u.d = o.d.slice())) - : ((u.e = o.e), (u.d = o.d ? o.d.slice() : o.d))); - return; - } - if (((l = typeof o), l === 'number')) { - if (o === 0) { - ((u.s = 1 / o < 0 ? -1 : 1), (u.e = 0), (u.d = [0])); - return; - } - if ((o < 0 ? ((o = -o), (u.s = -1)) : (u.s = 1), o === ~~o && o < 1e7)) { - for (s = 0, a = o; a >= 10; a /= 10) s++; - D - ? s > i.maxE - ? ((u.e = NaN), (u.d = null)) - : s < i.minE - ? ((u.e = 0), (u.d = [0])) - : ((u.e = s), (u.d = [o])) - : ((u.e = s), (u.d = [o])); - return; - } - if (o * 0 !== 0) { - (o || (u.s = NaN), (u.e = NaN), (u.d = null)); - return; - } - return fr(u, o.toString()); - } - if (l === 'string') - return ( - (a = o.charCodeAt(0)) === 45 ? ((o = o.slice(1)), (u.s = -1)) : (a === 43 && (o = o.slice(1)), (u.s = 1)), - co.test(o) ? fr(u, o) : lu(u, o) - ); - if (l === 'bigint') return (o < 0 ? ((o = -o), (u.s = -1)) : (u.s = 1), fr(u, o.toString())); - throw Error(je + o); - } - if ( - ((i.prototype = R), - (i.ROUND_UP = 0), - (i.ROUND_DOWN = 1), - (i.ROUND_CEIL = 2), - (i.ROUND_FLOOR = 3), - (i.ROUND_HALF_UP = 4), - (i.ROUND_HALF_DOWN = 5), - (i.ROUND_HALF_EVEN = 6), - (i.ROUND_HALF_CEIL = 7), - (i.ROUND_HALF_FLOOR = 8), - (i.EUCLID = 9), - (i.config = i.set = Pu), - (i.clone = yo), - (i.isDecimal = oo), - (i.abs = cu), - (i.acos = pu), - (i.acosh = du), - (i.add = fu), - (i.asin = mu), - (i.asinh = gu), - (i.atan = hu), - (i.atanh = yu), - (i.atan2 = wu), - (i.cbrt = bu), - (i.ceil = Eu), - (i.clamp = xu), - (i.cos = vu), - (i.cosh = Tu), - (i.div = Cu), - (i.exp = Au), - (i.floor = Su), - (i.hypot = Ru), - (i.ln = ku), - (i.log = Ou), - (i.log10 = Fu), - (i.log2 = Iu), - (i.max = Mu), - (i.min = _u), - (i.mod = Du), - (i.mul = Lu), - (i.pow = Nu), - (i.random = qu), - (i.round = Bu), - (i.sign = ju), - (i.sin = Uu), - (i.sinh = $u), - (i.sqrt = Vu), - (i.sub = Qu), - (i.sum = Ju), - (i.tan = Gu), - (i.tanh = Wu), - (i.trunc = Ku), - e === void 0 && (e = {}), - e && e.defaults !== !0) - ) - for ( - n = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'maxE', 'minE', 'modulo', 'crypto'], t = 0; - t < n.length; - - ) - e.hasOwnProperty((r = n[t++])) || (e[r] = this[r]); - return (i.config(e), i); -} -function Cu(e, t) { - return new this(e).div(t); -} -function Au(e) { - return new this(e).exp(); -} -function Su(e) { - return I((e = new this(e)), e.e + 1, 3); -} -function Ru() { - var e, - t, - r = new this(0); - for (D = !1, e = 0; e < arguments.length; ) - if (((t = new this(arguments[e++])), t.d)) r.d && (r = r.plus(t.times(t))); - else { - if (t.s) return ((D = !0), new this(1 / 0)); - r = t; - } - return ((D = !0), r.sqrt()); -} -function oo(e) { - return e instanceof Me || (e && e.toStringTag === uo) || !1; -} -function ku(e) { - return new this(e).ln(); -} -function Ou(e, t) { - return new this(e).log(t); -} -function Iu(e) { - return new this(e).log(2); -} -function Fu(e) { - return new this(e).log(10); -} -function Mu() { - return mo(this, arguments, -1); -} -function _u() { - return mo(this, arguments, 1); -} -function Du(e, t) { - return new this(e).mod(t); -} -function Lu(e, t) { - return new this(e).mul(t); -} -function Nu(e, t) { - return new this(e).pow(t); -} -function qu(e) { - var t, - r, - n, - i, - o = 0, - s = new this(1), - a = []; - if ((e === void 0 ? (e = this.precision) : ae(e, 1, Ue), (n = Math.ceil(e / M)), this.crypto)) - if (crypto.getRandomValues) - for (t = crypto.getRandomValues(new Uint32Array(n)); o < n; ) - ((i = t[o]), i >= 429e7 ? (t[o] = crypto.getRandomValues(new Uint32Array(1))[0]) : (a[o++] = i % 1e7)); - else if (crypto.randomBytes) { - for (t = crypto.randomBytes((n *= 4)); o < n; ) - ((i = t[o] + (t[o + 1] << 8) + (t[o + 2] << 16) + ((t[o + 3] & 127) << 24)), - i >= 214e7 ? crypto.randomBytes(4).copy(t, o) : (a.push(i % 1e7), (o += 4))); - o = n / 4; - } else throw Error(lo); - else for (; o < n; ) a[o++] = (Math.random() * 1e7) | 0; - for (n = a[--o], e %= M, n && e && ((i = W(10, M - e)), (a[o] = ((n / i) | 0) * i)); a[o] === 0; o--) a.pop(); - if (o < 0) ((r = 0), (a = [0])); - else { - for (r = -1; a[0] === 0; r -= M) a.shift(); - for (n = 1, i = a[0]; i >= 10; i /= 10) n++; - n < M && (r -= M - n); - } - return ((s.e = r), (s.d = a), s); -} -function Bu(e) { - return I((e = new this(e)), e.e + 1, this.rounding); -} -function ju(e) { - return ((e = new this(e)), e.d ? (e.d[0] ? e.s : 0 * e.s) : e.s || NaN); -} -function Uu(e) { - return new this(e).sin(); -} -function $u(e) { - return new this(e).sinh(); -} -function Vu(e) { - return new this(e).sqrt(); -} -function Qu(e, t) { - return new this(e).sub(t); -} -function Ju() { - var e = 0, - t = arguments, - r = new this(t[e]); - for (D = !1; r.s && ++e < t.length; ) r = r.plus(t[e]); - return ((D = !0), I(r, this.precision, this.rounding)); -} -function Gu(e) { - return new this(e).tan(); -} -function Wu(e) { - return new this(e).tanh(); -} -function Ku(e) { - return I((e = new this(e)), e.e + 1, 1); -} -R[Symbol.for('nodejs.util.inspect.custom')] = R.toString; -R[Symbol.toStringTag] = 'Decimal'; -var Me = (R.constructor = yo(Sn)); -mr = new Me(mr); -gr = new Me(gr); -var _e = Me; -function lt(e) { - return Me.isDecimal(e) - ? !0 - : e !== null && - typeof e == 'object' && - typeof e.s == 'number' && - typeof e.e == 'number' && - typeof e.toFixed == 'function' && - Array.isArray(e.d); -} -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -var qt = {}; -Xe(qt, { ModelAction: () => ut, datamodelEnumToSchemaEnum: () => zu }); -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -function zu(e) { - return { name: e.name, values: e.values.map((t) => t.name) }; -} -m(); -c(); -p(); -d(); -f(); -var ut = ((O) => ( - (O.findUnique = 'findUnique'), - (O.findUniqueOrThrow = 'findUniqueOrThrow'), - (O.findFirst = 'findFirst'), - (O.findFirstOrThrow = 'findFirstOrThrow'), - (O.findMany = 'findMany'), - (O.create = 'create'), - (O.createMany = 'createMany'), - (O.createManyAndReturn = 'createManyAndReturn'), - (O.update = 'update'), - (O.updateMany = 'updateMany'), - (O.updateManyAndReturn = 'updateManyAndReturn'), - (O.upsert = 'upsert'), - (O.delete = 'delete'), - (O.deleteMany = 'deleteMany'), - (O.groupBy = 'groupBy'), - (O.count = 'count'), - (O.aggregate = 'aggregate'), - (O.findRaw = 'findRaw'), - (O.aggregateRaw = 'aggregateRaw'), - O -))(ut || {}); -var xo = Se(Wi()); -m(); -c(); -p(); -d(); -f(); -dn(); -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -var wo = { - keyword: ke, - entity: ke, - value: (e) => de(We(e)), - punctuation: We, - directive: ke, - function: ke, - variable: (e) => de(We(e)), - string: (e) => de(Rt(e)), - boolean: kt, - number: ke, - comment: Ot, -}; -var Hu = (e) => e, - Er = {}, - Yu = 0, - N = { - manual: Er.Prism && Er.Prism.manual, - disableWorkerMessageHandler: Er.Prism && Er.Prism.disableWorkerMessageHandler, - util: { - encode: function (e) { - if (e instanceof me) { - let t = e; - return new me(t.type, N.util.encode(t.content), t.alias); - } else - return Array.isArray(e) - ? e.map(N.util.encode) - : e - .replace(/&/g, '&') - .replace(/ e.length) return; - if (Ce instanceof me) continue; - if (Y && J != t.length - 1) { - L.lastIndex = ie; - var h = L.exec(e); - if (!h) break; - var g = h.index + (q ? h[1].length : 0), - T = h.index + h[0].length, - a = J, - l = ie; - for (let j = t.length; a < j && (l < T || (!t[a].type && !t[a - 1].greedy)); ++a) - ((l += t[a].length), g >= l && (++J, (ie = l))); - if (t[J] instanceof me) continue; - ((u = a - J), (Ce = e.slice(ie, l)), (h.index -= ie)); - } else { - L.lastIndex = 0; - var h = L.exec(Ce), - u = 1; - } - if (!h) { - if (o) break; - continue; - } - q && ($ = h[1] ? h[1].length : 0); - var g = h.index + $, - h = h[0].slice($), - T = g + h.length, - k = Ce.slice(0, g), - A = Ce.slice(T); - let X = [J, u]; - k && (++J, (ie += k.length), X.push(k)); - let Ze = new me(S, O ? N.tokenize(h, O) : h, Tt, h, Y); - if ( - (X.push(Ze), - A && X.push(A), - Array.prototype.splice.apply(t, X), - u != 1 && N.matchGrammar(e, t, r, J, ie, !0, S), - o) - ) - break; - } - } - } - }, - tokenize: function (e, t) { - let r = [e], - n = t.rest; - if (n) { - for (let i in n) t[i] = n[i]; - delete t.rest; - } - return (N.matchGrammar(e, r, t, 0, 0, !1), r); - }, - hooks: { - all: {}, - add: function (e, t) { - let r = N.hooks.all; - ((r[e] = r[e] || []), r[e].push(t)); - }, - run: function (e, t) { - let r = N.hooks.all[e]; - if (!(!r || !r.length)) for (var n = 0, i; (i = r[n++]); ) i(t); - }, - }, - Token: me, - }; -N.languages.clike = { - comment: [ - { pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0 }, - { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }, - ], - string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: !0 }, - 'class-name': { - pattern: /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i, - lookbehind: !0, - inside: { punctuation: /[.\\]/ }, - }, - keyword: /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/, - boolean: /\b(?:true|false)\b/, - function: /\w+(?=\()/, - number: /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i, - operator: /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/, - punctuation: /[{}[\];(),.:]/, -}; -N.languages.javascript = N.languages.extend('clike', { - 'class-name': [ - N.languages.clike['class-name'], - { - pattern: /(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/, - lookbehind: !0, - }, - ], - keyword: [ - { pattern: /((?:^|})\s*)(?:catch|finally)\b/, lookbehind: !0 }, - { - pattern: - /(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, - lookbehind: !0, - }, - ], - number: - /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/, - function: /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, - operator: /-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/, -}); -N.languages.javascript['class-name'][0].pattern = - /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/; -N.languages.insertBefore('javascript', 'keyword', { - regex: { - pattern: - /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/, - lookbehind: !0, - greedy: !0, - }, - 'function-variable': { - pattern: - /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/, - alias: 'function', - }, - parameter: [ - { - pattern: /(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/, - lookbehind: !0, - inside: N.languages.javascript, - }, - { pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i, inside: N.languages.javascript }, - { pattern: /(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/, lookbehind: !0, inside: N.languages.javascript }, - { - pattern: - /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/, - lookbehind: !0, - inside: N.languages.javascript, - }, - ], - constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/, -}); -N.languages.markup && N.languages.markup.tag.addInlined('script', 'javascript'); -N.languages.js = N.languages.javascript; -N.languages.typescript = N.languages.extend('javascript', { - keyword: - /\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/, - builtin: /\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/, -}); -N.languages.ts = N.languages.typescript; -function me(e, t, r, n, i) { - ((this.type = e), (this.content = t), (this.alias = r), (this.length = (n || '').length | 0), (this.greedy = !!i)); -} -me.stringify = function (e, t) { - return typeof e == 'string' - ? e - : Array.isArray(e) - ? e - .map(function (r) { - return me.stringify(r, t); - }) - .join('') - : Zu(e.type)(e.content); -}; -function Zu(e) { - return wo[e] || Hu; -} -function bo(e) { - return Xu(e, N.languages.javascript); -} -function Xu(e, t) { - return N.tokenize(e, t) - .map((n) => me.stringify(n)) - .join(''); -} -m(); -c(); -p(); -d(); -f(); -function Eo(e) { - return wn(e); -} -var xr = class e { - firstLineNumber; - lines; - static read(t) { - let r; - try { - r = or.readFileSync(t, 'utf-8'); - } catch { - return null; - } - return e.fromContent(r); - } - static fromContent(t) { - let r = t.split(/\r?\n/); - return new e(1, r); - } - constructor(t, r) { - ((this.firstLineNumber = t), (this.lines = r)); - } - get lastLineNumber() { - return this.firstLineNumber + this.lines.length - 1; - } - mapLineAt(t, r) { - if (t < this.firstLineNumber || t > this.lines.length + this.firstLineNumber) return this; - let n = t - this.firstLineNumber, - i = [...this.lines]; - return ((i[n] = r(i[n])), new e(this.firstLineNumber, i)); - } - mapLines(t) { - return new e( - this.firstLineNumber, - this.lines.map((r, n) => t(r, this.firstLineNumber + n)) - ); - } - lineAt(t) { - return this.lines[t - this.firstLineNumber]; - } - prependSymbolAt(t, r) { - return this.mapLines((n, i) => (i === t ? `${r} ${n}` : ` ${n}`)); - } - slice(t, r) { - let n = this.lines.slice(t - 1, r).join(` -`); - return new e( - t, - Eo(n).split(` -`) - ); - } - highlight() { - let t = bo(this.toString()); - return new e( - this.firstLineNumber, - t.split(` -`) - ); - } - toString() { - return this.lines.join(` -`); - } -}; -var ec = { red: Ge, gray: Ot, dim: At, bold: de, underline: St, highlightSource: (e) => e.highlight() }, - tc = { red: (e) => e, gray: (e) => e, dim: (e) => e, bold: (e) => e, underline: (e) => e, highlightSource: (e) => e }; -function rc({ message: e, originalMethod: t, isPanic: r, callArguments: n }) { - return { functionName: `prisma.${t}()`, message: e, isPanic: r ?? !1, callArguments: n }; -} -function nc({ callsite: e, message: t, originalMethod: r, isPanic: n, callArguments: i }, o) { - let s = rc({ message: t, originalMethod: r, isPanic: n, callArguments: i }); - if (!e || typeof window < 'u' || y.env.NODE_ENV === 'production') return s; - let a = e.getLocation(); - if (!a || !a.lineNumber || !a.columnNumber) return s; - let l = Math.max(1, a.lineNumber - 3), - u = xr.read(a.fileName)?.slice(l, a.lineNumber), - g = u?.lineAt(a.lineNumber); - if (u && g) { - let h = oc(g), - T = ic(g); - if (!T) return s; - ((s.functionName = `${T.code})`), - (s.location = a), - n || (u = u.mapLineAt(a.lineNumber, (A) => A.slice(0, T.openingBraceIndex))), - (u = o.highlightSource(u))); - let k = String(u.lastLineNumber).length; - if ( - ((s.contextLines = u - .mapLines((A, S) => o.gray(String(S).padStart(k)) + ' ' + A) - .mapLines((A) => o.dim(A)) - .prependSymbolAt(a.lineNumber, o.bold(o.red('\u2192')))), - i) - ) { - let A = h + k + 1; - ((A += 2), (s.callArguments = (0, xo.default)(i, A).slice(A))); - } - } - return s; -} -function ic(e) { - let t = Object.keys(ut).join('|'), - n = new RegExp(String.raw`\.(${t})\(`).exec(e); - if (n) { - let i = n.index + n[0].length, - o = e.lastIndexOf(' ', n.index) + 1; - return { code: e.slice(o, i), openingBraceIndex: i }; - } - return null; -} -function oc(e) { - let t = 0; - for (let r = 0; r < e.length; r++) { - if (e.charAt(r) !== ' ') return t; - t++; - } - return t; -} -function sc({ functionName: e, location: t, message: r, isPanic: n, contextLines: i, callArguments: o }, s) { - let a = [''], - l = t ? ' in' : ':'; - if ( - (n - ? (a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold('on us')}, you did nothing wrong.`)), - a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${l}`))) - : a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${l}`)), - t && a.push(s.underline(ac(t))), - i) - ) { - a.push(''); - let u = [i.toString()]; - (o && (u.push(o), u.push(s.dim(')'))), a.push(u.join('')), o && a.push('')); - } else (a.push(''), o && a.push(o), a.push('')); - return ( - a.push(r), - a.join(` -`) - ); -} -function ac(e) { - let t = [e.fileName]; - return (e.lineNumber && t.push(String(e.lineNumber)), e.columnNumber && t.push(String(e.columnNumber)), t.join(':')); -} -function Pr(e) { - let t = e.showColors ? ec : tc, - r; - return ((r = nc(e, t)), sc(r, t)); -} -m(); -c(); -p(); -d(); -f(); -var Oo = Se(In()); -m(); -c(); -p(); -d(); -f(); -function Co(e, t, r) { - let n = Ao(e), - i = lc(n), - o = cc(i); - o ? vr(o, t, r) : t.addErrorMessage(() => 'Unknown error'); -} -function Ao(e) { - return e.errors.flatMap((t) => (t.kind === 'Union' ? Ao(t) : [t])); -} -function lc(e) { - let t = new Map(), - r = []; - for (let n of e) { - if (n.kind !== 'InvalidArgumentType') { - r.push(n); - continue; - } - let i = `${n.selectionPath.join('.')}:${n.argumentPath.join('.')}`, - o = t.get(i); - o - ? t.set(i, { ...n, argument: { ...n.argument, typeNames: uc(o.argument.typeNames, n.argument.typeNames) } }) - : t.set(i, n); - } - return (r.push(...t.values()), r); -} -function uc(e, t) { - return [...new Set(e.concat(t))]; -} -function cc(e) { - return Tn(e, (t, r) => { - let n = vo(t), - i = vo(r); - return n !== i ? n - i : To(t) - To(r); - }); -} -function vo(e) { - let t = 0; - return ( - Array.isArray(e.selectionPath) && (t += e.selectionPath.length), - Array.isArray(e.argumentPath) && (t += e.argumentPath.length), - t - ); -} -function To(e) { - switch (e.kind) { - case 'InvalidArgumentValue': - case 'ValueTooLarge': - return 20; - case 'InvalidArgumentType': - return 10; - case 'RequiredArgumentMissing': - return -10; - default: - return 0; - } -} -m(); -c(); -p(); -d(); -f(); -var pe = class { - constructor(t, r) { - this.name = t; - this.value = r; - } - isRequired = !1; - makeRequired() { - return ((this.isRequired = !0), this); - } - write(t) { - let { - colors: { green: r }, - } = t.context; - (t.addMarginSymbol(r(this.isRequired ? '+' : '?')), - t.write(r(this.name)), - this.isRequired || t.write(r('?')), - t.write(r(': ')), - typeof this.value == 'string' ? t.write(r(this.value)) : t.write(this.value)); - } -}; -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -Ro(); -m(); -c(); -p(); -d(); -f(); -var ct = class { - constructor(t = 0, r) { - this.context = r; - this.currentIndent = t; - } - lines = []; - currentLine = ''; - currentIndent = 0; - marginSymbol; - afterNextNewLineCallback; - write(t) { - return (typeof t == 'string' ? (this.currentLine += t) : t.write(this), this); - } - writeJoined(t, r, n = (i, o) => o.write(i)) { - let i = r.length - 1; - for (let o = 0; o < r.length; o++) (n(r[o], this), o !== i && this.write(t)); - return this; - } - writeLine(t) { - return this.write(t).newLine(); - } - newLine() { - (this.lines.push(this.indentedCurrentLine()), (this.currentLine = ''), (this.marginSymbol = void 0)); - let t = this.afterNextNewLineCallback; - return ((this.afterNextNewLineCallback = void 0), t?.(), this); - } - withIndent(t) { - return (this.indent(), t(this), this.unindent(), this); - } - afterNextNewline(t) { - return ((this.afterNextNewLineCallback = t), this); - } - indent() { - return (this.currentIndent++, this); - } - unindent() { - return (this.currentIndent > 0 && this.currentIndent--, this); - } - addMarginSymbol(t) { - return ((this.marginSymbol = t), this); - } - toString() { - return this.lines.concat(this.indentedCurrentLine()).join(` -`); - } - getCurrentLineLength() { - return this.currentLine.length; - } - indentedCurrentLine() { - let t = this.currentLine.padStart(this.currentLine.length + 2 * this.currentIndent); - return this.marginSymbol ? this.marginSymbol + t.slice(1) : t; - } -}; -So(); -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -var Tr = class { - constructor(t) { - this.value = t; - } - write(t) { - t.write(this.value); - } - markAsError() { - this.value.markAsError(); - } -}; -m(); -c(); -p(); -d(); -f(); -var Cr = (e) => e, - Ar = { bold: Cr, red: Cr, green: Cr, dim: Cr, enabled: !1 }, - ko = { bold: de, red: Ge, green: Rt, dim: At, enabled: !0 }, - pt = { - write(e) { - e.writeLine(','); - }, - }; -m(); -c(); -p(); -d(); -f(); -var xe = class { - constructor(t) { - this.contents = t; - } - isUnderlined = !1; - color = (t) => t; - underline() { - return ((this.isUnderlined = !0), this); - } - setColor(t) { - return ((this.color = t), this); - } - write(t) { - let r = t.getCurrentLineLength(); - (t.write(this.color(this.contents)), - this.isUnderlined && - t.afterNextNewline(() => { - t.write(' '.repeat(r)).writeLine(this.color('~'.repeat(this.contents.length))); - })); - } -}; -m(); -c(); -p(); -d(); -f(); -var $e = class { - hasError = !1; - markAsError() { - return ((this.hasError = !0), this); - } -}; -var dt = class extends $e { - items = []; - addItem(t) { - return (this.items.push(new Tr(t)), this); - } - getField(t) { - return this.items[t]; - } - getPrintWidth() { - return this.items.length === 0 ? 2 : Math.max(...this.items.map((r) => r.value.getPrintWidth())) + 2; - } - write(t) { - if (this.items.length === 0) { - this.writeEmpty(t); - return; - } - this.writeWithItems(t); - } - writeEmpty(t) { - let r = new xe('[]'); - (this.hasError && r.setColor(t.context.colors.red).underline(), t.write(r)); - } - writeWithItems(t) { - let { colors: r } = t.context; - (t - .writeLine('[') - .withIndent(() => t.writeJoined(pt, this.items).newLine()) - .write(']'), - this.hasError && - t.afterNextNewline(() => { - t.writeLine(r.red('~'.repeat(this.getPrintWidth()))); - })); - } - asObject() {} -}; -var ft = class e extends $e { - fields = {}; - suggestions = []; - addField(t) { - this.fields[t.name] = t; - } - addSuggestion(t) { - this.suggestions.push(t); - } - getField(t) { - return this.fields[t]; - } - getDeepField(t) { - let [r, ...n] = t, - i = this.getField(r); - if (!i) return; - let o = i; - for (let s of n) { - let a; - if ( - (o.value instanceof e ? (a = o.value.getField(s)) : o.value instanceof dt && (a = o.value.getField(Number(s))), - !a) - ) - return; - o = a; - } - return o; - } - getDeepFieldValue(t) { - return t.length === 0 ? this : this.getDeepField(t)?.value; - } - hasField(t) { - return !!this.getField(t); - } - removeAllFields() { - this.fields = {}; - } - removeField(t) { - delete this.fields[t]; - } - getFields() { - return this.fields; - } - isEmpty() { - return Object.keys(this.fields).length === 0; - } - getFieldValue(t) { - return this.getField(t)?.value; - } - getDeepSubSelectionValue(t) { - let r = this; - for (let n of t) { - if (!(r instanceof e)) return; - let i = r.getSubSelectionValue(n); - if (!i) return; - r = i; - } - return r; - } - getDeepSelectionParent(t) { - let r = this.getSelectionParent(); - if (!r) return; - let n = r; - for (let i of t) { - let o = n.value.getFieldValue(i); - if (!o || !(o instanceof e)) return; - let s = o.getSelectionParent(); - if (!s) return; - n = s; - } - return n; - } - getSelectionParent() { - let t = this.getField('select')?.value.asObject(); - if (t) return { kind: 'select', value: t }; - let r = this.getField('include')?.value.asObject(); - if (r) return { kind: 'include', value: r }; - } - getSubSelectionValue(t) { - return this.getSelectionParent()?.value.fields[t].value; - } - getPrintWidth() { - let t = Object.values(this.fields); - return t.length == 0 ? 2 : Math.max(...t.map((n) => n.getPrintWidth())) + 2; - } - write(t) { - let r = Object.values(this.fields); - if (r.length === 0 && this.suggestions.length === 0) { - this.writeEmpty(t); - return; - } - this.writeWithContents(t, r); - } - asObject() { - return this; - } - writeEmpty(t) { - let r = new xe('{}'); - (this.hasError && r.setColor(t.context.colors.red).underline(), t.write(r)); - } - writeWithContents(t, r) { - (t.writeLine('{').withIndent(() => { - t.writeJoined(pt, [...r, ...this.suggestions]).newLine(); - }), - t.write('}'), - this.hasError && - t.afterNextNewline(() => { - t.writeLine(t.context.colors.red('~'.repeat(this.getPrintWidth()))); - })); - } -}; -m(); -c(); -p(); -d(); -f(); -var H = class extends $e { - constructor(r) { - super(); - this.text = r; - } - getPrintWidth() { - return this.text.length; - } - write(r) { - let n = new xe(this.text); - (this.hasError && n.underline().setColor(r.context.colors.red), r.write(n)); - } - asObject() {} -}; -m(); -c(); -p(); -d(); -f(); -var Bt = class { - fields = []; - addField(t, r) { - return ( - this.fields.push({ - write(n) { - let { green: i, dim: o } = n.context.colors; - n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o('+'))); - }, - }), - this - ); - } - write(t) { - let { - colors: { green: r }, - } = t.context; - t.writeLine(r('{')) - .withIndent(() => { - t.writeJoined(pt, this.fields).newLine(); - }) - .write(r('}')) - .addMarginSymbol(r('+')); - } -}; -function vr(e, t, r) { - switch (e.kind) { - case 'MutuallyExclusiveFields': - pc(e, t); - break; - case 'IncludeOnScalar': - dc(e, t); - break; - case 'EmptySelection': - fc(e, t, r); - break; - case 'UnknownSelectionField': - yc(e, t); - break; - case 'InvalidSelectionValue': - wc(e, t); - break; - case 'UnknownArgument': - bc(e, t); - break; - case 'UnknownInputField': - Ec(e, t); - break; - case 'RequiredArgumentMissing': - xc(e, t); - break; - case 'InvalidArgumentType': - Pc(e, t); - break; - case 'InvalidArgumentValue': - vc(e, t); - break; - case 'ValueTooLarge': - Tc(e, t); - break; - case 'SomeFieldsMissing': - Cc(e, t); - break; - case 'TooManyFieldsGiven': - Ac(e, t); - break; - case 'Union': - Co(e, t, r); - break; - default: - throw new Error('not implemented: ' + e.kind); - } -} -function pc(e, t) { - let r = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - (r && (r.getField(e.firstField)?.markAsError(), r.getField(e.secondField)?.markAsError()), - t.addErrorMessage( - (n) => - `Please ${n.bold('either')} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red('not both')} at the same time.` - )); -} -function dc(e, t) { - let [r, n] = mt(e.selectionPath), - i = e.outputType, - o = t.arguments.getDeepSelectionParent(r)?.value; - if (o && (o.getField(n)?.markAsError(), i)) - for (let s of i.fields) s.isRelation && o.addSuggestion(new pe(s.name, 'true')); - t.addErrorMessage((s) => { - let a = `Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold('include')} statement`; - return ( - i ? (a += ` on model ${s.bold(i.name)}. ${jt(s)}`) : (a += '.'), - (a += ` -Note that ${s.bold('include')} statements only accept relation fields.`), - a - ); - }); -} -function fc(e, t, r) { - let n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - if (n) { - let i = n.getField('omit')?.value.asObject(); - if (i) { - mc(e, t, i); - return; - } - if (n.hasField('select')) { - gc(e, t); - return; - } - } - if (r?.[Ne(e.outputType.name)]) { - hc(e, t); - return; - } - t.addErrorMessage(() => `Unknown field at "${e.selectionPath.join('.')} selection"`); -} -function mc(e, t, r) { - r.removeAllFields(); - for (let n of e.outputType.fields) r.addSuggestion(new pe(n.name, 'false')); - t.addErrorMessage( - (n) => - `The ${n.red('omit')} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result` - ); -} -function gc(e, t) { - let r = e.outputType, - n = t.arguments.getDeepSelectionParent(e.selectionPath)?.value, - i = n?.isEmpty() ?? !1; - (n && (n.removeAllFields(), Mo(n, r)), - t.addErrorMessage((o) => - i - ? `The ${o.red('`select`')} statement for type ${o.bold(r.name)} must not be empty. ${jt(o)}` - : `The ${o.red('`select`')} statement for type ${o.bold(r.name)} needs ${o.bold('at least one truthy value')}.` - )); -} -function hc(e, t) { - let r = new Bt(); - for (let i of e.outputType.fields) i.isRelation || r.addField(i.name, 'false'); - let n = new pe('omit', r).makeRequired(); - if (e.selectionPath.length === 0) t.arguments.addSuggestion(n); - else { - let [i, o] = mt(e.selectionPath), - a = t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o); - if (a) { - let l = a?.value.asObject() ?? new ft(); - (l.addSuggestion(n), (a.value = l)); - } - } - t.addErrorMessage( - (i) => - `The global ${i.red('omit')} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result` - ); -} -function yc(e, t) { - let r = _o(e.selectionPath, t); - if (r.parentKind !== 'unknown') { - r.field.markAsError(); - let n = r.parent; - switch (r.parentKind) { - case 'select': - Mo(n, e.outputType); - break; - case 'include': - Sc(n, e.outputType); - break; - case 'omit': - Rc(n, e.outputType); - break; - } - } - t.addErrorMessage((n) => { - let i = [`Unknown field ${n.red(`\`${r.fieldName}\``)}`]; - return ( - r.parentKind !== 'unknown' && i.push(`for ${n.bold(r.parentKind)} statement`), - i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`), - i.push(jt(n)), - i.join(' ') - ); - }); -} -function wc(e, t) { - let r = _o(e.selectionPath, t); - (r.parentKind !== 'unknown' && r.field.value.markAsError(), - t.addErrorMessage((n) => `Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)); -} -function bc(e, t) { - let r = e.argumentPath[0], - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - (n && (n.getField(r)?.markAsError(), kc(n, e.arguments)), - t.addErrorMessage((i) => - Io( - i, - r, - e.arguments.map((o) => o.name) - ) - )); -} -function Ec(e, t) { - let [r, n] = mt(e.argumentPath), - i = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - if (i) { - i.getDeepField(e.argumentPath)?.markAsError(); - let o = i.getDeepFieldValue(r)?.asObject(); - o && Do(o, e.inputType); - } - t.addErrorMessage((o) => - Io( - o, - n, - e.inputType.fields.map((s) => s.name) - ) - ); -} -function Io(e, t, r) { - let n = [`Unknown argument \`${e.red(t)}\`.`], - i = Ic(t, r); - return (i && n.push(`Did you mean \`${e.green(i)}\`?`), r.length > 0 && n.push(jt(e)), n.join(' ')); -} -function xc(e, t) { - let r; - t.addErrorMessage((l) => - r?.value instanceof H && r.value.text === 'null' - ? `Argument \`${l.green(o)}\` must not be ${l.red('null')}.` - : `Argument \`${l.green(o)}\` is missing.` - ); - let n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - if (!n) return; - let [i, o] = mt(e.argumentPath), - s = new Bt(), - a = n.getDeepFieldValue(i)?.asObject(); - if (a) { - if (((r = a.getField(o)), r && a.removeField(o), e.inputTypes.length === 1 && e.inputTypes[0].kind === 'object')) { - for (let l of e.inputTypes[0].fields) s.addField(l.name, l.typeNames.join(' | ')); - a.addSuggestion(new pe(o, s).makeRequired()); - } else { - let l = e.inputTypes.map(Fo).join(' | '); - a.addSuggestion(new pe(o, l).makeRequired()); - } - if (e.dependentArgumentPath) { - n.getDeepField(e.dependentArgumentPath)?.markAsError(); - let [, l] = mt(e.dependentArgumentPath); - t.addErrorMessage( - (u) => `Argument \`${u.green(o)}\` is required because argument \`${u.green(l)}\` was provided.` - ); - } - } -} -function Fo(e) { - return e.kind === 'list' ? `${Fo(e.elementType)}[]` : e.name; -} -function Pc(e, t) { - let r = e.argument.name, - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - (n && n.getDeepFieldValue(e.argumentPath)?.markAsError(), - t.addErrorMessage((i) => { - let o = Sr( - 'or', - e.argument.typeNames.map((s) => i.green(s)) - ); - return `Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`; - })); -} -function vc(e, t) { - let r = e.argument.name, - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - (n && n.getDeepFieldValue(e.argumentPath)?.markAsError(), - t.addErrorMessage((i) => { - let o = [`Invalid value for argument \`${i.bold(r)}\``]; - if ((e.underlyingError && o.push(`: ${e.underlyingError}`), o.push('.'), e.argument.typeNames.length > 0)) { - let s = Sr( - 'or', - e.argument.typeNames.map((a) => i.green(a)) - ); - o.push(` Expected ${s}.`); - } - return o.join(''); - })); -} -function Tc(e, t) { - let r = e.argument.name, - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(), - i; - if (n) { - let s = n.getDeepField(e.argumentPath)?.value; - (s?.markAsError(), s instanceof H && (i = s.text)); - } - t.addErrorMessage((o) => { - let s = ['Unable to fit value']; - return (i && s.push(o.red(i)), s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``), s.join(' ')); - }); -} -function Cc(e, t) { - let r = e.argumentPath[e.argumentPath.length - 1], - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - if (n) { - let i = n.getDeepFieldValue(e.argumentPath)?.asObject(); - i && Do(i, e.inputType); - } - t.addErrorMessage((i) => { - let o = [`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`]; - return ( - e.constraints.minFieldCount === 1 - ? e.constraints.requiredFields - ? o.push( - `${i.green('at least one of')} ${Sr( - 'or', - e.constraints.requiredFields.map((s) => `\`${i.bold(s)}\``) - )} arguments.` - ) - : o.push(`${i.green('at least one')} argument.`) - : o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`), - o.push(jt(i)), - o.join(' ') - ); - }); -} -function Ac(e, t) { - let r = e.argumentPath[e.argumentPath.length - 1], - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(), - i = []; - if (n) { - let o = n.getDeepFieldValue(e.argumentPath)?.asObject(); - o && (o.markAsError(), (i = Object.keys(o.getFields()))); - } - t.addErrorMessage((o) => { - let s = [`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`]; - return ( - e.constraints.minFieldCount === 1 && e.constraints.maxFieldCount == 1 - ? s.push(`${o.green('exactly one')} argument,`) - : e.constraints.maxFieldCount == 1 - ? s.push(`${o.green('at most one')} argument,`) - : s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`), - s.push( - `but you provided ${Sr( - 'and', - i.map((a) => o.red(a)) - )}. Please choose` - ), - e.constraints.maxFieldCount === 1 ? s.push('one.') : s.push(`${e.constraints.maxFieldCount}.`), - s.join(' ') - ); - }); -} -function Mo(e, t) { - for (let r of t.fields) e.hasField(r.name) || e.addSuggestion(new pe(r.name, 'true')); -} -function Sc(e, t) { - for (let r of t.fields) r.isRelation && !e.hasField(r.name) && e.addSuggestion(new pe(r.name, 'true')); -} -function Rc(e, t) { - for (let r of t.fields) !e.hasField(r.name) && !r.isRelation && e.addSuggestion(new pe(r.name, 'true')); -} -function kc(e, t) { - for (let r of t) e.hasField(r.name) || e.addSuggestion(new pe(r.name, r.typeNames.join(' | '))); -} -function _o(e, t) { - let [r, n] = mt(e), - i = t.arguments.getDeepSubSelectionValue(r)?.asObject(); - if (!i) return { parentKind: 'unknown', fieldName: n }; - let o = i.getFieldValue('select')?.asObject(), - s = i.getFieldValue('include')?.asObject(), - a = i.getFieldValue('omit')?.asObject(), - l = o?.getField(n); - return o && l - ? { parentKind: 'select', parent: o, field: l, fieldName: n } - : ((l = s?.getField(n)), - s && l - ? { parentKind: 'include', field: l, parent: s, fieldName: n } - : ((l = a?.getField(n)), - a && l - ? { parentKind: 'omit', field: l, parent: a, fieldName: n } - : { parentKind: 'unknown', fieldName: n })); -} -function Do(e, t) { - if (t.kind === 'object') - for (let r of t.fields) e.hasField(r.name) || e.addSuggestion(new pe(r.name, r.typeNames.join(' | '))); -} -function mt(e) { - let t = [...e], - r = t.pop(); - if (!r) throw new Error('unexpected empty path'); - return [t, r]; -} -function jt({ green: e, enabled: t }) { - return 'Available options are ' + (t ? `listed in ${e('green')}` : 'marked with ?') + '.'; -} -function Sr(e, t) { - if (t.length === 1) return t[0]; - let r = [...t], - n = r.pop(); - return `${r.join(', ')} ${e} ${n}`; -} -var Oc = 3; -function Ic(e, t) { - let r = 1 / 0, - n; - for (let i of t) { - let o = (0, Oo.default)(e, i); - o > Oc || (o < r && ((r = o), (n = i))); - } - return n; -} -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -var Ut = class { - modelName; - name; - typeName; - isList; - isEnum; - constructor(t, r, n, i, o) { - ((this.modelName = t), (this.name = r), (this.typeName = n), (this.isList = i), (this.isEnum = o)); - } - _toGraphQLInputType() { - let t = this.isList ? 'List' : '', - r = this.isEnum ? 'Enum' : ''; - return `${t}${r}${this.typeName}FieldRefInput<${this.modelName}>`; - } -}; -function gt(e) { - return e instanceof Ut; -} -m(); -c(); -p(); -d(); -f(); -var Rr = Symbol(), - Mn = new WeakMap(), - De = class { - constructor(t) { - t === Rr - ? Mn.set(this, `Prisma.${this._getName()}`) - : Mn.set(this, `new Prisma.${this._getNamespace()}.${this._getName()}()`); - } - _getName() { - return this.constructor.name; - } - toString() { - return Mn.get(this); - } - }, - $t = class extends De { - _getNamespace() { - return 'NullTypes'; - } - }, - Vt = class extends $t { - #e; - }; -_n(Vt, 'DbNull'); -var Qt = class extends $t { - #e; -}; -_n(Qt, 'JsonNull'); -var Jt = class extends $t { - #e; -}; -_n(Jt, 'AnyNull'); -var kr = { - classes: { DbNull: Vt, JsonNull: Qt, AnyNull: Jt }, - instances: { DbNull: new Vt(Rr), JsonNull: new Qt(Rr), AnyNull: new Jt(Rr) }, -}; -function _n(e, t) { - Object.defineProperty(e, 'name', { value: t, configurable: !0 }); -} -m(); -c(); -p(); -d(); -f(); -var Lo = ': ', - Or = class { - constructor(t, r) { - this.name = t; - this.value = r; - } - hasError = !1; - markAsError() { - this.hasError = !0; - } - getPrintWidth() { - return this.name.length + this.value.getPrintWidth() + Lo.length; - } - write(t) { - let r = new xe(this.name); - (this.hasError && r.underline().setColor(t.context.colors.red), t.write(r).write(Lo).write(this.value)); - } - }; -var Dn = class { - arguments; - errorMessages = []; - constructor(t) { - this.arguments = t; - } - write(t) { - t.write(this.arguments); - } - addErrorMessage(t) { - this.errorMessages.push(t); - } - renderAllMessages(t) { - return this.errorMessages.map((r) => r(t)).join(` -`); - } -}; -function ht(e) { - return new Dn(No(e)); -} -function No(e) { - let t = new ft(); - for (let [r, n] of Object.entries(e)) { - let i = new Or(r, qo(n)); - t.addField(i); - } - return t; -} -function qo(e) { - if (typeof e == 'string') return new H(JSON.stringify(e)); - if (typeof e == 'number' || typeof e == 'boolean') return new H(String(e)); - if (typeof e == 'bigint') return new H(`${e}n`); - if (e === null) return new H('null'); - if (e === void 0) return new H('undefined'); - if (lt(e)) return new H(`new Prisma.Decimal("${e.toFixed()}")`); - if (e instanceof Uint8Array) - return w.Buffer.isBuffer(e) ? new H(`Buffer.alloc(${e.byteLength})`) : new H(`new Uint8Array(${e.byteLength})`); - if (e instanceof Date) { - let t = pr(e) ? e.toISOString() : 'Invalid Date'; - return new H(`new Date("${t}")`); - } - return e instanceof De - ? new H(`Prisma.${e._getName()}`) - : gt(e) - ? new H(`prisma.${Ne(e.modelName)}.$fields.${e.name}`) - : Array.isArray(e) - ? Fc(e) - : typeof e == 'object' - ? No(e) - : new H(Object.prototype.toString.call(e)); -} -function Fc(e) { - let t = new dt(); - for (let r of e) t.addItem(qo(r)); - return t; -} -function Ir(e, t) { - let r = t === 'pretty' ? ko : Ar, - n = e.renderAllMessages(r), - i = new ct(0, { colors: r }).write(e).toString(); - return { message: n, args: i }; -} -function Fr({ args: e, errors: t, errorFormat: r, callsite: n, originalMethod: i, clientVersion: o, globalOmit: s }) { - let a = ht(e); - for (let h of t) vr(h, a, s); - let { message: l, args: u } = Ir(a, r), - g = Pr({ message: l, callsite: n, originalMethod: i, showColors: r === 'pretty', callArguments: u }); - throw new te(g, { clientVersion: o }); -} -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -function Pe(e) { - return e.replace(/^./, (t) => t.toLowerCase()); -} -m(); -c(); -p(); -d(); -f(); -function jo(e, t, r) { - let n = Pe(r); - return !t.result || !(t.result.$allModels || t.result[n]) - ? e - : Mc({ ...e, ...Bo(t.name, e, t.result.$allModels), ...Bo(t.name, e, t.result[n]) }); -} -function Mc(e) { - let t = new we(), - r = (n, i) => - t.getOrCreate(n, () => (i.has(n) ? [n] : (i.add(n), e[n] ? e[n].needs.flatMap((o) => r(o, i)) : [n]))); - return cr(e, (n) => ({ ...n, needs: r(n.name, new Set()) })); -} -function Bo(e, t, r) { - return r - ? cr(r, ({ needs: n, compute: i }, o) => ({ - name: o, - needs: n ? Object.keys(n).filter((s) => n[s]) : [], - compute: _c(t, o, i), - })) - : {}; -} -function _c(e, t, r) { - let n = e?.[t]?.compute; - return n ? (i) => r({ ...i, [t]: n(i) }) : r; -} -function Uo(e, t) { - if (!t) return e; - let r = { ...e }; - for (let n of Object.values(t)) if (e[n.name]) for (let i of n.needs) r[i] = !0; - return r; -} -function $o(e, t) { - if (!t) return e; - let r = { ...e }; - for (let n of Object.values(t)) if (!e[n.name]) for (let i of n.needs) delete r[i]; - return r; -} -var Mr = class { - constructor(t, r) { - this.extension = t; - this.previous = r; - } - computedFieldsCache = new we(); - modelExtensionsCache = new we(); - queryCallbacksCache = new we(); - clientExtensions = Lt(() => - this.extension.client - ? { ...this.previous?.getAllClientExtensions(), ...this.extension.client } - : this.previous?.getAllClientExtensions() - ); - batchCallbacks = Lt(() => { - let t = this.previous?.getAllBatchQueryCallbacks() ?? [], - r = this.extension.query?.$__internalBatch; - return r ? t.concat(r) : t; - }); - getAllComputedFields(t) { - return this.computedFieldsCache.getOrCreate(t, () => - jo(this.previous?.getAllComputedFields(t), this.extension, t) - ); - } - getAllClientExtensions() { - return this.clientExtensions.get(); - } - getAllModelExtensions(t) { - return this.modelExtensionsCache.getOrCreate(t, () => { - let r = Pe(t); - return !this.extension.model || !(this.extension.model[r] || this.extension.model.$allModels) - ? this.previous?.getAllModelExtensions(t) - : { - ...this.previous?.getAllModelExtensions(t), - ...this.extension.model.$allModels, - ...this.extension.model[r], - }; - }); - } - getAllQueryCallbacks(t, r) { - return this.queryCallbacksCache.getOrCreate(`${t}:${r}`, () => { - let n = this.previous?.getAllQueryCallbacks(t, r) ?? [], - i = [], - o = this.extension.query; - return !o || !(o[t] || o.$allModels || o[r] || o.$allOperations) - ? n - : (o[t] !== void 0 && - (o[t][r] !== void 0 && i.push(o[t][r]), o[t].$allOperations !== void 0 && i.push(o[t].$allOperations)), - t !== '$none' && - o.$allModels !== void 0 && - (o.$allModels[r] !== void 0 && i.push(o.$allModels[r]), - o.$allModels.$allOperations !== void 0 && i.push(o.$allModels.$allOperations)), - o[r] !== void 0 && i.push(o[r]), - o.$allOperations !== void 0 && i.push(o.$allOperations), - n.concat(i)); - }); - } - getAllBatchQueryCallbacks() { - return this.batchCallbacks.get(); - } - }, - yt = class e { - constructor(t) { - this.head = t; - } - static empty() { - return new e(); - } - static single(t) { - return new e(new Mr(t)); - } - isEmpty() { - return this.head === void 0; - } - append(t) { - return new e(new Mr(t, this.head)); - } - getAllComputedFields(t) { - return this.head?.getAllComputedFields(t); - } - getAllClientExtensions() { - return this.head?.getAllClientExtensions(); - } - getAllModelExtensions(t) { - return this.head?.getAllModelExtensions(t); - } - getAllQueryCallbacks(t, r) { - return this.head?.getAllQueryCallbacks(t, r) ?? []; - } - getAllBatchQueryCallbacks() { - return this.head?.getAllBatchQueryCallbacks() ?? []; - } - }; -m(); -c(); -p(); -d(); -f(); -var _r = class { - constructor(t) { - this.name = t; - } -}; -function Vo(e) { - return e instanceof _r; -} -function Qo(e) { - return new _r(e); -} -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -var Jo = Symbol(), - Gt = class { - constructor(t) { - if (t !== Jo) throw new Error('Skip instance can not be constructed directly'); - } - ifUndefined(t) { - return t === void 0 ? Dr : t; - } - }, - Dr = new Gt(Jo); -function ve(e) { - return e instanceof Gt; -} -var Dc = { - findUnique: 'findUnique', - findUniqueOrThrow: 'findUniqueOrThrow', - findFirst: 'findFirst', - findFirstOrThrow: 'findFirstOrThrow', - findMany: 'findMany', - count: 'aggregate', - create: 'createOne', - createMany: 'createMany', - createManyAndReturn: 'createManyAndReturn', - update: 'updateOne', - updateMany: 'updateMany', - updateManyAndReturn: 'updateManyAndReturn', - upsert: 'upsertOne', - delete: 'deleteOne', - deleteMany: 'deleteMany', - executeRaw: 'executeRaw', - queryRaw: 'queryRaw', - aggregate: 'aggregate', - groupBy: 'groupBy', - runCommandRaw: 'runCommandRaw', - findRaw: 'findRaw', - aggregateRaw: 'aggregateRaw', - }, - Go = 'explicitly `undefined` values are not allowed'; -function Lr({ - modelName: e, - action: t, - args: r, - runtimeDataModel: n, - extensions: i = yt.empty(), - callsite: o, - clientMethod: s, - errorFormat: a, - clientVersion: l, - previewFeatures: u, - globalOmit: g, -}) { - let h = new Ln({ - runtimeDataModel: n, - modelName: e, - action: t, - rootArgs: r, - callsite: o, - extensions: i, - selectionPath: [], - argumentPath: [], - originalMethod: s, - errorFormat: a, - clientVersion: l, - previewFeatures: u, - globalOmit: g, - }); - return { modelName: e, action: Dc[t], query: Wt(r, h) }; -} -function Wt({ select: e, include: t, ...r } = {}, n) { - let i = r.omit; - return (delete r.omit, { arguments: Ko(r, n), selection: Lc(e, t, i, n) }); -} -function Lc(e, t, r, n) { - return e - ? (t - ? n.throwValidationError({ - kind: 'MutuallyExclusiveFields', - firstField: 'include', - secondField: 'select', - selectionPath: n.getSelectionPath(), - }) - : r && - n.throwValidationError({ - kind: 'MutuallyExclusiveFields', - firstField: 'omit', - secondField: 'select', - selectionPath: n.getSelectionPath(), - }), - jc(e, n)) - : Nc(n, t, r); -} -function Nc(e, t, r) { - let n = {}; - return ( - e.modelOrType && !e.isRawAction() && ((n.$composites = !0), (n.$scalars = !0)), - t && qc(n, t, e), - Bc(n, r, e), - n - ); -} -function qc(e, t, r) { - for (let [n, i] of Object.entries(t)) { - if (ve(i)) continue; - let o = r.nestSelection(n); - if ((Nn(i, o), i === !1 || i === void 0)) { - e[n] = !1; - continue; - } - let s = r.findField(n); - if ( - (s && - s.kind !== 'object' && - r.throwValidationError({ - kind: 'IncludeOnScalar', - selectionPath: r.getSelectionPath().concat(n), - outputType: r.getOutputTypeDescription(), - }), - s) - ) { - e[n] = Wt(i === !0 ? {} : i, o); - continue; - } - if (i === !0) { - e[n] = !0; - continue; - } - e[n] = Wt(i, o); - } -} -function Bc(e, t, r) { - let n = r.getComputedFields(), - i = { ...r.getGlobalOmit(), ...t }, - o = $o(i, n); - for (let [s, a] of Object.entries(o)) { - if (ve(a)) continue; - Nn(a, r.nestSelection(s)); - let l = r.findField(s); - (n?.[s] && !l) || (e[s] = !a); - } -} -function jc(e, t) { - let r = {}, - n = t.getComputedFields(), - i = Uo(e, n); - for (let [o, s] of Object.entries(i)) { - if (ve(s)) continue; - let a = t.nestSelection(o); - Nn(s, a); - let l = t.findField(o); - if (!(n?.[o] && !l)) { - if (s === !1 || s === void 0 || ve(s)) { - r[o] = !1; - continue; - } - if (s === !0) { - l?.kind === 'object' ? (r[o] = Wt({}, a)) : (r[o] = !0); - continue; - } - r[o] = Wt(s, a); - } - } - return r; -} -function Wo(e, t) { - if (e === null) return null; - if (typeof e == 'string' || typeof e == 'number' || typeof e == 'boolean') return e; - if (typeof e == 'bigint') return { $type: 'BigInt', value: String(e) }; - if (ot(e)) { - if (pr(e)) return { $type: 'DateTime', value: e.toISOString() }; - t.throwValidationError({ - kind: 'InvalidArgumentValue', - selectionPath: t.getSelectionPath(), - argumentPath: t.getArgumentPath(), - argument: { name: t.getArgumentName(), typeNames: ['Date'] }, - underlyingError: 'Provided Date object is invalid', - }); - } - if (Vo(e)) return { $type: 'Param', value: e.name }; - if (gt(e)) return { $type: 'FieldRef', value: { _ref: e.name, _container: e.modelName } }; - if (Array.isArray(e)) return Uc(e, t); - if (ArrayBuffer.isView(e)) { - let { buffer: r, byteOffset: n, byteLength: i } = e; - return { $type: 'Bytes', value: w.Buffer.from(r, n, i).toString('base64') }; - } - if ($c(e)) return e.values; - if (lt(e)) return { $type: 'Decimal', value: e.toFixed() }; - if (e instanceof De) { - if (e !== kr.instances[e._getName()]) throw new Error('Invalid ObjectEnumValue'); - return { $type: 'Enum', value: e._getName() }; - } - if (Vc(e)) return e.toJSON(); - if (typeof e == 'object') return Ko(e, t); - t.throwValidationError({ - kind: 'InvalidArgumentValue', - selectionPath: t.getSelectionPath(), - argumentPath: t.getArgumentPath(), - argument: { name: t.getArgumentName(), typeNames: [] }, - underlyingError: `We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`, - }); -} -function Ko(e, t) { - if (e.$type) return { $type: 'Raw', value: e }; - let r = {}; - for (let n in e) { - let i = e[n], - o = t.nestArgument(n); - ve(i) || - (i !== void 0 - ? (r[n] = Wo(i, o)) - : t.isPreviewFeatureOn('strictUndefinedChecks') && - t.throwValidationError({ - kind: 'InvalidArgumentValue', - argumentPath: o.getArgumentPath(), - selectionPath: t.getSelectionPath(), - argument: { name: t.getArgumentName(), typeNames: [] }, - underlyingError: Go, - })); - } - return r; -} -function Uc(e, t) { - let r = []; - for (let n = 0; n < e.length; n++) { - let i = t.nestArgument(String(n)), - o = e[n]; - if (o === void 0 || ve(o)) { - let s = o === void 0 ? 'undefined' : 'Prisma.skip'; - t.throwValidationError({ - kind: 'InvalidArgumentValue', - selectionPath: i.getSelectionPath(), - argumentPath: i.getArgumentPath(), - argument: { name: `${t.getArgumentName()}[${n}]`, typeNames: [] }, - underlyingError: `Can not use \`${s}\` value within array. Use \`null\` or filter out \`${s}\` values`, - }); - } - r.push(Wo(o, i)); - } - return r; -} -function $c(e) { - return typeof e == 'object' && e !== null && e.__prismaRawParameters__ === !0; -} -function Vc(e) { - return typeof e == 'object' && e !== null && typeof e.toJSON == 'function'; -} -function Nn(e, t) { - e === void 0 && - t.isPreviewFeatureOn('strictUndefinedChecks') && - t.throwValidationError({ kind: 'InvalidSelectionValue', selectionPath: t.getSelectionPath(), underlyingError: Go }); -} -var Ln = class e { - constructor(t) { - this.params = t; - this.params.modelName && - (this.modelOrType = - this.params.runtimeDataModel.models[this.params.modelName] ?? - this.params.runtimeDataModel.types[this.params.modelName]); - } - modelOrType; - throwValidationError(t) { - Fr({ - errors: [t], - originalMethod: this.params.originalMethod, - args: this.params.rootArgs ?? {}, - callsite: this.params.callsite, - errorFormat: this.params.errorFormat, - clientVersion: this.params.clientVersion, - globalOmit: this.params.globalOmit, - }); - } - getSelectionPath() { - return this.params.selectionPath; - } - getArgumentPath() { - return this.params.argumentPath; - } - getArgumentName() { - return this.params.argumentPath[this.params.argumentPath.length - 1]; - } - getOutputTypeDescription() { - if (!(!this.params.modelName || !this.modelOrType)) - return { - name: this.params.modelName, - fields: this.modelOrType.fields.map((t) => ({ - name: t.name, - typeName: 'boolean', - isRelation: t.kind === 'object', - })), - }; - } - isRawAction() { - return ['executeRaw', 'queryRaw', 'runCommandRaw', 'findRaw', 'aggregateRaw'].includes(this.params.action); - } - isPreviewFeatureOn(t) { - return this.params.previewFeatures.includes(t); - } - getComputedFields() { - if (this.params.modelName) return this.params.extensions.getAllComputedFields(this.params.modelName); - } - findField(t) { - return this.modelOrType?.fields.find((r) => r.name === t); - } - nestSelection(t) { - let r = this.findField(t), - n = r?.kind === 'object' ? r.type : void 0; - return new e({ ...this.params, modelName: n, selectionPath: this.params.selectionPath.concat(t) }); - } - getGlobalOmit() { - return this.params.modelName && this.shouldApplyGlobalOmit() - ? (this.params.globalOmit?.[Ne(this.params.modelName)] ?? {}) - : {}; - } - shouldApplyGlobalOmit() { - switch (this.params.action) { - case 'findFirst': - case 'findFirstOrThrow': - case 'findUniqueOrThrow': - case 'findMany': - case 'upsert': - case 'findUnique': - case 'createManyAndReturn': - case 'create': - case 'update': - case 'updateManyAndReturn': - case 'delete': - return !0; - case 'executeRaw': - case 'aggregateRaw': - case 'runCommandRaw': - case 'findRaw': - case 'createMany': - case 'deleteMany': - case 'groupBy': - case 'updateMany': - case 'count': - case 'aggregate': - case 'queryRaw': - return !1; - default: - ze(this.params.action, 'Unknown action'); - } - } - nestArgument(t) { - return new e({ ...this.params, argumentPath: this.params.argumentPath.concat(t) }); - } -}; -m(); -c(); -p(); -d(); -f(); -function zo(e) { - if (!e._hasPreviewFlag('metrics')) - throw new te('`metrics` preview feature must be enabled in order to access metrics API', { - clientVersion: e._clientVersion, - }); -} -var wt = class { - _client; - constructor(t) { - this._client = t; - } - prometheus(t) { - return (zo(this._client), this._client._engine.metrics({ format: 'prometheus', ...t })); - } - json(t) { - return (zo(this._client), this._client._engine.metrics({ format: 'json', ...t })); - } -}; -m(); -c(); -p(); -d(); -f(); -function Ho(e, t) { - let r = Lt(() => Qc(t)); - Object.defineProperty(e, 'dmmf', { get: () => r.get() }); -} -function Qc(e) { - return { datamodel: { models: qn(e.models), enums: qn(e.enums), types: qn(e.types) } }; -} -function qn(e) { - return Object.entries(e).map(([t, r]) => ({ name: t, ...r })); -} -m(); -c(); -p(); -d(); -f(); -var Bn = new WeakMap(), - Nr = '$$PrismaTypedSql', - Kt = class { - constructor(t, r) { - (Bn.set(this, { sql: t, values: r }), Object.defineProperty(this, Nr, { value: Nr })); - } - get sql() { - return Bn.get(this).sql; - } - get values() { - return Bn.get(this).values; - } - }; -function Yo(e) { - return (...t) => new Kt(e, t); -} -function qr(e) { - return e != null && e[Nr] === Nr; -} -m(); -c(); -p(); -d(); -f(); -var ha = Se(Zo()); -m(); -c(); -p(); -d(); -f(); -Xo(); -dn(); -mn(); -m(); -c(); -p(); -d(); -f(); -var le = class e { - constructor(t, r) { - if (t.length - 1 !== r.length) - throw t.length === 0 - ? new TypeError('Expected at least 1 string') - : new TypeError(`Expected ${t.length} strings to have ${t.length - 1} values`); - let n = r.reduce((s, a) => s + (a instanceof e ? a.values.length : 1), 0); - ((this.values = new Array(n)), (this.strings = new Array(n + 1)), (this.strings[0] = t[0])); - let i = 0, - o = 0; - for (; i < r.length; ) { - let s = r[i++], - a = t[i]; - if (s instanceof e) { - this.strings[o] += s.strings[0]; - let l = 0; - for (; l < s.values.length; ) ((this.values[o++] = s.values[l++]), (this.strings[o] = s.strings[l])); - this.strings[o] += a; - } else ((this.values[o++] = s), (this.strings[o] = a)); - } - } - get sql() { - let t = this.strings.length, - r = 1, - n = this.strings[0]; - for (; r < t; ) n += `?${this.strings[r++]}`; - return n; - } - get statement() { - let t = this.strings.length, - r = 1, - n = this.strings[0]; - for (; r < t; ) n += `:${r}${this.strings[r++]}`; - return n; - } - get text() { - let t = this.strings.length, - r = 1, - n = this.strings[0]; - for (; r < t; ) n += `$${r}${this.strings[r++]}`; - return n; - } - inspect() { - return { sql: this.sql, statement: this.statement, text: this.text, values: this.values }; - } -}; -function es(e, t = ',', r = '', n = '') { - if (e.length === 0) - throw new TypeError('Expected `join([])` to be called with an array of multiple elements, but got an empty array'); - return new le([r, ...Array(e.length - 1).fill(t), n], e); -} -function jn(e) { - return new le([e], []); -} -var ts = jn(''); -function Un(e, ...t) { - return new le(e, t); -} -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -function zt(e) { - return { - getKeys() { - return Object.keys(e); - }, - getPropertyValue(t) { - return e[t]; - }, - }; -} -m(); -c(); -p(); -d(); -f(); -function ne(e, t) { - return { - getKeys() { - return [e]; - }, - getPropertyValue() { - return t(); - }, - }; -} -m(); -c(); -p(); -d(); -f(); -function He(e) { - let t = new we(); - return { - getKeys() { - return e.getKeys(); - }, - getPropertyValue(r) { - return t.getOrCreate(r, () => e.getPropertyValue(r)); - }, - getPropertyDescriptor(r) { - return e.getPropertyDescriptor?.(r); - }, - }; -} -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -var jr = { enumerable: !0, configurable: !0, writable: !0 }; -function Ur(e) { - let t = new Set(e); - return { - getPrototypeOf: () => Object.prototype, - getOwnPropertyDescriptor: () => jr, - has: (r, n) => t.has(n), - set: (r, n, i) => t.add(n) && Reflect.set(r, n, i), - ownKeys: () => [...t], - }; -} -var rs = Symbol.for('nodejs.util.inspect.custom'); -function ge(e, t) { - let r = Gc(t), - n = new Set(), - i = new Proxy(e, { - get(o, s) { - if (n.has(s)) return o[s]; - let a = r.get(s); - return a ? a.getPropertyValue(s) : o[s]; - }, - has(o, s) { - if (n.has(s)) return !0; - let a = r.get(s); - return a ? (a.has?.(s) ?? !0) : Reflect.has(o, s); - }, - ownKeys(o) { - let s = ns(Reflect.ownKeys(o), r), - a = ns(Array.from(r.keys()), r); - return [...new Set([...s, ...a, ...n])]; - }, - set(o, s, a) { - return r.get(s)?.getPropertyDescriptor?.(s)?.writable === !1 ? !1 : (n.add(s), Reflect.set(o, s, a)); - }, - getOwnPropertyDescriptor(o, s) { - let a = Reflect.getOwnPropertyDescriptor(o, s); - if (a && !a.configurable) return a; - let l = r.get(s); - return l ? (l.getPropertyDescriptor ? { ...jr, ...l?.getPropertyDescriptor(s) } : jr) : a; - }, - defineProperty(o, s, a) { - return (n.add(s), Reflect.defineProperty(o, s, a)); - }, - getPrototypeOf: () => Object.prototype, - }); - return ( - (i[rs] = function () { - let o = { ...this }; - return (delete o[rs], o); - }), - i - ); -} -function Gc(e) { - let t = new Map(); - for (let r of e) { - let n = r.getKeys(); - for (let i of n) t.set(i, r); - } - return t; -} -function ns(e, t) { - return e.filter((r) => t.get(r)?.has?.(r) ?? !0); -} -m(); -c(); -p(); -d(); -f(); -function bt(e) { - return { - getKeys() { - return e; - }, - has() { - return !1; - }, - getPropertyValue() {}, - }; -} -m(); -c(); -p(); -d(); -f(); -function $r(e, t) { - return { batch: e, transaction: t?.kind === 'batch' ? { isolationLevel: t.options.isolationLevel } : void 0 }; -} -m(); -c(); -p(); -d(); -f(); -function is(e) { - if (e === void 0) return ''; - let t = ht(e); - return new ct(0, { colors: Ar }).write(t).toString(); -} -m(); -c(); -p(); -d(); -f(); -var Wc = 'P2037'; -function Vr({ error: e, user_facing_error: t }, r, n) { - return t.error_code - ? new se(Kc(t, n), { code: t.error_code, clientVersion: r, meta: t.meta, batchRequestIdx: t.batch_request_idx }) - : new G(e, { clientVersion: r, batchRequestIdx: t.batch_request_idx }); -} -function Kc(e, t) { - let r = e.message; - return ( - (t === 'postgresql' || t === 'postgres' || t === 'mysql') && - e.error_code === Wc && - (r += ` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`), - r - ); -} -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -var Ht = ''; -function os(e) { - var t = e.split(` -`); - return t.reduce(function (r, n) { - var i = Yc(n) || Xc(n) || rp(n) || sp(n) || ip(n); - return (i && r.push(i), r); - }, []); -} -var zc = - /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|rsc||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, - Hc = /\((\S*)(?::(\d+))(?::(\d+))\)/; -function Yc(e) { - var t = zc.exec(e); - if (!t) return null; - var r = t[2] && t[2].indexOf('native') === 0, - n = t[2] && t[2].indexOf('eval') === 0, - i = Hc.exec(t[2]); - return ( - n && i != null && ((t[2] = i[1]), (t[3] = i[2]), (t[4] = i[3])), - { - file: r ? null : t[2], - methodName: t[1] || Ht, - arguments: r ? [t[2]] : [], - lineNumber: t[3] ? +t[3] : null, - column: t[4] ? +t[4] : null, - } - ); -} -var Zc = - /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|rsc|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i; -function Xc(e) { - var t = Zc.exec(e); - return t - ? { file: t[2], methodName: t[1] || Ht, arguments: [], lineNumber: +t[3], column: t[4] ? +t[4] : null } - : null; -} -var ep = - /^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|rsc|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i, - tp = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i; -function rp(e) { - var t = ep.exec(e); - if (!t) return null; - var r = t[3] && t[3].indexOf(' > eval') > -1, - n = tp.exec(t[3]); - return ( - r && n != null && ((t[3] = n[1]), (t[4] = n[2]), (t[5] = null)), - { - file: t[3], - methodName: t[1] || Ht, - arguments: t[2] ? t[2].split(',') : [], - lineNumber: t[4] ? +t[4] : null, - column: t[5] ? +t[5] : null, - } - ); -} -var np = /^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i; -function ip(e) { - var t = np.exec(e); - return t - ? { file: t[3], methodName: t[1] || Ht, arguments: [], lineNumber: +t[4], column: t[5] ? +t[5] : null } - : null; -} -var op = /^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i; -function sp(e) { - var t = op.exec(e); - return t - ? { file: t[2], methodName: t[1] || Ht, arguments: [], lineNumber: +t[3], column: t[4] ? +t[4] : null } - : null; -} -var $n = class { - getLocation() { - return null; - } - }, - Vn = class { - _error; - constructor() { - this._error = new Error(); - } - getLocation() { - let t = this._error.stack; - if (!t) return null; - let n = os(t).find((i) => { - if (!i.file) return !1; - let o = Pn(i.file); - return ( - o !== '' && - !o.includes('@prisma') && - !o.includes('/packages/client/src/runtime/') && - !o.endsWith('/runtime/binary.js') && - !o.endsWith('/runtime/library.js') && - !o.endsWith('/runtime/edge.js') && - !o.endsWith('/runtime/edge-esm.js') && - !o.startsWith('internal/') && - !i.methodName.includes('new ') && - !i.methodName.includes('getCallSite') && - !i.methodName.includes('Proxy.') && - i.methodName.split('.').length < 4 - ); - }); - return !n || !n.file ? null : { fileName: n.file, lineNumber: n.lineNumber, columnNumber: n.column }; - } - }; -function Ve(e) { - return e === 'minimal' - ? typeof $EnabledCallSite == 'function' && e !== 'minimal' - ? new $EnabledCallSite() - : new $n() - : new Vn(); -} -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -var ss = { _avg: !0, _count: !0, _sum: !0, _min: !0, _max: !0 }; -function Et(e = {}) { - let t = lp(e); - return Object.entries(t).reduce((n, [i, o]) => (ss[i] !== void 0 ? (n.select[i] = { select: o }) : (n[i] = o), n), { - select: {}, - }); -} -function lp(e = {}) { - return typeof e._count == 'boolean' ? { ...e, _count: { _all: e._count } } : e; -} -function Qr(e = {}) { - return (t) => (typeof e._count == 'boolean' && (t._count = t._count._all), t); -} -function as(e, t) { - let r = Qr(e); - return t({ action: 'aggregate', unpacker: r, argsMapper: Et })(e); -} -m(); -c(); -p(); -d(); -f(); -function up(e = {}) { - let { select: t, ...r } = e; - return typeof t == 'object' ? Et({ ...r, _count: t }) : Et({ ...r, _count: { _all: !0 } }); -} -function cp(e = {}) { - return typeof e.select == 'object' ? (t) => Qr(e)(t)._count : (t) => Qr(e)(t)._count._all; -} -function ls(e, t) { - return t({ action: 'count', unpacker: cp(e), argsMapper: up })(e); -} -m(); -c(); -p(); -d(); -f(); -function pp(e = {}) { - let t = Et(e); - if (Array.isArray(t.by)) for (let r of t.by) typeof r == 'string' && (t.select[r] = !0); - else typeof t.by == 'string' && (t.select[t.by] = !0); - return t; -} -function dp(e = {}) { - return (t) => ( - typeof e?._count == 'boolean' && - t.forEach((r) => { - r._count = r._count._all; - }), - t - ); -} -function us(e, t) { - return t({ action: 'groupBy', unpacker: dp(e), argsMapper: pp })(e); -} -function cs(e, t, r) { - if (t === 'aggregate') return (n) => as(n, r); - if (t === 'count') return (n) => ls(n, r); - if (t === 'groupBy') return (n) => us(n, r); -} -m(); -c(); -p(); -d(); -f(); -function ps(e, t) { - let r = t.fields.filter((i) => !i.relationName), - n = to(r, 'name'); - return new Proxy( - {}, - { - get(i, o) { - if (o in i || typeof o == 'symbol') return i[o]; - let s = n[o]; - if (s) return new Ut(e, o, s.type, s.isList, s.kind === 'enum'); - }, - ...Ur(Object.keys(n)), - } - ); -} -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -var ds = (e) => (Array.isArray(e) ? e : e.split('.')), - Qn = (e, t) => ds(t).reduce((r, n) => r && r[n], e), - fs = (e, t, r) => ds(t).reduceRight((n, i, o, s) => Object.assign({}, Qn(e, s.slice(0, o)), { [i]: n }), r); -function fp(e, t) { - return e === void 0 || t === void 0 ? [] : [...t, 'select', e]; -} -function mp(e, t, r) { - return t === void 0 ? (e ?? {}) : fs(t, r, e || !0); -} -function Jn(e, t, r, n, i, o) { - let a = e._runtimeDataModel.models[t].fields.reduce((l, u) => ({ ...l, [u.name]: u }), {}); - return (l) => { - let u = Ve(e._errorFormat), - g = fp(n, i), - h = mp(l, o, g), - T = r({ dataPath: g, callsite: u })(h), - k = gp(e, t); - return new Proxy(T, { - get(A, S) { - if (!k.includes(S)) return A[S]; - let _ = [a[S].type, r, S], - L = [g, h]; - return Jn(e, ..._, ...L); - }, - ...Ur([...k, ...Object.getOwnPropertyNames(T)]), - }); - }; -} -function gp(e, t) { - return e._runtimeDataModel.models[t].fields.filter((r) => r.kind === 'object').map((r) => r.name); -} -var hp = ['findUnique', 'findUniqueOrThrow', 'findFirst', 'findFirstOrThrow', 'create', 'update', 'upsert', 'delete'], - yp = ['aggregate', 'count', 'groupBy']; -function Gn(e, t) { - let r = e._extensions.getAllModelExtensions(t) ?? {}, - n = [wp(e, t), Ep(e, t), zt(r), ne('name', () => t), ne('$name', () => t), ne('$parent', () => e._appliedParent)]; - return ge({}, n); -} -function wp(e, t) { - let r = Pe(t), - n = Object.keys(ut).concat('count'); - return { - getKeys() { - return n; - }, - getPropertyValue(i) { - let o = i, - s = (a) => (l) => { - let u = Ve(e._errorFormat); - return e._createPrismaPromise( - (g) => { - let h = { - args: l, - dataPath: [], - action: o, - model: t, - clientMethod: `${r}.${i}`, - jsModelName: r, - transaction: g, - callsite: u, - }; - return e._request({ ...h, ...a }); - }, - { action: o, args: l, model: t } - ); - }; - return hp.includes(o) ? Jn(e, t, s) : bp(i) ? cs(e, i, s) : s({}); - }, - }; -} -function bp(e) { - return yp.includes(e); -} -function Ep(e, t) { - return He( - ne('fields', () => { - let r = e._runtimeDataModel.models[t]; - return ps(t, r); - }) - ); -} -m(); -c(); -p(); -d(); -f(); -function ms(e) { - return e.replace(/^./, (t) => t.toUpperCase()); -} -var Wn = Symbol(); -function Yt(e) { - let t = [xp(e), Pp(e), ne(Wn, () => e), ne('$parent', () => e._appliedParent)], - r = e._extensions.getAllClientExtensions(); - return (r && t.push(zt(r)), ge(e, t)); -} -function xp(e) { - let t = Object.getPrototypeOf(e._originalClient), - r = [...new Set(Object.getOwnPropertyNames(t))]; - return { - getKeys() { - return r; - }, - getPropertyValue(n) { - return e[n]; - }, - }; -} -function Pp(e) { - let t = Object.keys(e._runtimeDataModel.models), - r = t.map(Pe), - n = [...new Set(t.concat(r))]; - return He({ - getKeys() { - return n; - }, - getPropertyValue(i) { - let o = ms(i); - if (e._runtimeDataModel.models[o] !== void 0) return Gn(e, o); - if (e._runtimeDataModel.models[i] !== void 0) return Gn(e, i); - }, - getPropertyDescriptor(i) { - if (!r.includes(i)) return { enumerable: !1 }; - }, - }); -} -function gs(e) { - return e[Wn] ? e[Wn] : e; -} -function hs(e) { - if (typeof e == 'function') return e(this); - if (e.client?.__AccelerateEngine) { - let r = e.client.__AccelerateEngine; - this._originalClient._engine = new r(this._originalClient._accelerateEngineConfig); - } - let t = Object.create(this._originalClient, { - _extensions: { value: this._extensions.append(e) }, - _appliedParent: { value: this, configurable: !0 }, - $on: { value: void 0 }, - }); - return Yt(t); -} -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -function ys({ result: e, modelName: t, select: r, omit: n, extensions: i }) { - let o = i.getAllComputedFields(t); - if (!o) return e; - let s = [], - a = []; - for (let l of Object.values(o)) { - if (n) { - if (n[l.name]) continue; - let u = l.needs.filter((g) => n[g]); - u.length > 0 && a.push(bt(u)); - } else if (r) { - if (!r[l.name]) continue; - let u = l.needs.filter((g) => !r[g]); - u.length > 0 && a.push(bt(u)); - } - vp(e, l.needs) && s.push(Tp(l, ge(e, s))); - } - return s.length > 0 || a.length > 0 ? ge(e, [...s, ...a]) : e; -} -function vp(e, t) { - return t.every((r) => vn(e, r)); -} -function Tp(e, t) { - return He(ne(e.name, () => e.compute(t))); -} -m(); -c(); -p(); -d(); -f(); -function Jr({ visitor: e, result: t, args: r, runtimeDataModel: n, modelName: i }) { - if (Array.isArray(t)) { - for (let s = 0; s < t.length; s++) - t[s] = Jr({ result: t[s], args: r, modelName: i, runtimeDataModel: n, visitor: e }); - return t; - } - let o = e(t, i, r) ?? t; - return ( - r.include && ws({ includeOrSelect: r.include, result: o, parentModelName: i, runtimeDataModel: n, visitor: e }), - r.select && ws({ includeOrSelect: r.select, result: o, parentModelName: i, runtimeDataModel: n, visitor: e }), - o - ); -} -function ws({ includeOrSelect: e, result: t, parentModelName: r, runtimeDataModel: n, visitor: i }) { - for (let [o, s] of Object.entries(e)) { - if (!s || t[o] == null || ve(s)) continue; - let l = n.models[r].fields.find((g) => g.name === o); - if (!l || l.kind !== 'object' || !l.relationName) continue; - let u = typeof s == 'object' ? s : {}; - t[o] = Jr({ visitor: i, result: t[o], args: u, modelName: l.type, runtimeDataModel: n }); - } -} -function bs({ result: e, modelName: t, args: r, extensions: n, runtimeDataModel: i, globalOmit: o }) { - return n.isEmpty() || e == null || typeof e != 'object' || !i.models[t] - ? e - : Jr({ - result: e, - args: r ?? {}, - modelName: t, - runtimeDataModel: i, - visitor: (a, l, u) => { - let g = Pe(l); - return ys({ - result: a, - modelName: g, - select: u.select, - omit: u.select ? void 0 : { ...o?.[g], ...u.omit }, - extensions: n, - }); - }, - }); -} -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -var Cp = ['$connect', '$disconnect', '$on', '$transaction', '$extends'], - Es = Cp; -function xs(e) { - if (e instanceof le) return Ap(e); - if (qr(e)) return Sp(e); - if (Array.isArray(e)) { - let r = [e[0]]; - for (let n = 1; n < e.length; n++) r[n] = Zt(e[n]); - return r; - } - let t = {}; - for (let r in e) t[r] = Zt(e[r]); - return t; -} -function Ap(e) { - return new le(e.strings, e.values); -} -function Sp(e) { - return new Kt(e.sql, e.values); -} -function Zt(e) { - if (typeof e != 'object' || e == null || e instanceof De || gt(e)) return e; - if (lt(e)) return new _e(e.toFixed()); - if (ot(e)) return new Date(+e); - if (ArrayBuffer.isView(e)) return e.slice(0); - if (Array.isArray(e)) { - let t = e.length, - r; - for (r = Array(t); t--; ) r[t] = Zt(e[t]); - return r; - } - if (typeof e == 'object') { - let t = {}; - for (let r in e) - r === '__proto__' - ? Object.defineProperty(t, r, { value: Zt(e[r]), configurable: !0, enumerable: !0, writable: !0 }) - : (t[r] = Zt(e[r])); - return t; - } - ze(e, 'Unknown value'); -} -function vs(e, t, r, n = 0) { - return e._createPrismaPromise((i) => { - let o = t.customDataProxyFetch; - return ( - 'transaction' in t && - i !== void 0 && - (t.transaction?.kind === 'batch' && t.transaction.lock.then(), (t.transaction = i)), - n === r.length - ? e._executeRequest(t) - : r[n]({ - model: t.model, - operation: t.model ? t.action : t.clientMethod, - args: xs(t.args ?? {}), - __internalParams: t, - query: (s, a = t) => { - let l = a.customDataProxyFetch; - return ((a.customDataProxyFetch = Ss(o, l)), (a.args = s), vs(e, a, r, n + 1)); - }, - }) - ); - }); -} -function Ts(e, t) { - let { jsModelName: r, action: n, clientMethod: i } = t, - o = r ? n : i; - if (e._extensions.isEmpty()) return e._executeRequest(t); - let s = e._extensions.getAllQueryCallbacks(r ?? '$none', o); - return vs(e, t, s); -} -function Cs(e) { - return (t) => { - let r = { requests: t }, - n = t[0].extensions.getAllBatchQueryCallbacks(); - return n.length ? As(r, n, 0, e) : e(r); - }; -} -function As(e, t, r, n) { - if (r === t.length) return n(e); - let i = e.customDataProxyFetch, - o = e.requests[0].transaction; - return t[r]({ - args: { - queries: e.requests.map((s) => ({ model: s.modelName, operation: s.action, args: s.args })), - transaction: o ? { isolationLevel: o.kind === 'batch' ? o.isolationLevel : void 0 } : void 0, - }, - __internalParams: e, - query(s, a = e) { - let l = a.customDataProxyFetch; - return ((a.customDataProxyFetch = Ss(i, l)), As(a, t, r + 1, n)); - }, - }); -} -var Ps = (e) => e; -function Ss(e = Ps, t = Ps) { - return (r) => e(t(r)); -} -m(); -c(); -p(); -d(); -f(); -var Rs = z('prisma:client'), - ks = { Vercel: 'vercel', 'Netlify CI': 'netlify' }; -function Os({ postinstall: e, ciName: t, clientVersion: r }) { - if ((Rs('checkPlatformCaching:postinstall', e), Rs('checkPlatformCaching:ciName', t), e === !0 && t && t in ks)) { - let n = `Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${ks[t]}-build`; - throw (console.error(n), new Q(n, r)); - } -} -m(); -c(); -p(); -d(); -f(); -function Is(e, t) { - return e ? (e.datasources ? e.datasources : e.datasourceUrl ? { [t[0]]: { url: e.datasourceUrl } } : {}) : {}; -} -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -var Rp = () => globalThis.process?.release?.name === 'node', - kp = () => !!globalThis.Bun || !!globalThis.process?.versions?.bun, - Op = () => !!globalThis.Deno, - Ip = () => typeof globalThis.Netlify == 'object', - Fp = () => typeof globalThis.EdgeRuntime == 'object', - Mp = () => globalThis.navigator?.userAgent === 'Cloudflare-Workers'; -function _p() { - return ( - [ - [Ip, 'netlify'], - [Fp, 'edge-light'], - [Mp, 'workerd'], - [Op, 'deno'], - [kp, 'bun'], - [Rp, 'node'], - ] - .flatMap((r) => (r[0]() ? [r[1]] : [])) - .at(0) ?? '' - ); -} -var Dp = { - node: 'Node.js', - workerd: 'Cloudflare Workers', - deno: 'Deno and Deno Deploy', - netlify: 'Netlify Edge Functions', - 'edge-light': - 'Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)', -}; -function Fs() { - let e = _p(); - return { id: e, prettyName: Dp[e] || e, isEdge: ['workerd', 'deno', 'netlify', 'edge-light'].includes(e) }; -} -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -var Kn = Se(xn()); -m(); -c(); -p(); -d(); -f(); -function Ms(e) { - return e ? e.replace(/".*"/g, '"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g, (t) => `${t[0]}5`) : ''; -} -m(); -c(); -p(); -d(); -f(); -function _s(e) { - return e - .split( - ` -` - ) - .map((t) => - t - .replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/, '') - .replace(/\+\d+\s*ms$/, '') - ).join(` -`); -} -m(); -c(); -p(); -d(); -f(); -var Ds = Se(Zi()); -function Ls({ title: e, user: t = 'prisma', repo: r = 'prisma', template: n = 'bug_report.yml', body: i }) { - return (0, Ds.default)({ user: t, repo: r, template: n, title: e, body: i }); -} -function Ns({ version: e, binaryTarget: t, title: r, description: n, engineVersion: i, database: o, query: s }) { - let a = _i(6e3 - (s?.length ?? 0)), - l = _s((0, Kn.default)(a)), - u = n - ? `# Description -\`\`\` -${n} -\`\`\`` - : '', - g = (0, Kn.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: -## Versions - -| Name | Version | -|-----------------|--------------------| -| Node | ${y.version?.padEnd(19)}| -| OS | ${t?.padEnd(19)}| -| Prisma Client | ${e?.padEnd(19)}| -| Query Engine | ${i?.padEnd(19)}| -| Database | ${o?.padEnd(19)}| - -${u} - -## Logs -\`\`\` -${l} -\`\`\` - -## Client Snippet -\`\`\`ts -// PLEASE FILL YOUR CODE SNIPPET HERE -\`\`\` - -## Schema -\`\`\`prisma -// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE -\`\`\` - -## Prisma Engine Query -\`\`\` -${s ? Ms(s) : ''} -\`\`\` -`), - h = Ls({ title: r, body: g }); - return `${r} - -This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. - -${St(h)} - -If you want the Prisma team to look into it, please open the link above \u{1F64F} -To increase the chance of success, please post your schema and a snippet of -how you used Prisma Client in the issue. -`; -} -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -function qs(e, t) { - throw new Error(t); -} -function Lp(e) { - return e !== null && typeof e == 'object' && typeof e.$type == 'string'; -} -function Np(e, t) { - let r = {}; - for (let n of Object.keys(e)) r[n] = t(e[n], n); - return r; -} -function xt(e) { - return e === null - ? e - : Array.isArray(e) - ? e.map(xt) - : typeof e == 'object' - ? Lp(e) - ? qp(e) - : e.constructor !== null && e.constructor.name !== 'Object' - ? e - : Np(e, xt) - : e; -} -function qp({ $type: e, value: t }) { - switch (e) { - case 'BigInt': - return BigInt(t); - case 'Bytes': { - let { buffer: r, byteOffset: n, byteLength: i } = w.Buffer.from(t, 'base64'); - return new Uint8Array(r, n, i); - } - case 'DateTime': - return new Date(t); - case 'Decimal': - return new Me(t); - case 'Json': - return JSON.parse(t); - default: - qs(t, 'Unknown tagged value'); - } -} -var Bs = '6.14.0'; -m(); -c(); -p(); -d(); -f(); -function Gr({ inlineDatasources: e, overrideDatasources: t, env: r, clientVersion: n }) { - let i, - o = Object.keys(e)[0], - s = e[o]?.url, - a = t[o]?.url; - if ( - (o === void 0 ? (i = void 0) : a ? (i = a) : s?.value ? (i = s.value) : s?.fromEnvVar && (i = r[s.fromEnvVar]), - s?.fromEnvVar !== void 0 && i === void 0) - ) - throw new Q(`error: Environment variable not found: ${s.fromEnvVar}.`, n); - if (i === void 0) throw new Q('error: Missing URL environment variable, value, or override.', n); - return i; -} -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -function js(e) { - if (e?.kind === 'itx') return e.options.id; -} -m(); -c(); -p(); -d(); -f(); -var zn = class { - engineObject; - constructor(t, r, n) { - this.engineObject = __PrismaProxy.create({ - datamodel: t.datamodel, - env: y.env, - ignoreEnvVarErrors: !0, - datasourceOverrides: t.datasourceOverrides ?? {}, - logLevel: t.logLevel, - logQueries: t.logQueries ?? !1, - logCallback: r, - enableTracing: t.enableTracing, - }); - } - async connect(t, r) { - return __PrismaProxy.connect(this.engineObject, t, r); - } - async disconnect(t, r) { - return __PrismaProxy.disconnect(this.engineObject, t, r); - } - query(t, r, n, i) { - return __PrismaProxy.execute(this.engineObject, t, r, n, i); - } - compile() { - throw new Error('not implemented'); - } - sdlSchema() { - return Promise.resolve('{}'); - } - dmmf(t) { - return Promise.resolve('{}'); - } - async startTransaction(t, r, n) { - return __PrismaProxy.startTransaction(this.engineObject, t, r, n); - } - async commitTransaction(t, r, n) { - return __PrismaProxy.commitTransaction(this.engineObject, t, r, n); - } - async rollbackTransaction(t, r, n) { - return __PrismaProxy.rollbackTransaction(this.engineObject, t, r, n); - } - metrics(t) { - return Promise.resolve('{}'); - } - async applyPendingMigrations() { - return __PrismaProxy.applyPendingMigrations(this.engineObject); - } - trace(t) { - return __PrismaProxy.trace(this.engineObject, t); - } - }, - Us = { - async loadLibrary(e) { - if (!__PrismaProxy) - throw new Q('__PrismaProxy not detected make sure React Native bindings are installed', e.clientVersion); - return { - debugPanic() { - return Promise.reject('{}'); - }, - dmmf() { - return Promise.resolve('{}'); - }, - version() { - return { commit: 'unknown', version: 'unknown' }; - }, - QueryEngine: zn, - }; - }, - }; -var jp = 'P2036', - Te = z('prisma:client:libraryEngine'); -function Up(e) { - return e.item_type === 'query' && 'query' in e; -} -function $p(e) { - return 'level' in e ? e.level === 'error' && e.message === 'PANIC' : !1; -} -var Ak = [...fn, 'native'], - Vp = 0xffffffffffffffffn, - Hn = 1n; -function Qp() { - let e = Hn++; - return (Hn > Vp && (Hn = 1n), e); -} -var Xt = class { - name = 'LibraryEngine'; - engine; - libraryInstantiationPromise; - libraryStartingPromise; - libraryStoppingPromise; - libraryStarted; - executingQueryPromise; - config; - QueryEngineConstructor; - libraryLoader; - library; - logEmitter; - libQueryEnginePath; - binaryTarget; - datasourceOverrides; - datamodel; - logQueries; - logLevel; - lastQuery; - loggerRustPanic; - tracingHelper; - adapterPromise; - versionInfo; - constructor(t, r) { - ((this.libraryLoader = Us), - (this.config = t), - (this.libraryStarted = !1), - (this.logQueries = t.logQueries ?? !1), - (this.logLevel = t.logLevel ?? 'error'), - (this.logEmitter = t.logEmitter), - (this.datamodel = t.inlineSchema), - (this.tracingHelper = t.tracingHelper), - t.enableDebugLogs && (this.logLevel = 'debug')); - let n = Object.keys(t.overrideDatasources)[0], - i = t.overrideDatasources[n]?.url; - (n !== void 0 && i !== void 0 && (this.datasourceOverrides = { [n]: i }), - (this.libraryInstantiationPromise = this.instantiateLibrary())); - } - wrapEngine(t) { - return { - applyPendingMigrations: t.applyPendingMigrations?.bind(t), - commitTransaction: this.withRequestId(t.commitTransaction.bind(t)), - connect: this.withRequestId(t.connect.bind(t)), - disconnect: this.withRequestId(t.disconnect.bind(t)), - metrics: t.metrics?.bind(t), - query: this.withRequestId(t.query.bind(t)), - rollbackTransaction: this.withRequestId(t.rollbackTransaction.bind(t)), - sdlSchema: t.sdlSchema?.bind(t), - startTransaction: this.withRequestId(t.startTransaction.bind(t)), - trace: t.trace.bind(t), - free: t.free?.bind(t), - }; - } - withRequestId(t) { - return async (...r) => { - let n = Qp().toString(); - try { - return await t(...r, n); - } finally { - if (this.tracingHelper.isEnabled()) { - let i = await this.engine?.trace(n); - if (i) { - let o = JSON.parse(i); - this.tracingHelper.dispatchEngineSpans(o.spans); - } - } - } - }; - } - async applyPendingMigrations() { - (await this.start(), await this.engine?.applyPendingMigrations()); - } - async transaction(t, r, n) { - await this.start(); - let i = await this.adapterPromise, - o = JSON.stringify(r), - s; - if (t === 'start') { - let l = JSON.stringify({ max_wait: n.maxWait, timeout: n.timeout, isolation_level: n.isolationLevel }); - s = await this.engine?.startTransaction(l, o); - } else - t === 'commit' - ? (s = await this.engine?.commitTransaction(n.id, o)) - : t === 'rollback' && (s = await this.engine?.rollbackTransaction(n.id, o)); - let a = this.parseEngineResponse(s); - if (Jp(a)) { - let l = this.getExternalAdapterError(a, i?.errorRegistry); - throw l - ? l.error - : new se(a.message, { code: a.error_code, clientVersion: this.config.clientVersion, meta: a.meta }); - } else if (typeof a.message == 'string') throw new G(a.message, { clientVersion: this.config.clientVersion }); - return a; - } - async instantiateLibrary() { - if ((Te('internalSetup'), this.libraryInstantiationPromise)) return this.libraryInstantiationPromise; - ((this.binaryTarget = await this.getCurrentBinaryTarget()), - await this.tracingHelper.runInChildSpan('load_engine', () => this.loadEngine()), - this.version()); - } - async getCurrentBinaryTarget() {} - parseEngineResponse(t) { - if (!t) throw new G('Response from the Engine was empty', { clientVersion: this.config.clientVersion }); - try { - return JSON.parse(t); - } catch { - throw new G('Unable to JSON.parse response from engine', { clientVersion: this.config.clientVersion }); - } - } - async loadEngine() { - if (!this.engine) { - this.QueryEngineConstructor || - ((this.library = await this.libraryLoader.loadLibrary(this.config)), - (this.QueryEngineConstructor = this.library.QueryEngine)); - try { - let t = new b(this); - this.adapterPromise || (this.adapterPromise = this.config.adapter?.connect()?.then(ar)); - let r = await this.adapterPromise; - (r && Te('Using driver adapter: %O', r), - (this.engine = this.wrapEngine( - new this.QueryEngineConstructor( - { - datamodel: this.datamodel, - env: y.env, - logQueries: this.config.logQueries ?? !1, - ignoreEnvVarErrors: !0, - datasourceOverrides: this.datasourceOverrides ?? {}, - logLevel: this.logLevel, - configDir: this.config.cwd, - engineProtocol: 'json', - enableTracing: this.tracingHelper.isEnabled(), - }, - (n) => { - t.deref()?.logger(n); - }, - r - ) - ))); - } catch (t) { - let r = t, - n = this.parseInitError(r.message); - throw typeof n == 'string' ? r : new Q(n.message, this.config.clientVersion, n.error_code); - } - } - } - logger(t) { - let r = this.parseEngineResponse(t); - r && - ((r.level = r?.level.toLowerCase() ?? 'unknown'), - Up(r) - ? this.logEmitter.emit('query', { - timestamp: new Date(), - query: r.query, - params: r.params, - duration: Number(r.duration_ms), - target: r.module_path, - }) - : $p(r) - ? (this.loggerRustPanic = new ce( - Yn(this, `${r.message}: ${r.reason} in ${r.file}:${r.line}:${r.column}`), - this.config.clientVersion - )) - : this.logEmitter.emit(r.level, { timestamp: new Date(), message: r.message, target: r.module_path })); - } - parseInitError(t) { - try { - return JSON.parse(t); - } catch {} - return t; - } - parseRequestError(t) { - try { - return JSON.parse(t); - } catch {} - return t; - } - onBeforeExit() { - throw new Error( - '"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.' - ); - } - async start() { - if ( - (this.libraryInstantiationPromise || (this.libraryInstantiationPromise = this.instantiateLibrary()), - await this.libraryInstantiationPromise, - await this.libraryStoppingPromise, - this.libraryStartingPromise) - ) - return (Te(`library already starting, this.libraryStarted: ${this.libraryStarted}`), this.libraryStartingPromise); - if (this.libraryStarted) return; - let t = async () => { - Te('library starting'); - try { - let r = { traceparent: this.tracingHelper.getTraceParent() }; - (await this.engine?.connect(JSON.stringify(r)), - (this.libraryStarted = !0), - this.adapterPromise || (this.adapterPromise = this.config.adapter?.connect()?.then(ar)), - await this.adapterPromise, - Te('library started')); - } catch (r) { - let n = this.parseInitError(r.message); - throw typeof n == 'string' ? r : new Q(n.message, this.config.clientVersion, n.error_code); - } finally { - this.libraryStartingPromise = void 0; - } - }; - return ( - (this.libraryStartingPromise = this.tracingHelper.runInChildSpan('connect', t)), - this.libraryStartingPromise - ); - } - async stop() { - if ( - (await this.libraryInstantiationPromise, - await this.libraryStartingPromise, - await this.executingQueryPromise, - this.libraryStoppingPromise) - ) - return (Te('library is already stopping'), this.libraryStoppingPromise); - if (!this.libraryStarted) { - (await (await this.adapterPromise)?.dispose(), (this.adapterPromise = void 0)); - return; - } - let t = async () => { - (await new Promise((n) => setImmediate(n)), Te('library stopping')); - let r = { traceparent: this.tracingHelper.getTraceParent() }; - (await this.engine?.disconnect(JSON.stringify(r)), - this.engine?.free && this.engine.free(), - (this.engine = void 0), - (this.libraryStarted = !1), - (this.libraryStoppingPromise = void 0), - (this.libraryInstantiationPromise = void 0), - await (await this.adapterPromise)?.dispose(), - (this.adapterPromise = void 0), - Te('library stopped')); - }; - return ( - (this.libraryStoppingPromise = this.tracingHelper.runInChildSpan('disconnect', t)), - this.libraryStoppingPromise - ); - } - version() { - return ((this.versionInfo = this.library?.version()), this.versionInfo?.version ?? 'unknown'); - } - debugPanic(t) { - return this.library?.debugPanic(t); - } - async request(t, { traceparent: r, interactiveTransaction: n }) { - Te(`sending request, this.libraryStarted: ${this.libraryStarted}`); - let i = JSON.stringify({ traceparent: r }), - o = JSON.stringify(t); - try { - await this.start(); - let s = await this.adapterPromise; - ((this.executingQueryPromise = this.engine?.query(o, i, n?.id)), (this.lastQuery = o)); - let a = this.parseEngineResponse(await this.executingQueryPromise); - if (a.errors) - throw a.errors.length === 1 - ? this.buildQueryError(a.errors[0], s?.errorRegistry) - : new G(JSON.stringify(a.errors), { clientVersion: this.config.clientVersion }); - if (this.loggerRustPanic) throw this.loggerRustPanic; - return { data: a }; - } catch (s) { - if (s instanceof Q) throw s; - if (s.code === 'GenericFailure' && s.message?.startsWith('PANIC:')) - throw new ce(Yn(this, s.message), this.config.clientVersion); - let a = this.parseRequestError(s.message); - throw typeof a == 'string' - ? s - : new G( - `${a.message} -${a.backtrace}`, - { clientVersion: this.config.clientVersion } - ); - } - } - async requestBatch(t, { transaction: r, traceparent: n }) { - Te('requestBatch'); - let i = $r(t, r); - await this.start(); - let o = await this.adapterPromise; - ((this.lastQuery = JSON.stringify(i)), - (this.executingQueryPromise = this.engine?.query(this.lastQuery, JSON.stringify({ traceparent: n }), js(r)))); - let s = await this.executingQueryPromise, - a = this.parseEngineResponse(s); - if (a.errors) - throw a.errors.length === 1 - ? this.buildQueryError(a.errors[0], o?.errorRegistry) - : new G(JSON.stringify(a.errors), { clientVersion: this.config.clientVersion }); - let { batchResult: l, errors: u } = a; - if (Array.isArray(l)) - return l.map((g) => - g.errors && g.errors.length > 0 - ? (this.loggerRustPanic ?? this.buildQueryError(g.errors[0], o?.errorRegistry)) - : { data: g } - ); - throw u && u.length === 1 ? new Error(u[0].error) : new Error(JSON.stringify(a)); - } - buildQueryError(t, r) { - if (t.user_facing_error.is_panic) return new ce(Yn(this, t.user_facing_error.message), this.config.clientVersion); - let n = this.getExternalAdapterError(t.user_facing_error, r); - return n ? n.error : Vr(t, this.config.clientVersion, this.config.activeProvider); - } - getExternalAdapterError(t, r) { - if (t.error_code === jp && r) { - let n = t.meta?.id; - lr(typeof n == 'number', 'Malformed external JS error received from the engine'); - let i = r.consumeError(n); - return (lr(i, 'External error with reported id was not registered'), i); - } - } - async metrics(t) { - await this.start(); - let r = await this.engine.metrics(JSON.stringify(t)); - return t.format === 'prometheus' ? r : this.parseEngineResponse(r); - } -}; -function Jp(e) { - return typeof e == 'object' && e !== null && e.error_code !== void 0; -} -function Yn(e, t) { - return Ns({ - binaryTarget: e.binaryTarget, - title: t, - version: e.config.clientVersion, - engineVersion: e.versionInfo?.commit, - database: e.config.activeProvider, - query: e.lastQuery, - }); -} -m(); -c(); -p(); -d(); -f(); -function $s({ url: e, adapter: t, copyEngine: r, targetBuildType: n }) { - let i = [], - o = [], - s = (S) => { - i.push({ _tag: 'warning', value: S }); - }, - a = (S) => { - let F = S.join(` -`); - o.push({ _tag: 'error', value: F }); - }, - l = !!e?.startsWith('prisma://'), - u = bn(e), - g = !!t, - h = l || u; - !g && - r && - h && - s([ - 'recommend--no-engine', - 'In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)', - ]); - let T = h || !r; - g && - (T || n === 'edge') && - (n === 'edge' - ? a([ - 'Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.', - 'Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor.', - ]) - : r - ? l && - a([ - 'Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.', - 'Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor.', - ]) - : a([ - 'Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.', - 'Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter.', - ])); - let k = { accelerate: T, ppg: u, driverAdapters: g }; - function A(S) { - return S.length > 0; - } - return A(o) - ? { ok: !1, diagnostics: { warnings: i, errors: o }, isUsing: k } - : { ok: !0, diagnostics: { warnings: i }, isUsing: k }; -} -function Vs({ copyEngine: e = !0 }, t) { - let r; - try { - r = Gr({ - inlineDatasources: t.inlineDatasources, - overrideDatasources: t.overrideDatasources, - env: { ...t.env, ...y.env }, - clientVersion: t.clientVersion, - }); - } catch {} - let { - ok: n, - isUsing: i, - diagnostics: o, - } = $s({ url: r, adapter: t.adapter, copyEngine: e, targetBuildType: 'react-native' }); - for (let h of o.warnings) Dt(...h.value); - if (!n) { - let h = o.errors[0]; - throw new te(h.value, { clientVersion: t.clientVersion }); - } - let s = it(t.generator), - a = s === 'library', - l = s === 'binary', - u = s === 'client', - g = (i.accelerate || i.ppg) && !i.driverAdapters; - return new Xt(t); -} -m(); -c(); -p(); -d(); -f(); -function Wr({ generator: e }) { - return e?.previewFeatures ?? []; -} -m(); -c(); -p(); -d(); -f(); -var Qs = (e) => ({ command: e }); -m(); -c(); -p(); -d(); -f(); -m(); -c(); -p(); -d(); -f(); -var Js = (e) => e.strings.reduce((t, r, n) => `${t}@P${n}${r}`); -m(); -c(); -p(); -d(); -f(); -function Pt(e) { - try { - return Gs(e, 'fast'); - } catch { - return Gs(e, 'slow'); - } -} -function Gs(e, t) { - return JSON.stringify(e.map((r) => Ks(r, t))); -} -function Ks(e, t) { - if (Array.isArray(e)) return e.map((r) => Ks(r, t)); - if (typeof e == 'bigint') return { prisma__type: 'bigint', prisma__value: e.toString() }; - if (ot(e)) return { prisma__type: 'date', prisma__value: e.toJSON() }; - if (_e.isDecimal(e)) return { prisma__type: 'decimal', prisma__value: e.toJSON() }; - if (w.Buffer.isBuffer(e)) return { prisma__type: 'bytes', prisma__value: e.toString('base64') }; - if (Gp(e)) return { prisma__type: 'bytes', prisma__value: w.Buffer.from(e).toString('base64') }; - if (ArrayBuffer.isView(e)) { - let { buffer: r, byteOffset: n, byteLength: i } = e; - return { prisma__type: 'bytes', prisma__value: w.Buffer.from(r, n, i).toString('base64') }; - } - return typeof e == 'object' && t === 'slow' ? zs(e) : e; -} -function Gp(e) { - return e instanceof ArrayBuffer || e instanceof SharedArrayBuffer - ? !0 - : typeof e == 'object' && e !== null - ? e[Symbol.toStringTag] === 'ArrayBuffer' || e[Symbol.toStringTag] === 'SharedArrayBuffer' - : !1; -} -function zs(e) { - if (typeof e != 'object' || e === null) return e; - if (typeof e.toJSON == 'function') return e.toJSON(); - if (Array.isArray(e)) return e.map(Ws); - let t = {}; - for (let r of Object.keys(e)) t[r] = Ws(e[r]); - return t; -} -function Ws(e) { - return typeof e == 'bigint' ? e.toString() : zs(e); -} -var Wp = /^(\s*alter\s)/i, - Hs = z('prisma:client'); -function Zn(e, t, r, n) { - if (!(e !== 'postgresql' && e !== 'cockroachdb') && r.length > 0 && Wp.exec(t)) - throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`); -} -var Xn = - ({ clientMethod: e, activeProvider: t }) => - (r) => { - let n = '', - i; - if (qr(r)) ((n = r.sql), (i = { values: Pt(r.values), __prismaRawParameters__: !0 })); - else if (Array.isArray(r)) { - let [o, ...s] = r; - ((n = o), (i = { values: Pt(s || []), __prismaRawParameters__: !0 })); - } else - switch (t) { - case 'sqlite': - case 'mysql': { - ((n = r.sql), (i = { values: Pt(r.values), __prismaRawParameters__: !0 })); - break; - } - case 'cockroachdb': - case 'postgresql': - case 'postgres': { - ((n = r.text), (i = { values: Pt(r.values), __prismaRawParameters__: !0 })); - break; - } - case 'sqlserver': { - ((n = Js(r)), (i = { values: Pt(r.values), __prismaRawParameters__: !0 })); - break; - } - default: - throw new Error(`The ${t} provider does not support ${e}`); - } - return (i?.values ? Hs(`prisma.${e}(${n}, ${i.values})`) : Hs(`prisma.${e}(${n})`), { query: n, parameters: i }); - }, - Ys = { - requestArgsToMiddlewareArgs(e) { - return [e.strings, ...e.values]; - }, - middlewareArgsToRequestArgs(e) { - let [t, ...r] = e; - return new le(t, r); - }, - }, - Zs = { - requestArgsToMiddlewareArgs(e) { - return [e]; - }, - middlewareArgsToRequestArgs(e) { - return e[0]; - }, - }; -m(); -c(); -p(); -d(); -f(); -function ei(e) { - return function (r, n) { - let i, - o = (s = e) => { - try { - return s === void 0 || s?.kind === 'itx' ? (i ??= Xs(r(s))) : Xs(r(s)); - } catch (a) { - return Promise.reject(a); - } - }; - return { - get spec() { - return n; - }, - then(s, a) { - return o().then(s, a); - }, - catch(s) { - return o().catch(s); - }, - finally(s) { - return o().finally(s); - }, - requestTransaction(s) { - let a = o(s); - return a.requestTransaction ? a.requestTransaction(s) : a; - }, - [Symbol.toStringTag]: 'PrismaPromise', - }; - }; -} -function Xs(e) { - return typeof e.then == 'function' ? e : Promise.resolve(e); -} -m(); -c(); -p(); -d(); -f(); -var Kp = gn.split('.')[0], - zp = { - isEnabled() { - return !1; - }, - getTraceParent() { - return '00-10-10-00'; - }, - dispatchEngineSpans() {}, - getActiveContext() {}, - runInChildSpan(e, t) { - return t(); - }, - }, - ti = class { - isEnabled() { - return this.getGlobalTracingHelper().isEnabled(); - } - getTraceParent(t) { - return this.getGlobalTracingHelper().getTraceParent(t); - } - dispatchEngineSpans(t) { - return this.getGlobalTracingHelper().dispatchEngineSpans(t); - } - getActiveContext() { - return this.getGlobalTracingHelper().getActiveContext(); - } - runInChildSpan(t, r) { - return this.getGlobalTracingHelper().runInChildSpan(t, r); - } - getGlobalTracingHelper() { - let t = globalThis[`V${Kp}_PRISMA_INSTRUMENTATION`], - r = globalThis.PRISMA_INSTRUMENTATION; - return t?.helper ?? r?.helper ?? zp; - } - }; -function ea() { - return new ti(); -} -m(); -c(); -p(); -d(); -f(); -function ta(e, t = () => {}) { - let r, - n = new Promise((i) => (r = i)); - return { - then(i) { - return (--e === 0 && r(t()), i?.(n)); - }, - }; -} -m(); -c(); -p(); -d(); -f(); -function ra(e) { - return typeof e == 'string' - ? e - : e.reduce( - (t, r) => { - let n = typeof r == 'string' ? r : r.level; - return n === 'query' ? t : t && (r === 'info' || t === 'info') ? 'info' : n; - }, - void 0 - ); -} -m(); -c(); -p(); -d(); -f(); -var ia = Se(xn()); -m(); -c(); -p(); -d(); -f(); -function Kr(e) { - return typeof e.batchRequestIdx == 'number'; -} -m(); -c(); -p(); -d(); -f(); -function na(e) { - if (e.action !== 'findUnique' && e.action !== 'findUniqueOrThrow') return; - let t = []; - return ( - e.modelName && t.push(e.modelName), - e.query.arguments && t.push(ri(e.query.arguments)), - t.push(ri(e.query.selection)), - t.join('') - ); -} -function ri(e) { - return `(${Object.keys(e) - .sort() - .map((r) => { - let n = e[r]; - return typeof n == 'object' && n !== null ? `(${r} ${ri(n)})` : r; - }) - .join(' ')})`; -} -m(); -c(); -p(); -d(); -f(); -var Hp = { - aggregate: !1, - aggregateRaw: !1, - createMany: !0, - createManyAndReturn: !0, - createOne: !0, - deleteMany: !0, - deleteOne: !0, - executeRaw: !0, - findFirst: !1, - findFirstOrThrow: !1, - findMany: !1, - findRaw: !1, - findUnique: !1, - findUniqueOrThrow: !1, - groupBy: !1, - queryRaw: !1, - runCommandRaw: !0, - updateMany: !0, - updateManyAndReturn: !0, - updateOne: !0, - upsertOne: !0, -}; -function ni(e) { - return Hp[e]; -} -m(); -c(); -p(); -d(); -f(); -var zr = class { - constructor(t) { - this.options = t; - this.batches = {}; - } - batches; - tickActive = !1; - request(t) { - let r = this.options.batchBy(t); - return r - ? (this.batches[r] || - ((this.batches[r] = []), - this.tickActive || - ((this.tickActive = !0), - y.nextTick(() => { - (this.dispatchBatches(), (this.tickActive = !1)); - }))), - new Promise((n, i) => { - this.batches[r].push({ request: t, resolve: n, reject: i }); - })) - : this.options.singleLoader(t); - } - dispatchBatches() { - for (let t in this.batches) { - let r = this.batches[t]; - (delete this.batches[t], - r.length === 1 - ? this.options - .singleLoader(r[0].request) - .then((n) => { - n instanceof Error ? r[0].reject(n) : r[0].resolve(n); - }) - .catch((n) => { - r[0].reject(n); - }) - : (r.sort((n, i) => this.options.batchOrder(n.request, i.request)), - this.options - .batchLoader(r.map((n) => n.request)) - .then((n) => { - if (n instanceof Error) for (let i = 0; i < r.length; i++) r[i].reject(n); - else - for (let i = 0; i < r.length; i++) { - let o = n[i]; - o instanceof Error ? r[i].reject(o) : r[i].resolve(o); - } - }) - .catch((n) => { - for (let i = 0; i < r.length; i++) r[i].reject(n); - }))); - } - } - get [Symbol.toStringTag]() { - return 'DataLoader'; - } -}; -m(); -c(); -p(); -d(); -f(); -function Ye(e, t) { - if (t === null) return t; - switch (e) { - case 'bigint': - return BigInt(t); - case 'bytes': { - let { buffer: r, byteOffset: n, byteLength: i } = w.Buffer.from(t, 'base64'); - return new Uint8Array(r, n, i); - } - case 'decimal': - return new _e(t); - case 'datetime': - case 'date': - return new Date(t); - case 'time': - return new Date(`1970-01-01T${t}Z`); - case 'bigint-array': - return t.map((r) => Ye('bigint', r)); - case 'bytes-array': - return t.map((r) => Ye('bytes', r)); - case 'decimal-array': - return t.map((r) => Ye('decimal', r)); - case 'datetime-array': - return t.map((r) => Ye('datetime', r)); - case 'date-array': - return t.map((r) => Ye('date', r)); - case 'time-array': - return t.map((r) => Ye('time', r)); - default: - return t; - } -} -function Hr(e) { - let t = [], - r = Yp(e); - for (let n = 0; n < e.rows.length; n++) { - let i = e.rows[n], - o = { ...r }; - for (let s = 0; s < i.length; s++) o[e.columns[s]] = Ye(e.types[s], i[s]); - t.push(o); - } - return t; -} -function Yp(e) { - let t = {}; - for (let r = 0; r < e.columns.length; r++) t[e.columns[r]] = null; - return t; -} -var Zp = z('prisma:client:request_handler'), - Yr = class { - client; - dataloader; - logEmitter; - constructor(t, r) { - ((this.logEmitter = r), - (this.client = t), - (this.dataloader = new zr({ - batchLoader: Cs(async ({ requests: n, customDataProxyFetch: i }) => { - let { transaction: o, otelParentCtx: s } = n[0], - a = n.map((h) => h.protocolQuery), - l = this.client._tracingHelper.getTraceParent(s), - u = n.some((h) => ni(h.protocolQuery.action)); - return ( - await this.client._engine.requestBatch(a, { - traceparent: l, - transaction: Xp(o), - containsWrite: u, - customDataProxyFetch: i, - }) - ).map((h, T) => { - if (h instanceof Error) return h; - try { - return this.mapQueryEngineResult(n[T], h); - } catch (k) { - return k; - } - }); - }), - singleLoader: async (n) => { - let i = n.transaction?.kind === 'itx' ? oa(n.transaction) : void 0, - o = await this.client._engine.request(n.protocolQuery, { - traceparent: this.client._tracingHelper.getTraceParent(), - interactiveTransaction: i, - isWrite: ni(n.protocolQuery.action), - customDataProxyFetch: n.customDataProxyFetch, - }); - return this.mapQueryEngineResult(n, o); - }, - batchBy: (n) => (n.transaction?.id ? `transaction-${n.transaction.id}` : na(n.protocolQuery)), - batchOrder(n, i) { - return n.transaction?.kind === 'batch' && i.transaction?.kind === 'batch' - ? n.transaction.index - i.transaction.index - : 0; - }, - }))); - } - async request(t) { - try { - return await this.dataloader.request(t); - } catch (r) { - let { clientMethod: n, callsite: i, transaction: o, args: s, modelName: a } = t; - this.handleAndLogRequestError({ - error: r, - clientMethod: n, - callsite: i, - transaction: o, - args: s, - modelName: a, - globalOmit: t.globalOmit, - }); - } - } - mapQueryEngineResult({ dataPath: t, unpacker: r }, n) { - let i = n?.data, - o = this.unpack(i, t, r); - return y.env.PRISMA_CLIENT_GET_TIME ? { data: o } : o; - } - handleAndLogRequestError(t) { - try { - this.handleRequestError(t); - } catch (r) { - throw ( - this.logEmitter && - this.logEmitter.emit('error', { message: r.message, target: t.clientMethod, timestamp: new Date() }), - r - ); - } - } - handleRequestError({ - error: t, - clientMethod: r, - callsite: n, - transaction: i, - args: o, - modelName: s, - globalOmit: a, - }) { - if ((Zp(t), ed(t, i))) throw t; - if (t instanceof se && td(t)) { - let u = sa(t.meta); - Fr({ - args: o, - errors: [u], - callsite: n, - errorFormat: this.client._errorFormat, - originalMethod: r, - clientVersion: this.client._clientVersion, - globalOmit: a, - }); - } - let l = t.message; - if ( - (n && - (l = Pr({ - callsite: n, - originalMethod: r, - isPanic: t.isPanic, - showColors: this.client._errorFormat === 'pretty', - message: l, - })), - (l = this.sanitizeMessage(l)), - t.code) - ) { - let u = s ? { modelName: s, ...t.meta } : t.meta; - throw new se(l, { - code: t.code, - clientVersion: this.client._clientVersion, - meta: u, - batchRequestIdx: t.batchRequestIdx, - }); - } else { - if (t.isPanic) throw new ce(l, this.client._clientVersion); - if (t instanceof G) - throw new G(l, { clientVersion: this.client._clientVersion, batchRequestIdx: t.batchRequestIdx }); - if (t instanceof Q) throw new Q(l, this.client._clientVersion); - if (t instanceof ce) throw new ce(l, this.client._clientVersion); - } - throw ((t.clientVersion = this.client._clientVersion), t); - } - sanitizeMessage(t) { - return this.client._errorFormat && this.client._errorFormat !== 'pretty' ? (0, ia.default)(t) : t; - } - unpack(t, r, n) { - if (!t || (t.data && (t = t.data), !t)) return t; - let i = Object.keys(t)[0], - o = Object.values(t)[0], - s = r.filter((u) => u !== 'select' && u !== 'include'), - a = Qn(o, s), - l = i === 'queryRaw' ? Hr(a) : xt(a); - return n ? n(l) : l; - } - get [Symbol.toStringTag]() { - return 'RequestHandler'; - } - }; -function Xp(e) { - if (e) { - if (e.kind === 'batch') return { kind: 'batch', options: { isolationLevel: e.isolationLevel } }; - if (e.kind === 'itx') return { kind: 'itx', options: oa(e) }; - ze(e, 'Unknown transaction kind'); - } -} -function oa(e) { - return { id: e.id, payload: e.payload }; -} -function ed(e, t) { - return Kr(e) && t?.kind === 'batch' && e.batchRequestIdx !== t.index; -} -function td(e) { - return e.code === 'P2009' || e.code === 'P2012'; -} -function sa(e) { - if (e.kind === 'Union') return { kind: 'Union', errors: e.errors.map(sa) }; - if (Array.isArray(e.selectionPath)) { - let [, ...t] = e.selectionPath; - return { ...e, selectionPath: t }; - } - return e; -} -m(); -c(); -p(); -d(); -f(); -var aa = Bs; -m(); -c(); -p(); -d(); -f(); -var da = Se(In()); -m(); -c(); -p(); -d(); -f(); -var B = class extends Error { - constructor(t) { - (super( - t + - ` -Read more at https://pris.ly/d/client-constructor` - ), - (this.name = 'PrismaClientConstructorValidationError')); - } - get [Symbol.toStringTag]() { - return 'PrismaClientConstructorValidationError'; - } -}; -ue(B, 'PrismaClientConstructorValidationError'); -var la = ['datasources', 'datasourceUrl', 'errorFormat', 'adapter', 'log', 'transactionOptions', 'omit', '__internal'], - ua = ['pretty', 'colorless', 'minimal'], - ca = ['info', 'query', 'warn', 'error'], - rd = { - datasources: (e, { datasourceNames: t }) => { - if (e) { - if (typeof e != 'object' || Array.isArray(e)) - throw new B(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`); - for (let [r, n] of Object.entries(e)) { - if (!t.includes(r)) { - let i = vt(r, t) || ` Available datasources: ${t.join(', ')}`; - throw new B(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`); - } - if (typeof n != 'object' || Array.isArray(n)) - throw new B(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`); - if (n && typeof n == 'object') - for (let [i, o] of Object.entries(n)) { - if (i !== 'url') - throw new B(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`); - if (typeof o != 'string') - throw new B(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`); - } - } - } - }, - adapter: (e, t) => { - if (!e && it(t.generator) === 'client') - throw new B('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.'); - if (e === null) return; - if (e === void 0) - throw new B('"adapter" property must not be undefined, use null to conditionally disable driver adapters.'); - if (!Wr(t).includes('driverAdapters')) - throw new B( - '"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.' - ); - if (it(t.generator) === 'binary') - throw new B( - 'Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.' - ); - }, - datasourceUrl: (e) => { - if (typeof e < 'u' && typeof e != 'string') - throw new B(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`); - }, - errorFormat: (e) => { - if (e) { - if (typeof e != 'string') - throw new B(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`); - if (!ua.includes(e)) { - let t = vt(e, ua); - throw new B(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`); - } - } - }, - log: (e) => { - if (!e) return; - if (!Array.isArray(e)) - throw new B(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`); - function t(r) { - if (typeof r == 'string' && !ca.includes(r)) { - let n = vt(r, ca); - throw new B(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`); - } - } - for (let r of e) { - t(r); - let n = { - level: t, - emit: (i) => { - let o = ['stdout', 'event']; - if (!o.includes(i)) { - let s = vt(i, o); - throw new B( - `Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}` - ); - } - }, - }; - if (r && typeof r == 'object') - for (let [i, o] of Object.entries(r)) - if (n[i]) n[i](o); - else throw new B(`Invalid property ${i} for "log" provided to PrismaClient constructor`); - } - }, - transactionOptions: (e) => { - if (!e) return; - let t = e.maxWait; - if (t != null && t <= 0) - throw new B( - `Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0` - ); - let r = e.timeout; - if (r != null && r <= 0) - throw new B( - `Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0` - ); - }, - omit: (e, t) => { - if (typeof e != 'object') throw new B('"omit" option is expected to be an object.'); - if (e === null) throw new B('"omit" option can not be `null`'); - let r = []; - for (let [n, i] of Object.entries(e)) { - let o = id(n, t.runtimeDataModel); - if (!o) { - r.push({ kind: 'UnknownModel', modelKey: n }); - continue; - } - for (let [s, a] of Object.entries(i)) { - let l = o.fields.find((u) => u.name === s); - if (!l) { - r.push({ kind: 'UnknownField', modelKey: n, fieldName: s }); - continue; - } - if (l.relationName) { - r.push({ kind: 'RelationInOmit', modelKey: n, fieldName: s }); - continue; - } - typeof a != 'boolean' && r.push({ kind: 'InvalidFieldValue', modelKey: n, fieldName: s }); - } - } - if (r.length > 0) throw new B(od(e, r)); - }, - __internal: (e) => { - if (!e) return; - let t = ['debug', 'engine', 'configOverride']; - if (typeof e != 'object') - throw new B(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`); - for (let [r] of Object.entries(e)) - if (!t.includes(r)) { - let n = vt(r, t); - throw new B( - `Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}` - ); - } - }, - }; -function fa(e, t) { - for (let [r, n] of Object.entries(e)) { - if (!la.includes(r)) { - let i = vt(r, la); - throw new B(`Unknown property ${r} provided to PrismaClient constructor.${i}`); - } - rd[r](n, t); - } - if (e.datasourceUrl && e.datasources) - throw new B('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them'); -} -function vt(e, t) { - if (t.length === 0 || typeof e != 'string') return ''; - let r = nd(e, t); - return r ? ` Did you mean "${r}"?` : ''; -} -function nd(e, t) { - if (t.length === 0) return null; - let r = t.map((i) => ({ value: i, distance: (0, da.default)(e, i) })); - r.sort((i, o) => (i.distance < o.distance ? -1 : 1)); - let n = r[0]; - return n.distance < 3 ? n.value : null; -} -function id(e, t) { - return pa(t.models, e) ?? pa(t.types, e); -} -function pa(e, t) { - let r = Object.keys(e).find((n) => Ne(n) === t); - if (r) return e[r]; -} -function od(e, t) { - let r = ht(e); - for (let o of t) - switch (o.kind) { - case 'UnknownModel': - (r.arguments.getField(o.modelKey)?.markAsError(), - r.addErrorMessage(() => `Unknown model name: ${o.modelKey}.`)); - break; - case 'UnknownField': - (r.arguments.getDeepField([o.modelKey, o.fieldName])?.markAsError(), - r.addErrorMessage(() => `Model "${o.modelKey}" does not have a field named "${o.fieldName}".`)); - break; - case 'RelationInOmit': - (r.arguments.getDeepField([o.modelKey, o.fieldName])?.markAsError(), - r.addErrorMessage(() => 'Relations are already excluded by default and can not be specified in "omit".')); - break; - case 'InvalidFieldValue': - (r.arguments.getDeepFieldValue([o.modelKey, o.fieldName])?.markAsError(), - r.addErrorMessage(() => 'Omit field option value must be a boolean.')); - break; - } - let { message: n, args: i } = Ir(r, 'colorless'); - return `Error validating "omit" option: - -${i} - -${n}`; -} -m(); -c(); -p(); -d(); -f(); -function ma(e) { - return e.length === 0 - ? Promise.resolve([]) - : new Promise((t, r) => { - let n = new Array(e.length), - i = null, - o = !1, - s = 0, - a = () => { - o || (s++, s === e.length && ((o = !0), i ? r(i) : t(n))); - }, - l = (u) => { - o || ((o = !0), r(u)); - }; - for (let u = 0; u < e.length; u++) - e[u].then( - (g) => { - ((n[u] = g), a()); - }, - (g) => { - if (!Kr(g)) { - l(g); - return; - } - g.batchRequestIdx === u ? l(g) : (i || (i = g), a()); - } - ); - }); -} -var Qe = z('prisma:client'); -typeof globalThis == 'object' && (globalThis.NODE_CLIENT = !0); -var sd = { requestArgsToMiddlewareArgs: (e) => e, middlewareArgsToRequestArgs: (e) => e }, - ad = Symbol.for('prisma.client.transaction.id'), - ld = { - id: 0, - nextId() { - return ++this.id; - }, - }; -function ya(e) { - class t { - _originalClient = this; - _runtimeDataModel; - _requestHandler; - _connectionPromise; - _disconnectionPromise; - _engineConfig; - _accelerateEngineConfig; - _clientVersion; - _errorFormat; - _tracingHelper; - _previewFeatures; - _activeProvider; - _globalOmit; - _extensions; - _engine; - _appliedParent; - _createPrismaPromise = ei(); - constructor(n) { - ((e = n?.__internal?.configOverride?.(e) ?? e), Os(e), n && fa(n, e)); - let i = new Br().on('error', () => {}); - ((this._extensions = yt.empty()), - (this._previewFeatures = Wr(e)), - (this._clientVersion = e.clientVersion ?? aa), - (this._activeProvider = e.activeProvider), - (this._globalOmit = n?.omit), - (this._tracingHelper = ea())); - let o = e.relativeEnvPaths && { - rootEnvPath: e.relativeEnvPaths.rootEnvPath && Oe.resolve(e.dirname, e.relativeEnvPaths.rootEnvPath), - schemaEnvPath: e.relativeEnvPaths.schemaEnvPath && Oe.resolve(e.dirname, e.relativeEnvPaths.schemaEnvPath), - }, - s; - if (n?.adapter) { - s = n.adapter; - let l = e.activeProvider === 'postgresql' || e.activeProvider === 'cockroachdb' ? 'postgres' : e.activeProvider; - if (s.provider !== l) - throw new Q( - `The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${l}\` specified in the Prisma schema.`, - this._clientVersion - ); - if (n.datasources || n.datasourceUrl !== void 0) - throw new Q( - 'Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.', - this._clientVersion - ); - } - let a = e.injectableEdgeEnv?.(); - try { - let l = n ?? {}, - u = l.__internal ?? {}, - g = u.debug === !0; - g && z.enable('prisma:client'); - let h = Oe.resolve(e.dirname, e.relativePath); - (or.existsSync(h) || (h = e.dirname), - Qe('dirname', e.dirname), - Qe('relativePath', e.relativePath), - Qe('cwd', h)); - let T = u.engine || {}; - if ( - (l.errorFormat - ? (this._errorFormat = l.errorFormat) - : y.env.NODE_ENV === 'production' - ? (this._errorFormat = 'minimal') - : y.env.NO_COLOR - ? (this._errorFormat = 'colorless') - : (this._errorFormat = 'colorless'), - (this._runtimeDataModel = e.runtimeDataModel), - (this._engineConfig = { - cwd: h, - dirname: e.dirname, - enableDebugLogs: g, - allowTriggerPanic: T.allowTriggerPanic, - prismaPath: T.binaryPath ?? void 0, - engineEndpoint: T.endpoint, - generator: e.generator, - showColors: this._errorFormat === 'pretty', - logLevel: l.log && ra(l.log), - logQueries: - l.log && - !!(typeof l.log == 'string' - ? l.log === 'query' - : l.log.find((k) => (typeof k == 'string' ? k === 'query' : k.level === 'query'))), - env: a?.parsed ?? {}, - flags: [], - engineWasm: e.engineWasm, - compilerWasm: e.compilerWasm, - clientVersion: e.clientVersion, - engineVersion: e.engineVersion, - previewFeatures: this._previewFeatures, - activeProvider: e.activeProvider, - inlineSchema: e.inlineSchema, - overrideDatasources: Is(l, e.datasourceNames), - inlineDatasources: e.inlineDatasources, - inlineSchemaHash: e.inlineSchemaHash, - tracingHelper: this._tracingHelper, - transactionOptions: { - maxWait: l.transactionOptions?.maxWait ?? 2e3, - timeout: l.transactionOptions?.timeout ?? 5e3, - isolationLevel: l.transactionOptions?.isolationLevel, - }, - logEmitter: i, - isBundled: e.isBundled, - adapter: s, - }), - (this._accelerateEngineConfig = { - ...this._engineConfig, - accelerateUtils: { - resolveDatasourceUrl: Gr, - getBatchRequestPayload: $r, - prismaGraphQLToJSError: Vr, - PrismaClientUnknownRequestError: G, - PrismaClientInitializationError: Q, - PrismaClientKnownRequestError: se, - debug: z('prisma:client:accelerateEngine'), - engineVersion: ha.version, - clientVersion: e.clientVersion, - }, - }), - Qe('clientVersion', e.clientVersion), - (this._engine = Vs(e, this._engineConfig)), - (this._requestHandler = new Yr(this, i)), - l.log) - ) - for (let k of l.log) { - let A = typeof k == 'string' ? k : k.emit === 'stdout' ? k.level : null; - A && - this.$on(A, (S) => { - _t.log(`${_t.tags[A] ?? ''}`, S.message || S.query); - }); - } - } catch (l) { - throw ((l.clientVersion = this._clientVersion), l); - } - return (this._appliedParent = Yt(this)); - } - get [Symbol.toStringTag]() { - return 'PrismaClient'; - } - $on(n, i) { - return (n === 'beforeExit' ? this._engine.onBeforeExit(i) : n && this._engineConfig.logEmitter.on(n, i), this); - } - $connect() { - try { - return this._engine.start(); - } catch (n) { - throw ((n.clientVersion = this._clientVersion), n); - } - } - async $disconnect() { - try { - await this._engine.stop(); - } catch (n) { - throw ((n.clientVersion = this._clientVersion), n); - } finally { - Di(); - } - } - $executeRawInternal(n, i, o, s) { - let a = this._activeProvider; - return this._request({ - action: 'executeRaw', - args: o, - transaction: n, - clientMethod: i, - argsMapper: Xn({ clientMethod: i, activeProvider: a }), - callsite: Ve(this._errorFormat), - dataPath: [], - middlewareArgsMapper: s, - }); - } - $executeRaw(n, ...i) { - return this._createPrismaPromise((o) => { - if (n.raw !== void 0 || n.sql !== void 0) { - let [s, a] = ga(n, i); - return ( - Zn( - this._activeProvider, - s.text, - s.values, - Array.isArray(n) ? 'prisma.$executeRaw``' : 'prisma.$executeRaw(sql``)' - ), - this.$executeRawInternal(o, '$executeRaw', s, a) - ); - } - throw new te( - "`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n", - { clientVersion: this._clientVersion } - ); - }); - } - $executeRawUnsafe(n, ...i) { - return this._createPrismaPromise( - (o) => ( - Zn(this._activeProvider, n, i, 'prisma.$executeRawUnsafe(, [...values])'), - this.$executeRawInternal(o, '$executeRawUnsafe', [n, ...i]) - ) - ); - } - $runCommandRaw(n) { - if (e.activeProvider !== 'mongodb') - throw new te(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`, { - clientVersion: this._clientVersion, - }); - return this._createPrismaPromise((i) => - this._request({ - args: n, - clientMethod: '$runCommandRaw', - dataPath: [], - action: 'runCommandRaw', - argsMapper: Qs, - callsite: Ve(this._errorFormat), - transaction: i, - }) - ); - } - async $queryRawInternal(n, i, o, s) { - let a = this._activeProvider; - return this._request({ - action: 'queryRaw', - args: o, - transaction: n, - clientMethod: i, - argsMapper: Xn({ clientMethod: i, activeProvider: a }), - callsite: Ve(this._errorFormat), - dataPath: [], - middlewareArgsMapper: s, - }); - } - $queryRaw(n, ...i) { - return this._createPrismaPromise((o) => { - if (n.raw !== void 0 || n.sql !== void 0) return this.$queryRawInternal(o, '$queryRaw', ...ga(n, i)); - throw new te( - "`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n", - { clientVersion: this._clientVersion } - ); - }); - } - $queryRawTyped(n) { - return this._createPrismaPromise((i) => { - if (!this._hasPreviewFlag('typedSql')) - throw new te('`typedSql` preview feature must be enabled in order to access $queryRawTyped API', { - clientVersion: this._clientVersion, - }); - return this.$queryRawInternal(i, '$queryRawTyped', n); - }); - } - $queryRawUnsafe(n, ...i) { - return this._createPrismaPromise((o) => this.$queryRawInternal(o, '$queryRawUnsafe', [n, ...i])); - } - _transactionWithArray({ promises: n, options: i }) { - let o = ld.nextId(), - s = ta(n.length), - a = n.map((l, u) => { - if (l?.[Symbol.toStringTag] !== 'PrismaPromise') - throw new Error( - 'All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.' - ); - let g = i?.isolationLevel ?? this._engineConfig.transactionOptions.isolationLevel, - h = { kind: 'batch', id: o, index: u, isolationLevel: g, lock: s }; - return l.requestTransaction?.(h) ?? l; - }); - return ma(a); - } - async _transactionWithCallback({ callback: n, options: i }) { - let o = { traceparent: this._tracingHelper.getTraceParent() }, - s = { - maxWait: i?.maxWait ?? this._engineConfig.transactionOptions.maxWait, - timeout: i?.timeout ?? this._engineConfig.transactionOptions.timeout, - isolationLevel: i?.isolationLevel ?? this._engineConfig.transactionOptions.isolationLevel, - }, - a = await this._engine.transaction('start', o, s), - l; - try { - let u = { kind: 'itx', ...a }; - ((l = await n(this._createItxClient(u))), await this._engine.transaction('commit', o, a)); - } catch (u) { - throw (await this._engine.transaction('rollback', o, a).catch(() => {}), u); - } - return l; - } - _createItxClient(n) { - return ge( - Yt( - ge(gs(this), [ - ne('_appliedParent', () => this._appliedParent._createItxClient(n)), - ne('_createPrismaPromise', () => ei(n)), - ne(ad, () => n.id), - ]) - ), - [bt(Es)] - ); - } - $transaction(n, i) { - let o; - typeof n == 'function' - ? this._engineConfig.adapter?.adapterName === '@prisma/adapter-d1' - ? (o = () => { - throw new Error( - 'Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.' - ); - }) - : (o = () => this._transactionWithCallback({ callback: n, options: i })) - : (o = () => this._transactionWithArray({ promises: n, options: i })); - let s = { name: 'transaction', attributes: { method: '$transaction' } }; - return this._tracingHelper.runInChildSpan(s, o); - } - _request(n) { - n.otelParentCtx = this._tracingHelper.getActiveContext(); - let i = n.middlewareArgsMapper ?? sd, - o = { - args: i.requestArgsToMiddlewareArgs(n.args), - dataPath: n.dataPath, - runInTransaction: !!n.transaction, - action: n.action, - model: n.model, - }, - s = { - operation: { - name: 'operation', - attributes: { method: o.action, model: o.model, name: o.model ? `${o.model}.${o.action}` : o.action }, - }, - }, - a = async (l) => { - let { runInTransaction: u, args: g, ...h } = l, - T = { ...n, ...h }; - (g && (T.args = i.middlewareArgsToRequestArgs(g)), - n.transaction !== void 0 && u === !1 && delete T.transaction); - let k = await Ts(this, T); - return T.model - ? bs({ - result: k, - modelName: T.model, - args: T.args, - extensions: this._extensions, - runtimeDataModel: this._runtimeDataModel, - globalOmit: this._globalOmit, - }) - : k; - }; - return this._tracingHelper.runInChildSpan(s.operation, () => a(o)); - } - async _executeRequest({ - args: n, - clientMethod: i, - dataPath: o, - callsite: s, - action: a, - model: l, - argsMapper: u, - transaction: g, - unpacker: h, - otelParentCtx: T, - customDataProxyFetch: k, - }) { - try { - n = u ? u(n) : n; - let A = { name: 'serialize' }, - S = this._tracingHelper.runInChildSpan(A, () => - Lr({ - modelName: l, - runtimeDataModel: this._runtimeDataModel, - action: a, - args: n, - clientMethod: i, - callsite: s, - extensions: this._extensions, - errorFormat: this._errorFormat, - clientVersion: this._clientVersion, - previewFeatures: this._previewFeatures, - globalOmit: this._globalOmit, - }) - ); - return ( - z.enabled('prisma:client') && - (Qe('Prisma Client call:'), - Qe(`prisma.${i}(${is(n)})`), - Qe('Generated request:'), - Qe( - JSON.stringify(S, null, 2) + - ` -` - )), - g?.kind === 'batch' && (await g.lock), - this._requestHandler.request({ - protocolQuery: S, - modelName: l, - action: a, - clientMethod: i, - dataPath: o, - callsite: s, - args: n, - extensions: this._extensions, - transaction: g, - unpacker: h, - otelParentCtx: T, - otelChildCtx: this._tracingHelper.getActiveContext(), - globalOmit: this._globalOmit, - customDataProxyFetch: k, - }) - ); - } catch (A) { - throw ((A.clientVersion = this._clientVersion), A); - } - } - $metrics = new wt(this); - _hasPreviewFlag(n) { - return !!this._engineConfig.previewFeatures?.includes(n); - } - $applyPendingMigrations() { - return this._engine.applyPendingMigrations(); - } - $extends = hs; - } - return t; -} -function ga(e, t) { - return ud(e) ? [new le(e, t), Ys] : [e, Zs]; -} -function ud(e) { - return Array.isArray(e) && Array.isArray(e.raw); -} -m(); -c(); -p(); -d(); -f(); -var cd = new Set([ - 'toJSON', - '$$typeof', - 'asymmetricMatch', - Symbol.iterator, - Symbol.toStringTag, - Symbol.isConcatSpreadable, - Symbol.toPrimitive, -]); -function wa(e) { - return new Proxy(e, { - get(t, r) { - if (r in t) return t[r]; - if (!cd.has(r)) throw new TypeError(`Invalid enum value: ${String(r)}`); - }, - }); -} -m(); -c(); -p(); -d(); -f(); -0 && - (module.exports = { - DMMF, - Debug, - Decimal, - Extensions, - MetricsClient, - PrismaClientInitializationError, - PrismaClientKnownRequestError, - PrismaClientRustPanicError, - PrismaClientUnknownRequestError, - PrismaClientValidationError, - Public, - Sql, - createParam, - defineDmmfProperty, - deserializeJsonResponse, - deserializeRawResult, - dmmfToRuntimeDataModel, - empty, - getPrismaClient, - getRuntime, - join, - makeStrictEnum, - makeTypedQueryFactory, - objectEnumValues, - raw, - serializeJsonQuery, - skip, - sqltag, - warnEnvConflicts, - warnOnce, - }); -//# sourceMappingURL=react-native.js.map diff --git a/prisma/generated/client/runtime/wasm-compiler-edge.js b/prisma/generated/client/runtime/wasm-compiler-edge.js deleted file mode 100644 index 5afd15a..0000000 --- a/prisma/generated/client/runtime/wasm-compiler-edge.js +++ /dev/null @@ -1,10595 +0,0 @@ -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ -'use strict'; -var gc = Object.create; -var Kr = Object.defineProperty; -var yc = Object.getOwnPropertyDescriptor; -var hc = Object.getOwnPropertyNames; -var wc = Object.getPrototypeOf, - bc = Object.prototype.hasOwnProperty; -var ye = (e, t) => () => (e && (t = e((e = 0))), t); -var se = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), - pt = (e, t) => { - for (var r in t) Kr(e, r, { get: t[r], enumerable: !0 }); - }, - Bo = (e, t, r, n) => { - if ((t && typeof t == 'object') || typeof t == 'function') - for (let i of hc(t)) - !bc.call(e, i) && i !== r && Kr(e, i, { get: () => t[i], enumerable: !(n = yc(t, i)) || n.enumerable }); - return e; - }; -var Ae = (e, t, r) => ( - (r = e != null ? gc(wc(e)) : {}), - Bo(t || !e || !e.__esModule ? Kr(r, 'default', { value: e, enumerable: !0 }) : r, e) - ), - jo = (e) => Bo(Kr({}, '__esModule', { value: !0 }), e); -function ci(e, t) { - if (((t = t.toLowerCase()), t === 'utf8' || t === 'utf-8')) return new h(Tc.encode(e)); - if (t === 'base64' || t === 'base64url') - return ( - (e = e.replace(/-/g, '+').replace(/_/g, '/')), - (e = e.replace(/[^A-Za-z0-9+/]/g, '')), - new h([...atob(e)].map((r) => r.charCodeAt(0))) - ); - if (t === 'binary' || t === 'ascii' || t === 'latin1' || t === 'latin-1') - return new h([...e].map((r) => r.charCodeAt(0))); - if (t === 'ucs2' || t === 'ucs-2' || t === 'utf16le' || t === 'utf-16le') { - let r = new h(e.length * 2), - n = new DataView(r.buffer); - for (let i = 0; i < e.length; i++) n.setUint16(i * 2, e.charCodeAt(i), !0); - return r; - } - if (t === 'hex') { - let r = new h(e.length / 2); - for (let n = 0, i = 0; i < e.length; i += 2, n++) r[n] = parseInt(e.slice(i, i + 2), 16); - return r; - } - Ho(`encoding "${t}"`); -} -function Ec(e) { - let r = Object.getOwnPropertyNames(DataView.prototype).filter((a) => a.startsWith('get') || a.startsWith('set')), - n = r.map((a) => a.replace('get', 'read').replace('set', 'write')), - i = (a, f) => - function (w = 0) { - return ( - Y(w, 'offset'), - de(w, 'offset'), - ee(w, 'offset', this.length - 1), - new DataView(this.buffer)[r[a]](w, f) - ); - }, - o = (a, f) => - function (w, A = 0) { - let C = r[a].match(/set(\w+\d+)/)[1].toLowerCase(), - I = Pc[C]; - return ( - Y(A, 'offset'), - de(A, 'offset'), - ee(A, 'offset', this.length - 1), - xc(w, 'value', I[0], I[1]), - new DataView(this.buffer)[r[a]](A, w, f), - A + parseInt(r[a].match(/\d+/)[0]) / 8 - ); - }, - s = (a) => { - a.forEach((f) => { - (f.includes('Uint') && (e[f.replace('Uint', 'UInt')] = e[f]), - f.includes('Float64') && (e[f.replace('Float64', 'Double')] = e[f]), - f.includes('Float32') && (e[f.replace('Float32', 'Float')] = e[f])); - }); - }; - n.forEach((a, f) => { - (a.startsWith('read') && ((e[a] = i(f, !1)), (e[a + 'LE'] = i(f, !0)), (e[a + 'BE'] = i(f, !1))), - a.startsWith('write') && ((e[a] = o(f, !1)), (e[a + 'LE'] = o(f, !0)), (e[a + 'BE'] = o(f, !1))), - s([a, a + 'LE', a + 'BE'])); - }); -} -function Ho(e) { - throw new Error(`Buffer polyfill does not implement "${e}"`); -} -function zr(e, t) { - if (!(e instanceof Uint8Array)) - throw new TypeError(`The "${t}" argument must be an instance of Buffer or Uint8Array`); -} -function ee(e, t, r = Cc + 1) { - if (e < 0 || e > r) { - let n = new RangeError(`The value of "${t}" is out of range. It must be >= 0 && <= ${r}. Received ${e}`); - throw ((n.code = 'ERR_OUT_OF_RANGE'), n); - } -} -function Y(e, t) { - if (typeof e != 'number') { - let r = new TypeError(`The "${t}" argument must be of type number. Received type ${typeof e}.`); - throw ((r.code = 'ERR_INVALID_ARG_TYPE'), r); - } -} -function de(e, t) { - if (!Number.isInteger(e) || Number.isNaN(e)) { - let r = new RangeError(`The value of "${t}" is out of range. It must be an integer. Received ${e}`); - throw ((r.code = 'ERR_OUT_OF_RANGE'), r); - } -} -function xc(e, t, r, n) { - if (e < r || e > n) { - let i = new RangeError(`The value of "${t}" is out of range. It must be >= ${r} and <= ${n}. Received ${e}`); - throw ((i.code = 'ERR_OUT_OF_RANGE'), i); - } -} -function Qo(e, t) { - if (typeof e != 'string') { - let r = new TypeError(`The "${t}" argument must be of type string. Received type ${typeof e}`); - throw ((r.code = 'ERR_INVALID_ARG_TYPE'), r); - } -} -function Rc(e, t = 'utf8') { - return h.from(e, t); -} -var h, - Pc, - Tc, - vc, - Ac, - Cc, - y, - pi, - u = ye(() => { - 'use strict'; - h = class e extends Uint8Array { - _isBuffer = !0; - get offset() { - return this.byteOffset; - } - static alloc(t, r = 0, n = 'utf8') { - return (Qo(n, 'encoding'), e.allocUnsafe(t).fill(r, n)); - } - static allocUnsafe(t) { - return e.from(t); - } - static allocUnsafeSlow(t) { - return e.from(t); - } - static isBuffer(t) { - return t && !!t._isBuffer; - } - static byteLength(t, r = 'utf8') { - if (typeof t == 'string') return ci(t, r).byteLength; - if (t && t.byteLength) return t.byteLength; - let n = new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.'); - throw ((n.code = 'ERR_INVALID_ARG_TYPE'), n); - } - static isEncoding(t) { - return Ac.includes(t); - } - static compare(t, r) { - (zr(t, 'buff1'), zr(r, 'buff2')); - for (let n = 0; n < t.length; n++) { - if (t[n] < r[n]) return -1; - if (t[n] > r[n]) return 1; - } - return t.length === r.length ? 0 : t.length > r.length ? 1 : -1; - } - static from(t, r = 'utf8') { - if (t && typeof t == 'object' && t.type === 'Buffer') return new e(t.data); - if (typeof t == 'number') return new e(new Uint8Array(t)); - if (typeof t == 'string') return ci(t, r); - if (ArrayBuffer.isView(t)) { - let { byteOffset: n, byteLength: i, buffer: o } = t; - return 'map' in t && typeof t.map == 'function' - ? new e( - t.map((s) => s % 256), - n, - i - ) - : new e(o, n, i); - } - if (t && typeof t == 'object' && ('length' in t || 'byteLength' in t || 'buffer' in t)) return new e(t); - throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.'); - } - static concat(t, r) { - if (t.length === 0) return e.alloc(0); - let n = [].concat(...t.map((o) => [...o])), - i = e.alloc(r !== void 0 ? r : n.length); - return (i.set(r !== void 0 ? n.slice(0, r) : n), i); - } - slice(t = 0, r = this.length) { - return this.subarray(t, r); - } - subarray(t = 0, r = this.length) { - return Object.setPrototypeOf(super.subarray(t, r), e.prototype); - } - reverse() { - return (super.reverse(), this); - } - readIntBE(t, r) { - (Y(t, 'offset'), de(t, 'offset'), ee(t, 'offset', this.length - 1), Y(r, 'byteLength'), de(r, 'byteLength')); - let n = new DataView(this.buffer, t, r), - i = 0; - for (let o = 0; o < r; o++) i = i * 256 + n.getUint8(o); - return (n.getUint8(0) & 128 && (i -= Math.pow(256, r)), i); - } - readIntLE(t, r) { - (Y(t, 'offset'), de(t, 'offset'), ee(t, 'offset', this.length - 1), Y(r, 'byteLength'), de(r, 'byteLength')); - let n = new DataView(this.buffer, t, r), - i = 0; - for (let o = 0; o < r; o++) i += n.getUint8(o) * Math.pow(256, o); - return (n.getUint8(r - 1) & 128 && (i -= Math.pow(256, r)), i); - } - readUIntBE(t, r) { - (Y(t, 'offset'), de(t, 'offset'), ee(t, 'offset', this.length - 1), Y(r, 'byteLength'), de(r, 'byteLength')); - let n = new DataView(this.buffer, t, r), - i = 0; - for (let o = 0; o < r; o++) i = i * 256 + n.getUint8(o); - return i; - } - readUintBE(t, r) { - return this.readUIntBE(t, r); - } - readUIntLE(t, r) { - (Y(t, 'offset'), de(t, 'offset'), ee(t, 'offset', this.length - 1), Y(r, 'byteLength'), de(r, 'byteLength')); - let n = new DataView(this.buffer, t, r), - i = 0; - for (let o = 0; o < r; o++) i += n.getUint8(o) * Math.pow(256, o); - return i; - } - readUintLE(t, r) { - return this.readUIntLE(t, r); - } - writeIntBE(t, r, n) { - return ((t = t < 0 ? t + Math.pow(256, n) : t), this.writeUIntBE(t, r, n)); - } - writeIntLE(t, r, n) { - return ((t = t < 0 ? t + Math.pow(256, n) : t), this.writeUIntLE(t, r, n)); - } - writeUIntBE(t, r, n) { - (Y(r, 'offset'), de(r, 'offset'), ee(r, 'offset', this.length - 1), Y(n, 'byteLength'), de(n, 'byteLength')); - let i = new DataView(this.buffer, r, n); - for (let o = n - 1; o >= 0; o--) (i.setUint8(o, t & 255), (t = t / 256)); - return r + n; - } - writeUintBE(t, r, n) { - return this.writeUIntBE(t, r, n); - } - writeUIntLE(t, r, n) { - (Y(r, 'offset'), de(r, 'offset'), ee(r, 'offset', this.length - 1), Y(n, 'byteLength'), de(n, 'byteLength')); - let i = new DataView(this.buffer, r, n); - for (let o = 0; o < n; o++) (i.setUint8(o, t & 255), (t = t / 256)); - return r + n; - } - writeUintLE(t, r, n) { - return this.writeUIntLE(t, r, n); - } - toJSON() { - return { type: 'Buffer', data: Array.from(this) }; - } - swap16() { - let t = new DataView(this.buffer, this.byteOffset, this.byteLength); - for (let r = 0; r < this.length; r += 2) t.setUint16(r, t.getUint16(r, !0), !1); - return this; - } - swap32() { - let t = new DataView(this.buffer, this.byteOffset, this.byteLength); - for (let r = 0; r < this.length; r += 4) t.setUint32(r, t.getUint32(r, !0), !1); - return this; - } - swap64() { - let t = new DataView(this.buffer, this.byteOffset, this.byteLength); - for (let r = 0; r < this.length; r += 8) t.setBigUint64(r, t.getBigUint64(r, !0), !1); - return this; - } - compare(t, r = 0, n = t.length, i = 0, o = this.length) { - return ( - zr(t, 'target'), - Y(r, 'targetStart'), - Y(n, 'targetEnd'), - Y(i, 'sourceStart'), - Y(o, 'sourceEnd'), - ee(r, 'targetStart'), - ee(n, 'targetEnd', t.length), - ee(i, 'sourceStart'), - ee(o, 'sourceEnd', this.length), - e.compare(this.slice(i, o), t.slice(r, n)) - ); - } - equals(t) { - return (zr(t, 'otherBuffer'), this.length === t.length && this.every((r, n) => r === t[n])); - } - copy(t, r = 0, n = 0, i = this.length) { - (ee(r, 'targetStart'), - ee(n, 'sourceStart', this.length), - ee(i, 'sourceEnd'), - (r >>>= 0), - (n >>>= 0), - (i >>>= 0)); - let o = 0; - for (; n < i && !(this[n] === void 0 || t[r] === void 0); ) ((t[r] = this[n]), o++, n++, r++); - return o; - } - write(t, r, n, i = 'utf8') { - let o = typeof r == 'string' ? 0 : (r ?? 0), - s = typeof n == 'string' ? this.length - o : (n ?? this.length - o); - return ( - (i = typeof r == 'string' ? r : typeof n == 'string' ? n : i), - Y(o, 'offset'), - Y(s, 'length'), - ee(o, 'offset', this.length), - ee(s, 'length', this.length), - (i === 'ucs2' || i === 'ucs-2' || i === 'utf16le' || i === 'utf-16le') && (s = s - (s % 2)), - ci(t, i).copy(this, o, 0, s) - ); - } - fill(t = 0, r = 0, n = this.length, i = 'utf-8') { - let o = typeof r == 'string' ? 0 : r, - s = typeof n == 'string' ? this.length : n; - if ( - ((i = typeof r == 'string' ? r : typeof n == 'string' ? n : i), - (t = e.from(typeof t == 'number' ? [t] : (t ?? []), i)), - Qo(i, 'encoding'), - ee(o, 'offset', this.length), - ee(s, 'end', this.length), - t.length !== 0) - ) - for (let a = o; a < s; a += t.length) - super.set(t.slice(0, t.length + a >= this.length ? this.length - a : t.length), a); - return this; - } - includes(t, r = null, n = 'utf-8') { - return this.indexOf(t, r, n) !== -1; - } - lastIndexOf(t, r = null, n = 'utf-8') { - return this.indexOf(t, r, n, !0); - } - indexOf(t, r = null, n = 'utf-8', i = !1) { - let o = i ? this.findLastIndex.bind(this) : this.findIndex.bind(this); - n = typeof r == 'string' ? r : n; - let s = e.from(typeof t == 'number' ? [t] : t, n), - a = typeof r == 'string' ? 0 : r; - return ( - (a = typeof r == 'number' ? a : null), - (a = Number.isNaN(a) ? null : a), - (a ??= i ? this.length : 0), - (a = a < 0 ? this.length + a : a), - s.length === 0 && i === !1 - ? a >= this.length - ? this.length - : a - : s.length === 0 && i === !0 - ? (a >= this.length ? this.length : a) || this.length - : o((f, w) => (i ? w <= a : w >= a) && this[w] === s[0] && s.every((C, I) => this[w + I] === C)) - ); - } - toString(t = 'utf8', r = 0, n = this.length) { - if (((r = r < 0 ? 0 : r), (t = t.toString().toLowerCase()), n <= 0)) return ''; - if (t === 'utf8' || t === 'utf-8') return vc.decode(this.slice(r, n)); - if (t === 'base64' || t === 'base64url') { - let i = btoa(this.reduce((o, s) => o + pi(s), '')); - return t === 'base64url' ? i.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '') : i; - } - if (t === 'binary' || t === 'ascii' || t === 'latin1' || t === 'latin-1') - return this.slice(r, n).reduce((i, o) => i + pi(o & (t === 'ascii' ? 127 : 255)), ''); - if (t === 'ucs2' || t === 'ucs-2' || t === 'utf16le' || t === 'utf-16le') { - let i = new DataView(this.buffer.slice(r, n)); - return Array.from({ length: i.byteLength / 2 }, (o, s) => - s * 2 + 1 < i.byteLength ? pi(i.getUint16(s * 2, !0)) : '' - ).join(''); - } - if (t === 'hex') return this.slice(r, n).reduce((i, o) => i + o.toString(16).padStart(2, '0'), ''); - Ho(`encoding "${t}"`); - } - toLocaleString() { - return this.toString(); - } - inspect() { - return ``; - } - }; - ((Pc = { - int8: [-128, 127], - int16: [-32768, 32767], - int32: [-2147483648, 2147483647], - uint8: [0, 255], - uint16: [0, 65535], - uint32: [0, 4294967295], - float32: [-1 / 0, 1 / 0], - float64: [-1 / 0, 1 / 0], - bigint64: [-0x8000000000000000n, 0x7fffffffffffffffn], - biguint64: [0n, 0xffffffffffffffffn], - }), - (Tc = new TextEncoder()), - (vc = new TextDecoder()), - (Ac = [ - 'utf8', - 'utf-8', - 'hex', - 'base64', - 'ascii', - 'binary', - 'base64url', - 'ucs2', - 'ucs-2', - 'utf16le', - 'utf-16le', - 'latin1', - 'latin-1', - ]), - (Cc = 4294967295)); - Ec(h.prototype); - ((y = new Proxy(Rc, { - construct(e, [t, r]) { - return h.from(t, r); - }, - get(e, t) { - return h[t]; - }, - })), - (pi = String.fromCodePoint)); - }); -var g, - x, - c = ye(() => { - 'use strict'; - ((g = { - nextTick: (e, ...t) => { - setTimeout(() => { - e(...t); - }, 0); - }, - env: {}, - version: '', - cwd: () => '/', - stderr: {}, - argv: ['/bin/node'], - pid: 1e4, - }), - ({ cwd: x } = g)); - }); -var b, - p = ye(() => { - 'use strict'; - b = - globalThis.performance ?? - (() => { - let e = Date.now(); - return { now: () => Date.now() - e }; - })(); - }); -var E, - m = ye(() => { - 'use strict'; - E = () => {}; - E.prototype = E; - }); -var d = ye(() => { - 'use strict'; -}); -function Ko(e, t) { - var r, - n, - i, - o, - s, - a, - f, - w, - A = e.constructor, - C = A.precision; - if (!e.s || !t.s) return (t.s || (t = new A(e)), J ? q(t, C) : t); - if (((f = e.d), (w = t.d), (s = e.e), (i = t.e), (f = f.slice()), (o = s - i), o)) { - for ( - o < 0 ? ((n = f), (o = -o), (a = w.length)) : ((n = w), (i = s), (a = f.length)), - s = Math.ceil(C / H), - a = s > a ? s + 1 : a + 1, - o > a && ((o = a), (n.length = 1)), - n.reverse(); - o--; - - ) - n.push(0); - n.reverse(); - } - for (a = f.length, o = w.length, a - o < 0 && ((o = a), (n = w), (w = f), (f = n)), r = 0; o; ) - ((r = ((f[--o] = f[o] + w[o] + r) / te) | 0), (f[o] %= te)); - for (r && (f.unshift(r), ++i), a = f.length; f[--a] == 0; ) f.pop(); - return ((t.d = f), (t.e = i), J ? q(t, C) : t); -} -function Re(e, t, r) { - if (e !== ~~e || e < t || e > r) throw Error(Ye + e); -} -function Ce(e) { - var t, - r, - n, - i = e.length - 1, - o = '', - s = e[0]; - if (i > 0) { - for (o += s, t = 1; t < i; t++) ((n = e[t] + ''), (r = H - n.length), r && (o += $e(r)), (o += n)); - ((s = e[t]), (n = s + ''), (r = H - n.length), r && (o += $e(r))); - } else if (s === 0) return '0'; - for (; s % 10 === 0; ) s /= 10; - return o + s; -} -function zo(e, t) { - var r, - n, - i, - o, - s, - a, - f = 0, - w = 0, - A = e.constructor, - C = A.precision; - if (Z(e) > 16) throw Error(di + Z(e)); - if (!e.s) return new A(he); - for (t == null ? ((J = !1), (a = C)) : (a = t), s = new A(0.03125); e.abs().gte(0.1); ) ((e = e.times(s)), (w += 5)); - for (n = ((Math.log(ze(2, w)) / Math.LN10) * 2 + 5) | 0, a += n, r = i = o = new A(he), A.precision = a; ; ) { - if ( - ((i = q(i.times(e), a)), - (r = r.times(++f)), - (s = o.plus(Me(i, r, a))), - Ce(s.d).slice(0, a) === Ce(o.d).slice(0, a)) - ) { - for (; w--; ) o = q(o.times(o), a); - return ((A.precision = C), t == null ? ((J = !0), q(o, C)) : o); - } - o = s; - } -} -function Z(e) { - for (var t = e.e * H, r = e.d[0]; r >= 10; r /= 10) t++; - return t; -} -function mi(e, t, r) { - if (t > e.LN10.sd()) throw ((J = !0), r && (e.precision = r), Error(Ee + 'LN10 precision limit exceeded')); - return q(new e(e.LN10), t); -} -function $e(e) { - for (var t = ''; e--; ) t += '0'; - return t; -} -function Wt(e, t) { - var r, - n, - i, - o, - s, - a, - f, - w, - A, - C = 1, - I = 10, - R = e, - L = R.d, - k = R.constructor, - M = k.precision; - if (R.s < 1) throw Error(Ee + (R.s ? 'NaN' : '-Infinity')); - if (R.eq(he)) return new k(0); - if ((t == null ? ((J = !1), (w = M)) : (w = t), R.eq(10))) return (t == null && (J = !0), mi(k, w)); - if (((w += I), (k.precision = w), (r = Ce(L)), (n = r.charAt(0)), (o = Z(R)), Math.abs(o) < 15e14)) { - for (; (n < 7 && n != 1) || (n == 1 && r.charAt(1) > 3); ) - ((R = R.times(e)), (r = Ce(R.d)), (n = r.charAt(0)), C++); - ((o = Z(R)), n > 1 ? ((R = new k('0.' + r)), o++) : (R = new k(n + '.' + r.slice(1)))); - } else - return ( - (f = mi(k, w + 2, M).times(o + '')), - (R = Wt(new k(n + '.' + r.slice(1)), w - I).plus(f)), - (k.precision = M), - t == null ? ((J = !0), q(R, M)) : R - ); - for (a = s = R = Me(R.minus(he), R.plus(he), w), A = q(R.times(R), w), i = 3; ; ) { - if (((s = q(s.times(A), w)), (f = a.plus(Me(s, new k(i), w))), Ce(f.d).slice(0, w) === Ce(a.d).slice(0, w))) - return ( - (a = a.times(2)), - o !== 0 && (a = a.plus(mi(k, w + 2, M).times(o + ''))), - (a = Me(a, new k(C), w)), - (k.precision = M), - t == null ? ((J = !0), q(a, M)) : a - ); - ((a = f), (i += 2)); - } -} -function Go(e, t) { - var r, n, i; - for ( - (r = t.indexOf('.')) > -1 && (t = t.replace('.', '')), - (n = t.search(/e/i)) > 0 - ? (r < 0 && (r = n), (r += +t.slice(n + 1)), (t = t.substring(0, n))) - : r < 0 && (r = t.length), - n = 0; - t.charCodeAt(n) === 48; - - ) - ++n; - for (i = t.length; t.charCodeAt(i - 1) === 48; ) --i; - if (((t = t.slice(n, i)), t)) { - if (((i -= n), (r = r - n - 1), (e.e = dt(r / H)), (e.d = []), (n = (r + 1) % H), r < 0 && (n += H), n < i)) { - for (n && e.d.push(+t.slice(0, n)), i -= H; n < i; ) e.d.push(+t.slice(n, (n += H))); - ((t = t.slice(n)), (n = H - t.length)); - } else n -= i; - for (; n--; ) t += '0'; - if ((e.d.push(+t), J && (e.e > Yr || e.e < -Yr))) throw Error(di + r); - } else ((e.s = 0), (e.e = 0), (e.d = [0])); - return e; -} -function q(e, t, r) { - var n, - i, - o, - s, - a, - f, - w, - A, - C = e.d; - for (s = 1, o = C[0]; o >= 10; o /= 10) s++; - if (((n = t - s), n < 0)) ((n += H), (i = t), (w = C[(A = 0)])); - else { - if (((A = Math.ceil((n + 1) / H)), (o = C.length), A >= o)) return e; - for (w = o = C[A], s = 1; o >= 10; o /= 10) s++; - ((n %= H), (i = n - H + s)); - } - if ( - (r !== void 0 && - ((o = ze(10, s - i - 1)), - (a = (w / o) % 10 | 0), - (f = t < 0 || C[A + 1] !== void 0 || w % o), - (f = - r < 4 - ? (a || f) && (r == 0 || r == (e.s < 0 ? 3 : 2)) - : a > 5 || - (a == 5 && - (r == 4 || - f || - (r == 6 && (n > 0 ? (i > 0 ? w / ze(10, s - i) : 0) : C[A - 1]) % 10 & 1) || - r == (e.s < 0 ? 8 : 7))))), - t < 1 || !C[0]) - ) - return ( - f - ? ((o = Z(e)), (C.length = 1), (t = t - o - 1), (C[0] = ze(10, (H - (t % H)) % H)), (e.e = dt(-t / H) || 0)) - : ((C.length = 1), (C[0] = e.e = e.s = 0)), - e - ); - if ( - (n == 0 - ? ((C.length = A), (o = 1), A--) - : ((C.length = A + 1), (o = ze(10, H - n)), (C[A] = i > 0 ? ((w / ze(10, s - i)) % ze(10, i) | 0) * o : 0)), - f) - ) - for (;;) - if (A == 0) { - (C[0] += o) == te && ((C[0] = 1), ++e.e); - break; - } else { - if (((C[A] += o), C[A] != te)) break; - ((C[A--] = 0), (o = 1)); - } - for (n = C.length; C[--n] === 0; ) C.pop(); - if (J && (e.e > Yr || e.e < -Yr)) throw Error(di + Z(e)); - return e; -} -function Yo(e, t) { - var r, - n, - i, - o, - s, - a, - f, - w, - A, - C, - I = e.constructor, - R = I.precision; - if (!e.s || !t.s) return (t.s ? (t.s = -t.s) : (t = new I(e)), J ? q(t, R) : t); - if (((f = e.d), (C = t.d), (n = t.e), (w = e.e), (f = f.slice()), (s = w - n), s)) { - for ( - A = s < 0, - A ? ((r = f), (s = -s), (a = C.length)) : ((r = C), (n = w), (a = f.length)), - i = Math.max(Math.ceil(R / H), a) + 2, - s > i && ((s = i), (r.length = 1)), - r.reverse(), - i = s; - i--; - - ) - r.push(0); - r.reverse(); - } else { - for (i = f.length, a = C.length, A = i < a, A && (a = i), i = 0; i < a; i++) - if (f[i] != C[i]) { - A = f[i] < C[i]; - break; - } - s = 0; - } - for (A && ((r = f), (f = C), (C = r), (t.s = -t.s)), a = f.length, i = C.length - a; i > 0; --i) f[a++] = 0; - for (i = C.length; i > s; ) { - if (f[--i] < C[i]) { - for (o = i; o && f[--o] === 0; ) f[o] = te - 1; - (--f[o], (f[i] += te)); - } - f[i] -= C[i]; - } - for (; f[--a] === 0; ) f.pop(); - for (; f[0] === 0; f.shift()) --n; - return f[0] ? ((t.d = f), (t.e = n), J ? q(t, R) : t) : new I(0); -} -function Ze(e, t, r) { - var n, - i = Z(e), - o = Ce(e.d), - s = o.length; - return ( - t - ? (r && (n = r - s) > 0 - ? (o = o.charAt(0) + '.' + o.slice(1) + $e(n)) - : s > 1 && (o = o.charAt(0) + '.' + o.slice(1)), - (o = o + (i < 0 ? 'e' : 'e+') + i)) - : i < 0 - ? ((o = '0.' + $e(-i - 1) + o), r && (n = r - s) > 0 && (o += $e(n))) - : i >= s - ? ((o += $e(i + 1 - s)), r && (n = r - i - 1) > 0 && (o = o + '.' + $e(n))) - : ((n = i + 1) < s && (o = o.slice(0, n) + '.' + o.slice(n)), - r && (n = r - s) > 0 && (i + 1 === s && (o += '.'), (o += $e(n)))), - e.s < 0 ? '-' + o : o - ); -} -function Jo(e, t) { - if (e.length > t) return ((e.length = t), !0); -} -function Zo(e) { - var t, r, n; - function i(o) { - var s = this; - if (!(s instanceof i)) return new i(o); - if (((s.constructor = i), o instanceof i)) { - ((s.s = o.s), (s.e = o.e), (s.d = (o = o.d) ? o.slice() : o)); - return; - } - if (typeof o == 'number') { - if (o * 0 !== 0) throw Error(Ye + o); - if (o > 0) s.s = 1; - else if (o < 0) ((o = -o), (s.s = -1)); - else { - ((s.s = 0), (s.e = 0), (s.d = [0])); - return; - } - if (o === ~~o && o < 1e7) { - ((s.e = 0), (s.d = [o])); - return; - } - return Go(s, o.toString()); - } else if (typeof o != 'string') throw Error(Ye + o); - if ((o.charCodeAt(0) === 45 ? ((o = o.slice(1)), (s.s = -1)) : (s.s = 1), Sc.test(o))) Go(s, o); - else throw Error(Ye + o); - } - if ( - ((i.prototype = S), - (i.ROUND_UP = 0), - (i.ROUND_DOWN = 1), - (i.ROUND_CEIL = 2), - (i.ROUND_FLOOR = 3), - (i.ROUND_HALF_UP = 4), - (i.ROUND_HALF_DOWN = 5), - (i.ROUND_HALF_EVEN = 6), - (i.ROUND_HALF_CEIL = 7), - (i.ROUND_HALF_FLOOR = 8), - (i.clone = Zo), - (i.config = i.set = kc), - e === void 0 && (e = {}), - e) - ) - for (n = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'LN10'], t = 0; t < n.length; ) - e.hasOwnProperty((r = n[t++])) || (e[r] = this[r]); - return (i.config(e), i); -} -function kc(e) { - if (!e || typeof e != 'object') throw Error(Ee + 'Object expected'); - var t, - r, - n, - i = ['precision', 1, mt, 'rounding', 0, 8, 'toExpNeg', -1 / 0, 0, 'toExpPos', 0, 1 / 0]; - for (t = 0; t < i.length; t += 3) - if ((n = e[(r = i[t])]) !== void 0) - if (dt(n) === n && n >= i[t + 1] && n <= i[t + 2]) this[r] = n; - else throw Error(Ye + r + ': ' + n); - if ((n = e[(r = 'LN10')]) !== void 0) - if (n == Math.LN10) this[r] = new this(n); - else throw Error(Ye + r + ': ' + n); - return this; -} -var mt, - Ic, - fi, - J, - Ee, - Ye, - di, - dt, - ze, - Sc, - he, - te, - H, - Wo, - Yr, - S, - Me, - fi, - Zr, - Xo = ye(() => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); - ((mt = 1e9), - (Ic = { - precision: 20, - rounding: 4, - toExpNeg: -7, - toExpPos: 21, - LN10: '2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286', - }), - (J = !0), - (Ee = '[DecimalError] '), - (Ye = Ee + 'Invalid argument: '), - (di = Ee + 'Exponent out of range: '), - (dt = Math.floor), - (ze = Math.pow), - (Sc = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i), - (te = 1e7), - (H = 7), - (Wo = 9007199254740991), - (Yr = dt(Wo / H)), - (S = {})); - S.absoluteValue = S.abs = function () { - var e = new this.constructor(this); - return (e.s && (e.s = 1), e); - }; - S.comparedTo = S.cmp = function (e) { - var t, - r, - n, - i, - o = this; - if (((e = new o.constructor(e)), o.s !== e.s)) return o.s || -e.s; - if (o.e !== e.e) return (o.e > e.e) ^ (o.s < 0) ? 1 : -1; - for (n = o.d.length, i = e.d.length, t = 0, r = n < i ? n : i; t < r; ++t) - if (o.d[t] !== e.d[t]) return (o.d[t] > e.d[t]) ^ (o.s < 0) ? 1 : -1; - return n === i ? 0 : (n > i) ^ (o.s < 0) ? 1 : -1; - }; - S.decimalPlaces = S.dp = function () { - var e = this, - t = e.d.length - 1, - r = (t - e.e) * H; - if (((t = e.d[t]), t)) for (; t % 10 == 0; t /= 10) r--; - return r < 0 ? 0 : r; - }; - S.dividedBy = S.div = function (e) { - return Me(this, new this.constructor(e)); - }; - S.dividedToIntegerBy = S.idiv = function (e) { - var t = this, - r = t.constructor; - return q(Me(t, new r(e), 0, 1), r.precision); - }; - S.equals = S.eq = function (e) { - return !this.cmp(e); - }; - S.exponent = function () { - return Z(this); - }; - S.greaterThan = S.gt = function (e) { - return this.cmp(e) > 0; - }; - S.greaterThanOrEqualTo = S.gte = function (e) { - return this.cmp(e) >= 0; - }; - S.isInteger = S.isint = function () { - return this.e > this.d.length - 2; - }; - S.isNegative = S.isneg = function () { - return this.s < 0; - }; - S.isPositive = S.ispos = function () { - return this.s > 0; - }; - S.isZero = function () { - return this.s === 0; - }; - S.lessThan = S.lt = function (e) { - return this.cmp(e) < 0; - }; - S.lessThanOrEqualTo = S.lte = function (e) { - return this.cmp(e) < 1; - }; - S.logarithm = S.log = function (e) { - var t, - r = this, - n = r.constructor, - i = n.precision, - o = i + 5; - if (e === void 0) e = new n(10); - else if (((e = new n(e)), e.s < 1 || e.eq(he))) throw Error(Ee + 'NaN'); - if (r.s < 1) throw Error(Ee + (r.s ? 'NaN' : '-Infinity')); - return r.eq(he) ? new n(0) : ((J = !1), (t = Me(Wt(r, o), Wt(e, o), o)), (J = !0), q(t, i)); - }; - S.minus = S.sub = function (e) { - var t = this; - return ((e = new t.constructor(e)), t.s == e.s ? Yo(t, e) : Ko(t, ((e.s = -e.s), e))); - }; - S.modulo = S.mod = function (e) { - var t, - r = this, - n = r.constructor, - i = n.precision; - if (((e = new n(e)), !e.s)) throw Error(Ee + 'NaN'); - return r.s ? ((J = !1), (t = Me(r, e, 0, 1).times(e)), (J = !0), r.minus(t)) : q(new n(r), i); - }; - S.naturalExponential = S.exp = function () { - return zo(this); - }; - S.naturalLogarithm = S.ln = function () { - return Wt(this); - }; - S.negated = S.neg = function () { - var e = new this.constructor(this); - return ((e.s = -e.s || 0), e); - }; - S.plus = S.add = function (e) { - var t = this; - return ((e = new t.constructor(e)), t.s == e.s ? Ko(t, e) : Yo(t, ((e.s = -e.s), e))); - }; - S.precision = S.sd = function (e) { - var t, - r, - n, - i = this; - if (e !== void 0 && e !== !!e && e !== 1 && e !== 0) throw Error(Ye + e); - if (((t = Z(i) + 1), (n = i.d.length - 1), (r = n * H + 1), (n = i.d[n]), n)) { - for (; n % 10 == 0; n /= 10) r--; - for (n = i.d[0]; n >= 10; n /= 10) r++; - } - return e && t > r ? t : r; - }; - S.squareRoot = S.sqrt = function () { - var e, - t, - r, - n, - i, - o, - s, - a = this, - f = a.constructor; - if (a.s < 1) { - if (!a.s) return new f(0); - throw Error(Ee + 'NaN'); - } - for ( - e = Z(a), - J = !1, - i = Math.sqrt(+a), - i == 0 || i == 1 / 0 - ? ((t = Ce(a.d)), - (t.length + e) % 2 == 0 && (t += '0'), - (i = Math.sqrt(t)), - (e = dt((e + 1) / 2) - (e < 0 || e % 2)), - i == 1 / 0 ? (t = '5e' + e) : ((t = i.toExponential()), (t = t.slice(0, t.indexOf('e') + 1) + e)), - (n = new f(t))) - : (n = new f(i.toString())), - r = f.precision, - i = s = r + 3; - ; - - ) - if (((o = n), (n = o.plus(Me(a, o, s + 2)).times(0.5)), Ce(o.d).slice(0, s) === (t = Ce(n.d)).slice(0, s))) { - if (((t = t.slice(s - 3, s + 1)), i == s && t == '4999')) { - if ((q(o, r + 1, 0), o.times(o).eq(a))) { - n = o; - break; - } - } else if (t != '9999') break; - s += 4; - } - return ((J = !0), q(n, r)); - }; - S.times = S.mul = function (e) { - var t, - r, - n, - i, - o, - s, - a, - f, - w, - A = this, - C = A.constructor, - I = A.d, - R = (e = new C(e)).d; - if (!A.s || !e.s) return new C(0); - for ( - e.s *= A.s, - r = A.e + e.e, - f = I.length, - w = R.length, - f < w && ((o = I), (I = R), (R = o), (s = f), (f = w), (w = s)), - o = [], - s = f + w, - n = s; - n--; - - ) - o.push(0); - for (n = w; --n >= 0; ) { - for (t = 0, i = f + n; i > n; ) - ((a = o[i] + R[n] * I[i - n - 1] + t), (o[i--] = a % te | 0), (t = (a / te) | 0)); - o[i] = (o[i] + t) % te | 0; - } - for (; !o[--s]; ) o.pop(); - return (t ? ++r : o.shift(), (e.d = o), (e.e = r), J ? q(e, C.precision) : e); - }; - S.toDecimalPlaces = S.todp = function (e, t) { - var r = this, - n = r.constructor; - return ( - (r = new n(r)), - e === void 0 ? r : (Re(e, 0, mt), t === void 0 ? (t = n.rounding) : Re(t, 0, 8), q(r, e + Z(r) + 1, t)) - ); - }; - S.toExponential = function (e, t) { - var r, - n = this, - i = n.constructor; - return ( - e === void 0 - ? (r = Ze(n, !0)) - : (Re(e, 0, mt), - t === void 0 ? (t = i.rounding) : Re(t, 0, 8), - (n = q(new i(n), e + 1, t)), - (r = Ze(n, !0, e + 1))), - r - ); - }; - S.toFixed = function (e, t) { - var r, - n, - i = this, - o = i.constructor; - return e === void 0 - ? Ze(i) - : (Re(e, 0, mt), - t === void 0 ? (t = o.rounding) : Re(t, 0, 8), - (n = q(new o(i), e + Z(i) + 1, t)), - (r = Ze(n.abs(), !1, e + Z(n) + 1)), - i.isneg() && !i.isZero() ? '-' + r : r); - }; - S.toInteger = S.toint = function () { - var e = this, - t = e.constructor; - return q(new t(e), Z(e) + 1, t.rounding); - }; - S.toNumber = function () { - return +this; - }; - S.toPower = S.pow = function (e) { - var t, - r, - n, - i, - o, - s, - a = this, - f = a.constructor, - w = 12, - A = +(e = new f(e)); - if (!e.s) return new f(he); - if (((a = new f(a)), !a.s)) { - if (e.s < 1) throw Error(Ee + 'Infinity'); - return a; - } - if (a.eq(he)) return a; - if (((n = f.precision), e.eq(he))) return q(a, n); - if (((t = e.e), (r = e.d.length - 1), (s = t >= r), (o = a.s), s)) { - if ((r = A < 0 ? -A : A) <= Wo) { - for ( - i = new f(he), t = Math.ceil(n / H + 4), J = !1; - r % 2 && ((i = i.times(a)), Jo(i.d, t)), (r = dt(r / 2)), r !== 0; - - ) - ((a = a.times(a)), Jo(a.d, t)); - return ((J = !0), e.s < 0 ? new f(he).div(i) : q(i, n)); - } - } else if (o < 0) throw Error(Ee + 'NaN'); - return ( - (o = o < 0 && e.d[Math.max(t, r)] & 1 ? -1 : 1), - (a.s = 1), - (J = !1), - (i = e.times(Wt(a, n + w))), - (J = !0), - (i = zo(i)), - (i.s = o), - i - ); - }; - S.toPrecision = function (e, t) { - var r, - n, - i = this, - o = i.constructor; - return ( - e === void 0 - ? ((r = Z(i)), (n = Ze(i, r <= o.toExpNeg || r >= o.toExpPos))) - : (Re(e, 1, mt), - t === void 0 ? (t = o.rounding) : Re(t, 0, 8), - (i = q(new o(i), e, t)), - (r = Z(i)), - (n = Ze(i, e <= r || r <= o.toExpNeg, e))), - n - ); - }; - S.toSignificantDigits = S.tosd = function (e, t) { - var r = this, - n = r.constructor; - return ( - e === void 0 - ? ((e = n.precision), (t = n.rounding)) - : (Re(e, 1, mt), t === void 0 ? (t = n.rounding) : Re(t, 0, 8)), - q(new n(r), e, t) - ); - }; - S.toString = - S.valueOf = - S.val = - S.toJSON = - S[Symbol.for('nodejs.util.inspect.custom')] = - function () { - var e = this, - t = Z(e), - r = e.constructor; - return Ze(e, t <= r.toExpNeg || t >= r.toExpPos); - }; - Me = (function () { - function e(n, i) { - var o, - s = 0, - a = n.length; - for (n = n.slice(); a--; ) ((o = n[a] * i + s), (n[a] = o % te | 0), (s = (o / te) | 0)); - return (s && n.unshift(s), n); - } - function t(n, i, o, s) { - var a, f; - if (o != s) f = o > s ? 1 : -1; - else - for (a = f = 0; a < o; a++) - if (n[a] != i[a]) { - f = n[a] > i[a] ? 1 : -1; - break; - } - return f; - } - function r(n, i, o) { - for (var s = 0; o--; ) ((n[o] -= s), (s = n[o] < i[o] ? 1 : 0), (n[o] = s * te + n[o] - i[o])); - for (; !n[0] && n.length > 1; ) n.shift(); - } - return function (n, i, o, s) { - var a, - f, - w, - A, - C, - I, - R, - L, - k, - M, - _e, - pe, - B, - me, - Ke, - ui, - xe, - Jr, - Wr = n.constructor, - fc = n.s == i.s ? 1 : -1, - ve = n.d, - z = i.d; - if (!n.s) return new Wr(n); - if (!i.s) throw Error(Ee + 'Division by zero'); - for (f = n.e - i.e, xe = z.length, Ke = ve.length, R = new Wr(fc), L = R.d = [], w = 0; z[w] == (ve[w] || 0); ) - ++w; - if ( - (z[w] > (ve[w] || 0) && --f, - o == null ? (pe = o = Wr.precision) : s ? (pe = o + (Z(n) - Z(i)) + 1) : (pe = o), - pe < 0) - ) - return new Wr(0); - if (((pe = (pe / H + 2) | 0), (w = 0), xe == 1)) - for (A = 0, z = z[0], pe++; (w < Ke || A) && pe--; w++) - ((B = A * te + (ve[w] || 0)), (L[w] = (B / z) | 0), (A = B % z | 0)); - else { - for ( - A = (te / (z[0] + 1)) | 0, - A > 1 && ((z = e(z, A)), (ve = e(ve, A)), (xe = z.length), (Ke = ve.length)), - me = xe, - k = ve.slice(0, xe), - M = k.length; - M < xe; - - ) - k[M++] = 0; - ((Jr = z.slice()), Jr.unshift(0), (ui = z[0]), z[1] >= te / 2 && ++ui); - do - ((A = 0), - (a = t(z, k, xe, M)), - a < 0 - ? ((_e = k[0]), - xe != M && (_e = _e * te + (k[1] || 0)), - (A = (_e / ui) | 0), - A > 1 - ? (A >= te && (A = te - 1), - (C = e(z, A)), - (I = C.length), - (M = k.length), - (a = t(C, k, I, M)), - a == 1 && (A--, r(C, xe < I ? Jr : z, I))) - : (A == 0 && (a = A = 1), (C = z.slice())), - (I = C.length), - I < M && C.unshift(0), - r(k, C, M), - a == -1 && ((M = k.length), (a = t(z, k, xe, M)), a < 1 && (A++, r(k, xe < M ? Jr : z, M))), - (M = k.length)) - : a === 0 && (A++, (k = [0])), - (L[w++] = A), - a && k[0] ? (k[M++] = ve[me] || 0) : ((k = [ve[me]]), (M = 1))); - while ((me++ < Ke || k[0] !== void 0) && pe--); - } - return (L[0] || L.shift(), (R.e = f), q(R, s ? o + Z(R) + 1 : o)); - }; - })(); - fi = Zo(Ic); - he = new fi(1); - Zr = fi; - }); -var v, - ae, - l = ye(() => { - 'use strict'; - Xo(); - ((v = class extends Zr { - static isDecimal(t) { - return t instanceof Zr; - } - static random(t = 20) { - { - let n = globalThis.crypto.getRandomValues(new Uint8Array(t)).reduce((i, o) => i + o, ''); - return new Zr(`0.${n.slice(0, t)}`); - } - } - }), - (ae = v)); - }); -function Lc() { - return !1; -} -function bi() { - return { - dev: 0, - ino: 0, - mode: 0, - nlink: 0, - uid: 0, - gid: 0, - rdev: 0, - size: 0, - blksize: 0, - blocks: 0, - atimeMs: 0, - mtimeMs: 0, - ctimeMs: 0, - birthtimeMs: 0, - atime: new Date(), - mtime: new Date(), - ctime: new Date(), - birthtime: new Date(), - }; -} -function Uc() { - return bi(); -} -function Fc() { - return []; -} -function Vc(e) { - e(null, []); -} -function $c() { - return ''; -} -function qc() { - return ''; -} -function Bc() {} -function jc() {} -function Qc() {} -function Hc() {} -function Gc() {} -function Jc() {} -function Wc() {} -function Kc() {} -function zc() { - return { close: () => {}, on: () => {}, removeAllListeners: () => {} }; -} -function Yc(e, t) { - t(null, bi()); -} -var Zc, - Xc, - ys, - hs = ye(() => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); - ((Zc = {}), - (Xc = { - existsSync: Lc, - lstatSync: bi, - stat: Yc, - statSync: Uc, - readdirSync: Fc, - readdir: Vc, - readlinkSync: $c, - realpathSync: qc, - chmodSync: Bc, - renameSync: jc, - mkdirSync: Qc, - rmdirSync: Hc, - rmSync: Gc, - unlinkSync: Jc, - watchFile: Wc, - unwatchFile: Kc, - watch: zc, - promises: Zc, - }), - (ys = Xc)); - }); -var ws = se(() => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); -}); -function ep(...e) { - return e.join('/'); -} -function tp(...e) { - return e.join('/'); -} -function rp(e) { - let t = bs(e), - r = Es(e), - [n, i] = t.split('.'); - return { root: '/', dir: r, base: t, ext: i, name: n }; -} -function bs(e) { - let t = e.split('/'); - return t[t.length - 1]; -} -function Es(e) { - return e.split('/').slice(0, -1).join('/'); -} -function ip(e) { - let t = e.split('/').filter((i) => i !== '' && i !== '.'), - r = []; - for (let i of t) i === '..' ? r.pop() : r.push(i); - let n = r.join('/'); - return e.startsWith('/') ? '/' + n : n; -} -var xs, - np, - op, - sp, - rn, - Ps = ye(() => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); - ((xs = '/'), (np = ':')); - ((op = { sep: xs }), - (sp = { - basename: bs, - delimiter: np, - dirname: Es, - join: tp, - normalize: ip, - parse: rp, - posix: op, - resolve: ep, - sep: xs, - }), - (rn = sp)); - }); -var Ts = se((eh, ap) => { - ap.exports = { - name: '@prisma/internals', - version: '6.14.0', - description: "This package is intended for Prisma's internal use", - main: 'dist/index.js', - types: 'dist/index.d.ts', - repository: { type: 'git', url: 'https://github.com/prisma/prisma.git', directory: 'packages/internals' }, - homepage: 'https://www.prisma.io', - author: 'Tim Suchanek ', - bugs: 'https://github.com/prisma/prisma/issues', - license: 'Apache-2.0', - scripts: { - dev: 'DEV=true tsx helpers/build.ts', - build: 'tsx helpers/build.ts', - test: 'dotenv -e ../../.db.env -- jest --silent', - prepublishOnly: 'pnpm run build', - }, - files: ['README.md', 'dist', '!**/libquery_engine*', '!dist/get-generators/engines/*', 'scripts'], - devDependencies: { - '@babel/helper-validator-identifier': '7.25.9', - '@opentelemetry/api': '1.9.0', - '@swc/core': '1.11.5', - '@swc/jest': '0.2.37', - '@types/babel__helper-validator-identifier': '7.15.2', - '@types/jest': '29.5.14', - '@types/node': '18.19.76', - '@types/resolve': '1.20.6', - archiver: '6.0.2', - 'checkpoint-client': '1.1.33', - 'cli-truncate': '4.0.0', - dotenv: '16.5.0', - empathic: '2.0.0', - esbuild: '0.25.5', - 'escape-string-regexp': '5.0.0', - execa: '5.1.1', - 'fast-glob': '3.3.3', - 'find-up': '7.0.0', - 'fp-ts': '2.16.9', - 'fs-extra': '11.3.0', - 'fs-jetpack': '5.1.0', - 'global-dirs': '4.0.0', - globby: '11.1.0', - 'identifier-regex': '1.0.0', - 'indent-string': '4.0.0', - 'is-windows': '1.0.2', - 'is-wsl': '3.1.0', - jest: '29.7.0', - 'jest-junit': '16.0.0', - kleur: '4.1.5', - 'mock-stdin': '1.0.0', - 'new-github-issue-url': '0.2.1', - 'node-fetch': '3.3.2', - 'npm-packlist': '5.1.3', - open: '7.4.2', - 'p-map': '4.0.0', - resolve: '1.22.10', - 'string-width': '7.2.0', - 'strip-ansi': '6.0.1', - 'strip-indent': '4.0.0', - 'temp-dir': '2.0.0', - tempy: '1.0.1', - 'terminal-link': '4.0.0', - tmp: '0.2.3', - 'ts-node': '10.9.2', - 'ts-pattern': '5.6.2', - 'ts-toolbelt': '9.6.0', - typescript: '5.4.5', - yarn: '1.22.22', - }, - dependencies: { - '@prisma/config': 'workspace:*', - '@prisma/debug': 'workspace:*', - '@prisma/dmmf': 'workspace:*', - '@prisma/driver-adapter-utils': 'workspace:*', - '@prisma/engines': 'workspace:*', - '@prisma/fetch-engine': 'workspace:*', - '@prisma/generator': 'workspace:*', - '@prisma/generator-helper': 'workspace:*', - '@prisma/get-platform': 'workspace:*', - '@prisma/prisma-schema-wasm': '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - '@prisma/schema-engine-wasm': '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - '@prisma/schema-files-loader': 'workspace:*', - arg: '5.0.2', - prompts: '2.4.2', - }, - peerDependencies: { typescript: '>=5.1.0' }, - peerDependenciesMeta: { typescript: { optional: !0 } }, - sideEffects: !1, - }; -}); -var xi = {}; -pt(xi, { - Hash: () => Yt, - createHash: () => vs, - default: () => yt, - randomFillSync: () => sn, - randomUUID: () => on, - webcrypto: () => Zt, -}); -function on() { - return globalThis.crypto.randomUUID(); -} -function sn(e, t, r) { - return ( - t !== void 0 && (r !== void 0 ? (e = e.subarray(t, t + r)) : (e = e.subarray(t))), - globalThis.crypto.getRandomValues(e) - ); -} -function vs(e) { - return new Yt(e); -} -var Zt, - Yt, - yt, - Xe = ye(() => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); - Zt = globalThis.crypto; - ((Yt = class { - #e = []; - #t; - constructor(t) { - this.#t = t; - } - update(t) { - this.#e.push(t); - } - async digest() { - let t = new Uint8Array(this.#e.reduce((i, o) => i + o.length, 0)), - r = 0; - for (let i of this.#e) (t.set(i, r), (r += i.length)); - let n = await globalThis.crypto.subtle.digest(this.#t, t); - return new Uint8Array(n); - } - }), - (yt = { webcrypto: Zt, randomUUID: on, randomFillSync: sn, createHash: vs, Hash: Yt })); - }); -var Pi = se((Gh, pp) => { - pp.exports = { - name: '@prisma/engines-version', - version: '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - main: 'index.js', - types: 'index.d.ts', - license: 'Apache-2.0', - author: 'Tim Suchanek ', - prisma: { enginesVersion: '717184b7b35ea05dfa71a3236b7af656013e1e49' }, - repository: { - type: 'git', - url: 'https://github.com/prisma/engines-wrapper.git', - directory: 'packages/engines-version', - }, - devDependencies: { '@types/node': '18.19.76', typescript: '4.9.5' }, - files: ['index.js', 'index.d.ts'], - scripts: { build: 'tsc -d' }, - }; -}); -var As = se((an) => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); - Object.defineProperty(an, '__esModule', { value: !0 }); - an.enginesVersion = void 0; - an.enginesVersion = Pi().prisma.enginesVersion; -}); -var Is = se((aw, Rs) => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); - Rs.exports = (e, t = 1, r) => { - if (((r = { indent: ' ', includeEmptyLines: !1, ...r }), typeof e != 'string')) - throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``); - if (typeof t != 'number') throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``); - if (typeof r.indent != 'string') - throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``); - if (t === 0) return e; - let n = r.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - return e.replace(n, r.indent.repeat(t)); - }; -}); -var Os = se((xw, ks) => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); - ks.exports = ({ onlyFirst: e = !1 } = {}) => { - let t = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))', - ].join('|'); - return new RegExp(t, e ? void 0 : 'g'); - }; -}); -var Ai = se((Iw, Ds) => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); - var yp = Os(); - Ds.exports = (e) => (typeof e == 'string' ? e.replace(yp(), '') : e); -}); -var _s = se((Bw, cn) => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); - cn.exports = (e = {}) => { - let t; - if (e.repoUrl) t = e.repoUrl; - else if (e.user && e.repo) t = `https://github.com/${e.user}/${e.repo}`; - else throw new Error('You need to specify either the `repoUrl` option or both the `user` and `repo` options'); - let r = new URL(`${t}/issues/new`), - n = ['body', 'title', 'labels', 'template', 'milestone', 'assignee', 'projects']; - for (let i of n) { - let o = e[i]; - if (o !== void 0) { - if (i === 'labels' || i === 'projects') { - if (!Array.isArray(o)) throw new TypeError(`The \`${i}\` option should be an array`); - o = o.join(','); - } - r.searchParams.set(i, o); - } - } - return r.toString(); - }; - cn.exports.default = cn.exports; -}); -var Si = se((MP, Fs) => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); - Fs.exports = (function () { - function e(t, r, n, i, o) { - return t < r || n < r ? (t > n ? n + 1 : t + 1) : i === o ? r : r + 1; - } - return function (t, r) { - if (t === r) return 0; - if (t.length > r.length) { - var n = t; - ((t = r), (r = n)); - } - for (var i = t.length, o = r.length; i > 0 && t.charCodeAt(i - 1) === r.charCodeAt(o - 1); ) (i--, o--); - for (var s = 0; s < i && t.charCodeAt(s) === r.charCodeAt(s); ) s++; - if (((i -= s), (o -= s), i === 0 || o < 3)) return o; - var a = 0, - f, - w, - A, - C, - I, - R, - L, - k, - M, - _e, - pe, - B, - me = []; - for (f = 0; f < i; f++) (me.push(f + 1), me.push(t.charCodeAt(s + f))); - for (var Ke = me.length - 1; a < o - 3; ) - for ( - M = r.charCodeAt(s + (w = a)), - _e = r.charCodeAt(s + (A = a + 1)), - pe = r.charCodeAt(s + (C = a + 2)), - B = r.charCodeAt(s + (I = a + 3)), - R = a += 4, - f = 0; - f < Ke; - f += 2 - ) - ((L = me[f]), - (k = me[f + 1]), - (w = e(L, w, A, M, k)), - (A = e(w, A, C, _e, k)), - (C = e(A, C, I, pe, k)), - (R = e(C, I, R, B, k)), - (me[f] = R), - (I = C), - (C = A), - (A = w), - (w = L)); - for (; a < o; ) - for (M = r.charCodeAt(s + (w = a)), R = ++a, f = 0; f < Ke; f += 2) - ((L = me[f]), (me[f] = R = e(L, w, R, M, me[f + 1])), (w = L)); - return R; - }; - })(); -}); -var js = ye(() => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); -}); -var Qs = ye(() => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); -}); -var kn, - fa = ye(() => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); - kn = class { - events = {}; - on(t, r) { - return (this.events[t] || (this.events[t] = []), this.events[t].push(r), this); - } - emit(t, ...r) { - return this.events[t] - ? (this.events[t].forEach((n) => { - n(...r); - }), - !0) - : !1; - } - }; - }); -var eo = se((rt) => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); - Object.defineProperty(rt, '__esModule', { value: !0 }); - rt.anumber = Xi; - rt.abytes = pl; - rt.ahash = Ym; - rt.aexists = Zm; - rt.aoutput = Xm; - function Xi(e) { - if (!Number.isSafeInteger(e) || e < 0) throw new Error('positive integer expected, got ' + e); - } - function zm(e) { - return e instanceof Uint8Array || (ArrayBuffer.isView(e) && e.constructor.name === 'Uint8Array'); - } - function pl(e, ...t) { - if (!zm(e)) throw new Error('Uint8Array expected'); - if (t.length > 0 && !t.includes(e.length)) - throw new Error('Uint8Array expected of length ' + t + ', got length=' + e.length); - } - function Ym(e) { - if (typeof e != 'function' || typeof e.create != 'function') - throw new Error('Hash should be wrapped by utils.wrapConstructor'); - (Xi(e.outputLen), Xi(e.blockLen)); - } - function Zm(e, t = !0) { - if (e.destroyed) throw new Error('Hash instance has been destroyed'); - if (t && e.finished) throw new Error('Hash#digest() has already been called'); - } - function Xm(e, t) { - pl(e); - let r = t.outputLen; - if (e.length < r) throw new Error('digestInto() expects output buffer of length at least ' + r); - } -}); -var _l = se((_) => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); - Object.defineProperty(_, '__esModule', { value: !0 }); - _.add5L = - _.add5H = - _.add4H = - _.add4L = - _.add3H = - _.add3L = - _.rotlBL = - _.rotlBH = - _.rotlSL = - _.rotlSH = - _.rotr32L = - _.rotr32H = - _.rotrBL = - _.rotrBH = - _.rotrSL = - _.rotrSH = - _.shrSL = - _.shrSH = - _.toBig = - void 0; - _.fromBig = ro; - _.split = ml; - _.add = Cl; - var Fn = BigInt(2 ** 32 - 1), - to = BigInt(32); - function ro(e, t = !1) { - return t - ? { h: Number(e & Fn), l: Number((e >> to) & Fn) } - : { h: Number((e >> to) & Fn) | 0, l: Number(e & Fn) | 0 }; - } - function ml(e, t = !1) { - let r = new Uint32Array(e.length), - n = new Uint32Array(e.length); - for (let i = 0; i < e.length; i++) { - let { h: o, l: s } = ro(e[i], t); - [r[i], n[i]] = [o, s]; - } - return [r, n]; - } - var dl = (e, t) => (BigInt(e >>> 0) << to) | BigInt(t >>> 0); - _.toBig = dl; - var fl = (e, t, r) => e >>> r; - _.shrSH = fl; - var gl = (e, t, r) => (e << (32 - r)) | (t >>> r); - _.shrSL = gl; - var yl = (e, t, r) => (e >>> r) | (t << (32 - r)); - _.rotrSH = yl; - var hl = (e, t, r) => (e << (32 - r)) | (t >>> r); - _.rotrSL = hl; - var wl = (e, t, r) => (e << (64 - r)) | (t >>> (r - 32)); - _.rotrBH = wl; - var bl = (e, t, r) => (e >>> (r - 32)) | (t << (64 - r)); - _.rotrBL = bl; - var El = (e, t) => t; - _.rotr32H = El; - var xl = (e, t) => e; - _.rotr32L = xl; - var Pl = (e, t, r) => (e << r) | (t >>> (32 - r)); - _.rotlSH = Pl; - var Tl = (e, t, r) => (t << r) | (e >>> (32 - r)); - _.rotlSL = Tl; - var vl = (e, t, r) => (t << (r - 32)) | (e >>> (64 - r)); - _.rotlBH = vl; - var Al = (e, t, r) => (e << (r - 32)) | (t >>> (64 - r)); - _.rotlBL = Al; - function Cl(e, t, r, n) { - let i = (t >>> 0) + (n >>> 0); - return { h: (e + r + ((i / 2 ** 32) | 0)) | 0, l: i | 0 }; - } - var Rl = (e, t, r) => (e >>> 0) + (t >>> 0) + (r >>> 0); - _.add3L = Rl; - var Il = (e, t, r, n) => (t + r + n + ((e / 2 ** 32) | 0)) | 0; - _.add3H = Il; - var Sl = (e, t, r, n) => (e >>> 0) + (t >>> 0) + (r >>> 0) + (n >>> 0); - _.add4L = Sl; - var kl = (e, t, r, n, i) => (t + r + n + i + ((e / 2 ** 32) | 0)) | 0; - _.add4H = kl; - var Ol = (e, t, r, n, i) => (e >>> 0) + (t >>> 0) + (r >>> 0) + (n >>> 0) + (i >>> 0); - _.add5L = Ol; - var Dl = (e, t, r, n, i, o) => (t + r + n + i + o + ((e / 2 ** 32) | 0)) | 0; - _.add5H = Dl; - var ed = { - fromBig: ro, - split: ml, - toBig: dl, - shrSH: fl, - shrSL: gl, - rotrSH: yl, - rotrSL: hl, - rotrBH: wl, - rotrBL: bl, - rotr32H: El, - rotr32L: xl, - rotlSH: Pl, - rotlSL: Tl, - rotlBH: vl, - rotlBL: Al, - add: Cl, - add3L: Rl, - add3H: Il, - add4L: Sl, - add4H: kl, - add5H: Dl, - add5L: Ol, - }; - _.default = ed; -}); -var Ml = se((Vn) => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); - Object.defineProperty(Vn, '__esModule', { value: !0 }); - Vn.crypto = void 0; - var He = (Xe(), jo(xi)); - Vn.crypto = - He && typeof He == 'object' && 'webcrypto' in He - ? He.webcrypto - : He && typeof He == 'object' && 'randomBytes' in He - ? He - : void 0; -}); -var Ul = se((U) => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); - Object.defineProperty(U, '__esModule', { value: !0 }); - U.Hash = U.nextTick = U.byteSwapIfBE = U.isLE = void 0; - U.isBytes = td; - U.u8 = rd; - U.u32 = nd; - U.createView = id; - U.rotr = od; - U.rotl = sd; - U.byteSwap = oo; - U.byteSwap32 = ad; - U.bytesToHex = ud; - U.hexToBytes = cd; - U.asyncLoop = md; - U.utf8ToBytes = Ll; - U.toBytes = $n; - U.concatBytes = dd; - U.checkOpts = fd; - U.wrapConstructor = gd; - U.wrapConstructorWithOpts = yd; - U.wrapXOFConstructorWithOpts = hd; - U.randomBytes = wd; - var Mt = Ml(), - io = eo(); - function td(e) { - return e instanceof Uint8Array || (ArrayBuffer.isView(e) && e.constructor.name === 'Uint8Array'); - } - function rd(e) { - return new Uint8Array(e.buffer, e.byteOffset, e.byteLength); - } - function nd(e) { - return new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4)); - } - function id(e) { - return new DataView(e.buffer, e.byteOffset, e.byteLength); - } - function od(e, t) { - return (e << (32 - t)) | (e >>> t); - } - function sd(e, t) { - return (e << t) | ((e >>> (32 - t)) >>> 0); - } - U.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68; - function oo(e) { - return ((e << 24) & 4278190080) | ((e << 8) & 16711680) | ((e >>> 8) & 65280) | ((e >>> 24) & 255); - } - U.byteSwapIfBE = U.isLE ? (e) => e : (e) => oo(e); - function ad(e) { - for (let t = 0; t < e.length; t++) e[t] = oo(e[t]); - } - var ld = Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, '0')); - function ud(e) { - (0, io.abytes)(e); - let t = ''; - for (let r = 0; r < e.length; r++) t += ld[e[r]]; - return t; - } - var Ue = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 }; - function Nl(e) { - if (e >= Ue._0 && e <= Ue._9) return e - Ue._0; - if (e >= Ue.A && e <= Ue.F) return e - (Ue.A - 10); - if (e >= Ue.a && e <= Ue.f) return e - (Ue.a - 10); - } - function cd(e) { - if (typeof e != 'string') throw new Error('hex string expected, got ' + typeof e); - let t = e.length, - r = t / 2; - if (t % 2) throw new Error('hex string expected, got unpadded hex of length ' + t); - let n = new Uint8Array(r); - for (let i = 0, o = 0; i < r; i++, o += 2) { - let s = Nl(e.charCodeAt(o)), - a = Nl(e.charCodeAt(o + 1)); - if (s === void 0 || a === void 0) { - let f = e[o] + e[o + 1]; - throw new Error('hex string expected, got non-hex character "' + f + '" at index ' + o); - } - n[i] = s * 16 + a; - } - return n; - } - var pd = async () => {}; - U.nextTick = pd; - async function md(e, t, r) { - let n = Date.now(); - for (let i = 0; i < e; i++) { - r(i); - let o = Date.now() - n; - (o >= 0 && o < t) || (await (0, U.nextTick)(), (n += o)); - } - } - function Ll(e) { - if (typeof e != 'string') throw new Error('utf8ToBytes expected string, got ' + typeof e); - return new Uint8Array(new TextEncoder().encode(e)); - } - function $n(e) { - return (typeof e == 'string' && (e = Ll(e)), (0, io.abytes)(e), e); - } - function dd(...e) { - let t = 0; - for (let n = 0; n < e.length; n++) { - let i = e[n]; - ((0, io.abytes)(i), (t += i.length)); - } - let r = new Uint8Array(t); - for (let n = 0, i = 0; n < e.length; n++) { - let o = e[n]; - (r.set(o, i), (i += o.length)); - } - return r; - } - var no = class { - clone() { - return this._cloneInto(); - } - }; - U.Hash = no; - function fd(e, t) { - if (t !== void 0 && {}.toString.call(t) !== '[object Object]') - throw new Error('Options should be object or undefined'); - return Object.assign(e, t); - } - function gd(e) { - let t = (n) => e().update($n(n)).digest(), - r = e(); - return ((t.outputLen = r.outputLen), (t.blockLen = r.blockLen), (t.create = () => e()), t); - } - function yd(e) { - let t = (n, i) => e(i).update($n(n)).digest(), - r = e({}); - return ((t.outputLen = r.outputLen), (t.blockLen = r.blockLen), (t.create = (n) => e(n)), t); - } - function hd(e) { - let t = (n, i) => e(i).update($n(n)).digest(), - r = e({}); - return ((t.outputLen = r.outputLen), (t.blockLen = r.blockLen), (t.create = (n) => e(n)), t); - } - function wd(e = 32) { - if (Mt.crypto && typeof Mt.crypto.getRandomValues == 'function') - return Mt.crypto.getRandomValues(new Uint8Array(e)); - if (Mt.crypto && typeof Mt.crypto.randomBytes == 'function') return Mt.crypto.randomBytes(e); - throw new Error('crypto.getRandomValues must be defined'); - } -}); -var Hl = se((G) => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); - Object.defineProperty(G, '__esModule', { value: !0 }); - G.shake256 = - G.shake128 = - G.keccak_512 = - G.keccak_384 = - G.keccak_256 = - G.keccak_224 = - G.sha3_512 = - G.sha3_384 = - G.sha3_256 = - G.sha3_224 = - G.Keccak = - void 0; - G.keccakP = jl; - var Nt = eo(), - xr = _l(), - Fe = Ul(), - $l = [], - ql = [], - Bl = [], - bd = BigInt(0), - Er = BigInt(1), - Ed = BigInt(2), - xd = BigInt(7), - Pd = BigInt(256), - Td = BigInt(113); - for (let e = 0, t = Er, r = 1, n = 0; e < 24; e++) { - (([r, n] = [n, (2 * r + 3 * n) % 5]), $l.push(2 * (5 * n + r)), ql.push((((e + 1) * (e + 2)) / 2) % 64)); - let i = bd; - for (let o = 0; o < 7; o++) - ((t = ((t << Er) ^ ((t >> xd) * Td)) % Pd), t & Ed && (i ^= Er << ((Er << BigInt(o)) - Er))); - Bl.push(i); - } - var [vd, Ad] = (0, xr.split)(Bl, !0), - Fl = (e, t, r) => (r > 32 ? (0, xr.rotlBH)(e, t, r) : (0, xr.rotlSH)(e, t, r)), - Vl = (e, t, r) => (r > 32 ? (0, xr.rotlBL)(e, t, r) : (0, xr.rotlSL)(e, t, r)); - function jl(e, t = 24) { - let r = new Uint32Array(10); - for (let n = 24 - t; n < 24; n++) { - for (let s = 0; s < 10; s++) r[s] = e[s] ^ e[s + 10] ^ e[s + 20] ^ e[s + 30] ^ e[s + 40]; - for (let s = 0; s < 10; s += 2) { - let a = (s + 8) % 10, - f = (s + 2) % 10, - w = r[f], - A = r[f + 1], - C = Fl(w, A, 1) ^ r[a], - I = Vl(w, A, 1) ^ r[a + 1]; - for (let R = 0; R < 50; R += 10) ((e[s + R] ^= C), (e[s + R + 1] ^= I)); - } - let i = e[2], - o = e[3]; - for (let s = 0; s < 24; s++) { - let a = ql[s], - f = Fl(i, o, a), - w = Vl(i, o, a), - A = $l[s]; - ((i = e[A]), (o = e[A + 1]), (e[A] = f), (e[A + 1] = w)); - } - for (let s = 0; s < 50; s += 10) { - for (let a = 0; a < 10; a++) r[a] = e[s + a]; - for (let a = 0; a < 10; a++) e[s + a] ^= ~r[(a + 2) % 10] & r[(a + 4) % 10]; - } - ((e[0] ^= vd[n]), (e[1] ^= Ad[n])); - } - r.fill(0); - } - var Pr = class e extends Fe.Hash { - constructor(t, r, n, i = !1, o = 24) { - if ( - (super(), - (this.blockLen = t), - (this.suffix = r), - (this.outputLen = n), - (this.enableXOF = i), - (this.rounds = o), - (this.pos = 0), - (this.posOut = 0), - (this.finished = !1), - (this.destroyed = !1), - (0, Nt.anumber)(n), - 0 >= this.blockLen || this.blockLen >= 200) - ) - throw new Error('Sha3 supports only keccak-f1600 function'); - ((this.state = new Uint8Array(200)), (this.state32 = (0, Fe.u32)(this.state))); - } - keccak() { - (Fe.isLE || (0, Fe.byteSwap32)(this.state32), - jl(this.state32, this.rounds), - Fe.isLE || (0, Fe.byteSwap32)(this.state32), - (this.posOut = 0), - (this.pos = 0)); - } - update(t) { - (0, Nt.aexists)(this); - let { blockLen: r, state: n } = this; - t = (0, Fe.toBytes)(t); - let i = t.length; - for (let o = 0; o < i; ) { - let s = Math.min(r - this.pos, i - o); - for (let a = 0; a < s; a++) n[this.pos++] ^= t[o++]; - this.pos === r && this.keccak(); - } - return this; - } - finish() { - if (this.finished) return; - this.finished = !0; - let { state: t, suffix: r, pos: n, blockLen: i } = this; - ((t[n] ^= r), (r & 128) !== 0 && n === i - 1 && this.keccak(), (t[i - 1] ^= 128), this.keccak()); - } - writeInto(t) { - ((0, Nt.aexists)(this, !1), (0, Nt.abytes)(t), this.finish()); - let r = this.state, - { blockLen: n } = this; - for (let i = 0, o = t.length; i < o; ) { - this.posOut >= n && this.keccak(); - let s = Math.min(n - this.posOut, o - i); - (t.set(r.subarray(this.posOut, this.posOut + s), i), (this.posOut += s), (i += s)); - } - return t; - } - xofInto(t) { - if (!this.enableXOF) throw new Error('XOF is not possible for this instance'); - return this.writeInto(t); - } - xof(t) { - return ((0, Nt.anumber)(t), this.xofInto(new Uint8Array(t))); - } - digestInto(t) { - if (((0, Nt.aoutput)(t, this), this.finished)) throw new Error('digest() was already called'); - return (this.writeInto(t), this.destroy(), t); - } - digest() { - return this.digestInto(new Uint8Array(this.outputLen)); - } - destroy() { - ((this.destroyed = !0), this.state.fill(0)); - } - _cloneInto(t) { - let { blockLen: r, suffix: n, outputLen: i, rounds: o, enableXOF: s } = this; - return ( - t || (t = new e(r, n, i, s, o)), - t.state32.set(this.state32), - (t.pos = this.pos), - (t.posOut = this.posOut), - (t.finished = this.finished), - (t.rounds = o), - (t.suffix = n), - (t.outputLen = i), - (t.enableXOF = s), - (t.destroyed = this.destroyed), - t - ); - } - }; - G.Keccak = Pr; - var Ge = (e, t, r) => (0, Fe.wrapConstructor)(() => new Pr(t, e, r)); - G.sha3_224 = Ge(6, 144, 224 / 8); - G.sha3_256 = Ge(6, 136, 256 / 8); - G.sha3_384 = Ge(6, 104, 384 / 8); - G.sha3_512 = Ge(6, 72, 512 / 8); - G.keccak_224 = Ge(1, 144, 224 / 8); - G.keccak_256 = Ge(1, 136, 256 / 8); - G.keccak_384 = Ge(1, 104, 384 / 8); - G.keccak_512 = Ge(1, 72, 512 / 8); - var Ql = (e, t, r) => - (0, Fe.wrapXOFConstructorWithOpts)((n = {}) => new Pr(t, e, n.dkLen === void 0 ? r : n.dkLen, !0)); - G.shake128 = Ql(31, 168, 128 / 8); - G.shake256 = Ql(31, 136, 256 / 8); -}); -var Xl = se((FN, Je) => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); - var { sha3_512: Cd } = Hl(), - Jl = 24, - Tr = 32, - so = (e = 4, t = Math.random) => { - let r = ''; - for (; r.length < e; ) r = r + Math.floor(t() * 36).toString(36); - return r; - }; - function Wl(e) { - let t = 8n, - r = 0n; - for (let n of e.values()) { - let i = BigInt(n); - r = (r << t) + i; - } - return r; - } - var Kl = (e = '') => Wl(Cd(e)).toString(36).slice(1), - Gl = Array.from({ length: 26 }, (e, t) => String.fromCharCode(t + 97)), - Rd = (e) => Gl[Math.floor(e() * Gl.length)], - zl = ({ - globalObj: e = typeof globalThis < 'u' ? globalThis : typeof window < 'u' ? window : {}, - random: t = Math.random, - } = {}) => { - let r = Object.keys(e).toString(), - n = r.length ? r + so(Tr, t) : so(Tr, t); - return Kl(n).substring(0, Tr); - }, - Yl = (e) => () => e++, - Id = 476782367, - Zl = ({ - random: e = Math.random, - counter: t = Yl(Math.floor(e() * Id)), - length: r = Jl, - fingerprint: n = zl({ random: e }), - } = {}) => - function () { - let o = Rd(e), - s = Date.now().toString(36), - a = t().toString(36), - f = so(r, e), - w = `${s + f + a + n}`; - return `${o + Kl(w).substring(1, r)}`; - }, - Sd = Zl(), - kd = (e, { minLength: t = 2, maxLength: r = Tr } = {}) => { - let n = e.length, - i = /^[0-9a-z]+$/; - try { - if (typeof e == 'string' && n >= t && n <= r && i.test(e)) return !0; - } finally { - } - return !1; - }; - Je.exports.getConstants = () => ({ defaultLength: Jl, bigLength: Tr }); - Je.exports.init = Zl; - Je.exports.createId = Sd; - Je.exports.bufToBigInt = Wl; - Je.exports.createCounter = Yl; - Je.exports.createFingerprint = zl; - Je.exports.isCuid = kd; -}); -var eu = se((HN, vr) => { - 'use strict'; - u(); - c(); - p(); - m(); - d(); - l(); - var { createId: Od, init: Dd, getConstants: _d, isCuid: Md } = Xl(); - vr.exports.createId = Od; - vr.exports.init = Dd; - vr.exports.getConstants = _d; - vr.exports.isCuid = Md; -}); -var Gf = {}; -pt(Gf, { - DMMF: () => ir, - Debug: () => K, - Decimal: () => ae, - Extensions: () => gi, - MetricsClient: () => Rt, - PrismaClientInitializationError: () => F, - PrismaClientKnownRequestError: () => X, - PrismaClientRustPanicError: () => le, - PrismaClientUnknownRequestError: () => ne, - PrismaClientValidationError: () => ie, - Public: () => yi, - Sql: () => fe, - createParam: () => sa, - defineDmmfProperty: () => ma, - deserializeJsonResponse: () => Qe, - deserializeRawResult: () => ai, - dmmfToRuntimeDataModel: () => Us, - empty: () => ya, - getPrismaClient: () => pc, - getRuntime: () => Ot, - join: () => ga, - makeStrictEnum: () => mc, - makeTypedQueryFactory: () => da, - objectEnumValues: () => En, - raw: () => Fi, - serializeJsonQuery: () => Rn, - skip: () => Cn, - sqltag: () => Vi, - warnEnvConflicts: () => void 0, - warnOnce: () => tr, -}); -module.exports = jo(Gf); -u(); -c(); -p(); -m(); -d(); -l(); -var gi = {}; -pt(gi, { defineExtension: () => es, getExtensionContext: () => ts }); -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -function es(e) { - return typeof e == 'function' ? e : (t) => t.$extends(e); -} -u(); -c(); -p(); -m(); -d(); -l(); -function ts(e) { - return e; -} -var yi = {}; -pt(yi, { validator: () => rs }); -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -function rs(...e) { - return (t) => t; -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var hi, - ns, - is, - os, - ss = !0; -typeof g < 'u' && - (({ FORCE_COLOR: hi, NODE_DISABLE_COLORS: ns, NO_COLOR: is, TERM: os } = g.env || {}), - (ss = g.stdout && g.stdout.isTTY)); -var Oc = { enabled: !ns && is == null && os !== 'dumb' && ((hi != null && hi !== '0') || ss) }; -function j(e, t) { - let r = new RegExp(`\\x1b\\[${t}m`, 'g'), - n = `\x1B[${e}m`, - i = `\x1B[${t}m`; - return function (o) { - return !Oc.enabled || o == null ? o : n + (~('' + o).indexOf(i) ? o.replace(r, i + n) : o) + i; - }; -} -var Qg = j(0, 0), - Xr = j(1, 22), - en = j(2, 22), - Hg = j(3, 23), - tn = j(4, 24), - Gg = j(7, 27), - Jg = j(8, 28), - Wg = j(9, 29), - Kg = j(30, 39), - ft = j(31, 39), - as = j(32, 39), - ls = j(33, 39), - us = j(34, 39), - zg = j(35, 39), - cs = j(36, 39), - Yg = j(37, 39), - ps = j(90, 39), - Zg = j(90, 39), - Xg = j(40, 49), - ey = j(41, 49), - ty = j(42, 49), - ry = j(43, 49), - ny = j(44, 49), - iy = j(45, 49), - oy = j(46, 49), - sy = j(47, 49); -u(); -c(); -p(); -m(); -d(); -l(); -var Dc = 100, - ms = ['green', 'yellow', 'blue', 'magenta', 'cyan', 'red'], - Kt = [], - ds = Date.now(), - _c = 0, - wi = typeof g < 'u' ? g.env : {}; -globalThis.DEBUG ??= wi.DEBUG ?? ''; -globalThis.DEBUG_COLORS ??= wi.DEBUG_COLORS ? wi.DEBUG_COLORS === 'true' : !0; -var zt = { - enable(e) { - typeof e == 'string' && (globalThis.DEBUG = e); - }, - disable() { - let e = globalThis.DEBUG; - return ((globalThis.DEBUG = ''), e); - }, - enabled(e) { - let t = globalThis.DEBUG.split(',').map((i) => i.replace(/[.+?^${}()|[\]\\]/g, '\\$&')), - r = t.some((i) => (i === '' || i[0] === '-' ? !1 : e.match(RegExp(i.split('*').join('.*') + '$')))), - n = t.some((i) => (i === '' || i[0] !== '-' ? !1 : e.match(RegExp(i.slice(1).split('*').join('.*') + '$')))); - return r && !n; - }, - log: (...e) => { - let [t, r, ...n] = e; - (console.warn ?? console.log)(`${t} ${r}`, ...n); - }, - formatters: {}, -}; -function Mc(e) { - let t = { color: ms[_c++ % ms.length], enabled: zt.enabled(e), namespace: e, log: zt.log, extend: () => {} }, - r = (...n) => { - let { enabled: i, namespace: o, color: s, log: a } = t; - if ((n.length !== 0 && Kt.push([o, ...n]), Kt.length > Dc && Kt.shift(), zt.enabled(o) || i)) { - let f = n.map((A) => (typeof A == 'string' ? A : Nc(A))), - w = `+${Date.now() - ds}ms`; - ((ds = Date.now()), a(o, ...f, w)); - } - }; - return new Proxy(r, { get: (n, i) => t[i], set: (n, i, o) => (t[i] = o) }); -} -var K = new Proxy(Mc, { get: (e, t) => zt[t], set: (e, t, r) => (zt[t] = r) }); -function Nc(e, t = 2) { - let r = new Set(); - return JSON.stringify( - e, - (n, i) => { - if (typeof i == 'object' && i !== null) { - if (r.has(i)) return '[Circular *]'; - r.add(i); - } else if (typeof i == 'bigint') return i.toString(); - return i; - }, - t - ); -} -function fs(e = 7500) { - let t = Kt.map(([r, ...n]) => `${r} ${n.map((i) => (typeof i == 'string' ? i : JSON.stringify(i))).join(' ')}`).join(` -`); - return t.length < e ? t : t.slice(-e); -} -function gs() { - Kt.length = 0; -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var lp = Ts(), - Ei = lp.version; -u(); -c(); -p(); -m(); -d(); -l(); -function gt(e) { - let t = up(); - return ( - t || - (e?.config.engineType === 'library' - ? 'library' - : e?.config.engineType === 'binary' - ? 'binary' - : e?.config.engineType === 'client' - ? 'client' - : cp(e)) - ); -} -function up() { - let e = g.env.PRISMA_CLIENT_ENGINE_TYPE; - return e === 'library' ? 'library' : e === 'binary' ? 'binary' : e === 'client' ? 'client' : void 0; -} -function cp(e) { - return e?.previewFeatures.includes('queryCompiler') ? 'client' : 'library'; -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -function nn(e) { - return e.name === 'DriverAdapterError' && typeof e.cause == 'object'; -} -u(); -c(); -p(); -m(); -d(); -l(); -var O = { - Int32: 0, - Int64: 1, - Float: 2, - Double: 3, - Numeric: 4, - Boolean: 5, - Character: 6, - Text: 7, - Date: 8, - Time: 9, - DateTime: 10, - Json: 11, - Enum: 12, - Bytes: 13, - Set: 14, - Uuid: 15, - Int32Array: 64, - Int64Array: 65, - FloatArray: 66, - DoubleArray: 67, - NumericArray: 68, - BooleanArray: 69, - CharacterArray: 70, - TextArray: 71, - DateArray: 72, - TimeArray: 73, - DateTimeArray: 74, - JsonArray: 75, - EnumArray: 76, - BytesArray: 77, - UuidArray: 78, - UnknownNumber: 128, -}; -u(); -c(); -p(); -m(); -d(); -l(); -var Cs = 'prisma+postgres', - ln = `${Cs}:`; -function un(e) { - return e?.toString().startsWith(`${ln}//`) ?? !1; -} -function Ti(e) { - if (!un(e)) return !1; - let { host: t } = new URL(e); - return t.includes('localhost') || t.includes('127.0.0.1') || t.includes('[::1]'); -} -var er = {}; -pt(er, { - error: () => fp, - info: () => dp, - log: () => mp, - query: () => gp, - should: () => Ss, - tags: () => Xt, - warn: () => vi, -}); -u(); -c(); -p(); -m(); -d(); -l(); -var Xt = { error: ft('prisma:error'), warn: ls('prisma:warn'), info: cs('prisma:info'), query: us('prisma:query') }, - Ss = { warn: () => !g.env.PRISMA_DISABLE_WARNINGS }; -function mp(...e) { - console.log(...e); -} -function vi(e, ...t) { - Ss.warn() && console.warn(`${Xt.warn} ${e}`, ...t); -} -function dp(e, ...t) { - console.info(`${Xt.info} ${e}`, ...t); -} -function fp(e, ...t) { - console.error(`${Xt.error} ${e}`, ...t); -} -function gp(e, ...t) { - console.log(`${Xt.query} ${e}`, ...t); -} -u(); -c(); -p(); -m(); -d(); -l(); -function Ne(e, t) { - throw new Error(t); -} -u(); -c(); -p(); -m(); -d(); -l(); -function Ci(e, t) { - return Object.prototype.hasOwnProperty.call(e, t); -} -u(); -c(); -p(); -m(); -d(); -l(); -function pn(e, t) { - let r = {}; - for (let n of Object.keys(e)) r[n] = t(e[n], n); - return r; -} -u(); -c(); -p(); -m(); -d(); -l(); -function Ri(e, t) { - if (e.length === 0) return; - let r = e[0]; - for (let n = 1; n < e.length; n++) t(r, e[n]) < 0 && (r = e[n]); - return r; -} -u(); -c(); -p(); -m(); -d(); -l(); -function D(e, t) { - Object.defineProperty(e, 'name', { value: t, configurable: !0 }); -} -u(); -c(); -p(); -m(); -d(); -l(); -var Ms = new Set(), - tr = (e, t, ...r) => { - Ms.has(e) || (Ms.add(e), vi(t, ...r)); - }; -var F = class e extends Error { - clientVersion; - errorCode; - retryable; - constructor(t, r, n) { - (super(t), - (this.name = 'PrismaClientInitializationError'), - (this.clientVersion = r), - (this.errorCode = n), - Error.captureStackTrace(e)); - } - get [Symbol.toStringTag]() { - return 'PrismaClientInitializationError'; - } -}; -D(F, 'PrismaClientInitializationError'); -u(); -c(); -p(); -m(); -d(); -l(); -var X = class extends Error { - code; - meta; - clientVersion; - batchRequestIdx; - constructor(t, { code: r, clientVersion: n, meta: i, batchRequestIdx: o }) { - (super(t), - (this.name = 'PrismaClientKnownRequestError'), - (this.code = r), - (this.clientVersion = n), - (this.meta = i), - Object.defineProperty(this, 'batchRequestIdx', { value: o, enumerable: !1, writable: !0 })); - } - get [Symbol.toStringTag]() { - return 'PrismaClientKnownRequestError'; - } -}; -D(X, 'PrismaClientKnownRequestError'); -u(); -c(); -p(); -m(); -d(); -l(); -var le = class extends Error { - clientVersion; - constructor(t, r) { - (super(t), (this.name = 'PrismaClientRustPanicError'), (this.clientVersion = r)); - } - get [Symbol.toStringTag]() { - return 'PrismaClientRustPanicError'; - } -}; -D(le, 'PrismaClientRustPanicError'); -u(); -c(); -p(); -m(); -d(); -l(); -var ne = class extends Error { - clientVersion; - batchRequestIdx; - constructor(t, { clientVersion: r, batchRequestIdx: n }) { - (super(t), - (this.name = 'PrismaClientUnknownRequestError'), - (this.clientVersion = r), - Object.defineProperty(this, 'batchRequestIdx', { value: n, writable: !0, enumerable: !1 })); - } - get [Symbol.toStringTag]() { - return 'PrismaClientUnknownRequestError'; - } -}; -D(ne, 'PrismaClientUnknownRequestError'); -u(); -c(); -p(); -m(); -d(); -l(); -var ie = class extends Error { - name = 'PrismaClientValidationError'; - clientVersion; - constructor(t, { clientVersion: r }) { - (super(t), (this.clientVersion = r)); - } - get [Symbol.toStringTag]() { - return 'PrismaClientValidationError'; - } -}; -D(ie, 'PrismaClientValidationError'); -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var Ie = class { - _map = new Map(); - get(t) { - return this._map.get(t)?.value; - } - set(t, r) { - this._map.set(t, { value: r }); - } - getOrCreate(t, r) { - let n = this._map.get(t); - if (n) return n.value; - let i = r(); - return (this.set(t, i), i); - } -}; -u(); -c(); -p(); -m(); -d(); -l(); -function qe(e) { - return e.substring(0, 1).toLowerCase() + e.substring(1); -} -u(); -c(); -p(); -m(); -d(); -l(); -function Ls(e, t) { - let r = {}; - for (let n of e) { - let i = n[t]; - r[i] = n; - } - return r; -} -u(); -c(); -p(); -m(); -d(); -l(); -function rr(e) { - let t; - return { - get() { - return (t || (t = { value: e() }), t.value); - }, - }; -} -u(); -c(); -p(); -m(); -d(); -l(); -function Us(e) { - return { models: Ii(e.models), enums: Ii(e.enums), types: Ii(e.types) }; -} -function Ii(e) { - let t = {}; - for (let { name: r, ...n } of e) t[r] = n; - return t; -} -u(); -c(); -p(); -m(); -d(); -l(); -function ht(e) { - return e instanceof Date || Object.prototype.toString.call(e) === '[object Date]'; -} -function mn(e) { - return e.toString() !== 'Invalid Date'; -} -u(); -c(); -p(); -m(); -d(); -l(); -l(); -function wt(e) { - return v.isDecimal(e) - ? !0 - : e !== null && - typeof e == 'object' && - typeof e.s == 'number' && - typeof e.e == 'number' && - typeof e.toFixed == 'function' && - Array.isArray(e.d); -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var ir = {}; -pt(ir, { ModelAction: () => nr, datamodelEnumToSchemaEnum: () => hp }); -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -function hp(e) { - return { name: e.name, values: e.values.map((t) => t.name) }; -} -u(); -c(); -p(); -m(); -d(); -l(); -var nr = ((B) => ( - (B.findUnique = 'findUnique'), - (B.findUniqueOrThrow = 'findUniqueOrThrow'), - (B.findFirst = 'findFirst'), - (B.findFirstOrThrow = 'findFirstOrThrow'), - (B.findMany = 'findMany'), - (B.create = 'create'), - (B.createMany = 'createMany'), - (B.createManyAndReturn = 'createManyAndReturn'), - (B.update = 'update'), - (B.updateMany = 'updateMany'), - (B.updateManyAndReturn = 'updateManyAndReturn'), - (B.upsert = 'upsert'), - (B.delete = 'delete'), - (B.deleteMany = 'deleteMany'), - (B.groupBy = 'groupBy'), - (B.count = 'count'), - (B.aggregate = 'aggregate'), - (B.findRaw = 'findRaw'), - (B.aggregateRaw = 'aggregateRaw'), - B -))(nr || {}); -var wp = Ae(Is()); -var bp = { red: ft, gray: ps, dim: en, bold: Xr, underline: tn, highlightSource: (e) => e.highlight() }, - Ep = { red: (e) => e, gray: (e) => e, dim: (e) => e, bold: (e) => e, underline: (e) => e, highlightSource: (e) => e }; -function xp({ message: e, originalMethod: t, isPanic: r, callArguments: n }) { - return { functionName: `prisma.${t}()`, message: e, isPanic: r ?? !1, callArguments: n }; -} -function Pp({ functionName: e, location: t, message: r, isPanic: n, contextLines: i, callArguments: o }, s) { - let a = [''], - f = t ? ' in' : ':'; - if ( - (n - ? (a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold('on us')}, you did nothing wrong.`)), - a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${f}`))) - : a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${f}`)), - t && a.push(s.underline(Tp(t))), - i) - ) { - a.push(''); - let w = [i.toString()]; - (o && (w.push(o), w.push(s.dim(')'))), a.push(w.join('')), o && a.push('')); - } else (a.push(''), o && a.push(o), a.push('')); - return ( - a.push(r), - a.join(` -`) - ); -} -function Tp(e) { - let t = [e.fileName]; - return (e.lineNumber && t.push(String(e.lineNumber)), e.columnNumber && t.push(String(e.columnNumber)), t.join(':')); -} -function dn(e) { - let t = e.showColors ? bp : Ep, - r; - return (typeof $getTemplateParameters < 'u' ? (r = $getTemplateParameters(e, t)) : (r = xp(e)), Pp(r, t)); -} -u(); -c(); -p(); -m(); -d(); -l(); -var Gs = Ae(Si()); -u(); -c(); -p(); -m(); -d(); -l(); -function qs(e, t, r) { - let n = Bs(e), - i = vp(n), - o = Cp(i); - o ? fn(o, t, r) : t.addErrorMessage(() => 'Unknown error'); -} -function Bs(e) { - return e.errors.flatMap((t) => (t.kind === 'Union' ? Bs(t) : [t])); -} -function vp(e) { - let t = new Map(), - r = []; - for (let n of e) { - if (n.kind !== 'InvalidArgumentType') { - r.push(n); - continue; - } - let i = `${n.selectionPath.join('.')}:${n.argumentPath.join('.')}`, - o = t.get(i); - o - ? t.set(i, { ...n, argument: { ...n.argument, typeNames: Ap(o.argument.typeNames, n.argument.typeNames) } }) - : t.set(i, n); - } - return (r.push(...t.values()), r); -} -function Ap(e, t) { - return [...new Set(e.concat(t))]; -} -function Cp(e) { - return Ri(e, (t, r) => { - let n = Vs(t), - i = Vs(r); - return n !== i ? n - i : $s(t) - $s(r); - }); -} -function Vs(e) { - let t = 0; - return ( - Array.isArray(e.selectionPath) && (t += e.selectionPath.length), - Array.isArray(e.argumentPath) && (t += e.argumentPath.length), - t - ); -} -function $s(e) { - switch (e.kind) { - case 'InvalidArgumentValue': - case 'ValueTooLarge': - return 20; - case 'InvalidArgumentType': - return 10; - case 'RequiredArgumentMissing': - return -10; - default: - return 0; - } -} -u(); -c(); -p(); -m(); -d(); -l(); -var we = class { - constructor(t, r) { - this.name = t; - this.value = r; - } - isRequired = !1; - makeRequired() { - return ((this.isRequired = !0), this); - } - write(t) { - let { - colors: { green: r }, - } = t.context; - (t.addMarginSymbol(r(this.isRequired ? '+' : '?')), - t.write(r(this.name)), - this.isRequired || t.write(r('?')), - t.write(r(': ')), - typeof this.value == 'string' ? t.write(r(this.value)) : t.write(this.value)); - } -}; -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -Qs(); -u(); -c(); -p(); -m(); -d(); -l(); -var bt = class { - constructor(t = 0, r) { - this.context = r; - this.currentIndent = t; - } - lines = []; - currentLine = ''; - currentIndent = 0; - marginSymbol; - afterNextNewLineCallback; - write(t) { - return (typeof t == 'string' ? (this.currentLine += t) : t.write(this), this); - } - writeJoined(t, r, n = (i, o) => o.write(i)) { - let i = r.length - 1; - for (let o = 0; o < r.length; o++) (n(r[o], this), o !== i && this.write(t)); - return this; - } - writeLine(t) { - return this.write(t).newLine(); - } - newLine() { - (this.lines.push(this.indentedCurrentLine()), (this.currentLine = ''), (this.marginSymbol = void 0)); - let t = this.afterNextNewLineCallback; - return ((this.afterNextNewLineCallback = void 0), t?.(), this); - } - withIndent(t) { - return (this.indent(), t(this), this.unindent(), this); - } - afterNextNewline(t) { - return ((this.afterNextNewLineCallback = t), this); - } - indent() { - return (this.currentIndent++, this); - } - unindent() { - return (this.currentIndent > 0 && this.currentIndent--, this); - } - addMarginSymbol(t) { - return ((this.marginSymbol = t), this); - } - toString() { - return this.lines.concat(this.indentedCurrentLine()).join(` -`); - } - getCurrentLineLength() { - return this.currentLine.length; - } - indentedCurrentLine() { - let t = this.currentLine.padStart(this.currentLine.length + 2 * this.currentIndent); - return this.marginSymbol ? this.marginSymbol + t.slice(1) : t; - } -}; -js(); -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var gn = class { - constructor(t) { - this.value = t; - } - write(t) { - t.write(this.value); - } - markAsError() { - this.value.markAsError(); - } -}; -u(); -c(); -p(); -m(); -d(); -l(); -var yn = (e) => e, - hn = { bold: yn, red: yn, green: yn, dim: yn, enabled: !1 }, - Hs = { bold: Xr, red: ft, green: as, dim: en, enabled: !0 }, - Et = { - write(e) { - e.writeLine(','); - }, - }; -u(); -c(); -p(); -m(); -d(); -l(); -var Se = class { - constructor(t) { - this.contents = t; - } - isUnderlined = !1; - color = (t) => t; - underline() { - return ((this.isUnderlined = !0), this); - } - setColor(t) { - return ((this.color = t), this); - } - write(t) { - let r = t.getCurrentLineLength(); - (t.write(this.color(this.contents)), - this.isUnderlined && - t.afterNextNewline(() => { - t.write(' '.repeat(r)).writeLine(this.color('~'.repeat(this.contents.length))); - })); - } -}; -u(); -c(); -p(); -m(); -d(); -l(); -var Be = class { - hasError = !1; - markAsError() { - return ((this.hasError = !0), this); - } -}; -var xt = class extends Be { - items = []; - addItem(t) { - return (this.items.push(new gn(t)), this); - } - getField(t) { - return this.items[t]; - } - getPrintWidth() { - return this.items.length === 0 ? 2 : Math.max(...this.items.map((r) => r.value.getPrintWidth())) + 2; - } - write(t) { - if (this.items.length === 0) { - this.writeEmpty(t); - return; - } - this.writeWithItems(t); - } - writeEmpty(t) { - let r = new Se('[]'); - (this.hasError && r.setColor(t.context.colors.red).underline(), t.write(r)); - } - writeWithItems(t) { - let { colors: r } = t.context; - (t - .writeLine('[') - .withIndent(() => t.writeJoined(Et, this.items).newLine()) - .write(']'), - this.hasError && - t.afterNextNewline(() => { - t.writeLine(r.red('~'.repeat(this.getPrintWidth()))); - })); - } - asObject() {} -}; -var Pt = class e extends Be { - fields = {}; - suggestions = []; - addField(t) { - this.fields[t.name] = t; - } - addSuggestion(t) { - this.suggestions.push(t); - } - getField(t) { - return this.fields[t]; - } - getDeepField(t) { - let [r, ...n] = t, - i = this.getField(r); - if (!i) return; - let o = i; - for (let s of n) { - let a; - if ( - (o.value instanceof e ? (a = o.value.getField(s)) : o.value instanceof xt && (a = o.value.getField(Number(s))), - !a) - ) - return; - o = a; - } - return o; - } - getDeepFieldValue(t) { - return t.length === 0 ? this : this.getDeepField(t)?.value; - } - hasField(t) { - return !!this.getField(t); - } - removeAllFields() { - this.fields = {}; - } - removeField(t) { - delete this.fields[t]; - } - getFields() { - return this.fields; - } - isEmpty() { - return Object.keys(this.fields).length === 0; - } - getFieldValue(t) { - return this.getField(t)?.value; - } - getDeepSubSelectionValue(t) { - let r = this; - for (let n of t) { - if (!(r instanceof e)) return; - let i = r.getSubSelectionValue(n); - if (!i) return; - r = i; - } - return r; - } - getDeepSelectionParent(t) { - let r = this.getSelectionParent(); - if (!r) return; - let n = r; - for (let i of t) { - let o = n.value.getFieldValue(i); - if (!o || !(o instanceof e)) return; - let s = o.getSelectionParent(); - if (!s) return; - n = s; - } - return n; - } - getSelectionParent() { - let t = this.getField('select')?.value.asObject(); - if (t) return { kind: 'select', value: t }; - let r = this.getField('include')?.value.asObject(); - if (r) return { kind: 'include', value: r }; - } - getSubSelectionValue(t) { - return this.getSelectionParent()?.value.fields[t].value; - } - getPrintWidth() { - let t = Object.values(this.fields); - return t.length == 0 ? 2 : Math.max(...t.map((n) => n.getPrintWidth())) + 2; - } - write(t) { - let r = Object.values(this.fields); - if (r.length === 0 && this.suggestions.length === 0) { - this.writeEmpty(t); - return; - } - this.writeWithContents(t, r); - } - asObject() { - return this; - } - writeEmpty(t) { - let r = new Se('{}'); - (this.hasError && r.setColor(t.context.colors.red).underline(), t.write(r)); - } - writeWithContents(t, r) { - (t.writeLine('{').withIndent(() => { - t.writeJoined(Et, [...r, ...this.suggestions]).newLine(); - }), - t.write('}'), - this.hasError && - t.afterNextNewline(() => { - t.writeLine(t.context.colors.red('~'.repeat(this.getPrintWidth()))); - })); - } -}; -u(); -c(); -p(); -m(); -d(); -l(); -var re = class extends Be { - constructor(r) { - super(); - this.text = r; - } - getPrintWidth() { - return this.text.length; - } - write(r) { - let n = new Se(this.text); - (this.hasError && n.underline().setColor(r.context.colors.red), r.write(n)); - } - asObject() {} -}; -u(); -c(); -p(); -m(); -d(); -l(); -var or = class { - fields = []; - addField(t, r) { - return ( - this.fields.push({ - write(n) { - let { green: i, dim: o } = n.context.colors; - n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o('+'))); - }, - }), - this - ); - } - write(t) { - let { - colors: { green: r }, - } = t.context; - t.writeLine(r('{')) - .withIndent(() => { - t.writeJoined(Et, this.fields).newLine(); - }) - .write(r('}')) - .addMarginSymbol(r('+')); - } -}; -function fn(e, t, r) { - switch (e.kind) { - case 'MutuallyExclusiveFields': - Rp(e, t); - break; - case 'IncludeOnScalar': - Ip(e, t); - break; - case 'EmptySelection': - Sp(e, t, r); - break; - case 'UnknownSelectionField': - _p(e, t); - break; - case 'InvalidSelectionValue': - Mp(e, t); - break; - case 'UnknownArgument': - Np(e, t); - break; - case 'UnknownInputField': - Lp(e, t); - break; - case 'RequiredArgumentMissing': - Up(e, t); - break; - case 'InvalidArgumentType': - Fp(e, t); - break; - case 'InvalidArgumentValue': - Vp(e, t); - break; - case 'ValueTooLarge': - $p(e, t); - break; - case 'SomeFieldsMissing': - qp(e, t); - break; - case 'TooManyFieldsGiven': - Bp(e, t); - break; - case 'Union': - qs(e, t, r); - break; - default: - throw new Error('not implemented: ' + e.kind); - } -} -function Rp(e, t) { - let r = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - (r && (r.getField(e.firstField)?.markAsError(), r.getField(e.secondField)?.markAsError()), - t.addErrorMessage( - (n) => - `Please ${n.bold('either')} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red('not both')} at the same time.` - )); -} -function Ip(e, t) { - let [r, n] = Tt(e.selectionPath), - i = e.outputType, - o = t.arguments.getDeepSelectionParent(r)?.value; - if (o && (o.getField(n)?.markAsError(), i)) - for (let s of i.fields) s.isRelation && o.addSuggestion(new we(s.name, 'true')); - t.addErrorMessage((s) => { - let a = `Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold('include')} statement`; - return ( - i ? (a += ` on model ${s.bold(i.name)}. ${sr(s)}`) : (a += '.'), - (a += ` -Note that ${s.bold('include')} statements only accept relation fields.`), - a - ); - }); -} -function Sp(e, t, r) { - let n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - if (n) { - let i = n.getField('omit')?.value.asObject(); - if (i) { - kp(e, t, i); - return; - } - if (n.hasField('select')) { - Op(e, t); - return; - } - } - if (r?.[qe(e.outputType.name)]) { - Dp(e, t); - return; - } - t.addErrorMessage(() => `Unknown field at "${e.selectionPath.join('.')} selection"`); -} -function kp(e, t, r) { - r.removeAllFields(); - for (let n of e.outputType.fields) r.addSuggestion(new we(n.name, 'false')); - t.addErrorMessage( - (n) => - `The ${n.red('omit')} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result` - ); -} -function Op(e, t) { - let r = e.outputType, - n = t.arguments.getDeepSelectionParent(e.selectionPath)?.value, - i = n?.isEmpty() ?? !1; - (n && (n.removeAllFields(), Ks(n, r)), - t.addErrorMessage((o) => - i - ? `The ${o.red('`select`')} statement for type ${o.bold(r.name)} must not be empty. ${sr(o)}` - : `The ${o.red('`select`')} statement for type ${o.bold(r.name)} needs ${o.bold('at least one truthy value')}.` - )); -} -function Dp(e, t) { - let r = new or(); - for (let i of e.outputType.fields) i.isRelation || r.addField(i.name, 'false'); - let n = new we('omit', r).makeRequired(); - if (e.selectionPath.length === 0) t.arguments.addSuggestion(n); - else { - let [i, o] = Tt(e.selectionPath), - a = t.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o); - if (a) { - let f = a?.value.asObject() ?? new Pt(); - (f.addSuggestion(n), (a.value = f)); - } - } - t.addErrorMessage( - (i) => - `The global ${i.red('omit')} configuration excludes every field of the model ${i.bold(e.outputType.name)}. At least one field must be included in the result` - ); -} -function _p(e, t) { - let r = zs(e.selectionPath, t); - if (r.parentKind !== 'unknown') { - r.field.markAsError(); - let n = r.parent; - switch (r.parentKind) { - case 'select': - Ks(n, e.outputType); - break; - case 'include': - jp(n, e.outputType); - break; - case 'omit': - Qp(n, e.outputType); - break; - } - } - t.addErrorMessage((n) => { - let i = [`Unknown field ${n.red(`\`${r.fieldName}\``)}`]; - return ( - r.parentKind !== 'unknown' && i.push(`for ${n.bold(r.parentKind)} statement`), - i.push(`on model ${n.bold(`\`${e.outputType.name}\``)}.`), - i.push(sr(n)), - i.join(' ') - ); - }); -} -function Mp(e, t) { - let r = zs(e.selectionPath, t); - (r.parentKind !== 'unknown' && r.field.value.markAsError(), - t.addErrorMessage((n) => `Invalid value for selection field \`${n.red(r.fieldName)}\`: ${e.underlyingError}`)); -} -function Np(e, t) { - let r = e.argumentPath[0], - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - (n && (n.getField(r)?.markAsError(), Hp(n, e.arguments)), - t.addErrorMessage((i) => - Js( - i, - r, - e.arguments.map((o) => o.name) - ) - )); -} -function Lp(e, t) { - let [r, n] = Tt(e.argumentPath), - i = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - if (i) { - i.getDeepField(e.argumentPath)?.markAsError(); - let o = i.getDeepFieldValue(r)?.asObject(); - o && Ys(o, e.inputType); - } - t.addErrorMessage((o) => - Js( - o, - n, - e.inputType.fields.map((s) => s.name) - ) - ); -} -function Js(e, t, r) { - let n = [`Unknown argument \`${e.red(t)}\`.`], - i = Jp(t, r); - return (i && n.push(`Did you mean \`${e.green(i)}\`?`), r.length > 0 && n.push(sr(e)), n.join(' ')); -} -function Up(e, t) { - let r; - t.addErrorMessage((f) => - r?.value instanceof re && r.value.text === 'null' - ? `Argument \`${f.green(o)}\` must not be ${f.red('null')}.` - : `Argument \`${f.green(o)}\` is missing.` - ); - let n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - if (!n) return; - let [i, o] = Tt(e.argumentPath), - s = new or(), - a = n.getDeepFieldValue(i)?.asObject(); - if (a) { - if (((r = a.getField(o)), r && a.removeField(o), e.inputTypes.length === 1 && e.inputTypes[0].kind === 'object')) { - for (let f of e.inputTypes[0].fields) s.addField(f.name, f.typeNames.join(' | ')); - a.addSuggestion(new we(o, s).makeRequired()); - } else { - let f = e.inputTypes.map(Ws).join(' | '); - a.addSuggestion(new we(o, f).makeRequired()); - } - if (e.dependentArgumentPath) { - n.getDeepField(e.dependentArgumentPath)?.markAsError(); - let [, f] = Tt(e.dependentArgumentPath); - t.addErrorMessage( - (w) => `Argument \`${w.green(o)}\` is required because argument \`${w.green(f)}\` was provided.` - ); - } - } -} -function Ws(e) { - return e.kind === 'list' ? `${Ws(e.elementType)}[]` : e.name; -} -function Fp(e, t) { - let r = e.argument.name, - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - (n && n.getDeepFieldValue(e.argumentPath)?.markAsError(), - t.addErrorMessage((i) => { - let o = wn( - 'or', - e.argument.typeNames.map((s) => i.green(s)) - ); - return `Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`; - })); -} -function Vp(e, t) { - let r = e.argument.name, - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - (n && n.getDeepFieldValue(e.argumentPath)?.markAsError(), - t.addErrorMessage((i) => { - let o = [`Invalid value for argument \`${i.bold(r)}\``]; - if ((e.underlyingError && o.push(`: ${e.underlyingError}`), o.push('.'), e.argument.typeNames.length > 0)) { - let s = wn( - 'or', - e.argument.typeNames.map((a) => i.green(a)) - ); - o.push(` Expected ${s}.`); - } - return o.join(''); - })); -} -function $p(e, t) { - let r = e.argument.name, - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(), - i; - if (n) { - let s = n.getDeepField(e.argumentPath)?.value; - (s?.markAsError(), s instanceof re && (i = s.text)); - } - t.addErrorMessage((o) => { - let s = ['Unable to fit value']; - return (i && s.push(o.red(i)), s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``), s.join(' ')); - }); -} -function qp(e, t) { - let r = e.argumentPath[e.argumentPath.length - 1], - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(); - if (n) { - let i = n.getDeepFieldValue(e.argumentPath)?.asObject(); - i && Ys(i, e.inputType); - } - t.addErrorMessage((i) => { - let o = [`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`]; - return ( - e.constraints.minFieldCount === 1 - ? e.constraints.requiredFields - ? o.push( - `${i.green('at least one of')} ${wn( - 'or', - e.constraints.requiredFields.map((s) => `\`${i.bold(s)}\``) - )} arguments.` - ) - : o.push(`${i.green('at least one')} argument.`) - : o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`), - o.push(sr(i)), - o.join(' ') - ); - }); -} -function Bp(e, t) { - let r = e.argumentPath[e.argumentPath.length - 1], - n = t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(), - i = []; - if (n) { - let o = n.getDeepFieldValue(e.argumentPath)?.asObject(); - o && (o.markAsError(), (i = Object.keys(o.getFields()))); - } - t.addErrorMessage((o) => { - let s = [`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`]; - return ( - e.constraints.minFieldCount === 1 && e.constraints.maxFieldCount == 1 - ? s.push(`${o.green('exactly one')} argument,`) - : e.constraints.maxFieldCount == 1 - ? s.push(`${o.green('at most one')} argument,`) - : s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`), - s.push( - `but you provided ${wn( - 'and', - i.map((a) => o.red(a)) - )}. Please choose` - ), - e.constraints.maxFieldCount === 1 ? s.push('one.') : s.push(`${e.constraints.maxFieldCount}.`), - s.join(' ') - ); - }); -} -function Ks(e, t) { - for (let r of t.fields) e.hasField(r.name) || e.addSuggestion(new we(r.name, 'true')); -} -function jp(e, t) { - for (let r of t.fields) r.isRelation && !e.hasField(r.name) && e.addSuggestion(new we(r.name, 'true')); -} -function Qp(e, t) { - for (let r of t.fields) !e.hasField(r.name) && !r.isRelation && e.addSuggestion(new we(r.name, 'true')); -} -function Hp(e, t) { - for (let r of t) e.hasField(r.name) || e.addSuggestion(new we(r.name, r.typeNames.join(' | '))); -} -function zs(e, t) { - let [r, n] = Tt(e), - i = t.arguments.getDeepSubSelectionValue(r)?.asObject(); - if (!i) return { parentKind: 'unknown', fieldName: n }; - let o = i.getFieldValue('select')?.asObject(), - s = i.getFieldValue('include')?.asObject(), - a = i.getFieldValue('omit')?.asObject(), - f = o?.getField(n); - return o && f - ? { parentKind: 'select', parent: o, field: f, fieldName: n } - : ((f = s?.getField(n)), - s && f - ? { parentKind: 'include', field: f, parent: s, fieldName: n } - : ((f = a?.getField(n)), - a && f - ? { parentKind: 'omit', field: f, parent: a, fieldName: n } - : { parentKind: 'unknown', fieldName: n })); -} -function Ys(e, t) { - if (t.kind === 'object') - for (let r of t.fields) e.hasField(r.name) || e.addSuggestion(new we(r.name, r.typeNames.join(' | '))); -} -function Tt(e) { - let t = [...e], - r = t.pop(); - if (!r) throw new Error('unexpected empty path'); - return [t, r]; -} -function sr({ green: e, enabled: t }) { - return 'Available options are ' + (t ? `listed in ${e('green')}` : 'marked with ?') + '.'; -} -function wn(e, t) { - if (t.length === 1) return t[0]; - let r = [...t], - n = r.pop(); - return `${r.join(', ')} ${e} ${n}`; -} -var Gp = 3; -function Jp(e, t) { - let r = 1 / 0, - n; - for (let i of t) { - let o = (0, Gs.default)(e, i); - o > Gp || (o < r && ((r = o), (n = i))); - } - return n; -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var ar = class { - modelName; - name; - typeName; - isList; - isEnum; - constructor(t, r, n, i, o) { - ((this.modelName = t), (this.name = r), (this.typeName = n), (this.isList = i), (this.isEnum = o)); - } - _toGraphQLInputType() { - let t = this.isList ? 'List' : '', - r = this.isEnum ? 'Enum' : ''; - return `${t}${r}${this.typeName}FieldRefInput<${this.modelName}>`; - } -}; -function vt(e) { - return e instanceof ar; -} -u(); -c(); -p(); -m(); -d(); -l(); -var bn = Symbol(), - Oi = new WeakMap(), - Le = class { - constructor(t) { - t === bn - ? Oi.set(this, `Prisma.${this._getName()}`) - : Oi.set(this, `new Prisma.${this._getNamespace()}.${this._getName()}()`); - } - _getName() { - return this.constructor.name; - } - toString() { - return Oi.get(this); - } - }, - lr = class extends Le { - _getNamespace() { - return 'NullTypes'; - } - }, - ur = class extends lr { - #e; - }; -Di(ur, 'DbNull'); -var cr = class extends lr { - #e; -}; -Di(cr, 'JsonNull'); -var pr = class extends lr { - #e; -}; -Di(pr, 'AnyNull'); -var En = { - classes: { DbNull: ur, JsonNull: cr, AnyNull: pr }, - instances: { DbNull: new ur(bn), JsonNull: new cr(bn), AnyNull: new pr(bn) }, -}; -function Di(e, t) { - Object.defineProperty(e, 'name', { value: t, configurable: !0 }); -} -u(); -c(); -p(); -m(); -d(); -l(); -var Zs = ': ', - xn = class { - constructor(t, r) { - this.name = t; - this.value = r; - } - hasError = !1; - markAsError() { - this.hasError = !0; - } - getPrintWidth() { - return this.name.length + this.value.getPrintWidth() + Zs.length; - } - write(t) { - let r = new Se(this.name); - (this.hasError && r.underline().setColor(t.context.colors.red), t.write(r).write(Zs).write(this.value)); - } - }; -var _i = class { - arguments; - errorMessages = []; - constructor(t) { - this.arguments = t; - } - write(t) { - t.write(this.arguments); - } - addErrorMessage(t) { - this.errorMessages.push(t); - } - renderAllMessages(t) { - return this.errorMessages.map((r) => r(t)).join(` -`); - } -}; -function At(e) { - return new _i(Xs(e)); -} -function Xs(e) { - let t = new Pt(); - for (let [r, n] of Object.entries(e)) { - let i = new xn(r, ea(n)); - t.addField(i); - } - return t; -} -function ea(e) { - if (typeof e == 'string') return new re(JSON.stringify(e)); - if (typeof e == 'number' || typeof e == 'boolean') return new re(String(e)); - if (typeof e == 'bigint') return new re(`${e}n`); - if (e === null) return new re('null'); - if (e === void 0) return new re('undefined'); - if (wt(e)) return new re(`new Prisma.Decimal("${e.toFixed()}")`); - if (e instanceof Uint8Array) - return y.isBuffer(e) ? new re(`Buffer.alloc(${e.byteLength})`) : new re(`new Uint8Array(${e.byteLength})`); - if (e instanceof Date) { - let t = mn(e) ? e.toISOString() : 'Invalid Date'; - return new re(`new Date("${t}")`); - } - return e instanceof Le - ? new re(`Prisma.${e._getName()}`) - : vt(e) - ? new re(`prisma.${qe(e.modelName)}.$fields.${e.name}`) - : Array.isArray(e) - ? Wp(e) - : typeof e == 'object' - ? Xs(e) - : new re(Object.prototype.toString.call(e)); -} -function Wp(e) { - let t = new xt(); - for (let r of e) t.addItem(ea(r)); - return t; -} -function Pn(e, t) { - let r = t === 'pretty' ? Hs : hn, - n = e.renderAllMessages(r), - i = new bt(0, { colors: r }).write(e).toString(); - return { message: n, args: i }; -} -function Tn({ args: e, errors: t, errorFormat: r, callsite: n, originalMethod: i, clientVersion: o, globalOmit: s }) { - let a = At(e); - for (let C of t) fn(C, a, s); - let { message: f, args: w } = Pn(a, r), - A = dn({ message: f, callsite: n, originalMethod: i, showColors: r === 'pretty', callArguments: w }); - throw new ie(A, { clientVersion: o }); -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -function ke(e) { - return e.replace(/^./, (t) => t.toLowerCase()); -} -u(); -c(); -p(); -m(); -d(); -l(); -function ra(e, t, r) { - let n = ke(r); - return !t.result || !(t.result.$allModels || t.result[n]) - ? e - : Kp({ ...e, ...ta(t.name, e, t.result.$allModels), ...ta(t.name, e, t.result[n]) }); -} -function Kp(e) { - let t = new Ie(), - r = (n, i) => - t.getOrCreate(n, () => (i.has(n) ? [n] : (i.add(n), e[n] ? e[n].needs.flatMap((o) => r(o, i)) : [n]))); - return pn(e, (n) => ({ ...n, needs: r(n.name, new Set()) })); -} -function ta(e, t, r) { - return r - ? pn(r, ({ needs: n, compute: i }, o) => ({ - name: o, - needs: n ? Object.keys(n).filter((s) => n[s]) : [], - compute: zp(t, o, i), - })) - : {}; -} -function zp(e, t, r) { - let n = e?.[t]?.compute; - return n ? (i) => r({ ...i, [t]: n(i) }) : r; -} -function na(e, t) { - if (!t) return e; - let r = { ...e }; - for (let n of Object.values(t)) if (e[n.name]) for (let i of n.needs) r[i] = !0; - return r; -} -function ia(e, t) { - if (!t) return e; - let r = { ...e }; - for (let n of Object.values(t)) if (!e[n.name]) for (let i of n.needs) delete r[i]; - return r; -} -var vn = class { - constructor(t, r) { - this.extension = t; - this.previous = r; - } - computedFieldsCache = new Ie(); - modelExtensionsCache = new Ie(); - queryCallbacksCache = new Ie(); - clientExtensions = rr(() => - this.extension.client - ? { ...this.previous?.getAllClientExtensions(), ...this.extension.client } - : this.previous?.getAllClientExtensions() - ); - batchCallbacks = rr(() => { - let t = this.previous?.getAllBatchQueryCallbacks() ?? [], - r = this.extension.query?.$__internalBatch; - return r ? t.concat(r) : t; - }); - getAllComputedFields(t) { - return this.computedFieldsCache.getOrCreate(t, () => - ra(this.previous?.getAllComputedFields(t), this.extension, t) - ); - } - getAllClientExtensions() { - return this.clientExtensions.get(); - } - getAllModelExtensions(t) { - return this.modelExtensionsCache.getOrCreate(t, () => { - let r = ke(t); - return !this.extension.model || !(this.extension.model[r] || this.extension.model.$allModels) - ? this.previous?.getAllModelExtensions(t) - : { - ...this.previous?.getAllModelExtensions(t), - ...this.extension.model.$allModels, - ...this.extension.model[r], - }; - }); - } - getAllQueryCallbacks(t, r) { - return this.queryCallbacksCache.getOrCreate(`${t}:${r}`, () => { - let n = this.previous?.getAllQueryCallbacks(t, r) ?? [], - i = [], - o = this.extension.query; - return !o || !(o[t] || o.$allModels || o[r] || o.$allOperations) - ? n - : (o[t] !== void 0 && - (o[t][r] !== void 0 && i.push(o[t][r]), o[t].$allOperations !== void 0 && i.push(o[t].$allOperations)), - t !== '$none' && - o.$allModels !== void 0 && - (o.$allModels[r] !== void 0 && i.push(o.$allModels[r]), - o.$allModels.$allOperations !== void 0 && i.push(o.$allModels.$allOperations)), - o[r] !== void 0 && i.push(o[r]), - o.$allOperations !== void 0 && i.push(o.$allOperations), - n.concat(i)); - }); - } - getAllBatchQueryCallbacks() { - return this.batchCallbacks.get(); - } - }, - Ct = class e { - constructor(t) { - this.head = t; - } - static empty() { - return new e(); - } - static single(t) { - return new e(new vn(t)); - } - isEmpty() { - return this.head === void 0; - } - append(t) { - return new e(new vn(t, this.head)); - } - getAllComputedFields(t) { - return this.head?.getAllComputedFields(t); - } - getAllClientExtensions() { - return this.head?.getAllClientExtensions(); - } - getAllModelExtensions(t) { - return this.head?.getAllModelExtensions(t); - } - getAllQueryCallbacks(t, r) { - return this.head?.getAllQueryCallbacks(t, r) ?? []; - } - getAllBatchQueryCallbacks() { - return this.head?.getAllBatchQueryCallbacks() ?? []; - } - }; -u(); -c(); -p(); -m(); -d(); -l(); -var An = class { - constructor(t) { - this.name = t; - } -}; -function oa(e) { - return e instanceof An; -} -function sa(e) { - return new An(e); -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var aa = Symbol(), - mr = class { - constructor(t) { - if (t !== aa) throw new Error('Skip instance can not be constructed directly'); - } - ifUndefined(t) { - return t === void 0 ? Cn : t; - } - }, - Cn = new mr(aa); -function Oe(e) { - return e instanceof mr; -} -var Yp = { - findUnique: 'findUnique', - findUniqueOrThrow: 'findUniqueOrThrow', - findFirst: 'findFirst', - findFirstOrThrow: 'findFirstOrThrow', - findMany: 'findMany', - count: 'aggregate', - create: 'createOne', - createMany: 'createMany', - createManyAndReturn: 'createManyAndReturn', - update: 'updateOne', - updateMany: 'updateMany', - updateManyAndReturn: 'updateManyAndReturn', - upsert: 'upsertOne', - delete: 'deleteOne', - deleteMany: 'deleteMany', - executeRaw: 'executeRaw', - queryRaw: 'queryRaw', - aggregate: 'aggregate', - groupBy: 'groupBy', - runCommandRaw: 'runCommandRaw', - findRaw: 'findRaw', - aggregateRaw: 'aggregateRaw', - }, - la = 'explicitly `undefined` values are not allowed'; -function Rn({ - modelName: e, - action: t, - args: r, - runtimeDataModel: n, - extensions: i = Ct.empty(), - callsite: o, - clientMethod: s, - errorFormat: a, - clientVersion: f, - previewFeatures: w, - globalOmit: A, -}) { - let C = new Mi({ - runtimeDataModel: n, - modelName: e, - action: t, - rootArgs: r, - callsite: o, - extensions: i, - selectionPath: [], - argumentPath: [], - originalMethod: s, - errorFormat: a, - clientVersion: f, - previewFeatures: w, - globalOmit: A, - }); - return { modelName: e, action: Yp[t], query: dr(r, C) }; -} -function dr({ select: e, include: t, ...r } = {}, n) { - let i = r.omit; - return (delete r.omit, { arguments: ca(r, n), selection: Zp(e, t, i, n) }); -} -function Zp(e, t, r, n) { - return e - ? (t - ? n.throwValidationError({ - kind: 'MutuallyExclusiveFields', - firstField: 'include', - secondField: 'select', - selectionPath: n.getSelectionPath(), - }) - : r && - n.throwValidationError({ - kind: 'MutuallyExclusiveFields', - firstField: 'omit', - secondField: 'select', - selectionPath: n.getSelectionPath(), - }), - rm(e, n)) - : Xp(n, t, r); -} -function Xp(e, t, r) { - let n = {}; - return ( - e.modelOrType && !e.isRawAction() && ((n.$composites = !0), (n.$scalars = !0)), - t && em(n, t, e), - tm(n, r, e), - n - ); -} -function em(e, t, r) { - for (let [n, i] of Object.entries(t)) { - if (Oe(i)) continue; - let o = r.nestSelection(n); - if ((Ni(i, o), i === !1 || i === void 0)) { - e[n] = !1; - continue; - } - let s = r.findField(n); - if ( - (s && - s.kind !== 'object' && - r.throwValidationError({ - kind: 'IncludeOnScalar', - selectionPath: r.getSelectionPath().concat(n), - outputType: r.getOutputTypeDescription(), - }), - s) - ) { - e[n] = dr(i === !0 ? {} : i, o); - continue; - } - if (i === !0) { - e[n] = !0; - continue; - } - e[n] = dr(i, o); - } -} -function tm(e, t, r) { - let n = r.getComputedFields(), - i = { ...r.getGlobalOmit(), ...t }, - o = ia(i, n); - for (let [s, a] of Object.entries(o)) { - if (Oe(a)) continue; - Ni(a, r.nestSelection(s)); - let f = r.findField(s); - (n?.[s] && !f) || (e[s] = !a); - } -} -function rm(e, t) { - let r = {}, - n = t.getComputedFields(), - i = na(e, n); - for (let [o, s] of Object.entries(i)) { - if (Oe(s)) continue; - let a = t.nestSelection(o); - Ni(s, a); - let f = t.findField(o); - if (!(n?.[o] && !f)) { - if (s === !1 || s === void 0 || Oe(s)) { - r[o] = !1; - continue; - } - if (s === !0) { - f?.kind === 'object' ? (r[o] = dr({}, a)) : (r[o] = !0); - continue; - } - r[o] = dr(s, a); - } - } - return r; -} -function ua(e, t) { - if (e === null) return null; - if (typeof e == 'string' || typeof e == 'number' || typeof e == 'boolean') return e; - if (typeof e == 'bigint') return { $type: 'BigInt', value: String(e) }; - if (ht(e)) { - if (mn(e)) return { $type: 'DateTime', value: e.toISOString() }; - t.throwValidationError({ - kind: 'InvalidArgumentValue', - selectionPath: t.getSelectionPath(), - argumentPath: t.getArgumentPath(), - argument: { name: t.getArgumentName(), typeNames: ['Date'] }, - underlyingError: 'Provided Date object is invalid', - }); - } - if (oa(e)) return { $type: 'Param', value: e.name }; - if (vt(e)) return { $type: 'FieldRef', value: { _ref: e.name, _container: e.modelName } }; - if (Array.isArray(e)) return nm(e, t); - if (ArrayBuffer.isView(e)) { - let { buffer: r, byteOffset: n, byteLength: i } = e; - return { $type: 'Bytes', value: y.from(r, n, i).toString('base64') }; - } - if (im(e)) return e.values; - if (wt(e)) return { $type: 'Decimal', value: e.toFixed() }; - if (e instanceof Le) { - if (e !== En.instances[e._getName()]) throw new Error('Invalid ObjectEnumValue'); - return { $type: 'Enum', value: e._getName() }; - } - if (om(e)) return e.toJSON(); - if (typeof e == 'object') return ca(e, t); - t.throwValidationError({ - kind: 'InvalidArgumentValue', - selectionPath: t.getSelectionPath(), - argumentPath: t.getArgumentPath(), - argument: { name: t.getArgumentName(), typeNames: [] }, - underlyingError: `We could not serialize ${Object.prototype.toString.call(e)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`, - }); -} -function ca(e, t) { - if (e.$type) return { $type: 'Raw', value: e }; - let r = {}; - for (let n in e) { - let i = e[n], - o = t.nestArgument(n); - Oe(i) || - (i !== void 0 - ? (r[n] = ua(i, o)) - : t.isPreviewFeatureOn('strictUndefinedChecks') && - t.throwValidationError({ - kind: 'InvalidArgumentValue', - argumentPath: o.getArgumentPath(), - selectionPath: t.getSelectionPath(), - argument: { name: t.getArgumentName(), typeNames: [] }, - underlyingError: la, - })); - } - return r; -} -function nm(e, t) { - let r = []; - for (let n = 0; n < e.length; n++) { - let i = t.nestArgument(String(n)), - o = e[n]; - if (o === void 0 || Oe(o)) { - let s = o === void 0 ? 'undefined' : 'Prisma.skip'; - t.throwValidationError({ - kind: 'InvalidArgumentValue', - selectionPath: i.getSelectionPath(), - argumentPath: i.getArgumentPath(), - argument: { name: `${t.getArgumentName()}[${n}]`, typeNames: [] }, - underlyingError: `Can not use \`${s}\` value within array. Use \`null\` or filter out \`${s}\` values`, - }); - } - r.push(ua(o, i)); - } - return r; -} -function im(e) { - return typeof e == 'object' && e !== null && e.__prismaRawParameters__ === !0; -} -function om(e) { - return typeof e == 'object' && e !== null && typeof e.toJSON == 'function'; -} -function Ni(e, t) { - e === void 0 && - t.isPreviewFeatureOn('strictUndefinedChecks') && - t.throwValidationError({ kind: 'InvalidSelectionValue', selectionPath: t.getSelectionPath(), underlyingError: la }); -} -var Mi = class e { - constructor(t) { - this.params = t; - this.params.modelName && - (this.modelOrType = - this.params.runtimeDataModel.models[this.params.modelName] ?? - this.params.runtimeDataModel.types[this.params.modelName]); - } - modelOrType; - throwValidationError(t) { - Tn({ - errors: [t], - originalMethod: this.params.originalMethod, - args: this.params.rootArgs ?? {}, - callsite: this.params.callsite, - errorFormat: this.params.errorFormat, - clientVersion: this.params.clientVersion, - globalOmit: this.params.globalOmit, - }); - } - getSelectionPath() { - return this.params.selectionPath; - } - getArgumentPath() { - return this.params.argumentPath; - } - getArgumentName() { - return this.params.argumentPath[this.params.argumentPath.length - 1]; - } - getOutputTypeDescription() { - if (!(!this.params.modelName || !this.modelOrType)) - return { - name: this.params.modelName, - fields: this.modelOrType.fields.map((t) => ({ - name: t.name, - typeName: 'boolean', - isRelation: t.kind === 'object', - })), - }; - } - isRawAction() { - return ['executeRaw', 'queryRaw', 'runCommandRaw', 'findRaw', 'aggregateRaw'].includes(this.params.action); - } - isPreviewFeatureOn(t) { - return this.params.previewFeatures.includes(t); - } - getComputedFields() { - if (this.params.modelName) return this.params.extensions.getAllComputedFields(this.params.modelName); - } - findField(t) { - return this.modelOrType?.fields.find((r) => r.name === t); - } - nestSelection(t) { - let r = this.findField(t), - n = r?.kind === 'object' ? r.type : void 0; - return new e({ ...this.params, modelName: n, selectionPath: this.params.selectionPath.concat(t) }); - } - getGlobalOmit() { - return this.params.modelName && this.shouldApplyGlobalOmit() - ? (this.params.globalOmit?.[qe(this.params.modelName)] ?? {}) - : {}; - } - shouldApplyGlobalOmit() { - switch (this.params.action) { - case 'findFirst': - case 'findFirstOrThrow': - case 'findUniqueOrThrow': - case 'findMany': - case 'upsert': - case 'findUnique': - case 'createManyAndReturn': - case 'create': - case 'update': - case 'updateManyAndReturn': - case 'delete': - return !0; - case 'executeRaw': - case 'aggregateRaw': - case 'runCommandRaw': - case 'findRaw': - case 'createMany': - case 'deleteMany': - case 'groupBy': - case 'updateMany': - case 'count': - case 'aggregate': - case 'queryRaw': - return !1; - default: - Ne(this.params.action, 'Unknown action'); - } - } - nestArgument(t) { - return new e({ ...this.params, argumentPath: this.params.argumentPath.concat(t) }); - } -}; -u(); -c(); -p(); -m(); -d(); -l(); -function pa(e) { - if (!e._hasPreviewFlag('metrics')) - throw new ie('`metrics` preview feature must be enabled in order to access metrics API', { - clientVersion: e._clientVersion, - }); -} -var Rt = class { - _client; - constructor(t) { - this._client = t; - } - prometheus(t) { - return (pa(this._client), this._client._engine.metrics({ format: 'prometheus', ...t })); - } - json(t) { - return (pa(this._client), this._client._engine.metrics({ format: 'json', ...t })); - } -}; -u(); -c(); -p(); -m(); -d(); -l(); -function ma(e, t) { - let r = rr(() => sm(t)); - Object.defineProperty(e, 'dmmf', { get: () => r.get() }); -} -function sm(e) { - throw new Error('Prisma.dmmf is not available when running in edge runtimes.'); -} -function Li(e) { - return Object.entries(e).map(([t, r]) => ({ name: t, ...r })); -} -u(); -c(); -p(); -m(); -d(); -l(); -var Ui = new WeakMap(), - In = '$$PrismaTypedSql', - fr = class { - constructor(t, r) { - (Ui.set(this, { sql: t, values: r }), Object.defineProperty(this, In, { value: In })); - } - get sql() { - return Ui.get(this).sql; - } - get values() { - return Ui.get(this).values; - } - }; -function da(e) { - return (...t) => new fr(e, t); -} -function Sn(e) { - return e != null && e[In] === In; -} -u(); -c(); -p(); -m(); -d(); -l(); -var cc = Ae(Pi()); -u(); -c(); -p(); -m(); -d(); -l(); -fa(); -hs(); -Ps(); -u(); -c(); -p(); -m(); -d(); -l(); -var fe = class e { - constructor(t, r) { - if (t.length - 1 !== r.length) - throw t.length === 0 - ? new TypeError('Expected at least 1 string') - : new TypeError(`Expected ${t.length} strings to have ${t.length - 1} values`); - let n = r.reduce((s, a) => s + (a instanceof e ? a.values.length : 1), 0); - ((this.values = new Array(n)), (this.strings = new Array(n + 1)), (this.strings[0] = t[0])); - let i = 0, - o = 0; - for (; i < r.length; ) { - let s = r[i++], - a = t[i]; - if (s instanceof e) { - this.strings[o] += s.strings[0]; - let f = 0; - for (; f < s.values.length; ) ((this.values[o++] = s.values[f++]), (this.strings[o] = s.strings[f])); - this.strings[o] += a; - } else ((this.values[o++] = s), (this.strings[o] = a)); - } - } - get sql() { - let t = this.strings.length, - r = 1, - n = this.strings[0]; - for (; r < t; ) n += `?${this.strings[r++]}`; - return n; - } - get statement() { - let t = this.strings.length, - r = 1, - n = this.strings[0]; - for (; r < t; ) n += `:${r}${this.strings[r++]}`; - return n; - } - get text() { - let t = this.strings.length, - r = 1, - n = this.strings[0]; - for (; r < t; ) n += `$${r}${this.strings[r++]}`; - return n; - } - inspect() { - return { sql: this.sql, statement: this.statement, text: this.text, values: this.values }; - } -}; -function ga(e, t = ',', r = '', n = '') { - if (e.length === 0) - throw new TypeError('Expected `join([])` to be called with an array of multiple elements, but got an empty array'); - return new fe([r, ...Array(e.length - 1).fill(t), n], e); -} -function Fi(e) { - return new fe([e], []); -} -var ya = Fi(''); -function Vi(e, ...t) { - return new fe(e, t); -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -function gr(e) { - return { - getKeys() { - return Object.keys(e); - }, - getPropertyValue(t) { - return e[t]; - }, - }; -} -u(); -c(); -p(); -m(); -d(); -l(); -function ue(e, t) { - return { - getKeys() { - return [e]; - }, - getPropertyValue() { - return t(); - }, - }; -} -u(); -c(); -p(); -m(); -d(); -l(); -function et(e) { - let t = new Ie(); - return { - getKeys() { - return e.getKeys(); - }, - getPropertyValue(r) { - return t.getOrCreate(r, () => e.getPropertyValue(r)); - }, - getPropertyDescriptor(r) { - return e.getPropertyDescriptor?.(r); - }, - }; -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var On = { enumerable: !0, configurable: !0, writable: !0 }; -function Dn(e) { - let t = new Set(e); - return { - getPrototypeOf: () => Object.prototype, - getOwnPropertyDescriptor: () => On, - has: (r, n) => t.has(n), - set: (r, n, i) => t.add(n) && Reflect.set(r, n, i), - ownKeys: () => [...t], - }; -} -var ha = Symbol.for('nodejs.util.inspect.custom'); -function Pe(e, t) { - let r = am(t), - n = new Set(), - i = new Proxy(e, { - get(o, s) { - if (n.has(s)) return o[s]; - let a = r.get(s); - return a ? a.getPropertyValue(s) : o[s]; - }, - has(o, s) { - if (n.has(s)) return !0; - let a = r.get(s); - return a ? (a.has?.(s) ?? !0) : Reflect.has(o, s); - }, - ownKeys(o) { - let s = wa(Reflect.ownKeys(o), r), - a = wa(Array.from(r.keys()), r); - return [...new Set([...s, ...a, ...n])]; - }, - set(o, s, a) { - return r.get(s)?.getPropertyDescriptor?.(s)?.writable === !1 ? !1 : (n.add(s), Reflect.set(o, s, a)); - }, - getOwnPropertyDescriptor(o, s) { - let a = Reflect.getOwnPropertyDescriptor(o, s); - if (a && !a.configurable) return a; - let f = r.get(s); - return f ? (f.getPropertyDescriptor ? { ...On, ...f?.getPropertyDescriptor(s) } : On) : a; - }, - defineProperty(o, s, a) { - return (n.add(s), Reflect.defineProperty(o, s, a)); - }, - getPrototypeOf: () => Object.prototype, - }); - return ( - (i[ha] = function () { - let o = { ...this }; - return (delete o[ha], o); - }), - i - ); -} -function am(e) { - let t = new Map(); - for (let r of e) { - let n = r.getKeys(); - for (let i of n) t.set(i, r); - } - return t; -} -function wa(e, t) { - return e.filter((r) => t.get(r)?.has?.(r) ?? !0); -} -u(); -c(); -p(); -m(); -d(); -l(); -function It(e) { - return { - getKeys() { - return e; - }, - has() { - return !1; - }, - getPropertyValue() {}, - }; -} -u(); -c(); -p(); -m(); -d(); -l(); -function St(e, t) { - return { batch: e, transaction: t?.kind === 'batch' ? { isolationLevel: t.options.isolationLevel } : void 0 }; -} -u(); -c(); -p(); -m(); -d(); -l(); -function ba(e) { - if (e === void 0) return ''; - let t = At(e); - return new bt(0, { colors: hn }).write(t).toString(); -} -u(); -c(); -p(); -m(); -d(); -l(); -var lm = 'P2037'; -function _n({ error: e, user_facing_error: t }, r, n) { - return t.error_code - ? new X(um(t, n), { code: t.error_code, clientVersion: r, meta: t.meta, batchRequestIdx: t.batch_request_idx }) - : new ne(e, { clientVersion: r, batchRequestIdx: t.batch_request_idx }); -} -function um(e, t) { - let r = e.message; - return ( - (t === 'postgresql' || t === 'postgres' || t === 'mysql') && - e.error_code === lm && - (r += ` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`), - r - ); -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var $i = class { - getLocation() { - return null; - } -}; -function je(e) { - return typeof $EnabledCallSite == 'function' && e !== 'minimal' ? new $EnabledCallSite() : new $i(); -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var Ea = { _avg: !0, _count: !0, _sum: !0, _min: !0, _max: !0 }; -function kt(e = {}) { - let t = pm(e); - return Object.entries(t).reduce((n, [i, o]) => (Ea[i] !== void 0 ? (n.select[i] = { select: o }) : (n[i] = o), n), { - select: {}, - }); -} -function pm(e = {}) { - return typeof e._count == 'boolean' ? { ...e, _count: { _all: e._count } } : e; -} -function Mn(e = {}) { - return (t) => (typeof e._count == 'boolean' && (t._count = t._count._all), t); -} -function xa(e, t) { - let r = Mn(e); - return t({ action: 'aggregate', unpacker: r, argsMapper: kt })(e); -} -u(); -c(); -p(); -m(); -d(); -l(); -function mm(e = {}) { - let { select: t, ...r } = e; - return typeof t == 'object' ? kt({ ...r, _count: t }) : kt({ ...r, _count: { _all: !0 } }); -} -function dm(e = {}) { - return typeof e.select == 'object' ? (t) => Mn(e)(t)._count : (t) => Mn(e)(t)._count._all; -} -function Pa(e, t) { - return t({ action: 'count', unpacker: dm(e), argsMapper: mm })(e); -} -u(); -c(); -p(); -m(); -d(); -l(); -function fm(e = {}) { - let t = kt(e); - if (Array.isArray(t.by)) for (let r of t.by) typeof r == 'string' && (t.select[r] = !0); - else typeof t.by == 'string' && (t.select[t.by] = !0); - return t; -} -function gm(e = {}) { - return (t) => ( - typeof e?._count == 'boolean' && - t.forEach((r) => { - r._count = r._count._all; - }), - t - ); -} -function Ta(e, t) { - return t({ action: 'groupBy', unpacker: gm(e), argsMapper: fm })(e); -} -function va(e, t, r) { - if (t === 'aggregate') return (n) => xa(n, r); - if (t === 'count') return (n) => Pa(n, r); - if (t === 'groupBy') return (n) => Ta(n, r); -} -u(); -c(); -p(); -m(); -d(); -l(); -function Aa(e, t) { - let r = t.fields.filter((i) => !i.relationName), - n = Ls(r, 'name'); - return new Proxy( - {}, - { - get(i, o) { - if (o in i || typeof o == 'symbol') return i[o]; - let s = n[o]; - if (s) return new ar(e, o, s.type, s.isList, s.kind === 'enum'); - }, - ...Dn(Object.keys(n)), - } - ); -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var Ca = (e) => (Array.isArray(e) ? e : e.split('.')), - qi = (e, t) => Ca(t).reduce((r, n) => r && r[n], e), - Ra = (e, t, r) => Ca(t).reduceRight((n, i, o, s) => Object.assign({}, qi(e, s.slice(0, o)), { [i]: n }), r); -function ym(e, t) { - return e === void 0 || t === void 0 ? [] : [...t, 'select', e]; -} -function hm(e, t, r) { - return t === void 0 ? (e ?? {}) : Ra(t, r, e || !0); -} -function Bi(e, t, r, n, i, o) { - let a = e._runtimeDataModel.models[t].fields.reduce((f, w) => ({ ...f, [w.name]: w }), {}); - return (f) => { - let w = je(e._errorFormat), - A = ym(n, i), - C = hm(f, o, A), - I = r({ dataPath: A, callsite: w })(C), - R = wm(e, t); - return new Proxy(I, { - get(L, k) { - if (!R.includes(k)) return L[k]; - let _e = [a[k].type, r, k], - pe = [A, C]; - return Bi(e, ..._e, ...pe); - }, - ...Dn([...R, ...Object.getOwnPropertyNames(I)]), - }); - }; -} -function wm(e, t) { - return e._runtimeDataModel.models[t].fields.filter((r) => r.kind === 'object').map((r) => r.name); -} -var bm = ['findUnique', 'findUniqueOrThrow', 'findFirst', 'findFirstOrThrow', 'create', 'update', 'upsert', 'delete'], - Em = ['aggregate', 'count', 'groupBy']; -function ji(e, t) { - let r = e._extensions.getAllModelExtensions(t) ?? {}, - n = [xm(e, t), Tm(e, t), gr(r), ue('name', () => t), ue('$name', () => t), ue('$parent', () => e._appliedParent)]; - return Pe({}, n); -} -function xm(e, t) { - let r = ke(t), - n = Object.keys(nr).concat('count'); - return { - getKeys() { - return n; - }, - getPropertyValue(i) { - let o = i, - s = (a) => (f) => { - let w = je(e._errorFormat); - return e._createPrismaPromise( - (A) => { - let C = { - args: f, - dataPath: [], - action: o, - model: t, - clientMethod: `${r}.${i}`, - jsModelName: r, - transaction: A, - callsite: w, - }; - return e._request({ ...C, ...a }); - }, - { action: o, args: f, model: t } - ); - }; - return bm.includes(o) ? Bi(e, t, s) : Pm(i) ? va(e, i, s) : s({}); - }, - }; -} -function Pm(e) { - return Em.includes(e); -} -function Tm(e, t) { - return et( - ue('fields', () => { - let r = e._runtimeDataModel.models[t]; - return Aa(t, r); - }) - ); -} -u(); -c(); -p(); -m(); -d(); -l(); -function Ia(e) { - return e.replace(/^./, (t) => t.toUpperCase()); -} -var Qi = Symbol(); -function yr(e) { - let t = [vm(e), Am(e), ue(Qi, () => e), ue('$parent', () => e._appliedParent)], - r = e._extensions.getAllClientExtensions(); - return (r && t.push(gr(r)), Pe(e, t)); -} -function vm(e) { - let t = Object.getPrototypeOf(e._originalClient), - r = [...new Set(Object.getOwnPropertyNames(t))]; - return { - getKeys() { - return r; - }, - getPropertyValue(n) { - return e[n]; - }, - }; -} -function Am(e) { - let t = Object.keys(e._runtimeDataModel.models), - r = t.map(ke), - n = [...new Set(t.concat(r))]; - return et({ - getKeys() { - return n; - }, - getPropertyValue(i) { - let o = Ia(i); - if (e._runtimeDataModel.models[o] !== void 0) return ji(e, o); - if (e._runtimeDataModel.models[i] !== void 0) return ji(e, i); - }, - getPropertyDescriptor(i) { - if (!r.includes(i)) return { enumerable: !1 }; - }, - }); -} -function Sa(e) { - return e[Qi] ? e[Qi] : e; -} -function ka(e) { - if (typeof e == 'function') return e(this); - if (e.client?.__AccelerateEngine) { - let r = e.client.__AccelerateEngine; - this._originalClient._engine = new r(this._originalClient._accelerateEngineConfig); - } - let t = Object.create(this._originalClient, { - _extensions: { value: this._extensions.append(e) }, - _appliedParent: { value: this, configurable: !0 }, - $on: { value: void 0 }, - }); - return yr(t); -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -function Oa({ result: e, modelName: t, select: r, omit: n, extensions: i }) { - let o = i.getAllComputedFields(t); - if (!o) return e; - let s = [], - a = []; - for (let f of Object.values(o)) { - if (n) { - if (n[f.name]) continue; - let w = f.needs.filter((A) => n[A]); - w.length > 0 && a.push(It(w)); - } else if (r) { - if (!r[f.name]) continue; - let w = f.needs.filter((A) => !r[A]); - w.length > 0 && a.push(It(w)); - } - Cm(e, f.needs) && s.push(Rm(f, Pe(e, s))); - } - return s.length > 0 || a.length > 0 ? Pe(e, [...s, ...a]) : e; -} -function Cm(e, t) { - return t.every((r) => Ci(e, r)); -} -function Rm(e, t) { - return et(ue(e.name, () => e.compute(t))); -} -u(); -c(); -p(); -m(); -d(); -l(); -function Nn({ visitor: e, result: t, args: r, runtimeDataModel: n, modelName: i }) { - if (Array.isArray(t)) { - for (let s = 0; s < t.length; s++) - t[s] = Nn({ result: t[s], args: r, modelName: i, runtimeDataModel: n, visitor: e }); - return t; - } - let o = e(t, i, r) ?? t; - return ( - r.include && Da({ includeOrSelect: r.include, result: o, parentModelName: i, runtimeDataModel: n, visitor: e }), - r.select && Da({ includeOrSelect: r.select, result: o, parentModelName: i, runtimeDataModel: n, visitor: e }), - o - ); -} -function Da({ includeOrSelect: e, result: t, parentModelName: r, runtimeDataModel: n, visitor: i }) { - for (let [o, s] of Object.entries(e)) { - if (!s || t[o] == null || Oe(s)) continue; - let f = n.models[r].fields.find((A) => A.name === o); - if (!f || f.kind !== 'object' || !f.relationName) continue; - let w = typeof s == 'object' ? s : {}; - t[o] = Nn({ visitor: i, result: t[o], args: w, modelName: f.type, runtimeDataModel: n }); - } -} -function _a({ result: e, modelName: t, args: r, extensions: n, runtimeDataModel: i, globalOmit: o }) { - return n.isEmpty() || e == null || typeof e != 'object' || !i.models[t] - ? e - : Nn({ - result: e, - args: r ?? {}, - modelName: t, - runtimeDataModel: i, - visitor: (a, f, w) => { - let A = ke(f); - return Oa({ - result: a, - modelName: A, - select: w.select, - omit: w.select ? void 0 : { ...o?.[A], ...w.omit }, - extensions: n, - }); - }, - }); -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var Im = ['$connect', '$disconnect', '$on', '$transaction', '$extends'], - Ma = Im; -function Na(e) { - if (e instanceof fe) return Sm(e); - if (Sn(e)) return km(e); - if (Array.isArray(e)) { - let r = [e[0]]; - for (let n = 1; n < e.length; n++) r[n] = hr(e[n]); - return r; - } - let t = {}; - for (let r in e) t[r] = hr(e[r]); - return t; -} -function Sm(e) { - return new fe(e.strings, e.values); -} -function km(e) { - return new fr(e.sql, e.values); -} -function hr(e) { - if (typeof e != 'object' || e == null || e instanceof Le || vt(e)) return e; - if (wt(e)) return new ae(e.toFixed()); - if (ht(e)) return new Date(+e); - if (ArrayBuffer.isView(e)) return e.slice(0); - if (Array.isArray(e)) { - let t = e.length, - r; - for (r = Array(t); t--; ) r[t] = hr(e[t]); - return r; - } - if (typeof e == 'object') { - let t = {}; - for (let r in e) - r === '__proto__' - ? Object.defineProperty(t, r, { value: hr(e[r]), configurable: !0, enumerable: !0, writable: !0 }) - : (t[r] = hr(e[r])); - return t; - } - Ne(e, 'Unknown value'); -} -function Ua(e, t, r, n = 0) { - return e._createPrismaPromise((i) => { - let o = t.customDataProxyFetch; - return ( - 'transaction' in t && - i !== void 0 && - (t.transaction?.kind === 'batch' && t.transaction.lock.then(), (t.transaction = i)), - n === r.length - ? e._executeRequest(t) - : r[n]({ - model: t.model, - operation: t.model ? t.action : t.clientMethod, - args: Na(t.args ?? {}), - __internalParams: t, - query: (s, a = t) => { - let f = a.customDataProxyFetch; - return ((a.customDataProxyFetch = qa(o, f)), (a.args = s), Ua(e, a, r, n + 1)); - }, - }) - ); - }); -} -function Fa(e, t) { - let { jsModelName: r, action: n, clientMethod: i } = t, - o = r ? n : i; - if (e._extensions.isEmpty()) return e._executeRequest(t); - let s = e._extensions.getAllQueryCallbacks(r ?? '$none', o); - return Ua(e, t, s); -} -function Va(e) { - return (t) => { - let r = { requests: t }, - n = t[0].extensions.getAllBatchQueryCallbacks(); - return n.length ? $a(r, n, 0, e) : e(r); - }; -} -function $a(e, t, r, n) { - if (r === t.length) return n(e); - let i = e.customDataProxyFetch, - o = e.requests[0].transaction; - return t[r]({ - args: { - queries: e.requests.map((s) => ({ model: s.modelName, operation: s.action, args: s.args })), - transaction: o ? { isolationLevel: o.kind === 'batch' ? o.isolationLevel : void 0 } : void 0, - }, - __internalParams: e, - query(s, a = e) { - let f = a.customDataProxyFetch; - return ((a.customDataProxyFetch = qa(i, f)), $a(a, t, r + 1, n)); - }, - }); -} -var La = (e) => e; -function qa(e = La, t = La) { - return (r) => e(t(r)); -} -u(); -c(); -p(); -m(); -d(); -l(); -var Ba = K('prisma:client'), - ja = { Vercel: 'vercel', 'Netlify CI': 'netlify' }; -function Qa({ postinstall: e, ciName: t, clientVersion: r }) { - if ((Ba('checkPlatformCaching:postinstall', e), Ba('checkPlatformCaching:ciName', t), e === !0 && t && t in ja)) { - let n = `Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${ja[t]}-build`; - throw (console.error(n), new F(n, r)); - } -} -u(); -c(); -p(); -m(); -d(); -l(); -function Ha(e, t) { - return e ? (e.datasources ? e.datasources : e.datasourceUrl ? { [t[0]]: { url: e.datasourceUrl } } : {}) : {}; -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var Om = () => globalThis.process?.release?.name === 'node', - Dm = () => !!globalThis.Bun || !!globalThis.process?.versions?.bun, - _m = () => !!globalThis.Deno, - Mm = () => typeof globalThis.Netlify == 'object', - Nm = () => typeof globalThis.EdgeRuntime == 'object', - Lm = () => globalThis.navigator?.userAgent === 'Cloudflare-Workers'; -function Um() { - return ( - [ - [Mm, 'netlify'], - [Nm, 'edge-light'], - [Lm, 'workerd'], - [_m, 'deno'], - [Dm, 'bun'], - [Om, 'node'], - ] - .flatMap((r) => (r[0]() ? [r[1]] : [])) - .at(0) ?? '' - ); -} -var Fm = { - node: 'Node.js', - workerd: 'Cloudflare Workers', - deno: 'Deno and Deno Deploy', - netlify: 'Netlify Edge Functions', - 'edge-light': - 'Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)', -}; -function Ot() { - let e = Um(); - return { id: e, prettyName: Fm[e] || e, isEdge: ['workerd', 'deno', 'netlify', 'edge-light'].includes(e) }; -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var Hi = Ae(Ai()); -u(); -c(); -p(); -m(); -d(); -l(); -function Ga(e) { - return e ? e.replace(/".*"/g, '"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g, (t) => `${t[0]}5`) : ''; -} -u(); -c(); -p(); -m(); -d(); -l(); -function Ja(e) { - return e - .split( - ` -` - ) - .map((t) => - t - .replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/, '') - .replace(/\+\d+\s*ms$/, '') - ).join(` -`); -} -u(); -c(); -p(); -m(); -d(); -l(); -var Wa = Ae(_s()); -function Ka({ title: e, user: t = 'prisma', repo: r = 'prisma', template: n = 'bug_report.yml', body: i }) { - return (0, Wa.default)({ user: t, repo: r, template: n, title: e, body: i }); -} -function za({ version: e, binaryTarget: t, title: r, description: n, engineVersion: i, database: o, query: s }) { - let a = fs(6e3 - (s?.length ?? 0)), - f = Ja((0, Hi.default)(a)), - w = n - ? `# Description -\`\`\` -${n} -\`\`\`` - : '', - A = (0, Hi.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: -## Versions - -| Name | Version | -|-----------------|--------------------| -| Node | ${g.version?.padEnd(19)}| -| OS | ${t?.padEnd(19)}| -| Prisma Client | ${e?.padEnd(19)}| -| Query Engine | ${i?.padEnd(19)}| -| Database | ${o?.padEnd(19)}| - -${w} - -## Logs -\`\`\` -${f} -\`\`\` - -## Client Snippet -\`\`\`ts -// PLEASE FILL YOUR CODE SNIPPET HERE -\`\`\` - -## Schema -\`\`\`prisma -// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE -\`\`\` - -## Prisma Engine Query -\`\`\` -${s ? Ga(s) : ''} -\`\`\` -`), - C = Ka({ title: r, body: A }); - return `${r} - -This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. - -${tn(C)} - -If you want the Prisma team to look into it, please open the link above \u{1F64F} -To increase the chance of success, please post your schema and a snippet of -how you used Prisma Client in the issue. -`; -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -l(); -function $(e, t) { - throw new Error(t); -} -function Gi(e, t) { - return ( - e === t || - (e !== null && - t !== null && - typeof e == 'object' && - typeof t == 'object' && - Object.keys(e).length === Object.keys(t).length && - Object.keys(e).every((r) => Gi(e[r], t[r]))) - ); -} -function Dt(e, t) { - let r = Object.keys(e), - n = Object.keys(t); - return (r.length < n.length ? r : n).every((o) => { - if (typeof e[o] == typeof t[o] && typeof e[o] != 'object') return e[o] === t[o]; - if (ae.isDecimal(e[o]) || ae.isDecimal(t[o])) { - let s = Ya(e[o]), - a = Ya(t[o]); - return s && a && s.equals(a); - } else if (e[o] instanceof Uint8Array || t[o] instanceof Uint8Array) { - let s = Za(e[o]), - a = Za(t[o]); - return s && a && s.equals(a); - } else { - if (e[o] instanceof Date || t[o] instanceof Date) return Xa(e[o])?.getTime() === Xa(t[o])?.getTime(); - if (typeof e[o] == 'bigint' || typeof t[o] == 'bigint') return el(e[o]) === el(t[o]); - if (typeof e[o] == 'number' || typeof t[o] == 'number') return tl(e[o]) === tl(t[o]); - } - return Gi(e[o], t[o]); - }); -} -function Ya(e) { - return ae.isDecimal(e) ? e : typeof e == 'number' || typeof e == 'string' ? new ae(e) : void 0; -} -function Za(e) { - return y.isBuffer(e) - ? e - : e instanceof Uint8Array - ? y.from(e.buffer, e.byteOffset, e.byteLength) - : typeof e == 'string' - ? y.from(e, 'base64') - : void 0; -} -function Xa(e) { - return e instanceof Date ? e : typeof e == 'string' || typeof e == 'number' ? new Date(e) : void 0; -} -function el(e) { - return typeof e == 'bigint' ? e : typeof e == 'number' || typeof e == 'string' ? BigInt(e) : void 0; -} -function tl(e) { - return typeof e == 'number' ? e : typeof e == 'string' ? Number(e) : void 0; -} -function wr(e) { - return JSON.stringify(e, (t, r) => - typeof r == 'bigint' ? r.toString() : r instanceof Uint8Array ? y.from(r).toString('base64') : r - ); -} -function Vm(e) { - return e !== null && typeof e == 'object' && typeof e.$type == 'string'; -} -function $m(e, t) { - let r = {}; - for (let n of Object.keys(e)) r[n] = t(e[n], n); - return r; -} -function Qe(e) { - return e === null - ? e - : Array.isArray(e) - ? e.map(Qe) - : typeof e == 'object' - ? Vm(e) - ? qm(e) - : e.constructor !== null && e.constructor.name !== 'Object' - ? e - : $m(e, Qe) - : e; -} -function qm({ $type: e, value: t }) { - switch (e) { - case 'BigInt': - return BigInt(t); - case 'Bytes': { - let { buffer: r, byteOffset: n, byteLength: i } = y.from(t, 'base64'); - return new Uint8Array(r, n, i); - } - case 'DateTime': - return new Date(t); - case 'Decimal': - return new v(t); - case 'Json': - return JSON.parse(t); - default: - $(t, 'Unknown tagged value'); - } -} -u(); -c(); -p(); -m(); -d(); -l(); -var ce = class extends Error { - name = 'UserFacingError'; - code; - meta; - constructor(t, r, n) { - (super(t), (this.code = r), (this.meta = n ?? {})); - } - toQueryResponseErrorObject() { - return { - error: this.message, - user_facing_error: { is_panic: !1, message: this.message, meta: this.meta, error_code: this.code }, - }; - } -}; -function _t(e) { - if (!nn(e)) throw e; - let t = Bm(e), - r = rl(e); - throw !t || !r ? e : new ce(r, t, { driverAdapterError: e }); -} -function Wi(e) { - throw nn(e) - ? new ce( - `Raw query failed. Code: \`${e.cause.originalCode ?? 'N/A'}\`. Message: \`${e.cause.originalMessage ?? rl(e)}\``, - 'P2010', - { driverAdapterError: e } - ) - : e; -} -function Bm(e) { - switch (e.cause.kind) { - case 'AuthenticationFailed': - return 'P1000'; - case 'DatabaseNotReachable': - return 'P1001'; - case 'DatabaseDoesNotExist': - return 'P1003'; - case 'SocketTimeout': - return 'P1008'; - case 'DatabaseAlreadyExists': - return 'P1009'; - case 'DatabaseAccessDenied': - return 'P1010'; - case 'TlsConnectionError': - return 'P1011'; - case 'ConnectionClosed': - return 'P1017'; - case 'TransactionAlreadyClosed': - return 'P1018'; - case 'LengthMismatch': - return 'P2000'; - case 'UniqueConstraintViolation': - return 'P2002'; - case 'ForeignKeyConstraintViolation': - return 'P2003'; - case 'UnsupportedNativeDataType': - return 'P2010'; - case 'NullConstraintViolation': - return 'P2011'; - case 'ValueOutOfRange': - return 'P2020'; - case 'TableDoesNotExist': - return 'P2021'; - case 'ColumnNotFound': - return 'P2022'; - case 'InvalidIsolationLevel': - case 'InconsistentColumnData': - return 'P2023'; - case 'MissingFullTextSearchIndex': - return 'P2030'; - case 'TransactionWriteConflict': - return 'P2034'; - case 'GenericJs': - return 'P2036'; - case 'TooManyConnections': - return 'P2037'; - case 'postgres': - case 'sqlite': - case 'mysql': - case 'mssql': - return; - default: - $(e.cause, `Unknown error: ${e.cause}`); - } -} -function rl(e) { - switch (e.cause.kind) { - case 'AuthenticationFailed': - return `Authentication failed against the database server, the provided database credentials for \`${e.cause.user ?? '(not available)'}\` are not valid`; - case 'DatabaseNotReachable': { - let t = e.cause.host && e.cause.port ? `${e.cause.host}:${e.cause.port}` : e.cause.host; - return `Can't reach database server${t ? ` at ${t}` : ''}`; - } - case 'DatabaseDoesNotExist': - return `Database \`${e.cause.db ?? '(not available)'}\` does not exist on the database server`; - case 'SocketTimeout': - return 'Operation has timed out'; - case 'DatabaseAlreadyExists': - return `Database \`${e.cause.db ?? '(not available)'}\` already exists on the database server`; - case 'DatabaseAccessDenied': - return `User was denied access on the database \`${e.cause.db ?? '(not available)'}\``; - case 'TlsConnectionError': - return `Error opening a TLS connection: ${e.cause.reason}`; - case 'ConnectionClosed': - return 'Server has closed the connection.'; - case 'TransactionAlreadyClosed': - return e.cause.cause; - case 'LengthMismatch': - return `The provided value for the column is too long for the column's type. Column: ${e.cause.column ?? '(not available)'}`; - case 'UniqueConstraintViolation': - return `Unique constraint failed on the ${Ji(e.cause.constraint)}`; - case 'ForeignKeyConstraintViolation': - return `Foreign key constraint violated on the ${Ji(e.cause.constraint)}`; - case 'UnsupportedNativeDataType': - return `Failed to deserialize column of type '${e.cause.type}'. If you're using $queryRaw and this column is explicitly marked as \`Unsupported\` in your Prisma schema, try casting this column to any supported Prisma type such as \`String\`.`; - case 'NullConstraintViolation': - return `Null constraint violation on the ${Ji(e.cause.constraint)}`; - case 'ValueOutOfRange': - return `Value out of range for the type: ${e.cause.cause}`; - case 'TableDoesNotExist': - return `The table \`${e.cause.table ?? '(not available)'}\` does not exist in the current database.`; - case 'ColumnNotFound': - return `The column \`${e.cause.column ?? '(not available)'}\` does not exist in the current database.`; - case 'InvalidIsolationLevel': - return `Error in connector: Conversion error: ${e.cause.level}`; - case 'InconsistentColumnData': - return `Inconsistent column data: ${e.cause.cause}`; - case 'MissingFullTextSearchIndex': - return 'Cannot find a fulltext index to use for the native search, try adding a @@fulltext([Fields...]) to your schema'; - case 'TransactionWriteConflict': - return 'Transaction failed due to a write conflict or a deadlock. Please retry your transaction'; - case 'GenericJs': - return `Error in external connector (id ${e.cause.id})`; - case 'TooManyConnections': - return `Too many database connections opened: ${e.cause.cause}`; - case 'sqlite': - case 'postgres': - case 'mysql': - case 'mssql': - return; - default: - $(e.cause, `Unknown error: ${e.cause}`); - } -} -function Ji(e) { - return e && 'fields' in e - ? `fields: (${e.fields.map((t) => `\`${t}\``).join(', ')})` - : e && 'index' in e - ? `constraint: \`${e.index}\`` - : e && 'foreignKey' in e - ? 'foreign key' - : '(not available)'; -} -function nl(e, t) { - let r = e.map((i) => t.keys.reduce((o, s) => ((o[s] = Qe(i[s])), o), {})), - n = new Set(t.nestedSelection); - return t.arguments.map((i) => { - let o = r.findIndex((s) => Dt(s, i)); - if (o === -1) - return t.expectNonEmpty - ? new ce( - 'An operation failed because it depends on one or more records that were required but not found', - 'P2025' - ) - : null; - { - let s = Object.entries(e[o]).filter(([a]) => n.has(a)); - return Object.fromEntries(s); - } - }); -} -u(); -c(); -p(); -m(); -d(); -l(); -l(); -var W = class extends Error { - name = 'DataMapperError'; -}; -function sl(e, t, r) { - switch (t.type) { - case 'AffectedRows': - if (typeof e != 'number') throw new W(`Expected an affected rows count, got: ${typeof e} (${e})`); - return { count: e }; - case 'Object': - return Ki(e, t.fields, r, t.skipNulls); - case 'Value': - return zi(e, '', t.resultType, r); - default: - $(t, `Invalid data mapping type: '${t.type}'`); - } -} -function Ki(e, t, r, n) { - if (e === null) return null; - if (Array.isArray(e)) { - let i = e; - return (n && (i = i.filter((o) => o !== null)), i.map((o) => il(o, t, r))); - } - if (typeof e == 'object') return il(e, t, r); - if (typeof e == 'string') { - let i; - try { - i = JSON.parse(e); - } catch (o) { - throw new W('Expected an array or object, got a string that is not valid JSON', { cause: o }); - } - return Ki(i, t, r, n); - } - throw new W(`Expected an array or an object, got: ${typeof e}`); -} -function il(e, t, r) { - if (typeof e != 'object') throw new W(`Expected an object, but got '${typeof e}'`); - let n = {}; - for (let [i, o] of Object.entries(t)) - switch (o.type) { - case 'AffectedRows': - throw new W(`Unexpected 'AffectedRows' node in data mapping for field '${i}'`); - case 'Object': { - if (o.serializedName !== null && !Object.hasOwn(e, o.serializedName)) - throw new W(`Missing data field (Object): '${i}'; node: ${JSON.stringify(o)}; data: ${JSON.stringify(e)}`); - let s = o.serializedName !== null ? e[o.serializedName] : e; - n[i] = Ki(s, o.fields, r, o.skipNulls); - break; - } - case 'Value': - { - let s = o.dbName; - if (Object.hasOwn(e, s)) n[i] = zi(e[s], s, o.resultType, r); - else - throw new W(`Missing data field (Value): '${s}'; node: ${JSON.stringify(o)}; data: ${JSON.stringify(e)}`); - } - break; - default: - $(o, `DataMapper: Invalid data mapping node type: '${o.type}'`); - } - return n; -} -function zi(e, t, r, n) { - if (e === null) return r.type === 'Array' ? [] : null; - switch (r.type) { - case 'Any': - return e; - case 'String': { - if (typeof e != 'string') throw new W(`Expected a string in column '${t}', got ${typeof e}: ${e}`); - return e; - } - case 'Int': - switch (typeof e) { - case 'number': - return Math.trunc(e); - case 'string': { - let i = Math.trunc(Number(e)); - if (Number.isNaN(i) || !Number.isFinite(i)) - throw new W(`Expected an integer in column '${t}', got string: ${e}`); - if (!Number.isSafeInteger(i)) - throw new W( - `Integer value in column '${t}' is too large to represent as a JavaScript number without loss of precision, got: ${e}. Consider using BigInt type.` - ); - return i; - } - default: - throw new W(`Expected an integer in column '${t}', got ${typeof e}: ${e}`); - } - case 'BigInt': { - if (typeof e != 'number' && typeof e != 'string') - throw new W(`Expected a bigint in column '${t}', got ${typeof e}: ${e}`); - return { $type: 'BigInt', value: e }; - } - case 'Float': { - if (typeof e == 'number') return e; - if (typeof e == 'string') { - let i = Number(e); - if (Number.isNaN(i) && !/^[-+]?nan$/.test(e.toLowerCase())) - throw new W(`Expected a float in column '${t}', got string: ${e}`); - return i; - } - throw new W(`Expected a float in column '${t}', got ${typeof e}: ${e}`); - } - case 'Boolean': { - if (typeof e == 'boolean') return e; - if (typeof e == 'number') return e === 1; - if (typeof e == 'string') { - if (e === 'true' || e === 'TRUE' || e === '1') return !0; - if (e === 'false' || e === 'FALSE' || e === '0') return !1; - throw new W(`Expected a boolean in column '${t}', got ${typeof e}: ${e}`); - } - if (e instanceof Uint8Array) { - for (let i of e) if (i !== 0) return !0; - return !1; - } - throw new W(`Expected a boolean in column '${t}', got ${typeof e}: ${e}`); - } - case 'Decimal': - if (typeof e != 'number' && typeof e != 'string' && !ae.isDecimal(e)) - throw new W(`Expected a decimal in column '${t}', got ${typeof e}: ${e}`); - return { $type: 'Decimal', value: e }; - case 'Date': { - if (typeof e == 'string') return { $type: 'DateTime', value: ol(e) }; - if (typeof e == 'number' || e instanceof Date) return { $type: 'DateTime', value: e }; - throw new W(`Expected a date in column '${t}', got ${typeof e}: ${e}`); - } - case 'Time': { - if (typeof e == 'string') return { $type: 'DateTime', value: `1970-01-01T${ol(e)}` }; - throw new W(`Expected a time in column '${t}', got ${typeof e}: ${e}`); - } - case 'Array': - return e.map((o, s) => zi(o, `${t}[${s}]`, r.inner, n)); - case 'Object': - return { $type: 'Json', value: wr(e) }; - case 'Json': - return { $type: 'Json', value: `${e}` }; - case 'Bytes': { - if (typeof e == 'string' && e.startsWith('\\x')) - return { $type: 'Bytes', value: y.from(e.slice(2), 'hex').toString('base64') }; - if (Array.isArray(e)) return { $type: 'Bytes', value: y.from(e).toString('base64') }; - if (e instanceof Uint8Array) return { $type: 'Bytes', value: y.from(e).toString('base64') }; - throw new W(`Expected a byte array in column '${t}', got ${typeof e}: ${e}`); - } - case 'Enum': { - let i = n[r.inner]; - if (i === void 0) throw new W(`Unknown enum '${r.inner}'`); - let o = i[`${e}`]; - if (o === void 0) throw new W(`Value '${e}' not found in enum '${r.inner}'`); - return o; - } - default: - $(r, `DataMapper: Unknown result type: ${r.type}`); - } -} -var jm = /Z$|(? { - let o = new Date(), - s = b.now(), - a = await i(), - f = b.now(); - return (n?.({ timestamp: o, duration: f - s, query: e.sql, params: e.args }), a); - } - ); -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -function tt(e, t) { - var r = '000000000' + e; - return r.substr(r.length - t); -} -var al = Ae(ws(), 1); -function Hm() { - try { - return al.default.hostname(); - } catch { - return g.env._CLUSTER_NETWORK_NAME_ || g.env.COMPUTERNAME || 'hostname'; - } -} -var ll = 2, - Gm = tt(g.pid.toString(36), ll), - ul = Hm(), - Jm = ul.length, - Wm = tt( - ul - .split('') - .reduce(function (e, t) { - return +e + t.charCodeAt(0); - }, +Jm + 36) - .toString(36), - ll - ); -function Yi() { - return Gm + Wm; -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -function Un(e) { - return typeof e == 'string' && /^c[a-z0-9]{20,32}$/.test(e); -} -function Zi(e) { - let n = Math.pow(36, 4), - i = 0; - function o() { - return tt(((Math.random() * n) << 0).toString(36), 4); - } - function s() { - return ((i = i < n ? i : 0), i++, i - 1); - } - function a() { - var f = 'c', - w = new Date().getTime().toString(36), - A = tt(s().toString(36), 4), - C = e(), - I = o() + o(); - return f + w + A + C + I; - } - return ((a.fingerprint = e), (a.isCuid = Un), a); -} -var Km = Zi(Yi); -var cl = Km; -var au = Ae(eu()); -u(); -c(); -p(); -m(); -d(); -l(); -Xe(); -u(); -c(); -p(); -m(); -d(); -l(); -var tu = 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'; -var Nd = 128, - nt, - Lt; -function Ld(e) { - (!nt || nt.length < e - ? ((nt = y.allocUnsafe(e * Nd)), Zt.getRandomValues(nt), (Lt = 0)) - : Lt + e > nt.length && (Zt.getRandomValues(nt), (Lt = 0)), - (Lt += e)); -} -function ao(e = 21) { - Ld((e |= 0)); - let t = ''; - for (let r = Lt - e; r < Lt; r++) t += tu[nt[r] & 63]; - return t; -} -u(); -c(); -p(); -m(); -d(); -l(); -Xe(); -var nu = '0123456789ABCDEFGHJKMNPQRSTVWXYZ', - Ar = 32; -var Ud = 16, - iu = 10, - ru = 0xffffffffffff; -var it; -(function (e) { - ((e.Base32IncorrectEncoding = 'B32_ENC_INVALID'), - (e.DecodeTimeInvalidCharacter = 'DEC_TIME_CHAR'), - (e.DecodeTimeValueMalformed = 'DEC_TIME_MALFORMED'), - (e.EncodeTimeNegative = 'ENC_TIME_NEG'), - (e.EncodeTimeSizeExceeded = 'ENC_TIME_SIZE_EXCEED'), - (e.EncodeTimeValueMalformed = 'ENC_TIME_MALFORMED'), - (e.PRNGDetectFailure = 'PRNG_DETECT'), - (e.ULIDInvalid = 'ULID_INVALID'), - (e.Unexpected = 'UNEXPECTED'), - (e.UUIDInvalid = 'UUID_INVALID')); -})(it || (it = {})); -var ot = class extends Error { - constructor(t, r) { - (super(`${r} (${t})`), (this.name = 'ULIDError'), (this.code = t)); - } -}; -function Fd(e) { - let t = Math.floor(e() * Ar); - return (t === Ar && (t = Ar - 1), nu.charAt(t)); -} -function Vd(e) { - let t = $d(), - r = (t && (t.crypto || t.msCrypto)) || (typeof yt < 'u' ? yt : null); - if (typeof r?.getRandomValues == 'function') - return () => { - let n = new Uint8Array(1); - return (r.getRandomValues(n), n[0] / 255); - }; - if (typeof r?.randomBytes == 'function') return () => r.randomBytes(1).readUInt8() / 255; - if (yt?.randomBytes) return () => yt.randomBytes(1).readUInt8() / 255; - throw new ot(it.PRNGDetectFailure, 'Failed to find a reliable PRNG'); -} -function $d() { - return jd() - ? self - : typeof window < 'u' - ? window - : typeof globalThis < 'u' || typeof globalThis < 'u' - ? globalThis - : null; -} -function qd(e, t) { - let r = ''; - for (; e > 0; e--) r = Fd(t) + r; - return r; -} -function Bd(e, t = iu) { - if (isNaN(e)) throw new ot(it.EncodeTimeValueMalformed, `Time must be a number: ${e}`); - if (e > ru) throw new ot(it.EncodeTimeSizeExceeded, `Cannot encode a time larger than ${ru}: ${e}`); - if (e < 0) throw new ot(it.EncodeTimeNegative, `Time must be positive: ${e}`); - if (Number.isInteger(e) === !1) throw new ot(it.EncodeTimeValueMalformed, `Time must be an integer: ${e}`); - let r, - n = ''; - for (let i = t; i > 0; i--) ((r = e % Ar), (n = nu.charAt(r) + n), (e = (e - r) / Ar)); - return n; -} -function jd() { - return typeof WorkerGlobalScope < 'u' && self instanceof WorkerGlobalScope; -} -function ou(e, t) { - let r = t || Vd(), - n = !e || isNaN(e) ? Date.now() : e; - return Bd(n, iu) + qd(Ud, r); -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var oe = []; -for (let e = 0; e < 256; ++e) oe.push((e + 256).toString(16).slice(1)); -function qn(e, t = 0) { - return ( - oe[e[t + 0]] + - oe[e[t + 1]] + - oe[e[t + 2]] + - oe[e[t + 3]] + - '-' + - oe[e[t + 4]] + - oe[e[t + 5]] + - '-' + - oe[e[t + 6]] + - oe[e[t + 7]] + - '-' + - oe[e[t + 8]] + - oe[e[t + 9]] + - '-' + - oe[e[t + 10]] + - oe[e[t + 11]] + - oe[e[t + 12]] + - oe[e[t + 13]] + - oe[e[t + 14]] + - oe[e[t + 15]] - ).toLowerCase(); -} -u(); -c(); -p(); -m(); -d(); -l(); -Xe(); -var jn = new Uint8Array(256), - Bn = jn.length; -function Ut() { - return (Bn > jn.length - 16 && (sn(jn), (Bn = 0)), jn.slice(Bn, (Bn += 16))); -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -Xe(); -var lo = { randomUUID: on }; -function Qd(e, t, r) { - if (lo.randomUUID && !t && !e) return lo.randomUUID(); - e = e || {}; - let n = e.random ?? e.rng?.() ?? Ut(); - if (n.length < 16) throw new Error('Random bytes length must be >= 16'); - if (((n[6] = (n[6] & 15) | 64), (n[8] = (n[8] & 63) | 128), t)) { - if (((r = r || 0), r < 0 || r + 16 > t.length)) - throw new RangeError(`UUID byte range ${r}:${r + 15} is out of buffer bounds`); - for (let i = 0; i < 16; ++i) t[r + i] = n[i]; - return t; - } - return qn(n); -} -var uo = Qd; -u(); -c(); -p(); -m(); -d(); -l(); -var co = {}; -function Hd(e, t, r) { - let n; - if (e) n = su(e.random ?? e.rng?.() ?? Ut(), e.msecs, e.seq, t, r); - else { - let i = Date.now(), - o = Ut(); - (Gd(co, i, o), (n = su(o, co.msecs, co.seq, t, r))); - } - return t ?? qn(n); -} -function Gd(e, t, r) { - return ( - (e.msecs ??= -1 / 0), - (e.seq ??= 0), - t > e.msecs - ? ((e.seq = (r[6] << 23) | (r[7] << 16) | (r[8] << 8) | r[9]), (e.msecs = t)) - : ((e.seq = (e.seq + 1) | 0), e.seq === 0 && e.msecs++), - e - ); -} -function su(e, t, r, n, i = 0) { - if (e.length < 16) throw new Error('Random bytes length must be >= 16'); - if (!n) ((n = new Uint8Array(16)), (i = 0)); - else if (i < 0 || i + 16 > n.length) throw new RangeError(`UUID byte range ${i}:${i + 15} is out of buffer bounds`); - return ( - (t ??= Date.now()), - (r ??= ((e[6] * 127) << 24) | (e[7] << 16) | (e[8] << 8) | e[9]), - (n[i++] = (t / 1099511627776) & 255), - (n[i++] = (t / 4294967296) & 255), - (n[i++] = (t / 16777216) & 255), - (n[i++] = (t / 65536) & 255), - (n[i++] = (t / 256) & 255), - (n[i++] = t & 255), - (n[i++] = 112 | ((r >>> 28) & 15)), - (n[i++] = (r >>> 20) & 255), - (n[i++] = 128 | ((r >>> 14) & 63)), - (n[i++] = (r >>> 6) & 255), - (n[i++] = ((r << 2) & 255) | (e[10] & 3)), - (n[i++] = e[11]), - (n[i++] = e[12]), - (n[i++] = e[13]), - (n[i++] = e[14]), - (n[i++] = e[15]), - n - ); -} -var po = Hd; -var Qn = class { - #e = {}; - constructor() { - (this.register('uuid', new go()), - this.register('cuid', new yo()), - this.register('ulid', new ho()), - this.register('nanoid', new wo()), - this.register('product', new bo())); - } - snapshot(t) { - return Object.create(this.#e, { now: { value: t === 'mysql' ? new fo() : new mo() } }); - } - register(t, r) { - this.#e[t] = r; - } - }, - mo = class { - #e = new Date(); - generate() { - return this.#e.toISOString(); - } - }, - fo = class { - #e = new Date(); - generate() { - return this.#e.toISOString().replace('T', ' ').replace('Z', ''); - } - }, - go = class { - generate(t) { - if (t === 4) return uo(); - if (t === 7) return po(); - throw new Error('Invalid UUID generator arguments'); - } - }, - yo = class { - generate(t) { - if (t === 1) return cl(); - if (t === 2) return (0, au.createId)(); - throw new Error('Invalid CUID generator arguments'); - } - }, - ho = class { - generate() { - return ou(); - } - }, - wo = class { - generate(t) { - if (typeof t == 'number') return ao(t); - if (t === void 0) return ao(); - throw new Error('Invalid Nanoid generator arguments'); - } - }, - bo = class { - generate(t, r) { - if (t === void 0 || r === void 0) throw new Error('Invalid Product generator arguments'); - return Array.isArray(t) && Array.isArray(r) - ? t.flatMap((n) => r.map((i) => [n, i])) - : Array.isArray(t) - ? t.map((n) => [n, r]) - : Array.isArray(r) - ? r.map((n) => [t, n]) - : [[t, r]]; - } - }; -u(); -c(); -p(); -m(); -d(); -l(); -function Hn(e, t) { - return e == null ? e : typeof e == 'string' ? Hn(JSON.parse(e), t) : Array.isArray(e) ? Wd(e, t) : Jd(e, t); -} -function Jd(e, t) { - if (t.pagination) { - let { skip: r, take: n, cursor: i } = t.pagination; - if ((r !== null && r > 0) || n === 0 || (i !== null && !Dt(e, i))) return null; - } - return uu(e, t.nested); -} -function uu(e, t) { - for (let [r, n] of Object.entries(t)) e[r] = Hn(e[r], n); - return e; -} -function Wd(e, t) { - if (t.distinct !== null) { - let r = t.linkingFields !== null ? [...t.distinct, ...t.linkingFields] : t.distinct; - e = Kd(e, r); - } - return ( - t.pagination && (e = zd(e, t.pagination, t.linkingFields)), - t.reverse && e.reverse(), - Object.keys(t.nested).length === 0 ? e : e.map((r) => uu(r, t.nested)) - ); -} -function Kd(e, t) { - let r = new Set(), - n = []; - for (let i of e) { - let o = Cr(i, t); - r.has(o) || (r.add(o), n.push(i)); - } - return n; -} -function zd(e, t, r) { - if (r === null) return lu(e, t); - let n = new Map(); - for (let o of e) { - let s = Cr(o, r); - (n.has(s) || n.set(s, []), n.get(s).push(o)); - } - let i = Array.from(n.entries()); - return (i.sort(([o], [s]) => (o < s ? -1 : o > s ? 1 : 0)), i.flatMap(([, o]) => lu(o, t))); -} -function lu(e, { cursor: t, skip: r, take: n }) { - let i = t !== null ? e.findIndex((a) => Dt(a, t)) : 0; - if (i === -1) return []; - let o = i + (r ?? 0), - s = n !== null ? o + n : e.length; - return e.slice(o, s); -} -function Cr(e, t) { - return JSON.stringify(t.map((r) => e[r])); -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -function Eo(e) { - return typeof e == 'object' && e !== null && e.prisma__type === 'param'; -} -function xo(e) { - return typeof e == 'object' && e !== null && e.prisma__type === 'generatorCall'; -} -function cu(e) { - return typeof e == 'object' && e !== null && e.prisma__type === 'bytes'; -} -function pu(e) { - return typeof e == 'object' && e !== null && e.prisma__type === 'bigint'; -} -function vo(e, t, r, n) { - let i = e.type, - o = mu(e.params, t, r); - switch (i) { - case 'rawSql': - return [du(e.sql, mu(e.params, t, r))]; - case 'templateSql': - return (e.chunkable ? tf(e.fragments, o, n) : [o]).map((a) => { - if (n !== void 0 && a.length > n) - throw new ce('The query parameter limit supported by your database is exceeded.', 'P2029'); - return Yd(e.fragments, e.placeholderFormat, a); - }); - default: - $(i, 'Invalid query type'); - } -} -function mu(e, t, r) { - return e.map((n) => Te(n, t, r)); -} -function Te(e, t, r) { - let n = e; - for (; ef(n); ) - if (Eo(n)) { - let i = t[n.prisma__value.name]; - if (i === void 0) throw new Error(`Missing value for query variable ${n.prisma__value.name}`); - n = i; - } else if (xo(n)) { - let { name: i, args: o } = n.prisma__value, - s = r[i]; - if (!s) throw new Error(`Encountered an unknown generator '${i}'`); - n = s.generate(...o.map((a) => Te(a, t, r))); - } else $(n, `Unexpected unevaluated value type: ${n}`); - return ( - Array.isArray(n) - ? (n = n.map((i) => Te(i, t, r))) - : cu(n) - ? (n = y.from(n.prisma__value, 'base64')) - : pu(n) && (n = BigInt(n.prisma__value)), - n - ); -} -function Yd(e, t, r) { - let n = '', - i = { placeholderNumber: 1 }, - o = []; - for (let s of To(e, r)) (o.push(...fu(s)), (n += Zd(s, t, i))); - return du(n, o); -} -function Zd(e, t, r) { - let n = e.type; - switch (n) { - case 'parameter': - return Po(t, r.placeholderNumber++); - case 'stringChunk': - return e.chunk; - case 'parameterTuple': - return `(${e.value.length == 0 ? 'NULL' : e.value.map(() => Po(t, r.placeholderNumber++)).join(',')})`; - case 'parameterTupleList': - return e.value - .map((i) => { - let o = i.map(() => Po(t, r.placeholderNumber++)).join(e.itemSeparator); - return `${e.itemPrefix}${o}${e.itemSuffix}`; - }) - .join(e.groupSeparator); - default: - $(n, 'Invalid fragment type'); - } -} -function Po(e, t) { - return e.hasNumbering ? `${e.prefix}${t}` : e.prefix; -} -function du(e, t) { - let r = t.map((n) => Xd(n)); - return { sql: e, args: t, argTypes: r }; -} -function Xd(e) { - return typeof e == 'string' - ? 'Text' - : typeof e == 'number' - ? 'Numeric' - : typeof e == 'boolean' - ? 'Boolean' - : Array.isArray(e) - ? 'Array' - : y.isBuffer(e) - ? 'Bytes' - : 'Unknown'; -} -function ef(e) { - return Eo(e) || xo(e); -} -function* To(e, t) { - let r = 0; - for (let n of e) - switch (n.type) { - case 'parameter': { - if (r >= t.length) - throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`); - yield { ...n, value: t[r++] }; - break; - } - case 'stringChunk': { - yield n; - break; - } - case 'parameterTuple': { - if (r >= t.length) - throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`); - let i = t[r++]; - yield { ...n, value: Array.isArray(i) ? i : [i] }; - break; - } - case 'parameterTupleList': { - if (r >= t.length) - throw new Error(`Malformed query template. Fragments attempt to read over ${t.length} parameters.`); - let i = t[r++]; - if (!Array.isArray(i)) throw new Error('Malformed query template. Tuple list expected.'); - if (i.length === 0) throw new Error('Malformed query template. Tuple list cannot be empty.'); - for (let o of i) if (!Array.isArray(o)) throw new Error('Malformed query template. Tuple expected.'); - yield { ...n, value: i }; - break; - } - } -} -function* fu(e) { - switch (e.type) { - case 'parameter': - yield e.value; - break; - case 'stringChunk': - break; - case 'parameterTuple': - yield* e.value; - break; - case 'parameterTupleList': - for (let t of e.value) yield* t; - break; - } -} -function tf(e, t, r) { - let n = 0, - i = 0; - for (let s of To(e, t)) { - let a = 0; - for (let f of fu(s)) a++; - ((i = Math.max(i, a)), (n += a)); - } - let o = [[]]; - for (let s of To(e, t)) - switch (s.type) { - case 'parameter': { - for (let a of o) a.push(s.value); - break; - } - case 'stringChunk': - break; - case 'parameterTuple': { - let a = s.value.length, - f = []; - if (r && o.length === 1 && a === i && n > r && n - a < r) { - let w = r - (n - a); - f = rf(s.value, w); - } else f = [s.value]; - o = o.flatMap((w) => f.map((A) => [...w, A])); - break; - } - case 'parameterTupleList': { - let a = s.value.reduce((C, I) => C + I.length, 0), - f = [], - w = [], - A = 0; - for (let C of s.value) - (r && o.length === 1 && a === i && w.length > 0 && n - a + A + C.length > r && (f.push(w), (w = []), (A = 0)), - w.push(C), - (A += C.length)); - (w.length > 0 && f.push(w), (o = o.flatMap((C) => f.map((I) => [...C, I])))); - break; - } - } - return o; -} -function rf(e, t) { - let r = []; - for (let n = 0; n < e.length; n += t) r.push(e.slice(n, n + t)); - return r; -} -u(); -c(); -p(); -m(); -d(); -l(); -function gu(e) { - let t = e.columnTypes.map((r) => { - switch (r) { - case O.Bytes: - return (n) => (Array.isArray(n) ? new Uint8Array(n) : n); - default: - return (n) => n; - } - }); - return e.rows.map((r) => - r - .map((n, i) => t[i](n)) - .reduce((n, i, o) => { - let s = e.columnNames[o].split('.'), - a = n; - for (let f = 0; f < s.length; f++) { - let w = s[f]; - f === s.length - 1 ? (a[w] = i) : (a[w] === void 0 && (a[w] = {}), (a = a[w])); - } - return n; - }, {}) - ); -} -function yu(e) { - return { - columns: e.columnNames, - types: e.columnTypes.map((t) => nf(t)), - rows: e.rows.map((t) => t.map((r, n) => Ft(r, e.columnTypes[n]))), - }; -} -function Ft(e, t) { - if (e === null) return null; - switch (t) { - case O.Int32: - switch (typeof e) { - case 'number': - return Math.trunc(e); - case 'string': - return Math.trunc(Number(e)); - default: - throw new Error(`Cannot serialize value of type ${typeof e} as Int32`); - } - case O.Int32Array: - if (!Array.isArray(e)) throw new Error(`Cannot serialize value of type ${typeof e} as Int32Array`); - return e.map((r) => Ft(r, O.Int32)); - case O.Int64: - switch (typeof e) { - case 'number': - return BigInt(Math.trunc(e)); - case 'string': - return e; - default: - throw new Error(`Cannot serialize value of type ${typeof e} as Int64`); - } - case O.Int64Array: - if (!Array.isArray(e)) throw new Error(`Cannot serialize value of type ${typeof e} as Int64Array`); - return e.map((r) => Ft(r, O.Int64)); - case O.Json: - switch (typeof e) { - case 'string': - return JSON.parse(e); - default: - throw new Error(`Cannot serialize value of type ${typeof e} as Json`); - } - case O.JsonArray: - if (!Array.isArray(e)) throw new Error(`Cannot serialize value of type ${typeof e} as JsonArray`); - return e.map((r) => Ft(r, O.Json)); - case O.Bytes: - if (Array.isArray(e)) return new Uint8Array(e); - throw new Error(`Cannot serialize value of type ${typeof e} as Bytes`); - case O.BytesArray: - if (!Array.isArray(e)) throw new Error(`Cannot serialize value of type ${typeof e} as BytesArray`); - return e.map((r) => Ft(r, O.Bytes)); - case O.Boolean: - switch (typeof e) { - case 'boolean': - return e; - case 'string': - return e === 'true' || e === '1'; - case 'number': - return e === 1; - default: - throw new Error(`Cannot serialize value of type ${typeof e} as Boolean`); - } - case O.BooleanArray: - if (!Array.isArray(e)) throw new Error(`Cannot serialize value of type ${typeof e} as BooleanArray`); - return e.map((r) => Ft(r, O.Boolean)); - default: - return e; - } -} -function nf(e) { - switch (e) { - case O.Int32: - return 'int'; - case O.Int64: - return 'bigint'; - case O.Float: - return 'float'; - case O.Double: - return 'double'; - case O.Text: - return 'string'; - case O.Enum: - return 'enum'; - case O.Bytes: - return 'bytes'; - case O.Boolean: - return 'bool'; - case O.Character: - return 'char'; - case O.Numeric: - return 'decimal'; - case O.Json: - return 'json'; - case O.Uuid: - return 'uuid'; - case O.DateTime: - return 'datetime'; - case O.Date: - return 'date'; - case O.Time: - return 'time'; - case O.Int32Array: - return 'int-array'; - case O.Int64Array: - return 'bigint-array'; - case O.FloatArray: - return 'float-array'; - case O.DoubleArray: - return 'double-array'; - case O.TextArray: - return 'string-array'; - case O.EnumArray: - return 'string-array'; - case O.BytesArray: - return 'bytes-array'; - case O.BooleanArray: - return 'bool-array'; - case O.CharacterArray: - return 'char-array'; - case O.NumericArray: - return 'decimal-array'; - case O.JsonArray: - return 'json-array'; - case O.UuidArray: - return 'uuid-array'; - case O.DateTimeArray: - return 'datetime-array'; - case O.DateArray: - return 'date-array'; - case O.TimeArray: - return 'time-array'; - case O.UnknownNumber: - return 'unknown'; - case O.Set: - return 'string'; - default: - $(e, `Unexpected column type: ${e}`); - } -} -u(); -c(); -p(); -m(); -d(); -l(); -function hu(e, t, r) { - if (!t.every((n) => Ao(e, n))) { - let n = of(e, r), - i = sf(r); - throw new ce(n, i, r.context); - } -} -function Ao(e, t) { - switch (t.type) { - case 'rowCountEq': - return Array.isArray(e) ? e.length === t.args : e === null ? t.args === 0 : t.args === 1; - case 'rowCountNeq': - return Array.isArray(e) ? e.length !== t.args : e === null ? t.args !== 0 : t.args !== 1; - case 'affectedRowCountEq': - return e === t.args; - case 'never': - return !1; - default: - $(t, `Unknown rule type: ${t.type}`); - } -} -function of(e, t) { - switch (t.error_identifier) { - case 'RELATION_VIOLATION': - return `The change you are trying to make would violate the required relation '${t.context.relation}' between the \`${t.context.modelA}\` and \`${t.context.modelB}\` models.`; - case 'MISSING_RECORD': - return `An operation failed because it depends on one or more records that were required but not found. No record was found for ${t.context.operation}.`; - case 'MISSING_RELATED_RECORD': { - let r = t.context.neededFor ? ` (needed to ${t.context.neededFor})` : ''; - return `An operation failed because it depends on one or more records that were required but not found. No '${t.context.model}' record${r} was found for ${t.context.operation} on ${t.context.relationType} relation '${t.context.relation}'.`; - } - case 'INCOMPLETE_CONNECT_INPUT': - return `An operation failed because it depends on one or more records that were required but not found. Expected ${t.context.expectedRows} records to be connected, found only ${Array.isArray(e) ? e.length : e}.`; - case 'INCOMPLETE_CONNECT_OUTPUT': - return `The required connected records were not found. Expected ${t.context.expectedRows} records to be connected after connect operation on ${t.context.relationType} relation '${t.context.relation}', found ${Array.isArray(e) ? e.length : e}.`; - case 'RECORDS_NOT_CONNECTED': - return `The records for relation \`${t.context.relation}\` between the \`${t.context.parent}\` and \`${t.context.child}\` models are not connected.`; - default: - $(t, `Unknown error identifier: ${t}`); - } -} -function sf(e) { - switch (e.error_identifier) { - case 'RELATION_VIOLATION': - return 'P2014'; - case 'RECORDS_NOT_CONNECTED': - return 'P2017'; - case 'INCOMPLETE_CONNECT_OUTPUT': - return 'P2018'; - case 'MISSING_RECORD': - case 'MISSING_RELATED_RECORD': - case 'INCOMPLETE_CONNECT_INPUT': - return 'P2025'; - default: - $(e, `Unknown error identifier: ${e}`); - } -} -var Rr = class e { - #e; - #t; - #r; - #n = new Qn(); - #o; - #i; - #u; - #s; - #l; - constructor({ - transactionManager: t, - placeholderValues: r, - onQuery: n, - tracingHelper: i, - serializer: o, - rawSerializer: s, - provider: a, - connectionInfo: f, - }) { - ((this.#e = t), - (this.#t = r), - (this.#r = n), - (this.#o = i), - (this.#i = o), - (this.#u = s ?? o), - (this.#s = a), - (this.#l = f)); - } - static forSql(t) { - return new e({ - transactionManager: t.transactionManager, - placeholderValues: t.placeholderValues, - onQuery: t.onQuery, - tracingHelper: t.tracingHelper, - serializer: gu, - rawSerializer: yu, - provider: t.provider, - connectionInfo: t.connectionInfo, - }); - } - async run(t, r) { - let { value: n } = await this.interpretNode(t, r, this.#t, this.#n.snapshot(r.provider)).catch((i) => _t(i)); - return n; - } - async interpretNode(t, r, n, i) { - switch (t.type) { - case 'value': - return { value: Te(t.args, n, i) }; - case 'seq': { - let o; - for (let s of t.args) o = await this.interpretNode(s, r, n, i); - return o ?? { value: void 0 }; - } - case 'get': - return { value: n[t.args.name] }; - case 'let': { - let o = Object.create(n); - for (let s of t.args.bindings) { - let { value: a } = await this.interpretNode(s.expr, r, o, i); - o[s.name] = a; - } - return this.interpretNode(t.args.expr, r, o, i); - } - case 'getFirstNonEmpty': { - for (let o of t.args.names) { - let s = n[o]; - if (!wu(s)) return { value: s }; - } - return { value: [] }; - } - case 'concat': { - let o = await Promise.all(t.args.map((s) => this.interpretNode(s, r, n, i).then((a) => a.value))); - return { value: o.length > 0 ? o.reduce((s, a) => s.concat(Co(a)), []) : [] }; - } - case 'sum': { - let o = await Promise.all(t.args.map((s) => this.interpretNode(s, r, n, i).then((a) => a.value))); - return { value: o.length > 0 ? o.reduce((s, a) => De(s) + De(a)) : 0 }; - } - case 'execute': { - let o = vo(t.args, n, i, this.#a()), - s = 0; - for (let a of o) - s += await this.#c(a, r, () => r.executeRaw(a).catch((f) => (t.args.type === 'rawSql' ? Wi(f) : _t(f)))); - return { value: s }; - } - case 'query': { - let o = vo(t.args, n, i, this.#a()), - s; - for (let a of o) { - let f = await this.#c(a, r, () => r.queryRaw(a).catch((w) => (t.args.type === 'rawSql' ? Wi(w) : _t(w)))); - s === void 0 ? (s = f) : (s.rows.push(...f.rows), (s.lastInsertId = f.lastInsertId)); - } - return { value: t.args.type === 'rawSql' ? this.#u(s) : this.#i(s), lastInsertId: s?.lastInsertId }; - } - case 'reverse': { - let { value: o, lastInsertId: s } = await this.interpretNode(t.args, r, n, i); - return { value: Array.isArray(o) ? o.reverse() : o, lastInsertId: s }; - } - case 'unique': { - let { value: o, lastInsertId: s } = await this.interpretNode(t.args, r, n, i); - if (!Array.isArray(o)) return { value: o, lastInsertId: s }; - if (o.length > 1) throw new Error(`Expected zero or one element, got ${o.length}`); - return { value: o[0] ?? null, lastInsertId: s }; - } - case 'required': { - let { value: o, lastInsertId: s } = await this.interpretNode(t.args, r, n, i); - if (wu(o)) throw new Error('Required value is empty'); - return { value: o, lastInsertId: s }; - } - case 'mapField': { - let { value: o, lastInsertId: s } = await this.interpretNode(t.args.records, r, n, i); - return { value: bu(o, t.args.field), lastInsertId: s }; - } - case 'join': { - let { value: o, lastInsertId: s } = await this.interpretNode(t.args.parent, r, n, i); - if (o === null) return { value: null, lastInsertId: s }; - let a = await Promise.all( - t.args.children.map(async (f) => ({ - joinExpr: f, - childRecords: (await this.interpretNode(f.child, r, n, i)).value, - })) - ); - return { value: af(o, a), lastInsertId: s }; - } - case 'transaction': { - if (!this.#e.enabled) return this.interpretNode(t.args, r, n, i); - let o = this.#e.manager, - s = await o.startTransaction(), - a = o.getTransaction(s, 'query'); - try { - let f = await this.interpretNode(t.args, a, n, i); - return (await o.commitTransaction(s.id), f); - } catch (f) { - throw (await o.rollbackTransaction(s.id), f); - } - } - case 'dataMap': { - let { value: o, lastInsertId: s } = await this.interpretNode(t.args.expr, r, n, i); - return { value: sl(o, t.args.structure, t.args.enums), lastInsertId: s }; - } - case 'validate': { - let { value: o, lastInsertId: s } = await this.interpretNode(t.args.expr, r, n, i); - return (hu(o, t.args.rules, t.args), { value: o, lastInsertId: s }); - } - case 'if': { - let { value: o } = await this.interpretNode(t.args.value, r, n, i); - return Ao(o, t.args.rule) - ? await this.interpretNode(t.args.then, r, n, i) - : await this.interpretNode(t.args.else, r, n, i); - } - case 'unit': - return { value: void 0 }; - case 'diff': { - let { value: o } = await this.interpretNode(t.args.from, r, n, i), - { value: s } = await this.interpretNode(t.args.to, r, n, i), - a = new Set(Co(s).map((f) => JSON.stringify(f))); - return { value: Co(o).filter((f) => !a.has(JSON.stringify(f))) }; - } - case 'process': { - let { value: o, lastInsertId: s } = await this.interpretNode(t.args.expr, r, n, i); - return { value: Hn(o, t.args.operations), lastInsertId: s }; - } - case 'initializeRecord': { - let { lastInsertId: o } = await this.interpretNode(t.args.expr, r, n, i), - s = {}; - for (let [a, f] of Object.entries(t.args.fields)) s[a] = lf(f, o, n, i); - return { value: s, lastInsertId: o }; - } - case 'mapRecord': { - let { value: o, lastInsertId: s } = await this.interpretNode(t.args.expr, r, n, i), - a = o === null ? {} : Ro(o); - for (let [f, w] of Object.entries(t.args.fields)) a[f] = uf(w, a[f], n, i); - return { value: a, lastInsertId: s }; - } - default: - $(t, `Unexpected node type: ${t.type}`); - } - } - #a() { - return this.#l?.maxBindValues !== void 0 ? this.#l.maxBindValues : this.#p(); - } - #p() { - if (this.#s !== void 0) - switch (this.#s) { - case 'cockroachdb': - case 'postgres': - case 'postgresql': - case 'prisma+postgres': - return 32766; - case 'mysql': - return 65535; - case 'sqlite': - return 999; - case 'sqlserver': - return 2098; - case 'mongodb': - return; - default: - $(this.#s, `Unexpected provider: ${this.#s}`); - } - } - #c(t, r, n) { - return Ln({ query: t, execute: n, provider: this.#s ?? r.provider, tracingHelper: this.#o, onQuery: this.#r }); - } -}; -function wu(e) { - return Array.isArray(e) ? e.length === 0 : e == null; -} -function Co(e) { - return Array.isArray(e) ? e : [e]; -} -function De(e) { - if (typeof e == 'number') return e; - if (typeof e == 'string') return Number(e); - throw new Error(`Expected number, got ${typeof e}`); -} -function Ro(e) { - if (typeof e == 'object' && e !== null) return e; - throw new Error(`Expected object, got ${typeof e}`); -} -function bu(e, t) { - return Array.isArray(e) ? e.map((r) => bu(r, t)) : typeof e == 'object' && e !== null ? (e[t] ?? null) : e; -} -function af(e, t) { - for (let { joinExpr: r, childRecords: n } of t) { - let i = r.on.map(([a]) => a), - o = r.on.map(([, a]) => a), - s = {}; - for (let a of Array.isArray(e) ? e : [e]) { - let f = Ro(a), - w = Cr(f, i); - (s[w] || (s[w] = []), s[w].push(f), r.isRelationUnique ? (f[r.parentField] = null) : (f[r.parentField] = [])); - } - for (let a of Array.isArray(n) ? n : [n]) { - if (a === null) continue; - let f = Cr(Ro(a), o); - for (let w of s[f] ?? []) r.isRelationUnique ? (w[r.parentField] = a) : w[r.parentField].push(a); - } - } - return e; -} -function lf(e, t, r, n) { - switch (e.type) { - case 'value': - return Te(e.value, r, n); - case 'lastInsertId': - return t; - default: - $(e, `Unexpected field initializer type: ${e.type}`); - } -} -function uf(e, t, r, n) { - switch (e.type) { - case 'set': - return Te(e.value, r, n); - case 'add': - return De(t) + De(Te(e.value, r, n)); - case 'subtract': - return De(t) - De(Te(e.value, r, n)); - case 'multiply': - return De(t) * De(Te(e.value, r, n)); - case 'divide': { - let i = De(t), - o = De(Te(e.value, r, n)); - return o === 0 ? null : i / o; - } - default: - $(e, `Unexpected field operation type: ${e.type}`); - } -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -async function cf() { - return globalThis.crypto ?? (await Promise.resolve().then(() => (Xe(), xi))); -} -async function Eu() { - return (await cf()).randomUUID(); -} -u(); -c(); -p(); -m(); -d(); -l(); -var be = class extends ce { - name = 'TransactionManagerError'; - constructor(t, r) { - super('Transaction API error: ' + t, 'P2028', r); - } - }, - Ir = class extends be { - constructor() { - super( - "Transaction not found. Transaction ID is invalid, refers to an old closed transaction Prisma doesn't have information about anymore, or was obtained before disconnecting." - ); - } - }, - Gn = class extends be { - constructor(t) { - super(`Transaction already closed: A ${t} cannot be executed on a committed transaction.`); - } - }, - Jn = class extends be { - constructor(t) { - super(`Transaction is being closed: A ${t} cannot be executed on a closing transaction.`); - } - }, - Wn = class extends be { - constructor(t) { - super(`Transaction already closed: A ${t} cannot be executed on a transaction that was rolled back.`); - } - }, - Kn = class extends be { - constructor() { - super('Unable to start a transaction in the given time.'); - } - }, - zn = class extends be { - constructor(t, { timeout: r, timeTaken: n }) { - super( - `A ${t} cannot be executed on an expired transaction. The timeout for this transaction was ${r} ms, however ${n} ms passed since the start of the transaction. Consider increasing the interactive transaction timeout or doing less work in the transaction.`, - { operation: t, timeout: r, timeTaken: n } - ); - } - }, - Vt = class extends be { - constructor(t) { - super(`Internal Consistency Error: ${t}`); - } - }, - Yn = class extends be { - constructor(t) { - super(`Invalid isolation level: ${t}`, { isolationLevel: t }); - } - }; -var pf = 100, - Sr = K('prisma:client:transactionManager'), - mf = () => ({ sql: 'COMMIT', args: [], argTypes: [] }), - df = () => ({ sql: 'ROLLBACK', args: [], argTypes: [] }), - ff = () => ({ sql: '-- Implicit "COMMIT" query via underlying driver', args: [], argTypes: [] }), - gf = () => ({ sql: '-- Implicit "ROLLBACK" query via underlying driver', args: [], argTypes: [] }), - kr = class { - transactions = new Map(); - closedTransactions = []; - driverAdapter; - transactionOptions; - tracingHelper; - #e; - #t; - constructor({ driverAdapter: t, transactionOptions: r, tracingHelper: n, onQuery: i, provider: o }) { - ((this.driverAdapter = t), (this.transactionOptions = r), (this.tracingHelper = n), (this.#e = i), (this.#t = o)); - } - async startTransaction(t) { - return await this.tracingHelper.runInChildSpan('start_transaction', () => this.#r(t)); - } - async #r(t) { - let r = t !== void 0 ? this.validateOptions(t) : this.transactionOptions, - n = { - id: await Eu(), - status: 'waiting', - timer: void 0, - timeout: r.timeout, - startedAt: Date.now(), - transaction: void 0, - }; - this.transactions.set(n.id, n); - let i = !1, - o = setTimeout(() => (i = !0), r.maxWait); - switch ( - ((n.transaction = await this.driverAdapter.startTransaction(r.isolationLevel).catch(_t)), - clearTimeout(o), - n.status) - ) { - case 'waiting': - if (i) throw (await this.closeTransaction(n, 'timed_out'), new Kn()); - return ((n.status = 'running'), (n.timer = this.startTransactionTimeout(n.id, r.timeout)), { id: n.id }); - case 'closing': - case 'timed_out': - case 'running': - case 'committed': - case 'rolled_back': - throw new Vt(`Transaction in invalid state ${n.status} although it just finished startup.`); - default: - $(n.status, 'Unknown transaction status.'); - } - } - async commitTransaction(t) { - return await this.tracingHelper.runInChildSpan('commit_transaction', async () => { - let r = this.getActiveTransaction(t, 'commit'); - await this.closeTransaction(r, 'committed'); - }); - } - async rollbackTransaction(t) { - return await this.tracingHelper.runInChildSpan('rollback_transaction', async () => { - let r = this.getActiveTransaction(t, 'rollback'); - await this.closeTransaction(r, 'rolled_back'); - }); - } - getTransaction(t, r) { - let n = this.getActiveTransaction(t.id, r); - if (!n.transaction) throw new Ir(); - return n.transaction; - } - getActiveTransaction(t, r) { - let n = this.transactions.get(t); - if (!n) { - let i = this.closedTransactions.find((o) => o.id === t); - if (i) - switch ((Sr('Transaction already closed.', { transactionId: t, status: i.status }), i.status)) { - case 'closing': - case 'waiting': - case 'running': - throw new Vt('Active transaction found in closed transactions list.'); - case 'committed': - throw new Gn(r); - case 'rolled_back': - throw new Wn(r); - case 'timed_out': - throw new zn(r, { timeout: i.timeout, timeTaken: Date.now() - i.startedAt }); - } - else throw (Sr('Transaction not found.', t), new Ir()); - } - if (n.status === 'closing') throw new Jn(r); - if (['committed', 'rolled_back', 'timed_out'].includes(n.status)) - throw new Vt('Closed transaction found in active transactions map.'); - return n; - } - async cancelAllTransactions() { - await Promise.allSettled([...this.transactions.values()].map((t) => this.closeTransaction(t, 'rolled_back'))); - } - startTransactionTimeout(t, r) { - let n = Date.now(); - return setTimeout(async () => { - Sr('Transaction timed out.', { transactionId: t, timeoutStartedAt: n, timeout: r }); - let i = this.transactions.get(t); - i && ['running', 'waiting'].includes(i.status) - ? await this.closeTransaction(i, 'timed_out') - : Sr('Transaction already committed or rolled back when timeout happened.', t); - }, r); - } - async closeTransaction(t, r) { - (Sr('Closing transaction.', { transactionId: t.id, status: r }), (t.status = 'closing')); - try { - if (t.transaction && r === 'committed') - if (t.transaction.options.usePhantomQuery) await this.#n(ff(), t.transaction, () => t.transaction.commit()); - else { - let n = mf(); - (await this.#n(n, t.transaction, () => t.transaction.executeRaw(n)), await t.transaction.commit()); - } - else if (t.transaction) - if (t.transaction.options.usePhantomQuery) await this.#n(gf(), t.transaction, () => t.transaction.rollback()); - else { - let n = df(); - (await this.#n(n, t.transaction, () => t.transaction.executeRaw(n)), await t.transaction.rollback()); - } - } finally { - ((t.status = r), - clearTimeout(t.timer), - (t.timer = void 0), - this.transactions.delete(t.id), - this.closedTransactions.push(t), - this.closedTransactions.length > pf && this.closedTransactions.shift()); - } - } - validateOptions(t) { - if (!t.timeout) throw new be('timeout is required'); - if (!t.maxWait) throw new be('maxWait is required'); - if (t.isolationLevel === 'SNAPSHOT') throw new Yn(t.isolationLevel); - return { ...t, timeout: t.timeout, maxWait: t.maxWait }; - } - #n(t, r, n) { - return Ln({ - query: t, - execute: n, - provider: this.#t ?? r.provider, - tracingHelper: this.tracingHelper, - onQuery: this.#e, - }); - } - }; -var Zn = '6.14.0'; -u(); -c(); -p(); -m(); -d(); -l(); -var Xn = class e { - #e; - #t; - #r; - #n; - constructor(t, r, n) { - ((this.#e = t), (this.#t = r), (this.#r = n), (this.#n = r.getConnectionInfo?.())); - } - static async connect(t) { - let r, n; - try { - ((r = await t.driverAdapterFactory.connect()), - (n = new kr({ - driverAdapter: r, - transactionOptions: t.transactionOptions, - tracingHelper: t.tracingHelper, - onQuery: t.onQuery, - provider: t.provider, - }))); - } catch (i) { - throw (await r?.dispose(), i); - } - return new e(t, r, n); - } - getConnectionInfo() { - let t = this.#n ?? { supportsRelationJoins: !1 }; - return Promise.resolve({ provider: this.#t.provider, connectionInfo: t }); - } - async execute({ plan: t, placeholderValues: r, transaction: n, batchIndex: i }) { - let o = n ? this.#r.getTransaction(n, i !== void 0 ? 'batch query' : 'query') : this.#t; - return await Rr.forSql({ - transactionManager: n ? { enabled: !1 } : { enabled: !0, manager: this.#r }, - placeholderValues: r, - onQuery: this.#e.onQuery, - tracingHelper: this.#e.tracingHelper, - provider: this.#e.provider, - connectionInfo: this.#n, - }).run(t, o); - } - async startTransaction(t) { - return { ...(await this.#r.startTransaction(t)), payload: void 0 }; - } - async commitTransaction(t) { - await this.#r.commitTransaction(t.id); - } - async rollbackTransaction(t) { - await this.#r.rollbackTransaction(t.id); - } - async disconnect() { - try { - await this.#r.cancelAllTransactions(); - } finally { - await this.#t.dispose(); - } - } -}; -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var ei = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/; -function xu(e, t, r) { - let n = r || {}, - i = n.encode || encodeURIComponent; - if (typeof i != 'function') throw new TypeError('option encode is invalid'); - if (!ei.test(e)) throw new TypeError('argument name is invalid'); - let o = i(t); - if (o && !ei.test(o)) throw new TypeError('argument val is invalid'); - let s = e + '=' + o; - if (n.maxAge !== void 0 && n.maxAge !== null) { - let a = n.maxAge - 0; - if (Number.isNaN(a) || !Number.isFinite(a)) throw new TypeError('option maxAge is invalid'); - s += '; Max-Age=' + Math.floor(a); - } - if (n.domain) { - if (!ei.test(n.domain)) throw new TypeError('option domain is invalid'); - s += '; Domain=' + n.domain; - } - if (n.path) { - if (!ei.test(n.path)) throw new TypeError('option path is invalid'); - s += '; Path=' + n.path; - } - if (n.expires) { - if (!hf(n.expires) || Number.isNaN(n.expires.valueOf())) throw new TypeError('option expires is invalid'); - s += '; Expires=' + n.expires.toUTCString(); - } - if ((n.httpOnly && (s += '; HttpOnly'), n.secure && (s += '; Secure'), n.priority)) - switch (typeof n.priority == 'string' ? n.priority.toLowerCase() : n.priority) { - case 'low': { - s += '; Priority=Low'; - break; - } - case 'medium': { - s += '; Priority=Medium'; - break; - } - case 'high': { - s += '; Priority=High'; - break; - } - default: - throw new TypeError('option priority is invalid'); - } - if (n.sameSite) - switch (typeof n.sameSite == 'string' ? n.sameSite.toLowerCase() : n.sameSite) { - case !0: { - s += '; SameSite=Strict'; - break; - } - case 'lax': { - s += '; SameSite=Lax'; - break; - } - case 'strict': { - s += '; SameSite=Strict'; - break; - } - case 'none': { - s += '; SameSite=None'; - break; - } - default: - throw new TypeError('option sameSite is invalid'); - } - return (n.partitioned && (s += '; Partitioned'), s); -} -function hf(e) { - return Object.prototype.toString.call(e) === '[object Date]' || e instanceof Date; -} -function Pu(e, t) { - let r = (e || '').split(';').filter((f) => typeof f == 'string' && !!f.trim()), - n = r.shift() || '', - i = wf(n), - o = i.name, - s = i.value; - try { - s = t?.decode === !1 ? s : (t?.decode || decodeURIComponent)(s); - } catch {} - let a = { name: o, value: s }; - for (let f of r) { - let w = f.split('='), - A = (w.shift() || '').trimStart().toLowerCase(), - C = w.join('='); - switch (A) { - case 'expires': { - a.expires = new Date(C); - break; - } - case 'max-age': { - a.maxAge = Number.parseInt(C, 10); - break; - } - case 'secure': { - a.secure = !0; - break; - } - case 'httponly': { - a.httpOnly = !0; - break; - } - case 'samesite': { - a.sameSite = C; - break; - } - default: - a[A] = C; - } - } - return a; -} -function wf(e) { - let t = '', - r = '', - n = e.split('='); - return (n.length > 1 ? ((t = n.shift()), (r = n.join('='))) : (r = e), { name: t, value: r }); -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -function $t({ inlineDatasources: e, overrideDatasources: t, env: r, clientVersion: n }) { - let i, - o = Object.keys(e)[0], - s = e[o]?.url, - a = t[o]?.url; - if ( - (o === void 0 ? (i = void 0) : a ? (i = a) : s?.value ? (i = s.value) : s?.fromEnvVar && (i = r[s.fromEnvVar]), - s?.fromEnvVar !== void 0 && i === void 0) - ) - throw Ot().id === 'workerd' - ? new F( - `error: Environment variable not found: ${s.fromEnvVar}. - -In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`, - n - ) - : new F(`error: Environment variable not found: ${s.fromEnvVar}.`, n); - if (i === void 0) throw new F('error: Missing URL environment variable, value, or override.', n); - return i; -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var ti = class extends Error { - clientVersion; - cause; - constructor(t, r) { - (super(t), (this.clientVersion = r.clientVersion), (this.cause = r.cause)); - } - get [Symbol.toStringTag]() { - return this.name; - } -}; -var ge = class extends ti { - isRetryable; - constructor(t, r) { - (super(t, r), (this.isRetryable = r.isRetryable ?? !0)); - } -}; -u(); -c(); -p(); -m(); -d(); -l(); -function N(e, t) { - return { ...e, isRetryable: t }; -} -var st = class extends ge { - name = 'InvalidDatasourceError'; - code = 'P6001'; - constructor(t, r) { - super(t, N(r, !1)); - } -}; -D(st, 'InvalidDatasourceError'); -function ri(e) { - let t = { clientVersion: e.clientVersion }, - r = Object.keys(e.inlineDatasources)[0], - n = $t({ - inlineDatasources: e.inlineDatasources, - overrideDatasources: e.overrideDatasources, - clientVersion: e.clientVersion, - env: { ...e.env, ...(typeof g < 'u' ? g.env : {}) }, - }), - i; - try { - i = new URL(n); - } catch { - throw new st(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``, t); - } - let { protocol: o, searchParams: s } = i; - if (o !== 'prisma:' && o !== ln) - throw new st( - `Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\` or \`prisma+postgres://\``, - t - ); - let a = s.get('api_key'); - if (a === null || a.length < 1) - throw new st(`Error validating datasource \`${r}\`: the URL must contain a valid API key`, t); - let f = Ti(i) ? 'http:' : 'https:', - w = new URL(i.href.replace(o, f)); - return { apiKey: a, url: w }; -} -u(); -c(); -p(); -m(); -d(); -l(); -var Tu = Ae(As()), - qt = class { - apiKey; - tracingHelper; - logLevel; - logQueries; - engineHash; - constructor({ apiKey: t, tracingHelper: r, logLevel: n, logQueries: i, engineHash: o }) { - ((this.apiKey = t), (this.tracingHelper = r), (this.logLevel = n), (this.logQueries = i), (this.engineHash = o)); - } - build({ traceparent: t, transactionId: r } = {}) { - let n = { - Accept: 'application/json', - Authorization: `Bearer ${this.apiKey}`, - 'Content-Type': 'application/json', - 'Prisma-Engine-Hash': this.engineHash, - 'Prisma-Engine-Version': Tu.enginesVersion, - }; - (this.tracingHelper.isEnabled() && (n.traceparent = t ?? this.tracingHelper.getTraceParent()), - r && (n['X-Transaction-Id'] = r)); - let i = this.#e(); - return (i.length > 0 && (n['X-Capture-Telemetry'] = i.join(', ')), n); - } - #e() { - let t = []; - return ( - this.tracingHelper.isEnabled() && t.push('tracing'), - this.logLevel && t.push(this.logLevel), - this.logQueries && t.push('query'), - t - ); - } - }; -u(); -c(); -p(); -m(); -d(); -l(); -function bf(e) { - return e[0] * 1e3 + e[1] / 1e6; -} -function Bt(e) { - return new Date(bf(e)); -} -var vu = K('prisma:client:clientEngine:remoteExecutor'), - ni = class { - #e; - #t; - #r; - #n; - #o; - constructor(t) { - ((this.#e = t.clientVersion), (this.#n = t.logEmitter), (this.#o = t.tracingHelper)); - let { url: r, apiKey: n } = ri({ - clientVersion: t.clientVersion, - env: t.env, - inlineDatasources: t.inlineDatasources, - overrideDatasources: t.overrideDatasources, - }); - ((this.#r = new Io(r)), - (this.#t = new qt({ - apiKey: n, - engineHash: t.clientVersion, - logLevel: t.logLevel, - logQueries: t.logQueries, - tracingHelper: t.tracingHelper, - }))); - } - async getConnectionInfo() { - return await this.#i({ path: '/connection-info', method: 'GET' }); - } - async execute({ - plan: t, - placeholderValues: r, - batchIndex: n, - model: i, - operation: o, - transaction: s, - customFetch: a, - }) { - return ( - await this.#i({ - path: s ? `/transaction/${s.id}/query` : '/query', - method: 'POST', - body: { model: i, operation: o, plan: t, params: r }, - batchRequestIdx: n, - fetch: a, - }) - ).data; - } - async startTransaction(t) { - return { ...(await this.#i({ path: '/transaction/start', method: 'POST', body: t })), payload: void 0 }; - } - async commitTransaction(t) { - await this.#i({ path: `/transaction/${t.id}/commit`, method: 'POST' }); - } - async rollbackTransaction(t) { - await this.#i({ path: `/transaction/${t.id}/rollback`, method: 'POST' }); - } - disconnect() { - return Promise.resolve(); - } - async #i({ path: t, method: r, body: n, fetch: i = globalThis.fetch, batchRequestIdx: o }) { - let s = await this.#r.request({ method: r, path: t, headers: this.#t.build(), body: n, fetch: i }); - s.ok || (await this.#u(s, o)); - let a = await s.json(); - return (typeof a.extensions == 'object' && a.extensions !== null && this.#s(a.extensions), a); - } - async #u(t, r) { - let n = t.headers.get('Prisma-Error-Code'), - i = await t.text(), - o, - s = i; - try { - o = JSON.parse(i); - } catch { - o = {}; - } - (typeof o.code == 'string' && (n = o.code), - typeof o.error == 'string' - ? (s = o.error) - : typeof o.message == 'string' - ? (s = o.message) - : typeof o.InvalidRequestError == 'object' && - o.InvalidRequestError !== null && - typeof o.InvalidRequestError.reason == 'string' && - (s = o.InvalidRequestError.reason), - (s = s || `HTTP ${t.status}: ${t.statusText}`)); - let a = typeof o.meta == 'object' && o.meta !== null ? o.meta : o; - throw new X(s, { clientVersion: this.#e, code: n ?? 'P6000', batchRequestIdx: r, meta: a }); - } - #s(t) { - if (t.logs) for (let r of t.logs) this.#l(r); - t.traces && this.#o.dispatchEngineSpans(t.traces); - } - #l(t) { - switch (t.level) { - case 'debug': - case 'trace': - vu(t); - break; - case 'error': - case 'warn': - case 'info': { - this.#n.emit(t.level, { timestamp: Bt(t.timestamp), message: t.attributes.message ?? '', target: t.target }); - break; - } - case 'query': { - this.#n.emit('query', { - query: t.attributes.query ?? '', - timestamp: Bt(t.timestamp), - duration: t.attributes.duration_ms ?? 0, - params: t.attributes.params ?? '', - target: t.target, - }); - break; - } - default: - throw new Error(`Unexpected log level: ${t.level}`); - } - } - }, - Io = class { - #e; - #t; - #r; - constructor(t) { - ((this.#e = t), (this.#t = new Map())); - } - async request({ method: t, path: r, headers: n, body: i, fetch: o }) { - let s = new URL(r, this.#e), - a = this.#n(s); - (a && (n.Cookie = a), this.#r && (n['Accelerate-Query-Engine-Jwt'] = this.#r)); - let f = await o(s, { method: t, body: i !== void 0 ? JSON.stringify(i) : void 0, headers: n }); - return ( - vu(t, s, f.status, f.statusText), - (this.#r = f.headers.get('Accelerate-Query-Engine-Jwt') ?? void 0), - this.#o(s, f), - f - ); - } - #n(t) { - let r = [], - n = new Date(); - for (let [i, o] of this.#t) { - if (o.expires && o.expires < n) { - this.#t.delete(i); - continue; - } - let s = o.domain ?? t.hostname, - a = o.path ?? '/'; - t.hostname.endsWith(s) && t.pathname.startsWith(a) && r.push(xu(o.name, o.value)); - } - return r.length > 0 ? r.join('; ') : void 0; - } - #o(t, r) { - let n = r.headers.getSetCookie?.() || []; - if (n.length === 0) { - let i = r.headers.get('Set-Cookie'); - i && n.push(i); - } - for (let i of n) { - let o = Pu(i), - s = o.domain ?? t.hostname, - a = o.path ?? '/', - f = `${s}:${a}:${o.name}`; - this.#t.set(f, { name: o.name, value: o.value, domain: s, path: a, expires: o.expires }); - } - } - }; -u(); -c(); -p(); -m(); -d(); -l(); -var So, - Au = { - async loadQueryCompiler(e) { - let { clientVersion: t, compilerWasm: r } = e; - if (r === void 0) throw new F('WASM query compiler was unexpectedly `undefined`', t); - return ( - So === void 0 && - (So = (async () => { - let n = await r.getRuntime(), - i = await r.getQueryCompilerWasmModule(); - if (i == null) throw new F('The loaded wasm module was unexpectedly `undefined` or `null` once loaded', t); - let o = { './query_compiler_bg.js': n }, - s = new WebAssembly.Instance(i, o), - a = s.exports.__wbindgen_start; - return (n.__wbg_set_wasm(s.exports), a(), n.QueryCompiler); - })()), - await So - ); - }, - }; -var Cu = 'P2038', - Or = K('prisma:client:clientEngine'), - Iu = globalThis; -Iu.PRISMA_WASM_PANIC_REGISTRY = { - set_message(e) { - throw new le(e, Zn); - }, -}; -var Dr = class { - name = 'ClientEngine'; - #e; - #t = { type: 'disconnected' }; - #r; - #n; - config; - datamodel; - logEmitter; - logQueries; - logLevel; - tracingHelper; - #o; - constructor(t, r, n) { - if (!t.previewFeatures?.includes('driverAdapters') && !r) - throw new F( - 'EngineType `client` requires the driverAdapters preview feature to be enabled.', - t.clientVersion, - Cu - ); - if (r) this.#n = { remote: !0 }; - else if (t.adapter) - ((this.#n = { remote: !1, driverAdapterFactory: t.adapter }), Or('Using driver adapter: %O', t.adapter)); - else - throw new F( - 'Missing configured driver adapter. Engine type `client` requires an active driver adapter. Please check your PrismaClient initialization code.', - t.clientVersion, - Cu - ); - ((this.#r = n ?? Au), - (this.config = t), - (this.logQueries = t.logQueries ?? !1), - (this.logLevel = t.logLevel ?? 'error'), - (this.logEmitter = t.logEmitter), - (this.datamodel = t.inlineSchema), - (this.tracingHelper = t.tracingHelper), - t.enableDebugLogs && (this.logLevel = 'debug'), - this.logQueries && - (this.#o = (i) => { - this.logEmitter.emit('query', { ...i, params: wr(i.params), target: 'ClientEngine' }); - })); - } - applyPendingMigrations() { - throw new Error('Cannot call applyPendingMigrations on engine type client.'); - } - async #i() { - switch (this.#t.type) { - case 'disconnected': { - let t = this.tracingHelper.runInChildSpan('connect', async () => { - let r, n; - try { - ((r = await this.#u()), (n = await this.#s(r))); - } catch (o) { - throw ((this.#t = { type: 'disconnected' }), n?.free(), await r?.disconnect(), o); - } - let i = { executor: r, queryCompiler: n }; - return ((this.#t = { type: 'connected', engine: i }), i); - }); - return ((this.#t = { type: 'connecting', promise: t }), await t); - } - case 'connecting': - return await this.#t.promise; - case 'connected': - return this.#t.engine; - case 'disconnecting': - return (await this.#t.promise, await this.#i()); - } - } - async #u() { - return this.#n.remote - ? new ni({ - clientVersion: this.config.clientVersion, - env: this.config.env, - inlineDatasources: this.config.inlineDatasources, - logEmitter: this.logEmitter, - logLevel: this.logLevel, - logQueries: this.logQueries, - overrideDatasources: this.config.overrideDatasources, - tracingHelper: this.tracingHelper, - }) - : await Xn.connect({ - driverAdapterFactory: this.#n.driverAdapterFactory, - tracingHelper: this.tracingHelper, - transactionOptions: { - ...this.config.transactionOptions, - isolationLevel: this.#m(this.config.transactionOptions.isolationLevel), - }, - onQuery: this.#o, - provider: this.config.activeProvider, - }); - } - async #s(t) { - let r = this.#e; - r === void 0 && ((r = await this.#r.loadQueryCompiler(this.config)), (this.#e = r)); - let { provider: n, connectionInfo: i } = await t.getConnectionInfo(); - try { - return this.#c(() => new r({ datamodel: this.datamodel, provider: n, connectionInfo: i }), void 0, !1); - } catch (o) { - throw this.#l(o); - } - } - #l(t) { - if (t instanceof le) return t; - try { - let r = JSON.parse(t.message); - return new F(r.message, this.config.clientVersion, r.error_code); - } catch { - return t; - } - } - #a(t, r) { - if (t instanceof F) return t; - if (t.code === 'GenericFailure' && t.message?.startsWith('PANIC:')) - return new le(Ru(this, t.message, r), this.config.clientVersion); - if (t instanceof ce) - return new X(t.message, { code: t.code, meta: t.meta, clientVersion: this.config.clientVersion }); - try { - let n = JSON.parse(t); - return new ne( - `${n.message} -${n.backtrace}`, - { clientVersion: this.config.clientVersion } - ); - } catch { - return t; - } - } - #p(t) { - return t instanceof le - ? t - : typeof t.message == 'string' && typeof t.code == 'string' - ? new X(t.message, { code: t.code, meta: t.meta, clientVersion: this.config.clientVersion }) - : typeof t.message == 'string' - ? new ne(t.message, { clientVersion: this.config.clientVersion }) - : t; - } - #c(t, r, n = !0) { - let i = Iu.PRISMA_WASM_PANIC_REGISTRY.set_message, - o; - globalThis.PRISMA_WASM_PANIC_REGISTRY.set_message = (s) => { - o = s; - }; - try { - return t(); - } finally { - if (((globalThis.PRISMA_WASM_PANIC_REGISTRY.set_message = i), o)) - throw ( - (this.#e = void 0), - n && this.stop().catch((s) => Or('failed to disconnect:', s)), - new le(Ru(this, o, r), this.config.clientVersion) - ); - } - } - onBeforeExit() { - throw new Error( - '"beforeExit" hook is not applicable to the client engine, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.' - ); - } - async start() { - await this.#i(); - } - async stop() { - switch (this.#t.type) { - case 'disconnected': - return; - case 'connecting': - return (await this.#t.promise, await this.stop()); - case 'connected': { - let t = this.#t.engine, - r = this.tracingHelper.runInChildSpan('disconnect', async () => { - try { - (await t.executor.disconnect(), t.queryCompiler.free()); - } finally { - this.#t = { type: 'disconnected' }; - } - }); - return ((this.#t = { type: 'disconnecting', promise: r }), await r); - } - case 'disconnecting': - return await this.#t.promise; - } - } - version() { - return 'unknown'; - } - async transaction(t, r, n) { - let i, - { executor: o } = await this.#i(); - try { - if (t === 'start') { - let s = n; - i = await o.startTransaction({ ...s, isolationLevel: this.#m(s.isolationLevel) }); - } else if (t === 'commit') { - let s = n; - await o.commitTransaction(s); - } else if (t === 'rollback') { - let s = n; - await o.rollbackTransaction(s); - } else Ne(t, 'Invalid transaction action.'); - } catch (s) { - throw this.#a(s); - } - return i ? { id: i.id, payload: void 0 } : void 0; - } - async request(t, { interactiveTransaction: r, customDataProxyFetch: n }) { - Or('sending request'); - let i = JSON.stringify(t), - { executor: o, queryCompiler: s } = await this.#i().catch((f) => { - throw this.#a(f, i); - }), - a; - try { - a = this.#c(() => s.compile(i), i); - } catch (f) { - throw this.#p(f); - } - try { - Or('query plan created', a); - let f = {}, - w = await o.execute({ - plan: a, - model: t.modelName, - operation: t.action, - placeholderValues: f, - transaction: r, - batchIndex: void 0, - customFetch: n?.(globalThis.fetch), - }); - return (Or('query plan executed'), { data: { [t.action]: w } }); - } catch (f) { - throw this.#a(f, i); - } - } - async requestBatch(t, { transaction: r, customDataProxyFetch: n }) { - if (t.length === 0) return []; - let i = t[0].action, - o = JSON.stringify(St(t, r)), - { executor: s, queryCompiler: a } = await this.#i().catch((w) => { - throw this.#a(w, o); - }), - f; - try { - f = a.compileBatch(o); - } catch (w) { - throw this.#p(w); - } - try { - let w; - r?.kind === 'itx' && (w = r.options); - let A = {}; - switch (f.type) { - case 'multi': { - if (r?.kind !== 'itx') { - let R = r?.options.isolationLevel - ? { ...this.config.transactionOptions, isolationLevel: r.options.isolationLevel } - : this.config.transactionOptions; - w = await this.transaction('start', {}, R); - } - let C = [], - I = !1; - for (let [R, L] of f.plans.entries()) - try { - let k = await s.execute({ - plan: L, - placeholderValues: A, - model: t[R].modelName, - operation: t[R].action, - batchIndex: R, - transaction: w, - customFetch: n?.(globalThis.fetch), - }); - C.push({ data: { [t[R].action]: k } }); - } catch (k) { - (C.push(k), (I = !0)); - break; - } - return ( - w !== void 0 && - r?.kind !== 'itx' && - (I ? await this.transaction('rollback', {}, w) : await this.transaction('commit', {}, w)), - C - ); - } - case 'compacted': { - if (!t.every((R) => R.action === i)) throw new Error('All queries in a batch must have the same action'); - let C = await s.execute({ - plan: f.plan, - placeholderValues: A, - model: t[0].modelName, - operation: i, - batchIndex: void 0, - transaction: w, - customFetch: n?.(globalThis.fetch), - }); - return nl(C, f).map((R) => ({ data: { [i]: R } })); - } - } - } catch (w) { - throw this.#a(w, o); - } - } - metrics(t) { - throw new Error('Method not implemented.'); - } - #m(t) { - switch (t) { - case void 0: - return; - case 'ReadUncommitted': - return 'READ UNCOMMITTED'; - case 'ReadCommitted': - return 'READ COMMITTED'; - case 'RepeatableRead': - return 'REPEATABLE READ'; - case 'Serializable': - return 'SERIALIZABLE'; - case 'Snapshot': - return 'SNAPSHOT'; - default: - throw new X(`Inconsistent column data: Conversion failed: Invalid isolation level \`${t}\``, { - code: 'P2023', - clientVersion: this.config.clientVersion, - meta: { providedIsolationLevel: t }, - }); - } - } -}; -function Ru(e, t, r) { - return za({ - binaryTarget: void 0, - title: t, - version: e.config.clientVersion, - engineVersion: 'unknown', - database: e.config.activeProvider, - query: r, - }); -} -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var jt = class extends ge { - name = 'ForcedRetryError'; - code = 'P5001'; - constructor(t) { - super('This request must be retried', N(t, !0)); - } -}; -D(jt, 'ForcedRetryError'); -u(); -c(); -p(); -m(); -d(); -l(); -var at = class extends ge { - name = 'NotImplementedYetError'; - code = 'P5004'; - constructor(t, r) { - super(t, N(r, !1)); - } -}; -D(at, 'NotImplementedYetError'); -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var Q = class extends ge { - response; - constructor(t, r) { - (super(t, r), (this.response = r.response)); - let n = this.response.headers.get('prisma-request-id'); - if (n) { - let i = `(The request id was: ${n})`; - this.message = this.message + ' ' + i; - } - } -}; -var lt = class extends Q { - name = 'SchemaMissingError'; - code = 'P5005'; - constructor(t) { - super('Schema needs to be uploaded', N(t, !0)); - } -}; -D(lt, 'SchemaMissingError'); -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var ko = 'This request could not be understood by the server', - _r = class extends Q { - name = 'BadRequestError'; - code = 'P5000'; - constructor(t, r, n) { - (super(r || ko, N(t, !1)), n && (this.code = n)); - } - }; -D(_r, 'BadRequestError'); -u(); -c(); -p(); -m(); -d(); -l(); -var Mr = class extends Q { - name = 'HealthcheckTimeoutError'; - code = 'P5013'; - logs; - constructor(t, r) { - (super('Engine not started: healthcheck timeout', N(t, !0)), (this.logs = r)); - } -}; -D(Mr, 'HealthcheckTimeoutError'); -u(); -c(); -p(); -m(); -d(); -l(); -var Nr = class extends Q { - name = 'EngineStartupError'; - code = 'P5014'; - logs; - constructor(t, r, n) { - (super(r, N(t, !0)), (this.logs = n)); - } -}; -D(Nr, 'EngineStartupError'); -u(); -c(); -p(); -m(); -d(); -l(); -var Lr = class extends Q { - name = 'EngineVersionNotSupportedError'; - code = 'P5012'; - constructor(t) { - super('Engine version is not supported', N(t, !1)); - } -}; -D(Lr, 'EngineVersionNotSupportedError'); -u(); -c(); -p(); -m(); -d(); -l(); -var Oo = 'Request timed out', - Ur = class extends Q { - name = 'GatewayTimeoutError'; - code = 'P5009'; - constructor(t, r = Oo) { - super(r, N(t, !1)); - } - }; -D(Ur, 'GatewayTimeoutError'); -u(); -c(); -p(); -m(); -d(); -l(); -var Ef = 'Interactive transaction error', - Fr = class extends Q { - name = 'InteractiveTransactionError'; - code = 'P5015'; - constructor(t, r = Ef) { - super(r, N(t, !1)); - } - }; -D(Fr, 'InteractiveTransactionError'); -u(); -c(); -p(); -m(); -d(); -l(); -var xf = 'Request parameters are invalid', - Vr = class extends Q { - name = 'InvalidRequestError'; - code = 'P5011'; - constructor(t, r = xf) { - super(r, N(t, !1)); - } - }; -D(Vr, 'InvalidRequestError'); -u(); -c(); -p(); -m(); -d(); -l(); -var Do = 'Requested resource does not exist', - $r = class extends Q { - name = 'NotFoundError'; - code = 'P5003'; - constructor(t, r = Do) { - super(r, N(t, !1)); - } - }; -D($r, 'NotFoundError'); -u(); -c(); -p(); -m(); -d(); -l(); -var _o = 'Unknown server error', - Qt = class extends Q { - name = 'ServerError'; - code = 'P5006'; - logs; - constructor(t, r, n) { - (super(r || _o, N(t, !0)), (this.logs = n)); - } - }; -D(Qt, 'ServerError'); -u(); -c(); -p(); -m(); -d(); -l(); -var Mo = 'Unauthorized, check your connection string', - qr = class extends Q { - name = 'UnauthorizedError'; - code = 'P5007'; - constructor(t, r = Mo) { - super(r, N(t, !1)); - } - }; -D(qr, 'UnauthorizedError'); -u(); -c(); -p(); -m(); -d(); -l(); -var No = 'Usage exceeded, retry again later', - Br = class extends Q { - name = 'UsageExceededError'; - code = 'P5008'; - constructor(t, r = No) { - super(r, N(t, !0)); - } - }; -D(Br, 'UsageExceededError'); -async function Pf(e) { - let t; - try { - t = await e.text(); - } catch { - return { type: 'EmptyError' }; - } - try { - let r = JSON.parse(t); - if (typeof r == 'string') - switch (r) { - case 'InternalDataProxyError': - return { type: 'DataProxyError', body: r }; - default: - return { type: 'UnknownTextError', body: r }; - } - if (typeof r == 'object' && r !== null) { - if ('is_panic' in r && 'message' in r && 'error_code' in r) return { type: 'QueryEngineError', body: r }; - if ('EngineNotStarted' in r || 'InteractiveTransactionMisrouted' in r || 'InvalidRequestError' in r) { - let n = Object.values(r)[0].reason; - return typeof n == 'string' && !['SchemaMissing', 'EngineVersionNotSupported'].includes(n) - ? { type: 'UnknownJsonError', body: r } - : { type: 'DataProxyError', body: r }; - } - } - return { type: 'UnknownJsonError', body: r }; - } catch { - return t === '' ? { type: 'EmptyError' } : { type: 'UnknownTextError', body: t }; - } -} -async function jr(e, t) { - if (e.ok) return; - let r = { clientVersion: t, response: e }, - n = await Pf(e); - if (n.type === 'QueryEngineError') throw new X(n.body.message, { code: n.body.error_code, clientVersion: t }); - if (n.type === 'DataProxyError') { - if (n.body === 'InternalDataProxyError') throw new Qt(r, 'Internal Data Proxy error'); - if ('EngineNotStarted' in n.body) { - if (n.body.EngineNotStarted.reason === 'SchemaMissing') return new lt(r); - if (n.body.EngineNotStarted.reason === 'EngineVersionNotSupported') throw new Lr(r); - if ('EngineStartupError' in n.body.EngineNotStarted.reason) { - let { msg: i, logs: o } = n.body.EngineNotStarted.reason.EngineStartupError; - throw new Nr(r, i, o); - } - if ('KnownEngineStartupError' in n.body.EngineNotStarted.reason) { - let { msg: i, error_code: o } = n.body.EngineNotStarted.reason.KnownEngineStartupError; - throw new F(i, t, o); - } - if ('HealthcheckTimeout' in n.body.EngineNotStarted.reason) { - let { logs: i } = n.body.EngineNotStarted.reason.HealthcheckTimeout; - throw new Mr(r, i); - } - } - if ('InteractiveTransactionMisrouted' in n.body) { - let i = { - IDParseError: 'Could not parse interactive transaction ID', - NoQueryEngineFoundError: 'Could not find Query Engine for the specified host and transaction ID', - TransactionStartError: 'Could not start interactive transaction', - }; - throw new Fr(r, i[n.body.InteractiveTransactionMisrouted.reason]); - } - if ('InvalidRequestError' in n.body) throw new Vr(r, n.body.InvalidRequestError.reason); - } - if (e.status === 401 || e.status === 403) throw new qr(r, Ht(Mo, n)); - if (e.status === 404) return new $r(r, Ht(Do, n)); - if (e.status === 429) throw new Br(r, Ht(No, n)); - if (e.status === 504) throw new Ur(r, Ht(Oo, n)); - if (e.status >= 500) throw new Qt(r, Ht(_o, n)); - if (e.status >= 400) throw new _r(r, Ht(ko, n)); -} -function Ht(e, t) { - return t.type === 'EmptyError' ? e : `${e}: ${JSON.stringify(t)}`; -} -u(); -c(); -p(); -m(); -d(); -l(); -function Su(e) { - let t = Math.pow(2, e) * 50, - r = Math.ceil(Math.random() * t) - Math.ceil(t / 2), - n = t + r; - return new Promise((i) => setTimeout(() => i(n), n)); -} -u(); -c(); -p(); -m(); -d(); -l(); -var Ve = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; -function ku(e) { - let t = new TextEncoder().encode(e), - r = '', - n = t.byteLength, - i = n % 3, - o = n - i, - s, - a, - f, - w, - A; - for (let C = 0; C < o; C = C + 3) - ((A = (t[C] << 16) | (t[C + 1] << 8) | t[C + 2]), - (s = (A & 16515072) >> 18), - (a = (A & 258048) >> 12), - (f = (A & 4032) >> 6), - (w = A & 63), - (r += Ve[s] + Ve[a] + Ve[f] + Ve[w])); - return ( - i == 1 - ? ((A = t[o]), (s = (A & 252) >> 2), (a = (A & 3) << 4), (r += Ve[s] + Ve[a] + '==')) - : i == 2 && - ((A = (t[o] << 8) | t[o + 1]), - (s = (A & 64512) >> 10), - (a = (A & 1008) >> 4), - (f = (A & 15) << 2), - (r += Ve[s] + Ve[a] + Ve[f] + '=')), - r - ); -} -u(); -c(); -p(); -m(); -d(); -l(); -function Ou(e) { - if (!!e.generator?.previewFeatures.some((r) => r.toLowerCase().includes('metrics'))) - throw new F( - 'The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate', - e.clientVersion - ); -} -u(); -c(); -p(); -m(); -d(); -l(); -var Du = { - '@prisma/debug': 'workspace:*', - '@prisma/engines-version': '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - '@prisma/fetch-engine': 'workspace:*', - '@prisma/get-platform': 'workspace:*', -}; -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var Qr = class extends ge { - name = 'RequestError'; - code = 'P5010'; - constructor(t, r) { - super( - `Cannot fetch data from service: -${t}`, - N(r, !0) - ); - } -}; -D(Qr, 'RequestError'); -async function ut(e, t, r = (n) => n) { - let { clientVersion: n, ...i } = t, - o = r(fetch); - try { - return await o(e, i); - } catch (s) { - let a = s.message ?? 'Unknown error'; - throw new Qr(a, { clientVersion: n, cause: s }); - } -} -var vf = /^[1-9][0-9]*\.[0-9]+\.[0-9]+$/, - _u = K('prisma:client:dataproxyEngine'); -async function Af(e, t) { - let r = Du['@prisma/engines-version'], - n = t.clientVersion ?? 'unknown'; - if (g.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION || globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION) - return g.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION || globalThis.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION; - if (e.includes('accelerate') && n !== '0.0.0' && n !== 'in-memory') return n; - let [i, o] = n?.split('-') ?? []; - if (o === void 0 && vf.test(i)) return i; - if (o !== void 0 || n === '0.0.0' || n === 'in-memory') { - let [s] = r.split('-') ?? [], - [a, f, w] = s.split('.'), - A = Cf(`<=${a}.${f}.${w}`), - C = await ut(A, { clientVersion: n }); - if (!C.ok) - throw new Error( - `Failed to fetch stable Prisma version, unpkg.com status ${C.status} ${C.statusText}, response body: ${(await C.text()) || ''}` - ); - let I = await C.text(); - _u('length of body fetched from unpkg.com', I.length); - let R; - try { - R = JSON.parse(I); - } catch (L) { - throw (console.error('JSON.parse error: body fetched from unpkg.com: ', I), L); - } - return R.version; - } - throw new at('Only `major.minor.patch` versions are supported by Accelerate.', { clientVersion: n }); -} -async function Mu(e, t) { - let r = await Af(e, t); - return (_u('version', r), r); -} -function Cf(e) { - return encodeURI(`https://unpkg.com/prisma@${e}/package.json`); -} -var Nu = 3, - Hr = K('prisma:client:dataproxyEngine'), - Gr = class { - name = 'DataProxyEngine'; - inlineSchema; - inlineSchemaHash; - inlineDatasources; - config; - logEmitter; - env; - clientVersion; - engineHash; - tracingHelper; - remoteClientVersion; - host; - headerBuilder; - startPromise; - protocol; - constructor(t) { - (Ou(t), - (this.config = t), - (this.env = t.env), - (this.inlineSchema = ku(t.inlineSchema)), - (this.inlineDatasources = t.inlineDatasources), - (this.inlineSchemaHash = t.inlineSchemaHash), - (this.clientVersion = t.clientVersion), - (this.engineHash = t.engineVersion), - (this.logEmitter = t.logEmitter), - (this.tracingHelper = t.tracingHelper)); - } - apiKey() { - return this.headerBuilder.apiKey; - } - version() { - return this.engineHash; - } - async start() { - (this.startPromise !== void 0 && (await this.startPromise), - (this.startPromise = (async () => { - let { apiKey: t, url: r } = this.getURLAndAPIKey(); - ((this.host = r.host), - (this.protocol = r.protocol), - (this.headerBuilder = new qt({ - apiKey: t, - tracingHelper: this.tracingHelper, - logLevel: this.config.logLevel ?? 'error', - logQueries: this.config.logQueries, - engineHash: this.engineHash, - })), - (this.remoteClientVersion = await Mu(this.host, this.config)), - Hr('host', this.host), - Hr('protocol', this.protocol)); - })()), - await this.startPromise); - } - async stop() {} - propagateResponseExtensions(t) { - (t?.logs?.length && - t.logs.forEach((r) => { - switch (r.level) { - case 'debug': - case 'trace': - Hr(r); - break; - case 'error': - case 'warn': - case 'info': { - this.logEmitter.emit(r.level, { - timestamp: Bt(r.timestamp), - message: r.attributes.message ?? '', - target: r.target, - }); - break; - } - case 'query': { - this.logEmitter.emit('query', { - query: r.attributes.query ?? '', - timestamp: Bt(r.timestamp), - duration: r.attributes.duration_ms ?? 0, - params: r.attributes.params ?? '', - target: r.target, - }); - break; - } - default: - r.level; - } - }), - t?.traces?.length && this.tracingHelper.dispatchEngineSpans(t.traces)); - } - onBeforeExit() { - throw new Error('"beforeExit" hook is not applicable to the remote query engine'); - } - async url(t) { - return ( - await this.start(), - `${this.protocol}//${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}` - ); - } - async uploadSchema() { - let t = { name: 'schemaUpload', internal: !0 }; - return this.tracingHelper.runInChildSpan(t, async () => { - let r = await ut(await this.url('schema'), { - method: 'PUT', - headers: this.headerBuilder.build(), - body: this.inlineSchema, - clientVersion: this.clientVersion, - }); - r.ok || Hr('schema response status', r.status); - let n = await jr(r, this.clientVersion); - if (n) - throw ( - this.logEmitter.emit('warn', { - message: `Error while uploading schema: ${n.message}`, - timestamp: new Date(), - target: '', - }), - n - ); - this.logEmitter.emit('info', { - message: `Schema (re)uploaded (hash: ${this.inlineSchemaHash})`, - timestamp: new Date(), - target: '', - }); - }); - } - request(t, { traceparent: r, interactiveTransaction: n, customDataProxyFetch: i }) { - return this.requestInternal({ body: t, traceparent: r, interactiveTransaction: n, customDataProxyFetch: i }); - } - async requestBatch(t, { traceparent: r, transaction: n, customDataProxyFetch: i }) { - let o = n?.kind === 'itx' ? n.options : void 0, - s = St(t, n); - return ( - await this.requestInternal({ body: s, customDataProxyFetch: i, interactiveTransaction: o, traceparent: r }) - ).map( - (f) => ( - f.extensions && this.propagateResponseExtensions(f.extensions), - 'errors' in f ? this.convertProtocolErrorsToClientError(f.errors) : f - ) - ); - } - requestInternal({ body: t, traceparent: r, customDataProxyFetch: n, interactiveTransaction: i }) { - return this.withRetry({ - actionGerund: 'querying', - callback: async ({ logHttpCall: o }) => { - let s = i ? `${i.payload.endpoint}/graphql` : await this.url('graphql'); - o(s); - let a = await ut( - s, - { - method: 'POST', - headers: this.headerBuilder.build({ traceparent: r, transactionId: i?.id }), - body: JSON.stringify(t), - clientVersion: this.clientVersion, - }, - n - ); - (a.ok || Hr('graphql response status', a.status), await this.handleError(await jr(a, this.clientVersion))); - let f = await a.json(); - if ((f.extensions && this.propagateResponseExtensions(f.extensions), 'errors' in f)) - throw this.convertProtocolErrorsToClientError(f.errors); - return 'batchResult' in f ? f.batchResult : f; - }, - }); - } - async transaction(t, r, n) { - let i = { start: 'starting', commit: 'committing', rollback: 'rolling back' }; - return this.withRetry({ - actionGerund: `${i[t]} transaction`, - callback: async ({ logHttpCall: o }) => { - if (t === 'start') { - let s = JSON.stringify({ max_wait: n.maxWait, timeout: n.timeout, isolation_level: n.isolationLevel }), - a = await this.url('transaction/start'); - o(a); - let f = await ut(a, { - method: 'POST', - headers: this.headerBuilder.build({ traceparent: r.traceparent }), - body: s, - clientVersion: this.clientVersion, - }); - await this.handleError(await jr(f, this.clientVersion)); - let w = await f.json(), - { extensions: A } = w; - A && this.propagateResponseExtensions(A); - let C = w.id, - I = w['data-proxy'].endpoint; - return { id: C, payload: { endpoint: I } }; - } else { - let s = `${n.payload.endpoint}/${t}`; - o(s); - let a = await ut(s, { - method: 'POST', - headers: this.headerBuilder.build({ traceparent: r.traceparent }), - clientVersion: this.clientVersion, - }); - await this.handleError(await jr(a, this.clientVersion)); - let f = await a.json(), - { extensions: w } = f; - w && this.propagateResponseExtensions(w); - return; - } - }, - }); - } - getURLAndAPIKey() { - return ri({ - clientVersion: this.clientVersion, - env: this.env, - inlineDatasources: this.inlineDatasources, - overrideDatasources: this.config.overrideDatasources, - }); - } - metrics() { - throw new at('Metrics are not yet supported for Accelerate', { clientVersion: this.clientVersion }); - } - async withRetry(t) { - for (let r = 0; ; r++) { - let n = (i) => { - this.logEmitter.emit('info', { message: `Calling ${i} (n=${r})`, timestamp: new Date(), target: '' }); - }; - try { - return await t.callback({ logHttpCall: n }); - } catch (i) { - if (!(i instanceof ge) || !i.isRetryable) throw i; - if (r >= Nu) throw i instanceof jt ? i.cause : i; - this.logEmitter.emit('warn', { - message: `Attempt ${r + 1}/${Nu} failed for ${t.actionGerund}: ${i.message ?? '(unknown)'}`, - timestamp: new Date(), - target: '', - }); - let o = await Su(r); - this.logEmitter.emit('warn', { message: `Retrying after ${o}ms`, timestamp: new Date(), target: '' }); - } - } - } - async handleError(t) { - if (t instanceof lt) throw (await this.uploadSchema(), new jt({ clientVersion: this.clientVersion, cause: t })); - if (t) throw t; - } - convertProtocolErrorsToClientError(t) { - return t.length === 1 - ? _n(t[0], this.config.clientVersion, this.config.activeProvider) - : new ne(JSON.stringify(t), { clientVersion: this.config.clientVersion }); - } - applyPendingMigrations() { - throw new Error('Method not implemented.'); - } - }; -u(); -c(); -p(); -m(); -d(); -l(); -function Lu({ url: e, adapter: t, copyEngine: r, targetBuildType: n }) { - let i = [], - o = [], - s = (k) => { - i.push({ _tag: 'warning', value: k }); - }, - a = (k) => { - let M = k.join(` -`); - o.push({ _tag: 'error', value: M }); - }, - f = !!e?.startsWith('prisma://'), - w = un(e), - A = !!t, - C = f || w; - !A && - r && - C && - s([ - 'recommend--no-engine', - 'In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)', - ]); - let I = C || !r; - A && - (I || n === 'edge') && - (n === 'edge' - ? a([ - 'Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.', - 'Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor.', - ]) - : r - ? f && - a([ - 'Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.', - 'Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor.', - ]) - : a([ - 'Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.', - 'Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter.', - ])); - let R = { accelerate: I, ppg: w, driverAdapters: A }; - function L(k) { - return k.length > 0; - } - return L(o) - ? { ok: !1, diagnostics: { warnings: i, errors: o }, isUsing: R } - : { ok: !0, diagnostics: { warnings: i }, isUsing: R }; -} -function Uu({ copyEngine: e = !0 }, t) { - let r; - try { - r = $t({ - inlineDatasources: t.inlineDatasources, - overrideDatasources: t.overrideDatasources, - env: { ...t.env, ...g.env }, - clientVersion: t.clientVersion, - }); - } catch {} - let { - ok: n, - isUsing: i, - diagnostics: o, - } = Lu({ url: r, adapter: t.adapter, copyEngine: e, targetBuildType: 'wasm-compiler-edge' }); - for (let C of o.warnings) tr(...C.value); - if (!n) { - let C = o.errors[0]; - throw new ie(C.value, { clientVersion: t.clientVersion }); - } - let s = gt(t.generator), - a = s === 'library', - f = s === 'binary', - w = s === 'client', - A = (i.accelerate || i.ppg) && !i.driverAdapters; - if (w) return new Dr(t, A); - if (i.accelerate) return new Gr(t); - (i.driverAdapters, i.accelerate); - { - let C = [ - `PrismaClient failed to initialize because it wasn't configured to run in this environment (${Ot().prettyName}).`, - 'In order to run Prisma Client in an edge runtime, you will need to configure one of the following options:', - '- Enable Driver Adapters: https://pris.ly/d/driver-adapters', - '- Enable Accelerate: https://pris.ly/d/accelerate', - ]; - throw new ie( - C.join(` -`), - { clientVersion: t.clientVersion } - ); - } - return 'wasm-compiler-edge'; -} -u(); -c(); -p(); -m(); -d(); -l(); -function ii({ generator: e }) { - return e?.previewFeatures ?? []; -} -u(); -c(); -p(); -m(); -d(); -l(); -var Fu = (e) => ({ command: e }); -u(); -c(); -p(); -m(); -d(); -l(); -u(); -c(); -p(); -m(); -d(); -l(); -var Vu = (e) => e.strings.reduce((t, r, n) => `${t}@P${n}${r}`); -u(); -c(); -p(); -m(); -d(); -l(); -l(); -function Gt(e) { - try { - return $u(e, 'fast'); - } catch { - return $u(e, 'slow'); - } -} -function $u(e, t) { - return JSON.stringify(e.map((r) => Bu(r, t))); -} -function Bu(e, t) { - if (Array.isArray(e)) return e.map((r) => Bu(r, t)); - if (typeof e == 'bigint') return { prisma__type: 'bigint', prisma__value: e.toString() }; - if (ht(e)) return { prisma__type: 'date', prisma__value: e.toJSON() }; - if (ae.isDecimal(e)) return { prisma__type: 'decimal', prisma__value: e.toJSON() }; - if (y.isBuffer(e)) return { prisma__type: 'bytes', prisma__value: e.toString('base64') }; - if (Rf(e)) return { prisma__type: 'bytes', prisma__value: y.from(e).toString('base64') }; - if (ArrayBuffer.isView(e)) { - let { buffer: r, byteOffset: n, byteLength: i } = e; - return { prisma__type: 'bytes', prisma__value: y.from(r, n, i).toString('base64') }; - } - return typeof e == 'object' && t === 'slow' ? ju(e) : e; -} -function Rf(e) { - return e instanceof ArrayBuffer || e instanceof SharedArrayBuffer - ? !0 - : typeof e == 'object' && e !== null - ? e[Symbol.toStringTag] === 'ArrayBuffer' || e[Symbol.toStringTag] === 'SharedArrayBuffer' - : !1; -} -function ju(e) { - if (typeof e != 'object' || e === null) return e; - if (typeof e.toJSON == 'function') return e.toJSON(); - if (Array.isArray(e)) return e.map(qu); - let t = {}; - for (let r of Object.keys(e)) t[r] = qu(e[r]); - return t; -} -function qu(e) { - return typeof e == 'bigint' ? e.toString() : ju(e); -} -var If = /^(\s*alter\s)/i, - Qu = K('prisma:client'); -function Lo(e, t, r, n) { - if (!(e !== 'postgresql' && e !== 'cockroachdb') && r.length > 0 && If.exec(t)) - throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`); -} -var Uo = - ({ clientMethod: e, activeProvider: t }) => - (r) => { - let n = '', - i; - if (Sn(r)) ((n = r.sql), (i = { values: Gt(r.values), __prismaRawParameters__: !0 })); - else if (Array.isArray(r)) { - let [o, ...s] = r; - ((n = o), (i = { values: Gt(s || []), __prismaRawParameters__: !0 })); - } else - switch (t) { - case 'sqlite': - case 'mysql': { - ((n = r.sql), (i = { values: Gt(r.values), __prismaRawParameters__: !0 })); - break; - } - case 'cockroachdb': - case 'postgresql': - case 'postgres': { - ((n = r.text), (i = { values: Gt(r.values), __prismaRawParameters__: !0 })); - break; - } - case 'sqlserver': { - ((n = Vu(r)), (i = { values: Gt(r.values), __prismaRawParameters__: !0 })); - break; - } - default: - throw new Error(`The ${t} provider does not support ${e}`); - } - return (i?.values ? Qu(`prisma.${e}(${n}, ${i.values})`) : Qu(`prisma.${e}(${n})`), { query: n, parameters: i }); - }, - Hu = { - requestArgsToMiddlewareArgs(e) { - return [e.strings, ...e.values]; - }, - middlewareArgsToRequestArgs(e) { - let [t, ...r] = e; - return new fe(t, r); - }, - }, - Gu = { - requestArgsToMiddlewareArgs(e) { - return [e]; - }, - middlewareArgsToRequestArgs(e) { - return e[0]; - }, - }; -u(); -c(); -p(); -m(); -d(); -l(); -function Fo(e) { - return function (r, n) { - let i, - o = (s = e) => { - try { - return s === void 0 || s?.kind === 'itx' ? (i ??= Ju(r(s))) : Ju(r(s)); - } catch (a) { - return Promise.reject(a); - } - }; - return { - get spec() { - return n; - }, - then(s, a) { - return o().then(s, a); - }, - catch(s) { - return o().catch(s); - }, - finally(s) { - return o().finally(s); - }, - requestTransaction(s) { - let a = o(s); - return a.requestTransaction ? a.requestTransaction(s) : a; - }, - [Symbol.toStringTag]: 'PrismaPromise', - }; - }; -} -function Ju(e) { - return typeof e.then == 'function' ? e : Promise.resolve(e); -} -u(); -c(); -p(); -m(); -d(); -l(); -var Sf = Ei.split('.')[0], - kf = { - isEnabled() { - return !1; - }, - getTraceParent() { - return '00-10-10-00'; - }, - dispatchEngineSpans() {}, - getActiveContext() {}, - runInChildSpan(e, t) { - return t(); - }, - }, - Vo = class { - isEnabled() { - return this.getGlobalTracingHelper().isEnabled(); - } - getTraceParent(t) { - return this.getGlobalTracingHelper().getTraceParent(t); - } - dispatchEngineSpans(t) { - return this.getGlobalTracingHelper().dispatchEngineSpans(t); - } - getActiveContext() { - return this.getGlobalTracingHelper().getActiveContext(); - } - runInChildSpan(t, r) { - return this.getGlobalTracingHelper().runInChildSpan(t, r); - } - getGlobalTracingHelper() { - let t = globalThis[`V${Sf}_PRISMA_INSTRUMENTATION`], - r = globalThis.PRISMA_INSTRUMENTATION; - return t?.helper ?? r?.helper ?? kf; - } - }; -function Wu() { - return new Vo(); -} -u(); -c(); -p(); -m(); -d(); -l(); -function Ku(e, t = () => {}) { - let r, - n = new Promise((i) => (r = i)); - return { - then(i) { - return (--e === 0 && r(t()), i?.(n)); - }, - }; -} -u(); -c(); -p(); -m(); -d(); -l(); -function zu(e) { - return typeof e == 'string' - ? e - : e.reduce( - (t, r) => { - let n = typeof r == 'string' ? r : r.level; - return n === 'query' ? t : t && (r === 'info' || t === 'info') ? 'info' : n; - }, - void 0 - ); -} -u(); -c(); -p(); -m(); -d(); -l(); -var Zu = Ae(Ai()); -u(); -c(); -p(); -m(); -d(); -l(); -function oi(e) { - return typeof e.batchRequestIdx == 'number'; -} -u(); -c(); -p(); -m(); -d(); -l(); -function Yu(e) { - if (e.action !== 'findUnique' && e.action !== 'findUniqueOrThrow') return; - let t = []; - return ( - e.modelName && t.push(e.modelName), - e.query.arguments && t.push($o(e.query.arguments)), - t.push($o(e.query.selection)), - t.join('') - ); -} -function $o(e) { - return `(${Object.keys(e) - .sort() - .map((r) => { - let n = e[r]; - return typeof n == 'object' && n !== null ? `(${r} ${$o(n)})` : r; - }) - .join(' ')})`; -} -u(); -c(); -p(); -m(); -d(); -l(); -var Of = { - aggregate: !1, - aggregateRaw: !1, - createMany: !0, - createManyAndReturn: !0, - createOne: !0, - deleteMany: !0, - deleteOne: !0, - executeRaw: !0, - findFirst: !1, - findFirstOrThrow: !1, - findMany: !1, - findRaw: !1, - findUnique: !1, - findUniqueOrThrow: !1, - groupBy: !1, - queryRaw: !1, - runCommandRaw: !0, - updateMany: !0, - updateManyAndReturn: !0, - updateOne: !0, - upsertOne: !0, -}; -function qo(e) { - return Of[e]; -} -u(); -c(); -p(); -m(); -d(); -l(); -var si = class { - constructor(t) { - this.options = t; - this.batches = {}; - } - batches; - tickActive = !1; - request(t) { - let r = this.options.batchBy(t); - return r - ? (this.batches[r] || - ((this.batches[r] = []), - this.tickActive || - ((this.tickActive = !0), - g.nextTick(() => { - (this.dispatchBatches(), (this.tickActive = !1)); - }))), - new Promise((n, i) => { - this.batches[r].push({ request: t, resolve: n, reject: i }); - })) - : this.options.singleLoader(t); - } - dispatchBatches() { - for (let t in this.batches) { - let r = this.batches[t]; - (delete this.batches[t], - r.length === 1 - ? this.options - .singleLoader(r[0].request) - .then((n) => { - n instanceof Error ? r[0].reject(n) : r[0].resolve(n); - }) - .catch((n) => { - r[0].reject(n); - }) - : (r.sort((n, i) => this.options.batchOrder(n.request, i.request)), - this.options - .batchLoader(r.map((n) => n.request)) - .then((n) => { - if (n instanceof Error) for (let i = 0; i < r.length; i++) r[i].reject(n); - else - for (let i = 0; i < r.length; i++) { - let o = n[i]; - o instanceof Error ? r[i].reject(o) : r[i].resolve(o); - } - }) - .catch((n) => { - for (let i = 0; i < r.length; i++) r[i].reject(n); - }))); - } - } - get [Symbol.toStringTag]() { - return 'DataLoader'; - } -}; -u(); -c(); -p(); -m(); -d(); -l(); -l(); -function ct(e, t) { - if (t === null) return t; - switch (e) { - case 'bigint': - return BigInt(t); - case 'bytes': { - let { buffer: r, byteOffset: n, byteLength: i } = y.from(t, 'base64'); - return new Uint8Array(r, n, i); - } - case 'decimal': - return new ae(t); - case 'datetime': - case 'date': - return new Date(t); - case 'time': - return new Date(`1970-01-01T${t}Z`); - case 'bigint-array': - return t.map((r) => ct('bigint', r)); - case 'bytes-array': - return t.map((r) => ct('bytes', r)); - case 'decimal-array': - return t.map((r) => ct('decimal', r)); - case 'datetime-array': - return t.map((r) => ct('datetime', r)); - case 'date-array': - return t.map((r) => ct('date', r)); - case 'time-array': - return t.map((r) => ct('time', r)); - default: - return t; - } -} -function ai(e) { - let t = [], - r = Df(e); - for (let n = 0; n < e.rows.length; n++) { - let i = e.rows[n], - o = { ...r }; - for (let s = 0; s < i.length; s++) o[e.columns[s]] = ct(e.types[s], i[s]); - t.push(o); - } - return t; -} -function Df(e) { - let t = {}; - for (let r = 0; r < e.columns.length; r++) t[e.columns[r]] = null; - return t; -} -var _f = K('prisma:client:request_handler'), - li = class { - client; - dataloader; - logEmitter; - constructor(t, r) { - ((this.logEmitter = r), - (this.client = t), - (this.dataloader = new si({ - batchLoader: Va(async ({ requests: n, customDataProxyFetch: i }) => { - let { transaction: o, otelParentCtx: s } = n[0], - a = n.map((C) => C.protocolQuery), - f = this.client._tracingHelper.getTraceParent(s), - w = n.some((C) => qo(C.protocolQuery.action)); - return ( - await this.client._engine.requestBatch(a, { - traceparent: f, - transaction: Mf(o), - containsWrite: w, - customDataProxyFetch: i, - }) - ).map((C, I) => { - if (C instanceof Error) return C; - try { - return this.mapQueryEngineResult(n[I], C); - } catch (R) { - return R; - } - }); - }), - singleLoader: async (n) => { - let i = n.transaction?.kind === 'itx' ? Xu(n.transaction) : void 0, - o = await this.client._engine.request(n.protocolQuery, { - traceparent: this.client._tracingHelper.getTraceParent(), - interactiveTransaction: i, - isWrite: qo(n.protocolQuery.action), - customDataProxyFetch: n.customDataProxyFetch, - }); - return this.mapQueryEngineResult(n, o); - }, - batchBy: (n) => (n.transaction?.id ? `transaction-${n.transaction.id}` : Yu(n.protocolQuery)), - batchOrder(n, i) { - return n.transaction?.kind === 'batch' && i.transaction?.kind === 'batch' - ? n.transaction.index - i.transaction.index - : 0; - }, - }))); - } - async request(t) { - try { - return await this.dataloader.request(t); - } catch (r) { - let { clientMethod: n, callsite: i, transaction: o, args: s, modelName: a } = t; - this.handleAndLogRequestError({ - error: r, - clientMethod: n, - callsite: i, - transaction: o, - args: s, - modelName: a, - globalOmit: t.globalOmit, - }); - } - } - mapQueryEngineResult({ dataPath: t, unpacker: r }, n) { - let i = n?.data, - o = this.unpack(i, t, r); - return g.env.PRISMA_CLIENT_GET_TIME ? { data: o } : o; - } - handleAndLogRequestError(t) { - try { - this.handleRequestError(t); - } catch (r) { - throw ( - this.logEmitter && - this.logEmitter.emit('error', { message: r.message, target: t.clientMethod, timestamp: new Date() }), - r - ); - } - } - handleRequestError({ - error: t, - clientMethod: r, - callsite: n, - transaction: i, - args: o, - modelName: s, - globalOmit: a, - }) { - if ((_f(t), Nf(t, i))) throw t; - if (t instanceof X && Lf(t)) { - let w = ec(t.meta); - Tn({ - args: o, - errors: [w], - callsite: n, - errorFormat: this.client._errorFormat, - originalMethod: r, - clientVersion: this.client._clientVersion, - globalOmit: a, - }); - } - let f = t.message; - if ( - (n && - (f = dn({ - callsite: n, - originalMethod: r, - isPanic: t.isPanic, - showColors: this.client._errorFormat === 'pretty', - message: f, - })), - (f = this.sanitizeMessage(f)), - t.code) - ) { - let w = s ? { modelName: s, ...t.meta } : t.meta; - throw new X(f, { - code: t.code, - clientVersion: this.client._clientVersion, - meta: w, - batchRequestIdx: t.batchRequestIdx, - }); - } else { - if (t.isPanic) throw new le(f, this.client._clientVersion); - if (t instanceof ne) - throw new ne(f, { clientVersion: this.client._clientVersion, batchRequestIdx: t.batchRequestIdx }); - if (t instanceof F) throw new F(f, this.client._clientVersion); - if (t instanceof le) throw new le(f, this.client._clientVersion); - } - throw ((t.clientVersion = this.client._clientVersion), t); - } - sanitizeMessage(t) { - return this.client._errorFormat && this.client._errorFormat !== 'pretty' ? (0, Zu.default)(t) : t; - } - unpack(t, r, n) { - if (!t || (t.data && (t = t.data), !t)) return t; - let i = Object.keys(t)[0], - o = Object.values(t)[0], - s = r.filter((w) => w !== 'select' && w !== 'include'), - a = qi(o, s), - f = i === 'queryRaw' ? ai(a) : Qe(a); - return n ? n(f) : f; - } - get [Symbol.toStringTag]() { - return 'RequestHandler'; - } - }; -function Mf(e) { - if (e) { - if (e.kind === 'batch') return { kind: 'batch', options: { isolationLevel: e.isolationLevel } }; - if (e.kind === 'itx') return { kind: 'itx', options: Xu(e) }; - Ne(e, 'Unknown transaction kind'); - } -} -function Xu(e) { - return { id: e.id, payload: e.payload }; -} -function Nf(e, t) { - return oi(e) && t?.kind === 'batch' && e.batchRequestIdx !== t.index; -} -function Lf(e) { - return e.code === 'P2009' || e.code === 'P2012'; -} -function ec(e) { - if (e.kind === 'Union') return { kind: 'Union', errors: e.errors.map(ec) }; - if (Array.isArray(e.selectionPath)) { - let [, ...t] = e.selectionPath; - return { ...e, selectionPath: t }; - } - return e; -} -u(); -c(); -p(); -m(); -d(); -l(); -var tc = Zn; -u(); -c(); -p(); -m(); -d(); -l(); -var sc = Ae(Si()); -u(); -c(); -p(); -m(); -d(); -l(); -var V = class extends Error { - constructor(t) { - (super( - t + - ` -Read more at https://pris.ly/d/client-constructor` - ), - (this.name = 'PrismaClientConstructorValidationError')); - } - get [Symbol.toStringTag]() { - return 'PrismaClientConstructorValidationError'; - } -}; -D(V, 'PrismaClientConstructorValidationError'); -var rc = ['datasources', 'datasourceUrl', 'errorFormat', 'adapter', 'log', 'transactionOptions', 'omit', '__internal'], - nc = ['pretty', 'colorless', 'minimal'], - ic = ['info', 'query', 'warn', 'error'], - Uf = { - datasources: (e, { datasourceNames: t }) => { - if (e) { - if (typeof e != 'object' || Array.isArray(e)) - throw new V(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`); - for (let [r, n] of Object.entries(e)) { - if (!t.includes(r)) { - let i = Jt(r, t) || ` Available datasources: ${t.join(', ')}`; - throw new V(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`); - } - if (typeof n != 'object' || Array.isArray(n)) - throw new V(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`); - if (n && typeof n == 'object') - for (let [i, o] of Object.entries(n)) { - if (i !== 'url') - throw new V(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`); - if (typeof o != 'string') - throw new V(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`); - } - } - } - }, - adapter: (e, t) => { - if (!e && gt(t.generator) === 'client') - throw new V('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.'); - if (e === null) return; - if (e === void 0) - throw new V('"adapter" property must not be undefined, use null to conditionally disable driver adapters.'); - if (!ii(t).includes('driverAdapters')) - throw new V( - '"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.' - ); - if (gt(t.generator) === 'binary') - throw new V( - 'Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.' - ); - }, - datasourceUrl: (e) => { - if (typeof e < 'u' && typeof e != 'string') - throw new V(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`); - }, - errorFormat: (e) => { - if (e) { - if (typeof e != 'string') - throw new V(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`); - if (!nc.includes(e)) { - let t = Jt(e, nc); - throw new V(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`); - } - } - }, - log: (e) => { - if (!e) return; - if (!Array.isArray(e)) - throw new V(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`); - function t(r) { - if (typeof r == 'string' && !ic.includes(r)) { - let n = Jt(r, ic); - throw new V(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`); - } - } - for (let r of e) { - t(r); - let n = { - level: t, - emit: (i) => { - let o = ['stdout', 'event']; - if (!o.includes(i)) { - let s = Jt(i, o); - throw new V( - `Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}` - ); - } - }, - }; - if (r && typeof r == 'object') - for (let [i, o] of Object.entries(r)) - if (n[i]) n[i](o); - else throw new V(`Invalid property ${i} for "log" provided to PrismaClient constructor`); - } - }, - transactionOptions: (e) => { - if (!e) return; - let t = e.maxWait; - if (t != null && t <= 0) - throw new V( - `Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0` - ); - let r = e.timeout; - if (r != null && r <= 0) - throw new V( - `Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0` - ); - }, - omit: (e, t) => { - if (typeof e != 'object') throw new V('"omit" option is expected to be an object.'); - if (e === null) throw new V('"omit" option can not be `null`'); - let r = []; - for (let [n, i] of Object.entries(e)) { - let o = Vf(n, t.runtimeDataModel); - if (!o) { - r.push({ kind: 'UnknownModel', modelKey: n }); - continue; - } - for (let [s, a] of Object.entries(i)) { - let f = o.fields.find((w) => w.name === s); - if (!f) { - r.push({ kind: 'UnknownField', modelKey: n, fieldName: s }); - continue; - } - if (f.relationName) { - r.push({ kind: 'RelationInOmit', modelKey: n, fieldName: s }); - continue; - } - typeof a != 'boolean' && r.push({ kind: 'InvalidFieldValue', modelKey: n, fieldName: s }); - } - } - if (r.length > 0) throw new V($f(e, r)); - }, - __internal: (e) => { - if (!e) return; - let t = ['debug', 'engine', 'configOverride']; - if (typeof e != 'object') - throw new V(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`); - for (let [r] of Object.entries(e)) - if (!t.includes(r)) { - let n = Jt(r, t); - throw new V( - `Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}` - ); - } - }, - }; -function ac(e, t) { - for (let [r, n] of Object.entries(e)) { - if (!rc.includes(r)) { - let i = Jt(r, rc); - throw new V(`Unknown property ${r} provided to PrismaClient constructor.${i}`); - } - Uf[r](n, t); - } - if (e.datasourceUrl && e.datasources) - throw new V('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them'); -} -function Jt(e, t) { - if (t.length === 0 || typeof e != 'string') return ''; - let r = Ff(e, t); - return r ? ` Did you mean "${r}"?` : ''; -} -function Ff(e, t) { - if (t.length === 0) return null; - let r = t.map((i) => ({ value: i, distance: (0, sc.default)(e, i) })); - r.sort((i, o) => (i.distance < o.distance ? -1 : 1)); - let n = r[0]; - return n.distance < 3 ? n.value : null; -} -function Vf(e, t) { - return oc(t.models, e) ?? oc(t.types, e); -} -function oc(e, t) { - let r = Object.keys(e).find((n) => qe(n) === t); - if (r) return e[r]; -} -function $f(e, t) { - let r = At(e); - for (let o of t) - switch (o.kind) { - case 'UnknownModel': - (r.arguments.getField(o.modelKey)?.markAsError(), - r.addErrorMessage(() => `Unknown model name: ${o.modelKey}.`)); - break; - case 'UnknownField': - (r.arguments.getDeepField([o.modelKey, o.fieldName])?.markAsError(), - r.addErrorMessage(() => `Model "${o.modelKey}" does not have a field named "${o.fieldName}".`)); - break; - case 'RelationInOmit': - (r.arguments.getDeepField([o.modelKey, o.fieldName])?.markAsError(), - r.addErrorMessage(() => 'Relations are already excluded by default and can not be specified in "omit".')); - break; - case 'InvalidFieldValue': - (r.arguments.getDeepFieldValue([o.modelKey, o.fieldName])?.markAsError(), - r.addErrorMessage(() => 'Omit field option value must be a boolean.')); - break; - } - let { message: n, args: i } = Pn(r, 'colorless'); - return `Error validating "omit" option: - -${i} - -${n}`; -} -u(); -c(); -p(); -m(); -d(); -l(); -function lc(e) { - return e.length === 0 - ? Promise.resolve([]) - : new Promise((t, r) => { - let n = new Array(e.length), - i = null, - o = !1, - s = 0, - a = () => { - o || (s++, s === e.length && ((o = !0), i ? r(i) : t(n))); - }, - f = (w) => { - o || ((o = !0), r(w)); - }; - for (let w = 0; w < e.length; w++) - e[w].then( - (A) => { - ((n[w] = A), a()); - }, - (A) => { - if (!oi(A)) { - f(A); - return; - } - A.batchRequestIdx === w ? f(A) : (i || (i = A), a()); - } - ); - }); -} -var We = K('prisma:client'); -typeof globalThis == 'object' && (globalThis.NODE_CLIENT = !0); -var qf = { requestArgsToMiddlewareArgs: (e) => e, middlewareArgsToRequestArgs: (e) => e }, - Bf = Symbol.for('prisma.client.transaction.id'), - jf = { - id: 0, - nextId() { - return ++this.id; - }, - }; -function pc(e) { - class t { - _originalClient = this; - _runtimeDataModel; - _requestHandler; - _connectionPromise; - _disconnectionPromise; - _engineConfig; - _accelerateEngineConfig; - _clientVersion; - _errorFormat; - _tracingHelper; - _previewFeatures; - _activeProvider; - _globalOmit; - _extensions; - _engine; - _appliedParent; - _createPrismaPromise = Fo(); - constructor(n) { - ((e = n?.__internal?.configOverride?.(e) ?? e), Qa(e), n && ac(n, e)); - let i = new kn().on('error', () => {}); - ((this._extensions = Ct.empty()), - (this._previewFeatures = ii(e)), - (this._clientVersion = e.clientVersion ?? tc), - (this._activeProvider = e.activeProvider), - (this._globalOmit = n?.omit), - (this._tracingHelper = Wu())); - let o = e.relativeEnvPaths && { - rootEnvPath: e.relativeEnvPaths.rootEnvPath && rn.resolve(e.dirname, e.relativeEnvPaths.rootEnvPath), - schemaEnvPath: e.relativeEnvPaths.schemaEnvPath && rn.resolve(e.dirname, e.relativeEnvPaths.schemaEnvPath), - }, - s; - if (n?.adapter) { - s = n.adapter; - let f = e.activeProvider === 'postgresql' || e.activeProvider === 'cockroachdb' ? 'postgres' : e.activeProvider; - if (s.provider !== f) - throw new F( - `The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${f}\` specified in the Prisma schema.`, - this._clientVersion - ); - if (n.datasources || n.datasourceUrl !== void 0) - throw new F( - 'Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.', - this._clientVersion - ); - } - let a = e.injectableEdgeEnv?.(); - try { - let f = n ?? {}, - w = f.__internal ?? {}, - A = w.debug === !0; - A && K.enable('prisma:client'); - let C = rn.resolve(e.dirname, e.relativePath); - (ys.existsSync(C) || (C = e.dirname), - We('dirname', e.dirname), - We('relativePath', e.relativePath), - We('cwd', C)); - let I = w.engine || {}; - if ( - (f.errorFormat - ? (this._errorFormat = f.errorFormat) - : g.env.NODE_ENV === 'production' - ? (this._errorFormat = 'minimal') - : g.env.NO_COLOR - ? (this._errorFormat = 'colorless') - : (this._errorFormat = 'colorless'), - (this._runtimeDataModel = e.runtimeDataModel), - (this._engineConfig = { - cwd: C, - dirname: e.dirname, - enableDebugLogs: A, - allowTriggerPanic: I.allowTriggerPanic, - prismaPath: I.binaryPath ?? void 0, - engineEndpoint: I.endpoint, - generator: e.generator, - showColors: this._errorFormat === 'pretty', - logLevel: f.log && zu(f.log), - logQueries: - f.log && - !!(typeof f.log == 'string' - ? f.log === 'query' - : f.log.find((R) => (typeof R == 'string' ? R === 'query' : R.level === 'query'))), - env: a?.parsed ?? {}, - flags: [], - engineWasm: e.engineWasm, - compilerWasm: e.compilerWasm, - clientVersion: e.clientVersion, - engineVersion: e.engineVersion, - previewFeatures: this._previewFeatures, - activeProvider: e.activeProvider, - inlineSchema: e.inlineSchema, - overrideDatasources: Ha(f, e.datasourceNames), - inlineDatasources: e.inlineDatasources, - inlineSchemaHash: e.inlineSchemaHash, - tracingHelper: this._tracingHelper, - transactionOptions: { - maxWait: f.transactionOptions?.maxWait ?? 2e3, - timeout: f.transactionOptions?.timeout ?? 5e3, - isolationLevel: f.transactionOptions?.isolationLevel, - }, - logEmitter: i, - isBundled: e.isBundled, - adapter: s, - }), - (this._accelerateEngineConfig = { - ...this._engineConfig, - accelerateUtils: { - resolveDatasourceUrl: $t, - getBatchRequestPayload: St, - prismaGraphQLToJSError: _n, - PrismaClientUnknownRequestError: ne, - PrismaClientInitializationError: F, - PrismaClientKnownRequestError: X, - debug: K('prisma:client:accelerateEngine'), - engineVersion: cc.version, - clientVersion: e.clientVersion, - }, - }), - We('clientVersion', e.clientVersion), - (this._engine = Uu(e, this._engineConfig)), - (this._requestHandler = new li(this, i)), - f.log) - ) - for (let R of f.log) { - let L = typeof R == 'string' ? R : R.emit === 'stdout' ? R.level : null; - L && - this.$on(L, (k) => { - er.log(`${er.tags[L] ?? ''}`, k.message || k.query); - }); - } - } catch (f) { - throw ((f.clientVersion = this._clientVersion), f); - } - return (this._appliedParent = yr(this)); - } - get [Symbol.toStringTag]() { - return 'PrismaClient'; - } - $on(n, i) { - return (n === 'beforeExit' ? this._engine.onBeforeExit(i) : n && this._engineConfig.logEmitter.on(n, i), this); - } - $connect() { - try { - return this._engine.start(); - } catch (n) { - throw ((n.clientVersion = this._clientVersion), n); - } - } - async $disconnect() { - try { - await this._engine.stop(); - } catch (n) { - throw ((n.clientVersion = this._clientVersion), n); - } finally { - gs(); - } - } - $executeRawInternal(n, i, o, s) { - let a = this._activeProvider; - return this._request({ - action: 'executeRaw', - args: o, - transaction: n, - clientMethod: i, - argsMapper: Uo({ clientMethod: i, activeProvider: a }), - callsite: je(this._errorFormat), - dataPath: [], - middlewareArgsMapper: s, - }); - } - $executeRaw(n, ...i) { - return this._createPrismaPromise((o) => { - if (n.raw !== void 0 || n.sql !== void 0) { - let [s, a] = uc(n, i); - return ( - Lo( - this._activeProvider, - s.text, - s.values, - Array.isArray(n) ? 'prisma.$executeRaw``' : 'prisma.$executeRaw(sql``)' - ), - this.$executeRawInternal(o, '$executeRaw', s, a) - ); - } - throw new ie( - "`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n", - { clientVersion: this._clientVersion } - ); - }); - } - $executeRawUnsafe(n, ...i) { - return this._createPrismaPromise( - (o) => ( - Lo(this._activeProvider, n, i, 'prisma.$executeRawUnsafe(, [...values])'), - this.$executeRawInternal(o, '$executeRawUnsafe', [n, ...i]) - ) - ); - } - $runCommandRaw(n) { - if (e.activeProvider !== 'mongodb') - throw new ie(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`, { - clientVersion: this._clientVersion, - }); - return this._createPrismaPromise((i) => - this._request({ - args: n, - clientMethod: '$runCommandRaw', - dataPath: [], - action: 'runCommandRaw', - argsMapper: Fu, - callsite: je(this._errorFormat), - transaction: i, - }) - ); - } - async $queryRawInternal(n, i, o, s) { - let a = this._activeProvider; - return this._request({ - action: 'queryRaw', - args: o, - transaction: n, - clientMethod: i, - argsMapper: Uo({ clientMethod: i, activeProvider: a }), - callsite: je(this._errorFormat), - dataPath: [], - middlewareArgsMapper: s, - }); - } - $queryRaw(n, ...i) { - return this._createPrismaPromise((o) => { - if (n.raw !== void 0 || n.sql !== void 0) return this.$queryRawInternal(o, '$queryRaw', ...uc(n, i)); - throw new ie( - "`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n", - { clientVersion: this._clientVersion } - ); - }); - } - $queryRawTyped(n) { - return this._createPrismaPromise((i) => { - if (!this._hasPreviewFlag('typedSql')) - throw new ie('`typedSql` preview feature must be enabled in order to access $queryRawTyped API', { - clientVersion: this._clientVersion, - }); - return this.$queryRawInternal(i, '$queryRawTyped', n); - }); - } - $queryRawUnsafe(n, ...i) { - return this._createPrismaPromise((o) => this.$queryRawInternal(o, '$queryRawUnsafe', [n, ...i])); - } - _transactionWithArray({ promises: n, options: i }) { - let o = jf.nextId(), - s = Ku(n.length), - a = n.map((f, w) => { - if (f?.[Symbol.toStringTag] !== 'PrismaPromise') - throw new Error( - 'All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.' - ); - let A = i?.isolationLevel ?? this._engineConfig.transactionOptions.isolationLevel, - C = { kind: 'batch', id: o, index: w, isolationLevel: A, lock: s }; - return f.requestTransaction?.(C) ?? f; - }); - return lc(a); - } - async _transactionWithCallback({ callback: n, options: i }) { - let o = { traceparent: this._tracingHelper.getTraceParent() }, - s = { - maxWait: i?.maxWait ?? this._engineConfig.transactionOptions.maxWait, - timeout: i?.timeout ?? this._engineConfig.transactionOptions.timeout, - isolationLevel: i?.isolationLevel ?? this._engineConfig.transactionOptions.isolationLevel, - }, - a = await this._engine.transaction('start', o, s), - f; - try { - let w = { kind: 'itx', ...a }; - ((f = await n(this._createItxClient(w))), await this._engine.transaction('commit', o, a)); - } catch (w) { - throw (await this._engine.transaction('rollback', o, a).catch(() => {}), w); - } - return f; - } - _createItxClient(n) { - return Pe( - yr( - Pe(Sa(this), [ - ue('_appliedParent', () => this._appliedParent._createItxClient(n)), - ue('_createPrismaPromise', () => Fo(n)), - ue(Bf, () => n.id), - ]) - ), - [It(Ma)] - ); - } - $transaction(n, i) { - let o; - typeof n == 'function' - ? this._engineConfig.adapter?.adapterName === '@prisma/adapter-d1' - ? (o = () => { - throw new Error( - 'Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.' - ); - }) - : (o = () => this._transactionWithCallback({ callback: n, options: i })) - : (o = () => this._transactionWithArray({ promises: n, options: i })); - let s = { name: 'transaction', attributes: { method: '$transaction' } }; - return this._tracingHelper.runInChildSpan(s, o); - } - _request(n) { - n.otelParentCtx = this._tracingHelper.getActiveContext(); - let i = n.middlewareArgsMapper ?? qf, - o = { - args: i.requestArgsToMiddlewareArgs(n.args), - dataPath: n.dataPath, - runInTransaction: !!n.transaction, - action: n.action, - model: n.model, - }, - s = { - operation: { - name: 'operation', - attributes: { method: o.action, model: o.model, name: o.model ? `${o.model}.${o.action}` : o.action }, - }, - }, - a = async (f) => { - let { runInTransaction: w, args: A, ...C } = f, - I = { ...n, ...C }; - (A && (I.args = i.middlewareArgsToRequestArgs(A)), - n.transaction !== void 0 && w === !1 && delete I.transaction); - let R = await Fa(this, I); - return I.model - ? _a({ - result: R, - modelName: I.model, - args: I.args, - extensions: this._extensions, - runtimeDataModel: this._runtimeDataModel, - globalOmit: this._globalOmit, - }) - : R; - }; - return this._tracingHelper.runInChildSpan(s.operation, () => a(o)); - } - async _executeRequest({ - args: n, - clientMethod: i, - dataPath: o, - callsite: s, - action: a, - model: f, - argsMapper: w, - transaction: A, - unpacker: C, - otelParentCtx: I, - customDataProxyFetch: R, - }) { - try { - n = w ? w(n) : n; - let L = { name: 'serialize' }, - k = this._tracingHelper.runInChildSpan(L, () => - Rn({ - modelName: f, - runtimeDataModel: this._runtimeDataModel, - action: a, - args: n, - clientMethod: i, - callsite: s, - extensions: this._extensions, - errorFormat: this._errorFormat, - clientVersion: this._clientVersion, - previewFeatures: this._previewFeatures, - globalOmit: this._globalOmit, - }) - ); - return ( - K.enabled('prisma:client') && - (We('Prisma Client call:'), - We(`prisma.${i}(${ba(n)})`), - We('Generated request:'), - We( - JSON.stringify(k, null, 2) + - ` -` - )), - A?.kind === 'batch' && (await A.lock), - this._requestHandler.request({ - protocolQuery: k, - modelName: f, - action: a, - clientMethod: i, - dataPath: o, - callsite: s, - args: n, - extensions: this._extensions, - transaction: A, - unpacker: C, - otelParentCtx: I, - otelChildCtx: this._tracingHelper.getActiveContext(), - globalOmit: this._globalOmit, - customDataProxyFetch: R, - }) - ); - } catch (L) { - throw ((L.clientVersion = this._clientVersion), L); - } - } - $metrics = new Rt(this); - _hasPreviewFlag(n) { - return !!this._engineConfig.previewFeatures?.includes(n); - } - $applyPendingMigrations() { - return this._engine.applyPendingMigrations(); - } - $extends = ka; - } - return t; -} -function uc(e, t) { - return Qf(e) ? [new fe(e, t), Hu] : [e, Gu]; -} -function Qf(e) { - return Array.isArray(e) && Array.isArray(e.raw); -} -u(); -c(); -p(); -m(); -d(); -l(); -var Hf = new Set([ - 'toJSON', - '$$typeof', - 'asymmetricMatch', - Symbol.iterator, - Symbol.toStringTag, - Symbol.isConcatSpreadable, - Symbol.toPrimitive, -]); -function mc(e) { - return new Proxy(e, { - get(t, r) { - if (r in t) return t[r]; - if (!Hf.has(r)) throw new TypeError(`Invalid enum value: ${String(r)}`); - }, - }); -} -u(); -c(); -p(); -m(); -d(); -l(); -l(); -0 && - (module.exports = { - DMMF, - Debug, - Decimal, - Extensions, - MetricsClient, - PrismaClientInitializationError, - PrismaClientKnownRequestError, - PrismaClientRustPanicError, - PrismaClientUnknownRequestError, - PrismaClientValidationError, - Public, - Sql, - createParam, - defineDmmfProperty, - deserializeJsonResponse, - deserializeRawResult, - dmmfToRuntimeDataModel, - empty, - getPrismaClient, - getRuntime, - join, - makeStrictEnum, - makeTypedQueryFactory, - objectEnumValues, - raw, - serializeJsonQuery, - skip, - sqltag, - warnEnvConflicts, - warnOnce, - }); -//# sourceMappingURL=wasm-compiler-edge.js.map diff --git a/prisma/generated/client/runtime/wasm-engine-edge.js b/prisma/generated/client/runtime/wasm-engine-edge.js deleted file mode 100644 index 3f0ec02..0000000 --- a/prisma/generated/client/runtime/wasm-engine-edge.js +++ /dev/null @@ -1,6915 +0,0 @@ -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ -'use strict'; -var Xo = Object.create; -var kt = Object.defineProperty; -var Zo = Object.getOwnPropertyDescriptor; -var es = Object.getOwnPropertyNames; -var ts = Object.getPrototypeOf, - rs = Object.prototype.hasOwnProperty; -var ie = (t, e) => () => (t && (e = t((t = 0))), e); -var Fe = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), - nt = (t, e) => { - for (var r in e) kt(t, r, { get: e[r], enumerable: !0 }); - }, - mn = (t, e, r, n) => { - if ((e && typeof e == 'object') || typeof e == 'function') - for (let i of es(e)) - !rs.call(t, i) && i !== r && kt(t, i, { get: () => e[i], enumerable: !(n = Zo(e, i)) || n.enumerable }); - return t; - }; -var it = (t, e, r) => ( - (r = t != null ? Xo(ts(t)) : {}), - mn(e || !t || !t.__esModule ? kt(r, 'default', { value: t, enumerable: !0 }) : r, t) - ), - ns = (t) => mn(kt({}, '__esModule', { value: !0 }), t); -function Er(t, e) { - if (((e = e.toLowerCase()), e === 'utf8' || e === 'utf-8')) return new y(as.encode(t)); - if (e === 'base64' || e === 'base64url') - return ( - (t = t.replace(/-/g, '+').replace(/_/g, '/')), - (t = t.replace(/[^A-Za-z0-9+/]/g, '')), - new y([...atob(t)].map((r) => r.charCodeAt(0))) - ); - if (e === 'binary' || e === 'ascii' || e === 'latin1' || e === 'latin-1') - return new y([...t].map((r) => r.charCodeAt(0))); - if (e === 'ucs2' || e === 'ucs-2' || e === 'utf16le' || e === 'utf-16le') { - let r = new y(t.length * 2), - n = new DataView(r.buffer); - for (let i = 0; i < t.length; i++) n.setUint16(i * 2, t.charCodeAt(i), !0); - return r; - } - if (e === 'hex') { - let r = new y(t.length / 2); - for (let n = 0, i = 0; i < t.length; i += 2, n++) r[n] = parseInt(t.slice(i, i + 2), 16); - return r; - } - dn(`encoding "${e}"`); -} -function is(t) { - let r = Object.getOwnPropertyNames(DataView.prototype).filter((a) => a.startsWith('get') || a.startsWith('set')), - n = r.map((a) => a.replace('get', 'read').replace('set', 'write')), - i = (a, f) => - function (h = 0) { - return (V(h, 'offset'), X(h, 'offset'), $(h, 'offset', this.length - 1), new DataView(this.buffer)[r[a]](h, f)); - }, - o = (a, f) => - function (h, C = 0) { - let R = r[a].match(/set(\w+\d+)/)[1].toLowerCase(), - k = ss[R]; - return ( - V(C, 'offset'), - X(C, 'offset'), - $(C, 'offset', this.length - 1), - os(h, 'value', k[0], k[1]), - new DataView(this.buffer)[r[a]](C, h, f), - C + parseInt(r[a].match(/\d+/)[0]) / 8 - ); - }, - s = (a) => { - a.forEach((f) => { - (f.includes('Uint') && (t[f.replace('Uint', 'UInt')] = t[f]), - f.includes('Float64') && (t[f.replace('Float64', 'Double')] = t[f]), - f.includes('Float32') && (t[f.replace('Float32', 'Float')] = t[f])); - }); - }; - n.forEach((a, f) => { - (a.startsWith('read') && ((t[a] = i(f, !1)), (t[a + 'LE'] = i(f, !0)), (t[a + 'BE'] = i(f, !1))), - a.startsWith('write') && ((t[a] = o(f, !1)), (t[a + 'LE'] = o(f, !0)), (t[a + 'BE'] = o(f, !1))), - s([a, a + 'LE', a + 'BE'])); - }); -} -function dn(t) { - throw new Error(`Buffer polyfill does not implement "${t}"`); -} -function Dt(t, e) { - if (!(t instanceof Uint8Array)) - throw new TypeError(`The "${e}" argument must be an instance of Buffer or Uint8Array`); -} -function $(t, e, r = cs + 1) { - if (t < 0 || t > r) { - let n = new RangeError(`The value of "${e}" is out of range. It must be >= 0 && <= ${r}. Received ${t}`); - throw ((n.code = 'ERR_OUT_OF_RANGE'), n); - } -} -function V(t, e) { - if (typeof t != 'number') { - let r = new TypeError(`The "${e}" argument must be of type number. Received type ${typeof t}.`); - throw ((r.code = 'ERR_INVALID_ARG_TYPE'), r); - } -} -function X(t, e) { - if (!Number.isInteger(t) || Number.isNaN(t)) { - let r = new RangeError(`The value of "${e}" is out of range. It must be an integer. Received ${t}`); - throw ((r.code = 'ERR_OUT_OF_RANGE'), r); - } -} -function os(t, e, r, n) { - if (t < r || t > n) { - let i = new RangeError(`The value of "${e}" is out of range. It must be >= ${r} and <= ${n}. Received ${t}`); - throw ((i.code = 'ERR_OUT_OF_RANGE'), i); - } -} -function pn(t, e) { - if (typeof t != 'string') { - let r = new TypeError(`The "${e}" argument must be of type string. Received type ${typeof t}`); - throw ((r.code = 'ERR_INVALID_ARG_TYPE'), r); - } -} -function ms(t, e = 'utf8') { - return y.from(t, e); -} -var y, - ss, - as, - ls, - us, - cs, - b, - Pr, - u = ie(() => { - 'use strict'; - y = class t extends Uint8Array { - _isBuffer = !0; - get offset() { - return this.byteOffset; - } - static alloc(e, r = 0, n = 'utf8') { - return (pn(n, 'encoding'), t.allocUnsafe(e).fill(r, n)); - } - static allocUnsafe(e) { - return t.from(e); - } - static allocUnsafeSlow(e) { - return t.from(e); - } - static isBuffer(e) { - return e && !!e._isBuffer; - } - static byteLength(e, r = 'utf8') { - if (typeof e == 'string') return Er(e, r).byteLength; - if (e && e.byteLength) return e.byteLength; - let n = new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.'); - throw ((n.code = 'ERR_INVALID_ARG_TYPE'), n); - } - static isEncoding(e) { - return us.includes(e); - } - static compare(e, r) { - (Dt(e, 'buff1'), Dt(r, 'buff2')); - for (let n = 0; n < e.length; n++) { - if (e[n] < r[n]) return -1; - if (e[n] > r[n]) return 1; - } - return e.length === r.length ? 0 : e.length > r.length ? 1 : -1; - } - static from(e, r = 'utf8') { - if (e && typeof e == 'object' && e.type === 'Buffer') return new t(e.data); - if (typeof e == 'number') return new t(new Uint8Array(e)); - if (typeof e == 'string') return Er(e, r); - if (ArrayBuffer.isView(e)) { - let { byteOffset: n, byteLength: i, buffer: o } = e; - return 'map' in e && typeof e.map == 'function' - ? new t( - e.map((s) => s % 256), - n, - i - ) - : new t(o, n, i); - } - if (e && typeof e == 'object' && ('length' in e || 'byteLength' in e || 'buffer' in e)) return new t(e); - throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.'); - } - static concat(e, r) { - if (e.length === 0) return t.alloc(0); - let n = [].concat(...e.map((o) => [...o])), - i = t.alloc(r !== void 0 ? r : n.length); - return (i.set(r !== void 0 ? n.slice(0, r) : n), i); - } - slice(e = 0, r = this.length) { - return this.subarray(e, r); - } - subarray(e = 0, r = this.length) { - return Object.setPrototypeOf(super.subarray(e, r), t.prototype); - } - reverse() { - return (super.reverse(), this); - } - readIntBE(e, r) { - (V(e, 'offset'), X(e, 'offset'), $(e, 'offset', this.length - 1), V(r, 'byteLength'), X(r, 'byteLength')); - let n = new DataView(this.buffer, e, r), - i = 0; - for (let o = 0; o < r; o++) i = i * 256 + n.getUint8(o); - return (n.getUint8(0) & 128 && (i -= Math.pow(256, r)), i); - } - readIntLE(e, r) { - (V(e, 'offset'), X(e, 'offset'), $(e, 'offset', this.length - 1), V(r, 'byteLength'), X(r, 'byteLength')); - let n = new DataView(this.buffer, e, r), - i = 0; - for (let o = 0; o < r; o++) i += n.getUint8(o) * Math.pow(256, o); - return (n.getUint8(r - 1) & 128 && (i -= Math.pow(256, r)), i); - } - readUIntBE(e, r) { - (V(e, 'offset'), X(e, 'offset'), $(e, 'offset', this.length - 1), V(r, 'byteLength'), X(r, 'byteLength')); - let n = new DataView(this.buffer, e, r), - i = 0; - for (let o = 0; o < r; o++) i = i * 256 + n.getUint8(o); - return i; - } - readUintBE(e, r) { - return this.readUIntBE(e, r); - } - readUIntLE(e, r) { - (V(e, 'offset'), X(e, 'offset'), $(e, 'offset', this.length - 1), V(r, 'byteLength'), X(r, 'byteLength')); - let n = new DataView(this.buffer, e, r), - i = 0; - for (let o = 0; o < r; o++) i += n.getUint8(o) * Math.pow(256, o); - return i; - } - readUintLE(e, r) { - return this.readUIntLE(e, r); - } - writeIntBE(e, r, n) { - return ((e = e < 0 ? e + Math.pow(256, n) : e), this.writeUIntBE(e, r, n)); - } - writeIntLE(e, r, n) { - return ((e = e < 0 ? e + Math.pow(256, n) : e), this.writeUIntLE(e, r, n)); - } - writeUIntBE(e, r, n) { - (V(r, 'offset'), X(r, 'offset'), $(r, 'offset', this.length - 1), V(n, 'byteLength'), X(n, 'byteLength')); - let i = new DataView(this.buffer, r, n); - for (let o = n - 1; o >= 0; o--) (i.setUint8(o, e & 255), (e = e / 256)); - return r + n; - } - writeUintBE(e, r, n) { - return this.writeUIntBE(e, r, n); - } - writeUIntLE(e, r, n) { - (V(r, 'offset'), X(r, 'offset'), $(r, 'offset', this.length - 1), V(n, 'byteLength'), X(n, 'byteLength')); - let i = new DataView(this.buffer, r, n); - for (let o = 0; o < n; o++) (i.setUint8(o, e & 255), (e = e / 256)); - return r + n; - } - writeUintLE(e, r, n) { - return this.writeUIntLE(e, r, n); - } - toJSON() { - return { type: 'Buffer', data: Array.from(this) }; - } - swap16() { - let e = new DataView(this.buffer, this.byteOffset, this.byteLength); - for (let r = 0; r < this.length; r += 2) e.setUint16(r, e.getUint16(r, !0), !1); - return this; - } - swap32() { - let e = new DataView(this.buffer, this.byteOffset, this.byteLength); - for (let r = 0; r < this.length; r += 4) e.setUint32(r, e.getUint32(r, !0), !1); - return this; - } - swap64() { - let e = new DataView(this.buffer, this.byteOffset, this.byteLength); - for (let r = 0; r < this.length; r += 8) e.setBigUint64(r, e.getBigUint64(r, !0), !1); - return this; - } - compare(e, r = 0, n = e.length, i = 0, o = this.length) { - return ( - Dt(e, 'target'), - V(r, 'targetStart'), - V(n, 'targetEnd'), - V(i, 'sourceStart'), - V(o, 'sourceEnd'), - $(r, 'targetStart'), - $(n, 'targetEnd', e.length), - $(i, 'sourceStart'), - $(o, 'sourceEnd', this.length), - t.compare(this.slice(i, o), e.slice(r, n)) - ); - } - equals(e) { - return (Dt(e, 'otherBuffer'), this.length === e.length && this.every((r, n) => r === e[n])); - } - copy(e, r = 0, n = 0, i = this.length) { - ($(r, 'targetStart'), $(n, 'sourceStart', this.length), $(i, 'sourceEnd'), (r >>>= 0), (n >>>= 0), (i >>>= 0)); - let o = 0; - for (; n < i && !(this[n] === void 0 || e[r] === void 0); ) ((e[r] = this[n]), o++, n++, r++); - return o; - } - write(e, r, n, i = 'utf8') { - let o = typeof r == 'string' ? 0 : (r ?? 0), - s = typeof n == 'string' ? this.length - o : (n ?? this.length - o); - return ( - (i = typeof r == 'string' ? r : typeof n == 'string' ? n : i), - V(o, 'offset'), - V(s, 'length'), - $(o, 'offset', this.length), - $(s, 'length', this.length), - (i === 'ucs2' || i === 'ucs-2' || i === 'utf16le' || i === 'utf-16le') && (s = s - (s % 2)), - Er(e, i).copy(this, o, 0, s) - ); - } - fill(e = 0, r = 0, n = this.length, i = 'utf-8') { - let o = typeof r == 'string' ? 0 : r, - s = typeof n == 'string' ? this.length : n; - if ( - ((i = typeof r == 'string' ? r : typeof n == 'string' ? n : i), - (e = t.from(typeof e == 'number' ? [e] : (e ?? []), i)), - pn(i, 'encoding'), - $(o, 'offset', this.length), - $(s, 'end', this.length), - e.length !== 0) - ) - for (let a = o; a < s; a += e.length) - super.set(e.slice(0, e.length + a >= this.length ? this.length - a : e.length), a); - return this; - } - includes(e, r = null, n = 'utf-8') { - return this.indexOf(e, r, n) !== -1; - } - lastIndexOf(e, r = null, n = 'utf-8') { - return this.indexOf(e, r, n, !0); - } - indexOf(e, r = null, n = 'utf-8', i = !1) { - let o = i ? this.findLastIndex.bind(this) : this.findIndex.bind(this); - n = typeof r == 'string' ? r : n; - let s = t.from(typeof e == 'number' ? [e] : e, n), - a = typeof r == 'string' ? 0 : r; - return ( - (a = typeof r == 'number' ? a : null), - (a = Number.isNaN(a) ? null : a), - (a ??= i ? this.length : 0), - (a = a < 0 ? this.length + a : a), - s.length === 0 && i === !1 - ? a >= this.length - ? this.length - : a - : s.length === 0 && i === !0 - ? (a >= this.length ? this.length : a) || this.length - : o((f, h) => (i ? h <= a : h >= a) && this[h] === s[0] && s.every((R, k) => this[h + k] === R)) - ); - } - toString(e = 'utf8', r = 0, n = this.length) { - if (((r = r < 0 ? 0 : r), (e = e.toString().toLowerCase()), n <= 0)) return ''; - if (e === 'utf8' || e === 'utf-8') return ls.decode(this.slice(r, n)); - if (e === 'base64' || e === 'base64url') { - let i = btoa(this.reduce((o, s) => o + Pr(s), '')); - return e === 'base64url' ? i.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '') : i; - } - if (e === 'binary' || e === 'ascii' || e === 'latin1' || e === 'latin-1') - return this.slice(r, n).reduce((i, o) => i + Pr(o & (e === 'ascii' ? 127 : 255)), ''); - if (e === 'ucs2' || e === 'ucs-2' || e === 'utf16le' || e === 'utf-16le') { - let i = new DataView(this.buffer.slice(r, n)); - return Array.from({ length: i.byteLength / 2 }, (o, s) => - s * 2 + 1 < i.byteLength ? Pr(i.getUint16(s * 2, !0)) : '' - ).join(''); - } - if (e === 'hex') return this.slice(r, n).reduce((i, o) => i + o.toString(16).padStart(2, '0'), ''); - dn(`encoding "${e}"`); - } - toLocaleString() { - return this.toString(); - } - inspect() { - return ``; - } - }; - ((ss = { - int8: [-128, 127], - int16: [-32768, 32767], - int32: [-2147483648, 2147483647], - uint8: [0, 255], - uint16: [0, 65535], - uint32: [0, 4294967295], - float32: [-1 / 0, 1 / 0], - float64: [-1 / 0, 1 / 0], - bigint64: [-0x8000000000000000n, 0x7fffffffffffffffn], - biguint64: [0n, 0xffffffffffffffffn], - }), - (as = new TextEncoder()), - (ls = new TextDecoder()), - (us = [ - 'utf8', - 'utf-8', - 'hex', - 'base64', - 'ascii', - 'binary', - 'base64url', - 'ucs2', - 'ucs-2', - 'utf16le', - 'utf-16le', - 'latin1', - 'latin-1', - ]), - (cs = 4294967295)); - is(y.prototype); - ((b = new Proxy(ms, { - construct(t, [e, r]) { - return y.from(e, r); - }, - get(t, e) { - return y[e]; - }, - })), - (Pr = String.fromCodePoint)); - }); -var g, - E, - c = ie(() => { - 'use strict'; - ((g = { - nextTick: (t, ...e) => { - setTimeout(() => { - t(...e); - }, 0); - }, - env: {}, - version: '', - cwd: () => '/', - stderr: {}, - argv: ['/bin/node'], - pid: 1e4, - }), - ({ cwd: E } = g)); - }); -var P, - m = ie(() => { - 'use strict'; - P = - globalThis.performance ?? - (() => { - let t = Date.now(); - return { now: () => Date.now() - t }; - })(); - }); -var x, - p = ie(() => { - 'use strict'; - x = () => {}; - x.prototype = x; - }); -var w, - d = ie(() => { - 'use strict'; - w = class { - value; - constructor(e) { - this.value = e; - } - deref() { - return this.value; - } - }; - }); -function hn(t, e) { - var r, - n, - i, - o, - s, - a, - f, - h, - C = t.constructor, - R = C.precision; - if (!t.s || !e.s) return (e.s || (e = new C(t)), q ? L(e, R) : e); - if (((f = t.d), (h = e.d), (s = t.e), (i = e.e), (f = f.slice()), (o = s - i), o)) { - for ( - o < 0 ? ((n = f), (o = -o), (a = h.length)) : ((n = h), (i = s), (a = f.length)), - s = Math.ceil(R / N), - a = s > a ? s + 1 : a + 1, - o > a && ((o = a), (n.length = 1)), - n.reverse(); - o--; - - ) - n.push(0); - n.reverse(); - } - for (a = f.length, o = h.length, a - o < 0 && ((o = a), (n = h), (h = f), (f = n)), r = 0; o; ) - ((r = ((f[--o] = f[o] + h[o] + r) / J) | 0), (f[o] %= J)); - for (r && (f.unshift(r), ++i), a = f.length; f[--a] == 0; ) f.pop(); - return ((e.d = f), (e.e = i), q ? L(e, R) : e); -} -function ce(t, e, r) { - if (t !== ~~t || t < e || t > r) throw Error(ke + t); -} -function ue(t) { - var e, - r, - n, - i = t.length - 1, - o = '', - s = t[0]; - if (i > 0) { - for (o += s, e = 1; e < i; e++) ((n = t[e] + ''), (r = N - n.length), r && (o += Pe(r)), (o += n)); - ((s = t[e]), (n = s + ''), (r = N - n.length), r && (o += Pe(r))); - } else if (s === 0) return '0'; - for (; s % 10 === 0; ) s /= 10; - return o + s; -} -function bn(t, e) { - var r, - n, - i, - o, - s, - a, - f = 0, - h = 0, - C = t.constructor, - R = C.precision; - if (j(t) > 16) throw Error(Tr + j(t)); - if (!t.s) return new C(te); - for (e == null ? ((q = !1), (a = R)) : (a = e), s = new C(0.03125); t.abs().gte(0.1); ) ((t = t.times(s)), (h += 5)); - for (n = ((Math.log(Oe(2, h)) / Math.LN10) * 2 + 5) | 0, a += n, r = i = o = new C(te), C.precision = a; ; ) { - if ( - ((i = L(i.times(t), a)), - (r = r.times(++f)), - (s = o.plus(he(i, r, a))), - ue(s.d).slice(0, a) === ue(o.d).slice(0, a)) - ) { - for (; h--; ) o = L(o.times(o), a); - return ((C.precision = R), e == null ? ((q = !0), L(o, R)) : o); - } - o = s; - } -} -function j(t) { - for (var e = t.e * N, r = t.d[0]; r >= 10; r /= 10) e++; - return e; -} -function vr(t, e, r) { - if (e > t.LN10.sd()) throw ((q = !0), r && (t.precision = r), Error(oe + 'LN10 precision limit exceeded')); - return L(new t(t.LN10), e); -} -function Pe(t) { - for (var e = ''; t--; ) e += '0'; - return e; -} -function ot(t, e) { - var r, - n, - i, - o, - s, - a, - f, - h, - C, - R = 1, - k = 10, - A = t, - _ = A.d, - O = A.constructor, - D = O.precision; - if (A.s < 1) throw Error(oe + (A.s ? 'NaN' : '-Infinity')); - if (A.eq(te)) return new O(0); - if ((e == null ? ((q = !1), (h = D)) : (h = e), A.eq(10))) return (e == null && (q = !0), vr(O, h)); - if (((h += k), (O.precision = h), (r = ue(_)), (n = r.charAt(0)), (o = j(A)), Math.abs(o) < 15e14)) { - for (; (n < 7 && n != 1) || (n == 1 && r.charAt(1) > 3); ) - ((A = A.times(t)), (r = ue(A.d)), (n = r.charAt(0)), R++); - ((o = j(A)), n > 1 ? ((A = new O('0.' + r)), o++) : (A = new O(n + '.' + r.slice(1)))); - } else - return ( - (f = vr(O, h + 2, D).times(o + '')), - (A = ot(new O(n + '.' + r.slice(1)), h - k).plus(f)), - (O.precision = D), - e == null ? ((q = !0), L(A, D)) : A - ); - for (a = s = A = he(A.minus(te), A.plus(te), h), C = L(A.times(A), h), i = 3; ; ) { - if (((s = L(s.times(C), h)), (f = a.plus(he(s, new O(i), h))), ue(f.d).slice(0, h) === ue(a.d).slice(0, h))) - return ( - (a = a.times(2)), - o !== 0 && (a = a.plus(vr(O, h + 2, D).times(o + ''))), - (a = he(a, new O(R), h)), - (O.precision = D), - e == null ? ((q = !0), L(a, D)) : a - ); - ((a = f), (i += 2)); - } -} -function fn(t, e) { - var r, n, i; - for ( - (r = e.indexOf('.')) > -1 && (e = e.replace('.', '')), - (n = e.search(/e/i)) > 0 - ? (r < 0 && (r = n), (r += +e.slice(n + 1)), (e = e.substring(0, n))) - : r < 0 && (r = e.length), - n = 0; - e.charCodeAt(n) === 48; - - ) - ++n; - for (i = e.length; e.charCodeAt(i - 1) === 48; ) --i; - if (((e = e.slice(n, i)), e)) { - if (((i -= n), (r = r - n - 1), (t.e = Ne(r / N)), (t.d = []), (n = (r + 1) % N), r < 0 && (n += N), n < i)) { - for (n && t.d.push(+e.slice(0, n)), i -= N; n < i; ) t.d.push(+e.slice(n, (n += N))); - ((e = e.slice(n)), (n = N - e.length)); - } else n -= i; - for (; n--; ) e += '0'; - if ((t.d.push(+e), q && (t.e > It || t.e < -It))) throw Error(Tr + r); - } else ((t.s = 0), (t.e = 0), (t.d = [0])); - return t; -} -function L(t, e, r) { - var n, - i, - o, - s, - a, - f, - h, - C, - R = t.d; - for (s = 1, o = R[0]; o >= 10; o /= 10) s++; - if (((n = e - s), n < 0)) ((n += N), (i = e), (h = R[(C = 0)])); - else { - if (((C = Math.ceil((n + 1) / N)), (o = R.length), C >= o)) return t; - for (h = o = R[C], s = 1; o >= 10; o /= 10) s++; - ((n %= N), (i = n - N + s)); - } - if ( - (r !== void 0 && - ((o = Oe(10, s - i - 1)), - (a = (h / o) % 10 | 0), - (f = e < 0 || R[C + 1] !== void 0 || h % o), - (f = - r < 4 - ? (a || f) && (r == 0 || r == (t.s < 0 ? 3 : 2)) - : a > 5 || - (a == 5 && - (r == 4 || - f || - (r == 6 && (n > 0 ? (i > 0 ? h / Oe(10, s - i) : 0) : R[C - 1]) % 10 & 1) || - r == (t.s < 0 ? 8 : 7))))), - e < 1 || !R[0]) - ) - return ( - f - ? ((o = j(t)), (R.length = 1), (e = e - o - 1), (R[0] = Oe(10, (N - (e % N)) % N)), (t.e = Ne(-e / N) || 0)) - : ((R.length = 1), (R[0] = t.e = t.s = 0)), - t - ); - if ( - (n == 0 - ? ((R.length = C), (o = 1), C--) - : ((R.length = C + 1), (o = Oe(10, N - n)), (R[C] = i > 0 ? ((h / Oe(10, s - i)) % Oe(10, i) | 0) * o : 0)), - f) - ) - for (;;) - if (C == 0) { - (R[0] += o) == J && ((R[0] = 1), ++t.e); - break; - } else { - if (((R[C] += o), R[C] != J)) break; - ((R[C--] = 0), (o = 1)); - } - for (n = R.length; R[--n] === 0; ) R.pop(); - if (q && (t.e > It || t.e < -It)) throw Error(Tr + j(t)); - return t; -} -function wn(t, e) { - var r, - n, - i, - o, - s, - a, - f, - h, - C, - R, - k = t.constructor, - A = k.precision; - if (!t.s || !e.s) return (e.s ? (e.s = -e.s) : (e = new k(t)), q ? L(e, A) : e); - if (((f = t.d), (R = e.d), (n = e.e), (h = t.e), (f = f.slice()), (s = h - n), s)) { - for ( - C = s < 0, - C ? ((r = f), (s = -s), (a = R.length)) : ((r = R), (n = h), (a = f.length)), - i = Math.max(Math.ceil(A / N), a) + 2, - s > i && ((s = i), (r.length = 1)), - r.reverse(), - i = s; - i--; - - ) - r.push(0); - r.reverse(); - } else { - for (i = f.length, a = R.length, C = i < a, C && (a = i), i = 0; i < a; i++) - if (f[i] != R[i]) { - C = f[i] < R[i]; - break; - } - s = 0; - } - for (C && ((r = f), (f = R), (R = r), (e.s = -e.s)), a = f.length, i = R.length - a; i > 0; --i) f[a++] = 0; - for (i = R.length; i > s; ) { - if (f[--i] < R[i]) { - for (o = i; o && f[--o] === 0; ) f[o] = J - 1; - (--f[o], (f[i] += J)); - } - f[i] -= R[i]; - } - for (; f[--a] === 0; ) f.pop(); - for (; f[0] === 0; f.shift()) --n; - return f[0] ? ((e.d = f), (e.e = n), q ? L(e, A) : e) : new k(0); -} -function De(t, e, r) { - var n, - i = j(t), - o = ue(t.d), - s = o.length; - return ( - e - ? (r && (n = r - s) > 0 - ? (o = o.charAt(0) + '.' + o.slice(1) + Pe(n)) - : s > 1 && (o = o.charAt(0) + '.' + o.slice(1)), - (o = o + (i < 0 ? 'e' : 'e+') + i)) - : i < 0 - ? ((o = '0.' + Pe(-i - 1) + o), r && (n = r - s) > 0 && (o += Pe(n))) - : i >= s - ? ((o += Pe(i + 1 - s)), r && (n = r - i - 1) > 0 && (o = o + '.' + Pe(n))) - : ((n = i + 1) < s && (o = o.slice(0, n) + '.' + o.slice(n)), - r && (n = r - s) > 0 && (i + 1 === s && (o += '.'), (o += Pe(n)))), - t.s < 0 ? '-' + o : o - ); -} -function gn(t, e) { - if (t.length > e) return ((t.length = e), !0); -} -function xn(t) { - var e, r, n; - function i(o) { - var s = this; - if (!(s instanceof i)) return new i(o); - if (((s.constructor = i), o instanceof i)) { - ((s.s = o.s), (s.e = o.e), (s.d = (o = o.d) ? o.slice() : o)); - return; - } - if (typeof o == 'number') { - if (o * 0 !== 0) throw Error(ke + o); - if (o > 0) s.s = 1; - else if (o < 0) ((o = -o), (s.s = -1)); - else { - ((s.s = 0), (s.e = 0), (s.d = [0])); - return; - } - if (o === ~~o && o < 1e7) { - ((s.e = 0), (s.d = [o])); - return; - } - return fn(s, o.toString()); - } else if (typeof o != 'string') throw Error(ke + o); - if ((o.charCodeAt(0) === 45 ? ((o = o.slice(1)), (s.s = -1)) : (s.s = 1), ds.test(o))) fn(s, o); - else throw Error(ke + o); - } - if ( - ((i.prototype = S), - (i.ROUND_UP = 0), - (i.ROUND_DOWN = 1), - (i.ROUND_CEIL = 2), - (i.ROUND_FLOOR = 3), - (i.ROUND_HALF_UP = 4), - (i.ROUND_HALF_DOWN = 5), - (i.ROUND_HALF_EVEN = 6), - (i.ROUND_HALF_CEIL = 7), - (i.ROUND_HALF_FLOOR = 8), - (i.clone = xn), - (i.config = i.set = fs), - t === void 0 && (t = {}), - t) - ) - for (n = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'LN10'], e = 0; e < n.length; ) - t.hasOwnProperty((r = n[e++])) || (t[r] = this[r]); - return (i.config(t), i); -} -function fs(t) { - if (!t || typeof t != 'object') throw Error(oe + 'Object expected'); - var e, - r, - n, - i = ['precision', 1, Ue, 'rounding', 0, 8, 'toExpNeg', -1 / 0, 0, 'toExpPos', 0, 1 / 0]; - for (e = 0; e < i.length; e += 3) - if ((n = t[(r = i[e])]) !== void 0) - if (Ne(n) === n && n >= i[e + 1] && n <= i[e + 2]) this[r] = n; - else throw Error(ke + r + ': ' + n); - if ((n = t[(r = 'LN10')]) !== void 0) - if (n == Math.LN10) this[r] = new this(n); - else throw Error(ke + r + ': ' + n); - return this; -} -var Ue, - ps, - Cr, - q, - oe, - ke, - Tr, - Ne, - Oe, - ds, - te, - J, - N, - yn, - It, - S, - he, - Cr, - Mt, - En = ie(() => { - 'use strict'; - u(); - c(); - m(); - p(); - d(); - l(); - ((Ue = 1e9), - (ps = { - precision: 20, - rounding: 4, - toExpNeg: -7, - toExpPos: 21, - LN10: '2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286', - }), - (q = !0), - (oe = '[DecimalError] '), - (ke = oe + 'Invalid argument: '), - (Tr = oe + 'Exponent out of range: '), - (Ne = Math.floor), - (Oe = Math.pow), - (ds = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i), - (J = 1e7), - (N = 7), - (yn = 9007199254740991), - (It = Ne(yn / N)), - (S = {})); - S.absoluteValue = S.abs = function () { - var t = new this.constructor(this); - return (t.s && (t.s = 1), t); - }; - S.comparedTo = S.cmp = function (t) { - var e, - r, - n, - i, - o = this; - if (((t = new o.constructor(t)), o.s !== t.s)) return o.s || -t.s; - if (o.e !== t.e) return (o.e > t.e) ^ (o.s < 0) ? 1 : -1; - for (n = o.d.length, i = t.d.length, e = 0, r = n < i ? n : i; e < r; ++e) - if (o.d[e] !== t.d[e]) return (o.d[e] > t.d[e]) ^ (o.s < 0) ? 1 : -1; - return n === i ? 0 : (n > i) ^ (o.s < 0) ? 1 : -1; - }; - S.decimalPlaces = S.dp = function () { - var t = this, - e = t.d.length - 1, - r = (e - t.e) * N; - if (((e = t.d[e]), e)) for (; e % 10 == 0; e /= 10) r--; - return r < 0 ? 0 : r; - }; - S.dividedBy = S.div = function (t) { - return he(this, new this.constructor(t)); - }; - S.dividedToIntegerBy = S.idiv = function (t) { - var e = this, - r = e.constructor; - return L(he(e, new r(t), 0, 1), r.precision); - }; - S.equals = S.eq = function (t) { - return !this.cmp(t); - }; - S.exponent = function () { - return j(this); - }; - S.greaterThan = S.gt = function (t) { - return this.cmp(t) > 0; - }; - S.greaterThanOrEqualTo = S.gte = function (t) { - return this.cmp(t) >= 0; - }; - S.isInteger = S.isint = function () { - return this.e > this.d.length - 2; - }; - S.isNegative = S.isneg = function () { - return this.s < 0; - }; - S.isPositive = S.ispos = function () { - return this.s > 0; - }; - S.isZero = function () { - return this.s === 0; - }; - S.lessThan = S.lt = function (t) { - return this.cmp(t) < 0; - }; - S.lessThanOrEqualTo = S.lte = function (t) { - return this.cmp(t) < 1; - }; - S.logarithm = S.log = function (t) { - var e, - r = this, - n = r.constructor, - i = n.precision, - o = i + 5; - if (t === void 0) t = new n(10); - else if (((t = new n(t)), t.s < 1 || t.eq(te))) throw Error(oe + 'NaN'); - if (r.s < 1) throw Error(oe + (r.s ? 'NaN' : '-Infinity')); - return r.eq(te) ? new n(0) : ((q = !1), (e = he(ot(r, o), ot(t, o), o)), (q = !0), L(e, i)); - }; - S.minus = S.sub = function (t) { - var e = this; - return ((t = new e.constructor(t)), e.s == t.s ? wn(e, t) : hn(e, ((t.s = -t.s), t))); - }; - S.modulo = S.mod = function (t) { - var e, - r = this, - n = r.constructor, - i = n.precision; - if (((t = new n(t)), !t.s)) throw Error(oe + 'NaN'); - return r.s ? ((q = !1), (e = he(r, t, 0, 1).times(t)), (q = !0), r.minus(e)) : L(new n(r), i); - }; - S.naturalExponential = S.exp = function () { - return bn(this); - }; - S.naturalLogarithm = S.ln = function () { - return ot(this); - }; - S.negated = S.neg = function () { - var t = new this.constructor(this); - return ((t.s = -t.s || 0), t); - }; - S.plus = S.add = function (t) { - var e = this; - return ((t = new e.constructor(t)), e.s == t.s ? hn(e, t) : wn(e, ((t.s = -t.s), t))); - }; - S.precision = S.sd = function (t) { - var e, - r, - n, - i = this; - if (t !== void 0 && t !== !!t && t !== 1 && t !== 0) throw Error(ke + t); - if (((e = j(i) + 1), (n = i.d.length - 1), (r = n * N + 1), (n = i.d[n]), n)) { - for (; n % 10 == 0; n /= 10) r--; - for (n = i.d[0]; n >= 10; n /= 10) r++; - } - return t && e > r ? e : r; - }; - S.squareRoot = S.sqrt = function () { - var t, - e, - r, - n, - i, - o, - s, - a = this, - f = a.constructor; - if (a.s < 1) { - if (!a.s) return new f(0); - throw Error(oe + 'NaN'); - } - for ( - t = j(a), - q = !1, - i = Math.sqrt(+a), - i == 0 || i == 1 / 0 - ? ((e = ue(a.d)), - (e.length + t) % 2 == 0 && (e += '0'), - (i = Math.sqrt(e)), - (t = Ne((t + 1) / 2) - (t < 0 || t % 2)), - i == 1 / 0 ? (e = '5e' + t) : ((e = i.toExponential()), (e = e.slice(0, e.indexOf('e') + 1) + t)), - (n = new f(e))) - : (n = new f(i.toString())), - r = f.precision, - i = s = r + 3; - ; - - ) - if (((o = n), (n = o.plus(he(a, o, s + 2)).times(0.5)), ue(o.d).slice(0, s) === (e = ue(n.d)).slice(0, s))) { - if (((e = e.slice(s - 3, s + 1)), i == s && e == '4999')) { - if ((L(o, r + 1, 0), o.times(o).eq(a))) { - n = o; - break; - } - } else if (e != '9999') break; - s += 4; - } - return ((q = !0), L(n, r)); - }; - S.times = S.mul = function (t) { - var e, - r, - n, - i, - o, - s, - a, - f, - h, - C = this, - R = C.constructor, - k = C.d, - A = (t = new R(t)).d; - if (!C.s || !t.s) return new R(0); - for ( - t.s *= C.s, - r = C.e + t.e, - f = k.length, - h = A.length, - f < h && ((o = k), (k = A), (A = o), (s = f), (f = h), (h = s)), - o = [], - s = f + h, - n = s; - n--; - - ) - o.push(0); - for (n = h; --n >= 0; ) { - for (e = 0, i = f + n; i > n; ) ((a = o[i] + A[n] * k[i - n - 1] + e), (o[i--] = a % J | 0), (e = (a / J) | 0)); - o[i] = (o[i] + e) % J | 0; - } - for (; !o[--s]; ) o.pop(); - return (e ? ++r : o.shift(), (t.d = o), (t.e = r), q ? L(t, R.precision) : t); - }; - S.toDecimalPlaces = S.todp = function (t, e) { - var r = this, - n = r.constructor; - return ( - (r = new n(r)), - t === void 0 ? r : (ce(t, 0, Ue), e === void 0 ? (e = n.rounding) : ce(e, 0, 8), L(r, t + j(r) + 1, e)) - ); - }; - S.toExponential = function (t, e) { - var r, - n = this, - i = n.constructor; - return ( - t === void 0 - ? (r = De(n, !0)) - : (ce(t, 0, Ue), - e === void 0 ? (e = i.rounding) : ce(e, 0, 8), - (n = L(new i(n), t + 1, e)), - (r = De(n, !0, t + 1))), - r - ); - }; - S.toFixed = function (t, e) { - var r, - n, - i = this, - o = i.constructor; - return t === void 0 - ? De(i) - : (ce(t, 0, Ue), - e === void 0 ? (e = o.rounding) : ce(e, 0, 8), - (n = L(new o(i), t + j(i) + 1, e)), - (r = De(n.abs(), !1, t + j(n) + 1)), - i.isneg() && !i.isZero() ? '-' + r : r); - }; - S.toInteger = S.toint = function () { - var t = this, - e = t.constructor; - return L(new e(t), j(t) + 1, e.rounding); - }; - S.toNumber = function () { - return +this; - }; - S.toPower = S.pow = function (t) { - var e, - r, - n, - i, - o, - s, - a = this, - f = a.constructor, - h = 12, - C = +(t = new f(t)); - if (!t.s) return new f(te); - if (((a = new f(a)), !a.s)) { - if (t.s < 1) throw Error(oe + 'Infinity'); - return a; - } - if (a.eq(te)) return a; - if (((n = f.precision), t.eq(te))) return L(a, n); - if (((e = t.e), (r = t.d.length - 1), (s = e >= r), (o = a.s), s)) { - if ((r = C < 0 ? -C : C) <= yn) { - for ( - i = new f(te), e = Math.ceil(n / N + 4), q = !1; - r % 2 && ((i = i.times(a)), gn(i.d, e)), (r = Ne(r / 2)), r !== 0; - - ) - ((a = a.times(a)), gn(a.d, e)); - return ((q = !0), t.s < 0 ? new f(te).div(i) : L(i, n)); - } - } else if (o < 0) throw Error(oe + 'NaN'); - return ( - (o = o < 0 && t.d[Math.max(e, r)] & 1 ? -1 : 1), - (a.s = 1), - (q = !1), - (i = t.times(ot(a, n + h))), - (q = !0), - (i = bn(i)), - (i.s = o), - i - ); - }; - S.toPrecision = function (t, e) { - var r, - n, - i = this, - o = i.constructor; - return ( - t === void 0 - ? ((r = j(i)), (n = De(i, r <= o.toExpNeg || r >= o.toExpPos))) - : (ce(t, 1, Ue), - e === void 0 ? (e = o.rounding) : ce(e, 0, 8), - (i = L(new o(i), t, e)), - (r = j(i)), - (n = De(i, t <= r || r <= o.toExpNeg, t))), - n - ); - }; - S.toSignificantDigits = S.tosd = function (t, e) { - var r = this, - n = r.constructor; - return ( - t === void 0 - ? ((t = n.precision), (e = n.rounding)) - : (ce(t, 1, Ue), e === void 0 ? (e = n.rounding) : ce(e, 0, 8)), - L(new n(r), t, e) - ); - }; - S.toString = - S.valueOf = - S.val = - S.toJSON = - S[Symbol.for('nodejs.util.inspect.custom')] = - function () { - var t = this, - e = j(t), - r = t.constructor; - return De(t, e <= r.toExpNeg || e >= r.toExpPos); - }; - he = (function () { - function t(n, i) { - var o, - s = 0, - a = n.length; - for (n = n.slice(); a--; ) ((o = n[a] * i + s), (n[a] = o % J | 0), (s = (o / J) | 0)); - return (s && n.unshift(s), n); - } - function e(n, i, o, s) { - var a, f; - if (o != s) f = o > s ? 1 : -1; - else - for (a = f = 0; a < o; a++) - if (n[a] != i[a]) { - f = n[a] > i[a] ? 1 : -1; - break; - } - return f; - } - function r(n, i, o) { - for (var s = 0; o--; ) ((n[o] -= s), (s = n[o] < i[o] ? 1 : 0), (n[o] = s * J + n[o] - i[o])); - for (; !n[0] && n.length > 1; ) n.shift(); - } - return function (n, i, o, s) { - var a, - f, - h, - C, - R, - k, - A, - _, - O, - D, - ye, - z, - F, - Y, - Se, - xr, - se, - St, - Ot = n.constructor, - Yo = n.s == i.s ? 1 : -1, - le = n.d, - B = i.d; - if (!n.s) return new Ot(n); - if (!i.s) throw Error(oe + 'Division by zero'); - for (f = n.e - i.e, se = B.length, Se = le.length, A = new Ot(Yo), _ = A.d = [], h = 0; B[h] == (le[h] || 0); ) - ++h; - if ( - (B[h] > (le[h] || 0) && --f, - o == null ? (z = o = Ot.precision) : s ? (z = o + (j(n) - j(i)) + 1) : (z = o), - z < 0) - ) - return new Ot(0); - if (((z = (z / N + 2) | 0), (h = 0), se == 1)) - for (C = 0, B = B[0], z++; (h < Se || C) && z--; h++) - ((F = C * J + (le[h] || 0)), (_[h] = (F / B) | 0), (C = F % B | 0)); - else { - for ( - C = (J / (B[0] + 1)) | 0, - C > 1 && ((B = t(B, C)), (le = t(le, C)), (se = B.length), (Se = le.length)), - Y = se, - O = le.slice(0, se), - D = O.length; - D < se; - - ) - O[D++] = 0; - ((St = B.slice()), St.unshift(0), (xr = B[0]), B[1] >= J / 2 && ++xr); - do - ((C = 0), - (a = e(B, O, se, D)), - a < 0 - ? ((ye = O[0]), - se != D && (ye = ye * J + (O[1] || 0)), - (C = (ye / xr) | 0), - C > 1 - ? (C >= J && (C = J - 1), - (R = t(B, C)), - (k = R.length), - (D = O.length), - (a = e(R, O, k, D)), - a == 1 && (C--, r(R, se < k ? St : B, k))) - : (C == 0 && (a = C = 1), (R = B.slice())), - (k = R.length), - k < D && R.unshift(0), - r(O, R, D), - a == -1 && ((D = O.length), (a = e(B, O, se, D)), a < 1 && (C++, r(O, se < D ? St : B, D))), - (D = O.length)) - : a === 0 && (C++, (O = [0])), - (_[h++] = C), - a && O[0] ? (O[D++] = le[Y] || 0) : ((O = [le[Y]]), (D = 1))); - while ((Y++ < Se || O[0] !== void 0) && z--); - } - return (_[0] || _.shift(), (A.e = f), L(A, s ? o + j(A) + 1 : o)); - }; - })(); - Cr = xn(ps); - te = new Cr(1); - Mt = Cr; - }); -var v, - be, - l = ie(() => { - 'use strict'; - En(); - ((v = class extends Mt { - static isDecimal(e) { - return e instanceof Mt; - } - static random(e = 20) { - { - let n = globalThis.crypto.getRandomValues(new Uint8Array(e)).reduce((i, o) => i + o, ''); - return new Mt(`0.${n.slice(0, e)}`); - } - } - }), - (be = v)); - }); -function xs() { - return !1; -} -function kr() { - return { - dev: 0, - ino: 0, - mode: 0, - nlink: 0, - uid: 0, - gid: 0, - rdev: 0, - size: 0, - blksize: 0, - blocks: 0, - atimeMs: 0, - mtimeMs: 0, - ctimeMs: 0, - birthtimeMs: 0, - atime: new Date(), - mtime: new Date(), - ctime: new Date(), - birthtime: new Date(), - }; -} -function Es() { - return kr(); -} -function Ps() { - return []; -} -function vs(t) { - t(null, []); -} -function Ts() { - return ''; -} -function Cs() { - return ''; -} -function Rs() {} -function As() {} -function Ss() {} -function Os() {} -function ks() {} -function Ds() {} -function Is() {} -function Ms() {} -function _s() { - return { close: () => {}, on: () => {}, removeAllListeners: () => {} }; -} -function Ls(t, e) { - e(null, kr()); -} -var Fs, - Us, - Nn, - qn = ie(() => { - 'use strict'; - u(); - c(); - m(); - p(); - d(); - l(); - ((Fs = {}), - (Us = { - existsSync: xs, - lstatSync: kr, - stat: Ls, - statSync: Es, - readdirSync: Ps, - readdir: vs, - readlinkSync: Ts, - realpathSync: Cs, - chmodSync: Rs, - renameSync: As, - mkdirSync: Ss, - rmdirSync: Os, - rmSync: ks, - unlinkSync: Ds, - watchFile: Is, - unwatchFile: Ms, - watch: _s, - promises: Fs, - }), - (Nn = Us)); - }); -function Ns(...t) { - return t.join('/'); -} -function qs(...t) { - return t.join('/'); -} -function Bs(t) { - let e = Bn(t), - r = Vn(t), - [n, i] = e.split('.'); - return { root: '/', dir: r, base: e, ext: i, name: n }; -} -function Bn(t) { - let e = t.split('/'); - return e[e.length - 1]; -} -function Vn(t) { - return t.split('/').slice(0, -1).join('/'); -} -function js(t) { - let e = t.split('/').filter((i) => i !== '' && i !== '.'), - r = []; - for (let i of e) i === '..' ? r.pop() : r.push(i); - let n = r.join('/'); - return t.startsWith('/') ? '/' + n : n; -} -var jn, - Vs, - $s, - Qs, - Ut, - $n = ie(() => { - 'use strict'; - u(); - c(); - m(); - p(); - d(); - l(); - ((jn = '/'), (Vs = ':')); - (($s = { sep: jn }), - (Qs = { - basename: Bn, - delimiter: Vs, - dirname: Vn, - join: qs, - normalize: js, - parse: Bs, - posix: $s, - resolve: Ns, - sep: jn, - }), - (Ut = Qs)); - }); -var Qn = Fe((lm, Js) => { - Js.exports = { - name: '@prisma/internals', - version: '6.14.0', - description: "This package is intended for Prisma's internal use", - main: 'dist/index.js', - types: 'dist/index.d.ts', - repository: { type: 'git', url: 'https://github.com/prisma/prisma.git', directory: 'packages/internals' }, - homepage: 'https://www.prisma.io', - author: 'Tim Suchanek ', - bugs: 'https://github.com/prisma/prisma/issues', - license: 'Apache-2.0', - scripts: { - dev: 'DEV=true tsx helpers/build.ts', - build: 'tsx helpers/build.ts', - test: 'dotenv -e ../../.db.env -- jest --silent', - prepublishOnly: 'pnpm run build', - }, - files: ['README.md', 'dist', '!**/libquery_engine*', '!dist/get-generators/engines/*', 'scripts'], - devDependencies: { - '@babel/helper-validator-identifier': '7.25.9', - '@opentelemetry/api': '1.9.0', - '@swc/core': '1.11.5', - '@swc/jest': '0.2.37', - '@types/babel__helper-validator-identifier': '7.15.2', - '@types/jest': '29.5.14', - '@types/node': '18.19.76', - '@types/resolve': '1.20.6', - archiver: '6.0.2', - 'checkpoint-client': '1.1.33', - 'cli-truncate': '4.0.0', - dotenv: '16.5.0', - empathic: '2.0.0', - esbuild: '0.25.5', - 'escape-string-regexp': '5.0.0', - execa: '5.1.1', - 'fast-glob': '3.3.3', - 'find-up': '7.0.0', - 'fp-ts': '2.16.9', - 'fs-extra': '11.3.0', - 'fs-jetpack': '5.1.0', - 'global-dirs': '4.0.0', - globby: '11.1.0', - 'identifier-regex': '1.0.0', - 'indent-string': '4.0.0', - 'is-windows': '1.0.2', - 'is-wsl': '3.1.0', - jest: '29.7.0', - 'jest-junit': '16.0.0', - kleur: '4.1.5', - 'mock-stdin': '1.0.0', - 'new-github-issue-url': '0.2.1', - 'node-fetch': '3.3.2', - 'npm-packlist': '5.1.3', - open: '7.4.2', - 'p-map': '4.0.0', - resolve: '1.22.10', - 'string-width': '7.2.0', - 'strip-ansi': '6.0.1', - 'strip-indent': '4.0.0', - 'temp-dir': '2.0.0', - tempy: '1.0.1', - 'terminal-link': '4.0.0', - tmp: '0.2.3', - 'ts-node': '10.9.2', - 'ts-pattern': '5.6.2', - 'ts-toolbelt': '9.6.0', - typescript: '5.4.5', - yarn: '1.22.22', - }, - dependencies: { - '@prisma/config': 'workspace:*', - '@prisma/debug': 'workspace:*', - '@prisma/dmmf': 'workspace:*', - '@prisma/driver-adapter-utils': 'workspace:*', - '@prisma/engines': 'workspace:*', - '@prisma/fetch-engine': 'workspace:*', - '@prisma/generator': 'workspace:*', - '@prisma/generator-helper': 'workspace:*', - '@prisma/get-platform': 'workspace:*', - '@prisma/prisma-schema-wasm': '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - '@prisma/schema-engine-wasm': '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - '@prisma/schema-files-loader': 'workspace:*', - arg: '5.0.2', - prompts: '2.4.2', - }, - peerDependencies: { typescript: '>=5.1.0' }, - peerDependenciesMeta: { typescript: { optional: !0 } }, - sideEffects: !1, - }; -}); -var Hn = Fe((xp, Kn) => { - 'use strict'; - u(); - c(); - m(); - p(); - d(); - l(); - Kn.exports = (t, e = 1, r) => { - if (((r = { indent: ' ', includeEmptyLines: !1, ...r }), typeof t != 'string')) - throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``); - if (typeof e != 'number') throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``); - if (typeof r.indent != 'string') - throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``); - if (e === 0) return t; - let n = r.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - return t.replace(n, r.indent.repeat(e)); - }; -}); -var Xn = Fe((_p, Yn) => { - 'use strict'; - u(); - c(); - m(); - p(); - d(); - l(); - Yn.exports = ({ onlyFirst: t = !1 } = {}) => { - let e = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))', - ].join('|'); - return new RegExp(e, t ? void 0 : 'g'); - }; -}); -var ei = Fe((Vp, Zn) => { - 'use strict'; - u(); - c(); - m(); - p(); - d(); - l(); - var ta = Xn(); - Zn.exports = (t) => (typeof t == 'string' ? t.replace(ta(), '') : t); -}); -var Br = Fe((zy, oi) => { - 'use strict'; - u(); - c(); - m(); - p(); - d(); - l(); - oi.exports = (function () { - function t(e, r, n, i, o) { - return e < r || n < r ? (e > n ? n + 1 : e + 1) : i === o ? r : r + 1; - } - return function (e, r) { - if (e === r) return 0; - if (e.length > r.length) { - var n = e; - ((e = r), (r = n)); - } - for (var i = e.length, o = r.length; i > 0 && e.charCodeAt(i - 1) === r.charCodeAt(o - 1); ) (i--, o--); - for (var s = 0; s < i && e.charCodeAt(s) === r.charCodeAt(s); ) s++; - if (((i -= s), (o -= s), i === 0 || o < 3)) return o; - var a = 0, - f, - h, - C, - R, - k, - A, - _, - O, - D, - ye, - z, - F, - Y = []; - for (f = 0; f < i; f++) (Y.push(f + 1), Y.push(e.charCodeAt(s + f))); - for (var Se = Y.length - 1; a < o - 3; ) - for ( - D = r.charCodeAt(s + (h = a)), - ye = r.charCodeAt(s + (C = a + 1)), - z = r.charCodeAt(s + (R = a + 2)), - F = r.charCodeAt(s + (k = a + 3)), - A = a += 4, - f = 0; - f < Se; - f += 2 - ) - ((_ = Y[f]), - (O = Y[f + 1]), - (h = t(_, h, C, D, O)), - (C = t(h, C, R, ye, O)), - (R = t(C, R, k, z, O)), - (A = t(R, k, A, F, O)), - (Y[f] = A), - (k = R), - (R = C), - (C = h), - (h = _)); - for (; a < o; ) - for (D = r.charCodeAt(s + (h = a)), A = ++a, f = 0; f < Se; f += 2) - ((_ = Y[f]), (Y[f] = A = t(_, h, A, D, Y[f + 1])), (h = _)); - return A; - }; - })(); -}); -var ci = ie(() => { - 'use strict'; - u(); - c(); - m(); - p(); - d(); - l(); -}); -var mi = ie(() => { - 'use strict'; - u(); - c(); - m(); - p(); - d(); - l(); -}); -var Li = Fe((YP, Ga) => { - Ga.exports = { - name: '@prisma/engines-version', - version: '6.14.0-25.717184b7b35ea05dfa71a3236b7af656013e1e49', - main: 'index.js', - types: 'index.d.ts', - license: 'Apache-2.0', - author: 'Tim Suchanek ', - prisma: { enginesVersion: '717184b7b35ea05dfa71a3236b7af656013e1e49' }, - repository: { - type: 'git', - url: 'https://github.com/prisma/engines-wrapper.git', - directory: 'packages/engines-version', - }, - devDependencies: { '@types/node': '18.19.76', typescript: '4.9.5' }, - files: ['index.js', 'index.d.ts'], - scripts: { build: 'tsc -d' }, - }; -}); -var sr, - Fi = ie(() => { - 'use strict'; - u(); - c(); - m(); - p(); - d(); - l(); - sr = class { - events = {}; - on(e, r) { - return (this.events[e] || (this.events[e] = []), this.events[e].push(r), this); - } - emit(e, ...r) { - return this.events[e] - ? (this.events[e].forEach((n) => { - n(...r); - }), - !0) - : !1; - } - }; - }); -var eu = {}; -nt(eu, { - DMMF: () => pt, - Debug: () => G, - Decimal: () => be, - Extensions: () => Rr, - MetricsClient: () => Ye, - PrismaClientInitializationError: () => I, - PrismaClientKnownRequestError: () => Z, - PrismaClientRustPanicError: () => xe, - PrismaClientUnknownRequestError: () => Q, - PrismaClientValidationError: () => K, - Public: () => Ar, - Sql: () => ee, - createParam: () => Ai, - defineDmmfProperty: () => Mi, - deserializeJsonResponse: () => et, - deserializeRawResult: () => br, - dmmfToRuntimeDataModel: () => ii, - empty: () => Ni, - getPrismaClient: () => Ko, - getRuntime: () => Re, - join: () => Ui, - makeStrictEnum: () => Ho, - makeTypedQueryFactory: () => _i, - objectEnumValues: () => zt, - raw: () => Hr, - serializeJsonQuery: () => nr, - skip: () => rr, - sqltag: () => zr, - warnEnvConflicts: () => void 0, - warnOnce: () => ut, -}); -module.exports = ns(eu); -u(); -c(); -m(); -p(); -d(); -l(); -var Rr = {}; -nt(Rr, { defineExtension: () => Pn, getExtensionContext: () => vn }); -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -function Pn(t) { - return typeof t == 'function' ? t : (e) => e.$extends(t); -} -u(); -c(); -m(); -p(); -d(); -l(); -function vn(t) { - return t; -} -var Ar = {}; -nt(Ar, { validator: () => Tn }); -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -function Tn(...t) { - return (e) => e; -} -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -var Sr, - Cn, - Rn, - An, - Sn = !0; -typeof g < 'u' && - (({ FORCE_COLOR: Sr, NODE_DISABLE_COLORS: Cn, NO_COLOR: Rn, TERM: An } = g.env || {}), - (Sn = g.stdout && g.stdout.isTTY)); -var gs = { enabled: !Cn && Rn == null && An !== 'dumb' && ((Sr != null && Sr !== '0') || Sn) }; -function U(t, e) { - let r = new RegExp(`\\x1b\\[${e}m`, 'g'), - n = `\x1B[${t}m`, - i = `\x1B[${e}m`; - return function (o) { - return !gs.enabled || o == null ? o : n + (~('' + o).indexOf(i) ? o.replace(r, i + n) : o) + i; - }; -} -var Xu = U(0, 0), - _t = U(1, 22), - Lt = U(2, 22), - Zu = U(3, 23), - On = U(4, 24), - ec = U(7, 27), - tc = U(8, 28), - rc = U(9, 29), - nc = U(30, 39), - qe = U(31, 39), - kn = U(32, 39), - Dn = U(33, 39), - In = U(34, 39), - ic = U(35, 39), - Mn = U(36, 39), - oc = U(37, 39), - _n = U(90, 39), - sc = U(90, 39), - ac = U(40, 49), - lc = U(41, 49), - uc = U(42, 49), - cc = U(43, 49), - mc = U(44, 49), - pc = U(45, 49), - dc = U(46, 49), - fc = U(47, 49); -u(); -c(); -m(); -p(); -d(); -l(); -var ys = 100, - Ln = ['green', 'yellow', 'blue', 'magenta', 'cyan', 'red'], - Ft = [], - Fn = Date.now(), - hs = 0, - Or = typeof g < 'u' ? g.env : {}; -globalThis.DEBUG ??= Or.DEBUG ?? ''; -globalThis.DEBUG_COLORS ??= Or.DEBUG_COLORS ? Or.DEBUG_COLORS === 'true' : !0; -var st = { - enable(t) { - typeof t == 'string' && (globalThis.DEBUG = t); - }, - disable() { - let t = globalThis.DEBUG; - return ((globalThis.DEBUG = ''), t); - }, - enabled(t) { - let e = globalThis.DEBUG.split(',').map((i) => i.replace(/[.+?^${}()|[\]\\]/g, '\\$&')), - r = e.some((i) => (i === '' || i[0] === '-' ? !1 : t.match(RegExp(i.split('*').join('.*') + '$')))), - n = e.some((i) => (i === '' || i[0] !== '-' ? !1 : t.match(RegExp(i.slice(1).split('*').join('.*') + '$')))); - return r && !n; - }, - log: (...t) => { - let [e, r, ...n] = t; - (console.warn ?? console.log)(`${e} ${r}`, ...n); - }, - formatters: {}, -}; -function bs(t) { - let e = { color: Ln[hs++ % Ln.length], enabled: st.enabled(t), namespace: t, log: st.log, extend: () => {} }, - r = (...n) => { - let { enabled: i, namespace: o, color: s, log: a } = e; - if ((n.length !== 0 && Ft.push([o, ...n]), Ft.length > ys && Ft.shift(), st.enabled(o) || i)) { - let f = n.map((C) => (typeof C == 'string' ? C : ws(C))), - h = `+${Date.now() - Fn}ms`; - ((Fn = Date.now()), a(o, ...f, h)); - } - }; - return new Proxy(r, { get: (n, i) => e[i], set: (n, i, o) => (e[i] = o) }); -} -var G = new Proxy(bs, { get: (t, e) => st[e], set: (t, e, r) => (st[e] = r) }); -function ws(t, e = 2) { - let r = new Set(); - return JSON.stringify( - t, - (n, i) => { - if (typeof i == 'object' && i !== null) { - if (r.has(i)) return '[Circular *]'; - r.add(i); - } else if (typeof i == 'bigint') return i.toString(); - return i; - }, - e - ); -} -function Un() { - Ft.length = 0; -} -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -var Dr = [ - 'darwin', - 'darwin-arm64', - 'debian-openssl-1.0.x', - 'debian-openssl-1.1.x', - 'debian-openssl-3.0.x', - 'rhel-openssl-1.0.x', - 'rhel-openssl-1.1.x', - 'rhel-openssl-3.0.x', - 'linux-arm64-openssl-1.1.x', - 'linux-arm64-openssl-1.0.x', - 'linux-arm64-openssl-3.0.x', - 'linux-arm-openssl-1.1.x', - 'linux-arm-openssl-1.0.x', - 'linux-arm-openssl-3.0.x', - 'linux-musl', - 'linux-musl-openssl-3.0.x', - 'linux-musl-arm64-openssl-1.1.x', - 'linux-musl-arm64-openssl-3.0.x', - 'linux-nixos', - 'linux-static-x64', - 'linux-static-arm64', - 'windows', - 'freebsd11', - 'freebsd12', - 'freebsd13', - 'freebsd14', - 'freebsd15', - 'openbsd', - 'netbsd', - 'arm', -]; -u(); -c(); -m(); -p(); -d(); -l(); -var Gs = Qn(), - Ir = Gs.version; -u(); -c(); -m(); -p(); -d(); -l(); -function Be(t) { - let e = Ws(); - return ( - e || - (t?.config.engineType === 'library' - ? 'library' - : t?.config.engineType === 'binary' - ? 'binary' - : t?.config.engineType === 'client' - ? 'client' - : Ks(t)) - ); -} -function Ws() { - let t = g.env.PRISMA_CLIENT_ENGINE_TYPE; - return t === 'library' ? 'library' : t === 'binary' ? 'binary' : t === 'client' ? 'client' : void 0; -} -function Ks(t) { - return t?.previewFeatures.includes('queryCompiler') ? 'client' : 'library'; -} -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -function Mr(t) { - return t.name === 'DriverAdapterError' && typeof t.cause == 'object'; -} -u(); -c(); -m(); -p(); -d(); -l(); -function Nt(t) { - return { - ok: !0, - value: t, - map(e) { - return Nt(e(t)); - }, - flatMap(e) { - return e(t); - }, - }; -} -function Ie(t) { - return { - ok: !1, - error: t, - map() { - return Ie(t); - }, - flatMap() { - return Ie(t); - }, - }; -} -var Jn = G('driver-adapter-utils'), - _r = class { - registeredErrors = []; - consumeError(e) { - return this.registeredErrors[e]; - } - registerNewError(e) { - let r = 0; - for (; this.registeredErrors[r] !== void 0; ) r++; - return ((this.registeredErrors[r] = { error: e }), r); - } - }; -var qt = (t, e = new _r()) => { - let r = { - adapterName: t.adapterName, - errorRegistry: e, - queryRaw: we(e, t.queryRaw.bind(t)), - executeRaw: we(e, t.executeRaw.bind(t)), - executeScript: we(e, t.executeScript.bind(t)), - dispose: we(e, t.dispose.bind(t)), - provider: t.provider, - startTransaction: async (...n) => (await we(e, t.startTransaction.bind(t))(...n)).map((o) => Hs(e, o)), - }; - return (t.getConnectionInfo && (r.getConnectionInfo = zs(e, t.getConnectionInfo.bind(t))), r); - }, - Hs = (t, e) => ({ - adapterName: e.adapterName, - provider: e.provider, - options: e.options, - queryRaw: we(t, e.queryRaw.bind(e)), - executeRaw: we(t, e.executeRaw.bind(e)), - commit: we(t, e.commit.bind(e)), - rollback: we(t, e.rollback.bind(e)), - }); -function we(t, e) { - return async (...r) => { - try { - return Nt(await e(...r)); - } catch (n) { - if ((Jn('[error@wrapAsync]', n), Mr(n))) return Ie(n.cause); - let i = t.registerNewError(n); - return Ie({ kind: 'GenericJs', id: i }); - } - }; -} -function zs(t, e) { - return (...r) => { - try { - return Nt(e(...r)); - } catch (n) { - if ((Jn('[error@wrapSync]', n), Mr(n))) return Ie(n.cause); - let i = t.registerNewError(n); - return Ie({ kind: 'GenericJs', id: i }); - } - }; -} -u(); -c(); -m(); -p(); -d(); -l(); -var Gn = 'prisma+postgres', - Wn = `${Gn}:`; -function Lr(t) { - return t?.toString().startsWith(`${Wn}//`) ?? !1; -} -var lt = {}; -nt(lt, { - error: () => Zs, - info: () => Xs, - log: () => Ys, - query: () => ea, - should: () => zn, - tags: () => at, - warn: () => Fr, -}); -u(); -c(); -m(); -p(); -d(); -l(); -var at = { error: qe('prisma:error'), warn: Dn('prisma:warn'), info: Mn('prisma:info'), query: In('prisma:query') }, - zn = { warn: () => !g.env.PRISMA_DISABLE_WARNINGS }; -function Ys(...t) { - console.log(...t); -} -function Fr(t, ...e) { - zn.warn() && console.warn(`${at.warn} ${t}`, ...e); -} -function Xs(t, ...e) { - console.info(`${at.info} ${t}`, ...e); -} -function Zs(t, ...e) { - console.error(`${at.error} ${t}`, ...e); -} -function ea(t, ...e) { - console.log(`${at.query} ${t}`, ...e); -} -u(); -c(); -m(); -p(); -d(); -l(); -function Bt(t, e) { - if (!t) - throw new Error( - `${e}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report` - ); -} -u(); -c(); -m(); -p(); -d(); -l(); -function Me(t, e) { - throw new Error(e); -} -u(); -c(); -m(); -p(); -d(); -l(); -function Ur(t, e) { - return Object.prototype.hasOwnProperty.call(t, e); -} -u(); -c(); -m(); -p(); -d(); -l(); -function Vt(t, e) { - let r = {}; - for (let n of Object.keys(t)) r[n] = e(t[n], n); - return r; -} -u(); -c(); -m(); -p(); -d(); -l(); -function Nr(t, e) { - if (t.length === 0) return; - let r = t[0]; - for (let n = 1; n < t.length; n++) e(r, t[n]) < 0 && (r = t[n]); - return r; -} -u(); -c(); -m(); -p(); -d(); -l(); -function re(t, e) { - Object.defineProperty(t, 'name', { value: e, configurable: !0 }); -} -u(); -c(); -m(); -p(); -d(); -l(); -var ti = new Set(), - ut = (t, e, ...r) => { - ti.has(t) || (ti.add(t), Fr(e, ...r)); - }; -var I = class t extends Error { - clientVersion; - errorCode; - retryable; - constructor(e, r, n) { - (super(e), - (this.name = 'PrismaClientInitializationError'), - (this.clientVersion = r), - (this.errorCode = n), - Error.captureStackTrace(t)); - } - get [Symbol.toStringTag]() { - return 'PrismaClientInitializationError'; - } -}; -re(I, 'PrismaClientInitializationError'); -u(); -c(); -m(); -p(); -d(); -l(); -var Z = class extends Error { - code; - meta; - clientVersion; - batchRequestIdx; - constructor(e, { code: r, clientVersion: n, meta: i, batchRequestIdx: o }) { - (super(e), - (this.name = 'PrismaClientKnownRequestError'), - (this.code = r), - (this.clientVersion = n), - (this.meta = i), - Object.defineProperty(this, 'batchRequestIdx', { value: o, enumerable: !1, writable: !0 })); - } - get [Symbol.toStringTag]() { - return 'PrismaClientKnownRequestError'; - } -}; -re(Z, 'PrismaClientKnownRequestError'); -u(); -c(); -m(); -p(); -d(); -l(); -var xe = class extends Error { - clientVersion; - constructor(e, r) { - (super(e), (this.name = 'PrismaClientRustPanicError'), (this.clientVersion = r)); - } - get [Symbol.toStringTag]() { - return 'PrismaClientRustPanicError'; - } -}; -re(xe, 'PrismaClientRustPanicError'); -u(); -c(); -m(); -p(); -d(); -l(); -var Q = class extends Error { - clientVersion; - batchRequestIdx; - constructor(e, { clientVersion: r, batchRequestIdx: n }) { - (super(e), - (this.name = 'PrismaClientUnknownRequestError'), - (this.clientVersion = r), - Object.defineProperty(this, 'batchRequestIdx', { value: n, writable: !0, enumerable: !1 })); - } - get [Symbol.toStringTag]() { - return 'PrismaClientUnknownRequestError'; - } -}; -re(Q, 'PrismaClientUnknownRequestError'); -u(); -c(); -m(); -p(); -d(); -l(); -var K = class extends Error { - name = 'PrismaClientValidationError'; - clientVersion; - constructor(e, { clientVersion: r }) { - (super(e), (this.clientVersion = r)); - } - get [Symbol.toStringTag]() { - return 'PrismaClientValidationError'; - } -}; -re(K, 'PrismaClientValidationError'); -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -var me = class { - _map = new Map(); - get(e) { - return this._map.get(e)?.value; - } - set(e, r) { - this._map.set(e, { value: r }); - } - getOrCreate(e, r) { - let n = this._map.get(e); - if (n) return n.value; - let i = r(); - return (this.set(e, i), i); - } -}; -u(); -c(); -m(); -p(); -d(); -l(); -function ve(t) { - return t.substring(0, 1).toLowerCase() + t.substring(1); -} -u(); -c(); -m(); -p(); -d(); -l(); -function ni(t, e) { - let r = {}; - for (let n of t) { - let i = n[e]; - r[i] = n; - } - return r; -} -u(); -c(); -m(); -p(); -d(); -l(); -function ct(t) { - let e; - return { - get() { - return (e || (e = { value: t() }), e.value); - }, - }; -} -u(); -c(); -m(); -p(); -d(); -l(); -function ii(t) { - return { models: qr(t.models), enums: qr(t.enums), types: qr(t.types) }; -} -function qr(t) { - let e = {}; - for (let { name: r, ...n } of t) e[r] = n; - return e; -} -u(); -c(); -m(); -p(); -d(); -l(); -function Ve(t) { - return t instanceof Date || Object.prototype.toString.call(t) === '[object Date]'; -} -function jt(t) { - return t.toString() !== 'Invalid Date'; -} -u(); -c(); -m(); -p(); -d(); -l(); -l(); -function je(t) { - return v.isDecimal(t) - ? !0 - : t !== null && - typeof t == 'object' && - typeof t.s == 'number' && - typeof t.e == 'number' && - typeof t.toFixed == 'function' && - Array.isArray(t.d); -} -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -var pt = {}; -nt(pt, { ModelAction: () => mt, datamodelEnumToSchemaEnum: () => ra }); -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -function ra(t) { - return { name: t.name, values: t.values.map((e) => e.name) }; -} -u(); -c(); -m(); -p(); -d(); -l(); -var mt = ((F) => ( - (F.findUnique = 'findUnique'), - (F.findUniqueOrThrow = 'findUniqueOrThrow'), - (F.findFirst = 'findFirst'), - (F.findFirstOrThrow = 'findFirstOrThrow'), - (F.findMany = 'findMany'), - (F.create = 'create'), - (F.createMany = 'createMany'), - (F.createManyAndReturn = 'createManyAndReturn'), - (F.update = 'update'), - (F.updateMany = 'updateMany'), - (F.updateManyAndReturn = 'updateManyAndReturn'), - (F.upsert = 'upsert'), - (F.delete = 'delete'), - (F.deleteMany = 'deleteMany'), - (F.groupBy = 'groupBy'), - (F.count = 'count'), - (F.aggregate = 'aggregate'), - (F.findRaw = 'findRaw'), - (F.aggregateRaw = 'aggregateRaw'), - F -))(mt || {}); -var na = it(Hn()); -var ia = { red: qe, gray: _n, dim: Lt, bold: _t, underline: On, highlightSource: (t) => t.highlight() }, - oa = { red: (t) => t, gray: (t) => t, dim: (t) => t, bold: (t) => t, underline: (t) => t, highlightSource: (t) => t }; -function sa({ message: t, originalMethod: e, isPanic: r, callArguments: n }) { - return { functionName: `prisma.${e}()`, message: t, isPanic: r ?? !1, callArguments: n }; -} -function aa({ functionName: t, location: e, message: r, isPanic: n, contextLines: i, callArguments: o }, s) { - let a = [''], - f = e ? ' in' : ':'; - if ( - (n - ? (a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold('on us')}, you did nothing wrong.`)), - a.push(s.red(`It occurred in the ${s.bold(`\`${t}\``)} invocation${f}`))) - : a.push(s.red(`Invalid ${s.bold(`\`${t}\``)} invocation${f}`)), - e && a.push(s.underline(la(e))), - i) - ) { - a.push(''); - let h = [i.toString()]; - (o && (h.push(o), h.push(s.dim(')'))), a.push(h.join('')), o && a.push('')); - } else (a.push(''), o && a.push(o), a.push('')); - return ( - a.push(r), - a.join(` -`) - ); -} -function la(t) { - let e = [t.fileName]; - return (t.lineNumber && e.push(String(t.lineNumber)), t.columnNumber && e.push(String(t.columnNumber)), e.join(':')); -} -function $t(t) { - let e = t.showColors ? ia : oa, - r; - return (typeof $getTemplateParameters < 'u' ? (r = $getTemplateParameters(t, e)) : (r = sa(t)), aa(r, e)); -} -u(); -c(); -m(); -p(); -d(); -l(); -var di = it(Br()); -u(); -c(); -m(); -p(); -d(); -l(); -function li(t, e, r) { - let n = ui(t), - i = ua(n), - o = ma(i); - o ? Qt(o, e, r) : e.addErrorMessage(() => 'Unknown error'); -} -function ui(t) { - return t.errors.flatMap((e) => (e.kind === 'Union' ? ui(e) : [e])); -} -function ua(t) { - let e = new Map(), - r = []; - for (let n of t) { - if (n.kind !== 'InvalidArgumentType') { - r.push(n); - continue; - } - let i = `${n.selectionPath.join('.')}:${n.argumentPath.join('.')}`, - o = e.get(i); - o - ? e.set(i, { ...n, argument: { ...n.argument, typeNames: ca(o.argument.typeNames, n.argument.typeNames) } }) - : e.set(i, n); - } - return (r.push(...e.values()), r); -} -function ca(t, e) { - return [...new Set(t.concat(e))]; -} -function ma(t) { - return Nr(t, (e, r) => { - let n = si(e), - i = si(r); - return n !== i ? n - i : ai(e) - ai(r); - }); -} -function si(t) { - let e = 0; - return ( - Array.isArray(t.selectionPath) && (e += t.selectionPath.length), - Array.isArray(t.argumentPath) && (e += t.argumentPath.length), - e - ); -} -function ai(t) { - switch (t.kind) { - case 'InvalidArgumentValue': - case 'ValueTooLarge': - return 20; - case 'InvalidArgumentType': - return 10; - case 'RequiredArgumentMissing': - return -10; - default: - return 0; - } -} -u(); -c(); -m(); -p(); -d(); -l(); -var ne = class { - constructor(e, r) { - this.name = e; - this.value = r; - } - isRequired = !1; - makeRequired() { - return ((this.isRequired = !0), this); - } - write(e) { - let { - colors: { green: r }, - } = e.context; - (e.addMarginSymbol(r(this.isRequired ? '+' : '?')), - e.write(r(this.name)), - this.isRequired || e.write(r('?')), - e.write(r(': ')), - typeof this.value == 'string' ? e.write(r(this.value)) : e.write(this.value)); - } -}; -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -mi(); -u(); -c(); -m(); -p(); -d(); -l(); -var $e = class { - constructor(e = 0, r) { - this.context = r; - this.currentIndent = e; - } - lines = []; - currentLine = ''; - currentIndent = 0; - marginSymbol; - afterNextNewLineCallback; - write(e) { - return (typeof e == 'string' ? (this.currentLine += e) : e.write(this), this); - } - writeJoined(e, r, n = (i, o) => o.write(i)) { - let i = r.length - 1; - for (let o = 0; o < r.length; o++) (n(r[o], this), o !== i && this.write(e)); - return this; - } - writeLine(e) { - return this.write(e).newLine(); - } - newLine() { - (this.lines.push(this.indentedCurrentLine()), (this.currentLine = ''), (this.marginSymbol = void 0)); - let e = this.afterNextNewLineCallback; - return ((this.afterNextNewLineCallback = void 0), e?.(), this); - } - withIndent(e) { - return (this.indent(), e(this), this.unindent(), this); - } - afterNextNewline(e) { - return ((this.afterNextNewLineCallback = e), this); - } - indent() { - return (this.currentIndent++, this); - } - unindent() { - return (this.currentIndent > 0 && this.currentIndent--, this); - } - addMarginSymbol(e) { - return ((this.marginSymbol = e), this); - } - toString() { - return this.lines.concat(this.indentedCurrentLine()).join(` -`); - } - getCurrentLineLength() { - return this.currentLine.length; - } - indentedCurrentLine() { - let e = this.currentLine.padStart(this.currentLine.length + 2 * this.currentIndent); - return this.marginSymbol ? this.marginSymbol + e.slice(1) : e; - } -}; -ci(); -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -var Jt = class { - constructor(e) { - this.value = e; - } - write(e) { - e.write(this.value); - } - markAsError() { - this.value.markAsError(); - } -}; -u(); -c(); -m(); -p(); -d(); -l(); -var Gt = (t) => t, - Wt = { bold: Gt, red: Gt, green: Gt, dim: Gt, enabled: !1 }, - pi = { bold: _t, red: qe, green: kn, dim: Lt, enabled: !0 }, - Qe = { - write(t) { - t.writeLine(','); - }, - }; -u(); -c(); -m(); -p(); -d(); -l(); -var pe = class { - constructor(e) { - this.contents = e; - } - isUnderlined = !1; - color = (e) => e; - underline() { - return ((this.isUnderlined = !0), this); - } - setColor(e) { - return ((this.color = e), this); - } - write(e) { - let r = e.getCurrentLineLength(); - (e.write(this.color(this.contents)), - this.isUnderlined && - e.afterNextNewline(() => { - e.write(' '.repeat(r)).writeLine(this.color('~'.repeat(this.contents.length))); - })); - } -}; -u(); -c(); -m(); -p(); -d(); -l(); -var Te = class { - hasError = !1; - markAsError() { - return ((this.hasError = !0), this); - } -}; -var Je = class extends Te { - items = []; - addItem(e) { - return (this.items.push(new Jt(e)), this); - } - getField(e) { - return this.items[e]; - } - getPrintWidth() { - return this.items.length === 0 ? 2 : Math.max(...this.items.map((r) => r.value.getPrintWidth())) + 2; - } - write(e) { - if (this.items.length === 0) { - this.writeEmpty(e); - return; - } - this.writeWithItems(e); - } - writeEmpty(e) { - let r = new pe('[]'); - (this.hasError && r.setColor(e.context.colors.red).underline(), e.write(r)); - } - writeWithItems(e) { - let { colors: r } = e.context; - (e - .writeLine('[') - .withIndent(() => e.writeJoined(Qe, this.items).newLine()) - .write(']'), - this.hasError && - e.afterNextNewline(() => { - e.writeLine(r.red('~'.repeat(this.getPrintWidth()))); - })); - } - asObject() {} -}; -var Ge = class t extends Te { - fields = {}; - suggestions = []; - addField(e) { - this.fields[e.name] = e; - } - addSuggestion(e) { - this.suggestions.push(e); - } - getField(e) { - return this.fields[e]; - } - getDeepField(e) { - let [r, ...n] = e, - i = this.getField(r); - if (!i) return; - let o = i; - for (let s of n) { - let a; - if ( - (o.value instanceof t ? (a = o.value.getField(s)) : o.value instanceof Je && (a = o.value.getField(Number(s))), - !a) - ) - return; - o = a; - } - return o; - } - getDeepFieldValue(e) { - return e.length === 0 ? this : this.getDeepField(e)?.value; - } - hasField(e) { - return !!this.getField(e); - } - removeAllFields() { - this.fields = {}; - } - removeField(e) { - delete this.fields[e]; - } - getFields() { - return this.fields; - } - isEmpty() { - return Object.keys(this.fields).length === 0; - } - getFieldValue(e) { - return this.getField(e)?.value; - } - getDeepSubSelectionValue(e) { - let r = this; - for (let n of e) { - if (!(r instanceof t)) return; - let i = r.getSubSelectionValue(n); - if (!i) return; - r = i; - } - return r; - } - getDeepSelectionParent(e) { - let r = this.getSelectionParent(); - if (!r) return; - let n = r; - for (let i of e) { - let o = n.value.getFieldValue(i); - if (!o || !(o instanceof t)) return; - let s = o.getSelectionParent(); - if (!s) return; - n = s; - } - return n; - } - getSelectionParent() { - let e = this.getField('select')?.value.asObject(); - if (e) return { kind: 'select', value: e }; - let r = this.getField('include')?.value.asObject(); - if (r) return { kind: 'include', value: r }; - } - getSubSelectionValue(e) { - return this.getSelectionParent()?.value.fields[e].value; - } - getPrintWidth() { - let e = Object.values(this.fields); - return e.length == 0 ? 2 : Math.max(...e.map((n) => n.getPrintWidth())) + 2; - } - write(e) { - let r = Object.values(this.fields); - if (r.length === 0 && this.suggestions.length === 0) { - this.writeEmpty(e); - return; - } - this.writeWithContents(e, r); - } - asObject() { - return this; - } - writeEmpty(e) { - let r = new pe('{}'); - (this.hasError && r.setColor(e.context.colors.red).underline(), e.write(r)); - } - writeWithContents(e, r) { - (e.writeLine('{').withIndent(() => { - e.writeJoined(Qe, [...r, ...this.suggestions]).newLine(); - }), - e.write('}'), - this.hasError && - e.afterNextNewline(() => { - e.writeLine(e.context.colors.red('~'.repeat(this.getPrintWidth()))); - })); - } -}; -u(); -c(); -m(); -p(); -d(); -l(); -var W = class extends Te { - constructor(r) { - super(); - this.text = r; - } - getPrintWidth() { - return this.text.length; - } - write(r) { - let n = new pe(this.text); - (this.hasError && n.underline().setColor(r.context.colors.red), r.write(n)); - } - asObject() {} -}; -u(); -c(); -m(); -p(); -d(); -l(); -var dt = class { - fields = []; - addField(e, r) { - return ( - this.fields.push({ - write(n) { - let { green: i, dim: o } = n.context.colors; - n.write(i(o(`${e}: ${r}`))).addMarginSymbol(i(o('+'))); - }, - }), - this - ); - } - write(e) { - let { - colors: { green: r }, - } = e.context; - e.writeLine(r('{')) - .withIndent(() => { - e.writeJoined(Qe, this.fields).newLine(); - }) - .write(r('}')) - .addMarginSymbol(r('+')); - } -}; -function Qt(t, e, r) { - switch (t.kind) { - case 'MutuallyExclusiveFields': - pa(t, e); - break; - case 'IncludeOnScalar': - da(t, e); - break; - case 'EmptySelection': - fa(t, e, r); - break; - case 'UnknownSelectionField': - ba(t, e); - break; - case 'InvalidSelectionValue': - wa(t, e); - break; - case 'UnknownArgument': - xa(t, e); - break; - case 'UnknownInputField': - Ea(t, e); - break; - case 'RequiredArgumentMissing': - Pa(t, e); - break; - case 'InvalidArgumentType': - va(t, e); - break; - case 'InvalidArgumentValue': - Ta(t, e); - break; - case 'ValueTooLarge': - Ca(t, e); - break; - case 'SomeFieldsMissing': - Ra(t, e); - break; - case 'TooManyFieldsGiven': - Aa(t, e); - break; - case 'Union': - li(t, e, r); - break; - default: - throw new Error('not implemented: ' + t.kind); - } -} -function pa(t, e) { - let r = e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(); - (r && (r.getField(t.firstField)?.markAsError(), r.getField(t.secondField)?.markAsError()), - e.addErrorMessage( - (n) => - `Please ${n.bold('either')} use ${n.green(`\`${t.firstField}\``)} or ${n.green(`\`${t.secondField}\``)}, but ${n.red('not both')} at the same time.` - )); -} -function da(t, e) { - let [r, n] = We(t.selectionPath), - i = t.outputType, - o = e.arguments.getDeepSelectionParent(r)?.value; - if (o && (o.getField(n)?.markAsError(), i)) - for (let s of i.fields) s.isRelation && o.addSuggestion(new ne(s.name, 'true')); - e.addErrorMessage((s) => { - let a = `Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold('include')} statement`; - return ( - i ? (a += ` on model ${s.bold(i.name)}. ${ft(s)}`) : (a += '.'), - (a += ` -Note that ${s.bold('include')} statements only accept relation fields.`), - a - ); - }); -} -function fa(t, e, r) { - let n = e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(); - if (n) { - let i = n.getField('omit')?.value.asObject(); - if (i) { - ga(t, e, i); - return; - } - if (n.hasField('select')) { - ya(t, e); - return; - } - } - if (r?.[ve(t.outputType.name)]) { - ha(t, e); - return; - } - e.addErrorMessage(() => `Unknown field at "${t.selectionPath.join('.')} selection"`); -} -function ga(t, e, r) { - r.removeAllFields(); - for (let n of t.outputType.fields) r.addSuggestion(new ne(n.name, 'false')); - e.addErrorMessage( - (n) => - `The ${n.red('omit')} statement includes every field of the model ${n.bold(t.outputType.name)}. At least one field must be included in the result` - ); -} -function ya(t, e) { - let r = t.outputType, - n = e.arguments.getDeepSelectionParent(t.selectionPath)?.value, - i = n?.isEmpty() ?? !1; - (n && (n.removeAllFields(), yi(n, r)), - e.addErrorMessage((o) => - i - ? `The ${o.red('`select`')} statement for type ${o.bold(r.name)} must not be empty. ${ft(o)}` - : `The ${o.red('`select`')} statement for type ${o.bold(r.name)} needs ${o.bold('at least one truthy value')}.` - )); -} -function ha(t, e) { - let r = new dt(); - for (let i of t.outputType.fields) i.isRelation || r.addField(i.name, 'false'); - let n = new ne('omit', r).makeRequired(); - if (t.selectionPath.length === 0) e.arguments.addSuggestion(n); - else { - let [i, o] = We(t.selectionPath), - a = e.arguments.getDeepSelectionParent(i)?.value.asObject()?.getField(o); - if (a) { - let f = a?.value.asObject() ?? new Ge(); - (f.addSuggestion(n), (a.value = f)); - } - } - e.addErrorMessage( - (i) => - `The global ${i.red('omit')} configuration excludes every field of the model ${i.bold(t.outputType.name)}. At least one field must be included in the result` - ); -} -function ba(t, e) { - let r = hi(t.selectionPath, e); - if (r.parentKind !== 'unknown') { - r.field.markAsError(); - let n = r.parent; - switch (r.parentKind) { - case 'select': - yi(n, t.outputType); - break; - case 'include': - Sa(n, t.outputType); - break; - case 'omit': - Oa(n, t.outputType); - break; - } - } - e.addErrorMessage((n) => { - let i = [`Unknown field ${n.red(`\`${r.fieldName}\``)}`]; - return ( - r.parentKind !== 'unknown' && i.push(`for ${n.bold(r.parentKind)} statement`), - i.push(`on model ${n.bold(`\`${t.outputType.name}\``)}.`), - i.push(ft(n)), - i.join(' ') - ); - }); -} -function wa(t, e) { - let r = hi(t.selectionPath, e); - (r.parentKind !== 'unknown' && r.field.value.markAsError(), - e.addErrorMessage((n) => `Invalid value for selection field \`${n.red(r.fieldName)}\`: ${t.underlyingError}`)); -} -function xa(t, e) { - let r = t.argumentPath[0], - n = e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(); - (n && (n.getField(r)?.markAsError(), ka(n, t.arguments)), - e.addErrorMessage((i) => - fi( - i, - r, - t.arguments.map((o) => o.name) - ) - )); -} -function Ea(t, e) { - let [r, n] = We(t.argumentPath), - i = e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(); - if (i) { - i.getDeepField(t.argumentPath)?.markAsError(); - let o = i.getDeepFieldValue(r)?.asObject(); - o && bi(o, t.inputType); - } - e.addErrorMessage((o) => - fi( - o, - n, - t.inputType.fields.map((s) => s.name) - ) - ); -} -function fi(t, e, r) { - let n = [`Unknown argument \`${t.red(e)}\`.`], - i = Ia(e, r); - return (i && n.push(`Did you mean \`${t.green(i)}\`?`), r.length > 0 && n.push(ft(t)), n.join(' ')); -} -function Pa(t, e) { - let r; - e.addErrorMessage((f) => - r?.value instanceof W && r.value.text === 'null' - ? `Argument \`${f.green(o)}\` must not be ${f.red('null')}.` - : `Argument \`${f.green(o)}\` is missing.` - ); - let n = e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(); - if (!n) return; - let [i, o] = We(t.argumentPath), - s = new dt(), - a = n.getDeepFieldValue(i)?.asObject(); - if (a) { - if (((r = a.getField(o)), r && a.removeField(o), t.inputTypes.length === 1 && t.inputTypes[0].kind === 'object')) { - for (let f of t.inputTypes[0].fields) s.addField(f.name, f.typeNames.join(' | ')); - a.addSuggestion(new ne(o, s).makeRequired()); - } else { - let f = t.inputTypes.map(gi).join(' | '); - a.addSuggestion(new ne(o, f).makeRequired()); - } - if (t.dependentArgumentPath) { - n.getDeepField(t.dependentArgumentPath)?.markAsError(); - let [, f] = We(t.dependentArgumentPath); - e.addErrorMessage( - (h) => `Argument \`${h.green(o)}\` is required because argument \`${h.green(f)}\` was provided.` - ); - } - } -} -function gi(t) { - return t.kind === 'list' ? `${gi(t.elementType)}[]` : t.name; -} -function va(t, e) { - let r = t.argument.name, - n = e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(); - (n && n.getDeepFieldValue(t.argumentPath)?.markAsError(), - e.addErrorMessage((i) => { - let o = Kt( - 'or', - t.argument.typeNames.map((s) => i.green(s)) - ); - return `Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(t.inferredType)}.`; - })); -} -function Ta(t, e) { - let r = t.argument.name, - n = e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(); - (n && n.getDeepFieldValue(t.argumentPath)?.markAsError(), - e.addErrorMessage((i) => { - let o = [`Invalid value for argument \`${i.bold(r)}\``]; - if ((t.underlyingError && o.push(`: ${t.underlyingError}`), o.push('.'), t.argument.typeNames.length > 0)) { - let s = Kt( - 'or', - t.argument.typeNames.map((a) => i.green(a)) - ); - o.push(` Expected ${s}.`); - } - return o.join(''); - })); -} -function Ca(t, e) { - let r = t.argument.name, - n = e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(), - i; - if (n) { - let s = n.getDeepField(t.argumentPath)?.value; - (s?.markAsError(), s instanceof W && (i = s.text)); - } - e.addErrorMessage((o) => { - let s = ['Unable to fit value']; - return (i && s.push(o.red(i)), s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``), s.join(' ')); - }); -} -function Ra(t, e) { - let r = t.argumentPath[t.argumentPath.length - 1], - n = e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(); - if (n) { - let i = n.getDeepFieldValue(t.argumentPath)?.asObject(); - i && bi(i, t.inputType); - } - e.addErrorMessage((i) => { - let o = [`Argument \`${i.bold(r)}\` of type ${i.bold(t.inputType.name)} needs`]; - return ( - t.constraints.minFieldCount === 1 - ? t.constraints.requiredFields - ? o.push( - `${i.green('at least one of')} ${Kt( - 'or', - t.constraints.requiredFields.map((s) => `\`${i.bold(s)}\``) - )} arguments.` - ) - : o.push(`${i.green('at least one')} argument.`) - : o.push(`${i.green(`at least ${t.constraints.minFieldCount}`)} arguments.`), - o.push(ft(i)), - o.join(' ') - ); - }); -} -function Aa(t, e) { - let r = t.argumentPath[t.argumentPath.length - 1], - n = e.arguments.getDeepSubSelectionValue(t.selectionPath)?.asObject(), - i = []; - if (n) { - let o = n.getDeepFieldValue(t.argumentPath)?.asObject(); - o && (o.markAsError(), (i = Object.keys(o.getFields()))); - } - e.addErrorMessage((o) => { - let s = [`Argument \`${o.bold(r)}\` of type ${o.bold(t.inputType.name)} needs`]; - return ( - t.constraints.minFieldCount === 1 && t.constraints.maxFieldCount == 1 - ? s.push(`${o.green('exactly one')} argument,`) - : t.constraints.maxFieldCount == 1 - ? s.push(`${o.green('at most one')} argument,`) - : s.push(`${o.green(`at most ${t.constraints.maxFieldCount}`)} arguments,`), - s.push( - `but you provided ${Kt( - 'and', - i.map((a) => o.red(a)) - )}. Please choose` - ), - t.constraints.maxFieldCount === 1 ? s.push('one.') : s.push(`${t.constraints.maxFieldCount}.`), - s.join(' ') - ); - }); -} -function yi(t, e) { - for (let r of e.fields) t.hasField(r.name) || t.addSuggestion(new ne(r.name, 'true')); -} -function Sa(t, e) { - for (let r of e.fields) r.isRelation && !t.hasField(r.name) && t.addSuggestion(new ne(r.name, 'true')); -} -function Oa(t, e) { - for (let r of e.fields) !t.hasField(r.name) && !r.isRelation && t.addSuggestion(new ne(r.name, 'true')); -} -function ka(t, e) { - for (let r of e) t.hasField(r.name) || t.addSuggestion(new ne(r.name, r.typeNames.join(' | '))); -} -function hi(t, e) { - let [r, n] = We(t), - i = e.arguments.getDeepSubSelectionValue(r)?.asObject(); - if (!i) return { parentKind: 'unknown', fieldName: n }; - let o = i.getFieldValue('select')?.asObject(), - s = i.getFieldValue('include')?.asObject(), - a = i.getFieldValue('omit')?.asObject(), - f = o?.getField(n); - return o && f - ? { parentKind: 'select', parent: o, field: f, fieldName: n } - : ((f = s?.getField(n)), - s && f - ? { parentKind: 'include', field: f, parent: s, fieldName: n } - : ((f = a?.getField(n)), - a && f - ? { parentKind: 'omit', field: f, parent: a, fieldName: n } - : { parentKind: 'unknown', fieldName: n })); -} -function bi(t, e) { - if (e.kind === 'object') - for (let r of e.fields) t.hasField(r.name) || t.addSuggestion(new ne(r.name, r.typeNames.join(' | '))); -} -function We(t) { - let e = [...t], - r = e.pop(); - if (!r) throw new Error('unexpected empty path'); - return [e, r]; -} -function ft({ green: t, enabled: e }) { - return 'Available options are ' + (e ? `listed in ${t('green')}` : 'marked with ?') + '.'; -} -function Kt(t, e) { - if (e.length === 1) return e[0]; - let r = [...e], - n = r.pop(); - return `${r.join(', ')} ${t} ${n}`; -} -var Da = 3; -function Ia(t, e) { - let r = 1 / 0, - n; - for (let i of e) { - let o = (0, di.default)(t, i); - o > Da || (o < r && ((r = o), (n = i))); - } - return n; -} -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -var gt = class { - modelName; - name; - typeName; - isList; - isEnum; - constructor(e, r, n, i, o) { - ((this.modelName = e), (this.name = r), (this.typeName = n), (this.isList = i), (this.isEnum = o)); - } - _toGraphQLInputType() { - let e = this.isList ? 'List' : '', - r = this.isEnum ? 'Enum' : ''; - return `${e}${r}${this.typeName}FieldRefInput<${this.modelName}>`; - } -}; -function Ke(t) { - return t instanceof gt; -} -u(); -c(); -m(); -p(); -d(); -l(); -var Ht = Symbol(), - jr = new WeakMap(), - Ee = class { - constructor(e) { - e === Ht - ? jr.set(this, `Prisma.${this._getName()}`) - : jr.set(this, `new Prisma.${this._getNamespace()}.${this._getName()}()`); - } - _getName() { - return this.constructor.name; - } - toString() { - return jr.get(this); - } - }, - yt = class extends Ee { - _getNamespace() { - return 'NullTypes'; - } - }, - ht = class extends yt { - #e; - }; -$r(ht, 'DbNull'); -var bt = class extends yt { - #e; -}; -$r(bt, 'JsonNull'); -var wt = class extends yt { - #e; -}; -$r(wt, 'AnyNull'); -var zt = { - classes: { DbNull: ht, JsonNull: bt, AnyNull: wt }, - instances: { DbNull: new ht(Ht), JsonNull: new bt(Ht), AnyNull: new wt(Ht) }, -}; -function $r(t, e) { - Object.defineProperty(t, 'name', { value: e, configurable: !0 }); -} -u(); -c(); -m(); -p(); -d(); -l(); -var wi = ': ', - Yt = class { - constructor(e, r) { - this.name = e; - this.value = r; - } - hasError = !1; - markAsError() { - this.hasError = !0; - } - getPrintWidth() { - return this.name.length + this.value.getPrintWidth() + wi.length; - } - write(e) { - let r = new pe(this.name); - (this.hasError && r.underline().setColor(e.context.colors.red), e.write(r).write(wi).write(this.value)); - } - }; -var Qr = class { - arguments; - errorMessages = []; - constructor(e) { - this.arguments = e; - } - write(e) { - e.write(this.arguments); - } - addErrorMessage(e) { - this.errorMessages.push(e); - } - renderAllMessages(e) { - return this.errorMessages.map((r) => r(e)).join(` -`); - } -}; -function He(t) { - return new Qr(xi(t)); -} -function xi(t) { - let e = new Ge(); - for (let [r, n] of Object.entries(t)) { - let i = new Yt(r, Ei(n)); - e.addField(i); - } - return e; -} -function Ei(t) { - if (typeof t == 'string') return new W(JSON.stringify(t)); - if (typeof t == 'number' || typeof t == 'boolean') return new W(String(t)); - if (typeof t == 'bigint') return new W(`${t}n`); - if (t === null) return new W('null'); - if (t === void 0) return new W('undefined'); - if (je(t)) return new W(`new Prisma.Decimal("${t.toFixed()}")`); - if (t instanceof Uint8Array) - return b.isBuffer(t) ? new W(`Buffer.alloc(${t.byteLength})`) : new W(`new Uint8Array(${t.byteLength})`); - if (t instanceof Date) { - let e = jt(t) ? t.toISOString() : 'Invalid Date'; - return new W(`new Date("${e}")`); - } - return t instanceof Ee - ? new W(`Prisma.${t._getName()}`) - : Ke(t) - ? new W(`prisma.${ve(t.modelName)}.$fields.${t.name}`) - : Array.isArray(t) - ? Ma(t) - : typeof t == 'object' - ? xi(t) - : new W(Object.prototype.toString.call(t)); -} -function Ma(t) { - let e = new Je(); - for (let r of t) e.addItem(Ei(r)); - return e; -} -function Xt(t, e) { - let r = e === 'pretty' ? pi : Wt, - n = t.renderAllMessages(r), - i = new $e(0, { colors: r }).write(t).toString(); - return { message: n, args: i }; -} -function Zt({ args: t, errors: e, errorFormat: r, callsite: n, originalMethod: i, clientVersion: o, globalOmit: s }) { - let a = He(t); - for (let R of e) Qt(R, a, s); - let { message: f, args: h } = Xt(a, r), - C = $t({ message: f, callsite: n, originalMethod: i, showColors: r === 'pretty', callArguments: h }); - throw new K(C, { clientVersion: o }); -} -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -function de(t) { - return t.replace(/^./, (e) => e.toLowerCase()); -} -u(); -c(); -m(); -p(); -d(); -l(); -function vi(t, e, r) { - let n = de(r); - return !e.result || !(e.result.$allModels || e.result[n]) - ? t - : _a({ ...t, ...Pi(e.name, t, e.result.$allModels), ...Pi(e.name, t, e.result[n]) }); -} -function _a(t) { - let e = new me(), - r = (n, i) => - e.getOrCreate(n, () => (i.has(n) ? [n] : (i.add(n), t[n] ? t[n].needs.flatMap((o) => r(o, i)) : [n]))); - return Vt(t, (n) => ({ ...n, needs: r(n.name, new Set()) })); -} -function Pi(t, e, r) { - return r - ? Vt(r, ({ needs: n, compute: i }, o) => ({ - name: o, - needs: n ? Object.keys(n).filter((s) => n[s]) : [], - compute: La(e, o, i), - })) - : {}; -} -function La(t, e, r) { - let n = t?.[e]?.compute; - return n ? (i) => r({ ...i, [e]: n(i) }) : r; -} -function Ti(t, e) { - if (!e) return t; - let r = { ...t }; - for (let n of Object.values(e)) if (t[n.name]) for (let i of n.needs) r[i] = !0; - return r; -} -function Ci(t, e) { - if (!e) return t; - let r = { ...t }; - for (let n of Object.values(e)) if (!t[n.name]) for (let i of n.needs) delete r[i]; - return r; -} -var er = class { - constructor(e, r) { - this.extension = e; - this.previous = r; - } - computedFieldsCache = new me(); - modelExtensionsCache = new me(); - queryCallbacksCache = new me(); - clientExtensions = ct(() => - this.extension.client - ? { ...this.previous?.getAllClientExtensions(), ...this.extension.client } - : this.previous?.getAllClientExtensions() - ); - batchCallbacks = ct(() => { - let e = this.previous?.getAllBatchQueryCallbacks() ?? [], - r = this.extension.query?.$__internalBatch; - return r ? e.concat(r) : e; - }); - getAllComputedFields(e) { - return this.computedFieldsCache.getOrCreate(e, () => - vi(this.previous?.getAllComputedFields(e), this.extension, e) - ); - } - getAllClientExtensions() { - return this.clientExtensions.get(); - } - getAllModelExtensions(e) { - return this.modelExtensionsCache.getOrCreate(e, () => { - let r = de(e); - return !this.extension.model || !(this.extension.model[r] || this.extension.model.$allModels) - ? this.previous?.getAllModelExtensions(e) - : { - ...this.previous?.getAllModelExtensions(e), - ...this.extension.model.$allModels, - ...this.extension.model[r], - }; - }); - } - getAllQueryCallbacks(e, r) { - return this.queryCallbacksCache.getOrCreate(`${e}:${r}`, () => { - let n = this.previous?.getAllQueryCallbacks(e, r) ?? [], - i = [], - o = this.extension.query; - return !o || !(o[e] || o.$allModels || o[r] || o.$allOperations) - ? n - : (o[e] !== void 0 && - (o[e][r] !== void 0 && i.push(o[e][r]), o[e].$allOperations !== void 0 && i.push(o[e].$allOperations)), - e !== '$none' && - o.$allModels !== void 0 && - (o.$allModels[r] !== void 0 && i.push(o.$allModels[r]), - o.$allModels.$allOperations !== void 0 && i.push(o.$allModels.$allOperations)), - o[r] !== void 0 && i.push(o[r]), - o.$allOperations !== void 0 && i.push(o.$allOperations), - n.concat(i)); - }); - } - getAllBatchQueryCallbacks() { - return this.batchCallbacks.get(); - } - }, - ze = class t { - constructor(e) { - this.head = e; - } - static empty() { - return new t(); - } - static single(e) { - return new t(new er(e)); - } - isEmpty() { - return this.head === void 0; - } - append(e) { - return new t(new er(e, this.head)); - } - getAllComputedFields(e) { - return this.head?.getAllComputedFields(e); - } - getAllClientExtensions() { - return this.head?.getAllClientExtensions(); - } - getAllModelExtensions(e) { - return this.head?.getAllModelExtensions(e); - } - getAllQueryCallbacks(e, r) { - return this.head?.getAllQueryCallbacks(e, r) ?? []; - } - getAllBatchQueryCallbacks() { - return this.head?.getAllBatchQueryCallbacks() ?? []; - } - }; -u(); -c(); -m(); -p(); -d(); -l(); -var tr = class { - constructor(e) { - this.name = e; - } -}; -function Ri(t) { - return t instanceof tr; -} -function Ai(t) { - return new tr(t); -} -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -var Si = Symbol(), - xt = class { - constructor(e) { - if (e !== Si) throw new Error('Skip instance can not be constructed directly'); - } - ifUndefined(e) { - return e === void 0 ? rr : e; - } - }, - rr = new xt(Si); -function fe(t) { - return t instanceof xt; -} -var Fa = { - findUnique: 'findUnique', - findUniqueOrThrow: 'findUniqueOrThrow', - findFirst: 'findFirst', - findFirstOrThrow: 'findFirstOrThrow', - findMany: 'findMany', - count: 'aggregate', - create: 'createOne', - createMany: 'createMany', - createManyAndReturn: 'createManyAndReturn', - update: 'updateOne', - updateMany: 'updateMany', - updateManyAndReturn: 'updateManyAndReturn', - upsert: 'upsertOne', - delete: 'deleteOne', - deleteMany: 'deleteMany', - executeRaw: 'executeRaw', - queryRaw: 'queryRaw', - aggregate: 'aggregate', - groupBy: 'groupBy', - runCommandRaw: 'runCommandRaw', - findRaw: 'findRaw', - aggregateRaw: 'aggregateRaw', - }, - Oi = 'explicitly `undefined` values are not allowed'; -function nr({ - modelName: t, - action: e, - args: r, - runtimeDataModel: n, - extensions: i = ze.empty(), - callsite: o, - clientMethod: s, - errorFormat: a, - clientVersion: f, - previewFeatures: h, - globalOmit: C, -}) { - let R = new Jr({ - runtimeDataModel: n, - modelName: t, - action: e, - rootArgs: r, - callsite: o, - extensions: i, - selectionPath: [], - argumentPath: [], - originalMethod: s, - errorFormat: a, - clientVersion: f, - previewFeatures: h, - globalOmit: C, - }); - return { modelName: t, action: Fa[e], query: Et(r, R) }; -} -function Et({ select: t, include: e, ...r } = {}, n) { - let i = r.omit; - return (delete r.omit, { arguments: Di(r, n), selection: Ua(t, e, i, n) }); -} -function Ua(t, e, r, n) { - return t - ? (e - ? n.throwValidationError({ - kind: 'MutuallyExclusiveFields', - firstField: 'include', - secondField: 'select', - selectionPath: n.getSelectionPath(), - }) - : r && - n.throwValidationError({ - kind: 'MutuallyExclusiveFields', - firstField: 'omit', - secondField: 'select', - selectionPath: n.getSelectionPath(), - }), - Va(t, n)) - : Na(n, e, r); -} -function Na(t, e, r) { - let n = {}; - return ( - t.modelOrType && !t.isRawAction() && ((n.$composites = !0), (n.$scalars = !0)), - e && qa(n, e, t), - Ba(n, r, t), - n - ); -} -function qa(t, e, r) { - for (let [n, i] of Object.entries(e)) { - if (fe(i)) continue; - let o = r.nestSelection(n); - if ((Gr(i, o), i === !1 || i === void 0)) { - t[n] = !1; - continue; - } - let s = r.findField(n); - if ( - (s && - s.kind !== 'object' && - r.throwValidationError({ - kind: 'IncludeOnScalar', - selectionPath: r.getSelectionPath().concat(n), - outputType: r.getOutputTypeDescription(), - }), - s) - ) { - t[n] = Et(i === !0 ? {} : i, o); - continue; - } - if (i === !0) { - t[n] = !0; - continue; - } - t[n] = Et(i, o); - } -} -function Ba(t, e, r) { - let n = r.getComputedFields(), - i = { ...r.getGlobalOmit(), ...e }, - o = Ci(i, n); - for (let [s, a] of Object.entries(o)) { - if (fe(a)) continue; - Gr(a, r.nestSelection(s)); - let f = r.findField(s); - (n?.[s] && !f) || (t[s] = !a); - } -} -function Va(t, e) { - let r = {}, - n = e.getComputedFields(), - i = Ti(t, n); - for (let [o, s] of Object.entries(i)) { - if (fe(s)) continue; - let a = e.nestSelection(o); - Gr(s, a); - let f = e.findField(o); - if (!(n?.[o] && !f)) { - if (s === !1 || s === void 0 || fe(s)) { - r[o] = !1; - continue; - } - if (s === !0) { - f?.kind === 'object' ? (r[o] = Et({}, a)) : (r[o] = !0); - continue; - } - r[o] = Et(s, a); - } - } - return r; -} -function ki(t, e) { - if (t === null) return null; - if (typeof t == 'string' || typeof t == 'number' || typeof t == 'boolean') return t; - if (typeof t == 'bigint') return { $type: 'BigInt', value: String(t) }; - if (Ve(t)) { - if (jt(t)) return { $type: 'DateTime', value: t.toISOString() }; - e.throwValidationError({ - kind: 'InvalidArgumentValue', - selectionPath: e.getSelectionPath(), - argumentPath: e.getArgumentPath(), - argument: { name: e.getArgumentName(), typeNames: ['Date'] }, - underlyingError: 'Provided Date object is invalid', - }); - } - if (Ri(t)) return { $type: 'Param', value: t.name }; - if (Ke(t)) return { $type: 'FieldRef', value: { _ref: t.name, _container: t.modelName } }; - if (Array.isArray(t)) return ja(t, e); - if (ArrayBuffer.isView(t)) { - let { buffer: r, byteOffset: n, byteLength: i } = t; - return { $type: 'Bytes', value: b.from(r, n, i).toString('base64') }; - } - if ($a(t)) return t.values; - if (je(t)) return { $type: 'Decimal', value: t.toFixed() }; - if (t instanceof Ee) { - if (t !== zt.instances[t._getName()]) throw new Error('Invalid ObjectEnumValue'); - return { $type: 'Enum', value: t._getName() }; - } - if (Qa(t)) return t.toJSON(); - if (typeof t == 'object') return Di(t, e); - e.throwValidationError({ - kind: 'InvalidArgumentValue', - selectionPath: e.getSelectionPath(), - argumentPath: e.getArgumentPath(), - argument: { name: e.getArgumentName(), typeNames: [] }, - underlyingError: `We could not serialize ${Object.prototype.toString.call(t)} value. Serialize the object to JSON or implement a ".toJSON()" method on it`, - }); -} -function Di(t, e) { - if (t.$type) return { $type: 'Raw', value: t }; - let r = {}; - for (let n in t) { - let i = t[n], - o = e.nestArgument(n); - fe(i) || - (i !== void 0 - ? (r[n] = ki(i, o)) - : e.isPreviewFeatureOn('strictUndefinedChecks') && - e.throwValidationError({ - kind: 'InvalidArgumentValue', - argumentPath: o.getArgumentPath(), - selectionPath: e.getSelectionPath(), - argument: { name: e.getArgumentName(), typeNames: [] }, - underlyingError: Oi, - })); - } - return r; -} -function ja(t, e) { - let r = []; - for (let n = 0; n < t.length; n++) { - let i = e.nestArgument(String(n)), - o = t[n]; - if (o === void 0 || fe(o)) { - let s = o === void 0 ? 'undefined' : 'Prisma.skip'; - e.throwValidationError({ - kind: 'InvalidArgumentValue', - selectionPath: i.getSelectionPath(), - argumentPath: i.getArgumentPath(), - argument: { name: `${e.getArgumentName()}[${n}]`, typeNames: [] }, - underlyingError: `Can not use \`${s}\` value within array. Use \`null\` or filter out \`${s}\` values`, - }); - } - r.push(ki(o, i)); - } - return r; -} -function $a(t) { - return typeof t == 'object' && t !== null && t.__prismaRawParameters__ === !0; -} -function Qa(t) { - return typeof t == 'object' && t !== null && typeof t.toJSON == 'function'; -} -function Gr(t, e) { - t === void 0 && - e.isPreviewFeatureOn('strictUndefinedChecks') && - e.throwValidationError({ kind: 'InvalidSelectionValue', selectionPath: e.getSelectionPath(), underlyingError: Oi }); -} -var Jr = class t { - constructor(e) { - this.params = e; - this.params.modelName && - (this.modelOrType = - this.params.runtimeDataModel.models[this.params.modelName] ?? - this.params.runtimeDataModel.types[this.params.modelName]); - } - modelOrType; - throwValidationError(e) { - Zt({ - errors: [e], - originalMethod: this.params.originalMethod, - args: this.params.rootArgs ?? {}, - callsite: this.params.callsite, - errorFormat: this.params.errorFormat, - clientVersion: this.params.clientVersion, - globalOmit: this.params.globalOmit, - }); - } - getSelectionPath() { - return this.params.selectionPath; - } - getArgumentPath() { - return this.params.argumentPath; - } - getArgumentName() { - return this.params.argumentPath[this.params.argumentPath.length - 1]; - } - getOutputTypeDescription() { - if (!(!this.params.modelName || !this.modelOrType)) - return { - name: this.params.modelName, - fields: this.modelOrType.fields.map((e) => ({ - name: e.name, - typeName: 'boolean', - isRelation: e.kind === 'object', - })), - }; - } - isRawAction() { - return ['executeRaw', 'queryRaw', 'runCommandRaw', 'findRaw', 'aggregateRaw'].includes(this.params.action); - } - isPreviewFeatureOn(e) { - return this.params.previewFeatures.includes(e); - } - getComputedFields() { - if (this.params.modelName) return this.params.extensions.getAllComputedFields(this.params.modelName); - } - findField(e) { - return this.modelOrType?.fields.find((r) => r.name === e); - } - nestSelection(e) { - let r = this.findField(e), - n = r?.kind === 'object' ? r.type : void 0; - return new t({ ...this.params, modelName: n, selectionPath: this.params.selectionPath.concat(e) }); - } - getGlobalOmit() { - return this.params.modelName && this.shouldApplyGlobalOmit() - ? (this.params.globalOmit?.[ve(this.params.modelName)] ?? {}) - : {}; - } - shouldApplyGlobalOmit() { - switch (this.params.action) { - case 'findFirst': - case 'findFirstOrThrow': - case 'findUniqueOrThrow': - case 'findMany': - case 'upsert': - case 'findUnique': - case 'createManyAndReturn': - case 'create': - case 'update': - case 'updateManyAndReturn': - case 'delete': - return !0; - case 'executeRaw': - case 'aggregateRaw': - case 'runCommandRaw': - case 'findRaw': - case 'createMany': - case 'deleteMany': - case 'groupBy': - case 'updateMany': - case 'count': - case 'aggregate': - case 'queryRaw': - return !1; - default: - Me(this.params.action, 'Unknown action'); - } - } - nestArgument(e) { - return new t({ ...this.params, argumentPath: this.params.argumentPath.concat(e) }); - } -}; -u(); -c(); -m(); -p(); -d(); -l(); -function Ii(t) { - if (!t._hasPreviewFlag('metrics')) - throw new K('`metrics` preview feature must be enabled in order to access metrics API', { - clientVersion: t._clientVersion, - }); -} -var Ye = class { - _client; - constructor(e) { - this._client = e; - } - prometheus(e) { - return (Ii(this._client), this._client._engine.metrics({ format: 'prometheus', ...e })); - } - json(e) { - return (Ii(this._client), this._client._engine.metrics({ format: 'json', ...e })); - } -}; -u(); -c(); -m(); -p(); -d(); -l(); -function Mi(t, e) { - let r = ct(() => Ja(e)); - Object.defineProperty(t, 'dmmf', { get: () => r.get() }); -} -function Ja(t) { - throw new Error('Prisma.dmmf is not available when running in edge runtimes.'); -} -function Wr(t) { - return Object.entries(t).map(([e, r]) => ({ name: e, ...r })); -} -u(); -c(); -m(); -p(); -d(); -l(); -var Kr = new WeakMap(), - ir = '$$PrismaTypedSql', - Pt = class { - constructor(e, r) { - (Kr.set(this, { sql: e, values: r }), Object.defineProperty(this, ir, { value: ir })); - } - get sql() { - return Kr.get(this).sql; - } - get values() { - return Kr.get(this).values; - } - }; -function _i(t) { - return (...e) => new Pt(t, e); -} -function or(t) { - return t != null && t[ir] === ir; -} -u(); -c(); -m(); -p(); -d(); -l(); -var Wo = it(Li()); -u(); -c(); -m(); -p(); -d(); -l(); -Fi(); -qn(); -$n(); -u(); -c(); -m(); -p(); -d(); -l(); -var ee = class t { - constructor(e, r) { - if (e.length - 1 !== r.length) - throw e.length === 0 - ? new TypeError('Expected at least 1 string') - : new TypeError(`Expected ${e.length} strings to have ${e.length - 1} values`); - let n = r.reduce((s, a) => s + (a instanceof t ? a.values.length : 1), 0); - ((this.values = new Array(n)), (this.strings = new Array(n + 1)), (this.strings[0] = e[0])); - let i = 0, - o = 0; - for (; i < r.length; ) { - let s = r[i++], - a = e[i]; - if (s instanceof t) { - this.strings[o] += s.strings[0]; - let f = 0; - for (; f < s.values.length; ) ((this.values[o++] = s.values[f++]), (this.strings[o] = s.strings[f])); - this.strings[o] += a; - } else ((this.values[o++] = s), (this.strings[o] = a)); - } - } - get sql() { - let e = this.strings.length, - r = 1, - n = this.strings[0]; - for (; r < e; ) n += `?${this.strings[r++]}`; - return n; - } - get statement() { - let e = this.strings.length, - r = 1, - n = this.strings[0]; - for (; r < e; ) n += `:${r}${this.strings[r++]}`; - return n; - } - get text() { - let e = this.strings.length, - r = 1, - n = this.strings[0]; - for (; r < e; ) n += `$${r}${this.strings[r++]}`; - return n; - } - inspect() { - return { sql: this.sql, statement: this.statement, text: this.text, values: this.values }; - } -}; -function Ui(t, e = ',', r = '', n = '') { - if (t.length === 0) - throw new TypeError('Expected `join([])` to be called with an array of multiple elements, but got an empty array'); - return new ee([r, ...Array(t.length - 1).fill(e), n], t); -} -function Hr(t) { - return new ee([t], []); -} -var Ni = Hr(''); -function zr(t, ...e) { - return new ee(t, e); -} -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -function vt(t) { - return { - getKeys() { - return Object.keys(t); - }, - getPropertyValue(e) { - return t[e]; - }, - }; -} -u(); -c(); -m(); -p(); -d(); -l(); -function H(t, e) { - return { - getKeys() { - return [t]; - }, - getPropertyValue() { - return e(); - }, - }; -} -u(); -c(); -m(); -p(); -d(); -l(); -function _e(t) { - let e = new me(); - return { - getKeys() { - return t.getKeys(); - }, - getPropertyValue(r) { - return e.getOrCreate(r, () => t.getPropertyValue(r)); - }, - getPropertyDescriptor(r) { - return t.getPropertyDescriptor?.(r); - }, - }; -} -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -var ar = { enumerable: !0, configurable: !0, writable: !0 }; -function lr(t) { - let e = new Set(t); - return { - getPrototypeOf: () => Object.prototype, - getOwnPropertyDescriptor: () => ar, - has: (r, n) => e.has(n), - set: (r, n, i) => e.add(n) && Reflect.set(r, n, i), - ownKeys: () => [...e], - }; -} -var qi = Symbol.for('nodejs.util.inspect.custom'); -function ae(t, e) { - let r = Wa(e), - n = new Set(), - i = new Proxy(t, { - get(o, s) { - if (n.has(s)) return o[s]; - let a = r.get(s); - return a ? a.getPropertyValue(s) : o[s]; - }, - has(o, s) { - if (n.has(s)) return !0; - let a = r.get(s); - return a ? (a.has?.(s) ?? !0) : Reflect.has(o, s); - }, - ownKeys(o) { - let s = Bi(Reflect.ownKeys(o), r), - a = Bi(Array.from(r.keys()), r); - return [...new Set([...s, ...a, ...n])]; - }, - set(o, s, a) { - return r.get(s)?.getPropertyDescriptor?.(s)?.writable === !1 ? !1 : (n.add(s), Reflect.set(o, s, a)); - }, - getOwnPropertyDescriptor(o, s) { - let a = Reflect.getOwnPropertyDescriptor(o, s); - if (a && !a.configurable) return a; - let f = r.get(s); - return f ? (f.getPropertyDescriptor ? { ...ar, ...f?.getPropertyDescriptor(s) } : ar) : a; - }, - defineProperty(o, s, a) { - return (n.add(s), Reflect.defineProperty(o, s, a)); - }, - getPrototypeOf: () => Object.prototype, - }); - return ( - (i[qi] = function () { - let o = { ...this }; - return (delete o[qi], o); - }), - i - ); -} -function Wa(t) { - let e = new Map(); - for (let r of t) { - let n = r.getKeys(); - for (let i of n) e.set(i, r); - } - return e; -} -function Bi(t, e) { - return t.filter((r) => e.get(r)?.has?.(r) ?? !0); -} -u(); -c(); -m(); -p(); -d(); -l(); -function Xe(t) { - return { - getKeys() { - return t; - }, - has() { - return !1; - }, - getPropertyValue() {}, - }; -} -u(); -c(); -m(); -p(); -d(); -l(); -function ur(t, e) { - return { batch: t, transaction: e?.kind === 'batch' ? { isolationLevel: e.options.isolationLevel } : void 0 }; -} -u(); -c(); -m(); -p(); -d(); -l(); -function Vi(t) { - if (t === void 0) return ''; - let e = He(t); - return new $e(0, { colors: Wt }).write(e).toString(); -} -u(); -c(); -m(); -p(); -d(); -l(); -var Ka = 'P2037'; -function cr({ error: t, user_facing_error: e }, r, n) { - return e.error_code - ? new Z(Ha(e, n), { code: e.error_code, clientVersion: r, meta: e.meta, batchRequestIdx: e.batch_request_idx }) - : new Q(t, { clientVersion: r, batchRequestIdx: e.batch_request_idx }); -} -function Ha(t, e) { - let r = t.message; - return ( - (e === 'postgresql' || e === 'postgres' || e === 'mysql') && - t.error_code === Ka && - (r += ` -Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`), - r - ); -} -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -var Yr = class { - getLocation() { - return null; - } -}; -function Ce(t) { - return typeof $EnabledCallSite == 'function' && t !== 'minimal' ? new $EnabledCallSite() : new Yr(); -} -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -var ji = { _avg: !0, _count: !0, _sum: !0, _min: !0, _max: !0 }; -function Ze(t = {}) { - let e = Ya(t); - return Object.entries(e).reduce((n, [i, o]) => (ji[i] !== void 0 ? (n.select[i] = { select: o }) : (n[i] = o), n), { - select: {}, - }); -} -function Ya(t = {}) { - return typeof t._count == 'boolean' ? { ...t, _count: { _all: t._count } } : t; -} -function mr(t = {}) { - return (e) => (typeof t._count == 'boolean' && (e._count = e._count._all), e); -} -function $i(t, e) { - let r = mr(t); - return e({ action: 'aggregate', unpacker: r, argsMapper: Ze })(t); -} -u(); -c(); -m(); -p(); -d(); -l(); -function Xa(t = {}) { - let { select: e, ...r } = t; - return typeof e == 'object' ? Ze({ ...r, _count: e }) : Ze({ ...r, _count: { _all: !0 } }); -} -function Za(t = {}) { - return typeof t.select == 'object' ? (e) => mr(t)(e)._count : (e) => mr(t)(e)._count._all; -} -function Qi(t, e) { - return e({ action: 'count', unpacker: Za(t), argsMapper: Xa })(t); -} -u(); -c(); -m(); -p(); -d(); -l(); -function el(t = {}) { - let e = Ze(t); - if (Array.isArray(e.by)) for (let r of e.by) typeof r == 'string' && (e.select[r] = !0); - else typeof e.by == 'string' && (e.select[e.by] = !0); - return e; -} -function tl(t = {}) { - return (e) => ( - typeof t?._count == 'boolean' && - e.forEach((r) => { - r._count = r._count._all; - }), - e - ); -} -function Ji(t, e) { - return e({ action: 'groupBy', unpacker: tl(t), argsMapper: el })(t); -} -function Gi(t, e, r) { - if (e === 'aggregate') return (n) => $i(n, r); - if (e === 'count') return (n) => Qi(n, r); - if (e === 'groupBy') return (n) => Ji(n, r); -} -u(); -c(); -m(); -p(); -d(); -l(); -function Wi(t, e) { - let r = e.fields.filter((i) => !i.relationName), - n = ni(r, 'name'); - return new Proxy( - {}, - { - get(i, o) { - if (o in i || typeof o == 'symbol') return i[o]; - let s = n[o]; - if (s) return new gt(t, o, s.type, s.isList, s.kind === 'enum'); - }, - ...lr(Object.keys(n)), - } - ); -} -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -var Ki = (t) => (Array.isArray(t) ? t : t.split('.')), - Xr = (t, e) => Ki(e).reduce((r, n) => r && r[n], t), - Hi = (t, e, r) => Ki(e).reduceRight((n, i, o, s) => Object.assign({}, Xr(t, s.slice(0, o)), { [i]: n }), r); -function rl(t, e) { - return t === void 0 || e === void 0 ? [] : [...e, 'select', t]; -} -function nl(t, e, r) { - return e === void 0 ? (t ?? {}) : Hi(e, r, t || !0); -} -function Zr(t, e, r, n, i, o) { - let a = t._runtimeDataModel.models[e].fields.reduce((f, h) => ({ ...f, [h.name]: h }), {}); - return (f) => { - let h = Ce(t._errorFormat), - C = rl(n, i), - R = nl(f, o, C), - k = r({ dataPath: C, callsite: h })(R), - A = il(t, e); - return new Proxy(k, { - get(_, O) { - if (!A.includes(O)) return _[O]; - let ye = [a[O].type, r, O], - z = [C, R]; - return Zr(t, ...ye, ...z); - }, - ...lr([...A, ...Object.getOwnPropertyNames(k)]), - }); - }; -} -function il(t, e) { - return t._runtimeDataModel.models[e].fields.filter((r) => r.kind === 'object').map((r) => r.name); -} -var ol = ['findUnique', 'findUniqueOrThrow', 'findFirst', 'findFirstOrThrow', 'create', 'update', 'upsert', 'delete'], - sl = ['aggregate', 'count', 'groupBy']; -function en(t, e) { - let r = t._extensions.getAllModelExtensions(e) ?? {}, - n = [al(t, e), ul(t, e), vt(r), H('name', () => e), H('$name', () => e), H('$parent', () => t._appliedParent)]; - return ae({}, n); -} -function al(t, e) { - let r = de(e), - n = Object.keys(mt).concat('count'); - return { - getKeys() { - return n; - }, - getPropertyValue(i) { - let o = i, - s = (a) => (f) => { - let h = Ce(t._errorFormat); - return t._createPrismaPromise( - (C) => { - let R = { - args: f, - dataPath: [], - action: o, - model: e, - clientMethod: `${r}.${i}`, - jsModelName: r, - transaction: C, - callsite: h, - }; - return t._request({ ...R, ...a }); - }, - { action: o, args: f, model: e } - ); - }; - return ol.includes(o) ? Zr(t, e, s) : ll(i) ? Gi(t, i, s) : s({}); - }, - }; -} -function ll(t) { - return sl.includes(t); -} -function ul(t, e) { - return _e( - H('fields', () => { - let r = t._runtimeDataModel.models[e]; - return Wi(e, r); - }) - ); -} -u(); -c(); -m(); -p(); -d(); -l(); -function zi(t) { - return t.replace(/^./, (e) => e.toUpperCase()); -} -var tn = Symbol(); -function Tt(t) { - let e = [cl(t), ml(t), H(tn, () => t), H('$parent', () => t._appliedParent)], - r = t._extensions.getAllClientExtensions(); - return (r && e.push(vt(r)), ae(t, e)); -} -function cl(t) { - let e = Object.getPrototypeOf(t._originalClient), - r = [...new Set(Object.getOwnPropertyNames(e))]; - return { - getKeys() { - return r; - }, - getPropertyValue(n) { - return t[n]; - }, - }; -} -function ml(t) { - let e = Object.keys(t._runtimeDataModel.models), - r = e.map(de), - n = [...new Set(e.concat(r))]; - return _e({ - getKeys() { - return n; - }, - getPropertyValue(i) { - let o = zi(i); - if (t._runtimeDataModel.models[o] !== void 0) return en(t, o); - if (t._runtimeDataModel.models[i] !== void 0) return en(t, i); - }, - getPropertyDescriptor(i) { - if (!r.includes(i)) return { enumerable: !1 }; - }, - }); -} -function Yi(t) { - return t[tn] ? t[tn] : t; -} -function Xi(t) { - if (typeof t == 'function') return t(this); - if (t.client?.__AccelerateEngine) { - let r = t.client.__AccelerateEngine; - this._originalClient._engine = new r(this._originalClient._accelerateEngineConfig); - } - let e = Object.create(this._originalClient, { - _extensions: { value: this._extensions.append(t) }, - _appliedParent: { value: this, configurable: !0 }, - $on: { value: void 0 }, - }); - return Tt(e); -} -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -function Zi({ result: t, modelName: e, select: r, omit: n, extensions: i }) { - let o = i.getAllComputedFields(e); - if (!o) return t; - let s = [], - a = []; - for (let f of Object.values(o)) { - if (n) { - if (n[f.name]) continue; - let h = f.needs.filter((C) => n[C]); - h.length > 0 && a.push(Xe(h)); - } else if (r) { - if (!r[f.name]) continue; - let h = f.needs.filter((C) => !r[C]); - h.length > 0 && a.push(Xe(h)); - } - pl(t, f.needs) && s.push(dl(f, ae(t, s))); - } - return s.length > 0 || a.length > 0 ? ae(t, [...s, ...a]) : t; -} -function pl(t, e) { - return e.every((r) => Ur(t, r)); -} -function dl(t, e) { - return _e(H(t.name, () => t.compute(e))); -} -u(); -c(); -m(); -p(); -d(); -l(); -function pr({ visitor: t, result: e, args: r, runtimeDataModel: n, modelName: i }) { - if (Array.isArray(e)) { - for (let s = 0; s < e.length; s++) - e[s] = pr({ result: e[s], args: r, modelName: i, runtimeDataModel: n, visitor: t }); - return e; - } - let o = t(e, i, r) ?? e; - return ( - r.include && eo({ includeOrSelect: r.include, result: o, parentModelName: i, runtimeDataModel: n, visitor: t }), - r.select && eo({ includeOrSelect: r.select, result: o, parentModelName: i, runtimeDataModel: n, visitor: t }), - o - ); -} -function eo({ includeOrSelect: t, result: e, parentModelName: r, runtimeDataModel: n, visitor: i }) { - for (let [o, s] of Object.entries(t)) { - if (!s || e[o] == null || fe(s)) continue; - let f = n.models[r].fields.find((C) => C.name === o); - if (!f || f.kind !== 'object' || !f.relationName) continue; - let h = typeof s == 'object' ? s : {}; - e[o] = pr({ visitor: i, result: e[o], args: h, modelName: f.type, runtimeDataModel: n }); - } -} -function to({ result: t, modelName: e, args: r, extensions: n, runtimeDataModel: i, globalOmit: o }) { - return n.isEmpty() || t == null || typeof t != 'object' || !i.models[e] - ? t - : pr({ - result: t, - args: r ?? {}, - modelName: e, - runtimeDataModel: i, - visitor: (a, f, h) => { - let C = de(f); - return Zi({ - result: a, - modelName: C, - select: h.select, - omit: h.select ? void 0 : { ...o?.[C], ...h.omit }, - extensions: n, - }); - }, - }); -} -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -var fl = ['$connect', '$disconnect', '$on', '$transaction', '$extends'], - ro = fl; -function no(t) { - if (t instanceof ee) return gl(t); - if (or(t)) return yl(t); - if (Array.isArray(t)) { - let r = [t[0]]; - for (let n = 1; n < t.length; n++) r[n] = Ct(t[n]); - return r; - } - let e = {}; - for (let r in t) e[r] = Ct(t[r]); - return e; -} -function gl(t) { - return new ee(t.strings, t.values); -} -function yl(t) { - return new Pt(t.sql, t.values); -} -function Ct(t) { - if (typeof t != 'object' || t == null || t instanceof Ee || Ke(t)) return t; - if (je(t)) return new be(t.toFixed()); - if (Ve(t)) return new Date(+t); - if (ArrayBuffer.isView(t)) return t.slice(0); - if (Array.isArray(t)) { - let e = t.length, - r; - for (r = Array(e); e--; ) r[e] = Ct(t[e]); - return r; - } - if (typeof t == 'object') { - let e = {}; - for (let r in t) - r === '__proto__' - ? Object.defineProperty(e, r, { value: Ct(t[r]), configurable: !0, enumerable: !0, writable: !0 }) - : (e[r] = Ct(t[r])); - return e; - } - Me(t, 'Unknown value'); -} -function oo(t, e, r, n = 0) { - return t._createPrismaPromise((i) => { - let o = e.customDataProxyFetch; - return ( - 'transaction' in e && - i !== void 0 && - (e.transaction?.kind === 'batch' && e.transaction.lock.then(), (e.transaction = i)), - n === r.length - ? t._executeRequest(e) - : r[n]({ - model: e.model, - operation: e.model ? e.action : e.clientMethod, - args: no(e.args ?? {}), - __internalParams: e, - query: (s, a = e) => { - let f = a.customDataProxyFetch; - return ((a.customDataProxyFetch = uo(o, f)), (a.args = s), oo(t, a, r, n + 1)); - }, - }) - ); - }); -} -function so(t, e) { - let { jsModelName: r, action: n, clientMethod: i } = e, - o = r ? n : i; - if (t._extensions.isEmpty()) return t._executeRequest(e); - let s = t._extensions.getAllQueryCallbacks(r ?? '$none', o); - return oo(t, e, s); -} -function ao(t) { - return (e) => { - let r = { requests: e }, - n = e[0].extensions.getAllBatchQueryCallbacks(); - return n.length ? lo(r, n, 0, t) : t(r); - }; -} -function lo(t, e, r, n) { - if (r === e.length) return n(t); - let i = t.customDataProxyFetch, - o = t.requests[0].transaction; - return e[r]({ - args: { - queries: t.requests.map((s) => ({ model: s.modelName, operation: s.action, args: s.args })), - transaction: o ? { isolationLevel: o.kind === 'batch' ? o.isolationLevel : void 0 } : void 0, - }, - __internalParams: t, - query(s, a = t) { - let f = a.customDataProxyFetch; - return ((a.customDataProxyFetch = uo(i, f)), lo(a, e, r + 1, n)); - }, - }); -} -var io = (t) => t; -function uo(t = io, e = io) { - return (r) => t(e(r)); -} -u(); -c(); -m(); -p(); -d(); -l(); -var co = G('prisma:client'), - mo = { Vercel: 'vercel', 'Netlify CI': 'netlify' }; -function po({ postinstall: t, ciName: e, clientVersion: r }) { - if ((co('checkPlatformCaching:postinstall', t), co('checkPlatformCaching:ciName', e), t === !0 && e && e in mo)) { - let n = `Prisma has detected that this project was built on ${e}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. - -Learn how: https://pris.ly/d/${mo[e]}-build`; - throw (console.error(n), new I(n, r)); - } -} -u(); -c(); -m(); -p(); -d(); -l(); -function fo(t, e) { - return t ? (t.datasources ? t.datasources : t.datasourceUrl ? { [e[0]]: { url: t.datasourceUrl } } : {}) : {}; -} -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -var hl = () => globalThis.process?.release?.name === 'node', - bl = () => !!globalThis.Bun || !!globalThis.process?.versions?.bun, - wl = () => !!globalThis.Deno, - xl = () => typeof globalThis.Netlify == 'object', - El = () => typeof globalThis.EdgeRuntime == 'object', - Pl = () => globalThis.navigator?.userAgent === 'Cloudflare-Workers'; -function vl() { - return ( - [ - [xl, 'netlify'], - [El, 'edge-light'], - [Pl, 'workerd'], - [wl, 'deno'], - [bl, 'bun'], - [hl, 'node'], - ] - .flatMap((r) => (r[0]() ? [r[1]] : [])) - .at(0) ?? '' - ); -} -var Tl = { - node: 'Node.js', - workerd: 'Cloudflare Workers', - deno: 'Deno and Deno Deploy', - netlify: 'Netlify Edge Functions', - 'edge-light': - 'Edge Runtime (Vercel Edge Functions, Vercel Edge Middleware, Next.js (Pages Router) Edge API Routes, Next.js (App Router) Edge Route Handlers or Next.js Middleware)', -}; -function Re() { - let t = vl(); - return { id: t, prettyName: Tl[t] || t, isEdge: ['workerd', 'deno', 'netlify', 'edge-light'].includes(t) }; -} -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -l(); -function go(t, e) { - throw new Error(e); -} -function Cl(t) { - return t !== null && typeof t == 'object' && typeof t.$type == 'string'; -} -function Rl(t, e) { - let r = {}; - for (let n of Object.keys(t)) r[n] = e(t[n], n); - return r; -} -function et(t) { - return t === null - ? t - : Array.isArray(t) - ? t.map(et) - : typeof t == 'object' - ? Cl(t) - ? Al(t) - : t.constructor !== null && t.constructor.name !== 'Object' - ? t - : Rl(t, et) - : t; -} -function Al({ $type: t, value: e }) { - switch (t) { - case 'BigInt': - return BigInt(e); - case 'Bytes': { - let { buffer: r, byteOffset: n, byteLength: i } = b.from(e, 'base64'); - return new Uint8Array(r, n, i); - } - case 'DateTime': - return new Date(e); - case 'Decimal': - return new v(e); - case 'Json': - return JSON.parse(e); - default: - go(e, 'Unknown tagged value'); - } -} -var yo = '6.14.0'; -u(); -c(); -m(); -p(); -d(); -l(); -function dr({ inlineDatasources: t, overrideDatasources: e, env: r, clientVersion: n }) { - let i, - o = Object.keys(t)[0], - s = t[o]?.url, - a = e[o]?.url; - if ( - (o === void 0 ? (i = void 0) : a ? (i = a) : s?.value ? (i = s.value) : s?.fromEnvVar && (i = r[s.fromEnvVar]), - s?.fromEnvVar !== void 0 && i === void 0) - ) - throw Re().id === 'workerd' - ? new I( - `error: Environment variable not found: ${s.fromEnvVar}. - -In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. -To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`, - n - ) - : new I(`error: Environment variable not found: ${s.fromEnvVar}.`, n); - if (i === void 0) throw new I('error: Missing URL environment variable, value, or override.', n); - return i; -} -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -function ho(t) { - if (t?.kind === 'itx') return t.options.id; -} -u(); -c(); -m(); -p(); -d(); -l(); -var rn, - bo = { - async loadLibrary(t) { - let { clientVersion: e, adapter: r, engineWasm: n } = t; - if (r === void 0) - throw new I(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Re().prettyName})`, e); - if (n === void 0) throw new I('WASM engine was unexpectedly `undefined`', e); - rn === void 0 && - (rn = (async () => { - let o = await n.getRuntime(), - s = await n.getQueryEngineWasmModule(); - if (s == null) throw new I('The loaded wasm module was unexpectedly `undefined` or `null` once loaded', e); - let a = { './query_engine_bg.js': o }, - f = new WebAssembly.Instance(s, a), - h = f.exports.__wbindgen_start; - return (o.__wbg_set_wasm(f.exports), h(), o.QueryEngine); - })()); - let i = await rn; - return { - debugPanic() { - return Promise.reject('{}'); - }, - dmmf() { - return Promise.resolve('{}'); - }, - version() { - return { commit: 'unknown', version: 'unknown' }; - }, - QueryEngine: i, - }; - }, - }; -var Ol = 'P2036', - ge = G('prisma:client:libraryEngine'); -function kl(t) { - return t.item_type === 'query' && 'query' in t; -} -function Dl(t) { - return 'level' in t ? t.level === 'error' && t.message === 'PANIC' : !1; -} -var sO = [...Dr, 'native'], - Il = 0xffffffffffffffffn, - nn = 1n; -function Ml() { - let t = nn++; - return (nn > Il && (nn = 1n), t); -} -var Rt = class { - name = 'LibraryEngine'; - engine; - libraryInstantiationPromise; - libraryStartingPromise; - libraryStoppingPromise; - libraryStarted; - executingQueryPromise; - config; - QueryEngineConstructor; - libraryLoader; - library; - logEmitter; - libQueryEnginePath; - binaryTarget; - datasourceOverrides; - datamodel; - logQueries; - logLevel; - lastQuery; - loggerRustPanic; - tracingHelper; - adapterPromise; - versionInfo; - constructor(e, r) { - ((this.libraryLoader = r ?? bo), - (this.config = e), - (this.libraryStarted = !1), - (this.logQueries = e.logQueries ?? !1), - (this.logLevel = e.logLevel ?? 'error'), - (this.logEmitter = e.logEmitter), - (this.datamodel = e.inlineSchema), - (this.tracingHelper = e.tracingHelper), - e.enableDebugLogs && (this.logLevel = 'debug')); - let n = Object.keys(e.overrideDatasources)[0], - i = e.overrideDatasources[n]?.url; - (n !== void 0 && i !== void 0 && (this.datasourceOverrides = { [n]: i }), - (this.libraryInstantiationPromise = this.instantiateLibrary())); - } - wrapEngine(e) { - return { - applyPendingMigrations: e.applyPendingMigrations?.bind(e), - commitTransaction: this.withRequestId(e.commitTransaction.bind(e)), - connect: this.withRequestId(e.connect.bind(e)), - disconnect: this.withRequestId(e.disconnect.bind(e)), - metrics: e.metrics?.bind(e), - query: this.withRequestId(e.query.bind(e)), - rollbackTransaction: this.withRequestId(e.rollbackTransaction.bind(e)), - sdlSchema: e.sdlSchema?.bind(e), - startTransaction: this.withRequestId(e.startTransaction.bind(e)), - trace: e.trace.bind(e), - free: e.free?.bind(e), - }; - } - withRequestId(e) { - return async (...r) => { - let n = Ml().toString(); - try { - return await e(...r, n); - } finally { - if (this.tracingHelper.isEnabled()) { - let i = await this.engine?.trace(n); - if (i) { - let o = JSON.parse(i); - this.tracingHelper.dispatchEngineSpans(o.spans); - } - } - } - }; - } - async applyPendingMigrations() { - throw new Error('Cannot call this method from this type of engine instance'); - } - async transaction(e, r, n) { - await this.start(); - let i = await this.adapterPromise, - o = JSON.stringify(r), - s; - if (e === 'start') { - let f = JSON.stringify({ max_wait: n.maxWait, timeout: n.timeout, isolation_level: n.isolationLevel }); - s = await this.engine?.startTransaction(f, o); - } else - e === 'commit' - ? (s = await this.engine?.commitTransaction(n.id, o)) - : e === 'rollback' && (s = await this.engine?.rollbackTransaction(n.id, o)); - let a = this.parseEngineResponse(s); - if (_l(a)) { - let f = this.getExternalAdapterError(a, i?.errorRegistry); - throw f - ? f.error - : new Z(a.message, { code: a.error_code, clientVersion: this.config.clientVersion, meta: a.meta }); - } else if (typeof a.message == 'string') throw new Q(a.message, { clientVersion: this.config.clientVersion }); - return a; - } - async instantiateLibrary() { - if ((ge('internalSetup'), this.libraryInstantiationPromise)) return this.libraryInstantiationPromise; - ((this.binaryTarget = await this.getCurrentBinaryTarget()), - await this.tracingHelper.runInChildSpan('load_engine', () => this.loadEngine()), - this.version()); - } - async getCurrentBinaryTarget() {} - parseEngineResponse(e) { - if (!e) throw new Q('Response from the Engine was empty', { clientVersion: this.config.clientVersion }); - try { - return JSON.parse(e); - } catch { - throw new Q('Unable to JSON.parse response from engine', { clientVersion: this.config.clientVersion }); - } - } - async loadEngine() { - if (!this.engine) { - this.QueryEngineConstructor || - ((this.library = await this.libraryLoader.loadLibrary(this.config)), - (this.QueryEngineConstructor = this.library.QueryEngine)); - try { - let e = new w(this); - this.adapterPromise || (this.adapterPromise = this.config.adapter?.connect()?.then(qt)); - let r = await this.adapterPromise; - (r && ge('Using driver adapter: %O', r), - (this.engine = this.wrapEngine( - new this.QueryEngineConstructor( - { - datamodel: this.datamodel, - env: g.env, - logQueries: this.config.logQueries ?? !1, - ignoreEnvVarErrors: !0, - datasourceOverrides: this.datasourceOverrides ?? {}, - logLevel: this.logLevel, - configDir: this.config.cwd, - engineProtocol: 'json', - enableTracing: this.tracingHelper.isEnabled(), - }, - (n) => { - e.deref()?.logger(n); - }, - r - ) - ))); - } catch (e) { - let r = e, - n = this.parseInitError(r.message); - throw typeof n == 'string' ? r : new I(n.message, this.config.clientVersion, n.error_code); - } - } - } - logger(e) { - let r = this.parseEngineResponse(e); - r && - ((r.level = r?.level.toLowerCase() ?? 'unknown'), - kl(r) - ? this.logEmitter.emit('query', { - timestamp: new Date(), - query: r.query, - params: r.params, - duration: Number(r.duration_ms), - target: r.module_path, - }) - : (Dl(r), this.logEmitter.emit(r.level, { timestamp: new Date(), message: r.message, target: r.module_path }))); - } - parseInitError(e) { - try { - return JSON.parse(e); - } catch {} - return e; - } - parseRequestError(e) { - try { - return JSON.parse(e); - } catch {} - return e; - } - onBeforeExit() { - throw new Error( - '"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.' - ); - } - async start() { - if ( - (this.libraryInstantiationPromise || (this.libraryInstantiationPromise = this.instantiateLibrary()), - await this.libraryInstantiationPromise, - await this.libraryStoppingPromise, - this.libraryStartingPromise) - ) - return (ge(`library already starting, this.libraryStarted: ${this.libraryStarted}`), this.libraryStartingPromise); - if (this.libraryStarted) return; - let e = async () => { - ge('library starting'); - try { - let r = { traceparent: this.tracingHelper.getTraceParent() }; - (await this.engine?.connect(JSON.stringify(r)), - (this.libraryStarted = !0), - this.adapterPromise || (this.adapterPromise = this.config.adapter?.connect()?.then(qt)), - await this.adapterPromise, - ge('library started')); - } catch (r) { - let n = this.parseInitError(r.message); - throw typeof n == 'string' ? r : new I(n.message, this.config.clientVersion, n.error_code); - } finally { - this.libraryStartingPromise = void 0; - } - }; - return ( - (this.libraryStartingPromise = this.tracingHelper.runInChildSpan('connect', e)), - this.libraryStartingPromise - ); - } - async stop() { - if ( - (await this.libraryInstantiationPromise, - await this.libraryStartingPromise, - await this.executingQueryPromise, - this.libraryStoppingPromise) - ) - return (ge('library is already stopping'), this.libraryStoppingPromise); - if (!this.libraryStarted) { - (await (await this.adapterPromise)?.dispose(), (this.adapterPromise = void 0)); - return; - } - let e = async () => { - (await new Promise((n) => setImmediate(n)), ge('library stopping')); - let r = { traceparent: this.tracingHelper.getTraceParent() }; - (await this.engine?.disconnect(JSON.stringify(r)), - this.engine?.free && this.engine.free(), - (this.engine = void 0), - (this.libraryStarted = !1), - (this.libraryStoppingPromise = void 0), - (this.libraryInstantiationPromise = void 0), - await (await this.adapterPromise)?.dispose(), - (this.adapterPromise = void 0), - ge('library stopped')); - }; - return ( - (this.libraryStoppingPromise = this.tracingHelper.runInChildSpan('disconnect', e)), - this.libraryStoppingPromise - ); - } - version() { - return ((this.versionInfo = this.library?.version()), this.versionInfo?.version ?? 'unknown'); - } - debugPanic(e) { - return this.library?.debugPanic(e); - } - async request(e, { traceparent: r, interactiveTransaction: n }) { - ge(`sending request, this.libraryStarted: ${this.libraryStarted}`); - let i = JSON.stringify({ traceparent: r }), - o = JSON.stringify(e); - try { - await this.start(); - let s = await this.adapterPromise; - ((this.executingQueryPromise = this.engine?.query(o, i, n?.id)), (this.lastQuery = o)); - let a = this.parseEngineResponse(await this.executingQueryPromise); - if (a.errors) - throw a.errors.length === 1 - ? this.buildQueryError(a.errors[0], s?.errorRegistry) - : new Q(JSON.stringify(a.errors), { clientVersion: this.config.clientVersion }); - if (this.loggerRustPanic) throw this.loggerRustPanic; - return { data: a }; - } catch (s) { - if (s instanceof I) throw s; - s.code === 'GenericFailure' && s.message?.startsWith('PANIC:'); - let a = this.parseRequestError(s.message); - throw typeof a == 'string' - ? s - : new Q( - `${a.message} -${a.backtrace}`, - { clientVersion: this.config.clientVersion } - ); - } - } - async requestBatch(e, { transaction: r, traceparent: n }) { - ge('requestBatch'); - let i = ur(e, r); - await this.start(); - let o = await this.adapterPromise; - ((this.lastQuery = JSON.stringify(i)), - (this.executingQueryPromise = this.engine?.query(this.lastQuery, JSON.stringify({ traceparent: n }), ho(r)))); - let s = await this.executingQueryPromise, - a = this.parseEngineResponse(s); - if (a.errors) - throw a.errors.length === 1 - ? this.buildQueryError(a.errors[0], o?.errorRegistry) - : new Q(JSON.stringify(a.errors), { clientVersion: this.config.clientVersion }); - let { batchResult: f, errors: h } = a; - if (Array.isArray(f)) - return f.map((C) => - C.errors && C.errors.length > 0 - ? (this.loggerRustPanic ?? this.buildQueryError(C.errors[0], o?.errorRegistry)) - : { data: C } - ); - throw h && h.length === 1 ? new Error(h[0].error) : new Error(JSON.stringify(a)); - } - buildQueryError(e, r) { - e.user_facing_error.is_panic; - let n = this.getExternalAdapterError(e.user_facing_error, r); - return n ? n.error : cr(e, this.config.clientVersion, this.config.activeProvider); - } - getExternalAdapterError(e, r) { - if (e.error_code === Ol && r) { - let n = e.meta?.id; - Bt(typeof n == 'number', 'Malformed external JS error received from the engine'); - let i = r.consumeError(n); - return (Bt(i, 'External error with reported id was not registered'), i); - } - } - async metrics(e) { - await this.start(); - let r = await this.engine.metrics(JSON.stringify(e)); - return e.format === 'prometheus' ? r : this.parseEngineResponse(r); - } -}; -function _l(t) { - return typeof t == 'object' && t !== null && t.error_code !== void 0; -} -u(); -c(); -m(); -p(); -d(); -l(); -var At = - 'Accelerate has not been setup correctly. Make sure your client is using `.$extends(withAccelerate())`. See https://pris.ly/d/accelerate-getting-started', - fr = class { - constructor(e) { - this.config = e; - ((this.resolveDatasourceUrl = this.config.accelerateUtils?.resolveDatasourceUrl), - (this.getBatchRequestPayload = this.config.accelerateUtils?.getBatchRequestPayload), - (this.prismaGraphQLToJSError = this.config.accelerateUtils?.prismaGraphQLToJSError), - (this.PrismaClientUnknownRequestError = this.config.accelerateUtils?.PrismaClientUnknownRequestError), - (this.PrismaClientInitializationError = this.config.accelerateUtils?.PrismaClientInitializationError), - (this.PrismaClientKnownRequestError = this.config.accelerateUtils?.PrismaClientKnownRequestError), - (this.debug = this.config.accelerateUtils?.debug), - (this.engineVersion = this.config.accelerateUtils?.engineVersion), - (this.clientVersion = this.config.accelerateUtils?.clientVersion)); - } - name = 'AccelerateEngine'; - resolveDatasourceUrl; - getBatchRequestPayload; - prismaGraphQLToJSError; - PrismaClientUnknownRequestError; - PrismaClientInitializationError; - PrismaClientKnownRequestError; - debug; - engineVersion; - clientVersion; - onBeforeExit(e) {} - async start() {} - async stop() {} - version(e) { - return 'unknown'; - } - transaction(e, r, n) { - throw new I(At, this.config.clientVersion); - } - metrics(e) { - throw new I(At, this.config.clientVersion); - } - request(e, r) { - throw new I(At, this.config.clientVersion); - } - requestBatch(e, r) { - throw new I(At, this.config.clientVersion); - } - applyPendingMigrations() { - throw new I(At, this.config.clientVersion); - } - }; -u(); -c(); -m(); -p(); -d(); -l(); -function wo({ url: t, adapter: e, copyEngine: r, targetBuildType: n }) { - let i = [], - o = [], - s = (O) => { - i.push({ _tag: 'warning', value: O }); - }, - a = (O) => { - let D = O.join(` -`); - o.push({ _tag: 'error', value: D }); - }, - f = !!t?.startsWith('prisma://'), - h = Lr(t), - C = !!e, - R = f || h; - !C && - r && - R && - s([ - 'recommend--no-engine', - 'In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)', - ]); - let k = R || !r; - C && - (k || n === 'edge') && - (n === 'edge' - ? a([ - 'Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.', - 'Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor.', - ]) - : r - ? f && - a([ - 'Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.', - 'Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor.', - ]) - : a([ - 'Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.', - 'Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter.', - ])); - let A = { accelerate: k, ppg: h, driverAdapters: C }; - function _(O) { - return O.length > 0; - } - return _(o) - ? { ok: !1, diagnostics: { warnings: i, errors: o }, isUsing: A } - : { ok: !0, diagnostics: { warnings: i }, isUsing: A }; -} -function xo({ copyEngine: t = !0 }, e) { - let r; - try { - r = dr({ - inlineDatasources: e.inlineDatasources, - overrideDatasources: e.overrideDatasources, - env: { ...e.env, ...g.env }, - clientVersion: e.clientVersion, - }); - } catch {} - let { - ok: n, - isUsing: i, - diagnostics: o, - } = wo({ url: r, adapter: e.adapter, copyEngine: t, targetBuildType: 'wasm-engine-edge' }); - for (let R of o.warnings) ut(...R.value); - if (!n) { - let R = o.errors[0]; - throw new K(R.value, { clientVersion: e.clientVersion }); - } - let s = Be(e.generator), - a = s === 'library', - f = s === 'binary', - h = s === 'client', - C = (i.accelerate || i.ppg) && !i.driverAdapters; - if ((i.accelerate, i.driverAdapters)) return new Rt(e); - if (i.accelerate) return new fr(e); - { - let R = [ - `PrismaClient failed to initialize because it wasn't configured to run in this environment (${Re().prettyName}).`, - 'In order to run Prisma Client in an edge runtime, you will need to configure one of the following options:', - '- Enable Driver Adapters: https://pris.ly/d/driver-adapters', - '- Enable Accelerate: https://pris.ly/d/accelerate', - ]; - throw new K( - R.join(` -`), - { clientVersion: e.clientVersion } - ); - } - return 'wasm-engine-edge'; -} -u(); -c(); -m(); -p(); -d(); -l(); -function gr({ generator: t }) { - return t?.previewFeatures ?? []; -} -u(); -c(); -m(); -p(); -d(); -l(); -var Eo = (t) => ({ command: t }); -u(); -c(); -m(); -p(); -d(); -l(); -u(); -c(); -m(); -p(); -d(); -l(); -var Po = (t) => t.strings.reduce((e, r, n) => `${e}@P${n}${r}`); -u(); -c(); -m(); -p(); -d(); -l(); -l(); -function tt(t) { - try { - return vo(t, 'fast'); - } catch { - return vo(t, 'slow'); - } -} -function vo(t, e) { - return JSON.stringify(t.map((r) => Co(r, e))); -} -function Co(t, e) { - if (Array.isArray(t)) return t.map((r) => Co(r, e)); - if (typeof t == 'bigint') return { prisma__type: 'bigint', prisma__value: t.toString() }; - if (Ve(t)) return { prisma__type: 'date', prisma__value: t.toJSON() }; - if (be.isDecimal(t)) return { prisma__type: 'decimal', prisma__value: t.toJSON() }; - if (b.isBuffer(t)) return { prisma__type: 'bytes', prisma__value: t.toString('base64') }; - if (Ll(t)) return { prisma__type: 'bytes', prisma__value: b.from(t).toString('base64') }; - if (ArrayBuffer.isView(t)) { - let { buffer: r, byteOffset: n, byteLength: i } = t; - return { prisma__type: 'bytes', prisma__value: b.from(r, n, i).toString('base64') }; - } - return typeof t == 'object' && e === 'slow' ? Ro(t) : t; -} -function Ll(t) { - return t instanceof ArrayBuffer || t instanceof SharedArrayBuffer - ? !0 - : typeof t == 'object' && t !== null - ? t[Symbol.toStringTag] === 'ArrayBuffer' || t[Symbol.toStringTag] === 'SharedArrayBuffer' - : !1; -} -function Ro(t) { - if (typeof t != 'object' || t === null) return t; - if (typeof t.toJSON == 'function') return t.toJSON(); - if (Array.isArray(t)) return t.map(To); - let e = {}; - for (let r of Object.keys(t)) e[r] = To(t[r]); - return e; -} -function To(t) { - return typeof t == 'bigint' ? t.toString() : Ro(t); -} -var Fl = /^(\s*alter\s)/i, - Ao = G('prisma:client'); -function on(t, e, r, n) { - if (!(t !== 'postgresql' && t !== 'cockroachdb') && r.length > 0 && Fl.exec(e)) - throw new Error(`Running ALTER using ${n} is not supported -Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. - -Example: - await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) - -More Information: https://pris.ly/d/execute-raw -`); -} -var sn = - ({ clientMethod: t, activeProvider: e }) => - (r) => { - let n = '', - i; - if (or(r)) ((n = r.sql), (i = { values: tt(r.values), __prismaRawParameters__: !0 })); - else if (Array.isArray(r)) { - let [o, ...s] = r; - ((n = o), (i = { values: tt(s || []), __prismaRawParameters__: !0 })); - } else - switch (e) { - case 'sqlite': - case 'mysql': { - ((n = r.sql), (i = { values: tt(r.values), __prismaRawParameters__: !0 })); - break; - } - case 'cockroachdb': - case 'postgresql': - case 'postgres': { - ((n = r.text), (i = { values: tt(r.values), __prismaRawParameters__: !0 })); - break; - } - case 'sqlserver': { - ((n = Po(r)), (i = { values: tt(r.values), __prismaRawParameters__: !0 })); - break; - } - default: - throw new Error(`The ${e} provider does not support ${t}`); - } - return (i?.values ? Ao(`prisma.${t}(${n}, ${i.values})`) : Ao(`prisma.${t}(${n})`), { query: n, parameters: i }); - }, - So = { - requestArgsToMiddlewareArgs(t) { - return [t.strings, ...t.values]; - }, - middlewareArgsToRequestArgs(t) { - let [e, ...r] = t; - return new ee(e, r); - }, - }, - Oo = { - requestArgsToMiddlewareArgs(t) { - return [t]; - }, - middlewareArgsToRequestArgs(t) { - return t[0]; - }, - }; -u(); -c(); -m(); -p(); -d(); -l(); -function an(t) { - return function (r, n) { - let i, - o = (s = t) => { - try { - return s === void 0 || s?.kind === 'itx' ? (i ??= ko(r(s))) : ko(r(s)); - } catch (a) { - return Promise.reject(a); - } - }; - return { - get spec() { - return n; - }, - then(s, a) { - return o().then(s, a); - }, - catch(s) { - return o().catch(s); - }, - finally(s) { - return o().finally(s); - }, - requestTransaction(s) { - let a = o(s); - return a.requestTransaction ? a.requestTransaction(s) : a; - }, - [Symbol.toStringTag]: 'PrismaPromise', - }; - }; -} -function ko(t) { - return typeof t.then == 'function' ? t : Promise.resolve(t); -} -u(); -c(); -m(); -p(); -d(); -l(); -var Ul = Ir.split('.')[0], - Nl = { - isEnabled() { - return !1; - }, - getTraceParent() { - return '00-10-10-00'; - }, - dispatchEngineSpans() {}, - getActiveContext() {}, - runInChildSpan(t, e) { - return e(); - }, - }, - ln = class { - isEnabled() { - return this.getGlobalTracingHelper().isEnabled(); - } - getTraceParent(e) { - return this.getGlobalTracingHelper().getTraceParent(e); - } - dispatchEngineSpans(e) { - return this.getGlobalTracingHelper().dispatchEngineSpans(e); - } - getActiveContext() { - return this.getGlobalTracingHelper().getActiveContext(); - } - runInChildSpan(e, r) { - return this.getGlobalTracingHelper().runInChildSpan(e, r); - } - getGlobalTracingHelper() { - let e = globalThis[`V${Ul}_PRISMA_INSTRUMENTATION`], - r = globalThis.PRISMA_INSTRUMENTATION; - return e?.helper ?? r?.helper ?? Nl; - } - }; -function Do() { - return new ln(); -} -u(); -c(); -m(); -p(); -d(); -l(); -function Io(t, e = () => {}) { - let r, - n = new Promise((i) => (r = i)); - return { - then(i) { - return (--t === 0 && r(e()), i?.(n)); - }, - }; -} -u(); -c(); -m(); -p(); -d(); -l(); -function Mo(t) { - return typeof t == 'string' - ? t - : t.reduce( - (e, r) => { - let n = typeof r == 'string' ? r : r.level; - return n === 'query' ? e : e && (r === 'info' || e === 'info') ? 'info' : n; - }, - void 0 - ); -} -u(); -c(); -m(); -p(); -d(); -l(); -var Lo = it(ei()); -u(); -c(); -m(); -p(); -d(); -l(); -function yr(t) { - return typeof t.batchRequestIdx == 'number'; -} -u(); -c(); -m(); -p(); -d(); -l(); -function _o(t) { - if (t.action !== 'findUnique' && t.action !== 'findUniqueOrThrow') return; - let e = []; - return ( - t.modelName && e.push(t.modelName), - t.query.arguments && e.push(un(t.query.arguments)), - e.push(un(t.query.selection)), - e.join('') - ); -} -function un(t) { - return `(${Object.keys(t) - .sort() - .map((r) => { - let n = t[r]; - return typeof n == 'object' && n !== null ? `(${r} ${un(n)})` : r; - }) - .join(' ')})`; -} -u(); -c(); -m(); -p(); -d(); -l(); -var ql = { - aggregate: !1, - aggregateRaw: !1, - createMany: !0, - createManyAndReturn: !0, - createOne: !0, - deleteMany: !0, - deleteOne: !0, - executeRaw: !0, - findFirst: !1, - findFirstOrThrow: !1, - findMany: !1, - findRaw: !1, - findUnique: !1, - findUniqueOrThrow: !1, - groupBy: !1, - queryRaw: !1, - runCommandRaw: !0, - updateMany: !0, - updateManyAndReturn: !0, - updateOne: !0, - upsertOne: !0, -}; -function cn(t) { - return ql[t]; -} -u(); -c(); -m(); -p(); -d(); -l(); -var hr = class { - constructor(e) { - this.options = e; - this.batches = {}; - } - batches; - tickActive = !1; - request(e) { - let r = this.options.batchBy(e); - return r - ? (this.batches[r] || - ((this.batches[r] = []), - this.tickActive || - ((this.tickActive = !0), - g.nextTick(() => { - (this.dispatchBatches(), (this.tickActive = !1)); - }))), - new Promise((n, i) => { - this.batches[r].push({ request: e, resolve: n, reject: i }); - })) - : this.options.singleLoader(e); - } - dispatchBatches() { - for (let e in this.batches) { - let r = this.batches[e]; - (delete this.batches[e], - r.length === 1 - ? this.options - .singleLoader(r[0].request) - .then((n) => { - n instanceof Error ? r[0].reject(n) : r[0].resolve(n); - }) - .catch((n) => { - r[0].reject(n); - }) - : (r.sort((n, i) => this.options.batchOrder(n.request, i.request)), - this.options - .batchLoader(r.map((n) => n.request)) - .then((n) => { - if (n instanceof Error) for (let i = 0; i < r.length; i++) r[i].reject(n); - else - for (let i = 0; i < r.length; i++) { - let o = n[i]; - o instanceof Error ? r[i].reject(o) : r[i].resolve(o); - } - }) - .catch((n) => { - for (let i = 0; i < r.length; i++) r[i].reject(n); - }))); - } - } - get [Symbol.toStringTag]() { - return 'DataLoader'; - } -}; -u(); -c(); -m(); -p(); -d(); -l(); -l(); -function Le(t, e) { - if (e === null) return e; - switch (t) { - case 'bigint': - return BigInt(e); - case 'bytes': { - let { buffer: r, byteOffset: n, byteLength: i } = b.from(e, 'base64'); - return new Uint8Array(r, n, i); - } - case 'decimal': - return new be(e); - case 'datetime': - case 'date': - return new Date(e); - case 'time': - return new Date(`1970-01-01T${e}Z`); - case 'bigint-array': - return e.map((r) => Le('bigint', r)); - case 'bytes-array': - return e.map((r) => Le('bytes', r)); - case 'decimal-array': - return e.map((r) => Le('decimal', r)); - case 'datetime-array': - return e.map((r) => Le('datetime', r)); - case 'date-array': - return e.map((r) => Le('date', r)); - case 'time-array': - return e.map((r) => Le('time', r)); - default: - return e; - } -} -function br(t) { - let e = [], - r = Bl(t); - for (let n = 0; n < t.rows.length; n++) { - let i = t.rows[n], - o = { ...r }; - for (let s = 0; s < i.length; s++) o[t.columns[s]] = Le(t.types[s], i[s]); - e.push(o); - } - return e; -} -function Bl(t) { - let e = {}; - for (let r = 0; r < t.columns.length; r++) e[t.columns[r]] = null; - return e; -} -var Vl = G('prisma:client:request_handler'), - wr = class { - client; - dataloader; - logEmitter; - constructor(e, r) { - ((this.logEmitter = r), - (this.client = e), - (this.dataloader = new hr({ - batchLoader: ao(async ({ requests: n, customDataProxyFetch: i }) => { - let { transaction: o, otelParentCtx: s } = n[0], - a = n.map((R) => R.protocolQuery), - f = this.client._tracingHelper.getTraceParent(s), - h = n.some((R) => cn(R.protocolQuery.action)); - return ( - await this.client._engine.requestBatch(a, { - traceparent: f, - transaction: jl(o), - containsWrite: h, - customDataProxyFetch: i, - }) - ).map((R, k) => { - if (R instanceof Error) return R; - try { - return this.mapQueryEngineResult(n[k], R); - } catch (A) { - return A; - } - }); - }), - singleLoader: async (n) => { - let i = n.transaction?.kind === 'itx' ? Fo(n.transaction) : void 0, - o = await this.client._engine.request(n.protocolQuery, { - traceparent: this.client._tracingHelper.getTraceParent(), - interactiveTransaction: i, - isWrite: cn(n.protocolQuery.action), - customDataProxyFetch: n.customDataProxyFetch, - }); - return this.mapQueryEngineResult(n, o); - }, - batchBy: (n) => (n.transaction?.id ? `transaction-${n.transaction.id}` : _o(n.protocolQuery)), - batchOrder(n, i) { - return n.transaction?.kind === 'batch' && i.transaction?.kind === 'batch' - ? n.transaction.index - i.transaction.index - : 0; - }, - }))); - } - async request(e) { - try { - return await this.dataloader.request(e); - } catch (r) { - let { clientMethod: n, callsite: i, transaction: o, args: s, modelName: a } = e; - this.handleAndLogRequestError({ - error: r, - clientMethod: n, - callsite: i, - transaction: o, - args: s, - modelName: a, - globalOmit: e.globalOmit, - }); - } - } - mapQueryEngineResult({ dataPath: e, unpacker: r }, n) { - let i = n?.data, - o = this.unpack(i, e, r); - return g.env.PRISMA_CLIENT_GET_TIME ? { data: o } : o; - } - handleAndLogRequestError(e) { - try { - this.handleRequestError(e); - } catch (r) { - throw ( - this.logEmitter && - this.logEmitter.emit('error', { message: r.message, target: e.clientMethod, timestamp: new Date() }), - r - ); - } - } - handleRequestError({ - error: e, - clientMethod: r, - callsite: n, - transaction: i, - args: o, - modelName: s, - globalOmit: a, - }) { - if ((Vl(e), $l(e, i))) throw e; - if (e instanceof Z && Ql(e)) { - let h = Uo(e.meta); - Zt({ - args: o, - errors: [h], - callsite: n, - errorFormat: this.client._errorFormat, - originalMethod: r, - clientVersion: this.client._clientVersion, - globalOmit: a, - }); - } - let f = e.message; - if ( - (n && - (f = $t({ - callsite: n, - originalMethod: r, - isPanic: e.isPanic, - showColors: this.client._errorFormat === 'pretty', - message: f, - })), - (f = this.sanitizeMessage(f)), - e.code) - ) { - let h = s ? { modelName: s, ...e.meta } : e.meta; - throw new Z(f, { - code: e.code, - clientVersion: this.client._clientVersion, - meta: h, - batchRequestIdx: e.batchRequestIdx, - }); - } else { - if (e.isPanic) throw new xe(f, this.client._clientVersion); - if (e instanceof Q) - throw new Q(f, { clientVersion: this.client._clientVersion, batchRequestIdx: e.batchRequestIdx }); - if (e instanceof I) throw new I(f, this.client._clientVersion); - if (e instanceof xe) throw new xe(f, this.client._clientVersion); - } - throw ((e.clientVersion = this.client._clientVersion), e); - } - sanitizeMessage(e) { - return this.client._errorFormat && this.client._errorFormat !== 'pretty' ? (0, Lo.default)(e) : e; - } - unpack(e, r, n) { - if (!e || (e.data && (e = e.data), !e)) return e; - let i = Object.keys(e)[0], - o = Object.values(e)[0], - s = r.filter((h) => h !== 'select' && h !== 'include'), - a = Xr(o, s), - f = i === 'queryRaw' ? br(a) : et(a); - return n ? n(f) : f; - } - get [Symbol.toStringTag]() { - return 'RequestHandler'; - } - }; -function jl(t) { - if (t) { - if (t.kind === 'batch') return { kind: 'batch', options: { isolationLevel: t.isolationLevel } }; - if (t.kind === 'itx') return { kind: 'itx', options: Fo(t) }; - Me(t, 'Unknown transaction kind'); - } -} -function Fo(t) { - return { id: t.id, payload: t.payload }; -} -function $l(t, e) { - return yr(t) && e?.kind === 'batch' && t.batchRequestIdx !== e.index; -} -function Ql(t) { - return t.code === 'P2009' || t.code === 'P2012'; -} -function Uo(t) { - if (t.kind === 'Union') return { kind: 'Union', errors: t.errors.map(Uo) }; - if (Array.isArray(t.selectionPath)) { - let [, ...e] = t.selectionPath; - return { ...t, selectionPath: e }; - } - return t; -} -u(); -c(); -m(); -p(); -d(); -l(); -var No = yo; -u(); -c(); -m(); -p(); -d(); -l(); -var $o = it(Br()); -u(); -c(); -m(); -p(); -d(); -l(); -var M = class extends Error { - constructor(e) { - (super( - e + - ` -Read more at https://pris.ly/d/client-constructor` - ), - (this.name = 'PrismaClientConstructorValidationError')); - } - get [Symbol.toStringTag]() { - return 'PrismaClientConstructorValidationError'; - } -}; -re(M, 'PrismaClientConstructorValidationError'); -var qo = ['datasources', 'datasourceUrl', 'errorFormat', 'adapter', 'log', 'transactionOptions', 'omit', '__internal'], - Bo = ['pretty', 'colorless', 'minimal'], - Vo = ['info', 'query', 'warn', 'error'], - Jl = { - datasources: (t, { datasourceNames: e }) => { - if (t) { - if (typeof t != 'object' || Array.isArray(t)) - throw new M(`Invalid value ${JSON.stringify(t)} for "datasources" provided to PrismaClient constructor`); - for (let [r, n] of Object.entries(t)) { - if (!e.includes(r)) { - let i = rt(r, e) || ` Available datasources: ${e.join(', ')}`; - throw new M(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`); - } - if (typeof n != 'object' || Array.isArray(n)) - throw new M(`Invalid value ${JSON.stringify(t)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`); - if (n && typeof n == 'object') - for (let [i, o] of Object.entries(n)) { - if (i !== 'url') - throw new M(`Invalid value ${JSON.stringify(t)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`); - if (typeof o != 'string') - throw new M(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. -It should have this form: { url: "CONNECTION_STRING" }`); - } - } - } - }, - adapter: (t, e) => { - if (!t && Be(e.generator) === 'client') - throw new M('Using engine type "client" requires a driver adapter to be provided to PrismaClient constructor.'); - if (t === null) return; - if (t === void 0) - throw new M('"adapter" property must not be undefined, use null to conditionally disable driver adapters.'); - if (!gr(e).includes('driverAdapters')) - throw new M( - '"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.' - ); - if (Be(e.generator) === 'binary') - throw new M( - 'Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.' - ); - }, - datasourceUrl: (t) => { - if (typeof t < 'u' && typeof t != 'string') - throw new M(`Invalid value ${JSON.stringify(t)} for "datasourceUrl" provided to PrismaClient constructor. -Expected string or undefined.`); - }, - errorFormat: (t) => { - if (t) { - if (typeof t != 'string') - throw new M(`Invalid value ${JSON.stringify(t)} for "errorFormat" provided to PrismaClient constructor.`); - if (!Bo.includes(t)) { - let e = rt(t, Bo); - throw new M(`Invalid errorFormat ${t} provided to PrismaClient constructor.${e}`); - } - } - }, - log: (t) => { - if (!t) return; - if (!Array.isArray(t)) - throw new M(`Invalid value ${JSON.stringify(t)} for "log" provided to PrismaClient constructor.`); - function e(r) { - if (typeof r == 'string' && !Vo.includes(r)) { - let n = rt(r, Vo); - throw new M(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`); - } - } - for (let r of t) { - e(r); - let n = { - level: e, - emit: (i) => { - let o = ['stdout', 'event']; - if (!o.includes(i)) { - let s = rt(i, o); - throw new M( - `Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}` - ); - } - }, - }; - if (r && typeof r == 'object') - for (let [i, o] of Object.entries(r)) - if (n[i]) n[i](o); - else throw new M(`Invalid property ${i} for "log" provided to PrismaClient constructor`); - } - }, - transactionOptions: (t) => { - if (!t) return; - let e = t.maxWait; - if (e != null && e <= 0) - throw new M( - `Invalid value ${e} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0` - ); - let r = t.timeout; - if (r != null && r <= 0) - throw new M( - `Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0` - ); - }, - omit: (t, e) => { - if (typeof t != 'object') throw new M('"omit" option is expected to be an object.'); - if (t === null) throw new M('"omit" option can not be `null`'); - let r = []; - for (let [n, i] of Object.entries(t)) { - let o = Wl(n, e.runtimeDataModel); - if (!o) { - r.push({ kind: 'UnknownModel', modelKey: n }); - continue; - } - for (let [s, a] of Object.entries(i)) { - let f = o.fields.find((h) => h.name === s); - if (!f) { - r.push({ kind: 'UnknownField', modelKey: n, fieldName: s }); - continue; - } - if (f.relationName) { - r.push({ kind: 'RelationInOmit', modelKey: n, fieldName: s }); - continue; - } - typeof a != 'boolean' && r.push({ kind: 'InvalidFieldValue', modelKey: n, fieldName: s }); - } - } - if (r.length > 0) throw new M(Kl(t, r)); - }, - __internal: (t) => { - if (!t) return; - let e = ['debug', 'engine', 'configOverride']; - if (typeof t != 'object') - throw new M(`Invalid value ${JSON.stringify(t)} for "__internal" to PrismaClient constructor`); - for (let [r] of Object.entries(t)) - if (!e.includes(r)) { - let n = rt(r, e); - throw new M( - `Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}` - ); - } - }, - }; -function Qo(t, e) { - for (let [r, n] of Object.entries(t)) { - if (!qo.includes(r)) { - let i = rt(r, qo); - throw new M(`Unknown property ${r} provided to PrismaClient constructor.${i}`); - } - Jl[r](n, e); - } - if (t.datasourceUrl && t.datasources) - throw new M('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them'); -} -function rt(t, e) { - if (e.length === 0 || typeof t != 'string') return ''; - let r = Gl(t, e); - return r ? ` Did you mean "${r}"?` : ''; -} -function Gl(t, e) { - if (e.length === 0) return null; - let r = e.map((i) => ({ value: i, distance: (0, $o.default)(t, i) })); - r.sort((i, o) => (i.distance < o.distance ? -1 : 1)); - let n = r[0]; - return n.distance < 3 ? n.value : null; -} -function Wl(t, e) { - return jo(e.models, t) ?? jo(e.types, t); -} -function jo(t, e) { - let r = Object.keys(t).find((n) => ve(n) === e); - if (r) return t[r]; -} -function Kl(t, e) { - let r = He(t); - for (let o of e) - switch (o.kind) { - case 'UnknownModel': - (r.arguments.getField(o.modelKey)?.markAsError(), - r.addErrorMessage(() => `Unknown model name: ${o.modelKey}.`)); - break; - case 'UnknownField': - (r.arguments.getDeepField([o.modelKey, o.fieldName])?.markAsError(), - r.addErrorMessage(() => `Model "${o.modelKey}" does not have a field named "${o.fieldName}".`)); - break; - case 'RelationInOmit': - (r.arguments.getDeepField([o.modelKey, o.fieldName])?.markAsError(), - r.addErrorMessage(() => 'Relations are already excluded by default and can not be specified in "omit".')); - break; - case 'InvalidFieldValue': - (r.arguments.getDeepFieldValue([o.modelKey, o.fieldName])?.markAsError(), - r.addErrorMessage(() => 'Omit field option value must be a boolean.')); - break; - } - let { message: n, args: i } = Xt(r, 'colorless'); - return `Error validating "omit" option: - -${i} - -${n}`; -} -u(); -c(); -m(); -p(); -d(); -l(); -function Jo(t) { - return t.length === 0 - ? Promise.resolve([]) - : new Promise((e, r) => { - let n = new Array(t.length), - i = null, - o = !1, - s = 0, - a = () => { - o || (s++, s === t.length && ((o = !0), i ? r(i) : e(n))); - }, - f = (h) => { - o || ((o = !0), r(h)); - }; - for (let h = 0; h < t.length; h++) - t[h].then( - (C) => { - ((n[h] = C), a()); - }, - (C) => { - if (!yr(C)) { - f(C); - return; - } - C.batchRequestIdx === h ? f(C) : (i || (i = C), a()); - } - ); - }); -} -var Ae = G('prisma:client'); -typeof globalThis == 'object' && (globalThis.NODE_CLIENT = !0); -var Hl = { requestArgsToMiddlewareArgs: (t) => t, middlewareArgsToRequestArgs: (t) => t }, - zl = Symbol.for('prisma.client.transaction.id'), - Yl = { - id: 0, - nextId() { - return ++this.id; - }, - }; -function Ko(t) { - class e { - _originalClient = this; - _runtimeDataModel; - _requestHandler; - _connectionPromise; - _disconnectionPromise; - _engineConfig; - _accelerateEngineConfig; - _clientVersion; - _errorFormat; - _tracingHelper; - _previewFeatures; - _activeProvider; - _globalOmit; - _extensions; - _engine; - _appliedParent; - _createPrismaPromise = an(); - constructor(n) { - ((t = n?.__internal?.configOverride?.(t) ?? t), po(t), n && Qo(n, t)); - let i = new sr().on('error', () => {}); - ((this._extensions = ze.empty()), - (this._previewFeatures = gr(t)), - (this._clientVersion = t.clientVersion ?? No), - (this._activeProvider = t.activeProvider), - (this._globalOmit = n?.omit), - (this._tracingHelper = Do())); - let o = t.relativeEnvPaths && { - rootEnvPath: t.relativeEnvPaths.rootEnvPath && Ut.resolve(t.dirname, t.relativeEnvPaths.rootEnvPath), - schemaEnvPath: t.relativeEnvPaths.schemaEnvPath && Ut.resolve(t.dirname, t.relativeEnvPaths.schemaEnvPath), - }, - s; - if (n?.adapter) { - s = n.adapter; - let f = t.activeProvider === 'postgresql' || t.activeProvider === 'cockroachdb' ? 'postgres' : t.activeProvider; - if (s.provider !== f) - throw new I( - `The Driver Adapter \`${s.adapterName}\`, based on \`${s.provider}\`, is not compatible with the provider \`${f}\` specified in the Prisma schema.`, - this._clientVersion - ); - if (n.datasources || n.datasourceUrl !== void 0) - throw new I( - 'Custom datasource configuration is not compatible with Prisma Driver Adapters. Please define the database connection string directly in the Driver Adapter configuration.', - this._clientVersion - ); - } - let a = t.injectableEdgeEnv?.(); - try { - let f = n ?? {}, - h = f.__internal ?? {}, - C = h.debug === !0; - C && G.enable('prisma:client'); - let R = Ut.resolve(t.dirname, t.relativePath); - (Nn.existsSync(R) || (R = t.dirname), - Ae('dirname', t.dirname), - Ae('relativePath', t.relativePath), - Ae('cwd', R)); - let k = h.engine || {}; - if ( - (f.errorFormat - ? (this._errorFormat = f.errorFormat) - : g.env.NODE_ENV === 'production' - ? (this._errorFormat = 'minimal') - : g.env.NO_COLOR - ? (this._errorFormat = 'colorless') - : (this._errorFormat = 'colorless'), - (this._runtimeDataModel = t.runtimeDataModel), - (this._engineConfig = { - cwd: R, - dirname: t.dirname, - enableDebugLogs: C, - allowTriggerPanic: k.allowTriggerPanic, - prismaPath: k.binaryPath ?? void 0, - engineEndpoint: k.endpoint, - generator: t.generator, - showColors: this._errorFormat === 'pretty', - logLevel: f.log && Mo(f.log), - logQueries: - f.log && - !!(typeof f.log == 'string' - ? f.log === 'query' - : f.log.find((A) => (typeof A == 'string' ? A === 'query' : A.level === 'query'))), - env: a?.parsed ?? {}, - flags: [], - engineWasm: t.engineWasm, - compilerWasm: t.compilerWasm, - clientVersion: t.clientVersion, - engineVersion: t.engineVersion, - previewFeatures: this._previewFeatures, - activeProvider: t.activeProvider, - inlineSchema: t.inlineSchema, - overrideDatasources: fo(f, t.datasourceNames), - inlineDatasources: t.inlineDatasources, - inlineSchemaHash: t.inlineSchemaHash, - tracingHelper: this._tracingHelper, - transactionOptions: { - maxWait: f.transactionOptions?.maxWait ?? 2e3, - timeout: f.transactionOptions?.timeout ?? 5e3, - isolationLevel: f.transactionOptions?.isolationLevel, - }, - logEmitter: i, - isBundled: t.isBundled, - adapter: s, - }), - (this._accelerateEngineConfig = { - ...this._engineConfig, - accelerateUtils: { - resolveDatasourceUrl: dr, - getBatchRequestPayload: ur, - prismaGraphQLToJSError: cr, - PrismaClientUnknownRequestError: Q, - PrismaClientInitializationError: I, - PrismaClientKnownRequestError: Z, - debug: G('prisma:client:accelerateEngine'), - engineVersion: Wo.version, - clientVersion: t.clientVersion, - }, - }), - Ae('clientVersion', t.clientVersion), - (this._engine = xo(t, this._engineConfig)), - (this._requestHandler = new wr(this, i)), - f.log) - ) - for (let A of f.log) { - let _ = typeof A == 'string' ? A : A.emit === 'stdout' ? A.level : null; - _ && - this.$on(_, (O) => { - lt.log(`${lt.tags[_] ?? ''}`, O.message || O.query); - }); - } - } catch (f) { - throw ((f.clientVersion = this._clientVersion), f); - } - return (this._appliedParent = Tt(this)); - } - get [Symbol.toStringTag]() { - return 'PrismaClient'; - } - $on(n, i) { - return (n === 'beforeExit' ? this._engine.onBeforeExit(i) : n && this._engineConfig.logEmitter.on(n, i), this); - } - $connect() { - try { - return this._engine.start(); - } catch (n) { - throw ((n.clientVersion = this._clientVersion), n); - } - } - async $disconnect() { - try { - await this._engine.stop(); - } catch (n) { - throw ((n.clientVersion = this._clientVersion), n); - } finally { - Un(); - } - } - $executeRawInternal(n, i, o, s) { - let a = this._activeProvider; - return this._request({ - action: 'executeRaw', - args: o, - transaction: n, - clientMethod: i, - argsMapper: sn({ clientMethod: i, activeProvider: a }), - callsite: Ce(this._errorFormat), - dataPath: [], - middlewareArgsMapper: s, - }); - } - $executeRaw(n, ...i) { - return this._createPrismaPromise((o) => { - if (n.raw !== void 0 || n.sql !== void 0) { - let [s, a] = Go(n, i); - return ( - on( - this._activeProvider, - s.text, - s.values, - Array.isArray(n) ? 'prisma.$executeRaw``' : 'prisma.$executeRaw(sql``)' - ), - this.$executeRawInternal(o, '$executeRaw', s, a) - ); - } - throw new K( - "`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n", - { clientVersion: this._clientVersion } - ); - }); - } - $executeRawUnsafe(n, ...i) { - return this._createPrismaPromise( - (o) => ( - on(this._activeProvider, n, i, 'prisma.$executeRawUnsafe(, [...values])'), - this.$executeRawInternal(o, '$executeRawUnsafe', [n, ...i]) - ) - ); - } - $runCommandRaw(n) { - if (t.activeProvider !== 'mongodb') - throw new K(`The ${t.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`, { - clientVersion: this._clientVersion, - }); - return this._createPrismaPromise((i) => - this._request({ - args: n, - clientMethod: '$runCommandRaw', - dataPath: [], - action: 'runCommandRaw', - argsMapper: Eo, - callsite: Ce(this._errorFormat), - transaction: i, - }) - ); - } - async $queryRawInternal(n, i, o, s) { - let a = this._activeProvider; - return this._request({ - action: 'queryRaw', - args: o, - transaction: n, - clientMethod: i, - argsMapper: sn({ clientMethod: i, activeProvider: a }), - callsite: Ce(this._errorFormat), - dataPath: [], - middlewareArgsMapper: s, - }); - } - $queryRaw(n, ...i) { - return this._createPrismaPromise((o) => { - if (n.raw !== void 0 || n.sql !== void 0) return this.$queryRawInternal(o, '$queryRaw', ...Go(n, i)); - throw new K( - "`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n", - { clientVersion: this._clientVersion } - ); - }); - } - $queryRawTyped(n) { - return this._createPrismaPromise((i) => { - if (!this._hasPreviewFlag('typedSql')) - throw new K('`typedSql` preview feature must be enabled in order to access $queryRawTyped API', { - clientVersion: this._clientVersion, - }); - return this.$queryRawInternal(i, '$queryRawTyped', n); - }); - } - $queryRawUnsafe(n, ...i) { - return this._createPrismaPromise((o) => this.$queryRawInternal(o, '$queryRawUnsafe', [n, ...i])); - } - _transactionWithArray({ promises: n, options: i }) { - let o = Yl.nextId(), - s = Io(n.length), - a = n.map((f, h) => { - if (f?.[Symbol.toStringTag] !== 'PrismaPromise') - throw new Error( - 'All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.' - ); - let C = i?.isolationLevel ?? this._engineConfig.transactionOptions.isolationLevel, - R = { kind: 'batch', id: o, index: h, isolationLevel: C, lock: s }; - return f.requestTransaction?.(R) ?? f; - }); - return Jo(a); - } - async _transactionWithCallback({ callback: n, options: i }) { - let o = { traceparent: this._tracingHelper.getTraceParent() }, - s = { - maxWait: i?.maxWait ?? this._engineConfig.transactionOptions.maxWait, - timeout: i?.timeout ?? this._engineConfig.transactionOptions.timeout, - isolationLevel: i?.isolationLevel ?? this._engineConfig.transactionOptions.isolationLevel, - }, - a = await this._engine.transaction('start', o, s), - f; - try { - let h = { kind: 'itx', ...a }; - ((f = await n(this._createItxClient(h))), await this._engine.transaction('commit', o, a)); - } catch (h) { - throw (await this._engine.transaction('rollback', o, a).catch(() => {}), h); - } - return f; - } - _createItxClient(n) { - return ae( - Tt( - ae(Yi(this), [ - H('_appliedParent', () => this._appliedParent._createItxClient(n)), - H('_createPrismaPromise', () => an(n)), - H(zl, () => n.id), - ]) - ), - [Xe(ro)] - ); - } - $transaction(n, i) { - let o; - typeof n == 'function' - ? this._engineConfig.adapter?.adapterName === '@prisma/adapter-d1' - ? (o = () => { - throw new Error( - 'Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.' - ); - }) - : (o = () => this._transactionWithCallback({ callback: n, options: i })) - : (o = () => this._transactionWithArray({ promises: n, options: i })); - let s = { name: 'transaction', attributes: { method: '$transaction' } }; - return this._tracingHelper.runInChildSpan(s, o); - } - _request(n) { - n.otelParentCtx = this._tracingHelper.getActiveContext(); - let i = n.middlewareArgsMapper ?? Hl, - o = { - args: i.requestArgsToMiddlewareArgs(n.args), - dataPath: n.dataPath, - runInTransaction: !!n.transaction, - action: n.action, - model: n.model, - }, - s = { - operation: { - name: 'operation', - attributes: { method: o.action, model: o.model, name: o.model ? `${o.model}.${o.action}` : o.action }, - }, - }, - a = async (f) => { - let { runInTransaction: h, args: C, ...R } = f, - k = { ...n, ...R }; - (C && (k.args = i.middlewareArgsToRequestArgs(C)), - n.transaction !== void 0 && h === !1 && delete k.transaction); - let A = await so(this, k); - return k.model - ? to({ - result: A, - modelName: k.model, - args: k.args, - extensions: this._extensions, - runtimeDataModel: this._runtimeDataModel, - globalOmit: this._globalOmit, - }) - : A; - }; - return this._tracingHelper.runInChildSpan(s.operation, () => a(o)); - } - async _executeRequest({ - args: n, - clientMethod: i, - dataPath: o, - callsite: s, - action: a, - model: f, - argsMapper: h, - transaction: C, - unpacker: R, - otelParentCtx: k, - customDataProxyFetch: A, - }) { - try { - n = h ? h(n) : n; - let _ = { name: 'serialize' }, - O = this._tracingHelper.runInChildSpan(_, () => - nr({ - modelName: f, - runtimeDataModel: this._runtimeDataModel, - action: a, - args: n, - clientMethod: i, - callsite: s, - extensions: this._extensions, - errorFormat: this._errorFormat, - clientVersion: this._clientVersion, - previewFeatures: this._previewFeatures, - globalOmit: this._globalOmit, - }) - ); - return ( - G.enabled('prisma:client') && - (Ae('Prisma Client call:'), - Ae(`prisma.${i}(${Vi(n)})`), - Ae('Generated request:'), - Ae( - JSON.stringify(O, null, 2) + - ` -` - )), - C?.kind === 'batch' && (await C.lock), - this._requestHandler.request({ - protocolQuery: O, - modelName: f, - action: a, - clientMethod: i, - dataPath: o, - callsite: s, - args: n, - extensions: this._extensions, - transaction: C, - unpacker: R, - otelParentCtx: k, - otelChildCtx: this._tracingHelper.getActiveContext(), - globalOmit: this._globalOmit, - customDataProxyFetch: A, - }) - ); - } catch (_) { - throw ((_.clientVersion = this._clientVersion), _); - } - } - $metrics = new Ye(this); - _hasPreviewFlag(n) { - return !!this._engineConfig.previewFeatures?.includes(n); - } - $applyPendingMigrations() { - return this._engine.applyPendingMigrations(); - } - $extends = Xi; - } - return e; -} -function Go(t, e) { - return Xl(t) ? [new ee(t, e), So] : [t, Oo]; -} -function Xl(t) { - return Array.isArray(t) && Array.isArray(t.raw); -} -u(); -c(); -m(); -p(); -d(); -l(); -var Zl = new Set([ - 'toJSON', - '$$typeof', - 'asymmetricMatch', - Symbol.iterator, - Symbol.toStringTag, - Symbol.isConcatSpreadable, - Symbol.toPrimitive, -]); -function Ho(t) { - return new Proxy(t, { - get(e, r) { - if (r in e) return e[r]; - if (!Zl.has(r)) throw new TypeError(`Invalid enum value: ${String(r)}`); - }, - }); -} -u(); -c(); -m(); -p(); -d(); -l(); -l(); -0 && - (module.exports = { - DMMF, - Debug, - Decimal, - Extensions, - MetricsClient, - PrismaClientInitializationError, - PrismaClientKnownRequestError, - PrismaClientRustPanicError, - PrismaClientUnknownRequestError, - PrismaClientValidationError, - Public, - Sql, - createParam, - defineDmmfProperty, - deserializeJsonResponse, - deserializeRawResult, - dmmfToRuntimeDataModel, - empty, - getPrismaClient, - getRuntime, - join, - makeStrictEnum, - makeTypedQueryFactory, - objectEnumValues, - raw, - serializeJsonQuery, - skip, - sqltag, - warnEnvConflicts, - warnOnce, - }); -//# sourceMappingURL=wasm-engine-edge.js.map diff --git a/prisma/generated/client/schema.prisma b/prisma/generated/client/schema.prisma deleted file mode 100644 index b89286e..0000000 --- a/prisma/generated/client/schema.prisma +++ /dev/null @@ -1,231 +0,0 @@ -datasource db { - provider = "postgresql" - url = env("DATABASE_URL") -} - -generator client { - provider = "prisma-client-js" - output = "./generated/client" -} - -/// Users come from Clerk, but we mirror them locally -model User { - id String @id @default(cuid()) // local UUID - clerkId String @unique // Clerk auth userId - name String? - email String? - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - - healthProfiles HealthProfile[] - workouts Workout[] - meals Meal[] - mealItems MealItem[] - progressLogs ProgressLog[] - weightEntries WeightEntry[] - waterIntake WaterIntake[] - sleepEntries SleepEntry[] - goals Goal[] -} - -/// Health profile holds user settings and preferences -model HealthProfile { - id String @id @default(cuid()) - userId String - user User @relation(fields: [userId], references: [id]) - height Float? // Height value (always stored in cm) - weight Float? // Weight value (always stored in kg) - age Int? - gender String? // 'Male' | 'Female' - birthday DateTime? - targetWeight Float? // Target weight (always stored in kg) - targetCalories Int? @default(2000) - targetWaterL Float? @default(2.0) - activityLevel String? // 'sedentary' | 'light' | 'moderate' | 'active' | 'very_active' - fitnessGoal String? // 'lose_weight' | 'gain_weight' | 'maintain' | 'build_muscle' | 'improve_fitness' - heightUnit String? @default("cm") // 'cm' | 'in' - weightUnit String? @default("kg") // 'kg' | 'lb' - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - syncedAt DateTime? - isDeleted Boolean @default(false) -} - -/// Workouts with categories and types -model Workout { - id String @id @default(cuid()) - userId String - user User @relation(fields: [userId], references: [id]) - title String - category String // 'strength' | 'cardio' | 'yoga' | 'pilates' | 'functional' | 'flexibility' - durationMin Int? - calories Int? - date DateTime - notes String? - isCompleted Boolean @default(false) - totalTime Int? // Total time in seconds - restTime Int? // Total rest time in seconds - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - syncedAt DateTime? - isDeleted Boolean @default(false) - - exercises Exercise[] -} - -/// Exercises per workout with detailed tracking -model Exercise { - id String @id @default(cuid()) - workoutId String - workout Workout @relation(fields: [workoutId], references: [id]) - name String - sets Int? - reps Int? - weightKg Float? - duration Int? // Duration in seconds - distance Float? // Distance in meters - restTime Int? // Rest time in seconds - order Int @default(0) // Exercise order in workout - isCompleted Boolean @default(false) - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - syncedAt DateTime? - isDeleted Boolean @default(false) -} - -/// Meals with meal types -model Meal { - id String @id @default(cuid()) - userId String - user User @relation(fields: [userId], references: [id]) - name String - mealType String // 'breakfast' | 'lunch' | 'dinner' | 'snack' - calories Int? - protein Float? - carbs Float? - fat Float? - date DateTime - notes String? - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - syncedAt DateTime? - isDeleted Boolean @default(false) - - mealItems MealItem[] -} - -/// Individual food items within meals -model MealItem { - id String @id @default(cuid()) - mealId String - meal Meal @relation(fields: [mealId], references: [id]) - userId String - user User @relation(fields: [userId], references: [id]) - name String - calories Int? - protein Float? - carbs Float? - fat Float? - quantity Float? // Quantity in grams or units - unit String? // Unit of measurement - isHighInProtein Boolean @default(false) - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - syncedAt DateTime? - isDeleted Boolean @default(false) -} - -/// Daily progress logs (hydration, sleep, mood, weight tracking) -model ProgressLog { - id String @id @default(cuid()) - userId String - user User @relation(fields: [userId], references: [id]) - date DateTime - waterL Float? - sleepHrs Float? - mood String? // 'poor' | 'fair' | 'good' | 'excellent' - weightKg Float? - steps Int? - activeMinutes Int? - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - syncedAt DateTime? - isDeleted Boolean @default(false) -} - -/// Individual weight entries with photos and notes -model WeightEntry { - id String @id @default(cuid()) - userId String - user User @relation(fields: [userId], references: [id]) - weightKg Float - date DateTime - photo String? // URL or path to photo - notes String? - bodyFatPercentage Float? - muscleMassKg Float? - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - syncedAt DateTime? - isDeleted Boolean @default(false) -} - -/// Individual water intake entries -model WaterIntake { - id String @id @default(cuid()) - userId String - user User @relation(fields: [userId], references: [id]) - amountMl Int // Amount in milliliters - date DateTime - time DateTime // Specific time of intake - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - syncedAt DateTime? - isDeleted Boolean @default(false) -} - -/// Individual sleep entries with quality tracking -model SleepEntry { - id String @id @default(cuid()) - userId String - user User @relation(fields: [userId], references: [id]) - hours Float - quality String // 'poor' | 'fair' | 'good' | 'excellent' - date DateTime - bedtime DateTime? - wakeTime DateTime? - notes String? - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - syncedAt DateTime? - isDeleted Boolean @default(false) -} - -/// User goals and targets -model Goal { - id String @id @default(cuid()) - userId String - user User @relation(fields: [userId], references: [id]) - type String // 'weight' | 'calories' | 'workouts' | 'water' | 'sleep' | 'steps' | 'strength' - target Float - current Float @default(0) - unit String // 'kg' | 'calories' | 'workouts' | 'liters' | 'hours' | 'steps' | 'kg' - startDate DateTime - endDate DateTime? - isActive Boolean @default(true) - notes String? - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - syncedAt DateTime? - isDeleted Boolean @default(false) -} diff --git a/prisma/generated/client/wasm.d.ts b/prisma/generated/client/wasm.d.ts deleted file mode 100644 index ea465c2..0000000 --- a/prisma/generated/client/wasm.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './index'; diff --git a/prisma/generated/client/wasm.js b/prisma/generated/client/wasm.js deleted file mode 100644 index 5b0153f..0000000 --- a/prisma/generated/client/wasm.js +++ /dev/null @@ -1,349 +0,0 @@ -/* !!! This is code generated by Prisma. Do not edit directly. !!! -/* eslint-disable */ - -Object.defineProperty(exports, '__esModule', { value: true }); - -const { Decimal, objectEnumValues, makeStrictEnum, Public, getRuntime, skip } = require('./runtime/index-browser.js'); - -const Prisma = {}; - -exports.Prisma = Prisma; -exports.$Enums = {}; - -/** - * Prisma Client JS version: 6.14.0 - * Query Engine version: 717184b7b35ea05dfa71a3236b7af656013e1e49 - */ -Prisma.prismaVersion = { - client: '6.14.0', - engine: '717184b7b35ea05dfa71a3236b7af656013e1e49', -}; - -Prisma.PrismaClientKnownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; -Prisma.PrismaClientUnknownRequestError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; -Prisma.PrismaClientRustPanicError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; -Prisma.PrismaClientInitializationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; -Prisma.PrismaClientValidationError = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; -Prisma.Decimal = Decimal; - -/** - * Re-export of sql-template-tag - */ -Prisma.sql = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; -Prisma.empty = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; -Prisma.join = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; -Prisma.raw = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; -Prisma.validator = Public.validator; - -/** - * Extensions - */ -Prisma.getExtensionContext = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; -Prisma.defineExtension = () => { - const runtimeName = getRuntime().prettyName; - throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). -In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`); -}; - -/** - * Shorthand utilities for JSON filtering - */ -Prisma.DbNull = objectEnumValues.instances.DbNull; -Prisma.JsonNull = objectEnumValues.instances.JsonNull; -Prisma.AnyNull = objectEnumValues.instances.AnyNull; - -Prisma.NullTypes = { - DbNull: objectEnumValues.classes.DbNull, - JsonNull: objectEnumValues.classes.JsonNull, - AnyNull: objectEnumValues.classes.AnyNull, -}; - -/** - * Enums - */ - -exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable', -}); - -exports.Prisma.UserScalarFieldEnum = { - id: 'id', - clerkId: 'clerkId', - name: 'name', - email: 'email', - createdAt: 'createdAt', - updatedAt: 'updatedAt', -}; - -exports.Prisma.HealthProfileScalarFieldEnum = { - id: 'id', - userId: 'userId', - height: 'height', - weight: 'weight', - age: 'age', - gender: 'gender', - birthday: 'birthday', - targetWeight: 'targetWeight', - targetCalories: 'targetCalories', - targetWaterL: 'targetWaterL', - activityLevel: 'activityLevel', - fitnessGoal: 'fitnessGoal', - heightUnit: 'heightUnit', - weightUnit: 'weightUnit', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.WorkoutScalarFieldEnum = { - id: 'id', - userId: 'userId', - title: 'title', - category: 'category', - durationMin: 'durationMin', - calories: 'calories', - date: 'date', - notes: 'notes', - isCompleted: 'isCompleted', - totalTime: 'totalTime', - restTime: 'restTime', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.ExerciseScalarFieldEnum = { - id: 'id', - workoutId: 'workoutId', - name: 'name', - sets: 'sets', - reps: 'reps', - weightKg: 'weightKg', - duration: 'duration', - distance: 'distance', - restTime: 'restTime', - order: 'order', - isCompleted: 'isCompleted', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.MealScalarFieldEnum = { - id: 'id', - userId: 'userId', - name: 'name', - mealType: 'mealType', - calories: 'calories', - protein: 'protein', - carbs: 'carbs', - fat: 'fat', - date: 'date', - notes: 'notes', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.MealItemScalarFieldEnum = { - id: 'id', - mealId: 'mealId', - userId: 'userId', - name: 'name', - calories: 'calories', - protein: 'protein', - carbs: 'carbs', - fat: 'fat', - quantity: 'quantity', - unit: 'unit', - isHighInProtein: 'isHighInProtein', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.ProgressLogScalarFieldEnum = { - id: 'id', - userId: 'userId', - date: 'date', - waterL: 'waterL', - sleepHrs: 'sleepHrs', - mood: 'mood', - weightKg: 'weightKg', - steps: 'steps', - activeMinutes: 'activeMinutes', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.WeightEntryScalarFieldEnum = { - id: 'id', - userId: 'userId', - weightKg: 'weightKg', - date: 'date', - photo: 'photo', - notes: 'notes', - bodyFatPercentage: 'bodyFatPercentage', - muscleMassKg: 'muscleMassKg', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.WaterIntakeScalarFieldEnum = { - id: 'id', - userId: 'userId', - amountMl: 'amountMl', - date: 'date', - time: 'time', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.SleepEntryScalarFieldEnum = { - id: 'id', - userId: 'userId', - hours: 'hours', - quality: 'quality', - date: 'date', - bedtime: 'bedtime', - wakeTime: 'wakeTime', - notes: 'notes', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.GoalScalarFieldEnum = { - id: 'id', - userId: 'userId', - type: 'type', - target: 'target', - current: 'current', - unit: 'unit', - startDate: 'startDate', - endDate: 'endDate', - isActive: 'isActive', - notes: 'notes', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - syncedAt: 'syncedAt', - isDeleted: 'isDeleted', -}; - -exports.Prisma.SortOrder = { - asc: 'asc', - desc: 'desc', -}; - -exports.Prisma.QueryMode = { - default: 'default', - insensitive: 'insensitive', -}; - -exports.Prisma.NullsOrder = { - first: 'first', - last: 'last', -}; - -exports.Prisma.ModelName = { - User: 'User', - HealthProfile: 'HealthProfile', - Workout: 'Workout', - Exercise: 'Exercise', - Meal: 'Meal', - MealItem: 'MealItem', - ProgressLog: 'ProgressLog', - WeightEntry: 'WeightEntry', - WaterIntake: 'WaterIntake', - SleepEntry: 'SleepEntry', - Goal: 'Goal', -}; - -/** - * This is a stub Prisma Client that will error at runtime if called. - */ -class PrismaClient { - constructor() { - return new Proxy(this, { - get(target, prop) { - let message; - const runtime = getRuntime(); - if (runtime.isEdge) { - message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: -- Use Prisma Accelerate: https://pris.ly/d/accelerate -- Use Driver Adapters: https://pris.ly/d/driver-adapters -`; - } else { - message = - 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + - runtime.prettyName + - '`).'; - } - - message += ` -If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`; - - throw new Error(message); - }, - }); - } -} - -exports.PrismaClient = PrismaClient; - -Object.assign(exports, Prisma); diff --git a/prisma/migrations/20250825234418_init/migration.sql b/prisma/migrations/20250825234418_init/migration.sql deleted file mode 100644 index 4805d05..0000000 --- a/prisma/migrations/20250825234418_init/migration.sql +++ /dev/null @@ -1,244 +0,0 @@ --- CreateTable -CREATE TABLE "public"."User" ( - "id" TEXT NOT NULL, - "clerkId" TEXT NOT NULL, - "name" TEXT, - "email" TEXT, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "User_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "public"."HealthProfile" ( - "id" TEXT NOT NULL, - "userId" TEXT NOT NULL, - "height" DOUBLE PRECISION, - "weight" DOUBLE PRECISION, - "age" INTEGER, - "gender" TEXT, - "birthday" TIMESTAMP(3), - "targetWeight" DOUBLE PRECISION, - "targetCalories" INTEGER DEFAULT 2000, - "targetWaterL" DOUBLE PRECISION DEFAULT 2.0, - "activityLevel" TEXT, - "fitnessGoal" TEXT, - "heightUnit" TEXT DEFAULT 'cm', - "weightUnit" TEXT DEFAULT 'kg', - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "syncedAt" TIMESTAMP(3), - "isDeleted" BOOLEAN NOT NULL DEFAULT false, - - CONSTRAINT "HealthProfile_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "public"."Workout" ( - "id" TEXT NOT NULL, - "userId" TEXT NOT NULL, - "title" TEXT NOT NULL, - "category" TEXT NOT NULL, - "durationMin" INTEGER, - "calories" INTEGER, - "date" TIMESTAMP(3) NOT NULL, - "notes" TEXT, - "isCompleted" BOOLEAN NOT NULL DEFAULT false, - "totalTime" INTEGER, - "restTime" INTEGER, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "syncedAt" TIMESTAMP(3), - "isDeleted" BOOLEAN NOT NULL DEFAULT false, - - CONSTRAINT "Workout_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "public"."Exercise" ( - "id" TEXT NOT NULL, - "workoutId" TEXT NOT NULL, - "name" TEXT NOT NULL, - "sets" INTEGER, - "reps" INTEGER, - "weightKg" DOUBLE PRECISION, - "duration" INTEGER, - "distance" DOUBLE PRECISION, - "restTime" INTEGER, - "order" INTEGER NOT NULL DEFAULT 0, - "isCompleted" BOOLEAN NOT NULL DEFAULT false, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "syncedAt" TIMESTAMP(3), - "isDeleted" BOOLEAN NOT NULL DEFAULT false, - - CONSTRAINT "Exercise_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "public"."Meal" ( - "id" TEXT NOT NULL, - "userId" TEXT NOT NULL, - "name" TEXT NOT NULL, - "mealType" TEXT NOT NULL, - "calories" INTEGER, - "protein" DOUBLE PRECISION, - "carbs" DOUBLE PRECISION, - "fat" DOUBLE PRECISION, - "date" TIMESTAMP(3) NOT NULL, - "notes" TEXT, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "syncedAt" TIMESTAMP(3), - "isDeleted" BOOLEAN NOT NULL DEFAULT false, - - CONSTRAINT "Meal_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "public"."MealItem" ( - "id" TEXT NOT NULL, - "mealId" TEXT NOT NULL, - "userId" TEXT NOT NULL, - "name" TEXT NOT NULL, - "calories" INTEGER, - "protein" DOUBLE PRECISION, - "carbs" DOUBLE PRECISION, - "fat" DOUBLE PRECISION, - "quantity" DOUBLE PRECISION, - "unit" TEXT, - "isHighInProtein" BOOLEAN NOT NULL DEFAULT false, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "syncedAt" TIMESTAMP(3), - "isDeleted" BOOLEAN NOT NULL DEFAULT false, - - CONSTRAINT "MealItem_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "public"."ProgressLog" ( - "id" TEXT NOT NULL, - "userId" TEXT NOT NULL, - "date" TIMESTAMP(3) NOT NULL, - "waterL" DOUBLE PRECISION, - "sleepHrs" DOUBLE PRECISION, - "mood" TEXT, - "weightKg" DOUBLE PRECISION, - "steps" INTEGER, - "activeMinutes" INTEGER, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "syncedAt" TIMESTAMP(3), - "isDeleted" BOOLEAN NOT NULL DEFAULT false, - - CONSTRAINT "ProgressLog_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "public"."WeightEntry" ( - "id" TEXT NOT NULL, - "userId" TEXT NOT NULL, - "weightKg" DOUBLE PRECISION NOT NULL, - "date" TIMESTAMP(3) NOT NULL, - "photo" TEXT, - "notes" TEXT, - "bodyFatPercentage" DOUBLE PRECISION, - "muscleMassKg" DOUBLE PRECISION, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "syncedAt" TIMESTAMP(3), - "isDeleted" BOOLEAN NOT NULL DEFAULT false, - - CONSTRAINT "WeightEntry_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "public"."WaterIntake" ( - "id" TEXT NOT NULL, - "userId" TEXT NOT NULL, - "amountMl" INTEGER NOT NULL, - "date" TIMESTAMP(3) NOT NULL, - "time" TIMESTAMP(3) NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "syncedAt" TIMESTAMP(3), - "isDeleted" BOOLEAN NOT NULL DEFAULT false, - - CONSTRAINT "WaterIntake_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "public"."SleepEntry" ( - "id" TEXT NOT NULL, - "userId" TEXT NOT NULL, - "hours" DOUBLE PRECISION NOT NULL, - "quality" TEXT NOT NULL, - "date" TIMESTAMP(3) NOT NULL, - "bedtime" TIMESTAMP(3), - "wakeTime" TIMESTAMP(3), - "notes" TEXT, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "syncedAt" TIMESTAMP(3), - "isDeleted" BOOLEAN NOT NULL DEFAULT false, - - CONSTRAINT "SleepEntry_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "public"."Goal" ( - "id" TEXT NOT NULL, - "userId" TEXT NOT NULL, - "type" TEXT NOT NULL, - "target" DOUBLE PRECISION NOT NULL, - "current" DOUBLE PRECISION NOT NULL DEFAULT 0, - "unit" TEXT NOT NULL, - "startDate" TIMESTAMP(3) NOT NULL, - "endDate" TIMESTAMP(3), - "isActive" BOOLEAN NOT NULL DEFAULT true, - "notes" TEXT, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - "syncedAt" TIMESTAMP(3), - "isDeleted" BOOLEAN NOT NULL DEFAULT false, - - CONSTRAINT "Goal_pkey" PRIMARY KEY ("id") -); - --- CreateIndex -CREATE UNIQUE INDEX "User_clerkId_key" ON "public"."User"("clerkId"); - --- AddForeignKey -ALTER TABLE "public"."HealthProfile" ADD CONSTRAINT "HealthProfile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "public"."User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "public"."Workout" ADD CONSTRAINT "Workout_userId_fkey" FOREIGN KEY ("userId") REFERENCES "public"."User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "public"."Exercise" ADD CONSTRAINT "Exercise_workoutId_fkey" FOREIGN KEY ("workoutId") REFERENCES "public"."Workout"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "public"."Meal" ADD CONSTRAINT "Meal_userId_fkey" FOREIGN KEY ("userId") REFERENCES "public"."User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "public"."MealItem" ADD CONSTRAINT "MealItem_mealId_fkey" FOREIGN KEY ("mealId") REFERENCES "public"."Meal"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "public"."MealItem" ADD CONSTRAINT "MealItem_userId_fkey" FOREIGN KEY ("userId") REFERENCES "public"."User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "public"."ProgressLog" ADD CONSTRAINT "ProgressLog_userId_fkey" FOREIGN KEY ("userId") REFERENCES "public"."User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "public"."WeightEntry" ADD CONSTRAINT "WeightEntry_userId_fkey" FOREIGN KEY ("userId") REFERENCES "public"."User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "public"."WaterIntake" ADD CONSTRAINT "WaterIntake_userId_fkey" FOREIGN KEY ("userId") REFERENCES "public"."User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "public"."SleepEntry" ADD CONSTRAINT "SleepEntry_userId_fkey" FOREIGN KEY ("userId") REFERENCES "public"."User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "public"."Goal" ADD CONSTRAINT "Goal_userId_fkey" FOREIGN KEY ("userId") REFERENCES "public"."User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml deleted file mode 100644 index 044d57c..0000000 --- a/prisma/migrations/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (e.g., Git) -provider = "postgresql" diff --git a/prisma/schema.prisma b/prisma/schema.prisma deleted file mode 100644 index 31849c8..0000000 --- a/prisma/schema.prisma +++ /dev/null @@ -1,231 +0,0 @@ -datasource db { - provider = "postgresql" - url = env("DATABASE_URL") -} - -generator client { - provider = "prisma-client-js" - output = "./generated/client" -} - -/// Users come from Clerk, but we mirror them locally -model User { - id String @id @default(cuid()) // local UUID - clerkId String @unique // Clerk auth userId - name String? - email String? - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - - healthProfiles HealthProfile[] - workouts Workout[] - meals Meal[] - mealItems MealItem[] - progressLogs ProgressLog[] - weightEntries WeightEntry[] - waterIntake WaterIntake[] - sleepEntries SleepEntry[] - goals Goal[] -} - -/// Health profile holds user settings and preferences -model HealthProfile { - id String @id @default(cuid()) - userId String - user User @relation(fields: [userId], references: [id]) - height Float? // Height value (always stored in cm) - weight Float? // Weight value (always stored in kg) - age Int? - gender String? // 'Male' | 'Female' - birthday DateTime? - targetWeight Float? // Target weight (always stored in kg) - targetCalories Int? @default(2000) - targetWaterL Float? @default(2.0) - activityLevel String? // 'sedentary' | 'light' | 'moderate' | 'active' | 'very_active' - fitnessGoal String? // 'lose_weight' | 'gain_weight' | 'maintain' | 'build_muscle' | 'improve_fitness' - heightUnit String? @default("cm") // 'cm' | 'in' - weightUnit String? @default("kg") // 'kg' | 'lb' - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - syncedAt DateTime? - isDeleted Boolean @default(false) -} - -/// Workouts with categories and types -model Workout { - id String @id @default(cuid()) - userId String - user User @relation(fields: [userId], references: [id]) - title String - category String // 'strength' | 'cardio' | 'yoga' | 'pilates' | 'functional' | 'flexibility' - durationMin Int? - calories Int? - date DateTime - notes String? - isCompleted Boolean @default(false) - totalTime Int? // Total time in seconds - restTime Int? // Total rest time in seconds - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - syncedAt DateTime? - isDeleted Boolean @default(false) - - exercises Exercise[] -} - -/// Exercises per workout with detailed tracking -model Exercise { - id String @id @default(cuid()) - workoutId String - workout Workout @relation(fields: [workoutId], references: [id]) - name String - sets Int? - reps Int? - weightKg Float? - duration Int? // Duration in seconds - distance Float? // Distance in meters - restTime Int? // Rest time in seconds - order Int @default(0) // Exercise order in workout - isCompleted Boolean @default(false) - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - syncedAt DateTime? - isDeleted Boolean @default(false) -} - -/// Meals with meal types -model Meal { - id String @id @default(cuid()) - userId String - user User @relation(fields: [userId], references: [id]) - name String - mealType String // 'breakfast' | 'lunch' | 'dinner' | 'snack' - calories Int? - protein Float? - carbs Float? - fat Float? - date DateTime - notes String? - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - syncedAt DateTime? - isDeleted Boolean @default(false) - - mealItems MealItem[] -} - -/// Individual food items within meals -model MealItem { - id String @id @default(cuid()) - mealId String - meal Meal @relation(fields: [mealId], references: [id]) - userId String - user User @relation(fields: [userId], references: [id]) - name String - calories Int? - protein Float? - carbs Float? - fat Float? - quantity Float? // Quantity in grams or units - unit String? // Unit of measurement - isHighInProtein Boolean @default(false) - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - syncedAt DateTime? - isDeleted Boolean @default(false) -} - -/// Daily progress logs (hydration, sleep, mood, weight tracking) -model ProgressLog { - id String @id @default(cuid()) - userId String - user User @relation(fields: [userId], references: [id]) - date DateTime - waterL Float? - sleepHrs Float? - mood String? // 'poor' | 'fair' | 'good' | 'excellent' - weightKg Float? - steps Int? - activeMinutes Int? - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - syncedAt DateTime? - isDeleted Boolean @default(false) -} - -/// Individual weight entries with photos and notes -model WeightEntry { - id String @id @default(cuid()) - userId String - user User @relation(fields: [userId], references: [id]) - weightKg Float - date DateTime - photo String? // URL or path to photo - notes String? - bodyFatPercentage Float? - muscleMassKg Float? - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - syncedAt DateTime? - isDeleted Boolean @default(false) -} - -/// Individual water intake entries -model WaterIntake { - id String @id @default(cuid()) - userId String - user User @relation(fields: [userId], references: [id]) - amountMl Int // Amount in milliliters - date DateTime - time DateTime // Specific time of intake - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - syncedAt DateTime? - isDeleted Boolean @default(false) -} - -/// Individual sleep entries with quality tracking -model SleepEntry { - id String @id @default(cuid()) - userId String - user User @relation(fields: [userId], references: [id]) - hours Float - quality String // 'poor' | 'fair' | 'good' | 'excellent' - date DateTime - bedtime DateTime? - wakeTime DateTime? - notes String? - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - syncedAt DateTime? - isDeleted Boolean @default(false) -} - -/// User goals and targets -model Goal { - id String @id @default(cuid()) - userId String - user User @relation(fields: [userId], references: [id]) - type String // 'weight' | 'calories' | 'workouts' | 'water' | 'sleep' | 'steps' | 'strength' - target Float - current Float @default(0) - unit String // 'kg' | 'calories' | 'workouts' | 'liters' | 'hours' | 'steps' | 'kg' - startDate DateTime - endDate DateTime? - isActive Boolean @default(true) - notes String? - - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - syncedAt DateTime? - isDeleted Boolean @default(false) -} \ No newline at end of file diff --git a/scripts/app-store-screenshot.html b/scripts/app-store-screenshot.html new file mode 100644 index 0000000..3400893 --- /dev/null +++ b/scripts/app-store-screenshot.html @@ -0,0 +1,367 @@ + + + + + + PrepAI App Store Screenshot + + + +

+
+
+
PPrepAI Health Tracker
+

+

+
+
+
+
+
+
+
+
+
+ + + diff --git a/scripts/cleanup-release-artifacts.js b/scripts/cleanup-release-artifacts.js new file mode 100644 index 0000000..2763f99 --- /dev/null +++ b/scripts/cleanup-release-artifacts.js @@ -0,0 +1,19 @@ +#!/usr/bin/env node +/* eslint-env node */ + +const fs = require('fs'); +const path = require('path'); + +const ROOT = path.resolve(__dirname, '..'); +const GENERATED_RELEASE_DIRS = ['dist-ios-check', 'dist-web-check', 'dist-atlas-ios']; + +if (process.env.KEEP_RELEASE_ARTIFACTS === '1') { + console.log('Keeping generated release artifacts because KEEP_RELEASE_ARTIFACTS=1.'); + process.exit(0); +} + +for (const dir of GENERATED_RELEASE_DIRS) { + fs.rmSync(path.join(ROOT, dir), { recursive: true, force: true }); +} + +console.log(`Cleaned generated release artifacts: ${GENERATED_RELEASE_DIRS.join(', ')}.`); diff --git a/scripts/collect-performance-baseline.js b/scripts/collect-performance-baseline.js new file mode 100755 index 0000000..7996399 --- /dev/null +++ b/scripts/collect-performance-baseline.js @@ -0,0 +1,282 @@ +#!/usr/bin/env node +/* eslint-env node */ + +const fs = require('fs'); +const path = require('path'); + +const ROOT = path.resolve(__dirname, '..'); +const IOS_EXPORT_DIR = path.join(ROOT, 'dist-ios-check'); +const WEB_EXPORT_DIR = path.join(ROOT, 'dist-web-check'); +const BUDGETS_FILE = path.join(ROOT, 'config/performance-budgets.json'); +const DEFAULT_OUTPUT_FILE = path.join(ROOT, 'dist/performance-baseline.json'); + +const TRACKED_ASSETS = [ + 'src/assets/icon.png', + 'src/assets/adaptive-icon.png', + 'src/assets/splash.png', + 'src/assets/favicon.png', + 'src/assets/img/welcome.jpg', + 'src/assets/img/onboarding.png', + 'src/assets/img/onboarding-1.jpg', + 'src/assets/img/onboarding-2.jpg', + 'src/assets/img/onboarding-3.png', + 'src/assets/img/banner.png', + 'src/assets/img/muscles.png', + 'src/assets/img/progress.png', + 'src/assets/img/service-1.jpg', + 'src/assets/img/subscription-banner.jpg', + 'src/assets/img/wallpaper-3.jpg', + 'src/assets/img/wallpaper.webp', +]; + +const walk = (dir, files = []) => { + if (!fs.existsSync(dir)) return files; + + for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { + const fullPath = path.join(dir, entry.name); + if (entry.isDirectory()) { + walk(fullPath, files); + } else { + files.push(fullPath); + } + } + + return files; +}; + +const formatBytes = (bytes) => { + if (bytes < 1024) return `${bytes} B`; + if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`; + return `${(bytes / 1024 / 1024).toFixed(2)} MB`; +}; + +const relative = (file) => path.relative(ROOT, file); + +const fileMetric = (file) => { + const sizeBytes = fs.statSync(file).size; + return { + file: relative(file), + sizeBytes, + size: formatBytes(sizeBytes), + }; +}; + +const iOSExportedFiles = walk(IOS_EXPORT_DIR); +const webExportedFiles = walk(WEB_EXPORT_DIR); +const iosBundles = iOSExportedFiles + .filter((file) => /\.(js|hbc)$/.test(file)) + .map(fileMetric) + .sort((a, b) => b.sizeBytes - a.sizeBytes); +const iosAssets = iOSExportedFiles + .filter((file) => !/\.(js|hbc|json)$/.test(file)) + .map(fileMetric) + .sort((a, b) => b.sizeBytes - a.sizeBytes); +const webBundles = webExportedFiles + .filter((file) => /\.(js|css)$/.test(file)) + .map(fileMetric) + .sort((a, b) => b.sizeBytes - a.sizeBytes); +const webAssets = webExportedFiles + .filter((file) => !/\.(js|css|json|html)$/.test(file)) + .map(fileMetric) + .sort((a, b) => b.sizeBytes - a.sizeBytes); +const trackedAssets = TRACKED_ASSETS.map((file) => path.join(ROOT, file)) + .filter((file) => fs.existsSync(file)) + .map(fileMetric) + .sort((a, b) => b.sizeBytes - a.sizeBytes); + +const sum = (metrics) => metrics.reduce((total, metric) => total + metric.sizeBytes, 0); +const readBudgets = () => JSON.parse(fs.readFileSync(BUDGETS_FILE, 'utf8')); + +const budgetCheck = ({ id, label, actual, max, warning, format = (value) => value.toLocaleString() }) => { + const status = actual > max ? 'fail' : warning && actual > warning ? 'warn' : 'pass'; + + return { + id, + label, + status, + actual, + actualFormatted: format(actual), + warning, + warningFormatted: warning ? format(warning) : null, + max, + maxFormatted: format(max), + }; +}; + +const resolveOutputFile = () => { + const outputFile = path.resolve(process.env.PERFORMANCE_BASELINE_OUTPUT || DEFAULT_OUTPUT_FILE); + fs.mkdirSync(path.dirname(outputFile), { recursive: true }); + return outputFile; +}; + +const markdownTable = (checks) => { + const rows = checks.map((check) => { + const icon = check.status === 'fail' ? 'FAIL' : check.status === 'warn' ? 'WARN' : 'PASS'; + const warning = check.warningFormatted || '-'; + return `| ${icon} | ${check.label} | ${check.actualFormatted} | ${warning} | ${check.maxFormatted} |`; + }); + + return ['| Status | Budget | Actual | Warning | Max |', '| --- | --- | ---: | ---: | ---: |', ...rows].join('\n'); +}; + +const appendGithubSummary = (report) => { + if (!process.env.GITHUB_STEP_SUMMARY) return; + + const summary = [ + '## PrepAI Performance Baseline', + '', + `Generated: ${report.generatedAt}`, + '', + markdownTable(report.budgets.checks), + '', + `Report artifact: \`${report.outputFile}\``, + '', + 'Largest iOS bundles:', + ...report.iosExport.largestBundles.map((bundle) => `- \`${bundle.file}\`: ${bundle.size}`), + '', + 'Largest web bundles:', + ...report.webExport.largestBundles.map((bundle) => `- \`${bundle.file}\`: ${bundle.size}`), + '', + 'Largest exported assets:', + ...report.iosExport.largestAssets.slice(0, 5).map((asset) => `- \`${asset.file}\`: ${asset.size}`), + '', + ].join('\n'); + + fs.appendFileSync(process.env.GITHUB_STEP_SUMMARY, `${summary}\n`); +}; + +if (iosBundles.length === 0) { + console.error(`No iOS JS/Hermes bundles found in ${relative(IOS_EXPORT_DIR)}. Run an iOS production export first.`); + process.exit(1); +} + +if (webBundles.length === 0) { + console.error(`No web JS/CSS bundles found in ${relative(WEB_EXPORT_DIR)}. Run a web production export first.`); + process.exit(1); +} + +if (trackedAssets.length !== TRACKED_ASSETS.length) { + const present = new Set(trackedAssets.map((asset) => asset.file)); + const missing = TRACKED_ASSETS.filter((asset) => !present.has(asset)); + console.error(`Missing tracked brand assets: ${missing.join(', ')}`); + process.exit(1); +} + +const budgets = readBudgets(); +const iosBundleBytes = sum(iosBundles); +const iosAssetBytes = sum(iosAssets); +const webBundleBytes = sum(webBundles); +const webAssetBytes = sum(webAssets); +const trackedBrandAssetBytes = sum(trackedAssets); +const budgetChecks = [ + budgetCheck({ + id: 'ios_bundle_bytes', + label: 'iOS Hermes/JS bundle bytes', + actual: iosBundleBytes, + warning: budgets.iosExport.bundleBytesWarning, + max: budgets.iosExport.bundleBytesMax, + format: formatBytes, + }), + budgetCheck({ + id: 'ios_export_asset_bytes', + label: 'iOS exported asset bytes', + actual: iosAssetBytes, + warning: budgets.iosExport.assetBytesWarning, + max: budgets.iosExport.assetBytesMax, + format: formatBytes, + }), + budgetCheck({ + id: 'ios_export_asset_count', + label: 'iOS exported asset count', + actual: iosAssets.length, + max: budgets.iosExport.assetCountMax, + }), + budgetCheck({ + id: 'web_bundle_bytes', + label: 'Web JS/CSS bundle bytes', + actual: webBundleBytes, + warning: budgets.webExport.bundleBytesWarning, + max: budgets.webExport.bundleBytesMax, + format: formatBytes, + }), + budgetCheck({ + id: 'web_export_asset_bytes', + label: 'Web exported asset bytes', + actual: webAssetBytes, + warning: budgets.webExport.assetBytesWarning, + max: budgets.webExport.assetBytesMax, + format: formatBytes, + }), + budgetCheck({ + id: 'web_export_asset_count', + label: 'Web exported asset count', + actual: webAssets.length, + max: budgets.webExport.assetCountMax, + }), + budgetCheck({ + id: 'tracked_brand_asset_count', + label: 'Tracked brand asset count', + actual: trackedAssets.length, + max: budgets.trackedBrandAssets.expectedCount, + }), + budgetCheck({ + id: 'tracked_brand_asset_bytes', + label: 'Tracked brand asset bytes', + actual: trackedBrandAssetBytes, + warning: budgets.trackedBrandAssets.bytesWarning, + max: budgets.trackedBrandAssets.bytesMax, + format: formatBytes, + }), +]; + +const report = { + generatedAt: new Date().toISOString(), + iosExport: { + directory: relative(IOS_EXPORT_DIR), + bundleCount: iosBundles.length, + bundleBytes: iosBundleBytes, + bundleSize: formatBytes(iosBundleBytes), + largestBundles: iosBundles.slice(0, 5), + assetCount: iosAssets.length, + assetBytes: iosAssetBytes, + assetSize: formatBytes(iosAssetBytes), + largestAssets: iosAssets.slice(0, 10), + }, + webExport: { + directory: relative(WEB_EXPORT_DIR), + bundleCount: webBundles.length, + bundleBytes: webBundleBytes, + bundleSize: formatBytes(webBundleBytes), + largestBundles: webBundles.slice(0, 5), + assetCount: webAssets.length, + assetBytes: webAssetBytes, + assetSize: formatBytes(webAssetBytes), + largestAssets: webAssets.slice(0, 10), + }, + trackedBrandAssets: { + count: trackedAssets.length, + bytes: trackedBrandAssetBytes, + size: formatBytes(trackedBrandAssetBytes), + largest: trackedAssets.slice(0, 10), + }, + budgets: { + file: relative(BUDGETS_FILE), + checks: budgetChecks, + }, +}; + +const outputFile = resolveOutputFile(); +report.outputFile = relative(outputFile); +fs.writeFileSync(outputFile, `${JSON.stringify(report, null, 2)}\n`); +appendGithubSummary(report); + +console.log(JSON.stringify(report, null, 2)); + +const failedChecks = budgetChecks.filter((check) => check.status === 'fail'); +if (failedChecks.length > 0) { + console.error('Performance baseline exceeded production budgets:'); + for (const check of failedChecks) { + console.error(`- ${check.label}: ${check.actualFormatted} exceeds ${check.maxFormatted}`); + } + process.exit(1); +} diff --git a/scripts/configure-eas-production-clerk.sh b/scripts/configure-eas-production-clerk.sh new file mode 100755 index 0000000..bef9f29 --- /dev/null +++ b/scripts/configure-eas-production-clerk.sh @@ -0,0 +1,99 @@ +#!/usr/bin/env bash +set -euo pipefail + +if [[ -z "${CLERK_SECRET_KEY:-}" || -z "${EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY:-}" ]]; then + cat >&2 <<'EOF' +Missing Clerk production credentials. + +Export both values, then rerun: + + export CLERK_SECRET_KEY="sk_live_..." + export EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY="pk_live_..." + bun run eas:configure-clerk + +EOF + exit 1 +fi + +if [[ "$CLERK_SECRET_KEY" != sk_live_* ]]; then + echo "CLERK_SECRET_KEY must be a production Clerk secret key that starts with sk_live_." >&2 + exit 1 +fi + +if [[ "$EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY" != pk_live_* ]]; then + echo "EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY must be a production Clerk publishable key that starts with pk_live_." >&2 + exit 1 +fi + +delete_existing_var() { + local scope="$1" + local name="$2" + + # EAS can hold duplicate variables with the same name. Delete repeatedly so + # `env:create --force` cannot leave a stale duplicate behind. + for _ in 1 2 3 4 5; do + if ! eas env:delete production \ + --scope "$scope" \ + --variable-name "$name" \ + --non-interactive >/dev/null 2>&1; then + break + fi + done +} + +for name in \ + CLERK_SECRET_KEY \ + EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY \ + EXPO_PUBLIC_LOCAL_AI_ENABLED \ + EXPO_PUBLIC_LOCAL_AI_PROVIDER \ + EXPO_PUBLIC_CLOUD_AI_FALLBACK; do + delete_existing_var project "$name" +done + +if [[ "${PREPAI_DELETE_ACCOUNT_EAS_ENV:-}" == "1" ]]; then + delete_existing_var account CLERK_SECRET_KEY + delete_existing_var account EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY +fi + +eas env:create production \ + --scope project \ + --visibility secret \ + --name CLERK_SECRET_KEY \ + --value "$CLERK_SECRET_KEY" \ + --force \ + --non-interactive + +eas env:create production \ + --scope project \ + --visibility plaintext \ + --name EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY \ + --value "$EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY" \ + --force \ + --non-interactive + +eas env:create production \ + --scope project \ + --visibility plaintext \ + --name EXPO_PUBLIC_LOCAL_AI_ENABLED \ + --value "true" \ + --force \ + --non-interactive + +eas env:create production \ + --scope project \ + --visibility plaintext \ + --name EXPO_PUBLIC_LOCAL_AI_PROVIDER \ + --value "executorch" \ + --force \ + --non-interactive + +eas env:create production \ + --scope project \ + --visibility plaintext \ + --name EXPO_PUBLIC_CLOUD_AI_FALLBACK \ + --value "false" \ + --force \ + --non-interactive + +echo "EAS production Clerk and local-AI env values were written. Verifying release environment..." +bun run verify:release-env diff --git a/scripts/generate-brand-assets.py b/scripts/generate-brand-assets.py new file mode 100644 index 0000000..b2ca767 --- /dev/null +++ b/scripts/generate-brand-assets.py @@ -0,0 +1,414 @@ +#!/usr/bin/env python3 + +from pathlib import Path +import subprocess + +from PIL import Image, ImageDraw, ImageFilter, ImageFont + +ROOT = Path(__file__).resolve().parents[1] + +OUTPUTS = [ + ("icon", 1024, 1024, "src/assets/icon.png"), + ("adaptive", 1024, 1024, "src/assets/adaptive-icon.png"), + ("adaptive", 1024, 1024, "src/assets/images/adaptive-icon.png"), + ("favicon", 96, 96, "src/assets/favicon.png"), + ("splash", 1284, 2778, "src/assets/splash.png"), +] + +VISUAL_OUTPUTS = [ + ("welcome", 933, 1400, "src/assets/img/welcome.jpg"), + ("onboarding", 856, 1330, "src/assets/img/onboarding.png"), + ("nutrition", 898, 1346, "src/assets/img/onboarding-1.jpg"), + ("training", 898, 1346, "src/assets/img/onboarding-2.jpg"), + ("sync", 856, 366, "src/assets/img/onboarding-3.png"), + ("dashboard", 856, 366, "src/assets/img/banner.png"), + ("muscles", 950, 634, "src/assets/img/muscles.png"), + ("progress", 508, 508, "src/assets/img/progress.png"), + ("support", 1280, 897, "src/assets/img/service-1.jpg"), + ("subscription", 869, 541, "src/assets/img/subscription-banner.jpg"), + ("wallpaper", 885, 1341, "src/assets/img/wallpaper-3.jpg"), + ("wallpaper-webp", 1024, 1536, "src/assets/img/wallpaper.webp"), +] + +THEME = { + "ink": (5, 18, 22), + "deep": (7, 35, 37), + "panel": (14, 45, 47), + "mint": (53, 241, 207), + "green": (113, 239, 132), + "blue": (66, 135, 255), + "paper": (235, 255, 250), + "muted": (143, 183, 179), +} + + +def font(size, bold=True): + candidates = [ + "/System/Library/Fonts/Supplemental/Arial Bold.ttf" if bold else "/System/Library/Fonts/Supplemental/Arial.ttf", + "/System/Library/Fonts/SFNS.ttf", + "/Library/Fonts/Arial Bold.ttf" if bold else "/Library/Fonts/Arial.ttf", + ] + + for candidate in candidates: + try: + return ImageFont.truetype(candidate, size) + except OSError: + continue + + return ImageFont.load_default(size=size) + + +def gradient_background(size): + width, height = size + image = Image.new("RGBA", (1, height)) + pixels = image.load() + + top = (6, 18, 21) + mid = (9, 36, 37) + bottom = (6, 16, 22) + + for y in range(height): + t = y / max(1, height - 1) + if t < 0.55: + local = t / 0.55 + color = tuple(round(top[i] * (1 - local) + mid[i] * local) for i in range(3)) + else: + local = (t - 0.55) / 0.45 + color = tuple(round(mid[i] * (1 - local) + bottom[i] * local) for i in range(3)) + + pixels[0, y] = (*color, 255) + + return image.resize((width, height), Image.Resampling.BICUBIC) + + +def add_glow(base, center, radius, color, alpha=135): + glow = Image.new("RGBA", base.size, (0, 0, 0, 0)) + draw = ImageDraw.Draw(glow) + x, y = center + draw.ellipse((x - radius, y - radius, x + radius, y + radius), fill=(*color, alpha)) + glow = glow.filter(ImageFilter.GaussianBlur(radius // 3)) + base.alpha_composite(glow) + + +def rounded_panel(draw, box, radius, fill=None, outline=None, width=1): + draw.rounded_rectangle(box, radius=radius, fill=fill, outline=outline, width=width) + + +def text_center(draw, text, center_x, y, size, fill, bold=True): + text_font = font(size, bold=bold) + bbox = draw.textbbox((0, 0), text, font=text_font) + draw.text((center_x - (bbox[2] - bbox[0]) / 2, y), text, font=text_font, fill=fill) + + +def draw_mini_mark(size=180): + return draw_mark(size, include_background=False, transparent=True) + + +def arc(draw, box, start, end, fill, width): + draw.arc(box, start=start, end=end, fill=fill, width=width) + + +def line_with_shadow(draw, points, fill, width, shadow_fill=(4, 12, 14, 180)): + shadow_points = [(x + width * 0.1, y + width * 0.1) for x, y in points] + draw.line(shadow_points, fill=shadow_fill, width=max(1, int(width * 1.1)), joint="curve") + draw.line(points, fill=fill, width=width, joint="curve") + + +def draw_mark(size=1024, include_background=True, transparent=False, include_wordmark=False): + image = Image.new("RGBA", (size, size), (0, 0, 0, 0)) + draw = ImageDraw.Draw(image) + scale = size / 1024 + + def s(value): + return int(round(value * scale)) + + if include_background: + bg = gradient_background((size, size)) + mask = Image.new("L", (size, size), 0) + mask_draw = ImageDraw.Draw(mask) + mask_draw.rounded_rectangle((0, 0, size, size), radius=s(232), fill=255) + image.alpha_composite(Image.composite(bg, Image.new("RGBA", (size, size), (0, 0, 0, 0)), mask)) + elif not transparent: + image.alpha_composite(gradient_background((size, size))) + + add_glow(image, (s(512), s(512)), s(310), (31, 211, 194), 90) + draw = ImageDraw.Draw(image) + + outer = (s(162), s(162), s(862), s(862)) + inner = (s(210), s(210), s(814), s(814)) + draw.ellipse(inner, fill=(13, 36, 37, 245), outline=(21, 62, 62, 255), width=s(2)) + arc(draw, outer, 191, 355, (59, 134, 255, 255), s(42)) + arc(draw, outer, 38, 154, (109, 237, 124, 255), s(42)) + arc(draw, outer, 54, 326, (33, 208, 194, 255), s(19)) + arc(draw, outer, 108, 158, (59, 134, 255, 255), s(42)) + arc(draw, outer, 114, 156, (33, 208, 194, 255), s(20)) + + for x, y, color, radius in [ + (292, 654, (34, 211, 200, 255), 23), + (736, 394, (115, 239, 130, 255), 23), + (735, 653, (64, 136, 255, 255), 16), + ]: + draw.ellipse((s(x - radius), s(y - radius), s(x + radius), s(y + radius)), fill=color) + + panel = (s(312), s(338), s(712), s(686)) + draw.rounded_rectangle(panel, radius=s(94), fill=(7, 26, 28, 245), outline=(55, 243, 212, 255), width=s(8)) + + pulse = [ + (214, 552), + (384, 552), + (439, 420), + (513, 690), + (584, 338), + (663, 552), + (810, 552), + ] + pulse = [(s(x), s(y)) for x, y in pulse] + line_with_shadow(draw, pulse, (223, 255, 238, 255), s(34)) + draw.line(pulse, fill=(115, 240, 125, 255), width=s(16), joint="curve") + + ring_width = s(8) + draw.ellipse((s(162), s(162), s(862), s(862)), outline=(56, 243, 210, 160), width=ring_width) + + letter_font = font(s(300), bold=True) + text = "P" + bbox = draw.textbbox((0, 0), text, font=letter_font, stroke_width=s(8)) + text_x = s(512) - (bbox[2] - bbox[0]) / 2 + text_y = s(500) - (bbox[3] - bbox[1]) / 2 - bbox[1] + draw.text( + (text_x, text_y), + text, + font=letter_font, + fill=(237, 255, 251, 255), + stroke_width=s(8), + stroke_fill=(6, 18, 20, 255), + ) + + if include_wordmark: + title_font = font(s(124), bold=True) + caption_font = font(s(36), bold=True) + for text, y, text_font, fill in [ + ("PrepAI", 824, title_font, (233, 255, 251, 255)), + ("LOCAL HEALTH INTELLIGENCE", 884, caption_font, (143, 183, 179, 255)), + ]: + bbox = draw.textbbox((0, 0), text, font=text_font) + draw.text((s(512) - (bbox[2] - bbox[0]) / 2, s(y)), text, font=text_font, fill=fill) + + return image + + +def draw_splash(width, height): + image = gradient_background((width, height)) + add_glow(image, (width // 2, int(height * 0.37)), 420, (31, 211, 194), 90) + + mark_size = 540 + mark = draw_mark(1024, include_background=False, transparent=True) + mark = mark.resize((mark_size, mark_size), Image.Resampling.LANCZOS) + mark_top = int(height * 0.32) - mark_size // 2 + image.alpha_composite(mark, (width // 2 - mark_size // 2, mark_top)) + + draw = ImageDraw.Draw(image) + title_font = font(140, bold=True) + caption_font = font(38, bold=True) + title = "PrepAI" + caption = "LOCAL HEALTH INTELLIGENCE" + title_bbox = draw.textbbox((0, 0), title, font=title_font) + caption_bbox = draw.textbbox((0, 0), caption, font=caption_font) + title_y = mark_top + mark_size + 60 + caption_y = title_y + 138 + draw.text((width / 2 - (title_bbox[2] - title_bbox[0]) / 2, title_y), title, font=title_font, fill=(233, 255, 251, 255)) + draw.text( + (width / 2 - (caption_bbox[2] - caption_bbox[0]) / 2, caption_y), + caption, + font=caption_font, + fill=(143, 183, 179, 255), + ) + return image + + +def draw_metric_card(draw, x, y, w, h, title, value, accent, radius=32): + rounded_panel(draw, (x, y, x + w, y + h), radius, fill=(11, 37, 39, 235), outline=accent, width=2) + pad = max(14, int(min(w, h) * 0.14)) + title_size = max(14, min(24, int(h * 0.16))) + value_size = max(24, min(58, int(h * 0.34))) + draw.text((x + pad, y + pad), title, font=font(title_size, bold=True), fill=THEME["muted"]) + draw.text((x + pad, y + pad + title_size + 8), value, font=font(value_size, bold=True), fill=THEME["paper"]) + bar_top = y + h - pad - 14 + draw.rounded_rectangle((x + pad, bar_top, x + w - pad, bar_top + 14), radius=7, fill=(23, 59, 61, 255)) + draw.rounded_rectangle((x + pad, bar_top, x + int(w * 0.7), bar_top + 14), radius=7, fill=accent) + + +def draw_banner_metric(draw, x, y, w, title, value, accent): + draw.text((x, y), title, font=font(26, bold=True), fill=THEME["muted"]) + draw.text((x, y + 42), value, font=font(62, bold=True), fill=THEME["paper"]) + draw.rounded_rectangle((x, y + 126, x + w, y + 144), radius=9, fill=(23, 59, 61, 255)) + draw.rounded_rectangle((x, y + 126, x + int(w * 0.72), y + 144), radius=9, fill=accent) + + +def draw_line_chart(draw, box, color): + x1, y1, x2, y2 = box + width = x2 - x1 + height = y2 - y1 + points = [ + (x1, y1 + int(height * 0.7)), + (x1 + int(width * 0.2), y1 + int(height * 0.58)), + (x1 + int(width * 0.38), y1 + int(height * 0.62)), + (x1 + int(width * 0.55), y1 + int(height * 0.35)), + (x1 + int(width * 0.74), y1 + int(height * 0.42)), + (x2, y1 + int(height * 0.18)), + ] + draw.line(points, fill=(8, 16, 18, 180), width=12, joint="curve") + draw.line(points, fill=color, width=7, joint="curve") + for x, y in points: + draw.ellipse((x - 8, y - 8, x + 8, y + 8), fill=THEME["paper"], outline=color, width=4) + + +def draw_bar_chart(draw, x, y, w, h, color): + values = [0.34, 0.62, 0.48, 0.78, 0.54, 0.9, 0.7] + gap = w * 0.035 + bar_w = (w - gap * (len(values) - 1)) / len(values) + for index, value in enumerate(values): + left = x + int(index * (bar_w + gap)) + top = y + int(h * (1 - value)) + right = int(left + bar_w) + draw.rounded_rectangle((left, top, right, y + h), radius=12, fill=color if index != 5 else THEME["green"]) + + +def draw_plate(draw, cx, cy, r): + draw.ellipse((cx - r, cy - r, cx + r, cy + r), fill=(237, 255, 250, 255)) + draw.ellipse((cx - int(r * 0.72), cy - int(r * 0.72), cx + int(r * 0.72), cy + int(r * 0.72)), fill=(17, 54, 55, 255)) + colors = [THEME["green"], THEME["mint"], THEME["blue"], (255, 218, 102)] + wedges = [(210, 330), (330, 32), (32, 114), (114, 210)] + for color, (start, end) in zip(colors, wedges): + draw.pieslice((cx - int(r * 0.62), cy - int(r * 0.62), cx + int(r * 0.62), cy + int(r * 0.62)), start, end, fill=color) + + +def draw_dumbbell(draw, cx, cy, scale=1.0, color=None): + color = color or THEME["paper"] + s = scale + draw.rounded_rectangle((cx - 118 * s, cy - 16 * s, cx + 118 * s, cy + 16 * s), radius=int(10 * s), fill=color) + for side in [-1, 1]: + draw.rounded_rectangle((cx + side * 86 * s - 24 * s, cy - 58 * s, cx + side * 86 * s + 24 * s, cy + 58 * s), radius=int(12 * s), fill=THEME["mint"]) + draw.rounded_rectangle((cx + side * 126 * s - 30 * s, cy - 78 * s, cx + side * 126 * s + 30 * s, cy + 78 * s), radius=int(12 * s), fill=color) + + +def draw_visual(kind, width, height): + image = gradient_background((width, height)) + add_glow(image, (int(width * 0.55), int(height * 0.35)), int(min(width, height) * 0.42), THEME["mint"], 80) + draw = ImageDraw.Draw(image) + + margin = max(32, int(width * 0.065)) + if height >= 900: + mark = draw_mini_mark(max(120, int(min(width, height) * 0.18))) + image.alpha_composite(mark, (margin, margin)) + + if kind in {"welcome", "onboarding", "wallpaper", "wallpaper-webp"}: + text_center(draw, "PrepAI", width // 2, int(height * 0.16), int(width * 0.14), THEME["paper"]) + text_center(draw, "Local health intelligence", width // 2, int(height * 0.16) + int(width * 0.13), int(width * 0.037), THEME["muted"]) + card_w = int(width * 0.82) + card_h = int(height * 0.38) + x = (width - card_w) // 2 + y = int(height * 0.42) + rounded_panel(draw, (x, y, x + card_w, y + card_h), 42, fill=(12, 43, 45, 232), outline=THEME["mint"], width=3) + draw_metric_card(draw, x + 36, y + 42, int(card_w * 0.42), int(card_h * 0.35), "Recovery", "82", THEME["green"]) + draw_metric_card(draw, x + int(card_w * 0.52), y + 42, int(card_w * 0.4), int(card_h * 0.35), "Hydration", "2.4L", THEME["blue"]) + draw_line_chart(draw, (x + 52, y + int(card_h * 0.55), x + card_w - 52, y + card_h - 54), THEME["mint"]) + return image + + if kind in {"nutrition", "dashboard"}: + if height <= 600: + draw_plate(draw, int(width * 0.74), int(height * 0.42), int(height * 0.2)) + draw_banner_metric(draw, margin, int(height * 0.28), int(width * 0.46), "Today's Fuel", "1,842 cal", THEME["green"]) + draw.text( + (margin, int(height * 0.78)), + "Nutrition that stays on your device", + font=font(int(width * 0.038), bold=True), + fill=THEME["paper"], + ) + return image + + draw_plate(draw, int(width * 0.5), int(height * 0.38), int(min(width, height) * 0.2)) + draw_metric_card(draw, margin, int(height * 0.62), width - margin * 2, int(height * 0.19), "Today's Fuel", "1,842 cal", THEME["green"]) + text_center(draw, "Nutrition that stays on your device", width // 2, int(height * 0.86), int(width * 0.042), THEME["paper"]) + return image + + if kind in {"training", "muscles"}: + if height <= 700: + draw_dumbbell(draw, int(width * 0.72), int(height * 0.34), min(width, height) / 760) + draw_banner_metric(draw, margin, int(height * 0.34), int(width * 0.48), "Training Load", "45 min", THEME["blue"]) + draw.text( + (margin, int(height * 0.8)), + "Track sessions, sets, and recovery", + font=font(int(width * 0.04), bold=True), + fill=THEME["paper"], + ) + return image + + draw_dumbbell(draw, int(width * 0.5), int(height * 0.38), min(width, height) / 650) + draw_metric_card(draw, margin, int(height * 0.62), width - margin * 2, int(height * 0.2), "Training Load", "45 min", THEME["blue"]) + text_center(draw, "Track sessions, sets, and recovery", width // 2, int(height * 0.86), int(width * 0.04), THEME["paper"]) + return image + + if kind in {"sync", "health"}: + rounded_panel(draw, (margin, int(height * 0.22), width - margin, int(height * 0.76)), 36, fill=(12, 43, 45, 232), outline=THEME["mint"], width=3) + draw_line_chart(draw, (margin + 48, int(height * 0.35), width - margin - 48, int(height * 0.62)), THEME["green"]) + text_center(draw, "Apple Health sync", width // 2, int(height * 0.72), int(width * 0.05), THEME["paper"]) + return image + + if kind in {"recovery", "progress"}: + cx, cy = width // 2, height // 2 + r = int(min(width, height) * 0.32) + draw.ellipse((cx - r, cy - r, cx + r, cy + r), outline=(31, 79, 80, 255), width=max(10, width // 42)) + draw.arc((cx - r, cy - r, cx + r, cy + r), start=128, end=394, fill=THEME["green"], width=max(14, width // 32)) + text_center(draw, "82", cx, cy - int(r * 0.38), int(min(width, height) * 0.24), THEME["paper"]) + text_center(draw, "READINESS", cx, cy + int(r * 0.32), int(min(width, height) * 0.05), THEME["muted"]) + return image + + if kind in {"support", "subscription"}: + rounded_panel(draw, (margin, int(height * 0.23), width - margin, int(height * 0.75)), 38, fill=(12, 43, 45, 232), outline=THEME["mint"], width=3) + draw_bar_chart(draw, margin + 58, int(height * 0.42), width - margin * 2 - 116, int(height * 0.19), THEME["blue"]) + text_center(draw, "Private health command center", width // 2, int(height * 0.28), int(width * 0.052), THEME["paper"]) + text_center(draw, "Nutrition • Training • Recovery", width // 2, int(height * 0.68), int(width * 0.032), THEME["muted"]) + return image + + return image + + +def save_asset(kind, width, height, output): + if kind == "splash": + image = draw_splash(width, height) + elif kind == "adaptive": + image = draw_mark(width, include_background=False, transparent=True) + elif kind == "favicon": + image = draw_mark(1024, include_background=True).resize((width, height), Image.Resampling.LANCZOS) + else: + image = draw_mark(width, include_background=True) + + destination = ROOT / output + destination.parent.mkdir(parents=True, exist_ok=True) + image.save(destination, "PNG", optimize=True) + + +for output in OUTPUTS: + save_asset(*output) + +for kind, width, height, output in VISUAL_OUTPUTS: + image = draw_visual(kind, width, height) + destination = ROOT / output + destination.parent.mkdir(parents=True, exist_ok=True) + extension = destination.suffix.lower() + if extension in {".jpg", ".jpeg"}: + image.convert("RGB").save(destination, "JPEG", quality=88, optimize=True, progressive=True) + elif extension == ".webp": + temp_png = destination.with_suffix(".webp-source.png") + image.convert("RGB").save(temp_png, "PNG", optimize=True) + try: + subprocess.run( + ["cwebp", "-quiet", "-q", "86", str(temp_png), "-o", str(destination)], + check=True, + ) + finally: + temp_png.unlink(missing_ok=True) + else: + image.save(destination, "PNG", optimize=True) + +print(f"Generated {len(OUTPUTS) + len(VISUAL_OUTPUTS)} PrepAI brand assets.") diff --git a/scripts/generate-swagger.js b/scripts/generate-swagger.js deleted file mode 100644 index 81b6b03..0000000 --- a/scripts/generate-swagger.js +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env node - -const swaggerJsdoc = require('swagger-jsdoc'); -const fs = require('fs'); -const path = require('path'); - -// Import the swagger configuration -const swaggerConfig = require('../swagger-config.js'); - -console.log('🔍 Generating Swagger documentation...'); - -try { - // Generate the Swagger specification - const specs = swaggerJsdoc(swaggerConfig); - - // Write the specification to a JSON file - // eslint-disable-next-line no-undef - const outputPath = path.join(__dirname, '..', 'swagger.json'); - fs.writeFileSync(outputPath, JSON.stringify(specs, null, 2)); - - // Generate the TypeScript constant for the API route - // eslint-disable-next-line no-undef - const tsOutputPath = path.join(__dirname, '..', 'src', 'spec', 'swagger-spec.ts'); - const tsContent = `// Auto-generated Swagger specification -// This file is generated by scripts/generate-swagger.js -// Do not edit manually - -export const swaggerSpec = ${JSON.stringify(specs, null, 2)} as const; - -export default swaggerSpec; -`; - - fs.writeFileSync(tsOutputPath, tsContent); - - console.log('✅ Swagger documentation generated successfully!'); - console.log(`📄 JSON specification saved to: ${outputPath}`); - console.log(`📄 TypeScript specification saved to: ${tsOutputPath}`); - console.log(`🌐 You can view it at: http://localhost:8081/api/docs`); - console.log(`📊 Total endpoints documented: ${Object.keys(specs.paths || {}).length}`); - - // Log the documented endpoints - if (specs.paths) { - console.log('\n📋 Documented endpoints:'); - Object.keys(specs.paths).forEach((path) => { - const methods = Object.keys(specs.paths[path]); - methods.forEach((method) => { - const endpoint = specs.paths[path][method]; - console.log(` ${method.toUpperCase()} ${path} - ${endpoint.summary || 'No summary'}`); - }); - }); - } - - console.log('\n🔄 Next steps:'); - console.log('1. The swagger-spec.ts file has been updated'); - console.log('2. The swagger.json+api.ts route will now use the generated specification'); - console.log('3. Restart your development server to see the changes'); -} catch (error) { - console.error('❌ Error generating Swagger documentation:', error); - process.exit(1); -} diff --git a/scripts/report-atlas-bundle.js b/scripts/report-atlas-bundle.js new file mode 100644 index 0000000..3e1601f --- /dev/null +++ b/scripts/report-atlas-bundle.js @@ -0,0 +1,287 @@ +#!/usr/bin/env node +/* eslint-env node */ + +const fs = require('fs'); +const path = require('path'); + +const ROOT = path.resolve(__dirname, '..'); +const DEFAULT_ATLAS_FILE = path.join(ROOT, '.expo/atlas.jsonl'); +const DEFAULT_OUTPUT_FILE = path.join(ROOT, 'dist/atlas-summary.json'); +const BUDGETS_FILE = path.join(ROOT, 'config/performance-budgets.json'); +const TOP_LIMIT = 20; +const FORBIDDEN_MODULES = [ + { + path: 'node_modules/pngjs/browser.js', + reason: 'pngjs is only needed by ExecuTorch text-to-image and must not ship in the local LLM bundle.', + }, + { + path: 'node_modules/react-native-executorch/src/index.ts', + reason: 'The ExecuTorch barrel imports every native AI module; use src/lib/executorch-runtime.ts instead.', + }, + { + path: 'node_modules/react-native-executorch/lib/module/index.js', + reason: 'The ExecuTorch barrel imports every native AI module; use src/lib/executorch-runtime.ts instead.', + }, + { + path: 'node_modules/react-native-executorch/src/modules/computer_vision/TextToImageModule.ts', + reason: 'Text-to-image pulls image-generation dependencies that are outside the App Store MVP.', + }, + { + path: 'node_modules/react-native-executorch/lib/module/modules/computer_vision/TextToImageModule.js', + reason: 'Text-to-image pulls image-generation dependencies that are outside the App Store MVP.', + }, + { + prefix: 'node_modules/react-native-executorch-expo-resource-fetcher/', + reason: 'The package imports the full ExecuTorch barrel in this SDK branch; use the local Expo resource fetcher.', + }, +]; + +const formatBytes = (bytes) => { + if (bytes < 1024) return `${bytes} B`; + if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`; + return `${(bytes / 1024 / 1024).toFixed(2)} MB`; +}; + +const relative = (file) => path.relative(ROOT, file); +const readBudgets = () => JSON.parse(fs.readFileSync(BUDGETS_FILE, 'utf8')); + +const budgetCheck = ({ id, label, actual, max, warning, format = (value) => value.toLocaleString() }) => { + const status = actual > max ? 'fail' : warning && actual > warning ? 'warn' : 'pass'; + + return { + id, + label, + status, + actual, + actualFormatted: format(actual), + warning, + warningFormatted: warning ? format(warning) : null, + max, + maxFormatted: format(max), + }; +}; + +const markdownTable = (checks) => { + const rows = checks.map((check) => { + const status = check.status === 'fail' ? 'FAIL' : check.status === 'warn' ? 'WARN' : 'PASS'; + const warning = check.warningFormatted || '-'; + return `| ${status} | ${check.label} | ${check.actualFormatted} | ${warning} | ${check.maxFormatted} |`; + }); + + return ['| Status | Budget | Actual | Warning | Max |', '| --- | --- | ---: | ---: | ---: |', ...rows].join('\n'); +}; + +const readAtlasPayload = (file) => { + if (!fs.existsSync(file)) { + throw new Error(`Missing Expo Atlas file: ${relative(file)}. Run an export with EXPO_ATLAS=true first.`); + } + + const lines = fs + .readFileSync(file, 'utf8') + .split(/\r?\n/) + .map((line) => line.trim()) + .filter(Boolean); + + for (let index = lines.length - 1; index >= 0; index -= 1) { + const parsed = JSON.parse(lines[index]); + if (Array.isArray(parsed) && Array.isArray(parsed[5])) { + return parsed; + } + } + + throw new Error(`No Metro graph payload found in ${relative(file)}`); +}; + +const packageNameFor = (module) => { + if (module.package) return module.package; + if (module.relativePath.startsWith('node_modules/')) { + const parts = module.relativePath.split('/'); + return parts[1]?.startsWith('@') ? `${parts[1]}/${parts[2]}` : parts[1]; + } + if (module.relativePath.startsWith('src/')) return 'app/src'; + if (module.relativePath.startsWith('app/')) return 'app/routes'; + return 'app/other'; +}; + +const addPackageSize = (packages, name, size) => { + const current = packages.get(name) || { name, moduleCount: 0, bytes: 0 }; + current.moduleCount += 1; + current.bytes += size; + packages.set(name, current); +}; + +const outputSize = (module) => + (module.output || []).reduce( + (total, item) => total + (item.data?.code ? Buffer.byteLength(item.data.code, 'utf8') : 0), + 0 + ); + +const atlasFile = path.resolve(process.env.ATLAS_FILE || DEFAULT_ATLAS_FILE); +const outputFile = path.resolve(process.env.ATLAS_SUMMARY_OUTPUT || DEFAULT_OUTPUT_FILE); +const payload = readAtlasPayload(atlasFile); +const [platform, , , entryPoint, environment, preModules, graphModules, transformOptions, serializerOptions] = payload; +const modules = [...preModules, ...graphModules]; +const packages = new Map(); + +const moduleMetrics = modules.map((module) => { + const sourceBytes = module.size || 0; + const generatedBytes = outputSize(module); + const packageName = packageNameFor(module); + addPackageSize(packages, packageName, sourceBytes); + + return { + id: module.id, + path: module.relativePath, + package: packageName, + sourceBytes, + sourceSize: formatBytes(sourceBytes), + generatedBytes, + generatedSize: formatBytes(generatedBytes), + imports: module.imports?.length || 0, + importedBy: module.importedBy?.length || 0, + }; +}); + +const forbiddenModules = moduleMetrics + .flatMap((module) => + FORBIDDEN_MODULES.filter( + (rule) => module.path === rule.path || (rule.prefix && module.path.startsWith(rule.prefix)) + ).map((rule) => ({ + path: module.path, + package: module.package, + sourceBytes: module.sourceBytes, + sourceSize: module.sourceSize, + reason: rule.reason, + })) + ) + .sort((a, b) => b.sourceBytes - a.sourceBytes || a.path.localeCompare(b.path)); + +const packageMetrics = Array.from(packages.values()) + .map((item) => ({ + ...item, + size: formatBytes(item.bytes), + })) + .sort((a, b) => b.bytes - a.bytes || a.name.localeCompare(b.name)); + +const totalSourceBytes = moduleMetrics.reduce((total, item) => total + item.sourceBytes, 0); +const totalGeneratedBytes = moduleMetrics.reduce((total, item) => total + item.generatedBytes, 0); +const appSourceBytes = packageMetrics + .filter((item) => item.name.startsWith('app/')) + .reduce((total, item) => total + item.bytes, 0); +const dependencySourceBytes = totalSourceBytes - appSourceBytes; +const budgets = readBudgets(); +const atlasBudgets = budgets.expoAtlas || {}; +const budgetChecks = [ + budgetCheck({ + id: 'atlas_module_count', + label: 'Expo Atlas module count', + actual: moduleMetrics.length, + max: atlasBudgets.moduleCountMax, + }), + budgetCheck({ + id: 'atlas_source_bytes', + label: 'Expo Atlas total source bytes', + actual: totalSourceBytes, + warning: atlasBudgets.sourceBytesWarning, + max: atlasBudgets.sourceBytesMax, + format: formatBytes, + }), + budgetCheck({ + id: 'atlas_dependency_source_bytes', + label: 'Expo Atlas dependency source bytes', + actual: dependencySourceBytes, + warning: atlasBudgets.dependencySourceBytesWarning, + max: atlasBudgets.dependencySourceBytesMax, + format: formatBytes, + }), + budgetCheck({ + id: 'atlas_app_source_bytes', + label: 'Expo Atlas app source bytes', + actual: appSourceBytes, + warning: atlasBudgets.appSourceBytesWarning, + max: atlasBudgets.appSourceBytesMax, + format: formatBytes, + }), +]; + +const report = { + generatedAt: new Date().toISOString(), + atlasFile: relative(atlasFile), + platform, + environment, + entryPoint: path.relative(ROOT, entryPoint), + moduleCount: moduleMetrics.length, + sourceBytes: totalSourceBytes, + sourceSize: formatBytes(totalSourceBytes), + generatedBytes: totalGeneratedBytes, + generatedSize: formatBytes(totalGeneratedBytes), + appSourceBytes, + appSourceSize: formatBytes(appSourceBytes), + dependencySourceBytes, + dependencySourceSize: formatBytes(dependencySourceBytes), + transformOptions, + serializerOptions: { + splitChunks: serializerOptions?.serializerOptions?.splitChunks, + output: serializerOptions?.serializerOptions?.output, + exporting: serializerOptions?.serializerOptions?.exporting, + includeSourceMaps: serializerOptions?.serializerOptions?.includeSourceMaps, + }, + topPackages: packageMetrics.slice(0, TOP_LIMIT), + topModules: moduleMetrics + .sort((a, b) => b.sourceBytes - a.sourceBytes || a.path.localeCompare(b.path)) + .slice(0, TOP_LIMIT), + forbiddenModules, + budgets: { + file: relative(BUDGETS_FILE), + checks: budgetChecks, + }, +}; + +fs.mkdirSync(path.dirname(outputFile), { recursive: true }); +fs.writeFileSync(outputFile, `${JSON.stringify(report, null, 2)}\n`); + +if (process.env.GITHUB_STEP_SUMMARY) { + const topPackageRows = report.topPackages + .slice(0, 10) + .map((item) => `| \`${item.name}\` | ${item.moduleCount} | ${item.size} |`); + const summary = [ + '## PrepAI Expo Atlas Summary', + '', + `Generated: ${report.generatedAt}`, + `Platform: \`${report.platform}\``, + `Modules: ${report.moduleCount}`, + `Source bytes: ${report.sourceSize}`, + `Generated JS bytes: ${report.generatedSize}`, + `App source: ${report.appSourceSize}`, + `Dependency source: ${report.dependencySourceSize}`, + '', + markdownTable(report.budgets.checks), + '', + '| Package | Modules | Source Size |', + '| --- | ---: | ---: |', + ...topPackageRows, + '', + `Report artifact: \`${relative(outputFile)}\``, + '', + ].join('\n'); + fs.appendFileSync(process.env.GITHUB_STEP_SUMMARY, `${summary}\n`); +} + +console.log(JSON.stringify(report, null, 2)); + +if (forbiddenModules.length > 0) { + console.error('Expo Atlas forbidden module checks failed:'); + for (const item of forbiddenModules) { + console.error(`- ${item.path} (${item.sourceSize}): ${item.reason}`); + } + process.exit(1); +} + +const failedBudgetChecks = budgetChecks.filter((check) => check.status === 'fail'); +if (failedBudgetChecks.length > 0) { + console.error('Expo Atlas budget checks failed:'); + for (const check of failedBudgetChecks) { + console.error(`- ${check.label}: ${check.actualFormatted} exceeds ${check.maxFormatted}`); + } + process.exit(1); +} diff --git a/scripts/report-module-work.js b/scripts/report-module-work.js new file mode 100644 index 0000000..2112ced --- /dev/null +++ b/scripts/report-module-work.js @@ -0,0 +1,235 @@ +#!/usr/bin/env node +/* eslint-env node */ + +const fs = require('fs'); +const path = require('path'); +const ts = require('typescript'); + +const ROOT = path.resolve(__dirname, '..'); +const DEFAULT_OUTPUT_FILE = path.join(ROOT, 'dist/module-work-report.json'); +const SOURCE_DIRS = [ + 'src/app', + 'src/components', + 'src/contexts', + 'src/hooks', + 'src/lib', + 'src/services', + 'src/stores', + 'src/utils', +]; +const SKIP_PATH_PARTS = new Set(['__tests__', '__mocks__']); +const SKIP_FILE_PATTERNS = [/\.test\.[jt]sx?$/, /\.spec\.[jt]sx?$/, /setupTests\.tsx?$/]; +const SUSPICIOUS_CALLS = new Map([ + ['addEventListener', 'registers an event hook'], + ['deleteAsync', 'touches the filesystem'], + ['deleteResources', 'touches downloaded AI resources'], + ['execFileSync', 'runs a subprocess'], + ['execSync', 'runs a subprocess'], + ['fetch', 'starts a network request'], + ['getItemSync', 'does synchronous storage work'], + ['initExecutorch', 'initializes local AI'], + ['listDownloadedFiles', 'touches downloaded AI resources'], + ['openDatabase', 'opens SQLite'], + ['openDatabaseAsync', 'opens SQLite'], + ['openDatabaseSync', 'opens SQLite synchronously'], + ['readAsStringAsync', 'reads from the filesystem'], + ['readDirectoryAsync', 'reads from the filesystem'], + ['readFileSync', 'reads from the filesystem'], + ['requestAnimationFrame', 'schedules frame work'], + ['require', 'loads a module lazily'], + ['setInterval', 'starts a timer'], + ['setTimeout', 'starts a timer'], + ['writeAsStringAsync', 'writes to the filesystem'], + ['writeFileSync', 'writes to the filesystem'], +]); +const SAFE_NEW_NAMES = new Set(['AbortController', 'Error', 'Map', 'Proxy', 'Set', 'URL', 'WeakMap', 'WeakSet']); + +const walk = (dir, files = []) => { + if (!fs.existsSync(dir)) return files; + + for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { + if (entry.name.startsWith('.')) continue; + + const fullPath = path.join(dir, entry.name); + if (entry.isDirectory()) { + if (!SKIP_PATH_PARTS.has(entry.name)) walk(fullPath, files); + } else if (/\.[jt]sx?$/.test(entry.name)) { + files.push(fullPath); + } + } + + return files; +}; + +const relative = (file) => path.relative(ROOT, file); +const getLine = (sourceFile, node) => sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).line + 1; + +const getCallName = (expression) => { + if (ts.isIdentifier(expression)) return expression.text; + if (ts.isPropertyAccessExpression(expression)) return expression.name.text; + return ''; +}; + +const isInsideFunctionLike = (node) => { + let current = node.parent; + while (current) { + if ( + ts.isFunctionDeclaration(current) || + ts.isFunctionExpression(current) || + ts.isArrowFunction(current) || + ts.isMethodDeclaration(current) + ) { + return true; + } + current = current.parent; + } + return false; +}; + +const shouldSkipFile = (file) => { + const rel = relative(file); + return SKIP_FILE_PATTERNS.some((pattern) => pattern.test(rel)); +}; + +const severityForCall = (name) => { + if (['fetch', 'openDatabase', 'openDatabaseAsync', 'openDatabaseSync', 'initExecutorch'].includes(name)) { + return 'high'; + } + if (['require', 'getItemSync', 'readFileSync', 'writeFileSync'].includes(name)) return 'medium'; + return 'low'; +}; + +const finding = ({ sourceFile, node, rel, severity, reason }) => ({ + file: rel, + line: getLine(sourceFile, node), + severity, + reason, +}); + +const scanNode = (sourceFile, node, rel, findings) => { + if (isInsideFunctionLike(node)) return; + + if (ts.isCallExpression(node)) { + const name = getCallName(node.expression); + const reason = SUSPICIOUS_CALLS.get(name); + if (reason) { + findings.push( + finding({ + sourceFile, + node, + rel, + severity: severityForCall(name), + reason: `Top-level ${name}() ${reason} at import time`, + }) + ); + } + } + + if (ts.isNewExpression(node)) { + const name = ts.isIdentifier(node.expression) ? node.expression.text : getCallName(node.expression); + if (name && !SAFE_NEW_NAMES.has(name)) { + findings.push( + finding({ + sourceFile, + node, + rel, + severity: 'low', + reason: `Top-level new ${name}() constructs work at import time`, + }) + ); + } + } + + ts.forEachChild(node, (child) => scanNode(sourceFile, child, rel, findings)); +}; + +const scanFile = (file) => { + const rel = relative(file); + const contents = fs.readFileSync(file, 'utf8'); + const sourceFile = ts.createSourceFile( + file, + contents, + ts.ScriptTarget.Latest, + true, + file.endsWith('x') ? ts.ScriptKind.TSX : ts.ScriptKind.TS + ); + const findings = []; + + for (const statement of sourceFile.statements) { + if ( + ts.isImportDeclaration(statement) || + ts.isExportDeclaration(statement) || + ts.isTypeAliasDeclaration(statement) || + ts.isInterfaceDeclaration(statement) + ) { + continue; + } + + scanNode(sourceFile, statement, rel, findings); + } + + return findings; +}; + +const summarize = (findings) => + findings.reduce( + (summary, item) => { + summary[item.severity] += 1; + return summary; + }, + { high: 0, medium: 0, low: 0 } + ); + +const topFiles = (findings) => { + const counts = new Map(); + for (const item of findings) counts.set(item.file, (counts.get(item.file) || 0) + 1); + return Array.from(counts.entries()) + .map(([file, count]) => ({ file, count })) + .sort((a, b) => b.count - a.count || a.file.localeCompare(b.file)) + .slice(0, 10); +}; + +const markdownReport = (report) => { + const rows = report.findings + .slice(0, 20) + .map((item) => `| ${item.severity} | \`${item.file}:${item.line}\` | ${item.reason} |`); + + return [ + '## Module Import-Time Work Report', + '', + `Scanned ${report.fileCount} files. Found ${report.findings.length} review items.`, + '', + `High: ${report.summary.high} / Medium: ${report.summary.medium} / Low: ${report.summary.low}`, + '', + '| Severity | Location | Reason |', + '| --- | --- | --- |', + ...(rows.length > 0 ? rows : ['| pass | - | No suspicious top-level work found. |']), + '', + 'This report is advisory. `guard:startup` remains the blocking check for startup-critical files.', + '', + ].join('\n'); +}; + +const files = SOURCE_DIRS.flatMap((dir) => walk(path.join(ROOT, dir))).filter((file) => !shouldSkipFile(file)); +const findings = files.flatMap(scanFile).sort((a, b) => { + const severityOrder = { high: 0, medium: 1, low: 2 }; + return severityOrder[a.severity] - severityOrder[b.severity] || a.file.localeCompare(b.file) || a.line - b.line; +}); + +const report = { + generatedAt: new Date().toISOString(), + fileCount: files.length, + summary: summarize(findings), + topFiles: topFiles(findings), + findings, +}; +const outputFile = path.resolve(process.env.MODULE_WORK_REPORT_OUTPUT || DEFAULT_OUTPUT_FILE); + +fs.mkdirSync(path.dirname(outputFile), { recursive: true }); +fs.writeFileSync(outputFile, `${JSON.stringify(report, null, 2)}\n`); + +if (process.env.GITHUB_STEP_SUMMARY) { + fs.appendFileSync(process.env.GITHUB_STEP_SUMMARY, `${markdownReport(report)}\n`); +} + +console.log(markdownReport(report)); diff --git a/scripts/scan-startup-module-work.js b/scripts/scan-startup-module-work.js new file mode 100755 index 0000000..dd11a96 --- /dev/null +++ b/scripts/scan-startup-module-work.js @@ -0,0 +1,110 @@ +#!/usr/bin/env node +/* eslint-env node */ + +const fs = require('fs'); +const path = require('path'); +const ts = require('typescript'); + +const ROOT = path.resolve(__dirname, '..'); + +const STARTUP_CRITICAL_FILES = [ + 'src/components/RootLayout.tsx', + 'src/lib/defer-until-app-ready.ts', + 'src/lib/executorch-init.ts', + 'src/lib/startup-performance.ts', +]; + +const SUSPICIOUS_CALL_NAMES = new Set([ + 'addEventListener', + 'deleteResources', + 'execFileSync', + 'execSync', + 'fetch', + 'initExecutorch', + 'listDownloadedFiles', + 'mark', + 'measure', + 'metric', + 'openDatabaseAsync', + 'readFileSync', + 'requestAnimationFrame', + 'require', + 'setInterval', + 'setResourceLoggingEnabled', + 'setTimeout', + 'writeFileSync', +]); + +const SAFE_NEW_NAMES = new Set(['Error', 'Map', 'Proxy', 'Set', 'WeakMap', 'WeakSet']); + +const getLine = (sourceFile, node) => sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).line + 1; + +const getCallName = (expression) => { + if (ts.isIdentifier(expression)) return expression.text; + if (ts.isPropertyAccessExpression(expression)) return expression.name.text; + return ''; +}; + +const isInsideFunctionLike = (node) => { + let current = node.parent; + while (current) { + if ( + ts.isFunctionDeclaration(current) || + ts.isFunctionExpression(current) || + ts.isArrowFunction(current) || + ts.isMethodDeclaration(current) + ) { + return true; + } + current = current.parent; + } + return false; +}; + +const scanNode = (sourceFile, node, rel, findings) => { + if (isInsideFunctionLike(node)) return; + + if (ts.isCallExpression(node)) { + const name = getCallName(node.expression); + if (SUSPICIOUS_CALL_NAMES.has(name)) { + findings.push(`${rel}:${getLine(sourceFile, node)} performs ${name}() at module load`); + } + } + + if (ts.isNewExpression(node)) { + const name = ts.isIdentifier(node.expression) ? node.expression.text : getCallName(node.expression); + if (!SAFE_NEW_NAMES.has(name)) { + findings.push(`${rel}:${getLine(sourceFile, node)} constructs ${name || 'an object'} at module load`); + } + } + + ts.forEachChild(node, (child) => scanNode(sourceFile, child, rel, findings)); +}; + +const findings = []; + +for (const rel of STARTUP_CRITICAL_FILES) { + const fullPath = path.join(ROOT, rel); + const contents = fs.readFileSync(fullPath, 'utf8'); + const sourceFile = ts.createSourceFile(fullPath, contents, ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX); + + for (const statement of sourceFile.statements) { + if ( + ts.isImportDeclaration(statement) || + ts.isTypeAliasDeclaration(statement) || + ts.isInterfaceDeclaration(statement) + ) { + continue; + } + + scanNode(sourceFile, statement, rel, findings); + } +} + +if (findings.length > 0) { + console.error('Startup module-work guard failed:'); + for (const finding of findings) console.error(`- ${finding}`); + process.exit(1); +} + +console.log('Startup module-work guard passed.'); diff --git a/scripts/submit-app-store-review.sh b/scripts/submit-app-store-review.sh new file mode 100755 index 0000000..1f8314a --- /dev/null +++ b/scripts/submit-app-store-review.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +CREDS_FILE="${PREPAI_REVIEW_CREDS_FILE:-/tmp/prepai-demo-review-creds.txt}" + +APPLE_ID="${APPLE_ID:-jong2298@icloud.com}" +BUNDLE_ID="${BUNDLE_ID:-com.jongan69.prepai}" +APP_VERSION="${APP_VERSION:-1.0.0}" +BUILD_NUMBER="${BUILD_NUMBER:-25}" + +cd "$ROOT_DIR" + +if [[ -z "${APP_REVIEW_PHONE:-}" ]]; then + cat >&2 <<'EOF' +Missing APP_REVIEW_PHONE. + +Run with your App Review contact phone number, for example: + APP_REVIEW_PHONE="+15551234567" bun run submit:appstore +EOF + exit 64 +fi + +if [[ ! -f "$CREDS_FILE" ]]; then + cat >&2 < + new Promise((resolve) => { + let parsed; + try { + parsed = new URL(url); + } catch (error) { + resolve({ ok: false, status: 'invalid-url', error: error.message }); + return; + } + + const client = parsed.protocol === 'http:' ? http : https; + const req = client.request( + parsed, + { + method: 'HEAD', + timeout: 10000, + headers: { + 'User-Agent': 'PrepAI-AppStore-URL-Check/1.0', + }, + }, + (res) => { + const statusCode = res.statusCode || 0; + const location = res.headers.location; + + if (statusCode >= 300 && statusCode < 400 && location && redirectsRemaining > 0) { + const nextUrl = new URL(location, parsed).toString(); + res.resume(); + requestUrl(nextUrl, redirectsRemaining - 1).then(resolve); + return; + } + + res.resume(); + resolve({ ok: statusCode >= 200 && statusCode < 400, status: statusCode }); + } + ); + + req.on('timeout', () => { + req.destroy(new Error('request timed out')); + }); + req.on('error', (error) => { + resolve({ ok: false, status: 'request-failed', error: error.message }); + }); + req.end(); + }); + +const main = async () => { + const errors = []; + + for (const [field, value] of REQUIRED_URLS) { + if (!value) { + errors.push(`store.config.json is missing ${field}`); + continue; + } + + const result = await requestUrl(value); + if (!result.ok) { + errors.push( + `${field} did not return HTTP 2xx/3xx: ${value} (${result.status}${result.error ? `, ${result.error}` : ''})` + ); + } + } + + if (errors.length > 0) { + console.error('App Store URL checks failed:'); + for (const error of errors) console.error(`- ${error}`); + process.exit(1); + } + + console.log('App Store URL checks passed.'); +}; + +main().catch((error) => { + console.error(error); + process.exit(1); +}); diff --git a/scripts/verify-production-readiness.js b/scripts/verify-production-readiness.js new file mode 100644 index 0000000..5a40654 --- /dev/null +++ b/scripts/verify-production-readiness.js @@ -0,0 +1,591 @@ +#!/usr/bin/env node +/* eslint-env node */ + +const fs = require('fs'); +const path = require('path'); + +const ROOT = path.resolve(__dirname, '..'); +const MOBILE_SOURCE_DIRS = [ + 'src/app/(root)', + 'src/components/screens', + 'src/contexts', + 'src/hooks', + 'src/lib', + 'src/services', + 'src/stores', + 'src/utils', +]; +const PRODUCT_SOURCE_DIRS = [...MOBILE_SOURCE_DIRS, 'src/app/(app-web)', 'src/components']; +const SENSITIVE_SOURCE_DIRS = ['src']; +const PRODUCT_COPY_FILES = ['docs/app-store-submission-fields.md', 'store.config.json']; + +const MOCK_TERMS = /\b(mock|fake|hardcoded|coming soon|test@example\.com|createTestData|pk_test_|sk_test_)\b/i; +const UNVERIFIED_WEB_SURFACES = + /\b(testimonials?|live chat|phone support|video tutorials?|watch now|community forum|satisfied users|50K\+|1M\+|95%|4\.8)\b/i; +const MISLEADING_LOCAL_FIRST_CLAIMS = + /(automatically synced to the cloud|cloud backup|synced to the cloud|remain safely stored and synced|continuity across installs and devices|where our servers are located)/i; +const MISLEADING_AI_CLAIMS = + /(analy[sz]e meal photos|meal photo analysis|high-accuracy vision workflows|cloud AI remains available|cloud AI is currently used|cloud AI fallback only|ingredient analysis)/i; +const MISLEADING_PRIVACY_CLAIMS = + /(AI-powered fitness and nutrition platform|regular backups and disaster recovery|secure data centers|regular security audits|aggregated data may be retained indefinitely|aggregated, anonymized data may be used|analytics cookies|personalized content|shared with other users|marketing communications|fraud)/i; +const MOCK_ALLOWLIST = new Set(['src/components/forms/Checkbox.tsx', 'src/setupTests.ts']); +const RUNTIME_CONSOLE_ALLOWLIST = new Set(['src/lib/logger.ts', 'src/setupTests.ts']); +const UNVERIFIED_MARKETING_CLAIMS = /\b(50K\+|1M\+|95%|4\.8)\b/; +const DIRECT_RUNTIME_CONSOLE_LOG = /\bconsole\.(log|debug|info|warn|error)\(/; +const SENSITIVE_CONSOLE_LOG = + /console\.(log|debug|info|warn|error)\(.*\b(user|clerk|sync payload|operations?|preferences|health profile|healthkit|record_data|token|secret|password|request body)\b/i; +const EXECUTORCH_BARREL_IMPORT = + /\b(from\s+['"]react-native-executorch['"]|import\s*\(\s*['"]react-native-executorch['"]\s*\))/; + +const PERFORMANCE_BUDGETS = JSON.parse(fs.readFileSync(path.join(ROOT, 'config/performance-budgets.json'), 'utf8')); +const APP_CONFIG = JSON.parse(fs.readFileSync(path.join(ROOT, 'app.json'), 'utf8')); +const EAS_CONFIG = JSON.parse(fs.readFileSync(path.join(ROOT, 'eas.json'), 'utf8')); +const STORE_CONFIG = JSON.parse(fs.readFileSync(path.join(ROOT, 'store.config.json'), 'utf8')); +const CRITICAL_ASSET_LIMIT_BYTES = 850 * 1024; +const GENERATED_VISUAL_ASSET_LIMIT_BYTES = 400 * 1024; +const JS_BUNDLE_LIMIT_BYTES = PERFORMANCE_BUDGETS.iosExport.bundleBytesMax; +const APP_STORE_SCREENSHOT_FILE_LIMIT_BYTES = PERFORMANCE_BUDGETS.appStoreScreenshots.fileBytesMax; +const APP_STORE_SCREENSHOT_TOTAL_LIMIT_BYTES = PERFORMANCE_BUDGETS.appStoreScreenshots.totalBytesMax; +const CRITICAL_ASSETS = [ + { file: 'src/assets/icon.png', width: 1024, height: 1024 }, + { file: 'src/assets/adaptive-icon.png', width: 1024, height: 1024 }, + { file: 'src/assets/splash.png', width: 1284, height: 2778 }, + { file: 'src/assets/favicon.png', width: 96, height: 96 }, + { file: 'src/assets/images/adaptive-icon.png', width: 1024, height: 1024 }, +]; +const GENERATED_VISUAL_ASSETS = [ + { file: 'src/assets/img/welcome.jpg', width: 933, height: 1400 }, + { file: 'src/assets/img/onboarding.png', width: 856, height: 1330 }, + { file: 'src/assets/img/onboarding-1.jpg', width: 898, height: 1346 }, + { file: 'src/assets/img/onboarding-2.jpg', width: 898, height: 1346 }, + { file: 'src/assets/img/onboarding-3.png', width: 856, height: 366 }, + { file: 'src/assets/img/banner.png', width: 856, height: 366 }, + { file: 'src/assets/img/muscles.png', width: 950, height: 634 }, + { file: 'src/assets/img/progress.png', width: 508, height: 508 }, + { file: 'src/assets/img/service-1.jpg', width: 1280, height: 897 }, + { file: 'src/assets/img/subscription-banner.jpg', width: 869, height: 541 }, + { file: 'src/assets/img/wallpaper-3.jpg', width: 885, height: 1341 }, + { file: 'src/assets/img/wallpaper.webp', width: 1024, height: 1536 }, +]; +const APP_STORE_SCREENSHOT_GROUPS = { + APP_IPHONE_67: { + count: 5, + width: 1290, + height: 2796, + }, +}; +const STARTUP_CRITICAL_FILES = [ + 'src/components/RootLayout.tsx', + 'src/lib/defer-until-app-ready.ts', + 'src/lib/executorch-init.ts', + 'src/lib/startup-performance.ts', +]; +const FORBIDDEN_PRODUCT_FILES = [ + 'src/app/(app-web)/blog.tsx', + 'src/app/(app-web)/careers.tsx', + 'src/app/api/sync+api.ts', + 'src/app/api/meal-plan+api.ts', + 'src/app/api/image-meal-plan+api.ts', + 'src/lib/client-api.ts', + 'src/lib/openai-client.ts', + 'src/lib/api-utils.ts', + 'src/spec/swagger-spec.ts', + 'prisma/schema.prisma', + 'swagger-config.js', + 'swagger.json', + 'src/assets/img/user-1.jpg', + 'src/assets/img/user-2.jpg', + 'src/assets/img/user-3.jpg', +]; + +const errors = []; + +const walk = (dir, files = []) => { + if (!fs.existsSync(dir)) return files; + + for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { + const fullPath = path.join(dir, entry.name); + if (entry.isDirectory()) { + if (!['node_modules', '.git', 'dist', 'dist-ios-check', 'dist-web-check'].includes(entry.name)) { + walk(fullPath, files); + } + } else { + files.push(fullPath); + } + } + + return files; +}; + +const relative = (file) => path.relative(ROOT, file); + +const formatBytes = (bytes) => { + if (bytes < 1024) return `${bytes} B`; + if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`; + return `${(bytes / 1024 / 1024).toFixed(2)} MB`; +}; + +const getPngDimensions = (buffer) => { + const pngSignature = '89504e470d0a1a0a'; + + if (buffer.length < 24 || buffer.subarray(0, 8).toString('hex') !== pngSignature) { + return null; + } + + return { + width: buffer.readUInt32BE(16), + height: buffer.readUInt32BE(20), + }; +}; + +const getJpegDimensions = (buffer) => { + if (buffer.length < 4 || buffer[0] !== 0xff || buffer[1] !== 0xd8) return null; + + let offset = 2; + while (offset + 8 < buffer.length) { + if (buffer[offset] !== 0xff) return null; + + const marker = buffer[offset + 1]; + const length = buffer.readUInt16BE(offset + 2); + + if (marker >= 0xc0 && marker <= 0xc3) { + return { + height: buffer.readUInt16BE(offset + 5), + width: buffer.readUInt16BE(offset + 7), + }; + } + + offset += 2 + length; + } + + return null; +}; + +const getWebpDimensions = (buffer) => { + if (buffer.length < 30 || buffer.toString('ascii', 0, 4) !== 'RIFF' || buffer.toString('ascii', 8, 12) !== 'WEBP') { + return null; + } + + const chunk = buffer.toString('ascii', 12, 16); + + if (chunk === 'VP8X' && buffer.length >= 30) { + return { + width: 1 + buffer.readUIntLE(24, 3), + height: 1 + buffer.readUIntLE(27, 3), + }; + } + + if (chunk === 'VP8 ' && buffer.length >= 30) { + return { + width: buffer.readUInt16LE(26) & 0x3fff, + height: buffer.readUInt16LE(28) & 0x3fff, + }; + } + + if (chunk === 'VP8L' && buffer.length >= 25) { + const bits = buffer.readUInt32LE(21); + return { + width: (bits & 0x3fff) + 1, + height: ((bits >> 14) & 0x3fff) + 1, + }; + } + + return null; +}; + +const getImageDimensions = (file) => { + const buffer = fs.readFileSync(file); + return getPngDimensions(buffer) || getJpegDimensions(buffer) || getWebpDimensions(buffer); +}; + +const scanMockData = () => { + const files = Array.from(new Set(PRODUCT_SOURCE_DIRS.flatMap((dir) => walk(path.join(ROOT, dir))))).filter((file) => + /\.(ts|tsx|js|jsx)$/.test(file) + ); + + for (const file of files) { + const rel = relative(file); + if (MOCK_ALLOWLIST.has(rel)) continue; + + const contents = fs.readFileSync(file, 'utf8'); + const lines = contents.split(/\r?\n/); + lines.forEach((line, index) => { + if (MOCK_TERMS.test(line)) { + errors.push(`${rel}:${index + 1} contains production-readiness blocked text: ${line.trim()}`); + } + + if (UNVERIFIED_MARKETING_CLAIMS.test(line)) { + errors.push(`${rel}:${index + 1} contains an unverified marketing claim: ${line.trim()}`); + } + + if (rel.startsWith('src/app/(app-web)') && UNVERIFIED_WEB_SURFACES.test(line)) { + errors.push(`${rel}:${index + 1} contains an unverified web product surface: ${line.trim()}`); + } + + if (MISLEADING_LOCAL_FIRST_CLAIMS.test(line)) { + errors.push(`${rel}:${index + 1} contains a misleading local-first storage claim: ${line.trim()}`); + } + + if (MISLEADING_AI_CLAIMS.test(line)) { + errors.push(`${rel}:${index + 1} contains a misleading App Store MVP AI claim: ${line.trim()}`); + } + + if (MISLEADING_PRIVACY_CLAIMS.test(line)) { + errors.push(`${rel}:${index + 1} contains a misleading App Store MVP privacy claim: ${line.trim()}`); + } + }); + } +}; + +const scanLocalFirstClaims = () => { + const files = PRODUCT_COPY_FILES.map((file) => path.join(ROOT, file)).filter((file) => fs.existsSync(file)); + + for (const file of files) { + const rel = relative(file); + const lines = fs.readFileSync(file, 'utf8').split(/\r?\n/); + lines.forEach((line, index) => { + if (MISLEADING_LOCAL_FIRST_CLAIMS.test(line)) { + errors.push(`${rel}:${index + 1} contains a misleading local-first storage claim: ${line.trim()}`); + } + + if (MISLEADING_AI_CLAIMS.test(line)) { + errors.push(`${rel}:${index + 1} contains a misleading App Store MVP AI claim: ${line.trim()}`); + } + + if (MISLEADING_PRIVACY_CLAIMS.test(line)) { + errors.push(`${rel}:${index + 1} contains a misleading App Store MVP privacy claim: ${line.trim()}`); + } + }); + } +}; + +const checkForbiddenProductFiles = () => { + for (const file of FORBIDDEN_PRODUCT_FILES) { + if (fs.existsSync(path.join(ROOT, file))) { + errors.push(`${file} must not be reintroduced without real production content and review approval`); + } + } +}; + +const scanSensitiveConsoleLogs = () => { + const files = SENSITIVE_SOURCE_DIRS.flatMap((dir) => walk(path.join(ROOT, dir))).filter((file) => + /\.(ts|tsx|js|jsx)$/.test(file) + ); + + for (const file of files) { + const rel = relative(file); + if (RUNTIME_CONSOLE_ALLOWLIST.has(rel)) continue; + + const contents = fs.readFileSync(file, 'utf8'); + const lines = contents.split(/\r?\n/); + lines.forEach((line, index) => { + if (DIRECT_RUNTIME_CONSOLE_LOG.test(line)) { + errors.push(`${rel}:${index + 1} logs directly to console instead of the production-safe logger`); + } + + if (SENSITIVE_CONSOLE_LOG.test(line)) { + errors.push(`${rel}:${index + 1} logs sensitive runtime data directly: ${line.trim()}`); + } + }); + } +}; + +const scanExecutorchImports = () => { + const files = SENSITIVE_SOURCE_DIRS.flatMap((dir) => walk(path.join(ROOT, dir))).filter((file) => + /\.(ts|tsx|js|jsx)$/.test(file) + ); + + for (const file of files) { + const rel = relative(file); + const lines = fs.readFileSync(file, 'utf8').split(/\r?\n/); + lines.forEach((line, index) => { + if (EXECUTORCH_BARREL_IMPORT.test(line)) { + errors.push( + `${rel}:${index + 1} imports the full react-native-executorch barrel; use src/lib/executorch-runtime.ts to keep unused native AI modules out of the bundle` + ); + } + }); + } +}; + +const checkCriticalAssets = () => { + for (const asset of CRITICAL_ASSETS) { + const fullPath = path.join(ROOT, asset.file); + if (!fs.existsSync(fullPath)) { + errors.push(`${asset.file} is missing`); + continue; + } + + const size = fs.statSync(fullPath).size; + if (size > CRITICAL_ASSET_LIMIT_BYTES) { + errors.push( + `${asset.file} is ${(size / 1024).toFixed(1)} KB, above ${(CRITICAL_ASSET_LIMIT_BYTES / 1024).toFixed(0)} KB` + ); + } + + const dimensions = getImageDimensions(fullPath); + if (!dimensions) { + errors.push(`${asset.file} must be a PNG image`); + continue; + } + + if (dimensions.width !== asset.width || dimensions.height !== asset.height) { + errors.push(`${asset.file} is ${dimensions.width}x${dimensions.height}, expected ${asset.width}x${asset.height}`); + } + } +}; + +const checkGeneratedVisualAssets = () => { + for (const asset of GENERATED_VISUAL_ASSETS) { + const fullPath = path.join(ROOT, asset.file); + if (!fs.existsSync(fullPath)) { + errors.push(`${asset.file} is missing from the generated PrepAI visual asset set`); + continue; + } + + const size = fs.statSync(fullPath).size; + if (size > GENERATED_VISUAL_ASSET_LIMIT_BYTES) { + errors.push( + `${asset.file} is ${(size / 1024).toFixed(1)} KB, above ${(GENERATED_VISUAL_ASSET_LIMIT_BYTES / 1024).toFixed(0)} KB` + ); + } + + const dimensions = getImageDimensions(fullPath); + if (!dimensions) { + errors.push(`${asset.file} must be a readable PNG, JPEG, or WebP image`); + continue; + } + + if (dimensions.width !== asset.width || dimensions.height !== asset.height) { + errors.push(`${asset.file} is ${dimensions.width}x${dimensions.height}, expected ${asset.width}x${asset.height}`); + } + } +}; + +const checkExportedBundles = () => { + const exportedBundles = walk(path.join(ROOT, 'dist-ios-check')).filter((file) => /\.(js|hbc)$/.test(file)); + + for (const bundle of exportedBundles) { + const size = fs.statSync(bundle).size; + if (size > JS_BUNDLE_LIMIT_BYTES) { + errors.push( + `${relative(bundle)} is ${(size / 1024 / 1024).toFixed(2)} MB, above ${(JS_BUNDLE_LIMIT_BYTES / 1024 / 1024).toFixed(0)} MB` + ); + } + } +}; + +const checkStartupCriticalAnnotations = () => { + for (const file of STARTUP_CRITICAL_FILES) { + const fullPath = path.join(ROOT, file); + if (!fs.existsSync(fullPath)) { + errors.push(`${file} is missing from startup-critical guardrails`); + continue; + } + + const contents = fs.readFileSync(fullPath, 'utf8'); + if (!contents.includes('@requires-approval startup-critical')) { + errors.push(`${file} must keep @requires-approval startup-critical annotation`); + } + } +}; + +const getExpoBuildPropertiesOptions = () => { + const plugin = APP_CONFIG.expo?.plugins?.find((item) => Array.isArray(item) && item[0] === 'expo-build-properties'); + return plugin?.[1] || null; +}; + +const checkNativeReleaseConfiguration = () => { + if (APP_CONFIG.expo?.jsEngine !== 'hermes') { + errors.push('app.json must keep expo.jsEngine=hermes for release profiling and bundle performance'); + } + + if (APP_CONFIG.expo?.newArchEnabled !== true) { + errors.push('app.json must keep expo.newArchEnabled=true for the New Architecture release build'); + } + + const buildProperties = getExpoBuildPropertiesOptions(); + if (!buildProperties) { + errors.push('app.json must keep expo-build-properties configured for native release optimizations'); + return; + } + + if (buildProperties.android?.enableProguardInReleaseBuilds !== true) { + errors.push( + 'expo-build-properties android.enableProguardInReleaseBuilds must stay true for R8 release minification' + ); + } + + if (buildProperties.android?.enableShrinkResourcesInReleaseBuilds !== true) { + errors.push( + 'expo-build-properties android.enableShrinkResourcesInReleaseBuilds must stay true for release resource shrinking' + ); + } + + if (buildProperties.android?.enableMinifyInReleaseBuilds !== undefined) { + errors.push( + 'expo-build-properties android.enableMinifyInReleaseBuilds is not supported on this SDK branch; use enableProguardInReleaseBuilds' + ); + } + + if (buildProperties.android?.networkInspector !== false) { + errors.push('expo-build-properties android.networkInspector must stay false in release builds'); + } + + if (buildProperties.ios?.networkInspector !== false) { + errors.push('expo-build-properties ios.networkInspector must stay false in release builds'); + } + + if (buildProperties.ios?.deploymentTarget !== '16.4') { + errors.push('expo-build-properties ios.deploymentTarget must remain 16.4 until the App Store test matrix changes'); + } + + for (const profileName of ['main', 'production']) { + const profile = EAS_CONFIG.build?.[profileName]; + if (!profile) { + errors.push(`eas.json must keep the ${profileName} build profile`); + continue; + } + + if (profile.channel !== 'production') { + errors.push(`eas.json build.${profileName}.channel must be production`); + } + + if (profile.autoIncrement !== true) { + errors.push(`eas.json build.${profileName}.autoIncrement must stay true for App Store build numbers`); + } + + if (profile.env?.RCT_REMOVE_LEGACY_ARCH !== '1') { + errors.push(`eas.json build.${profileName}.env.RCT_REMOVE_LEGACY_ARCH must stay "1"`); + } + } + + for (const profileName of ['main', 'production']) { + if (EAS_CONFIG.submit?.[profileName]?.ios?.ascAppId !== '6782733134') { + errors.push(`eas.json submit.${profileName}.ios.ascAppId must remain 6782733134 for PrepAI`); + } + } +}; + +const checkAppStoreDeviceSupport = () => { + if (APP_CONFIG.expo?.ios?.supportsTablet !== false) { + errors.push('app.json must keep expo.ios.supportsTablet=false until iPad screenshots and tablet QA are ready'); + } + + const screenshotGroups = Object.keys(STORE_CONFIG.apple?.info?.['en-US']?.screenshots || {}); + const hasIpadScreenshots = screenshotGroups.some((group) => group.includes('IPAD')); + if (APP_CONFIG.expo?.ios?.supportsTablet === true && !hasIpadScreenshots) { + errors.push('store.config.json must include iPad screenshot groups before enabling iPad support'); + } +}; + +const checkHealthKitConfiguration = () => { + const healthKitPlugin = APP_CONFIG.expo?.plugins?.find( + (plugin) => Array.isArray(plugin) && plugin[0] === '@kingstinct/react-native-healthkit' + ); + const healthKitOptions = healthKitPlugin?.[1] || {}; + + if (!healthKitPlugin) { + errors.push('app.json must keep @kingstinct/react-native-healthkit configured for the iOS HealthKit MVP'); + return; + } + + if (healthKitOptions.NSHealthUpdateUsageDescription !== false) { + errors.push('HealthKit must remain read-only for v1: set NSHealthUpdateUsageDescription=false in app.json'); + } + + if (healthKitOptions.background !== false) { + errors.push( + 'HealthKit background delivery must remain disabled for v1 until background sync is reviewed and tested' + ); + } + + if (APP_CONFIG.expo?.ios?.infoPlist?.NSHealthUpdateUsageDescription) { + errors.push( + 'app.json ios.infoPlist must not declare NSHealthUpdateUsageDescription for the read-only HealthKit MVP' + ); + } +}; + +const checkAppStoreMetadata = () => { + const listing = STORE_CONFIG.apple?.info?.['en-US']; + if (!listing) { + errors.push('store.config.json is missing apple.info.en-US metadata'); + return; + } + + if (!listing.description?.includes('explicit JSON export/import')) { + errors.push('store.config.json description must disclose explicit JSON export/import backup support'); + } + + for (const [field, expected] of [ + ['privacyPolicyUrl', 'https://prepitai.expo.app/privacy'], + ['supportUrl', 'https://prepitai.expo.app/contact'], + ['marketingUrl', 'https://prepitai.expo.app'], + ]) { + if (listing[field] !== expected) { + errors.push(`store.config.json ${field} must be ${expected} until the custom domain is App Review ready`); + } + } + + const screenshotGroups = listing.screenshots || {}; + let totalScreenshotBytes = 0; + for (const [group, expected] of Object.entries(APP_STORE_SCREENSHOT_GROUPS)) { + const screenshots = screenshotGroups[group] || []; + if (screenshots.length !== expected.count) { + errors.push(`store.config.json ${group} must reference ${expected.count} screenshots`); + continue; + } + + for (const screenshot of screenshots) { + const fullPath = path.join(ROOT, screenshot); + if (!fs.existsSync(fullPath)) { + errors.push(`${screenshot} referenced by store.config.json is missing`); + continue; + } + + const size = fs.statSync(fullPath).size; + totalScreenshotBytes += size; + if (size > APP_STORE_SCREENSHOT_FILE_LIMIT_BYTES) { + errors.push( + `${screenshot} is ${formatBytes(size)}, above ${formatBytes(APP_STORE_SCREENSHOT_FILE_LIMIT_BYTES)}` + ); + } + + const dimensions = getImageDimensions(fullPath); + if (!dimensions || dimensions.width !== expected.width || dimensions.height !== expected.height) { + errors.push( + `${screenshot} is ${dimensions ? `${dimensions.width}x${dimensions.height}` : 'unreadable'}, expected ${expected.width}x${expected.height}` + ); + } + } + } + + if (totalScreenshotBytes > APP_STORE_SCREENSHOT_TOTAL_LIMIT_BYTES) { + errors.push( + `App Store screenshots total ${formatBytes(totalScreenshotBytes)}, above ${formatBytes(APP_STORE_SCREENSHOT_TOTAL_LIMIT_BYTES)}` + ); + } +}; + +scanMockData(); +scanLocalFirstClaims(); +scanSensitiveConsoleLogs(); +scanExecutorchImports(); +checkForbiddenProductFiles(); +checkCriticalAssets(); +checkGeneratedVisualAssets(); +checkExportedBundles(); +checkStartupCriticalAnnotations(); +checkNativeReleaseConfiguration(); +checkAppStoreDeviceSupport(); +checkHealthKitConfiguration(); +checkAppStoreMetadata(); + +if (errors.length > 0) { + console.error('Production readiness checks failed:'); + for (const error of errors) console.error(`- ${error}`); + process.exit(1); +} + +console.log('Production readiness checks passed.'); diff --git a/scripts/verify-release-environment.js b/scripts/verify-release-environment.js new file mode 100755 index 0000000..79fb0c9 --- /dev/null +++ b/scripts/verify-release-environment.js @@ -0,0 +1,154 @@ +#!/usr/bin/env node +/* eslint-env node */ + +const fs = require('fs'); +const { spawnSync } = require('child_process'); + +const REQUIRED_PRODUCTION_ENV = [ + 'CLERK_SECRET_KEY', + 'EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY', + 'EXPO_PUBLIC_CLOUD_AI_FALLBACK', + 'EXPO_PUBLIC_LOCAL_AI_ENABLED', + 'EXPO_PUBLIC_LOCAL_AI_PROVIDER', +]; + +const TEST_VALUE_PATTERNS = [ + { name: 'CLERK_SECRET_KEY', pattern: /^sk_test_/ }, + { name: 'EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY', pattern: /^pk_test_/ }, +]; + +const EXPECTED_PRODUCTION_VALUES = [ + { name: 'EXPO_PUBLIC_LOCAL_AI_ENABLED', value: 'true' }, + { name: 'EXPO_PUBLIC_LOCAL_AI_PROVIDER', value: 'executorch' }, + { name: 'EXPO_PUBLIC_CLOUD_AI_FALLBACK', value: 'false' }, +]; + +const REQUIRED_ENV_DETAILS = [ + { name: 'CLERK_SECRET_KEY', scope: 'PROJECT', visibility: 'SECRET' }, + { name: 'EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY', scope: 'PROJECT', visibility: 'PUBLIC' }, + { name: 'EXPO_PUBLIC_CLOUD_AI_FALLBACK', scope: 'PROJECT', visibility: 'PUBLIC' }, + { name: 'EXPO_PUBLIC_LOCAL_AI_ENABLED', scope: 'PROJECT', visibility: 'PUBLIC' }, + { name: 'EXPO_PUBLIC_LOCAL_AI_PROVIDER', scope: 'PROJECT', visibility: 'PUBLIC' }, +]; + +const parseEnvList = (output) => { + const values = new Map(); + const duplicates = new Set(); + + for (const line of output.split(/\r?\n/)) { + const match = line.match(/^([A-Z0-9_]+)=(.*)$/); + if (!match) continue; + + const [, name, value] = match; + if (values.has(name)) { + duplicates.add(name); + } + values.set(name, value); + } + + return { values, duplicates }; +}; + +const parseEnvDetails = (output) => { + const details = new Map(); + const blocks = output.split(/—{3,}|---+/); + + for (const block of blocks) { + const variable = {}; + for (const line of block.split(/\r?\n/)) { + const match = line.match(/^(Name|Scope|Visibility)\s+(.+)$/); + if (!match) continue; + variable[match[1].toLowerCase()] = match[2].trim(); + } + + if (!variable.name) continue; + const list = details.get(variable.name) || []; + list.push(variable); + details.set(variable.name, list); + } + + return details; +}; + +const spawnEasEnvList = (args) => { + const eas = spawnSync('eas', args, { encoding: 'utf8' }); + + if (eas.status === 0) { + return `${eas.stdout}\n${eas.stderr}`; + } + + if (eas.error && eas.error.code !== 'ENOENT') { + throw eas.error; + } + + const bunx = spawnSync('bunx', ['eas', ...args], { encoding: 'utf8' }); + if (bunx.status === 0) { + return `${bunx.stdout}\n${bunx.stderr}`; + } + + process.stderr.write(bunx.stderr || eas.stderr || 'Failed to read EAS production environment.\n'); + process.exit(bunx.status || eas.status || 1); +}; + +const readEnvList = (format) => { + if (format === 'long' && process.env.EAS_ENV_LONG_LIST_FILE) { + return fs.readFileSync(process.env.EAS_ENV_LONG_LIST_FILE, 'utf8'); + } + + if (format === 'short' && process.env.EAS_ENV_LIST_FILE) { + return fs.readFileSync(process.env.EAS_ENV_LIST_FILE, 'utf8'); + } + + return spawnEasEnvList(['env:list', 'production', '--format', format]); +}; + +const { values, duplicates } = parseEnvList(readEnvList('short')); +const details = parseEnvDetails(readEnvList('long')); +const errors = []; + +for (const name of REQUIRED_PRODUCTION_ENV) { + if (!values.get(name)) { + errors.push(`Missing required EAS production env var: ${name}`); + } +} + +for (const name of duplicates) { + errors.push(`Duplicate EAS production env var must be removed: ${name}`); +} + +for (const { name, pattern } of TEST_VALUE_PATTERNS) { + const value = values.get(name); + if (value && pattern.test(value)) { + errors.push(`${name} is a test-mode value; use production Clerk credentials for App Store release`); + } +} + +for (const { name, value: expectedValue } of EXPECTED_PRODUCTION_VALUES) { + const value = values.get(name); + if (value && value !== expectedValue) { + errors.push(`${name} must be ${expectedValue} for the local-first App Store MVP`); + } +} + +for (const { name, scope, visibility } of REQUIRED_ENV_DETAILS) { + const matchingDetails = details.get(name) || []; + const hasExpectedShape = matchingDetails.some((item) => item.scope === scope && item.visibility === visibility); + + if (matchingDetails.length > 0 && !hasExpectedShape) { + errors.push(`${name} must be ${scope.toLowerCase()}-scoped with ${visibility.toLowerCase()} visibility`); + } +} + +if (process.argv.includes('--require-app-review-phone') && !process.env.APP_REVIEW_PHONE) { + errors.push('Missing APP_REVIEW_PHONE for App Review submission'); +} + +if (errors.length > 0) { + process.stderr.write('Release environment checks failed:\n'); + for (const error of errors) { + process.stderr.write(`- ${error}\n`); + } + process.exit(1); +} + +process.stdout.write('Release environment checks passed.\n'); diff --git a/src/app/(app-web)/_layout.tsx b/src/app/(app-web)/_layout.tsx index 40c13b8..f6bff07 100644 --- a/src/app/(app-web)/_layout.tsx +++ b/src/app/(app-web)/_layout.tsx @@ -7,9 +7,7 @@ export default function WebLayout() { headerShown: false, }}> - - diff --git a/src/app/(app-web)/blog.tsx b/src/app/(app-web)/blog.tsx deleted file mode 100644 index 4a0eb4c..0000000 --- a/src/app/(app-web)/blog.tsx +++ /dev/null @@ -1,314 +0,0 @@ -import React from 'react'; -import { View, Image, TouchableOpacity, Platform } from 'react-native'; -import { ScrollView } from 'react-native'; - -import { Button } from '@/components/Button'; -import Icon from '@/components/Icon'; -import ThemedText from '@/components/ThemedText'; -import ErrorBoundary from '@/components/ErrorBoundary'; - -const BlogPage = () => { - const blogPosts = [ - { - id: 1, - title: '10 Essential Tips for Building Muscle Mass', - excerpt: 'Discover the science-backed strategies to maximize your muscle growth and strength gains.', - author: 'Dr. Sarah Johnson', - date: '2024-01-15', - readTime: '8 min read', - category: 'Fitness', - image: require('@/assets/img/service-1.jpg'), - featured: true, - }, - { - id: 2, - title: 'The Complete Guide to Macro Tracking', - excerpt: - 'Learn how to track your macronutrients effectively for better results and understanding of your nutrition.', - author: 'Mike Chen', - date: '2024-01-12', - readTime: '12 min read', - category: 'Nutrition', - image: require('@/assets/img/onboarding-3.png'), - featured: false, - }, - { - id: 3, - title: 'AI-Powered Meal Planning: The Future of Nutrition', - excerpt: - 'How artificial intelligence is revolutionizing the way we plan and optimize our meals for better health.', - author: 'Emma Davis', - date: '2024-01-10', - readTime: '6 min read', - category: 'Technology', - image: require('@/assets/img/progress.png'), - featured: false, - }, - { - id: 4, - title: 'Pre-Workout Nutrition: What to Eat Before Training', - excerpt: 'Optimize your performance with the right pre-workout nutrition strategy.', - author: 'Dr. Sarah Johnson', - date: '2024-01-08', - readTime: '10 min read', - category: 'Nutrition', - image: require('@/assets/img/onboarding.png'), - featured: false, - }, - { - id: 5, - title: 'The Psychology of Habit Formation in Fitness', - excerpt: 'Understanding the mental aspects of building lasting fitness habits and routines.', - author: 'Mike Chen', - date: '2024-01-05', - readTime: '9 min read', - category: 'Psychology', - image: require('@/assets/img/banner.png'), - featured: false, - }, - { - id: 6, - title: 'Recovery Strategies for Optimal Performance', - excerpt: 'Essential recovery techniques to enhance your training results and prevent injury.', - author: 'Emma Davis', - date: '2024-01-03', - readTime: '7 min read', - category: 'Fitness', - image: require('@/assets/img/service-1.jpg'), - featured: false, - }, - ]; - - const categories = ['All', 'Fitness', 'Nutrition', 'Technology', 'Psychology']; - - const handleBackToHome = () => { - if (Platform.OS === 'web') { - window.location.href = '/'; - } - }; - - const handleReadMore = (postId: number) => { - // In a real app, this would navigate to the full blog post - console.log(`Navigate to blog post ${postId}`); - }; - - return ( - - - - - - - {/* Header */} - - - - Back to Home - - - - PrepAI Blog - - - - {/* Hero Section */} - - - - Fitness & Nutrition Insights - - - Expert advice, tips, and strategies to help you achieve your health and fitness goals - - - - - {/* Featured Post */} - - - Featured Article - {blogPosts - .filter((post) => post.featured) - .map((post) => ( - - - - - - {post.category} - - - {post.title} - {post.excerpt} - - {post.author} - - {post.date} - - {post.readTime} - -