From e43b57d6445d1fb2509b1a9673260a1297774fdd Mon Sep 17 00:00:00 2001 From: Alan Grainger <16197738+alangrainger@users.noreply.github.com> Date: Thu, 4 Jun 2026 07:40:52 +1200 Subject: [PATCH] Refactor to TypeScript ES modules and add metadata sidebar --- .dockerignore | 1 + .gitignore | 2 + CONTRIBUTING.md | 190 ++ Dockerfile | 3 +- README.md | 76 +- app/config.json | 26 +- app/package-lock.json | 2653 +++++++++++++++-- app/package.json | 24 +- app/public/photoswipe-overrides.css | 5 +- app/public/style.css | 163 +- app/public/web.js | 895 ------ app/src/client/init.ts | 53 + app/src/client/layout.ts | 172 ++ app/src/client/lightbox-ui.ts | 157 + app/src/client/lightbox.ts | 203 ++ app/src/client/selection.ts | 129 + app/src/client/sidebar.ts | 372 +++ app/src/client/state.ts | 105 + app/src/client/tiles.ts | 152 + app/src/client/virtualization.ts | 172 ++ app/src/config/access.ts | 19 + app/src/config/loader.ts | 52 + app/src/config/migrations.ts | 107 + app/src/functions.ts | 129 - app/src/gallery/builder.ts | 150 + app/src/gallery/exif.ts | 70 + app/src/gallery/filename.ts | 91 + app/src/http.ts | 14 + app/src/immich.ts | 874 +++--- app/src/index.ts | 47 +- app/src/invalidRequestHandler.ts | 3 +- app/src/render.ts | 544 ---- app/src/share.ts | 31 + app/src/shared/types.ts | 89 + app/src/stream/asset.ts | 121 + app/src/stream/download.ts | 228 ++ app/src/types.ts | 16 + app/src/utils/log.ts | 24 + .../sanitize.js => utils/sanitize.ts} | 29 +- app/src/utils/text.ts | 22 + app/src/{views => view}/gallery.tsx | 36 +- app/src/{views => view}/home.tsx | 0 app/src/{views => view}/password.tsx | 0 app/src/{views/_render.ts => view/render.ts} | 0 app/src/{views/_theme.tsx => view/theme.tsx} | 0 app/tests/escapeHtml.test.ts | 26 + app/tsconfig.client.json | 27 + app/tsconfig.json | 8 + app/vitest.config.ts | 8 + 49 files changed, 5909 insertions(+), 2409 deletions(-) create mode 100644 CONTRIBUTING.md delete mode 100644 app/public/web.js create mode 100644 app/src/client/init.ts create mode 100644 app/src/client/layout.ts create mode 100644 app/src/client/lightbox-ui.ts create mode 100644 app/src/client/lightbox.ts create mode 100644 app/src/client/selection.ts create mode 100644 app/src/client/sidebar.ts create mode 100644 app/src/client/state.ts create mode 100644 app/src/client/tiles.ts create mode 100644 app/src/client/virtualization.ts create mode 100644 app/src/config/access.ts create mode 100644 app/src/config/loader.ts create mode 100644 app/src/config/migrations.ts delete mode 100644 app/src/functions.ts create mode 100644 app/src/gallery/builder.ts create mode 100644 app/src/gallery/exif.ts create mode 100644 app/src/gallery/filename.ts create mode 100644 app/src/http.ts delete mode 100644 app/src/render.ts create mode 100644 app/src/share.ts create mode 100644 app/src/shared/types.ts create mode 100644 app/src/stream/asset.ts create mode 100644 app/src/stream/download.ts create mode 100644 app/src/utils/log.ts rename app/src/{includes/sanitize.js => utils/sanitize.ts} (50%) create mode 100644 app/src/utils/text.ts rename app/src/{views => view}/gallery.tsx (81%) rename app/src/{views => view}/home.tsx (100%) rename app/src/{views => view}/password.tsx (100%) rename app/src/{views/_render.ts => view/render.ts} (100%) rename app/src/{views/_theme.tsx => view/theme.tsx} (100%) create mode 100644 app/tests/escapeHtml.test.ts create mode 100644 app/tsconfig.client.json create mode 100644 app/vitest.config.ts diff --git a/.dockerignore b/.dockerignore index eebf352..d2045bf 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,4 @@ /app/node_modules/ /app/dist/ +/app/public/js/ /app/.env diff --git a/.gitignore b/.gitignore index 3d82ad3..9c7be92 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ node_modules/ dist/ +app/public/js/ .idea .env .directory +/app/config.dev.json diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..38d0706 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,190 @@ +# Contributing to Immich Public Proxy + +Thanks for your interest in contributing. This guide covers what the project is, what it deliberately is not, and how to work on it productively. It is written for both human contributors and LLM coding agents - please read it end to end before opening a PR or making suggestions. + +## Project philosophy and hard constraints + +Immich Public Proxy (IPP) exists to share Immich photos publicly without exposing the Immich instance itself. Everything about the design follows from that single goal. + +**Optimize for auditability.** Because IPP proxies a private photo library, the code stays small enough to audit for security-relevant behavior. New features that meaningfully grow the *attack surface* need a strong justification, even if they're functionally useful. "Lean" here is a security property, not a line-count target - features that add purely client-side UI complexity (a sidebar, a date-grouped view) don't trip this constraint; features that add new ways the server can talk to Immich, accept input, or persist state do. + +**Read-only access to Immich. This is non-negotiable.** IPP must never modify Immich, its data, or its files. It does not use an Immich API key. The only Immich endpoints it calls are the ones reachable via a public share key. This rule rules out a large class of feature requests; see "What will not be accepted" below. + +**Stateless.** No database, no user accounts, no long-lived secrets beyond an encrypted cookie session for share passwords. Avoid adding persistent state. If you think you need a cache, estimate the real cost of not having it first. + +**Privacy at the boundary.** Any invalid, expired, or upstream-failed request returns 404. Do not leak upstream Immich status codes, error bodies, or share existence to the client. + +## Architecture at a glance + +Request flow for a typical share URL like `https://proxy.example.com/share/`: + +1. Express routes in `app/src/index.ts` receive the request. +2. `app/src/immich.ts` fetches the share metadata from Immich over the local network, validates it, and returns the asset list. +3. For a gallery, `app/src/gallery/builder.ts` builds the view-model and `app/src/view/gallery.tsx` renders it server-side with Preact. The page embeds a JSON init block consumed by the client. +4. The client gallery lives in `app/src/client/` (TypeScript ES modules, compiled file-for-file by `tsc` into `app/public/js/`). It wires PhotoSwipe v5 with a virtualized justified-rows layout. There is no client-side framework hydration. +5. For individual assets (image, video, thumbnail, download, zip), Express streams bytes from Immich back to the client without touching disk via `app/src/stream/`. + +### Repository layout + +``` +.github/workflows/ CI: builds and pushes Docker image on v* tags +app/ + config.json Runtime configuration, overrideable via volume or inline + package.json Node project manifest + tsconfig.json Server TypeScript config (compiles src/ to dist/) + tsconfig.client.json Client TypeScript config (compiles src/client/ + src/shared/ to public/js/) + vitest.config.ts Unit-test runner config + src/ + index.ts Express setup and routes + immich.ts Upstream Immich API calls, share + token caches + encrypt.ts Cookie-session encryption for password-protected shares + invalidRequestHandler.ts Centralised 404 / custom-response handling + http.ts Operator-configured HTTP response headers + share.ts Share-level info + policy (title, canDownload) + types.ts Server-only TypeScript types + config/ + loader.ts loadConfig() reads env / file, applies migrations + migrations.ts Backward-compat shims for legacy config-key shapes + access.ts getConfigOption() reads the loaded config + gallery/ + builder.ts Gallery view-model construction + exif.ts EXIF / location whitelisting for the sidebar + filename.ts Download filename derivation + stream/ + asset.ts Single-asset stream (image / video / thumbnail) + download.ts Zip pipeline (concurrency-bounded, retry, abort) + utils/ + log.ts Timestamped log.info / log.warn / log.error + sanitize.ts Filename-character sanitization + text.ts escapeHtml + toString narrowing + view/ Preact SSR templates (.tsx) + shared/types.ts Types shared between server SSR and client (GalleryItem, etc.) + client/ Client gallery, virtualization, lightbox, sidebar + public/ Static assets served as-is + photoswipe/ Vendored PhotoSwipe v5 + thumbhash/, fonts/, images/ + style.css, photoswipe-overrides.css + tests/ Vitest unit tests for pure functions +docs/ User-facing docs linked from the README +Dockerfile Multi-stage build, runs as the non-root `node` user +docker-compose.yml Reference deployment +``` + +The server tsconfig excludes `src/client/`; the client tsconfig only includes `src/client/` and `src/shared/`. Compiled client output (`app/public/js/`) is gitignored. + +## Tech stack + +- **Node.js** (LTS, per the `node:lts-alpine` base image). +- **TypeScript** with `strictNullChecks` enabled. + - Server: target ES6, module CommonJS (`tsconfig.json`). + - Client: target ES2022, module ESNext, browser libs (`tsconfig.client.json`). Compiled file-for-file by `tsc`; no bundler. +- **Express 4** for HTTP. +- **Preact** with `preact-render-to-string` for SSR-only templates. No client-side Preact. +- **PhotoSwipe v5** for the lightbox (vendored under `app/public/photoswipe/`). +- **thumbhash** for low-res placeholders (vendored). +- **archiver** for streaming "download all" zips. +- **cookie-session** for password-protected share sessions. +- **tsx** for running the server in dev with watch + ESM-native imports. +- **concurrently** to run the server and client tsc watchers side-by-side in dev. +- **vitest** for unit tests on pure functions. +- **ESLint** with `eslint-config-standard`. + +## Development setup + +```bash +cd app +npm install +npm run dev +``` + +Required environment variables (set in `app/.env` or your shell): + +- `IMMICH_URL` - local URL to your Immich instance. Should not be public. +- `PUBLIC_BASE_URL` - optional. Public base URL for IPP without trailing slash. Omit to derive from request hostname. +- `IPP_PORT` - optional. Default 3000. + +To exercise the full gallery flow you need a real Immich instance you can hit, with at least one public share created. The README has the user-facing setup steps for spinning that up. + +Configuration overrides go in `app/config.json` or inline via env (see `docs/inline-configuration.md`). Always read config through `getConfigOption('ipp.path.to.key', defaultValue)` rather than reading the JSON directly. + +## Build, lint, test + +```bash +npm run build # both server and client tsc; output to dist/ and public/js/ +npm run build:server # server only +npm run build:client # client only +npm test # vitest run (unit tests on pure functions) +npm run test:watch # vitest in watch mode +npm run test:container # build a podman image and run it locally +npx eslint src/ # lint +``` + +`npm test` runs the pure-function unit tests in `app/tests/`. Add tests there for any new pure logic (filename derivation, escaping, layout math, EXIF whitelisting, etc.); skip HTTP plumbing. + +Beyond unit tests, exercise the gallery end-to-end against a real Immich instance: happy path plus failure paths (expired share, trashed asset, password protection, very large albums, video range requests). + +## Conventions for adding code + +**Configuration.** New options go in `app/config.json` under the appropriate `ipp.*` namespace, read via `getConfigOption`, and documented in the relevant table in `README.md`. Prefer a group toggle plus per-field overrides over a single flat boolean when several related toggles cluster, following the `ipp.showMetadata` pattern. Existing keys keep working; if you rename one, add a backward-compat shim with a startup deprecation warning, as was done for the v2.0 gallery key rename. + +**Privacy of responses.** Always return 404 for invalid or upstream-failed requests. Use `invalidRequestHandler` rather than crafting ad-hoc error responses. Do not surface Immich status codes or error bodies to the client. + +**Escaping.** Any string that originates from Immich and is embedded into HTML by the SSR templates must be escaped (use `escapeHtml` from `utils/text.ts`). Strings that cross to the client via the init JSON block stay as plain text and are rendered with `textContent`, not `innerHTML` - that retired the "pre-escaped HTML over the wire" contract that the early gallery shipped with. + +**PhotoSwipe UI.** Custom toolbar buttons, captions, and panels are registered through `lightbox.pswp.ui.registerElement`. The back button, download, fullscreen, and caption registrations live in `app/src/client/lightbox-ui.ts`; the info sidebar (a substantial UI element) lives in `app/src/client/sidebar.ts`. New small registrations join `lightbox-ui.ts`; anything panel-sized gets its own file. + +**Streaming.** Assets are streamed from Immich to the client without buffering to disk. Keep it that way. The `archiver` zip flow is also fully streamed (with per-asset retry, an idle-timeout transform, and abort-on-failure semantics). + +**File organisation.** Group functions by cohesion, not by file count. A file deserves its own name when it carries a coherent concept worth a separate filename - "filename sanitization" or "config loader" pass; "narrow unknown to string" does not. When several small helpers share a theme, group them in one file (`utils/text.ts` for escaping + narrowing; `share.ts` for share-level info + policy). When a single concern is substantial enough to dominate a file on its own, give it its own name (`config/migrations.ts`, `stream/download.ts`). IPP optimises for audit reading rather than tree-shakeable reuse, so fewer cohesive files beat many one-export micro-modules. Same lens applies on the client (`app/src/client/`): each module is a viewport-of-code that earns its name. + +Where to put a new function: ask what category of thing it is, not where it gets called from. Share-level policy decisions and share-derived info go in `share.ts`. Per-asset view-model transforms (filename derivation, EXIF whitelisting) go alongside `gallery/builder.ts`. HTTP response setup driven by operator config goes in `http.ts`. Streaming pipelines go in `stream/`. If a new function doesn't fit any existing category, prefer adding to the closest existing file over creating a new single-function module - revisit when a real second member of the category appears. + +**No client framework, no bundler.** The client is TypeScript compiled file-for-file by `tsc` into plain ES modules served by Express static. Do not introduce a frontend framework (React / Svelte / Vue / Solid) or a bundler (Webpack / Rollup / Vite / Parcel). PhotoSwipe is loaded as ESM directly. Inter-module imports inside `app/src/client/` use `.js` extensions in the source - that's required by the client's `moduleResolution: bundler` setup and matches what the browser fetches. + +**Code style.** ESLint standard config. Run lint locally before opening a PR. + +## Release process + +Releases are triggered by pushing a `v*` tag. The `.github/workflows/ci.yaml` workflow builds a multi-arch (`linux/amd64`, `linux/arm64`) image, pushes to both GHCR and Docker Hub, and attaches a build-provenance attestation to each registry. + +Maintainer workflow for a release: + +1. Update `app/package.json` version with `npm version ` from inside `app/`. +2. Push the resulting tag. CI does the rest. + +Do not push tags as part of a PR; releases are cut by the maintainer. + +## Pull requests + +For anything non-trivial, open a [Feature Request discussion](https://github.com/alangrainger/immich-public-proxy/discussions/categories/feature-requests) first. The maintainer would rather discuss fit with the read-only/lean philosophy before you spend time on a PR. + +- Branch from `main`. +- Update the README config tables if you added or changed config keys. +- If your change has a user-visible behavior, include a one-line note in the PR description about how to exercise it. + +## What will not be accepted + +Repeating the README's feature-request guidance for emphasis: + +- Anything that modifies Immich or its files in any way. +- Anything that requires an Immich API key or other privileged access. +- Uploading photos to Immich. +- Persistent state, databases, or user accounts on the IPP side. +- Client-side bundlers (Webpack / Rollup / Vite / Parcel) or frontend frameworks (React / Svelte / Vue / Solid). Client code is TypeScript compiled file-for-file by `tsc` to plain ES modules served directly - no bundling, no framework runtime, no plugin ecosystem. +- Features that meaningfully expand the proxy's attack surface for a niche use case. + +If your idea sits near these lines, raise it as a discussion before coding. + +## For LLM agents + +If you are an AI coding agent working on this repo, the rules above apply to you. A few specific reminders: + +- **Read this whole file before suggesting or making changes.** The read-only, lean, stateless constraints are project-defining and must not be relaxed for convenience. +- **Do not suggest features from the "will not be accepted" list**, even if they are technically interesting. Push back on requests that would violate the constraints, and explain why. +- **Do not add backwards-compatibility shims** unless a config key is being renamed or a public behavior is changing. Dead-code shims rot. +- **Do not add caches, memoization, queues, or background jobs** without first estimating the real cost of not having them. The existing share-metadata cache in `immich.ts` is for freshness coalescing, not optimisation; mirror that bar. +- **Do not add error handling for cases that cannot happen.** Trust internal invariants. Validate only at the boundary (incoming request, Immich response). +- **Default to writing no comments.** Add a comment only when the *why* is non-obvious: a security-relevant invariant, a workaround for a specific upstream bug, or behavior that would surprise a careful reader. Do not narrate the *what*. +- **Match the project's existing style.** Server-side Preact SSR, TypeScript ES modules on the client (compiled by `tsc`, no bundler, no framework), plain CSS. Do not introduce new patterns without discussion. + +If something in this guide conflicts with an instruction you have been given, stop and raise the conflict rather than silently working around it. diff --git a/Dockerfile b/Dockerfile index dd87a8f..b40ec1f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,8 @@ WORKDIR /app COPY --chown=node:node app/ ./ RUN npm ci \ - && npx tsc + && npx tsc \ + && npx tsc -p tsconfig.client.json FROM node:lts-alpine AS runner diff --git a/README.md b/README.md index 52682fc..fe249e5 100644 --- a/README.md +++ b/README.md @@ -236,11 +236,75 @@ Example: hide the download button inside the lightbox even though zip downloads ### Metadata -Configured under `ipp.showMetadata`. +Configured under `ipp.showMetadata`. The lightbox includes a slide-in info sidebar (toggle with the **i** key or the info button in the toolbar) that surfaces whatever metadata you opt into here. -| Option | Type | Description | -|---------------|--------|----------------------------------------------------| -| `description` | `bool` | Show the description as a caption below the photo. | +| Option | Type | Description | +|---------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------| +| `description` | `object` | Where to show the description. `{ "caption": bool, "sidebar": bool }`. Both default `false`. See [Description](#description). | +| `exif` | `object` | Camera / file EXIF group. Set `enabled: true` to expose any of the per-field flags below. See [EXIF group](#exif-group). | +| `location` | `object` | Location group (city / state / country / GPS). Set `enabled: true` to expose any of the per-field flags below. See [Location group](#location-group). | + +Within each group, the master `enabled` toggle controls whether the group's fields are sent at all. Per-field flags default to `true` once the group is enabled, so you can turn off individual fields without renaming or removing them. + +IPP only sends a field if **both** the group's `enabled` is true AND the field's flag is true. If Immich itself isn't exposing metadata for the share (the per-share toggle on the Immich side), no metadata is available regardless of these settings. + +The info sidebar (and its toolbar toggle button) only appear when there is at least one section the operator has opted into - i.e. `description.sidebar`, `exif.enabled`, or `location.enabled` is true. With all three off, the sidebar UI is suppressed. + +#### Description + +Under `ipp.showMetadata.description`: + +| Option | Type | Description | +|-----------|--------|--------------------------------------------------------------------------| +| `caption` | `bool` | Show the description below the photo as a lightbox caption. | +| `sidebar` | `bool` | Show the description at the top of the info sidebar. | + +Set both to show in both places; set neither and the description is not included at all. (Legacy `description: true` / `description: false` boolean form is still accepted and migrates to `{caption, sidebar}` of the same value with a deprecation warning.) + +#### EXIF group + +Under `ipp.showMetadata.exif`: + +| Option | Type | Description | +|---------------------|--------|--------------------------------------------------------------------------| +| `enabled` | `bool` | Master switch for the EXIF group. Default `false`. | +| `dateTimeOriginal` | `bool` | Show the date the photo was taken (per EXIF). | +| `fileName` | `bool` | Show the original filename. | +| `dimensions` | `bool` | Show width x height and megapixel count. | +| `fileSize` | `bool` | Show the file size. | +| `make` | `bool` | Camera manufacturer (e.g. "Canon"). | +| `model` | `bool` | Camera model (e.g. "EOS R5"). | +| `lensModel` | `bool` | Lens model. | +| `exposureTime` | `bool` | Shutter speed (e.g. "1/200"). | +| `iso` | `bool` | ISO sensitivity. | +| `fNumber` | `bool` | Aperture f-number. | +| `focalLength` | `bool` | Focal length in millimetres. | + +#### Location group + +Under `ipp.showMetadata.location`: + +| Option | Type | Description | +|------------|--------|----------------------------------------------------------------------| +| `enabled` | `bool` | Master switch for the location group. Default `false`. | +| `city` | `bool` | Show city. | +| `state` | `bool` | Show state / region. | +| `country` | `bool` | Show country. | +| `gps` | `bool` | Show GPS coordinates and an "Open in OpenStreetMap" link. | + +Example: show description in the sidebar only (not as a caption), show full EXIF, and hide GPS coordinates while keeping city / state / country: + +```json +{ + "ipp": { + "showMetadata": { + "description": { "caption": false, "sidebar": true }, + "exif": { "enabled": true }, + "location": { "enabled": true, "gps": false } + } + } +} +``` ### Customising your error response pages @@ -278,8 +342,8 @@ From inside a Docker container, you can't reach another container using `localho You can [add feature requests here](https://github.com/alangrainger/immich-public-proxy/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop), however my goal with this project is to keep it as lean as possible. -Due to the sensitivity of data contained within Immich, I want anyone with a bit of coding knowledge -to be able to read this codebase and fully understand everything it is doing. +Due to the sensitivity of data contained within Immich, this project optimises for auditability: the code +stays small enough that someone with coding experience can review it for security-relevant behavior. The most basic rule for this project is that it has **read-only** access to Immich. diff --git a/app/config.json b/app/config.json index 79175c5..e5fda64 100644 --- a/app/config.json +++ b/app/config.json @@ -11,7 +11,31 @@ "allowSlugLinks": true, "showHomePage": true, "showMetadata": { - "description": false + "description": { + "caption": false, + "sidebar": false + }, + "exif": { + "enabled": false, + "dateTimeOriginal": true, + "fileName": true, + "dimensions": true, + "fileSize": true, + "make": true, + "model": true, + "lensModel": true, + "exposureTime": true, + "iso": true, + "fNumber": true, + "focalLength": true + }, + "location": { + "enabled": false, + "city": true, + "state": true, + "country": true, + "gps": true + } }, "customInvalidResponse": false, "gallery": { diff --git a/app/package-lock.json b/app/package-lock.json index 80f36a9..85c96eb 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -25,26 +25,457 @@ "@types/archiver": "^6.0.3", "@types/cookie-session": "^2.0.49", "@types/express": "^4.17.21", - "@types/node": "^16.18.111", - "@typescript-eslint/eslint-plugin": "5.29.0", - "@typescript-eslint/parser": "5.29.0", - "eslint": "^8.49.0", + "@types/node": "^22", + "@typescript-eslint/eslint-plugin": "^7", + "@typescript-eslint/parser": "^7", + "concurrently": "^10.0.3", + "eslint": "^8.57.0", "eslint-config-standard": "^17.1.0", - "ts-node": "^10.9.2", - "typescript": "^5.6.2" + "tsx": "^4", + "typescript": "^5.6.2", + "vitest": "^2" } }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "node_modules/@esbuild/aix-ppc64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.0.tgz", + "integrity": "sha512-lhRUCeuOyJQURhTxl4WkpFTjIsbDayJHih5kZC1giwE+MhIzAb7mEsQMqMf18rHLsrb5qI1tafG20mLxEWcWlA==", + "cpu": [ + "ppc64" + ], "dev": true, "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, + "optional": true, + "os": [ + "aix" + ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.0.tgz", + "integrity": "sha512-wqh0ByljabXLKHeWXYLqoJ5jKC4XBaw6Hk08OfMrCRd2nP2ZQ5eleDZC41XHyCNgktBGYMbqnrJKq/K/lzPMSQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.0.tgz", + "integrity": "sha512-+WzIXQOSaGs33tLEgYPYe/yQHf0WTU0X42Jca3y8NWMbUVhp7rUnw+vAsRC/QiDrdD31IszMrZy+qwPOPjd+rw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.0.tgz", + "integrity": "sha512-+VJggoaKhk2VNNqVL7f6S189UzShHC/mR9EE8rDdSkdpN0KflSwWY/gWjDrNxxisg8Fp1ZCD9jLMo4m0OUfeUA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.0.tgz", + "integrity": "sha512-0T+A9WZm+bZ84nZBtk1ckYsOvyA3x7e2Acj1KdVfV4/2tdG4fzUp91YHx+GArWLtwqp77pBXVCPn2We7Letr0Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.0.tgz", + "integrity": "sha512-fyzLm/DLDl/84OCfp2f/XQ4flmORsjU7VKt8HLjvIXChJoFFOIL6pLJPH4Yhd1n1gGFF9mPwtlN5Wf82DZs+LQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.0.tgz", + "integrity": "sha512-l9GeW5UZBT9k9brBYI+0WDffcRxgHQD8ShN2Ur4xWq/NFzUKm3k5lsH4PdaRgb2w7mI9u61nr2gI2mLI27Nh3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.0.tgz", + "integrity": "sha512-BXoQai/A0wPO6Es3yFJ7APCiKGc1tdAEOgeTNy3SsB491S3aHn4S4r3e976eUnPdU+NbdtmBuLncYir2tMU9Nw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.0.tgz", + "integrity": "sha512-CjaaREJagqJp7iTaNQjjidaNbCKYcd4IDkzbwwxtSvjI7NZm79qiHc8HqciMddQ6CKvJT6aBd8lO9kN/ZudLlw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.0.tgz", + "integrity": "sha512-RVyzfb3FWsGA55n6WY0MEIEPURL1FcbhFE6BffZEMEekfCzCIMtB5yyDcFnVbTnwk+CLAgTujmV/Lgvih56W+A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.0.tgz", + "integrity": "sha512-KBnSTt1kxl9x70q+ydterVdl+Cn0H18ngRMRCEQfrbqdUuntQQ0LoMZv47uB97NljZFzY6HcfqEZ2SAyIUTQBQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.0.tgz", + "integrity": "sha512-zpSlUce1mnxzgBADvxKXX5sl8aYQHo2ezvMNI8I0lbblJtp8V4odlm3Yzlj7gPyt3T8ReksE6bK+pT3WD+aJRg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.0.tgz", + "integrity": "sha512-2jIfP6mmjkdmeTlsX/9vmdmhBmKADrWqN7zcdtHIeNSCH1SqIoNI63cYsjQR8J+wGa4Y5izRcSHSm8K3QWmk3w==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.0.tgz", + "integrity": "sha512-bc0FE9wWeC0WBm49IQMPSPILRocGTQt3j5KPCA8os6VprfuJ7KD+5PzESSrJ6GmPIPJK965ZJHTUlSA6GNYEhg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.0.tgz", + "integrity": "sha512-SQPZOwoTTT/HXFXQJG/vBX8sOFagGqvZyXcgLA3NhIqcBv1BJU1d46c0rGcrij2B56Z2rNiSLaZOYW5cUk7yLQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.0.tgz", + "integrity": "sha512-SCfR0HN8CEEjnYnySJTd2cw0k9OHB/YFzt5zgJEwa+wL/T/raGWYMBqwDNAC6dqFKmJYZoQBRfHjgwLHGSrn3Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.0.tgz", + "integrity": "sha512-us0dSb9iFxIi8srnpl931Nvs65it/Jd2a2K3qs7fz2WfGPHqzfzZTfec7oxZJRNPXPnNYZtanmRc4AL/JwVzHQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.0.tgz", + "integrity": "sha512-CR/RYotgtCKwtftMwJlUU7xCVNg3lMYZ0RzTmAHSfLCXw3NtZtNpswLEj/Kkf6kEL3Gw+BpOekRX0BYCtklhUw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.0.tgz", + "integrity": "sha512-nU1yhmYutL+fQ71Kxnhg8uEOdC0pwEW9entHykTgEbna2pw2dkbFSMeqjjyHZoCmt8SBkOSvV+yNmm94aUrrqw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.0.tgz", + "integrity": "sha512-cXb5vApOsRsxsEl4mcZ1XY3D4DzcoMxR/nnc4IyqYs0rTI8ZKmW6kyyg+11Z8yvgMfAEldKzP7AdP64HnSC/6g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.0.tgz", + "integrity": "sha512-8wZM2qqtv9UP3mzy7HiGYNH/zjTA355mpeuA+859TyR+e+Tc08IHYpLJuMsfpDJwoLo1ikIJI8jC3GFjnRClzA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.0.tgz", + "integrity": "sha512-FLGfyizszcef5C3YtoyQDACyg95+dndv79i2EekILBofh5wpCa1KuBqOWKrEHZg3zrL3t5ouE5jgr94vA+Wb2w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.0.tgz", + "integrity": "sha512-1ZgjUoEdHZZl/YlV76TSCz9Hqj9h9YmMGAgAPYd+q4SicWNX3G5GCyx9uhQWSLcbvPW8Ni7lj4gDa1T40akdlw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.0.tgz", + "integrity": "sha512-Q9StnDmQ/enxnpxCCLSg0oo4+34B9TdXpuyPeTedN/6+iXBJ4J+zwfQI28u/Jl40nOYAxGoNi7mFP40RUtkmUA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.0.tgz", + "integrity": "sha512-zF3ag/gfiCe6U2iczcRzSYJKH1DCI+ByzSENHlM2FcDbEeo5Zd2C86Aq0tKUYAJJ1obRP84ymxIAksZUcdztHA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.0.tgz", + "integrity": "sha512-pEl1bO9mfAmIC+tW5btTmrKaujg3zGtUmWNdCw/xs70FBjwAL3o9OEKNHvNmnyylD6ubxUERiEhdsL0xBQ9efw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" } }, "node_modules/@eslint-community/eslint-utils": { @@ -192,34 +623,13 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "dev": true, "license": "MIT" }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -268,6 +678,395 @@ "node": ">=14" } }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.61.0.tgz", + "integrity": "sha512-dnxczajOqt0gesZlN5pGQ1s1imQVrsmCw5G2Ci4oM+0WvNz3pyRnlWrT7McoZIb8VlFwCawdmbWRmxRn7HI+VQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.61.0.tgz", + "integrity": "sha512-Bp3JpGP00Vu3f238ivRrjf7z3xSzVPXqCmaJYA9t2c+c8vKYvOzmXF7LkkeUalTEGd6cZcSWe+PFIP3Vy48fRg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.61.0.tgz", + "integrity": "sha512-zaYIpr670mUmmZ1tVzUFplbQbG7h3Gugx3L5FoqhsC2m/YnLlR1a7zVLmXNPy+iY1tFPEbNG+HHBXZGyId0G5w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.61.0.tgz", + "integrity": "sha512-+P49fvkv2dSoeevUW+lgZ/I2JHSsJCK1Lyjj7Cu6E4UHG4tS9XIefzIjo5qhgELjAclnen1rLzK2PMKJdo+Dyg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.61.0.tgz", + "integrity": "sha512-l3FAAOyKJXH2ea6KNFN+MMgC/rnE94YGLXs2ehYqDcCoHt1DpvgWX75BhUJxN38XojP7Ul+4H8PRn7EdyqSDrw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.61.0.tgz", + "integrity": "sha512-VokPN3TSctKj65cyCNPaUh4vMFA8awxOot/0sp+4J7ZlNRKQEhXhawqPwajoi8H5ZFt61i0ugZJuTKXBjGJ17Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.61.0.tgz", + "integrity": "sha512-DxH0P3wxm+Yzs/p3zrk9dw1rURu8p0Nv5+MRK/L7OtnLNg5rLZraSBFZ8iUXOd9f2BlhJyEpIZUH/emjq4UJ4g==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.61.0.tgz", + "integrity": "sha512-T6ZvMNe84kAz6TBWHC7hGAoEtzP1LWYw/AqayGWEF6uISt3Abk/st06LqRD9THd7Xz3NxzurUpzAuEAUbZf+nw==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.61.0.tgz", + "integrity": "sha512-q/4hzvQkDs8b4jIBab1pnLiiM0ayTZsN2amBFPDzuyZxjEd4wDwx0UJFYM3cOZzSf5Kw8fnWSprJzIBMkcR44Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.61.0.tgz", + "integrity": "sha512-vvYWX3akdEAY6km+9wAqFDnk6pQsbJKVnj7xawcvs/+fdlYBGp+U+Qq/lLfpIxYIZvZLHMAKD9HLdacSx/r3dw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.61.0.tgz", + "integrity": "sha512-DePa5cqOxDP/Zp0VOXpeWaGew5iIv5DXp9NYbzkX5PFQyWVX9184WCTh3hvr/7lhXo8ZVlbFLkz8+o/q1dU6gA==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.61.0.tgz", + "integrity": "sha512-LV8aWMB8UChglMCEzs7RkN0GsH29RJaLLqwm9fCIjlqwxQTiWAqNcc7wjBkH31hV0PU/yVxGYvrYsgfea2qw6g==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.61.0.tgz", + "integrity": "sha512-QoNSnwQtaeNu5grdBbsL0tt1uyl5EnS8DA8Mr3nluMXbhdQNyhN+G4tBax7VCdxLKj8YJ0/4OO9Ho84jMnJtKA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.61.0.tgz", + "integrity": "sha512-/zZp5MKapIIApE8trN8qLGNSiRN9TUoaUZ1cmVu4XnVdd5LQLOXTtyi+vtfUbNnT3iyjzpPqYeKXmvJ+gJGYWw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.61.0.tgz", + "integrity": "sha512-RbrzcD3aJ1k3UbtMRRBNwojdVVyXjuVAFTfn/xPa6EEl6GE9Sm/akPgFTb9aAC9pMKGJ6CtWxaGrqWcabH+ySg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.61.0.tgz", + "integrity": "sha512-ZF+onDsBso8PJf1XaG9lB+O9RnBpKGnY6OrzC4CSHrtC1jb6jWLTKK4bRqdoCXHd22gyr2hiYmEAm8Wns/BOCw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.61.0.tgz", + "integrity": "sha512-Atk0aSIk5Zx2Wuh9dgRQgLP0Koc8hOeYpbWryMXyk8G8/HmPkwPPkMqIIDhrXHHYqfUzSJA/I7IWSBv8xSmRBA==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.61.0.tgz", + "integrity": "sha512-0uMOcf3eZ5K+K4cYHkdxShFMPlPXCOdfDFEFn9dNYAEEd2cVvmOfH7zFgRVoDgmtQ1m9k5q7qfrHzyMAubKYUA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.61.0.tgz", + "integrity": "sha512-mvFtE4A/t/7hRJ7X8Ozmu8FsIkAUat2nzl12pgU337BRmq87AQUJztwHz2Zv5/tjo9/C95E66CK03SI/ToEDJw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.61.0.tgz", + "integrity": "sha512-z9b9+aTxvt8n2rNltMPvyaUfB8NJ+CVyOrGK/MdIKHx7B+lXmZpm/XbRsU7Rpf3fRqJ2uS6mBJiJveCtq8LHDg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.61.0.tgz", + "integrity": "sha512-jXaXFqKMehsOc+g8R6oo33RRC6w07G9jDBxAE5eAKX7mOcCbZloYIPNhfG9Wl+P9O9IWHFO4OJgPi1Ml2qkt7w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.61.0.tgz", + "integrity": "sha512-OXNWVFocS2IA4+QplhTZZ2a+8hPZR7T8KuozsNmJKK8y7cp83StHvGksfHzPG3wczWTczyWHVQuqeiTUbjiyBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.61.0.tgz", + "integrity": "sha512-AlAbNtBO637LxSldqV43z0FfXoGfl2TW1DgAg/bs7aQswFbDewz2SJm3BUhiGfbOVtW571xbc9p+REdxhyN/Eg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.61.0.tgz", + "integrity": "sha512-QRSrQXyJ1M4tjNXdR0/G/IgV6lzfQQJYBjlWIEYkY2Xs86DRl/iEpQ4blMDjJxSl7n19eDKKXMg0AmuBVYy8pQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.61.0.tgz", + "integrity": "sha512-tkuFxhvKO/HlGd0VsINF6vHSYH8AF8W0TcNxKDK6JZmrehngFj78pToc8iemtnvwilDjs2G/qSzYFhe9U8q+fw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@rtsao/scc": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", @@ -276,34 +1075,6 @@ "license": "MIT", "peer": true }, - "node_modules/@tsconfig/node10": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", - "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/archiver": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/@types/archiver/-/archiver-6.0.3.tgz", @@ -346,6 +1117,13 @@ "@types/keygrip": "*" } }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/express": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", @@ -379,13 +1157,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -409,11 +1180,14 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "16.18.121", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.121.tgz", - "integrity": "sha512-Gk/pOy8H0cvX8qNrwzElYIECpcUn87w4EAEFXFvPJ8qsP9QR/YqukUORSy0zmyDyvdo149idPpy4W6iC5aSbQA==", + "version": "22.19.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.19.tgz", + "integrity": "sha512-dyh/xO2Fh5bYrfWaaqGrRQQGkNdmYw6AmaAUvYeUMNTWQtvb796ikLdmTchRmOlOiIJ1TDXfWgVx1QkUlQ6Hew==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } }, "node_modules/@types/qs": { "version": "6.9.17", @@ -463,32 +1237,32 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.29.0.tgz", - "integrity": "sha512-kgTsISt9pM53yRFQmLZ4npj99yGl3x3Pl7z4eA66OuTzAGC4bQB5H5fuLwPnqTKU3yyrrg4MIhjF17UYnL4c0w==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", + "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "5.29.0", - "@typescript-eslint/type-utils": "5.29.0", - "@typescript-eslint/utils": "5.29.0", - "debug": "^4.3.4", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.2.0", - "regexpp": "^3.2.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/type-utils": "7.18.0", + "@typescript-eslint/utils": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -497,26 +1271,27 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.29.0.tgz", - "integrity": "sha512-ruKWTv+x0OOxbzIw9nW5oWlUopvP/IQDjB5ZqmTglLIoDTctLlAJpAQFpNPJP/ZI7hTT9sARBosEfaKbcFuECw==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", + "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "5.29.0", - "@typescript-eslint/types": "5.29.0", - "@typescript-eslint/typescript-estree": "5.29.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -525,17 +1300,17 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.29.0.tgz", - "integrity": "sha512-etbXUT0FygFi2ihcxDZjz21LtC+Eps9V2xVx09zFoN44RRHPrkMflidGMI+2dUs821zR1tDS6Oc9IXxIjOUZwA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "5.29.0", - "@typescript-eslint/visitor-keys": "5.29.0" + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -543,25 +1318,26 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.29.0.tgz", - "integrity": "sha512-JK6bAaaiJozbox3K220VRfCzLa9n0ib/J+FHIwnaV3Enw/TO267qe0pM1b1QrrEuy6xun374XEAsRlA86JJnyg==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", + "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/utils": "5.29.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/utils": "7.18.0", "debug": "^4.3.4", - "tsutils": "^3.21.0" + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "*" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -570,13 +1346,13 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.29.0.tgz", - "integrity": "sha512-X99VbqvAXOMdVyfFmksMy3u8p8yoRGITgU1joBJPzeYa0rhdf5ok9S56/itRoUSh99fiDoMtarSIJXo7H/SnOg==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", + "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", "dev": true, "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -584,22 +1360,23 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.29.0.tgz", - "integrity": "sha512-mQvSUJ/JjGBdvo+1LwC+GY2XmSYjK1nAaVw2emp/E61wEVYEyibRHCqm1I1vEKbXCpUKuW4G7u9ZCaZhJbLoNQ==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", + "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "5.29.0", - "@typescript-eslint/visitor-keys": "5.29.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -611,43 +1388,67 @@ } } }, - "node_modules/@typescript-eslint/utils": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.29.0.tgz", - "integrity": "sha512-3Eos6uP1nyLOBayc/VUdKZikV90HahXE5Dx9L5YlSd/7ylQPXhLk1BYb29SDgnBnTp+jmSZUU0QxUiyHgW4p7A==", + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.1.tgz", + "integrity": "sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==", "dev": true, "license": "MIT", "dependencies": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.29.0", - "@typescript-eslint/types": "5.29.0", - "@typescript-eslint/typescript-estree": "5.29.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.2" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", + "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.29.0.tgz", - "integrity": "sha512-Hpb/mCWsjILvikMQoZIE3voc9wtQcS0A9FUw3h8bhr9UxBdtI/tw1ZDZUOXHXLOVMedKCH5NxyzATwnU78bWCQ==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", + "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "5.29.0", - "eslint-visitor-keys": "^3.3.0" + "@typescript-eslint/types": "7.18.0", + "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -661,6 +1462,119 @@ "dev": true, "license": "ISC" }, + "node_modules/@vitest/expect": { + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.9.tgz", + "integrity": "sha512-UJCIkTBenHeKT1TTlKMJWy1laZewsRIzYighyYiJKZreqtdxSos/S1t+ktRMQWu2CKqaarrkeszJx1cgC5tGZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "2.1.9", + "@vitest/utils": "2.1.9", + "chai": "^5.1.2", + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.9.tgz", + "integrity": "sha512-tVL6uJgoUdi6icpxmdrn5YNo3g3Dxv+IHJBr0GXHaEdTcw3F+cPKnsXFhli6nO+f/6SDKPHEK1UN+k+TQv0Ehg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "2.1.9", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.12" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^5.0.0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/pretty-format": { + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.9.tgz", + "integrity": "sha512-KhRIdGV2U9HOUzxfiHmY8IFHTdqtOhIzCpd8WRdJiE7D/HUcZVD0EgQCVjm+Q9gkUXWgBvMmTtZgIG48wq7sOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.9.tgz", + "integrity": "sha512-ZXSSqTFIrzduD63btIfEyOmNcBmQvgOVsPNPe0jYtESiXkhd8u2erDLnMxmGrDCwHCCHE7hxwRDCT3pt0esT4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "2.1.9", + "pathe": "^1.1.2" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.9.tgz", + "integrity": "sha512-oBO82rEjsxLNJincVhLhaxxZdEtV0EFHMK5Kmx5sJ6H9L183dHECjiefOAdnqpIgT5eZwT04PoggUnW88vOBNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "2.1.9", + "magic-string": "^0.30.12", + "pathe": "^1.1.2" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.9.tgz", + "integrity": "sha512-E1B35FwzXXTs9FHNK6bDszs7mtydNi5MIfUWpceJ8Xbfb1gBMscAnwLbEu+B44ed6W3XjL9/ehLPHR1fkf1KLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyspy": "^3.0.2" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.9.tgz", + "integrity": "sha512-v0psaMSkNJ3A2NMrUEHFRzJtDPFn+/VWZ5WxImB21T9fjucJRmS7xCS3ppEnARb9y11OAzaD+P2Ps+b+BGX5iQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "2.1.9", + "loupe": "^3.1.2", + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, "node_modules/abort-controller": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", @@ -709,19 +1623,6 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/acorn-walk": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", - "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/ajv": { "version": "6.14.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", @@ -799,13 +1700,6 @@ "node": ">= 14" } }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true, - "license": "MIT" - }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -955,6 +1849,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, "node_modules/async": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", @@ -1176,6 +2080,16 @@ "node": ">= 0.8" } }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/call-bind": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", @@ -1236,6 +2150,23 @@ "node": ">=6" } }, + "node_modules/chai": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.3.3.tgz", + "integrity": "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -1253,6 +2184,116 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/check-error": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.3.tgz", + "integrity": "sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" + } + }, + "node_modules/cliui": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -1294,6 +2335,57 @@ "dev": true, "license": "MIT" }, + "node_modules/concurrently": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-10.0.3.tgz", + "integrity": "sha512-hc3LH4UaKWd/bbyDK/IGVa4RB6PtQ3CUYwtrkzqHn+wIG3Hr5fhpRlk0L/gCa8ZE1L/Ufj50Zho69cI5w8SQBA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "5.6.2", + "rxjs": "7.8.2", + "shell-quote": "1.8.4", + "supports-color": "10.2.2", + "tree-kill": "1.2.2", + "yargs": "18.0.0" + }, + "bin": { + "conc": "dist/bin/index.js", + "concurrently": "dist/bin/index.js" + }, + "engines": { + "node": ">=22" + }, + "funding": { + "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/supports-color": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz", + "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -1398,13 +2490,6 @@ "node": ">= 14" } }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true, - "license": "MIT" - }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -1500,6 +2585,16 @@ } } }, + "node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -1564,16 +2659,6 @@ "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/diff": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.4.tgz", - "integrity": "sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -1733,6 +2818,13 @@ "node": ">= 0.4" } }, + "node_modules/es-module-lexer": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "dev": true, + "license": "MIT" + }, "node_modules/es-object-atoms": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", @@ -1791,6 +2883,58 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/esbuild": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.0.tgz", + "integrity": "sha512-sNR9MHpXSUV/XB4zmsFKN+QgVG82Cc7+/aaxJ8Adi8hyOac+EXptIp45QBPaVyX3N70664wRbTcLTOemCAnyqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.0", + "@esbuild/android-arm": "0.28.0", + "@esbuild/android-arm64": "0.28.0", + "@esbuild/android-x64": "0.28.0", + "@esbuild/darwin-arm64": "0.28.0", + "@esbuild/darwin-x64": "0.28.0", + "@esbuild/freebsd-arm64": "0.28.0", + "@esbuild/freebsd-x64": "0.28.0", + "@esbuild/linux-arm": "0.28.0", + "@esbuild/linux-arm64": "0.28.0", + "@esbuild/linux-ia32": "0.28.0", + "@esbuild/linux-loong64": "0.28.0", + "@esbuild/linux-mips64el": "0.28.0", + "@esbuild/linux-ppc64": "0.28.0", + "@esbuild/linux-riscv64": "0.28.0", + "@esbuild/linux-s390x": "0.28.0", + "@esbuild/linux-x64": "0.28.0", + "@esbuild/netbsd-arm64": "0.28.0", + "@esbuild/netbsd-x64": "0.28.0", + "@esbuild/openbsd-arm64": "0.28.0", + "@esbuild/openbsd-x64": "0.28.0", + "@esbuild/openharmony-arm64": "0.28.0", + "@esbuild/sunos-x64": "0.28.0", + "@esbuild/win32-arm64": "0.28.0", + "@esbuild/win32-ia32": "0.28.0", + "@esbuild/win32-x64": "0.28.0" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -2109,49 +3253,6 @@ "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" } }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10" - } - }, "node_modules/eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", @@ -2256,14 +3357,14 @@ "node": ">=4.0" } }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" } }, "node_modules/esutils": { @@ -2303,6 +3404,16 @@ "node": ">=0.8.x" } }, + "node_modules/expect-type": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz", + "integrity": "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/express": { "version": "4.22.2", "resolved": "https://registry.npmjs.org/express/-/express-4.22.2.tgz", @@ -2378,9 +3489,9 @@ "license": "MIT" }, "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dev": true, "license": "MIT", "dependencies": { @@ -2388,7 +3499,7 @@ "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "micromatch": "^4.0.8" }, "engines": { "node": ">=8.6.0" @@ -2581,6 +3692,21 @@ "dev": true, "license": "ISC" }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -2610,13 +3736,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true, - "license": "MIT" - }, "node_modules/functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -2628,6 +3747,29 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.6.0.tgz", + "integrity": "sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", @@ -3688,18 +4830,28 @@ "dev": true, "license": "MIT" }, + "node_modules/loupe": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.1.tgz", + "integrity": "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==", + "dev": true, + "license": "MIT" + }, "node_modules/lru-cache": { "version": "10.4.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "license": "ISC" }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", "dev": true, - "license": "ISC" + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } }, "node_modules/math-intrinsics": { "version": "1.1.0", @@ -3833,6 +4985,25 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "license": "MIT" }, + "node_modules/nanoid": { + "version": "3.3.12", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz", + "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -4134,6 +5305,30 @@ "node": ">=8" } }, + "node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/pathval": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz", + "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, "node_modules/picomatch": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", @@ -4158,6 +5353,35 @@ "node": ">= 0.4" } }, + "node_modules/postcss": { + "version": "8.5.15", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz", + "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.12", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, "node_modules/preact": { "version": "10.29.2", "resolved": "https://registry.npmjs.org/preact/-/preact-10.29.2.tgz", @@ -4409,19 +5633,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", @@ -4512,6 +5723,51 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rollup": { + "version": "4.61.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.61.0.tgz", + "integrity": "sha512-T9mWdbWfQtp0B5lv/HX+wrhYsmXRlcWnXXmJbXqKJhlRaoS6KMhq0gpyzW4UJfclcxrEdLnTgjT2NjruLONu0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.9" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.61.0", + "@rollup/rollup-android-arm64": "4.61.0", + "@rollup/rollup-darwin-arm64": "4.61.0", + "@rollup/rollup-darwin-x64": "4.61.0", + "@rollup/rollup-freebsd-arm64": "4.61.0", + "@rollup/rollup-freebsd-x64": "4.61.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.61.0", + "@rollup/rollup-linux-arm-musleabihf": "4.61.0", + "@rollup/rollup-linux-arm64-gnu": "4.61.0", + "@rollup/rollup-linux-arm64-musl": "4.61.0", + "@rollup/rollup-linux-loong64-gnu": "4.61.0", + "@rollup/rollup-linux-loong64-musl": "4.61.0", + "@rollup/rollup-linux-ppc64-gnu": "4.61.0", + "@rollup/rollup-linux-ppc64-musl": "4.61.0", + "@rollup/rollup-linux-riscv64-gnu": "4.61.0", + "@rollup/rollup-linux-riscv64-musl": "4.61.0", + "@rollup/rollup-linux-s390x-gnu": "4.61.0", + "@rollup/rollup-linux-x64-gnu": "4.61.0", + "@rollup/rollup-linux-x64-musl": "4.61.0", + "@rollup/rollup-openbsd-x64": "4.61.0", + "@rollup/rollup-openharmony-arm64": "4.61.0", + "@rollup/rollup-win32-arm64-msvc": "4.61.0", + "@rollup/rollup-win32-ia32-msvc": "4.61.0", + "@rollup/rollup-win32-x64-gnu": "4.61.0", + "@rollup/rollup-win32-x64-msvc": "4.61.0", + "fsevents": "~2.3.2" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -4536,6 +5792,16 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, "node_modules/safe-array-concat": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", @@ -4740,6 +6006,19 @@ "node": ">=8" } }, + "node_modules/shell-quote": { + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.4.tgz", + "integrity": "sha512-VsC6n6vz1ihYYyZZwX7YZSF5l5x36ca17OC+a69h94YqB7X6XLwf+5MOgynYir2SLFUbl8gIYvBo8K8RoNQ6bQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/side-channel": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", @@ -4812,6 +6091,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "license": "ISC" + }, "node_modules/signal-exit": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", @@ -4834,6 +6120,23 @@ "node": ">=8" } }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, "node_modules/statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", @@ -4843,6 +6146,13 @@ "node": ">= 0.8" } }, + "node_modules/std-env": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz", + "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==", + "dev": true, + "license": "MIT" + }, "node_modules/streamx": { "version": "2.20.2", "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.20.2.tgz", @@ -5086,6 +6396,50 @@ "dev": true, "license": "MIT" }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinypool": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", + "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + } + }, + "node_modules/tinyrainbow": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-1.2.0.tgz", + "integrity": "sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.2.tgz", + "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -5108,48 +6462,27 @@ "node": ">=0.6" } }, - "node_modules/ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", "dev": true, "license": "MIT", - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" + "tree-kill": "cli.js" + } + }, + "node_modules/ts-api-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" }, "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } + "typescript": ">=4.2.0" } }, "node_modules/tsconfig-paths": { @@ -5181,29 +6514,25 @@ "node": ">=0.6.x" } }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "node_modules/tsx": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.22.4.tgz", + "integrity": "sha512-X8EX+XV4QR5xCsrgxaED954zTDfY8KqlDtskKEL0cHhyS/P8b4IFOvGDQpsC9Q1XnLq915wEfwwY/zzskCtmhg==", "dev": true, "license": "MIT", "dependencies": { - "tslib": "^1.8.1" + "esbuild": "~0.28.0" + }, + "bin": { + "tsx": "dist/cli.mjs" }, "engines": { - "node": ">= 6" + "node": ">=18.0.0" }, - "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" + "optionalDependencies": { + "fsevents": "~2.3.3" } }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "license": "0BSD" - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -5356,6 +6685,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -5390,13 +6726,6 @@ "node": ">= 0.4.0" } }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true, - "license": "MIT" - }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -5406,6 +6735,585 @@ "node": ">= 0.8" } }, + "node_modules/vite": { + "version": "5.4.21", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.21.tgz", + "integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.9.tgz", + "integrity": "sha512-AM9aQ/IPrW/6ENLQg3AGY4K1N2TGZdR5e4gu/MmmR2xR3Ll1+dib+nook92g4TV3PXVyeyxdWwtaCAiUL0hMxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.3.7", + "es-module-lexer": "^1.5.4", + "pathe": "^1.1.2", + "vite": "^5.0.0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vite/node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/vitest": { + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.9.tgz", + "integrity": "sha512-MSmPM9REYqDGBI8439mA4mWhV5sKmDlBKWIYbA3lRb2PTHACE0mgKwA8yQ2xq9vxDTuk4iPrECBAEW2aoFXY0Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "2.1.9", + "@vitest/mocker": "2.1.9", + "@vitest/pretty-format": "^2.1.9", + "@vitest/runner": "2.1.9", + "@vitest/snapshot": "2.1.9", + "@vitest/spy": "2.1.9", + "@vitest/utils": "2.1.9", + "chai": "^5.1.2", + "debug": "^4.3.7", + "expect-type": "^1.1.0", + "magic-string": "^0.30.12", + "pathe": "^1.1.2", + "std-env": "^3.8.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.1", + "tinypool": "^1.0.1", + "tinyrainbow": "^1.2.0", + "vite": "^5.0.0", + "vite-node": "2.1.9", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "2.1.9", + "@vitest/ui": "2.1.9", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -5509,6 +7417,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", @@ -5620,14 +7545,96 @@ "dev": true, "license": "ISC" }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", + "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^9.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "string-width": "^7.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^22.0.0" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/yargs-parser": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", "engines": { - "node": ">=6" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true, + "license": "MIT" + }, + "node_modules/yargs/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/yocto-queue": { diff --git a/app/package.json b/app/package.json index f7f7eee..e8dd016 100644 --- a/app/package.json +++ b/app/package.json @@ -2,9 +2,13 @@ "name": "immich-public-proxy", "version": "2.2.1", "scripts": { - "dev": "ts-node src/index.ts", - "build": "npx tsc", - "test": "podman build --build-arg PACKAGE_VERSION=$(npm pkg get version | xargs) --format docker -t immich-proxy-test .. && podman run --init -it -p=3000:3000 --env-file .env --restart=always immich-proxy-test", + "dev": "concurrently -n server,client -c blue,green \"tsx watch src/index.ts\" \"tsc -w -p tsconfig.client.json\"", + "build": "tsc && tsc -p tsconfig.client.json", + "build:server": "tsc", + "build:client": "tsc -p tsconfig.client.json", + "test": "vitest run", + "test:watch": "vitest", + "test:container": "podman build --build-arg PACKAGE_VERSION=$(npm pkg get version | xargs) --format docker -t immich-proxy-test .. && podman run --init -it -p=3000:3000 --env-file .env --restart=always immich-proxy-test", "start": "node dist/index.js" }, "author": "Alan Grainger", @@ -30,12 +34,14 @@ "@types/archiver": "^6.0.3", "@types/cookie-session": "^2.0.49", "@types/express": "^4.17.21", - "@types/node": "^16.18.111", - "@typescript-eslint/eslint-plugin": "5.29.0", - "@typescript-eslint/parser": "5.29.0", - "eslint": "^8.49.0", + "@types/node": "^22", + "@typescript-eslint/eslint-plugin": "^7", + "@typescript-eslint/parser": "^7", + "concurrently": "^10.0.3", + "eslint": "^8.57.0", "eslint-config-standard": "^17.1.0", - "ts-node": "^10.9.2", - "typescript": "^5.6.2" + "tsx": "^4", + "typescript": "^5.6.2", + "vitest": "^2" } } diff --git a/app/public/photoswipe-overrides.css b/app/public/photoswipe-overrides.css index b4e52ca..f4cf39b 100644 --- a/app/public/photoswipe-overrides.css +++ b/app/public/photoswipe-overrides.css @@ -51,8 +51,11 @@ color: var(--pswp-icon-color); } +/* Hide PhotoSwipe's default top-right X close button - we use a top-left + back arrow instead (registered as `back-button` in client/lightbox-ui.ts), + matching Immich's native asset-viewer affordance. */ .pswp__button--close { - margin-right: 10px; + display: none; } .pswp__button--download-button { diff --git a/app/public/style.css b/app/public/style.css index d754b43..8130936 100644 --- a/app/public/style.css +++ b/app/public/style.css @@ -99,8 +99,8 @@ html, body { background-size: cover; background-position: center; background-repeat: no-repeat; - /* left / top / width / height set per-tile by layoutGrid() in web.js; - background-image is the decoded thumbhash placeholder, set by web.js. */ + /* left / top / width / height set per-tile by the client layout module; + background-image is the decoded thumbhash placeholder, set by `tiles.ts`. */ } #gallery img { @@ -385,3 +385,162 @@ html, body { font-size: 13px; } } + +/* ============================================================================ + Info sidebar. Docks to the right of the lightbox on desktop; becomes a + bottom sheet on narrow viewports. + ============================================================================ */ + +.ipp-sidebar { + position: fixed; + top: 0; + right: 0; + bottom: 0; + width: 360px; + background: var(--color-bg); + color: var(--color-fg); + border-left: 1px solid var(--color-gray); + z-index: 1700; + transform: translateX(100%); + transition: transform 200ms ease; + overflow-y: auto; + font-family: var(--font-sans); + font-size: 14px; + line-height: 1.5; + display: flex; + flex-direction: column; + padding: 0 8px 24px; +} +html.ipp-sidebar-open .ipp-sidebar { + transform: translateX(0); +} + +/* On narrow viewports the sidebar becomes a bottom sheet so the photo isn't + crowded out. PhotoSwipe paddingFn skips the right-padding in this mode. */ +@media (max-width: 640px) { + .ipp-sidebar { + top: auto; + width: 100%; + height: 60vh; + border-left: none; + border-top: 1px solid var(--color-gray); + transform: translateY(100%); + } + html.ipp-sidebar-open .ipp-sidebar { + transform: translateY(0); + } +} + +.ipp-sidebar-header { + display: flex; + align-items: center; + gap: 8px; + padding: 12px 4px 8px; + position: sticky; + top: 0; + background: var(--color-bg); + z-index: 1; +} + +.ipp-sidebar-close { + display: inline-flex; + align-items: center; + justify-content: center; + width: 40px; + height: 40px; + border: none; + border-radius: 50%; + background: transparent; + color: var(--color-fg); + cursor: pointer; + padding: 0; +} +.ipp-sidebar-close:hover { + background: rgba(127, 127, 127, 0.15); +} +.ipp-sidebar-close svg { + width: 22px; + height: 22px; +} + +.ipp-sidebar-title { + font-size: 18px; +} + +.ipp-sidebar-section { + padding: 8px 16px; +} + +.ipp-sidebar-heading { + font-size: 13px; + opacity: 0.7; + margin: 8px 0 4px; + font-weight: 500; +} + +.ipp-sidebar-description { + margin: 0; + padding: 8px 0 16px; + white-space: pre-wrap; + word-break: break-word; +} + +.ipp-sidebar-row { + display: flex; + gap: 16px; + padding: 12px 0; +} +.ipp-sidebar-row-icon { + flex: 0 0 auto; + width: 24px; + color: var(--color-fg); + opacity: 0.8; +} +.ipp-sidebar-row-icon svg { + width: 24px; + height: 24px; + display: block; +} +.ipp-sidebar-row-body { + flex: 1 1 auto; + min-width: 0; +} +.ipp-sidebar-row-body p { + margin: 0 0 4px; + word-break: break-word; +} +.ipp-sidebar-filename { + font-weight: 500; +} +.ipp-sidebar-lens { + font-weight: 500; +} +.ipp-sidebar-stats { + display: flex; + flex-wrap: wrap; + gap: 8px 12px; + font-size: 13px; + opacity: 0.8; +} + +.ipp-sidebar-date { + padding: 12px 0; + font-weight: 500; +} + +.ipp-sidebar-coords { + font-size: 13px; + opacity: 0.7; + margin: 4px 0 4px; +} +.ipp-sidebar-osm { + color: var(--color-primary); + text-decoration: underline; + font-size: 13px; +} + +.ipp-sidebar-empty { + padding: 16px; + opacity: 0.6; + text-align: center; +} diff --git a/app/public/web.js b/app/public/web.js deleted file mode 100644 index 945b698..0000000 --- a/app/public/web.js +++ /dev/null @@ -1,895 +0,0 @@ -// @ts-check -// ============================================================================ -// Gallery client - virtualized justified/square grid, PhotoSwipe v5 lightbox -// -// Layout is pre-computed for all items based on container width. Only tiles -// within viewport ± 1 viewport-height buffer exist in the DOM at any moment. -// PhotoSwipe runs with a full dataSource array so the lightbox navigates -// across all items regardless of which tiles are currently rendered. -// ============================================================================ - -// Runtime URLs served by Express, not filesystem paths. TypeScript's resolver -// can't follow them, so we silence its module-not-found errors here. The -// imports themselves work fine at runtime. -// @ts-ignore -import PhotoSwipeLightbox from '/share/static/photoswipe/photoswipe-lightbox.esm.js' -// @ts-ignore -import { thumbHashToDataURL } from '/share/static/thumbhash/thumbhash.js' - -/** - * @typedef {Object} GalleryItem - * @property {string} id - * @property {'IMAGE'|'VIDEO'} type - * @property {string} previewUrl - * @property {string} thumbnailUrl - * @property {string} [downloadUrl] - * @property {string} [videoData] JSON-stringified video source info - * @property {string} [description] Escaped HTML fragment for the lightbox caption - * @property {string} downloadFilename - * @property {number} [width] - * @property {number} [height] - * @property {string} [thumbhash] - * @property {string} [fileCreatedAt] ISO date - */ - -/** - * @typedef {Object} LightboxConfig - * @property {boolean} [showArrows] - * @property {boolean} [showDownload] - * @property {boolean} [mobileArrows] - * @property {Record} [options] - */ - -/** - * @typedef {Object} InitParams - * @property {GalleryItem[]} [items] - * @property {number} [openItem] 1-based; opens lightbox on the Nth item - * @property {LightboxConfig} [lightboxConfig] - * @property {boolean} [groupByDate] - */ - -/** - * @typedef {Object} LayoutEntry - * @property {number} index - * @property {number} left - * @property {number} top - * @property {number} width - * @property {number} height - */ - -/** - * @typedef {Object} HeaderEntry - * @property {string} label - * @property {number} top - * @property {number} height - */ - -/** - * @typedef {Object} GroupSpec - * @property {string | null} label - * @property {number[]} indices - */ - -// Justified-rows target row height (matches Immich's main view) -const TARGET_ROW_HEIGHT = 235 -const GAP = 4 -const MOBILE_BREAKPOINT = 640 -const MOBILE_COLS = 3 -const IMAGE_LOAD_MARGIN_PX = 300 -const SCROLL_SETTLE_MS = 100 -const BUFFER_VIEWPORTS = 1 -// Height reserved for each month header (must agree with .group-header CSS) -const HEADER_HEIGHT = 48 -// Vertical gap between groups -const GROUP_GAP = 16 - -// MDI icons (Apache 2.0). Same icon set Immich uses for its viewer. -const ICON_DOWNLOAD = '' -const ICON_FULLSCREEN = '' -const ICON_FULLSCREEN_EXIT = '' - -// ----- module state --------------------------------------------------------- - -/** @type {GalleryItem[]} */ -let items = [] -/** @type {LayoutEntry[]} - sparse, indexed by GalleryItem index */ -let layout = [] -/** @type {HeaderEntry[]} - empty when groupByDate is off */ -let headers = [] -let groupByDate = false -/** @type {HTMLElement | null} */ -let container = null -/** @type {any} - PhotoSwipeLightbox instance; external module, leave untyped */ -let lightbox = null -/** @type {LightboxConfig} */ -let lightboxConfig = {} -/** @type {boolean} - true while our pushed history entry is live */ -let lightboxPushedHistory = false -/** @type {boolean} - guards against re-entering the popstate handler during our own history.back() */ -let closingFromHistory = false -/** @type {Map} */ -const renderedTiles = new Map() -/** @type {Map} */ -const renderedHeaders = new Map() -let lastContainerW = 0 - -// Selection mode (mode-toggle UX: hidden checkmarks until activated) -let selectMode = false -/** @type {Set} - set of asset IDs */ -const selected = new Set() -/** @type {HTMLElement | null} */ -let toolbarEl = null -/** @type {HTMLElement | null} */ -let countEl = null -/** @type {HTMLButtonElement | null} */ -let selectAllBtn = null -/** @type {HTMLButtonElement | null} */ -let cancelBtn = null -/** @type {HTMLButtonElement | null} */ -let downloadBtn = null - -// Inline SVG for the check icon shown inside selected tiles' checkmark circle -const CHECK_SVG = '' - -// Long-press threshold for entering select mode via touch/mouse -const LONG_PRESS_MS = 500 - -// ----- layout computation --------------------------------------------------- - -function computeLayout (containerW) { - const tileLayout = new Array(items.length) - const newHeaders = [] - const groups = groupByDate ? groupItemsByMonth() : [{ label: null, indices: itemIndices() }] - const isMobile = containerW < MOBILE_BREAKPOINT - let y = 0 - for (let g = 0; g < groups.length; g++) { - const group = groups[g] - if (group.label) { - newHeaders.push({ label: group.label, top: y, height: HEADER_HEIGHT }) - y += HEADER_HEIGHT - } - y = isMobile - ? layoutSquareGroup(containerW, group.indices, y, tileLayout) - : layoutJustifiedGroup(containerW, group.indices, y, tileLayout) - if (g < groups.length - 1) y += GROUP_GAP - } - return { - layout: tileLayout, - headers: newHeaders, - totalHeight: Math.max(0, y) - } -} - -function itemIndices () { - const out = new Array(items.length) - for (let i = 0; i < items.length; i++) out[i] = i - return out -} - -/** @returns {GroupSpec[]} */ -function groupItemsByMonth () { - // Preserve item order (already sorted desc by render.ts when grouping is on) - /** @type {Map} */ - const map = new Map() - for (let i = 0; i < items.length; i++) { - const key = (items[i].fileCreatedAt || '').slice(0, 7) || 'undated' - let g = map.get(key) - if (!g) { - g = { label: monthLabel(key), indices: [] } - map.set(key, g) - } - g.indices.push(i) - } - return Array.from(map.values()) -} - -/** @param {string} key @returns {string} */ -function monthLabel (key) { - if (key === 'undated') return 'Undated' - const parts = key.split('-') - const y = Number(parts[0]) - const m = Number(parts[1]) - if (!y || !m) return key - // Intl.DateTimeFormat picks up the browser's locale; UTC timeZone keeps - // the displayed month consistent with the UTC YYYY-MM bucket key. - return new Intl.DateTimeFormat(undefined, { - year: 'numeric', - month: 'long', - timeZone: 'UTC' - }).format(new Date(Date.UTC(y, m - 1, 1))) -} - -/** - * @param {number} containerW - * @param {number[]} indices - * @param {number} startY - * @param {LayoutEntry[]} tileLayout - * @returns {number} The y position past the last tile (no trailing gap) - */ -function layoutSquareGroup (containerW, indices, startY, tileLayout) { - const tileSize = Math.floor((containerW - (MOBILE_COLS - 1) * GAP) / MOBILE_COLS) - let col = 0 - let x = 0 - let y = startY - for (const idx of indices) { - tileLayout[idx] = { index: idx, left: x, top: y, width: tileSize, height: tileSize } - col++ - if (col === MOBILE_COLS) { - col = 0 - x = 0 - y += tileSize + GAP - } else { - x += tileSize + GAP - } - } - // If the last row was partial, advance y to past it - if (col > 0) y += tileSize - // Otherwise back off the trailing inter-row gap - else if (y > startY) y -= GAP - return y -} - -function layoutJustifiedGroup (containerW, indices, startY, tileLayout) { - let rowItems = [] - let aspectSum = 0 - let y = startY - - const applyRow = (rowItems, height, isLastRow) => { - const intHeight = Math.floor(height) - let x = 0 - rowItems.forEach(({ idx, aspect }, i) => { - const isFinalInRow = i === rowItems.length - 1 - const w = (!isLastRow && isFinalInRow) - ? containerW - x - : Math.floor(aspect * height) - tileLayout[idx] = { index: idx, left: x, top: y, width: w, height: intHeight } - x += w + GAP - }) - y += intHeight + GAP - } - - for (const idx of indices) { - const item = items[idx] - const w = item.width || 1 - const h = item.height || 1 - const aspect = w / h - rowItems.push({ idx, aspect }) - aspectSum += aspect - const projectedH = (containerW - (rowItems.length - 1) * GAP) / aspectSum - if (projectedH <= TARGET_ROW_HEIGHT) { - applyRow(rowItems, projectedH, false) - rowItems = [] - aspectSum = 0 - } - } - if (rowItems.length) applyRow(rowItems, TARGET_ROW_HEIGHT, true) - - // y advanced past the last row's trailing gap; back off - return y > startY ? y - GAP : y -} - -// ----- tile DOM construction ------------------------------------------------ - -function onThumbError () { - this.closest('a').classList.add('thumb-error') -} - -// Cache of decoded thumbhash → PNG data URL. Same thumbhash on multiple -// tile-creations (revisits during virtualization) reuses the same URL. -const thumbhashCache = new Map() - -function decodeThumbhash (base64) { - const cached = thumbhashCache.get(base64) - if (cached) return cached - try { - const binary = atob(base64) - const bytes = new Uint8Array(binary.length) - for (let i = 0; i < bytes.length; i++) bytes[i] = binary.charCodeAt(i) - const url = thumbHashToDataURL(bytes) - thumbhashCache.set(base64, url) - return url - } catch (e) { - return null - } -} - -function createTile (index) { - const item = items[index] - const l = layout[index] - const a = document.createElement('a') - a.dataset.index = index - if (item.type !== 'VIDEO') a.href = item.previewUrl - a.style.left = l.left + 'px' - a.style.top = l.top + 'px' - a.style.width = l.width + 'px' - a.style.height = l.height + 'px' - - if (item.thumbhash) { - const url = decodeThumbhash(item.thumbhash) - if (url) a.style.backgroundImage = 'url(' + url + ')' - } - - const img = document.createElement('img') - // alt left empty: browsers paint alt text over the thumbhash background - // while the thumbnail downloads. Description (if any) is shown in the - // lightbox caption instead. - img.alt = '' - img.dataset.src = item.thumbnailUrl - img.onerror = onThumbError - // Mark the image as drawable once its bytes are decoded; the CSS rule - // `#gallery img.loaded` fades opacity from 0 to 1 so the thumbhash blurs - // into the sharp image instead of snapping (and masks Chrome/Edge's brief - // white flash between `img.src` being set and the bytes actually painting). - img.onload = () => img.classList.add('loaded') - a.appendChild(img) - - if (item.type === 'VIDEO') { - const playIcon = document.createElement('div') - playIcon.className = 'play-icon' - a.appendChild(playIcon) - } - - // Selection checkmark (rendered only when select mode is even possible - - // i.e. when the page included the toolbar element) - if (toolbarEl) { - const check = document.createElement('div') - check.className = 'tile-check' - check.innerHTML = CHECK_SVG - check.addEventListener('click', (e) => { - e.preventDefault() - e.stopPropagation() - if (!selectMode) enterSelectMode() - toggleSelection(item.id) - }) - a.appendChild(check) - if (selected.has(item.id)) a.classList.add('selected') - attachLongPress(a, item.id) - } - - a.addEventListener('click', (e) => { - e.preventDefault() - if (selectMode) { - toggleSelection(item.id) - } else { - openLightbox(index) - } - }) - - return a -} - -// ----- long-press (enter select mode) -------------------------------------- - -function attachLongPress (tile, id) { - let timer = null - let pressed = false - const cancel = () => { - if (timer) { clearTimeout(timer); timer = null } - } - tile.addEventListener('pointerdown', (e) => { - // Ignore right/middle clicks - if (e.button !== undefined && e.button !== 0) return - pressed = false - timer = setTimeout(() => { - timer = null - pressed = true - if (!selectMode) enterSelectMode() - toggleSelection(id) - }, LONG_PRESS_MS) - }) - tile.addEventListener('pointerup', cancel) - tile.addEventListener('pointercancel', cancel) - tile.addEventListener('pointerleave', cancel) - tile.addEventListener('pointermove', (e) => { - // Cancel long-press if pointer moves significantly (scroll, drag) - if (Math.abs(e.movementX) + Math.abs(e.movementY) > 6) cancel() - }) - // Swallow the synthetic click that follows a successful long-press so it - // doesn't open the lightbox. - tile.addEventListener('click', (e) => { - if (pressed) { - pressed = false - e.preventDefault() - e.stopImmediatePropagation() - } - }, true) -} - -// ----- selection state ----------------------------------------------------- - -function enterSelectMode () { - if (selectMode) return - selectMode = true - if (container) container.classList.add('select-mode') - if (toolbarEl) toolbarEl.hidden = false -} - -function exitSelectMode () { - if (!selectMode) return - selectMode = false - // Clear DOM markers on the tiles currently in the DOM - for (const a of renderedTiles.values()) a.classList.remove('selected') - selected.clear() - if (container) container.classList.remove('select-mode') - if (toolbarEl) toolbarEl.hidden = true - updateSelectionUI() -} - -function toggleSelection (id) { - if (selected.has(id)) selected.delete(id) - else selected.add(id) - const idx = items.findIndex(it => it.id === id) - const tile = idx >= 0 ? renderedTiles.get(idx) : null - if (tile) tile.classList.toggle('selected', selected.has(id)) - // Auto-exit if user deselected the last item - if (selected.size === 0 && selectMode) exitSelectMode() - else updateSelectionUI() -} - -function updateSelectionUI () { - if (countEl) { - countEl.textContent = selected.size + ' selected' - } - if (downloadBtn) downloadBtn.disabled = selected.size === 0 - if (selectAllBtn) { - selectAllBtn.textContent = - selected.size === items.length ? 'Deselect all' : 'Select all' - } -} - -function selectAllOrNone () { - if (selected.size === items.length) { - // Deselect all but keep select mode active - for (const a of renderedTiles.values()) a.classList.remove('selected') - selected.clear() - updateSelectionUI() - } else { - if (!selectMode) enterSelectMode() - for (const item of items) selected.add(item.id) - for (const a of renderedTiles.values()) a.classList.add('selected') - updateSelectionUI() - } -} - -function downloadSelected () { - if (selected.size === 0) return - // Single selection: download the file directly so the user gets the image - // (or video) instead of a one-entry zip. - if (selected.size === 1) { - const id = selected.values().next().value - const item = items.find(it => it.id === id) - if (item && item.downloadUrl) { - const a = document.createElement('a') - a.href = item.downloadUrl - a.download = item.downloadFilename || '' - document.body.appendChild(a) - a.click() - a.remove() - return - } - } - // Form POST so the browser handles streaming the zip directly to disk. - const form = document.createElement('form') - form.method = 'POST' - form.action = window.location.pathname + '/download' - const input = document.createElement('input') - input.type = 'hidden' - input.name = 'assets' - input.value = JSON.stringify(Array.from(selected)) - form.appendChild(input) - document.body.appendChild(form) - form.submit() - form.remove() -} - -function setupToolbar () { - toolbarEl = document.getElementById('select-toolbar') - // No toolbar means downloads aren't allowed for this share; nothing to wire - if (!toolbarEl) return - countEl = document.getElementById('select-count') - selectAllBtn = /** @type {HTMLButtonElement | null} */ (document.getElementById('select-all')) - cancelBtn = /** @type {HTMLButtonElement | null} */ (document.getElementById('select-cancel')) - downloadBtn = /** @type {HTMLButtonElement | null} */ (document.getElementById('select-download')) - if (cancelBtn) cancelBtn.addEventListener('click', exitSelectMode) - if (selectAllBtn) selectAllBtn.addEventListener('click', selectAllOrNone) - if (downloadBtn) downloadBtn.addEventListener('click', downloadSelected) - updateSelectionUI() -} - -// ----- virtualization ------------------------------------------------------- - -function getVisibleRange () { - const containerTop = container.getBoundingClientRect().top - const viewportTopInContainer = -containerTop - const viewportBottomInContainer = viewportTopInContainer + window.innerHeight - const buffer = window.innerHeight * BUFFER_VIEWPORTS - return { - top: viewportTopInContainer - buffer, - bottom: viewportBottomInContainer + buffer - } -} - -function createHeader (header) { - const el = document.createElement('h2') - el.className = 'group-header' - el.style.top = header.top + 'px' - el.textContent = header.label - return el -} - -function virtualize () { - if (!container || !layout.length) return - const { top, bottom } = getVisibleRange() - - // Tiles - const neededTiles = new Set() - for (const l of layout) { - if (!l) continue - if (l.top + l.height < top) continue - if (l.top > bottom) break - neededTiles.add(l.index) - } - for (const [index, el] of renderedTiles) { - if (!neededTiles.has(index)) { - el.remove() - renderedTiles.delete(index) - } - } - for (const index of neededTiles) { - if (renderedTiles.has(index)) continue - const tile = createTile(index) - container.appendChild(tile) - renderedTiles.set(index, tile) - } - - // Group headers (when grouping is enabled; headers is empty otherwise) - const neededHeaders = new Set() - for (const h of headers) { - if (h.top + h.height < top) continue - if (h.top > bottom) break - neededHeaders.add(h.label) - } - for (const [label, el] of renderedHeaders) { - if (!neededHeaders.has(label)) { - el.remove() - renderedHeaders.delete(label) - } - } - for (const label of neededHeaders) { - if (renderedHeaders.has(label)) continue - const h = headers.find(x => x.label === label) - if (!h) continue - const el = createHeader(h) - container.appendChild(el) - renderedHeaders.set(label, el) - } -} - -function computeLayoutAndRender () { - if (!container) return - const containerW = container.clientWidth - if (containerW <= 0) return - if (containerW === lastContainerW) { - virtualize() - return - } - lastContainerW = containerW - - const result = computeLayout(containerW) - layout = result.layout - headers = result.headers - container.style.height = result.totalHeight + 'px' - - for (const [, el] of renderedTiles) el.remove() - renderedTiles.clear() - for (const [, el] of renderedHeaders) el.remove() - renderedHeaders.clear() - - virtualize() - loadVisibleTiles() -} - -// ----- image src lifecycle -------------------------------------------------- - -function loadVisibleTiles () { - if (!container) return - const vpHeight = window.innerHeight - const containerTop = container.getBoundingClientRect().top - for (const a of renderedTiles.values()) { - const img = a.firstElementChild - if (!(img instanceof HTMLImageElement)) continue - const aTopInVp = containerTop + parseFloat(a.style.top || '0') - const aHeight = parseFloat(a.style.height || '0') - const isFar = aTopInVp + aHeight < -IMAGE_LOAD_MARGIN_PX || - aTopInVp > vpHeight + IMAGE_LOAD_MARGIN_PX - if (isFar) { - if (img.src && !img.complete) { - img.dataset.src = img.src - img.removeAttribute('src') - } - } else if (img.dataset.src) { - img.src = img.dataset.src - img.removeAttribute('data-src') - } - } -} - -// ----- scroll handling ------------------------------------------------------ - -let scrollFrame = null -let loadTimer = null - -function onScroll () { - if (scrollFrame == null) { - scrollFrame = requestAnimationFrame(() => { - scrollFrame = null - virtualize() - }) - } - if (loadTimer) clearTimeout(loadTimer) - loadTimer = setTimeout(() => { - loadTimer = null - loadVisibleTiles() - }, SCROLL_SETTLE_MS) -} - -// ----- PhotoSwipe ----------------------------------------------------------- - -function parseVideoData (item) { - try { - const data = JSON.parse(item.videoData || '{}') - const source = (data.source && data.source[0]) || {} - return { src: source.src || '', type: source.type || 'video/mp4' } - } catch (e) { - return { src: '', type: 'video/mp4' } - } -} - -function escapeAttr (s) { - return String(s).replace(/&/g, '&').replace(/"/g, '"').replace(//g, '>') -} - -function buildDataSource () { - return items.map(item => { - if (item.type === 'VIDEO') { - const v = parseVideoData(item) - return { - html: - '
' + - '' + - '
' - } - } - return { - src: item.previewUrl, - width: item.width || 1600, - height: item.height || 1200, - msrc: item.thumbnailUrl, - alt: item.description || '' - } - }) -} - -function initLightbox () { - const { options = {} } = lightboxConfig - - lightbox = new PhotoSwipeLightbox({ - bgOpacity: 1, - showHideAnimationType: 'fade', - closeOnVerticalDrag: true, - arrowKeys: true, - loop: false, - padding: { top: 56, bottom: 56, left: 16, right: 16 }, - ...options, - dataSource: buildDataSource(), - pswpModule: () => import('/share/static/photoswipe/photoswipe.esm.js') - }) - - // Download button (only registered if config enables it) - if (lightboxConfig.showDownload) { - lightbox.on('uiRegister', () => { - lightbox.pswp.ui.registerElement({ - name: 'download-button', - order: 8, - isButton: true, - tagName: 'a', - ariaLabel: 'Download', - html: ICON_DOWNLOAD, - onInit: (el, pswp) => { - el.setAttribute('target', '_blank') - el.setAttribute('rel', 'noopener') - const update = () => { - const item = items[pswp.currIndex] - if (item && item.downloadUrl) { - el.href = item.downloadUrl - el.setAttribute('download', item.downloadFilename || '') - } else { - el.removeAttribute('href') - } - } - update() - pswp.on('change', update) - } - }) - }) - } - - // Fullscreen toggle. Skipped on browsers without Fullscreen API support - // for arbitrary elements (notably iOS Safari on iPhone). - if (document.fullscreenEnabled) { - lightbox.on('uiRegister', () => { - lightbox.pswp.ui.registerElement({ - name: 'fullscreen-button', - order: 9, - isButton: true, - html: ICON_FULLSCREEN, - onInit: (el, pswp) => { - const update = () => { - const active = document.fullscreenElement === pswp.element - el.innerHTML = active ? ICON_FULLSCREEN_EXIT : ICON_FULLSCREEN - el.setAttribute('aria-label', active ? 'Exit fullscreen' : 'Fullscreen') - el.setAttribute('title', active ? 'Exit fullscreen' : 'Fullscreen') - } - update() - el.addEventListener('click', () => { - if (document.fullscreenElement) { - document.exitFullscreen().catch(() => {}) - } else { - pswp.element.requestFullscreen().catch(() => {}) - } - }) - document.addEventListener('fullscreenchange', update) - pswp.on('destroy', () => { - document.removeEventListener('fullscreenchange', update) - if (document.fullscreenElement === pswp.element) { - document.exitFullscreen().catch(() => {}) - } - }) - } - }) - }) - } - - // Caption from EXIF description (only present when item.description is set; - // server-side gated on ipp.showMetadata.description). Content is already - // HTML-escaped in render.ts, so innerHTML assignment is safe. - lightbox.on('uiRegister', () => { - lightbox.pswp.ui.registerElement({ - name: 'caption', - order: 9, - isButton: false, - appendTo: 'root', - onInit: (el, pswp) => { - el.classList.add('pswp__caption') - const render = () => { - const item = items[pswp.currIndex] - const text = (item && item.description) || '' - el.innerHTML = text - el.hidden = !text - } - render() - pswp.on('change', render) - } - }) - }) - - // Hash navigation + back-button handling: push a history entry on open so - // the mobile back gesture closes the lightbox; sync the hash with the - // current slide as the user pages through. - lightbox.on('uiRegister', () => { - const pswp = lightbox.pswp - const item = items[pswp.currIndex] - if (item) { - history.pushState({ pswp: true }, '', '#' + item.id) - lightboxPushedHistory = true - } - pswp.on('change', () => { - const it = items[pswp.currIndex] - if (it) history.replaceState({ pswp: lightboxPushedHistory }, '', '#' + it.id) - }) - pswp.on('close', () => { - scrollToCurrentSlide(pswp.currIndex) - const wasFromHistory = closingFromHistory - closingFromHistory = false - if (wasFromHistory) { - // popstate already moved us back; nothing more to do - lightboxPushedHistory = false - } else if (lightboxPushedHistory) { - // UI close (button / Esc / swipe-down): consume our pushed entry - closingFromHistory = true - lightboxPushedHistory = false - history.back() - } else { - history.replaceState(null, '', window.location.pathname + window.location.search) - } - }) - }) - - window.addEventListener('popstate', () => { - if (closingFromHistory) { - // Our own history.back() during a UI-driven close - closingFromHistory = false - return - } - if (lightbox && lightbox.pswp && lightboxPushedHistory) { - closingFromHistory = true - lightbox.pswp.close() - } - }) - - // Optional control hiding (defaults match Immich's behavior) - const docEl = document.documentElement - if (!lightboxConfig.showArrows) docEl.classList.add('pswp-no-arrows') - if (!lightboxConfig.mobileArrows) docEl.classList.add('pswp-no-mobile-arrows') - - lightbox.init() -} - -function openLightbox (index) { - if (lightbox) lightbox.loadAndOpen(index) -} - -/** - * Scroll the page so the tile for the given item is comfortably in view. - * Called from the lightbox close handler - if the user navigated prev/next - * inside the lightbox, or arrived via a #asset-id deep link, the tile they - * end on may be far from the original scroll position. We only scroll when - * the tile is genuinely off-screen, so closing on a still-visible tile - * doesn't jiggle the page. - */ -function scrollToCurrentSlide (index) { - if (!container || index == null || !layout[index]) return - const entry = layout[index] - const containerTop = container.getBoundingClientRect().top + window.scrollY - const tileTop = containerTop + entry.top - const tileBottom = tileTop + entry.height - const viewportTop = window.scrollY - const viewportBottom = viewportTop + window.innerHeight - // Already mostly visible - leave the scroll alone - if (tileTop >= viewportTop && tileBottom <= viewportBottom) return - // Center the tile vertically in the viewport - const targetScroll = tileTop - (window.innerHeight - entry.height) / 2 - window.scrollTo({ top: Math.max(0, targetScroll), behavior: 'instant' }) -} - -// ----- entry point ---------------------------------------------------------- - -function readInitParams () { - const el = document.getElementById('ipp-init') - if (!el) return {} - try { return JSON.parse(el.textContent || '{}') } catch (e) { return {} } -} - -function init () { - const params = readInitParams() - items = params.items || [] - lightboxConfig = params.lightboxConfig || {} - groupByDate = !!params.groupByDate - container = document.getElementById('gallery') - if (!container) return - - setupToolbar() - initLightbox() - - let resizeFrame - const resizeObserver = new ResizeObserver(() => { - if (resizeFrame) cancelAnimationFrame(resizeFrame) - resizeFrame = requestAnimationFrame(computeLayoutAndRender) - }) - resizeObserver.observe(container) - - window.addEventListener('scroll', onScroll, { passive: true }) - - // Deep-link: prefer #asset-id in the URL hash, fall back to ?openItem - const hash = window.location.hash.slice(1) - if (hash) { - const idx = items.findIndex(it => it.id === hash) - if (idx >= 0) openLightbox(idx) - } else if (params.openItem && params.openItem > 0 && params.openItem <= items.length) { - openLightbox(params.openItem - 1) - } -} - -init() diff --git a/app/src/client/init.ts b/app/src/client/init.ts new file mode 100644 index 0000000..7134957 --- /dev/null +++ b/app/src/client/init.ts @@ -0,0 +1,53 @@ +// Gallery client entry point. Reads the JSON init block from the page, +// populates shared state, sets up the toolbar + lightbox, attaches the +// resize / scroll observers, and handles deep-link opening. +// +// Layout is pre-computed for all items based on container width. Only tiles +// within viewport ± 1 viewport-height buffer exist in the DOM at any moment. +// PhotoSwipe runs with a full dataSource array so the lightbox navigates +// across all items regardless of which tiles are currently rendered. + +import type { InitParams } from '../shared/types.js' +import { state } from './state.js' +import { setupToolbar } from './selection.js' +import { initLightbox, openLightbox } from './lightbox.js' +import { computeLayoutAndRender, onScroll } from './virtualization.js' + +function readInitParams (): InitParams { + const el = document.getElementById('ipp-init') + if (!el) return {} + try { return JSON.parse(el.textContent || '{}') } catch (e) { return {} } +} + +function init () { + const params = readInitParams() + state.items = params.items || [] + state.lightboxConfig = params.lightboxConfig || {} + if (params.metadataConfig) state.metadataConfig = params.metadataConfig + state.groupByDate = !!params.groupByDate + state.container = document.getElementById('gallery') + if (!state.container) return + + setupToolbar() + initLightbox() + + let resizeFrame: number | undefined + const resizeObserver = new ResizeObserver(() => { + if (resizeFrame) cancelAnimationFrame(resizeFrame) + resizeFrame = requestAnimationFrame(computeLayoutAndRender) + }) + resizeObserver.observe(state.container) + + window.addEventListener('scroll', onScroll, { passive: true }) + + // Deep-link: prefer #asset-id in the URL hash, fall back to ?openItem + const hash = window.location.hash.slice(1) + if (hash) { + const idx = state.items.findIndex(it => it.id === hash) + if (idx >= 0) openLightbox(idx) + } else if (params.openItem && params.openItem > 0 && params.openItem <= state.items.length) { + openLightbox(params.openItem - 1) + } +} + +init() diff --git a/app/src/client/layout.ts b/app/src/client/layout.ts new file mode 100644 index 0000000..c076b86 --- /dev/null +++ b/app/src/client/layout.ts @@ -0,0 +1,172 @@ +// Justified-rows + square-grid layout, with optional month grouping. Pure +// geometry: takes a container width, returns positions for every tile and +// every header. Called by virtualization on first render and on resize. + +import { + state, + TARGET_ROW_HEIGHT, + GAP, + MOBILE_BREAKPOINT, + MOBILE_COLS, + HEADER_HEIGHT, + GROUP_GAP, + type LayoutEntry, + type HeaderEntry, + type GroupSpec +} from './state.js' + +export interface LayoutResult { + layout: LayoutEntry[] + headers: HeaderEntry[] + totalHeight: number +} + +/** + * Compute tile positions, group-header positions, and total scroll height + * for the gallery at the given container width. + * + * Reads `state.items` and `state.groupByDate`. Output is pure data - the + * caller (virtualization) is responsible for actually placing DOM nodes + * according to the returned positions. + * + * Switches between a mobile square grid (under MOBILE_BREAKPOINT) and the + * justified-rows algorithm. When grouping by date is enabled, items are + * bucketed by YYYY-MM and a header is reserved before each group. + */ +export function computeLayout (containerW: number): LayoutResult { + const tileLayout: LayoutEntry[] = new Array(state.items.length) + const newHeaders: HeaderEntry[] = [] + const groups: GroupSpec[] = state.groupByDate + ? groupItemsByMonth() + : [{ label: null, indices: itemIndices() }] + const isMobile = containerW < MOBILE_BREAKPOINT + let y = 0 + for (let g = 0; g < groups.length; g++) { + const group = groups[g] + if (group.label) { + newHeaders.push({ label: group.label, top: y, height: HEADER_HEIGHT }) + y += HEADER_HEIGHT + } + y = isMobile + ? layoutSquareGroup(containerW, group.indices, y, tileLayout) + : layoutJustifiedGroup(containerW, group.indices, y, tileLayout) + if (g < groups.length - 1) y += GROUP_GAP + } + return { + layout: tileLayout, + headers: newHeaders, + totalHeight: Math.max(0, y) + } +} + +function itemIndices (): number[] { + const out = new Array(state.items.length) + for (let i = 0; i < state.items.length; i++) out[i] = i + return out +} + +function groupItemsByMonth (): GroupSpec[] { + // Preserve item order (already sorted desc by render.ts when grouping is on) + const map = new Map() + for (let i = 0; i < state.items.length; i++) { + const key = (state.items[i].fileCreatedAt || '').slice(0, 7) || 'undated' + let g = map.get(key) + if (!g) { + g = { label: monthLabel(key), indices: [] } + map.set(key, g) + } + g.indices.push(i) + } + return Array.from(map.values()) +} + +function monthLabel (key: string): string { + if (key === 'undated') return 'Undated' + const parts = key.split('-') + const y = Number(parts[0]) + const m = Number(parts[1]) + if (!y || !m) return key + // Intl.DateTimeFormat picks up the browser's locale; UTC timeZone keeps + // the displayed month consistent with the UTC YYYY-MM bucket key. + return new Intl.DateTimeFormat(undefined, { + year: 'numeric', + month: 'long', + timeZone: 'UTC' + }).format(new Date(Date.UTC(y, m - 1, 1))) +} + +/** + * Lay out one group as a fixed-column square grid (mobile path). + * Writes positions into `tileLayout` in place. + * + * @returns The y position past the last tile in this group (no trailing gap). + */ +function layoutSquareGroup (containerW: number, indices: number[], startY: number, tileLayout: LayoutEntry[]): number { + const tileSize = Math.floor((containerW - (MOBILE_COLS - 1) * GAP) / MOBILE_COLS) + let col = 0 + let x = 0 + let y = startY + for (const idx of indices) { + tileLayout[idx] = { index: idx, left: x, top: y, width: tileSize, height: tileSize } + col++ + if (col === MOBILE_COLS) { + col = 0 + x = 0 + y += tileSize + GAP + } else { + x += tileSize + GAP + } + } + // If the last row was partial, advance y to past it + if (col > 0) y += tileSize + // Otherwise back off the trailing inter-row gap + else if (y > startY) y -= GAP + return y +} + +/** + * Lay out one group as justified rows (desktop path): tiles in each row are + * scaled so their combined width fills the container exactly. The final row + * keeps the target height instead of stretching to fill, which avoids the + * "huge last row" look when there are only one or two trailing tiles. + * + * @returns The y position past the last tile in this group (no trailing gap). + */ +function layoutJustifiedGroup (containerW: number, indices: number[], startY: number, tileLayout: LayoutEntry[]): number { + let rowItems: Array<{ idx: number, aspect: number }> = [] + let aspectSum = 0 + let y = startY + + const applyRow = (rowItems: Array<{ idx: number, aspect: number }>, height: number, isLastRow: boolean) => { + const intHeight = Math.floor(height) + let x = 0 + rowItems.forEach(({ idx, aspect }, i) => { + const isFinalInRow = i === rowItems.length - 1 + const w = (!isLastRow && isFinalInRow) + ? containerW - x + : Math.floor(aspect * height) + tileLayout[idx] = { index: idx, left: x, top: y, width: w, height: intHeight } + x += w + GAP + }) + y += intHeight + GAP + } + + for (const idx of indices) { + const item = state.items[idx] + const w = item.width || 1 + const h = item.height || 1 + const aspect = w / h + rowItems.push({ idx, aspect }) + aspectSum += aspect + const projectedH = (containerW - (rowItems.length - 1) * GAP) / aspectSum + if (projectedH <= TARGET_ROW_HEIGHT) { + applyRow(rowItems, projectedH, false) + rowItems = [] + aspectSum = 0 + } + } + if (rowItems.length) applyRow(rowItems, TARGET_ROW_HEIGHT, true) + + // y advanced past the last row's trailing gap; back off + return y > startY ? y - GAP : y +} diff --git a/app/src/client/lightbox-ui.ts b/app/src/client/lightbox-ui.ts new file mode 100644 index 0000000..a901db5 --- /dev/null +++ b/app/src/client/lightbox-ui.ts @@ -0,0 +1,157 @@ +// PhotoSwipe UI element registrations: back button, caption (description), +// download button, fullscreen toggle. Each is gated by config or feature +// detection. The info sidebar lives in `sidebar.ts`. + +import { state, ICON_BACK, ICON_DOWNLOAD, ICON_FULLSCREEN, ICON_FULLSCREEN_EXIT } from './state.js' + +// PhotoSwipe types are not bundled with the project. These two interfaces +// describe just enough of the surface we touch to keep the rest of the file +// type-checked. +interface PswpUiElementConfig { + name: string + order: number + isButton: boolean + tagName?: string + ariaLabel?: string + appendTo?: string + html?: string + // eslint-disable-next-line no-use-before-define + onInit?: (el: HTMLElement, pswp: PswpInstance) => void +} + +interface PswpInstance { + currIndex: number + element: HTMLElement + ui: { + registerElement: (config: PswpUiElementConfig) => void + } + on: (event: string, cb: () => void) => void + close: () => void +} + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +type LightboxInstance = any + +/** + * Register the top-left back button that closes the lightbox and returns + * to the gallery grid. Matches Immich's native asset-viewer affordance + * (back arrow, no top-right X). Order 1 puts it at the leftmost slot of + * the toolbar. The default PhotoSwipe close button is hidden via CSS in + * `photoswipe-overrides.css`. + */ +export function registerBackButton (lightbox: LightboxInstance) { + lightbox.on('uiRegister', () => { + lightbox.pswp.ui.registerElement({ + name: 'back-button', + order: 1, + isButton: true, + ariaLabel: 'Back to gallery', + html: ICON_BACK, + onInit: (el: HTMLElement, pswp: PswpInstance) => { + el.addEventListener('click', () => pswp.close()) + } + }) + }) +} + +/** + * Register the description-caption UI element. Content is plain text from + * the server; the client uses `textContent` so any HTML-significant + * characters in the description render as literal text (not markup). + * + * Caller is responsible for only invoking this when + * `metadataConfig.descriptionInCaption` is true. + */ +export function registerCaption (lightbox: LightboxInstance) { + lightbox.on('uiRegister', () => { + lightbox.pswp.ui.registerElement({ + name: 'caption', + order: 9, + isButton: false, + appendTo: 'root', + onInit: (el: HTMLElement, pswp: PswpInstance) => { + el.classList.add('pswp__caption') + const render = () => { + const item = state.items[pswp.currIndex] + const text = (item && item.description) || '' + el.textContent = text + el.hidden = !text + } + render() + pswp.on('change', render) + } + }) + }) +} + +/** + * Register the download button. Only called when the share allows downloads + * AND the config enables the lightbox button. + */ +export function registerDownloadButton (lightbox: LightboxInstance) { + lightbox.on('uiRegister', () => { + lightbox.pswp.ui.registerElement({ + name: 'download-button', + order: 8, + isButton: true, + tagName: 'a', + ariaLabel: 'Download', + html: ICON_DOWNLOAD, + onInit: (el: HTMLElement, pswp: PswpInstance) => { + const link = el as HTMLAnchorElement + link.setAttribute('target', '_blank') + link.setAttribute('rel', 'noopener') + const update = () => { + const item = state.items[pswp.currIndex] + if (item && item.downloadUrl) { + link.href = item.downloadUrl + link.setAttribute('download', item.downloadFilename || '') + } else { + link.removeAttribute('href') + } + } + update() + pswp.on('change', update) + } + }) + }) +} + +/** + * Register the fullscreen toggle. Skipped on browsers without Fullscreen API + * support for arbitrary elements (notably iOS Safari on iPhone). + */ +export function registerFullscreenButton (lightbox: LightboxInstance) { + if (!document.fullscreenEnabled) return + lightbox.on('uiRegister', () => { + lightbox.pswp.ui.registerElement({ + name: 'fullscreen-button', + order: 9, + isButton: true, + html: ICON_FULLSCREEN, + onInit: (el: HTMLElement, pswp: PswpInstance) => { + const update = () => { + const active = document.fullscreenElement === pswp.element + el.innerHTML = active ? ICON_FULLSCREEN_EXIT : ICON_FULLSCREEN + el.setAttribute('aria-label', active ? 'Exit fullscreen' : 'Fullscreen') + el.setAttribute('title', active ? 'Exit fullscreen' : 'Fullscreen') + } + update() + el.addEventListener('click', () => { + if (document.fullscreenElement) { + document.exitFullscreen().catch(() => {}) + } else { + pswp.element.requestFullscreen().catch(() => {}) + } + }) + document.addEventListener('fullscreenchange', update) + pswp.on('destroy', () => { + document.removeEventListener('fullscreenchange', update) + if (document.fullscreenElement === pswp.element) { + document.exitFullscreen().catch(() => {}) + } + }) + } + }) + }) +} diff --git a/app/src/client/lightbox.ts b/app/src/client/lightbox.ts new file mode 100644 index 0000000..a172f5f --- /dev/null +++ b/app/src/client/lightbox.ts @@ -0,0 +1,203 @@ +// PhotoSwipe instantiation, data-source construction, history / hash +// navigation. Individual UI elements (caption, download, fullscreen, +// sidebar) live in lightbox-ui.ts and sidebar.ts. + +// Runtime URL resolved by Express static, not a TS-resolvable module path. +// @ts-expect-error - browser-only ESM URL +import PhotoSwipeLightbox from '/share/static/photoswipe/photoswipe-lightbox.esm.js' // eslint-disable-line import/no-absolute-path + +import { state, SIDEBAR_WIDTH, MOBILE_BREAKPOINT } from './state.js' +import type { GalleryItem } from '../shared/types.js' +import { + registerBackButton, + registerCaption, + registerDownloadButton, + registerFullscreenButton +} from './lightbox-ui.js' +import { registerSidebar } from './sidebar.js' + +/** + * Replace the current history entry with the same URL minus any hash. + * No-op when there is no hash. Used by the lightbox-close paths so the + * browser bar shows a clean gallery URL after the lightbox dismisses, + * even when the entry we land on came from a `#assetId` deep link. + */ +function clearHashIfPresent () { + if (window.location.hash) { + history.replaceState(null, '', window.location.pathname + window.location.search) + } +} + +function parseVideoData (item: GalleryItem): { src: string, type: string } { + try { + const data = JSON.parse(item.videoData || '{}') + const source = (data.source && data.source[0]) || {} + return { src: source.src || '', type: source.type || 'video/mp4' } + } catch (e) { + return { src: '', type: 'video/mp4' } + } +} + +function escapeAttr (s: string): string { + return String(s).replace(/&/g, '&').replace(/"/g, '"').replace(//g, '>') +} + +/** + * Translate `state.items` into PhotoSwipe's dataSource array. Images use + * `src`/`width`/`height`; videos use the `html` slide with a `