diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml new file mode 100644 index 00000000..ccb9766a --- /dev/null +++ b/.github/workflows/dev.yml @@ -0,0 +1,41 @@ +name: Build and Push to Registry + +on: + push: + branches: [ dev ] + +env: + REGISTRY: git.4nkweb.com + IMAGE_NAME: 4nk/lecoffre-front + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up SSH agent + uses: webfactory/ssh-agent@v0.9.1 + with: + ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ secrets.USER }} + password: ${{ secrets.TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + ssh: default + tags: | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ gitea.sha }} \ No newline at end of file diff --git a/Dockerfile.front b/Dockerfile.front deleted file mode 100644 index 11d63f6c..00000000 --- a/Dockerfile.front +++ /dev/null @@ -1,44 +0,0 @@ -# Install dependencies only when needed -FROM node:19-alpine AS deps - -WORKDIR leCoffre-front - -COPY package.json ./ - -RUN apk update && apk add openssh-client git - -COPY id_rsa /root/.ssh/id_rsa -RUN chmod 600 ~/.ssh/id_rsa -RUN eval "$(ssh-agent -s)" && ssh-add /root/.ssh/id_rsa -RUN ssh-keyscan github.com smart-chain-fr/leCoffre-resources.git >> /root/.ssh/known_hosts - -RUN npm install --frozen-lockfile - -# Rebuild the source code only when needed -FROM node:19-alpine AS builder - -WORKDIR leCoffre-front - -COPY --from=deps leCoffre-front/node_modules ./node_modules -COPY --from=deps leCoffre-front/package.json package.json -COPY tsconfig.json tsconfig.json -COPY src src - -RUN npm run build - -# Production image, copy all the files and run next -FROM node:19-alpine AS production - -WORKDIR leCoffre-front - -RUN adduser -D lecoffreuser --uid 10000 && chown -R lecoffreuser . - -COPY public ./public -COPY --from=builder --chown=lecoffreuser leCoffre-front/node_modules ./node_modules -COPY --from=builder --chown=lecoffreuser leCoffre-front/.next ./.next -COPY --from=builder --chown=lecoffreuser leCoffre-front/package.json ./package.json - -USER lecoffreuser - -CMD ["npm", "run", "start"] -EXPOSE 3000 \ No newline at end of file diff --git a/next.config.js b/next.config.js index 748bd806..f22a82d2 100644 --- a/next.config.js +++ b/next.config.js @@ -2,6 +2,9 @@ const nextConfig = { reactStrictMode: false, + typescript: { + ignoreBuildErrors: true, + }, publicRuntimeConfig: { // Will be available on both server and client NEXT_PUBLIC_BACK_API_PROTOCOL: process.env.NEXT_PUBLIC_BACK_API_PROTOCOL, @@ -17,6 +20,7 @@ const nextConfig = { NEXT_PUBLIC_HOTJAR_SITE_ID: process.env.NEXT_PUBLIC_HOTJAR_SITE_ID, NEXT_PUBLIC_HOTJAR_VERSION: process.env.NEXT_PUBLIC_HOTJAR_VERSION, NEXT_PUBLIC_4NK_URL: process.env.NEXT_PUBLIC_4NK_URL, + NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL, }, serverRuntimeConfig: { @@ -33,6 +37,7 @@ const nextConfig = { NEXT_PUBLIC_HOTJAR_SITE_ID: process.env.NEXT_PUBLIC_HOTJAR_SITE_ID, NEXT_PUBLIC_HOTJAR_VERSION: process.env.NEXT_PUBLIC_HOTJAR_VERSION, NEXT_PUBLIC_4NK_URL: process.env.NEXT_PUBLIC_4NK_URL, + NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL, }, env: { @@ -49,6 +54,7 @@ const nextConfig = { NEXT_PUBLIC_HOTJAR_SITE_ID: process.env.NEXT_PUBLIC_HOTJAR_SITE_ID, NEXT_PUBLIC_HOTJAR_VERSION: process.env.NEXT_PUBLIC_HOTJAR_VERSION, NEXT_PUBLIC_4NK_URL: process.env.NEXT_PUBLIC_4NK_URL, + NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL, }, // webpack: config => { diff --git a/package-lock.json b/package-lock.json index b4b13387..877cff24 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5772 +1,5805 @@ { - "name": "lecoffre-front", - "version": "0.1.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "lecoffre-front", - "version": "0.1.0", - "dependencies": { - "@emotion/react": "^11.10.6", - "@emotion/styled": "^11.10.6", - "@heroicons/react": "^2.1.3", - "@mui/material": "^5.11.13", - "@next/third-parties": "^14.2.3", - "@types/node": "18.15.1", - "@types/react": "18.0.28", - "@types/react-dom": "18.0.11", - "@uidotdev/usehooks": "^2.4.1", - "class-validator": "^0.14.0", - "classnames": "^2.3.2", - "crypto-random-string": "^5.0.0", - "dotenv": "^16.0.3", - "eslint": "8.36.0", - "eslint-config-next": "13.2.4", - "file-saver": "^2.0.5", - "form-data": "^4.0.0", - "heroicons": "^2.1.5", - "jszip": "^3.10.1", - "jwt-decode": "^3.1.2", - "le-coffre-resources": "file:../lecoffre-ressources", - "next": "^14.2.3", - "prettier": "^2.8.7", - "react": "18.2.0", - "react-dom": "18.2.0", - "react-gtm-module": "^2.0.11", - "react-hotjar": "^6.3.1", - "react-select": "^5.7.2", - "react-toastify": "^9.1.3", - "sass": "^1.59.2", - "sharp": "^0.32.1", - "typescript": "4.9.5", - "uuidv4": "^6.2.13" - }, - "devDependencies": { - "@types/file-saver": "^2.0.7", - "@types/react-gtm-module": "^2.0.3" - } - }, - "../lecoffre-ressources": { - "name": "le-coffre-resources", - "license": "MIT", - "dependencies": { - "class-transformer": "^0.5.1", - "class-validator": "^0.14.0", - "reflect-metadata": "^0.1.13" - }, - "devDependencies": { - "@types/node": "^18.16.1", - "@types/reflect-metadata": "^0.1.0", - "prettier": "^2.7.1", - "tslint": "^6.1.2", - "typescript": "~4.6.0" - } - }, - "../lecoffre-ressources/node_modules/@babel/code-frame": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.24.7", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../lecoffre-ressources/node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "../lecoffre-ressources/node_modules/@babel/highlight": { - "version": "7.24.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "../lecoffre-ressources/node_modules/@types/node": { - "version": "18.19.50", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "../lecoffre-ressources/node_modules/@types/reflect-metadata": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "reflect-metadata": "*" - } - }, - "../lecoffre-ressources/node_modules/@types/validator": { - "version": "13.12.2", - "license": "MIT" - }, - "../lecoffre-ressources/node_modules/ansi-styles": { - "version": "3.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "../lecoffre-ressources/node_modules/argparse": { - "version": "1.0.10", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "../lecoffre-ressources/node_modules/balanced-match": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "../lecoffre-ressources/node_modules/brace-expansion": { - "version": "1.1.11", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "../lecoffre-ressources/node_modules/builtin-modules": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../lecoffre-ressources/node_modules/chalk": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "../lecoffre-ressources/node_modules/class-transformer": { - "version": "0.5.1", - "license": "MIT" - }, - "../lecoffre-ressources/node_modules/class-validator": { - "version": "0.14.1", - "license": "MIT", - "dependencies": { - "@types/validator": "^13.11.8", - "libphonenumber-js": "^1.10.53", - "validator": "^13.9.0" - } - }, - "../lecoffre-ressources/node_modules/color-convert": { - "version": "1.9.3", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "1.1.3" - } - }, - "../lecoffre-ressources/node_modules/color-name": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, - "../lecoffre-ressources/node_modules/commander": { - "version": "2.20.3", - "dev": true, - "license": "MIT" - }, - "../lecoffre-ressources/node_modules/concat-map": { - "version": "0.0.1", - "dev": true, - "license": "MIT" - }, - "../lecoffre-ressources/node_modules/diff": { - "version": "4.0.2", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "../lecoffre-ressources/node_modules/escape-string-regexp": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.0" - } - }, - "../lecoffre-ressources/node_modules/esprima": { - "version": "4.0.1", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "../lecoffre-ressources/node_modules/fs.realpath": { - "version": "1.0.0", - "dev": true, - "license": "ISC" - }, - "../lecoffre-ressources/node_modules/function-bind": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../lecoffre-ressources/node_modules/glob": { - "version": "7.2.3", - "dev": true, - "license": "ISC", - "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" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "../lecoffre-ressources/node_modules/has-flag": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "../lecoffre-ressources/node_modules/hasown": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "../lecoffre-ressources/node_modules/inflight": { - "version": "1.0.6", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "../lecoffre-ressources/node_modules/inherits": { - "version": "2.0.4", - "dev": true, - "license": "ISC" - }, - "../lecoffre-ressources/node_modules/is-core-module": { - "version": "2.15.1", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../lecoffre-ressources/node_modules/js-tokens": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, - "../lecoffre-ressources/node_modules/js-yaml": { - "version": "3.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "../lecoffre-ressources/node_modules/libphonenumber-js": { - "version": "1.11.8", - "license": "MIT" - }, - "../lecoffre-ressources/node_modules/minimatch": { - "version": "3.1.2", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "../lecoffre-ressources/node_modules/minimist": { - "version": "1.2.8", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../lecoffre-ressources/node_modules/mkdirp": { - "version": "0.5.6", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "../lecoffre-ressources/node_modules/once": { - "version": "1.4.0", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "../lecoffre-ressources/node_modules/path-is-absolute": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "../lecoffre-ressources/node_modules/path-parse": { - "version": "1.0.7", - "dev": true, - "license": "MIT" - }, - "../lecoffre-ressources/node_modules/picocolors": { - "version": "1.1.0", - "dev": true, - "license": "ISC" - }, - "../lecoffre-ressources/node_modules/prettier": { - "version": "2.8.8", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "../lecoffre-ressources/node_modules/reflect-metadata": { - "version": "0.1.14", - "license": "Apache-2.0" - }, - "../lecoffre-ressources/node_modules/resolve": { - "version": "1.22.8", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../lecoffre-ressources/node_modules/semver": { - "version": "5.7.2", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "../lecoffre-ressources/node_modules/sprintf-js": { - "version": "1.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, - "../lecoffre-ressources/node_modules/supports-color": { - "version": "5.5.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "../lecoffre-ressources/node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "../lecoffre-ressources/node_modules/tslib": { - "version": "1.14.1", - "dev": true, - "license": "0BSD" - }, - "../lecoffre-ressources/node_modules/tslint": { - "version": "6.1.3", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^4.0.1", - "glob": "^7.1.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.3", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.13.0", - "tsutils": "^2.29.0" - }, - "bin": { - "tslint": "bin/tslint" - }, - "engines": { - "node": ">=4.8.0" - }, - "peerDependencies": { - "typescript": ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" - } - }, - "../lecoffre-ressources/node_modules/tsutils": { - "version": "2.29.0", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^1.8.1" - }, - "peerDependencies": { - "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" - } - }, - "../lecoffre-ressources/node_modules/typescript": { - "version": "4.6.4", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "../lecoffre-ressources/node_modules/undici-types": { - "version": "5.26.5", - "dev": true, - "license": "MIT" - }, - "../lecoffre-ressources/node_modules/validator": { - "version": "13.12.0", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "../lecoffre-ressources/node_modules/wrappy": { - "version": "1.0.2", - "dev": true, - "license": "ISC" - }, - "node_modules/@babel/code-frame": { - "version": "7.27.1", - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.27.1", - "js-tokens": "^4.0.0", - "picocolors": "^1.1.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/generator": { - "version": "7.27.3", - "license": "MIT", - "dependencies": { - "@babel/parser": "^7.27.3", - "@babel/types": "^7.27.3", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", - "jsesc": "^3.0.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.27.1", - "license": "MIT", - "dependencies": { - "@babel/traverse": "^7.27.1", - "@babel/types": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.27.1", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.27.1", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.27.4", - "license": "MIT", - "dependencies": { - "@babel/types": "^7.27.3" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/runtime": { - "version": "7.27.4", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template": { - "version": "7.27.2", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/parser": "^7.27.2", - "@babel/types": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.27.4", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.27.3", - "@babel/parser": "^7.27.4", - "@babel/template": "^7.27.2", - "@babel/types": "^7.27.3", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.27.3", - "license": "MIT", - "dependencies": { - "@babel/helper-string-parser": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@emotion/babel-plugin": { - "version": "11.13.5", - "license": "MIT", - "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" - } - }, - "node_modules/@emotion/cache": { - "version": "11.14.0", - "license": "MIT", - "dependencies": { - "@emotion/memoize": "^0.9.0", - "@emotion/sheet": "^1.4.0", - "@emotion/utils": "^1.4.2", - "@emotion/weak-memoize": "^0.4.0", - "stylis": "4.2.0" - } - }, - "node_modules/@emotion/hash": { - "version": "0.9.2", - "license": "MIT" - }, - "node_modules/@emotion/is-prop-valid": { - "version": "1.3.1", - "license": "MIT", - "dependencies": { - "@emotion/memoize": "^0.9.0" - } - }, - "node_modules/@emotion/memoize": { - "version": "0.9.0", - "license": "MIT" - }, - "node_modules/@emotion/react": { - "version": "11.14.0", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.18.3", - "@emotion/babel-plugin": "^11.13.5", - "@emotion/cache": "^11.14.0", - "@emotion/serialize": "^1.3.3", - "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0", - "@emotion/utils": "^1.4.2", - "@emotion/weak-memoize": "^0.4.0", - "hoist-non-react-statics": "^3.3.1" - }, - "peerDependencies": { - "react": ">=16.8.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@emotion/serialize": { - "version": "1.3.3", - "license": "MIT", - "dependencies": { - "@emotion/hash": "^0.9.2", - "@emotion/memoize": "^0.9.0", - "@emotion/unitless": "^0.10.0", - "@emotion/utils": "^1.4.2", - "csstype": "^3.0.2" - } - }, - "node_modules/@emotion/sheet": { - "version": "1.4.0", - "license": "MIT" - }, - "node_modules/@emotion/styled": { - "version": "11.14.0", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.18.3", - "@emotion/babel-plugin": "^11.13.5", - "@emotion/is-prop-valid": "^1.3.0", - "@emotion/serialize": "^1.3.3", - "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0", - "@emotion/utils": "^1.4.2" - }, - "peerDependencies": { - "@emotion/react": "^11.0.0-rc.0", - "react": ">=16.8.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@emotion/unitless": { - "version": "0.10.0", - "license": "MIT" - }, - "node_modules/@emotion/use-insertion-effect-with-fallbacks": { - "version": "1.2.0", - "license": "MIT", - "peerDependencies": { - "react": ">=16.8.0" - } - }, - "node_modules/@emotion/utils": { - "version": "1.4.2", - "license": "MIT" - }, - "node_modules/@emotion/weak-memoize": { - "version": "0.4.0", - "license": "MIT" - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.7.0", - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.24.0", - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/eslintrc/node_modules/type-fest": { - "version": "0.20.2", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/js": { - "version": "8.36.0", - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@floating-ui/core": { - "version": "1.7.1", - "license": "MIT", - "dependencies": { - "@floating-ui/utils": "^0.2.9" - } - }, - "node_modules/@floating-ui/dom": { - "version": "1.7.1", - "license": "MIT", - "dependencies": { - "@floating-ui/core": "^1.7.1", - "@floating-ui/utils": "^0.2.9" - } - }, - "node_modules/@floating-ui/utils": { - "version": "0.2.9", - "license": "MIT" - }, - "node_modules/@heroicons/react": { - "version": "2.2.0", - "license": "MIT", - "peerDependencies": { - "react": ">= 16 || ^19.0.0-rc" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "license": "Apache-2.0", - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "license": "BSD-3-Clause" - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@mui/core-downloads-tracker": { - "version": "5.17.1", - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - } - }, - "node_modules/@mui/material": { - "version": "5.17.1", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.23.9", - "@mui/core-downloads-tracker": "^5.17.1", - "@mui/system": "^5.17.1", - "@mui/types": "~7.2.15", - "@mui/utils": "^5.17.1", - "@popperjs/core": "^2.11.8", - "@types/react-transition-group": "^4.4.10", - "clsx": "^2.1.0", - "csstype": "^3.1.3", - "prop-types": "^15.8.1", - "react-is": "^19.0.0", - "react-transition-group": "^4.4.5" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@emotion/react": "^11.5.0", - "@emotion/styled": "^11.3.0", - "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", - "react": "^17.0.0 || ^18.0.0 || ^19.0.0", - "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@emotion/react": { - "optional": true - }, - "@emotion/styled": { - "optional": true - }, - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/private-theming": { - "version": "5.17.1", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.23.9", - "@mui/utils": "^5.17.1", - "prop-types": "^15.8.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", - "react": "^17.0.0 || ^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/styled-engine": { - "version": "5.16.14", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.23.9", - "@emotion/cache": "^11.13.5", - "csstype": "^3.1.3", - "prop-types": "^15.8.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@emotion/react": "^11.4.1", - "@emotion/styled": "^11.3.0", - "react": "^17.0.0 || ^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@emotion/react": { - "optional": true - }, - "@emotion/styled": { - "optional": true - } - } - }, - "node_modules/@mui/system": { - "version": "5.17.1", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.23.9", - "@mui/private-theming": "^5.17.1", - "@mui/styled-engine": "^5.16.14", - "@mui/types": "~7.2.15", - "@mui/utils": "^5.17.1", - "clsx": "^2.1.0", - "csstype": "^3.1.3", - "prop-types": "^15.8.1" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@emotion/react": "^11.5.0", - "@emotion/styled": "^11.3.0", - "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", - "react": "^17.0.0 || ^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@emotion/react": { - "optional": true - }, - "@emotion/styled": { - "optional": true - }, - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/types": { - "version": "7.2.24", - "license": "MIT", - "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/utils": { - "version": "5.17.1", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.23.9", - "@mui/types": "~7.2.15", - "@types/prop-types": "^15.7.12", - "clsx": "^2.1.1", - "prop-types": "^15.8.1", - "react-is": "^19.0.0" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", - "react": "^17.0.0 || ^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@next/env": { - "version": "14.2.29", - "license": "MIT" - }, - "node_modules/@next/eslint-plugin-next": { - "version": "13.2.4", - "license": "MIT", - "dependencies": { - "glob": "7.1.7" - } - }, - "node_modules/@next/swc-win32-x64-msvc": { - "version": "14.2.29", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/third-parties": { - "version": "14.2.29", - "license": "MIT", - "dependencies": { - "third-party-capital": "1.0.20" - }, - "peerDependencies": { - "next": "^13.0.0 || ^14.0.0", - "react": "^18.2.0" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nolyfill/is-core-module": { - "version": "1.0.39", - "license": "MIT", - "engines": { - "node": ">=12.4.0" - } - }, - "node_modules/@parcel/watcher": { - "version": "2.5.1", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "dependencies": { - "detect-libc": "^1.0.3", - "is-glob": "^4.0.3", - "micromatch": "^4.0.5", - "node-addon-api": "^7.0.0" - }, - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "@parcel/watcher-android-arm64": "2.5.1", - "@parcel/watcher-darwin-arm64": "2.5.1", - "@parcel/watcher-darwin-x64": "2.5.1", - "@parcel/watcher-freebsd-x64": "2.5.1", - "@parcel/watcher-linux-arm-glibc": "2.5.1", - "@parcel/watcher-linux-arm-musl": "2.5.1", - "@parcel/watcher-linux-arm64-glibc": "2.5.1", - "@parcel/watcher-linux-arm64-musl": "2.5.1", - "@parcel/watcher-linux-x64-glibc": "2.5.1", - "@parcel/watcher-linux-x64-musl": "2.5.1", - "@parcel/watcher-win32-arm64": "2.5.1", - "@parcel/watcher-win32-ia32": "2.5.1", - "@parcel/watcher-win32-x64": "2.5.1" - } - }, - "node_modules/@parcel/watcher-win32-x64": { - "version": "2.5.1", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@popperjs/core": { - "version": "2.11.8", - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/popperjs" - } - }, - "node_modules/@rtsao/scc": { - "version": "1.1.0", - "license": "MIT" - }, - "node_modules/@rushstack/eslint-patch": { - "version": "1.11.0", - "license": "MIT" - }, - "node_modules/@swc/counter": { - "version": "0.1.3", - "license": "Apache-2.0" - }, - "node_modules/@swc/helpers": { - "version": "0.5.5", - "license": "Apache-2.0", - "dependencies": { - "@swc/counter": "^0.1.3", - "tslib": "^2.4.0" - } - }, - "node_modules/@types/file-saver": { - "version": "2.0.7", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json5": { - "version": "0.0.29", - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "18.15.1", - "license": "MIT" - }, - "node_modules/@types/parse-json": { - "version": "4.0.2", - "license": "MIT" - }, - "node_modules/@types/prop-types": { - "version": "15.7.14", - "license": "MIT" - }, - "node_modules/@types/react": { - "version": "18.0.28", - "license": "MIT", - "dependencies": { - "@types/prop-types": "*", - "@types/scheduler": "*", - "csstype": "^3.0.2" - } - }, - "node_modules/@types/react-dom": { - "version": "18.0.11", - "license": "MIT", - "dependencies": { - "@types/react": "*" - } - }, - "node_modules/@types/react-gtm-module": { - "version": "2.0.4", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/react-transition-group": { - "version": "4.4.12", - "license": "MIT", - "peerDependencies": { - "@types/react": "*" - } - }, - "node_modules/@types/scheduler": { - "version": "0.26.0", - "license": "MIT" - }, - "node_modules/@types/uuid": { - "version": "8.3.4", - "license": "MIT" - }, - "node_modules/@types/validator": { - "version": "13.15.1", - "license": "MIT" - }, - "node_modules/@typescript-eslint/parser": { - "version": "5.62.0", - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "5.62.0", - "license": "MIT", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@uidotdev/usehooks": { - "version": "2.4.1", - "license": "MIT", - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "react": ">=18.0.0", - "react-dom": ">=18.0.0" - } - }, - "node_modules/@unrs/resolver-binding-win32-x64-msvc": { - "version": "1.7.8", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/acorn": { - "version": "8.14.1", - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "license": "Python-2.0" - }, - "node_modules/aria-query": { - "version": "5.3.2", - "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "is-array-buffer": "^3.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-includes": { - "version": "3.1.9", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.24.0", - "es-object-atoms": "^1.1.1", - "get-intrinsic": "^1.3.0", - "is-string": "^1.1.1", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-union": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/array.prototype.findlast": { - "version": "1.2.5", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.findlastindex": { - "version": "1.2.6", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "es-shim-unscopables": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flat": { - "version": "1.3.3", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.3", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.tosorted": { - "version": "1.1.4", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3", - "es-errors": "^1.3.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "is-array-buffer": "^3.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/ast-types-flow": { - "version": "0.0.8", - "license": "MIT" - }, - "node_modules/async-function": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "license": "MIT" - }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "license": "MIT", - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/axe-core": { - "version": "4.10.3", - "license": "MPL-2.0", - "engines": { - "node": ">=4" - } - }, - "node_modules/axobject-query": { - "version": "4.1.0", - "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/b4a": { - "version": "1.6.7", - "license": "Apache-2.0" - }, - "node_modules/babel-plugin-macros": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.12.5", - "cosmiconfig": "^7.0.0", - "resolve": "^1.19.0" - }, - "engines": { - "node": ">=10", - "npm": ">=6" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "license": "MIT" - }, - "node_modules/bare-events": { - "version": "2.5.4", - "license": "Apache-2.0", - "optional": true - }, - "node_modules/bare-fs": { - "version": "4.1.5", - "license": "Apache-2.0", - "optional": true, - "dependencies": { - "bare-events": "^2.5.4", - "bare-path": "^3.0.0", - "bare-stream": "^2.6.4" - }, - "engines": { - "bare": ">=1.16.0" - }, - "peerDependencies": { - "bare-buffer": "*" - }, - "peerDependenciesMeta": { - "bare-buffer": { - "optional": true - } - } - }, - "node_modules/bare-os": { - "version": "3.6.1", - "license": "Apache-2.0", - "optional": true, - "engines": { - "bare": ">=1.14.0" - } - }, - "node_modules/bare-path": { - "version": "3.0.0", - "license": "Apache-2.0", - "optional": true, - "dependencies": { - "bare-os": "^3.0.1" - } - }, - "node_modules/bare-stream": { - "version": "2.6.5", - "license": "Apache-2.0", - "optional": true, - "dependencies": { - "streamx": "^2.21.0" - }, - "peerDependencies": { - "bare-buffer": "*", - "bare-events": "*" - }, - "peerDependenciesMeta": { - "bare-buffer": { - "optional": true - }, - "bare-events": { - "optional": true - } - } - }, - "node_modules/base64-js": { - "version": "1.5.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/bl": { - "version": "4.1.0", - "license": "MIT", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/bl/node_modules/readable-stream": { - "version": "3.6.2", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/buffer": { - "version": "5.7.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/busboy": { - "version": "1.6.0", - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, - "node_modules/call-bind": { - "version": "1.0.8", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.0", - "es-define-property": "^1.0.0", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/call-bound": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001720", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/chalk": { - "version": "4.1.2", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chokidar": { - "version": "4.0.3", - "license": "MIT", - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/chownr": { - "version": "1.1.4", - "license": "ISC" - }, - "node_modules/class-validator": { - "version": "0.14.2", - "license": "MIT", - "dependencies": { - "@types/validator": "^13.11.8", - "libphonenumber-js": "^1.11.1", - "validator": "^13.9.0" - } - }, - "node_modules/classnames": { - "version": "2.5.1", - "license": "MIT" - }, - "node_modules/client-only": { - "version": "0.0.1", - "license": "MIT" - }, - "node_modules/clsx": { - "version": "2.1.1", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/color": { - "version": "4.2.3", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1", - "color-string": "^1.9.0" - }, - "engines": { - "node": ">=12.5.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "license": "MIT" - }, - "node_modules/color-string": { - "version": "1.9.1", - "license": "MIT", - "dependencies": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "license": "MIT" - }, - "node_modules/convert-source-map": { - "version": "1.9.0", - "license": "MIT" - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "license": "MIT" - }, - "node_modules/cosmiconfig": { - "version": "7.1.0", - "license": "MIT", - "dependencies": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/crypto-random-string": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "type-fest": "^2.12.2" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/csstype": { - "version": "3.1.3", - "license": "MIT" - }, - "node_modules/damerau-levenshtein": { - "version": "1.0.8", - "license": "BSD-2-Clause" - }, - "node_modules/data-view-buffer": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/data-view-byte-length": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/inspect-js" - } - }, - "node_modules/data-view-byte-offset": { - "version": "1.0.1", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/debug": { - "version": "4.4.1", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decompress-response": { - "version": "6.0.0", - "license": "MIT", - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "license": "MIT", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "license": "MIT" - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/define-properties": { - "version": "1.2.1", - "license": "MIT", - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/detect-libc": { - "version": "1.0.3", - "license": "Apache-2.0", - "optional": true, - "bin": { - "detect-libc": "bin/detect-libc.js" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/dom-helpers": { - "version": "5.2.1", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.8.7", - "csstype": "^3.0.2" - } - }, - "node_modules/dotenv": { - "version": "16.5.0", - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/emoji-regex": { - "version": "9.2.2", - "license": "MIT" - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "license": "MIT", - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/error-ex": { - "version": "1.3.2", - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es-abstract": { - "version": "1.24.0", - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.2", - "arraybuffer.prototype.slice": "^1.0.4", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "data-view-buffer": "^1.0.2", - "data-view-byte-length": "^1.0.2", - "data-view-byte-offset": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "es-set-tostringtag": "^2.1.0", - "es-to-primitive": "^1.3.0", - "function.prototype.name": "^1.1.8", - "get-intrinsic": "^1.3.0", - "get-proto": "^1.0.1", - "get-symbol-description": "^1.1.0", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "internal-slot": "^1.1.0", - "is-array-buffer": "^3.0.5", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.2", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.2.1", - "is-set": "^2.0.3", - "is-shared-array-buffer": "^1.0.4", - "is-string": "^1.1.1", - "is-typed-array": "^1.1.15", - "is-weakref": "^1.1.1", - "math-intrinsics": "^1.1.0", - "object-inspect": "^1.13.4", - "object-keys": "^1.1.1", - "object.assign": "^4.1.7", - "own-keys": "^1.0.1", - "regexp.prototype.flags": "^1.5.4", - "safe-array-concat": "^1.1.3", - "safe-push-apply": "^1.0.0", - "safe-regex-test": "^1.1.0", - "set-proto": "^1.0.0", - "stop-iteration-iterator": "^1.1.0", - "string.prototype.trim": "^1.2.10", - "string.prototype.trimend": "^1.0.9", - "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.3", - "typed-array-byte-length": "^1.0.3", - "typed-array-byte-offset": "^1.0.4", - "typed-array-length": "^1.0.7", - "unbox-primitive": "^1.1.0", - "which-typed-array": "^1.1.19" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-define-property": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-iterator-helpers": { - "version": "1.2.1", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.6", - "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.3", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.6", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "internal-slot": "^1.1.0", - "iterator.prototype": "^1.1.4", - "safe-array-concat": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-object-atoms": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.1.0", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-shim-unscopables": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-to-primitive": { - "version": "1.3.0", - "license": "MIT", - "dependencies": { - "is-callable": "^1.2.7", - "is-date-object": "^1.0.5", - "is-symbol": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "8.36.0", - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.1", - "@eslint/js": "8.36.0", - "@humanwhocodes/config-array": "^0.11.8", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.5.0", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-config-next": { - "version": "13.2.4", - "license": "MIT", - "dependencies": { - "@next/eslint-plugin-next": "13.2.4", - "@rushstack/eslint-patch": "^1.1.3", - "@typescript-eslint/parser": "^5.42.0", - "eslint-import-resolver-node": "^0.3.6", - "eslint-import-resolver-typescript": "^3.5.2", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-react": "^7.31.7", - "eslint-plugin-react-hooks": "^4.5.0" - }, - "peerDependencies": { - "eslint": "^7.23.0 || ^8.0.0", - "typescript": ">=3.3.1" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/eslint-config-next/node_modules/eslint-import-resolver-typescript": { - "version": "3.10.1", - "license": "ISC", - "dependencies": { - "@nolyfill/is-core-module": "1.0.39", - "debug": "^4.4.0", - "get-tsconfig": "^4.10.0", - "is-bun-module": "^2.0.0", - "stable-hash": "^0.0.5", - "tinyglobby": "^0.2.13", - "unrs-resolver": "^1.6.2" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint-import-resolver-typescript" - }, - "peerDependencies": { - "eslint": "*", - "eslint-plugin-import": "*", - "eslint-plugin-import-x": "*" - }, - "peerDependenciesMeta": { - "eslint-plugin-import": { - "optional": true - }, - "eslint-plugin-import-x": { - "optional": true - } - } - }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.9", - "license": "MIT", - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-module-utils": { - "version": "2.12.0", - "license": "MIT", - "dependencies": { - "debug": "^3.2.7" - }, - "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import": { - "version": "2.31.0", - "license": "MIT", - "dependencies": { - "@rtsao/scc": "^1.1.0", - "array-includes": "^3.1.8", - "array.prototype.findlastindex": "^1.2.5", - "array.prototype.flat": "^1.3.2", - "array.prototype.flatmap": "^1.3.2", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.12.0", - "hasown": "^2.0.2", - "is-core-module": "^2.15.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "object.groupby": "^1.0.3", - "object.values": "^1.2.0", - "semver": "^6.3.1", - "string.prototype.trimend": "^1.0.8", - "tsconfig-paths": "^3.15.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" - } - }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-import/node_modules/semver": { - "version": "6.3.1", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-plugin-jsx-a11y": { - "version": "6.10.2", - "license": "MIT", - "dependencies": { - "aria-query": "^5.3.2", - "array-includes": "^3.1.8", - "array.prototype.flatmap": "^1.3.2", - "ast-types-flow": "^0.0.8", - "axe-core": "^4.10.0", - "axobject-query": "^4.1.0", - "damerau-levenshtein": "^1.0.8", - "emoji-regex": "^9.2.2", - "hasown": "^2.0.2", - "jsx-ast-utils": "^3.3.5", - "language-tags": "^1.0.9", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "safe-regex-test": "^1.0.3", - "string.prototype.includes": "^2.0.1" - }, - "engines": { - "node": ">=4.0" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9" - } - }, - "node_modules/eslint-plugin-react": { - "version": "7.37.5", - "license": "MIT", - "dependencies": { - "array-includes": "^3.1.8", - "array.prototype.findlast": "^1.2.5", - "array.prototype.flatmap": "^1.3.3", - "array.prototype.tosorted": "^1.1.4", - "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.2.1", - "estraverse": "^5.3.0", - "hasown": "^2.0.2", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.1.2", - "object.entries": "^1.1.9", - "object.fromentries": "^2.0.8", - "object.values": "^1.2.1", - "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.5", - "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.12", - "string.prototype.repeat": "^1.0.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" - } - }, - "node_modules/eslint-plugin-react-hooks": { - "version": "4.6.2", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" - } - }, - "node_modules/eslint-plugin-react/node_modules/doctrine": { - "version": "2.1.0", - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-react/node_modules/resolve": { - "version": "2.0.0-next.5", - "license": "MIT", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/eslint-plugin-react/node_modules/semver": { - "version": "6.3.1", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-scope": { - "version": "7.2.2", - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/globals": { - "version": "13.24.0", - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/type-fest": { - "version": "0.20.2", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.6.0", - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-template": { - "version": "2.0.3", - "license": "(MIT OR WTFPL)", - "engines": { - "node": ">=6" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "license": "MIT" - }, - "node_modules/fast-fifo": { - "version": "1.3.2", - "license": "MIT" - }, - "node_modules/fast-glob": { - "version": "3.3.3", - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "license": "MIT" - }, - "node_modules/fastq": { - "version": "1.19.1", - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/file-saver": { - "version": "2.0.5", - "license": "MIT" - }, - "node_modules/fill-range": { - "version": "7.1.1", - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-root": { - "version": "1.1.0", - "license": "MIT" - }, - "node_modules/find-up": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "3.2.0", - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.3.3", - "license": "ISC" - }, - "node_modules/for-each": { - "version": "0.3.5", - "license": "MIT", - "dependencies": { - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/form-data": { - "version": "4.0.2", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fs-constants": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "license": "ISC" - }, - "node_modules/function-bind": { - "version": "1.1.2", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/function.prototype.name": { - "version": "1.1.8", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "functions-have-names": "^1.2.3", - "hasown": "^2.0.2", - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-intrinsic": { - "version": "1.3.0", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/get-symbol-description": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-tsconfig": { - "version": "4.10.1", - "license": "MIT", - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, - "node_modules/github-from-package": { - "version": "0.0.0", - "license": "MIT" - }, - "node_modules/glob": { - "version": "7.1.7", - "license": "ISC", - "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" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "11.12.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/globalthis": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "license": "MIT", - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/gopd": { - "version": "1.2.0", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "license": "ISC" - }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "license": "MIT" - }, - "node_modules/has-bigints": { - "version": "1.1.0", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.2.0", - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/heroicons": { - "version": "2.2.0", - "license": "MIT" - }, - "node_modules/hoist-non-react-statics": { - "version": "3.3.2", - "license": "BSD-3-Clause", - "dependencies": { - "react-is": "^16.7.0" - } - }, - "node_modules/hoist-non-react-statics/node_modules/react-is": { - "version": "16.13.1", - "license": "MIT" - }, - "node_modules/ieee754": { - "version": "1.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/ignore": { - "version": "5.3.2", - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/immediate": { - "version": "3.0.6", - "license": "MIT" - }, - "node_modules/immutable": { - "version": "5.1.2", - "license": "MIT" - }, - "node_modules/import-fresh": { - "version": "3.3.1", - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "license": "ISC" - }, - "node_modules/ini": { - "version": "1.3.8", - "license": "ISC" - }, - "node_modules/internal-slot": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.2", - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-array-buffer": { - "version": "3.0.5", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "license": "MIT" - }, - "node_modules/is-async-function": { - "version": "2.1.1", - "license": "MIT", - "dependencies": { - "async-function": "^1.0.0", - "call-bound": "^1.0.3", - "get-proto": "^1.0.1", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bigint": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "has-bigints": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-boolean-object": { - "version": "1.2.2", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bun-module": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "semver": "^7.7.1" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-core-module": { - "version": "2.16.1", - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-data-view": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-finalizationregistry": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-generator-function": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "get-proto": "^1.0.0", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-map": { - "version": "2.0.3", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-negative-zero": { - "version": "2.0.3", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-number-object": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-regex": { - "version": "1.2.1", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-set": { - "version": "2.0.3", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-string": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "has-symbols": "^1.1.0", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.15", - "license": "MIT", - "dependencies": { - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakmap": { - "version": "2.0.2", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakref": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakset": { - "version": "2.0.4", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/isarray": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/isexe": { - "version": "2.0.0", - "license": "ISC" - }, - "node_modules/iterator.prototype": { - "version": "1.1.5", - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.6", - "get-proto": "^1.0.0", - "has-symbols": "^1.1.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/js-sdsl": { - "version": "4.4.2", - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsesc": { - "version": "3.1.0", - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "license": "MIT" - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "license": "MIT" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "license": "MIT" - }, - "node_modules/json5": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/jsx-ast-utils": { - "version": "3.3.5", - "license": "MIT", - "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "object.assign": "^4.1.4", - "object.values": "^1.1.6" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/jszip": { - "version": "3.10.1", - "license": "(MIT OR GPL-3.0-or-later)", - "dependencies": { - "lie": "~3.3.0", - "pako": "~1.0.2", - "readable-stream": "~2.3.6", - "setimmediate": "^1.0.5" - } - }, - "node_modules/jwt-decode": { - "version": "3.1.2", - "license": "MIT" - }, - "node_modules/keyv": { - "version": "4.5.4", - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/language-subtag-registry": { - "version": "0.3.23", - "license": "CC0-1.0" - }, - "node_modules/language-tags": { - "version": "1.0.9", - "license": "MIT", - "dependencies": { - "language-subtag-registry": "^0.3.20" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/le-coffre-resources": { - "resolved": "../lecoffre-ressources", - "link": true - }, - "node_modules/levn": { - "version": "0.4.1", - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/libphonenumber-js": { - "version": "1.12.8", - "license": "MIT" - }, - "node_modules/lie": { - "version": "3.3.0", - "license": "MIT", - "dependencies": { - "immediate": "~3.0.5" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "license": "MIT" - }, - "node_modules/locate-path": { - "version": "6.0.0", - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "license": "MIT" - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "license": "MIT", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/memoize-one": { - "version": "6.0.0", - "license": "MIT" - }, - "node_modules/merge2": { - "version": "1.4.1", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-response": { - "version": "3.1.0", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "license": "MIT" - }, - "node_modules/ms": { - "version": "2.1.3", - "license": "MIT" - }, - "node_modules/nanoid": { - "version": "3.3.11", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/napi-build-utils": { - "version": "2.0.0", - "license": "MIT" - }, - "node_modules/napi-postinstall": { - "version": "0.2.4", - "license": "MIT", - "bin": { - "napi-postinstall": "lib/cli.js" - }, - "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/napi-postinstall" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "license": "MIT" - }, - "node_modules/next": { - "version": "14.2.29", - "license": "MIT", - "dependencies": { - "@next/env": "14.2.29", - "@swc/helpers": "0.5.5", - "busboy": "1.6.0", - "caniuse-lite": "^1.0.30001579", - "graceful-fs": "^4.2.11", - "postcss": "8.4.31", - "styled-jsx": "5.1.1" - }, - "bin": { - "next": "dist/bin/next" - }, - "engines": { - "node": ">=18.17.0" - }, - "optionalDependencies": { - "@next/swc-darwin-arm64": "14.2.29", - "@next/swc-darwin-x64": "14.2.29", - "@next/swc-linux-arm64-gnu": "14.2.29", - "@next/swc-linux-arm64-musl": "14.2.29", - "@next/swc-linux-x64-gnu": "14.2.29", - "@next/swc-linux-x64-musl": "14.2.29", - "@next/swc-win32-arm64-msvc": "14.2.29", - "@next/swc-win32-ia32-msvc": "14.2.29", - "@next/swc-win32-x64-msvc": "14.2.29" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.1.0", - "@playwright/test": "^1.41.2", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "sass": "^1.3.0" - }, - "peerDependenciesMeta": { - "@opentelemetry/api": { - "optional": true - }, - "@playwright/test": { - "optional": true - }, - "sass": { - "optional": true - } - } - }, - "node_modules/node-abi": { - "version": "3.75.0", - "license": "MIT", - "dependencies": { - "semver": "^7.3.5" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-addon-api": { - "version": "7.1.1", - "license": "MIT", - "optional": true - }, - "node_modules/object-assign": { - "version": "4.1.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.13.4", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.7", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0", - "has-symbols": "^1.1.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.entries": { - "version": "1.1.9", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.fromentries": { - "version": "2.0.8", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.groupby": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.values": { - "version": "1.2.1", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/once": { - "version": "1.4.0", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/optionator": { - "version": "0.9.4", - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/own-keys": { - "version": "1.0.1", - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.6", - "object-keys": "^1.1.1", - "safe-push-apply": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pako": { - "version": "1.0.11", - "license": "(MIT AND Zlib)" - }, - "node_modules/parent-module": { - "version": "1.0.1", - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "5.2.0", - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "license": "MIT" - }, - "node_modules/path-type": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/possible-typed-array-names": { - "version": "1.1.0", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/postcss": { - "version": "8.4.31", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/prebuild-install": { - "version": "7.1.3", - "license": "MIT", - "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": "^2.0.0", - "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": { - "prebuild-install": "bin.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/prebuild-install/node_modules/detect-libc": { - "version": "2.0.4", - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "node_modules/prebuild-install/node_modules/readable-stream": { - "version": "3.6.2", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/prebuild-install/node_modules/tar-fs": { - "version": "2.1.3", - "license": "MIT", - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "node_modules/prebuild-install/node_modules/tar-stream": { - "version": "2.2.0", - "license": "MIT", - "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" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "2.8.8", - "license": "MIT", - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "license": "MIT" - }, - "node_modules/prop-types": { - "version": "15.8.1", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "node_modules/prop-types/node_modules/react-is": { - "version": "16.13.1", - "license": "MIT" - }, - "node_modules/pump": { - "version": "3.0.2", - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/rc": { - "version": "1.2.8", - "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/rc/node_modules/strip-json-comments": { - "version": "2.0.1", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react": { - "version": "18.2.0", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "18.2.0", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" - }, - "peerDependencies": { - "react": "^18.2.0" - } - }, - "node_modules/react-gtm-module": { - "version": "2.0.11", - "license": "MIT" - }, - "node_modules/react-hotjar": { - "version": "6.3.1", - "license": "MIT" - }, - "node_modules/react-is": { - "version": "19.1.0", - "license": "MIT" - }, - "node_modules/react-select": { - "version": "5.10.1", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.12.0", - "@emotion/cache": "^11.4.0", - "@emotion/react": "^11.8.1", - "@floating-ui/dom": "^1.0.1", - "@types/react-transition-group": "^4.4.0", - "memoize-one": "^6.0.0", - "prop-types": "^15.6.0", - "react-transition-group": "^4.3.0", - "use-isomorphic-layout-effect": "^1.2.0" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" - } - }, - "node_modules/react-toastify": { - "version": "9.1.3", - "license": "MIT", - "dependencies": { - "clsx": "^1.1.1" - }, - "peerDependencies": { - "react": ">=16", - "react-dom": ">=16" - } - }, - "node_modules/react-toastify/node_modules/clsx": { - "version": "1.2.1", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/react-transition-group": { - "version": "4.4.5", - "license": "BSD-3-Clause", - "dependencies": { - "@babel/runtime": "^7.5.5", - "dom-helpers": "^5.0.1", - "loose-envify": "^1.4.0", - "prop-types": "^15.6.2" - }, - "peerDependencies": { - "react": ">=16.6.0", - "react-dom": ">=16.6.0" - } - }, - "node_modules/readable-stream": { - "version": "2.3.8", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/readdirp": { - "version": "4.1.2", - "license": "MIT", - "engines": { - "node": ">= 14.18.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/reflect.getprototypeof": { - "version": "1.0.10", - "license": "MIT", - "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" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.4", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve": { - "version": "1.22.10", - "license": "MIT", - "dependencies": { - "is-core-module": "^2.16.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, - "node_modules/reusify": { - "version": "1.1.0", - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-array-concat": { - "version": "1.1.3", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "has-symbols": "^1.1.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-array-concat/node_modules/isarray": { - "version": "2.0.5", - "license": "MIT" - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "license": "MIT" - }, - "node_modules/safe-push-apply": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-push-apply/node_modules/isarray": { - "version": "2.0.5", - "license": "MIT" - }, - "node_modules/safe-regex-test": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-regex": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/sass": { - "version": "1.89.1", - "license": "MIT", - "dependencies": { - "chokidar": "^4.0.0", - "immutable": "^5.0.2", - "source-map-js": ">=0.6.2 <2.0.0" - }, - "bin": { - "sass": "sass.js" - }, - "engines": { - "node": ">=14.0.0" - }, - "optionalDependencies": { - "@parcel/watcher": "^2.4.1" - } - }, - "node_modules/scheduler": { - "version": "0.23.2", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - } - }, - "node_modules/semver": { - "version": "7.7.2", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "license": "MIT", - "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" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-function-name": { - "version": "2.0.2", - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-proto": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/setimmediate": { - "version": "1.0.5", - "license": "MIT" - }, - "node_modules/sharp": { - "version": "0.32.6", - "hasInstallScript": true, - "license": "Apache-2.0", - "dependencies": { - "color": "^4.2.3", - "detect-libc": "^2.0.2", - "node-addon-api": "^6.1.0", - "prebuild-install": "^7.1.1", - "semver": "^7.5.4", - "simple-get": "^4.0.1", - "tar-fs": "^3.0.4", - "tunnel-agent": "^0.6.0" - }, - "engines": { - "node": ">=14.15.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, - "node_modules/sharp/node_modules/detect-libc": { - "version": "2.0.4", - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "node_modules/sharp/node_modules/node-addon-api": { - "version": "6.1.0", - "license": "MIT" - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/side-channel": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", - "side-channel-map": "^1.0.1", - "side-channel-weakmap": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-list": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-map": { - "version": "1.0.1", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-weakmap": { - "version": "1.0.2", - "license": "MIT", - "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" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/simple-concat": { - "version": "1.0.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/simple-get": { - "version": "4.0.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "decompress-response": "^6.0.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "node_modules/simple-swizzle": { - "version": "0.2.2", - "license": "MIT", - "dependencies": { - "is-arrayish": "^0.3.1" - } - }, - "node_modules/simple-swizzle/node_modules/is-arrayish": { - "version": "0.3.2", - "license": "MIT" - }, - "node_modules/slash": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/source-map": { - "version": "0.5.7", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stable-hash": { - "version": "0.0.5", - "license": "MIT" - }, - "node_modules/stop-iteration-iterator": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "internal-slot": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/streamsearch": { - "version": "1.1.0", - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/streamx": { - "version": "2.22.0", - "license": "MIT", - "dependencies": { - "fast-fifo": "^1.3.2", - "text-decoder": "^1.1.0" - }, - "optionalDependencies": { - "bare-events": "^2.2.0" - } - }, - "node_modules/string_decoder": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/string.prototype.includes": { - "version": "2.0.1", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/string.prototype.matchall": { - "version": "4.0.12", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.6", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.6", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "internal-slot": "^1.1.0", - "regexp.prototype.flags": "^1.5.3", - "set-function-name": "^2.0.2", - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.repeat": { - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "node_modules/string.prototype.trim": { - "version": "1.2.10", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-data-property": "^1.1.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-object-atoms": "^1.0.0", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.9", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.8", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/styled-jsx": { - "version": "5.1.1", - "license": "MIT", - "dependencies": { - "client-only": "0.0.1" - }, - "engines": { - "node": ">= 12.0.0" - }, - "peerDependencies": { - "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "babel-plugin-macros": { - "optional": true - } - } - }, - "node_modules/stylis": { - "version": "4.2.0", - "license": "MIT" - }, - "node_modules/supports-color": { - "version": "7.2.0", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tar-fs": { - "version": "3.0.9", - "license": "MIT", - "dependencies": { - "pump": "^3.0.0", - "tar-stream": "^3.1.5" - }, - "optionalDependencies": { - "bare-fs": "^4.0.1", - "bare-path": "^3.0.0" - } - }, - "node_modules/tar-stream": { - "version": "3.1.7", - "license": "MIT", - "dependencies": { - "b4a": "^1.6.4", - "fast-fifo": "^1.2.0", - "streamx": "^2.15.0" - } - }, - "node_modules/text-decoder": { - "version": "1.2.3", - "license": "Apache-2.0", - "dependencies": { - "b4a": "^1.6.4" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "license": "MIT" - }, - "node_modules/third-party-capital": { - "version": "1.0.20", - "license": "ISC" - }, - "node_modules/tinyglobby": { - "version": "0.2.14", - "license": "MIT", - "dependencies": { - "fdir": "^6.4.4", - "picomatch": "^4.0.2" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.4.5", - "license": "MIT", - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.2", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tsconfig-paths": { - "version": "3.15.0", - "license": "MIT", - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "license": "0BSD" - }, - "node_modules/tsutils": { - "version": "3.21.0", - "license": "MIT", - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "license": "0BSD" - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "license": "Apache-2.0", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/type-check": { - "version": "0.4.0", - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-fest": { - "version": "2.19.0", - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typed-array-buffer": { - "version": "1.0.3", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/typed-array-byte-length": { - "version": "1.0.3", - "license": "MIT", - "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" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.4", - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.15", - "reflect.getprototypeof": "^1.0.9" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-length": { - "version": "1.0.7", - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0", - "reflect.getprototypeof": "^1.0.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typescript": { - "version": "4.9.5", - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/unbox-primitive": { - "version": "1.1.0", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-bigints": "^1.0.2", - "has-symbols": "^1.1.0", - "which-boxed-primitive": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/unrs-resolver": { - "version": "1.7.8", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "napi-postinstall": "^0.2.2" - }, - "funding": { - "url": "https://opencollective.com/unrs-resolver" - }, - "optionalDependencies": { - "@unrs/resolver-binding-darwin-arm64": "1.7.8", - "@unrs/resolver-binding-darwin-x64": "1.7.8", - "@unrs/resolver-binding-freebsd-x64": "1.7.8", - "@unrs/resolver-binding-linux-arm-gnueabihf": "1.7.8", - "@unrs/resolver-binding-linux-arm-musleabihf": "1.7.8", - "@unrs/resolver-binding-linux-arm64-gnu": "1.7.8", - "@unrs/resolver-binding-linux-arm64-musl": "1.7.8", - "@unrs/resolver-binding-linux-ppc64-gnu": "1.7.8", - "@unrs/resolver-binding-linux-riscv64-gnu": "1.7.8", - "@unrs/resolver-binding-linux-riscv64-musl": "1.7.8", - "@unrs/resolver-binding-linux-s390x-gnu": "1.7.8", - "@unrs/resolver-binding-linux-x64-gnu": "1.7.8", - "@unrs/resolver-binding-linux-x64-musl": "1.7.8", - "@unrs/resolver-binding-wasm32-wasi": "1.7.8", - "@unrs/resolver-binding-win32-arm64-msvc": "1.7.8", - "@unrs/resolver-binding-win32-ia32-msvc": "1.7.8", - "@unrs/resolver-binding-win32-x64-msvc": "1.7.8" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/use-isomorphic-layout-effect": { - "version": "1.2.1", - "license": "MIT", - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "license": "MIT" - }, - "node_modules/uuid": { - "version": "8.3.2", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/uuidv4": { - "version": "6.2.13", - "license": "MIT", - "dependencies": { - "@types/uuid": "8.3.4", - "uuid": "8.3.2" - } - }, - "node_modules/validator": { - "version": "13.15.15", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/which": { - "version": "2.0.2", - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/which-boxed-primitive": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "is-bigint": "^1.1.0", - "is-boolean-object": "^1.2.1", - "is-number-object": "^1.1.1", - "is-string": "^1.1.1", - "is-symbol": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-builtin-type": { - "version": "1.2.1", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "function.prototype.name": "^1.1.6", - "has-tostringtag": "^1.0.2", - "is-async-function": "^2.0.0", - "is-date-object": "^1.1.0", - "is-finalizationregistry": "^1.1.0", - "is-generator-function": "^1.0.10", - "is-regex": "^1.2.1", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.1.0", - "which-collection": "^1.0.2", - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-builtin-type/node_modules/isarray": { - "version": "2.0.5", - "license": "MIT" - }, - "node_modules/which-collection": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.19", - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "for-each": "^0.3.5", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "license": "ISC" - }, - "node_modules/yaml": { - "version": "1.10.2", - "license": "ISC", - "engines": { - "node": ">= 6" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@next/swc-darwin-arm64": { - "version": "14.2.29", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.29.tgz", - "integrity": "sha512-wWtrAaxCVMejxPHFb1SK/PVV1WDIrXGs9ki0C/kUM8ubKHQm+3hU9MouUywCw8Wbhj3pewfHT2wjunLEr/TaLA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-darwin-x64": { - "version": "14.2.29", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.29.tgz", - "integrity": "sha512-7Z/jk+6EVBj4pNLw/JQrvZVrAh9Bv8q81zCFSfvTMZ51WySyEHWVpwCEaJY910LyBftv2F37kuDPQm0w9CEXyg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-gnu": { - "version": "14.2.29", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.29.tgz", - "integrity": "sha512-o6hrz5xRBwi+G7JFTHc+RUsXo2lVXEfwh4/qsuWBMQq6aut+0w98WEnoNwAwt7hkEqegzvazf81dNiwo7KjITw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-musl": { - "version": "14.2.29", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.29.tgz", - "integrity": "sha512-9i+JEHBOVgqxQ92HHRFlSW1EQXqa/89IVjtHgOqsShCcB/ZBjTtkWGi+SGCJaYyWkr/lzu51NTMCfKuBf7ULNw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-gnu": { - "version": "14.2.29", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.29.tgz", - "integrity": "sha512-B7JtMbkUwHijrGBOhgSQu2ncbCYq9E7PZ7MX58kxheiEOwdkM+jGx0cBb+rN5AeqF96JypEppK6i/bEL9T13lA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-musl": { - "version": "14.2.29", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.29.tgz", - "integrity": "sha512-yCcZo1OrO3aQ38B5zctqKU1Z3klOohIxug6qdiKO3Q3qNye/1n6XIs01YJ+Uf+TdpZQ0fNrOQI2HrTLF3Zprnw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-arm64-msvc": { - "version": "14.2.29", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.29.tgz", - "integrity": "sha512-WnrfeOEtTVidI9Z6jDLy+gxrpDcEJtZva54LYC0bSKQqmyuHzl0ego+v0F/v2aXq0am67BRqo/ybmmt45Tzo4A==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-ia32-msvc": { - "version": "14.2.29", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.29.tgz", - "integrity": "sha512-vkcriFROT4wsTdSeIzbxaZjTNTFKjSYmLd8q/GVH3Dn8JmYjUKOuKXHK8n+lovW/kdcpIvydO5GtN+It2CvKWA==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - } - } + "name": "lecoffre-front", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "lecoffre-front", + "version": "0.1.0", + "dependencies": { + "@emotion/react": "^11.10.6", + "@emotion/styled": "^11.10.6", + "@heroicons/react": "^2.1.3", + "@mui/material": "^5.11.13", + "@next/third-parties": "^14.2.3", + "@types/node": "18.15.1", + "@types/react": "18.0.28", + "@types/react-dom": "18.0.11", + "@uidotdev/usehooks": "^2.4.1", + "class-validator": "^0.14.0", + "classnames": "^2.3.2", + "crypto-random-string": "^5.0.0", + "dotenv": "^16.0.3", + "eslint": "8.36.0", + "eslint-config-next": "13.2.4", + "file-saver": "^2.0.5", + "form-data": "^4.0.0", + "heroicons": "^2.1.5", + "jszip": "^3.10.1", + "jwt-decode": "^3.1.2", + "le-coffre-resources": "file:../lecoffre-ressources", + "next": "^14.2.3", + "pdf-lib": "^1.17.1", + "prettier": "^2.8.7", + "react": "18.2.0", + "react-dom": "18.2.0", + "react-gtm-module": "^2.0.11", + "react-hotjar": "^6.3.1", + "react-select": "^5.7.2", + "react-toastify": "^9.1.3", + "sass": "^1.59.2", + "sharp": "^0.32.1", + "typescript": "4.9.5", + "uuidv4": "^6.2.13" + }, + "devDependencies": { + "@types/file-saver": "^2.0.7", + "@types/react-gtm-module": "^2.0.3" + } + }, + "../lecoffre-ressources": { + "name": "le-coffre-resources", + "license": "MIT", + "dependencies": { + "class-transformer": "^0.5.1", + "class-validator": "^0.14.0", + "reflect-metadata": "^0.1.13" + }, + "devDependencies": { + "@types/node": "^18.16.1", + "@types/reflect-metadata": "^0.1.0", + "prettier": "^2.7.1", + "tslint": "^6.1.2", + "typescript": "~4.6.0" + } + }, + "../lecoffre-ressources/node_modules/@babel/code-frame": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../lecoffre-ressources/node_modules/@babel/helper-validator-identifier": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../lecoffre-ressources/node_modules/@babel/highlight": { + "version": "7.24.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../lecoffre-ressources/node_modules/@types/node": { + "version": "18.19.50", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "../lecoffre-ressources/node_modules/@types/reflect-metadata": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "reflect-metadata": "*" + } + }, + "../lecoffre-ressources/node_modules/@types/validator": { + "version": "13.12.2", + "license": "MIT" + }, + "../lecoffre-ressources/node_modules/ansi-styles": { + "version": "3.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "../lecoffre-ressources/node_modules/argparse": { + "version": "1.0.10", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "../lecoffre-ressources/node_modules/balanced-match": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "../lecoffre-ressources/node_modules/brace-expansion": { + "version": "1.1.11", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "../lecoffre-ressources/node_modules/builtin-modules": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../lecoffre-ressources/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "../lecoffre-ressources/node_modules/class-transformer": { + "version": "0.5.1", + "license": "MIT" + }, + "../lecoffre-ressources/node_modules/class-validator": { + "version": "0.14.1", + "license": "MIT", + "dependencies": { + "@types/validator": "^13.11.8", + "libphonenumber-js": "^1.10.53", + "validator": "^13.9.0" + } + }, + "../lecoffre-ressources/node_modules/color-convert": { + "version": "1.9.3", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "../lecoffre-ressources/node_modules/color-name": { + "version": "1.1.3", + "dev": true, + "license": "MIT" + }, + "../lecoffre-ressources/node_modules/commander": { + "version": "2.20.3", + "dev": true, + "license": "MIT" + }, + "../lecoffre-ressources/node_modules/concat-map": { + "version": "0.0.1", + "dev": true, + "license": "MIT" + }, + "../lecoffre-ressources/node_modules/diff": { + "version": "4.0.2", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "../lecoffre-ressources/node_modules/escape-string-regexp": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "../lecoffre-ressources/node_modules/esprima": { + "version": "4.0.1", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "../lecoffre-ressources/node_modules/fs.realpath": { + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "../lecoffre-ressources/node_modules/function-bind": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../lecoffre-ressources/node_modules/glob": { + "version": "7.2.3", + "dev": true, + "license": "ISC", + "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" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../lecoffre-ressources/node_modules/has-flag": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../lecoffre-ressources/node_modules/hasown": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../lecoffre-ressources/node_modules/inflight": { + "version": "1.0.6", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "../lecoffre-ressources/node_modules/inherits": { + "version": "2.0.4", + "dev": true, + "license": "ISC" + }, + "../lecoffre-ressources/node_modules/is-core-module": { + "version": "2.15.1", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../lecoffre-ressources/node_modules/js-tokens": { + "version": "4.0.0", + "dev": true, + "license": "MIT" + }, + "../lecoffre-ressources/node_modules/js-yaml": { + "version": "3.14.1", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "../lecoffre-ressources/node_modules/libphonenumber-js": { + "version": "1.11.8", + "license": "MIT" + }, + "../lecoffre-ressources/node_modules/minimatch": { + "version": "3.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "../lecoffre-ressources/node_modules/minimist": { + "version": "1.2.8", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../lecoffre-ressources/node_modules/mkdirp": { + "version": "0.5.6", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "../lecoffre-ressources/node_modules/once": { + "version": "1.4.0", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "../lecoffre-ressources/node_modules/path-is-absolute": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../lecoffre-ressources/node_modules/path-parse": { + "version": "1.0.7", + "dev": true, + "license": "MIT" + }, + "../lecoffre-ressources/node_modules/picocolors": { + "version": "1.1.0", + "dev": true, + "license": "ISC" + }, + "../lecoffre-ressources/node_modules/prettier": { + "version": "2.8.8", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "../lecoffre-ressources/node_modules/reflect-metadata": { + "version": "0.1.14", + "license": "Apache-2.0" + }, + "../lecoffre-ressources/node_modules/resolve": { + "version": "1.22.8", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../lecoffre-ressources/node_modules/semver": { + "version": "5.7.2", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "../lecoffre-ressources/node_modules/sprintf-js": { + "version": "1.0.3", + "dev": true, + "license": "BSD-3-Clause" + }, + "../lecoffre-ressources/node_modules/supports-color": { + "version": "5.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "../lecoffre-ressources/node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../lecoffre-ressources/node_modules/tslib": { + "version": "1.14.1", + "dev": true, + "license": "0BSD" + }, + "../lecoffre-ressources/node_modules/tslint": { + "version": "6.1.3", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^4.0.1", + "glob": "^7.1.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.3", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.13.0", + "tsutils": "^2.29.0" + }, + "bin": { + "tslint": "bin/tslint" + }, + "engines": { + "node": ">=4.8.0" + }, + "peerDependencies": { + "typescript": ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" + } + }, + "../lecoffre-ressources/node_modules/tsutils": { + "version": "2.29.0", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^1.8.1" + }, + "peerDependencies": { + "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" + } + }, + "../lecoffre-ressources/node_modules/typescript": { + "version": "4.6.4", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "../lecoffre-ressources/node_modules/undici-types": { + "version": "5.26.5", + "dev": true, + "license": "MIT" + }, + "../lecoffre-ressources/node_modules/validator": { + "version": "13.12.0", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "../lecoffre-ressources/node_modules/wrappy": { + "version": "1.0.2", + "dev": true, + "license": "ISC" + }, + "node_modules/@babel/code-frame": { + "version": "7.27.1", + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.27.1", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator": { + "version": "7.27.3", + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.27.3", + "@babel/types": "^7.27.3", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.27.1", + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.27.1", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.27.4", + "license": "MIT", + "dependencies": { + "@babel/types": "^7.27.3" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.27.4", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.27.2", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.27.4", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.27.3", + "@babel/parser": "^7.27.4", + "@babel/template": "^7.27.2", + "@babel/types": "^7.27.3", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.27.3", + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@emotion/babel-plugin": { + "version": "11.13.5", + "license": "MIT", + "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" + } + }, + "node_modules/@emotion/cache": { + "version": "11.14.0", + "license": "MIT", + "dependencies": { + "@emotion/memoize": "^0.9.0", + "@emotion/sheet": "^1.4.0", + "@emotion/utils": "^1.4.2", + "@emotion/weak-memoize": "^0.4.0", + "stylis": "4.2.0" + } + }, + "node_modules/@emotion/hash": { + "version": "0.9.2", + "license": "MIT" + }, + "node_modules/@emotion/is-prop-valid": { + "version": "1.3.1", + "license": "MIT", + "dependencies": { + "@emotion/memoize": "^0.9.0" + } + }, + "node_modules/@emotion/memoize": { + "version": "0.9.0", + "license": "MIT" + }, + "node_modules/@emotion/react": { + "version": "11.14.0", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.13.5", + "@emotion/cache": "^11.14.0", + "@emotion/serialize": "^1.3.3", + "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0", + "@emotion/utils": "^1.4.2", + "@emotion/weak-memoize": "^0.4.0", + "hoist-non-react-statics": "^3.3.1" + }, + "peerDependencies": { + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/serialize": { + "version": "1.3.3", + "license": "MIT", + "dependencies": { + "@emotion/hash": "^0.9.2", + "@emotion/memoize": "^0.9.0", + "@emotion/unitless": "^0.10.0", + "@emotion/utils": "^1.4.2", + "csstype": "^3.0.2" + } + }, + "node_modules/@emotion/sheet": { + "version": "1.4.0", + "license": "MIT" + }, + "node_modules/@emotion/styled": { + "version": "11.14.0", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@emotion/babel-plugin": "^11.13.5", + "@emotion/is-prop-valid": "^1.3.0", + "@emotion/serialize": "^1.3.3", + "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0", + "@emotion/utils": "^1.4.2" + }, + "peerDependencies": { + "@emotion/react": "^11.0.0-rc.0", + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@emotion/unitless": { + "version": "0.10.0", + "license": "MIT" + }, + "node_modules/@emotion/use-insertion-effect-with-fallbacks": { + "version": "1.2.0", + "license": "MIT", + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@emotion/utils": { + "version": "1.4.2", + "license": "MIT" + }, + "node_modules/@emotion/weak-memoize": { + "version": "0.4.0", + "license": "MIT" + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.7.0", + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.24.0", + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/type-fest": { + "version": "0.20.2", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "8.36.0", + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@floating-ui/core": { + "version": "1.7.1", + "license": "MIT", + "dependencies": { + "@floating-ui/utils": "^0.2.9" + } + }, + "node_modules/@floating-ui/dom": { + "version": "1.7.1", + "license": "MIT", + "dependencies": { + "@floating-ui/core": "^1.7.1", + "@floating-ui/utils": "^0.2.9" + } + }, + "node_modules/@floating-ui/utils": { + "version": "0.2.9", + "license": "MIT" + }, + "node_modules/@heroicons/react": { + "version": "2.2.0", + "license": "MIT", + "peerDependencies": { + "react": ">= 16 || ^19.0.0-rc" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "license": "Apache-2.0", + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "license": "BSD-3-Clause" + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.8", + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@mui/core-downloads-tracker": { + "version": "5.17.1", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + } + }, + "node_modules/@mui/material": { + "version": "5.17.1", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/core-downloads-tracker": "^5.17.1", + "@mui/system": "^5.17.1", + "@mui/types": "~7.2.15", + "@mui/utils": "^5.17.1", + "@popperjs/core": "^2.11.8", + "@types/react-transition-group": "^4.4.10", + "clsx": "^2.1.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1", + "react-is": "^19.0.0", + "react-transition-group": "^4.4.5" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/private-theming": { + "version": "5.17.1", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/utils": "^5.17.1", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/styled-engine": { + "version": "5.16.14", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@emotion/cache": "^11.13.5", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.4.1", + "@emotion/styled": "^11.3.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + } + } + }, + "node_modules/@mui/system": { + "version": "5.17.1", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/private-theming": "^5.17.1", + "@mui/styled-engine": "^5.16.14", + "@mui/types": "~7.2.15", + "@mui/utils": "^5.17.1", + "clsx": "^2.1.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/types": { + "version": "7.2.24", + "license": "MIT", + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/utils": { + "version": "5.17.1", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.9", + "@mui/types": "~7.2.15", + "@types/prop-types": "^15.7.12", + "clsx": "^2.1.1", + "prop-types": "^15.8.1", + "react-is": "^19.0.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@next/env": { + "version": "14.2.29", + "license": "MIT" + }, + "node_modules/@next/eslint-plugin-next": { + "version": "13.2.4", + "license": "MIT", + "dependencies": { + "glob": "7.1.7" + } + }, + "node_modules/@next/swc-darwin-arm64": { + "version": "14.2.29", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.29.tgz", + "integrity": "sha512-wWtrAaxCVMejxPHFb1SK/PVV1WDIrXGs9ki0C/kUM8ubKHQm+3hU9MouUywCw8Wbhj3pewfHT2wjunLEr/TaLA==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-darwin-x64": { + "version": "14.2.29", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.29.tgz", + "integrity": "sha512-7Z/jk+6EVBj4pNLw/JQrvZVrAh9Bv8q81zCFSfvTMZ51WySyEHWVpwCEaJY910LyBftv2F37kuDPQm0w9CEXyg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-gnu": { + "version": "14.2.29", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.29.tgz", + "integrity": "sha512-o6hrz5xRBwi+G7JFTHc+RUsXo2lVXEfwh4/qsuWBMQq6aut+0w98WEnoNwAwt7hkEqegzvazf81dNiwo7KjITw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm64-musl": { + "version": "14.2.29", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.29.tgz", + "integrity": "sha512-9i+JEHBOVgqxQ92HHRFlSW1EQXqa/89IVjtHgOqsShCcB/ZBjTtkWGi+SGCJaYyWkr/lzu51NTMCfKuBf7ULNw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-gnu": { + "version": "14.2.29", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.29.tgz", + "integrity": "sha512-B7JtMbkUwHijrGBOhgSQu2ncbCYq9E7PZ7MX58kxheiEOwdkM+jGx0cBb+rN5AeqF96JypEppK6i/bEL9T13lA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-x64-musl": { + "version": "14.2.29", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.29.tgz", + "integrity": "sha512-yCcZo1OrO3aQ38B5zctqKU1Z3klOohIxug6qdiKO3Q3qNye/1n6XIs01YJ+Uf+TdpZQ0fNrOQI2HrTLF3Zprnw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-arm64-msvc": { + "version": "14.2.29", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.29.tgz", + "integrity": "sha512-WnrfeOEtTVidI9Z6jDLy+gxrpDcEJtZva54LYC0bSKQqmyuHzl0ego+v0F/v2aXq0am67BRqo/ybmmt45Tzo4A==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-ia32-msvc": { + "version": "14.2.29", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.29.tgz", + "integrity": "sha512-vkcriFROT4wsTdSeIzbxaZjTNTFKjSYmLd8q/GVH3Dn8JmYjUKOuKXHK8n+lovW/kdcpIvydO5GtN+It2CvKWA==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-win32-x64-msvc": { + "version": "14.2.29", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/third-parties": { + "version": "14.2.29", + "license": "MIT", + "dependencies": { + "third-party-capital": "1.0.20" + }, + "peerDependencies": { + "next": "^13.0.0 || ^14.0.0", + "react": "^18.2.0" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nolyfill/is-core-module": { + "version": "1.0.39", + "license": "MIT", + "engines": { + "node": ">=12.4.0" + } + }, + "node_modules/@parcel/watcher": { + "version": "2.5.1", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "detect-libc": "^1.0.3", + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "node-addon-api": "^7.0.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.1", + "@parcel/watcher-darwin-arm64": "2.5.1", + "@parcel/watcher-darwin-x64": "2.5.1", + "@parcel/watcher-freebsd-x64": "2.5.1", + "@parcel/watcher-linux-arm-glibc": "2.5.1", + "@parcel/watcher-linux-arm-musl": "2.5.1", + "@parcel/watcher-linux-arm64-glibc": "2.5.1", + "@parcel/watcher-linux-arm64-musl": "2.5.1", + "@parcel/watcher-linux-x64-glibc": "2.5.1", + "@parcel/watcher-linux-x64-musl": "2.5.1", + "@parcel/watcher-win32-arm64": "2.5.1", + "@parcel/watcher-win32-ia32": "2.5.1", + "@parcel/watcher-win32-x64": "2.5.1" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.5.1", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@pdf-lib/standard-fonts": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@pdf-lib/standard-fonts/-/standard-fonts-1.0.0.tgz", + "integrity": "sha512-hU30BK9IUN/su0Mn9VdlVKsWBS6GyhVfqjwl1FjZN4TxP6cCw0jP2w7V3Hf5uX7M0AZJ16vey9yE0ny7Sa59ZA==", + "dependencies": { + "pako": "^1.0.6" + } + }, + "node_modules/@pdf-lib/upng": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@pdf-lib/upng/-/upng-1.0.1.tgz", + "integrity": "sha512-dQK2FUMQtowVP00mtIksrlZhdFXQZPC+taih1q4CvPZ5vqdxR/LKBaFg0oAfzd1GlHZXXSPdQfzQnt+ViGvEIQ==", + "dependencies": { + "pako": "^1.0.10" + } + }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/@rtsao/scc": { + "version": "1.1.0", + "license": "MIT" + }, + "node_modules/@rushstack/eslint-patch": { + "version": "1.11.0", + "license": "MIT" + }, + "node_modules/@swc/counter": { + "version": "0.1.3", + "license": "Apache-2.0" + }, + "node_modules/@swc/helpers": { + "version": "0.5.5", + "license": "Apache-2.0", + "dependencies": { + "@swc/counter": "^0.1.3", + "tslib": "^2.4.0" + } + }, + "node_modules/@types/file-saver": { + "version": "2.0.7", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "18.15.1", + "license": "MIT" + }, + "node_modules/@types/parse-json": { + "version": "4.0.2", + "license": "MIT" + }, + "node_modules/@types/prop-types": { + "version": "15.7.14", + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "18.0.28", + "license": "MIT", + "dependencies": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.0.11", + "license": "MIT", + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/react-gtm-module": { + "version": "2.0.4", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react-transition-group": { + "version": "4.4.12", + "license": "MIT", + "peerDependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/scheduler": { + "version": "0.26.0", + "license": "MIT" + }, + "node_modules/@types/uuid": { + "version": "8.3.4", + "license": "MIT" + }, + "node_modules/@types/validator": { + "version": "13.15.1", + "license": "MIT" + }, + "node_modules/@typescript-eslint/parser": { + "version": "5.62.0", + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.62.0", + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "5.62.0", + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@uidotdev/usehooks": { + "version": "2.4.1", + "license": "MIT", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "react": ">=18.0.0", + "react-dom": ">=18.0.0" + } + }, + "node_modules/@unrs/resolver-binding-win32-x64-msvc": { + "version": "1.7.8", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/acorn": { + "version": "8.14.1", + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "license": "Python-2.0" + }, + "node_modules/aria-query": { + "version": "5.3.2", + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "is-array-buffer": "^3.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-includes": { + "version": "3.1.9", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.24.0", + "es-object-atoms": "^1.1.1", + "get-intrinsic": "^1.3.0", + "is-string": "^1.1.1", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/array.prototype.findlast": { + "version": "1.2.5", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.6", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "es-shim-unscopables": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.3", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.3", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.tosorted": { + "version": "1.1.4", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.4", + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ast-types-flow": { + "version": "0.0.8", + "license": "MIT" + }, + "node_modules/async-function": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "license": "MIT" + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/axe-core": { + "version": "4.10.3", + "license": "MPL-2.0", + "engines": { + "node": ">=4" + } + }, + "node_modules/axobject-query": { + "version": "4.1.0", + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/b4a": { + "version": "1.6.7", + "license": "Apache-2.0" + }, + "node_modules/babel-plugin-macros": { + "version": "3.1.0", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.12.5", + "cosmiconfig": "^7.0.0", + "resolve": "^1.19.0" + }, + "engines": { + "node": ">=10", + "npm": ">=6" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "license": "MIT" + }, + "node_modules/bare-events": { + "version": "2.5.4", + "license": "Apache-2.0", + "optional": true + }, + "node_modules/bare-fs": { + "version": "4.1.5", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "bare-events": "^2.5.4", + "bare-path": "^3.0.0", + "bare-stream": "^2.6.4" + }, + "engines": { + "bare": ">=1.16.0" + }, + "peerDependencies": { + "bare-buffer": "*" + }, + "peerDependenciesMeta": { + "bare-buffer": { + "optional": true + } + } + }, + "node_modules/bare-os": { + "version": "3.6.1", + "license": "Apache-2.0", + "optional": true, + "engines": { + "bare": ">=1.14.0" + } + }, + "node_modules/bare-path": { + "version": "3.0.0", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "bare-os": "^3.0.1" + } + }, + "node_modules/bare-stream": { + "version": "2.6.5", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "streamx": "^2.21.0" + }, + "peerDependencies": { + "bare-buffer": "*", + "bare-events": "*" + }, + "peerDependenciesMeta": { + "bare-buffer": { + "optional": true + }, + "bare-events": { + "optional": true + } + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bl": { + "version": "4.1.0", + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.2", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/busboy": { + "version": "1.6.0", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, + "node_modules/call-bind": { + "version": "1.0.8", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001720", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chalk": { + "version": "4.1.2", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chokidar": { + "version": "4.0.3", + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "license": "ISC" + }, + "node_modules/class-validator": { + "version": "0.14.2", + "license": "MIT", + "dependencies": { + "@types/validator": "^13.11.8", + "libphonenumber-js": "^1.11.1", + "validator": "^13.9.0" + } + }, + "node_modules/classnames": { + "version": "2.5.1", + "license": "MIT" + }, + "node_modules/client-only": { + "version": "0.0.1", + "license": "MIT" + }, + "node_modules/clsx": { + "version": "2.1.1", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/color": { + "version": "4.2.3", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "license": "MIT" + }, + "node_modules/color-string": { + "version": "1.9.1", + "license": "MIT", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "license": "MIT" + }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "license": "MIT" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "license": "MIT" + }, + "node_modules/cosmiconfig": { + "version": "7.1.0", + "license": "MIT", + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypto-random-string": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "type-fest": "^2.12.2" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/csstype": { + "version": "3.1.3", + "license": "MIT" + }, + "node_modules/damerau-levenshtein": { + "version": "1.0.8", + "license": "BSD-2-Clause" + }, + "node_modules/data-view-buffer": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/inspect-js" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/debug": { + "version": "4.4.1", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "license": "MIT", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "license": "MIT" + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "license": "Apache-2.0", + "optional": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, + "node_modules/dotenv": { + "version": "16.5.0", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "license": "MIT" + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.24.0", + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.2", + "arraybuffer.prototype.slice": "^1.0.4", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "data-view-buffer": "^1.0.2", + "data-view-byte-length": "^1.0.2", + "data-view-byte-offset": "^1.0.1", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "es-set-tostringtag": "^2.1.0", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.8", + "get-intrinsic": "^1.3.0", + "get-proto": "^1.0.1", + "get-symbol-description": "^1.1.0", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "internal-slot": "^1.1.0", + "is-array-buffer": "^3.0.5", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.2", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.2.1", + "is-set": "^2.0.3", + "is-shared-array-buffer": "^1.0.4", + "is-string": "^1.1.1", + "is-typed-array": "^1.1.15", + "is-weakref": "^1.1.1", + "math-intrinsics": "^1.1.0", + "object-inspect": "^1.13.4", + "object-keys": "^1.1.1", + "object.assign": "^4.1.7", + "own-keys": "^1.0.1", + "regexp.prototype.flags": "^1.5.4", + "safe-array-concat": "^1.1.3", + "safe-push-apply": "^1.0.0", + "safe-regex-test": "^1.1.0", + "set-proto": "^1.0.0", + "stop-iteration-iterator": "^1.1.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.3", + "typed-array-byte-length": "^1.0.3", + "typed-array-byte-offset": "^1.0.4", + "typed-array-length": "^1.0.7", + "unbox-primitive": "^1.1.0", + "which-typed-array": "^1.1.19" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-iterator-helpers": { + "version": "1.2.1", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.6", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.3", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.6", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "internal-slot": "^1.1.0", + "iterator.prototype": "^1.1.4", + "safe-array-concat": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.1.0", + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.3.0", + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7", + "is-date-object": "^1.0.5", + "is-symbol": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.36.0", + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.1", + "@eslint/js": "8.36.0", + "@humanwhocodes/config-array": "^0.11.8", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.5.0", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-sdsl": "^4.1.4", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-next": { + "version": "13.2.4", + "license": "MIT", + "dependencies": { + "@next/eslint-plugin-next": "13.2.4", + "@rushstack/eslint-patch": "^1.1.3", + "@typescript-eslint/parser": "^5.42.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-import-resolver-typescript": "^3.5.2", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-jsx-a11y": "^6.5.1", + "eslint-plugin-react": "^7.31.7", + "eslint-plugin-react-hooks": "^4.5.0" + }, + "peerDependencies": { + "eslint": "^7.23.0 || ^8.0.0", + "typescript": ">=3.3.1" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/eslint-config-next/node_modules/eslint-import-resolver-typescript": { + "version": "3.10.1", + "license": "ISC", + "dependencies": { + "@nolyfill/is-core-module": "1.0.39", + "debug": "^4.4.0", + "get-tsconfig": "^4.10.0", + "is-bun-module": "^2.0.0", + "stable-hash": "^0.0.5", + "tinyglobby": "^0.2.13", + "unrs-resolver": "^1.6.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-import-resolver-typescript" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*", + "eslint-plugin-import-x": "*" + }, + "peerDependenciesMeta": { + "eslint-plugin-import": { + "optional": true + }, + "eslint-plugin-import-x": { + "optional": true + } + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "license": "MIT", + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.12.0", + "license": "MIT", + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.31.0", + "license": "MIT", + "dependencies": { + "@rtsao/scc": "^1.1.0", + "array-includes": "^3.1.8", + "array.prototype.findlastindex": "^1.2.5", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.12.0", + "hasown": "^2.0.2", + "is-core-module": "^2.15.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.8", + "object.groupby": "^1.0.3", + "object.values": "^1.2.0", + "semver": "^6.3.1", + "string.prototype.trimend": "^1.0.8", + "tsconfig-paths": "^3.15.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-plugin-jsx-a11y": { + "version": "6.10.2", + "license": "MIT", + "dependencies": { + "aria-query": "^5.3.2", + "array-includes": "^3.1.8", + "array.prototype.flatmap": "^1.3.2", + "ast-types-flow": "^0.0.8", + "axe-core": "^4.10.0", + "axobject-query": "^4.1.0", + "damerau-levenshtein": "^1.0.8", + "emoji-regex": "^9.2.2", + "hasown": "^2.0.2", + "jsx-ast-utils": "^3.3.5", + "language-tags": "^1.0.9", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.8", + "safe-regex-test": "^1.0.3", + "string.prototype.includes": "^2.0.1" + }, + "engines": { + "node": ">=4.0" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9" + } + }, + "node_modules/eslint-plugin-react": { + "version": "7.37.5", + "license": "MIT", + "dependencies": { + "array-includes": "^3.1.8", + "array.prototype.findlast": "^1.2.5", + "array.prototype.flatmap": "^1.3.3", + "array.prototype.tosorted": "^1.1.4", + "doctrine": "^2.1.0", + "es-iterator-helpers": "^1.2.1", + "estraverse": "^5.3.0", + "hasown": "^2.0.2", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "minimatch": "^3.1.2", + "object.entries": "^1.1.9", + "object.fromentries": "^2.0.8", + "object.values": "^1.2.1", + "prop-types": "^15.8.1", + "resolve": "^2.0.0-next.5", + "semver": "^6.3.1", + "string.prototype.matchall": "^4.0.12", + "string.prototype.repeat": "^1.0.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" + } + }, + "node_modules/eslint-plugin-react-hooks": { + "version": "4.6.2", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" + } + }, + "node_modules/eslint-plugin-react/node_modules/doctrine": { + "version": "2.1.0", + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-react/node_modules/resolve": { + "version": "2.0.0-next.5", + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/eslint-plugin-react/node_modules/semver": { + "version": "6.3.1", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/globals": { + "version": "13.24.0", + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/type-fest": { + "version": "0.20.2", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-template": { + "version": "2.0.3", + "license": "(MIT OR WTFPL)", + "engines": { + "node": ">=6" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "license": "MIT" + }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.19.1", + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/file-saver": { + "version": "2.0.5", + "license": "MIT" + }, + "node_modules/fill-range": { + "version": "7.1.1", + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-root": { + "version": "1.1.0", + "license": "MIT" + }, + "node_modules/find-up": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "license": "ISC" + }, + "node_modules/for-each": { + "version": "0.3.5", + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/form-data": { + "version": "4.0.2", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.8", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "functions-have-names": "^1.2.3", + "hasown": "^2.0.2", + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-symbol-description": { + "version": "1.1.0", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-tsconfig": { + "version": "4.10.1", + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/github-from-package": { + "version": "0.0.0", + "license": "MIT" + }, + "node_modules/glob": { + "version": "7.1.7", + "license": "ISC", + "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" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/globalthis": { + "version": "1.0.4", + "license": "MIT", + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "license": "ISC" + }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "license": "MIT" + }, + "node_modules/has-bigints": { + "version": "1.1.0", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.2.0", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/heroicons": { + "version": "2.2.0", + "license": "MIT" + }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "license": "BSD-3-Clause", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/hoist-non-react-statics/node_modules/react-is": { + "version": "16.13.1", + "license": "MIT" + }, + "node_modules/ieee754": { + "version": "1.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "5.3.2", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/immediate": { + "version": "3.0.6", + "license": "MIT" + }, + "node_modules/immutable": { + "version": "5.1.2", + "license": "MIT" + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "license": "ISC" + }, + "node_modules/ini": { + "version": "1.3.8", + "license": "ISC" + }, + "node_modules/internal-slot": { + "version": "1.1.0", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.2", + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.5", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "license": "MIT" + }, + "node_modules/is-async-function": { + "version": "2.1.1", + "license": "MIT", + "dependencies": { + "async-function": "^1.0.0", + "call-bound": "^1.0.3", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.1.0", + "license": "MIT", + "dependencies": { + "has-bigints": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.2.2", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bun-module": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "semver": "^7.7.1" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.1.0", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-finalizationregistry": { + "version": "1.1.1", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-generator-function": { + "version": "1.1.0", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "get-proto": "^1.0.0", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-map": { + "version": "2.0.3", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.1.1", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-regex": { + "version": "1.2.1", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-set": { + "version": "2.0.3", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.4", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.1.1", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.1.1", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-symbols": "^1.1.0", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakmap": { + "version": "2.0.2", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.1.1", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.4", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "license": "ISC" + }, + "node_modules/iterator.prototype": { + "version": "1.1.5", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.6", + "get-proto": "^1.0.0", + "has-symbols": "^1.1.0", + "set-function-name": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/js-sdsl": { + "version": "4.4.2", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "3.1.0", + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "license": "MIT" + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "license": "MIT" + }, + "node_modules/json5": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/jsx-ast-utils": { + "version": "3.3.5", + "license": "MIT", + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "object.assign": "^4.1.4", + "object.values": "^1.1.6" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/jszip": { + "version": "3.10.1", + "license": "(MIT OR GPL-3.0-or-later)", + "dependencies": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" + } + }, + "node_modules/jwt-decode": { + "version": "3.1.2", + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/language-subtag-registry": { + "version": "0.3.23", + "license": "CC0-1.0" + }, + "node_modules/language-tags": { + "version": "1.0.9", + "license": "MIT", + "dependencies": { + "language-subtag-registry": "^0.3.20" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/le-coffre-resources": { + "resolved": "../lecoffre-ressources", + "link": true + }, + "node_modules/levn": { + "version": "0.4.1", + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/libphonenumber-js": { + "version": "1.12.8", + "license": "MIT" + }, + "node_modules/lie": { + "version": "3.3.0", + "license": "MIT", + "dependencies": { + "immediate": "~3.0.5" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "license": "MIT" + }, + "node_modules/locate-path": { + "version": "6.0.0", + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "license": "MIT" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/memoize-one": { + "version": "6.0.0", + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-response": { + "version": "3.1.0", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "license": "MIT" + }, + "node_modules/ms": { + "version": "2.1.3", + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.11", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/napi-build-utils": { + "version": "2.0.0", + "license": "MIT" + }, + "node_modules/napi-postinstall": { + "version": "0.2.4", + "license": "MIT", + "bin": { + "napi-postinstall": "lib/cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/napi-postinstall" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "license": "MIT" + }, + "node_modules/next": { + "version": "14.2.29", + "license": "MIT", + "dependencies": { + "@next/env": "14.2.29", + "@swc/helpers": "0.5.5", + "busboy": "1.6.0", + "caniuse-lite": "^1.0.30001579", + "graceful-fs": "^4.2.11", + "postcss": "8.4.31", + "styled-jsx": "5.1.1" + }, + "bin": { + "next": "dist/bin/next" + }, + "engines": { + "node": ">=18.17.0" + }, + "optionalDependencies": { + "@next/swc-darwin-arm64": "14.2.29", + "@next/swc-darwin-x64": "14.2.29", + "@next/swc-linux-arm64-gnu": "14.2.29", + "@next/swc-linux-arm64-musl": "14.2.29", + "@next/swc-linux-x64-gnu": "14.2.29", + "@next/swc-linux-x64-musl": "14.2.29", + "@next/swc-win32-arm64-msvc": "14.2.29", + "@next/swc-win32-ia32-msvc": "14.2.29", + "@next/swc-win32-x64-msvc": "14.2.29" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.1.0", + "@playwright/test": "^1.41.2", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "sass": "^1.3.0" + }, + "peerDependenciesMeta": { + "@opentelemetry/api": { + "optional": true + }, + "@playwright/test": { + "optional": true + }, + "sass": { + "optional": true + } + } + }, + "node_modules/node-abi": { + "version": "3.75.0", + "license": "MIT", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "license": "MIT", + "optional": true + }, + "node_modules/object-assign": { + "version": "4.1.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.7", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.entries": { + "version": "1.1.9", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.8", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.3", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.values": { + "version": "1.2.1", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/own-keys": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.6", + "object-keys": "^1.1.1", + "safe-push-apply": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "license": "(MIT AND Zlib)" + }, + "node_modules/parent-module": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "license": "MIT" + }, + "node_modules/path-type": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pdf-lib": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/pdf-lib/-/pdf-lib-1.17.1.tgz", + "integrity": "sha512-V/mpyJAoTsN4cnP31vc0wfNA1+p20evqqnap0KLoRUN0Yk/p3wN52DOEsL4oBFcLdb76hlpKPtzJIgo67j/XLw==", + "dependencies": { + "@pdf-lib/standard-fonts": "^1.0.0", + "@pdf-lib/upng": "^1.0.1", + "pako": "^1.0.11", + "tslib": "^1.11.1" + } + }, + "node_modules/pdf-lib/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/postcss": { + "version": "8.4.31", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.6", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prebuild-install": { + "version": "7.1.3", + "license": "MIT", + "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": "^2.0.0", + "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": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/prebuild-install/node_modules/detect-libc": { + "version": "2.0.4", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/prebuild-install/node_modules/readable-stream": { + "version": "3.6.2", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/prebuild-install/node_modules/tar-fs": { + "version": "2.1.3", + "license": "MIT", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/prebuild-install/node_modules/tar-stream": { + "version": "2.2.0", + "license": "MIT", + "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" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.8.8", + "license": "MIT", + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "license": "MIT" + }, + "node_modules/prop-types": { + "version": "15.8.1", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/prop-types/node_modules/react-is": { + "version": "16.13.1", + "license": "MIT" + }, + "node_modules/pump": { + "version": "3.0.2", + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/rc": { + "version": "1.2.8", + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react": { + "version": "18.2.0", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.2.0", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.0" + }, + "peerDependencies": { + "react": "^18.2.0" + } + }, + "node_modules/react-gtm-module": { + "version": "2.0.11", + "license": "MIT" + }, + "node_modules/react-hotjar": { + "version": "6.3.1", + "license": "MIT" + }, + "node_modules/react-is": { + "version": "19.1.0", + "license": "MIT" + }, + "node_modules/react-select": { + "version": "5.10.1", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.12.0", + "@emotion/cache": "^11.4.0", + "@emotion/react": "^11.8.1", + "@floating-ui/dom": "^1.0.1", + "@types/react-transition-group": "^4.4.0", + "memoize-one": "^6.0.0", + "prop-types": "^15.6.0", + "react-transition-group": "^4.3.0", + "use-isomorphic-layout-effect": "^1.2.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/react-toastify": { + "version": "9.1.3", + "license": "MIT", + "dependencies": { + "clsx": "^1.1.1" + }, + "peerDependencies": { + "react": ">=16", + "react-dom": ">=16" + } + }, + "node_modules/react-toastify/node_modules/clsx": { + "version": "1.2.1", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "license": "BSD-3-Clause", + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readdirp": { + "version": "4.1.2", + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.10", + "license": "MIT", + "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" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.4", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "set-function-name": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve": { + "version": "1.22.10", + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-array-concat": { + "version": "1.1.3", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "has-symbols": "^1.1.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "license": "MIT" + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "license": "MIT" + }, + "node_modules/safe-push-apply": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-push-apply/node_modules/isarray": { + "version": "2.0.5", + "license": "MIT" + }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sass": { + "version": "1.89.1", + "license": "MIT", + "dependencies": { + "chokidar": "^4.0.0", + "immutable": "^5.0.2", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + }, + "optionalDependencies": { + "@parcel/watcher": "^2.4.1" + } + }, + "node_modules/scheduler": { + "version": "0.23.2", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/semver": { + "version": "7.7.2", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "license": "MIT", + "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" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-proto": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "license": "MIT" + }, + "node_modules/sharp": { + "version": "0.32.6", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "color": "^4.2.3", + "detect-libc": "^2.0.2", + "node-addon-api": "^6.1.0", + "prebuild-install": "^7.1.1", + "semver": "^7.5.4", + "simple-get": "^4.0.1", + "tar-fs": "^3.0.4", + "tunnel-agent": "^0.6.0" + }, + "engines": { + "node": ">=14.15.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/sharp/node_modules/detect-libc": { + "version": "2.0.4", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/sharp/node_modules/node-addon-api": { + "version": "6.1.0", + "license": "MIT" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "license": "MIT", + "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" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/simple-get": { + "version": "4.0.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/simple-swizzle/node_modules/is-arrayish": { + "version": "0.3.2", + "license": "MIT" + }, + "node_modules/slash": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.5.7", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stable-hash": { + "version": "0.0.5", + "license": "MIT" + }, + "node_modules/stop-iteration-iterator": { + "version": "1.1.0", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "internal-slot": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/streamsearch": { + "version": "1.1.0", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/streamx": { + "version": "2.22.0", + "license": "MIT", + "dependencies": { + "fast-fifo": "^1.3.2", + "text-decoder": "^1.1.0" + }, + "optionalDependencies": { + "bare-events": "^2.2.0" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string.prototype.includes": { + "version": "2.0.1", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/string.prototype.matchall": { + "version": "4.0.12", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.6", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.6", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "internal-slot": "^1.1.0", + "regexp.prototype.flags": "^1.5.3", + "set-function-name": "^2.0.2", + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.repeat": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.10", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-data-property": "^1.1.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-object-atoms": "^1.0.0", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.9", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/styled-jsx": { + "version": "5.1.1", + "license": "MIT", + "dependencies": { + "client-only": "0.0.1" + }, + "engines": { + "node": ">= 12.0.0" + }, + "peerDependencies": { + "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/stylis": { + "version": "4.2.0", + "license": "MIT" + }, + "node_modules/supports-color": { + "version": "7.2.0", + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tar-fs": { + "version": "3.0.9", + "license": "MIT", + "dependencies": { + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + }, + "optionalDependencies": { + "bare-fs": "^4.0.1", + "bare-path": "^3.0.0" + } + }, + "node_modules/tar-stream": { + "version": "3.1.7", + "license": "MIT", + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, + "node_modules/text-decoder": { + "version": "1.2.3", + "license": "Apache-2.0", + "dependencies": { + "b4a": "^1.6.4" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "license": "MIT" + }, + "node_modules/third-party-capital": { + "version": "1.0.20", + "license": "ISC" + }, + "node_modules/tinyglobby": { + "version": "0.2.14", + "license": "MIT", + "dependencies": { + "fdir": "^6.4.4", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.4.5", + "license": "MIT", + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.2", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tsconfig-paths": { + "version": "3.15.0", + "license": "MIT", + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "license": "0BSD" + }, + "node_modules/tsutils": { + "version": "3.21.0", + "license": "MIT", + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "license": "0BSD" + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "2.19.0", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.3", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.3", + "license": "MIT", + "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" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.4", + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "for-each": "^0.3.3", + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.15", + "reflect.getprototypeof": "^1.0.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.7", + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0", + "reflect.getprototypeof": "^1.0.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typescript": { + "version": "4.9.5", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/unbox-primitive": { + "version": "1.1.0", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-bigints": "^1.0.2", + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/unrs-resolver": { + "version": "1.7.8", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "napi-postinstall": "^0.2.2" + }, + "funding": { + "url": "https://opencollective.com/unrs-resolver" + }, + "optionalDependencies": { + "@unrs/resolver-binding-darwin-arm64": "1.7.8", + "@unrs/resolver-binding-darwin-x64": "1.7.8", + "@unrs/resolver-binding-freebsd-x64": "1.7.8", + "@unrs/resolver-binding-linux-arm-gnueabihf": "1.7.8", + "@unrs/resolver-binding-linux-arm-musleabihf": "1.7.8", + "@unrs/resolver-binding-linux-arm64-gnu": "1.7.8", + "@unrs/resolver-binding-linux-arm64-musl": "1.7.8", + "@unrs/resolver-binding-linux-ppc64-gnu": "1.7.8", + "@unrs/resolver-binding-linux-riscv64-gnu": "1.7.8", + "@unrs/resolver-binding-linux-riscv64-musl": "1.7.8", + "@unrs/resolver-binding-linux-s390x-gnu": "1.7.8", + "@unrs/resolver-binding-linux-x64-gnu": "1.7.8", + "@unrs/resolver-binding-linux-x64-musl": "1.7.8", + "@unrs/resolver-binding-wasm32-wasi": "1.7.8", + "@unrs/resolver-binding-win32-arm64-msvc": "1.7.8", + "@unrs/resolver-binding-win32-ia32-msvc": "1.7.8", + "@unrs/resolver-binding-win32-x64-msvc": "1.7.8" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/use-isomorphic-layout-effect": { + "version": "1.2.1", + "license": "MIT", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "license": "MIT" + }, + "node_modules/uuid": { + "version": "8.3.2", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/uuidv4": { + "version": "6.2.13", + "license": "MIT", + "dependencies": { + "@types/uuid": "8.3.4", + "uuid": "8.3.2" + } + }, + "node_modules/validator": { + "version": "13.15.15", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/which": { + "version": "2.0.2", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.1.1", + "license": "MIT", + "dependencies": { + "is-bigint": "^1.1.0", + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type": { + "version": "1.2.1", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", + "is-async-function": "^2.0.0", + "is-date-object": "^1.1.0", + "is-finalizationregistry": "^1.1.0", + "is-generator-function": "^1.0.10", + "is-regex": "^1.2.1", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.1.0", + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type/node_modules/isarray": { + "version": "2.0.5", + "license": "MIT" + }, + "node_modules/which-collection": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.19", + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "license": "ISC" + }, + "node_modules/yaml": { + "version": "1.10.2", + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } } diff --git a/package.json b/package.json index 59175b5f..77160f8d 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "dev": "next dev", - "build": "next build", + "build": "NEXT_TELEMETRY_DISABLED=1 next build --no-lint", "start": "next start", "lint": "next lint", "format": "prettier --write src" @@ -30,8 +30,9 @@ "heroicons": "^2.1.5", "jszip": "^3.10.1", "jwt-decode": "^3.1.2", - "le-coffre-resources": "file:../lecoffre-ressources", + "le-coffre-resources": "git+ssh://git@git.4nkweb.com/4nk/lecoffre-ressources.git#v2.167", "next": "^14.2.3", + "pdf-lib": "^1.17.1", "prettier": "^2.8.7", "react": "18.2.0", "react-dom": "18.2.0", diff --git a/src/common/Api/LeCoffreApi/sdk/AbstractService.ts b/src/common/Api/LeCoffreApi/sdk/AbstractService.ts new file mode 100644 index 00000000..0f13b415 --- /dev/null +++ b/src/common/Api/LeCoffreApi/sdk/AbstractService.ts @@ -0,0 +1,73 @@ +import MessageBus from 'src/sdk/MessageBus'; + +export default abstract class AbstractService { + + protected static readonly messageBus: MessageBus = MessageBus.getInstance(); + + private static readonly CACHE_TTL = 60 * 60 * 1000; // 60 minutes cache TTL + + protected constructor() { } + + protected static setItem(key: string, process: any): void { + const list: any[] = JSON.parse(sessionStorage.getItem(key) || '[]'); + + const index: number = list.findIndex((item: any) => item.process.processData.uid === process.processData.uid); + if (index !== -1) { + list[index] = { + process: process, + timestamp: Date.now() + }; + } else { + list.push({ + process: process, + timestamp: Date.now() + }); + } + + sessionStorage.setItem(key, JSON.stringify(list)); + } + + protected static getItem(key: string, uid: string): any { + const list: any[] = JSON.parse(sessionStorage.getItem(key) || '[]'); + if (list.length === 0) { + return null; + } + + const item: any = list.find((item: any) => item.process.processData.uid === uid); + if (!item) { + return null; + } + + const now: number = Date.now(); + if ((now - item.timestamp) < this.CACHE_TTL) { + return item.process; + } + + return null; + } + + protected static getItems(key: string): any[] { + const list: any[] = JSON.parse(sessionStorage.getItem(key) || '[]'); + const now: number = Date.now(); + + const items: any[] = []; + for (const item of list) { + if (now - item.timestamp < this.CACHE_TTL) { + items.push(item.process); + } + } + + return items; + } + + protected static removeItem(key: string, uid: string): void { + const list: any[] = JSON.parse(sessionStorage.getItem(key) || '[]'); + + const index: number = list.findIndex((item: any) => item.process.processData.uid === uid); + if (index !== -1) { + list.splice(index, 1); + } + + sessionStorage.setItem(key, JSON.stringify(list)); + } +} diff --git a/src/common/Api/LeCoffreApi/sdk/CollaboratorService.ts b/src/common/Api/LeCoffreApi/sdk/CollaboratorService.ts new file mode 100644 index 00000000..0fe3d856 --- /dev/null +++ b/src/common/Api/LeCoffreApi/sdk/CollaboratorService.ts @@ -0,0 +1,316 @@ +import { v4 as uuidv4 } from 'uuid'; + +import User from 'src/sdk/User'; + +import AbstractService from './AbstractService'; + +import OfficeService from './OfficeService'; +import RoleService from './RoleService'; +import OfficeRoleService from './OfficeRoleService'; + +export default class CollaboratorService extends AbstractService { + + private constructor() { + super(); + } + + public static createCollaborator(collaboratorData: any, validatorId: string): Promise { + const ownerId: string = User.getInstance().getPairingId()!; + + const processData: any = { + uid: uuidv4(), + utype: 'collaborator', + isDeleted: 'false', + created_at: new Date().toISOString(), + updated_at: new Date().toISOString(), + ...collaboratorData + }; + + const privateFields: string[] = Object.keys(processData); + privateFields.splice(privateFields.indexOf('uid'), 1); + privateFields.splice(privateFields.indexOf('utype'), 1); + privateFields.splice(privateFields.indexOf('isDeleted'), 1); + + const roles: any = { + demiurge: { + members: [...[ownerId], validatorId], + validation_rules: [], + storages: [] + }, + owner: { + members: [ownerId], + validation_rules: [ + { + quorum: 0.5, + fields: [...privateFields, 'roles', 'uid', 'utype'], + min_sig_member: 1, + }, + ], + storages: [] + }, + validator: { + members: [validatorId], + validation_rules: [ + { + quorum: 0.5, + fields: ['idCertified', 'roles'], + min_sig_member: 1, + }, + { + quorum: 0.0, + fields: [...privateFields], + min_sig_member: 0, + }, + ], + storages: [] + }, + apophis: { + members: [ownerId], + validation_rules: [], + storages: [] + } + }; + + return new Promise((resolve: (processCreated: any) => void, reject: (error: string) => void) => { + this.messageBus.createProcess(processData, privateFields, roles).then((processCreated: any) => { + this.messageBus.notifyUpdate(processCreated.processId, processCreated.process.states[0].state_id).then(() => { + this.messageBus.validateState(processCreated.processId, processCreated.process.states[0].state_id).then((_stateValidated: any) => { + this.getCollaboratorByUid(processCreated.processData.uid).then(resolve).catch(reject); + }).catch(reject); + }).catch(reject); + }).catch(reject); + }); + } + + public static getCollaborators(callback: (processes: any[]) => void, waitForAll: boolean = false): void { + // Check if we have valid cache + const items: any[] = this.getItems('_collaborators_'); + if (items.length > 0 && !waitForAll) { + setTimeout(() => callback([...items]), 0); + } + + this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['utype'] && + publicValues['utype'] === 'collaborator' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' && + !items.map((item: any) => item.processData.uid).includes(publicValues['uid']) + ).then(async (processes: any[]) => { + if (processes.length === 0) { + if (waitForAll) { + callback([...items]); + } + return; + } + + const updatedItems: any[] = [...items]; + + for (let processIndex = 0; processIndex < processes.length; processIndex++) { + let process = processes[processIndex]; + + if (!waitForAll) { + process = await this.completeCollaborator(process, (processInProgress: any) => { + const currentItems: any[] = [...updatedItems]; + + const existingIndex: number = currentItems.findIndex(item => item.processData?.uid === processInProgress.processData?.uid); + if (existingIndex >= 0) { + currentItems[existingIndex] = processInProgress; + } else { + currentItems.push(processInProgress); + } + + callback(currentItems); + }); + } else { + process = await this.completeCollaborator(process); + } + + // Update cache + this.setItem('_collaborators_', process); + + const existingIndex: number = updatedItems.findIndex(item => item.processData?.uid === process.processData?.uid); + if (existingIndex >= 0) { + updatedItems[existingIndex] = process; + } else { + updatedItems.push(process); + } + + if (!waitForAll) { + callback([...updatedItems]); + } + } + + if (waitForAll) { + callback([...updatedItems]); + } + }); + } + + public static getCollaboratorsBy(whereClause: { [path: string]: any }): Promise { + return new Promise((resolve: (collaborators: any[]) => void) => { + this.getCollaborators((processes: any[]) => { + if (processes.length === 0) { + resolve([]); + } else { + resolve(processes.filter((process: any) => { + const collaborator: any = process.processData; + + for (const path in whereClause) { + const paths: string[] = path.split('.'); + + let value: any = collaborator; + for (let i = 0; i < paths.length; i++) { + const currentPath = paths[i]; + if (!currentPath || value === undefined || value === null) { + break; + } + value = value[currentPath]; + } + + if (value !== whereClause[path]) { + return false; + } + } + + return true; + })); + } + }, true); + }); + } + + public static getCollaboratorBy(whereClause: { [path: string]: any }): Promise { + return new Promise((resolve: (collaborator: any | null) => void) => { + this.getCollaborators((processes: any[]) => { + if (processes.length === 0) { + resolve(null); + } else { + resolve(processes.find((process: any) => { + const collaborator: any = process.processData; + + for (const path in whereClause) { + const paths: string[] = path.split('.'); + + let value: any = collaborator; + for (let i = 0; i < paths.length; i++) { + const currentPath = paths[i]; + if (!currentPath || value === undefined || value === null) { + break; + } + value = value[currentPath]; + } + + if (value !== whereClause[path]) { + return false; + } + } + + return true; + })); + } + }, true); + }); + } + + public static getCollaboratorByUid(uid: string, forceRefresh: boolean = false): Promise { + // Check if we have valid cache + const item: any = this.getItem('_collaborators_', uid); + if (item && !forceRefresh) { + return Promise.resolve(item); + } + + return new Promise((resolve: (process: any) => void, reject: (error: string) => void) => { + this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['uid'] === uid && + publicValues['utype'] && + publicValues['utype'] === 'collaborator' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' + ).then(async (processes: any[]) => { + if (processes.length === 0) { + resolve(null); + } else { + let process: any = processes[0]; + process = await this.completeCollaborator(process); + + // Update cache + this.setItem('_collaborators_', process); + + resolve(process); + } + }).catch(reject); + }); + } + + public static updateCollaborator(process: any, newData: any): Promise { + return new Promise((resolve: () => void, reject: (error: string) => void) => { + this.messageBus.updateProcess(process.processId, { updated_at: new Date().toISOString(), ...newData }, [], null).then((processUpdated: any) => { + const newStateId: string = processUpdated.diffs[0]?.state_id; + this.messageBus.notifyUpdate(process.processId, newStateId).then(() => { + this.messageBus.validateState(process.processId, newStateId).then((_stateValidated) => { + const collaboratorUid: string = process.processData.uid; + this.removeItem('_collaborators_', collaboratorUid); + + this.getCollaboratorByUid(collaboratorUid, true).then(resolve).catch(reject); + }).catch(reject); + }).catch(reject); + }).catch(reject); + }); + } + + private static async completeCollaborator(process: any, progressCallback?: (processInProgress: any) => void): Promise { + const progressiveProcess: any = JSON.parse(JSON.stringify(process)); + + if (process.processData.office) { + const office: any = (await OfficeService.getOfficeByUid(process.processData.office.uid)).processData; + process.processData.office = { + uid: office.uid, + idNot: office.idNot, + crpcen: office.crpcen, + name: office.name, + office_status: office.office_status + }; + + if (progressCallback) { + progressiveProcess.processData.office = process.processData.office; + progressCallback(JSON.parse(JSON.stringify(progressiveProcess))); + } + } + + if (process.processData.role) { + const role: any = (await RoleService.getRoleByUid(process.processData.role.uid)).processData; + process.processData.role = { + uid: role.uid, + name: role.name + }; + + if (progressCallback) { + progressiveProcess.processData.role = process.processData.role; + progressCallback(JSON.parse(JSON.stringify(progressiveProcess))); + } + } + + if (process.processData.office_role) { + const officeRole: any = (await OfficeRoleService.getOfficeRoleByUid(process.processData.office_role.uid)).processData; + process.processData.office_role = { + uid: officeRole.uid, + name: officeRole.name, + rules: officeRole.rules?.map((rule: any) => { + return { + uid: rule.uid, + name: rule.name + }; + }) + }; + + if (progressCallback) { + progressiveProcess.processData.office_role = process.processData.office_role; + progressCallback(JSON.parse(JSON.stringify(progressiveProcess))); + } + } + + return process; + } +} diff --git a/src/common/Api/LeCoffreApi/sdk/CustomerService.ts b/src/common/Api/LeCoffreApi/sdk/CustomerService.ts index 5bf3a3b7..2654f2a3 100644 --- a/src/common/Api/LeCoffreApi/sdk/CustomerService.ts +++ b/src/common/Api/LeCoffreApi/sdk/CustomerService.ts @@ -1,16 +1,17 @@ import { v4 as uuidv4 } from 'uuid'; -import MessageBus from 'src/sdk/MessageBus'; import User from 'src/sdk/User'; -export default class CustomerService { +import AbstractService from './AbstractService'; - private static readonly messageBus: MessageBus = MessageBus.getInstance(); +export default class CustomerService extends AbstractService { - private constructor() { } + private constructor() { + super(); + } public static createCustomer(customerData: any, validatorId: string): Promise { - const ownerId = User.getInstance().getPairingId()!; + const ownerId: string = User.getInstance().getPairingId()!; const processData: any = { uid: uuidv4(), @@ -18,7 +19,7 @@ export default class CustomerService { isDeleted: 'false', created_at: new Date().toISOString(), updated_at: new Date().toISOString(), - ...customerData, + ...customerData }; const privateFields: string[] = Object.keys(processData); @@ -70,7 +71,7 @@ export default class CustomerService { this.messageBus.createProcess(processData, privateFields, roles).then((processCreated: any) => { this.messageBus.notifyUpdate(processCreated.processId, processCreated.process.states[0].state_id).then(() => { this.messageBus.validateState(processCreated.processId, processCreated.process.states[0].state_id).then((_stateValidated: any) => { - resolve(processCreated); + this.getCustomerByUid(processCreated.processData.uid).then(resolve).catch(reject); }).catch(reject); }).catch(reject); }).catch(reject); @@ -78,16 +79,55 @@ export default class CustomerService { } public static getCustomers(): Promise { - return this.messageBus.getProcessesDecoded((publicValues: any) => publicValues['uid'] && publicValues['utype'] && publicValues['utype'] === 'customer' && publicValues['isDeleted'] && publicValues['isDeleted'] === 'false'); + // Check if we have valid cache + const items: any[] = this.getItems('_customers_'); + + return this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['utype'] && + publicValues['utype'] === 'customer' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' && + !items.map((item: any) => item.processData.uid).includes(publicValues['uid']) + ).then((processes: any[]) => { + if (processes.length === 0) { + return items; + } else { + for (const process of processes) { + // Update cache + this.setItem('_customers_', process); + + items.push(process); + } + return items; + } + }); } public static getCustomerByUid(uid: string): Promise { + // Check if we have valid cache + const item: any = this.getItem('_customers_', uid); + if (item) { + return Promise.resolve(item); + } + return new Promise((resolve: (process: any) => void, reject: (error: string) => void) => { - this.messageBus.getProcessesDecoded((publicValues: any) => publicValues['uid'] && publicValues['uid'] === uid && publicValues['utype'] && publicValues['utype'] === 'customer' && publicValues['isDeleted'] && publicValues['isDeleted'] === 'false').then((processes: any[]) => { + this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['uid'] === uid && + publicValues['utype'] && + publicValues['utype'] === 'customer' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' + ).then((processes: any[]) => { if (processes.length === 0) { resolve(null); } else { const process: any = processes[0]; + + // Update cache + this.setItem('_customers_', process); + resolve(process); } }).catch(reject); @@ -100,7 +140,10 @@ export default class CustomerService { const newStateId: string = processUpdated.diffs[0]?.state_id; this.messageBus.notifyUpdate(process.processId, newStateId).then(() => { this.messageBus.validateState(process.processId, newStateId).then((_stateValidated) => { - resolve(); + const customerUid: string = process.processData.uid; + this.removeItem('_customers_', customerUid); + + this.getCustomerByUid(customerUid).then(resolve).catch(reject); }).catch(reject); }).catch(reject); }).catch(reject); diff --git a/src/common/Api/LeCoffreApi/sdk/DatabaseService.ts b/src/common/Api/LeCoffreApi/sdk/DatabaseService.ts new file mode 100644 index 00000000..d8cbd83e --- /dev/null +++ b/src/common/Api/LeCoffreApi/sdk/DatabaseService.ts @@ -0,0 +1,52 @@ +import getConfig from 'next/config'; +const { publicRuntimeConfig } = getConfig(); + +export default class DatabaseService { + + // Empêcher l'instanciation de cette classe utilitaire + private constructor() { } + + /** + * Récupère les données d'une table avec pagination + * @param tableName Nom de la table à consulter + * @param page Numéro de page (commence à 1) + * @param limit Nombre d'éléments par page + * @returns Données de la table avec pagination + */ + public static async getTableData(tableName: string, page: number = 1, limit: number = 10): Promise { + // Vérification des paramètres + if (!tableName) { + throw new Error('Le nom de la table est requis'); + } + + // Validation du nom de la table (par sécurité) + const tableNameRegex = /^[a-zA-Z0-9_]+$/; + if (!tableNameRegex.test(tableName)) { + throw new Error('Nom de table invalide'); + } + + try { + // Construction de l'URL avec paramètres de pagination + const url = `${publicRuntimeConfig.NEXT_PUBLIC_API_URL}/db/${tableName}?page=${page}&limit=${limit}`; + + // Appel à l'API REST + const response = await fetch(url, { + method: 'GET', + headers: { + 'Content-Type': 'application/json', + }, + }); + + if (!response.ok) { + const errorData = await response.json(); + throw new Error(errorData.message || 'Erreur lors de la récupération des données'); + } + + const data = await response.json(); + return data; + } catch (error) { + console.error('Erreur lors de l\'accès à la base de données:', error); + throw error; + } + } +} diff --git a/src/common/Api/LeCoffreApi/sdk/DeedTypeService.ts b/src/common/Api/LeCoffreApi/sdk/DeedTypeService.ts index 0a868b4c..b07dae69 100644 --- a/src/common/Api/LeCoffreApi/sdk/DeedTypeService.ts +++ b/src/common/Api/LeCoffreApi/sdk/DeedTypeService.ts @@ -1,18 +1,19 @@ import { v4 as uuidv4 } from 'uuid'; -import MessageBus from 'src/sdk/MessageBus'; import User from 'src/sdk/User'; +import AbstractService from './AbstractService'; + import DocumentTypeService from './DocumentTypeService'; -export default class DeedTypeService { +export default class DeedTypeService extends AbstractService { - private static readonly messageBus: MessageBus = MessageBus.getInstance(); - - private constructor() { } + private constructor() { + super(); + } public static createDeedType(deedTypeData: any, validatorId: string): Promise { - const ownerId = User.getInstance().getPairingId()!; + const ownerId: string = User.getInstance().getPairingId()!; const processData: any = { uid: uuidv4(), @@ -20,7 +21,7 @@ export default class DeedTypeService { isDeleted: 'false', created_at: new Date().toISOString(), updated_at: new Date().toISOString(), - ...deedTypeData, + ...deedTypeData }; const privateFields: string[] = Object.keys(processData); @@ -72,37 +73,102 @@ export default class DeedTypeService { this.messageBus.createProcess(processData, privateFields, roles).then((processCreated: any) => { this.messageBus.notifyUpdate(processCreated.processId, processCreated.process.states[0].state_id).then(() => { this.messageBus.validateState(processCreated.processId, processCreated.process.states[0].state_id).then((_stateValidated: any) => { - resolve(processCreated); + this.getDeedTypeByUid(processCreated.processData.uid).then(resolve).catch(reject); }).catch(reject); }).catch(reject); }).catch(reject); }); } - public static getDeedTypes(): Promise { - return this.messageBus.getProcessesDecoded((publicValues: any) => publicValues['uid'] && publicValues['utype'] && publicValues['utype'] === 'deedType' && publicValues['isDeleted'] && publicValues['isDeleted'] === 'false'); + public static getDeedTypes(callback: (processes: any[]) => void, waitForAll: boolean = false): void { + // Check if we have valid cache + const items: any[] = this.getItems('_deed_types_'); + if (items.length > 0 && !waitForAll) { + setTimeout(() => callback([...items]), 0); + } + + this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['utype'] && + publicValues['utype'] === 'deedType' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' && + !items.map((item: any) => item.processData.uid).includes(publicValues['uid']) + ).then(async (processes: any[]) => { + if (processes.length === 0) { + if (waitForAll) { + callback([...items]); + } + return; + } + + const updatedItems: any[] = [...items]; + + for (let processIndex = 0; processIndex < processes.length; processIndex++) { + let process = processes[processIndex]; + + if (!waitForAll) { + process = await this.completeDeedType(process, (processInProgress: any) => { + const currentItems: any[] = [...updatedItems]; + + const existingIndex: number = currentItems.findIndex(item => item.processData?.uid === processInProgress.processData?.uid); + if (existingIndex >= 0) { + currentItems[existingIndex] = processInProgress; + } else { + currentItems.push(processInProgress); + } + + callback(currentItems); + }); + } else { + process = await this.completeDeedType(process); + } + + // Update cache + this.setItem('_deed_types_', process); + + const existingIndex: number = updatedItems.findIndex(item => item.processData?.uid === process.processData?.uid); + if (existingIndex >= 0) { + updatedItems[existingIndex] = process; + } else { + updatedItems.push(process); + } + + if (!waitForAll) { + callback([...updatedItems]); + } + } + + if (waitForAll) { + callback([...updatedItems]); + } + }); } - public static getDeedTypeByUid(uid: string, includeDocumentTypes: boolean = true): Promise { + public static getDeedTypeByUid(uid: string): Promise { + // Check if we have valid cache + const item: any = this.getItem('_deed_types_', uid); + if (item) { + return Promise.resolve(item); + } + return new Promise((resolve: (process: any) => void, reject: (error: string) => void) => { - this.messageBus.getProcessesDecoded((publicValues: any) => publicValues['uid'] && publicValues['uid'] === uid && publicValues['utype'] && publicValues['utype'] === 'deedType' && publicValues['isDeleted'] && publicValues['isDeleted'] === 'false').then(async (processes: any[]) => { + this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['uid'] === uid && + publicValues['utype'] && + publicValues['utype'] === 'deedType' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' + ).then(async (processes: any[]) => { if (processes.length === 0) { resolve(null); } else { - const process: any = processes[0]; + let process: any = processes[0]; + process = await this.completeDeedType(process); - if (includeDocumentTypes && process.processData.document_types && process.processData.document_types.length > 0) { - process.processData.document_types = await new Promise(async (resolve: (document_types: any[]) => void) => { - let document_types: any[] = []; - for (const document_type of process.processData.document_types) { - const p: any = await DocumentTypeService.getDocumentTypeByUid(document_type.uid); - document_types.push(p.processData); - } - // Remove duplicates - document_types = document_types.filter((item: any, index: number) => document_types.findIndex((t: any) => t.uid === item.uid) === index); - resolve(document_types); - }); - } + // Update cache + this.setItem('_deed_types_', process); resolve(process); } @@ -111,15 +177,46 @@ export default class DeedTypeService { } public static updateDeedType(process: any, newData: any): Promise { - return new Promise((resolve: () => void, reject: (error: string) => void) => { + return new Promise((resolve: () => void) => { this.messageBus.updateProcess(process.processId, { updated_at: new Date().toISOString(), ...newData }, [], null).then((processUpdated: any) => { const newStateId: string = processUpdated.diffs[0]?.state_id; this.messageBus.notifyUpdate(process.processId, newStateId).then(() => { - this.messageBus.validateState(process.processId, newStateId).then((_stateValidated) => { + this.messageBus.validateState(process.processId, newStateId).then(() => { + // Update cache + this.setItem('_deed_types_', process); + resolve(); - }).catch(reject); - }).catch(reject); - }).catch(reject); + }).catch((error) => console.error('Failed to validate state', error)); + }).catch((error) => console.error('Failed to notify update', error)); + }).catch((error) => console.error('Failed to update', error)); }); } + + private static async completeDeedType(process: any, progressCallback?: (processInProgress: any) => void): Promise { + const progressiveProcess: any = JSON.parse(JSON.stringify(process)); + + if (process.processData.document_types && process.processData.document_types.length > 0) { + progressiveProcess.processData.document_types = []; + if (progressCallback) { + progressCallback(progressiveProcess); + } + + for (const document_type of process.processData.document_types) { + const documentTypeData = (await DocumentTypeService.getDocumentTypeByUid(document_type.uid)).processData; + progressiveProcess.processData.document_types.push(documentTypeData); + + // Remove duplicates + progressiveProcess.processData.document_types = progressiveProcess.processData.document_types + .filter((item: any, index: number) => progressiveProcess.processData.document_types.findIndex((t: any) => t.uid === item.uid) === index); + + if (progressCallback) { + progressCallback(JSON.parse(JSON.stringify(progressiveProcess))); + } + } + + process.processData.document_types = progressiveProcess.processData.document_types; + } + + return process; + } } diff --git a/src/common/Api/LeCoffreApi/sdk/DocumentService.ts b/src/common/Api/LeCoffreApi/sdk/DocumentService.ts index 987ca689..de36b38c 100644 --- a/src/common/Api/LeCoffreApi/sdk/DocumentService.ts +++ b/src/common/Api/LeCoffreApi/sdk/DocumentService.ts @@ -1,16 +1,17 @@ import { v4 as uuidv4 } from 'uuid'; -import MessageBus from 'src/sdk/MessageBus'; import User from 'src/sdk/User'; -export default class DocumentService { +import AbstractService from './AbstractService'; - private static readonly messageBus: MessageBus = MessageBus.getInstance(); +export default class DocumentService extends AbstractService { - private constructor() { } + private constructor() { + super(); + } public static createDocument(documentData: any, validatorId: string): Promise { - const ownerId = User.getInstance().getPairingId()!; + const ownerId: string = User.getInstance().getPairingId()!; const processData: any = { uid: uuidv4(), @@ -18,7 +19,7 @@ export default class DocumentService { isDeleted: 'false', created_at: new Date().toISOString(), updated_at: new Date().toISOString(), - ...documentData, + ...documentData }; const privateFields: string[] = Object.keys(processData); @@ -70,7 +71,7 @@ export default class DocumentService { this.messageBus.createProcess(processData, privateFields, roles).then((processCreated: any) => { this.messageBus.notifyUpdate(processCreated.processId, processCreated.process.states[0].state_id).then(() => { this.messageBus.validateState(processCreated.processId, processCreated.process.states[0].state_id).then((_stateValidated: any) => { - resolve(processCreated); + this.getDocumentByUid(processCreated.processData.uid).then(resolve).catch(reject); }).catch(reject); }).catch(reject); }).catch(reject); @@ -78,16 +79,55 @@ export default class DocumentService { } public static getDocuments(): Promise { - return this.messageBus.getProcessesDecoded((publicValues: any) => publicValues['uid'] && publicValues['utype'] && publicValues['utype'] === 'document' && publicValues['isDeleted'] && publicValues['isDeleted'] === 'false'); + // Check if we have valid cache + const items: any[] = this.getItems('_documents_'); + + return this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['utype'] && + publicValues['utype'] === 'document' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' && + !items.map((item: any) => item.processData.uid).includes(publicValues['uid']) + ).then((processes: any[]) => { + if (processes.length === 0) { + return items; + } else { + for (const process of processes) { + // Update cache + this.setItem('_documents_', process); + + items.push(process); + } + return items; + } + }); } public static getDocumentByUid(uid: string): Promise { + // Check if we have valid cache + const item: any = this.getItem('_documents_', uid); + if (item) { + return Promise.resolve(item); + } + return new Promise((resolve: (process: any) => void, reject: (error: string) => void) => { - this.messageBus.getProcessesDecoded((publicValues: any) => publicValues['uid'] && publicValues['uid'] === uid && publicValues['utype'] && publicValues['utype'] === 'document' && publicValues['isDeleted'] && publicValues['isDeleted'] === 'false').then((processes: any[]) => { + this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['uid'] === uid && + publicValues['utype'] && + publicValues['utype'] === 'document' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' + ).then((processes: any[]) => { if (processes.length === 0) { resolve(null); } else { const process: any = processes[0]; + + // Update cache + this.setItem('_documents_', process); + resolve(process); } }).catch(reject); @@ -100,7 +140,10 @@ export default class DocumentService { const newStateId: string = processUpdated.diffs[0]?.state_id; this.messageBus.notifyUpdate(process.processId, newStateId).then(() => { this.messageBus.validateState(process.processId, newStateId).then((_stateValidated) => { - resolve(); + const documentUid: string = process.processData.uid; + this.removeItem('_documents_', documentUid); + + this.getDocumentByUid(documentUid).then(resolve).catch(reject); }).catch(reject); }).catch(reject); }).catch(reject); diff --git a/src/common/Api/LeCoffreApi/sdk/DocumentTypeService.ts b/src/common/Api/LeCoffreApi/sdk/DocumentTypeService.ts index 1f663663..2d3de4d2 100644 --- a/src/common/Api/LeCoffreApi/sdk/DocumentTypeService.ts +++ b/src/common/Api/LeCoffreApi/sdk/DocumentTypeService.ts @@ -1,16 +1,17 @@ import { v4 as uuidv4 } from 'uuid'; -import MessageBus from 'src/sdk/MessageBus'; import User from 'src/sdk/User'; -export default class DocumentTypeService { +import AbstractService from './AbstractService'; - private static readonly messageBus: MessageBus = MessageBus.getInstance(); +export default class DocumentTypeService extends AbstractService { - private constructor() { } + private constructor() { + super(); + } public static createDocumentType(documentTypeData: any, validatorId: string): Promise { - const ownerId = User.getInstance().getPairingId()!; + const ownerId: string = User.getInstance().getPairingId()!; const processData: any = { uid: uuidv4(), @@ -18,7 +19,7 @@ export default class DocumentTypeService { isDeleted: 'false', created_at: new Date().toISOString(), updated_at: new Date().toISOString(), - ...documentTypeData, + ...documentTypeData }; const privateFields: string[] = Object.keys(processData); @@ -70,7 +71,7 @@ export default class DocumentTypeService { this.messageBus.createProcess(processData, privateFields, roles).then((processCreated: any) => { this.messageBus.notifyUpdate(processCreated.processId, processCreated.process.states[0].state_id).then(() => { this.messageBus.validateState(processCreated.processId, processCreated.process.states[0].state_id).then((_stateValidated: any) => { - resolve(processCreated); + this.getDocumentTypeByUid(processCreated.processData.uid).then(resolve).catch(reject); }).catch(reject); }).catch(reject); }).catch(reject); @@ -78,16 +79,48 @@ export default class DocumentTypeService { } public static getDocumentTypes(): Promise { - return this.messageBus.getProcessesDecoded((publicValues: any) => publicValues['uid'] && publicValues['utype'] && publicValues['utype'] === 'documentType' && publicValues['isDeleted'] && publicValues['isDeleted'] === 'false'); + // Check if we have valid cache + const items: any[] = this.getItems('_document_types_'); + + return this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['utype'] && + publicValues['utype'] === 'documentType' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' && + !items.map((item: any) => item.processData.uid).includes(publicValues['uid']) + ).then(async (processes: any[]) => { + if (processes.length === 0) { + return items; + } else { + for (const process of processes) { + // Update cache + this.setItem('_document_types_', process); + + items.push(process); + } + return items; + } + }); } public static getDocumentTypeByUid(uid: string): Promise { + // Check if we have valid cache + const item: any = this.getItem('_document_types_', uid); + if (item) { + return Promise.resolve(item); + } + return new Promise((resolve: (process: any) => void, reject: (error: string) => void) => { this.messageBus.getProcessesDecoded((publicValues: any) => publicValues['uid'] && publicValues['uid'] === uid && publicValues['utype'] && publicValues['utype'] === 'documentType' && publicValues['isDeleted'] && publicValues['isDeleted'] === 'false').then((processes: any[]) => { if (processes.length === 0) { resolve(null); } else { const process: any = processes[0]; + + // Update cache + this.setItem('_document_types_', process); + resolve(process); } }).catch(reject); @@ -100,7 +133,10 @@ export default class DocumentTypeService { const newStateId: string = processUpdated.diffs[0]?.state_id; this.messageBus.notifyUpdate(process.processId, newStateId).then(() => { this.messageBus.validateState(process.processId, newStateId).then((_stateValidated) => { - resolve(); + const documentTypeUid: string = process.processData.uid; + this.removeItem('_document_types_', documentTypeUid); + + this.getDocumentTypeByUid(documentTypeUid).then(resolve).catch(reject); }).catch(reject); }).catch(reject); }).catch(reject); diff --git a/src/common/Api/LeCoffreApi/sdk/FileService.ts b/src/common/Api/LeCoffreApi/sdk/FileService.ts index 9b639cf9..1a38e2c3 100644 --- a/src/common/Api/LeCoffreApi/sdk/FileService.ts +++ b/src/common/Api/LeCoffreApi/sdk/FileService.ts @@ -3,14 +3,16 @@ import { v4 as uuidv4 } from 'uuid'; import MessageBus from 'src/sdk/MessageBus'; import User from 'src/sdk/User'; +import { FileData } from '../../../../front/Api/Entities/types'; + export default class FileService { private static readonly messageBus: MessageBus = MessageBus.getInstance(); private constructor() { } - public static createFile(fileData: any, validatorId: string): Promise { - const ownerId = User.getInstance().getPairingId()!; + public static createFile(fileData: FileData, validatorId: string): Promise { + const ownerId: string = User.getInstance().getPairingId()!; const processData: any = { uid: uuidv4(), @@ -18,7 +20,7 @@ export default class FileService { isDeleted: 'false', created_at: new Date().toISOString(), updated_at: new Date().toISOString(), - ...fileData, + ...fileData }; const privateFields: string[] = Object.keys(processData); diff --git a/src/common/Api/LeCoffreApi/sdk/FolderService.ts b/src/common/Api/LeCoffreApi/sdk/FolderService.ts index e8e49afb..9413cc73 100644 --- a/src/common/Api/LeCoffreApi/sdk/FolderService.ts +++ b/src/common/Api/LeCoffreApi/sdk/FolderService.ts @@ -1,19 +1,24 @@ import { v4 as uuidv4 } from 'uuid'; -import MessageBus from 'src/sdk/MessageBus'; import User from 'src/sdk/User'; +import AbstractService from './AbstractService'; import CustomerService from './CustomerService'; +import CollaboratorService from './CollaboratorService'; import DeedTypeService from './DeedTypeService'; +import DocumentTypeService from './DocumentTypeService'; +import DocumentService from './DocumentService'; +import FileService from './FileService'; +import NoteService from './NoteService'; -export default class FolderService { +export default class FolderService extends AbstractService { - private static readonly messageBus: MessageBus = MessageBus.getInstance(); - - private constructor() { } + private constructor() { + super(); + } public static createFolder(folderData: any, stakeholdersId: string[], customersId: string[]): Promise { - const ownerId = User.getInstance().getPairingId()!; + const ownerId: string = User.getInstance().getPairingId()!; const processData: any = { uid: uuidv4(), @@ -21,7 +26,7 @@ export default class FolderService { isDeleted: 'false', created_at: new Date().toISOString(), updated_at: new Date().toISOString(), - ...folderData, + ...folderData }; const privateFields: string[] = Object.keys(processData); @@ -79,42 +84,135 @@ export default class FolderService { this.messageBus.createProcess(processData, privateFields, roles).then((processCreated: any) => { this.messageBus.notifyUpdate(processCreated.processId, processCreated.process.states[0].state_id).then(() => { this.messageBus.validateState(processCreated.processId, processCreated.process.states[0].state_id).then((_stateValidated: any) => { - resolve(processCreated); + this.getFolderByUid(processCreated.processData.uid).then(resolve).catch(reject); }).catch(reject); }).catch(reject); }).catch(reject); }); } - public static getFolders(): Promise { - return this.messageBus.getProcessesDecoded((publicValues: any) => publicValues['uid'] && publicValues['utype'] && publicValues['utype'] === 'folder' && publicValues['isDeleted'] && publicValues['isDeleted'] === 'false'); + public static getFolders(callback: (processes: any[]) => void, waitForAll: boolean = false): void { + // Check if we have valid cache + const items: any[] = this.getItems('_folders_'); + if (items.length > 0 && !waitForAll) { + setTimeout(() => callback([...items]), 0); + } + + this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['utype'] && + publicValues['utype'] === 'folder' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' && + !items.map((item: any) => item.processData.uid).includes(publicValues['uid']) + ).then(async (processes: any[]) => { + if (processes.length === 0) { + if (waitForAll) { + callback([...items]); + } + return; + } + + const updatedItems: any[] = [...items]; + + for (let processIndex = 0; processIndex < processes.length; processIndex++) { + let process = processes[processIndex]; + + if (!waitForAll) { + process = await this.completeFolder(process, (processInProgress: any) => { + const currentItems: any[] = [...updatedItems]; + + const existingIndex: number = currentItems.findIndex(item => item.processData?.uid === processInProgress.processData?.uid); + if (existingIndex >= 0) { + currentItems[existingIndex] = processInProgress; + } else { + currentItems.push(processInProgress); + } + + callback(currentItems); + }); + } else { + process = await this.completeFolder(process); + } + + // Update cache + this.setItem('_folders_', process); + + const existingIndex: number = updatedItems.findIndex(item => item.processData?.uid === process.processData?.uid); + if (existingIndex >= 0) { + updatedItems[existingIndex] = process; + } else { + updatedItems.push(process); + } + + if (!waitForAll) { + callback([...updatedItems]); + } + } + + if (waitForAll) { + callback([...updatedItems]); + } + }); } - public static getFolderByUid(uid: string, includeCustomers: boolean = true, includeDeedType: boolean = true): Promise { + public static getFoldersBy(whereClause: { [path: string]: any }): Promise { + return new Promise((resolve: (folders: any[]) => void) => { + this.getFolders((processes: any[]) => { + if (processes.length === 0) { + resolve([]); + } else { + resolve(processes.filter((process: any) => { + const folder: any = process.processData; + + for (const path in whereClause) { + const paths: string[] = path.split('.'); + + let value: any = folder; + for (let i = 0; i < paths.length; i++) { + const currentPath = paths[i]; + if (!currentPath || value === undefined || value === null) { + break; + } + value = value[currentPath]; + } + + if (value !== whereClause[path]) { + return false; + } + } + + return true; + })); + } + }, true); + }); + } + + public static getFolderByUid(uid: string): Promise { + // Check if we have valid cache + const item: any = this.getItem('_folders_', uid); + if (item) { + return Promise.resolve(item); + } + return new Promise((resolve: (process: any) => void, reject: (error: string) => void) => { - this.messageBus.getProcessesDecoded((publicValues: any) => publicValues['uid'] && publicValues['uid'] === uid && publicValues['utype'] && publicValues['utype'] === 'folder' && publicValues['isDeleted'] && publicValues['isDeleted'] === 'false').then(async (processes: any[]) => { + this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['uid'] === uid && + publicValues['utype'] && + publicValues['utype'] === 'folder' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' + ).then(async (processes: any[]) => { if (processes.length === 0) { resolve(null); } else { - const process: any = processes[0]; + let process: any = processes[0]; + process = await this.completeFolder(process); - if (includeCustomers && process.processData.customers && process.processData.customers.length > 0) { - process.processData.customers = await new Promise(async (resolve: (customers: any[]) => void) => { - const customers: any[] = []; - for (const uid of process.processData.customers) { - const p: any = await CustomerService.getCustomerByUid(uid); - customers.push(p.processData); - } - resolve(customers); - }); - } - - if (includeDeedType && process.processData.deed && process.processData.deed.deed_type) { - const p: any = await DeedTypeService.getDeedTypeByUid(process.processData.deed.deed_type.uid); - process.processData.deed.deed_type = p.processData; - // Remove duplicates - process.processData.deed.document_types = p.processData.document_types.filter((item: any, index: number) => p.processData.document_types.findIndex((t: any) => t.uid === item.uid) === index); - } + // Update cache + this.setItem('_folders_', process); resolve(process); } @@ -128,10 +226,103 @@ export default class FolderService { const newStateId: string = processUpdated.diffs[0]?.state_id; this.messageBus.notifyUpdate(process.processId, newStateId).then(() => { this.messageBus.validateState(process.processId, newStateId).then((_stateValidated) => { - resolve(); + const folderUid: string = process.processData.uid; + this.removeItem('_folders_', folderUid); + + this.getFolderByUid(folderUid).then(resolve).catch(reject); }).catch(reject); }).catch(reject); }).catch(reject); }); } + + public static refreshFolderByUid(uid: string): Promise { + return new Promise((resolve: () => void, reject: (error: string) => void) => { + this.getFolderByUid(uid).then((process: any) => { + this.updateFolder(process, {}).then(resolve).catch(reject); + }).catch(reject); + }); + } + + private static async completeFolder(process: any, progressCallback?: (processInProgress: any) => void): Promise { + const progressiveProcess: any = JSON.parse(JSON.stringify(process)); + + if (process.processData.customers && process.processData.customers.length > 0) { + process.processData.customers = await new Promise(async (resolve: (customers: any[]) => void) => { + const customers: any[] = []; + for (const customer of process.processData.customers) { + customers.push((await CustomerService.getCustomerByUid(customer.uid)).processData); + } + resolve(customers); + }); + + if (process.processData.customers && process.processData.customers.length > 0) { + const documents: any[] = (await DocumentService.getDocuments()).map((process: any) => process.processData); + for (const customer of process.processData.customers) { + customer.documents = documents.filter((document: any) => (document.depositor && document.depositor.uid === customer.uid) || (document.customer && document.customer.uid === customer.uid)); + + for (const document of customer.documents) { + if (document.document_type) { + document.document_type = (await DocumentTypeService.getDocumentTypeByUid(document.document_type.uid)).processData; + } + + if (document.files && document.files.length > 0) { + const files: any[] = []; + for (const file of document.files) { + files.push({ uid: file.uid, file_name: (await FileService.getFileByUid(file.uid)).processData.file_name }); + } + document.files = files; + } + } + } + } + + if (progressCallback) { + progressiveProcess.processData.customers = process.processData.customers; + progressCallback(JSON.parse(JSON.stringify(progressiveProcess))); + } + } + + if (process.processData.stakeholders && process.processData.stakeholders.length > 0) { + process.processData.stakeholders = await new Promise(async (resolve: (stakeholders: any[]) => void) => { + const stakeholders: any[] = []; + for (const stakeholder of process.processData.stakeholders) { + stakeholders.push((await CollaboratorService.getCollaboratorByUid(stakeholder.uid)).processData); + } + resolve(stakeholders); + }); + + if (progressCallback) { + progressiveProcess.processData.stakeholders = process.processData.stakeholders; + progressCallback(JSON.parse(JSON.stringify(progressiveProcess))); + } + } + + if (process.processData.deed && process.processData.deed.deed_type) { + const deed_type: any = (await DeedTypeService.getDeedTypeByUid(process.processData.deed.deed_type.uid)).processData; + process.processData.deed.deed_type = deed_type; + + if (deed_type.document_types && deed_type.document_types.length > 0) { + // Remove duplicates + process.processData.deed.document_types = deed_type.document_types.filter((item: any, index: number) => deed_type.document_types.findIndex((t: any) => t.uid === item.uid) === index); + } + + if (progressCallback) { + progressiveProcess.processData.deed = process.processData.deed; + progressCallback(JSON.parse(JSON.stringify(progressiveProcess))); + } + } + + const notes: any[] = (await NoteService.getNotes()).map((process: any) => process.processData); + if (notes.length > 0) { + process.processData.notes = notes.filter((note: any) => note.folder.uid === process.processData.uid); + + if (progressCallback) { + progressiveProcess.processData.notes = process.processData.notes; + progressCallback(JSON.parse(JSON.stringify(progressiveProcess))); + } + } + + return process; + } } diff --git a/src/common/Api/LeCoffreApi/sdk/ImportData.ts b/src/common/Api/LeCoffreApi/sdk/ImportData.ts new file mode 100644 index 00000000..eb7b00c8 --- /dev/null +++ b/src/common/Api/LeCoffreApi/sdk/ImportData.ts @@ -0,0 +1,379 @@ +import { v4 as uuidv4 } from 'uuid'; + +import User from 'src/sdk/User'; +import MessageBus from 'src/sdk/MessageBus'; + +import DatabaseService from './DatabaseService'; +import RuleService from './RuleService'; +import RuleGroupService from './RuleGroupService'; +import RoleService from './RoleService'; +import OfficeRoleService from './OfficeRoleService'; + +/** + * Type pour le callback de progression + */ +export interface ProgressInfo { + /** Progression globale (0-100) */ + globalProgress: number; + /** Nom de l'étape en cours */ + currentStep: string; + /** Progression de l'étape en cours (0-100) */ + stepProgress: number; + /** Description optionnelle de l'action en cours */ + description?: string; +} + +export default class ImportData { + + protected static readonly messageBus: MessageBus = MessageBus.getInstance(); + + public static async import(office: any, validatorId: string, onProgress?: (info: ProgressInfo) => void): Promise { + // Définir les étapes d'importation dynamiquement + const importSteps = [ + { + name: 'Règles', + function: async (progressCallback?: (subProgress: number, description?: string) => void) => + await this.importRules(progressCallback) + }, + { + name: 'Groupes de règles', + function: async (progressCallback?: (subProgress: number, description?: string) => void) => + await this.importRuleGroups(progressCallback) + }, + { + name: 'Rôles', + function: async (progressCallback?: (subProgress: number, description?: string) => void) => + await this.importRoles(progressCallback) + }, + { + name: 'Rôles d\'office', + function: async (progressCallback?: (subProgress: number, description?: string) => void, prevResults?: any[]) => + await this.importOfficeRoles(office, prevResults![1], progressCallback) + } + ]; + + // Calculer la part de progression pour chaque étape + const totalSteps = importSteps.length; + const stepWeight = 100 / totalSteps; + + // Appel du callback avec 0% au début + onProgress?.({ + globalProgress: 0, + currentStep: 'Initialisation', + stepProgress: 0, + description: 'Début de l\'importation des données' + }); + + // Exécuter chaque étape d'importation séquentiellement + const results: any[] = []; + + for (let i = 0; i < importSteps.length; i++) { + const step = importSteps[i]; + if (!step) continue; // S'assurer que l'étape existe + + const startProgress = i * stepWeight; + + // Créer un callback de progression pour cette étape + const stepProgressCallback = (subProgress: number, description?: string) => { + onProgress?.({ + globalProgress: startProgress + (subProgress * stepWeight / 100), + currentStep: step.name, + stepProgress: subProgress, + description + }); + }; + + // Exécuter l'étape et stocker le résultat si nécessaire + const result = await step.function(stepProgressCallback, results); + if (result) { + results.push(result); + } + } + + if (!await this.isDone()) { + await this.done(validatorId); + } + } + + public static async isDone(): Promise { + return await this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['utype'] && + publicValues['utype'] === 'importData' && + publicValues['isDeleted'] && publicValues['isDeleted'] === 'false' + ).then(async (processes: any[]) => processes.length > 0); + } + + private static async done(validatorId: string): Promise { + const ownerId: string = User.getInstance().getPairingId()!; + + const processData: any = { + uid: uuidv4(), + utype: 'importData', + isDeleted: 'false', + created_at: new Date().toISOString(), + updated_at: new Date().toISOString() + }; + + const privateFields: string[] = Object.keys(processData); + privateFields.splice(privateFields.indexOf('uid'), 1); + privateFields.splice(privateFields.indexOf('utype'), 1); + privateFields.splice(privateFields.indexOf('isDeleted'), 1); + + const roles: any = { + demiurge: { + members: [...[ownerId], validatorId], + validation_rules: [], + storages: [] + }, + owner: { + members: [ownerId], + validation_rules: [ + { + quorum: 0.5, + fields: [...privateFields, 'roles', 'uid', 'utype'], + min_sig_member: 1, + }, + ], + storages: [] + }, + validator: { + members: [validatorId], + validation_rules: [ + { + quorum: 0.5, + fields: ['idCertified', 'roles'], + min_sig_member: 1, + }, + { + quorum: 0.0, + fields: [...privateFields], + min_sig_member: 0, + }, + ], + storages: [] + }, + apophis: { + members: [ownerId], + validation_rules: [], + storages: [] + } + }; + + return new Promise((resolve: () => void, reject: (error: string) => void) => { + this.messageBus.createProcess(processData, privateFields, roles).then((processCreated: any) => { + this.messageBus.notifyUpdate(processCreated.processId, processCreated.process.states[0].state_id).then(() => { + this.messageBus.validateState(processCreated.processId, processCreated.process.states[0].state_id).then(() => { + resolve(); + }).catch(reject); + }).catch(reject); + }).catch(reject); + }); + } + + private static async importRules(onProgress?: (progress: number, description?: string) => void): Promise { + const rules: any[] = []; + + const INIT_PROGRESS = 0; + const FETCH_PROGRESS = 30; + const CREATE_END_PROGRESS = 90; + const FINAL_PROGRESS = 100; + onProgress?.(INIT_PROGRESS, 'Initialisation'); + + let page = 1; + let limit = 10; + let totalPages = 1; + + onProgress?.(FETCH_PROGRESS, 'Récupération des règles existantes'); + let result = await DatabaseService.getTableData('rules', page, limit); + if (result && result.success && result.pagination) { + totalPages = result.pagination.totalPages || 1; + } + + const FETCH_PAGE_PROGRESS_START = FETCH_PROGRESS; + const FETCH_PAGE_PROGRESS_END = 60; + const CREATE_START_PROGRESS = 60; + + while (result && result.success) { + const fetchPageProgress = FETCH_PAGE_PROGRESS_START + ((page / totalPages) * (FETCH_PAGE_PROGRESS_END - FETCH_PAGE_PROGRESS_START)); + + onProgress?.(fetchPageProgress, `Page ${page}/${totalPages} : Récupération des règles`); + const existingRules: any[] = (await RuleService.getRules()).map((process: any) => process.processData); + const filteredRules: any[] = result.data.filter((rule: any) => !existingRules.some((existingRule: any) => existingRule.uid === rule.uid)); + + const totalFilteredRules = filteredRules.length; + for (let i = 0; i < totalFilteredRules; i++) { + const validatorId: string = '884cb36a346a79af8697559f16940141f068bdf1656f88fa0df0e9ecd7311fb8:0'; + rules.push((await RuleService.createRule(filteredRules[i], validatorId)).processData); + + const progressRange = CREATE_END_PROGRESS - CREATE_START_PROGRESS; + const ruleProgressIncrement = progressRange / (totalFilteredRules * totalPages); + const progress = CREATE_START_PROGRESS + ((page - 1) * totalFilteredRules + i + 1) * ruleProgressIncrement; + onProgress?.(progress, `Page ${page}/${totalPages} : Création de la règle ${i + 1}/${totalFilteredRules} - ${filteredRules[i].label}`); + } + + if (!result.pagination.hasNextPage) { + break; + } + page++; + + result = await DatabaseService.getTableData('rules', page, limit); + } + + onProgress?.(FINAL_PROGRESS, 'Importation des règles terminée'); + return rules; + } + + private static async importRuleGroups(onProgress?: (progress: number, description?: string) => void): Promise { + const ruleGroups: any[] = []; + + const INIT_PROGRESS = 0; + const FETCH_PROGRESS = 30; + const CREATE_END_PROGRESS = 90; + const FINAL_PROGRESS = 100; + onProgress?.(INIT_PROGRESS, 'Initialisation'); + + let page = 1; + let limit = 10; + let totalPages = 1; + + onProgress?.(FETCH_PROGRESS, 'Récupération des groupes de règles existants'); + let result = await DatabaseService.getTableData('rules_groups', page, limit); + if (result && result.success && result.pagination) { + totalPages = result.pagination.totalPages || 1; + } + + const FETCH_PAGE_PROGRESS_START = FETCH_PROGRESS; + const FETCH_PAGE_PROGRESS_END = 60; + const CREATE_START_PROGRESS = 60; + + while (result && result.success) { + const fetchPageProgress = FETCH_PAGE_PROGRESS_START + ((page / totalPages) * (FETCH_PAGE_PROGRESS_END - FETCH_PAGE_PROGRESS_START)); + + onProgress?.(fetchPageProgress, `Page ${page}/${totalPages} : Récupération du groupe de règles`); + const existingRuleGroups: any[] = (await RuleGroupService.getRuleGroups()).map((process: any) => process.processData); + const filteredRuleGroups: any[] = result.data.filter((rule: any) => !existingRuleGroups.some((existingRule: any) => existingRule.uid === rule.uid)); + + const totalFilteredRuleGroups = filteredRuleGroups.length; + for (let i = 0; i < totalFilteredRuleGroups; i++) { + const validatorId: string = '884cb36a346a79af8697559f16940141f068bdf1656f88fa0df0e9ecd7311fb8:0'; + ruleGroups.push((await RuleGroupService.createRuleGroup(filteredRuleGroups[i], validatorId)).processData); + + const progressRange = CREATE_END_PROGRESS - CREATE_START_PROGRESS; + const ruleProgressIncrement = progressRange / (totalFilteredRuleGroups * totalPages); + const progress = CREATE_START_PROGRESS + ((page - 1) * totalFilteredRuleGroups + i + 1) * ruleProgressIncrement; + onProgress?.(progress, `Page ${page}/${totalPages} : Création du groupe de règles ${i + 1}/${totalFilteredRuleGroups} - ${filteredRuleGroups[i].label}`); + } + + if (!result.pagination.hasNextPage) { + break; + } + page++; + + result = await DatabaseService.getTableData('rules_groups', page, limit); + } + + onProgress?.(FINAL_PROGRESS, 'Importation des groupes de règles terminée'); + return ruleGroups; + } + + private static async importRoles(onProgress?: (progress: number, description?: string) => void): Promise { + // Constantes de progression - pourraient être paramétrées + const INIT_PROGRESS = 0; + const FETCH_PROGRESS = 30; + const CREATE_START_PROGRESS = FETCH_PROGRESS; + const CREATE_END_PROGRESS = 90; + const FINAL_PROGRESS = 100; + + onProgress?.(INIT_PROGRESS, 'Initialisation'); + return await new Promise((resolve: (roles: any[]) => void) => { + const defaultRoles: any[] = [ + { + name: 'super-admin', + label: 'Super administrateur' + }, + { + name: 'admin', + label: 'Administrateur' + }, + { + name: 'notary', + label: 'Notaire' + }, + { + name: 'default', + label: 'Utilisateur' + } + ]; + RoleService.getRoles().then(async (processes: any[]) => { + onProgress?.(FETCH_PROGRESS, 'Récupération des rôles existants'); + const roles: any[] = processes.map((process: any) => process.processData); + if (roles.length === 0) { + const totalRoles = defaultRoles.length; + for (let i = 0; i < totalRoles; i++) { + const validatorId: string = '884cb36a346a79af8697559f16940141f068bdf1656f88fa0df0e9ecd7311fb8:0'; + roles.push((await RoleService.createRole(defaultRoles[i], validatorId)).processData); + + // Progression dynamique pendant la création des rôles + const progressRange = CREATE_END_PROGRESS - CREATE_START_PROGRESS; + const progress = CREATE_START_PROGRESS + ((i + 1) / totalRoles) * progressRange; + onProgress?.(progress, `Création du rôle ${i + 1}/${totalRoles} : ${defaultRoles[i].label}`); + } + } + onProgress?.(FINAL_PROGRESS, 'Importation des rôles terminée'); + resolve(roles); + }); + }); + } + + private static async importOfficeRoles(office: any, ruleGroups: any[], onProgress?: (progress: number, description?: string) => void): Promise { + // Constantes de progression - pourraient être paramétrées + const INIT_PROGRESS = 0; + const FETCH_PROGRESS = 30; + const CREATE_START_PROGRESS = FETCH_PROGRESS; + const CREATE_END_PROGRESS = 90; + const FINAL_PROGRESS = 100; + + onProgress?.(INIT_PROGRESS, 'Initialisation'); + return await new Promise((resolve: (roles: any[]) => void) => { + const collaboratorRules: any[] = ruleGroups + .map((ruleGroup: any) => ruleGroup.rules) + .reduce((acc: any, curr: any) => [...acc, ...curr], []) + .map((rule: any) => ({ uid: rule.uid })); + + const defaultOfficeRoles: any[] = [ + { + name: 'Notaire', + office: { + uid: office.uid + }, + rules: collaboratorRules + }, + { + name: 'Collaborateur', + office: { + uid: office.uid + } + } + ]; + OfficeRoleService.getOfficeRoles().then(async (processes: any[]) => { + onProgress?.(FETCH_PROGRESS, 'Récupération des rôles d\'office existants'); + const officeRoles: any[] = processes.map((process: any) => process.processData); + if (officeRoles.length === 0) { + const totalOfficeRoles = defaultOfficeRoles.length; + for (let i = 0; i < totalOfficeRoles; i++) { + const validatorId: string = '884cb36a346a79af8697559f16940141f068bdf1656f88fa0df0e9ecd7311fb8:0'; + officeRoles.push((await OfficeRoleService.createOfficeRole(defaultOfficeRoles[i], validatorId)).processData); + + // Progression dynamique pendant la création des rôles d'office + const progressRange = CREATE_END_PROGRESS - CREATE_START_PROGRESS; + const progress = CREATE_START_PROGRESS + ((i + 1) / totalOfficeRoles) * progressRange; + onProgress?.(progress, `Création du rôle d'office ${i + 1}/${totalOfficeRoles} : ${defaultOfficeRoles[i].name}`); + } + } + onProgress?.(FINAL_PROGRESS, 'Importation des rôles d\'office terminée'); + resolve(officeRoles); + }); + }); + } +} diff --git a/src/common/Api/LeCoffreApi/sdk/NoteService.ts b/src/common/Api/LeCoffreApi/sdk/NoteService.ts index b80fec38..bf7254ea 100644 --- a/src/common/Api/LeCoffreApi/sdk/NoteService.ts +++ b/src/common/Api/LeCoffreApi/sdk/NoteService.ts @@ -10,7 +10,7 @@ export default class NoteService { private constructor() { } public static createNote(noteData: any, validatorId: string): Promise { - const ownerId = User.getInstance().getPairingId()!; + const ownerId: string = User.getInstance().getPairingId()!; const processData: any = { uid: uuidv4(), @@ -18,7 +18,7 @@ export default class NoteService { isDeleted: 'false', created_at: new Date().toISOString(), updated_at: new Date().toISOString(), - ...noteData, + ...noteData }; const privateFields: string[] = Object.keys(processData); diff --git a/src/common/Api/LeCoffreApi/sdk/OfficeRibService.ts b/src/common/Api/LeCoffreApi/sdk/OfficeRibService.ts new file mode 100644 index 00000000..1e3cc802 --- /dev/null +++ b/src/common/Api/LeCoffreApi/sdk/OfficeRibService.ts @@ -0,0 +1,98 @@ +import { v4 as uuidv4 } from 'uuid'; + +import MessageBus from 'src/sdk/MessageBus'; +import User from 'src/sdk/User'; + +import { FileData } from '../../../../front/Api/Entities/types'; + +export default class OfficeRibService { + + private static readonly messageBus: MessageBus = MessageBus.getInstance(); + + private constructor() { } + + public static createOfficeRib(fileData: FileData, validatorId: string): Promise { + const ownerId: string = User.getInstance().getPairingId()!; + + const processData: any = { + uid: uuidv4(), + utype: 'officeRib', + isDeleted: 'false', + created_at: new Date().toISOString(), + updated_at: new Date().toISOString(), + ...fileData + }; + + const privateFields: string[] = Object.keys(processData); + privateFields.splice(privateFields.indexOf('uid'), 1); + privateFields.splice(privateFields.indexOf('utype'), 1); + privateFields.splice(privateFields.indexOf('isDeleted'), 1); + + const roles: any = { + demiurge: { + members: [...[ownerId], validatorId], + validation_rules: [], + storages: [] + }, + owner: { + members: [ownerId], + validation_rules: [ + { + quorum: 0.5, + fields: [...privateFields, 'roles', 'uid', 'utype'], + min_sig_member: 1, + }, + ], + storages: [] + }, + validator: { + members: [validatorId], + validation_rules: [ + { + quorum: 0.5, + fields: ['idCertified', 'roles'], + min_sig_member: 1, + }, + { + quorum: 0.0, + fields: [...privateFields], + min_sig_member: 0, + }, + ], + storages: [] + }, + apophis: { + members: [ownerId], + validation_rules: [], + storages: [] + } + }; + + return new Promise((resolve: (processCreated: any) => void, reject: (error: string) => void) => { + this.messageBus.createProcess(processData, privateFields, roles).then((processCreated: any) => { + this.messageBus.notifyUpdate(processCreated.processId, processCreated.process.states[0].state_id).then(() => { + this.messageBus.validateState(processCreated.processId, processCreated.process.states[0].state_id).then((_stateValidated: any) => { + resolve(processCreated); + }).catch(reject); + }).catch(reject); + }).catch(reject); + }); + } + + public static getOfficeRib(): Promise { + return this.messageBus.getFileByUtype('officeRib'); + } + + public static updateOfficeRib(process: any, newData: any): Promise { + return new Promise((resolve: () => void, reject: (error: string) => void) => { + this.messageBus.updateProcess(process.processId, { updated_at: new Date().toISOString(), ...newData }, [], null).then((processUpdated: any) => { + const newStateId: string = processUpdated.diffs[0]?.state_id; + this.messageBus.notifyUpdate(process.processId, newStateId).then(() => { + this.messageBus.validateState(process.processId, newStateId).then((_stateValidated) => { + resolve(); + }).catch(reject); + }).catch(reject); + }).catch(reject); + }); + } +} diff --git a/src/common/Api/LeCoffreApi/sdk/OfficeRoleService.ts b/src/common/Api/LeCoffreApi/sdk/OfficeRoleService.ts new file mode 100644 index 00000000..a9aabc1d --- /dev/null +++ b/src/common/Api/LeCoffreApi/sdk/OfficeRoleService.ts @@ -0,0 +1,179 @@ +import { v4 as uuidv4 } from 'uuid'; + +import User from 'src/sdk/User'; + +import AbstractService from './AbstractService'; + +import OfficeService from './OfficeService'; +import RuleService from './RuleService'; + +export default class OfficeRoleService extends AbstractService { + + private constructor() { + super(); + } + + public static createOfficeRole(roleData: any, validatorId: string): Promise { + const ownerId: string = User.getInstance().getPairingId()!; + + const processData: any = { + uid: uuidv4(), + utype: 'officeRole', + isDeleted: 'false', + created_at: new Date().toISOString(), + updated_at: new Date().toISOString(), + ...roleData + }; + + const privateFields: string[] = Object.keys(processData); + privateFields.splice(privateFields.indexOf('uid'), 1); + privateFields.splice(privateFields.indexOf('utype'), 1); + privateFields.splice(privateFields.indexOf('isDeleted'), 1); + + const roles: any = { + demiurge: { + members: [...[ownerId], validatorId], + validation_rules: [], + storages: [] + }, + owner: { + members: [ownerId], + validation_rules: [ + { + quorum: 0.5, + fields: [...privateFields, 'roles', 'uid', 'utype'], + min_sig_member: 1, + }, + ], + storages: [] + }, + validator: { + members: [validatorId], + validation_rules: [ + { + quorum: 0.5, + fields: ['idCertified', 'roles'], + min_sig_member: 1, + }, + { + quorum: 0.0, + fields: [...privateFields], + min_sig_member: 0, + }, + ], + storages: [] + }, + apophis: { + members: [ownerId], + validation_rules: [], + storages: [] + } + }; + + return new Promise((resolve: (processCreated: any) => void, reject: (error: string) => void) => { + this.messageBus.createProcess(processData, privateFields, roles).then((processCreated: any) => { + this.messageBus.notifyUpdate(processCreated.processId, processCreated.process.states[0].state_id).then(() => { + this.messageBus.validateState(processCreated.processId, processCreated.process.states[0].state_id).then((_stateValidated: any) => { + this.getOfficeRoleByUid(processCreated.processData.uid).then(resolve).catch(reject); + }).catch(reject); + }).catch(reject); + }).catch(reject); + }); + } + + public static getOfficeRoles(): Promise { + // Check if we have valid cache + const items: any[] = this.getItems('_office_roles_'); + + return this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['utype'] && + publicValues['utype'] === 'officeRole' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' && + !items.map((item: any) => item.processData.uid).includes(publicValues['uid']) + ).then(async (processes: any[]) => { + if (processes.length === 0) { + return items; + } else { + for (let process of processes) { + process = await this.completeOfficeRole(process); + + // Update cache + this.setItem('_office_roles_', process); + + items.push(process); + } + return items; + } + }); + } + + public static getOfficeRoleByUid(uid: string): Promise { + // Check if we have valid cache + const item: any = this.getItem('_office_roles_', uid); + if (item) { + return Promise.resolve(item); + } + + return new Promise((resolve: (process: any) => void, reject: (error: string) => void) => { + this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['uid'] === uid && + publicValues['utype'] && + publicValues['utype'] === 'officeRole' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' + ).then(async (processes: any[]) => { + if (processes.length === 0) { + resolve(null); + } else { + let process: any = processes[0]; + process = await this.completeOfficeRole(process); + + // Update cache + this.setItem('_office_roles_', process); + + resolve(process); + } + }).catch(reject); + }); + } + + public static updateOfficeRole(process: any, newData: any): Promise { + return new Promise((resolve: () => void, reject: (error: string) => void) => { + this.messageBus.updateProcess(process.processId, { updated_at: new Date().toISOString(), ...newData }, [], null).then((processUpdated: any) => { + const newStateId: string = processUpdated.diffs[0]?.state_id; + this.messageBus.notifyUpdate(process.processId, newStateId).then(() => { + this.messageBus.validateState(process.processId, newStateId).then((_stateValidated) => { + const roleUid: string = process.processData.uid; + this.removeItem('_office_roles_', roleUid); + + this.getOfficeRoleByUid(roleUid).then(resolve).catch(reject); + }).catch(reject); + }).catch(reject); + }).catch(reject); + }); + } + + private static async completeOfficeRole(process: any): Promise { + if (process.processData.office) { + process.processData.office = await new Promise(async (resolve: (office: any) => void) => { + const office: any = (await OfficeService.getOfficeByUid(process.processData.office.uid)).processData; + resolve(office); + }); + } + + if (process.processData.rules && process.processData.rules.length > 0) { + process.processData.rules = await new Promise(async (resolve: (rules: any[]) => void) => { + const rules: any[] = []; + for (const rule of process.processData.rules) { + rules.push((await RuleService.getRuleByUid(rule.uid)).processData); + } + resolve(rules); + }); + } + + return process; + } +} diff --git a/src/common/Api/LeCoffreApi/sdk/OfficeService.ts b/src/common/Api/LeCoffreApi/sdk/OfficeService.ts new file mode 100644 index 00000000..4b139c9f --- /dev/null +++ b/src/common/Api/LeCoffreApi/sdk/OfficeService.ts @@ -0,0 +1,152 @@ +import { v4 as uuidv4 } from 'uuid'; + +import User from 'src/sdk/User'; + +import AbstractService from './AbstractService'; + +export default class OfficeService extends AbstractService { + + private constructor() { + super(); + } + + public static createOffice(officeData: any, validatorId: string): Promise { + const ownerId: string = User.getInstance().getPairingId()!; + + const processData: any = { + uid: uuidv4(), + utype: 'office', + isDeleted: 'false', + created_at: new Date().toISOString(), + updated_at: new Date().toISOString(), + ...officeData + }; + + const privateFields: string[] = Object.keys(processData); + privateFields.splice(privateFields.indexOf('uid'), 1); + privateFields.splice(privateFields.indexOf('utype'), 1); + privateFields.splice(privateFields.indexOf('isDeleted'), 1); + + const roles: any = { + demiurge: { + members: [...[ownerId], validatorId], + validation_rules: [], + storages: [] + }, + owner: { + members: [ownerId], + validation_rules: [ + { + quorum: 0.5, + fields: [...privateFields, 'roles', 'uid', 'utype'], + min_sig_member: 1, + }, + ], + storages: [] + }, + validator: { + members: [validatorId], + validation_rules: [ + { + quorum: 0.5, + fields: ['idCertified', 'roles'], + min_sig_member: 1, + }, + { + quorum: 0.0, + fields: [...privateFields], + min_sig_member: 0, + }, + ], + storages: [] + }, + apophis: { + members: [ownerId], + validation_rules: [], + storages: [] + } + }; + + return new Promise((resolve: (processCreated: any) => void, reject: (error: string) => void) => { + this.messageBus.createProcess(processData, privateFields, roles).then((processCreated: any) => { + this.messageBus.notifyUpdate(processCreated.processId, processCreated.process.states[0].state_id).then(() => { + this.messageBus.validateState(processCreated.processId, processCreated.process.states[0].state_id).then((_stateValidated: any) => { + this.getOfficeByUid(processCreated.processData.uid).then(resolve).catch(reject); + }).catch(reject); + }).catch(reject); + }).catch(reject); + }); + } + + public static getOffices(): Promise { + // Check if we have valid cache + const items: any[] = this.getItems('_offices_'); + + return this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['utype'] && + publicValues['utype'] === 'office' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' && + !items.map((item: any) => item.processData.uid).includes(publicValues['uid']) + ).then((processes: any[]) => { + if (processes.length === 0) { + return items; + } else { + for (const process of processes) { + // Update cache + this.setItem('_offices_', process); + + items.push(process); + } + return items; + } + }); + } + + public static getOfficeByUid(uid: string): Promise { + // Check if we have valid cache + const item: any = this.getItem('_offices_', uid); + if (item) { + return Promise.resolve(item); + } + + return new Promise((resolve: (process: any) => void, reject: (error: string) => void) => { + this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['uid'] === uid && + publicValues['utype'] && + publicValues['utype'] === 'office' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' + ).then((processes: any[]) => { + if (processes.length === 0) { + resolve(null); + } else { + const process: any = processes[0]; + + // Update cache + this.setItem('_offices_', process); + + resolve(process); + } + }).catch(reject); + }); + } + + public static updateDocument(process: any, newData: any): Promise { + return new Promise((resolve: () => void, reject: (error: string) => void) => { + this.messageBus.updateProcess(process.processId, { updated_at: new Date().toISOString(), ...newData }, [], null).then((processUpdated: any) => { + const newStateId: string = processUpdated.diffs[0]?.state_id; + this.messageBus.notifyUpdate(process.processId, newStateId).then(() => { + this.messageBus.validateState(process.processId, newStateId).then((_stateValidated) => { + const officeUid: string = process.processData.uid; + this.removeItem('_offices_', officeUid); + + this.getOfficeByUid(officeUid).then(resolve).catch(reject); + }).catch(reject); + }).catch(reject); + }).catch(reject); + }); + } +} diff --git a/src/common/Api/LeCoffreApi/sdk/RoleService.ts b/src/common/Api/LeCoffreApi/sdk/RoleService.ts index 30dea627..6f21a627 100644 --- a/src/common/Api/LeCoffreApi/sdk/RoleService.ts +++ b/src/common/Api/LeCoffreApi/sdk/RoleService.ts @@ -1,16 +1,17 @@ import { v4 as uuidv4 } from 'uuid'; -import MessageBus from 'src/sdk/MessageBus'; import User from 'src/sdk/User'; -export default class RoleService { +import AbstractService from './AbstractService'; - private static readonly messageBus: MessageBus = MessageBus.getInstance(); +export default class RoleService extends AbstractService { - private constructor() { } + private constructor() { + super(); + } public static createRole(roleData: any, validatorId: string): Promise { - const ownerId = User.getInstance().getPairingId()!; + const ownerId: string = User.getInstance().getPairingId()!; const processData: any = { uid: uuidv4(), @@ -18,7 +19,7 @@ export default class RoleService { isDeleted: 'false', created_at: new Date().toISOString(), updated_at: new Date().toISOString(), - ...roleData, + ...roleData }; const privateFields: string[] = Object.keys(processData); @@ -70,7 +71,7 @@ export default class RoleService { this.messageBus.createProcess(processData, privateFields, roles).then((processCreated: any) => { this.messageBus.notifyUpdate(processCreated.processId, processCreated.process.states[0].state_id).then(() => { this.messageBus.validateState(processCreated.processId, processCreated.process.states[0].state_id).then((_stateValidated: any) => { - resolve(processCreated); + this.getRoleByUid(processCreated.processData.uid).then(resolve).catch(reject); }).catch(reject); }).catch(reject); }).catch(reject); @@ -78,16 +79,55 @@ export default class RoleService { } public static getRoles(): Promise { - return this.messageBus.getProcessesDecoded((publicValues: any) => publicValues['uid'] && publicValues['utype'] && publicValues['utype'] === 'role' && publicValues['isDeleted'] && publicValues['isDeleted'] === 'false'); + // Check if we have valid cache + const items: any[] = this.getItems('_roles_'); + + return this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['utype'] && + publicValues['utype'] === 'role' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' && + !items.map((item: any) => item.processData.uid).includes(publicValues['uid']) + ).then(async (processes: any[]) => { + if (processes.length === 0) { + return items; + } else { + for (const process of processes) { + // Update cache + this.setItem('_roles_', process); + + items.push(process); + } + return items; + } + }); } public static getRoleByUid(uid: string): Promise { + // Check if we have valid cache + const item: any = this.getItem('_roles_', uid); + if (item) { + return Promise.resolve(item); + } + return new Promise((resolve: (process: any) => void, reject: (error: string) => void) => { - this.messageBus.getProcessesDecoded((publicValues: any) => publicValues['uid'] && publicValues['uid'] === uid && publicValues['utype'] && publicValues['utype'] === 'role' && publicValues['isDeleted'] && publicValues['isDeleted'] === 'false').then(async (processes: any[]) => { + this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['uid'] === uid && + publicValues['utype'] && + publicValues['utype'] === 'role' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' + ).then(async (processes: any[]) => { if (processes.length === 0) { resolve(null); } else { const process: any = processes[0]; + + // Update cache + this.setItem('_roles_', process); + resolve(process); } }).catch(reject); @@ -100,7 +140,10 @@ export default class RoleService { const newStateId: string = processUpdated.diffs[0]?.state_id; this.messageBus.notifyUpdate(process.processId, newStateId).then(() => { this.messageBus.validateState(process.processId, newStateId).then((_stateValidated) => { - resolve(); + const roleUid: string = process.processData.uid; + this.removeItem('_roles_', roleUid); + + this.getRoleByUid(roleUid).then(resolve).catch(reject); }).catch(reject); }).catch(reject); }).catch(reject); diff --git a/src/common/Api/LeCoffreApi/sdk/RuleGroupService.ts b/src/common/Api/LeCoffreApi/sdk/RuleGroupService.ts new file mode 100644 index 00000000..c0775cde --- /dev/null +++ b/src/common/Api/LeCoffreApi/sdk/RuleGroupService.ts @@ -0,0 +1,171 @@ +import { v4 as uuidv4 } from 'uuid'; + +import User from 'src/sdk/User'; + +import AbstractService from './AbstractService'; + +import RuleService from './RuleService'; + +export default class RuleGroupService extends AbstractService { + + private constructor() { + super(); + } + + public static createRuleGroup(ruleGroupData: any, validatorId: string): Promise { + const ownerId: string = User.getInstance().getPairingId()!; + + const processData: any = { + uid: uuidv4(), + utype: 'ruleGroup', + isDeleted: 'false', + created_at: new Date().toISOString(), + updated_at: new Date().toISOString(), + ...ruleGroupData + }; + + const privateFields: string[] = Object.keys(processData); + privateFields.splice(privateFields.indexOf('uid'), 1); + privateFields.splice(privateFields.indexOf('utype'), 1); + privateFields.splice(privateFields.indexOf('isDeleted'), 1); + + const roles: any = { + demiurge: { + members: [...[ownerId], validatorId], + validation_rules: [], + storages: [] + }, + owner: { + members: [ownerId], + validation_rules: [ + { + quorum: 0.5, + fields: [...privateFields, 'roles', 'uid', 'utype'], + min_sig_member: 1, + }, + ], + storages: [] + }, + validator: { + members: [validatorId], + validation_rules: [ + { + quorum: 0.5, + fields: ['idCertified', 'roles'], + min_sig_member: 1, + }, + { + quorum: 0.0, + fields: [...privateFields], + min_sig_member: 0, + }, + ], + storages: [] + }, + apophis: { + members: [ownerId], + validation_rules: [], + storages: [] + } + }; + + return new Promise((resolve: (processCreated: any) => void, reject: (error: string) => void) => { + this.messageBus.createProcess(processData, privateFields, roles).then((processCreated: any) => { + this.messageBus.notifyUpdate(processCreated.processId, processCreated.process.states[0].state_id).then(() => { + this.messageBus.validateState(processCreated.processId, processCreated.process.states[0].state_id).then((_stateValidated: any) => { + this.getRuleGroupByUid(processCreated.processData.uid).then(resolve).catch(reject); + }).catch(reject); + }).catch(reject); + }).catch(reject); + }); + } + + public static getRuleGroups(): Promise { + // Check if we have valid cache + const items: any[] = this.getItems('_rule_groups_'); + + return this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['utype'] && + publicValues['utype'] === 'ruleGroup' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' && + !items.map((item: any) => item.processData.uid).includes(publicValues['uid']) + ).then(async (processes: any[]) => { + if (processes.length === 0) { + return items; + } else { + for (let process of processes) { + process = await this.completeRuleGroup(process); + + // Update cache + this.setItem('_rule_groups_', process); + + items.push(process); + } + return items; + } + }); + } + + public static getRuleGroupByUid(uid: string): Promise { + // Check if we have valid cache + const item: any = this.getItem('_rule_groups_', uid); + if (item) { + return Promise.resolve(item); + } + + return new Promise((resolve: (process: any) => void, reject: (error: string) => void) => { + this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['uid'] === uid && + publicValues['utype'] && + publicValues['utype'] === 'ruleGroup' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' + ).then(async (processes: any[]) => { + if (processes.length === 0) { + resolve(null); + } else { + let process: any = processes[0]; + process = await this.completeRuleGroup(process); + + // Update cache + this.setItem('_rule_groups_', process); + + resolve(process); + } + }).catch(reject); + }); + } + + public static updateRuleGroup(process: any, newData: any): Promise { + return new Promise((resolve: () => void, reject: (error: string) => void) => { + this.messageBus.updateProcess(process.processId, { updated_at: new Date().toISOString(), ...newData }, [], null).then((processUpdated: any) => { + const newStateId: string = processUpdated.diffs[0]?.state_id; + this.messageBus.notifyUpdate(process.processId, newStateId).then(() => { + this.messageBus.validateState(process.processId, newStateId).then((_stateValidated) => { + const ruleUid: string = process.processData.uid; + this.removeItem('_rule_groups_', ruleUid); + + this.getRuleGroupByUid(ruleUid).then(resolve).catch(reject); + }).catch(reject); + }).catch(reject); + }).catch(reject); + }); + } + + private static async completeRuleGroup(process: any): Promise { + if (process.processData.rules && process.processData.rules.length > 0) { + process.processData.rules = await new Promise(async (resolve: (rules: any[]) => void) => { + const rules: any[] = []; + for (const rule of process.processData.rules) { + rules.push((await RuleService.getRuleByUid(rule.uid)).processData); + } + resolve(rules); + }); + } + + return process; + } +} diff --git a/src/common/Api/LeCoffreApi/sdk/RuleService.ts b/src/common/Api/LeCoffreApi/sdk/RuleService.ts new file mode 100644 index 00000000..9fd9bb4d --- /dev/null +++ b/src/common/Api/LeCoffreApi/sdk/RuleService.ts @@ -0,0 +1,152 @@ +import { v4 as uuidv4 } from 'uuid'; + +import User from 'src/sdk/User'; + +import AbstractService from './AbstractService'; + +export default class RuleService extends AbstractService { + + private constructor() { + super(); + } + + public static createRule(ruleData: any, validatorId: string): Promise { + const ownerId: string = User.getInstance().getPairingId()!; + + const processData: any = { + uid: uuidv4(), + utype: 'rule', + isDeleted: 'false', + created_at: new Date().toISOString(), + updated_at: new Date().toISOString(), + ...ruleData + }; + + const privateFields: string[] = Object.keys(processData); + privateFields.splice(privateFields.indexOf('uid'), 1); + privateFields.splice(privateFields.indexOf('utype'), 1); + privateFields.splice(privateFields.indexOf('isDeleted'), 1); + + const roles: any = { + demiurge: { + members: [...[ownerId], validatorId], + validation_rules: [], + storages: [] + }, + owner: { + members: [ownerId], + validation_rules: [ + { + quorum: 0.5, + fields: [...privateFields, 'roles', 'uid', 'utype'], + min_sig_member: 1, + }, + ], + storages: [] + }, + validator: { + members: [validatorId], + validation_rules: [ + { + quorum: 0.5, + fields: ['idCertified', 'roles'], + min_sig_member: 1, + }, + { + quorum: 0.0, + fields: [...privateFields], + min_sig_member: 0, + }, + ], + storages: [] + }, + apophis: { + members: [ownerId], + validation_rules: [], + storages: [] + } + }; + + return new Promise((resolve: (processCreated: any) => void, reject: (error: string) => void) => { + this.messageBus.createProcess(processData, privateFields, roles).then((processCreated: any) => { + this.messageBus.notifyUpdate(processCreated.processId, processCreated.process.states[0].state_id).then(() => { + this.messageBus.validateState(processCreated.processId, processCreated.process.states[0].state_id).then((_stateValidated: any) => { + this.getRuleByUid(processCreated.processData.uid).then(resolve).catch(reject); + }).catch(reject); + }).catch(reject); + }).catch(reject); + }); + } + + public static getRules(): Promise { + // Check if we have valid cache + const items: any[] = this.getItems('_rules_'); + + return this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['utype'] && + publicValues['utype'] === 'rule' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' && + !items.map((item: any) => item.processData.uid).includes(publicValues['uid']) + ).then((processes: any[]) => { + if (processes.length === 0) { + return items; + } else { + for (const process of processes) { + // Update cache + this.setItem('_rules_', process); + + items.push(process); + } + return items; + } + }); + } + + public static getRuleByUid(uid: string): Promise { + // Check if we have valid cache + const item: any = this.getItem('_rules_', uid); + if (item) { + return Promise.resolve(item); + } + + return new Promise((resolve: (process: any) => void, reject: (error: string) => void) => { + this.messageBus.getProcessesDecoded((publicValues: any) => + publicValues['uid'] && + publicValues['uid'] === uid && + publicValues['utype'] && + publicValues['utype'] === 'rule' && + publicValues['isDeleted'] && + publicValues['isDeleted'] === 'false' + ).then((processes: any[]) => { + if (processes.length === 0) { + resolve(null); + } else { + const process: any = processes[0]; + + // Update cache + this.setItem('_rules_', process); + + resolve(process); + } + }).catch(reject); + }); + } + + public static updateRule(process: any, newData: any): Promise { + return new Promise((resolve: () => void, reject: (error: string) => void) => { + this.messageBus.updateProcess(process.processId, { updated_at: new Date().toISOString(), ...newData }, [], null).then((processUpdated: any) => { + const newStateId: string = processUpdated.diffs[0]?.state_id; + this.messageBus.notifyUpdate(process.processId, newStateId).then(() => { + this.messageBus.validateState(process.processId, newStateId).then((_stateValidated) => { + const ruleUid: string = process.processData.uid; + this.removeItem('_rules_', ruleUid); + + this.getRuleByUid(ruleUid).then(resolve).catch(reject); + }).catch(reject); + }).catch(reject); + }).catch(reject); + }); + } +} diff --git a/src/front/Api/Auth/IdNot/index.ts b/src/front/Api/Auth/IdNot/index.ts index 6e27e505..2aad0c33 100644 --- a/src/front/Api/Auth/IdNot/index.ts +++ b/src/front/Api/Auth/IdNot/index.ts @@ -40,15 +40,15 @@ export default class Auth extends BaseApiService { } } - public async getIdnotJwt(autorizationCode: string | string[]): Promise<{ accessToken: string; refreshToken: string }> { - const variables = FrontendVariables.getInstance(); + public async getIdNotUser(autorizationCode: string | string[]): Promise<{ idNotUser: any }> { + // const variables = FrontendVariables.getInstance(); // TODO: review - const baseBackUrl = 'http://localhost:8080'//variables.BACK_API_PROTOCOL + variables.BACK_API_HOST; + const baseBackUrl = 'http://localhost:8080';//variables.BACK_API_PROTOCOL + variables.BACK_API_HOST; const url = new URL(`${baseBackUrl}/api/v1/idnot/user/${autorizationCode}`); try { - return await this.postRequest<{ accessToken: string; refreshToken: string }>(url); + return await this.postRequest<{ idNotUser: any }>(url); } catch (err) { this.onError(err); return Promise.reject(err); diff --git a/src/front/Api/BaseApiService.ts b/src/front/Api/BaseApiService.ts index 01ad7443..6541d135 100644 --- a/src/front/Api/BaseApiService.ts +++ b/src/front/Api/BaseApiService.ts @@ -56,7 +56,7 @@ export default abstract class BaseApiService { } protected async postRequest(url: URL, body: { [key: string]: unknown } = {}, token?: string) { - await this.checkJwtToken(); + //await this.checkJwtToken(); return this.sendRequest( async () => await fetch(url, { diff --git a/src/front/Api/Entities/index.ts b/src/front/Api/Entities/index.ts new file mode 100644 index 00000000..e322dc9c --- /dev/null +++ b/src/front/Api/Entities/index.ts @@ -0,0 +1,2 @@ +export * from './types'; +export * from './rule'; \ No newline at end of file diff --git a/src/front/Api/Entities/types.ts b/src/front/Api/Entities/types.ts new file mode 100644 index 00000000..06087a1f --- /dev/null +++ b/src/front/Api/Entities/types.ts @@ -0,0 +1,21 @@ +/** + * FileBlob interface representing a file's binary data and metadata + * Used for file transmission and storage in the application + */ +export interface FileBlob { + /** MIME type of the file (e.g., "application/pdf", "image/jpeg") */ + type: string; + /** Binary data of the file as Uint8Array */ + data: Uint8Array; +} + +/** + * FileData interface representing a complete file object with blob and metadata + * Used when creating or updating files in the system + */ +export interface FileData { + /** The file blob containing type and binary data */ + file_blob: FileBlob; + /** The name of the file */ + file_name: string; +} \ No newline at end of file diff --git a/src/front/Api/LeCoffreApi/Notary/Customers/Customers.ts b/src/front/Api/LeCoffreApi/Notary/Customers/Customers.ts index f9378372..a36c547b 100644 --- a/src/front/Api/LeCoffreApi/Notary/Customers/Customers.ts +++ b/src/front/Api/LeCoffreApi/Notary/Customers/Customers.ts @@ -88,10 +88,15 @@ export default class Customers extends BaseNotary { } } - public async sendReminder(uid: string, documentsUid: string[]): Promise { - const url = new URL(this.baseURl.concat(`/${uid}/send_reminder`)); + public async sendReminder(office: any, customer: any): Promise { + // TODO: review + const baseBackUrl = 'http://localhost:8080';//variables.BACK_API_PROTOCOL + variables.BACK_API_HOST; + + const url = new URL(`${baseBackUrl}/api/send_reminder`); + + //const url = new URL(this.baseURl.concat(`/${uid}/send_reminder`)); try { - await this.postRequest(url, { documentsUid }); + await this.postRequest(url, { office, customer }); } catch (err) { this.onError(err); return Promise.reject(err); diff --git a/src/front/Components/DesignSystem/DepositOtherDocument/index.tsx b/src/front/Components/DesignSystem/DepositOtherDocument/index.tsx index c6398dfa..2b43286d 100644 --- a/src/front/Components/DesignSystem/DepositOtherDocument/index.tsx +++ b/src/front/Components/DesignSystem/DepositOtherDocument/index.tsx @@ -16,9 +16,12 @@ import Button, { EButtonstyletype, EButtonVariant } from "../Button"; import Confirm from "../OldModal/Confirm"; import Alert from "../OldModal/Alert"; -import DocumentService from "src/common/Api/LeCoffreApi/sdk/DocumentService"; import LoaderService from "src/common/Api/LeCoffreApi/sdk/Loader/LoaderService"; +import DocumentService from "src/common/Api/LeCoffreApi/sdk/DocumentService"; import FileService from "src/common/Api/LeCoffreApi/sdk/FileService"; +import CustomerService from "src/common/Api/LeCoffreApi/sdk/CustomerService"; +import FolderService from "src/common/Api/LeCoffreApi/sdk/FolderService"; +import WatermarkService from "@Front/Services/WatermarkService"; type IProps = { onChange?: (files: File[]) => void; @@ -238,46 +241,65 @@ export default class DepositOtherDocument extends React.Component((resolve: (customer: any) => void) => { + CustomerService.getCustomerByUid(this.props.customer_uid).then((process: any) => { + if (process) { + const customer: any = process.processData; + resolve(customer); + } + }); + }); + for (let i = 0; i < filesArray.length; i++) { const file = filesArray[i]!.file; await new Promise((resolve: () => void) => { - const reader = new FileReader(); - reader.onload = (event) => { - if (event.target?.result) { - const arrayBuffer = event.target.result as ArrayBuffer; - const uint8Array = new Uint8Array(arrayBuffer); + // Add watermark to the file before processing + WatermarkService.getInstance().addWatermark(file).then(async (watermarkedFile) => { + const reader = new FileReader(); + reader.onload = (event) => { + if (event.target?.result) { + const date: Date = new Date(); + const strDate: string = `${date.getDate().toString().padStart(2, '0')}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getFullYear()}`; - const fileBlob: any = { - type: file.type, - data: uint8Array - }; + const fileName: string = `${file.name.split('.')[0]}_${strDate}.${file.name.split('.').pop()}`; - const fileData: any = { - file_blob: fileBlob, - file_name: file.name - }; - const validatorId: string = '884cb36a346a79af8697559f16940141f068bdf1656f88fa0df0e9ecd7311fb8:0'; + const arrayBuffer: ArrayBuffer = event.target.result as ArrayBuffer; + const uint8Array: Uint8Array = new Uint8Array(arrayBuffer); - FileService.createFile(fileData, validatorId).then((processCreated: any) => { - const fileUid: string = processCreated.processData.uid; + const fileBlob: any = { + type: watermarkedFile.type, + data: uint8Array + }; - DocumentService.getDocumentByUid(documentCreated.uid).then((process: any) => { - if (process) { - const document: any = process.processData; + const fileData: any = { + file_blob: fileBlob, + file_name: fileName + }; + const validatorId: string = '884cb36a346a79af8697559f16940141f068bdf1656f88fa0df0e9ecd7311fb8:0'; - let files: any[] = document.files; - if (!files) { - files = []; + FileService.createFile(fileData, validatorId).then((processCreated: any) => { + const fileUid: string = processCreated.processData.uid; + + DocumentService.getDocumentByUid(documentCreated.uid).then((process: any) => { + if (process) { + const document: any = process.processData; + + let files: any[] = document.files; + if (!files) { + files = []; + } + files.push({ uid: fileUid }); + + DocumentService.updateDocument(process, { files: files, document_status: EDocumentStatus.DEPOSITED }).then(() => { + FolderService.refreshFolderByUid(document.folder.uid).then(() => resolve()); + }); } - files.push({ uid: fileUid }); - - DocumentService.updateDocument(process, { files: files, document_status: EDocumentStatus.DEPOSITED }).then(() => resolve()); - } + }); }); - }); - } - }; - reader.readAsArrayBuffer(file); + } + }; + reader.readAsArrayBuffer(watermarkedFile); + }); }); } diff --git a/src/front/Components/DesignSystem/DragAndDrop/index.tsx b/src/front/Components/DesignSystem/DragAndDrop/index.tsx index 29896fc4..bc2a8021 100644 --- a/src/front/Components/DesignSystem/DragAndDrop/index.tsx +++ b/src/front/Components/DesignSystem/DragAndDrop/index.tsx @@ -213,9 +213,9 @@ export default function DragAndDrop(props: IProps) { {documentFiles.length > 0 && (
- {documentFiles.map((documentFile) => ( + {documentFiles.map((documentFile, index) => ( handleRemove(documentFile)} diff --git a/src/front/Components/DesignSystem/Header/Navigation/index.tsx b/src/front/Components/DesignSystem/Header/Navigation/index.tsx index d72b3a15..328ebbdc 100644 --- a/src/front/Components/DesignSystem/Header/Navigation/index.tsx +++ b/src/front/Components/DesignSystem/Header/Navigation/index.tsx @@ -1,6 +1,4 @@ import { AppRuleActions, AppRuleNames } from "@Front/Api/Entities/rule"; -import Notifications from "@Front/Api/LeCoffreApi/Notary/Notifications/Notifications"; -import OfficeFolderAnchors from "@Front/Api/LeCoffreApi/Notary/OfficeFolderAnchors/OfficeFolderAnchors"; import Rules, { RulesMode } from "@Front/Components/Elements/Rules"; import Module from "@Front/Config/Module"; import Toasts from "@Front/Stores/Toasts"; @@ -29,7 +27,7 @@ export default function Navigation() { }, }); */ - const anchors = [] as any[]; + // const anchors = [] as any[]; /* TODO: review try { diff --git a/src/front/Components/DesignSystem/Header/Profile/ProfileModal/index.tsx b/src/front/Components/DesignSystem/Header/Profile/ProfileModal/index.tsx index 535151e9..a6fcc448 100644 --- a/src/front/Components/DesignSystem/Header/Profile/ProfileModal/index.tsx +++ b/src/front/Components/DesignSystem/Header/Profile/ProfileModal/index.tsx @@ -8,6 +8,7 @@ import MenuItem from "@Front/Components/DesignSystem/Menu/MenuItem"; type IProps = { isOpen: boolean; closeModal: () => void; + isCustomer?: boolean; }; type IState = {}; @@ -19,29 +20,31 @@ export default class ProfileModal extends React.Component { <>
- + />} - + />} - - + />} + +
); diff --git a/src/front/Components/DesignSystem/Header/Profile/index.tsx b/src/front/Components/DesignSystem/Header/Profile/index.tsx index e2d66719..4298665f 100644 --- a/src/front/Components/DesignSystem/Header/Profile/index.tsx +++ b/src/front/Components/DesignSystem/Header/Profile/index.tsx @@ -9,7 +9,7 @@ import ProfileModal from "./ProfileModal"; const headerBreakpoint = 1023; -export default function Profile() { +export default function Profile(props: { isCustomer?: boolean }) { const { isOpen, toggle, close } = useOpenable(); useEffect(() => { @@ -27,7 +27,7 @@ export default function Profile() { return (
} onClick={toggle} /> - +
); } diff --git a/src/front/Components/DesignSystem/Header/index.tsx b/src/front/Components/DesignSystem/Header/index.tsx index 5a45f63f..aea3aa66 100644 --- a/src/front/Components/DesignSystem/Header/index.tsx +++ b/src/front/Components/DesignSystem/Header/index.tsx @@ -1,17 +1,16 @@ import LogoIcon from "@Assets/logo_standard_neutral.svg"; -import Stripe from "@Front/Api/LeCoffreApi/Admin/Stripe/Stripe"; -import Subscriptions from "@Front/Api/LeCoffreApi/Admin/Subscriptions/Subscriptions"; +// import Stripe from "@Front/Api/LeCoffreApi/Admin/Stripe/Stripe"; +// import Subscriptions from "@Front/Api/LeCoffreApi/Admin/Subscriptions/Subscriptions"; import Module from "@Front/Config/Module"; -import JwtService from "@Front/Services/JwtService/JwtService"; -import { InformationCircleIcon, LifebuoyIcon } from "@heroicons/react/24/outline"; +// import JwtService from "@Front/Services/JwtService/JwtService"; +import { LifebuoyIcon } from "@heroicons/react/24/outline"; import Head from "next/head"; import Image from "next/image"; import Link from "next/link"; import { useRouter } from "next/router"; -import React, { useCallback, useEffect, useState } from "react"; +import React, { useCallback, useEffect } from "react"; import IconButton from "../IconButton"; -import Typography, { ETypo, ETypoColor } from "../Typography"; import BurgerMenu from "./BurgerMenu"; import classes from "./classes.module.scss"; import LogoCielNatureIcon from "./logo-ciel-notaires.jpeg"; @@ -21,18 +20,19 @@ import Profile from "./Profile"; type IProps = { isUserConnected: boolean; + isCustomer?: boolean; }; const headerHeight = 75; export default function Header(props: IProps) { - const { isUserConnected } = props; + const { isUserConnected, isCustomer } = props; const router = useRouter(); const { pathname } = router; const isOnCustomerLoginPage = Module.getInstance().get().modules.pages.CustomersLogin.props.path === pathname; - const [cancelAt, setCancelAt] = useState(null); + // const [cancelAt, setCancelAt] = useState(null); const loadSubscription = useCallback(async () => { /* TODO: review @@ -63,7 +63,7 @@ export default function Header(props: IProps) { logo
- {isUserConnected && ( + {isUserConnected && !isCustomer && ( <>
@@ -84,9 +84,14 @@ export default function Header(props: IProps) {
)} + {isCustomer && ( +
+ +
+ )} {isOnCustomerLoginPage && ciel-nature}
- {cancelAt && ( + {/* {cancelAt && (
@@ -94,7 +99,7 @@ export default function Header(props: IProps) { {cancelAt.toLocaleDateString()}.
- )} + )} */} ); } diff --git a/src/front/Components/DesignSystem/LogOutButton/index.tsx b/src/front/Components/DesignSystem/LogOutButton/index.tsx index 6e1b1e13..197a0634 100644 --- a/src/front/Components/DesignSystem/LogOutButton/index.tsx +++ b/src/front/Components/DesignSystem/LogOutButton/index.tsx @@ -6,14 +6,18 @@ import React, { useCallback } from "react"; import MenuItem from "../Menu/MenuItem"; -export default function LogOut() { +export default function LogOut(props: { isCustomer?: boolean }) { const router = useRouter(); const variables = FrontendVariables.getInstance(); const disconnect = useCallback(() => { - UserStore.instance - .disconnect() - .then(() => router.push(`https://qual-connexion.idnot.fr/user/auth/logout?sourceURL=${variables.FRONT_APP_HOST}`)); + if (!props.isCustomer) { + UserStore.instance + .disconnect() + .then(() => router.push(`https://qual-connexion.idnot.fr/user/auth/logout?sourceURL=${variables.FRONT_APP_HOST}`)); + } else { + router.push("/"); + } }, [router, variables.FRONT_APP_HOST]); return , onClick: disconnect }} />; diff --git a/src/front/Components/Elements/Rules/index.tsx b/src/front/Components/Elements/Rules/index.tsx index a0ac67f7..235a01b2 100644 --- a/src/front/Components/Elements/Rules/index.tsx +++ b/src/front/Components/Elements/Rules/index.tsx @@ -4,6 +4,8 @@ import { IAppRule } from "@Front/Api/Entities/rule"; import { useRouter } from "next/router"; import Module from "@Front/Config/Module"; +import UserStore from "@Front/Stores/UserStore"; + export enum RulesMode { OPTIONAL = "optional", NECESSARY = "necessary", @@ -20,19 +22,23 @@ export default function Rules(props: IProps) { const router = useRouter(); const [isShowing, setIsShowing] = React.useState(false); - const [hasJwt, setHasJwt] = React.useState(false); + // const [hasJwt, setHasJwt] = React.useState(false); const getShowValue = useCallback(() => { + //const user: any = UserStore.instance.getUser(); if (props.mode === RulesMode.NECESSARY) { + //return user.isAdmin && user.isAdmin === 'true'; return props.rules.every((rule) => JwtService.getInstance().hasRule(rule.name, rule.action)); } + //const ruleNames: string[] = props.rules.map((rule: any) => rule.name); + //return user.role.rules.map((rule: any) => rule.name).filter((ruleName: string) => ruleNames.includes(ruleName)).length > 0; return props.rules.length === 0 || !!props.rules.find((rule) => JwtService.getInstance().hasRule(rule.name, rule.action)); }, [props.mode, props.rules]); useEffect(() => { // TODO: review //if (!JwtService.getInstance().decodeJwt()) return; - setHasJwt(true); + // setHasJwt(true); setIsShowing(getShowValue()); }, [getShowValue, isShowing]); diff --git a/src/front/Components/Elements/Tabs/index.tsx b/src/front/Components/Elements/Tabs/index.tsx index 603cad29..e99cd955 100644 --- a/src/front/Components/Elements/Tabs/index.tsx +++ b/src/front/Components/Elements/Tabs/index.tsx @@ -58,13 +58,12 @@ export default function Tabs({ onSelect, tabs: propsTabs }: IProps) { useEffect(() => { tabs.current = propsTabs; - // TODO: review - setTimeout(() => { - calculateVisibleElements(); - if (tabs.current && tabs.current.length > 0 && tabs.current[0]) { - setSelectedTab(tabs.current[0].value); - } - }, 150); + if (tabs.current && tabs.current.length > 0 && tabs.current[0]) { + setSelectedTab(tabs.current[0].value); + onSelect(tabs.current[0].value); + + setTimeout(() => calculateVisibleElements(), 100); + } }, [propsTabs]); useEffect(() => { diff --git a/src/front/Components/LayoutTemplates/DefaultCollaboratorDashboard/index.tsx b/src/front/Components/LayoutTemplates/DefaultCollaboratorDashboard/index.tsx index 315a81cf..ae7e6524 100644 --- a/src/front/Components/LayoutTemplates/DefaultCollaboratorDashboard/index.tsx +++ b/src/front/Components/LayoutTemplates/DefaultCollaboratorDashboard/index.tsx @@ -2,11 +2,12 @@ import React, { useEffect } from "react"; import { useRouter } from "next/router"; import Module from "@Front/Config/Module"; +import UserStore from "@Front/Stores/UserStore"; import { IBlock } from "@Front/Components/DesignSystem/SearchBlockList/BlockList/Block"; import DefaultDashboardWithList, { IPropsDashboardWithList } from "../DefaultDashboardWithList"; import User from "le-coffre-resources/dist/Notary"; -import JwtService from "@Front/Services/JwtService/JwtService"; -import Users, { IGetUsersparams } from "@Front/Api/LeCoffreApi/Admin/Users/Users"; + +import CollaboratorService from "src/common/Api/LeCoffreApi/sdk/CollaboratorService"; type IProps = IPropsDashboardWithList; @@ -33,7 +34,20 @@ export default function DefaultCollaboratorDashboard(props: IProps) { .get(query) .then((users) => setCollaborators(users)); */ - setCollaborators([]); + + const user: any = UserStore.instance.getUser(); + const officeId: string = user.office.uid; + + CollaboratorService.getCollaborators((processes: any[]) => { + if (processes.length > 0) { + let collaborators: any[] = processes.map((process: any) => process.processData); + + // FilterBy office.uid + collaborators = collaborators.filter((collaborator: any) => collaborator.office.uid === officeId); + + setCollaborators(collaborators); + } + }); }, []); const onSelectedBlock = (block: IBlock) => { @@ -49,10 +63,10 @@ export default function DefaultCollaboratorDashboard(props: IProps) { blocks={ collaborators ? collaborators.map((collaborator) => ({ - id: collaborator.uid!, - primaryText: collaborator.contact?.first_name + " " + collaborator.contact?.last_name, - isActive: collaborator.uid === collaboratorUid, - })) + id: collaborator.uid!, + primaryText: collaborator.contact?.first_name + " " + collaborator.contact?.last_name, + isActive: collaborator.uid === collaboratorUid, + })) : [] } /> diff --git a/src/front/Components/LayoutTemplates/DefaultCustomerDashboard/index.tsx b/src/front/Components/LayoutTemplates/DefaultCustomerDashboard/index.tsx index d539fb3b..8400f1f8 100644 --- a/src/front/Components/LayoutTemplates/DefaultCustomerDashboard/index.tsx +++ b/src/front/Components/LayoutTemplates/DefaultCustomerDashboard/index.tsx @@ -9,7 +9,9 @@ import DefaultDashboardWithList, { IPropsDashboardWithList } from "../DefaultDas import FolderService from "src/common/Api/LeCoffreApi/sdk/FolderService"; -type IProps = IPropsDashboardWithList & {}; +type IProps = IPropsDashboardWithList & { + isReady: boolean; +}; export default function DefaultCustomerDashboard(props: IProps) { const router = useRouter(); @@ -17,8 +19,8 @@ export default function DefaultCustomerDashboard(props: IProps) { const [folders, setFolders] = useState([]); useEffect(() => { - const jwt = JwtService.getInstance().decodeCustomerJwt(); - if (!jwt) return; + //const jwt = JwtService.getInstance().decodeCustomerJwt(); + //if (!jwt) return; /* Folders.getInstance() @@ -46,13 +48,19 @@ export default function DefaultCustomerDashboard(props: IProps) { .then((folders) => setFolders(folders)); */ - FolderService.getFolders().then((processes: any[]) => { - if (processes.length > 0) { - const folders: any[] = processes.map((process: any) => process.processData); - setFolders(folders); - } - }); - }, []); + if (props.isReady) { + FolderService.getFolders((processes: any[]) => { + if (processes.length > 0) { + let folders: any[] = processes.map((process: any) => process.processData); + + // Filter By customer.uid + folders = folders.filter((folder: any) => folder.customers.some((customer: any) => customer.uid === profileUid)); + + setFolders(folders); + } + }); + } + }, [props.isReady]); const onSelectedBlock = (block: IBlock) => { const folder = folders.find((folder) => folder.uid === block.id); @@ -65,7 +73,7 @@ export default function DefaultCustomerDashboard(props: IProps) { .replace("[profileUid]", profileUid as string ?? ""), ); }; - return ; + return ; function getBlocks(folders: OfficeFolder[]): IBlock[] { return folders.map((folder) => { diff --git a/src/front/Components/LayoutTemplates/DefaultDashboardWithList/index.tsx b/src/front/Components/LayoutTemplates/DefaultDashboardWithList/index.tsx index 5261e700..5fc1d600 100644 --- a/src/front/Components/LayoutTemplates/DefaultDashboardWithList/index.tsx +++ b/src/front/Components/LayoutTemplates/DefaultDashboardWithList/index.tsx @@ -15,6 +15,7 @@ export type IPropsDashboardWithList = { mobileBackText?: string; headerConnected?: boolean; noPadding?: boolean; + isCustomer?: boolean; }; type IProps = IPropsDashboardWithList & ISearchBlockListProps; @@ -29,11 +30,12 @@ export default function DefaultDashboardWithList(props: IProps) { headerConnected = true, bottomButton, noPadding = false, + isCustomer = false, } = props; return (
-
+
diff --git a/src/front/Components/LayoutTemplates/DefaultDeedTypeDashboard/index.tsx b/src/front/Components/LayoutTemplates/DefaultDeedTypeDashboard/index.tsx index 877408b1..018c4f63 100644 --- a/src/front/Components/LayoutTemplates/DefaultDeedTypeDashboard/index.tsx +++ b/src/front/Components/LayoutTemplates/DefaultDeedTypeDashboard/index.tsx @@ -11,21 +11,24 @@ import DeedTypeService from "src/common/Api/LeCoffreApi/sdk/DeedTypeService"; type IProps = IPropsDashboardWithList; export default function DefaultDeedTypeDashboard(props: IProps) { - const [deedTypes, setDeedTypes] = React.useState(null); const router = useRouter(); + const { deedTypeUid } = router.query; + const [deedTypes, setDeedTypes] = React.useState(null); useEffect(() => { - DeedTypeService.getDeedTypes().then((processes: any) => { - let deedTypes = processes.map((process: any) => process.processData); + DeedTypeService.getDeedTypes((processes: any[]) => { + if (processes.length > 0) { + let deedTypes = processes.map((process: any) => process.processData); - // FilterBy archived_at = null or not defined - deedTypes = deedTypes.filter((deedType: any) => !deedType.archived_at); + // FilterBy archived_at = null or not defined + deedTypes = deedTypes.filter((deedType: any) => !deedType.archived_at); - // OrderBy name asc - deedTypes.sort((a: any, b: any) => a.name.localeCompare(b.name)); + // OrderBy name asc + deedTypes.sort((a: any, b: any) => a.name.localeCompare(b.name)); - setDeedTypes(deedTypes); + setDeedTypes(deedTypes); + } }); }, []); diff --git a/src/front/Components/LayoutTemplates/DefaultDocumentTypesDashboard/index.tsx b/src/front/Components/LayoutTemplates/DefaultDocumentTypesDashboard/index.tsx index de28f865..3a04273e 100644 --- a/src/front/Components/LayoutTemplates/DefaultDocumentTypesDashboard/index.tsx +++ b/src/front/Components/LayoutTemplates/DefaultDocumentTypesDashboard/index.tsx @@ -7,6 +7,7 @@ import JwtService from "@Front/Services/JwtService/JwtService"; import { DocumentType } from "le-coffre-resources/dist/Notary"; import DocumentTypeService from "src/common/Api/LeCoffreApi/sdk/DocumentTypeService"; +import UserStore from "@Front/Stores/UserStore"; type IProps = IPropsDashboardWithList; @@ -15,11 +16,8 @@ export default function DefaultDocumentTypeDashboard(props: IProps) { const router = useRouter(); const { documentTypeUid } = router.query; useEffect(() => { - const jwt = JwtService.getInstance().decodeJwt(); - if (!jwt) return; - - // TODO: review - const officeId = 'demo_notary_office_id'; // jwt.office_Id; + const user: any = UserStore.instance.getUser(); + const officeId: string = user.office.uid; DocumentTypeService.getDocumentTypes().then((processes: any[]) => { if (processes.length > 0) { diff --git a/src/front/Components/LayoutTemplates/DefaultNotaryDashboard/index.tsx b/src/front/Components/LayoutTemplates/DefaultNotaryDashboard/index.tsx index b4d3d506..f7161440 100644 --- a/src/front/Components/LayoutTemplates/DefaultNotaryDashboard/index.tsx +++ b/src/front/Components/LayoutTemplates/DefaultNotaryDashboard/index.tsx @@ -115,7 +115,7 @@ export default function DefaultNotaryDashboard(props: IProps) { .then((folders) => setFolders(folders)); */ - FolderService.getFolders().then((processes: any[]) => { + FolderService.getFolders((processes: any[]) => { if (processes.length > 0) { let folders: any[] = processes.map((process: any) => process.processData); diff --git a/src/front/Components/LayoutTemplates/DefaultOfficeDashboard/index.tsx b/src/front/Components/LayoutTemplates/DefaultOfficeDashboard/index.tsx index ab34dcf2..f3ed0714 100644 --- a/src/front/Components/LayoutTemplates/DefaultOfficeDashboard/index.tsx +++ b/src/front/Components/LayoutTemplates/DefaultOfficeDashboard/index.tsx @@ -1,25 +1,26 @@ -import { Office } from "le-coffre-resources/dist/SuperAdmin"; import React, { useEffect } from "react"; import { useRouter } from "next/router"; import Module from "@Front/Config/Module"; import { IBlock } from "@Front/Components/DesignSystem/SearchBlockList/BlockList/Block"; import DefaultDashboardWithList, { IPropsDashboardWithList } from "../DefaultDashboardWithList"; -import Offices from "@Front/Api/LeCoffreApi/SuperAdmin/Offices/Offices"; + +import OfficeService from "src/common/Api/LeCoffreApi/sdk/OfficeService"; type IProps = IPropsDashboardWithList; export default function DefaultOfficeDashboard(props: IProps) { - const [offices, setOffices] = React.useState(null); + const [offices, setOffices] = React.useState(null); const router = useRouter(); const { officeUid } = router.query; + useEffect(() => { - /* TODO: review - Offices.getInstance() - .get() - .then((offices) => setOffices(offices)); - */ - setOffices([]); + OfficeService.getOffices().then((processes: any[]) => { + if (processes.length > 0) { + const offices: any[] = processes.map((process: any) => process.processData); + setOffices(offices); + } + }); }, []); const onSelectedBlock = (block: IBlock) => { @@ -33,11 +34,11 @@ export default function DefaultOfficeDashboard(props: IProps) { blocks={ offices ? offices.map((office) => ({ - id: office.uid!, - primaryText: office.name, - isActive: office.uid === officeUid, - secondaryText: office.crpcen, - })) + id: office.uid!, + primaryText: office.name, + isActive: office.uid === officeUid, + secondaryText: office.crpcen, + })) : [] } /> diff --git a/src/front/Components/LayoutTemplates/DefaultRoleDashboard/index.tsx b/src/front/Components/LayoutTemplates/DefaultRoleDashboard/index.tsx index 00f3d709..c08cb70d 100644 --- a/src/front/Components/LayoutTemplates/DefaultRoleDashboard/index.tsx +++ b/src/front/Components/LayoutTemplates/DefaultRoleDashboard/index.tsx @@ -4,32 +4,41 @@ import { useRouter } from "next/router"; import Module from "@Front/Config/Module"; import { IBlock } from "@Front/Components/DesignSystem/SearchBlockList/BlockList/Block"; import DefaultDashboardWithList, { IPropsDashboardWithList } from "../DefaultDashboardWithList"; -import { OfficeRole } from "le-coffre-resources/dist/Notary"; -import OfficeRoles, { IGetRolesParams } from "@Front/Api/LeCoffreApi/Admin/OfficeRoles/OfficeRoles"; -import RoleService from "src/common/Api/LeCoffreApi/sdk/RoleService"; +import UserStore from "@Front/Stores/UserStore"; + +import OfficeRoleService from "src/common/Api/LeCoffreApi/sdk/OfficeRoleService"; type IProps = IPropsDashboardWithList; export default function DefaultRoleDashboard(props: IProps) { - const [roles, setRoles] = React.useState(null); + const [roles, setRoles] = React.useState(null); + const router = useRouter(); const { roleUid } = router.query; + useEffect(() => { - /* TODO: review - const query: IGetRolesParams = { - include: { rules: true }, - }; + const user: any = UserStore.instance.getUser(); + if (!user) { + return; + } - OfficeRoles.getInstance() - .get(query) - .then((roles) => setRoles(roles)); - */ + const office: any = user.office; + if (!office) { + return; + } - RoleService.getRoles().then((processes: any[]) => { + OfficeRoleService.getOfficeRoles().then(async (processes: any[]) => { if (processes.length > 0) { - const roles: any[] = processes.map((process: any) => process.processData); - setRoles(roles); + let officeRoles: any[] = processes.map((process: any) => process.processData); + + // FilterBy office.uid + officeRoles = officeRoles.filter((officeRole: any) => officeRole.office.uid === office.uid); + + // OrderBy name + officeRoles = officeRoles.sort((a: any, b: any) => a.name.localeCompare(b.name)); + + setRoles(officeRoles); } }); }, []); diff --git a/src/front/Components/LayoutTemplates/DefaultUserDashboard/index.tsx b/src/front/Components/LayoutTemplates/DefaultUserDashboard/index.tsx index 84b22acd..070ffc0a 100644 --- a/src/front/Components/LayoutTemplates/DefaultUserDashboard/index.tsx +++ b/src/front/Components/LayoutTemplates/DefaultUserDashboard/index.tsx @@ -1,28 +1,34 @@ -import Users, { IGetUsersparams } from "@Front/Api/LeCoffreApi/SuperAdmin/Users/Users"; -import User from "le-coffre-resources/dist/SuperAdmin"; import React, { useEffect } from "react"; import { useRouter } from "next/router"; import Module from "@Front/Config/Module"; import { IBlock } from "@Front/Components/DesignSystem/SearchBlockList/BlockList/Block"; import DefaultDashboardWithList, { IPropsDashboardWithList } from "../DefaultDashboardWithList"; +import UserStore from "@Front/Stores/UserStore"; + +import CollaboratorService from "src/common/Api/LeCoffreApi/sdk/CollaboratorService"; type IProps = IPropsDashboardWithList; export default function DefaultUserDashboard(props: IProps) { - const [users, setUsers] = React.useState(null); + const [users, setUsers] = React.useState(null); const router = useRouter(); const { userUid } = router.query; useEffect(() => { - /* TODO: review - const query: IGetUsersparams = { - include: { contact: true, office_membership: true }, - }; - Users.getInstance() - .get(query) - .then((users) => setUsers(users)); - */ - setUsers([]); + const user: any = UserStore.instance.getUser(); + if (!user) return; + const officeId: string = user.office.uid; + + CollaboratorService.getCollaborators((processes: any[]) => { + if (processes.length > 0) { + let collaborators: any[] = processes.map((process: any) => process.processData); + + // FilterBy office.uid + collaborators = collaborators.filter((collaborator: any) => collaborator.office.uid === officeId); + + setUsers(collaborators); + } + }); }, []); const onSelectedBlock = (block: IBlock) => { @@ -36,11 +42,11 @@ export default function DefaultUserDashboard(props: IProps) { blocks={ users ? users.map((user) => ({ - id: user.uid!, - primaryText: user.contact?.first_name + " " + user.contact?.last_name, - isActive: user.uid === userUid, - secondaryText: user.office_membership?.crpcen + " - " + user.office_membership?.name, - })) + id: user.uid!, + primaryText: user.contact?.first_name + " " + user.contact?.last_name, + isActive: user.uid === userUid, + secondaryText: user.office?.crpcen + " - " + user.office?.name, + })) : [] } /> diff --git a/src/front/Components/Layouts/ClientDashboard/ContactBox/index.tsx b/src/front/Components/Layouts/ClientDashboard/ContactBox/index.tsx index e84bfeea..fcfb51d6 100644 --- a/src/front/Components/Layouts/ClientDashboard/ContactBox/index.tsx +++ b/src/front/Components/Layouts/ClientDashboard/ContactBox/index.tsx @@ -6,7 +6,8 @@ import { OfficeFolder as OfficeFolderNotary } from "le-coffre-resources/dist/Not import { useCallback, useEffect, useMemo, useState } from "react"; import classes from "./classes.module.scss"; -import OfficeRib from "@Front/Api/LeCoffreApi/Customer/OfficeRib/OfficeRib"; + +import OfficeRibService from "src/common/Api/LeCoffreApi/sdk/OfficeRibService"; type IProps = { folder: OfficeFolderNotary; @@ -18,20 +19,8 @@ export default function ContactBox(props: IProps) { const [ribUrl, setRibUrl] = useState(null); - // TODO: review - const stakeholder = { - cell_phone_number: "0606060606", - phone_number: "0606060606", - email: "test@lecoffre.fr", - }; - const notaryContact = useMemo( - () => - /*folder?.stakeholders!.find((stakeholder) => stakeholder.office_role?.name === "Notaire")?.contact ?? - folder?.stakeholders![0]!.contact*/ - - // TODO: review - stakeholder, + () => folder?.stakeholders!.find((stakeholder) => stakeholder.office_role?.name === "Notaire")?.contact ?? folder?.stakeholders![0]!.contact, [folder], ); @@ -47,11 +36,13 @@ export default function ContactBox(props: IProps) { useEffect(() => { if (!folder?.office?.uid) return; - /* TODO: review - OfficeRib.getInstance() - .getRibStream(folder.office.uid) - .then((blob) => setRibUrl(URL.createObjectURL(blob))); - */ + OfficeRibService.getOfficeRib().then((process: any) => { + if (process) { + const officeRib: any = process.processData; + const fileBlob: Blob = new Blob([officeRib.file_blob.data], { type: officeRib.file_blob.type }); + setRibUrl(URL.createObjectURL(fileBlob)); + } + }); }, [folder]); const downloadRib = useCallback(async () => { diff --git a/src/front/Components/Layouts/ClientDashboard/DepositDocumentComponent/index.tsx b/src/front/Components/Layouts/ClientDashboard/DepositDocumentComponent/index.tsx index 3f9ae3e6..4cc67148 100644 --- a/src/front/Components/Layouts/ClientDashboard/DepositDocumentComponent/index.tsx +++ b/src/front/Components/Layouts/ClientDashboard/DepositDocumentComponent/index.tsx @@ -7,16 +7,21 @@ import { EDocumentStatus } from "le-coffre-resources/dist/Customer/Document"; import { ToasterService } from "@Front/Components/DesignSystem/Toaster"; import Confirm from "@Front/Components/DesignSystem/OldModal/Confirm"; -import FileService from "src/common/Api/LeCoffreApi/sdk/FileService"; +import FolderService from "src/common/Api/LeCoffreApi/sdk/FolderService"; import DocumentService from "src/common/Api/LeCoffreApi/sdk/DocumentService"; +import FileService from "src/common/Api/LeCoffreApi/sdk/FileService"; + +import { FileBlob, FileData } from "@Front/Api/Entities/types"; +import WatermarkService from "@Front/Services/WatermarkService"; type IProps = { document: any; + customer: any; onChange: () => void; }; export default function DepositDocumentComponent(props: IProps) { - const { document, onChange } = props; + const { document, customer, onChange } = props; const [isModalOpen, setIsModalOpen] = useState(false); const [refused_reason, setRefusedReason] = useState(null); @@ -30,50 +35,115 @@ export default function DepositDocumentComponent(props: IProps) { }, [document.files]); const addFile = useCallback( - (file: File) => { - return new Promise( - (resolve: () => void) => { - const reader = new FileReader(); - reader.onload = (event) => { - if (event.target?.result) { - const arrayBuffer = event.target.result as ArrayBuffer; - const uint8Array = new Uint8Array(arrayBuffer); + async (file: File) => { + try { + // Add watermark to the file before processing + const watermarkedFile = await WatermarkService.getInstance().addWatermark(file); - const fileBlob: any = { - type: file.type, - data: uint8Array - }; + return new Promise( + (resolve: () => void) => { + const reader = new FileReader(); + reader.onload = (event) => { + if (event.target?.result) { + const date: Date = new Date(); + const strDate: string = `${date.getDate().toString().padStart(2, '0')}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getFullYear()}`; - const fileData: any = { - file_blob: fileBlob, - file_name: file.name - }; - const validatorId: string = '884cb36a346a79af8697559f16940141f068bdf1656f88fa0df0e9ecd7311fb8:0'; + const fileName: string = `${document.document_type.name}-${customer.contact.last_name}_${strDate}.${file.name.split('.').pop()}`; - FileService.createFile(fileData, validatorId).then((processCreated: any) => { - const fileUid: string = processCreated.processData.uid; + const arrayBuffer: ArrayBuffer = event.target.result as ArrayBuffer; + const uint8Array: Uint8Array = new Uint8Array(arrayBuffer); - DocumentService.getDocumentByUid(document.uid!).then((process: any) => { - if (process) { - const document: any = process.processData; + const fileBlob: FileBlob = { + type: watermarkedFile.type, + data: uint8Array + }; - let files: any[] = document.files; - if (!files) { - files = []; + const fileData: FileData = { + file_blob: fileBlob, + file_name: fileName + }; + const validatorId: string = '884cb36a346a79af8697559f16940141f068bdf1656f88fa0df0e9ecd7311fb8:0'; + + FileService.createFile(fileData, validatorId).then((processCreated: any) => { + const fileUid: string = processCreated.processData.uid; + + DocumentService.getDocumentByUid(document.uid!).then((process: any) => { + if (process) { + const document: any = process.processData; + + let files: any[] = document.files; + if (!files) { + files = []; + } + files.push({ uid: fileUid }); + + DocumentService.updateDocument(process, { files: files, document_status: EDocumentStatus.DEPOSITED }).then(() => { + FolderService.refreshFolderByUid(document.folder.uid).then(() => resolve()); + }); } - files.push({ uid: fileUid }); - - DocumentService.updateDocument(process, { files: files, document_status: EDocumentStatus.DEPOSITED }).then(() => resolve()); - } + }); }); - }); - } - }; - reader.readAsArrayBuffer(file); - }) - .then(onChange) - .then(() => ToasterService.getInstance().success({ title: "Succès !", description: "Fichier uploadé avec succès!" })) - .catch((error) => ToasterService.getInstance().error({ title: "Erreur !", description: error.message })); + } + }; + reader.readAsArrayBuffer(watermarkedFile); + }) + .then(onChange) + .then(() => ToasterService.getInstance().success({ title: "Succès !", description: "Fichier uploadé avec succès!" })) + .catch((error) => ToasterService.getInstance().error({ title: "Erreur !", description: error.message })); + } catch (error) { + console.error('Error processing file with watermark:', error); + // If watermarking fails, proceed with original file + return new Promise( + (resolve: () => void) => { + const reader = new FileReader(); + reader.onload = (event) => { + if (event.target?.result) { + const date: Date = new Date(); + const strDate: string = `${date.getDate().toString().padStart(2, '0')}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getFullYear()}`; + + const fileName: string = `${document.document_type.name}-${customer.contact.last_name}_${strDate}.${file.name.split('.').pop()}`; + + const arrayBuffer: ArrayBuffer = event.target.result as ArrayBuffer; + const uint8Array: Uint8Array = new Uint8Array(arrayBuffer); + + const fileBlob: FileBlob = { + type: file.type, + data: uint8Array + }; + + const fileData: FileData = { + file_blob: fileBlob, + file_name: fileName + }; + const validatorId: string = '884cb36a346a79af8697559f16940141f068bdf1656f88fa0df0e9ecd7311fb8:0'; + + FileService.createFile(fileData, validatorId).then((processCreated: any) => { + const fileUid: string = processCreated.processData.uid; + + DocumentService.getDocumentByUid(document.uid!).then((process: any) => { + if (process) { + const document: any = process.processData; + + let files: any[] = document.files; + if (!files) { + files = []; + } + files.push({ uid: fileUid }); + + DocumentService.updateDocument(process, { files: files, document_status: EDocumentStatus.DEPOSITED }).then(() => { + FolderService.refreshFolderByUid(document.folder.uid).then(() => resolve()); + }); + } + }); + }); + } + }; + reader.readAsArrayBuffer(file); + }) + .then(onChange) + .then(() => ToasterService.getInstance().success({ title: "Succès !", description: "Fichier uploadé avec succès!" })) + .catch((error) => ToasterService.getInstance().error({ title: "Erreur !", description: error.message })); + } }, [document.uid, onChange], ); @@ -82,9 +152,9 @@ export default function DepositDocumentComponent(props: IProps) { (fileUid: string) => { return new Promise( (resolve: () => void) => { - FileService.getFileByUid(fileUid).then((process: any) => { - if (process) { - FileService.updateFile(process, { isDeleted: 'true' }).then(() => { + FileService.getFileByUid(fileUid).then((res: any) => { + if (res) { + FileService.updateFile(res.processId, { isDeleted: 'true', archived_at: new Date().toISOString() }).then(() => { DocumentService.getDocumentByUid(document.uid!).then((process: any) => { if (process) { const document: any = process.processData; @@ -95,7 +165,9 @@ export default function DepositDocumentComponent(props: IProps) { } files = files.filter((file: any) => file.uid !== fileUid); - DocumentService.updateDocument(process, { files: files, document_status: EDocumentStatus.ASKED }).then(() => resolve()); + DocumentService.updateDocument(process, { files: files, document_status: EDocumentStatus.ASKED }).then(() => { + FolderService.refreshFolderByUid(document.folder.uid).then(() => resolve()); + }); } }); }); diff --git a/src/front/Components/Layouts/ClientDashboard/ReceivedDocuments/index.tsx b/src/front/Components/Layouts/ClientDashboard/ReceivedDocuments/index.tsx index c137971e..8062c0d8 100644 --- a/src/front/Components/Layouts/ClientDashboard/ReceivedDocuments/index.tsx +++ b/src/front/Components/Layouts/ClientDashboard/ReceivedDocuments/index.tsx @@ -6,7 +6,7 @@ import Typography, { ETypo, ETypoColor } from "@Front/Components/DesignSystem/Ty import BackArrow from "@Front/Components/Elements/BackArrow"; import DefaultTemplate from "@Front/Components/LayoutTemplates/DefaultTemplate"; import Module from "@Front/Config/Module"; -import JwtService, { ICustomerJwtPayload } from "@Front/Services/JwtService/JwtService"; +// import JwtService, { ICustomerJwtPayload } from "@Front/Services/JwtService/JwtService"; import { ArrowDownTrayIcon, EyeIcon } from "@heroicons/react/24/outline"; import { saveAs } from "file-saver"; import JSZip from "jszip"; @@ -16,6 +16,7 @@ import classes from "./classes.module.scss"; import Link from "next/link"; import Customer from "le-coffre-resources/dist/Customer"; import { DocumentNotary } from "le-coffre-resources/dist/Notary"; +import { EDocumentNotaryStatus } from "le-coffre-resources/dist/Notary/DocumentNotary"; import FolderService from "src/common/Api/LeCoffreApi/sdk/FolderService"; import DocumentService from "src/common/Api/LeCoffreApi/sdk/DocumentService"; @@ -44,10 +45,10 @@ export default function ReceivedDocuments() { const [customer, setCustomer] = useState(null); const fetchFolderAndCustomer = useCallback(async () => { - let jwt: ICustomerJwtPayload | undefined; - if (typeof document !== "undefined") { - jwt = JwtService.getInstance().decodeCustomerJwt(); - } + // let jwt: ICustomerJwtPayload | undefined; + // if (typeof document !== "undefined") { + // jwt = JwtService.getInstance().decodeCustomerJwt(); + // } // TODO: review LoaderService.getInstance().show(); @@ -115,7 +116,7 @@ export default function ReceivedDocuments() { let documents: any[] = processes.map((process: any) => process.processData); // FilterBy folder.uid & customer.uid - documents = documents.filter((document: any) => document.folder.uid === folderUid && document.customer && document.customer.uid === customerUid); + documents = documents.filter((document: any) => document.folder.uid === folderUid && document.customer /*&& document.customer.uid === customerUid*/); for (const document of documents) { if (document.files && document.files.length > 0) { @@ -133,10 +134,24 @@ export default function ReceivedDocuments() { }); }, [folderUid, customer]); - const onDownload = useCallback((doc: any) => { + const onDownload = useCallback(async (doc: any) => { const file = doc.files?.[0]; if (!file) return; + if (doc.document_status !== EDocumentNotaryStatus.DOWNLOADED) { + await new Promise((resolve: () => void) => { + LoaderService.getInstance().show(); + DocumentService.getDocumentByUid(doc.uid).then((process: any) => { + if (process) { + DocumentService.updateDocument(process, { document_status: EDocumentNotaryStatus.DOWNLOADED }).then(() => { + LoaderService.getInstance().hide(); + resolve(); + }); + } + }); + }); + } + return new Promise((resolve: () => void) => { const blob = new Blob([file.file_blob.data], { type: file.file_blob.type }); const url = URL.createObjectURL(blob); @@ -158,9 +173,23 @@ export default function ReceivedDocuments() { const zip = new JSZip(); const folder = zip.folder("documents") || zip; - documentsNotary.map((doc: any) => { + documentsNotary.map(async (doc: any) => { const file = doc.files?.[0]; if (file) { + if (doc.document_status !== EDocumentNotaryStatus.DOWNLOADED) { + await new Promise((resolve: () => void) => { + LoaderService.getInstance().show(); + DocumentService.getDocumentByUid(doc.uid).then((process: any) => { + if (process) { + DocumentService.updateDocument(process, { document_status: EDocumentNotaryStatus.DOWNLOADED }).then(() => { + LoaderService.getInstance().hide(); + resolve(); + }); + } + }); + }); + } + const blob = new Blob([file.file_blob.data], { type: file.file_blob.type }); folder.file(file.file_name ?? "file", blob); } @@ -208,7 +237,7 @@ function buildRows( ): IRowProps[] { return documentsNotary.map((documentNotary) => ({ key: documentNotary.uid ?? "", - name: formatName(documentNotary.files?.[0]?.file_name?.split(".")?.[0] ?? "") || "_", + name: documentNotary.files?.[0]?.file_name?.split(".")?.[0] || "_", sentAt: new Date(documentNotary.created_at!).toLocaleDateString(), // actions: onDownloadFileNotary(documentNotary)} icon={} />, actions: { @@ -228,7 +257,3 @@ function buildRows( }, })); } - -function formatName(text: string): string { - return text.replace(/[^a-zA-Z0-9 ]/g, ""); -} diff --git a/src/front/Components/Layouts/ClientDashboard/ViewDocumentsNotary/index.tsx b/src/front/Components/Layouts/ClientDashboard/ViewDocumentsNotary/index.tsx index 89a6af09..b9cf69df 100644 --- a/src/front/Components/Layouts/ClientDashboard/ViewDocumentsNotary/index.tsx +++ b/src/front/Components/Layouts/ClientDashboard/ViewDocumentsNotary/index.tsx @@ -7,6 +7,7 @@ import { DocumentNotary } from "le-coffre-resources/dist/Notary"; import Image from "next/image"; import { NextRouter, useRouter } from "next/router"; import React from "react"; +import { FileBlob } from "@Front/Api/Entities/types"; import BasePage from "../../Base"; import classes from "./classes.module.scss"; @@ -28,8 +29,8 @@ type IState = { isValidateModalVisible: boolean; refuseText: string; selectedFileIndex: number; - selectedFile: any; - documentNotary: DocumentNotary | null; + selectedFile: { uid: string; file_name: string; file_blob: FileBlob } | null; + documentNotary: any | null; fileBlob: Blob | null; isLoading: boolean; }; @@ -150,7 +151,7 @@ class ViewDocumentsNotaryClass extends BasePage { { documentNotary, selectedFileIndex: 0, - selectedFile: documentNotary.files![0]!, + selectedFile: documentNotary.files![0] as any, isLoading: false, }, () => { @@ -167,7 +168,7 @@ class ViewDocumentsNotaryClass extends BasePage { private async getFilePreview(): Promise { try { - const fileBlob: Blob = new Blob([this.state.selectedFile.file_blob.data], { type: this.state.selectedFile.file_blob.type }); + const fileBlob: Blob = new Blob([this.state.selectedFile!.file_blob.data], { type: this.state.selectedFile!.file_blob.type }); this.setState({ fileBlob, }); diff --git a/src/front/Components/Layouts/ClientDashboard/index.tsx b/src/front/Components/Layouts/ClientDashboard/index.tsx index c02202dd..d9b948fd 100644 --- a/src/front/Components/Layouts/ClientDashboard/index.tsx +++ b/src/front/Components/Layouts/ClientDashboard/index.tsx @@ -22,9 +22,6 @@ import ContactBox from "./ContactBox"; import { EDocumentNotaryStatus } from "le-coffre-resources/dist/Notary/DocumentNotary"; import DepositOtherDocument from "@Front/Components/DesignSystem/DepositOtherDocument"; -import Modal from "@Front/Components/DesignSystem/Modal"; -import TextField from "@Front/Components/DesignSystem/Form/TextField"; - import AuthModal from "src/sdk/AuthModal"; import FolderService from "src/common/Api/LeCoffreApi/sdk/FolderService"; @@ -46,31 +43,8 @@ export default function ClientDashboard(props: IProps) { const [documentsNotary, setDocumentsNotary] = useState([]); const [isAddDocumentModalVisible, setIsAddDocumentModalVisible] = useState(false); - const [isAuthModalOpen, setIsAuthModalOpen] = useState(false); - const [isSmsModalOpen, setIsSmsModalOpen] = useState(false); - const [smsCode, setSmsCode] = useState(""); - const [smsError, setSmsError] = useState(""); - - const verifySmsCode = useCallback(() => { - if (smsCode === "1234") { - setIsSmsModalOpen(false); - } else { - setSmsError("Code incorrect. Le code valide est 1234."); - } - }, [smsCode]); - - useEffect(() => { - const handleKeyPress = (e: KeyboardEvent) => { - if (e.key === "Enter" && isSmsModalOpen) { - verifySmsCode(); - } - }; - - window.addEventListener("keypress", handleKeyPress); - return () => { - window.removeEventListener("keypress", handleKeyPress); - }; - }, [isSmsModalOpen, smsCode, verifySmsCode]); + const [isReady, setIsReady] = useState(false); + const [isAuthModalOpen, setIsAuthModalOpen] = useState(true); const fetchFolderAndCustomer = useCallback(async () => { let jwt: ICustomerJwtPayload | undefined; @@ -97,7 +71,6 @@ export default function ClientDashboard(props: IProps) { setCustomer(customer); setFolder(folder); - setIsAuthModalOpen(true); LoaderService.getInstance().hide(); return { folder, customer }; @@ -138,6 +111,7 @@ export default function ClientDashboard(props: IProps) { const fetchDocuments = useCallback( async (customerUid: string | undefined) => { + setDocuments([]); LoaderService.getInstance().show(); return new Promise((resolve: () => void) => { DocumentService.getDocuments().then(async (processes: any[]) => { @@ -171,14 +145,16 @@ export default function ClientDashboard(props: IProps) { [folderUid], ); + /* useEffect(() => { fetchFolderAndCustomer().then(({ customer }) => fetchDocuments(customer.uid)); }, [fetchDocuments, fetchFolderAndCustomer]); + */ useEffect(() => { + setDocumentsNotary([]); const customerUid = customer?.uid; if (!folderUid || !customerUid) return; - LoaderService.getInstance().show(); DocumentService.getDocuments().then(async (processes: any[]) => { if (processes.length > 0) { @@ -235,8 +211,8 @@ export default function ClientDashboard(props: IProps) { }, [customer, folderUid, isAddDocumentModalVisible, onCloseModalAddDocument, folder]); return ( - -
+ + {isReady && (
@@ -315,6 +291,7 @@ export default function ClientDashboard(props: IProps) { fetchDocuments(customer?.uid)} /> ))} @@ -332,58 +309,16 @@ export default function ClientDashboard(props: IProps) { Ajouter d'autres documents {isAddDocumentModalVisible && renderBox()} +
)} - {isAuthModalOpen && { - setIsAuthModalOpen(false); - setIsSmsModalOpen(true); - }} - />} - - {isSmsModalOpen && ( - setIsSmsModalOpen(false)} - title="Vérification SMS" - > -
- - Veuillez saisir le code à 4 chiffres que vous avez reçu par SMS - - - { - const value = e.target.value; - // Only allow digits - if (value === "" || /^\d+$/.test(value)) { - setSmsCode(value); - setSmsError(""); - } - }} - /> - - {smsError && ( - - {smsError} - - )} - -
- -
-
-
- )} -
+ {isAuthModalOpen && { + setIsReady(true); + setIsAuthModalOpen(false); + fetchFolderAndCustomer().then(({ customer }) => fetchDocuments(customer.uid)); + }} + />} ); } diff --git a/src/front/Components/Layouts/Collaborators/CollaboratorInformations/index.tsx b/src/front/Components/Layouts/Collaborators/CollaboratorInformations/index.tsx index 9e6553b0..98724800 100644 --- a/src/front/Components/Layouts/Collaborators/CollaboratorInformations/index.tsx +++ b/src/front/Components/Layouts/Collaborators/CollaboratorInformations/index.tsx @@ -1,14 +1,10 @@ import { ChevronLeftIcon } from "@heroicons/react/24/solid"; -import OfficeRoles from "@Front/Api/LeCoffreApi/Admin/OfficeRoles/OfficeRoles"; -import Roles from "@Front/Api/LeCoffreApi/Admin/Roles/Roles"; -import Users from "@Front/Api/LeCoffreApi/Admin/Users/Users"; import Button, { EButtonstyletype, EButtonVariant } from "@Front/Components/DesignSystem/Button"; import Confirm from "@Front/Components/DesignSystem/OldModal/Confirm"; import Switch from "@Front/Components/DesignSystem/Switch"; import Typography, { ETypo, ETypoColor } from "@Front/Components/DesignSystem/Typography"; import DefaultCollaboratorDashboard from "@Front/Components/LayoutTemplates/DefaultCollaboratorDashboard"; import Module from "@Front/Config/Module"; -import User, { OfficeRole } from "le-coffre-resources/dist/Admin"; import Link from "next/link"; import { useRouter } from "next/router"; import { useCallback, useEffect, useState } from "react"; @@ -18,12 +14,17 @@ import { IOption } from "@Front/Components/DesignSystem/Dropdown/DropdownMenu/Dr import { getLabel } from "@Front/Components/DesignSystem/Dropdown"; import SelectField from "@Front/Components/DesignSystem/Form/SelectField"; +import LoaderService from "src/common/Api/LeCoffreApi/sdk/Loader/LoaderService"; +import CollaboratorService from "src/common/Api/LeCoffreApi/sdk/CollaboratorService"; +import OfficeRoleService from "src/common/Api/LeCoffreApi/sdk/OfficeRoleService"; +import RoleService from "src/common/Api/LeCoffreApi/sdk/RoleService"; + type IProps = {}; export default function CollaboratorInformations(props: IProps) { const router = useRouter(); let { collaboratorUid } = router.query; - const [userSelected, setUserSelected] = useState(null); + const [userSelected, setUserSelected] = useState(null); const [availableRoles, setAvailableRoles] = useState([]); const [roleModalOpened, setRoleModalOpened] = useState(false); @@ -35,7 +36,7 @@ export default function CollaboratorInformations(props: IProps) { useEffect(() => { if (!userSelected) return; - setIsAdminChecked(userSelected.role?.name === "admin"); + setIsAdminChecked(userSelected.role.name === "admin"); }, [userSelected]); const handleRoleChange = useCallback((option: IOption) => { @@ -46,60 +47,54 @@ export default function CollaboratorInformations(props: IProps) { const closeRoleModal = useCallback(() => { setRoleModalOpened(false); setSelectedOption({ - id: (userSelected?.office_role ? userSelected?.office_role?.uid : userSelected?.role?.uid) ?? "", - label: userSelected?.office_role ? userSelected?.office_role?.name : "Utilisateur restreint", + id: userSelected?.role?.uid ?? "", + label: userSelected?.role?.name ?? "Utilisateur restreint" }); - }, [userSelected?.office_role, userSelected?.role?.uid]); + }, [userSelected?.role]); const changeRole = useCallback(async () => { - await Users.getInstance().put( - userSelected?.uid as string, - User.hydrate({ - uid: userSelected?.uid as string, - office_role: OfficeRole.hydrate({ - uid: selectedOption?.id as string, - }), - }), - ); - setRoleModalOpened(false); + LoaderService.getInstance().show(); + CollaboratorService.getCollaboratorByUid(collaboratorUid as string).then((process: any) => { + if (process) { + CollaboratorService.updateCollaborator(process, { office_role: { uid: selectedOption?.id as string } }).then(() => { + LoaderService.getInstance().hide(); + setRoleModalOpened(false); + }); + } + }); }, [selectedOption, userSelected]); const changeAdmin = useCallback(async () => { try { if (adminRoleType === "add") { - const adminRole = await Roles.getInstance().getOne({ - where: { - name: "admin", - }, - }); + LoaderService.getInstance().show(); + CollaboratorService.getCollaboratorByUid(collaboratorUid as string).then(async (process: any) => { + if (process) { + const role: any = (await RoleService.getRoles()) + .map((process: any) => process.processData) + .filter((role: any) => role.name === "admin")[0]; - if (!adminRole) return; - await Users.getInstance().put( - userSelected?.uid as string, - User.hydrate({ - uid: userSelected?.uid as string, - office_role: undefined, - role: adminRole, - }), - ); + CollaboratorService.updateCollaborator(process, { role: { uid: role.uid } }).then(() => { + LoaderService.getInstance().hide(); + setAdminModalOpened(false); + }); + } + }); } else { - const defaultRole = await Roles.getInstance().getOne({ - where: { - name: "default", - }, - }); + LoaderService.getInstance().show(); + CollaboratorService.getCollaboratorByUid(collaboratorUid as string).then(async (process: any) => { + if (process) { + const role: any = (await RoleService.getRoles()) + .map((process: any) => process.processData) + .filter((role: any) => role.name === "default")[0]; - if (!defaultRole) return; - await Users.getInstance().put( - userSelected?.uid as string, - User.hydrate({ - uid: userSelected?.uid as string, - office_role: undefined, - role: defaultRole, - }), - ); + CollaboratorService.updateCollaborator(process, { role: { uid: role.uid } }).then(() => { + LoaderService.getInstance().hide(); + setAdminModalOpened(false); + }); + } + }); } - setAdminModalOpened(false); } catch (e) { console.error(e); } @@ -113,37 +108,29 @@ export default function CollaboratorInformations(props: IProps) { }, []); const closeAdminModal = useCallback(() => { - setIsAdminChecked(userSelected?.role?.name === "admin" && !userSelected.office_role); + setIsAdminChecked(userSelected?.role.name === "admin"); setAdminModalOpened(false); }, [userSelected]); useEffect(() => { async function getUser() { if (!collaboratorUid) return; - const user = await Users.getInstance().getByUid(collaboratorUid as string, { - q: { - contact: true, - office_role: true, - role: true, - seats: { - include: { - subscription: true, - }, - }, - }, - }); - if (!user) return; + LoaderService.getInstance().show(); + CollaboratorService.getCollaboratorByUid(collaboratorUid as string).then(async (process: any) => { + if (process) { + const collaborator: any = process.processData; - const roles = await OfficeRoles.getInstance().get(); - if (!roles) return; - setAvailableRoles(roles.map((role) => ({ id: role.uid ?? "", label: role.name }))); - setUserSelected(user); - setSelectedOption({ - id: (user?.office_role ? user?.office_role?.uid : user?.role?.uid) ?? "", - label: user?.office_role ? user?.office_role?.name : "Utilisateur restreint", + const officeRoles: any[] = (await OfficeRoleService.getOfficeRoles()) + .map((process: any) => process.processData); + + setUserSelected(collaborator); + setAvailableRoles(officeRoles.map((officeRole: any) => ({ id: officeRole.uid, label: officeRole.name }))); + setSelectedOption({ id: collaborator.office_role.uid, label: collaborator.office_role.name }); + + LoaderService.getInstance().hide(); + } }); } - getUser(); }, [collaboratorUid]); @@ -154,7 +141,7 @@ export default function CollaboratorInformations(props: IProps) { {userSelected?.contact?.first_name + " " + userSelected?.contact?.last_name} - {userSelected && userSelected.seats?.some((seat) => new Date(seat.subscription!.end_date) >= new Date()) && ( + {userSelected && userSelected.seats?.some((seat: any) => new Date(seat.subscription!.end_date) >= new Date()) && (
diff --git a/src/front/Components/Layouts/DeedTypes/DeedTypesCreate/index.tsx b/src/front/Components/Layouts/DeedTypes/DeedTypesCreate/index.tsx index 96a68be9..c914ea78 100644 --- a/src/front/Components/Layouts/DeedTypes/DeedTypesCreate/index.tsx +++ b/src/front/Components/Layouts/DeedTypes/DeedTypesCreate/index.tsx @@ -7,7 +7,6 @@ import Typography, { ETypo } from "@Front/Components/DesignSystem/Typography"; import DefaultDeedTypesDashboard from "@Front/Components/LayoutTemplates/DefaultDeedTypeDashboard"; import { ToasterService } from "@Front/Components/DesignSystem/Toaster"; import Module from "@Front/Config/Module"; -import JwtService from "@Front/Services/JwtService/JwtService"; import { DeedType, Office } from "le-coffre-resources/dist/Admin"; import { useRouter } from "next/router"; import { useCallback, useState } from "react"; @@ -15,8 +14,10 @@ import { useCallback, useState } from "react"; import classes from "./classes.module.scss"; import { validateOrReject, ValidationError } from "class-validator"; -import DeedTypeService from "src/common/Api/LeCoffreApi/sdk/DeedTypeService"; +import UserStore from "@Front/Stores/UserStore"; + import LoaderService from "src/common/Api/LeCoffreApi/sdk/Loader/LoaderService"; +import DeedTypeService from "src/common/Api/LeCoffreApi/sdk/DeedTypeService"; type IProps = {}; export default function DeedTypesCreate(props: IProps) { @@ -28,8 +29,8 @@ export default function DeedTypesCreate(props: IProps) { const onSubmitHandler = useCallback( async (e: React.FormEvent | null, values: { [key: string]: string }) => { try { - // TODO: review - const officeId = 'demo_notary_office_id'; //JwtService.getInstance().decodeJwt()?.office_Id; + const user: any = UserStore.instance.getUser(); + const officeId: string = user.office.uid; const deedType = DeedType.hydrate({ name: values["name"], @@ -60,12 +61,12 @@ export default function DeedTypesCreate(props: IProps) { title: "Succès !", description: "Type d'acte créé avec succès" }); - setTimeout(() => LoaderService.getInstance().hide(), 2000); router.push( Module.getInstance() .get() .modules.pages.DeedTypes.pages.DeedTypesInformations.props.path.replace("[uid]", processCreated.processData.uid), ); + LoaderService.getInstance().hide(); }); } catch (validationErrors: Array | any) { setValidationError(validationErrors as ValidationError[]); diff --git a/src/front/Components/Layouts/DeedTypes/DeedTypesEdit/index.tsx b/src/front/Components/Layouts/DeedTypes/DeedTypesEdit/index.tsx index 064509a3..10d85b8f 100644 --- a/src/front/Components/Layouts/DeedTypes/DeedTypesEdit/index.tsx +++ b/src/front/Components/Layouts/DeedTypes/DeedTypesEdit/index.tsx @@ -36,7 +36,7 @@ export default function DeedTypesEdit() { const deedType: any = process.processData; setDeedTypeSelected(deedType); } - setTimeout(() => LoaderService.getInstance().hide(), 2000); + LoaderService.getInstance().hide(); }); } @@ -63,16 +63,25 @@ export default function DeedTypesEdit() { } try { LoaderService.getInstance().show(); - DeedTypeService.getDeedTypeByUid(deedTypeUid as string).then((process: any) => { + DeedTypeService.getDeedTypeByUid(deedTypeUid as string).then(async (process: any) => { if (process) { - DeedTypeService.updateDeedType(process, { name: values["name"], description: values["description"] }).then(() => { - setTimeout(() => LoaderService.getInstance().hide(), 2000); - router.push( - Module.getInstance() - .get() - .modules.pages.DeedTypes.pages.DeedTypesInformations.props.path.replace("[uid]", deedTypeUid as string), - ); - }); + // New data + const newData: any = { + name: values["name"], + description: values["description"] + }; + + // Merge process data with new data & update process + process.processData.name = newData.name; + process.processData.description = newData.description; + await DeedTypeService.updateDeedType(process, newData); + + router.push( + Module.getInstance() + .get() + .modules.pages.DeedTypes.pages.DeedTypesInformations.props.path.replace("[uid]", deedTypeUid as string), + ); + LoaderService.getInstance().hide(); } }); } catch (validationErrors) { diff --git a/src/front/Components/Layouts/DeedTypes/DeedTypesInformations/index.tsx b/src/front/Components/Layouts/DeedTypes/DeedTypesInformations/index.tsx index 778758f7..c05d984b 100644 --- a/src/front/Components/Layouts/DeedTypes/DeedTypesInformations/index.tsx +++ b/src/front/Components/Layouts/DeedTypes/DeedTypesInformations/index.tsx @@ -52,12 +52,25 @@ export default function DeedTypesInformations(props: IProps) { const deleteDeedType = useCallback(async () => { LoaderService.getInstance().show(); - DeedTypeService.getDeedTypeByUid(deedTypeUid as string).then((process: any) => { + DeedTypeService.getDeedTypeByUid(deedTypeUid as string).then(async (process: any) => { if (process) { - DeedTypeService.updateDeedType(process, { archived_at: new Date().toISOString() }).then(() => { - setTimeout(() => LoaderService.getInstance().hide(), 2000); - router.push(Module.getInstance().get().modules.pages.DeedTypes.props.path); - }); + // New data + const newData: any = { + isDeleted: 'true', + archived_at: new Date().toISOString() + }; + + // Merge process data with new data & update process + process.processData.isDeleted = newData.isDeleted; + process.processData.archived_at = newData.archived_at; + await DeedTypeService.updateDeedType(process, newData); + + router.push( + Module.getInstance() + .get() + .modules.pages.DeedTypes.props.path + ); + LoaderService.getInstance().hide(); } }); }, [deedTypeUid, router]); @@ -66,6 +79,7 @@ export default function DeedTypesInformations(props: IProps) { async function getDeedType() { if (!deedTypeUid) return; + setSelectedDocuments([]); DeedTypeService.getDeedTypeByUid(deedTypeUid as string).then((process: any) => { if (process) { const deedType: any = process.processData; @@ -86,6 +100,7 @@ export default function DeedTypesInformations(props: IProps) { } async function getDocuments() { + setAvailableDocuments([]); DocumentTypeService.getDocumentTypes().then((processes: any[]) => { if (processes.length) { const documents: any[] = processes.map((process: any) => process.processData); @@ -107,7 +122,7 @@ export default function DeedTypesInformations(props: IProps) { const saveDocumentTypes = useCallback(() => { LoaderService.getInstance().show(); - DeedTypeService.getDeedTypeByUid(deedTypeUid as string, false).then((process: any) => { + DeedTypeService.getDeedTypeByUid(deedTypeUid as string).then(async (process: any) => { if (process) { const deedType: any = process.processData; @@ -115,13 +130,20 @@ export default function DeedTypesInformations(props: IProps) { if (!document_types) { document_types = []; } - selectedDocuments.map((selectedDocument: any) => ({ uid: selectedDocument.id as string })) - .forEach((selectedDocument: any) => document_types.push(selectedDocument)); + selectedDocuments.map((selectedDocument: any) => selectedDocument.id as string) + .forEach((uid: any) => document_types.push(availableDocuments.find((document: any) => document.uid === uid))); - DeedTypeService.updateDeedType(process, { document_types: document_types }).then(() => { - setTimeout(() => LoaderService.getInstance().hide(), 2000); - closeSaveModal(); - }); + // New data + const newData: any = { + document_types: document_types + }; + + // Merge process data with new data & update process + process.processData.document_types = newData.document_types; + await DeedTypeService.updateDeedType(process, newData); + + LoaderService.getInstance().hide(); + closeSaveModal(); } }); }, [closeSaveModal, deedTypeUid, selectedDocuments]); diff --git a/src/front/Components/Layouts/DocumentTypes/DocumentTypesCreate/index.tsx b/src/front/Components/Layouts/DocumentTypes/DocumentTypesCreate/index.tsx index eba9773d..0e53c8d3 100644 --- a/src/front/Components/Layouts/DocumentTypes/DocumentTypesCreate/index.tsx +++ b/src/front/Components/Layouts/DocumentTypes/DocumentTypesCreate/index.tsx @@ -16,6 +16,7 @@ import classes from "./classes.module.scss"; import DocumentTypeService from "src/common/Api/LeCoffreApi/sdk/DocumentTypeService"; import LoaderService from "src/common/Api/LeCoffreApi/sdk/Loader/LoaderService"; +import UserStore from "@Front/Stores/UserStore"; type IProps = {}; export default function DocumentTypesCreate(props: IProps) { @@ -25,11 +26,8 @@ export default function DocumentTypesCreate(props: IProps) { const onSubmitHandler = useCallback( async (e: React.FormEvent | null, values: { [key: string]: string }) => { try { - const jwt = JwtService.getInstance().decodeJwt(); - if (!jwt) return; - - // TODO: review - const officeId = 'demo_notary_office_id'; // jwt.office_Id; + const user: any = UserStore.instance.getUser(); + const officeId: string = user.office.uid; const documentFormModel = DocumentType.hydrate({ ...values, @@ -53,12 +51,12 @@ export default function DocumentTypesCreate(props: IProps) { title: "Succès !", description: "Type de document créé avec succès" }); - setTimeout(() => LoaderService.getInstance().hide(), 2000); router.push( Module.getInstance() .get() .modules.pages.DocumentTypes.pages.DocumentTypesInformations.props.path.replace("[uid]", processCreated.processData.uid), ); + LoaderService.getInstance().hide(); }); } catch (e) { if (e instanceof Array) { diff --git a/src/front/Components/Layouts/DocumentTypes/DocumentTypesEdit/index.tsx b/src/front/Components/Layouts/DocumentTypes/DocumentTypesEdit/index.tsx index 3fe6de1b..bf17ef91 100644 --- a/src/front/Components/Layouts/DocumentTypes/DocumentTypesEdit/index.tsx +++ b/src/front/Components/Layouts/DocumentTypes/DocumentTypesEdit/index.tsx @@ -31,7 +31,7 @@ export default function DocumentTypesEdit() { const documentType: any = process.processData; setDocumentTypeSelected(documentType); } - setTimeout(() => LoaderService.getInstance().hide(), 2000); + LoaderService.getInstance().hide(); }); } @@ -56,7 +56,6 @@ export default function DocumentTypesEdit() { DocumentTypeService.getDocumentTypeByUid(documentTypeUid as string).then((process: any) => { if (process) { DocumentTypeService.updateDocumentType(process, values).then(() => { - setTimeout(() => LoaderService.getInstance().hide(), 2000); router.push( Module.getInstance() .get() @@ -65,6 +64,7 @@ export default function DocumentTypesEdit() { documentTypeUid as string ?? "", ) ); + LoaderService.getInstance().hide(); }); } }); diff --git a/src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx b/src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx index 358cc6c1..ae2f53c3 100644 --- a/src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx +++ b/src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx @@ -82,21 +82,21 @@ export default function AddClientToFolder(props: IProps) { LoaderService.getInstance().show(); CustomerService.createCustomer(customerData, validatorId).then((processCreated: any) => { - FolderService.getFolderByUid(folderUid as string, false, false).then((process: any) => { + FolderService.getFolderByUid(folderUid as string).then((process: any) => { if (process) { - let customers: any[] = process.processData.customers; - if (!customers) { - customers = []; + const customers: any[] = []; + for (const customerUid of process.processData.customers.map((customer: any) => customer.uid)) { + customers.push({ uid: customerUid }); } - customers.push(processCreated.processData.uid); + customers.push({ uid: processCreated.processData.uid }); FolderService.updateFolder(process, { customers: customers }).then(() => { - ToasterService.getInstance().success({ - title: "Succès !", - description: "Client ajouté avec succès au dossier" + ToasterService.getInstance().success({ + title: "Succès !", + description: "Client ajouté avec succès au dossier" }); - setTimeout(() => LoaderService.getInstance().hide(), 2000); router.push(`/folders/${folderUid}`); + LoaderService.getInstance().hide(); }); } }); @@ -108,17 +108,20 @@ export default function AddClientToFolder(props: IProps) { } } else { LoaderService.getInstance().show(); - FolderService.getFolderByUid(folderUid as string, false, false).then((process: any) => { + FolderService.getFolderByUid(folderUid as string).then((process: any) => { if (process) { - const customers: any[] = customersToLink.map((customer: any) => customer.uid); + const customers: any[] = []; + for (const customerUid of customersToLink.map((customer: any) => customer.uid)) { + customers.push({ uid: customerUid }); + } FolderService.updateFolder(process, { customers: customers }).then(() => { - ToasterService.getInstance().success({ - title: "Succès !", - description: selectedCustomers.length > 1 ? "Clients associés avec succès au dossier" : "Client associé avec succès au dossier" + ToasterService.getInstance().success({ + title: "Succès !", + description: selectedCustomers.length > 1 ? "Clients associés avec succès au dossier" : "Client associé avec succès au dossier" }); - setTimeout(() => LoaderService.getInstance().hide(), 2000); router.push(`/folders/${folderUid}`); + LoaderService.getInstance().hide(); }); } }); diff --git a/src/front/Components/Layouts/Folder/AskDocuments/ParameterDocuments/index.tsx b/src/front/Components/Layouts/Folder/AskDocuments/ParameterDocuments/index.tsx index 56512953..05d90cae 100644 --- a/src/front/Components/Layouts/Folder/AskDocuments/ParameterDocuments/index.tsx +++ b/src/front/Components/Layouts/Folder/AskDocuments/ParameterDocuments/index.tsx @@ -97,14 +97,21 @@ export default function ParameterDocuments(props: IProps) { const oldDocumentsType = props.folder.deed?.document_types!; await new Promise((resolve: () => void) => { - DeedTypeService.getDeedTypeByUid(props.folder.deed?.deed_type?.uid!).then((process: any) => { + DeedTypeService.getDeedTypeByUid(props.folder.deed?.deed_type?.uid!).then(async (process: any) => { if (process) { - DeedTypeService.updateDeedType(process, { + // New data + const newData: any = { document_types: [ ...oldDocumentsType.map((document: any) => ({ uid: document.uid })), { uid: documentType.uid } ] - }).then(() => resolve()); + }; + + // Merge process data with new data & update process + process.processData.document_types = newData.document_types; + await DeedTypeService.updateDeedType(process, newData); + + resolve(); } }); }); @@ -131,14 +138,21 @@ export default function ParameterDocuments(props: IProps) { const oldDocumentsType = props.folder.deed?.document_types!; await new Promise((resolve: () => void) => { - DeedTypeService.getDeedTypeByUid(props.folder.deed?.deed_type?.uid!).then((process: any) => { + DeedTypeService.getDeedTypeByUid(props.folder.deed?.deed_type?.uid!).then(async (process: any) => { if (process) { - DeedTypeService.updateDeedType(process, { + // New data + const newData: any = { document_types: [ ...oldDocumentsType.map((document: any) => ({ uid: document.uid })), ...selectedDocuments.map((document: any) => ({ uid: document.id as string })) ] - }).then(() => resolve()); + }; + + // Merge process data with new data & update process + process.processData.document_types = newData.document_types; + await DeedTypeService.updateDeedType(process, newData); + + resolve(); } }); }); diff --git a/src/front/Components/Layouts/Folder/AskDocuments/index.tsx b/src/front/Components/Layouts/Folder/AskDocuments/index.tsx index 949c1ca4..9b9e7f30 100644 --- a/src/front/Components/Layouts/Folder/AskDocuments/index.tsx +++ b/src/front/Components/Layouts/Folder/AskDocuments/index.tsx @@ -62,27 +62,35 @@ export default function AskDocuments() { LoaderService.getInstance().show(); const documentAsked: [] = values["document_types"] as []; for (let i = 0; i < documentAsked.length; i++) { + const documentTypeUid = documentAsked[i]; + if (!documentTypeUid) continue; + const documentData: any = { folder: { - uid: folderUid, + uid: folderUid as string, }, depositor: { - uid: customerUid, + uid: customerUid as string, }, document_type: { - uid: documentAsked[i] + uid: documentTypeUid }, - document_status: EDocumentStatus.ASKED + document_status: EDocumentStatus.ASKED, + file_uid: null, }; const validatorId: string = '884cb36a346a79af8697559f16940141f068bdf1656f88fa0df0e9ecd7311fb8:0'; await DocumentService.createDocument(documentData, validatorId); } - router.push( - Module.getInstance() - .get() - .modules.pages.Folder.pages.FolderInformation.props.path.replace("[folderUid]", folderUid as string), - ); + + FolderService.refreshFolderByUid(folderUid as string).then(() => { + LoaderService.getInstance().hide(); + router.push( + Module.getInstance() + .get() + .modules.pages.Folder.pages.FolderInformation.props.path.replace("[folderUid]", folderUid as string), + ); + }); } catch (e) { console.error(e); } @@ -101,7 +109,7 @@ export default function AskDocuments() { // If those UIDs are already asked, filter them to not show them in the list and only // show the documents that are not asked yet - const documentTypes = folder.deed!.document_types!.filter((documentType) => { + const documentTypes = folder.deed?.document_types?.filter((documentType) => { if (userDocumentTypesUids.includes(documentType!.uid!)) return false; return true; }); diff --git a/src/front/Components/Layouts/Folder/CreateFolder/index.tsx b/src/front/Components/Layouts/Folder/CreateFolder/index.tsx index e41a625d..2d0f696e 100644 --- a/src/front/Components/Layouts/Folder/CreateFolder/index.tsx +++ b/src/front/Components/Layouts/Folder/CreateFolder/index.tsx @@ -11,7 +11,6 @@ import Typography, { ETypo, ETypoColor } from "@Front/Components/DesignSystem/Ty import { ToasterService } from "@Front/Components/DesignSystem/Toaster"; import BackArrow from "@Front/Components/Elements/BackArrow"; import DefaultDoubleSidePage from "@Front/Components/LayoutTemplates/DefaultDoubleSidePage"; -import JwtService from "@Front/Services/JwtService/JwtService"; import { ValidationError } from "class-validator/types/validation/ValidationError"; import { Deed, Office, OfficeFolder } from "le-coffre-resources/dist/Notary"; import User from "le-coffre-resources/dist/Notary"; @@ -21,9 +20,12 @@ import { useRouter } from "next/router"; import React, { useCallback, useEffect, useState } from "react"; import classes from "./classes.module.scss"; +import UserStore from "@Front/Stores/UserStore"; + import FolderService from "src/common/Api/LeCoffreApi/sdk/FolderService"; import DeedTypeService from "src/common/Api/LeCoffreApi/sdk/DeedTypeService"; import LoaderService from "src/common/Api/LeCoffreApi/sdk/Loader/LoaderService"; +import CollaboratorService from "src/common/Api/LeCoffreApi/sdk/CollaboratorService"; export default function CreateFolder(): JSX.Element { /** @@ -50,9 +52,8 @@ export default function CreateFolder(): JSX.Element { [key: string]: any; }, ) => { - // TODO: review - console.log(JwtService.getInstance().decodeJwt()); - const officeId = 'demo_notary_office_id'; //JwtService.getInstance().decodeJwt()?.office_Id; + const user: any = UserStore.instance.getUser(); + const officeId: string = user.office.uid; const officeFolderModel = OfficeFolder.hydrate({ folder_number: values["folder_number"], @@ -93,7 +94,7 @@ export default function CreateFolder(): JSX.Element { customers: [], documents: [], notes: [], - stakeholders: folderAccessType === "whole_office" ? availableCollaborators : selectedCollaborators, + stakeholders: (folderAccessType === "whole_office" ? availableCollaborators : selectedCollaborators).map((collaborator: any) => ({ uid: collaborator.uid })), status: EFolderStatus.LIVE }; @@ -103,9 +104,9 @@ export default function CreateFolder(): JSX.Element { title: "Succès !", description: "Dossier créé avec succès" }); - setTimeout(() => LoaderService.getInstance().hide(), 2000); const folderUid: string = processCreated.processData.uid; router.push(`/folders/${folderUid}`); + LoaderService.getInstance().hide(); }); } catch (backError) { if (!Array.isArray(backError)) return; @@ -130,34 +131,25 @@ export default function CreateFolder(): JSX.Element { * UseEffect */ useEffect(() => { - DeedTypeService.getDeedTypes().then((processes: any[]) => { + DeedTypeService.getDeedTypes((processes: any[]) => { if (processes.length > 0) { - let deedTypes: any[] = processes.map((process: any) => process.processData); - - // FilterBy archived_at = null or not defined - deedTypes = deedTypes.filter((deedType: any) => !deedType.archived_at); - + const deedTypes: any[] = processes.map((process: any) => process.processData); setAvailableDeedTypes(deedTypes); } }); - /* TODO: review - // no need to pass query 'where' param here, default query for notaries include only users which are in the same office as the caller - Users.getInstance() - .get({ - include: { contact: true }, - }) - .then((users) => { - setAvailableCollaborators(users); - / * - // set default selected collaborators to the connected user - const currentUser = users.find((user) => user.uid === JwtService.getInstance().decodeJwt()?.userId); + CollaboratorService.getCollaborators((processes: any[]) => { + if (processes.length > 0) { + const collaborators: any[] = processes.map((process: any) => process.processData); + setAvailableCollaborators(collaborators); + + const user: any = UserStore.instance.getUser(); + const currentUser: any = collaborators.find((collaborator: any) => collaborator.uid === user.uid); if (currentUser) { setSelectedCollaborators([currentUser]); } - * / - }); - */ + } + }); }, []); /** diff --git a/src/front/Components/Layouts/Folder/DocumentVerification/classes.module.scss b/src/front/Components/Layouts/Folder/DocumentVerification/classes.module.scss new file mode 100644 index 00000000..c99b4817 --- /dev/null +++ b/src/front/Components/Layouts/Folder/DocumentVerification/classes.module.scss @@ -0,0 +1,171 @@ +@import "@Themes/constants.scss"; + +.root { + display: flex; + flex-direction: column; + gap: var(--spacing-2xl, 40px); + max-width: 800px; + margin: 0 auto; + padding: var(--spacing-xl, 32px); + + .header { + display: flex; + flex-direction: column; + gap: var(--spacing-md, 16px); + text-align: center; + } + + .content { + display: flex; + flex-direction: column; + gap: var(--spacing-2xl, 40px); + + .drag-drop-container { + display: flex; + flex-direction: column; + gap: var(--spacing-xl, 32px); + + @media (min-width: $screen-m) { + flex-direction: row; + gap: var(--spacing-lg, 24px); + } + + .drag-drop-box { + flex: 1; + min-height: 200px; + display: flex; + flex-direction: column; + gap: var(--spacing-sm, 8px); + + // Force the DragAndDrop component to take full width and height + > div { + width: 100% !important; + height: 100% !important; + min-height: 200px !important; + display: flex !important; + flex-direction: column !important; + + // Override the fit-content width from DragAndDrop + &.root { + width: 100% !important; + height: 100% !important; + min-height: 200px !important; + } + } + + .file-info { + padding: var(--spacing-sm, 8px) var(--spacing-md, 16px); + background-color: var(--color-success-50, #f0f9ff); + border: 1px solid var(--color-success-200, #bae6fd); + border-radius: var(--radius-md, 8px); + margin-top: var(--spacing-sm, 8px); + } + } + } + + .warning { + text-align: center; + padding: var(--spacing-md, 16px); + background-color: var(--color-warning-50, #fffbeb); + border: 1px solid var(--color-warning-200, #fde68a); + border-radius: var(--radius-md, 8px); + } + + .verification-result { + text-align: center; + padding: var(--spacing-lg, 24px); + border-radius: var(--radius-md, 8px); + border: 2px solid; + display: flex; + flex-direction: column; + gap: var(--spacing-md, 16px); + + &.success { + background-color: var(--color-success-50, #f0fdf4); + border-color: var(--color-success-200, #bbf7d0); + } + + &.error { + background-color: var(--color-error-50, #fef2f2); + border-color: var(--color-error-200, #fecaca); + } + + .verification-details { + background-color: rgba(0, 0, 0, 0.05); + padding: var(--spacing-md, 16px); + border-radius: var(--radius-sm, 4px); + font-family: monospace; + white-space: pre-line; + text-align: left; + max-width: 100%; + overflow-x: auto; + } + + .merkle-proof-section { + display: flex; + flex-direction: column; + align-items: center; + gap: var(--spacing-md, 16px); + padding: var(--spacing-lg, 24px); + background-color: rgba(0, 0, 0, 0.02); + border-radius: var(--radius-md, 8px); + border: 1px solid rgba(0, 0, 0, 0.1); + } + } + + .qr-container { + display: flex; + flex-direction: column; + align-items: center; + gap: var(--spacing-sm, 8px); + + .qr-code { + width: 150px; + height: 150px; + border: 2px solid var(--color-neutral-200, #e5e7eb); + border-radius: var(--radius-sm, 4px); + padding: var(--spacing-sm, 8px); + background-color: white; + } + + .qr-description { + text-align: center; + max-width: 200px; + } + } + + .qr-loading { + display: flex; + justify-content: center; + align-items: center; + width: 150px; + height: 150px; + border: 2px dashed var(--color-neutral-300, #d1d5db); + border-radius: var(--radius-sm, 4px); + background-color: var(--color-neutral-50, #f9fafb); + } + + .qr-error { + display: flex; + justify-content: center; + align-items: center; + width: 150px; + height: 150px; + border: 2px solid var(--color-error-200, #fecaca); + border-radius: var(--radius-sm, 4px); + background-color: var(--color-error-50, #fef2f2); + } + + .actions { + display: flex; + justify-content: space-between; + align-items: center; + gap: var(--spacing-lg, 24px); + + @media (max-width: $screen-s) { + flex-direction: column; + gap: var(--spacing-md, 16px); + } + } + } +} \ No newline at end of file diff --git a/src/front/Components/Layouts/Folder/DocumentVerification/index.tsx b/src/front/Components/Layouts/Folder/DocumentVerification/index.tsx new file mode 100644 index 00000000..2c1bdad6 --- /dev/null +++ b/src/front/Components/Layouts/Folder/DocumentVerification/index.tsx @@ -0,0 +1,260 @@ +import Button, { EButtonSize, EButtonstyletype, EButtonVariant } from "@Front/Components/DesignSystem/Button"; +import DragAndDrop from "@Front/Components/DesignSystem/DragAndDrop"; +import Typography, { ETypo, ETypoColor } from "@Front/Components/DesignSystem/Typography"; +import Module from "@Front/Config/Module"; +import PdfService from "@Front/Services/PdfService"; +import { FileBlob } from "@Front/Api/Entities/types"; +import { ShieldCheckIcon } from "@heroicons/react/24/outline"; +import { useRouter } from "next/router"; +import React, { useState } from "react"; +import MessageBus from "src/sdk/MessageBus"; + +import classes from "./classes.module.scss"; +import DocumentService from "src/common/Api/LeCoffreApi/sdk/DocumentService"; +import FileService from "src/common/Api/LeCoffreApi/sdk/FileService"; + +type IProps = { + folderUid: string; +}; + +/** + * Convert a File object to FileBlob + * @param file - The File object to convert + * @returns Promise - The converted FileBlob + */ +const convertFileToFileBlob = async (file: File): Promise => { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.onload = () => { + const arrayBuffer = reader.result as ArrayBuffer; + const uint8Array = new Uint8Array(arrayBuffer); + resolve({ + type: file.type, + data: uint8Array + }); + }; + reader.onerror = () => reject(new Error('Failed to read file')); + reader.readAsArrayBuffer(file); + }); +}; + + + +export default function DocumentVerification(props: IProps) { + const { folderUid } = props; + const router = useRouter(); + + const [documentToVerify, setDocumentToVerify] = useState(null); + const [validationCertificate, setValidationCertificate] = useState(null); + const [isVerifying, setIsVerifying] = useState(false); + const [verificationResult, setVerificationResult] = useState<{ + success: boolean; + message: string; + details?: string; + merkleProof?: string; + } | null>(null); + + const handleDocumentToVerifyChange = (files: File[]) => { + if (files.length > 0 && files[0]) { + setDocumentToVerify(files[0]); + } else { + setDocumentToVerify(null); + } + }; + + const handleValidationCertificateChange = (files: File[]) => { + if (files.length > 0 && files[0]) { + setValidationCertificate(files[0]); + } else { + setValidationCertificate(null); + } + }; + + const handleVerifyDocuments = async () => { + if (!documentToVerify || !validationCertificate) { + console.error("Both documents are required for verification"); + return; + } + + setIsVerifying(true); + setVerificationResult(null); + + const messageBus = MessageBus.getInstance(); + + try { + // Here the things we need to verify: + // - we can produce the same hash from the document provided than what is in the validation certificate + // - the merkle proof is valid with that hash + // - the root of the merkle tree is a state id from a commited state in the process + // - that process is a file process linked to the right folder + // Step 1: Parse the validation certificate + const validationData = await PdfService.getInstance().parseCertificate(validationCertificate); + + // Step 2: Convert File to FileBlob and hash the document using MessageBus + const fileBlob = await convertFileToFileBlob(documentToVerify); + + await messageBus.isReady(); + const documentHash = await messageBus.hashDocument(fileBlob, validationData.commitmentId); + + // Step 3: Compare hashes + const hashesMatch = documentHash.toLowerCase() === validationData.documentHash.toLowerCase(); + + if (!hashesMatch) { + throw new Error('Hash du document invalide, le document fourni n\'est pas celui qui a été certifié'); + } + + // Step 4: Verify the merkle proof + const merkleProof = validationData.merkleProof; + const merkleProofValid = await messageBus.verifyMerkleProof(merkleProof, documentHash); + + if (!merkleProofValid) { + throw new Error('Preuve de Merkle invalide, le document n\'a pas été certifié là où le certificat le prétend'); + } + + // Step 5: Verify that this file process depends on the right folder process + // First pin all the validated documents related to the folder + const documentProcesses = await DocumentService.getDocuments(); + + const documents = documentProcesses.filter((process: any) => + process.processData.document_status === "VALIDATED" && + process.processData.folder.uid === folderUid + ); + + if (!documents || documents.length === 0) { + throw new Error(`Aucune demande de document trouvé pour le dossier ${folderUid}`); + } + + // Step 6: verify that the merkle proof match the last commited state for the file process + const stateId = JSON.parse(validationData.merkleProof)['root']; + + let stateIdExists = false; + for (const doc of documents) { + const processData = doc.processData; + + for (const file of processData.files) { + const fileUid = file.uid; + const fileProcess = await FileService.getFileByUid(fileUid); + const lastUpdatedStateId = fileProcess.lastUpdatedFileState.state_id; + + stateIdExists = lastUpdatedStateId === stateId; // we assume that last state is the validated document, that seems reasonable + if (stateIdExists) break; + } + + if (stateIdExists) break; + } + + if (!stateIdExists) { + throw new Error('La preuve fournie ne correspond à aucun document demandé pour ce dossier.'); + } + + setVerificationResult({ + success: true, + message: "✅ Vérification réussie ! Le document est authentique et intègre.", + }); + } catch (error) { + console.error("Verification failed:", error); + setVerificationResult({ + success: false, + message: `❌ Erreur lors de la vérification: ${error}`, + }); + } finally { + setIsVerifying(false); + } + }; + + const handleBackToFolder = () => { + const folderPath = Module.getInstance() + .get() + .modules.pages.Folder.pages.FolderInformation.props.path.replace("[folderUid]", folderUid); + router.push(folderPath); + }; + + const bothDocumentsPresent = documentToVerify && validationCertificate; + + return ( +
+
+ + Vérification de Documents + + + Vérifiez l'intégrité et l'authenticité de vos documents + +
+ +
+
+
+ + {documentToVerify && ( +
+ + ✓ {documentToVerify.name} + +
+ )} +
+ +
+ + {validationCertificate && ( +
+ + ✓ {validationCertificate.name} + +
+ )} +
+
+ + {!bothDocumentsPresent && ( +
+ + ⚠️ Veuillez sélectionner les deux documents pour procéder à la vérification + +
+ )} + + {verificationResult && ( +
+ + {verificationResult.message} + +
+ )} + +
+ + + +
+
+
+ ); +} \ No newline at end of file diff --git a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/ClientBox/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/ClientBox/index.tsx index fd44a797..540b49aa 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/ClientBox/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/ClientBox/index.tsx @@ -30,12 +30,6 @@ export default function ClientBox(props: IProps) { const { isOpen: isDeleteModalOpen, open: openDeleteModal, close: closeDeleteModal } = useOpenable(); const { isOpen: isErrorModalOpen, open: openErrorModal, close: closeErrorModal } = useOpenable(); - // TODO: review - const handleOpenConnectionLink = useCallback(() => { - const url = `http://localhost:3000/client-dashboard/${folderUid}/profile/${customer.uid}`; - alert(url); - }, [customer.uid, folderUid]); - const handleDelete = useCallback( (customerUid: string) => { LoaderService.getInstance().show(); @@ -100,15 +94,6 @@ export default function ClientBox(props: IProps) { )}
-
- -
Numéro de téléphone diff --git a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/DeleteAskedDocumentModal/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/DeleteAskedDocumentModal/index.tsx index 95983ee9..e9c5c552 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/DeleteAskedDocumentModal/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/DeleteAskedDocumentModal/index.tsx @@ -4,6 +4,7 @@ import Typography, { ETypo } from "@Front/Components/DesignSystem/Typography"; import React, { useCallback } from "react"; import DocumentService from "src/common/Api/LeCoffreApi/sdk/DocumentService"; +import FolderService from "src/common/Api/LeCoffreApi/sdk/FolderService"; import LoaderService from "src/common/Api/LeCoffreApi/sdk/Loader/LoaderService"; type IProps = { @@ -23,7 +24,10 @@ export default function DeleteAskedDocumentModal(props: IProps) { (resolve: () => void) => { DocumentService.getDocumentByUid(documentUid).then((process: any) => { if (process) { - DocumentService.updateDocument(process, { isDeleted: 'true' }).then(() => resolve()); + const document: any = process.processData; + DocumentService.updateDocument(process, { isDeleted: 'true', archived_at: new Date().toISOString() }).then(() => { + FolderService.refreshFolderByUid(document.folder.uid).then(() => resolve()); + }); } }); }) diff --git a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/DeleteSentDocumentModal/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/DeleteSentDocumentModal/index.tsx index 233c9566..5cd03ef2 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/DeleteSentDocumentModal/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/DeleteSentDocumentModal/index.tsx @@ -4,6 +4,7 @@ import Typography, { ETypo } from "@Front/Components/DesignSystem/Typography"; import React, { useCallback } from "react"; import DocumentService from "src/common/Api/LeCoffreApi/sdk/DocumentService"; +import FolderService from "src/common/Api/LeCoffreApi/sdk/FolderService"; import LoaderService from "src/common/Api/LeCoffreApi/sdk/Loader/LoaderService"; type IProps = { @@ -21,8 +22,10 @@ export default function DeleteSentDocumentModal(props: IProps) { LoaderService.getInstance().show(); DocumentService.getDocumentByUid(documentUid).then((process: any) => { if (process) { - DocumentService.updateDocument(process, { isDeleted: 'true' }) + const document: any = process.processData; + DocumentService.updateDocument(process, { isDeleted: 'true', archived_at: new Date().toISOString() }) .then(() => onDeleteSuccess(documentUid)) + .then(() => FolderService.refreshFolderByUid(document.folder.uid)) .then(() => ToasterService.getInstance().success({ title: "Succès !", description: "Le document a été supprimé avec succès." })) .then(() => LoaderService.getInstance().hide()) .then(onClose); diff --git a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/FilePreviewModal/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/FilePreviewModal/index.tsx index 65da2374..8a07fe46 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/FilePreviewModal/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/FilePreviewModal/index.tsx @@ -1,8 +1,12 @@ import Modal from "@Front/Components/DesignSystem/Modal"; import React from "react"; +import { FileBlob } from "@Front/Api/Entities/types"; type IProps = { - file: any; + file: { + uid: string; + file_blob: FileBlob; + }; url: string; isOpen: boolean; onClose?: () => void; diff --git a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/index.tsx index 9f99eb02..a140a18b 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/index.tsx @@ -6,7 +6,7 @@ import Tag, { ETagColor, ETagVariant } from "@Front/Components/DesignSystem/Tag" import Typography, { ETypo, ETypoColor } from "@Front/Components/DesignSystem/Typography"; import Module from "@Front/Config/Module"; import useOpenable from "@Front/Hooks/useOpenable"; -import { ArrowDownTrayIcon, EyeIcon, TrashIcon } from "@heroicons/react/24/outline"; +import { ArrowDownTrayIcon, EyeIcon, TrashIcon, DocumentTextIcon } from "@heroicons/react/24/outline"; import { useMediaQuery } from "@mui/material"; import { EDocumentStatus } from "le-coffre-resources/dist/Customer/Document"; import DocumentNotary, { EDocumentNotaryStatus } from "le-coffre-resources/dist/Notary/DocumentNotary"; @@ -18,9 +18,14 @@ import classes from "./classes.module.scss"; import DeleteAskedDocumentModal from "./DeleteAskedDocumentModal"; import DeleteSentDocumentModal from "./DeleteSentDocumentModal"; +import FolderService from "src/common/Api/LeCoffreApi/sdk/FolderService"; import DocumentService from "src/common/Api/LeCoffreApi/sdk/DocumentService"; -import DocumentTypeService from "src/common/Api/LeCoffreApi/sdk/DocumentTypeService"; import FileService from "src/common/Api/LeCoffreApi/sdk/FileService"; + +import PdfService, { CertificateData, Metadata } from "@Front/Services/PdfService"; + +import MessageBus from "src/sdk/MessageBus"; + import LoaderService from "src/common/Api/LeCoffreApi/sdk/Loader/LoaderService"; type IProps = { @@ -53,33 +58,20 @@ export default function DocumentTables(props: IProps) { const fetchDocuments = useCallback( () => { - LoaderService.getInstance().show(); - DocumentService.getDocuments().then(async (processes: any[]) => { - if (processes.length > 0) { - let documents: any[] = processes.map((process: any) => process.processData); - - // FilterBy folder.uid & depositor.uid - documents = documents.filter((document: any) => document.folder.uid === folderUid && document.depositor && document.depositor.uid === customerUid); - - for (const document of documents) { - if (document.document_type) { - document.document_type = (await DocumentTypeService.getDocumentTypeByUid(document.document_type.uid)).processData; - } - - if (document.files && document.files.length > 0) { - const files: any[] = []; - for (const file of document.files) { - files.push((await FileService.getFileByUid(file.uid)).processData); - } - document.files = files; - } + setDocuments([]); + FolderService.getFolderByUid(folderUid).then((process: any) => { + if (process) { + const folder: any = process.processData; + const customer: any = folder.customers.find((customer: any) => customer.uid === customerUid); + if (customer && customer.documents) { + const documents: any[] = customer.documents.filter((document: any) => document.depositor); + setDocuments(documents); + } else { + setDocuments([]); } - - setDocuments(documents); } else { setDocuments([]); } - LoaderService.getInstance().hide(); }); }, [customerUid, folderUid], @@ -87,29 +79,20 @@ export default function DocumentTables(props: IProps) { const fetchDocumentsNotary = useCallback( () => { - LoaderService.getInstance().show(); - DocumentService.getDocuments().then(async (processes: any[]) => { - if (processes.length > 0) { - let documents: any[] = processes.map((process: any) => process.processData); - - // FilterBy folder.uid & customer.uid - documents = documents.filter((document: any) => document.folder.uid === folderUid && document.customer && document.customer.uid === customerUid); - - for (const document of documents) { - if (document.files && document.files.length > 0) { - const files: any[] = []; - for (const file of document.files) { - files.push((await FileService.getFileByUid(file.uid)).processData); - } - document.files = files; - } + setDocumentsNotary([]); + FolderService.getFolderByUid(folderUid).then((process: any) => { + if (process) { + const folder: any = process.processData; + const customer: any = folder.customers.find((customer: any) => customer.uid === customerUid); + if (customer && customer.documents) { + const documents: any[] = customer.documents.filter((document: any) => document.customer); + setDocumentsNotary(documents); + } else { + setDocumentsNotary([]); } - - setDocumentsNotary(documents); } else { setDocumentsNotary([]); } - LoaderService.getInstance().hide(); }); }, [customerUid, folderUid], @@ -142,7 +125,13 @@ export default function DocumentTables(props: IProps) { const file = doc.files?.[0]; if (!file) return; - return new Promise((resolve: () => void) => { + return new Promise(async (resolve: () => void) => { + if (!file.file_blob) { + LoaderService.getInstance().show(); + file.file_blob = (await FileService.getFileByUid(file.uid)).processData.file_blob; + LoaderService.getInstance().hide(); + } + const blob = new Blob([file.file_blob.data], { type: file.file_blob.type }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); @@ -161,7 +150,12 @@ export default function DocumentTables(props: IProps) { const file = doc.files?.[0]; if (!file) return; - return new Promise((resolve: () => void) => { + return new Promise(async (resolve: () => void) => { + if (!file.file_blob) { + LoaderService.getInstance().show(); + file.file_blob = (await FileService.getFileByUid(file.uid)).processData.file_blob; + LoaderService.getInstance().hide(); + } const blob = new Blob([file.file_blob.data], { type: file.file_blob.type }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); @@ -176,6 +170,66 @@ export default function DocumentTables(props: IProps) { }).catch((e) => console.warn(e)); }, []); + const onDownloadCertificate = useCallback(async (doc: any) => { + try { + const certificateData: CertificateData = { + customer: { + firstName: doc.depositor.first_name || doc.depositor.firstName || "N/A", + lastName: doc.depositor.last_name || doc.depositor.lastName || "N/A", + postalAddress: doc.depositor.postal_address || doc.depositor.address || doc.depositor.postalAddress || "N/A", + email: doc.depositor.email || "N/A" + }, + notary: { + name: "N/A" + }, + folderUid: folderUid, + documentHash: "N/A", + metadata: { + fileName: "N/A", + isDeleted: false, + updatedAt: new Date(), + commitmentId: "N/A", + createdAt: new Date(), + documentUid: "N/A", + documentType: "N/A", + merkleProof: "N/A" + } + }; + + // Get the specific document that was clicked + const documentProcess = await DocumentService.getDocumentByUid(doc.uid); + if (!documentProcess) { + throw new Error('Document not found'); + } + + // Process only the files for this specific document + for (const file of documentProcess.processData.files) { + const fileProcess = await FileService.getFileByUid(file.uid); + + const hash = fileProcess.lastUpdatedFileState.pcd_commitment.file_blob; + certificateData.documentHash = hash; + + const proof = await MessageBus.getInstance().generateMerkleProof(fileProcess.lastUpdatedFileState, 'file_blob'); + + const metadata: Metadata = { + fileName: fileProcess.processData.file_name, + isDeleted: false, + updatedAt: new Date(fileProcess.processData.updated_at), + commitmentId: fileProcess.lastUpdatedFileState.commited_in, + createdAt: new Date(fileProcess.processData.created_at), + documentUid: doc.uid, + documentType: doc.document_type.name, + merkleProof: proof + }; + certificateData.metadata = metadata; + } + + await PdfService.getInstance().downloadCertificate(certificateData); + } catch (error) { + console.error('Error downloading certificate:', error); + } + }, [folderUid, customerUid]); + const askedDocuments: IRowProps[] = useMemo( () => documents @@ -183,7 +237,7 @@ export default function DocumentTables(props: IProps) { if (document.document_status !== EDocumentStatus.ASKED) return null; return { key: document.uid, - document_type: { sx: { width: 300 }, content: document.document_type?.name ?? "_" }, + document_type: { sx: { width: 300 }, content: document.document_type?.name ?? "Autre document" }, document_status: { sx: { width: 107 }, content: ( @@ -223,7 +277,7 @@ export default function DocumentTables(props: IProps) { if (document.document_status !== EDocumentStatus.DEPOSITED) return null; return { key: document.uid, - document_type: { sx: { width: 300 }, content: document.document_type?.name ?? "_" }, + document_type: { sx: { width: 300 }, content: document.document_type?.name ?? "Autre document" }, document_status: { sx: { width: 107 }, content: ( @@ -240,7 +294,7 @@ export default function DocumentTables(props: IProps) { }, file: { sx: { width: 120 }, - content: document.files?.[0]?.file_name ?? "_", + content: document.files?.[0]?.file_name?.split(".")?.[0] ?? "_", }, actions: { sx: { width: 76 }, @@ -263,13 +317,13 @@ export default function DocumentTables(props: IProps) { ); const validatedDocuments: IRowProps[] = useMemo( - () => - documents + () => { + const validated = documents .map((document) => { if (document.document_status !== EDocumentStatus.VALIDATED) return null; return { key: document.uid, - document_type: { sx: { width: 300 }, content: document.document_type?.name ?? "_" }, + document_type: { sx: { width: 300 }, content: document.document_type?.name ?? "Autre document" }, document_status: { sx: { width: 107 }, content: ( @@ -286,7 +340,7 @@ export default function DocumentTables(props: IProps) { }, file: { sx: { width: 120 }, - content: document.files?.[0]?.file_name ?? "_", + content: document.files?.[0]?.file_name?.split(".")?.[0] ?? "_", }, actions: { sx: { width: 76 }, @@ -300,13 +354,17 @@ export default function DocumentTables(props: IProps) { } /> onDownload(document)} icon={} /> + onDownloadCertificate(document)} icon={} />
), }, }; }) - .filter((document) => document !== null) as IRowProps[], - [documents, folderUid, onDownload], + .filter((document) => document !== null) as IRowProps[]; + + return validated; + }, + [documents, folderUid, onDownload, onDownloadCertificate], ); const refusedDocuments: IRowProps[] = useMemo( @@ -316,7 +374,7 @@ export default function DocumentTables(props: IProps) { if (document.document_status !== EDocumentStatus.REFUSED) return null; return { key: document.uid, - document_type: { sx: { width: 300 }, content: document.document_type?.name ?? "_" }, + document_type: { sx: { width: 300 }, content: document.document_type?.name ?? "Autre document" }, document_status: { sx: { width: 107 }, content: ( @@ -333,7 +391,7 @@ export default function DocumentTables(props: IProps) { }, file: { sx: { width: 120 }, - content: document.files?.[0]?.file_name ?? "_", + content: document.files?.[0]?.file_name?.split(".")?.[0] ?? "_", }, actions: { sx: { width: 76 }, content: "" }, }; @@ -350,7 +408,7 @@ export default function DocumentTables(props: IProps) { key: document.uid, document_type: { sx: { width: 300 }, - content: formatName(document.files?.[0]?.file_name?.split(".")?.[0] ?? "") || "_", + content: "Autre document", }, document_status: { sx: { width: 107 }, @@ -362,7 +420,7 @@ export default function DocumentTables(props: IProps) { }, file: { sx: { width: 120 }, - content: document.files?.[0]?.file_name ?? "_", + content: document.files?.[0]?.file_name?.split(".")?.[0] ?? "_", }, actions: { sx: { width: 76 }, @@ -380,10 +438,11 @@ export default function DocumentTables(props: IProps) { ); const progress = useMemo(() => { - const total = askedDocuments.length + toValidateDocuments.length + validatedDocuments.length + refusedDocuments.length; + // Exclude refused documents from total - only count documents that are still in progress + const total = askedDocuments.length + toValidateDocuments.length + validatedDocuments.length; if (total === 0) return 0; return (validatedDocuments.length / total) * 100; - }, [askedDocuments.length, refusedDocuments.length, toValidateDocuments.length, validatedDocuments.length]); + }, [askedDocuments.length, toValidateDocuments.length, validatedDocuments.length]); if (documents.length === 0 && documentsNotary.length === 0) return ; @@ -461,10 +520,6 @@ function getHeader(dateColumnTitle: string, isMobile: boolean): IHead[] { ]; } -function formatName(text: string): string { - return text.replace(/[^a-zA-Z0-9 ]/g, ""); -} - function getTagForSentDocument(status: EDocumentNotaryStatus) { if (status === EDocumentNotaryStatus.SENT) { return ( diff --git a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/EmailReminder/ReminderModal/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/EmailReminder/ReminderModal/index.tsx index 58ed5d47..3dca73f1 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/EmailReminder/ReminderModal/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/EmailReminder/ReminderModal/index.tsx @@ -11,6 +11,11 @@ import React, { useCallback, useMemo, useState } from "react"; import classes from "./classes.module.scss"; +import CustomerService from "src/common/Api/LeCoffreApi/sdk/CustomerService"; +import DocumentService from "src/common/Api/LeCoffreApi/sdk/DocumentService"; +import LoaderService from "src/common/Api/LeCoffreApi/sdk/Loader/LoaderService"; +import UserStore from "@Front/Stores/UserStore"; + type IProps = { isOpen: boolean; onClose?: () => void; @@ -23,9 +28,24 @@ export default function ReminderModal(props: IProps) { const [selectedOptions, setSelectedOptions] = useState([]); const [isAllSelected, setIsAllSelected] = useState(false); - const onRemind = useCallback(() => { + const onRemind = useCallback(async () => { + LoaderService.getInstance().show(); + + const documentUids: string[] = selectedOptions.map((option) => option.value) as string[]; + + const user: any = UserStore.instance.getUser(); + const _office: any = user.office; + + const _documents: any[] = []; + for (const documentUid of documentUids) { + _documents.push((await DocumentService.getDocumentByUid(documentUid)).processData); + } + const _customer = (await CustomerService.getCustomerByUid(customer.uid!)).processData; + + LoaderService.getInstance().hide(); + Customers.getInstance() - .sendReminder(customer.uid!, selectedOptions.map((option) => option.value) as string[]) + .sendReminder(_office, _customer) .then(onRemindSuccess) .then(() => ToasterService.getInstance().success({ title: "Succès !", description: "La relance a été envoyée avec succès." })) .then(onClose); diff --git a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/index.tsx index 61677356..a6de0584 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/index.tsx @@ -64,7 +64,7 @@ export default function ClientView(props: IProps) { (customerUid: string) => { if (!folder.uid) return; LoaderService.getInstance().show(); - FolderService.getFolderByUid(folder.uid, false, false).then((process: any) => { + FolderService.getFolderByUid(folder.uid).then((process: any) => { if (process) { const folder: any = process.processData; @@ -72,7 +72,7 @@ export default function ClientView(props: IProps) { const customers = folder.customers.filter((uid: string) => uid !== customerUid); FolderService.updateFolder(process, { customers: customers }).then(() => { - setTimeout(() => LoaderService.getInstance().hide(), 2000); + LoaderService.getInstance().hide(); window.location.reload(); }); } diff --git a/src/front/Components/Layouts/Folder/FolderInformation/InformationSection/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/InformationSection/index.tsx index 6dff266c..3c98f0e7 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/InformationSection/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/InformationSection/index.tsx @@ -5,11 +5,12 @@ import { IItem } from "@Front/Components/DesignSystem/Menu/MenuItem"; import Tag, { ETagColor } from "@Front/Components/DesignSystem/Tag"; import Typography, { ETypo, ETypoColor } from "@Front/Components/DesignSystem/Typography"; import Module from "@Front/Config/Module"; -import { ArchiveBoxIcon, EllipsisHorizontalIcon, PaperAirplaneIcon, PencilSquareIcon, UsersIcon } from "@heroicons/react/24/outline"; +import { ArchiveBoxIcon, DocumentTextIcon, EllipsisHorizontalIcon, PaperAirplaneIcon, PencilSquareIcon, ShieldCheckIcon, UsersIcon } from "@heroicons/react/24/outline"; import classNames from "classnames"; import { OfficeFolder } from "le-coffre-resources/dist/Notary"; import Link from "next/link"; import { useMemo } from "react"; +import { useRouter } from "next/router"; import { AnchorStatus } from ".."; import classes from "./classes.module.scss"; @@ -20,10 +21,12 @@ type IProps = { onArchive: () => void; anchorStatus: AnchorStatus; isArchived: boolean; + onDownloadAllCertificates: () => void; }; export default function InformationSection(props: IProps) { - const { folder, progress, onArchive, anchorStatus, isArchived } = props; + const { folder, progress, onArchive, anchorStatus, isArchived, onDownloadAllCertificates } = props; + const router = useRouter(); const menuItemsDekstop = useMemo(() => { let elements: IItem[] = []; @@ -43,6 +46,24 @@ export default function InformationSection(props: IProps) { link: Module.getInstance() .get() .modules.pages.Folder.pages.EditInformations.props.path.replace("[folderUid]", folder?.uid ?? ""), + hasSeparator: true, + }; + const verifyDocumentElement = { + icon: , + text: "Vérifier le document", + onClick: () => { + const verifyPath = Module.getInstance() + .get() + .modules.pages.Folder.pages.VerifyDocuments.props.path.replace("[folderUid]", folder?.uid ?? ""); + router.push(verifyPath); + }, + hasSeparator: true, + }; + + const downloadAllCertificatesElement = { + icon: , + text: "Télécharger tous les certificats", + onClick: () => onDownloadAllCertificates(), hasSeparator: false, }; @@ -52,8 +73,12 @@ export default function InformationSection(props: IProps) { elements.push(modifyInformationsElement); } + // Add verify document option + elements.push(verifyDocumentElement); + elements.push(downloadAllCertificatesElement); + return elements; - }, [anchorStatus, folder?.uid]); + }, [anchorStatus, folder?.uid, router]); const menuItemsMobile = useMemo(() => { let elements: IItem[] = []; @@ -75,6 +100,24 @@ export default function InformationSection(props: IProps) { .modules.pages.Folder.pages.EditInformations.props.path.replace("[folderUid]", folder?.uid ?? ""), hasSeparator: true, }; + const verifyDocumentElement = { + icon: , + text: "Vérifier le document", + onClick: () => { + const verifyPath = Module.getInstance() + .get() + .modules.pages.Folder.pages.VerifyDocuments.props.path.replace("[folderUid]", folder?.uid ?? ""); + router.push(verifyPath); + }, + hasSeparator: true, + }; + + const downloadAllCertificatesElement = { + icon: , + text: "Télécharger tous les certificats", + onClick: () => onDownloadAllCertificates(), + hasSeparator: false, + }; // If the folder is not anchored, we can modify the collaborators and the informations if (anchorStatus === AnchorStatus.NOT_ANCHORED) { @@ -82,6 +125,10 @@ export default function InformationSection(props: IProps) { elements.push(modifyInformationsElement); } + // Add verify document option + elements.push(verifyDocumentElement); + elements.push(downloadAllCertificatesElement); + elements.push({ icon: , text: "Envoyer des documents", @@ -101,7 +148,7 @@ export default function InformationSection(props: IProps) { } return elements; - }, [anchorStatus, folder?.uid, isArchived, onArchive]); + }, [anchorStatus, folder?.uid, isArchived, onArchive, onDownloadAllCertificates, router]); return (
diff --git a/src/front/Components/Layouts/Folder/FolderInformation/NoClientView/DeleteFolderModal/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/NoClientView/DeleteFolderModal/index.tsx index ec0958e6..070eb714 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/NoClientView/DeleteFolderModal/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/NoClientView/DeleteFolderModal/index.tsx @@ -28,8 +28,8 @@ export default function DeleteFolderModal(props: IProps) { LoaderService.getInstance().show(); FolderService.getFolderByUid(folder.uid!).then((process: any) => { if (process) { - FolderService.updateFolder(process, { isDeleted: 'true' }).then(() => { - setTimeout(() => LoaderService.getInstance().hide(), 2000); + FolderService.updateFolder(process, { isDeleted: 'true', archived_at: new Date().toISOString() }).then(() => { + LoaderService.getInstance().hide(); resolve(); }); } diff --git a/src/front/Components/Layouts/Folder/FolderInformation/elements/AnchoringAlertInfo/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/elements/AnchoringAlertInfo/index.tsx index bbdf1378..fcb75339 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/elements/AnchoringAlertInfo/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/elements/AnchoringAlertInfo/index.tsx @@ -1,6 +1,6 @@ import Alert, { EAlertVariant } from "@Front/Components/DesignSystem/Alert"; import { EButtonstyletype } from "@Front/Components/DesignSystem/Button"; -import { LockClosedIcon } from "@heroicons/react/24/outline"; +import { ArchiveBoxIcon } from "@heroicons/react/24/outline"; type IProps = { onAnchor: () => void; @@ -10,12 +10,12 @@ export default function AnchoringAlertInfo(props: IProps) { const { onAnchor } = props; return ( , + rightIcon: , onClick: onAnchor, }} variant={EAlertVariant.INFO} diff --git a/src/front/Components/Layouts/Folder/FolderInformation/elements/ArchiveAlertWarning/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/elements/ArchiveAlertWarning/index.tsx index 89828c08..d094d00d 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/elements/ArchiveAlertWarning/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/elements/ArchiveAlertWarning/index.tsx @@ -1,11 +1,14 @@ -import Folders from "@Front/Api/LeCoffreApi/Notary/Folders/Folders"; import Alert, { EAlertVariant } from "@Front/Components/DesignSystem/Alert"; import { EButtonstyletype } from "@Front/Components/DesignSystem/Button"; import Module from "@Front/Config/Module"; import { ArchiveBoxArrowDownIcon, ArchiveBoxIcon, ArrowDownOnSquareIcon } from "@heroicons/react/24/outline"; +import EFolderStatus from "le-coffre-resources/dist/Customer/EFolderStatus"; import { useRouter } from "next/router"; import { useCallback } from "react"; +import LoaderService from "src/common/Api/LeCoffreApi/sdk/Loader/LoaderService"; +import FolderService from "src/common/Api/LeCoffreApi/sdk/FolderService"; + type IProps = { onDownloadAnchoringProof: () => void; folderUid: string; @@ -17,12 +20,15 @@ export default function ArchiveAlertWarning(props: IProps) { const router = useRouter(); const restoreArchive = useCallback(() => { - Folders.getInstance() - .restore(folderUid) - .then(() => router.push(Module.getInstance().get().modules.pages.Folder.props.path)) - .catch((e) => { - console.warn(e); - }); + LoaderService.getInstance().show(); + FolderService.getFolderByUid(folderUid).then((process: any) => { + if (process) { + FolderService.updateFolder(process, { archived_at: null, archived_description: null, status: EFolderStatus.LIVE }) + .then(() => LoaderService.getInstance().hide()) + .then(() => router.push(Module.getInstance().get().modules.pages.Folder.props.path)) + .catch((e) => console.error(e)); + } + }); }, [folderUid, router]); return ( diff --git a/src/front/Components/Layouts/Folder/FolderInformation/elements/ArchiveModal/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/elements/ArchiveModal/index.tsx index ff1c6621..9acdbc38 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/elements/ArchiveModal/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/elements/ArchiveModal/index.tsx @@ -1,4 +1,3 @@ -import Folders from "@Front/Api/LeCoffreApi/Notary/Folders/Folders"; import TextAreaField from "@Front/Components/DesignSystem/Form/TextareaField"; import Modal from "@Front/Components/DesignSystem/Modal"; import Typography, { ETypo } from "@Front/Components/DesignSystem/Typography"; @@ -6,6 +5,10 @@ import Module from "@Front/Config/Module"; import { useRouter } from "next/router"; import React, { useCallback } from "react"; import classes from "./classes.module.scss"; +import EFolderStatus from "le-coffre-resources/dist/Customer/EFolderStatus"; + +import LoaderService from "src/common/Api/LeCoffreApi/sdk/Loader/LoaderService"; +import FolderService from "src/common/Api/LeCoffreApi/sdk/FolderService"; type IProps = { isOpen: boolean; @@ -19,14 +22,16 @@ export default function ArchiveModal(props: IProps) { const archive = useCallback(() => { const description = (document.querySelector("textarea[name='archived_description']") as HTMLTextAreaElement).value ?? ""; - - Folders.getInstance() - .archive(folderUid, description) - .then(onClose) - .then(() => router.push(Module.getInstance().get().modules.pages.Folder.props.path)) - .catch((e) => { - console.warn(e); - }); + LoaderService.getInstance().show(); + FolderService.getFolderByUid(folderUid).then((process: any) => { + if (process) { + FolderService.updateFolder(process, { archived_at: new Date().toISOString(), archived_description: description, status: EFolderStatus.ARCHIVED }) + .then(() => LoaderService.getInstance().hide()) + .then(onClose) + .then(() => router.push(Module.getInstance().get().modules.pages.Folder.props.path)) + .catch((e) => console.error(e)); + } + }); }, [folderUid, onClose, router]); return ( diff --git a/src/front/Components/Layouts/Folder/FolderInformation/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/index.tsx index e2cb8518..b18eab68 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/index.tsx @@ -1,4 +1,3 @@ -import Folders from "@Front/Api/LeCoffreApi/Notary/Folders/Folders"; import OfficeFolderAnchors from "@Front/Api/LeCoffreApi/Notary/OfficeFolderAnchors/OfficeFolderAnchors"; import Loader from "@Front/Components/DesignSystem/Loader"; import DefaultNotaryDashboard from "@Front/Components/LayoutTemplates/DefaultNotaryDashboard"; @@ -22,9 +21,14 @@ import NoClientView from "./NoClientView"; import AnchoringProcessingInfo from "./elements/AnchoringProcessingInfo"; import FolderService from "src/common/Api/LeCoffreApi/sdk/FolderService"; -import NoteService from "src/common/Api/LeCoffreApi/sdk/NoteService"; import DocumentService from "src/common/Api/LeCoffreApi/sdk/DocumentService"; +import FileService from "src/common/Api/LeCoffreApi/sdk/FileService"; import LoaderService from "src/common/Api/LeCoffreApi/sdk/Loader/LoaderService"; +import { ToasterService } from "@Front/Components/DesignSystem/Toaster"; +import PdfService from "@Front/Services/PdfService"; +import MessageBus from "src/sdk/MessageBus"; +import { saveAs } from "file-saver"; +import EFolderStatus from "le-coffre-resources/dist/Customer/EFolderStatus"; export enum AnchorStatus { "VERIFIED_ON_CHAIN" = "VERIFIED_ON_CHAIN", @@ -38,7 +42,7 @@ export default function FolderInformation(props: IProps) { const { isArchived = false } = props; const [anchorStatus, setAnchorStatus] = useState(AnchorStatus.NOT_ANCHORED); const [isLoading, setIsLoading] = useState(true); - const [folder, setFolder] = useState(null); + const [folder, setFolder] = useState(null); const anchoringModal = useOpenable(); const downloadAnchoringProofModal = useOpenable(); const requireAnchoringModal = useOpenable(); @@ -50,10 +54,12 @@ export default function FolderInformation(props: IProps) { const progress = useMemo(() => { let total = 0; let validatedDocuments = 0; - folder?.customers?.forEach((customer) => { + folder?.customers?.forEach((customer: any) => { const documents = customer.documents; - total += documents?.length ?? 0; - validatedDocuments += documents?.filter((document) => document.document_status === EDocumentStatus.VALIDATED).length ?? 0; + // Only count documents that are not refused (still in progress) + const activeDocuments = documents?.filter((document: any) => document.document_status !== EDocumentStatus.REFUSED) ?? []; + total += activeDocuments.length; + validatedDocuments += activeDocuments.filter((document: any) => document.document_status === EDocumentStatus.VALIDATED).length; }); if (total === 0) return 0; const percentage = (validatedDocuments / total) * 100; @@ -109,41 +115,10 @@ export default function FolderInformation(props: IProps) { */ // TODO: review - LoaderService.getInstance().show(); return FolderService.getFolderByUid(folderUid).then(async (process: any) => { if (process) { const folder: any = process.processData; - - await new Promise((resolve: () => void) => { - NoteService.getNotes().then((processes: any) => { - if (processes.length > 0) { - let notes: any[] = processes.map((process: any) => process.processData); - - // FilterBy folder.uid - notes = notes.filter((note: any) => note.folder.uid === folderUid); - - if (notes.length > 0) { - folder.notes = notes; - } - } - resolve(); - }); - }); - - await new Promise((resolve: () => void) => { - DocumentService.getDocuments().then((processes: any[]) => { - if (processes.length > 0) { - const documents: any[] = processes.map((process: any) => process.processData); - for (const customer of folder.customers) { - customer.documents = documents.filter((document: any) => document.depositor && document.depositor.uid === customer.uid); - } - } - resolve(); - }); - }); - setFolder(folder); - setTimeout(() => LoaderService.getInstance().hide(), 2000); } }); }, [folderUid]); @@ -173,10 +148,125 @@ export default function FolderInformation(props: IProps) { }, [fetchData]); const onArchive = useCallback(() => { - if (anchorStatus === AnchorStatus.NOT_ANCHORED) return requireAnchoringModal.open(); + //if (anchorStatus === AnchorStatus.NOT_ANCHORED) return requireAnchoringModal.open(); archiveModal.open(); }, [anchorStatus, archiveModal, requireAnchoringModal]); + const onDownloadAllCertificates = useCallback(async () => { + if (!folder?.uid) return; + + try { + LoaderService.getInstance().show(); + + // Get all documents for this folder + const allDocuments = await DocumentService.getDocuments(); + const folderDocuments = allDocuments + .map((process: any) => process.processData) + .filter((doc: any) => + doc.folder?.uid === folder.uid && + doc.document_status === EDocumentStatus.VALIDATED + ); + + if (folderDocuments.length === 0) { + ToasterService.getInstance().warning({ + title: "Aucun certificat", + description: "Aucun document validé trouvé pour ce dossier." + }); + LoaderService.getInstance().hide(); + return; + } + + // Generate certificates for all validated documents + const certificates: any[] = []; + + for (const doc of folderDocuments) { + try { + // Get customer info + const customer = doc.depositor || doc.customer; + + const certificateData: any = { + customer: { + firstName: customer?.first_name || customer?.firstName || "N/A", + lastName: customer?.last_name || customer?.lastName || "N/A", + postalAddress: customer?.postal_address || customer?.address || customer?.postalAddress || "N/A", + email: customer?.email || "N/A" + }, + notary: { + name: "N/A" + }, + folderUid: folder.uid, + documentHash: "N/A", + metadata: { + fileName: "N/A", + isDeleted: false, + updatedAt: new Date(), + commitmentId: "N/A", + createdAt: new Date(), + documentUid: "N/A", + documentType: "N/A", + merkleProof: "N/A" + } + }; + + // Process files for this document + if (doc.files && doc.files.length > 0) { + for (const file of doc.files) { + const fileProcess = await FileService.getFileByUid(file.uid); + + if (fileProcess.lastUpdatedFileState?.pcd_commitment?.file_blob) { + const hash = fileProcess.lastUpdatedFileState.pcd_commitment.file_blob; + certificateData.documentHash = hash; + + const proof = await MessageBus.getInstance().generateMerkleProof( + fileProcess.lastUpdatedFileState, + 'file_blob' + ); + + const metadata: any = { + fileName: fileProcess.processData.file_name, + isDeleted: false, + updatedAt: new Date(fileProcess.processData.updated_at), + commitmentId: fileProcess.lastUpdatedFileState.commited_in, + createdAt: new Date(fileProcess.processData.created_at), + documentUid: doc.uid, + documentType: doc.document_type?.name || "N/A", + merkleProof: proof + }; + certificateData.metadata = metadata; + break; // Use first file for now + } + } + } + + certificates.push(certificateData); + } catch (error) { + console.error(`Error processing document ${doc.uid}:`, error); + } + } + + // Generate combined PDF + const combinedPdf = await PdfService.getInstance().generateCombinedCertificates(certificates, folder); + + // Download the combined PDF + const filename = `certificats_${folder.folder_number || folder.uid}_${new Date().toISOString().split('T')[0]}.pdf`; + saveAs(combinedPdf, filename); + + ToasterService.getInstance().success({ + title: "Succès !", + description: `${certificates.length} certificat(s) téléchargé(s) avec succès.` + }); + + } catch (error) { + console.error('Error downloading all certificates:', error); + ToasterService.getInstance().error({ + title: "Erreur", + description: "Une erreur est survenue lors du téléchargement des certificats." + }); + } finally { + LoaderService.getInstance().hide(); + } + }, [folder?.uid]); + return ( {!isLoading && ( @@ -187,8 +277,9 @@ export default function FolderInformation(props: IProps) { onArchive={onArchive} anchorStatus={anchorStatus} isArchived={isArchived} + onDownloadAllCertificates={onDownloadAllCertificates} /> - {progress === 100 && anchorStatus === AnchorStatus.NOT_ANCHORED && ( + {progress === 100 && /*anchorStatus === AnchorStatus.NOT_ANCHORED*/ folder.status !== EFolderStatus.ARCHIVED && ( )} {!isArchived && anchorStatus === AnchorStatus.VERIFIED_ON_CHAIN && ( diff --git a/src/front/Components/Layouts/Folder/SendDocuments/index.tsx b/src/front/Components/Layouts/Folder/SendDocuments/index.tsx index 81f50e1c..1e300752 100644 --- a/src/front/Components/Layouts/Folder/SendDocuments/index.tsx +++ b/src/front/Components/Layouts/Folder/SendDocuments/index.tsx @@ -22,6 +22,8 @@ import LoaderService from "src/common/Api/LeCoffreApi/sdk/Loader/LoaderService"; import FolderService from "src/common/Api/LeCoffreApi/sdk/FolderService"; import DocumentService from "src/common/Api/LeCoffreApi/sdk/DocumentService"; import FileService from "src/common/Api/LeCoffreApi/sdk/FileService"; +import CustomerService from "src/common/Api/LeCoffreApi/sdk/CustomerService"; +import WatermarkService from "@Front/Services/WatermarkService"; enum EClientSelection { ALL_CLIENTS = "all_clients", @@ -65,48 +67,67 @@ export default function SendDocuments() { LoaderService.getInstance().show(); for (const selectedClient of selectedClients) { + const customer: any = await new Promise((resolve: (customer: any) => void) => { + CustomerService.getCustomerByUid(selectedClient as string).then((process: any) => { + if (process) { + const customer: any = process.processData; + resolve(customer); + } + }); + }); + for (const file of files) { await new Promise((resolve: () => void) => { - const reader = new FileReader(); - reader.onload = (event) => { - if (event.target?.result) { - const arrayBuffer = event.target.result as ArrayBuffer; - const uint8Array = new Uint8Array(arrayBuffer); + // Add watermark to the file before processing + WatermarkService.getInstance().addWatermark(file).then(async (watermarkedFile) => { + const reader = new FileReader(); + reader.onload = (event) => { + if (event.target?.result) { + const date: Date = new Date(); + const strDate: string = `${date.getDate().toString().padStart(2, '0')}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getFullYear()}`; - const fileBlob: any = { - type: file.type, - data: uint8Array - }; + const fileName: string = `aplc_${customer.contact.last_name}_${strDate}.${file.name.split('.').pop()}`; - const fileData: any = { - file_blob: fileBlob, - file_name: file.name - }; - const validatorId: string = '884cb36a346a79af8697559f16940141f068bdf1656f88fa0df0e9ecd7311fb8:0'; + const arrayBuffer: ArrayBuffer = event.target.result as ArrayBuffer; + const uint8Array: Uint8Array = new Uint8Array(arrayBuffer); - FileService.createFile(fileData, validatorId).then((processCreated: any) => { - const fileUid: string = processCreated.processData.uid; - - const documentData: any = { - folder: { - uid: folderUid as string - }, - customer: { - uid: selectedClient as string - }, - files: [ - { - uid: fileUid - } - ], - document_status: EDocumentNotaryStatus.SENT + const fileBlob: any = { + type: watermarkedFile.type, + data: uint8Array }; - DocumentService.createDocument(documentData, validatorId).then(() => resolve()); - }); - } - }; - reader.readAsArrayBuffer(file); + const fileData: any = { + file_blob: fileBlob, + file_name: fileName + }; + const validatorId: string = '884cb36a346a79af8697559f16940141f068bdf1656f88fa0df0e9ecd7311fb8:0'; + + FileService.createFile(fileData, validatorId).then((processCreated: any) => { + const fileUid: string = processCreated.processData.uid; + + const documentData: any = { + folder: { + uid: folderUid as string + }, + customer: { + uid: selectedClient as string + }, + files: [ + { + uid: fileUid + } + ], + document_status: EDocumentNotaryStatus.SENT + }; + + DocumentService.createDocument(documentData, validatorId).then(() => { + FolderService.refreshFolderByUid(folderUid as string).then(() => resolve()); + }); + }); + } + }; + reader.readAsArrayBuffer(watermarkedFile); + }); }); } } diff --git a/src/front/Components/Layouts/Folder/UpdateClient/index.tsx b/src/front/Components/Layouts/Folder/UpdateClient/index.tsx index 1272a6a3..2408227a 100644 --- a/src/front/Components/Layouts/Folder/UpdateClient/index.tsx +++ b/src/front/Components/Layouts/Folder/UpdateClient/index.tsx @@ -41,7 +41,7 @@ export default function UpdateClient() { if (process) { const customer: any = process.processData; setCustomer(customer); - setTimeout(() => LoaderService.getInstance().hide(), 2000); + LoaderService.getInstance().hide(); } }); } catch (error) { @@ -77,8 +77,8 @@ export default function UpdateClient() { if (process) { // TODO: review - address CustomerService.updateCustomer(process, { contact: contact }).then(() => { - setTimeout(() => LoaderService.getInstance().hide(), 2000); router.push(backwardPath); + LoaderService.getInstance().hide(); }); } }); diff --git a/src/front/Components/Layouts/Folder/UpdateFolderMetadata/index.tsx b/src/front/Components/Layouts/Folder/UpdateFolderMetadata/index.tsx index 163d7197..a995c32a 100644 --- a/src/front/Components/Layouts/Folder/UpdateFolderMetadata/index.tsx +++ b/src/front/Components/Layouts/Folder/UpdateFolderMetadata/index.tsx @@ -54,10 +54,10 @@ export default function UpdateFolderMetadata() { FolderService.getFolderByUid(folderUid).then((process: any) => { if (process) { FolderService.updateFolder(process, { ...values, deed: { uid: values["deed"] } }).then(() => { - setTimeout(() => LoaderService.getInstance().hide(), 2000); router.push(Module.getInstance() .get() .modules.pages.Folder.pages.FolderInformation.props.path.replace("[folderUid]", folderUid)); + LoaderService.getInstance().hide(); }); } }); @@ -75,7 +75,7 @@ export default function UpdateFolderMetadata() { if (process) { const folder: any = process.processData; setSelectedFolder(folder); - setTimeout(() => LoaderService.getInstance().hide(), 2000); + LoaderService.getInstance().hide(); } }); }, [folderUid]); diff --git a/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx b/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx index dd3f5312..f194b511 100644 --- a/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx +++ b/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx @@ -6,7 +6,6 @@ import Confirm from "@Front/Components/DesignSystem/OldModal/Confirm"; import Typography, { ETypo, ETypoColor } from "@Front/Components/DesignSystem/Typography"; import DefaultNotaryDashboard from "@Front/Components/LayoutTemplates/DefaultNotaryDashboard"; import Module from "@Front/Config/Module"; -import { Document } from "le-coffre-resources/dist/Notary"; import { EDocumentStatus } from "le-coffre-resources/dist/Notary/Document"; import Image from "next/image"; import { NextRouter, useRouter } from "next/router"; @@ -17,8 +16,12 @@ import classes from "./classes.module.scss"; import TextAreaField from "@Front/Components/DesignSystem/Form/TextareaField"; import MessageBox from "@Front/Components/Elements/MessageBox"; +import { FileBlob } from "@Front/Api/Entities/types"; + +import LoaderService from "src/common/Api/LeCoffreApi/sdk/Loader/LoaderService"; import DocumentService from "src/common/Api/LeCoffreApi/sdk/DocumentService"; import FileService from "src/common/Api/LeCoffreApi/sdk/FileService"; +import FolderService from "src/common/Api/LeCoffreApi/sdk/FolderService"; type IProps = {}; type IPropsClass = { @@ -32,9 +35,9 @@ type IState = { isValidateModalVisible: boolean; refuseText: string; selectedFileIndex: number; - selectedFile: any; // File | null; TODO: review + selectedFile: { uid: string; file_name: string; file_blob: FileBlob } | null; validatedPercentage: number; - document: Document | null; + document: any | null; fileBlob: Blob | null; isLoading: boolean; }; @@ -237,6 +240,8 @@ class ViewDocumentsClass extends BasePage { private async getFilePreview(): Promise { try { + if (!this.state.selectedFile) return; + const fileBlob: Blob = new Blob([this.state.selectedFile.file_blob.data], { type: this.state.selectedFile.file_blob.type }); this.setState({ fileBlob, @@ -247,7 +252,7 @@ class ViewDocumentsClass extends BasePage { } private downloadFile() { - if (!this.state.fileBlob) return; + if (!this.state.fileBlob || !this.state.selectedFile) return; const url = URL.createObjectURL(this.state.fileBlob); const a = document.createElement('a'); @@ -319,16 +324,20 @@ class ViewDocumentsClass extends BasePage { private async refuseDocument() { try { + LoaderService.getInstance().show(); DocumentService.getDocumentByUid(this.props.documentUid).then((process: any) => { if (process) { DocumentService.updateDocument(process, { document_status: EDocumentStatus.REFUSED, refused_reason: this.state.refuseText }).then(() => { - this.props.router.push( - Module.getInstance() - .get() - .modules.pages.Folder.pages.FolderInformation.props.path.replace("[folderUid]", this.props.folderUid) + - "?customerUid=" + - this.state.document?.depositor?.uid, - ); + FolderService.refreshFolderByUid(this.props.folderUid).then(() => { + LoaderService.getInstance().hide(); + this.props.router.push( + Module.getInstance() + .get() + .modules.pages.Folder.pages.FolderInformation.props.path.replace("[folderUid]", this.props.folderUid) + + "?customerUid=" + + this.state.document?.depositor?.uid, + ); + }); }); } }); @@ -339,16 +348,34 @@ class ViewDocumentsClass extends BasePage { private async validateDocument() { try { - DocumentService.getDocumentByUid(this.props.documentUid).then((process: any) => { + LoaderService.getInstance().show(); + DocumentService.getDocumentByUid(this.props.documentUid).then(async (process: any) => { if (process) { + await new Promise((resolve: () => void) => { + FileService.getFileByUid(process.processData.files[0].uid).then((p) => { + if (p) { + const date: Date = new Date(); + const strDate: string = `${date.getDate().toString().padStart(2, '0')}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getFullYear()}`; + + const fileName: string = p.processData.file_name; + const extension: string = fileName.substring(fileName.lastIndexOf('.')); + + FileService.updateFile(p, { file_name: `aplc_${fileName.substring(0, fileName.lastIndexOf('_'))}_${strDate}${extension}` }).then(resolve); + } + }); + }); + DocumentService.updateDocument(process, { document_status: EDocumentStatus.VALIDATED }).then(() => { - this.props.router.push( - Module.getInstance() - .get() - .modules.pages.Folder.pages.FolderInformation.props.path.replace("[folderUid]", this.props.folderUid) + - "?customerUid=" + - this.state.document?.depositor?.uid, - ); + FolderService.refreshFolderByUid(this.props.folderUid).then(() => { + LoaderService.getInstance().hide(); + this.props.router.push( + Module.getInstance() + .get() + .modules.pages.Folder.pages.FolderInformation.props.path.replace("[folderUid]", this.props.folderUid) + + "?customerUid=" + + this.state.document?.depositor?.uid, + ); + }); }); } }); diff --git a/src/front/Components/Layouts/Folder/index.tsx b/src/front/Components/Layouts/Folder/index.tsx index d9615e4f..4bf850c6 100644 --- a/src/front/Components/Layouts/Folder/index.tsx +++ b/src/front/Components/Layouts/Folder/index.tsx @@ -25,12 +25,12 @@ export default function Folder() { useEffect(() => { // TODO: review - FolderService.getFolders().then((processes: any[]) => { + FolderService.getFoldersBy({ status: EFolderStatus.LIVE }).then((processes: any[]) => { if (processes.length > 0) { let folders: any[] = processes.map((process: any) => process.processData); - // FilterBy status - folders = folders.filter((folder: any) => folder.status === EFolderStatus.LIVE); + // OrderBy created_at desc + folders = folders.sort((a: any, b: any) => new Date(b.created_at).getTime() - new Date(a.created_at).getTime()); if (folders.length > 0) { router.push( diff --git a/src/front/Components/Layouts/Login/StepEmail/index.tsx b/src/front/Components/Layouts/Login/StepEmail/index.tsx index 5c54891a..85bead77 100644 --- a/src/front/Components/Layouts/Login/StepEmail/index.tsx +++ b/src/front/Components/Layouts/Login/StepEmail/index.tsx @@ -25,6 +25,7 @@ type IProps = { export default function StepEmail(props: IProps) { const { onSubmit, validationErrors } = props; const [isErrorModalOpen, setIsErrorModalOpen] = useState(0); + /* const router = useRouter(); const redirectCustomerOnConnection = useCallback(() => { async function getCustomer() { @@ -88,7 +89,7 @@ export default function StepEmail(props: IProps) {
- Pour les notaires et les colaborateurs : + Pour les notaires et les collaborateurs :
diff --git a/src/front/Components/Layouts/Login/index.tsx b/src/front/Components/Layouts/Login/index.tsx index 4aca45e5..220c6681 100644 --- a/src/front/Components/Layouts/Login/index.tsx +++ b/src/front/Components/Layouts/Login/index.tsx @@ -16,6 +16,14 @@ import Module from "@Front/Config/Module"; import { TotpCodesReasons } from "le-coffre-resources/dist/Customer/TotpCodes"; import PasswordForgotten from "./PasswordForgotten"; import backgroundImage from "@Assets/images/background_refonte.svg"; + +import UserStore from "@Front/Stores/UserStore"; + +import AuthModal from "src/sdk/AuthModal"; +import CustomerService from "src/common/Api/LeCoffreApi/sdk/CustomerService"; +import MessageBus from "src/sdk/MessageBus"; +import { resolve } from "path"; + export enum LoginStep { EMAIL, TOTP, @@ -23,6 +31,7 @@ export enum LoginStep { NEW_PASSWORD, PASSWORD_FORGOTTEN, } + export default function Login() { const router = useRouter(); // const error = router.query["error"]; @@ -34,7 +43,9 @@ export default function Login() { const [totpCode, setTotpCode] = useState(""); const [email, setEmail] = useState(""); const [partialPhoneNumber, setPartialPhoneNumber] = useState(""); + const [sessionId, setSessionId] = useState(""); const [validationErrors, setValidationErrors] = useState([]); + const [isAuthModalOpen, setIsAuthModalOpen] = useState(false); // const openErrorModal = useCallback(() => { // setIsErrorModalOpen(true); @@ -50,9 +61,10 @@ export default function Login() { const onEmailFormSubmit = useCallback(async (e: React.FormEvent | null, values: { [key: string]: string }) => { try { - /* TODO: review if (!values["email"]) return; setEmail(values["email"]); + + /* TODO: review const res = await Auth.getInstance().mailVerifySms({ email: values["email"] }); setPartialPhoneNumber(res.partialPhoneNumber); setTotpCodeUid(res.totpCodeUid); @@ -77,18 +89,33 @@ export default function Login() { async (e: React.FormEvent | null, values: { [key: string]: string }) => { try { if (!values["totpCode"]) return; + /* const res = await Auth.getInstance().verifyTotpCode({ totpCode: values["totpCode"], email }); // If the code is valid setting it in state - if (res.validCode) setTotpCode(values["totpCode"]); + if (res.validCode) { + setTotpCode(values["totpCode"]); + setSessionId(res.sessionId); // Store the session ID + } + */ + if ('1234' === values["totpCode"]) { + setTotpCode(values["totpCode"]); + // For testing, set a mock session ID + setSessionId("mock-session-id-123"); + } setValidationErrors([]); + + /* // If it's first connection, show the form for first connection if (res.reason === TotpCodesReasons.FIRST_LOGIN) setStep(LoginStep.NEW_PASSWORD); // If it's password forgotten, show the form for password forgotten else if (res.reason === TotpCodesReasons.RESET_PASSWORD) setStep(LoginStep.PASSWORD_FORGOTTEN); // Else just login normally else setStep(LoginStep.PASSWORD); + */ + + setIsAuthModalOpen(true); } catch (error: any) { setValidationErrors([ { @@ -133,7 +160,10 @@ export default function Login() { return; } const token = await Auth.getInstance().setPassword({ totpCode, email, password: values["password"] }); - CustomerStore.instance.connect(token.accessToken, token.refreshToken); + + // TODO: review + //CustomerStore.instance.connect(token.accessToken, token.refreshToken); + setValidationErrors([]); router.push(Module.getInstance().get().modules.pages.Folder.pages.Select.props.path); // If set password worked, setting the token and redirecting @@ -157,7 +187,10 @@ export default function Login() { try { if (!values["password"]) return; const token = await Auth.getInstance().login({ totpCode, email, password: values["password"] }); - CustomerStore.instance.connect(token.accessToken, token.refreshToken); + + // TODO: review + //CustomerStore.instance.connect(token.accessToken, token.refreshToken); + setValidationErrors([]); router.push(Module.getInstance().get().modules.pages.Folder.pages.Select.props.path); } catch (error: any) { @@ -234,6 +267,49 @@ export default function Login() { {step === LoginStep.PASSWORD_FORGOTTEN && ( )} + + {isAuthModalOpen && { + // After 4nk authentication is complete, get the process for the pairing ID + MessageBus.getInstance().initMessageListener(); + MessageBus.getInstance().isReady().then(async () => { + try { + // Find the customer + const customer: any = (await CustomerService.getCustomers()) + .map((process: any) => process.processData) + .find((customer: any) => customer.contact.email === email); + + // Get the pairing ID + const pairingId = await MessageBus.getInstance().getPairingId(); + console.log('[Login] Got pairing ID:', pairingId); + + // Get all processes + const processes = await MessageBus.getInstance().getProcesses(); + console.log('[Login] Got processes:', Object.keys(processes)); + + const targetProcess = processes[pairingId]; + + if (targetProcess) { + console.log('[Login] Found target process:', targetProcess); + // Connect the user with the process data + UserStore.instance.connect(customer /*targetProcess*/); + router.push(Module.getInstance().get().modules.pages.Folder.pages.Select.props.path); + } else { + console.error('[Login] No process found for pairing ID:', pairingId); + // Handle the case where no process is found + } + + MessageBus.getInstance().destroyMessageListener(); + } catch (error) { + console.error('[Login] Error getting process:', error); + MessageBus.getInstance().destroyMessageListener(); + } + }); + + setIsAuthModalOpen(false); + }} + />}
{/* (null); + const [isAuthModalOpen, setIsAuthModalOpen] = useState(false); + const [isConnected, setIsConnected] = useState(false); - useEffect(() => { - async function getUser() { - // TODO: review - // HACK: If start with http://local.lecoffreio.4nkweb:3000/authorized-client - // Replace with http://localhost:3000/authorized-client - if (window.location.href.startsWith('http://local.lecoffreio.4nkweb:3000/authorized-client')) { - window.location.href = window.location.href.replace('http://local.lecoffreio.4nkweb:3000/authorized-client', 'http://localhost:3000/authorized-client'); - return; - } + // États pour les barres de progression + const [showProgress, setShowProgress] = useState(false); + const [progressInfo, setProgressInfo] = useState({ + globalProgress: 0, + currentStep: '', + stepProgress: 0, + description: '' + }); - const code = router.query["code"]; - if (code) { - try { - const token = await Auth.getInstance().getIdnotJwt(code as string); - if (!token) return router.push(Module.getInstance().get().modules.pages.Login.props.path); - await UserStore.instance.connect(token.accessToken, token.refreshToken); - const jwt = JwtService.getInstance().decodeJwt(); - if (!jwt) return router.push(Module.getInstance().get().modules.pages.Login.props.path + "?error=1"); - if (jwt.rules && !jwt.rules.includes("GET folders")) { - return router.push(Module.getInstance().get().modules.pages.Subscription.pages.New.props.path); - } - setIsAuthModalOpen(true); - //return router.push(Module.getInstance().get().modules.pages.Folder.props.path); - return; - } catch (e: any) { - if (e.http_status === 401 && e.message === "Email not found") { - return router.push(Module.getInstance().get().modules.pages.Login.props.path + "?error=3"); - } - if (e.http_status === 409) { - return router.push(Module.getInstance().get().modules.pages.Login.props.path + "?error=4"); - } - return router.push(Module.getInstance().get().modules.pages.Login.props.path + "?error=1"); - } - } + const getOffice = async (idNotUser: any) => { + return await new Promise((resolve: (office: any) => void) => { + OfficeService.getOffices().then((processes: any[]) => { + const officeFound: any = processes.length > 0 ? processes.map((process: any) => process.processData).find((office: any) => office.idNot === idNotUser.office.idNot) : null; + if (officeFound) { + resolve(officeFound); + } else { + const officeData: any = { + idNot: idNotUser.office.idNot, + name: idNotUser.office.name, + crpcen: idNotUser.office.crpcen, + address: { + create: { + address: idNotUser.office.address.address, + zip_code: idNotUser.office.address.zip_code, + city: idNotUser.office.address.city + } + }, + office_status: 'ACTIVATED' + }; + const validatorId: string = '884cb36a346a79af8697559f16940141f068bdf1656f88fa0df0e9ecd7311fb8:0'; - const refreshToken = CookieService.getInstance().getCookie("leCoffreRefreshToken"); - if (!refreshToken) return router.push(Module.getInstance().get().modules.pages.Login.props.path + "?error=1"); - const isTokenRefreshed = await JwtService.getInstance().refreshToken(refreshToken); - const jwt = JwtService.getInstance().decodeJwt(); - if (!jwt) return router.push(Module.getInstance().get().modules.pages.Login.props.path + "?error=1"); - if (!jwt.rules.includes("GET folders")) { - return router.push(Module.getInstance().get().modules.pages.Subscription.pages.New.props.path); - } - if (isTokenRefreshed) { - setIsAuthModalOpen(true); - //return router.push(Module.getInstance().get().modules.pages.Folder.props.path); - return; - } - return router.push(Module.getInstance().get().modules.pages.Login.props.path + "?error=2"); - } - getUser(); - }), - [router]; + OfficeService.createOffice(officeData, validatorId).then((process: any) => { + if (process) { + const office: any = process.processData; + resolve(office); + } + }); + } + }); + }); + }; - return ( - -
-
- coffre - - Connexion à votre espace professionnel - -
+ const getCollaborator = async (idNotUser: any) => { + return await new Promise(async (resolve: (role: any) => void) => { + const processFound: any | null = await CollaboratorService.getCollaboratorBy({ idNot: idNotUser.idNot }); + if (processFound) { + resolve(processFound.processData); + } else { + const validatorId: string = '884cb36a346a79af8697559f16940141f068bdf1656f88fa0df0e9ecd7311fb8:0'; + const office: any = await getOffice(idNotUser); - -
- - {isAuthModalOpen && { - setIsAuthModalOpen(false); - router.push(Module.getInstance().get().modules.pages.Folder.props.path); - }} - />} -
- - ); + if (!await ImportData.isDone()) { + LoaderService.getInstance().hide(); + setShowProgress(true); + + await ImportData.import(office, validatorId, (info: ProgressInfo) => { + setProgressInfo(info); + }); + + setShowProgress(false); + LoaderService.getInstance().show(); + } + + const role: any = (await RoleService.getRoles()) + .map((process: any) => process.processData) + .find((role: any) => role.name === idNotUser.role.name); + + const officeRole: any = (await OfficeRoleService.getOfficeRoles()) + .map((process: any) => process.processData) + .filter((officeRole: any) => officeRole.office.uid === office.uid) + .find((officeRole: any) => officeRole.name === idNotUser.office_role.name); + + const collaboratorData: any = { + idNot: idNotUser.idNot, + contact: idNotUser.contact, + office: { + uid: office.uid + }, + role: { + uid: role.uid + }, + office_role: { + uid: officeRole.uid + } + }; + + CollaboratorService.createCollaborator(collaboratorData, validatorId).then((process: any) => { + if (process) { + const collaborator: any = process.processData; + resolve(collaborator); + } + }); + } + }); + }; + + useEffect(() => { + async function getUser() { + UserStore.instance.disconnect(); + + // TODO: review + // HACK: If start with http://local.lecoffreio.4nkweb:3000/authorized-client + // Replace with http://localhost:3000/authorized-client + if (window.location.href.startsWith('http://local.lecoffreio.4nkweb:3000/authorized-client')) { + window.location.href = window.location.href.replace('http://local.lecoffreio.4nkweb:3000/authorized-client', 'http://localhost:3000/authorized-client'); + return; + } + + const code = router.query["code"]; + if (code) { + try { + // Nettoyer l'URL pour ne garder que la racine + const rootUrl = window.location.origin; + if (window.location.href !== rootUrl) { + window.history.replaceState({}, document.title, rootUrl); + } + + const user: any = await Auth.getInstance().getIdNotUser(code as string); + setIdNotUser(user.idNotUser); + setIsAuthModalOpen(true); + /* + const token: any = null; + if (!token) return router.push(Module.getInstance().get().modules.pages.Login.props.path); + await UserStore.instance.connect(token.accessToken, token.refreshToken); + const jwt = JwtService.getInstance().decodeJwt(); + if (!jwt) return router.push(Module.getInstance().get().modules.pages.Login.props.path + "?error=1"); + if (jwt.rules && !jwt.rules.includes("GET folders")) { + return router.push(Module.getInstance().get().modules.pages.Subscription.pages.New.props.path); + } + setIsAuthModalOpen(true); + //return router.push(Module.getInstance().get().modules.pages.Folder.props.path); + */ + return; + } catch (e: any) { + if (e.http_status === 401 && e.message === "Email not found") { + return router.push(Module.getInstance().get().modules.pages.Login.props.path + "?error=3"); + } + if (e.http_status === 409) { + return router.push(Module.getInstance().get().modules.pages.Login.props.path + "?error=4"); + } + return router.push(Module.getInstance().get().modules.pages.Login.props.path + "?error=1"); + } + } + /* + const refreshToken = CookieService.getInstance().getCookie("leCoffreRefreshToken"); + if (!refreshToken) return router.push(Module.getInstance().get().modules.pages.Login.props.path + "?error=1"); + const isTokenRefreshed = await JwtService.getInstance().refreshToken(refreshToken); + const jwt = JwtService.getInstance().decodeJwt(); + if (!jwt) return router.push(Module.getInstance().get().modules.pages.Login.props.path + "?error=1"); + if (!jwt.rules.includes("GET folders")) { + return router.push(Module.getInstance().get().modules.pages.Subscription.pages.New.props.path); + } + if (isTokenRefreshed) { + //setIsAuthModalOpen(true); + //return router.push(Module.getInstance().get().modules.pages.Folder.props.path); + return; + } + */ + return router.push(Module.getInstance().get().modules.pages.Login.props.path + "?error=2"); + } + getUser(); + }, [router]); + + return ( + +
+
+ coffre + + Connexion à votre espace professionnel + +
+ + {!showProgress ? ( + + ) : ( + + + Importation des données + + {/* Progression globale */} + + + Progression globale: {Math.round(progressInfo.globalProgress)}% + + + {progressInfo.currentStep} + + + + + {/* Progression par étape */} + + + Progression de l'étape: {Math.round(progressInfo.stepProgress)}% + {progressInfo.description || ''} + + + + + )} +
+ + {isAuthModalOpen && { + setIsAuthModalOpen(false); + setIsConnected(true); + setTimeout(() => { + LoaderService.getInstance().show(); + MessageBus.getInstance().initMessageListener(); + MessageBus.getInstance().isReady().then(async () => { + const collaborator: any = await getCollaborator(idNotUser); + UserStore.instance.connect(collaborator); + + MessageBus.getInstance().destroyMessageListener(); + LoaderService.getInstance().hide(); + + /* + if (jwt.rules && !jwt.rules.includes("GET folders")) { + router.push(Module.getInstance().get().modules.pages.Subscription.pages.New.props.path); + } + */ + + window.location.href = Module.getInstance().get().modules.pages.Folder.props.path; + }); + }, 100); + }} + />} + {isConnected &&