From 22c9e2d1c48fc4094191f18cbb785f461e0e9d57 Mon Sep 17 00:00:00 2001 From: Shishant Biswas Date: Tue, 28 Jul 2026 19:10:12 +0530 Subject: [PATCH] soline init --- Dockerfile | 60 + README.md | 32 + app.config.ts | 37 + bknd.config.ts | 62 + bun.lock | 2154 +++++++++++++++++ components.json | 28 + docker-compose.yml | 26 + package.json | 57 + public/admin/assets/CodeEditor-BSbZC6_t.js | 24 + .../admin/assets/DataSchemaCanvas-Bidf4HWW.js | 1 + .../admin/assets/JsonSchemaForm-CE_Yijem.js | 24 + public/admin/assets/main-CfjI0j-e.js | 443 ++++ public/admin/assets/main-OPOTedc8.css | 1 + public/admin/favicon.ico | Bin 0 -> 15086 bytes public/admin/manifest.json | 44 + public/favicon.ico | Bin 0 -> 12938 bytes src/app.css | 158 ++ src/app.tsx | 50 + src/components/button.tsx | 77 + src/components/image.tsx | 48 + src/components/toogle.tsx | 29 + src/entry-client.tsx | 4 + src/entry-server.tsx | 30 + src/global.d.ts | 1 + src/hono.ts | 67 + src/lib/api.ts | 18 + src/lib/cache.ts | 73 + src/lib/dexie.ts | 52 + src/lib/utils.ts | 6 + src/middleware/index.ts | 52 + src/routes/(index).tsx | 11 + src/routes/(index)/[...404].tsx | 28 + src/routes/(index)/genre/[name].tsx | 0 src/routes/(index)/genre/index.tsx | 26 + src/routes/(index)/index.tsx | 146 ++ src/routes/(index)/watch/[id].tsx | 508 ++++ src/routes/api/proxy/[...all].ts | 70 + src/routes/api/test/*all.ts | 4 + src/routes/api/test/[...rest].ts | 4 + src/routes/api/test/hello.tsx | 4 + src/routes/api/test/index.ts | 4 + src/routes/api/trpc/[trpc].ts | 27 + src/trpc/api/root.ts | 9 + src/trpc/api/routers/anime.ts | 302 +++ src/trpc/api/utils.ts | 6 + src/types/anime.d.ts | 309 +++ src/types/env.d.ts | 16 + src/types/hls-light.d.ts | 4 + src/types/tmdb.d.ts | 211 ++ src/utils/backoff.ts | 49 + src/utils/cache.ts | 40 + src/utils/url.ts | 58 + tsconfig.json | 23 + vite.config.ts | 15 + 54 files changed, 5532 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 app.config.ts create mode 100644 bknd.config.ts create mode 100644 bun.lock create mode 100644 components.json create mode 100644 docker-compose.yml create mode 100644 package.json create mode 100644 public/admin/assets/CodeEditor-BSbZC6_t.js create mode 100644 public/admin/assets/DataSchemaCanvas-Bidf4HWW.js create mode 100644 public/admin/assets/JsonSchemaForm-CE_Yijem.js create mode 100644 public/admin/assets/main-CfjI0j-e.js create mode 100644 public/admin/assets/main-OPOTedc8.css create mode 100644 public/admin/favicon.ico create mode 100644 public/admin/manifest.json create mode 100644 public/favicon.ico create mode 100644 src/app.css create mode 100644 src/app.tsx create mode 100644 src/components/button.tsx create mode 100644 src/components/image.tsx create mode 100644 src/components/toogle.tsx create mode 100644 src/entry-client.tsx create mode 100644 src/entry-server.tsx create mode 100644 src/global.d.ts create mode 100644 src/hono.ts create mode 100644 src/lib/api.ts create mode 100644 src/lib/cache.ts create mode 100644 src/lib/dexie.ts create mode 100644 src/lib/utils.ts create mode 100644 src/middleware/index.ts create mode 100644 src/routes/(index).tsx create mode 100644 src/routes/(index)/[...404].tsx create mode 100644 src/routes/(index)/genre/[name].tsx create mode 100644 src/routes/(index)/genre/index.tsx create mode 100644 src/routes/(index)/index.tsx create mode 100644 src/routes/(index)/watch/[id].tsx create mode 100644 src/routes/api/proxy/[...all].ts create mode 100644 src/routes/api/test/*all.ts create mode 100644 src/routes/api/test/[...rest].ts create mode 100644 src/routes/api/test/hello.tsx create mode 100644 src/routes/api/test/index.ts create mode 100644 src/routes/api/trpc/[trpc].ts create mode 100644 src/trpc/api/root.ts create mode 100644 src/trpc/api/routers/anime.ts create mode 100644 src/trpc/api/utils.ts create mode 100644 src/types/anime.d.ts create mode 100644 src/types/env.d.ts create mode 100644 src/types/hls-light.d.ts create mode 100644 src/types/tmdb.d.ts create mode 100644 src/utils/backoff.ts create mode 100644 src/utils/cache.ts create mode 100644 src/utils/url.ts create mode 100644 tsconfig.json create mode 100644 vite.config.ts diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7530159 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,60 @@ +FROM node:25-alpine AS base + +FROM base AS deps +RUN apk add --no-cache libc6-compat +WORKDIR /app + +COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* bun.lock* .npmrc* ./ +RUN \ + if [ -f yarn.lock ]; then yarn --frozen-lockfile; \ + elif [ -f package-lock.json ]; then npm ci; \ + elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \ + elif [ -f bun.lock ]; then npm install -g bun && bun install --frozen-lockfile; \ + else echo "Lockfile not found." && exit 1; \ + fi + +FROM base AS builder +WORKDIR /app +COPY --from=deps /app/node_modules ./node_modules +COPY . . + +ENV NODE_ENV=production + +ARG VITE_PROXY_PREFIX +ARG VITE_PROXY_PREFIX_VAMANA +ARG VITE_PROXY_PREFIX_BALARAMA + +# 2. Assign ARGs to ENV so Vite/Vinxi can see them +ENV VITE_PROXY_PREFIX=$VITE_PROXY_PREFIX +ENV VITE_PROXY_PREFIX_VAMANA=$VITE_PROXY_PREFIX_VAMANA +ENV VITE_PROXY_PREFIX_BALARAMA=$VITE_PROXY_PREFIX_BALARAMA + +RUN \ + if [ -f yarn.lock ]; then yarn run build; \ + elif [ -f bun.lock ]; then npm run build; \ + elif [ -f package-lock.json ]; then npm run build; \ + elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \ + else echo "Lockfile not found." && exit 1; \ + fi + +FROM base AS runner +WORKDIR /app + +ENV NODE_ENV=production + +RUN addgroup --system --gid 1001 nodejs +RUN adduser --system --uid 1001 appuser + +COPY --from=builder /app/public ./public +COPY --from=builder --chown=appuser:nodejs /app/.output ./.output +COPY --from=builder --chown=appuser:nodejs /app/.vinxi ./.vinxi +COPY --from=builder /app/package.json ./package.json + +USER appuser + +EXPOSE 3000 + +ENV PORT=3000 +ENV HOSTNAME="0.0.0.0" + +CMD ["node", ".output/server/index.mjs"] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..9337430 --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# SolidStart + +Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com); + +## Creating a project + +```bash +# create a new project in the current directory +npm init solid@latest + +# create a new project in my-app +npm init solid@latest my-app +``` + +## Developing + +Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: + +```bash +npm run dev + +# or start the server and open the app in a new browser tab +npm run dev -- --open +``` + +## Building + +Solid apps are built with _presets_, which optimise your project for deployment to different environments. + +By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different preset, add it to the `devDependencies` in `package.json` and specify in your `app.config.js`. + +## This project was created with the [Solid CLI](https://github.com/solidjs-community/solid-cli) diff --git a/app.config.ts b/app.config.ts new file mode 100644 index 0000000..b0c68e7 --- /dev/null +++ b/app.config.ts @@ -0,0 +1,37 @@ +import { defineConfig } from "@solidjs/start/config"; +import tailwindcss from "@tailwindcss/vite"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import { type InlineConfig } from "vite"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +const app = defineConfig({ + middleware: "src/middleware/index.ts", + vite: { + plugins: [tailwindcss()], + resolve: { + alias: { + "@": path.resolve(__dirname, "./src"), + }, + }, + build: { + chunkSizeWarningLimit: 1000, + assetsInlineLimit: 1024 * 1024, + }, + dev: { + chunkSizeWarningLimit: 1000, + }, + } as InlineConfig, +}); + +app.addRouter({ + name: "hono", + type: "http", + base: "/api/hono", + handler: "./src/hono.ts", + worker: true, +}); + +export default app; diff --git a/bknd.config.ts b/bknd.config.ts new file mode 100644 index 0000000..6193795 --- /dev/null +++ b/bknd.config.ts @@ -0,0 +1,62 @@ +import { em, entity, text, boolean } from "bknd"; + +import { registerLocalMediaAdapter } from "bknd/adapter/node"; +import { RuntimeBkndConfig } from "bknd/adapter"; + +const local = registerLocalMediaAdapter(); +// let html = await readFile("./index.html", "utf-8"); + +const schema = em({ + todos: entity("todos", { + title: text(), + done: boolean(), + }), +}); + +// register your schema to get automatic type completion +type Database = (typeof schema)["DB"]; +declare module "bknd" { + interface DB extends Database {} +} + +export default { + connection: { + url: "file:data.db", + }, + options: { + // the seed option is only executed if the database was empty + seed: async (ctx) => { + // create some entries + await ctx.em.mutator("todos").insertMany([ + { title: "Learn bknd", done: true }, + { title: "Build something cool", done: false }, + ]); + + // and create a user + await ctx.app.module.auth.createUser({ + email: "test@bknd.io", + password: "12345678", + }); + }, + }, + config: { + data: schema.toJSON(), + auth: { + enabled: true, + jwt: { + alg: "HS256", + secret: "e79f40806aee76b95f0e2e5789eea", + }, + }, + media: { + enabled: true, + adapter: local({ + path: "./public/uploads", + }), + }, + }, + adminOptions: { + adminBasepath: "/admin", + assetsPath: "/admin/", + }, +} satisfies RuntimeBkndConfig; \ No newline at end of file diff --git a/bun.lock b/bun.lock new file mode 100644 index 0000000..6258889 --- /dev/null +++ b/bun.lock @@ -0,0 +1,2154 @@ +{ + "lockfileVersion": 1, + "configVersion": 1, + "workspaces": { + "": { + "name": "example-basic", + "dependencies": { + "@fontsource/barlow-condensed": "^5.2.8", + "@solidjs/h": "^2.0.0-experimental.16", + "@solidjs/html": "^2.0.0-experimental.16", + "@solidjs/meta": "^0.29.4", + "@solidjs/router": "^0.15.4", + "@solidjs/start": "2.0.0-alpha.2", + "@solidjs/universal": "^2.0.0-experimental.16", + "@solidjs/vite-plugin-nitro-2": "^0.1.0", + "@solidjs/web": "^2.0.0-experimental.16", + "@trpc/client": "11.10.0", + "@trpc/server": "11.10.0", + "@types/node": "^25.3.5", + "artplayer": "^5.3.0", + "artplayer-plugin-chapter": "^1.0.1", + "babel-preset-solid": "^2.0.0-experimental.16", + "bknd": "^0.20.0", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "dexie": "^4.3.0", + "hls.js": "^1.6.15", + "hono": "^4.12.5", + "ioredis": "^5.10.0", + "lucide-react": "^0.564.0", + "lucide-solid": "^0.563.0", + "radix-ui": "^1.4.3", + "simple-icons": "^16.10.0", + "solid-js": "^1.9.5", + "solid-toast": "^0.5.0", + "tailwind-merge": "^3.5.0", + "vite": "^7.3.1", + "vite-plugin-solid": "3.0.0-next.1", + "zod": "^4.3.6", + }, + "devDependencies": { + "@tailwindcss/vite": "^4.2.1", + "shadcn": "^3.8.5", + "tailwindcss": "^4.2.1", + "tw-animate-css": "^1.4.0", + "vite-plugin-environment": "^1.1.3", + "vite-plugin-rewrite-all": "^1.0.2", + }, + }, + }, + "packages": { + "@antfu/ni": ["@antfu/ni@25.0.0", "", { "dependencies": { "ansis": "^4.0.0", "fzf": "^0.5.2", "package-manager-detector": "^1.3.0", "tinyexec": "^1.0.1" }, "bin": { "na": "bin/na.mjs", "ni": "bin/ni.mjs", "nr": "bin/nr.mjs", "nci": "bin/nci.mjs", "nlx": "bin/nlx.mjs", "nun": "bin/nun.mjs", "nup": "bin/nup.mjs" } }, "sha512-9q/yCljni37pkMr4sPrI3G4jqdIk074+iukc5aFJl7kmDCCsiJrbZ6zKxnES1Gwg+i9RcDZwvktl23puGslmvA=="], + + "@babel/code-frame": ["@babel/code-frame@7.27.1", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg=="], + + "@babel/compat-data": ["@babel/compat-data@7.28.5", "", {}, "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA=="], + + "@babel/core": ["@babel/core@7.28.5", "", { "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.5", "@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-module-transforms": "^7.28.3", "@babel/helpers": "^7.28.4", "@babel/parser": "^7.28.5", "@babel/template": "^7.27.2", "@babel/traverse": "^7.28.5", "@babel/types": "^7.28.5", "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", "json5": "^2.2.3", "semver": "^6.3.1" } }, "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw=="], + + "@babel/generator": ["@babel/generator@7.28.5", "", { "dependencies": { "@babel/parser": "^7.28.5", "@babel/types": "^7.28.5", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" } }, "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ=="], + + "@babel/helper-annotate-as-pure": ["@babel/helper-annotate-as-pure@7.27.3", "", { "dependencies": { "@babel/types": "^7.27.3" } }, "sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg=="], + + "@babel/helper-compilation-targets": ["@babel/helper-compilation-targets@7.27.2", "", { "dependencies": { "@babel/compat-data": "^7.27.2", "@babel/helper-validator-option": "^7.27.1", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" } }, "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ=="], + + "@babel/helper-create-class-features-plugin": ["@babel/helper-create-class-features-plugin@7.28.5", "", { "dependencies": { "@babel/helper-annotate-as-pure": "^7.27.3", "@babel/helper-member-expression-to-functions": "^7.28.5", "@babel/helper-optimise-call-expression": "^7.27.1", "@babel/helper-replace-supers": "^7.27.1", "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", "@babel/traverse": "^7.28.5", "semver": "^6.3.1" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-q3WC4JfdODypvxArsJQROfupPBq9+lMwjKq7C33GhbFYJsufD0yd/ziwD+hJucLeWsnFPWZjsU2DNFqBPE7jwQ=="], + + "@babel/helper-globals": ["@babel/helper-globals@7.28.0", "", {}, "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw=="], + + "@babel/helper-member-expression-to-functions": ["@babel/helper-member-expression-to-functions@7.28.5", "", { "dependencies": { "@babel/traverse": "^7.28.5", "@babel/types": "^7.28.5" } }, "sha512-cwM7SBRZcPCLgl8a7cY0soT1SptSzAlMH39vwiRpOQkJlh53r5hdHwLSCZpQdVLT39sZt+CRpNwYG4Y2v77atg=="], + + "@babel/helper-module-imports": ["@babel/helper-module-imports@7.18.6", "", { "dependencies": { "@babel/types": "^7.18.6" } }, "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA=="], + + "@babel/helper-module-transforms": ["@babel/helper-module-transforms@7.28.3", "", { "dependencies": { "@babel/helper-module-imports": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1", "@babel/traverse": "^7.28.3" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw=="], + + "@babel/helper-optimise-call-expression": ["@babel/helper-optimise-call-expression@7.27.1", "", { "dependencies": { "@babel/types": "^7.27.1" } }, "sha512-URMGH08NzYFhubNSGJrpUEphGKQwMQYBySzat5cAByY1/YgIRkULnIy3tAMeszlL/so2HbeilYloUmSpd7GdVw=="], + + "@babel/helper-plugin-utils": ["@babel/helper-plugin-utils@7.27.1", "", {}, "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw=="], + + "@babel/helper-replace-supers": ["@babel/helper-replace-supers@7.27.1", "", { "dependencies": { "@babel/helper-member-expression-to-functions": "^7.27.1", "@babel/helper-optimise-call-expression": "^7.27.1", "@babel/traverse": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0" } }, "sha512-7EHz6qDZc8RYS5ElPoShMheWvEgERonFCs7IAonWLLUTXW59DP14bCZt89/GKyreYn8g3S83m21FelHKbeDCKA=="], + + "@babel/helper-skip-transparent-expression-wrappers": ["@babel/helper-skip-transparent-expression-wrappers@7.27.1", "", { "dependencies": { "@babel/traverse": "^7.27.1", "@babel/types": "^7.27.1" } }, "sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg=="], + + "@babel/helper-string-parser": ["@babel/helper-string-parser@7.27.1", "", {}, "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA=="], + + "@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.28.5", "", {}, "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q=="], + + "@babel/helper-validator-option": ["@babel/helper-validator-option@7.27.1", "", {}, "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg=="], + + "@babel/helpers": ["@babel/helpers@7.28.4", "", { "dependencies": { "@babel/template": "^7.27.2", "@babel/types": "^7.28.4" } }, "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w=="], + + "@babel/parser": ["@babel/parser@7.29.0", "", { "dependencies": { "@babel/types": "^7.29.0" }, "bin": "./bin/babel-parser.js" }, "sha512-IyDgFV5GeDUVX4YdF/3CPULtVGSXXMLh1xVIgdCgxApktqnQV0r7/8Nqthg+8YLGaAtdyIlo2qIdZrbCv4+7ww=="], + + "@babel/plugin-syntax-jsx": ["@babel/plugin-syntax-jsx@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w=="], + + "@babel/plugin-syntax-typescript": ["@babel/plugin-syntax-typescript@7.27.1", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ=="], + + "@babel/plugin-transform-modules-commonjs": ["@babel/plugin-transform-modules-commonjs@7.27.1", "", { "dependencies": { "@babel/helper-module-transforms": "^7.27.1", "@babel/helper-plugin-utils": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-OJguuwlTYlN0gBZFRPqwOGNWssZjfIUdS7HMYtN8c1KmwpwHFBwTeFZrg9XZa+DFTitWOW5iTAG7tyCUPsCCyw=="], + + "@babel/plugin-transform-typescript": ["@babel/plugin-transform-typescript@7.28.5", "", { "dependencies": { "@babel/helper-annotate-as-pure": "^7.27.3", "@babel/helper-create-class-features-plugin": "^7.28.5", "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", "@babel/plugin-syntax-typescript": "^7.27.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-x2Qa+v/CuEoX7Dr31iAfr0IhInrVOWZU/2vJMJ00FOR/2nM0BcBEclpaf9sWCDc+v5e9dMrhSH8/atq/kX7+bA=="], + + "@babel/preset-typescript": ["@babel/preset-typescript@7.28.5", "", { "dependencies": { "@babel/helper-plugin-utils": "^7.27.1", "@babel/helper-validator-option": "^7.27.1", "@babel/plugin-syntax-jsx": "^7.27.1", "@babel/plugin-transform-modules-commonjs": "^7.27.1", "@babel/plugin-transform-typescript": "^7.28.5" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "sha512-+bQy5WOI2V6LJZpPVxY+yp66XdZ2yifu0Mc1aP5CQKgjn4QM5IN2i5fAZ4xKop47pr8rpVhiAeu+nDQa12C8+g=="], + + "@babel/runtime": ["@babel/runtime@7.28.6", "", {}, "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA=="], + + "@babel/template": ["@babel/template@7.27.2", "", { "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/parser": "^7.27.2", "@babel/types": "^7.27.1" } }, "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw=="], + + "@babel/traverse": ["@babel/traverse@7.28.5", "", { "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.5", "@babel/helper-globals": "^7.28.0", "@babel/parser": "^7.28.5", "@babel/template": "^7.27.2", "@babel/types": "^7.28.5", "debug": "^4.3.1" } }, "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ=="], + + "@babel/types": ["@babel/types@7.28.5", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.28.5" } }, "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA=="], + + "@cfworker/json-schema": ["@cfworker/json-schema@4.1.1", "", {}, "sha512-gAmrUZSGtKc3AiBL71iNWxDsyUC5uMaKKGdvzYsBoTW/xi42JQHl7eKV2OYzCUqvc+D2RCcf7EXY2iCyFIk6og=="], + + "@cloudflare/kv-asset-handler": ["@cloudflare/kv-asset-handler@0.4.1", "", { "dependencies": { "mime": "^3.0.0" } }, "sha512-Nu8ahitGFFJztxUml9oD/DLb7Z28C8cd8F46IVQ7y5Btz575pvMY8AqZsXkX7Gds29eCKdMgIHjIvzskHgPSFg=="], + + "@codemirror/autocomplete": ["@codemirror/autocomplete@6.20.0", "", { "dependencies": { "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.17.0", "@lezer/common": "^1.0.0" } }, "sha512-bOwvTOIJcG5FVo5gUUupiwYh8MioPLQ4UcqbcRf7UQ98X90tCa9E1kZ3Z7tqwpZxYyOvh1YTYbmZE9RTfTp5hg=="], + + "@codemirror/commands": ["@codemirror/commands@6.10.2", "", { "dependencies": { "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.4.0", "@codemirror/view": "^6.27.0", "@lezer/common": "^1.1.0" } }, "sha512-vvX1fsih9HledO1c9zdotZYUZnE4xV0m6i3m25s5DIfXofuprk6cRcLUZvSk3CASUbwjQX21tOGbkY2BH8TpnQ=="], + + "@codemirror/lang-css": ["@codemirror/lang-css@6.3.1", "", { "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.0.0", "@lezer/common": "^1.0.2", "@lezer/css": "^1.1.7" } }, "sha512-kr5fwBGiGtmz6l0LSJIbno9QrifNMUusivHbnA1H6Dmqy4HZFte3UAICix1VuKo0lMPKQr2rqB+0BkKi/S3Ejg=="], + + "@codemirror/lang-html": ["@codemirror/lang-html@6.4.11", "", { "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/lang-css": "^6.0.0", "@codemirror/lang-javascript": "^6.0.0", "@codemirror/language": "^6.4.0", "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.17.0", "@lezer/common": "^1.0.0", "@lezer/css": "^1.1.0", "@lezer/html": "^1.3.12" } }, "sha512-9NsXp7Nwp891pQchI7gPdTwBuSuT3K65NGTHWHNJ55HjYcHLllr0rbIZNdOzas9ztc1EUVBlHou85FFZS4BNnw=="], + + "@codemirror/lang-javascript": ["@codemirror/lang-javascript@6.2.4", "", { "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/language": "^6.6.0", "@codemirror/lint": "^6.0.0", "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.17.0", "@lezer/common": "^1.0.0", "@lezer/javascript": "^1.0.0" } }, "sha512-0WVmhp1QOqZ4Rt6GlVGwKJN3KW7Xh4H2q8ZZNGZaP6lRdxXJzmjm4FqvmOojVj6khWJHIb9sp7U/72W7xQgqAA=="], + + "@codemirror/lang-json": ["@codemirror/lang-json@6.0.2", "", { "dependencies": { "@codemirror/language": "^6.0.0", "@lezer/json": "^1.0.0" } }, "sha512-x2OtO+AvwEHrEwR0FyyPtfDUiloG3rnVTSZV1W8UteaLL8/MajQd8DpvUb2YVzC+/T18aSDv0H9mu+xw0EStoQ=="], + + "@codemirror/language": ["@codemirror/language@6.12.1", "", { "dependencies": { "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.23.0", "@lezer/common": "^1.5.0", "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.0.0", "style-mod": "^4.0.0" } }, "sha512-Fa6xkSiuGKc8XC8Cn96T+TQHYj4ZZ7RdFmXA3i9xe/3hLHfwPZdM+dqfX0Cp0zQklBKhVD8Yzc8LS45rkqcwpQ=="], + + "@codemirror/lint": ["@codemirror/lint@6.9.3", "", { "dependencies": { "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.35.0", "crelt": "^1.0.5" } }, "sha512-y3YkYhdnhjDBAe0VIA0c4wVoFOvnp8CnAvfLqi0TqotIv92wIlAAP7HELOpLBsKwjAX6W92rSflA6an/2zBvXw=="], + + "@codemirror/search": ["@codemirror/search@6.6.0", "", { "dependencies": { "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.37.0", "crelt": "^1.0.5" } }, "sha512-koFuNXcDvyyotWcgOnZGmY7LZqEOXZaaxD/j6n18TCLx2/9HieZJ5H6hs1g8FiRxBD0DNfs0nXn17g872RmYdw=="], + + "@codemirror/state": ["@codemirror/state@6.5.4", "", { "dependencies": { "@marijn/find-cluster-break": "^1.0.0" } }, "sha512-8y7xqG/hpB53l25CIoit9/ngxdfoG+fx+V3SHBrinnhOtLvKHRyAJJuHzkWrR4YXXLX8eXBsejgAAxHUOdW1yw=="], + + "@codemirror/theme-one-dark": ["@codemirror/theme-one-dark@6.1.3", "", { "dependencies": { "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.0.0", "@lezer/highlight": "^1.0.0" } }, "sha512-NzBdIvEJmx6fjeremiGp3t/okrLPYT0d9orIc7AFun8oZcRk58aejkqhv6spnz4MLAevrKNPMQYXEWMg4s+sKA=="], + + "@codemirror/view": ["@codemirror/view@6.39.13", "", { "dependencies": { "@codemirror/state": "^6.5.0", "crelt": "^1.0.6", "style-mod": "^4.1.0", "w3c-keyname": "^2.2.4" } }, "sha512-QBO8ZsgJLCbI28KdY0/oDy5NQLqOQVZCozBknxc2/7L98V+TVYFHnfaCsnGh1U+alpd2LOkStVwYY7nW2R1xbw=="], + + "@dotenvx/dotenvx": ["@dotenvx/dotenvx@1.52.0", "", { "dependencies": { "commander": "^11.1.0", "dotenv": "^17.2.1", "eciesjs": "^0.4.10", "execa": "^5.1.1", "fdir": "^6.2.0", "ignore": "^5.3.0", "object-treeify": "1.1.33", "picomatch": "^4.0.2", "which": "^4.0.0" }, "bin": { "dotenvx": "src/cli/dotenvx.js" } }, "sha512-CaQcc8JvtzQhUSm9877b6V4Tb7HCotkcyud9X2YwdqtQKwgljkMRwU96fVYKnzN3V0Hj74oP7Es+vZ0mS+Aa1w=="], + + "@ecies/ciphers": ["@ecies/ciphers@0.2.5", "", { "peerDependencies": { "@noble/ciphers": "^1.0.0" } }, "sha512-GalEZH4JgOMHYYcYmVqnFirFsjZHeoGMDt9IxEnM9F7GRUUyUksJ7Ou53L83WHJq3RWKD3AcBpo0iQh0oMpf8A=="], + + "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.25.12", "", { "os": "aix", "cpu": "ppc64" }, "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA=="], + + "@esbuild/android-arm": ["@esbuild/android-arm@0.25.12", "", { "os": "android", "cpu": "arm" }, "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg=="], + + "@esbuild/android-arm64": ["@esbuild/android-arm64@0.25.12", "", { "os": "android", "cpu": "arm64" }, "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg=="], + + "@esbuild/android-x64": ["@esbuild/android-x64@0.25.12", "", { "os": "android", "cpu": "x64" }, "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg=="], + + "@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.25.12", "", { "os": "darwin", "cpu": "arm64" }, "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg=="], + + "@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.25.12", "", { "os": "darwin", "cpu": "x64" }, "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA=="], + + "@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.25.12", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg=="], + + "@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.25.12", "", { "os": "freebsd", "cpu": "x64" }, "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ=="], + + "@esbuild/linux-arm": ["@esbuild/linux-arm@0.25.12", "", { "os": "linux", "cpu": "arm" }, "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw=="], + + "@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.25.12", "", { "os": "linux", "cpu": "arm64" }, "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ=="], + + "@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.25.12", "", { "os": "linux", "cpu": "ia32" }, "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA=="], + + "@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.25.12", "", { "os": "linux", "cpu": "none" }, "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng=="], + + "@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.25.12", "", { "os": "linux", "cpu": "none" }, "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw=="], + + "@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.25.12", "", { "os": "linux", "cpu": "ppc64" }, "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA=="], + + "@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.25.12", "", { "os": "linux", "cpu": "none" }, "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w=="], + + "@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.25.12", "", { "os": "linux", "cpu": "s390x" }, "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg=="], + + "@esbuild/linux-x64": ["@esbuild/linux-x64@0.25.12", "", { "os": "linux", "cpu": "x64" }, "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw=="], + + "@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.25.12", "", { "os": "none", "cpu": "arm64" }, "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg=="], + + "@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.25.12", "", { "os": "none", "cpu": "x64" }, "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ=="], + + "@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.25.12", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A=="], + + "@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.25.12", "", { "os": "openbsd", "cpu": "x64" }, "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw=="], + + "@esbuild/openharmony-arm64": ["@esbuild/openharmony-arm64@0.25.12", "", { "os": "none", "cpu": "arm64" }, "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg=="], + + "@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.25.12", "", { "os": "sunos", "cpu": "x64" }, "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w=="], + + "@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.25.12", "", { "os": "win32", "cpu": "arm64" }, "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg=="], + + "@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.25.12", "", { "os": "win32", "cpu": "ia32" }, "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ=="], + + "@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.12", "", { "os": "win32", "cpu": "x64" }, "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA=="], + + "@floating-ui/core": ["@floating-ui/core@1.7.4", "", { "dependencies": { "@floating-ui/utils": "^0.2.10" } }, "sha512-C3HlIdsBxszvm5McXlB8PeOEWfBhcGBTZGkGlWc2U0KFY5IwG5OQEuQ8rq52DZmcHDlPLd+YFBK+cZcytwIFWg=="], + + "@floating-ui/dom": ["@floating-ui/dom@1.7.5", "", { "dependencies": { "@floating-ui/core": "^1.7.4", "@floating-ui/utils": "^0.2.10" } }, "sha512-N0bD2kIPInNHUHehXhMke1rBGs1dwqvC9O9KYMyyjK7iXt7GAhnro7UlcuYcGdS/yYOlq0MAVgrow8IbWJwyqg=="], + + "@floating-ui/react": ["@floating-ui/react@0.26.28", "", { "dependencies": { "@floating-ui/react-dom": "^2.1.2", "@floating-ui/utils": "^0.2.8", "tabbable": "^6.0.0" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-yORQuuAtVpiRjpMhdc0wJj06b9JFjrYF4qp96j++v2NBpbi6SEGF7donUJ3TMieerQ6qVkAv1tgr7L4r5roTqw=="], + + "@floating-ui/react-dom": ["@floating-ui/react-dom@2.1.7", "", { "dependencies": { "@floating-ui/dom": "^1.7.5" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-0tLRojf/1Go2JgEVm+3Frg9A3IW8bJgKgdO0BN5RkF//ufuz2joZM63Npau2ff3J6lUVYgDSNzNkR+aH3IVfjg=="], + + "@floating-ui/utils": ["@floating-ui/utils@0.2.10", "", {}, "sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ=="], + + "@fontsource/barlow-condensed": ["@fontsource/barlow-condensed@5.2.8", "", {}, "sha512-cmCWNfh7oCmfarGDlhiJRkl4HOgt9aOqki7IYtDOaI3qLCeEO/8VjiZeAx/2PEPf4K36YxXDjAlOWwW/anQUZA=="], + + "@hello-pangea/dnd": ["@hello-pangea/dnd@18.0.1", "", { "dependencies": { "@babel/runtime": "^7.26.7", "css-box-model": "^1.2.1", "raf-schd": "^4.0.3", "react-redux": "^9.2.0", "redux": "^5.0.1" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" } }, "sha512-xojVWG8s/TGrKT1fC8K2tIWeejJYTAeJuj36zM//yEm/ZrnZUSFGS15BpO+jGZT1ybWvyXmeDJwPYb4dhWlbZQ=="], + + "@hono/node-server": ["@hono/node-server@1.19.9", "", { "peerDependencies": { "hono": "^4" } }, "sha512-vHL6w3ecZsky+8P5MD+eFfaGTyCeOHUIFYMGpQGbrBTSmNNoxv0if69rEZ5giu36weC5saFuznL411gRX7bJDw=="], + + "@hono/swagger-ui": ["@hono/swagger-ui@0.5.3", "", { "peerDependencies": { "hono": ">=4.0.0" } }, "sha512-Hn90DOOJ62ICJQplQvCDVpi9Jcn6EhtRaiffyJIS53wA5RmRLtMCDQGVc0bor8vQD7JIwpkweWjs+3cycp+IvA=="], + + "@inquirer/ansi": ["@inquirer/ansi@1.0.2", "", {}, "sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ=="], + + "@inquirer/confirm": ["@inquirer/confirm@5.1.21", "", { "dependencies": { "@inquirer/core": "^10.3.2", "@inquirer/type": "^3.0.10" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-KR8edRkIsUayMXV+o3Gv+q4jlhENF9nMYUZs9PA2HzrXeHI8M5uDag70U7RJn9yyiMZSbtF5/UexBtAVtZGSbQ=="], + + "@inquirer/core": ["@inquirer/core@10.3.2", "", { "dependencies": { "@inquirer/ansi": "^1.0.2", "@inquirer/figures": "^1.0.15", "@inquirer/type": "^3.0.10", "cli-width": "^4.1.0", "mute-stream": "^2.0.0", "signal-exit": "^4.1.0", "wrap-ansi": "^6.2.0", "yoctocolors-cjs": "^2.1.3" }, "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-43RTuEbfP8MbKzedNqBrlhhNKVwoK//vUFNW3Q3vZ88BLcrs4kYpGg+B2mm5p2K/HfygoCxuKwJJiv8PbGmE0A=="], + + "@inquirer/figures": ["@inquirer/figures@1.0.15", "", {}, "sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g=="], + + "@inquirer/type": ["@inquirer/type@3.0.10", "", { "peerDependencies": { "@types/node": ">=18" }, "optionalPeers": ["@types/node"] }, "sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA=="], + + "@ioredis/commands": ["@ioredis/commands@1.5.1", "", {}, "sha512-JH8ZL/ywcJyR9MmJ5BNqZllXNZQqQbnVZOqpPQqE1vHiFgAw4NHbvE0FOduNU8IX9babitBT46571OnPTT0Zcw=="], + + "@isaacs/cliui": ["@isaacs/cliui@8.0.2", "", { "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", "strip-ansi": "^7.0.1", "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", "wrap-ansi": "^8.1.0", "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" } }, "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA=="], + + "@isaacs/fs-minipass": ["@isaacs/fs-minipass@4.0.1", "", { "dependencies": { "minipass": "^7.0.4" } }, "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w=="], + + "@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.13", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA=="], + + "@jridgewell/remapping": ["@jridgewell/remapping@2.3.5", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ=="], + + "@jridgewell/resolve-uri": ["@jridgewell/resolve-uri@3.1.2", "", {}, "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw=="], + + "@jridgewell/source-map": ["@jridgewell/source-map@0.3.11", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25" } }, "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA=="], + + "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.5", "", {}, "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og=="], + + "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.31", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="], + + "@lezer/common": ["@lezer/common@1.5.1", "", {}, "sha512-6YRVG9vBkaY7p1IVxL4s44n5nUnaNnGM2/AckNgYOnxTG2kWh1vR8BMxPseWPjRNpb5VtXnMpeYAEAADoRV1Iw=="], + + "@lezer/css": ["@lezer/css@1.3.0", "", { "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.3.0" } }, "sha512-pBL7hup88KbI7hXnZV3PQsn43DHy6TWyzuyk2AO9UyoXcDltvIdqWKE1dLL/45JVZ+YZkHe1WVHqO6wugZZWcw=="], + + "@lezer/highlight": ["@lezer/highlight@1.2.3", "", { "dependencies": { "@lezer/common": "^1.3.0" } }, "sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g=="], + + "@lezer/html": ["@lezer/html@1.3.13", "", { "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.0.0" } }, "sha512-oI7n6NJml729m7pjm9lvLvmXbdoMoi2f+1pwSDJkl9d68zGr7a9Btz8NdHTGQZtW2DA25ybeuv/SyDb9D5tseg=="], + + "@lezer/javascript": ["@lezer/javascript@1.5.4", "", { "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.1.3", "@lezer/lr": "^1.3.0" } }, "sha512-vvYx3MhWqeZtGPwDStM2dwgljd5smolYD2lR2UyFcHfxbBQebqx8yjmFmxtJ/E6nN6u1D9srOiVWm3Rb4tmcUA=="], + + "@lezer/json": ["@lezer/json@1.0.3", "", { "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.0.0", "@lezer/lr": "^1.0.0" } }, "sha512-BP9KzdF9Y35PDpv04r0VeSTKDeox5vVr3efE7eBbx3r4s3oNLfunchejZhjArmeieBH+nVOpgIiBJpEAv8ilqQ=="], + + "@lezer/lr": ["@lezer/lr@1.4.8", "", { "dependencies": { "@lezer/common": "^1.0.0" } }, "sha512-bPWa0Pgx69ylNlMlPvBPryqeLYQjyJjqPx+Aupm5zydLIF3NE+6MMLT8Yi23Bd9cif9VS00aUebn+6fDIGBcDA=="], + + "@mantine/core": ["@mantine/core@7.17.8", "", { "dependencies": { "@floating-ui/react": "^0.26.28", "clsx": "^2.1.1", "react-number-format": "^5.4.3", "react-remove-scroll": "^2.6.2", "react-textarea-autosize": "8.5.9", "type-fest": "^4.27.0" }, "peerDependencies": { "@mantine/hooks": "7.17.8", "react": "^18.x || ^19.x", "react-dom": "^18.x || ^19.x" } }, "sha512-42sfdLZSCpsCYmLCjSuntuPcDg3PLbakSmmYfz5Auea8gZYLr+8SS5k647doVu0BRAecqYOytkX2QC5/u/8VHw=="], + + "@mantine/hooks": ["@mantine/hooks@7.17.8", "", { "peerDependencies": { "react": "^18.x || ^19.x" } }, "sha512-96qygbkTjRhdkzd5HDU8fMziemN/h758/EwrFu7TlWrEP10Vw076u+Ap/sG6OT4RGPZYYoHrTlT+mkCZblWHuw=="], + + "@mapbox/node-pre-gyp": ["@mapbox/node-pre-gyp@2.0.3", "", { "dependencies": { "consola": "^3.2.3", "detect-libc": "^2.0.0", "https-proxy-agent": "^7.0.5", "node-fetch": "^2.6.7", "nopt": "^8.0.0", "semver": "^7.5.3", "tar": "^7.4.0" }, "bin": { "node-pre-gyp": "bin/node-pre-gyp" } }, "sha512-uwPAhccfFJlsfCxMYTwOdVfOz3xqyj8xYL3zJj8f0pb30tLohnnFPhLuqp4/qoEz8sNxe4SESZedcBojRefIzg=="], + + "@marijn/find-cluster-break": ["@marijn/find-cluster-break@1.0.2", "", {}, "sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g=="], + + "@modelcontextprotocol/sdk": ["@modelcontextprotocol/sdk@1.26.0", "", { "dependencies": { "@hono/node-server": "^1.19.9", "ajv": "^8.17.1", "ajv-formats": "^3.0.1", "content-type": "^1.0.5", "cors": "^2.8.5", "cross-spawn": "^7.0.5", "eventsource": "^3.0.2", "eventsource-parser": "^3.0.0", "express": "^5.2.1", "express-rate-limit": "^8.2.1", "hono": "^4.11.4", "jose": "^6.1.3", "json-schema-typed": "^8.0.2", "pkce-challenge": "^5.0.0", "raw-body": "^3.0.0", "zod": "^3.25 || ^4.0", "zod-to-json-schema": "^3.25.1" }, "peerDependencies": { "@cfworker/json-schema": "^4.1.1" }, "optionalPeers": ["@cfworker/json-schema"] }, "sha512-Y5RmPncpiDtTXDbLKswIJzTqu2hyBKxTNsgKqKclDbhIgg1wgtf1fRuvxgTnRfcnxtvvgbIEcqUOzZrJ6iSReg=="], + + "@mswjs/interceptors": ["@mswjs/interceptors@0.41.3", "", { "dependencies": { "@open-draft/deferred-promise": "^2.2.0", "@open-draft/logger": "^0.3.0", "@open-draft/until": "^2.0.0", "is-node-process": "^1.2.0", "outvariant": "^1.4.3", "strict-event-emitter": "^0.5.1" } }, "sha512-cXu86tF4VQVfwz8W1SPbhoRyHJkti6mjH/XJIxp40jhO4j2k1m4KYrEykxqWPkFF3vrK4rgQppBh//AwyGSXPA=="], + + "@noble/ciphers": ["@noble/ciphers@1.3.0", "", {}, "sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw=="], + + "@noble/curves": ["@noble/curves@1.9.7", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw=="], + + "@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], + + "@nodelib/fs.scandir": ["@nodelib/fs.scandir@2.1.5", "", { "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" } }, "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g=="], + + "@nodelib/fs.stat": ["@nodelib/fs.stat@2.0.5", "", {}, "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A=="], + + "@nodelib/fs.walk": ["@nodelib/fs.walk@1.2.8", "", { "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" } }, "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg=="], + + "@open-draft/deferred-promise": ["@open-draft/deferred-promise@2.2.0", "", {}, "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA=="], + + "@open-draft/logger": ["@open-draft/logger@0.3.0", "", { "dependencies": { "is-node-process": "^1.2.0", "outvariant": "^1.4.0" } }, "sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ=="], + + "@open-draft/until": ["@open-draft/until@2.1.0", "", {}, "sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg=="], + + "@parcel/watcher": ["@parcel/watcher@2.5.1", "", { "dependencies": { "detect-libc": "^1.0.3", "is-glob": "^4.0.3", "micromatch": "^4.0.5", "node-addon-api": "^7.0.0" }, "optionalDependencies": { "@parcel/watcher-android-arm64": "2.5.1", "@parcel/watcher-darwin-arm64": "2.5.1", "@parcel/watcher-darwin-x64": "2.5.1", "@parcel/watcher-freebsd-x64": "2.5.1", "@parcel/watcher-linux-arm-glibc": "2.5.1", "@parcel/watcher-linux-arm-musl": "2.5.1", "@parcel/watcher-linux-arm64-glibc": "2.5.1", "@parcel/watcher-linux-arm64-musl": "2.5.1", "@parcel/watcher-linux-x64-glibc": "2.5.1", "@parcel/watcher-linux-x64-musl": "2.5.1", "@parcel/watcher-win32-arm64": "2.5.1", "@parcel/watcher-win32-ia32": "2.5.1", "@parcel/watcher-win32-x64": "2.5.1" } }, "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg=="], + + "@parcel/watcher-android-arm64": ["@parcel/watcher-android-arm64@2.5.1", "", { "os": "android", "cpu": "arm64" }, "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA=="], + + "@parcel/watcher-darwin-arm64": ["@parcel/watcher-darwin-arm64@2.5.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw=="], + + "@parcel/watcher-darwin-x64": ["@parcel/watcher-darwin-x64@2.5.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg=="], + + "@parcel/watcher-freebsd-x64": ["@parcel/watcher-freebsd-x64@2.5.1", "", { "os": "freebsd", "cpu": "x64" }, "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ=="], + + "@parcel/watcher-linux-arm-glibc": ["@parcel/watcher-linux-arm-glibc@2.5.1", "", { "os": "linux", "cpu": "arm" }, "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA=="], + + "@parcel/watcher-linux-arm-musl": ["@parcel/watcher-linux-arm-musl@2.5.1", "", { "os": "linux", "cpu": "arm" }, "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q=="], + + "@parcel/watcher-linux-arm64-glibc": ["@parcel/watcher-linux-arm64-glibc@2.5.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w=="], + + "@parcel/watcher-linux-arm64-musl": ["@parcel/watcher-linux-arm64-musl@2.5.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg=="], + + "@parcel/watcher-linux-x64-glibc": ["@parcel/watcher-linux-x64-glibc@2.5.1", "", { "os": "linux", "cpu": "x64" }, "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A=="], + + "@parcel/watcher-linux-x64-musl": ["@parcel/watcher-linux-x64-musl@2.5.1", "", { "os": "linux", "cpu": "x64" }, "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg=="], + + "@parcel/watcher-wasm": ["@parcel/watcher-wasm@2.5.1", "", { "dependencies": { "is-glob": "^4.0.3", "micromatch": "^4.0.5", "napi-wasm": "^1.1.0" } }, "sha512-RJxlQQLkaMMIuWRozy+z2vEqbaQlCuaCgVZIUCzQLYggY22LZbP5Y1+ia+FD724Ids9e+XIyOLXLrLgQSHIthw=="], + + "@parcel/watcher-win32-arm64": ["@parcel/watcher-win32-arm64@2.5.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw=="], + + "@parcel/watcher-win32-ia32": ["@parcel/watcher-win32-ia32@2.5.1", "", { "os": "win32", "cpu": "ia32" }, "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ=="], + + "@parcel/watcher-win32-x64": ["@parcel/watcher-win32-x64@2.5.1", "", { "os": "win32", "cpu": "x64" }, "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA=="], + + "@pkgjs/parseargs": ["@pkgjs/parseargs@0.11.0", "", {}, "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg=="], + + "@poppinss/colors": ["@poppinss/colors@4.1.6", "", { "dependencies": { "kleur": "^4.1.5" } }, "sha512-H9xkIdFswbS8n1d6vmRd8+c10t2Qe+rZITbbDHHkQixH5+2x1FDGmi/0K+WgWiqQFKPSlIYB7jlH6Kpfn6Fleg=="], + + "@poppinss/dumper": ["@poppinss/dumper@0.6.5", "", { "dependencies": { "@poppinss/colors": "^4.1.5", "@sindresorhus/is": "^7.0.2", "supports-color": "^10.0.0" } }, "sha512-NBdYIb90J7LfOI32dOewKI1r7wnkiH6m920puQ3qHUeZkxNkQiFnXVWoE6YtFSv6QOiPPf7ys6i+HWWecDz7sw=="], + + "@poppinss/exception": ["@poppinss/exception@1.2.3", "", {}, "sha512-dCED+QRChTVatE9ibtoaxc+WkdzOSjYTKi/+uacHWIsfodVfpsueo3+DKpgU5Px8qXjgmXkSvhXvSCz3fnP9lw=="], + + "@radix-ui/number": ["@radix-ui/number@1.1.1", "", {}, "sha512-MkKCwxlXTgz6CFoJx3pCwn07GKp36+aZyu/u2Ln2VrA5DcdyCZkASEDBTd8x5whTQQL5CiYf4prXKLcgQdv29g=="], + + "@radix-ui/primitive": ["@radix-ui/primitive@1.1.3", "", {}, "sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg=="], + + "@radix-ui/react-accessible-icon": ["@radix-ui/react-accessible-icon@1.1.7", "", { "dependencies": { "@radix-ui/react-visually-hidden": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-XM+E4WXl0OqUJFovy6GjmxxFyx9opfCAIUku4dlKRd5YEPqt4kALOkQOp0Of6reHuUkJuiPBEc5k0o4z4lTC8A=="], + + "@radix-ui/react-accordion": ["@radix-ui/react-accordion@1.2.12", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-collapsible": "1.1.12", "@radix-ui/react-collection": "1.1.7", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-direction": "1.1.1", "@radix-ui/react-id": "1.1.1", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-controllable-state": "1.2.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-T4nygeh9YE9dLRPhAHSeOZi7HBXo+0kYIPJXayZfvWOWA0+n3dESrZbjfDPUABkUNym6Hd+f2IR113To8D2GPA=="], + + "@radix-ui/react-alert-dialog": ["@radix-ui/react-alert-dialog@1.1.15", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-dialog": "1.1.15", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-oTVLkEw5GpdRe29BqJ0LSDFWI3qu0vR1M0mUkOQWDIUnY/QIkLpgDMWuKxP94c2NAC2LGcgVhG1ImF3jkZ5wXw=="], + + "@radix-ui/react-arrow": ["@radix-ui/react-arrow@1.1.7", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-F+M1tLhO+mlQaOWspE8Wstg+z6PwxwRd8oQ8IXceWz92kfAmalTRf0EjrouQeo7QssEPfCn05B4Ihs1K9WQ/7w=="], + + "@radix-ui/react-aspect-ratio": ["@radix-ui/react-aspect-ratio@1.1.7", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-Yq6lvO9HQyPwev1onK1daHCHqXVLzPhSVjmsNjCa2Zcxy2f7uJD2itDtxknv6FzAKCwD1qQkeVDmX/cev13n/g=="], + + "@radix-ui/react-avatar": ["@radix-ui/react-avatar@1.1.10", "", { "dependencies": { "@radix-ui/react-context": "1.1.2", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-callback-ref": "1.1.1", "@radix-ui/react-use-is-hydrated": "0.1.0", "@radix-ui/react-use-layout-effect": "1.1.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-V8piFfWapM5OmNCXTzVQY+E1rDa53zY+MQ4Y7356v4fFz6vqCyUtIz2rUD44ZEdwg78/jKmMJHj07+C/Z/rcog=="], + + "@radix-ui/react-checkbox": ["@radix-ui/react-checkbox@1.3.3", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-presence": "1.1.5", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-controllable-state": "1.2.2", "@radix-ui/react-use-previous": "1.1.1", "@radix-ui/react-use-size": "1.1.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-wBbpv+NQftHDdG86Qc0pIyXk5IR3tM8Vd0nWLKDcX8nNn4nXFOFwsKuqw2okA/1D/mpaAkmuyndrPJTYDNZtFw=="], + + "@radix-ui/react-collapsible": ["@radix-ui/react-collapsible@1.1.12", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-id": "1.1.1", "@radix-ui/react-presence": "1.1.5", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-controllable-state": "1.2.2", "@radix-ui/react-use-layout-effect": "1.1.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-Uu+mSh4agx2ib1uIGPP4/CKNULyajb3p92LsVXmH2EHVMTfZWpll88XJ0j4W0z3f8NK1eYl1+Mf/szHPmcHzyA=="], + + "@radix-ui/react-collection": ["@radix-ui/react-collection@1.1.7", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-Fh9rGN0MoI4ZFUNyfFVNU4y9LUz93u9/0K+yLgA2bwRojxM8JU1DyvvMBabnZPBgMWREAJvU2jjVzq+LrFUglw=="], + + "@radix-ui/react-compose-refs": ["@radix-ui/react-compose-refs@1.1.2", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg=="], + + "@radix-ui/react-context": ["@radix-ui/react-context@1.1.2", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-jCi/QKUM2r1Ju5a3J64TH2A5SpKAgh0LpknyqdQ4m6DCV0xJ2HG1xARRwNGPQfi1SLdLWZ1OJz6F4OMBBNiGJA=="], + + "@radix-ui/react-context-menu": ["@radix-ui/react-context-menu@2.2.16", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-menu": "2.1.16", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-callback-ref": "1.1.1", "@radix-ui/react-use-controllable-state": "1.2.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-O8morBEW+HsVG28gYDZPTrT9UUovQUlJue5YO836tiTJhuIWBm/zQHc7j388sHWtdH/xUZurK9olD2+pcqx5ww=="], + + "@radix-ui/react-dialog": ["@radix-ui/react-dialog@1.1.15", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-dismissable-layer": "1.1.11", "@radix-ui/react-focus-guards": "1.1.3", "@radix-ui/react-focus-scope": "1.1.7", "@radix-ui/react-id": "1.1.1", "@radix-ui/react-portal": "1.1.9", "@radix-ui/react-presence": "1.1.5", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-slot": "1.2.3", "@radix-ui/react-use-controllable-state": "1.2.2", "aria-hidden": "^1.2.4", "react-remove-scroll": "^2.6.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-TCglVRtzlffRNxRMEyR36DGBLJpeusFcgMVD9PZEzAKnUs1lKCgX5u9BmC2Yg+LL9MgZDugFFs1Vl+Jp4t/PGw=="], + + "@radix-ui/react-direction": ["@radix-ui/react-direction@1.1.1", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-1UEWRX6jnOA2y4H5WczZ44gOOjTEmlqv1uNW4GAJEO5+bauCBhv8snY65Iw5/VOS/ghKN9gr2KjnLKxrsvoMVw=="], + + "@radix-ui/react-dismissable-layer": ["@radix-ui/react-dismissable-layer@1.1.11", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-callback-ref": "1.1.1", "@radix-ui/react-use-escape-keydown": "1.1.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-Nqcp+t5cTB8BinFkZgXiMJniQH0PsUt2k51FUhbdfeKvc4ACcG2uQniY/8+h1Yv6Kza4Q7lD7PQV0z0oicE0Mg=="], + + "@radix-ui/react-dropdown-menu": ["@radix-ui/react-dropdown-menu@2.1.16", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-id": "1.1.1", "@radix-ui/react-menu": "2.1.16", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-controllable-state": "1.2.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-1PLGQEynI/3OX/ftV54COn+3Sud/Mn8vALg2rWnBLnRaGtJDduNW/22XjlGgPdpcIbiQxjKtb7BkcjP00nqfJw=="], + + "@radix-ui/react-focus-guards": ["@radix-ui/react-focus-guards@1.1.3", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-0rFg/Rj2Q62NCm62jZw0QX7a3sz6QCQU0LpZdNrJX8byRGaGVTqbrW9jAoIAHyMQqsNpeZ81YgSizOt5WXq0Pw=="], + + "@radix-ui/react-focus-scope": ["@radix-ui/react-focus-scope@1.1.7", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-callback-ref": "1.1.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-t2ODlkXBQyn7jkl6TNaw/MtVEVvIGelJDCG41Okq/KwUsJBwQ4XVZsHAVUkK4mBv3ewiAS3PGuUWuY2BoK4ZUw=="], + + "@radix-ui/react-form": ["@radix-ui/react-form@0.1.8", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-id": "1.1.1", "@radix-ui/react-label": "2.1.7", "@radix-ui/react-primitive": "2.1.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-QM70k4Zwjttifr5a4sZFts9fn8FzHYvQ5PiB19O2HsYibaHSVt9fH9rzB0XZo/YcM+b7t/p7lYCT/F5eOeF5yQ=="], + + "@radix-ui/react-hover-card": ["@radix-ui/react-hover-card@1.1.15", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-dismissable-layer": "1.1.11", "@radix-ui/react-popper": "1.2.8", "@radix-ui/react-portal": "1.1.9", "@radix-ui/react-presence": "1.1.5", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-controllable-state": "1.2.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-qgTkjNT1CfKMoP0rcasmlH2r1DAiYicWsDsufxl940sT2wHNEWWv6FMWIQXWhVdmC1d/HYfbhQx60KYyAtKxjg=="], + + "@radix-ui/react-id": ["@radix-ui/react-id@1.1.1", "", { "dependencies": { "@radix-ui/react-use-layout-effect": "1.1.1" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-kGkGegYIdQsOb4XjsfM97rXsiHaBwco+hFI66oO4s9LU+PLAC5oJ7khdOVFxkhsmlbpUqDAvXw11CluXP+jkHg=="], + + "@radix-ui/react-label": ["@radix-ui/react-label@2.1.7", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-YT1GqPSL8kJn20djelMX7/cTRp/Y9w5IZHvfxQTVHrOqa2yMl7i/UfMqKRU5V7mEyKTrUVgJXhNQPVCG8PBLoQ=="], + + "@radix-ui/react-menu": ["@radix-ui/react-menu@2.1.16", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-collection": "1.1.7", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-direction": "1.1.1", "@radix-ui/react-dismissable-layer": "1.1.11", "@radix-ui/react-focus-guards": "1.1.3", "@radix-ui/react-focus-scope": "1.1.7", "@radix-ui/react-id": "1.1.1", "@radix-ui/react-popper": "1.2.8", "@radix-ui/react-portal": "1.1.9", "@radix-ui/react-presence": "1.1.5", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-roving-focus": "1.1.11", "@radix-ui/react-slot": "1.2.3", "@radix-ui/react-use-callback-ref": "1.1.1", "aria-hidden": "^1.2.4", "react-remove-scroll": "^2.6.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-72F2T+PLlphrqLcAotYPp0uJMr5SjP5SL01wfEspJbru5Zs5vQaSHb4VB3ZMJPimgHHCHG7gMOeOB9H3Hdmtxg=="], + + "@radix-ui/react-menubar": ["@radix-ui/react-menubar@1.1.16", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-collection": "1.1.7", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-direction": "1.1.1", "@radix-ui/react-id": "1.1.1", "@radix-ui/react-menu": "2.1.16", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-roving-focus": "1.1.11", "@radix-ui/react-use-controllable-state": "1.2.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-EB1FktTz5xRRi2Er974AUQZWg2yVBb1yjip38/lgwtCVRd3a+maUoGHN/xs9Yv8SY8QwbSEb+YrxGadVWbEutA=="], + + "@radix-ui/react-navigation-menu": ["@radix-ui/react-navigation-menu@1.2.14", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-collection": "1.1.7", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-direction": "1.1.1", "@radix-ui/react-dismissable-layer": "1.1.11", "@radix-ui/react-id": "1.1.1", "@radix-ui/react-presence": "1.1.5", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-callback-ref": "1.1.1", "@radix-ui/react-use-controllable-state": "1.2.2", "@radix-ui/react-use-layout-effect": "1.1.1", "@radix-ui/react-use-previous": "1.1.1", "@radix-ui/react-visually-hidden": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-YB9mTFQvCOAQMHU+C/jVl96WmuWeltyUEpRJJky51huhds5W2FQr1J8D/16sQlf0ozxkPK8uF3niQMdUwZPv5w=="], + + "@radix-ui/react-one-time-password-field": ["@radix-ui/react-one-time-password-field@0.1.8", "", { "dependencies": { "@radix-ui/number": "1.1.1", "@radix-ui/primitive": "1.1.3", "@radix-ui/react-collection": "1.1.7", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-direction": "1.1.1", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-roving-focus": "1.1.11", "@radix-ui/react-use-controllable-state": "1.2.2", "@radix-ui/react-use-effect-event": "0.0.2", "@radix-ui/react-use-is-hydrated": "0.1.0", "@radix-ui/react-use-layout-effect": "1.1.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-ycS4rbwURavDPVjCb5iS3aG4lURFDILi6sKI/WITUMZ13gMmn/xGjpLoqBAalhJaDk8I3UbCM5GzKHrnzwHbvg=="], + + "@radix-ui/react-password-toggle-field": ["@radix-ui/react-password-toggle-field@0.1.3", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-id": "1.1.1", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-controllable-state": "1.2.2", "@radix-ui/react-use-effect-event": "0.0.2", "@radix-ui/react-use-is-hydrated": "0.1.0" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-/UuCrDBWravcaMix4TdT+qlNdVwOM1Nck9kWx/vafXsdfj1ChfhOdfi3cy9SGBpWgTXwYCuboT/oYpJy3clqfw=="], + + "@radix-ui/react-popover": ["@radix-ui/react-popover@1.1.15", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-dismissable-layer": "1.1.11", "@radix-ui/react-focus-guards": "1.1.3", "@radix-ui/react-focus-scope": "1.1.7", "@radix-ui/react-id": "1.1.1", "@radix-ui/react-popper": "1.2.8", "@radix-ui/react-portal": "1.1.9", "@radix-ui/react-presence": "1.1.5", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-slot": "1.2.3", "@radix-ui/react-use-controllable-state": "1.2.2", "aria-hidden": "^1.2.4", "react-remove-scroll": "^2.6.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-kr0X2+6Yy/vJzLYJUPCZEc8SfQcf+1COFoAqauJm74umQhta9M7lNJHP7QQS3vkvcGLQUbWpMzwrXYwrYztHKA=="], + + "@radix-ui/react-popper": ["@radix-ui/react-popper@1.2.8", "", { "dependencies": { "@floating-ui/react-dom": "^2.0.0", "@radix-ui/react-arrow": "1.1.7", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-callback-ref": "1.1.1", "@radix-ui/react-use-layout-effect": "1.1.1", "@radix-ui/react-use-rect": "1.1.1", "@radix-ui/react-use-size": "1.1.1", "@radix-ui/rect": "1.1.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-0NJQ4LFFUuWkE7Oxf0htBKS6zLkkjBH+hM1uk7Ng705ReR8m/uelduy1DBo0PyBXPKVnBA6YBlU94MBGXrSBCw=="], + + "@radix-ui/react-portal": ["@radix-ui/react-portal@1.1.9", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-layout-effect": "1.1.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-bpIxvq03if6UNwXZ+HTK71JLh4APvnXntDc6XOX8UVq4XQOVl7lwok0AvIl+b8zgCw3fSaVTZMpAPPagXbKmHQ=="], + + "@radix-ui/react-presence": ["@radix-ui/react-presence@1.1.5", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-use-layout-effect": "1.1.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-/jfEwNDdQVBCNvjkGit4h6pMOzq8bHkopq458dPt2lMjx+eBQUohZNG9A7DtO/O5ukSbxuaNGXMjHicgwy6rQQ=="], + + "@radix-ui/react-primitive": ["@radix-ui/react-primitive@2.1.3", "", { "dependencies": { "@radix-ui/react-slot": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ=="], + + "@radix-ui/react-progress": ["@radix-ui/react-progress@1.1.7", "", { "dependencies": { "@radix-ui/react-context": "1.1.2", "@radix-ui/react-primitive": "2.1.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-vPdg/tF6YC/ynuBIJlk1mm7Le0VgW6ub6J2UWnTQ7/D23KXcPI1qy+0vBkgKgd38RCMJavBXpB83HPNFMTb0Fg=="], + + "@radix-ui/react-radio-group": ["@radix-ui/react-radio-group@1.3.8", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-direction": "1.1.1", "@radix-ui/react-presence": "1.1.5", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-roving-focus": "1.1.11", "@radix-ui/react-use-controllable-state": "1.2.2", "@radix-ui/react-use-previous": "1.1.1", "@radix-ui/react-use-size": "1.1.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-VBKYIYImA5zsxACdisNQ3BjCBfmbGH3kQlnFVqlWU4tXwjy7cGX8ta80BcrO+WJXIn5iBylEH3K6ZTlee//lgQ=="], + + "@radix-ui/react-roving-focus": ["@radix-ui/react-roving-focus@1.1.11", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-collection": "1.1.7", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-direction": "1.1.1", "@radix-ui/react-id": "1.1.1", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-callback-ref": "1.1.1", "@radix-ui/react-use-controllable-state": "1.2.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-7A6S9jSgm/S+7MdtNDSb+IU859vQqJ/QAtcYQcfFC6W8RS4IxIZDldLR0xqCFZ6DCyrQLjLPsxtTNch5jVA4lA=="], + + "@radix-ui/react-scroll-area": ["@radix-ui/react-scroll-area@1.2.10", "", { "dependencies": { "@radix-ui/number": "1.1.1", "@radix-ui/primitive": "1.1.3", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-direction": "1.1.1", "@radix-ui/react-presence": "1.1.5", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-callback-ref": "1.1.1", "@radix-ui/react-use-layout-effect": "1.1.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-tAXIa1g3sM5CGpVT0uIbUx/U3Gs5N8T52IICuCtObaos1S8fzsrPXG5WObkQN3S6NVl6wKgPhAIiBGbWnvc97A=="], + + "@radix-ui/react-select": ["@radix-ui/react-select@2.2.6", "", { "dependencies": { "@radix-ui/number": "1.1.1", "@radix-ui/primitive": "1.1.3", "@radix-ui/react-collection": "1.1.7", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-direction": "1.1.1", "@radix-ui/react-dismissable-layer": "1.1.11", "@radix-ui/react-focus-guards": "1.1.3", "@radix-ui/react-focus-scope": "1.1.7", "@radix-ui/react-id": "1.1.1", "@radix-ui/react-popper": "1.2.8", "@radix-ui/react-portal": "1.1.9", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-slot": "1.2.3", "@radix-ui/react-use-callback-ref": "1.1.1", "@radix-ui/react-use-controllable-state": "1.2.2", "@radix-ui/react-use-layout-effect": "1.1.1", "@radix-ui/react-use-previous": "1.1.1", "@radix-ui/react-visually-hidden": "1.2.3", "aria-hidden": "^1.2.4", "react-remove-scroll": "^2.6.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-I30RydO+bnn2PQztvo25tswPH+wFBjehVGtmagkU78yMdwTwVf12wnAOF+AeP8S2N8xD+5UPbGhkUfPyvT+mwQ=="], + + "@radix-ui/react-separator": ["@radix-ui/react-separator@1.1.7", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-0HEb8R9E8A+jZjvmFCy/J4xhbXy3TV+9XSnGJ3KvTtjlIUy/YQ/p6UYZvi7YbeoeXdyU9+Y3scizK6hkY37baA=="], + + "@radix-ui/react-slider": ["@radix-ui/react-slider@1.3.6", "", { "dependencies": { "@radix-ui/number": "1.1.1", "@radix-ui/primitive": "1.1.3", "@radix-ui/react-collection": "1.1.7", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-direction": "1.1.1", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-controllable-state": "1.2.2", "@radix-ui/react-use-layout-effect": "1.1.1", "@radix-ui/react-use-previous": "1.1.1", "@radix-ui/react-use-size": "1.1.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-JPYb1GuM1bxfjMRlNLE+BcmBC8onfCi60Blk7OBqi2MLTFdS+8401U4uFjnwkOr49BLmXxLC6JHkvAsx5OJvHw=="], + + "@radix-ui/react-slot": ["@radix-ui/react-slot@1.2.3", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A=="], + + "@radix-ui/react-switch": ["@radix-ui/react-switch@1.2.6", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-controllable-state": "1.2.2", "@radix-ui/react-use-previous": "1.1.1", "@radix-ui/react-use-size": "1.1.1" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-bByzr1+ep1zk4VubeEVViV592vu2lHE2BZY5OnzehZqOOgogN80+mNtCqPkhn2gklJqOpxWgPoYTSnhBCqpOXQ=="], + + "@radix-ui/react-tabs": ["@radix-ui/react-tabs@1.1.13", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-direction": "1.1.1", "@radix-ui/react-id": "1.1.1", "@radix-ui/react-presence": "1.1.5", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-roving-focus": "1.1.11", "@radix-ui/react-use-controllable-state": "1.2.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-7xdcatg7/U+7+Udyoj2zodtI9H/IIopqo+YOIcZOq1nJwXWBZ9p8xiu5llXlekDbZkca79a/fozEYQXIA4sW6A=="], + + "@radix-ui/react-toast": ["@radix-ui/react-toast@1.2.15", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-collection": "1.1.7", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-dismissable-layer": "1.1.11", "@radix-ui/react-portal": "1.1.9", "@radix-ui/react-presence": "1.1.5", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-callback-ref": "1.1.1", "@radix-ui/react-use-controllable-state": "1.2.2", "@radix-ui/react-use-layout-effect": "1.1.1", "@radix-ui/react-visually-hidden": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-3OSz3TacUWy4WtOXV38DggwxoqJK4+eDkNMl5Z/MJZaoUPaP4/9lf81xXMe1I2ReTAptverZUpbPY4wWwWyL5g=="], + + "@radix-ui/react-toggle": ["@radix-ui/react-toggle@1.1.10", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-use-controllable-state": "1.2.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-lS1odchhFTeZv3xwHH31YPObmJn8gOg7Lq12inrr0+BH/l3Tsq32VfjqH1oh80ARM3mlkfMic15n0kg4sD1poQ=="], + + "@radix-ui/react-toggle-group": ["@radix-ui/react-toggle-group@1.1.11", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-direction": "1.1.1", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-roving-focus": "1.1.11", "@radix-ui/react-toggle": "1.1.10", "@radix-ui/react-use-controllable-state": "1.2.2" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-5umnS0T8JQzQT6HbPyO7Hh9dgd82NmS36DQr+X/YJ9ctFNCiiQd6IJAYYZ33LUwm8M+taCz5t2ui29fHZc4Y6Q=="], + + "@radix-ui/react-toolbar": ["@radix-ui/react-toolbar@1.1.11", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-direction": "1.1.1", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-roving-focus": "1.1.11", "@radix-ui/react-separator": "1.1.7", "@radix-ui/react-toggle-group": "1.1.11" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-4ol06/1bLoFu1nwUqzdD4Y5RZ9oDdKeiHIsntug54Hcr1pgaHiPqHFEaXI1IFP/EsOfROQZ8Mig9VTIRza6Tjg=="], + + "@radix-ui/react-tooltip": ["@radix-ui/react-tooltip@1.2.8", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-dismissable-layer": "1.1.11", "@radix-ui/react-id": "1.1.1", "@radix-ui/react-popper": "1.2.8", "@radix-ui/react-portal": "1.1.9", "@radix-ui/react-presence": "1.1.5", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-slot": "1.2.3", "@radix-ui/react-use-controllable-state": "1.2.2", "@radix-ui/react-visually-hidden": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-tY7sVt1yL9ozIxvmbtN5qtmH2krXcBCfjEiCgKGLqunJHvgvZG2Pcl2oQ3kbcZARb1BGEHdkLzcYGO8ynVlieg=="], + + "@radix-ui/react-use-callback-ref": ["@radix-ui/react-use-callback-ref@1.1.1", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-FkBMwD+qbGQeMu1cOHnuGB6x4yzPjho8ap5WtbEJ26umhgqVXbhekKUQO+hZEL1vU92a3wHwdp0HAcqAUF5iDg=="], + + "@radix-ui/react-use-controllable-state": ["@radix-ui/react-use-controllable-state@1.2.2", "", { "dependencies": { "@radix-ui/react-use-effect-event": "0.0.2", "@radix-ui/react-use-layout-effect": "1.1.1" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg=="], + + "@radix-ui/react-use-effect-event": ["@radix-ui/react-use-effect-event@0.0.2", "", { "dependencies": { "@radix-ui/react-use-layout-effect": "1.1.1" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA=="], + + "@radix-ui/react-use-escape-keydown": ["@radix-ui/react-use-escape-keydown@1.1.1", "", { "dependencies": { "@radix-ui/react-use-callback-ref": "1.1.1" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Il0+boE7w/XebUHyBjroE+DbByORGR9KKmITzbR7MyQ4akpORYP/ZmbhAr0DG7RmmBqoOnZdy2QlvajJ2QA59g=="], + + "@radix-ui/react-use-is-hydrated": ["@radix-ui/react-use-is-hydrated@0.1.0", "", { "dependencies": { "use-sync-external-store": "^1.5.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-U+UORVEq+cTnRIaostJv9AGdV3G6Y+zbVd+12e18jQ5A3c0xL03IhnHuiU4UV69wolOQp5GfR58NW/EgdQhwOA=="], + + "@radix-ui/react-use-layout-effect": ["@radix-ui/react-use-layout-effect@1.1.1", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ=="], + + "@radix-ui/react-use-previous": ["@radix-ui/react-use-previous@1.1.1", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-2dHfToCj/pzca2Ck724OZ5L0EVrr3eHRNsG/b3xQJLA2hZpVCS99bLAX+hm1IHXDEnzU6by5z/5MIY794/a8NQ=="], + + "@radix-ui/react-use-rect": ["@radix-ui/react-use-rect@1.1.1", "", { "dependencies": { "@radix-ui/rect": "1.1.1" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-QTYuDesS0VtuHNNvMh+CjlKJ4LJickCMUAqjlE3+j8w+RlRpwyX3apEQKGFzbZGdo7XNG1tXa+bQqIE7HIXT2w=="], + + "@radix-ui/react-use-size": ["@radix-ui/react-use-size@1.1.1", "", { "dependencies": { "@radix-ui/react-use-layout-effect": "1.1.1" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-ewrXRDTAqAXlkl6t/fkXWNAhFX9I+CkKlw6zjEwk86RSPKwZr3xpBRso655aqYafwtnbpHLj6toFzmd6xdVptQ=="], + + "@radix-ui/react-visually-hidden": ["@radix-ui/react-visually-hidden@1.2.3", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-pzJq12tEaaIhqjbzpCuv/OypJY/BPavOofm+dbab+MHLajy277+1lLm6JFcGgF5eskJ6mquGirhXY2GD/8u8Ug=="], + + "@radix-ui/rect": ["@radix-ui/rect@1.1.1", "", {}, "sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw=="], + + "@rollup/plugin-alias": ["@rollup/plugin-alias@5.1.1", "", { "peerDependencies": { "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" }, "optionalPeers": ["rollup"] }, "sha512-PR9zDb+rOzkRb2VD+EuKB7UC41vU5DIwZ5qqCpk0KJudcWAyi8rvYOhS7+L5aZCspw1stTViLgN5v6FF1p5cgQ=="], + + "@rollup/plugin-commonjs": ["@rollup/plugin-commonjs@28.0.9", "", { "dependencies": { "@rollup/pluginutils": "^5.0.1", "commondir": "^1.0.1", "estree-walker": "^2.0.2", "fdir": "^6.2.0", "is-reference": "1.2.1", "magic-string": "^0.30.3", "picomatch": "^4.0.2" }, "peerDependencies": { "rollup": "^2.68.0||^3.0.0||^4.0.0" }, "optionalPeers": ["rollup"] }, "sha512-PIR4/OHZ79romx0BVVll/PkwWpJ7e5lsqFa3gFfcrFPWwLXLV39JVUzQV9RKjWerE7B845Hqjj9VYlQeieZ2dA=="], + + "@rollup/plugin-inject": ["@rollup/plugin-inject@5.0.5", "", { "dependencies": { "@rollup/pluginutils": "^5.0.1", "estree-walker": "^2.0.2", "magic-string": "^0.30.3" }, "peerDependencies": { "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" }, "optionalPeers": ["rollup"] }, "sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg=="], + + "@rollup/plugin-json": ["@rollup/plugin-json@6.1.0", "", { "dependencies": { "@rollup/pluginutils": "^5.1.0" }, "peerDependencies": { "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" }, "optionalPeers": ["rollup"] }, "sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA=="], + + "@rollup/plugin-node-resolve": ["@rollup/plugin-node-resolve@16.0.3", "", { "dependencies": { "@rollup/pluginutils": "^5.0.1", "@types/resolve": "1.20.2", "deepmerge": "^4.2.2", "is-module": "^1.0.0", "resolve": "^1.22.1" }, "peerDependencies": { "rollup": "^2.78.0||^3.0.0||^4.0.0" }, "optionalPeers": ["rollup"] }, "sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg=="], + + "@rollup/plugin-replace": ["@rollup/plugin-replace@6.0.3", "", { "dependencies": { "@rollup/pluginutils": "^5.0.1", "magic-string": "^0.30.3" }, "peerDependencies": { "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" }, "optionalPeers": ["rollup"] }, "sha512-J4RZarRvQAm5IF0/LwUUg+obsm+xZhYnbMXmXROyoSE1ATJe3oXSb9L5MMppdxP2ylNSjv6zFBwKYjcKMucVfA=="], + + "@rollup/plugin-terser": ["@rollup/plugin-terser@0.4.4", "", { "dependencies": { "serialize-javascript": "^6.0.1", "smob": "^1.0.0", "terser": "^5.17.4" }, "peerDependencies": { "rollup": "^2.0.0||^3.0.0||^4.0.0" }, "optionalPeers": ["rollup"] }, "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A=="], + + "@rollup/pluginutils": ["@rollup/pluginutils@5.3.0", "", { "dependencies": { "@types/estree": "^1.0.0", "estree-walker": "^2.0.2", "picomatch": "^4.0.2" }, "peerDependencies": { "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" }, "optionalPeers": ["rollup"] }, "sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q=="], + + "@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.53.3", "", { "os": "android", "cpu": "arm" }, "sha512-mRSi+4cBjrRLoaal2PnqH82Wqyb+d3HsPUN/W+WslCXsZsyHa9ZeQQX/pQsZaVIWDkPcpV6jJ+3KLbTbgnwv8w=="], + + "@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.53.3", "", { "os": "android", "cpu": "arm64" }, "sha512-CbDGaMpdE9sh7sCmTrTUyllhrg65t6SwhjlMJsLr+J8YjFuPmCEjbBSx4Z/e4SmDyH3aB5hGaJUP2ltV/vcs4w=="], + + "@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.53.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Nr7SlQeqIBpOV6BHHGZgYBuSdanCXuw09hon14MGOLGmXAFYjx1wNvquVPmpZnl0tLjg25dEdr4IQ6GgyToCUA=="], + + "@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.53.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-DZ8N4CSNfl965CmPktJ8oBnfYr3F8dTTNBQkRlffnUarJ2ohudQD17sZBa097J8xhQ26AwhHJ5mvUyQW8ddTsQ=="], + + "@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.53.3", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-yMTrCrK92aGyi7GuDNtGn2sNW+Gdb4vErx4t3Gv/Tr+1zRb8ax4z8GWVRfr3Jw8zJWvpGHNpss3vVlbF58DZ4w=="], + + "@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.53.3", "", { "os": "freebsd", "cpu": "x64" }, "sha512-lMfF8X7QhdQzseM6XaX0vbno2m3hlyZFhwcndRMw8fbAGUGL3WFMBdK0hbUBIUYcEcMhVLr1SIamDeuLBnXS+Q=="], + + "@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.53.3", "", { "os": "linux", "cpu": "arm" }, "sha512-k9oD15soC/Ln6d2Wv/JOFPzZXIAIFLp6B+i14KhxAfnq76ajt0EhYc5YPeX6W1xJkAdItcVT+JhKl1QZh44/qw=="], + + "@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.53.3", "", { "os": "linux", "cpu": "arm" }, "sha512-vTNlKq+N6CK/8UktsrFuc+/7NlEYVxgaEgRXVUVK258Z5ymho29skzW1sutgYjqNnquGwVUObAaxae8rZ6YMhg=="], + + "@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.53.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-RGrFLWgMhSxRs/EWJMIFM1O5Mzuz3Xy3/mnxJp/5cVhZ2XoCAxJnmNsEyeMJtpK+wu0FJFWz+QF4mjCA7AUQ3w=="], + + "@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.53.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-kASyvfBEWYPEwe0Qv4nfu6pNkITLTb32p4yTgzFCocHnJLAHs+9LjUu9ONIhvfT/5lv4YS5muBHyuV84epBo/A=="], + + "@rollup/rollup-linux-loong64-gnu": ["@rollup/rollup-linux-loong64-gnu@4.53.3", "", { "os": "linux", "cpu": "none" }, "sha512-JiuKcp2teLJwQ7vkJ95EwESWkNRFJD7TQgYmCnrPtlu50b4XvT5MOmurWNrCj3IFdyjBQ5p9vnrX4JM6I8OE7g=="], + + "@rollup/rollup-linux-ppc64-gnu": ["@rollup/rollup-linux-ppc64-gnu@4.53.3", "", { "os": "linux", "cpu": "ppc64" }, "sha512-EoGSa8nd6d3T7zLuqdojxC20oBfNT8nexBbB/rkxgKj5T5vhpAQKKnD+h3UkoMuTyXkP5jTjK/ccNRmQrPNDuw=="], + + "@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.53.3", "", { "os": "linux", "cpu": "none" }, "sha512-4s+Wped2IHXHPnAEbIB0YWBv7SDohqxobiiPA1FIWZpX+w9o2i4LezzH/NkFUl8LRci/8udci6cLq+jJQlh+0g=="], + + "@rollup/rollup-linux-riscv64-musl": ["@rollup/rollup-linux-riscv64-musl@4.53.3", "", { "os": "linux", "cpu": "none" }, "sha512-68k2g7+0vs2u9CxDt5ktXTngsxOQkSEV/xBbwlqYcUrAVh6P9EgMZvFsnHy4SEiUl46Xf0IObWVbMvPrr2gw8A=="], + + "@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.53.3", "", { "os": "linux", "cpu": "s390x" }, "sha512-VYsFMpULAz87ZW6BVYw3I6sWesGpsP9OPcyKe8ofdg9LHxSbRMd7zrVrr5xi/3kMZtpWL/wC+UIJWJYVX5uTKg=="], + + "@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.53.3", "", { "os": "linux", "cpu": "x64" }, "sha512-3EhFi1FU6YL8HTUJZ51imGJWEX//ajQPfqWLI3BQq4TlvHy4X0MOr5q3D2Zof/ka0d5FNdPwZXm3Yyib/UEd+w=="], + + "@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.53.3", "", { "os": "linux", "cpu": "x64" }, "sha512-eoROhjcc6HbZCJr+tvVT8X4fW3/5g/WkGvvmwz/88sDtSJzO7r/blvoBDgISDiCjDRZmHpwud7h+6Q9JxFwq1Q=="], + + "@rollup/rollup-openharmony-arm64": ["@rollup/rollup-openharmony-arm64@4.53.3", "", { "os": "none", "cpu": "arm64" }, "sha512-OueLAWgrNSPGAdUdIjSWXw+u/02BRTcnfw9PN41D2vq/JSEPnJnVuBgw18VkN8wcd4fjUs+jFHVM4t9+kBSNLw=="], + + "@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.53.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-GOFuKpsxR/whszbF/bzydebLiXIHSgsEUp6M0JI8dWvi+fFa1TD6YQa4aSZHtpmh2/uAlj/Dy+nmby3TJ3pkTw=="], + + "@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.53.3", "", { "os": "win32", "cpu": "ia32" }, "sha512-iah+THLcBJdpfZ1TstDFbKNznlzoxa8fmnFYK4V67HvmuNYkVdAywJSoteUszvBQ9/HqN2+9AZghbajMsFT+oA=="], + + "@rollup/rollup-win32-x64-gnu": ["@rollup/rollup-win32-x64-gnu@4.53.3", "", { "os": "win32", "cpu": "x64" }, "sha512-J9QDiOIZlZLdcot5NXEepDkstocktoVjkaKUtqzgzpt2yWjGlbYiKyp05rWwk4nypbYUNoFAztEgixoLaSETkg=="], + + "@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.53.3", "", { "os": "win32", "cpu": "x64" }, "sha512-UhTd8u31dXadv0MopwGgNOBpUVROFKWVQgAg5N1ESyCz8AuBcMqm4AuTjrwgQKGDfoFuz02EuMRHQIw/frmYKQ=="], + + "@sagold/json-pointer": ["@sagold/json-pointer@6.0.2", "", {}, "sha512-lRc5U3g4jYVufZbd5VkXKs/rbgJex8+nRGc+1EMUNbpO5D/XA4Cb2/uyuCFOl6M+q1vAZ9u4CIXuqcH5uD7FAw=="], + + "@sagold/json-query": ["@sagold/json-query@6.2.0", "", { "dependencies": { "@sagold/json-pointer": "^5.1.2", "ebnf": "^1.9.1" } }, "sha512-7bOIdUE6eHeoWtFm8TvHQHfTVSZuCs+3RpOKmZCDBIOrxpvF/rNFTeuvIyjHva/RR0yVS3kQtr+9TW72LQEZjA=="], + + "@sec-ant/readable-stream": ["@sec-ant/readable-stream@0.4.1", "", {}, "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg=="], + + "@shikijs/core": ["@shikijs/core@1.29.2", "", { "dependencies": { "@shikijs/engine-javascript": "1.29.2", "@shikijs/engine-oniguruma": "1.29.2", "@shikijs/types": "1.29.2", "@shikijs/vscode-textmate": "^10.0.1", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.4" } }, "sha512-vju0lY9r27jJfOY4Z7+Rt/nIOjzJpZ3y+nYpqtUZInVoXQ/TJZcfGnNOGnKjFdVZb8qexiCuSlZRKcGfhhTTZQ=="], + + "@shikijs/engine-javascript": ["@shikijs/engine-javascript@1.29.2", "", { "dependencies": { "@shikijs/types": "1.29.2", "@shikijs/vscode-textmate": "^10.0.1", "oniguruma-to-es": "^2.2.0" } }, "sha512-iNEZv4IrLYPv64Q6k7EPpOCE/nuvGiKl7zxdq0WFuRPF5PAE9PRo2JGq/d8crLusM59BRemJ4eOqrFrC4wiQ+A=="], + + "@shikijs/engine-oniguruma": ["@shikijs/engine-oniguruma@1.29.2", "", { "dependencies": { "@shikijs/types": "1.29.2", "@shikijs/vscode-textmate": "^10.0.1" } }, "sha512-7iiOx3SG8+g1MnlzZVDYiaeHe7Ez2Kf2HrJzdmGwkRisT7r4rak0e655AcM/tF9JG/kg5fMNYlLLKglbN7gBqA=="], + + "@shikijs/langs": ["@shikijs/langs@1.29.2", "", { "dependencies": { "@shikijs/types": "1.29.2" } }, "sha512-FIBA7N3LZ+223U7cJDUYd5shmciFQlYkFXlkKVaHsCPgfVLiO+e12FmQE6Tf9vuyEsFe3dIl8qGWKXgEHL9wmQ=="], + + "@shikijs/themes": ["@shikijs/themes@1.29.2", "", { "dependencies": { "@shikijs/types": "1.29.2" } }, "sha512-i9TNZlsq4uoyqSbluIcZkmPL9Bfi3djVxRnofUHwvx/h6SRW3cwgBC5SML7vsDcWyukY0eCzVN980rqP6qNl9g=="], + + "@shikijs/types": ["@shikijs/types@1.29.2", "", { "dependencies": { "@shikijs/vscode-textmate": "^10.0.1", "@types/hast": "^3.0.4" } }, "sha512-VJjK0eIijTZf0QSTODEXCqinjBn0joAHQ+aPSBzrv4O2d/QSbsMw+ZeSRx03kV34Hy7NzUvV/7NqfYGRLrASmw=="], + + "@shikijs/vscode-textmate": ["@shikijs/vscode-textmate@10.0.2", "", {}, "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg=="], + + "@sindresorhus/is": ["@sindresorhus/is@7.1.1", "", {}, "sha512-rO92VvpgMc3kfiTjGT52LEtJ8Yc5kCWhZjLQ3LwlA4pSgPpQO7bVpYXParOD8Jwf+cVQECJo3yP/4I8aZtUQTQ=="], + + "@sindresorhus/merge-streams": ["@sindresorhus/merge-streams@4.0.0", "", {}, "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ=="], + + "@solidjs/h": ["@solidjs/h@2.0.0-experimental.16", "", { "peerDependencies": { "@solidjs/web": "^2.0.0-experimental.16" } }, "sha512-szgDYXf8qHTwAY3JTTbEI4tqWWVdWC5R7SNS+OwG55xFveRyo6G/xB4M9EqUimlkoA5j1BVlSNe0vkGn+zqMYg=="], + + "@solidjs/html": ["@solidjs/html@2.0.0-experimental.16", "", { "peerDependencies": { "@solidjs/web": "^2.0.0-experimental.16" } }, "sha512-8nbWah8U2hsxIkVx22KHFePECSFyakpMNSKoWw4XcTi+VWu3ReFcM5p8/xsnoxc4ofgEsilBHYi40KF8EbKWdg=="], + + "@solidjs/meta": ["@solidjs/meta@0.29.4", "", { "peerDependencies": { "solid-js": ">=1.8.4" } }, "sha512-zdIWBGpR9zGx1p1bzIPqF5Gs+Ks/BH8R6fWhmUa/dcK1L2rUC8BAcZJzNRYBQv74kScf1TSOs0EY//Vd/I0V8g=="], + + "@solidjs/router": ["@solidjs/router@0.15.4", "", { "peerDependencies": { "solid-js": "^1.8.6" } }, "sha512-WOpgg9a9T638cR+5FGbFi/IV4l2FpmBs1GpIMSPa0Ce9vyJN7Wts+X2PqMf9IYn0zUj2MlSJtm1gp7/HI/n5TQ=="], + + "@solidjs/start": ["@solidjs/start@2.0.0-alpha.2", "", { "dependencies": { "@babel/core": "^7.28.3", "@babel/traverse": "^7.28.3", "@babel/types": "^7.28.5", "@solidjs/meta": "^0.29.4", "@tanstack/server-functions-plugin": "1.134.5", "@types/babel__traverse": "^7.28.0", "@types/micromatch": "^4.0.9", "cookie-es": "^2.0.0", "defu": "^6.1.4", "error-stack-parser": "^2.1.4", "es-module-lexer": "^1.7.0", "esbuild": "^0.25.3", "fast-glob": "^3.3.3", "h3": "npm:h3@2.0.1-rc.4", "html-to-image": "^1.11.13", "micromatch": "^4.0.8", "path-to-regexp": "^8.2.0", "pathe": "^2.0.3", "radix3": "^1.1.2", "seroval": "^1.4.1", "seroval-plugins": "^1.4.0", "shiki": "^1.26.1", "solid-js": "^1.9.9", "source-map-js": "^1.2.1", "srvx": "^0.9.1", "terracotta": "^1.0.6", "vite-plugin-solid": "^2.11.9" }, "peerDependencies": { "vite": "^7" } }, "sha512-z56ATi3P07q8F5Io2I+RQrwjyWZtFZzpXN/J+8scf/gqrAW83LtgRkZFZjJaGH7i9WrHP+ep9F+ZiJ2gDHVBcw=="], + + "@solidjs/universal": ["@solidjs/universal@2.0.0-experimental.16", "", { "peerDependencies": { "solid-js": "^2.0.0-experimental.16" } }, "sha512-PYFLoYEJo0pCehHlSFk9zESKwt6uiADoEkCANdYg79GfoL561pxx5iu7aVqpCrhurWwz1LBb5HSuH+BcfrWw3g=="], + + "@solidjs/vite-plugin-nitro-2": ["@solidjs/vite-plugin-nitro-2@0.1.0", "", { "dependencies": { "nitropack": "^2.11.10" }, "peerDependencies": { "vite": "^7" } }, "sha512-gtT9GYhAdbfY2v3ISKYFXclxH/kK+mDhp5ENjiA1zJAfQq6XPWwIfIYm9MB73vfOp+MzVXWDHxYyUv+5pTpGTw=="], + + "@solidjs/web": ["@solidjs/web@2.0.0-experimental.16", "", { "dependencies": { "seroval": "^1.1.0", "seroval-plugins": "^1.1.0" }, "peerDependencies": { "solid-js": "^2.0.0-experimental.16" } }, "sha512-TcgvLKOYN2cIExX307SRxvd1aXj5eLaQUlGDLdQoQBqDHhuDdeZUfKLYrn/JOzWs1u5DYNOc+gR0SaG17vYsng=="], + + "@speed-highlight/core": ["@speed-highlight/core@1.2.12", "", {}, "sha512-uilwrK0Ygyri5dToHYdZSjcvpS2ZwX0w5aSt3GCEN9hrjxWCoeV4Z2DTXuxjwbntaLQIEEAlCeNQss5SoHvAEA=="], + + "@tailwindcss/node": ["@tailwindcss/node@4.2.1", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "enhanced-resolve": "^5.19.0", "jiti": "^2.6.1", "lightningcss": "1.31.1", "magic-string": "^0.30.21", "source-map-js": "^1.2.1", "tailwindcss": "4.2.1" } }, "sha512-jlx6sLk4EOwO6hHe1oCGm1Q4AN/s0rSrTTPBGPM0/RQ6Uylwq17FuU8IeJJKEjtc6K6O07zsvP+gDO6MMWo7pg=="], + + "@tailwindcss/oxide": ["@tailwindcss/oxide@4.2.1", "", { "optionalDependencies": { "@tailwindcss/oxide-android-arm64": "4.2.1", "@tailwindcss/oxide-darwin-arm64": "4.2.1", "@tailwindcss/oxide-darwin-x64": "4.2.1", "@tailwindcss/oxide-freebsd-x64": "4.2.1", "@tailwindcss/oxide-linux-arm-gnueabihf": "4.2.1", "@tailwindcss/oxide-linux-arm64-gnu": "4.2.1", "@tailwindcss/oxide-linux-arm64-musl": "4.2.1", "@tailwindcss/oxide-linux-x64-gnu": "4.2.1", "@tailwindcss/oxide-linux-x64-musl": "4.2.1", "@tailwindcss/oxide-wasm32-wasi": "4.2.1", "@tailwindcss/oxide-win32-arm64-msvc": "4.2.1", "@tailwindcss/oxide-win32-x64-msvc": "4.2.1" } }, "sha512-yv9jeEFWnjKCI6/T3Oq50yQEOqmpmpfzG1hcZsAOaXFQPfzWprWrlHSdGPEF3WQTi8zu8ohC9Mh9J470nT5pUw=="], + + "@tailwindcss/oxide-android-arm64": ["@tailwindcss/oxide-android-arm64@4.2.1", "", { "os": "android", "cpu": "arm64" }, "sha512-eZ7G1Zm5EC8OOKaesIKuw77jw++QJ2lL9N+dDpdQiAB/c/B2wDh0QPFHbkBVrXnwNugvrbJFk1gK2SsVjwWReg=="], + + "@tailwindcss/oxide-darwin-arm64": ["@tailwindcss/oxide-darwin-arm64@4.2.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-q/LHkOstoJ7pI1J0q6djesLzRvQSIfEto148ppAd+BVQK0JYjQIFSK3JgYZJa+Yzi0DDa52ZsQx2rqytBnf8Hw=="], + + "@tailwindcss/oxide-darwin-x64": ["@tailwindcss/oxide-darwin-x64@4.2.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-/f/ozlaXGY6QLbpvd/kFTro2l18f7dHKpB+ieXz+Cijl4Mt9AI2rTrpq7V+t04nK+j9XBQHnSMdeQRhbGyt6fw=="], + + "@tailwindcss/oxide-freebsd-x64": ["@tailwindcss/oxide-freebsd-x64@4.2.1", "", { "os": "freebsd", "cpu": "x64" }, "sha512-5e/AkgYJT/cpbkys/OU2Ei2jdETCLlifwm7ogMC7/hksI2fC3iiq6OcXwjibcIjPung0kRtR3TxEITkqgn0TcA=="], + + "@tailwindcss/oxide-linux-arm-gnueabihf": ["@tailwindcss/oxide-linux-arm-gnueabihf@4.2.1", "", { "os": "linux", "cpu": "arm" }, "sha512-Uny1EcVTTmerCKt/1ZuKTkb0x8ZaiuYucg2/kImO5A5Y/kBz41/+j0gxUZl+hTF3xkWpDmHX+TaWhOtba2Fyuw=="], + + "@tailwindcss/oxide-linux-arm64-gnu": ["@tailwindcss/oxide-linux-arm64-gnu@4.2.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-CTrwomI+c7n6aSSQlsPL0roRiNMDQ/YzMD9EjcR+H4f0I1SQ8QqIuPnsVp7QgMkC1Qi8rtkekLkOFjo7OlEFRQ=="], + + "@tailwindcss/oxide-linux-arm64-musl": ["@tailwindcss/oxide-linux-arm64-musl@4.2.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-WZA0CHRL/SP1TRbA5mp9htsppSEkWuQ4KsSUumYQnyl8ZdT39ntwqmz4IUHGN6p4XdSlYfJwM4rRzZLShHsGAQ=="], + + "@tailwindcss/oxide-linux-x64-gnu": ["@tailwindcss/oxide-linux-x64-gnu@4.2.1", "", { "os": "linux", "cpu": "x64" }, "sha512-qMFzxI2YlBOLW5PhblzuSWlWfwLHaneBE0xHzLrBgNtqN6mWfs+qYbhryGSXQjFYB1Dzf5w+LN5qbUTPhW7Y5g=="], + + "@tailwindcss/oxide-linux-x64-musl": ["@tailwindcss/oxide-linux-x64-musl@4.2.1", "", { "os": "linux", "cpu": "x64" }, "sha512-5r1X2FKnCMUPlXTWRYpHdPYUY6a1Ar/t7P24OuiEdEOmms5lyqjDRvVY1yy9Rmioh+AunQ0rWiOTPE8F9A3v5g=="], + + "@tailwindcss/oxide-wasm32-wasi": ["@tailwindcss/oxide-wasm32-wasi@4.2.1", "", { "dependencies": { "@emnapi/core": "^1.8.1", "@emnapi/runtime": "^1.8.1", "@emnapi/wasi-threads": "^1.1.0", "@napi-rs/wasm-runtime": "^1.1.1", "@tybys/wasm-util": "^0.10.1", "tslib": "^2.8.1" }, "cpu": "none" }, "sha512-MGFB5cVPvshR85MTJkEvqDUnuNoysrsRxd6vnk1Lf2tbiqNlXpHYZqkqOQalydienEWOHHFyyuTSYRsLfxFJ2Q=="], + + "@tailwindcss/oxide-win32-arm64-msvc": ["@tailwindcss/oxide-win32-arm64-msvc@4.2.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-YlUEHRHBGnCMh4Nj4GnqQyBtsshUPdiNroZj8VPkvTZSoHsilRCwXcVKnG9kyi0ZFAS/3u+qKHBdDc81SADTRA=="], + + "@tailwindcss/oxide-win32-x64-msvc": ["@tailwindcss/oxide-win32-x64-msvc@4.2.1", "", { "os": "win32", "cpu": "x64" }, "sha512-rbO34G5sMWWyrN/idLeVxAZgAKWrn5LiR3/I90Q9MkA67s6T1oB0xtTe+0heoBvHSpbU9Mk7i6uwJnpo4u21XQ=="], + + "@tailwindcss/vite": ["@tailwindcss/vite@4.2.1", "", { "dependencies": { "@tailwindcss/node": "4.2.1", "@tailwindcss/oxide": "4.2.1", "tailwindcss": "4.2.1" }, "peerDependencies": { "vite": "^5.2.0 || ^6 || ^7" } }, "sha512-TBf2sJjYeb28jD2U/OhwdW0bbOsxkWPwQ7SrqGf9sVcoYwZj7rkXljroBO9wKBut9XnmQLXanuDUeqQK0lGg/w=="], + + "@tanstack/devtools-event-client": ["@tanstack/devtools-event-client@0.4.0", "", {}, "sha512-RPfGuk2bDZgcu9bAJodvO2lnZeHuz4/71HjZ0bGb/SPg8+lyTA+RLSKQvo7fSmPSi8/vcH3aKQ8EM9ywf1olaw=="], + + "@tanstack/directive-functions-plugin": ["@tanstack/directive-functions-plugin@1.134.5", "", { "dependencies": { "@babel/code-frame": "7.27.1", "@babel/core": "^7.27.7", "@babel/traverse": "^7.27.7", "@babel/types": "^7.27.7", "@tanstack/router-utils": "1.133.19", "babel-dead-code-elimination": "^1.0.10", "pathe": "^2.0.3", "tiny-invariant": "^1.3.3" }, "peerDependencies": { "vite": ">=6.0.0 || >=7.0.0" } }, "sha512-J3oawV8uBRBbPoLgMdyHt+LxzTNuWRKNJJuCLWsm/yq6v0IQSvIVCgfD2+liIiSnDPxGZ8ExduPXy8IzS70eXw=="], + + "@tanstack/form-core": ["@tanstack/form-core@1.28.0", "", { "dependencies": { "@tanstack/devtools-event-client": "^0.4.0", "@tanstack/pacer-lite": "^0.1.1", "@tanstack/store": "^0.7.7" } }, "sha512-MX3YveB6SKHAJ2yUwp+Ca/PCguub8bVEnLcLUbFLwdkSRMkP0lMGdaZl+F0JuEgZw56c6iFoRyfILhS7OQpydA=="], + + "@tanstack/pacer-lite": ["@tanstack/pacer-lite@0.1.1", "", {}, "sha512-y/xtNPNt/YeyoVxE/JCx+T7yjEzpezmbb+toK8DDD1P4m7Kzs5YR956+7OKexG3f8aXgC3rLZl7b1V+yNUSy5w=="], + + "@tanstack/react-form": ["@tanstack/react-form@1.28.0", "", { "dependencies": { "@tanstack/form-core": "1.28.0", "@tanstack/react-store": "^0.8.0" }, "peerDependencies": { "react": "^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-ibLcf5QkTogV0Ly944CuqGxWTpHyreNA4Cy8Wtky7zE9wtE3HVapQt4/hUuXo51zihfTkv5URiXpoTSKF5Xosg=="], + + "@tanstack/react-store": ["@tanstack/react-store@0.8.0", "", { "dependencies": { "@tanstack/store": "0.8.0", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-1vG9beLIuB7q69skxK9r5xiLN3ztzIPfSQSs0GfeqWGO2tGIyInZx0x1COhpx97RKaONSoAb8C3dxacWksm1ow=="], + + "@tanstack/router-utils": ["@tanstack/router-utils@1.133.19", "", { "dependencies": { "@babel/core": "^7.27.4", "@babel/generator": "^7.27.5", "@babel/parser": "^7.27.5", "@babel/preset-typescript": "^7.27.1", "ansis": "^4.1.0", "diff": "^8.0.2", "pathe": "^2.0.3", "tinyglobby": "^0.2.15" } }, "sha512-WEp5D2gPxvlLDRXwD/fV7RXjYtqaqJNXKB/L6OyZEbT+9BG/Ib2d7oG9GSUZNNMGPGYAlhBUOi3xutySsk6rxA=="], + + "@tanstack/server-functions-plugin": ["@tanstack/server-functions-plugin@1.134.5", "", { "dependencies": { "@babel/code-frame": "7.27.1", "@babel/core": "^7.27.7", "@babel/plugin-syntax-jsx": "^7.27.1", "@babel/plugin-syntax-typescript": "^7.27.1", "@babel/template": "^7.27.2", "@babel/traverse": "^7.27.7", "@babel/types": "^7.27.7", "@tanstack/directive-functions-plugin": "1.134.5", "babel-dead-code-elimination": "^1.0.9", "tiny-invariant": "^1.3.3" } }, "sha512-2sWxq70T+dOEUlE3sHlXjEPhaFZfdPYlWTSkHchWXrFGw2YOAa+hzD6L9wHMjGDQezYd03ue8tQlHG+9Jzbzgw=="], + + "@tanstack/store": ["@tanstack/store@0.7.7", "", {}, "sha512-xa6pTan1bcaqYDS9BDpSiS63qa6EoDkPN9RsRaxHuDdVDNntzq3xNwR5YKTU/V3SkSyC9T4YVOPh2zRQN0nhIQ=="], + + "@trpc/client": ["@trpc/client@11.10.0", "", { "peerDependencies": { "@trpc/server": "11.10.0", "typescript": ">=5.7.2" } }, "sha512-h0s2AwDtuhS8INRb4hlo4z3RKCkarWqlOy+3ffJgrlDxzzW6aLUN+9nDrcN4huPje1Em15tbCOqhIc6oaKYTRw=="], + + "@trpc/server": ["@trpc/server@11.10.0", "", { "peerDependencies": { "typescript": ">=5.7.2" } }, "sha512-zZjTrR6He61e5TiT7e/bQqab/jRcXBZM8Fg78Yoo8uh5pz60dzzbYuONNUCOkafv5ppXVMms4NHYfNZgzw50vg=="], + + "@ts-morph/common": ["@ts-morph/common@0.27.0", "", { "dependencies": { "fast-glob": "^3.3.3", "minimatch": "^10.0.1", "path-browserify": "^1.0.1" } }, "sha512-Wf29UqxWDpc+i61k3oIOzcUfQt79PIT9y/MWfAGlrkjg6lBC1hwDECLXPVJAhWjiGbfBCxZd65F/LIZF3+jeJQ=="], + + "@types/babel__core": ["@types/babel__core@7.20.5", "", { "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA=="], + + "@types/babel__generator": ["@types/babel__generator@7.27.0", "", { "dependencies": { "@babel/types": "^7.0.0" } }, "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg=="], + + "@types/babel__template": ["@types/babel__template@7.4.4", "", { "dependencies": { "@babel/parser": "^7.1.0", "@babel/types": "^7.0.0" } }, "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A=="], + + "@types/babel__traverse": ["@types/babel__traverse@7.28.0", "", { "dependencies": { "@babel/types": "^7.28.2" } }, "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q=="], + + "@types/braces": ["@types/braces@3.0.5", "", {}, "sha512-SQFof9H+LXeWNz8wDe7oN5zu7ket0qwMu5vZubW4GCJ8Kkeh6nBWUz87+KTz/G3Kqsrp0j/W253XJb3KMEeg3w=="], + + "@types/d3-color": ["@types/d3-color@3.1.3", "", {}, "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A=="], + + "@types/d3-drag": ["@types/d3-drag@3.0.7", "", { "dependencies": { "@types/d3-selection": "*" } }, "sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ=="], + + "@types/d3-interpolate": ["@types/d3-interpolate@3.0.4", "", { "dependencies": { "@types/d3-color": "*" } }, "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA=="], + + "@types/d3-selection": ["@types/d3-selection@3.0.11", "", {}, "sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w=="], + + "@types/d3-transition": ["@types/d3-transition@3.0.9", "", { "dependencies": { "@types/d3-selection": "*" } }, "sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg=="], + + "@types/d3-zoom": ["@types/d3-zoom@3.0.8", "", { "dependencies": { "@types/d3-interpolate": "*", "@types/d3-selection": "*" } }, "sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw=="], + + "@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="], + + "@types/hast": ["@types/hast@3.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ=="], + + "@types/mdast": ["@types/mdast@4.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA=="], + + "@types/micromatch": ["@types/micromatch@4.0.10", "", { "dependencies": { "@types/braces": "*" } }, "sha512-5jOhFDElqr4DKTrTEbnW8DZ4Hz5LRUEmyrGpCMrD/NphYv3nUnaF08xmSLx1rGGnyEs/kFnhiw6dCgcDqMr5PQ=="], + + "@types/node": ["@types/node@25.3.5", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-oX8xrhvpiyRCQkG1MFchB09f+cXftgIXb3a7UUa4Y3wpmZPw5tyZGTLWhlESOLq1Rq6oDlc8npVU2/9xiCuXMA=="], + + "@types/resolve": ["@types/resolve@1.20.2", "", {}, "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q=="], + + "@types/statuses": ["@types/statuses@2.0.6", "", {}, "sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA=="], + + "@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="], + + "@types/use-sync-external-store": ["@types/use-sync-external-store@0.0.6", "", {}, "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg=="], + + "@types/validate-npm-package-name": ["@types/validate-npm-package-name@4.0.2", "", {}, "sha512-lrpDziQipxCEeK5kWxvljWYhUvOiB2A9izZd9B2AFarYAkqZshb4lPbRs7zKEic6eGtH8V/2qJW+dPp9OtF6bw=="], + + "@uiw/codemirror-extensions-basic-setup": ["@uiw/codemirror-extensions-basic-setup@4.25.4", "", { "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/commands": "^6.0.0", "@codemirror/language": "^6.0.0", "@codemirror/lint": "^6.0.0", "@codemirror/search": "^6.0.0", "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.0.0" } }, "sha512-YzNwkm0AbPv1EXhCHYR5v0nqfemG2jEB0Z3Att4rBYqKrlG7AA9Rhjc3IyBaOzsBu18wtrp9/+uhTyu7TXSRng=="], + + "@uiw/react-codemirror": ["@uiw/react-codemirror@4.25.4", "", { "dependencies": { "@babel/runtime": "^7.18.6", "@codemirror/commands": "^6.1.0", "@codemirror/state": "^6.1.1", "@codemirror/theme-one-dark": "^6.0.0", "@uiw/codemirror-extensions-basic-setup": "4.25.4", "codemirror": "^6.0.0" }, "peerDependencies": { "@codemirror/view": ">=6.0.0", "react": ">=17.0.0", "react-dom": ">=17.0.0" } }, "sha512-ipO067oyfUw+DVaXhQCxkB0ZD9b7RnY+ByrprSYSKCHaULvJ3sqWYC/Zen6zVQ8/XC4o5EPBfatGiX20kC7XGA=="], + + "@ungap/structured-clone": ["@ungap/structured-clone@1.3.0", "", {}, "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g=="], + + "@vercel/nft": ["@vercel/nft@0.30.4", "", { "dependencies": { "@mapbox/node-pre-gyp": "^2.0.0", "@rollup/pluginutils": "^5.1.3", "acorn": "^8.6.0", "acorn-import-attributes": "^1.9.5", "async-sema": "^3.1.1", "bindings": "^1.4.0", "estree-walker": "2.0.2", "glob": "^10.5.0", "graceful-fs": "^4.2.9", "node-gyp-build": "^4.2.2", "picomatch": "^4.0.2", "resolve-from": "^5.0.0" }, "bin": { "nft": "out/cli.js" } }, "sha512-wE6eAGSXScra60N2l6jWvNtVK0m+sh873CpfZW4KI2v8EHuUQp+mSEi4T+IcdPCSEDgCdAS/7bizbhQlkjzrSA=="], + + "@xyflow/react": ["@xyflow/react@12.10.0", "", { "dependencies": { "@xyflow/system": "0.0.74", "classcat": "^5.0.3", "zustand": "^4.4.0" }, "peerDependencies": { "react": ">=17", "react-dom": ">=17" } }, "sha512-eOtz3whDMWrB4KWVatIBrKuxECHqip6PfA8fTpaS2RUGVpiEAe+nqDKsLqkViVWxDGreq0lWX71Xth/SPAzXiw=="], + + "@xyflow/system": ["@xyflow/system@0.0.74", "", { "dependencies": { "@types/d3-drag": "^3.0.7", "@types/d3-interpolate": "^3.0.4", "@types/d3-selection": "^3.0.10", "@types/d3-transition": "^3.0.8", "@types/d3-zoom": "^3.0.8", "d3-drag": "^3.0.0", "d3-interpolate": "^3.0.1", "d3-selection": "^3.0.0", "d3-zoom": "^3.0.0" } }, "sha512-7v7B/PkiVrkdZzSbL+inGAo6tkR/WQHHG0/jhSvLQToCsfa8YubOGmBYd1s08tpKpihdHDZFwzQZeR69QSBb4Q=="], + + "abbrev": ["abbrev@3.0.1", "", {}, "sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg=="], + + "abort-controller": ["abort-controller@3.0.0", "", { "dependencies": { "event-target-shim": "^5.0.0" } }, "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg=="], + + "accepts": ["accepts@2.0.0", "", { "dependencies": { "mime-types": "^3.0.0", "negotiator": "^1.0.0" } }, "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng=="], + + "acorn": ["acorn@8.15.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg=="], + + "acorn-import-attributes": ["acorn-import-attributes@1.9.5", "", { "peerDependencies": { "acorn": "^8" } }, "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ=="], + + "agent-base": ["agent-base@7.1.4", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="], + + "ajv": ["ajv@8.18.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A=="], + + "ajv-formats": ["ajv-formats@3.0.1", "", { "dependencies": { "ajv": "^8.0.0" } }, "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ=="], + + "ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="], + + "ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], + + "ansis": ["ansis@4.2.0", "", {}, "sha512-HqZ5rWlFjGiV0tDm3UxxgNRqsOTniqoKZu0pIAfh7TZQMGuZK+hH0drySty0si0QXj1ieop4+SkSfPZBPPkHig=="], + + "anymatch": ["anymatch@3.1.3", "", { "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" } }, "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw=="], + + "archiver": ["archiver@7.0.1", "", { "dependencies": { "archiver-utils": "^5.0.2", "async": "^3.2.4", "buffer-crc32": "^1.0.0", "readable-stream": "^4.0.0", "readdir-glob": "^1.1.2", "tar-stream": "^3.0.0", "zip-stream": "^6.0.1" } }, "sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ=="], + + "archiver-utils": ["archiver-utils@5.0.2", "", { "dependencies": { "glob": "^10.0.0", "graceful-fs": "^4.2.0", "is-stream": "^2.0.1", "lazystream": "^1.0.0", "lodash": "^4.17.15", "normalize-path": "^3.0.0", "readable-stream": "^4.0.0" } }, "sha512-wuLJMmIBQYCsGZgYLTy5FIB2pF6Lfb6cXMSF8Qywwk3t20zWnAi7zLcQFdKQmIB8wyZpY5ER38x08GbwtR2cLA=="], + + "argparse": ["argparse@2.0.1", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="], + + "aria-hidden": ["aria-hidden@1.2.6", "", { "dependencies": { "tslib": "^2.0.0" } }, "sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA=="], + + "artplayer": ["artplayer@5.3.0", "", { "dependencies": { "option-validator": "^2.0.6" } }, "sha512-yExO39MpEg4P+bxgChxx1eJfiUPE4q1QQRLCmqGhlsj+ANuaoEkR8hF93LdI5ZyrAcIbJkuEndxEiUoKobifDw=="], + + "artplayer-plugin-chapter": ["artplayer-plugin-chapter@1.0.1", "", {}, "sha512-opXKGN/AdUkzhJeOJu7Pp7ExjDI9HhFbzEXmjvhLfDwZY0zSd3PpcBA5ZWPxKMqA9qxdbInCkLtWbPEhi3ZSxA=="], + + "ast-types": ["ast-types@0.16.1", "", { "dependencies": { "tslib": "^2.0.1" } }, "sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg=="], + + "async": ["async@3.2.6", "", {}, "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA=="], + + "async-sema": ["async-sema@3.1.1", "", {}, "sha512-tLRNUXati5MFePdAk8dw7Qt7DpxPB60ofAgn8WRhW6a2rcimZnYBP9oxHiv0OHy+Wz7kPMG+t4LGdt31+4EmGg=="], + + "aws4fetch": ["aws4fetch@1.0.20", "", {}, "sha512-/djoAN709iY65ETD6LKCtyyEI04XIBP5xVvfmNxsEP0uJB5tyaGBztSryRr4HqMStr9R06PisQE7m9zDTXKu6g=="], + + "b4a": ["b4a@1.7.3", "", { "peerDependencies": { "react-native-b4a": "*" }, "optionalPeers": ["react-native-b4a"] }, "sha512-5Q2mfq2WfGuFp3uS//0s6baOJLMoVduPYVeNmDYxu5OUA1/cBfvr2RIS7vi62LdNj/urk1hfmj867I3qt6uZ7Q=="], + + "babel-dead-code-elimination": ["babel-dead-code-elimination@1.0.10", "", { "dependencies": { "@babel/core": "^7.23.7", "@babel/parser": "^7.23.6", "@babel/traverse": "^7.23.7", "@babel/types": "^7.23.6" } }, "sha512-DV5bdJZTzZ0zn0DC24v3jD7Mnidh6xhKa4GfKCbq3sfW8kaWhDdZjP3i81geA8T33tdYqWKw4D3fVv0CwEgKVA=="], + + "babel-plugin-jsx-dom-expressions": ["babel-plugin-jsx-dom-expressions@0.41.0-next.9", "", { "dependencies": { "@babel/helper-module-imports": "7.18.6", "@babel/plugin-syntax-jsx": "^7.18.6", "@babel/types": "^7.20.7", "html-entities": "2.3.3", "parse5": "^7.1.2", "validate-html-nesting": "^1.2.1" }, "peerDependencies": { "@babel/core": "^7.20.12" } }, "sha512-6EZcgFC8AM2lM2jSe7W/5fuREMC/PErTUD2O5YNuV267p8xaLFpoJPlM8PL0NY2Pu0a49gb3JbYvt5/yv2Z7Ww=="], + + "babel-preset-solid": ["babel-preset-solid@2.0.0-experimental.16", "", { "dependencies": { "babel-plugin-jsx-dom-expressions": "^0.41.0-next.9" }, "peerDependencies": { "@babel/core": "^7.0.0", "solid-js": "2.0.0-experimental.16" }, "optionalPeers": ["solid-js"] }, "sha512-I8UfX7Er2i3XaqC8pr7klEHl/AWUUFmpgWDvzipQofthcBwrlWUk8pVbQZ6PuBOnr4XRBVF3ijzOicfzmj4uBA=="], + + "balanced-match": ["balanced-match@4.0.2", "", { "dependencies": { "jackspeak": "^4.2.3" } }, "sha512-x0K50QvKQ97fdEz2kPehIerj+YTeptKF9hyYkKf6egnwmMWAkADiO0QCzSp0R5xN8FTZgYaBfSaue46Ej62nMg=="], + + "bare-events": ["bare-events@2.8.2", "", { "peerDependencies": { "bare-abort-controller": "*" }, "optionalPeers": ["bare-abort-controller"] }, "sha512-riJjyv1/mHLIPX4RwiK+oW9/4c3TEUeORHKefKAKnZ5kyslbN+HXowtbaVEqt4IMUB7OXlfixcs6gsFeo/jhiQ=="], + + "base64-js": ["base64-js@1.5.1", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="], + + "baseline-browser-mapping": ["baseline-browser-mapping@2.9.7", "", { "bin": { "baseline-browser-mapping": "dist/cli.js" } }, "sha512-k9xFKplee6KIio3IDbwj+uaCLpqzOwakOgmqzPezM0sFJlFKcg30vk2wOiAJtkTSfx0SSQDSe8q+mWA/fSH5Zg=="], + + "bcryptjs": ["bcryptjs@3.0.3", "", { "bin": { "bcrypt": "bin/bcrypt" } }, "sha512-GlF5wPWnSa/X5LKM1o0wz0suXIINz1iHRLvTS+sLyi7XPbe5ycmYI3DlZqVGZZtDgl4DmasFg7gOB3JYbphV5g=="], + + "bindings": ["bindings@1.5.0", "", { "dependencies": { "file-uri-to-path": "1.0.0" } }, "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ=="], + + "bknd": ["bknd@0.20.0", "", { "dependencies": { "@cfworker/json-schema": "^4.1.1", "@codemirror/lang-html": "^6.4.11", "@codemirror/lang-json": "^6.0.2", "@hello-pangea/dnd": "^18.0.1", "@hono/swagger-ui": "^0.5.2", "@mantine/core": "^7.17.1", "@mantine/hooks": "^7.17.1", "@tanstack/react-form": "^1.0.5", "@uiw/react-codemirror": "^4.25.2", "@xyflow/react": "^12.9.2", "aws4fetch": "^1.0.20", "bcryptjs": "^3.0.3", "dayjs": "^1.11.19", "fast-xml-parser": "^5.3.1", "hono": "4.10.4", "json-schema-library": "10.0.0-rc7", "json-schema-to-ts": "^3.1.1", "jsonv-ts": "^0.10.1", "kysely": "0.28.8", "lodash-es": "^4.17.21", "oauth4webapi": "^2.11.1", "object-path-immutable": "^4.1.2", "picocolors": "^1.1.1", "radix-ui": "^1.1.3", "swr": "^2.3.6", "use-sync-external-store": "^1.6.0", "zustand": "^4" }, "optionalDependencies": { "@hono/node-server": "^1.19.6" }, "peerDependencies": { "react": ">=19", "react-dom": ">=19" }, "bin": { "bknd": "dist/cli/index.js" } }, "sha512-Xh3YfEwOx0QeUsHOSXty4gkrymBMPezrJq50ukghgTQHV9q/nxz0krX2M6vqJJ8qBh4eVk1nKH3EZ0OYEtrLdg=="], + + "body-parser": ["body-parser@2.2.2", "", { "dependencies": { "bytes": "^3.1.2", "content-type": "^1.0.5", "debug": "^4.4.3", "http-errors": "^2.0.0", "iconv-lite": "^0.7.0", "on-finished": "^2.4.1", "qs": "^6.14.1", "raw-body": "^3.0.1", "type-is": "^2.0.1" } }, "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA=="], + + "brace-expansion": ["brace-expansion@5.0.2", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-Pdk8c9poy+YhOgVWw1JNN22/HcivgKWwpxKq04M/jTmHyCZn12WPJebZxdjSa5TmBqISrUSgNYU3eRORljfCCw=="], + + "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="], + + "browserslist": ["browserslist@4.28.1", "", { "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", "electron-to-chromium": "^1.5.263", "node-releases": "^2.0.27", "update-browserslist-db": "^1.2.0" }, "bin": { "browserslist": "cli.js" } }, "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA=="], + + "buffer": ["buffer@6.0.3", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" } }, "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA=="], + + "buffer-crc32": ["buffer-crc32@1.0.0", "", {}, "sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w=="], + + "buffer-from": ["buffer-from@1.1.2", "", {}, "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="], + + "bundle-name": ["bundle-name@4.1.0", "", { "dependencies": { "run-applescript": "^7.0.0" } }, "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q=="], + + "bytes": ["bytes@3.1.2", "", {}, "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="], + + "c12": ["c12@3.3.2", "", { "dependencies": { "chokidar": "^4.0.3", "confbox": "^0.2.2", "defu": "^6.1.4", "dotenv": "^17.2.3", "exsolve": "^1.0.8", "giget": "^2.0.0", "jiti": "^2.6.1", "ohash": "^2.0.11", "pathe": "^2.0.3", "perfect-debounce": "^2.0.0", "pkg-types": "^2.3.0", "rc9": "^2.1.2" }, "peerDependencies": { "magicast": "*" }, "optionalPeers": ["magicast"] }, "sha512-QkikB2X5voO1okL3QsES0N690Sn/K9WokXqUsDQsWy5SnYb+psYQFGA10iy1bZHj3fjISKsI67Q90gruvWWM3A=="], + + "call-bind-apply-helpers": ["call-bind-apply-helpers@1.0.2", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" } }, "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ=="], + + "call-bound": ["call-bound@1.0.4", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "get-intrinsic": "^1.3.0" } }, "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg=="], + + "callsites": ["callsites@3.1.0", "", {}, "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="], + + "caniuse-lite": ["caniuse-lite@1.0.30001760", "", {}, "sha512-7AAMPcueWELt1p3mi13HR/LHH0TJLT11cnwDJEs3xA4+CK/PLKeO9Kl1oru24htkyUKtkGCvAx4ohB0Ttry8Dw=="], + + "ccount": ["ccount@2.0.1", "", {}, "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg=="], + + "chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="], + + "character-entities-html4": ["character-entities-html4@2.1.0", "", {}, "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA=="], + + "character-entities-legacy": ["character-entities-legacy@3.0.0", "", {}, "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ=="], + + "chokidar": ["chokidar@4.0.3", "", { "dependencies": { "readdirp": "^4.0.1" } }, "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA=="], + + "chownr": ["chownr@3.0.0", "", {}, "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g=="], + + "citty": ["citty@0.1.6", "", { "dependencies": { "consola": "^3.2.3" } }, "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ=="], + + "class-variance-authority": ["class-variance-authority@0.7.1", "", { "dependencies": { "clsx": "^2.1.1" } }, "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg=="], + + "classcat": ["classcat@5.0.5", "", {}, "sha512-JhZUT7JFcQy/EzW605k/ktHtncoo9vnyW/2GspNYwFlN1C/WmjuV/xtS04e9SOkL2sTdw0VAZ2UGCcQ9lR6p6w=="], + + "cli-cursor": ["cli-cursor@5.0.0", "", { "dependencies": { "restore-cursor": "^5.0.0" } }, "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw=="], + + "cli-spinners": ["cli-spinners@2.9.2", "", {}, "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg=="], + + "cli-width": ["cli-width@4.1.0", "", {}, "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ=="], + + "clipboardy": ["clipboardy@4.0.0", "", { "dependencies": { "execa": "^8.0.1", "is-wsl": "^3.1.0", "is64bit": "^2.0.0" } }, "sha512-5mOlNS0mhX0707P2I0aZ2V/cmHUEO/fL7VFLqszkhUsxt7RwnmrInf/eEQKlf5GzvYeHIjT+Ov1HRfNmymlG0w=="], + + "cliui": ["cliui@8.0.1", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" } }, "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ=="], + + "clsx": ["clsx@2.1.1", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="], + + "cluster-key-slot": ["cluster-key-slot@1.1.2", "", {}, "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA=="], + + "code-block-writer": ["code-block-writer@13.0.3", "", {}, "sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg=="], + + "codemirror": ["codemirror@6.0.2", "", { "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/commands": "^6.0.0", "@codemirror/language": "^6.0.0", "@codemirror/lint": "^6.0.0", "@codemirror/search": "^6.0.0", "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.0.0" } }, "sha512-VhydHotNW5w1UGK0Qj96BwSk/Zqbp9WbnyK2W/eVMv4QyF41INRGpjUhFJY7/uDNuudSc33a/PKr4iDqRduvHw=="], + + "color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="], + + "color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="], + + "comma-separated-tokens": ["comma-separated-tokens@2.0.3", "", {}, "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg=="], + + "commander": ["commander@14.0.3", "", {}, "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw=="], + + "commondir": ["commondir@1.0.1", "", {}, "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg=="], + + "compatx": ["compatx@0.2.0", "", {}, "sha512-6gLRNt4ygsi5NyMVhceOCFv14CIdDFN7fQjX1U4+47qVE/+kjPoXMK65KWK+dWxmFzMTuKazoQ9sch6pM0p5oA=="], + + "compress-commons": ["compress-commons@6.0.2", "", { "dependencies": { "crc-32": "^1.2.0", "crc32-stream": "^6.0.0", "is-stream": "^2.0.1", "normalize-path": "^3.0.0", "readable-stream": "^4.0.0" } }, "sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg=="], + + "confbox": ["confbox@0.2.2", "", {}, "sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ=="], + + "connect-history-api-fallback": ["connect-history-api-fallback@1.6.0", "", {}, "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg=="], + + "consola": ["consola@3.4.2", "", {}, "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA=="], + + "content-disposition": ["content-disposition@1.0.1", "", {}, "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q=="], + + "content-type": ["content-type@1.0.5", "", {}, "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA=="], + + "convert-source-map": ["convert-source-map@2.0.0", "", {}, "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg=="], + + "cookie": ["cookie@1.1.1", "", {}, "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ=="], + + "cookie-es": ["cookie-es@2.0.0", "", {}, "sha512-RAj4E421UYRgqokKUmotqAwuplYw15qtdXfY+hGzgCJ/MBjCVZcSoHK/kH9kocfjRjcDME7IiDWR/1WX1TM2Pg=="], + + "cookie-signature": ["cookie-signature@1.2.2", "", {}, "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg=="], + + "core-util-is": ["core-util-is@1.0.3", "", {}, "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="], + + "cors": ["cors@2.8.6", "", { "dependencies": { "object-assign": "^4", "vary": "^1" } }, "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw=="], + + "cosmiconfig": ["cosmiconfig@9.0.0", "", { "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", "js-yaml": "^4.1.0", "parse-json": "^5.2.0" }, "peerDependencies": { "typescript": ">=4.9.5" }, "optionalPeers": ["typescript"] }, "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg=="], + + "crc-32": ["crc-32@1.2.2", "", { "bin": { "crc32": "bin/crc32.njs" } }, "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ=="], + + "crc32-stream": ["crc32-stream@6.0.0", "", { "dependencies": { "crc-32": "^1.2.0", "readable-stream": "^4.0.0" } }, "sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g=="], + + "crelt": ["crelt@1.0.6", "", {}, "sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g=="], + + "croner": ["croner@9.1.0", "", {}, "sha512-p9nwwR4qyT5W996vBZhdvBCnMhicY5ytZkR4D1Xj0wuTDEiMnjwR57Q3RXYY/s0EpX6Ay3vgIcfaR+ewGHsi+g=="], + + "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], + + "crossws": ["crossws@0.3.5", "", { "dependencies": { "uncrypto": "^0.1.3" } }, "sha512-ojKiDvcmByhwa8YYqbQI/hg7MEU0NC03+pSdEq4ZUnZR9xXpwk7E43SMNGkn+JxJGPFtNvQ48+vV2p+P1ml5PA=="], + + "css-box-model": ["css-box-model@1.2.1", "", { "dependencies": { "tiny-invariant": "^1.0.6" } }, "sha512-a7Vr4Q/kd/aw96bnJG332W9V9LkJO69JRcaCYDUqjp6/z0w6VcZjgAcTbgFxEPfBgdnAwlh3iwu+hLopa+flJw=="], + + "cssesc": ["cssesc@3.0.0", "", { "bin": { "cssesc": "bin/cssesc" } }, "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg=="], + + "csstype": ["csstype@3.2.3", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="], + + "d3-color": ["d3-color@3.1.0", "", {}, "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA=="], + + "d3-dispatch": ["d3-dispatch@3.0.1", "", {}, "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg=="], + + "d3-drag": ["d3-drag@3.0.0", "", { "dependencies": { "d3-dispatch": "1 - 3", "d3-selection": "3" } }, "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg=="], + + "d3-ease": ["d3-ease@3.0.1", "", {}, "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w=="], + + "d3-interpolate": ["d3-interpolate@3.0.1", "", { "dependencies": { "d3-color": "1 - 3" } }, "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g=="], + + "d3-selection": ["d3-selection@3.0.0", "", {}, "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ=="], + + "d3-timer": ["d3-timer@3.0.1", "", {}, "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA=="], + + "d3-transition": ["d3-transition@3.0.1", "", { "dependencies": { "d3-color": "1 - 3", "d3-dispatch": "1 - 3", "d3-ease": "1 - 3", "d3-interpolate": "1 - 3", "d3-timer": "1 - 3" }, "peerDependencies": { "d3-selection": "2 - 3" } }, "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w=="], + + "d3-zoom": ["d3-zoom@3.0.0", "", { "dependencies": { "d3-dispatch": "1 - 3", "d3-drag": "2 - 3", "d3-interpolate": "1 - 3", "d3-selection": "2 - 3", "d3-transition": "2 - 3" } }, "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw=="], + + "data-uri-to-buffer": ["data-uri-to-buffer@4.0.1", "", {}, "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A=="], + + "dayjs": ["dayjs@1.11.19", "", {}, "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw=="], + + "db0": ["db0@0.3.4", "", { "peerDependencies": { "@electric-sql/pglite": "*", "@libsql/client": "*", "better-sqlite3": "*", "drizzle-orm": "*", "mysql2": "*", "sqlite3": "*" }, "optionalPeers": ["@electric-sql/pglite", "@libsql/client", "better-sqlite3", "drizzle-orm", "mysql2", "sqlite3"] }, "sha512-RiXXi4WaNzPTHEOu8UPQKMooIbqOEyqA1t7Z6MsdxSCeb8iUC9ko3LcmsLmeUt2SM5bctfArZKkRQggKZz7JNw=="], + + "debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="], + + "dedent": ["dedent@1.7.1", "", { "peerDependencies": { "babel-plugin-macros": "^3.1.0" }, "optionalPeers": ["babel-plugin-macros"] }, "sha512-9JmrhGZpOlEgOLdQgSm0zxFaYoQon408V1v49aqTWuXENVlnCuY9JBZcXZiCsZQWDjTm5Qf/nIvAy77mXDAjEg=="], + + "deepmerge": ["deepmerge@4.3.1", "", {}, "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A=="], + + "default-browser": ["default-browser@5.5.0", "", { "dependencies": { "bundle-name": "^4.1.0", "default-browser-id": "^5.0.0" } }, "sha512-H9LMLr5zwIbSxrmvikGuI/5KGhZ8E2zH3stkMgM5LpOWDutGM2JZaj460Udnf1a+946zc7YBgrqEWwbk7zHvGw=="], + + "default-browser-id": ["default-browser-id@5.0.1", "", {}, "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q=="], + + "define-lazy-prop": ["define-lazy-prop@3.0.0", "", {}, "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg=="], + + "defu": ["defu@6.1.4", "", {}, "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg=="], + + "denque": ["denque@2.1.0", "", {}, "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw=="], + + "depd": ["depd@2.0.0", "", {}, "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="], + + "dequal": ["dequal@2.0.3", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="], + + "destr": ["destr@2.0.5", "", {}, "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA=="], + + "detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="], + + "detect-node-es": ["detect-node-es@1.1.0", "", {}, "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ=="], + + "devlop": ["devlop@1.1.0", "", { "dependencies": { "dequal": "^2.0.0" } }, "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA=="], + + "dexie": ["dexie@4.3.0", "", {}, "sha512-5EeoQpJvMKHe6zWt/FSIIuRa3CWlZeIl6zKXt+Lz7BU6RoRRLgX9dZEynRfXrkLcldKYCBiz7xekTEylnie1Ug=="], + + "diff": ["diff@8.0.2", "", {}, "sha512-sSuxWU5j5SR9QQji/o2qMvqRNYRDOcBTgsJ/DeCf4iSN4gW+gNMXM7wFIP+fdXZxoNiAnHUTGjCr+TSWXdRDKg=="], + + "discontinuous-range": ["discontinuous-range@1.0.0", "", {}, "sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ=="], + + "dot-prop": ["dot-prop@10.1.0", "", { "dependencies": { "type-fest": "^5.0.0" } }, "sha512-MVUtAugQMOff5RnBy2d9N31iG0lNwg1qAoAOn7pOK5wf94WIaE3My2p3uwTQuvS2AcqchkcR3bHByjaM0mmi7Q=="], + + "dotenv": ["dotenv@17.2.3", "", {}, "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w=="], + + "dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="], + + "duplexer": ["duplexer@0.1.2", "", {}, "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg=="], + + "eastasianwidth": ["eastasianwidth@0.2.0", "", {}, "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="], + + "ebnf": ["ebnf@1.9.1", "", { "bin": { "ebnf": "dist/bin.js" } }, "sha512-uW2UKSsuty9ANJ3YByIQE4ANkD8nqUPO7r6Fwcc1ADKPe9FRdcPpMl3VEput4JSvKBJ4J86npIC2MLP0pYkCuw=="], + + "eciesjs": ["eciesjs@0.4.17", "", { "dependencies": { "@ecies/ciphers": "^0.2.5", "@noble/ciphers": "^1.3.0", "@noble/curves": "^1.9.7", "@noble/hashes": "^1.8.0" } }, "sha512-TOOURki4G7sD1wDCjj7NfLaXZZ49dFOeEb5y39IXpb8p0hRzVvfvzZHOi5JcT+PpyAbi/Y+lxPb8eTag2WYH8w=="], + + "ee-first": ["ee-first@1.1.1", "", {}, "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="], + + "electron-to-chromium": ["electron-to-chromium@1.5.267", "", {}, "sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw=="], + + "emoji-regex": ["emoji-regex@10.6.0", "", {}, "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="], + + "emoji-regex-xs": ["emoji-regex-xs@1.0.0", "", {}, "sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg=="], + + "encodeurl": ["encodeurl@2.0.0", "", {}, "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg=="], + + "enhanced-resolve": ["enhanced-resolve@5.20.0", "", { "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.3.0" } }, "sha512-/ce7+jQ1PQ6rVXwe+jKEg5hW5ciicHwIQUagZkp6IufBoY3YDgdTTY1azVs0qoRgVmvsNB+rbjLJxDAeHHtwsQ=="], + + "entities": ["entities@6.0.1", "", {}, "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g=="], + + "env-paths": ["env-paths@2.2.1", "", {}, "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A=="], + + "error-ex": ["error-ex@1.3.4", "", { "dependencies": { "is-arrayish": "^0.2.1" } }, "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ=="], + + "error-stack-parser": ["error-stack-parser@2.1.4", "", { "dependencies": { "stackframe": "^1.3.4" } }, "sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ=="], + + "error-stack-parser-es": ["error-stack-parser-es@1.0.5", "", {}, "sha512-5qucVt2XcuGMcEGgWI7i+yZpmpByQ8J1lHhcL7PwqCwu9FPP3VUXzT4ltHe5i2z9dePwEHcDVOAfSnHsOlCXRA=="], + + "es-define-property": ["es-define-property@1.0.1", "", {}, "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g=="], + + "es-errors": ["es-errors@1.3.0", "", {}, "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="], + + "es-module-lexer": ["es-module-lexer@1.7.0", "", {}, "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA=="], + + "es-object-atoms": ["es-object-atoms@1.1.1", "", { "dependencies": { "es-errors": "^1.3.0" } }, "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA=="], + + "esbuild": ["esbuild@0.25.12", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.25.12", "@esbuild/android-arm": "0.25.12", "@esbuild/android-arm64": "0.25.12", "@esbuild/android-x64": "0.25.12", "@esbuild/darwin-arm64": "0.25.12", "@esbuild/darwin-x64": "0.25.12", "@esbuild/freebsd-arm64": "0.25.12", "@esbuild/freebsd-x64": "0.25.12", "@esbuild/linux-arm": "0.25.12", "@esbuild/linux-arm64": "0.25.12", "@esbuild/linux-ia32": "0.25.12", "@esbuild/linux-loong64": "0.25.12", "@esbuild/linux-mips64el": "0.25.12", "@esbuild/linux-ppc64": "0.25.12", "@esbuild/linux-riscv64": "0.25.12", "@esbuild/linux-s390x": "0.25.12", "@esbuild/linux-x64": "0.25.12", "@esbuild/netbsd-arm64": "0.25.12", "@esbuild/netbsd-x64": "0.25.12", "@esbuild/openbsd-arm64": "0.25.12", "@esbuild/openbsd-x64": "0.25.12", "@esbuild/openharmony-arm64": "0.25.12", "@esbuild/sunos-x64": "0.25.12", "@esbuild/win32-arm64": "0.25.12", "@esbuild/win32-ia32": "0.25.12", "@esbuild/win32-x64": "0.25.12" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg=="], + + "escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="], + + "escape-html": ["escape-html@1.0.3", "", {}, "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="], + + "escape-string-regexp": ["escape-string-regexp@5.0.0", "", {}, "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw=="], + + "esprima": ["esprima@4.0.1", "", { "bin": { "esparse": "./bin/esparse.js", "esvalidate": "./bin/esvalidate.js" } }, "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="], + + "estree-walker": ["estree-walker@2.0.2", "", {}, "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="], + + "etag": ["etag@1.8.1", "", {}, "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="], + + "event-target-shim": ["event-target-shim@5.0.1", "", {}, "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="], + + "events": ["events@3.3.0", "", {}, "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q=="], + + "events-universal": ["events-universal@1.0.1", "", { "dependencies": { "bare-events": "^2.7.0" } }, "sha512-LUd5euvbMLpwOF8m6ivPCbhQeSiYVNb8Vs0fQ8QjXo0JTkEHpz8pxdQf0gStltaPpw0Cca8b39KxvK9cfKRiAw=="], + + "eventsource": ["eventsource@3.0.7", "", { "dependencies": { "eventsource-parser": "^3.0.1" } }, "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA=="], + + "eventsource-parser": ["eventsource-parser@3.0.6", "", {}, "sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg=="], + + "execa": ["execa@9.6.1", "", { "dependencies": { "@sindresorhus/merge-streams": "^4.0.0", "cross-spawn": "^7.0.6", "figures": "^6.1.0", "get-stream": "^9.0.0", "human-signals": "^8.0.1", "is-plain-obj": "^4.1.0", "is-stream": "^4.0.1", "npm-run-path": "^6.0.0", "pretty-ms": "^9.2.0", "signal-exit": "^4.1.0", "strip-final-newline": "^4.0.0", "yoctocolors": "^2.1.1" } }, "sha512-9Be3ZoN4LmYR90tUoVu2te2BsbzHfhJyfEiAVfz7N5/zv+jduIfLrV2xdQXOHbaD6KgpGdO9PRPM1Y4Q9QkPkA=="], + + "express": ["express@5.2.1", "", { "dependencies": { "accepts": "^2.0.0", "body-parser": "^2.2.1", "content-disposition": "^1.0.0", "content-type": "^1.0.5", "cookie": "^0.7.1", "cookie-signature": "^1.2.1", "debug": "^4.4.0", "depd": "^2.0.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "finalhandler": "^2.1.0", "fresh": "^2.0.0", "http-errors": "^2.0.0", "merge-descriptors": "^2.0.0", "mime-types": "^3.0.0", "on-finished": "^2.4.1", "once": "^1.4.0", "parseurl": "^1.3.3", "proxy-addr": "^2.0.7", "qs": "^6.14.0", "range-parser": "^1.2.1", "router": "^2.2.0", "send": "^1.1.0", "serve-static": "^2.2.0", "statuses": "^2.0.1", "type-is": "^2.0.1", "vary": "^1.1.2" } }, "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw=="], + + "express-rate-limit": ["express-rate-limit@8.2.1", "", { "dependencies": { "ip-address": "10.0.1" }, "peerDependencies": { "express": ">= 4.11" } }, "sha512-PCZEIEIxqwhzw4KF0n7QF4QqruVTcF73O5kFKUnGOyjbCCgizBBiFaYpd/fnBLUMPw/BWw9OsiN7GgrNYr7j6g=="], + + "exsolve": ["exsolve@1.0.8", "", {}, "sha512-LmDxfWXwcTArk8fUEnOfSZpHOJ6zOMUJKOtFLFqJLoKJetuQG874Uc7/Kki7zFLzYybmZhp1M7+98pfMqeX8yA=="], + + "fast-copy": ["fast-copy@3.0.2", "", {}, "sha512-dl0O9Vhju8IrcLndv2eU4ldt1ftXMqqfgN4H1cpmGV7P6jeB9FwpN9a2c8DPGE1Ys88rNUJVYDHq73CGAGOPfQ=="], + + "fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="], + + "fast-fifo": ["fast-fifo@1.3.2", "", {}, "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ=="], + + "fast-glob": ["fast-glob@3.3.3", "", { "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", "micromatch": "^4.0.8" } }, "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg=="], + + "fast-uri": ["fast-uri@3.1.0", "", {}, "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA=="], + + "fast-xml-parser": ["fast-xml-parser@5.3.5", "", { "dependencies": { "strnum": "^2.1.2" }, "bin": { "fxparser": "src/cli/cli.js" } }, "sha512-JeaA2Vm9ffQKp9VjvfzObuMCjUYAp5WDYhRYL5LrBPY/jUDlUtOvDfot0vKSkB9tuX885BDHjtw4fZadD95wnA=="], + + "fastq": ["fastq@1.19.1", "", { "dependencies": { "reusify": "^1.0.4" } }, "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ=="], + + "fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="], + + "fetch-blob": ["fetch-blob@3.2.0", "", { "dependencies": { "node-domexception": "^1.0.0", "web-streams-polyfill": "^3.0.3" } }, "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ=="], + + "figures": ["figures@6.1.0", "", { "dependencies": { "is-unicode-supported": "^2.0.0" } }, "sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg=="], + + "file-uri-to-path": ["file-uri-to-path@1.0.0", "", {}, "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="], + + "fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="], + + "finalhandler": ["finalhandler@2.1.1", "", { "dependencies": { "debug": "^4.4.0", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "on-finished": "^2.4.1", "parseurl": "^1.3.3", "statuses": "^2.0.1" } }, "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA=="], + + "foreground-child": ["foreground-child@3.3.1", "", { "dependencies": { "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" } }, "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw=="], + + "formdata-polyfill": ["formdata-polyfill@4.0.10", "", { "dependencies": { "fetch-blob": "^3.1.2" } }, "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g=="], + + "forwarded": ["forwarded@0.2.0", "", {}, "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="], + + "fresh": ["fresh@2.0.0", "", {}, "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A=="], + + "fs-extra": ["fs-extra@11.3.3", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-VWSRii4t0AFm6ixFFmLLx1t7wS1gh+ckoa84aOeapGum0h+EZd1EhEumSB+ZdDLnEPuucsVB9oB7cxJHap6Afg=="], + + "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], + + "function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="], + + "fuzzysort": ["fuzzysort@3.1.0", "", {}, "sha512-sR9BNCjBg6LNgwvxlBd0sBABvQitkLzoVY9MYYROQVX/FvfJ4Mai9LsGhDgd8qYdds0bY77VzYd5iuB+v5rwQQ=="], + + "fzf": ["fzf@0.5.2", "", {}, "sha512-Tt4kuxLXFKHy8KT40zwsUPUkg1CrsgY25FxA2U/j/0WgEDCk3ddc/zLTCCcbSHX9FcKtLuVaDGtGE/STWC+j3Q=="], + + "gensync": ["gensync@1.0.0-beta.2", "", {}, "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="], + + "get-caller-file": ["get-caller-file@2.0.5", "", {}, "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="], + + "get-east-asian-width": ["get-east-asian-width@1.4.0", "", {}, "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q=="], + + "get-intrinsic": ["get-intrinsic@1.3.0", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "math-intrinsics": "^1.1.0" } }, "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ=="], + + "get-nonce": ["get-nonce@1.0.1", "", {}, "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q=="], + + "get-own-enumerable-keys": ["get-own-enumerable-keys@1.0.0", "", {}, "sha512-PKsK2FSrQCyxcGHsGrLDcK0lx+0Ke+6e8KFFozA9/fIQLhQzPaRvJFdcz7+Axg3jUH/Mq+NI4xa5u/UT2tQskA=="], + + "get-port-please": ["get-port-please@3.2.0", "", {}, "sha512-I9QVvBw5U/hw3RmWpYKRumUeaDgxTPd401x364rLmWBJcOQ753eov1eTgzDqRG9bqFIfDc7gfzcQEWrUri3o1A=="], + + "get-proto": ["get-proto@1.0.1", "", { "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" } }, "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g=="], + + "get-stream": ["get-stream@9.0.1", "", { "dependencies": { "@sec-ant/readable-stream": "^0.4.1", "is-stream": "^4.0.1" } }, "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA=="], + + "giget": ["giget@2.0.0", "", { "dependencies": { "citty": "^0.1.6", "consola": "^3.4.0", "defu": "^6.1.4", "node-fetch-native": "^1.6.6", "nypm": "^0.6.0", "pathe": "^2.0.3" }, "bin": { "giget": "dist/cli.mjs" } }, "sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA=="], + + "glob": ["glob@10.5.0", "", { "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" } }, "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg=="], + + "glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], + + "globby": ["globby@15.0.0", "", { "dependencies": { "@sindresorhus/merge-streams": "^4.0.0", "fast-glob": "^3.3.3", "ignore": "^7.0.5", "path-type": "^6.0.0", "slash": "^5.1.0", "unicorn-magic": "^0.3.0" } }, "sha512-oB4vkQGqlMl682wL1IlWd02tXCbquGWM4voPEI85QmNKCaw8zGTm1f1rubFgkg3Eli2PtKlFgrnmUqasbQWlkw=="], + + "gopd": ["gopd@1.2.0", "", {}, "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="], + + "graceful-fs": ["graceful-fs@4.2.11", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="], + + "graphql": ["graphql@16.12.0", "", {}, "sha512-DKKrynuQRne0PNpEbzuEdHlYOMksHSUI8Zc9Unei5gTsMNA2/vMpoMz/yKba50pejK56qj98qM0SjYxAKi13gQ=="], + + "gzip-size": ["gzip-size@7.0.0", "", { "dependencies": { "duplexer": "^0.1.2" } }, "sha512-O1Ld7Dr+nqPnmGpdhzLmMTQ4vAsD+rHwMm1NLUmoUFFymBOMKxCCrtDxqdBRYXdeEPEi3SyoR4TizJLQrnKBNA=="], + + "h3": ["h3@2.0.1-rc.4", "", { "dependencies": { "rou3": "^0.7.8", "srvx": "^0.9.1" }, "peerDependencies": { "crossws": "^0.4.1" }, "optionalPeers": ["crossws"] }, "sha512-vZq8pEUp6THsXKXrUXX44eOqfChic2wVQ1GlSzQCBr7DeFBkfIZAo2WyNND4GSv54TAa0E4LYIK73WSPdgKUgw=="], + + "has-symbols": ["has-symbols@1.1.0", "", {}, "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="], + + "hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="], + + "hast-util-to-html": ["hast-util-to-html@9.0.5", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-whitespace": "^3.0.0", "html-void-elements": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "stringify-entities": "^4.0.0", "zwitch": "^2.0.4" } }, "sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw=="], + + "hast-util-whitespace": ["hast-util-whitespace@3.0.0", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw=="], + + "headers-polyfill": ["headers-polyfill@4.0.3", "", {}, "sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ=="], + + "hls.js": ["hls.js@1.6.15", "", {}, "sha512-E3a5VwgXimGHwpRGV+WxRTKeSp2DW5DI5MWv34ulL3t5UNmyJWCQ1KmLEHbYzcfThfXG8amBL+fCYPneGHC4VA=="], + + "hono": ["hono@4.12.5", "", {}, "sha512-3qq+FUBtlTHhtYxbxheZgY8NIFnkkC/MR8u5TTsr7YZ3wixryQ3cCwn3iZbg8p8B88iDBBAYSfZDS75t8MN7Vg=="], + + "hookable": ["hookable@5.5.3", "", {}, "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ=="], + + "html-entities": ["html-entities@2.3.3", "", {}, "sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA=="], + + "html-to-image": ["html-to-image@1.11.13", "", {}, "sha512-cuOPoI7WApyhBElTTb9oqsawRvZ0rHhaHwghRLlTuffoD1B2aDemlCruLeZrUIIdvG7gs9xeELEPm6PhuASqrg=="], + + "html-void-elements": ["html-void-elements@3.0.0", "", {}, "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg=="], + + "http-errors": ["http-errors@2.0.1", "", { "dependencies": { "depd": "~2.0.0", "inherits": "~2.0.4", "setprototypeof": "~1.2.0", "statuses": "~2.0.2", "toidentifier": "~1.0.1" } }, "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ=="], + + "http-shutdown": ["http-shutdown@1.2.2", "", {}, "sha512-S9wWkJ/VSY9/k4qcjG318bqJNruzE4HySUhFYknwmu6LBP97KLLfwNf+n4V1BHurvFNkSKLFnK/RsuUnRTf9Vw=="], + + "https-proxy-agent": ["https-proxy-agent@7.0.6", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="], + + "httpxy": ["httpxy@0.1.7", "", {}, "sha512-pXNx8gnANKAndgga5ahefxc++tJvNL87CXoRwxn1cJE2ZkWEojF3tNfQIEhZX/vfpt+wzeAzpUI4qkediX1MLQ=="], + + "human-signals": ["human-signals@8.0.1", "", {}, "sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ=="], + + "iconv-lite": ["iconv-lite@0.7.2", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw=="], + + "ieee754": ["ieee754@1.2.1", "", {}, "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="], + + "ignore": ["ignore@5.3.2", "", {}, "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g=="], + + "import-fresh": ["import-fresh@3.3.1", "", { "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" } }, "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ=="], + + "inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="], + + "ioredis": ["ioredis@5.10.0", "", { "dependencies": { "@ioredis/commands": "1.5.1", "cluster-key-slot": "^1.1.0", "debug": "^4.3.4", "denque": "^2.1.0", "lodash.defaults": "^4.2.0", "lodash.isarguments": "^3.1.0", "redis-errors": "^1.2.0", "redis-parser": "^3.0.0", "standard-as-callback": "^2.1.0" } }, "sha512-HVBe9OFuqs+Z6n64q09PQvP1/R4Bm+30PAyyD4wIEqssh3v9L21QjCVk4kRLucMBcDokJTcLjsGeVRlq/nH6DA=="], + + "ip-address": ["ip-address@10.0.1", "", {}, "sha512-NWv9YLW4PoW2B7xtzaS3NCot75m6nK7Icdv0o3lfMceJVRfSoQwqD4wEH5rLwoKJwUiZ/rfpiVBhnaF0FK4HoA=="], + + "ipaddr.js": ["ipaddr.js@1.9.1", "", {}, "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="], + + "iron-webcrypto": ["iron-webcrypto@1.2.1", "", {}, "sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg=="], + + "is-arrayish": ["is-arrayish@0.2.1", "", {}, "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg=="], + + "is-core-module": ["is-core-module@2.16.1", "", { "dependencies": { "hasown": "^2.0.2" } }, "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w=="], + + "is-docker": ["is-docker@3.0.0", "", { "bin": { "is-docker": "cli.js" } }, "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ=="], + + "is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="], + + "is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="], + + "is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="], + + "is-in-ssh": ["is-in-ssh@1.0.0", "", {}, "sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw=="], + + "is-inside-container": ["is-inside-container@1.0.0", "", { "dependencies": { "is-docker": "^3.0.0" }, "bin": { "is-inside-container": "cli.js" } }, "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA=="], + + "is-interactive": ["is-interactive@2.0.0", "", {}, "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ=="], + + "is-module": ["is-module@1.0.0", "", {}, "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g=="], + + "is-node-process": ["is-node-process@1.2.0", "", {}, "sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw=="], + + "is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="], + + "is-obj": ["is-obj@3.0.0", "", {}, "sha512-IlsXEHOjtKhpN8r/tRFj2nDyTmHvcfNeu/nrRIcXE17ROeatXchkojffa1SpdqW4cr/Fj6QkEf/Gn4zf6KKvEQ=="], + + "is-plain-obj": ["is-plain-obj@4.1.0", "", {}, "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg=="], + + "is-plain-object": ["is-plain-object@5.0.0", "", {}, "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q=="], + + "is-promise": ["is-promise@4.0.0", "", {}, "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ=="], + + "is-reference": ["is-reference@1.2.1", "", { "dependencies": { "@types/estree": "*" } }, "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ=="], + + "is-regexp": ["is-regexp@3.1.0", "", {}, "sha512-rbku49cWloU5bSMI+zaRaXdQHXnthP6DZ/vLnfdSKyL4zUzuWnomtOEiZZOd+ioQ+avFo/qau3KPTc7Fjy1uPA=="], + + "is-stream": ["is-stream@4.0.1", "", {}, "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A=="], + + "is-unicode-supported": ["is-unicode-supported@2.1.0", "", {}, "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ=="], + + "is-what": ["is-what@4.1.16", "", {}, "sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A=="], + + "is-wsl": ["is-wsl@3.1.0", "", { "dependencies": { "is-inside-container": "^1.0.0" } }, "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw=="], + + "is64bit": ["is64bit@2.0.0", "", { "dependencies": { "system-architecture": "^0.1.0" } }, "sha512-jv+8jaWCl0g2lSBkNSVXdzfBA0npK1HGC2KtWM9FumFRoGS94g3NbCCLVnCYHLjp4GrW2KZeeSTMo5ddtznmGw=="], + + "isarray": ["isarray@1.0.0", "", {}, "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="], + + "isexe": ["isexe@3.1.1", "", {}, "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ=="], + + "jackspeak": ["jackspeak@3.4.3", "", { "dependencies": { "@isaacs/cliui": "^8.0.2" }, "optionalDependencies": { "@pkgjs/parseargs": "^0.11.0" } }, "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw=="], + + "jiti": ["jiti@2.6.1", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ=="], + + "jose": ["jose@6.1.3", "", {}, "sha512-0TpaTfihd4QMNwrz/ob2Bp7X04yuxJkjRGi4aKmOqwhov54i6u79oCv7T+C7lo70MKH6BesI3vscD1yb/yzKXQ=="], + + "js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="], + + "js-yaml": ["js-yaml@4.1.1", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA=="], + + "jsesc": ["jsesc@3.1.0", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA=="], + + "json-parse-even-better-errors": ["json-parse-even-better-errors@2.3.1", "", {}, "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w=="], + + "json-schema-library": ["json-schema-library@10.0.0-rc7", "", { "dependencies": { "@sagold/json-pointer": "^6.0.1", "@sagold/json-query": "^6.2.0", "deepmerge": "^4.3.1", "fast-copy": "^3.0.2", "fast-deep-equal": "^3.1.3", "smtp-address-parser": "1.0.10", "valid-url": "^1.0.9" } }, "sha512-q9DMhftVyO8Xa8cfupS5Kx5Uv1A9OJvyRn8DVDMATQv8bITq18cdZimWilwjHIuf2Mzphy67bSJU9gEFno7BLw=="], + + "json-schema-to-ts": ["json-schema-to-ts@3.1.1", "", { "dependencies": { "@babel/runtime": "^7.18.3", "ts-algebra": "^2.0.0" } }, "sha512-+DWg8jCJG2TEnpy7kOm/7/AxaYoaRbjVB4LFZLySZlWn8exGs3A4OLJR966cVvU26N7X9TWxl+Jsw7dzAqKT6g=="], + + "json-schema-traverse": ["json-schema-traverse@1.0.0", "", {}, "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="], + + "json-schema-typed": ["json-schema-typed@8.0.2", "", {}, "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA=="], + + "json5": ["json5@2.2.3", "", { "bin": { "json5": "lib/cli.js" } }, "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="], + + "jsonfile": ["jsonfile@6.2.0", "", { "dependencies": { "universalify": "^2.0.0" }, "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg=="], + + "jsonv-ts": ["jsonv-ts@0.10.1", "", { "optionalDependencies": { "hono": "*" }, "peerDependencies": { "typescript": "^5.0.0" } }, "sha512-IfuXZigNjLQzW4X7dLRTpwd1pD1lk86SoXBWmLdF+VE6SE4PcXevWs8c/bPl7qVrZXhh8lYwbTF7TFtgO2/jXg=="], + + "kind-of": ["kind-of@6.0.3", "", {}, "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="], + + "kleur": ["kleur@4.1.5", "", {}, "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ=="], + + "klona": ["klona@2.0.6", "", {}, "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA=="], + + "knitwork": ["knitwork@1.3.0", "", {}, "sha512-4LqMNoONzR43B1W0ek0fhXMsDNW/zxa1NdFAVMY+k28pgZLovR4G3PB5MrpTxCy1QaZCqNoiaKPr5w5qZHfSNw=="], + + "kysely": ["kysely@0.28.8", "", {}, "sha512-QUOgl5ZrS9IRuhq5FvOKFSsD/3+IA6MLE81/bOOTRA/YQpKDza2sFdN5g6JCB9BOpqMJDGefLCQ9F12hRS13TA=="], + + "lazystream": ["lazystream@1.0.1", "", { "dependencies": { "readable-stream": "^2.0.5" } }, "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw=="], + + "lightningcss": ["lightningcss@1.30.2", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.30.2", "lightningcss-darwin-arm64": "1.30.2", "lightningcss-darwin-x64": "1.30.2", "lightningcss-freebsd-x64": "1.30.2", "lightningcss-linux-arm-gnueabihf": "1.30.2", "lightningcss-linux-arm64-gnu": "1.30.2", "lightningcss-linux-arm64-musl": "1.30.2", "lightningcss-linux-x64-gnu": "1.30.2", "lightningcss-linux-x64-musl": "1.30.2", "lightningcss-win32-arm64-msvc": "1.30.2", "lightningcss-win32-x64-msvc": "1.30.2" } }, "sha512-utfs7Pr5uJyyvDETitgsaqSyjCb2qNRAtuqUeWIAKztsOYdcACf2KtARYXg2pSvhkt+9NfoaNY7fxjl6nuMjIQ=="], + + "lightningcss-android-arm64": ["lightningcss-android-arm64@1.30.2", "", { "os": "android", "cpu": "arm64" }, "sha512-BH9sEdOCahSgmkVhBLeU7Hc9DWeZ1Eb6wNS6Da8igvUwAe0sqROHddIlvU06q3WyXVEOYDZ6ykBZQnjTbmo4+A=="], + + "lightningcss-darwin-arm64": ["lightningcss-darwin-arm64@1.30.2", "", { "os": "darwin", "cpu": "arm64" }, "sha512-ylTcDJBN3Hp21TdhRT5zBOIi73P6/W0qwvlFEk22fkdXchtNTOU4Qc37SkzV+EKYxLouZ6M4LG9NfZ1qkhhBWA=="], + + "lightningcss-darwin-x64": ["lightningcss-darwin-x64@1.30.2", "", { "os": "darwin", "cpu": "x64" }, "sha512-oBZgKchomuDYxr7ilwLcyms6BCyLn0z8J0+ZZmfpjwg9fRVZIR5/GMXd7r9RH94iDhld3UmSjBM6nXWM2TfZTQ=="], + + "lightningcss-freebsd-x64": ["lightningcss-freebsd-x64@1.30.2", "", { "os": "freebsd", "cpu": "x64" }, "sha512-c2bH6xTrf4BDpK8MoGG4Bd6zAMZDAXS569UxCAGcA7IKbHNMlhGQ89eRmvpIUGfKWNVdbhSbkQaWhEoMGmGslA=="], + + "lightningcss-linux-arm-gnueabihf": ["lightningcss-linux-arm-gnueabihf@1.30.2", "", { "os": "linux", "cpu": "arm" }, "sha512-eVdpxh4wYcm0PofJIZVuYuLiqBIakQ9uFZmipf6LF/HRj5Bgm0eb3qL/mr1smyXIS1twwOxNWndd8z0E374hiA=="], + + "lightningcss-linux-arm64-gnu": ["lightningcss-linux-arm64-gnu@1.30.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-UK65WJAbwIJbiBFXpxrbTNArtfuznvxAJw4Q2ZGlU8kPeDIWEX1dg3rn2veBVUylA2Ezg89ktszWbaQnxD/e3A=="], + + "lightningcss-linux-arm64-musl": ["lightningcss-linux-arm64-musl@1.30.2", "", { "os": "linux", "cpu": "arm64" }, "sha512-5Vh9dGeblpTxWHpOx8iauV02popZDsCYMPIgiuw97OJ5uaDsL86cnqSFs5LZkG3ghHoX5isLgWzMs+eD1YzrnA=="], + + "lightningcss-linux-x64-gnu": ["lightningcss-linux-x64-gnu@1.30.2", "", { "os": "linux", "cpu": "x64" }, "sha512-Cfd46gdmj1vQ+lR6VRTTadNHu6ALuw2pKR9lYq4FnhvgBc4zWY1EtZcAc6EffShbb1MFrIPfLDXD6Xprbnni4w=="], + + "lightningcss-linux-x64-musl": ["lightningcss-linux-x64-musl@1.30.2", "", { "os": "linux", "cpu": "x64" }, "sha512-XJaLUUFXb6/QG2lGIW6aIk6jKdtjtcffUT0NKvIqhSBY3hh9Ch+1LCeH80dR9q9LBjG3ewbDjnumefsLsP6aiA=="], + + "lightningcss-win32-arm64-msvc": ["lightningcss-win32-arm64-msvc@1.30.2", "", { "os": "win32", "cpu": "arm64" }, "sha512-FZn+vaj7zLv//D/192WFFVA0RgHawIcHqLX9xuWiQt7P0PtdFEVaxgF9rjM/IRYHQXNnk61/H/gb2Ei+kUQ4xQ=="], + + "lightningcss-win32-x64-msvc": ["lightningcss-win32-x64-msvc@1.30.2", "", { "os": "win32", "cpu": "x64" }, "sha512-5g1yc73p+iAkid5phb4oVFMB45417DkRevRbt/El/gKXJk4jid+vPFF/AXbxn05Aky8PapwzZrdJShv5C0avjw=="], + + "lines-and-columns": ["lines-and-columns@1.2.4", "", {}, "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="], + + "listhen": ["listhen@1.9.0", "", { "dependencies": { "@parcel/watcher": "^2.4.1", "@parcel/watcher-wasm": "^2.4.1", "citty": "^0.1.6", "clipboardy": "^4.0.0", "consola": "^3.2.3", "crossws": ">=0.2.0 <0.4.0", "defu": "^6.1.4", "get-port-please": "^3.1.2", "h3": "^1.12.0", "http-shutdown": "^1.2.2", "jiti": "^2.1.2", "mlly": "^1.7.1", "node-forge": "^1.3.1", "pathe": "^1.1.2", "std-env": "^3.7.0", "ufo": "^1.5.4", "untun": "^0.1.3", "uqr": "^0.1.2" }, "bin": { "listen": "bin/listhen.mjs", "listhen": "bin/listhen.mjs" } }, "sha512-I8oW2+QL5KJo8zXNWX046M134WchxsXC7SawLPvRQpogCbkyQIaFxPE89A2HiwR7vAK2Dm2ERBAmyjTYGYEpBg=="], + + "local-pkg": ["local-pkg@1.1.2", "", { "dependencies": { "mlly": "^1.7.4", "pkg-types": "^2.3.0", "quansync": "^0.2.11" } }, "sha512-arhlxbFRmoQHl33a0Zkle/YWlmNwoyt6QNZEIJcqNbdrsix5Lvc4HyyI3EnwxTYlZYc32EbYrQ8SzEZ7dqgg9A=="], + + "lodash": ["lodash@4.17.21", "", {}, "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="], + + "lodash-es": ["lodash-es@4.17.23", "", {}, "sha512-kVI48u3PZr38HdYz98UmfPnXl2DXrpdctLrFLCd3kOx1xUkOmpFPx7gCWWM5MPkL/fD8zb+Ph0QzjGFs4+hHWg=="], + + "lodash.defaults": ["lodash.defaults@4.2.0", "", {}, "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ=="], + + "lodash.isarguments": ["lodash.isarguments@3.1.0", "", {}, "sha512-chi4NHZlZqZD18a0imDHnZPrDeBbTtVN7GXMwuGdRH9qotxAjYs3aVLKc7zNOG9eddR5Ksd8rvFEBc9SsggPpg=="], + + "log-symbols": ["log-symbols@6.0.0", "", { "dependencies": { "chalk": "^5.3.0", "is-unicode-supported": "^1.3.0" } }, "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw=="], + + "lru-cache": ["lru-cache@5.1.1", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="], + + "lucide-react": ["lucide-react@0.564.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-JJ8GVTQqFwuliifD48U6+h7DXEHdkhJ/E87kksGByII3qHxtPciVb8T8woQONHBQgHVOl7rSMrrip3SeVNy7Fg=="], + + "lucide-solid": ["lucide-solid@0.563.0", "", { "peerDependencies": { "solid-js": "^1.4.7" } }, "sha512-Ort9I6BaKdarM/e0VwWddcd9tuven/y0wHqfXIPNzPPe3zwXtIZJDjR2UcAj2XBCfx1aHw/SWiLHPvn9O1Fniw=="], + + "magic-string": ["magic-string@0.30.21", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ=="], + + "magicast": ["magicast@0.5.1", "", { "dependencies": { "@babel/parser": "^7.28.5", "@babel/types": "^7.28.5", "source-map-js": "^1.2.1" } }, "sha512-xrHS24IxaLrvuo613F719wvOIv9xPHFWQHuvGUBmPnCA/3MQxKI3b+r7n1jAoDHmsbC5bRhTZYR77invLAxVnw=="], + + "math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="], + + "mdast-util-to-hast": ["mdast-util-to-hast@13.2.1", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "@ungap/structured-clone": "^1.0.0", "devlop": "^1.0.0", "micromark-util-sanitize-uri": "^2.0.0", "trim-lines": "^3.0.0", "unist-util-position": "^5.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" } }, "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA=="], + + "media-typer": ["media-typer@1.1.0", "", {}, "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw=="], + + "merge-anything": ["merge-anything@5.1.7", "", { "dependencies": { "is-what": "^4.1.8" } }, "sha512-eRtbOb1N5iyH0tkQDAoQ4Ipsp/5qSR79Dzrz8hEPxRX10RWWR/iQXdoKmBSRCThY1Fh5EhISDtpSc93fpxUniQ=="], + + "merge-descriptors": ["merge-descriptors@2.0.0", "", {}, "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g=="], + + "merge-stream": ["merge-stream@2.0.0", "", {}, "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w=="], + + "merge2": ["merge2@1.4.1", "", {}, "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="], + + "micromark-util-character": ["micromark-util-character@2.1.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q=="], + + "micromark-util-encode": ["micromark-util-encode@2.0.1", "", {}, "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw=="], + + "micromark-util-sanitize-uri": ["micromark-util-sanitize-uri@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-symbol": "^2.0.0" } }, "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ=="], + + "micromark-util-symbol": ["micromark-util-symbol@2.0.1", "", {}, "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q=="], + + "micromark-util-types": ["micromark-util-types@2.0.2", "", {}, "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA=="], + + "micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="], + + "mime": ["mime@4.1.0", "", { "bin": { "mime": "bin/cli.js" } }, "sha512-X5ju04+cAzsojXKes0B/S4tcYtFAJ6tTMuSPBEn9CPGlrWr8Fiw7qYeLT0XyH80HSoAoqWCaz+MWKh22P7G1cw=="], + + "mime-db": ["mime-db@1.54.0", "", {}, "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ=="], + + "mime-types": ["mime-types@3.0.2", "", { "dependencies": { "mime-db": "^1.54.0" } }, "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A=="], + + "mimic-fn": ["mimic-fn@2.1.0", "", {}, "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="], + + "mimic-function": ["mimic-function@5.0.1", "", {}, "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA=="], + + "minimatch": ["minimatch@10.2.0", "", { "dependencies": { "brace-expansion": "^5.0.2" } }, "sha512-ugkC31VaVg9cF0DFVoADH12k6061zNZkZON+aX8AWsR9GhPcErkcMBceb6znR8wLERM2AkkOxy2nWRLpT9Jq5w=="], + + "minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="], + + "minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="], + + "minizlib": ["minizlib@3.1.0", "", { "dependencies": { "minipass": "^7.1.2" } }, "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw=="], + + "mlly": ["mlly@1.8.0", "", { "dependencies": { "acorn": "^8.15.0", "pathe": "^2.0.3", "pkg-types": "^1.3.1", "ufo": "^1.6.1" } }, "sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g=="], + + "moo": ["moo@0.5.2", "", {}, "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q=="], + + "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], + + "msw": ["msw@2.12.10", "", { "dependencies": { "@inquirer/confirm": "^5.0.0", "@mswjs/interceptors": "^0.41.2", "@open-draft/deferred-promise": "^2.2.0", "@types/statuses": "^2.0.6", "cookie": "^1.0.2", "graphql": "^16.12.0", "headers-polyfill": "^4.0.2", "is-node-process": "^1.2.0", "outvariant": "^1.4.3", "path-to-regexp": "^6.3.0", "picocolors": "^1.1.1", "rettime": "^0.10.1", "statuses": "^2.0.2", "strict-event-emitter": "^0.5.1", "tough-cookie": "^6.0.0", "type-fest": "^5.2.0", "until-async": "^3.0.2", "yargs": "^17.7.2" }, "peerDependencies": { "typescript": ">= 4.8.x" }, "optionalPeers": ["typescript"], "bin": { "msw": "cli/index.js" } }, "sha512-G3VUymSE0/iegFnuipujpwyTM2GuZAKXNeerUSrG2+Eg391wW63xFs5ixWsK9MWzr1AGoSkYGmyAzNgbR3+urw=="], + + "mute-stream": ["mute-stream@2.0.0", "", {}, "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA=="], + + "nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], + + "nearley": ["nearley@2.20.1", "", { "dependencies": { "commander": "^2.19.0", "moo": "^0.5.0", "railroad-diagrams": "^1.0.0", "randexp": "0.4.6" }, "bin": { "nearleyc": "bin/nearleyc.js", "nearley-test": "bin/nearley-test.js", "nearley-unparse": "bin/nearley-unparse.js", "nearley-railroad": "bin/nearley-railroad.js" } }, "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ=="], + + "negotiator": ["negotiator@1.0.0", "", {}, "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg=="], + + "nitropack": ["nitropack@2.12.9", "", { "dependencies": { "@cloudflare/kv-asset-handler": "^0.4.0", "@rollup/plugin-alias": "^5.1.1", "@rollup/plugin-commonjs": "^28.0.9", "@rollup/plugin-inject": "^5.0.5", "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^16.0.3", "@rollup/plugin-replace": "^6.0.2", "@rollup/plugin-terser": "^0.4.4", "@vercel/nft": "^0.30.3", "archiver": "^7.0.1", "c12": "^3.3.1", "chokidar": "^4.0.3", "citty": "^0.1.6", "compatx": "^0.2.0", "confbox": "^0.2.2", "consola": "^3.4.2", "cookie-es": "^2.0.0", "croner": "^9.1.0", "crossws": "^0.3.5", "db0": "^0.3.4", "defu": "^6.1.4", "destr": "^2.0.5", "dot-prop": "^10.1.0", "esbuild": "^0.25.11", "escape-string-regexp": "^5.0.0", "etag": "^1.8.1", "exsolve": "^1.0.7", "globby": "^15.0.0", "gzip-size": "^7.0.0", "h3": "^1.15.4", "hookable": "^5.5.3", "httpxy": "^0.1.7", "ioredis": "^5.8.2", "jiti": "^2.6.1", "klona": "^2.0.6", "knitwork": "^1.2.0", "listhen": "^1.9.0", "magic-string": "^0.30.21", "magicast": "^0.5.0", "mime": "^4.1.0", "mlly": "^1.8.0", "node-fetch-native": "^1.6.7", "node-mock-http": "^1.0.3", "ofetch": "^1.5.0", "ohash": "^2.0.11", "pathe": "^2.0.3", "perfect-debounce": "^2.0.0", "pkg-types": "^2.3.0", "pretty-bytes": "^7.1.0", "radix3": "^1.1.2", "rollup": "^4.52.5", "rollup-plugin-visualizer": "^6.0.5", "scule": "^1.3.0", "semver": "^7.7.3", "serve-placeholder": "^2.0.2", "serve-static": "^2.2.0", "source-map": "^0.7.6", "std-env": "^3.10.0", "ufo": "^1.6.1", "ultrahtml": "^1.6.0", "uncrypto": "^0.1.3", "unctx": "^2.4.1", "unenv": "^2.0.0-rc.23", "unimport": "^5.5.0", "unplugin-utils": "^0.3.1", "unstorage": "^1.17.1", "untyped": "^2.0.0", "unwasm": "^0.3.11", "youch": "^4.1.0-beta.11", "youch-core": "^0.3.3" }, "peerDependencies": { "xml2js": "^0.6.2" }, "optionalPeers": ["xml2js"], "bin": { "nitro": "dist/cli/index.mjs", "nitropack": "dist/cli/index.mjs" } }, "sha512-t6qqNBn2UDGMWogQuORjbL2UPevB8PvIPsPHmqvWpeGOlPr4P8Oc5oA8t3wFwGmaolM2M/s2SwT23nx9yARmOg=="], + + "node-addon-api": ["node-addon-api@7.1.1", "", {}, "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ=="], + + "node-domexception": ["node-domexception@1.0.0", "", {}, "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ=="], + + "node-fetch": ["node-fetch@3.3.2", "", { "dependencies": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", "formdata-polyfill": "^4.0.10" } }, "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA=="], + + "node-fetch-native": ["node-fetch-native@1.6.7", "", {}, "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q=="], + + "node-forge": ["node-forge@1.3.3", "", {}, "sha512-rLvcdSyRCyouf6jcOIPe/BgwG/d7hKjzMKOas33/pHEr6gbq18IK9zV7DiPvzsz0oBJPme6qr6H6kGZuI9/DZg=="], + + "node-gyp-build": ["node-gyp-build@4.8.4", "", { "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", "node-gyp-build-test": "build-test.js" } }, "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ=="], + + "node-mock-http": ["node-mock-http@1.0.4", "", {}, "sha512-8DY+kFsDkNXy1sJglUfuODx1/opAGJGyrTuFqEoN90oRc2Vk0ZbD4K2qmKXBBEhZQzdKHIVfEJpDU8Ak2NJEvQ=="], + + "node-releases": ["node-releases@2.0.27", "", {}, "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA=="], + + "nopt": ["nopt@8.1.0", "", { "dependencies": { "abbrev": "^3.0.0" }, "bin": { "nopt": "bin/nopt.js" } }, "sha512-ieGu42u/Qsa4TFktmaKEwM6MQH0pOWnaB3htzh0JRtx84+Mebc0cbZYN5bC+6WTZ4+77xrL9Pn5m7CV6VIkV7A=="], + + "normalize-path": ["normalize-path@3.0.0", "", {}, "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="], + + "npm-run-path": ["npm-run-path@6.0.0", "", { "dependencies": { "path-key": "^4.0.0", "unicorn-magic": "^0.3.0" } }, "sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA=="], + + "nypm": ["nypm@0.6.2", "", { "dependencies": { "citty": "^0.1.6", "consola": "^3.4.2", "pathe": "^2.0.3", "pkg-types": "^2.3.0", "tinyexec": "^1.0.1" }, "bin": { "nypm": "dist/cli.mjs" } }, "sha512-7eM+hpOtrKrBDCh7Ypu2lJ9Z7PNZBdi/8AT3AX8xoCj43BBVHD0hPSTEvMtkMpfs8FCqBGhxB+uToIQimA111g=="], + + "oauth4webapi": ["oauth4webapi@2.17.0", "", {}, "sha512-lbC0Z7uzAFNFyzEYRIC+pkSVvDHJTbEW+dYlSBAlCYDe6RxUkJ26bClhk8ocBZip1wfI9uKTe0fm4Ib4RHn6uQ=="], + + "object-assign": ["object-assign@4.1.1", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="], + + "object-inspect": ["object-inspect@1.13.4", "", {}, "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew=="], + + "object-path": ["object-path@0.11.8", "", {}, "sha512-YJjNZrlXJFM42wTBn6zgOJVar9KFJvzx6sTWDte8sWZF//cnjl0BxHNpfZx+ZffXX63A9q0b1zsFiBX4g4X5KA=="], + + "object-path-immutable": ["object-path-immutable@4.1.2", "", { "dependencies": { "is-plain-object": "^5.0.0", "object-path": "^0.11.8" } }, "sha512-Bfrox46OegMkQXL872EzEjofMyBxk/2hgiy99NkCkYFegn6Dm9FvV2jY2Tnp9qLj2QL0TLii12CuPpzonkjJrA=="], + + "object-treeify": ["object-treeify@1.1.33", "", {}, "sha512-EFVjAYfzWqWsBMRHPMAXLCDIJnpMhdWAqR7xG6M6a2cs6PMFpl/+Z20w9zDW4vkxOFfddegBKq9Rehd0bxWE7A=="], + + "ofetch": ["ofetch@1.5.1", "", { "dependencies": { "destr": "^2.0.5", "node-fetch-native": "^1.6.7", "ufo": "^1.6.1" } }, "sha512-2W4oUZlVaqAPAil6FUg/difl6YhqhUR7x2eZY4bQCko22UXg3hptq9KLQdqFClV+Wu85UX7hNtdGTngi/1BxcA=="], + + "ohash": ["ohash@2.0.11", "", {}, "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ=="], + + "on-finished": ["on-finished@2.4.1", "", { "dependencies": { "ee-first": "1.1.1" } }, "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg=="], + + "once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="], + + "onetime": ["onetime@5.1.2", "", { "dependencies": { "mimic-fn": "^2.1.0" } }, "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg=="], + + "oniguruma-to-es": ["oniguruma-to-es@2.3.0", "", { "dependencies": { "emoji-regex-xs": "^1.0.0", "regex": "^5.1.1", "regex-recursion": "^5.1.1" } }, "sha512-bwALDxriqfKGfUufKGGepCzu9x7nJQuoRoAFp4AnwehhC2crqrDIAP/uN2qdlsAvSMpeRC3+Yzhqc7hLmle5+g=="], + + "open": ["open@11.0.0", "", { "dependencies": { "default-browser": "^5.4.0", "define-lazy-prop": "^3.0.0", "is-in-ssh": "^1.0.0", "is-inside-container": "^1.0.0", "powershell-utils": "^0.1.0", "wsl-utils": "^0.3.0" } }, "sha512-smsWv2LzFjP03xmvFoJ331ss6h+jixfA4UUV/Bsiyuu4YJPfN+FIQGOIiv4w9/+MoHkfkJ22UIaQWRVFRfH6Vw=="], + + "option-validator": ["option-validator@2.0.6", "", { "dependencies": { "kind-of": "^6.0.3" } }, "sha512-tmZDan2LRIRQyhUGvkff68/O0R8UmF+Btmiiz0SmSw2ng3CfPZB9wJlIjHpe/MKUZqyIZkVIXCrwr1tIN+0Dzg=="], + + "ora": ["ora@8.2.0", "", { "dependencies": { "chalk": "^5.3.0", "cli-cursor": "^5.0.0", "cli-spinners": "^2.9.2", "is-interactive": "^2.0.0", "is-unicode-supported": "^2.0.0", "log-symbols": "^6.0.0", "stdin-discarder": "^0.2.2", "string-width": "^7.2.0", "strip-ansi": "^7.1.0" } }, "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw=="], + + "outvariant": ["outvariant@1.4.3", "", {}, "sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA=="], + + "package-json-from-dist": ["package-json-from-dist@1.0.1", "", {}, "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw=="], + + "package-manager-detector": ["package-manager-detector@1.6.0", "", {}, "sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA=="], + + "parent-module": ["parent-module@1.0.1", "", { "dependencies": { "callsites": "^3.0.0" } }, "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g=="], + + "parse-json": ["parse-json@5.2.0", "", { "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", "json-parse-even-better-errors": "^2.3.0", "lines-and-columns": "^1.1.6" } }, "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg=="], + + "parse-ms": ["parse-ms@4.0.0", "", {}, "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw=="], + + "parse5": ["parse5@7.3.0", "", { "dependencies": { "entities": "^6.0.0" } }, "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw=="], + + "parseurl": ["parseurl@1.3.3", "", {}, "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="], + + "path-browserify": ["path-browserify@1.0.1", "", {}, "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="], + + "path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="], + + "path-parse": ["path-parse@1.0.7", "", {}, "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="], + + "path-scurry": ["path-scurry@1.11.1", "", { "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" } }, "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA=="], + + "path-to-regexp": ["path-to-regexp@8.3.0", "", {}, "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA=="], + + "path-type": ["path-type@6.0.0", "", {}, "sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ=="], + + "pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="], + + "perfect-debounce": ["perfect-debounce@2.0.0", "", {}, "sha512-fkEH/OBiKrqqI/yIgjR92lMfs2K8105zt/VT6+7eTjNwisrsh47CeIED9z58zI7DfKdH3uHAn25ziRZn3kgAow=="], + + "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], + + "picomatch": ["picomatch@4.0.3", "", {}, "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q=="], + + "pkce-challenge": ["pkce-challenge@5.0.1", "", {}, "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ=="], + + "pkg-types": ["pkg-types@2.3.0", "", { "dependencies": { "confbox": "^0.2.2", "exsolve": "^1.0.7", "pathe": "^2.0.3" } }, "sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig=="], + + "postcss": ["postcss@8.5.6", "", { "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg=="], + + "postcss-selector-parser": ["postcss-selector-parser@7.1.1", "", { "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" } }, "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg=="], + + "powershell-utils": ["powershell-utils@0.1.0", "", {}, "sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A=="], + + "pretty-bytes": ["pretty-bytes@7.1.0", "", {}, "sha512-nODzvTiYVRGRqAOvE84Vk5JDPyyxsVk0/fbA/bq7RqlnhksGpset09XTxbpvLTIjoaF7K8Z8DG8yHtKGTPSYRw=="], + + "pretty-ms": ["pretty-ms@9.3.0", "", { "dependencies": { "parse-ms": "^4.0.0" } }, "sha512-gjVS5hOP+M3wMm5nmNOucbIrqudzs9v/57bWRHQWLYklXqoXKrVfYW2W9+glfGsqtPgpiz5WwyEEB+ksXIx3gQ=="], + + "process": ["process@0.11.10", "", {}, "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A=="], + + "process-nextick-args": ["process-nextick-args@2.0.1", "", {}, "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="], + + "prompts": ["prompts@2.4.2", "", { "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" } }, "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q=="], + + "property-information": ["property-information@7.1.0", "", {}, "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ=="], + + "proxy-addr": ["proxy-addr@2.0.7", "", { "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" } }, "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg=="], + + "qs": ["qs@6.15.0", "", { "dependencies": { "side-channel": "^1.1.0" } }, "sha512-mAZTtNCeetKMH+pSjrb76NAM8V9a05I9aBZOHztWy/UqcJdQYNsf59vrRKWnojAT9Y+GbIvoTBC++CPHqpDBhQ=="], + + "quansync": ["quansync@0.2.11", "", {}, "sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA=="], + + "queue-microtask": ["queue-microtask@1.2.3", "", {}, "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="], + + "radix-ui": ["radix-ui@1.4.3", "", { "dependencies": { "@radix-ui/primitive": "1.1.3", "@radix-ui/react-accessible-icon": "1.1.7", "@radix-ui/react-accordion": "1.2.12", "@radix-ui/react-alert-dialog": "1.1.15", "@radix-ui/react-arrow": "1.1.7", "@radix-ui/react-aspect-ratio": "1.1.7", "@radix-ui/react-avatar": "1.1.10", "@radix-ui/react-checkbox": "1.3.3", "@radix-ui/react-collapsible": "1.1.12", "@radix-ui/react-collection": "1.1.7", "@radix-ui/react-compose-refs": "1.1.2", "@radix-ui/react-context": "1.1.2", "@radix-ui/react-context-menu": "2.2.16", "@radix-ui/react-dialog": "1.1.15", "@radix-ui/react-direction": "1.1.1", "@radix-ui/react-dismissable-layer": "1.1.11", "@radix-ui/react-dropdown-menu": "2.1.16", "@radix-ui/react-focus-guards": "1.1.3", "@radix-ui/react-focus-scope": "1.1.7", "@radix-ui/react-form": "0.1.8", "@radix-ui/react-hover-card": "1.1.15", "@radix-ui/react-label": "2.1.7", "@radix-ui/react-menu": "2.1.16", "@radix-ui/react-menubar": "1.1.16", "@radix-ui/react-navigation-menu": "1.2.14", "@radix-ui/react-one-time-password-field": "0.1.8", "@radix-ui/react-password-toggle-field": "0.1.3", "@radix-ui/react-popover": "1.1.15", "@radix-ui/react-popper": "1.2.8", "@radix-ui/react-portal": "1.1.9", "@radix-ui/react-presence": "1.1.5", "@radix-ui/react-primitive": "2.1.3", "@radix-ui/react-progress": "1.1.7", "@radix-ui/react-radio-group": "1.3.8", "@radix-ui/react-roving-focus": "1.1.11", "@radix-ui/react-scroll-area": "1.2.10", "@radix-ui/react-select": "2.2.6", "@radix-ui/react-separator": "1.1.7", "@radix-ui/react-slider": "1.3.6", "@radix-ui/react-slot": "1.2.3", "@radix-ui/react-switch": "1.2.6", "@radix-ui/react-tabs": "1.1.13", "@radix-ui/react-toast": "1.2.15", "@radix-ui/react-toggle": "1.1.10", "@radix-ui/react-toggle-group": "1.1.11", "@radix-ui/react-toolbar": "1.1.11", "@radix-ui/react-tooltip": "1.2.8", "@radix-ui/react-use-callback-ref": "1.1.1", "@radix-ui/react-use-controllable-state": "1.2.2", "@radix-ui/react-use-effect-event": "0.0.2", "@radix-ui/react-use-escape-keydown": "1.1.1", "@radix-ui/react-use-is-hydrated": "0.1.0", "@radix-ui/react-use-layout-effect": "1.1.1", "@radix-ui/react-use-size": "1.1.1", "@radix-ui/react-visually-hidden": "1.2.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-aWizCQiyeAenIdUbqEpXgRA1ya65P13NKn/W8rWkcN0OPkRDxdBVLWnIEDsS2RpwCK2nobI7oMUSmexzTDyAmA=="], + + "radix3": ["radix3@1.1.2", "", {}, "sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA=="], + + "raf-schd": ["raf-schd@4.0.3", "", {}, "sha512-tQkJl2GRWh83ui2DiPTJz9wEiMN20syf+5oKfB03yYP7ioZcJwsIK8FjrtLwH1m7C7e+Tt2yYBlrOpdT+dyeIQ=="], + + "railroad-diagrams": ["railroad-diagrams@1.0.0", "", {}, "sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A=="], + + "randexp": ["randexp@0.4.6", "", { "dependencies": { "discontinuous-range": "1.0.0", "ret": "~0.1.10" } }, "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ=="], + + "randombytes": ["randombytes@2.1.0", "", { "dependencies": { "safe-buffer": "^5.1.0" } }, "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ=="], + + "range-parser": ["range-parser@1.2.1", "", {}, "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="], + + "raw-body": ["raw-body@3.0.2", "", { "dependencies": { "bytes": "~3.1.2", "http-errors": "~2.0.1", "iconv-lite": "~0.7.0", "unpipe": "~1.0.0" } }, "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA=="], + + "rc9": ["rc9@2.1.2", "", { "dependencies": { "defu": "^6.1.4", "destr": "^2.0.3" } }, "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg=="], + + "react": ["react@19.2.4", "", {}, "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ=="], + + "react-dom": ["react-dom@19.2.4", "", { "dependencies": { "scheduler": "^0.27.0" }, "peerDependencies": { "react": "^19.2.4" } }, "sha512-AXJdLo8kgMbimY95O2aKQqsz2iWi9jMgKJhRBAxECE4IFxfcazB2LmzloIoibJI3C12IlY20+KFaLv+71bUJeQ=="], + + "react-number-format": ["react-number-format@5.4.4", "", { "peerDependencies": { "react": "^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-wOmoNZoOpvMminhifQYiYSTCLUDOiUbBunrMrMjA+dV52sY+vck1S4UhR6PkgnoCquvvMSeJjErXZ4qSaWCliA=="], + + "react-redux": ["react-redux@9.2.0", "", { "dependencies": { "@types/use-sync-external-store": "^0.0.6", "use-sync-external-store": "^1.4.0" }, "peerDependencies": { "@types/react": "^18.2.25 || ^19", "react": "^18.0 || ^19", "redux": "^5.0.0" }, "optionalPeers": ["@types/react", "redux"] }, "sha512-ROY9fvHhwOD9ySfrF0wmvu//bKCQ6AeZZq1nJNtbDC+kk5DuSuNX/n6YWYF/SYy7bSba4D4FSz8DJeKY/S/r+g=="], + + "react-remove-scroll": ["react-remove-scroll@2.7.2", "", { "dependencies": { "react-remove-scroll-bar": "^2.3.7", "react-style-singleton": "^2.2.3", "tslib": "^2.1.0", "use-callback-ref": "^1.3.3", "use-sidecar": "^1.1.3" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Iqb9NjCCTt6Hf+vOdNIZGdTiH1QSqr27H/Ek9sv/a97gfueI/5h1s3yRi1nngzMUaOOToin5dI1dXKdXiF+u0Q=="], + + "react-remove-scroll-bar": ["react-remove-scroll-bar@2.3.8", "", { "dependencies": { "react-style-singleton": "^2.2.2", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q=="], + + "react-style-singleton": ["react-style-singleton@2.2.3", "", { "dependencies": { "get-nonce": "^1.0.0", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ=="], + + "react-textarea-autosize": ["react-textarea-autosize@8.5.9", "", { "dependencies": { "@babel/runtime": "^7.20.13", "use-composed-ref": "^1.3.0", "use-latest": "^1.2.1" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-U1DGlIQN5AwgjTyOEnI1oCcMuEr1pv1qOtklB2l4nyMGbHzWrI0eFsYK0zos2YWqAolJyG0IWJaqWmWj5ETh0A=="], + + "readable-stream": ["readable-stream@4.7.0", "", { "dependencies": { "abort-controller": "^3.0.0", "buffer": "^6.0.3", "events": "^3.3.0", "process": "^0.11.10", "string_decoder": "^1.3.0" } }, "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg=="], + + "readdir-glob": ["readdir-glob@1.1.3", "", { "dependencies": { "minimatch": "^5.1.0" } }, "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA=="], + + "readdirp": ["readdirp@4.1.2", "", {}, "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg=="], + + "recast": ["recast@0.23.11", "", { "dependencies": { "ast-types": "^0.16.1", "esprima": "~4.0.0", "source-map": "~0.6.1", "tiny-invariant": "^1.3.3", "tslib": "^2.0.1" } }, "sha512-YTUo+Flmw4ZXiWfQKGcwwc11KnoRAYgzAE2E7mXKCjSviTKShtxBsN6YUUBB2gtaBzKzeKunxhUwNHQuRryhWA=="], + + "redis-errors": ["redis-errors@1.2.0", "", {}, "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w=="], + + "redis-parser": ["redis-parser@3.0.0", "", { "dependencies": { "redis-errors": "^1.0.0" } }, "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A=="], + + "redux": ["redux@5.0.1", "", {}, "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w=="], + + "regex": ["regex@5.1.1", "", { "dependencies": { "regex-utilities": "^2.3.0" } }, "sha512-dN5I359AVGPnwzJm2jN1k0W9LPZ+ePvoOeVMMfqIMFz53sSwXkxaJoxr50ptnsC771lK95BnTrVSZxq0b9yCGw=="], + + "regex-recursion": ["regex-recursion@5.1.1", "", { "dependencies": { "regex": "^5.1.1", "regex-utilities": "^2.3.0" } }, "sha512-ae7SBCbzVNrIjgSbh7wMznPcQel1DNlDtzensnFxpiNpXt1U2ju/bHugH422r+4LAVS1FpW1YCwilmnNsjum9w=="], + + "regex-utilities": ["regex-utilities@2.3.0", "", {}, "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng=="], + + "require-directory": ["require-directory@2.1.1", "", {}, "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q=="], + + "require-from-string": ["require-from-string@2.0.2", "", {}, "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="], + + "resolve": ["resolve@1.22.11", "", { "dependencies": { "is-core-module": "^2.16.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" } }, "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ=="], + + "resolve-from": ["resolve-from@4.0.0", "", {}, "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="], + + "restore-cursor": ["restore-cursor@5.1.0", "", { "dependencies": { "onetime": "^7.0.0", "signal-exit": "^4.1.0" } }, "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA=="], + + "ret": ["ret@0.1.15", "", {}, "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg=="], + + "rettime": ["rettime@0.10.1", "", {}, "sha512-uyDrIlUEH37cinabq0AX4QbgV4HbFZ/gqoiunWQ1UqBtRvTTytwhNYjE++pO/MjPTZL5KQCf2bEoJ/BJNVQ5Kw=="], + + "reusify": ["reusify@1.1.0", "", {}, "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw=="], + + "rollup": ["rollup@4.53.3", "", { "dependencies": { "@types/estree": "1.0.8" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.53.3", "@rollup/rollup-android-arm64": "4.53.3", "@rollup/rollup-darwin-arm64": "4.53.3", "@rollup/rollup-darwin-x64": "4.53.3", "@rollup/rollup-freebsd-arm64": "4.53.3", "@rollup/rollup-freebsd-x64": "4.53.3", "@rollup/rollup-linux-arm-gnueabihf": "4.53.3", "@rollup/rollup-linux-arm-musleabihf": "4.53.3", "@rollup/rollup-linux-arm64-gnu": "4.53.3", "@rollup/rollup-linux-arm64-musl": "4.53.3", "@rollup/rollup-linux-loong64-gnu": "4.53.3", "@rollup/rollup-linux-ppc64-gnu": "4.53.3", "@rollup/rollup-linux-riscv64-gnu": "4.53.3", "@rollup/rollup-linux-riscv64-musl": "4.53.3", "@rollup/rollup-linux-s390x-gnu": "4.53.3", "@rollup/rollup-linux-x64-gnu": "4.53.3", "@rollup/rollup-linux-x64-musl": "4.53.3", "@rollup/rollup-openharmony-arm64": "4.53.3", "@rollup/rollup-win32-arm64-msvc": "4.53.3", "@rollup/rollup-win32-ia32-msvc": "4.53.3", "@rollup/rollup-win32-x64-gnu": "4.53.3", "@rollup/rollup-win32-x64-msvc": "4.53.3", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-w8GmOxZfBmKknvdXU1sdM9NHcoQejwF/4mNgj2JuEEdRaHwwF12K7e9eXn1nLZ07ad+du76mkVsyeb2rKGllsA=="], + + "rollup-plugin-visualizer": ["rollup-plugin-visualizer@6.0.5", "", { "dependencies": { "open": "^8.0.0", "picomatch": "^4.0.2", "source-map": "^0.7.4", "yargs": "^17.5.1" }, "peerDependencies": { "rolldown": "1.x || ^1.0.0-beta", "rollup": "2.x || 3.x || 4.x" }, "optionalPeers": ["rolldown", "rollup"], "bin": { "rollup-plugin-visualizer": "dist/bin/cli.js" } }, "sha512-9+HlNgKCVbJDs8tVtjQ43US12eqaiHyyiLMdBwQ7vSZPiHMysGNo2E88TAp1si5wx8NAoYriI2A5kuKfIakmJg=="], + + "rou3": ["rou3@0.7.12", "", {}, "sha512-iFE4hLDuloSWcD7mjdCDhx2bKcIsYbtOTpfH5MHHLSKMOUyjqQXTeZVa289uuwEGEKFoE/BAPbhaU4B774nceg=="], + + "router": ["router@2.2.0", "", { "dependencies": { "debug": "^4.4.0", "depd": "^2.0.0", "is-promise": "^4.0.0", "parseurl": "^1.3.3", "path-to-regexp": "^8.0.0" } }, "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ=="], + + "run-applescript": ["run-applescript@7.1.0", "", {}, "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q=="], + + "run-parallel": ["run-parallel@1.2.0", "", { "dependencies": { "queue-microtask": "^1.2.2" } }, "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA=="], + + "safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="], + + "safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="], + + "scheduler": ["scheduler@0.27.0", "", {}, "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q=="], + + "scule": ["scule@1.3.0", "", {}, "sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g=="], + + "semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="], + + "send": ["send@1.2.0", "", { "dependencies": { "debug": "^4.3.5", "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "etag": "^1.8.1", "fresh": "^2.0.0", "http-errors": "^2.0.0", "mime-types": "^3.0.1", "ms": "^2.1.3", "on-finished": "^2.4.1", "range-parser": "^1.2.1", "statuses": "^2.0.1" } }, "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw=="], + + "serialize-javascript": ["serialize-javascript@6.0.2", "", { "dependencies": { "randombytes": "^2.1.0" } }, "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g=="], + + "seroval": ["seroval@1.5.0", "", {}, "sha512-OE4cvmJ1uSPrKorFIH9/w/Qwuvi/IMcGbv5RKgcJ/zjA/IohDLU6SVaxFN9FwajbP7nsX0dQqMDes1whk3y+yw=="], + + "seroval-plugins": ["seroval-plugins@1.5.0", "", { "peerDependencies": { "seroval": "^1.0" } }, "sha512-EAHqADIQondwRZIdeW2I636zgsODzoBDwb3PT/+7TLDWyw1Dy/Xv7iGUIEXXav7usHDE9HVhOU61irI3EnyyHA=="], + + "serve-placeholder": ["serve-placeholder@2.0.2", "", { "dependencies": { "defu": "^6.1.4" } }, "sha512-/TMG8SboeiQbZJWRlfTCqMs2DD3SZgWp0kDQePz9yUuCnDfDh/92gf7/PxGhzXTKBIPASIHxFcZndoNbp6QOLQ=="], + + "serve-static": ["serve-static@2.2.0", "", { "dependencies": { "encodeurl": "^2.0.0", "escape-html": "^1.0.3", "parseurl": "^1.3.3", "send": "^1.2.0" } }, "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ=="], + + "setprototypeof": ["setprototypeof@1.2.0", "", {}, "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="], + + "shadcn": ["shadcn@3.8.5", "", { "dependencies": { "@antfu/ni": "^25.0.0", "@babel/core": "^7.28.0", "@babel/parser": "^7.28.0", "@babel/plugin-transform-typescript": "^7.28.0", "@babel/preset-typescript": "^7.27.1", "@dotenvx/dotenvx": "^1.48.4", "@modelcontextprotocol/sdk": "^1.26.0", "@types/validate-npm-package-name": "^4.0.2", "browserslist": "^4.26.2", "commander": "^14.0.0", "cosmiconfig": "^9.0.0", "dedent": "^1.6.0", "deepmerge": "^4.3.1", "diff": "^8.0.2", "execa": "^9.6.0", "fast-glob": "^3.3.3", "fs-extra": "^11.3.1", "fuzzysort": "^3.1.0", "https-proxy-agent": "^7.0.6", "kleur": "^4.1.5", "msw": "^2.10.4", "node-fetch": "^3.3.2", "open": "^11.0.0", "ora": "^8.2.0", "postcss": "^8.5.6", "postcss-selector-parser": "^7.1.0", "prompts": "^2.4.2", "recast": "^0.23.11", "stringify-object": "^5.0.0", "tailwind-merge": "^3.0.1", "ts-morph": "^26.0.0", "tsconfig-paths": "^4.2.0", "validate-npm-package-name": "^7.0.1", "zod": "^3.24.1", "zod-to-json-schema": "^3.24.6" }, "bin": { "shadcn": "dist/index.js" } }, "sha512-jPRx44e+eyeV7xwY3BLJXcfrks00+M0h5BGB9l6DdcBW4BpAj4x3lVmVy0TXPEs2iHEisxejr62sZAAw6B1EVA=="], + + "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], + + "shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="], + + "shiki": ["shiki@1.29.2", "", { "dependencies": { "@shikijs/core": "1.29.2", "@shikijs/engine-javascript": "1.29.2", "@shikijs/engine-oniguruma": "1.29.2", "@shikijs/langs": "1.29.2", "@shikijs/themes": "1.29.2", "@shikijs/types": "1.29.2", "@shikijs/vscode-textmate": "^10.0.1", "@types/hast": "^3.0.4" } }, "sha512-njXuliz/cP+67jU2hukkxCNuH1yUi4QfdZZY+sMr5PPrIyXSu5iTb/qYC4BiWWB0vZ+7TbdvYUCeL23zpwCfbg=="], + + "side-channel": ["side-channel@1.1.0", "", { "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.3", "side-channel-list": "^1.0.0", "side-channel-map": "^1.0.1", "side-channel-weakmap": "^1.0.2" } }, "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw=="], + + "side-channel-list": ["side-channel-list@1.0.0", "", { "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.3" } }, "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA=="], + + "side-channel-map": ["side-channel-map@1.0.1", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3" } }, "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA=="], + + "side-channel-weakmap": ["side-channel-weakmap@1.0.2", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3", "side-channel-map": "^1.0.1" } }, "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A=="], + + "signal-exit": ["signal-exit@4.1.0", "", {}, "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="], + + "simple-icons": ["simple-icons@16.10.0", "", {}, "sha512-62kuxaG3pE+cFNerudUtwb9BLmudzayHrlHkvU9gf8Nxcj7VYOm9dh3WNbGaFk60aQtfnRyzViZaouFG2B45kg=="], + + "sisteransi": ["sisteransi@1.0.5", "", {}, "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="], + + "slash": ["slash@5.1.0", "", {}, "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg=="], + + "smob": ["smob@1.5.0", "", {}, "sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig=="], + + "smtp-address-parser": ["smtp-address-parser@1.0.10", "", { "dependencies": { "nearley": "^2.20.1" } }, "sha512-Osg9LmvGeAG/hyao4mldbflLOkkr3a+h4m1lwKCK5U8M6ZAr7tdXEz/+/vr752TSGE4MNUlUl9cIK2cB8cgzXg=="], + + "solid-js": ["solid-js@1.9.11", "", { "dependencies": { "csstype": "^3.1.0", "seroval": "~1.5.0", "seroval-plugins": "~1.5.0" } }, "sha512-WEJtcc5mkh/BnHA6Yrg4whlF8g6QwpmXXRg4P2ztPmcKeHHlH4+djYecBLhSpecZY2RRECXYUwIc/C2r3yzQ4Q=="], + + "solid-refresh": ["solid-refresh@0.8.0-next.2", "", { "dependencies": { "@babel/generator": "^7.29.1", "@babel/types": "^7.29.0" }, "peerDependencies": { "solid-js": ">=2.0.0-beta.0 <2.0.0" } }, "sha512-fhJ3ZT8QOMvyvtF6KJqaI6vG8OK/EIcarNy9S0EsEmlin7qfh4XndSQWFMQyiyIA22rjbj0w5GXiaAwTLQSLXA=="], + + "solid-toast": ["solid-toast@0.5.0", "", { "peerDependencies": { "solid-js": "^1.5.4" } }, "sha512-t770JakjyS2P9b8Qa1zMLOD51KYKWXbTAyJePVUoYex5c5FH5S/HtUBUbZAWFcqRCKmAE8KhyIiCvDZA8bOnxQ=="], + + "solid-use": ["solid-use@0.9.1", "", { "peerDependencies": { "solid-js": "^1.7" } }, "sha512-UwvXDVPlrrbj/9ewG9ys5uL2IO4jSiwys2KPzK4zsnAcmEl7iDafZWW1Mo4BSEWOmQCGK6IvpmGHo1aou8iOFw=="], + + "source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], + + "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], + + "source-map-support": ["source-map-support@0.5.21", "", { "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w=="], + + "space-separated-tokens": ["space-separated-tokens@2.0.2", "", {}, "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q=="], + + "srvx": ["srvx@0.9.8", "", { "bin": { "srvx": "bin/srvx.mjs" } }, "sha512-RZaxTKJEE/14HYn8COLuUOJAt0U55N9l1Xf6jj+T0GoA01EUH1Xz5JtSUOI+EHn+AEgPCVn7gk6jHJffrr06fQ=="], + + "stackframe": ["stackframe@1.3.4", "", {}, "sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw=="], + + "standard-as-callback": ["standard-as-callback@2.1.0", "", {}, "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A=="], + + "statuses": ["statuses@2.0.2", "", {}, "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="], + + "std-env": ["std-env@3.10.0", "", {}, "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg=="], + + "stdin-discarder": ["stdin-discarder@0.2.2", "", {}, "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ=="], + + "streamx": ["streamx@2.23.0", "", { "dependencies": { "events-universal": "^1.0.0", "fast-fifo": "^1.3.2", "text-decoder": "^1.1.0" } }, "sha512-kn+e44esVfn2Fa/O0CPFcex27fjIL6MkVae0Mm6q+E6f0hWv578YCERbv+4m02cjxvDsPKLnmxral/rR6lBMAg=="], + + "strict-event-emitter": ["strict-event-emitter@0.5.1", "", {}, "sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ=="], + + "string-width": ["string-width@7.2.0", "", { "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", "strip-ansi": "^7.1.0" } }, "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ=="], + + "string-width-cjs": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], + + "string_decoder": ["string_decoder@1.3.0", "", { "dependencies": { "safe-buffer": "~5.2.0" } }, "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA=="], + + "stringify-entities": ["stringify-entities@4.0.4", "", { "dependencies": { "character-entities-html4": "^2.0.0", "character-entities-legacy": "^3.0.0" } }, "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg=="], + + "stringify-object": ["stringify-object@5.0.0", "", { "dependencies": { "get-own-enumerable-keys": "^1.0.0", "is-obj": "^3.0.0", "is-regexp": "^3.1.0" } }, "sha512-zaJYxz2FtcMb4f+g60KsRNFOpVMUyuJgA51Zi5Z1DOTC3S59+OQiVOzE9GZt0x72uBGWKsQIuBKeF9iusmKFsg=="], + + "strip-ansi": ["strip-ansi@7.1.2", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA=="], + + "strip-ansi-cjs": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], + + "strip-bom": ["strip-bom@3.0.0", "", {}, "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA=="], + + "strip-final-newline": ["strip-final-newline@4.0.0", "", {}, "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw=="], + + "strip-literal": ["strip-literal@3.1.0", "", { "dependencies": { "js-tokens": "^9.0.1" } }, "sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg=="], + + "strnum": ["strnum@2.1.2", "", {}, "sha512-l63NF9y/cLROq/yqKXSLtcMeeyOfnSQlfMSlzFt/K73oIaD8DGaQWd7Z34X9GPiKqP5rbSh84Hl4bOlLcjiSrQ=="], + + "style-mod": ["style-mod@4.1.3", "", {}, "sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ=="], + + "supports-color": ["supports-color@10.2.2", "", {}, "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g=="], + + "supports-preserve-symlinks-flag": ["supports-preserve-symlinks-flag@1.0.0", "", {}, "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="], + + "swr": ["swr@2.4.0", "", { "dependencies": { "dequal": "^2.0.3", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "react": "^16.11.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-sUlC20T8EOt1pHmDiqueUWMmRRX03W7w5YxovWX7VR2KHEPCTMly85x05vpkP5i6Bu4h44ePSMD9Tc+G2MItFw=="], + + "system-architecture": ["system-architecture@0.1.0", "", {}, "sha512-ulAk51I9UVUyJgxlv9M6lFot2WP3e7t8Kz9+IS6D4rVba1tR9kON+Ey69f+1R4Q8cd45Lod6a4IcJIxnzGc/zA=="], + + "tabbable": ["tabbable@6.4.0", "", {}, "sha512-05PUHKSNE8ou2dwIxTngl4EzcnsCDZGJ/iCLtDflR/SHB/ny14rXc+qU5P4mG9JkusiV7EivzY9Mhm55AzAvCg=="], + + "tagged-tag": ["tagged-tag@1.0.0", "", {}, "sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng=="], + + "tailwind-merge": ["tailwind-merge@3.5.0", "", {}, "sha512-I8K9wewnVDkL1NTGoqWmVEIlUcB9gFriAEkXkfCjX5ib8ezGxtR3xD7iZIxrfArjEsH7F1CHD4RFUtxefdqV/A=="], + + "tailwindcss": ["tailwindcss@4.2.1", "", {}, "sha512-/tBrSQ36vCleJkAOsy9kbNTgaxvGbyOamC30PRePTQe/o1MFwEKHQk4Cn7BNGaPtjp+PuUrByJehM1hgxfq4sw=="], + + "tapable": ["tapable@2.3.0", "", {}, "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg=="], + + "tar": ["tar@7.5.2", "", { "dependencies": { "@isaacs/fs-minipass": "^4.0.0", "chownr": "^3.0.0", "minipass": "^7.1.2", "minizlib": "^3.1.0", "yallist": "^5.0.0" } }, "sha512-7NyxrTE4Anh8km8iEy7o0QYPs+0JKBTj5ZaqHg6B39erLg0qYXN3BijtShwbsNSvQ+LN75+KV+C4QR/f6Gwnpg=="], + + "tar-stream": ["tar-stream@3.1.7", "", { "dependencies": { "b4a": "^1.6.4", "fast-fifo": "^1.2.0", "streamx": "^2.15.0" } }, "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ=="], + + "terracotta": ["terracotta@1.0.6", "", { "dependencies": { "solid-use": "^0.9.0" }, "peerDependencies": { "solid-js": "^1.8" } }, "sha512-yVrmT/Lg6a3tEbeYEJH8ksb1PYkR5FA9k5gr1TchaSNIiA2ZWs5a+koEbePXwlBP0poaV7xViZ/v50bQFcMgqw=="], + + "terser": ["terser@5.44.1", "", { "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.15.0", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, "bin": { "terser": "bin/terser" } }, "sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw=="], + + "text-decoder": ["text-decoder@1.2.3", "", { "dependencies": { "b4a": "^1.6.4" } }, "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA=="], + + "tiny-invariant": ["tiny-invariant@1.3.3", "", {}, "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg=="], + + "tinyexec": ["tinyexec@1.0.2", "", {}, "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg=="], + + "tinyglobby": ["tinyglobby@0.2.15", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.3" } }, "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ=="], + + "tldts": ["tldts@7.0.23", "", { "dependencies": { "tldts-core": "^7.0.23" }, "bin": { "tldts": "bin/cli.js" } }, "sha512-ASdhgQIBSay0R/eXggAkQ53G4nTJqTXqC2kbaBbdDwM7SkjyZyO0OaaN1/FH7U/yCeqOHDwFO5j8+Os/IS1dXw=="], + + "tldts-core": ["tldts-core@7.0.23", "", {}, "sha512-0g9vrtDQLrNIiCj22HSe9d4mLVG3g5ph5DZ8zCKBr4OtrspmNB6ss7hVyzArAeE88ceZocIEGkyW1Ime7fxPtQ=="], + + "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="], + + "toidentifier": ["toidentifier@1.0.1", "", {}, "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="], + + "tough-cookie": ["tough-cookie@6.0.0", "", { "dependencies": { "tldts": "^7.0.5" } }, "sha512-kXuRi1mtaKMrsLUxz3sQYvVl37B0Ns6MzfrtV5DvJceE9bPyspOqk9xxv7XbZWcfLWbFmm997vl83qUWVJA64w=="], + + "tr46": ["tr46@0.0.3", "", {}, "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="], + + "trim-lines": ["trim-lines@3.0.1", "", {}, "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg=="], + + "ts-algebra": ["ts-algebra@2.0.0", "", {}, "sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw=="], + + "ts-morph": ["ts-morph@26.0.0", "", { "dependencies": { "@ts-morph/common": "~0.27.0", "code-block-writer": "^13.0.3" } }, "sha512-ztMO++owQnz8c/gIENcM9XfCEzgoGphTv+nKpYNM1bgsdOVC/jRZuEBf6N+mLLDNg68Kl+GgUZfOySaRiG1/Ug=="], + + "tsconfig-paths": ["tsconfig-paths@4.2.0", "", { "dependencies": { "json5": "^2.2.2", "minimist": "^1.2.6", "strip-bom": "^3.0.0" } }, "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg=="], + + "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "tw-animate-css": ["tw-animate-css@1.4.0", "", {}, "sha512-7bziOlRqH0hJx80h/3mbicLW7o8qLsH5+RaLR2t+OHM3D0JlWGODQKQ4cxbK7WlvmUxpcj6Kgu6EKqjrGFe3QQ=="], + + "type-fest": ["type-fest@5.3.1", "", { "dependencies": { "tagged-tag": "^1.0.0" } }, "sha512-VCn+LMHbd4t6sF3wfU/+HKT63C9OoyrSIf4b+vtWHpt2U7/4InZG467YDNMFMR70DdHjAdpPWmw2lzRdg0Xqqg=="], + + "type-is": ["type-is@2.0.1", "", { "dependencies": { "content-type": "^1.0.5", "media-typer": "^1.1.0", "mime-types": "^3.0.0" } }, "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw=="], + + "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], + + "ufo": ["ufo@1.6.1", "", {}, "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA=="], + + "ultrahtml": ["ultrahtml@1.6.0", "", {}, "sha512-R9fBn90VTJrqqLDwyMph+HGne8eqY1iPfYhPzZrvKpIfwkWZbcYlfpsb8B9dTvBfpy1/hqAD7Wi8EKfP9e8zdw=="], + + "uncrypto": ["uncrypto@0.1.3", "", {}, "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q=="], + + "unctx": ["unctx@2.4.1", "", { "dependencies": { "acorn": "^8.14.0", "estree-walker": "^3.0.3", "magic-string": "^0.30.17", "unplugin": "^2.1.0" } }, "sha512-AbaYw0Nm4mK4qjhns67C+kgxR2YWiwlDBPzxrN8h8C6VtAdCgditAY5Dezu3IJy4XVqAnbrXt9oQJvsn3fyozg=="], + + "undici-types": ["undici-types@7.18.2", "", {}, "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w=="], + + "unenv": ["unenv@2.0.0-rc.24", "", { "dependencies": { "pathe": "^2.0.3" } }, "sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw=="], + + "unicorn-magic": ["unicorn-magic@0.3.0", "", {}, "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA=="], + + "unimport": ["unimport@5.5.0", "", { "dependencies": { "acorn": "^8.15.0", "escape-string-regexp": "^5.0.0", "estree-walker": "^3.0.3", "local-pkg": "^1.1.2", "magic-string": "^0.30.19", "mlly": "^1.8.0", "pathe": "^2.0.3", "picomatch": "^4.0.3", "pkg-types": "^2.3.0", "scule": "^1.3.0", "strip-literal": "^3.1.0", "tinyglobby": "^0.2.15", "unplugin": "^2.3.10", "unplugin-utils": "^0.3.0" } }, "sha512-/JpWMG9s1nBSlXJAQ8EREFTFy3oy6USFd8T6AoBaw1q2GGcF4R9yp3ofg32UODZlYEO5VD0EWE1RpI9XDWyPYg=="], + + "unist-util-is": ["unist-util-is@6.0.1", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g=="], + + "unist-util-position": ["unist-util-position@5.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA=="], + + "unist-util-stringify-position": ["unist-util-stringify-position@4.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ=="], + + "unist-util-visit": ["unist-util-visit@5.0.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0", "unist-util-visit-parents": "^6.0.0" } }, "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg=="], + + "unist-util-visit-parents": ["unist-util-visit-parents@6.0.2", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0" } }, "sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ=="], + + "universalify": ["universalify@2.0.1", "", {}, "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw=="], + + "unpipe": ["unpipe@1.0.0", "", {}, "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ=="], + + "unplugin": ["unplugin@2.3.11", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "acorn": "^8.15.0", "picomatch": "^4.0.3", "webpack-virtual-modules": "^0.6.2" } }, "sha512-5uKD0nqiYVzlmCRs01Fhs2BdkEgBS3SAVP6ndrBsuK42iC2+JHyxM05Rm9G8+5mkmRtzMZGY8Ct5+mliZxU/Ww=="], + + "unplugin-utils": ["unplugin-utils@0.3.1", "", { "dependencies": { "pathe": "^2.0.3", "picomatch": "^4.0.3" } }, "sha512-5lWVjgi6vuHhJ526bI4nlCOmkCIF3nnfXkCMDeMJrtdvxTs6ZFCM8oNufGTsDbKv/tJ/xj8RpvXjRuPBZJuJog=="], + + "unstorage": ["unstorage@1.17.3", "", { "dependencies": { "anymatch": "^3.1.3", "chokidar": "^4.0.3", "destr": "^2.0.5", "h3": "^1.15.4", "lru-cache": "^10.4.3", "node-fetch-native": "^1.6.7", "ofetch": "^1.5.1", "ufo": "^1.6.1" }, "peerDependencies": { "@azure/app-configuration": "^1.8.0", "@azure/cosmos": "^4.2.0", "@azure/data-tables": "^13.3.0", "@azure/identity": "^4.6.0", "@azure/keyvault-secrets": "^4.9.0", "@azure/storage-blob": "^12.26.0", "@capacitor/preferences": "^6.0.3 || ^7.0.0", "@deno/kv": ">=0.9.0", "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0", "@planetscale/database": "^1.19.0", "@upstash/redis": "^1.34.3", "@vercel/blob": ">=0.27.1", "@vercel/functions": "^2.2.12 || ^3.0.0", "@vercel/kv": "^1.0.1", "aws4fetch": "^1.0.20", "db0": ">=0.2.1", "idb-keyval": "^6.2.1", "ioredis": "^5.4.2", "uploadthing": "^7.4.4" }, "optionalPeers": ["@azure/app-configuration", "@azure/cosmos", "@azure/data-tables", "@azure/identity", "@azure/keyvault-secrets", "@azure/storage-blob", "@capacitor/preferences", "@deno/kv", "@netlify/blobs", "@planetscale/database", "@upstash/redis", "@vercel/blob", "@vercel/functions", "@vercel/kv", "aws4fetch", "db0", "idb-keyval", "ioredis", "uploadthing"] }, "sha512-i+JYyy0DoKmQ3FximTHbGadmIYb8JEpq7lxUjnjeB702bCPum0vzo6oy5Mfu0lpqISw7hCyMW2yj4nWC8bqJ3Q=="], + + "until-async": ["until-async@3.0.2", "", {}, "sha512-IiSk4HlzAMqTUseHHe3VhIGyuFmN90zMTpD3Z3y8jeQbzLIq500MVM7Jq2vUAnTKAFPJrqwkzr6PoTcPhGcOiw=="], + + "untun": ["untun@0.1.3", "", { "dependencies": { "citty": "^0.1.5", "consola": "^3.2.3", "pathe": "^1.1.1" }, "bin": { "untun": "bin/untun.mjs" } }, "sha512-4luGP9LMYszMRZwsvyUd9MrxgEGZdZuZgpVQHEEX0lCYFESasVRvZd0EYpCkOIbJKHMuv0LskpXc/8Un+MJzEQ=="], + + "untyped": ["untyped@2.0.0", "", { "dependencies": { "citty": "^0.1.6", "defu": "^6.1.4", "jiti": "^2.4.2", "knitwork": "^1.2.0", "scule": "^1.3.0" }, "bin": { "untyped": "dist/cli.mjs" } }, "sha512-nwNCjxJTjNuLCgFr42fEak5OcLuB3ecca+9ksPFNvtfYSLpjf+iJqSIaSnIile6ZPbKYxI5k2AfXqeopGudK/g=="], + + "unwasm": ["unwasm@0.3.11", "", { "dependencies": { "knitwork": "^1.2.0", "magic-string": "^0.30.17", "mlly": "^1.7.4", "pathe": "^2.0.3", "pkg-types": "^2.2.0", "unplugin": "^2.3.6" } }, "sha512-Vhp5gb1tusSQw5of/g3Q697srYgMXvwMgXMjcG4ZNga02fDX9coxJ9fAb0Ci38hM2Hv/U1FXRPGgjP2BYqhNoQ=="], + + "update-browserslist-db": ["update-browserslist-db@1.2.2", "", { "dependencies": { "escalade": "^3.2.0", "picocolors": "^1.1.1" }, "peerDependencies": { "browserslist": ">= 4.21.0" }, "bin": { "update-browserslist-db": "cli.js" } }, "sha512-E85pfNzMQ9jpKkA7+TJAi4TJN+tBCuWh5rUcS/sv6cFi+1q9LYDwDI5dpUL0u/73EElyQ8d3TEaeW4sPedBqYA=="], + + "uqr": ["uqr@0.1.2", "", {}, "sha512-MJu7ypHq6QasgF5YRTjqscSzQp/W11zoUk6kvmlH+fmWEs63Y0Eib13hYFwAzagRJcVY8WVnlV+eBDUGMJ5IbA=="], + + "use-callback-ref": ["use-callback-ref@1.3.3", "", { "dependencies": { "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg=="], + + "use-composed-ref": ["use-composed-ref@1.4.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-djviaxuOOh7wkj0paeO1Q/4wMZ8Zrnag5H6yBvzN7AKKe8beOaED9SF5/ByLqsku8NP4zQqsvM2u3ew/tJK8/w=="], + + "use-isomorphic-layout-effect": ["use-isomorphic-layout-effect@1.2.1", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-tpZZ+EX0gaghDAiFR37hj5MgY6ZN55kLiPkJsKxBMZ6GZdOSPJXiOzPM984oPYZ5AnehYx5WQp1+ME8I/P/pRA=="], + + "use-latest": ["use-latest@1.3.0", "", { "dependencies": { "use-isomorphic-layout-effect": "^1.1.1" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-mhg3xdm9NaM8q+gLT8KryJPnRFOz1/5XPBhmDEVZK1webPzDjrPk7f/mbpeLqTgB9msytYWANxgALOCJKnLvcQ=="], + + "use-sidecar": ["use-sidecar@1.1.3", "", { "dependencies": { "detect-node-es": "^1.1.0", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ=="], + + "use-sync-external-store": ["use-sync-external-store@1.6.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w=="], + + "util-deprecate": ["util-deprecate@1.0.2", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="], + + "valid-url": ["valid-url@1.0.9", "", {}, "sha512-QQDsV8OnSf5Uc30CKSwG9lnhMPe6exHtTXLRYX8uMwKENy640pU+2BgBL0LRbDh/eYRahNCS7aewCx0wf3NYVA=="], + + "validate-html-nesting": ["validate-html-nesting@1.2.4", "", {}, "sha512-doQi7e8EJ2OWneSG1aZpJluS6A49aZM0+EICXWKm1i6WvqTLmq0tpUcImc4KTWG50mORO0C4YDBtOCSYvElftw=="], + + "validate-npm-package-name": ["validate-npm-package-name@7.0.2", "", {}, "sha512-hVDIBwsRruT73PbK7uP5ebUt+ezEtCmzZz3F59BSr2F6OVFnJ/6h8liuvdLrQ88Xmnk6/+xGGuq+pG9WwTuy3A=="], + + "vary": ["vary@1.1.2", "", {}, "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="], + + "vfile": ["vfile@6.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="], + + "vfile-message": ["vfile-message@4.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw=="], + + "vite": ["vite@7.3.1", "", { "dependencies": { "esbuild": "^0.27.0", "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", "rollup": "^4.43.0", "tinyglobby": "^0.2.15" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", "less": "^4.0.0", "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA=="], + + "vite-plugin-environment": ["vite-plugin-environment@1.1.3", "", { "peerDependencies": { "vite": ">= 2.7" } }, "sha512-9LBhB0lx+2lXVBEWxFZC+WO7PKEyE/ykJ7EPWCq95NEcCpblxamTbs5Dm3DLBGzwODpJMEnzQywJU8fw6XGGGA=="], + + "vite-plugin-rewrite-all": ["vite-plugin-rewrite-all@1.0.2", "", { "dependencies": { "connect-history-api-fallback": "^1.6.0" }, "peerDependencies": { "vite": "^2.0.0 || ^3.0.0 || ^4.0.0" } }, "sha512-NpiFyHi9w8iHm3kZ28ma/IU16LFCkNJNqTvGy6cjoit2EMBi7dgFWFZFYcwZjUrc+pOMup//rsQTRVILvF2efQ=="], + + "vite-plugin-solid": ["vite-plugin-solid@3.0.0-next.1", "", { "dependencies": { "@babel/core": "^7.23.3", "@types/babel__core": "^7.20.4", "babel-preset-solid": ">=2.0.0-beta.0 <2.0.0", "merge-anything": "^5.1.7", "solid-refresh": ">=0.8.0-next.2 < 0.8.0", "vitefu": "^1.0.4" }, "peerDependencies": { "@testing-library/jest-dom": "^5.16.6 || ^5.17.0 || ^6.*", "solid-js": ">=2.0.0-beta.0 <2.0.0", "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" }, "optionalPeers": ["@testing-library/jest-dom"] }, "sha512-Te38NOFOypn7dNpT1iCxNGtD1Fp2W5P885tS3wH36AOsJffvFfIsjhvx/FW5GVJzPuax8FajjM6AjgY1I+7wOQ=="], + + "vitefu": ["vitefu@1.1.1", "", { "peerDependencies": { "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0-beta.0" }, "optionalPeers": ["vite"] }, "sha512-B/Fegf3i8zh0yFbpzZ21amWzHmuNlLlmJT6n7bu5e+pCHUKQIfXSYokrqOBGEMMe9UG2sostKQF9mml/vYaWJQ=="], + + "w3c-keyname": ["w3c-keyname@2.2.8", "", {}, "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ=="], + + "web-streams-polyfill": ["web-streams-polyfill@3.3.3", "", {}, "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw=="], + + "webidl-conversions": ["webidl-conversions@3.0.1", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="], + + "webpack-virtual-modules": ["webpack-virtual-modules@0.6.2", "", {}, "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ=="], + + "whatwg-url": ["whatwg-url@5.0.0", "", { "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="], + + "which": ["which@4.0.0", "", { "dependencies": { "isexe": "^3.1.1" }, "bin": { "node-which": "bin/which.js" } }, "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg=="], + + "wrap-ansi": ["wrap-ansi@6.2.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA=="], + + "wrap-ansi-cjs": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="], + + "wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="], + + "wsl-utils": ["wsl-utils@0.3.1", "", { "dependencies": { "is-wsl": "^3.1.0", "powershell-utils": "^0.1.0" } }, "sha512-g/eziiSUNBSsdDJtCLB8bdYEUMj4jR7AGeUo96p/3dTafgjHhpF4RiCFPiRILwjQoDXx5MqkBr4fwWtR3Ky4Wg=="], + + "y18n": ["y18n@5.0.8", "", {}, "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="], + + "yallist": ["yallist@3.1.1", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="], + + "yargs": ["yargs@17.7.2", "", { "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" } }, "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w=="], + + "yargs-parser": ["yargs-parser@21.1.1", "", {}, "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="], + + "yoctocolors": ["yoctocolors@2.1.2", "", {}, "sha512-CzhO+pFNo8ajLM2d2IW/R93ipy99LWjtwblvC1RsoSUMZgyLbYFr221TnSNT7GjGdYui6P459mw9JH/g/zW2ug=="], + + "yoctocolors-cjs": ["yoctocolors-cjs@2.1.3", "", {}, "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw=="], + + "youch": ["youch@4.1.0-beta.13", "", { "dependencies": { "@poppinss/colors": "^4.1.5", "@poppinss/dumper": "^0.6.5", "@speed-highlight/core": "^1.2.9", "cookie-es": "^2.0.0", "youch-core": "^0.3.3" } }, "sha512-3+AG1Xvt+R7M7PSDudhbfbwiyveW6B8PLBIwTyEC598biEYIjHhC89i6DBEvR0EZUjGY3uGSnC429HpIa2Z09g=="], + + "youch-core": ["youch-core@0.3.3", "", { "dependencies": { "@poppinss/exception": "^1.2.2", "error-stack-parser-es": "^1.0.5" } }, "sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA=="], + + "zip-stream": ["zip-stream@6.0.1", "", { "dependencies": { "archiver-utils": "^5.0.0", "compress-commons": "^6.0.2", "readable-stream": "^4.0.0" } }, "sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA=="], + + "zod": ["zod@4.3.6", "", {}, "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg=="], + + "zod-to-json-schema": ["zod-to-json-schema@3.25.1", "", { "peerDependencies": { "zod": "^3.25 || ^4" } }, "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA=="], + + "zustand": ["zustand@4.5.7", "", { "dependencies": { "use-sync-external-store": "^1.2.2" }, "peerDependencies": { "@types/react": ">=16.8", "immer": ">=9.0.6", "react": ">=16.8" }, "optionalPeers": ["@types/react", "immer", "react"] }, "sha512-CHOUy7mu3lbD6o6LJLfllpjkzhHXSBlX8B9+qPddUsIfeF5S/UZ5q0kmCsnRqT1UHFQZchNFDDzMbQsuesHWlw=="], + + "zwitch": ["zwitch@2.0.4", "", {}, "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A=="], + + "@babel/core/@babel/parser": ["@babel/parser@7.28.5", "", { "dependencies": { "@babel/types": "^7.28.5" }, "bin": "./bin/babel-parser.js" }, "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ=="], + + "@babel/generator/@babel/parser": ["@babel/parser@7.28.5", "", { "dependencies": { "@babel/types": "^7.28.5" }, "bin": "./bin/babel-parser.js" }, "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ=="], + + "@babel/helper-module-transforms/@babel/helper-module-imports": ["@babel/helper-module-imports@7.27.1", "", { "dependencies": { "@babel/traverse": "^7.27.1", "@babel/types": "^7.27.1" } }, "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w=="], + + "@babel/parser/@babel/types": ["@babel/types@7.29.0", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.28.5" } }, "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A=="], + + "@babel/template/@babel/parser": ["@babel/parser@7.28.5", "", { "dependencies": { "@babel/types": "^7.28.5" }, "bin": "./bin/babel-parser.js" }, "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ=="], + + "@babel/traverse/@babel/parser": ["@babel/parser@7.28.5", "", { "dependencies": { "@babel/types": "^7.28.5" }, "bin": "./bin/babel-parser.js" }, "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ=="], + + "@cloudflare/kv-asset-handler/mime": ["mime@3.0.0", "", { "bin": { "mime": "cli.js" } }, "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A=="], + + "@dotenvx/dotenvx/commander": ["commander@11.1.0", "", {}, "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ=="], + + "@dotenvx/dotenvx/execa": ["execa@5.1.1", "", { "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", "human-signals": "^2.1.0", "is-stream": "^2.0.0", "merge-stream": "^2.0.0", "npm-run-path": "^4.0.1", "onetime": "^5.1.2", "signal-exit": "^3.0.3", "strip-final-newline": "^2.0.0" } }, "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg=="], + + "@isaacs/cliui/string-width": ["string-width@5.1.2", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="], + + "@isaacs/cliui/wrap-ansi": ["wrap-ansi@8.1.0", "", { "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", "strip-ansi": "^7.0.1" } }, "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ=="], + + "@mantine/core/type-fest": ["type-fest@4.41.0", "", {}, "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA=="], + + "@mapbox/node-pre-gyp/node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="], + + "@mapbox/node-pre-gyp/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + + "@modelcontextprotocol/sdk/hono": ["hono@4.11.9", "", {}, "sha512-Eaw2YTGM6WOxA6CXbckaEvslr2Ne4NFsKrvc0v97JD5awbmeBLO5w9Ho9L9kmKonrwF9RJlW6BxT1PVv/agBHQ=="], + + "@parcel/watcher/detect-libc": ["detect-libc@1.0.3", "", { "bin": { "detect-libc": "./bin/detect-libc.js" } }, "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg=="], + + "@parcel/watcher-wasm/napi-wasm": ["napi-wasm@1.1.3", "", { "bundled": true }, "sha512-h/4nMGsHjZDCYmQVNODIrYACVJ+I9KItbG+0si6W/jSjdA9JbWDoU4LLeMXVcEQGHjttI2tuXqDrbGF7qkUHHg=="], + + "@sagold/json-query/@sagold/json-pointer": ["@sagold/json-pointer@5.1.2", "", {}, "sha512-+wAhJZBXa6MNxRScg6tkqEbChEHMgVZAhTHVJ60Y7sbtXtu9XA49KfUkdWlS2x78D6H9nryiKePiYozumauPfA=="], + + "@solidjs/start/vite-plugin-solid": ["vite-plugin-solid@2.11.10", "", { "dependencies": { "@babel/core": "^7.23.3", "@types/babel__core": "^7.20.4", "babel-preset-solid": "^1.8.4", "merge-anything": "^5.1.7", "solid-refresh": "^0.6.3", "vitefu": "^1.0.4" }, "peerDependencies": { "@testing-library/jest-dom": "^5.16.6 || ^5.17.0 || ^6.*", "solid-js": "^1.7.2", "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" }, "optionalPeers": ["@testing-library/jest-dom"] }, "sha512-Yr1dQybmtDtDAHkii6hXuc1oVH9CPcS/Zb2jN/P36qqcrkNnVPsMTzQ06jyzFPFjj3U1IYKMVt/9ZqcwGCEbjw=="], + + "@tailwindcss/node/lightningcss": ["lightningcss@1.31.1", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.31.1", "lightningcss-darwin-arm64": "1.31.1", "lightningcss-darwin-x64": "1.31.1", "lightningcss-freebsd-x64": "1.31.1", "lightningcss-linux-arm-gnueabihf": "1.31.1", "lightningcss-linux-arm64-gnu": "1.31.1", "lightningcss-linux-arm64-musl": "1.31.1", "lightningcss-linux-x64-gnu": "1.31.1", "lightningcss-linux-x64-musl": "1.31.1", "lightningcss-win32-arm64-msvc": "1.31.1", "lightningcss-win32-x64-msvc": "1.31.1" } }, "sha512-l51N2r93WmGUye3WuFoN5k10zyvrVs0qfKBhyC5ogUQ6Ew6JUSswh78mbSO+IU3nTWsyOArqPCcShdQSadghBQ=="], + + "@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.8.1", "", { "dependencies": { "@emnapi/wasi-threads": "1.1.0", "tslib": "^2.4.0" }, "bundled": true }, "sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg=="], + + "@tailwindcss/oxide-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@1.8.1", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg=="], + + "@tailwindcss/oxide-wasm32-wasi/@emnapi/wasi-threads": ["@emnapi/wasi-threads@1.1.0", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ=="], + + "@tailwindcss/oxide-wasm32-wasi/@napi-rs/wasm-runtime": ["@napi-rs/wasm-runtime@1.1.1", "", { "dependencies": { "@emnapi/core": "^1.7.1", "@emnapi/runtime": "^1.7.1", "@tybys/wasm-util": "^0.10.1" }, "bundled": true }, "sha512-p64ah1M1ld8xjWv3qbvFwHiFVWrq1yFvV4f7w+mzaqiR4IlSgkqhcRdHwsGgomwzBH51sRY4NEowLxnaBjcW/A=="], + + "@tailwindcss/oxide-wasm32-wasi/@tybys/wasm-util": ["@tybys/wasm-util@0.10.1", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg=="], + + "@tailwindcss/oxide-wasm32-wasi/tslib": ["tslib@2.8.1", "", { "bundled": true }, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + + "@tanstack/react-store/@tanstack/store": ["@tanstack/store@0.8.0", "", {}, "sha512-Om+BO0YfMZe//X2z0uLF2j+75nQga6TpTJgLJQBiq85aOyZNIhkCgleNcud2KQg4k4v9Y9l+Uhru3qWMPGTOzQ=="], + + "@tanstack/router-utils/@babel/parser": ["@babel/parser@7.28.5", "", { "dependencies": { "@babel/types": "^7.28.5" }, "bin": "./bin/babel-parser.js" }, "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ=="], + + "@types/babel__core/@babel/parser": ["@babel/parser@7.28.5", "", { "dependencies": { "@babel/types": "^7.28.5" }, "bin": "./bin/babel-parser.js" }, "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ=="], + + "@types/babel__template/@babel/parser": ["@babel/parser@7.28.5", "", { "dependencies": { "@babel/types": "^7.28.5" }, "bin": "./bin/babel-parser.js" }, "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ=="], + + "@vercel/nft/resolve-from": ["resolve-from@5.0.0", "", {}, "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw=="], + + "anymatch/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], + + "archiver-utils/is-stream": ["is-stream@2.0.1", "", {}, "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg=="], + + "babel-dead-code-elimination/@babel/parser": ["@babel/parser@7.28.5", "", { "dependencies": { "@babel/types": "^7.28.5" }, "bin": "./bin/babel-parser.js" }, "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ=="], + + "babel-plugin-jsx-dom-expressions/@babel/types": ["@babel/types@7.29.0", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.28.5" } }, "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A=="], + + "balanced-match/jackspeak": ["jackspeak@4.2.3", "", { "dependencies": { "@isaacs/cliui": "^9.0.0" } }, "sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg=="], + + "bknd/hono": ["hono@4.10.4", "", {}, "sha512-YG/fo7zlU3KwrBL5vDpWKisLYiM+nVstBQqfr7gCPbSYURnNEP9BDxEMz8KfsDR9JX0lJWDRNc6nXX31v7ZEyg=="], + + "clipboardy/execa": ["execa@8.0.1", "", { "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^8.0.1", "human-signals": "^5.0.0", "is-stream": "^3.0.0", "merge-stream": "^2.0.0", "npm-run-path": "^5.1.0", "onetime": "^6.0.0", "signal-exit": "^4.1.0", "strip-final-newline": "^3.0.0" } }, "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg=="], + + "cliui/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], + + "cliui/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], + + "cliui/wrap-ansi": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="], + + "compress-commons/is-stream": ["is-stream@2.0.1", "", {}, "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg=="], + + "cross-spawn/which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="], + + "express/cookie": ["cookie@0.7.2", "", {}, "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w=="], + + "glob/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="], + + "globby/ignore": ["ignore@7.0.5", "", {}, "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg=="], + + "jsonv-ts/hono": ["hono@4.11.1", "", {}, "sha512-KsFcH0xxHes0J4zaQgWbYwmz3UPOOskdqZmItstUG93+Wk1ePBLkLGwbP9zlmh1BFUiL8Qp+Xfu9P7feJWpGNg=="], + + "lazystream/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="], + + "listhen/h3": ["h3@1.15.4", "", { "dependencies": { "cookie-es": "^1.2.2", "crossws": "^0.3.5", "defu": "^6.1.4", "destr": "^2.0.5", "iron-webcrypto": "^1.2.1", "node-mock-http": "^1.0.2", "radix3": "^1.1.2", "ufo": "^1.6.1", "uncrypto": "^0.1.3" } }, "sha512-z5cFQWDffyOe4vQ9xIqNfCZdV4p//vy6fBnr8Q1AWnVZ0teurKMG66rLj++TKwKPUP3u7iMUvrvKaEUiQw2QWQ=="], + + "listhen/pathe": ["pathe@1.1.2", "", {}, "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ=="], + + "log-symbols/is-unicode-supported": ["is-unicode-supported@1.3.0", "", {}, "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ=="], + + "magicast/@babel/parser": ["@babel/parser@7.28.5", "", { "dependencies": { "@babel/types": "^7.28.5" }, "bin": "./bin/babel-parser.js" }, "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ=="], + + "micromatch/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], + + "mlly/pkg-types": ["pkg-types@1.3.1", "", { "dependencies": { "confbox": "^0.1.8", "mlly": "^1.7.4", "pathe": "^2.0.1" } }, "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ=="], + + "msw/path-to-regexp": ["path-to-regexp@6.3.0", "", {}, "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ=="], + + "nearley/commander": ["commander@2.20.3", "", {}, "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="], + + "nitropack/h3": ["h3@1.15.4", "", { "dependencies": { "cookie-es": "^1.2.2", "crossws": "^0.3.5", "defu": "^6.1.4", "destr": "^2.0.5", "iron-webcrypto": "^1.2.1", "node-mock-http": "^1.0.2", "radix3": "^1.1.2", "ufo": "^1.6.1", "uncrypto": "^0.1.3" } }, "sha512-z5cFQWDffyOe4vQ9xIqNfCZdV4p//vy6fBnr8Q1AWnVZ0teurKMG66rLj++TKwKPUP3u7iMUvrvKaEUiQw2QWQ=="], + + "nitropack/ioredis": ["ioredis@5.8.2", "", { "dependencies": { "@ioredis/commands": "1.4.0", "cluster-key-slot": "^1.1.0", "debug": "^4.3.4", "denque": "^2.1.0", "lodash.defaults": "^4.2.0", "lodash.isarguments": "^3.1.0", "redis-errors": "^1.2.0", "redis-parser": "^3.0.0", "standard-as-callback": "^2.1.0" } }, "sha512-C6uC+kleiIMmjViJINWk80sOQw5lEzse1ZmvD+S/s8p8CWapftSaC+kocGTx6xrbrJ4WmYQGC08ffHLr6ToR6Q=="], + + "nitropack/semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + + "nitropack/source-map": ["source-map@0.7.6", "", {}, "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ=="], + + "npm-run-path/path-key": ["path-key@4.0.0", "", {}, "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ=="], + + "path-scurry/lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="], + + "prompts/kleur": ["kleur@3.0.3", "", {}, "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w=="], + + "readdir-glob/minimatch": ["minimatch@5.1.6", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g=="], + + "restore-cursor/onetime": ["onetime@7.0.0", "", { "dependencies": { "mimic-function": "^5.0.0" } }, "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ=="], + + "rollup-plugin-visualizer/open": ["open@8.4.2", "", { "dependencies": { "define-lazy-prop": "^2.0.0", "is-docker": "^2.1.1", "is-wsl": "^2.2.0" } }, "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ=="], + + "rollup-plugin-visualizer/source-map": ["source-map@0.7.6", "", {}, "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ=="], + + "send/http-errors": ["http-errors@2.0.0", "", { "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", "setprototypeof": "1.2.0", "statuses": "2.0.1", "toidentifier": "1.0.1" } }, "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ=="], + + "send/statuses": ["statuses@2.0.1", "", {}, "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ=="], + + "shadcn/zod": ["zod@3.25.76", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="], + + "solid-refresh/@babel/generator": ["@babel/generator@7.29.1", "", { "dependencies": { "@babel/parser": "^7.29.0", "@babel/types": "^7.29.0", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" } }, "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw=="], + + "solid-refresh/@babel/types": ["@babel/types@7.29.0", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.28.5" } }, "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A=="], + + "string-width-cjs/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], + + "string-width-cjs/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], + + "strip-ansi-cjs/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], + + "strip-literal/js-tokens": ["js-tokens@9.0.1", "", {}, "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ=="], + + "tar/yallist": ["yallist@5.0.0", "", {}, "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw=="], + + "terser/commander": ["commander@2.20.3", "", {}, "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="], + + "unctx/estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="], + + "unimport/estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="], + + "unstorage/h3": ["h3@1.15.4", "", { "dependencies": { "cookie-es": "^1.2.2", "crossws": "^0.3.5", "defu": "^6.1.4", "destr": "^2.0.5", "iron-webcrypto": "^1.2.1", "node-mock-http": "^1.0.2", "radix3": "^1.1.2", "ufo": "^1.6.1", "uncrypto": "^0.1.3" } }, "sha512-z5cFQWDffyOe4vQ9xIqNfCZdV4p//vy6fBnr8Q1AWnVZ0teurKMG66rLj++TKwKPUP3u7iMUvrvKaEUiQw2QWQ=="], + + "unstorage/lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="], + + "untun/pathe": ["pathe@1.1.2", "", {}, "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ=="], + + "vite/esbuild": ["esbuild@0.27.3", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.27.3", "@esbuild/android-arm": "0.27.3", "@esbuild/android-arm64": "0.27.3", "@esbuild/android-x64": "0.27.3", "@esbuild/darwin-arm64": "0.27.3", "@esbuild/darwin-x64": "0.27.3", "@esbuild/freebsd-arm64": "0.27.3", "@esbuild/freebsd-x64": "0.27.3", "@esbuild/linux-arm": "0.27.3", "@esbuild/linux-arm64": "0.27.3", "@esbuild/linux-ia32": "0.27.3", "@esbuild/linux-loong64": "0.27.3", "@esbuild/linux-mips64el": "0.27.3", "@esbuild/linux-ppc64": "0.27.3", "@esbuild/linux-riscv64": "0.27.3", "@esbuild/linux-s390x": "0.27.3", "@esbuild/linux-x64": "0.27.3", "@esbuild/netbsd-arm64": "0.27.3", "@esbuild/netbsd-x64": "0.27.3", "@esbuild/openbsd-arm64": "0.27.3", "@esbuild/openbsd-x64": "0.27.3", "@esbuild/openharmony-arm64": "0.27.3", "@esbuild/sunos-x64": "0.27.3", "@esbuild/win32-arm64": "0.27.3", "@esbuild/win32-ia32": "0.27.3", "@esbuild/win32-x64": "0.27.3" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg=="], + + "wrap-ansi/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], + + "wrap-ansi/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], + + "wrap-ansi-cjs/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], + + "wrap-ansi-cjs/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], + + "yargs/string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], + + "@dotenvx/dotenvx/execa/get-stream": ["get-stream@6.0.1", "", {}, "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg=="], + + "@dotenvx/dotenvx/execa/human-signals": ["human-signals@2.1.0", "", {}, "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw=="], + + "@dotenvx/dotenvx/execa/is-stream": ["is-stream@2.0.1", "", {}, "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg=="], + + "@dotenvx/dotenvx/execa/npm-run-path": ["npm-run-path@4.0.1", "", { "dependencies": { "path-key": "^3.0.0" } }, "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw=="], + + "@dotenvx/dotenvx/execa/signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="], + + "@dotenvx/dotenvx/execa/strip-final-newline": ["strip-final-newline@2.0.0", "", {}, "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA=="], + + "@isaacs/cliui/string-width/emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="], + + "@isaacs/cliui/wrap-ansi/ansi-styles": ["ansi-styles@6.2.3", "", {}, "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="], + + "@solidjs/start/vite-plugin-solid/babel-preset-solid": ["babel-preset-solid@1.9.10", "", { "dependencies": { "babel-plugin-jsx-dom-expressions": "^0.40.3" }, "peerDependencies": { "@babel/core": "^7.0.0", "solid-js": "^1.9.10" }, "optionalPeers": ["solid-js"] }, "sha512-HCelrgua/Y+kqO8RyL04JBWS/cVdrtUv/h45GntgQY+cJl4eBcKkCDV3TdMjtKx1nXwRaR9QXslM/Npm1dxdZQ=="], + + "@solidjs/start/vite-plugin-solid/solid-refresh": ["solid-refresh@0.6.3", "", { "dependencies": { "@babel/generator": "^7.23.6", "@babel/helper-module-imports": "^7.22.15", "@babel/types": "^7.23.6" }, "peerDependencies": { "solid-js": "^1.3" } }, "sha512-F3aPsX6hVw9ttm5LYlth8Q15x6MlI/J3Dn+o3EQyRTtTxidepSTwAYdozt01/YA+7ObcciagGEyXIopGZzQtbA=="], + + "@tailwindcss/node/lightningcss/lightningcss-android-arm64": ["lightningcss-android-arm64@1.31.1", "", { "os": "android", "cpu": "arm64" }, "sha512-HXJF3x8w9nQ4jbXRiNppBCqeZPIAfUo8zE/kOEGbW5NZvGc/K7nMxbhIr+YlFlHW5mpbg/YFPdbnCh1wAXCKFg=="], + + "@tailwindcss/node/lightningcss/lightningcss-darwin-arm64": ["lightningcss-darwin-arm64@1.31.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-02uTEqf3vIfNMq3h/z2cJfcOXnQ0GRwQrkmPafhueLb2h7mqEidiCzkE4gBMEH65abHRiQvhdcQ+aP0D0g67sg=="], + + "@tailwindcss/node/lightningcss/lightningcss-darwin-x64": ["lightningcss-darwin-x64@1.31.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-1ObhyoCY+tGxtsz1lSx5NXCj3nirk0Y0kB/g8B8DT+sSx4G9djitg9ejFnjb3gJNWo7qXH4DIy2SUHvpoFwfTA=="], + + "@tailwindcss/node/lightningcss/lightningcss-freebsd-x64": ["lightningcss-freebsd-x64@1.31.1", "", { "os": "freebsd", "cpu": "x64" }, "sha512-1RINmQKAItO6ISxYgPwszQE1BrsVU5aB45ho6O42mu96UiZBxEXsuQ7cJW4zs4CEodPUioj/QrXW1r9pLUM74A=="], + + "@tailwindcss/node/lightningcss/lightningcss-linux-arm-gnueabihf": ["lightningcss-linux-arm-gnueabihf@1.31.1", "", { "os": "linux", "cpu": "arm" }, "sha512-OOCm2//MZJ87CdDK62rZIu+aw9gBv4azMJuA8/KB74wmfS3lnC4yoPHm0uXZ/dvNNHmnZnB8XLAZzObeG0nS1g=="], + + "@tailwindcss/node/lightningcss/lightningcss-linux-arm64-gnu": ["lightningcss-linux-arm64-gnu@1.31.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-WKyLWztD71rTnou4xAD5kQT+982wvca7E6QoLpoawZ1gP9JM0GJj4Tp5jMUh9B3AitHbRZ2/H3W5xQmdEOUlLg=="], + + "@tailwindcss/node/lightningcss/lightningcss-linux-arm64-musl": ["lightningcss-linux-arm64-musl@1.31.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-mVZ7Pg2zIbe3XlNbZJdjs86YViQFoJSpc41CbVmKBPiGmC4YrfeOyz65ms2qpAobVd7WQsbW4PdsSJEMymyIMg=="], + + "@tailwindcss/node/lightningcss/lightningcss-linux-x64-gnu": ["lightningcss-linux-x64-gnu@1.31.1", "", { "os": "linux", "cpu": "x64" }, "sha512-xGlFWRMl+0KvUhgySdIaReQdB4FNudfUTARn7q0hh/V67PVGCs3ADFjw+6++kG1RNd0zdGRlEKa+T13/tQjPMA=="], + + "@tailwindcss/node/lightningcss/lightningcss-linux-x64-musl": ["lightningcss-linux-x64-musl@1.31.1", "", { "os": "linux", "cpu": "x64" }, "sha512-eowF8PrKHw9LpoZii5tdZwnBcYDxRw2rRCyvAXLi34iyeYfqCQNA9rmUM0ce62NlPhCvof1+9ivRaTY6pSKDaA=="], + + "@tailwindcss/node/lightningcss/lightningcss-win32-arm64-msvc": ["lightningcss-win32-arm64-msvc@1.31.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-aJReEbSEQzx1uBlQizAOBSjcmr9dCdL3XuC/6HLXAxmtErsj2ICo5yYggg1qOODQMtnjNQv2UHb9NpOuFtYe4w=="], + + "@tailwindcss/node/lightningcss/lightningcss-win32-x64-msvc": ["lightningcss-win32-x64-msvc@1.31.1", "", { "os": "win32", "cpu": "x64" }, "sha512-I9aiFrbd7oYHwlnQDqr1Roz+fTz61oDDJX7n9tYF9FJymH1cIN1DtKw3iYt6b8WZgEjoNwVSncwF4wx/ZedMhw=="], + + "balanced-match/jackspeak/@isaacs/cliui": ["@isaacs/cliui@9.0.0", "", {}, "sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg=="], + + "clipboardy/execa/get-stream": ["get-stream@8.0.1", "", {}, "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA=="], + + "clipboardy/execa/human-signals": ["human-signals@5.0.0", "", {}, "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ=="], + + "clipboardy/execa/is-stream": ["is-stream@3.0.0", "", {}, "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA=="], + + "clipboardy/execa/npm-run-path": ["npm-run-path@5.3.0", "", { "dependencies": { "path-key": "^4.0.0" } }, "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ=="], + + "clipboardy/execa/onetime": ["onetime@6.0.0", "", { "dependencies": { "mimic-fn": "^4.0.0" } }, "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ=="], + + "clipboardy/execa/strip-final-newline": ["strip-final-newline@3.0.0", "", {}, "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw=="], + + "cliui/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], + + "cliui/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], + + "cross-spawn/which/isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], + + "glob/minimatch/brace-expansion": ["brace-expansion@2.0.2", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="], + + "lazystream/readable-stream/safe-buffer": ["safe-buffer@5.1.2", "", {}, "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="], + + "lazystream/readable-stream/string_decoder": ["string_decoder@1.1.1", "", { "dependencies": { "safe-buffer": "~5.1.0" } }, "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg=="], + + "listhen/h3/cookie-es": ["cookie-es@1.2.2", "", {}, "sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg=="], + + "mlly/pkg-types/confbox": ["confbox@0.1.8", "", {}, "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w=="], + + "nitropack/h3/cookie-es": ["cookie-es@1.2.2", "", {}, "sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg=="], + + "nitropack/ioredis/@ioredis/commands": ["@ioredis/commands@1.4.0", "", {}, "sha512-aFT2yemJJo+TZCmieA7qnYGQooOS7QfNmYrzGtsYd3g9j5iDP8AimYYAesf79ohjbLG12XxC4nG5DyEnC88AsQ=="], + + "readdir-glob/minimatch/brace-expansion": ["brace-expansion@2.0.2", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="], + + "rollup-plugin-visualizer/open/define-lazy-prop": ["define-lazy-prop@2.0.0", "", {}, "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og=="], + + "rollup-plugin-visualizer/open/is-docker": ["is-docker@2.2.1", "", { "bin": { "is-docker": "cli.js" } }, "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ=="], + + "rollup-plugin-visualizer/open/is-wsl": ["is-wsl@2.2.0", "", { "dependencies": { "is-docker": "^2.0.0" } }, "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww=="], + + "string-width-cjs/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], + + "unstorage/h3/cookie-es": ["cookie-es@1.2.2", "", {}, "sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg=="], + + "vite/esbuild/@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.27.3", "", { "os": "aix", "cpu": "ppc64" }, "sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg=="], + + "vite/esbuild/@esbuild/android-arm": ["@esbuild/android-arm@0.27.3", "", { "os": "android", "cpu": "arm" }, "sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA=="], + + "vite/esbuild/@esbuild/android-arm64": ["@esbuild/android-arm64@0.27.3", "", { "os": "android", "cpu": "arm64" }, "sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg=="], + + "vite/esbuild/@esbuild/android-x64": ["@esbuild/android-x64@0.27.3", "", { "os": "android", "cpu": "x64" }, "sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ=="], + + "vite/esbuild/@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.27.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg=="], + + "vite/esbuild/@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.27.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg=="], + + "vite/esbuild/@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.27.3", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w=="], + + "vite/esbuild/@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.27.3", "", { "os": "freebsd", "cpu": "x64" }, "sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA=="], + + "vite/esbuild/@esbuild/linux-arm": ["@esbuild/linux-arm@0.27.3", "", { "os": "linux", "cpu": "arm" }, "sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw=="], + + "vite/esbuild/@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.27.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg=="], + + "vite/esbuild/@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.27.3", "", { "os": "linux", "cpu": "ia32" }, "sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg=="], + + "vite/esbuild/@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.27.3", "", { "os": "linux", "cpu": "none" }, "sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA=="], + + "vite/esbuild/@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.27.3", "", { "os": "linux", "cpu": "none" }, "sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw=="], + + "vite/esbuild/@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.27.3", "", { "os": "linux", "cpu": "ppc64" }, "sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA=="], + + "vite/esbuild/@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.27.3", "", { "os": "linux", "cpu": "none" }, "sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ=="], + + "vite/esbuild/@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.27.3", "", { "os": "linux", "cpu": "s390x" }, "sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw=="], + + "vite/esbuild/@esbuild/linux-x64": ["@esbuild/linux-x64@0.27.3", "", { "os": "linux", "cpu": "x64" }, "sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA=="], + + "vite/esbuild/@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.27.3", "", { "os": "none", "cpu": "arm64" }, "sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA=="], + + "vite/esbuild/@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.27.3", "", { "os": "none", "cpu": "x64" }, "sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA=="], + + "vite/esbuild/@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.27.3", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw=="], + + "vite/esbuild/@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.27.3", "", { "os": "openbsd", "cpu": "x64" }, "sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ=="], + + "vite/esbuild/@esbuild/openharmony-arm64": ["@esbuild/openharmony-arm64@0.27.3", "", { "os": "none", "cpu": "arm64" }, "sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g=="], + + "vite/esbuild/@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.27.3", "", { "os": "sunos", "cpu": "x64" }, "sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA=="], + + "vite/esbuild/@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.27.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA=="], + + "vite/esbuild/@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.27.3", "", { "os": "win32", "cpu": "ia32" }, "sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q=="], + + "vite/esbuild/@esbuild/win32-x64": ["@esbuild/win32-x64@0.27.3", "", { "os": "win32", "cpu": "x64" }, "sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA=="], + + "wrap-ansi-cjs/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], + + "wrap-ansi-cjs/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], + + "wrap-ansi/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], + + "wrap-ansi/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], + + "yargs/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], + + "yargs/string-width/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], + + "@solidjs/start/vite-plugin-solid/babel-preset-solid/babel-plugin-jsx-dom-expressions": ["babel-plugin-jsx-dom-expressions@0.40.3", "", { "dependencies": { "@babel/helper-module-imports": "7.18.6", "@babel/plugin-syntax-jsx": "^7.18.6", "@babel/types": "^7.20.7", "html-entities": "2.3.3", "parse5": "^7.1.2" }, "peerDependencies": { "@babel/core": "^7.20.12" } }, "sha512-5HOwwt0BYiv/zxl7j8Pf2bGL6rDXfV6nUhLs8ygBX+EFJXzBPHM/euj9j/6deMZ6wa52Wb2PBaAV5U/jKwIY1w=="], + + "@solidjs/start/vite-plugin-solid/solid-refresh/@babel/helper-module-imports": ["@babel/helper-module-imports@7.27.1", "", { "dependencies": { "@babel/traverse": "^7.27.1", "@babel/types": "^7.27.1" } }, "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w=="], + + "clipboardy/execa/npm-run-path/path-key": ["path-key@4.0.0", "", {}, "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ=="], + + "clipboardy/execa/onetime/mimic-fn": ["mimic-fn@4.0.0", "", {}, "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw=="], + + "glob/minimatch/brace-expansion/balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], + + "readdir-glob/minimatch/brace-expansion/balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], + + "yargs/string-width/strip-ansi/ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], + } +} diff --git a/components.json b/components.json new file mode 100644 index 0000000..b66e1f1 --- /dev/null +++ b/components.json @@ -0,0 +1,28 @@ +// https://zaidan.carere.dev/ui/button +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "kobalte", + "rsc": false, + "tsx": true, + "tailwind": { + "config": "", + "css": "src/styles/globals.css", + "baseColor": "neutral", + "cssVariables": true, + "prefix": "" + }, + "iconLibrary": "lucide", + "rtl": false, + "aliases": { + "components": "@/components", + "utils": "@/lib/utils", + "ui": "@/components/ui", + "lib": "@/lib", + "hooks": "@/hooks" + }, + "menuColor": "default", + "menuAccent": "subtle", + "registries": { + "@zaidan": "https://zaidan.carere.dev/r/{style}/{name}.json" + } +} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..f3e04c0 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,26 @@ +services: + redis: + image: redis:alpine + container_name: redis + ports: + - 6379:6379 + restart: always + postgres: + image: postgres:18-alpine + container_name: postgres + ports: + - 5432:5432 + restart: always + app: + build: + context: . + args: + - VITE_PROXY_PREFIX=${VITE_PROXY_PREFIX} + - VITE_PROXY_PREFIX_VAMANA=${VITE_PROXY_PREFIX_VAMANA} + - VITE_PROXY_PREFIX_BALARAMA=${VITE_PROXY_PREFIX_BALARAMA} + env_file: + - .env + ports: + - 3000:3000 + depends_on: + - redis diff --git a/package.json b/package.json new file mode 100644 index 0000000..39948f1 --- /dev/null +++ b/package.json @@ -0,0 +1,57 @@ +{ + "name": "example-basic", + "type": "module", + "scripts": { + "dev": "vite dev", + "build": "vite build", + "start": "vite start", + "preview": "vite preview", + "typegen": "bknd types --outfile bknd-types.d.ts", + "prebuild": "bknd copy-assets --out public/admin" + }, + "dependencies": { + "@fontsource/barlow-condensed": "^5.2.8", + "@solidjs/h": "^2.0.0-experimental.16", + "@solidjs/html": "^2.0.0-experimental.16", + "@solidjs/meta": "^0.29.4", + "@solidjs/router": "^0.15.4", + "@solidjs/start": "2.0.0-alpha.2", + "@solidjs/web": "^2.0.0-experimental.16", + "@solidjs/universal": "^2.0.0-experimental.16", + "@solidjs/vite-plugin-nitro-2": "^0.1.0", + "babel-preset-solid": "^2.0.0-experimental.16", + "vite-plugin-solid": "3.0.0-next.1", + "@trpc/client": "11.10.0", + "@trpc/server": "11.10.0", + "@types/node": "^25.3.5", + "artplayer": "^5.3.0", + "artplayer-plugin-chapter": "^1.0.1", + "bknd": "^0.20.0", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "dexie": "^4.3.0", + "hls.js": "^1.6.15", + "hono": "^4.12.5", + "ioredis": "^5.10.0", + "lucide-react": "^0.564.0", + "lucide-solid": "^0.563.0", + "radix-ui": "^1.4.3", + "simple-icons": "^16.10.0", + "solid-js": "^1.9.5", + "solid-toast": "^0.5.0", + "tailwind-merge": "^3.5.0", + "vite": "^7.3.1", + "zod": "^4.3.6" + }, + "engines": { + "node": ">=22" + }, + "devDependencies": { + "@tailwindcss/vite": "^4.2.1", + "shadcn": "^3.8.5", + "tailwindcss": "^4.2.1", + "tw-animate-css": "^1.4.0", + "vite-plugin-environment": "^1.1.3", + "vite-plugin-rewrite-all": "^1.0.2" + } +} \ No newline at end of file diff --git a/public/admin/assets/CodeEditor-BSbZC6_t.js b/public/admin/assets/CodeEditor-BSbZC6_t.js new file mode 100644 index 0000000..f0e69a4 --- /dev/null +++ b/public/admin/assets/CodeEditor-BSbZC6_t.js @@ -0,0 +1,24 @@ +import{r as xe,_ as Rd,j as Ih,E as Ad,b as Xd}from"./main-CfjI0j-e.js";let Cr=[],Nh=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e>1;if(n=Nh[i])e=i+1;else return!0;if(e==t)return!1}}function yl(n){return n>=127462&&n<=127487}const Ql=8205;function Vd(n,e,t=!0,i=!0){return(t?Gh:qd)(n,e,i)}function Gh(n,e,t){if(e==n.length)return e;e&&Fh(n.charCodeAt(e))&&Hh(n.charCodeAt(e-1))&&e--;let i=Is(n,e);for(e+=xl(i);e=0&&yl(Is(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function qd(n,e,t){for(;e>0;){let i=Gh(n,e-2,t);if(i=56320&&n<57344}function Hh(n){return n>=55296&&n<56320}function xl(n){return n<65536?1:2}class _{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=hi(this,e,t);let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),et.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=hi(this,e,t);let i=[];return this.decompose(e,t,i,0),et.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new Ei(this),r=new Ei(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new Ei(this,e)}iterRange(e,t=this.length){return new Kh(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Jh(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?_.empty:e.length<=32?new te(e):et.from(te.split(e,[]))}}class te extends _{constructor(e,t=Ed(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new Dd(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new te(wl(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=Un(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new te(l,o.length+r.length));else{let a=l.length>>1;i.push(new te(l.slice(0,a)),new te(l.slice(a)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof te))return super.replace(e,t,i);[e,t]=hi(this,e,t);let s=Un(this.text,Un(i.text,wl(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new te(s,r):et.from(te.split(s,[]),r)}sliceString(e,t=this.length,i=` +`){[e,t]=hi(this,e,t);let s="";for(let r=0,o=0;r<=t&&oe&&o&&(s+=i),er&&(s+=l.slice(Math.max(0,e-r),t-r)),r=a+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(t.push(new te(i,s)),i=[],s=-1);return s>-1&&t.push(new te(i,s)),t}}class et extends _{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,a=i+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,i,s);s=l+1,i=a+1}}decompose(e,t,i,s){for(let r=0,o=0;o<=t&&r=o){let h=s&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!h?i.push(l):l.decompose(e-o,t-o,i,h)}o=a+1}}replace(e,t,i){if([e,t]=hi(this,e,t),i.lines=r&&t<=l){let a=o.replace(e-r,t-r,i),h=this.lines-o.lines+a.lines;if(a.lines>4&&a.lines>h>>6){let c=this.children.slice();return c[s]=a,new et(c,this.length-(t-e)+i.length)}return super.replace(r,l,a)}r=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=` +`){[e,t]=hi(this,e,t);let s="";for(let r=0,o=0;re&&r&&(s+=i),eo&&(s+=l.sliceString(e-o,t-o,i)),o=a+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof et))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let a=this.children[s],h=e.children[r];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let O of e)O.flatten(d);return new te(d,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],a=0,h=-1,c=[];function f(d){let O;if(d.lines>r&&d instanceof et)for(let m of d.children)f(m);else d.lines>o&&(a>o||!a)?(u(),l.push(d)):d instanceof te&&a&&(O=c[c.length-1])instanceof te&&d.lines+O.lines<=32?(a+=d.lines,h+=d.length+1,c[c.length-1]=new te(O.text.concat(d.text),O.length+1+d.length)):(a+d.lines>s&&u(),a+=d.lines,h+=d.length+1,c.push(d))}function u(){a!=0&&(l.push(c.length==1?c[0]:et.from(c,h)),h=-1,a=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new et(l,t)}}_.empty=new te([""],0);function Ed(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Un(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r=t&&(a>i&&(l=l.slice(0,i-s)),s0?1:(e instanceof te?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof te?s.text.length:s.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(s instanceof te){let a=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=s.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof te?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Kh{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new Ei(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class Jh{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(_.prototype[Symbol.iterator]=function(){return this.iter()},Ei.prototype[Symbol.iterator]=Kh.prototype[Symbol.iterator]=Jh.prototype[Symbol.iterator]=function(){return this});class Dd{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}}function hi(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function pe(n,e,t=!0,i=!0){return Vd(n,e,t,i)}function Wd(n){return n>=56320&&n<57344}function Ld(n){return n>=55296&&n<56320}function ve(n,e){let t=n.charCodeAt(e);if(!Ld(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Wd(i)?(t-55296<<10)+(i-56320)+65536:t}function To(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function tt(n){return n<65536?1:2}const Tr=/\r\n?|\n/;var Oe=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(Oe||(Oe={}));class ot{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return r+(e-s);r+=l}else{if(i!=Oe.Simple&&h>=e&&(i==Oe.TrackDel&&se||i==Oe.TrackBefore&&se))return null;if(h>e||h==e&&t<0&&!l)return e==s||t<0?r:r+a;r+=a}s=h}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let i=0,s=0;i=0&&s<=t&&l>=e)return st?"cover":!0;s=l}return!1}toString(){let e="";for(let t=0;t=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ot(e)}static create(e){return new ot(e)}}class le extends ot{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Rr(this,(t,i,s,r,o)=>e=e.replace(s,s+(i-t),o),!1),e}mapDesc(e,t=!1){return Ar(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,r=0;s=0){t[s]=l,t[s+1]=o;let a=s>>1;for(;i.length0&&kt(i,t,r.text),r.forward(c),l+=c}let h=e[o++];for(;l>1].toJSON()))}return e}static of(e,t,i){let s=[],r=[],o=0,l=null;function a(c=!1){if(!c&&!s.length)return;ou||f<0||u>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let O=d?typeof d=="string"?_.of(d.split(i||Tr)):d:_.empty,m=O.length;if(f==u&&m==0)return;fo&&be(s,f-o,-1),be(s,u-f,m),kt(r,s,O),o=u}}return h(e),a(!l),l}static empty(e){return new le(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let s=0;sl&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;i.length=0&&t<=0&&t==n[s+1]?n[s]+=e:s>=0&&e==0&&n[s]==0?n[s+1]+=t:i?(n[s]+=e,n[s+1]+=t):n.push(e,t)}function kt(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],a=n.sections[o++];e(s,h,r,c,f),s=h,r=c}}}function Ar(n,e,t,i=!1){let s=[],r=i?[]:null,o=new Bi(n),l=new Bi(e);for(let a=-1;;){if(o.done&&l.len||l.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);be(s,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len=0&&a=0){let h=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);h+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.lena||o.ins>=0&&o.len>a)&&(l||i.length>h),r.forward2(a),o.forward(a)}}}}class Bi{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?_.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?_.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Wt{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let i,s;return this.empty?i=s=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new Wt(i,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return y.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return y.range(this.anchor,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return y.range(e.anchor,e.head)}static create(e,t,i){return new Wt(e,t,i)}}class y{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:y.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;ie.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new y(e.ranges.map(t=>Wt.fromJSON(t)),e.main)}static single(e,t=e){return new y([y.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;se?8:0)|r)}static normalized(e,t=0){let i=e[t];e.sort((s,r)=>s.from-r.from),t=e.indexOf(i);for(let s=1;sr.head?y.range(a,l):y.range(l,a))}}return new y(e,t)}}function tc(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Ro=0;class C{constructor(e,t,i,s,r){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=s,this.id=Ro++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(e={}){return new C(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:Ao),!!e.static,e.enables)}of(e){return new In([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new In(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new In(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function Ao(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class In{constructor(e,t,i,s){this.dependencies=e,this.facet=t,this.type=i,this.value=s,this.id=Ro++}dynamicSlot(e){var t;let i=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,l=this.type==2,a=!1,h=!1,c=[];for(let f of this.dependencies)f=="doc"?a=!0:f=="selection"?h=!0:(((t=e[f.id])!==null&&t!==void 0?t:1)&1)==0&&c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(a&&u.docChanged||h&&(u.docChanged||u.selection)||Xr(f,c)){let d=i(f);if(l?!kl(d,f.values[o],s):!s(d,f.values[o]))return f.values[o]=d,1}return 0},reconfigure:(f,u)=>{let d,O=u.config.address[r];if(O!=null){let m=ls(u,O);if(this.dependencies.every(g=>g instanceof C?u.facet(g)===f.facet(g):g instanceof ce?u.field(g,!1)==f.field(g,!1):!0)||(l?kl(d=i(f),m,s):s(d=i(f),m)))return f.values[o]=m,0}else d=i(f);return f.values[o]=d,1}}}}function kl(n,e,t){if(n.length!=e.length)return!1;for(let i=0;in[a.id]),s=t.map(a=>a.type),r=i.filter(a=>!(a&1)),o=n[e.id]>>1;function l(a){let h=[];for(let c=0;ci===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(wn).find(i=>i.field==this);return(t?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,s)=>{let r=i.values[t],o=this.updateF(r,s);return this.compareF(r,o)?0:(i.values[t]=o,1)},reconfigure:(i,s)=>{let r=i.facet(wn),o=s.facet(wn),l;return(l=r.find(a=>a.field==this))&&l!=o.find(a=>a.field==this)?(i.values[t]=l.create(i),1):s.config.address[this.id]!=null?(i.values[t]=s.field(this),0):(i.values[t]=this.create(i),1)}}}init(e){return[this,wn.of({field:this,create:e})]}get extension(){return this}}const Et={lowest:4,low:3,default:2,high:1,highest:0};function wi(n){return e=>new ic(e,n)}const Xt={highest:wi(Et.highest),high:wi(Et.high),default:wi(Et.default),low:wi(Et.low),lowest:wi(Et.lowest)};class ic{constructor(e,t){this.inner=e,this.prec=t}}class Vs{of(e){return new Mr(this,e)}reconfigure(e){return Vs.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Mr{constructor(e,t){this.compartment=e,this.inner=t}}class os{constructor(e,t,i,s,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,i){let s=[],r=Object.create(null),o=new Map;for(let u of _d(e,t,o))u instanceof ce?s.push(u):(r[u.facet.id]||(r[u.facet.id]=[])).push(u);let l=Object.create(null),a=[],h=[];for(let u of s)l[u.id]=h.length<<1,h.push(d=>u.slot(d));let c=i?.config.facets;for(let u in r){let d=r[u],O=d[0].facet,m=c&&c[u]||[];if(d.every(g=>g.type==0))if(l[O.id]=a.length<<1|1,Ao(m,d))a.push(i.facet(O));else{let g=O.combine(d.map(b=>b.value));a.push(i&&O.compare(g,i.facet(O))?i.facet(O):g)}else{for(let g of d)g.type==0?(l[g.id]=a.length<<1|1,a.push(g.value)):(l[g.id]=h.length<<1,h.push(b=>g.dynamicSlot(b)));l[O.id]=h.length<<1,h.push(g=>jd(g,O,d))}}let f=h.map(u=>u(l));return new os(e,o,f,l,a,r)}}function _d(n,e,t){let i=[[],[],[],[],[]],s=new Map;function r(o,l){let a=s.get(o);if(a!=null){if(a<=l)return;let h=i[a].indexOf(o);h>-1&&i[a].splice(h,1),o instanceof Mr&&t.delete(o.compartment)}if(s.set(o,l),Array.isArray(o))for(let h of o)r(h,l);else if(o instanceof Mr){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),r(h,l)}else if(o instanceof ic)r(o.inner,o.prec);else if(o instanceof ce)i[l].push(o),o.provides&&r(o.provides,l);else if(o instanceof In)i[l].push(o),o.facet.extensions&&r(o.facet.extensions,Et.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(h,l)}}return r(n,Et.default),i.reduce((o,l)=>o.concat(l))}function Di(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let s=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|s}function ls(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const nc=C.define(),Vr=C.define({combine:n=>n.some(e=>e),static:!0}),sc=C.define({combine:n=>n.length?n[0]:void 0,static:!0}),rc=C.define(),oc=C.define(),lc=C.define(),ac=C.define({combine:n=>n.length?n[0]:!1});class ht{constructor(e,t){this.type=e,this.value=t}static define(){return new Bd}}class Bd{of(e){return new ht(this,e)}}class Yd{constructor(e){this.map=e}of(e){return new V(this,e)}}class V{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new V(this.type,t)}is(e){return this.type==e}static define(e={}){return new Yd(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let s of e){let r=s.map(t);r&&i.push(r)}return i}}V.reconfigure=V.define();V.appendConfig=V.define();class re{constructor(e,t,i,s,r,o){this.startState=e,this.changes=t,this.selection=i,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&tc(i,t.newLength),r.some(l=>l.type==re.time)||(this.annotations=r.concat(re.time.of(Date.now())))}static create(e,t,i,s,r,o){return new re(e,t,i,s,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(re.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}re.time=ht.define();re.userEvent=ht.define();re.addToHistory=ht.define();re.remote=ht.define();function zd(n,e){let t=[];for(let i=0,s=0;;){let r,o;if(i=n[i]))r=n[i++],o=n[i++];else if(s=0;s--){let r=i[s](n);r instanceof re?n=r:Array.isArray(r)&&r.length==1&&r[0]instanceof re?n=r[0]:n=cc(e,ii(r),!1)}return n}function Id(n){let e=n.startState,t=e.facet(lc),i=n;for(let s=t.length-1;s>=0;s--){let r=t[s](n);r&&Object.keys(r).length&&(i=hc(i,qr(e,r,n.changes.newLength),!0))}return i==n?n:re.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const Nd=[];function ii(n){return n==null?Nd:Array.isArray(n)?n:[n]}var K=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(K||(K={}));const Gd=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Er;try{Er=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function Fd(n){if(Er)return Er.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||Gd.test(t)))return!0}return!1}function Hd(n){return e=>{if(!/\S/.test(e))return K.Space;if(Fd(e))return K.Word;for(let t=0;t-1)return K.Word;return K.Other}}class j{constructor(e,t,i,s,r,o){this.config=e,this.doc=t,this.selection=i,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let l=0;ls.set(h,a)),t=null),s.set(l.value.compartment,l.value.extension)):l.is(V.reconfigure)?(t=null,i=l.value):l.is(V.appendConfig)&&(t=null,i=ii(i).concat(l.value));let r;t?r=e.startState.values.slice():(t=os.resolve(i,s,this),r=new j(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,h)=>h.reconfigure(a,this),null).values);let o=e.startState.facet(Vr)?e.newSelection:e.newSelection.asSingle();new j(t,e.newDoc,o,r,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:y.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),s=this.changes(i.changes),r=[i.range],o=ii(i.effects);for(let l=1;lo.spec.fromJSON(l,a)))}}return j.create({doc:e.doc,selection:y.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=os.resolve(e.extensions||[],new Map),i=e.doc instanceof _?e.doc:_.of((e.doc||"").split(t.staticFacet(j.lineSeparator)||Tr)),s=e.selection?e.selection instanceof y?e.selection:y.single(e.selection.anchor,e.selection.head):y.single(0);return tc(s,i.length),t.staticFacet(Vr)||(s=s.asSingle()),new j(t,i,s,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(j.tabSize)}get lineBreak(){return this.facet(j.lineSeparator)||` +`}get readOnly(){return this.facet(ac)}phrase(e,...t){for(let i of this.facet(j.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>t.length?i:t[r-1]})),e}languageDataAt(e,t,i=-1){let s=[];for(let r of this.facet(nc))for(let o of r(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return Hd(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let a=pe(t,o,!1);if(r(t.slice(a,o))!=K.Word)break;o=a}for(;ln.length?n[0]:4});j.lineSeparator=sc;j.readOnly=ac;j.phrases=C.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(s=>n[s]==e[s])}});j.languageData=nc;j.changeFilter=rc;j.transactionFilter=oc;j.transactionExtender=lc;Vs.reconfigure=V.define();function ct(n,e,t={}){let i={};for(let s of n)for(let r of Object.keys(s)){let o=s[r],l=i[r];if(l===void 0)i[r]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,r))i[r]=t[r](l,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)i[s]===void 0&&(i[s]=e[s]);return i}class _t{eq(e){return this==e}range(e,t=e){return Dr.create(e,t,this)}}_t.prototype.startSide=_t.prototype.endSide=0;_t.prototype.point=!1;_t.prototype.mapMode=Oe.TrackDel;let Dr=class fc{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new fc(e,t,i)}};function Wr(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class Xo{constructor(e,t,i,s){this.from=e,this.to=t,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,s=0){let r=i?this.to:this.from;for(let o=s,l=r.length;;){if(o==l)return o;let a=o+l>>1,h=r[a]-e||(i?this.value[a].endSide:this.value[a].startSide)-t;if(a==o)return h>=0?o:l;h>=0?l=a:o=a+1}}between(e,t,i,s){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(i,1e9,!1,r);rd||u==d&&h.startSide>0&&h.endSide<=0)continue;(d-u||h.endSide-h.startSide)<0||(o<0&&(o=u),h.point&&(l=Math.max(l,d-u)),i.push(h),s.push(u-o),r.push(d-o))}return{mapped:i.length?new Xo(s,r,i,l):null,pos:o}}}class B{constructor(e,t,i,s){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=s}static create(e,t,i,s){return new B(e,t,i,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(i&&(t=t.slice().sort(Wr)),this.isEmpty)return t.length?B.of(t):this;let l=new uc(this,null,-1).goto(0),a=0,h=[],c=new bt;for(;l.value||a=0){let f=t[a++];c.addInner(f.from,f.to,f.value)||h.push(f)}else l.rangeIndex==1&&l.chunkIndexthis.chunkEnd(l.chunkIndex)||rl.to||r=r&&e<=r+o.length&&o.between(r,e-r,t-r,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return Yi.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Yi.from(e).goto(t)}static compare(e,t,i,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),l=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),a=Pl(o,l,i),h=new ki(o,a,r),c=new ki(l,a,r);i.iterGaps((f,u,d)=>$l(h,f,c,u,d,s)),i.empty&&i.length==0&&$l(h,0,c,0,0,s)}static eq(e,t,i=0,s){s==null&&(s=999999999);let r=e.filter(c=>!c.isEmpty&&t.indexOf(c)<0),o=t.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(r.length!=o.length)return!1;if(!r.length)return!0;let l=Pl(r,o),a=new ki(r,l,0).goto(i),h=new ki(o,l,0).goto(i);for(;;){if(a.to!=h.to||!Lr(a.active,h.active)||a.point&&(!h.point||!a.point.eq(h.point)))return!1;if(a.to>s)return!0;a.next(),h.next()}}static spans(e,t,i,s,r=-1){let o=new ki(e,null,r).goto(t),l=t,a=o.openStart;for(;;){let h=Math.min(o.to,i);if(o.point){let c=o.activeForPoint(o.to),f=o.pointFroml&&(s.span(l,h,o.active,a),a=o.openEnd(h));if(o.to>i)return a+(o.point&&o.to>i?1:0);l=o.to,o.next()}}static of(e,t=!1){let i=new bt;for(let s of e instanceof Dr?[e]:t?Kd(e):e)i.add(s.from,s.to,s.value);return i.finish()}static join(e){if(!e.length)return B.empty;let t=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let s=e[i];s!=B.empty;s=s.nextLayer)t=new B(s.chunkPos,s.chunk,t,Math.max(s.maxPoint,t.maxPoint));return t}}B.empty=new B([],[],null,-1);function Kd(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(Wr);e=i}return n}B.empty.nextLayer=B.empty;class bt{finishChunk(e){this.chunks.push(new Xo(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,i){this.addInner(e,t,i)||(this.nextLayer||(this.nextLayer=new bt)).add(e,t,i)}addInner(e,t,i){let s=e-this.lastTo||i.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return s<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(B.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=B.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Pl(n,e,t){let i=new Map;for(let r of n)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&s.push(new uc(o,t,i,r));return s.length==1?s[0]:new Yi(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let i=this.heap.length>>1;i>=0;i--)Ns(this.heap,i);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let i=this.heap.length>>1;i>=0;i--)Ns(this.heap,i);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Ns(this.heap,0)}}}function Ns(n,e){for(let t=n[e];;){let i=(e<<1)+1;if(i>=n.length)break;let s=n[i];if(i+1=0&&(s=n[i+1],i++),t.compare(s)<0)break;n[i]=t,n[e]=s,e=i}}class ki{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Yi.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){kn(this.active,e),kn(this.activeTo,e),kn(this.activeRank,e),this.minActive=vl(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:s,rank:r}=this.cursor;for(;t0;)t++;Pn(this.active,t,i),Pn(this.activeTo,t,s),Pn(this.activeRank,t,r),e&&Pn(e,t,this.cursor.from),this.minActive=vl(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>e){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&kn(i,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(i),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&i[s]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function $l(n,e,t,i,s,r){n.goto(e),t.goto(i);let o=i+s,l=i,a=i-e;for(;;){let h=n.to+a-t.to,c=h||n.endSide-t.endSide,f=c<0?n.to+a:t.to,u=Math.min(f,o);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&Lr(n.activeForPoint(n.to),t.activeForPoint(t.to))||r.comparePoint(l,u,n.point,t.point):u>l&&!Lr(n.active,t.active)&&r.compareRange(l,u,n.active,t.active),f>o)break;(h||n.openEnd!=t.openEnd)&&r.boundChange&&r.boundChange(f),l=f,c<=0&&n.next(),c>=0&&t.next()}}function Lr(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;i--)n[i+1]=n[i];n[e]=t}function vl(n,e){let t=-1,i=1e9;for(let s=0;s=e)return s;if(s==n.length)break;r+=n.charCodeAt(s)==9?t-r%t:1,s=pe(n,s)}return i===!0?-1:n.length}const _r="ͼ",Zl=typeof Symbol>"u"?"__"+_r:Symbol.for(_r),Br=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Cl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Zt{constructor(e,t){this.rules=[];let{finish:i}=t||{};function s(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function r(o,l,a,h){let c=[],f=/^@(\w+)\b/.exec(o[0]),u=f&&f[1]=="keyframes";if(f&&l==null)return a.push(o[0]+";");for(let d in l){let O=l[d];if(/&/.test(d))r(d.split(/,\s*/).map(m=>o.map(g=>m.replace(/&/,g))).reduce((m,g)=>m.concat(g)),O,a);else if(O&&typeof O=="object"){if(!f)throw new RangeError("The value of a property ("+d+") should be a primitive value.");r(s(d),O,c,u)}else O!=null&&c.push(d.replace(/_.*/,"").replace(/[A-Z]/g,m=>"-"+m.toLowerCase())+": "+O+";")}(c.length||u)&&a.push((i&&!f&&!h?o.map(i):o).join(", ")+" {"+c.join(" ")+"}")}for(let o in e)r(s(o),e[o],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=Cl[Zl]||1;return Cl[Zl]=e+1,_r+e.toString(36)}static mount(e,t,i){let s=e[Br],r=i&&i.nonce;s?r&&s.setNonce(r):s=new Jd(e,r),s.mount(Array.isArray(t)?t:[t],e)}}let Tl=new Map;class Jd{constructor(e,t){let i=e.ownerDocument||e,s=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let r=Tl.get(i);if(r)return e[Br]=r;this.sheet=new s.CSSStyleSheet,Tl.set(i,this)}else this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Br]=this}mount(e,t){let i=this.sheet,s=0,r=0;for(let o=0;o-1&&(this.modules.splice(a,1),r--,a=-1),a==-1){if(this.modules.splice(r++,0,l),i)for(let h=0;h",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},eO=typeof navigator<"u"&&/Mac/.test(navigator.platform),tO=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var de=0;de<10;de++)Ct[48+de]=Ct[96+de]=String(de);for(var de=1;de<=24;de++)Ct[de+111]="F"+de;for(var de=65;de<=90;de++)Ct[de]=String.fromCharCode(de+32),zi[de]=String.fromCharCode(de);for(var Gs in Ct)zi.hasOwnProperty(Gs)||(zi[Gs]=Ct[Gs]);function iO(n){var e=eO&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||tO&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?zi:Ct)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function Ui(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function Yr(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function Nn(n,e){if(!e.anchorNode)return!1;try{return Yr(n,e.anchorNode)}catch{return!1}}function ci(n){return n.nodeType==3?Yt(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Wi(n,e,t,i){return t?Rl(n,e,t,i,-1)||Rl(n,e,t,i,1):!1}function Bt(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function as(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function Rl(n,e,t,i,s){for(;;){if(n==t&&e==i)return!0;if(e==(s<0?0:at(n))){if(n.nodeName=="DIV")return!1;let r=n.parentNode;if(!r||r.nodeType!=1)return!1;e=Bt(n)+(s<0?0:1),n=r}else if(n.nodeType==1){if(n=n.childNodes[e+(s<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=s<0?at(n):0}else return!1}}function at(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function an(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function nO(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function dc(n,e){let t=e.width/n.offsetWidth,i=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-n.offsetHeight)<1)&&(i=1),{scaleX:t,scaleY:i}}function sO(n,e,t,i,s,r,o,l){let a=n.ownerDocument,h=a.defaultView||window;for(let c=n,f=!1;c&&!f;)if(c.nodeType==1){let u,d=c==a.body,O=1,m=1;if(d)u=nO(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(f=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let S=c.getBoundingClientRect();({scaleX:O,scaleY:m}=dc(c,S)),u={left:S.left,right:S.left+c.clientWidth*O,top:S.top,bottom:S.top+c.clientHeight*m}}let g=0,b=0;if(s=="nearest")e.top0&&e.bottom>u.bottom+b&&(b=e.bottom-u.bottom+o)):e.bottom>u.bottom&&(b=e.bottom-u.bottom+o,t<0&&e.top-b0&&e.right>u.right+g&&(g=e.right-u.right+r)):e.right>u.right&&(g=e.right-u.right+r,t<0&&e.leftu.bottom||e.leftu.right)&&(e={left:Math.max(e.left,u.left),right:Math.min(e.right,u.right),top:Math.max(e.top,u.top),bottom:Math.min(e.bottom,u.bottom)}),c=c.assignedSlot||c.parentNode}else if(c.nodeType==11)c=c.host;else break}function rO(n){let e=n.ownerDocument,t,i;for(let s=n.parentNode;s&&!(s==e.body||t&&i);)if(s.nodeType==1)!i&&s.scrollHeight>s.clientHeight&&(i=s),!t&&s.scrollWidth>s.clientWidth&&(t=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:t,y:i}}class oO{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:i}=e;this.set(t,Math.min(e.anchorOffset,t?at(t):0),i,Math.min(e.focusOffset,i?at(i):0))}set(e,t,i,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=s}}let Ft=null;function Oc(n){if(n.setActive)return n.setActive();if(Ft)return n.focus(Ft);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(Ft==null?{get preventScroll(){return Ft={preventScroll:!0},!0}}:void 0),!Ft){Ft=!1;for(let t=0;tMath.max(1,n.scrollHeight-n.clientHeight-4)}function gc(n,e){for(let t=n,i=e;;){if(t.nodeType==3&&i>0)return{node:t,offset:i};if(t.nodeType==1&&i>0){if(t.contentEditable=="false")return null;t=t.childNodes[i-1],i=at(t)}else if(t.parentNode&&!as(t))i=Bt(t),t=t.parentNode;else return null}}function bc(n,e){for(let t=n,i=e;;){if(t.nodeType==3&&it)return f.domBoundsAround(e,t,h);if(u>=e&&s==-1&&(s=a,r=h),h>t&&f.dom.parentNode==this.dom){o=a,l=c;break}c=u,h=u+f.breakAfter}return{from:r,to:l<0?i+this.length:l,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,i=Mo){this.markDirty();for(let s=e;sthis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function yc(n,e,t,i,s,r,o,l,a){let{children:h}=n,c=h.length?h[e]:null,f=r.length?r[r.length-1]:null,u=f?f.breakAfter:o;if(!(e==i&&c&&!o&&!u&&r.length<2&&c.merge(t,s,r.length?f:null,t==0,l,a))){if(i0&&(!o&&r.length&&c.merge(t,c.length,r[0],!1,l,0)?c.breakAfter=r.shift().breakAfter:(t2);var Z={mac:ql||/Mac/.test(Ze.platform),windows:/Win/.test(Ze.platform),linux:/Linux|X11/.test(Ze.platform),ie:qs,ie_version:xc?zr.documentMode||6:Ir?+Ir[1]:Ur?+Ur[1]:0,gecko:Ml,gecko_version:Ml?+(/Firefox\/(\d+)/.exec(Ze.userAgent)||[0,0])[1]:0,chrome:!!Fs,chrome_version:Fs?+Fs[1]:0,ios:ql,android:/Android\b/.test(Ze.userAgent),webkit:Vl,safari:wc,webkit_version:Vl?+(/\bAppleWebKit\/(\d+)/.exec(Ze.userAgent)||[0,0])[1]:0,tabSize:zr.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const hO=256;class Ue extends N{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,i){return this.flags&8||i&&(!(i instanceof Ue)||this.length-(t-e)+i.length>hO||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new Ue(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new Se(this.dom,e)}domBoundsAround(e,t,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return cO(this.dom,e,t)}}class St extends N{constructor(e,t=[],i=0){super(),this.mark=e,this.children=t,this.length=i;for(let s of t)s.setParent(this)}setAttrs(e){if(pc(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,i,s,r,o){return i&&(!(i instanceof St&&i.mark.eq(this.mark))||e&&r<=0||te&&t.push(i=e&&(s=r),i=a,r++}let o=this.length-e;return this.length=e,s>-1&&(this.children.length=s,this.markDirty()),new St(this.mark,t,o)}domAtPos(e){return kc(this,e)}coordsAt(e,t){return $c(this,e,t)}}function cO(n,e,t){let i=n.nodeValue.length;e>i&&(e=i);let s=e,r=e,o=0;e==0&&t<0||e==i&&t>=0?Z.chrome||Z.gecko||(e?(s--,o=1):r=0)?0:l.length-1];return Z.safari&&!o&&a.width==0&&(a=Array.prototype.find.call(l,h=>h.width)||a),o?an(a,o<0):a||null}class Pt extends N{static create(e,t,i){return new Pt(e,t,i)}constructor(e,t,i){super(),this.widget=e,this.length=t,this.side=i,this.prevWidget=null}split(e){let t=Pt.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,i,s,r,o){return i&&(!(i instanceof Pt)||!this.widget.compare(i.widget)||e>0&&r<=0||t0)?Se.before(this.dom):Se.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;let s=this.dom.getClientRects(),r=null;if(!s.length)return null;let o=this.side?this.side<0:e>0;for(let l=o?s.length-1:0;r=s[l],!(e>0?l==0:l==s.length-1||r.top0?Se.before(this.dom):Se.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return _.empty}get isHidden(){return!0}}Ue.prototype.children=Pt.prototype.children=fi.prototype.children=Mo;function kc(n,e){let t=n.dom,{children:i}=n,s=0;for(let r=0;sr&&e0;r--){let o=i[r-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let r=s;r0&&e instanceof St&&s.length&&(i=s[s.length-1])instanceof St&&i.mark.eq(e.mark)?Pc(i,e.children[0],t-1):(s.push(e),e.setParent(n)),n.length+=e.length}function $c(n,e,t){let i=null,s=-1,r=null,o=-1;function l(h,c){for(let f=0,u=0;f=c&&(d.children.length?l(d,c-u):(!r||r.isHidden&&t>0)&&(O>c||u==O&&d.getSide()>0)?(r=d,o=c-u):(u-1?1:0)!=s.length-(t&&s.indexOf(t)>-1?1:0))return!1;for(let r of i)if(r!=t&&(s.indexOf(r)==-1||n[r]!==e[r]))return!1;return!0}function Gr(n,e,t){let i=!1;if(e)for(let s in e)t&&s in t||(i=!0,s=="style"?n.style.cssText="":n.removeAttribute(s));if(t)for(let s in t)e&&e[s]==t[s]||(i=!0,s=="style"?n.style.cssText=t[s]:n.setAttribute(s,t[s]));return i}function uO(n){let e=Object.create(null);for(let t=0;t0?3e8:-4e8:t>0?1e8:-1e8,new Tt(e,t,t,i,e.widget||null,!1)}static replace(e){let t=!!e.block,i,s;if(e.isBlockGap)i=-5e8,s=4e8;else{let{start:r,end:o}=vc(e,t);i=(r?t?-3e8:-1:5e8)-1,s=(o?t?2e8:1:-6e8)+1}return new Tt(e,i,s,t,e.widget||null,!0)}static line(e){return new cn(e)}static set(e,t=!1){return B.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}A.none=B.empty;class hn extends A{constructor(e){let{start:t,end:i}=vc(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,i;return this==e||e instanceof hn&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&hs(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}hn.prototype.point=!1;class cn extends A{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof cn&&this.spec.class==e.spec.class&&hs(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}cn.prototype.mapMode=Oe.TrackBefore;cn.prototype.point=!0;class Tt extends A{constructor(e,t,i,s,r,o){super(t,i,r,e),this.block=s,this.isReplace=o,this.mapMode=s?t<=0?Oe.TrackBefore:Oe.TrackAfter:Oe.TrackDel}get type(){return this.startSide!=this.endSide?we.WidgetRange:this.startSide<=0?we.WidgetBefore:we.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Tt&&dO(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Tt.prototype.point=!0;function vc(n,e=!1){let{inclusiveStart:t,inclusiveEnd:i}=n;return t==null&&(t=n.inclusive),i==null&&(i=n.inclusive),{start:t??e,end:i??e}}function dO(n,e){return n==e||!!(n&&e&&n.compare(e))}function Gn(n,e,t,i=0){let s=t.length-1;s>=0&&t[s]+i>=n?t[s]=Math.max(t[s],e):t.push(n,e)}class se extends N{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,i,s,r,o){if(i){if(!(i instanceof se))return!1;this.dom||i.transferDOM(this)}return s&&this.setDeco(i?i.attrs:null),Qc(this,e,t,i?i.children.slice():[],r,o),!0}split(e){let t=new se;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i,off:s}=this.childPos(e);s&&(t.append(this.children[i].split(s),0),this.children[i].merge(s,this.children[i].length,null,!1,0,0),i++);for(let r=i;r0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){hs(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Pc(this,e,t)}addLineDeco(e){let t=e.spec.attributes,i=e.spec.class;t&&(this.attrs=Nr(t,this.attrs||{})),i&&(this.attrs=Nr({class:i},this.attrs||{}))}domAtPos(e){return kc(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var i;this.dom?this.flags&4&&(pc(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Gr(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let s=this.dom.lastChild;for(;s&&N.get(s)instanceof St;)s=s.lastChild;if(!s||!this.length||s.nodeName!="BR"&&((i=N.get(s))===null||i===void 0?void 0:i.isEditable)==!1&&(!Z.ios||!this.children.some(r=>r instanceof Ue))){let r=document.createElement("BR");r.cmIgnore=!0,this.dom.appendChild(r)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let i of this.children){if(!(i instanceof Ue)||/[^ -~]/.test(i.text))return null;let s=ci(i.dom);if(s.length!=1)return null;e+=s[0].width,t=s[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let i=$c(this,e,t);if(!this.children.length&&i&&this.parent){let{heightOracle:s}=this.parent.view.viewState,r=i.bottom-i.top;if(Math.abs(r-s.lineHeight)<2&&s.textHeight=t){if(r instanceof se)return r;if(o>t)break}s=o+r.breakAfter}return null}}class mt extends N{constructor(e,t,i){super(),this.widget=e,this.length=t,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,t,i,s,r,o){return i&&(!(i instanceof mt)||!this.widget.compare(i.widget)||e>0&&r<=0||t0}}class Fr extends ft{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Li{constructor(e,t,i,s){this.doc=e,this.pos=t,this.end=i,this.disallowBlockEffectsFor=s,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof mt&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new se),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append($n(new fi(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof mt)&&this.getLine()}buildText(e,t,i){for(;e>0;){if(this.textOff==this.text.length){let{value:r,lineBreak:o,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=r,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-i)),this.getLine().append($n(new Ue(this.text.slice(this.textOff,this.textOff+s)),t),i),this.atCursorPos=!0,this.textOff+=s,e-=s,i=0}}span(e,t,i,s){this.buildText(t-e,i,s),this.pos=t,this.openStart<0&&(this.openStart=s)}point(e,t,i,s,r,o){if(this.disallowBlockEffectsFor[o]&&i instanceof Tt){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=t-e;if(i instanceof Tt)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new mt(i.widget||ui.block,l,i));else{let a=Pt.create(i.widget||ui.inline,l,l?0:i.startSide),h=this.atCursorPos&&!a.isEditable&&r<=s.length&&(e0),c=!a.isEditable&&(es.length||i.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!h&&!a.isEditable&&(this.pendingBuffer=0),this.flushBuffer(s),h&&(f.append($n(new fi(1),s),r),r=s.length+Math.max(0,r-s.length)),f.append($n(a,s),r),this.atCursorPos=c,this.pendingBuffer=c?es.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=r)}static build(e,t,i,s,r){let o=new Li(e,t,i,r);return o.openEnd=B.spans(s,t,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function $n(n,e){for(let t of e)n=new St(t,[n],n.length);return n}class ui extends ft{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}ui.inline=new ui("span");ui.block=new ui("div");var H=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(H||(H={}));const zt=H.LTR,Vo=H.RTL;function Zc(n){let e=[];for(let t=0;t=t){if(l.level==i)return o;(r<0||(s!=0?s<0?l.fromt:e[r].level>l.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}}function Tc(n,e){if(n.length!=e.length)return!1;for(let t=0;t=0;m-=3)if(Fe[m+1]==-d){let g=Fe[m+2],b=g&2?s:g&4?g&1?r:s:0;b&&(I[f]=I[Fe[m]]=b),l=m;break}}else{if(Fe.length==189)break;Fe[l++]=f,Fe[l++]=u,Fe[l++]=a}else if((O=I[f])==2||O==1){let m=O==s;a=m?0:1;for(let g=l-3;g>=0;g-=3){let b=Fe[g+2];if(b&2)break;if(m)Fe[g+2]|=2;else{if(b&4)break;Fe[g+2]|=4}}}}}function SO(n,e,t,i){for(let s=0,r=i;s<=t.length;s++){let o=s?t[s-1].to:n,l=sa;)O==g&&(O=t[--m].from,g=m?t[m-1].to:n),I[--O]=d;a=c}else r=h,a++}}}function Kr(n,e,t,i,s,r,o){let l=i%2?2:1;if(i%2==s%2)for(let a=e,h=0;aa&&o.push(new $t(a,m.from,d));let g=m.direction==zt!=!(d%2);Jr(n,g?i+1:i,s,m.inner,m.from,m.to,o),a=m.to}O=m.to}else{if(O==t||(c?I[O]!=l:I[O]==l))break;O++}u?Kr(n,a,O,i+1,s,u,o):ae;){let c=!0,f=!1;if(!h||a>r[h-1].to){let m=I[a-1];m!=l&&(c=!1,f=m==16)}let u=!c&&l==1?[]:null,d=c?i:i+1,O=a;e:for(;;)if(h&&O==r[h-1].to){if(f)break e;let m=r[--h];if(!c)for(let g=m.from,b=h;;){if(g==e)break e;if(b&&r[b-1].to==g)g=r[--b].from;else{if(I[g-1]==l)break e;break}}if(u)u.push(m);else{m.toI.length;)I[I.length]=256;let i=[],s=e==zt?0:1;return Jr(n,s,s,t,0,n.length,i),i}function Rc(n){return[new $t(0,n,0)]}let Ac="";function QO(n,e,t,i,s){var r;let o=i.head-n.from,l=$t.find(e,o,(r=i.bidiLevel)!==null&&r!==void 0?r:-1,i.assoc),a=e[l],h=a.side(s,t);if(o==h){let u=l+=s?1:-1;if(u<0||u>=e.length)return null;a=e[l=u],o=a.side(!s,t),h=a.side(s,t)}let c=pe(n.text,o,a.forward(s,t));(ca.to)&&(c=h),Ac=n.text.slice(Math.min(o,c),Math.max(o,c));let f=l==(s?e.length-1:0)?null:e[l+(s?1:-1)];return f&&c==h&&f.level+(s?0:1)n.some(e=>e)}),Lc=C.define({combine:n=>n.some(e=>e)}),jc=C.define();class si{constructor(e,t="nearest",i="nearest",s=5,r=5,o=!1){this.range=e,this.y=t,this.x=i,this.yMargin=s,this.xMargin=r,this.isSnapshot=o}map(e){return e.empty?this:new si(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new si(y.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const vn=V.define({map:(n,e)=>n.map(e)}),_c=V.define();function Te(n,e,t){let i=n.facet(qc);i.length?i[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const pt=C.define({combine:n=>n.length?n[0]:!0});let wO=0;const Ri=C.define();class ie{constructor(e,t,i,s,r){this.id=e,this.create=t,this.domEventHandlers=i,this.domEventObservers=s,this.extension=r(this)}static define(e,t){const{eventHandlers:i,eventObservers:s,provide:r,decorations:o}=t||{};return new ie(wO++,e,i,s,l=>{let a=[Ri.of(l)];return o&&a.push(Ii.of(h=>{let c=h.plugin(l);return c?o(c):A.none})),r&&a.push(r(l)),a})}static fromClass(e,t){return ie.define(i=>new e(i),t)}}class Hs{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(i){if(Te(t.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Te(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(i){Te(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Bc=C.define(),Do=C.define(),Ii=C.define(),Yc=C.define(),Wo=C.define(),zc=C.define();function Dl(n,e){let t=n.state.facet(zc);if(!t.length)return t;let i=t.map(r=>r instanceof Function?r(n):r),s=[];return B.spans(i,e.from,e.to,{point(){},span(r,o,l,a){let h=r-e.from,c=o-e.from,f=s;for(let u=l.length-1;u>=0;u--,a--){let d=l[u].spec.bidiIsolate,O;if(d==null&&(d=xO(e.text,h,c)),a>0&&f.length&&(O=f[f.length-1]).to==h&&O.direction==d)O.to=c,f=O.inner;else{let m={from:h,to:c,direction:d,inner:[]};f.push(m),f=m.inner}}}}),s}const Uc=C.define();function Lo(n){let e=0,t=0,i=0,s=0;for(let r of n.state.facet(Uc)){let o=r(n);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(i=Math.max(i,o.top)),o.bottom!=null&&(s=Math.max(s,o.bottom)))}return{left:e,right:t,top:i,bottom:s}}const Ai=C.define();class je{constructor(e,t,i,s){this.fromA=e,this.toA=t,this.fromB=i,this.toB=s}join(e){return new je(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,i=this;for(;t>0;t--){let s=e[t-1];if(!(s.fromA>i.toA)){if(s.toAc)break;r+=2}if(!a)return i;new je(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),o=a.toA,l=a.toB}}}class cs{constructor(e,t,i){this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=le.empty(this.startState.doc.length);for(let r of i)this.changes=this.changes.compose(r.changes);let s=[];this.changes.iterChangedRanges((r,o,l,a)=>s.push(new je(r,o,l,a))),this.changedRanges=s}static create(e,t,i){return new cs(e,t,i)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class Wl extends N{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=A.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new se],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new je(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:h,toA:c})=>cthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let s=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?s=this.domChanged.newSel.head:!TO(e.changes,this.hasComposition)&&!e.selectionSet&&(s=e.state.selection.main.head));let r=s>-1?PO(this.view,e.changes,s):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:h,to:c}=this.hasComposition;i=new je(h,c,e.changes.mapPos(h,-1),e.changes.mapPos(c,1)).addToSet(i.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(Z.ie||Z.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,l=this.updateDeco(),a=ZO(o,l,e.changes);return i=je.extendWithRanges(i,a),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,i);let{observer:s}=this.view;s.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=Z.chrome||Z.ios?{node:s.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||s.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let r=[];if(this.view.viewport.from||this.view.viewport.to=0?s[o]:null;if(!l)break;let{fromA:a,toA:h,fromB:c,toB:f}=l,u,d,O,m;if(i&&i.range.fromBc){let w=Li.build(this.view.state.doc,c,i.range.fromB,this.decorations,this.dynamicDecorationMap),Q=Li.build(this.view.state.doc,i.range.toB,f,this.decorations,this.dynamicDecorationMap);d=w.breakAtStart,O=w.openStart,m=Q.openEnd;let k=this.compositionView(i);Q.breakAtStart?k.breakAfter=1:Q.content.length&&k.merge(k.length,k.length,Q.content[0],!1,Q.openStart,0)&&(k.breakAfter=Q.content[0].breakAfter,Q.content.shift()),w.content.length&&k.merge(0,0,w.content[w.content.length-1],!0,0,w.openEnd)&&w.content.pop(),u=w.content.concat(k).concat(Q.content)}else({content:u,breakAtStart:d,openStart:O,openEnd:m}=Li.build(this.view.state.doc,c,f,this.decorations,this.dynamicDecorationMap));let{i:g,off:b}=r.findPos(h,1),{i:S,off:x}=r.findPos(a,-1);yc(this,S,x,g,b,u,d,O,m)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let i of t.effects)i.is(_c)&&(this.editContextFormatting=i.value)}compositionView(e){let t=new Ue(e.text.nodeValue);t.flags|=8;for(let{deco:s}of e.marks)t=new St(s,[t],t.length);let i=new se;return i.append(t,0),i}fixCompositionDOM(e){let t=(r,o)=>{o.flags|=8|(o.children.some(a=>a.flags&7)?1:0),this.markedForComposition.add(o);let l=N.get(r);l&&l!=o&&(l.dom=null),o.setDOM(r)},i=this.childPos(e.range.fromB,1),s=this.children[i.i];t(e.line,s);for(let r=e.marks.length-1;r>=-1;r--)i=s.childPos(i.off,1),s=s.children[i.i],t(r>=0?e.marks[r].node:e.text,s)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,s=i==this.dom,r=!s&&!(this.view.state.facet(pt)||this.dom.tabIndex>-1)&&Nn(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(s||t||r))return;let o=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(l.anchor)),h=l.empty?a:this.moveToLine(this.domAtPos(l.head));if(Z.gecko&&l.empty&&!this.hasComposition&&kO(a)){let f=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(f,a.node.childNodes[a.offset]||null)),a=h=new Se(f,0),o=!0}let c=this.view.observer.selectionRange;(o||!c.focusNode||(!Wi(a.node,a.offset,c.anchorNode,c.anchorOffset)||!Wi(h.node,h.offset,c.focusNode,c.focusOffset))&&!this.suppressWidgetCursorChange(c,l))&&(this.view.observer.ignore(()=>{Z.android&&Z.chrome&&this.dom.contains(c.focusNode)&&CO(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=Ui(this.view.root);if(f)if(l.empty){if(Z.gecko){let u=$O(a.node,a.offset);if(u&&u!=3){let d=(u==1?gc:bc)(a.node,a.offset);d&&(a=new Se(d.node,d.offset))}}f.collapse(a.node,a.offset),l.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=l.bidiLevel)}else if(f.extend){f.collapse(a.node,a.offset);try{f.extend(h.node,h.offset)}catch{}}else{let u=document.createRange();l.anchor>l.head&&([a,h]=[h,a]),u.setEnd(h.node,h.offset),u.setStart(a.node,a.offset),f.removeAllRanges(),f.addRange(u)}r&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(a,h)),this.impreciseAnchor=a.precise?null:new Se(c.anchorNode,c.anchorOffset),this.impreciseHead=h.precise?null:new Se(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Wi(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,i=Ui(e.root),{anchorNode:s,anchorOffset:r}=e.observer.selectionRange;if(!i||!t.empty||!t.assoc||!i.modify)return;let o=se.find(this,t.head);if(!o)return;let l=o.posAtStart;if(t.head==l||t.head==l+o.length)return;let a=this.coordsAt(t.head,-1),h=this.coordsAt(t.head,1);if(!a||!h||a.bottom>h.top)return;let c=this.domAtPos(t.head+t.assoc);i.collapse(c.node,c.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&i.collapse(s,r)}moveToLine(e){let t=this.dom,i;if(e.node!=t)return e;for(let s=e.offset;!i&&s=0;s--){let r=N.get(t.childNodes[s]);r instanceof se&&(i=r.domAtPos(r.length))}return i?new Se(i.node,i.offset,!0):e}nearest(e){for(let t=e;t;){let i=N.get(t);if(i&&i.rootView==this)return i;t=t.parentNode}return null}posFromDOM(e,t){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,t)+i.posAtStart}domAtPos(e){let{i:t,off:i}=this.childCursor().findPos(e,-1);for(;t=0;o--){let l=this.children[o],a=r-l.breakAfter,h=a-l.length;if(ae||l.covers(1))&&(!i||l instanceof se&&!(i instanceof se&&t>=0)))i=l,s=h;else if(i&&h==e&&a==e&&l instanceof mt&&Math.abs(t)<2){if(l.deco.startSide<0)break;o&&(i=null)}r=h}return i?i.coordsAt(e-s,t):null}coordsForChar(e){let{i:t,off:i}=this.childPos(e,1),s=this.children[t];if(!(s instanceof se))return null;for(;s.children.length;){let{i:l,off:a}=s.childPos(i,1);for(;;l++){if(l==s.children.length)return null;if((s=s.children[l]).length)break}i=a}if(!(s instanceof Ue))return null;let r=pe(s.text,i);if(r==i)return null;let o=Yt(s.dom,i,r).getClientRects();for(let l=0;lMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==H.LTR;for(let h=0,c=0;cs)break;if(h>=i){let d=f.dom.getBoundingClientRect();if(t.push(d.height),o){let O=f.dom.lastChild,m=O?ci(O):[];if(m.length){let g=m[m.length-1],b=a?g.right-d.left:d.right-g.left;b>l&&(l=b,this.minWidth=r,this.minWidthFrom=h,this.minWidthTo=u)}}}h=u+f.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?H.RTL:H.LTR}measureTextSize(){for(let r of this.children)if(r instanceof se){let o=r.measureTextSize();if(o)return o}let e=document.createElement("div"),t,i,s;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let r=ci(e.firstChild)[0];t=e.getBoundingClientRect().height,i=r?r.width/27:7,s=r?r.height:t,e.remove()}),{lineHeight:t,charWidth:i,textHeight:s}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Sc(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,s=0;;s++){let r=s==t.viewports.length?null:t.viewports[s],o=r?r.from-1:this.length;if(o>i){let l=(t.lineBlockAt(o).bottom-t.lineBlockAt(i).top)/this.view.scaleY;e.push(A.replace({widget:new Fr(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!r)break;i=r.to+1}return A.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Ii).map(r=>(this.dynamicDecorationMap[e++]=typeof r=="function")?r(this.view):r),i=!1,s=this.view.state.facet(Yc).map((r,o)=>{let l=typeof r=="function";return l&&(i=!0),l?r(this.view):r});for(s.length&&(this.dynamicDecorationMap[e++]=i,t.push(B.join(s))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),s;if(!i)return;!t.empty&&(s=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let r=Lo(this.view),o={left:i.left-r.left,top:i.top-r.top,right:i.right+r.right,bottom:i.bottom+r.bottom},{offsetWidth:l,offsetHeight:a}=this.view.scrollDOM;sO(this.view.scrollDOM,o,t.head{ie.from&&(t=!0)}),t}function RO(n,e,t=1){let i=n.charCategorizer(e),s=n.doc.lineAt(e),r=e-s.from;if(s.length==0)return y.cursor(e);r==0?t=1:r==s.length&&(t=-1);let o=r,l=r;t<0?o=pe(s.text,r,!1):l=pe(s.text,r);let a=i(s.text.slice(o,l));for(;o>0;){let h=pe(s.text,o,!1);if(i(s.text.slice(h,o))!=a)break;o=h}for(;ln?e.left-n:Math.max(0,n-e.right)}function XO(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function Ks(n,e){return n.tope.top+1}function Ll(n,e){return en.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function to(n,e,t){let i,s,r,o,l=!1,a,h,c,f;for(let O=n.firstChild;O;O=O.nextSibling){let m=ci(O);for(let g=0;gx||o==x&&r>S){i=O,s=b,r=S,o=x;let w=x?t0?g0)}S==0?t>b.bottom&&(!c||c.bottomb.top)&&(h=O,f=b):c&&Ks(c,b)?c=jl(c,b.bottom):f&&Ks(f,b)&&(f=Ll(f,b.top))}}if(c&&c.bottom>=t?(i=a,s=c):f&&f.top<=t&&(i=h,s=f),!i)return{node:n,offset:0};let u=Math.max(s.left,Math.min(s.right,e));if(i.nodeType==3)return _l(i,u,t);if(l&&i.contentEditable!="false")return to(i,u,t);let d=Array.prototype.indexOf.call(n.childNodes,i)+(e>=(s.left+s.right)/2?1:0);return{node:n,offset:d}}function _l(n,e,t){let i=n.nodeValue.length,s=-1,r=1e9,o=0;for(let l=0;lt?c.top-t:t-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&f=(c.left+c.right)/2,d=u;if((Z.chrome||Z.gecko)&&Yt(n,l).getBoundingClientRect().left==c.right&&(d=!u),f<=0)return{node:n,offset:l+(d?1:0)};s=l+(d?1:0),r=f}}}return{node:n,offset:s>-1?s:o>0?n.nodeValue.length:0}}function Nc(n,e,t,i=-1){var s,r;let o=n.contentDOM.getBoundingClientRect(),l=o.top+n.viewState.paddingTop,a,{docHeight:h}=n.viewState,{x:c,y:f}=e,u=f-l;if(u<0)return 0;if(u>h)return n.state.doc.length;for(let w=n.viewState.heightOracle.textHeight/2,Q=!1;a=n.elementAtHeight(u),a.type!=we.Text;)for(;u=i>0?a.bottom+w:a.top-w,!(u>=0&&u<=h);){if(Q)return t?null:0;Q=!0,i=-i}f=l+u;let d=a.from;if(dn.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:t?null:Bl(n,o,a,c,f);let O=n.dom.ownerDocument,m=n.root.elementFromPoint?n.root:O,g=m.elementFromPoint(c,f);g&&!n.contentDOM.contains(g)&&(g=null),g||(c=Math.max(o.left+1,Math.min(o.right-1,c)),g=m.elementFromPoint(c,f),g&&!n.contentDOM.contains(g)&&(g=null));let b,S=-1;if(g&&((s=n.docView.nearest(g))===null||s===void 0?void 0:s.isEditable)!=!1){if(O.caretPositionFromPoint){let w=O.caretPositionFromPoint(c,f);w&&({offsetNode:b,offset:S}=w)}else if(O.caretRangeFromPoint){let w=O.caretRangeFromPoint(c,f);w&&({startContainer:b,startOffset:S}=w,(!n.contentDOM.contains(b)||Z.safari&&MO(b,S,c)||Z.chrome&&VO(b,S,c))&&(b=void 0))}b&&(S=Math.min(at(b),S))}if(!b||!n.docView.dom.contains(b)){let w=se.find(n.docView,d);if(!w)return u>a.top+a.height/2?a.to:a.from;({node:b,offset:S}=to(w.dom,c,f))}let x=n.docView.nearest(b);if(!x)return null;if(x.isWidget&&((r=x.dom)===null||r===void 0?void 0:r.nodeType)==1){let w=x.dom.getBoundingClientRect();return e.yn.defaultLineHeight*1.5){let l=n.viewState.heightOracle.textHeight,a=Math.floor((s-t.top-(n.defaultLineHeight-l)*.5)/l);r+=a*n.viewState.heightOracle.lineLength}let o=n.state.sliceDoc(t.from,t.to);return t.from+jr(o,r,n.state.tabSize)}function MO(n,e,t){let i;if(n.nodeType!=3||e!=(i=n.nodeValue.length))return!1;for(let s=n.nextSibling;s;s=s.nextSibling)if(s.nodeType!=1||s.nodeName!="BR")return!1;return Yt(n,i-1,i).getBoundingClientRect().left>t}function VO(n,e,t){if(e!=0)return!1;for(let s=n;;){let r=s.parentNode;if(!r||r.nodeType!=1||r.firstChild!=s)return!1;if(r.classList.contains("cm-line"))break;s=r}let i=n.nodeType==1?n.getBoundingClientRect():Yt(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-i.left>5}function io(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let i of t.type)if(i.to>e||i.to==e&&(i.to==t.to||i.type==we.Text))return i}return t}function qO(n,e,t,i){let s=io(n,e.head),r=!i||s.type!=we.Text||!(n.lineWrapping||s.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head);if(r){let o=n.dom.getBoundingClientRect(),l=n.textDirectionAt(s.from),a=n.posAtCoords({x:t==(l==H.LTR)?o.right-1:o.left+1,y:(r.top+r.bottom)/2});if(a!=null)return y.cursor(a,t?-1:1)}return y.cursor(t?s.to:s.from,t?-1:1)}function Yl(n,e,t,i){let s=n.state.doc.lineAt(e.head),r=n.bidiSpans(s),o=n.textDirectionAt(s.from);for(let l=e,a=null;;){let h=QO(s,r,o,l,t),c=Ac;if(!h){if(s.number==(t?n.state.doc.lines:1))return l;c=` +`,s=n.state.doc.line(s.number+(t?1:-1)),r=n.bidiSpans(s),h=n.visualLineSide(s,!t)}if(a){if(!a(c))return l}else{if(!i)return h;a=i(c)}l=h}}function EO(n,e,t){let i=n.state.charCategorizer(e),s=i(t);return r=>{let o=i(r);return s==K.Space&&(s=o),s==o}}function DO(n,e,t,i){let s=e.head,r=t?1:-1;if(s==(t?n.state.doc.length:0))return y.cursor(s,e.assoc);let o=e.goalColumn,l,a=n.contentDOM.getBoundingClientRect(),h=n.coordsAtPos(s,e.assoc||-1),c=n.documentTop;if(h)o==null&&(o=h.left-a.left),l=r<0?h.top:h.bottom;else{let d=n.viewState.lineBlockAt(s);o==null&&(o=Math.min(a.right-a.left,n.defaultCharacterWidth*(s-d.from))),l=(r<0?d.top:d.bottom)+c}let f=a.left+o,u=i??n.viewState.heightOracle.textHeight>>1;for(let d=0;;d+=10){let O=l+(u+d)*r,m=Nc(n,{x:f,y:O},!1,r);if(Oa.bottom||(r<0?ms)){let g=n.docView.coordsForChar(m),b=!g||O{if(e>r&&es(n)),t.from,e.head>t.from?-1:1);return i==t.from?t:y.cursor(i,ir)&&this.lineBreak(),s=o}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,o=1,l;if(this.lineSeparator?(r=t.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(l=s.exec(t))&&(r=l.index,o=l[0].length),this.append(t.slice(i,r<0?t.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=o-1);i=r+o}}readNode(e){if(e.cmIgnore)return;let t=N.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let s=i.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(LO(e,i.node,i.offset)?t:0))}}function LO(n,e,t){for(;;){if(!e||t-1;let{impreciseHead:r,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,i,0))){let l=r||o?[]:YO(e),a=new WO(l,e.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=zO(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=r&&r.node==l.focusNode&&r.offset==l.focusOffset||!Yr(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),h=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!Yr(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),c=e.viewport;if((Z.ios||Z.chrome)&&e.state.selection.main.empty&&a!=h&&(c.from>0||c.toDate.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:l}=e.bounds,a=s.from,h=null;(r===8||Z.android&&e.text.length=s.from&&t.to<=s.to&&(t.from!=s.from||t.to!=s.to)&&s.to-s.from-(t.to-t.from)<=4?t={from:s.from,to:s.to,insert:n.state.doc.slice(s.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,s.to))}:Z.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==` + `&&n.lineWrapping&&(i&&(i=y.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:_.of([" "])}),t)return jo(n,t,i,r);if(i&&!i.main.eq(s)){let o=!1,l="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(o=!0),l=n.inputState.lastSelectionOrigin),n.dispatch({selection:i,scrollIntoView:o,userEvent:l}),!0}else return!1}function jo(n,e,t,i=-1){if(Z.ios&&n.inputState.flushIOSKey(e))return!0;let s=n.state.selection.main;if(Z.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&n.state.sliceDoc(e.from,s.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&ni(n.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&e.insert.length==0||i==8&&e.insert.lengths.head)&&ni(n.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&e.insert.length==0&&ni(n.contentDOM,"Delete",46)))return!0;let r=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let o,l=()=>o||(o=_O(n,e,t));return n.state.facet(Ec).some(a=>a(n,e.from,e.to,r,l))||n.dispatch(l()),!0}function _O(n,e,t){let i,s=n.state,r=s.selection.main;if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let l=r.frome.to?s.sliceDoc(e.to,r.to):"";i=s.replaceSelection(n.state.toText(l+e.insert.sliceString(0,void 0,n.state.lineBreak)+a))}else{let l=s.changes(e),a=t&&t.main.to<=l.newLength?t.main:void 0;if(s.selection.ranges.length>1&&n.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){let h=n.state.sliceDoc(e.from,e.to),c,f=t&&Ic(n,t.main.head);if(f){let O=e.insert.length-(e.to-e.from);c={from:f.from,to:f.to-O}}else c=n.state.doc.lineAt(r.head);let u=r.to-e.to,d=r.to-r.from;i=s.changeByRange(O=>{if(O.from==r.from&&O.to==r.to)return{changes:l,range:a||O.map(l)};let m=O.to-u,g=m-h.length;if(O.to-O.from!=d||n.state.sliceDoc(g,m)!=h||O.to>=c.from&&O.from<=c.to)return{range:O};let b=s.changes({from:g,to:m,insert:e.insert}),S=O.to-r.to;return{changes:b,range:a?y.range(Math.max(0,a.anchor+S),Math.max(0,a.head+S)):O.map(b)}})}else i={changes:l,selection:a&&s.selection.replaceRange(a)}}let o="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,o+=".compose",n.inputState.compositionFirstChange&&(o+=".start",n.inputState.compositionFirstChange=!1)),s.update(i,{userEvent:o,scrollIntoView:!0})}function BO(n,e,t,i){let s=Math.min(n.length,e.length),r=0;for(;r0&&l>0&&n.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(i=="end"){let a=Math.max(0,r-Math.min(o,l));t-=o+a-r}if(o=o?r-t:0;r-=a,l=r+(l-o),o=r}else if(l=l?r-t:0;r-=a,o=r+(o-l),l=r}return{from:r,toA:o,toB:l}}function YO(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:r}=n.observer.selectionRange;return t&&(e.push(new zl(t,i)),(s!=t||r!=i)&&e.push(new zl(s,r))),e}function zO(n,e){if(n.length==0)return null;let t=n[0].pos,i=n.length==2?n[1].pos:t;return t>-1&&i>-1?y.single(t+e,i+e):null}class UO{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Z.safari&&e.contentDOM.addEventListener("input",()=>null),Z.gecko&&ap(e.contentDOM.ownerDocument)}handleEvent(e){!ep(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let i=this.handlers[e];if(i){for(let s of i.observers)s(this.view,t);for(let s of i.handlers){if(t.defaultPrevented)break;if(s(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=IO(e),i=this.handlers,s=this.view.contentDOM;for(let r in t)if(r!="scroll"){let o=!t[r].handlers.length,l=i[r];l&&o!=!l.handlers.length&&(s.removeEventListener(r,this.handleEvent),l=null),l||s.addEventListener(r,this.handleEvent,{passive:o})}for(let r in i)r!="scroll"&&!t[r]&&s.removeEventListener(r,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&Hc.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Z.android&&Z.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return Z.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=Fc.find(i=>i.keyCode==e.keyCode))&&!e.ctrlKey||NO.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from0?!0:Z.safari&&!Z.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Ul(n,e){return(t,i)=>{try{return e.call(n,i,t)}catch(s){Te(t.state,s)}}}function IO(n){let e=Object.create(null);function t(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of n){let s=i.spec;if(s&&s.domEventHandlers)for(let r in s.domEventHandlers){let o=s.domEventHandlers[r];o&&t(r).handlers.push(Ul(i.value,o))}if(s&&s.domEventObservers)for(let r in s.domEventObservers){let o=s.domEventObservers[r];o&&t(r).observers.push(Ul(i.value,o))}}for(let i in Ie)t(i).handlers.push(Ie[i]);for(let i in _e)t(i).observers.push(_e[i]);return e}const Fc=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],NO="dthko",Hc=[16,17,18,20,91,92,224,225],Zn=6;function Cn(n){return Math.max(0,n)*.7+8}function GO(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class FO{constructor(e,t,i,s){this.view=e,this.startEvent=t,this.style=i,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=rO(e.contentDOM),this.atoms=e.state.facet(Wo).map(o=>o(e));let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(j.allowMultipleSelections)&&HO(e,t),this.dragging=JO(e,t)&&ef(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&GO(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,i=0,s=0,r=0,o=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:s,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:r,bottom:l}=this.scrollParents.y.getBoundingClientRect());let a=Lo(this.view);e.clientX-a.left<=s+Zn?t=-Cn(s-e.clientX):e.clientX+a.right>=o-Zn&&(t=Cn(e.clientX-o)),e.clientY-a.top<=r+Zn?i=-Cn(r-e.clientY):e.clientY+a.bottom>=l-Zn&&(i=Cn(e.clientY-l)),this.setScrollSpeed(t,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let i=0;it.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function HO(n,e){let t=n.state.facet(Xc);return t.length?t[0](e):Z.mac?e.metaKey:e.ctrlKey}function KO(n,e){let t=n.state.facet(Mc);return t.length?t[0](e):Z.mac?!e.altKey:!e.ctrlKey}function JO(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let i=Ui(n.root);if(!i||i.rangeCount==0)return!0;let s=i.getRangeAt(0).getClientRects();for(let r=0;r=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function ep(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,i;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(i=N.get(t))&&i.ignoreEvent(e))return!1;return!0}const Ie=Object.create(null),_e=Object.create(null),Kc=Z.ie&&Z.ie_version<15||Z.ios&&Z.webkit_version<604;function tp(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),Jc(n,t.value)},50)}function Es(n,e,t){for(let i of n.facet(e))t=i(t,n);return t}function Jc(n,e){e=Es(n.state,qo,e);let{state:t}=n,i,s=1,r=t.toText(e),o=r.lines==t.selection.ranges.length;if(no!=null&&t.selection.ranges.every(a=>a.empty)&&no==r.toString()){let a=-1;i=t.changeByRange(h=>{let c=t.doc.lineAt(h.from);if(c.from==a)return{range:h};a=c.from;let f=t.toText((o?r.line(s++).text:e)+t.lineBreak);return{changes:{from:c.from,insert:f},range:y.cursor(h.from+f.length)}})}else o?i=t.changeByRange(a=>{let h=r.line(s++);return{changes:{from:a.from,to:a.to,insert:h.text},range:y.cursor(a.from+h.length)}}):i=t.replaceSelection(r);n.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}_e.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};Ie.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);_e.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};_e.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};Ie.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let i of n.state.facet(Vc))if(t=i(n,e),t)break;if(!t&&e.button==0&&(t=sp(n,e)),t){let i=!n.hasFocus;n.inputState.startMouseSelection(new FO(n,e,t,i)),i&&n.observer.ignore(()=>{Oc(n.contentDOM);let r=n.root.activeElement;r&&!r.contains(n.contentDOM)&&r.blur()});let s=n.inputState.mouseSelection;if(s)return s.start(e),s.dragging===!1}return!1};function Il(n,e,t,i){if(i==1)return y.cursor(e,t);if(i==2)return RO(n.state,e,t);{let s=se.find(n.docView,e),r=n.state.doc.lineAt(s?s.posAtEnd:e),o=s?s.posAtStart:r.from,l=s?s.posAtEnd:r.to;return le>=t.top&&e<=t.bottom&&n>=t.left&&n<=t.right;function ip(n,e,t,i){let s=se.find(n.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(r==0)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&Nl(t,i,o))return-1;let l=s.coordsAt(r,1);return l&&Nl(t,i,l)?1:o&&o.bottom>=i?-1:1}function Gl(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:ip(n,t,e.clientX,e.clientY)}}const np=Z.ie&&Z.ie_version<=11;let Fl=null,Hl=0,Kl=0;function ef(n){if(!np)return n.detail;let e=Fl,t=Kl;return Fl=n,Kl=Date.now(),Hl=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(Hl+1)%3:1}function sp(n,e){let t=Gl(n,e),i=ef(e),s=n.state.selection;return{update(r){r.docChanged&&(t.pos=r.changes.mapPos(t.pos),s=s.map(r.changes))},get(r,o,l){let a=Gl(n,r),h,c=Il(n,a.pos,a.bias,i);if(t.pos!=a.pos&&!o){let f=Il(n,t.pos,t.bias,i),u=Math.min(f.from,c.from),d=Math.max(f.to,c.to);c=u1&&(h=rp(s,a.pos))?h:l?s.addRange(c):y.create([c])}}}function rp(n,e){for(let t=0;t=e)return y.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}Ie.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let s=n.docView.nearest(e.target);if(s&&s.isWidget){let r=s.posAtStart,o=r+s.length;(r>=t.to||o<=t.from)&&(t=y.range(r,o))}}let{inputState:i}=n;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",Es(n.state,Eo,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Ie.dragend=n=>(n.inputState.draggedContent=null,!1);function Jl(n,e,t,i){if(t=Es(n.state,qo,t),!t)return;let s=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:r}=n.inputState,o=i&&r&&KO(n,e)?{from:r.from,to:r.to}:null,l={from:s,insert:t},a=n.state.changes(o?[o,l]:l);n.focus(),n.dispatch({changes:a,selection:{anchor:a.mapPos(s,-1),head:a.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"}),n.inputState.draggedContent=null}Ie.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let i=Array(t.length),s=0,r=()=>{++s==t.length&&Jl(n,e,i.filter(o=>o!=null).join(n.state.lineBreak),!1)};for(let o=0;o{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[o]=l.result),r()},l.readAsText(t[o])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return Jl(n,e,i,!0),!0}return!1};Ie.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=Kc?null:e.clipboardData;return t?(Jc(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(tp(n),!1)};function op(n,e){let t=n.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),n.focus()},50)}function lp(n){let e=[],t=[],i=!1;for(let s of n.selection.ranges)s.empty||(e.push(n.sliceDoc(s.from,s.to)),t.push(s));if(!e.length){let s=-1;for(let{from:r}of n.selection.ranges){let o=n.doc.lineAt(r);o.number>s&&(e.push(o.text),t.push({from:o.from,to:Math.min(n.doc.length,o.to+1)})),s=o.number}i=!0}return{text:Es(n,Eo,e.join(n.lineBreak)),ranges:t,linewise:i}}let no=null;Ie.copy=Ie.cut=(n,e)=>{let{text:t,ranges:i,linewise:s}=lp(n.state);if(!t&&!s)return!1;no=s?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let r=Kc?null:e.clipboardData;return r?(r.clearData(),r.setData("text/plain",t),!0):(op(n,t),!1)};const tf=ht.define();function nf(n,e){let t=[];for(let i of n.facet(Dc)){let s=i(n,e);s&&t.push(s)}return t?n.update({effects:t,annotations:tf.of(!0)}):null}function sf(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=nf(n.state,e);t?n.dispatch(t):n.update([])}},10)}_e.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),sf(n)};_e.blur=n=>{n.observer.clearSelectionRange(),sf(n)};_e.compositionstart=_e.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};_e.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,Z.chrome&&Z.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};_e.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};Ie.beforeinput=(n,e)=>{var t,i;if(e.inputType=="insertReplacementText"&&n.observer.editContext){let r=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(r&&o.length){let l=o[0],a=n.posAtDOM(l.startContainer,l.startOffset),h=n.posAtDOM(l.endContainer,l.endOffset);return jo(n,{from:a,to:h,insert:n.state.toText(r)},null),!0}}let s;if(Z.chrome&&Z.android&&(s=Fc.find(r=>r.inputType==e.inputType))&&(n.observer.delayAndroidKey(s.key,s.keyCode),s.key=="Backspace"||s.key=="Delete")){let r=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>r+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return Z.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),Z.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>_e.compositionend(n,e),20),!1};const ea=new Set;function ap(n){ea.has(n)||(ea.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const ta=["pre-wrap","normal","pre-line","break-spaces"];let di=!1;function ia(){di=!1}class hp{constructor(e){this.lineWrapping=e,this.doc=_.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return ta.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=t,this.charWidth=i,this.textHeight=s,this.lineLength=r,a){this.heightSamples={};for(let h=0;h0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>Hn&&(di=!0),this.height=e)}replace(e,t,i){return ke.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,s){let r=this,o=i.doc;for(let l=s.length-1;l>=0;l--){let{fromA:a,toA:h,fromB:c,toB:f}=s[l],u=r.lineAt(a,F.ByPosNoHeight,i.setDoc(t),0,0),d=u.to>=h?u:r.lineAt(h,F.ByPosNoHeight,i,0,0);for(f+=d.to-h,h=d.to;l>0&&u.from<=s[l-1].toA;)a=s[l-1].fromA,c=s[l-1].fromB,l--,ar*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),i+=1+l.break,s-=l.size}else if(r>s*2){let l=e[i];l.break?e.splice(i,1,l.left,null,l.right):e.splice(i,1,l.left,l.right),i+=2+l.break,r-=l.size}else break;else if(s=r&&o(this.blockAt(0,i,s,r))}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more&&this.setHeight(s.heights[s.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ve extends rf{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,i,s){return new it(s,this.length,i,this.height,this.breaks)}replace(e,t,i){let s=i[0];return i.length==1&&(s instanceof Ve||s instanceof ue&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof ue?s=new Ve(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):ke.of(i)}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more?this.setHeight(s.heights[s.index++]):(i||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class ue extends ke{constructor(e){super(e,0)}heightMetrics(e,t){let i=e.doc.lineAt(t).number,s=e.doc.lineAt(t+this.length).number,r=s-i+1,o,l=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*r);o=a/r,this.length>r+1&&(l=(this.height-a)/(this.length-r-1))}else o=this.height/r;return{firstLine:i,lastLine:s,perLine:o,perChar:l}}blockAt(e,t,i,s){let{firstLine:r,lastLine:o,perLine:l,perChar:a}=this.heightMetrics(t,s);if(t.lineWrapping){let h=s+(e0){let r=i[i.length-1];r instanceof ue?i[i.length-1]=new ue(r.length+s):i.push(null,new ue(s-1))}if(e>0){let r=i[0];r instanceof ue?i[0]=new ue(e+r.length):i.unshift(new ue(e-1),null)}return ke.of(i)}decomposeLeft(e,t){t.push(new ue(e-1),null)}decomposeRight(e,t){t.push(null,new ue(this.length-e-1))}updateHeight(e,t=0,i=!1,s){let r=t+this.length;if(s&&s.from<=t+this.length&&s.more){let o=[],l=Math.max(t,s.from),a=-1;for(s.from>t&&o.push(new ue(s.from-t-1).updateHeight(e,t));l<=r&&s.more;){let c=e.doc.lineAt(l).length;o.length&&o.push(null);let f=s.heights[s.index++];a==-1?a=f:Math.abs(f-a)>=Hn&&(a=-2);let u=new Ve(c,f);u.outdated=!1,o.push(u),l+=c+1}l<=r&&o.push(null,new ue(r-l).updateHeight(e,l));let h=ke.of(o);return(a<0||Math.abs(h.height-this.height)>=Hn||Math.abs(a-this.heightMetrics(e,t).perLine)>=Hn)&&(di=!0),fs(this,h)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class fp extends ke{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,t,i,s){let r=i+this.left.height;return el))return h;let c=t==F.ByPosNoHeight?F.ByPosNoHeight:F.ByPos;return a?h.join(this.right.lineAt(l,c,i,o,l)):this.left.lineAt(l,c,i,s,r).join(h)}forEachLine(e,t,i,s,r,o){let l=s+this.left.height,a=r+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,t,i,l,a,o);else{let h=this.lineAt(a,F.ByPos,i,s,r);e=e&&h.from<=t&&o(h),t>h.to&&this.right.forEachLine(h.to+1,t,i,l,a,o)}}replace(e,t,i){let s=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-s,t-s,i));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let l of i)r.push(l);if(e>0&&na(r,o-1),t=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,s=i+this.break;if(e>=s)return this.right.decomposeRight(e-s,t);e2*t.size||t.size>2*e.size?ke.of(this.break?[e,null,t]:[e,t]):(this.left=fs(this.left,e),this.right=fs(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,s){let{left:r,right:o}=this,l=t+r.length+this.break,a=null;return s&&s.from<=t+r.length&&s.more?a=r=r.updateHeight(e,t,i,s):r.updateHeight(e,t,i),s&&s.from<=l+o.length&&s.more?a=o=o.updateHeight(e,l,i,s):o.updateHeight(e,l,i),a?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function na(n,e){let t,i;n[e]==null&&(t=n[e-1])instanceof ue&&(i=n[e+1])instanceof ue&&n.splice(e-1,3,new ue(t.length+1+i.length))}const up=5;class _o{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let i=Math.min(t,this.lineEnd),s=this.nodes[this.nodes.length-1];s instanceof Ve?s.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Ve(i-this.pos,-1)),this.writtenTo=i,t>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e=up)&&this.addLineDeco(s,r,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new Ve(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let i=new ue(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ve)return e;let t=new Ve(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,i){let s=this.ensureLine();s.length+=i,s.collapsed+=i,s.widgetHeight=Math.max(s.widgetHeight,e),s.breaks+=t,this.writtenTo=this.pos=this.pos+i}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Ve)&&!this.isCovered?this.nodes.push(new Ve(0,-1)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&f.overflow!="visible"){let u=c.getBoundingClientRect();r=Math.max(r,u.left),o=Math.min(o,u.right),l=Math.max(l,u.top),a=Math.min(h==n.parentNode?s.innerHeight:a,u.bottom)}h=f.position=="absolute"||f.position=="fixed"?c.offsetParent:c.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:r-t.left,right:Math.max(r,o)-t.left,top:l-(t.top+e),bottom:Math.max(l,a)-(t.top+e)}}function mp(n){let e=n.getBoundingClientRect(),t=n.ownerDocument.defaultView||window;return e.left0&&e.top0}function gp(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class er{constructor(e,t,i,s){this.from=e,this.to=t,this.size=i,this.displaySize=s}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new hp(t),this.stateDeco=e.facet(Ii).filter(i=>typeof i!="function"),this.heightMap=ke.empty().applyChanges(this.stateDeco,_.empty,this.heightOracle.setDoc(e.doc),[new je(0,0,0,e.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=A.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let s=i?t.head:t.anchor;if(!e.some(({from:r,to:o})=>s>=r&&s<=o)){let{from:r,to:o}=this.lineBlockAt(s);e.push(new Tn(r,o))}}return this.viewports=e.sort((i,s)=>i.from-s.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?ra:new Bo(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Mi(e,this.scaler))})}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Ii).filter(c=>typeof c!="function");let s=e.changedRanges,r=je.extendWithRanges(s,dp(i,this.stateDeco,e?e.changes:le.empty(this.state.doc.length))),o=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);ia(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),(this.heightMap.height!=o||di)&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let h=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,e.flags|=this.updateForViewport(),(h||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Lc)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,i=window.getComputedStyle(t),s=this.heightOracle,r=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?H.RTL:H.LTR;let o=this.heightOracle.mustRefreshForWrapping(r),l=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let h=0,c=0;if(l.width&&l.height){let{scaleX:w,scaleY:Q}=dc(t,l);(w>.005&&Math.abs(this.scaleX-w)>.005||Q>.005&&Math.abs(this.scaleY-Q)>.005)&&(this.scaleX=w,this.scaleY=Q,h|=16,o=a=!0)}let f=(parseInt(i.paddingTop)||0)*this.scaleY,u=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=u)&&(this.paddingTop=f,this.paddingBottom=u,h|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(s.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=16);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=mc(e.scrollDOM);let O=(this.printing?gp:pp)(t,this.paddingTop),m=O.top-this.pixelViewport.top,g=O.bottom-this.pixelViewport.bottom;this.pixelViewport=O;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(a=!0)),!this.inView&&!this.scrollTarget&&!mp(e.dom))return 0;let S=l.width;if((this.contentDOMWidth!=S||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,h|=16),a){let w=e.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(w)&&(o=!0),o||s.lineWrapping&&Math.abs(S-this.contentDOMWidth)>s.charWidth){let{lineHeight:Q,charWidth:k,textHeight:P}=e.docView.measureTextSize();o=Q>0&&s.refresh(r,Q,k,P,S/k,w),o&&(e.docView.minWidth=0,h|=16)}m>0&&g>0?c=Math.max(m,g):m<0&&g<0&&(c=Math.min(m,g)),ia();for(let Q of this.viewports){let k=Q.from==this.viewport.from?w:e.docView.measureVisibleLineHeights(Q);this.heightMap=(o?ke.empty().applyChanges(this.stateDeco,_.empty,this.heightOracle,[new je(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(s,0,o,new cp(Q.from,k))}di&&(h|=2)}let x=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return x&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),h|=this.updateForViewport()),(h&2||x)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),s=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,a=new Tn(s.lineAt(o-i*1e3,F.ByHeight,r,0,0).from,s.lineAt(l+(1-i)*1e3,F.ByHeight,r,0,0).to);if(t){let{head:h}=t.range;if(ha.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=s.lineAt(h,F.ByPos,r,0,0),u;t.y=="center"?u=(f.top+f.bottom)/2-c/2:t.y=="start"||t.y=="nearest"&&h=l+Math.max(10,Math.min(i,250)))&&s>o-2*1e3&&r>1,o=s<<1;if(this.defaultTextDirection!=H.LTR&&!i)return[];let l=[],a=(c,f,u,d)=>{if(f-cc&&bb.from>=u.from&&b.to<=u.to&&Math.abs(b.from-c)b.fromS));if(!g){if(fx.from<=f&&x.to>=f)){let x=t.moveToLineBoundary(y.cursor(f),!1,!0).head;x>c&&(f=x)}let b=this.gapSize(u,c,f,d),S=i||b<2e6?b:2e6;g=new er(c,f,b,S)}l.push(g)},h=c=>{if(c.length2e6)for(let k of e)k.from>=c.from&&k.fromc.from&&a(c.from,d,c,f),Ot.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let i=[];B.spans(t,this.viewport.from,this.viewport.to,{span(r,o){i.push({from:r,to:o})},point(){}},20);let s=0;if(i.length!=this.visibleRanges.length)s=12;else for(let r=0;r=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Mi(this.heightMap.lineAt(e,F.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||Mi(this.heightMap.lineAt(this.scaler.fromDOM(e),F.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Mi(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Tn{constructor(e,t){this.from=e,this.to=t}}function Sp(n,e,t){let i=[],s=n,r=0;return B.spans(t,n,e,{span(){},point(o,l){o>s&&(i.push({from:s,to:o}),r+=o-s),s=l}},20),s=1)return e[e.length-1].to;let i=Math.floor(n*t);for(let s=0;;s++){let{from:r,to:o}=e[s],l=o-r;if(i<=l)return r+i;i-=l}}function An(n,e){let t=0;for(let{from:i,to:s}of n.ranges){if(e<=s){t+=e-i;break}t+=s-i}return t/n.total}function yp(n,e){for(let t of n)if(e(t))return t}const ra={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};class Bo{constructor(e,t,i){let s=0,r=0,o=0;this.viewports=i.map(({from:l,to:a})=>{let h=t.lineAt(l,F.ByPos,e,0,0).top,c=t.lineAt(a,F.ByPos,e,0,0).bottom;return s+=c-h,{from:l,to:a,top:h,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(t.height-s);for(let l of this.viewports)l.domTop=o+(l.top-r)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),r=l.bottom}toDOM(e){for(let t=0,i=0,s=0;;t++){let r=tt.from==e.viewports[i].from&&t.to==e.viewports[i].to):!1}}function Mi(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),i=e.toDOM(n.bottom);return new it(n.from,n.length,t,i-t,Array.isArray(n._content)?n._content.map(s=>Mi(s,e)):n._content)}const Xn=C.define({combine:n=>n.join(" ")}),so=C.define({combine:n=>n.indexOf(!0)>-1}),ro=Zt.newName(),of=Zt.newName(),lf=Zt.newName(),af={"&light":"."+of,"&dark":"."+lf};function oo(n,e,t){return new Zt(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,s=>{if(s=="&")return n;if(!t||!t[s])throw new RangeError(`Unsupported selector: ${s}`);return t[s]}):n+" "+i}})}const Qp=oo("."+ro,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},af),xp={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},tr=Z.ie&&Z.ie_version<=11;class wp{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new oO,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let i of t)this.queue.push(i);(Z.ie&&Z.ie_version<=11||Z.ios&&e.composing)&&t.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(Z.chrome&&Z.chrome_version<126)&&(this.editContext=new Pp(e),e.state.facet(pt)&&(e.contentDOM.editContext=this.editContext.editContext)),tr&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,i)=>t!=e[i]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,s=this.selectionRange;if(i.state.facet(pt)?i.root.activeElement!=this.dom:!Nn(this.dom,s))return;let r=s.anchorNode&&i.docView.nearest(s.anchorNode);if(r&&r.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Z.ie&&Z.ie_version<=11||Z.android&&Z.chrome)&&!i.state.selection.main.empty&&s.focusNode&&Wi(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Ui(e.root);if(!t)return!1;let i=Z.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&kp(this.view,t)||t;if(!i||this.selectionRange.eq(i))return!1;let s=Nn(this.dom,i);return s&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let r=this.delayedAndroidKey;r&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=r.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&r.force&&ni(this.dom,r.key,r.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,i=-1,s=!1;for(let r of e){let o=this.readMutation(r);o&&(o.typeOver&&(s=!0),t==-1?{from:t,to:i}=o:(t=Math.min(o.from,t),i=Math.max(o.to,i)))}return{from:t,to:i,typeOver:s}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),s=this.selectionChanged&&Nn(this.dom,this.selectionRange);if(e<0&&!s)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let r=new jO(this.view,e,t,i);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let i=this.view.state,s=Gc(this.view,t);return this.view.state==i&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),s}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let i=oa(t,e.previousSibling||e.target.previousSibling,-1),s=oa(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:s?t.posBefore(s):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(pt)!=e.state.facet(pt)&&(e.view.contentDOM.editContext=e.state.facet(pt)?this.editContext.editContext:null))}destroy(){var e,t,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let s of this.scrollTargets)s.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function oa(n,e,t){for(;e;){let i=N.get(e);if(i&&i.parent==n)return i;let s=e.parentNode;e=s!=n.dom?s:t>0?e.nextSibling:e.previousSibling}return null}function la(n,e){let t=e.startContainer,i=e.startOffset,s=e.endContainer,r=e.endOffset,o=n.docView.domAtPos(n.state.selection.main.anchor);return Wi(o.node,o.offset,s,r)&&([t,i,s,r]=[s,r,t,i]),{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:r}}function kp(n,e){if(e.getComposedRanges){let s=e.getComposedRanges(n.root)[0];if(s)return la(n,s)}let t=null;function i(s){s.preventDefault(),s.stopImmediatePropagation(),t=s.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",i,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",i,!0),t?la(n,t):null}class Pp{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let s=e.state.selection.main,{anchor:r,head:o}=s,l=this.toEditorPos(i.updateRangeStart),a=this.toEditorPos(i.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:i.updateRangeStart,editorBase:l,drifted:!1});let h={from:l,to:a,insert:_.of(i.text.split(` +`))};if(h.from==this.from&&rthis.to&&(h.to=r),h.from==h.to&&!h.insert.length){let c=y.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd));c.main.eq(s)||e.dispatch({selection:c,userEvent:"select"});return}if((Z.mac||Z.android)&&h.from==o-1&&/^\. ?$/.test(i.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(h={from:l,to:a,insert:_.of([i.text.replace("."," ")])}),this.pendingContextChange=h,!e.state.readOnly){let c=this.to-this.from+(h.to-h.from+h.insert.length);jo(e,h,y.single(this.toEditorPos(i.selectionStart,c),this.toEditorPos(i.selectionEnd,c)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))},this.handlers.characterboundsupdate=i=>{let s=[],r=null;for(let o=this.toEditorPos(i.rangeStart),l=this.toEditorPos(i.rangeEnd);o{let s=[];for(let r of i.getTextFormats()){let o=r.underlineStyle,l=r.underlineThickness;if(o!="None"&&l!="None"){let a=this.toEditorPos(r.rangeStart),h=this.toEditorPos(r.rangeEnd);if(a{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:i}=this.composing;this.composing=null,i&&this.reset(e.state)}};for(let i in this.handlers)t.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let s=Ui(i.root);s&&s.rangeCount&&this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,i=!1,s=this.pendingContextChange;return e.changes.iterChanges((r,o,l,a,h)=>{if(i)return;let c=h.length-(o-r);if(s&&o>=s.to)if(s.from==r&&s.to==o&&s.insert.eq(h)){s=this.pendingContextChange=null,t+=c,this.to+=c;return}else s=null,this.revertPending(e.state);if(r+=t,o+=t,o<=this.from)this.from+=c,this.to+=c;else if(rthis.to||this.to-this.from+h.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(o),h.toString()),this.to+=c}t+=c}),s&&!i&&this.revertPending(e.state),!i}update(e){let t=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(s=>!s.isUserEvent("input.type")&&s.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),s=this.toContextPos(t.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(i,s)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class v{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(s=>s.forEach(r=>i(r,this)))||(s=>this.update(s)),this.dispatch=this.dispatch.bind(this),this._root=e.root||lO(e.parent)||document,this.viewState=new sa(e.state||j.create(e)),e.scrollTo&&e.scrollTo.is(vn)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Ri).map(s=>new Hs(s));for(let s of this.plugins)s.update(this);this.observer=new wp(this),this.inputState=new UO(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Wl(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof re?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,i=!1,s,r=this.state;for(let u of e){if(u.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=u.state}if(this.destroyed){this.viewState.state=r;return}let o=this.hasFocus,l=0,a=null;e.some(u=>u.annotation(tf))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=nf(r,o),a||(l=1));let h=this.observer.delayedAndroidKey,c=null;if(h?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(c=null)):this.observer.clear(),r.facet(j.phrases)!=this.state.facet(j.phrases))return this.setState(r);s=cs.create(this,r,e),s.flags|=l;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let u of e){if(f&&(f=f.map(u.changes)),u.scrollIntoView){let{main:d}=u.state.selection;f=new si(d.empty?d:y.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of u.effects)d.is(vn)&&(f=d.value.clip(this.state))}this.viewState.update(s,f),this.bidiCache=us.update(this.bidiCache,s.changes),s.empty||(this.updatePlugins(s),this.inputState.update(s)),t=this.docView.update(s),this.state.facet(Ai)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(u=>u.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet(Xn)!=s.state.facet(Xn)&&(this.viewState.mustMeasureContent=!0),(t||i||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!s.empty)for(let u of this.state.facet(eo))try{u(s)}catch(d){Te(this.state,d,"update listener")}(a||c)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!Gc(this,c)&&h.force&&ni(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new sa(e),this.plugins=e.facet(Ri).map(i=>new Hs(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new Wl(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Ri),i=e.state.facet(Ri);if(t!=i){let s=[];for(let r of i){let o=t.indexOf(r);if(o<0)s.push(new Hs(r));else{let l=this.plugins[o];l.mustUpdate=e,s.push(l)}}for(let r of this.plugins)r.mustUpdate!=e&&r.destroy(this);this.plugins=s,this.pluginMap.clear()}else for(let s of this.plugins)s.mustUpdate=e;for(let s=0;s-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,i=this.scrollDOM,s=i.scrollTop*this.scaleY,{scrollAnchorPos:r,scrollAnchorHeight:o}=this.viewState;Math.abs(s-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(o<0)if(mc(i))r=-1,o=this.viewState.heightMap.height;else{let d=this.viewState.scrollAnchorAt(s);r=d.from,o=d.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];a&4||([this.measureRequests,h]=[h,this.measureRequests]);let c=h.map(d=>{try{return d.read(this)}catch(O){return Te(this.state,O),aa}}),f=cs.create(this,this.state,[]),u=!1;f.flags|=a,t?t.flags|=a:t=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),u=this.docView.update(f),u&&this.docViewUpdate());for(let d=0;d1||O<-1){s=s+O,i.scrollTop=s/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(eo))l(t)}get themeClasses(){return ro+" "+(this.state.facet(so)?lf:of)+" "+this.state.facet(Xn)}updateAttrs(){let e=ha(this,Bc,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(pt)?"true":"false",class:"cm-content",style:`${Z.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),ha(this,Do,t);let i=this.observer.ignore(()=>{let s=Gr(this.contentDOM,this.contentAttrs,t),r=Gr(this.dom,this.editorAttrs,e);return s||r});return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let s of i.effects)if(s.is(v.announce)){t&&(this.announceDOM.textContent=""),t=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet(Ai);let e=this.state.facet(v.cspNonce);Zt.mount(this.root,this.styleModules.concat(Qp).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;ti.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return Js(this,e,Yl(this,e,t,i))}moveByGroup(e,t){return Js(this,e,Yl(this,e,t,i=>EO(this,e.head,i)))}visualLineSide(e,t){let i=this.bidiSpans(e),s=this.textDirectionAt(e.from),r=i[t?i.length-1:0];return y.cursor(r.side(t,s)+e.from,r.forward(!t,s)?1:-1)}moveToLineBoundary(e,t,i=!0){return qO(this,e,t,i)}moveVertically(e,t,i){return Js(this,e,DO(this,e,t,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),Nc(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.docView.coordsAt(e,t);if(!i||i.left==i.right)return i;let s=this.state.doc.lineAt(e),r=this.bidiSpans(s),o=r[$t.find(r,e-s.from,-1,t)];return an(i,o.dir==H.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Wc)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>$p)return Rc(e.length);let t=this.textDirectionAt(e.from),i;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||Tc(r.isolates,i=Dl(this,e))))return r.order;i||(i=Dl(this,e));let s=yO(e.text,t,i);return this.bidiCache.push(new us(e.from,e.to,t,i,!0,s)),s}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Z.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Oc(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return vn.of(new si(typeof e=="number"?y.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return vn.of(new si(y.cursor(i.from),"start","start",i.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return ie.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return ie.define(()=>({}),{eventObservers:e})}static theme(e,t){let i=Zt.newName(),s=[Xn.of(i),Ai.of(oo(`.${i}`,e))];return t&&t.dark&&s.push(so.of(!0)),s}static baseTheme(e){return Xt.lowest(Ai.of(oo("."+ro,e,af)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),s=i&&N.get(i)||N.get(e);return((t=s?.rootView)===null||t===void 0?void 0:t.view)||null}}v.styleModule=Ai;v.inputHandler=Ec;v.clipboardInputFilter=qo;v.clipboardOutputFilter=Eo;v.scrollHandler=jc;v.focusChangeEffect=Dc;v.perLineTextDirection=Wc;v.exceptionSink=qc;v.updateListener=eo;v.editable=pt;v.mouseSelectionStyle=Vc;v.dragMovesSelection=Mc;v.clickAddsSelectionRange=Xc;v.decorations=Ii;v.outerDecorations=Yc;v.atomicRanges=Wo;v.bidiIsolatedRanges=zc;v.scrollMargins=Uc;v.darkTheme=so;v.cspNonce=C.define({combine:n=>n.length?n[0]:""});v.contentAttributes=Do;v.editorAttributes=Bc;v.lineWrapping=v.contentAttributes.of({class:"cm-lineWrapping"});v.announce=V.define();const $p=4096,aa={};class us{constructor(e,t,i,s,r,o){this.from=e,this.to=t,this.dir=i,this.isolates=s,this.fresh=r,this.order=o}static update(e,t){if(t.empty&&!e.some(r=>r.fresh))return e;let i=[],s=e.length?e[e.length-1].dir:H.LTR;for(let r=Math.max(0,e.length-10);r=0;s--){let r=i[s],o=typeof r=="function"?r(n):r;o&&Nr(o,t)}return t}const vp=Z.mac?"mac":Z.windows?"win":Z.linux?"linux":"key";function Zp(n,e){const t=n.split(/-(?!$)/);let i=t[t.length-1];i=="Space"&&(i=" ");let s,r,o,l;for(let a=0;ai.concat(s),[]))),t}function Tp(n,e,t){return cf(hf(n.state),e,n,t)}let wt=null;const Rp=4e3;function Ap(n,e=vp){let t=Object.create(null),i=Object.create(null),s=(o,l)=>{let a=i[o];if(a==null)i[o]=l;else if(a!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},r=(o,l,a,h,c)=>{var f,u;let d=t[o]||(t[o]=Object.create(null)),O=l.split(/ (?!$)/).map(b=>Zp(b,e));for(let b=1;b{let w=wt={view:x,prefix:S,scope:o};return setTimeout(()=>{wt==w&&(wt=null)},Rp),!0}]})}let m=O.join(" ");s(m,!1);let g=d[m]||(d[m]={preventDefault:!1,stopPropagation:!1,run:((u=(f=d._any)===null||f===void 0?void 0:f.run)===null||u===void 0?void 0:u.slice())||[]});a&&g.run.push(a),h&&(g.preventDefault=!0),c&&(g.stopPropagation=!0)};for(let o of n){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let h of l){let c=t[h]||(t[h]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=o;for(let u in c)c[u].run.push(d=>f(d,lo))}let a=o[e]||o.key;if(a)for(let h of l)r(h,a,o.run,o.preventDefault,o.stopPropagation),o.shift&&r(h,"Shift-"+a,o.shift,o.preventDefault,o.stopPropagation)}return t}let lo=null;function cf(n,e,t,i){lo=e;let s=iO(e),r=ve(s,0),o=tt(r)==s.length&&s!=" ",l="",a=!1,h=!1,c=!1;wt&&wt.view==t&&wt.scope==i&&(l=wt.prefix+" ",Hc.indexOf(e.keyCode)<0&&(h=!0,wt=null));let f=new Set,u=g=>{if(g){for(let b of g.run)if(!f.has(b)&&(f.add(b),b(t)))return g.stopPropagation&&(c=!0),!0;g.preventDefault&&(g.stopPropagation&&(c=!0),h=!0)}return!1},d=n[i],O,m;return d&&(u(d[l+Mn(s,e,!o)])?a=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Z.windows&&e.ctrlKey&&e.altKey)&&(O=Ct[e.keyCode])&&O!=s?(u(d[l+Mn(O,e,!0)])||e.shiftKey&&(m=zi[e.keyCode])!=s&&m!=O&&u(d[l+Mn(m,e,!1)]))&&(a=!0):o&&e.shiftKey&&u(d[l+Mn(s,e,!0)])&&(a=!0),!a&&u(d._any)&&(a=!0)),h&&(a=!0),a&&c&&e.stopPropagation(),lo=null,a}class un{constructor(e,t,i,s,r){this.className=e,this.left=t,this.top=i,this.width=s,this.height=r}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,i){if(i.empty){let s=e.coordsAtPos(i.head,i.assoc||1);if(!s)return[];let r=ff(e);return[new un(t,s.left-r.left,s.top-r.top,null,s.bottom-s.top)]}else return Xp(e,t,i)}}function ff(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==H.LTR?e.left:e.right-n.scrollDOM.clientWidth*n.scaleX)-n.scrollDOM.scrollLeft*n.scaleX,top:e.top-n.scrollDOM.scrollTop*n.scaleY}}function fa(n,e,t,i){let s=n.coordsAtPos(e,t*2);if(!s)return i;let r=n.dom.getBoundingClientRect(),o=(s.top+s.bottom)/2,l=n.posAtCoords({x:r.left+1,y:o}),a=n.posAtCoords({x:r.right-1,y:o});return l==null||a==null?i:{from:Math.max(i.from,Math.min(l,a)),to:Math.min(i.to,Math.max(l,a))}}function Xp(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let i=Math.max(t.from,n.viewport.from),s=Math.min(t.to,n.viewport.to),r=n.textDirection==H.LTR,o=n.contentDOM,l=o.getBoundingClientRect(),a=ff(n),h=o.querySelector(".cm-line"),c=h&&window.getComputedStyle(h),f=l.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),u=l.right-(c?parseInt(c.paddingRight):0),d=io(n,i),O=io(n,s),m=d.type==we.Text?d:null,g=O.type==we.Text?O:null;if(m&&(n.lineWrapping||d.widgetLineBreaks)&&(m=fa(n,i,1,m)),g&&(n.lineWrapping||O.widgetLineBreaks)&&(g=fa(n,s,-1,g)),m&&g&&m.from==g.from&&m.to==g.to)return S(x(t.from,t.to,m));{let Q=m?x(t.from,null,m):w(d,!1),k=g?x(null,t.to,g):w(O,!0),P=[];return(m||d).to<(g||O).from-(m&&g?1:0)||d.widgetLineBreaks>1&&Q.bottom+n.defaultLineHeight/2X&&W.from=oe)break;ne>Y&&q(Math.max(z,Y),Q==null&&z<=X,Math.min(ne,oe),k==null&&ne>=E,me.dir)}if(Y=ae.to+1,Y>=oe)break}return L.length==0&&q(X,Q==null,E,k==null,n.textDirection),{top:M,bottom:R,horizontal:L}}function w(Q,k){let P=l.top+(k?Q.top:Q.bottom);return{top:P,bottom:P,horizontal:[]}}}function Mp(n,e){return n.constructor==e.constructor&&n.eq(e)}class Vp{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Kn)!=e.state.facet(Kn)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,i=e.facet(Kn);for(;t!Mp(t,this.drawn[i]))){let t=this.dom.firstChild,i=0;for(let s of e)s.update&&t&&s.constructor&&this.drawn[i].constructor&&s.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(s.draw(),t);for(;t;){let s=t.nextSibling;t.remove(),t=s}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Kn=C.define();function uf(n){return[ie.define(e=>new Vp(e,n)),Kn.of(n)]}const df=!(Z.ios&&Z.webkit&&Z.webkit_version<534),Ni=C.define({combine(n){return ct(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function qp(n={}){return[Ni.of(n),Ep,Dp,Wp,Lc.of(!0)]}function Of(n){return n.startState.facet(Ni)!=n.state.facet(Ni)}const Ep=uf({above:!0,markers(n){let{state:e}=n,t=e.facet(Ni),i=[];for(let s of e.selection.ranges){let r=s==e.selection.main;if(s.empty?!r||df:t.drawRangeCursor){let o=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=s.empty?s:y.cursor(s.head,s.head>s.anchor?-1:1);for(let a of un.forRange(n,o,l))i.push(a)}}return i},update(n,e){n.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=Of(n);return t&&ua(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){ua(e.state,n)},class:"cm-cursorLayer"});function ua(n,e){e.style.animationDuration=n.facet(Ni).cursorBlinkRate+"ms"}const Dp=uf({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:un.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||Of(n)},class:"cm-selectionLayer"}),ao={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};df&&(ao[".cm-line"].caretColor=ao[".cm-content"].caretColor="transparent !important");const Wp=Xt.highest(v.theme(ao)),pf=V.define({map(n,e){return n==null?null:e.mapPos(n)}}),Vi=ce.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,i)=>i.is(pf)?i.value:t,n)}}),Lp=ie.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(Vi);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(Vi)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:n}=this,e=n.state.field(Vi),t=e!=null&&n.coordsAtPos(e);if(!t)return null;let i=n.scrollDOM.getBoundingClientRect();return{left:t.left-i.left+n.scrollDOM.scrollLeft*n.scaleX,top:t.top-i.top+n.scrollDOM.scrollTop*n.scaleY,height:t.bottom-t.top}}drawCursor(n){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;n?(this.cursor.style.left=n.left/e+"px",this.cursor.style.top=n.top/t+"px",this.cursor.style.height=n.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(Vi)!=n&&this.view.dispatch({effects:pf.of(n)})}},{eventObservers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function jp(){return[Vi,Lp]}function da(n,e,t,i,s){e.lastIndex=0;for(let r=n.iterRange(t,i),o=t,l;!r.next().done;o+=r.value.length)if(!r.lineBreak)for(;l=e.exec(r.value);)s(o+l.index,l)}function _p(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let i=[];for(let{from:s,to:r}of t)s=Math.max(n.state.doc.lineAt(s).from,s-e),r=Math.min(n.state.doc.lineAt(r).to,r+e),i.length&&i[i.length-1].to>=s?i[i.length-1].to=r:i.push({from:s,to:r});return i}class Bp{constructor(e){const{regexp:t,decoration:i,decorate:s,boundary:r,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,s)this.addMatch=(l,a,h,c)=>s(c,h,h+l[0].length,l,a);else if(typeof i=="function")this.addMatch=(l,a,h,c)=>{let f=i(l,a,h);f&&c(h,h+l[0].length,f)};else if(i)this.addMatch=(l,a,h,c)=>c(h,h+l[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=o}createDeco(e){let t=new bt,i=t.add.bind(t);for(let{from:s,to:r}of _p(e,this.maxLength))da(e.state.doc,this.regexp,s,r,(o,l)=>this.addMatch(l,e,o,i));return t.finish()}updateDeco(e,t){let i=1e9,s=-1;return e.docChanged&&e.changes.iterChanges((r,o,l,a)=>{a>=e.view.viewport.from&&l<=e.view.viewport.to&&(i=Math.min(l,i),s=Math.max(a,s))}),e.viewportMoved||s-i>1e3?this.createDeco(e.view):s>-1?this.updateRange(e.view,t.map(e.changes),i,s):t}updateRange(e,t,i,s){for(let r of e.visibleRanges){let o=Math.max(r.from,i),l=Math.min(r.to,s);if(l>o){let a=e.state.doc.lineAt(o),h=a.toa.from;o--)if(this.boundary.test(a.text[o-1-a.from])){c=o;break}for(;lu.push(b.range(m,g));if(a==h)for(this.regexp.lastIndex=c-a.from;(d=this.regexp.exec(a.text))&&d.indexthis.addMatch(g,e,m,O));t=t.update({filterFrom:c,filterTo:f,filter:(m,g)=>mf,add:u})}}return t}}const ho=/x/.unicode!=null?"gu":"g",Yp=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,ho),zp={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let ir=null;function Up(){var n;if(ir==null&&typeof document<"u"&&document.body){let e=document.body.style;ir=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return ir||!1}const Jn=C.define({combine(n){let e=ct(n,{render:null,specialChars:Yp,addSpecialChars:null});return(e.replaceTabs=!Up())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,ho)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,ho)),e}});function Ip(n={}){return[Jn.of(n),Np()]}let Oa=null;function Np(){return Oa||(Oa=ie.fromClass(class{constructor(n){this.view=n,this.decorations=A.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Jn)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new Bp({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:s}=t.state,r=ve(e[0],0);if(r==9){let o=s.lineAt(i),l=t.state.tabSize,a=Si(o.text,l,i-o.from);return A.replace({widget:new Kp((l-a%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=A.replace({widget:new Hp(n,r)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Jn);n.startState.facet(Jn)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const Gp="•";function Fp(n){return n>=32?Gp:n==10?"␤":String.fromCharCode(9216+n)}class Hp extends ft{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=Fp(this.code),i=e.state.phrase("Control character")+" "+(zp[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class Kp extends ft{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function Jp(){return tm}const em=A.line({class:"cm-activeLine"}),tm=ie.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let i of n.state.selection.ranges){let s=n.lineBlockAt(i.head);s.from>e&&(t.push(em.range(s.from)),e=s.from)}return A.set(t)}},{decorations:n=>n.decorations});class im extends ft{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),typeof this.content=="string"?t.setAttribute("aria-label","placeholder "+this.content):t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?ci(e.firstChild):[];if(!t.length)return null;let i=window.getComputedStyle(e.parentNode),s=an(t[0],i.direction!="rtl"),r=parseInt(i.lineHeight);return s.bottom-s.top>r*1.5?{left:s.left,right:s.right,top:s.top,bottom:s.top+r}:s}ignoreEvent(){return!1}}function nm(n){return ie.fromClass(class{constructor(e){this.view=e,this.placeholder=n?A.set([A.widget({widget:new im(n),side:1}).range(0)]):A.none}get decorations(){return this.view.state.doc.length?A.none:this.placeholder}},{decorations:e=>e.decorations})}const co=2e3;function sm(n,e,t){let i=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>co||t.off>co||e.col<0||t.col<0){let o=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let a=i;a<=s;a++){let h=n.doc.line(a);h.length<=l&&r.push(y.range(h.from+o,h.to+l))}}else{let o=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let a=i;a<=s;a++){let h=n.doc.line(a),c=jr(h.text,o,n.tabSize,!0);if(c<0)r.push(y.cursor(h.to));else{let f=jr(h.text,l,n.tabSize);r.push(y.range(h.from+c,h.from+f))}}}return r}function rm(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function pa(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),s=t-i.from,r=s>co?-1:s==i.length?rm(n,e.clientX):Si(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:r,off:s}}function om(n,e){let t=pa(n,e),i=n.state.selection;return t?{update(s){if(s.docChanged){let r=s.changes.mapPos(s.startState.doc.line(t.line).from),o=s.state.doc.lineAt(r);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},i=i.map(s.changes)}},get(s,r,o){let l=pa(n,s);if(!l)return i;let a=sm(n.state,t,l);return a.length?o?y.create(a.concat(i.ranges)):y.create(a):i}}:null}function lm(n){let e=t=>t.altKey&&t.button==0;return v.mouseSelectionStyle.of((t,i)=>e(i)?om(t,i):null)}const am={Alt:[18,n=>!!n.altKey],Control:[17,n=>!!n.ctrlKey],Shift:[16,n=>!!n.shiftKey],Meta:[91,n=>!!n.metaKey]},hm={style:"cursor: crosshair"};function cm(n={}){let[e,t]=am[n.key||"Alt"],i=ie.fromClass(class{constructor(s){this.view=s,this.isDown=!1}set(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}},{eventObservers:{keydown(s){this.set(s.keyCode==e||t(s))},keyup(s){(s.keyCode==e||!t(s))&&this.set(!1)},mousemove(s){this.set(t(s))}}});return[i,v.contentAttributes.of(s=>{var r;return!((r=s.plugin(i))===null||r===void 0)&&r.isDown?hm:null})]}const Pi="-10000px";class mf{constructor(e,t,i,s){this.facet=t,this.createTooltipView=i,this.removeTooltipView=s,this.input=e.state.facet(t),this.tooltips=this.input.filter(o=>o);let r=null;this.tooltipViews=this.tooltips.map(o=>r=i(o,r))}update(e,t){var i;let s=e.state.facet(this.facet),r=s.filter(a=>a);if(s===this.input){for(let a of this.tooltipViews)a.update&&a.update(e);return!1}let o=[],l=t?[]:null;for(let a=0;at[h]=a),t.length=l.length),this.input=s,this.tooltips=r,this.tooltipViews=o,!0}}function fm(n){let e=n.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const nr=C.define({combine:n=>{var e,t,i;return{position:Z.ios?"absolute":((e=n.find(s=>s.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(s=>s.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((i=n.find(s=>s.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||fm}}}),ma=new WeakMap,Yo=ie.fromClass(class{constructor(n){this.view=n,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet(nr);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new mf(n,zo,(t,i)=>this.createTooltip(t,i),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n,this.above);e&&this.observeIntersection();let t=e||n.geometryChanged,i=n.state.facet(nr);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let s of this.manager.tooltipViews)s.dom.style.position=this.position;t=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let s of this.manager.tooltipViews)this.container.appendChild(s.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n,e){let t=n.create(this.view),i=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),n.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let s=document.createElement("div");s.className="cm-tooltip-arrow",t.dom.appendChild(s)}return t.dom.style.position=this.position,t.dom.style.top=Pi,t.dom.style.left="0px",this.container.insertBefore(t.dom,i),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var n,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(n=i.destroy)===null||n===void 0||n.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=1,e=1,t=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:r}=this.manager.tooltipViews[0];if(Z.gecko)t=r.offsetParent!=this.container.ownerDocument.body;else if(r.style.top==Pi&&r.style.left=="0px"){let o=r.getBoundingClientRect();t=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(t||this.position=="absolute")if(this.parent){let r=this.parent.getBoundingClientRect();r.width&&r.height&&(n=r.width/this.parent.offsetWidth,e=r.height/this.parent.offsetHeight)}else({scaleX:n,scaleY:e}=this.view.viewState);let i=this.view.scrollDOM.getBoundingClientRect(),s=Lo(this.view);return{visible:{left:i.left+s.left,top:i.top+s.top,right:i.right-s.right,bottom:i.bottom-s.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((r,o)=>{let l=this.manager.tooltipViews[o];return l.getCoords?l.getCoords(r.pos):this.view.coordsAtPos(r.pos)}),size:this.manager.tooltipViews.map(({dom:r})=>r.getBoundingClientRect()),space:this.view.state.facet(nr).tooltipSpace(this.view),scaleX:n,scaleY:e,makeAbsolute:t}}writeMeasure(n){var e;if(n.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{visible:t,space:i,scaleX:s,scaleY:r}=n,o=[];for(let l=0;l=Math.min(t.bottom,i.bottom)||f.rightMath.min(t.right,i.right)+.1)){c.style.top=Pi;continue}let d=a.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,O=d?7:0,m=u.right-u.left,g=(e=ma.get(h))!==null&&e!==void 0?e:u.bottom-u.top,b=h.offset||dm,S=this.view.textDirection==H.LTR,x=u.width>i.right-i.left?S?i.left:i.right-u.width:S?Math.max(i.left,Math.min(f.left-(d?14:0)+b.x,i.right-m)):Math.min(Math.max(i.left,f.left-m+(d?14:0)-b.x),i.right-m),w=this.above[l];!a.strictSide&&(w?f.top-g-O-b.yi.bottom)&&w==i.bottom-f.bottom>f.top-i.top&&(w=this.above[l]=!w);let Q=(w?f.top-i.top:i.bottom-f.bottom)-O;if(Qx&&M.topk&&(k=w?M.top-g-2-O:M.bottom+O+2);if(this.position=="absolute"?(c.style.top=(k-n.parent.top)/r+"px",ga(c,(x-n.parent.left)/s)):(c.style.top=k/r+"px",ga(c,x/s)),d){let M=f.left+(S?b.x:-b.x)-(x+14-7);d.style.left=M/s+"px"}h.overlap!==!0&&o.push({left:x,top:k,right:P,bottom:k+g}),c.classList.toggle("cm-tooltip-above",w),c.classList.toggle("cm-tooltip-below",!w),h.positioned&&h.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=Pi}},{eventObservers:{scroll(){this.maybeMeasure()}}});function ga(n,e){let t=parseInt(n.style.left,10);(isNaN(t)||Math.abs(e-t)>1)&&(n.style.left=e+"px")}const um=v.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),dm={x:0,y:0},zo=C.define({enables:[Yo,um]}),ds=C.define({combine:n=>n.reduce((e,t)=>e.concat(t),[])});class Ds{static create(e){return new Ds(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new mf(e,ds,(t,i)=>this.createHostedView(t,i),t=>t.dom.remove())}createHostedView(e,t){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let i of this.manager.tooltipViews){let s=i[e];if(s!==void 0){if(t===void 0)t=s;else if(t!==s)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Om=zo.compute([ds],n=>{let e=n.facet(ds);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var i;return(i=t.end)!==null&&i!==void 0?i:t.pos})),create:Ds.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class pm{constructor(e,t,i,s,r){this.view=e,this.source=t,this.field=i,this.setHover=s,this.hoverTime=r,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;el.bottom||t.xl.right+e.defaultCharacterWidth)return;let a=e.bidiSpans(e.state.doc.lineAt(s)).find(c=>c.from<=s&&c.to>=s),h=a&&a.dir==H.RTL?-1:1;r=t.x{this.pending==l&&(this.pending=null,a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])}))},a=>Te(e.state,a,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(Yo),t=e?e.manager.tooltips.findIndex(i=>i.create==Ds.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:s,tooltip:r}=this;if(s.length&&r&&!mm(r.dom,e)||this.pending){let{pos:o}=s[0]||this.pending,l=(i=(t=s[0])===null||t===void 0?void 0:t.end)!==null&&i!==void 0?i:o;(o==l?this.view.posAtCoords(this.lastMove)!=o:!gm(this.view,o,l,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=i=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Vn=4;function mm(n,e){let{left:t,right:i,top:s,bottom:r}=n.getBoundingClientRect(),o;if(o=n.querySelector(".cm-tooltip-arrow")){let l=o.getBoundingClientRect();s=Math.min(l.top,s),r=Math.max(l.bottom,r)}return e.clientX>=t-Vn&&e.clientX<=i+Vn&&e.clientY>=s-Vn&&e.clientY<=r+Vn}function gm(n,e,t,i,s,r){let o=n.scrollDOM.getBoundingClientRect(),l=n.documentTop+n.documentPadding.top+n.contentHeight;if(o.left>i||o.rights||Math.min(o.bottom,l)=e&&a<=t}function bm(n,e={}){let t=V.define(),i=ce.define({create(){return[]},update(s,r){if(s.length&&(e.hideOnChange&&(r.docChanged||r.selection)?s=[]:e.hideOn&&(s=s.filter(o=>!e.hideOn(r,o))),r.docChanged)){let o=[];for(let l of s){let a=r.changes.mapPos(l.pos,-1,Oe.TrackDel);if(a!=null){let h=Object.assign(Object.create(null),l);h.pos=a,h.end!=null&&(h.end=r.changes.mapPos(h.end)),o.push(h)}}s=o}for(let o of r.effects)o.is(t)&&(s=o.value),o.is(Sm)&&(s=[]);return s},provide:s=>ds.from(s)});return{active:i,extension:[i,ie.define(s=>new pm(s,n,i,t,e.hoverTime||300)),Om]}}function gf(n,e){let t=n.plugin(Yo);if(!t)return null;let i=t.manager.tooltips.indexOf(e);return i<0?null:t.manager.tooltipViews[i]}const Sm=V.define(),ba=C.define({combine(n){let e,t;for(let i of n)e=e||i.topContainer,t=t||i.bottomContainer;return{topContainer:e,bottomContainer:t}}});function Gi(n,e){let t=n.plugin(bf),i=t?t.specs.indexOf(e):-1;return i>-1?t.panels[i]:null}const bf=ie.fromClass(class{constructor(n){this.input=n.state.facet(Fi),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(ba);this.top=new qn(n,!0,e.topContainer),this.bottom=new qn(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(ba);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new qn(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new qn(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(Fi);if(t!=this.input){let i=t.filter(a=>a),s=[],r=[],o=[],l=[];for(let a of i){let h=this.specs.indexOf(a),c;h<0?(c=a(n.view),l.push(c)):(c=this.panels[h],c.update&&c.update(n)),s.push(c),(c.top?r:o).push(c)}this.specs=i,this.panels=s,this.top.sync(r),this.bottom.sync(o);for(let a of l)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let i of this.panels)i.update&&i.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>v.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class qn{constructor(e,t,i){this.view=e,this.top=t,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=Sa(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=Sa(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function Sa(n){let e=n.nextSibling;return n.remove(),e}const Fi=C.define({enables:bf});class yt extends _t{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}yt.prototype.elementClass="";yt.prototype.toDOM=void 0;yt.prototype.mapMode=Oe.TrackBefore;yt.prototype.startSide=yt.prototype.endSide=-1;yt.prototype.point=!0;const es=C.define(),ym=C.define(),Qm={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>B.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},ji=C.define();function xm(n){return[Sf(),ji.of(Object.assign(Object.assign({},Qm),n))]}const ya=C.define({combine:n=>n.some(e=>e)});function Sf(n){return[wm]}const wm=ie.fromClass(class{constructor(n){this.view=n,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(ji).map(e=>new xa(n,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!n.state.facet(ya),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,i=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(i<(t.to-t.from)*.8)}n.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(ya)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&this.dom.remove();let t=B.iter(this.view.state.facet(es),this.view.viewport.from),i=[],s=this.gutters.map(r=>new km(r,this.view.viewport,-this.view.documentPadding.top));for(let r of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(r.type)){let o=!0;for(let l of r.type)if(l.type==we.Text&&o){fo(t,i,l.from);for(let a of s)a.line(this.view,l,i);o=!1}else if(l.widget)for(let a of s)a.widget(this.view,l)}else if(r.type==we.Text){fo(t,i,r.from);for(let o of s)o.line(this.view,r,i)}else if(r.widget)for(let o of s)o.widget(this.view,r);for(let r of s)r.finish();n&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(n){let e=n.startState.facet(ji),t=n.state.facet(ji),i=n.docChanged||n.heightChanged||n.viewportChanged||!B.eq(n.startState.facet(es),n.state.facet(es),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let s of this.gutters)s.update(n)&&(i=!0);else{i=!0;let s=[];for(let r of t){let o=e.indexOf(r);o<0?s.push(new xa(this.view,r)):(this.gutters[o].update(n),s.push(this.gutters[o]))}for(let r of this.gutters)r.dom.remove(),s.indexOf(r)<0&&r.destroy();for(let r of s)this.dom.appendChild(r.dom);this.gutters=s}return i}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove()}},{provide:n=>v.scrollMargins.of(e=>{let t=e.plugin(n);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==H.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}})});function Qa(n){return Array.isArray(n)?n:[n]}function fo(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class km{constructor(e,t,i){this.gutter=e,this.height=i,this.i=0,this.cursor=B.iter(e.markers,t.from)}addElement(e,t,i){let{gutter:s}=this,r=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==s.elements.length){let l=new yf(e,o,r,i);s.elements.push(l),s.dom.appendChild(l.dom)}else s.elements[this.i].update(e,o,r,i);this.height=t.bottom,this.i++}line(e,t,i){let s=[];fo(this.cursor,s,t.from),i.length&&(s=s.concat(i));let r=this.gutter.config.lineMarker(e,t,s);r&&s.unshift(r);let o=this.gutter;s.length==0&&!o.config.renderEmptyElements||this.addElement(e,t,s)}widget(e,t){let i=this.gutter.config.widgetMarker(e,t.widget,t),s=i?[i]:null;for(let r of e.state.facet(ym)){let o=r(e,t.widget,t);o&&(s||(s=[])).push(o)}s&&this.addElement(e,t,s)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class xa{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in t.domEventHandlers)this.dom.addEventListener(i,s=>{let r=s.target,o;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let a=r.getBoundingClientRect();o=(a.top+a.bottom)/2}else o=s.clientY;let l=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[i](e,l,s)&&s.preventDefault()});this.markers=Qa(t.markers(e)),t.initialSpacer&&(this.spacer=new yf(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=Qa(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let s=this.config.updateSpacer(this.spacer.markers[0],e);s!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[s])}let i=e.view.viewport;return!B.eq(this.markers,t,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class yf{constructor(e,t,i,s){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,i,s)}update(e,t,i,s){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),Pm(this.markers,s)||this.setMarkers(e,s)}setMarkers(e,t){let i="cm-gutterElement",s=this.dom.firstChild;for(let r=0,o=0;;){let l=o,a=rr(l,a,h)||o(l,a,h):o}return i}})}});class sr extends yt{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function rr(n,e){return n.state.facet(Jt).formatNumber(e,n.state)}const Zm=ji.compute([Jt],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet($m)},lineMarker(e,t,i){return i.some(s=>s.toDOM)?null:new sr(rr(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,i)=>{for(let s of e.state.facet(vm)){let r=s(e,t,i);if(r)return r}return null},lineMarkerChange:e=>e.startState.facet(Jt)!=e.state.facet(Jt),initialSpacer(e){return new sr(rr(e,wa(e.state.doc.lines)))},updateSpacer(e,t){let i=rr(t.view,wa(t.view.state.doc.lines));return i==e.number?e:new sr(i)},domEventHandlers:n.facet(Jt).domEventHandlers}));function Cm(n={}){return[Jt.of(n),Sf(),Zm]}function wa(n){let e=9;for(;e{let e=[],t=-1;for(let i of n.selection.ranges){let s=n.doc.lineAt(i.head).from;s>t&&(t=s,e.push(Tm.range(s)))}return B.of(e)});function Am(){return Rm}const Qf=1024;let Xm=0;class De{constructor(e,t){this.from=e,this.to=t}}class D{constructor(e={}){this.id=Xm++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Pe.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}D.closedBy=new D({deserialize:n=>n.split(" ")});D.openedBy=new D({deserialize:n=>n.split(" ")});D.group=new D({deserialize:n=>n.split(" ")});D.isolate=new D({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});D.contextHash=new D({perNode:!0});D.lookAhead=new D({perNode:!0});D.mounted=new D({perNode:!0});class Hi{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}static get(e){return e&&e.props&&e.props[D.mounted.id]}}const Mm=Object.create(null);class Pe{constructor(e,t,i,s=0){this.name=e,this.props=t,this.id=i,this.flags=s}static define(e){let t=e.props&&e.props.length?Object.create(null):Mm,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),s=new Pe(e.name||"",t,e.id,i);if(e.props){for(let r of e.props)if(Array.isArray(r)||(r=r(s)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[r[0].id]=r[1]}}return s}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(D.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let s of i.split(" "))t[s]=e[i];return i=>{for(let s=i.prop(D.group),r=-1;r<(s?s.length:0);r++){let o=t[r<0?i.name:s[r]];if(o)return o}}}}Pe.none=new Pe("",Object.create(null),0,8);class Uo{constructor(e){this.types=e;for(let t=0;t0;for(let a=this.cursor(o|G.IncludeAnonymous);;){let h=!1;if(a.from<=r&&a.to>=s&&(!l&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;h=!0}for(;h&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Go(Pe.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,s)=>new J(this.type,t,i,s,this.propValues),e.makeTree||((t,i,s)=>new J(Pe.none,t,i,s)))}static build(e){return Dm(e)}}J.empty=new J(Pe.none,[],[],0);class Io{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Io(this.buffer,this.index)}}class Rt{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return Pe.none}toString(){let e=[];for(let t=0;t0));a=o[a+3]);return l}slice(e,t,i){let s=this.buffer,r=new Uint16Array(t-e),o=0;for(let l=e,a=0;l=e&&te;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function Ki(n,e,t,i){for(var s;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?l.length:-1;e!=h;e+=t){let c=l[e],f=a[e]+o.from;if(xf(s,i,f,f+c.length)){if(c instanceof Rt){if(r&G.ExcludeBuffers)continue;let u=c.findChild(0,c.buffer.length,t,i-f,s);if(u>-1)return new nt(new Vm(o,c,e,f),null,u)}else if(r&G.IncludeAnonymous||!c.type.isAnonymous||No(c)){let u;if(!(r&G.IgnoreMounts)&&(u=Hi.get(c))&&!u.overlay)return new ye(u.tree,f,e,o);let d=new ye(c,f,e,o);return r&G.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(t<0?c.children.length-1:0,t,i,s)}}}if(r&G.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let s;if(!(i&G.IgnoreOverlays)&&(s=Hi.get(this._tree))&&s.overlay){let r=e-this.from;for(let{from:o,to:l}of s.overlay)if((t>0?o<=r:o=r:l>r))return new ye(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Pa(n,e,t,i){let s=n.cursor(),r=[];if(!s.firstChild())return r;if(t!=null){for(let o=!1;!o;)if(o=s.type.is(t),!s.nextSibling())return r}for(;;){if(i!=null&&s.type.is(i))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return i==null?r:[]}}function uo(n,e,t=e.length-1){for(let i=n;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class Vm{constructor(e,t,i,s){this.parent=e,this.buffer=t,this.index=i,this.start=s}}class nt extends wf{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.context.start,i);return r<0?null:new nt(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&G.ExcludeBuffers)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new nt(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new nt(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new nt(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,s=this.index+4,r=i.buffer[this.index+3];if(r>s){let o=i.buffer[this.index+1];e.push(i.slice(s,r,o)),t.push(0)}return new J(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function kf(n){if(!n.length)return null;let e=0,t=n[0];for(let r=1;rt.from||o.to=e){let l=new ye(o.tree,o.overlay[0].from+r.from,-1,r);(s||(s=[i])).push(Ki(l,e,t,!1))}}return s?kf(s):i}class Os{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof ye)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:s}=this.buffer;return this.type=t||s.set.types[s.buffer[e]],this.from=i+s.buffer[e+1],this.to=i+s.buffer[e+2],!0}yield(e){return e?e instanceof ye?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:s}=this.buffer,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.buffer.start,i);return r<0?!1:(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&G.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&G.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&G.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let s=i<0?0:this.stack[i]+4;if(this.index!=s)return this.yieldBuf(t.findChild(s,this.index,-1,0,4))}else{let s=t.buffer[this.index+3];if(s<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(s)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:s}=this;if(s){if(e>0){if(this.index-1)for(let r=t+e,o=e<0?-1:i._tree.children.length;r!=o;r+=e){let l=i._tree.children[r];if(this.mode&G.IncludeAnonymous||l instanceof Rt||!l.type.isAnonymous||No(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==s){if(s==this.index)return o;t=o,i=r+1;break e}s=this.stack[--r]}for(let s=i;s=0;r--){if(r<0)return uo(this._tree,e,s);let o=i[t.buffer[this.stack[r]]];if(!o.isAnonymous){if(e[s]&&e[s]!=o.name)return!1;s--}}return!0}}function No(n){return n.children.some(e=>e instanceof Rt||!e.type.isAnonymous||No(e))}function Dm(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:s=Qf,reused:r=[],minRepeatType:o=i.types.length}=n,l=Array.isArray(t)?new Io(t,t.length):t,a=i.types,h=0,c=0;function f(Q,k,P,M,R,L){let{id:q,start:X,end:E,size:W}=l,Y=c,oe=h;for(;W<0;)if(l.next(),W==-1){let fe=r[q];P.push(fe),M.push(X-Q);return}else if(W==-3){h=q;return}else if(W==-4){c=q;return}else throw new RangeError(`Unrecognized record size: ${W}`);let ae=a[q],me,z,ne=X-Q;if(E-X<=s&&(z=g(l.pos-k,R))){let fe=new Uint16Array(z.size-z.skip),ge=l.pos-z.size,Ge=fe.length;for(;l.pos>ge;)Ge=b(z.start,fe,Ge);me=new Rt(fe,E-z.start,i),ne=z.start-Q}else{let fe=l.pos-W;l.next();let ge=[],Ge=[],Vt=q>=o?q:-1,Gt=0,xn=E;for(;l.pos>fe;)Vt>=0&&l.id==Vt&&l.size>=0?(l.end<=xn-s&&(O(ge,Ge,X,Gt,l.end,xn,Vt,Y,oe),Gt=ge.length,xn=l.end),l.next()):L>2500?u(X,fe,ge,Ge):f(X,fe,ge,Ge,Vt,L+1);if(Vt>=0&&Gt>0&&Gt-1&&Gt>0){let Sl=d(ae,oe);me=Go(ae,ge,Ge,0,ge.length,0,E-X,Sl,Sl)}else me=m(ae,ge,Ge,E-X,Y-E,oe)}P.push(me),M.push(ne)}function u(Q,k,P,M){let R=[],L=0,q=-1;for(;l.pos>k;){let{id:X,start:E,end:W,size:Y}=l;if(Y>4)l.next();else{if(q>-1&&E=0;W-=3)X[Y++]=R[W],X[Y++]=R[W+1]-E,X[Y++]=R[W+2]-E,X[Y++]=Y;P.push(new Rt(X,R[2]-E,i)),M.push(E-Q)}}function d(Q,k){return(P,M,R)=>{let L=0,q=P.length-1,X,E;if(q>=0&&(X=P[q])instanceof J){if(!q&&X.type==Q&&X.length==R)return X;(E=X.prop(D.lookAhead))&&(L=M[q]+X.length+E)}return m(Q,P,M,R,L,k)}}function O(Q,k,P,M,R,L,q,X,E){let W=[],Y=[];for(;Q.length>M;)W.push(Q.pop()),Y.push(k.pop()+P-R);Q.push(m(i.types[q],W,Y,L-R,X-L,E)),k.push(R-P)}function m(Q,k,P,M,R,L,q){if(L){let X=[D.contextHash,L];q=q?[X].concat(q):[X]}if(R>25){let X=[D.lookAhead,R];q=q?[X].concat(q):[X]}return new J(Q,k,P,M,q)}function g(Q,k){let P=l.fork(),M=0,R=0,L=0,q=P.end-s,X={size:0,start:0,skip:0};e:for(let E=P.pos-Q;P.pos>E;){let W=P.size;if(P.id==k&&W>=0){X.size=M,X.start=R,X.skip=L,L+=4,M+=4,P.next();continue}let Y=P.pos-W;if(W<0||Y=o?4:0,ae=P.start;for(P.next();P.pos>Y;){if(P.size<0)if(P.size==-3)oe+=4;else break e;else P.id>=o&&(oe+=4);P.next()}R=ae,M+=W,L+=oe}return(k<0||M==Q)&&(X.size=M,X.start=R,X.skip=L),X.size>4?X:void 0}function b(Q,k,P){let{id:M,start:R,end:L,size:q}=l;if(l.next(),q>=0&&M4){let E=l.pos-(q-4);for(;l.pos>E;)P=b(Q,k,P)}k[--P]=X,k[--P]=L-Q,k[--P]=R-Q,k[--P]=M}else q==-3?h=M:q==-4&&(c=M);return P}let S=[],x=[];for(;l.pos>0;)f(n.start||0,n.bufferStart||0,S,x,-1,0);let w=(e=n.length)!==null&&e!==void 0?e:S.length?x[0]+S[0].length:0;return new J(a[n.topID],S.reverse(),x.reverse(),w)}const $a=new WeakMap;function ts(n,e){if(!n.isAnonymous||e instanceof Rt||e.type!=n)return 1;let t=$a.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof J)){t=1;break}t+=ts(n,i)}$a.set(e,t)}return t}function Go(n,e,t,i,s,r,o,l,a){let h=0;for(let O=i;O=c)break;k+=P}if(x==w+1){if(k>c){let P=O[w];d(P.children,P.positions,0,P.children.length,m[w]+S);continue}f.push(O[w])}else{let P=m[x-1]+O[x-1].length-Q;f.push(Go(n,O,m,w,x,Q,P,null,a))}u.push(Q+S-r)}}return d(e,t,i,s,0),(l||a)(f,u,o)}class Pf{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let s=this.map.get(e);s||this.map.set(e,s=new Map),s.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof nt?this.setBuffer(e.context.buffer,e.index,t):e instanceof ye&&this.map.set(e.tree,t)}get(e){return e instanceof nt?this.getBuffer(e.context.buffer,e.index):e instanceof ye?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class gt{constructor(e,t,i,s,r=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=s,this.open=(r?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let s=[new gt(0,e.length,e,0,!1,i)];for(let r of t)r.to>e.length&&s.push(r);return s}static applyChanges(e,t,i=128){if(!t.length)return e;let s=[],r=1,o=e.length?e[0]:null;for(let l=0,a=0,h=0;;l++){let c=l=i)for(;o&&o.from=u.from||f<=u.to||h){let d=Math.max(u.from,a)-h,O=Math.min(u.to,f)-h;u=d>=O?null:new gt(d,O,u.tree,u.offset+h,l>0,!!c)}if(u&&s.push(u),o.to>f)break;o=rnew De(s.from,s.to)):[new De(0,0)]:[new De(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let s=this.startParse(e,t,i);for(;;){let r=s.advance();if(r)return r}}}class Wm{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function Lm(n){return(e,t,i,s)=>new _m(e,n,t,i,s)}class va{constructor(e,t,i,s,r){this.parser=e,this.parse=t,this.overlay=i,this.target=s,this.from=r}}function Za(n){if(!n.length||n.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(n))}class jm{constructor(e,t,i,s,r,o,l){this.parser=e,this.predicate=t,this.mounts=i,this.index=s,this.start=r,this.target=o,this.prev=l,this.depth=0,this.ranges=[]}}const Oo=new D({perNode:!0});class _m{constructor(e,t,i,s,r){this.nest=t,this.input=i,this.fragments=s,this.ranges=r,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let s of this.inner)s.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new J(i.type,i.children,i.positions,i.length,i.propValues.concat([[Oo,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[D.mounted.id]=new Hi(t,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t=this.stoppedAt)l=!1;else if(e.hasNode(s)){if(t){let h=t.mounts.find(c=>c.frag.from<=s.from&&c.frag.to>=s.to&&c.mount.overlay);if(h)for(let c of h.mount.overlay){let f=c.from+h.pos,u=c.to+h.pos;f>=s.from&&u<=s.to&&!t.ranges.some(d=>d.fromf)&&t.ranges.push({from:f,to:u})}}l=!1}else if(i&&(o=Bm(i.ranges,s.from,s.to)))l=o!=2;else if(!s.type.isAnonymous&&(r=this.nest(s,this.input))&&(s.fromnew De(f.from-s.from,f.to-s.from)):null,s.tree,c.length?c[0].from:s.from)),r.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):l=!1}}else if(t&&(a=t.predicate(s))&&(a===!0&&(a=new De(s.from,s.to)),a.from=0&&t.ranges[h].to==a.from?t.ranges[h]={from:t.ranges[h].from,to:a.to}:t.ranges.push(a)}if(l&&s.firstChild())t&&t.depth++,i&&i.depth++;else for(;!s.nextSibling();){if(!s.parent())break e;if(t&&!--t.depth){let h=Ra(this.ranges,t.ranges);h.length&&(Za(h),this.inner.splice(t.index,0,new va(t.parser,t.parser.startParse(this.input,Aa(t.mounts,h),h),t.ranges.map(c=>new De(c.from-t.start,c.to-t.start)),t.target,h[0].from))),t=t.prev}i&&!--i.depth&&(i=i.prev)}}}}function Bm(n,e,t){for(let i of n){if(i.from>=t)break;if(i.to>e)return i.from<=e&&i.to>=t?2:1}return 0}function Ca(n,e,t,i,s,r){if(e=e&&t.enter(i,1,G.IgnoreOverlays|G.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof J)t=t.children[0];else break}return!1}}let zm=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(t=i.tree.prop(Oo))!==null&&t!==void 0?t:i.to,this.inner=new Ta(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(Oo))!==null&&e!==void 0?e:t.to,this.inner=new Ta(t.tree,-t.offset)}}findMounts(e,t){var i;let s=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let r=this.inner.cursor.node;r;r=r.parent){let o=(i=r.tree)===null||i===void 0?void 0:i.prop(D.mounted);if(o&&o.parser==t)for(let l=this.fragI;l=r.to)break;a.tree==this.curFrag.tree&&s.push({frag:a,pos:r.from-a.offset,mount:o})}}}return s}};function Ra(n,e){let t=null,i=e;for(let s=1,r=0;s=l)break;a.to<=o||(t||(i=t=e.slice()),a.froml&&t.splice(r+1,0,new De(l,a.to))):a.to>l?t[r--]=new De(l,a.to):t.splice(r--,1))}}return i}function Um(n,e,t,i){let s=0,r=0,o=!1,l=!1,a=-1e9,h=[];for(;;){let c=s==n.length?1e9:o?n[s].to:n[s].from,f=r==e.length?1e9:l?e[r].to:e[r].from;if(o!=l){let u=Math.max(a,t),d=Math.min(c,f,i);unew De(u.from+i,u.to+i)),f=Um(e,c,a,h);for(let u=0,d=a;;u++){let O=u==f.length,m=O?h:f[u].from;if(m>d&&t.push(new gt(d,m,s.tree,-o,r.from>=d||r.openStart,r.to<=m||r.openEnd)),O)break;d=f[u].to}}else t.push(new gt(a,h,s.tree,-o,r.from>=o||r.openStart,r.to<=l||r.openEnd))}return t}let Im=0;class Ee{constructor(e,t,i,s){this.name=e,this.set=t,this.base=i,this.modified=s,this.id=Im++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let i=typeof e=="string"?e:"?";if(e instanceof Ee&&(t=e),t?.base)throw new Error("Can not derive from a modified tag");let s=new Ee(i,[],null,[]);if(s.set.push(s),t)for(let r of t.set)s.set.push(r);return s}static defineModifier(e){let t=new ps(e);return i=>i.modified.indexOf(t)>-1?i:ps.get(i.base||i,i.modified.concat(t).sort((s,r)=>s.id-r.id))}}let Nm=0;class ps{constructor(e){this.name=e,this.instances=[],this.id=Nm++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(l=>l.base==e&&Gm(t,l.modified));if(i)return i;let s=[],r=new Ee(e.name,s,e,t);for(let l of t)l.instances.push(r);let o=Fm(t);for(let l of e.set)if(!l.modified.length)for(let a of o)s.push(ps.get(l,a));return r}}function Gm(n,e){return n.length==e.length&&n.every((t,i)=>t==e[i])}function Fm(n){let e=[[]];for(let t=0;ti.length-t.length)}function dn(n){let e=Object.create(null);for(let t in n){let i=n[t];Array.isArray(i)||(i=[i]);for(let s of t.split(" "))if(s){let r=[],o=2,l=s;for(let f=0;;){if(l=="..."&&f>0&&f+3==s.length){o=1;break}let u=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!u)throw new RangeError("Invalid path: "+s);if(r.push(u[0]=="*"?"":u[0][0]=='"'?JSON.parse(u[0]):u[0]),f+=u[0].length,f==s.length)break;let d=s[f++];if(f==s.length&&d=="!"){o=0;break}if(d!="/")throw new RangeError("Invalid path: "+s);l=s.slice(f)}let a=r.length-1,h=r[a];if(!h)throw new RangeError("Invalid path: "+s);let c=new ms(i,o,a>0?r.slice(0,a):null);e[h]=c.sort(e[h])}}return vf.add(e)}const vf=new D;class ms{constructor(e,t,i,s){this.tags=e,this.mode=t,this.context=i,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=s;for(let l of r)for(let a of l.set){let h=t[a.id];if(h){o=o?o+" "+h:h;break}}return o},scope:i}}function Hm(n,e){let t=null;for(let i of n){let s=i.style(e);s&&(t=t?t+" "+s:s)}return t}function Km(n,e,t,i=0,s=n.length){let r=new Jm(i,Array.isArray(e)?e:[e],t);r.highlightRange(n.cursor(),i,s,"",r.highlighters),r.flush(s)}class Jm{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,s,r){let{type:o,from:l,to:a}=e;if(l>=i||a<=t)return;o.isTop&&(r=this.highlighters.filter(d=>!d.scope||d.scope(o)));let h=s,c=eg(e)||ms.empty,f=Hm(r,c.tags);if(f&&(h&&(h+=" "),h+=f,c.mode==1&&(s+=(s?" ":"")+f)),this.startSpan(Math.max(t,l),h),c.opaque)return;let u=e.tree&&e.tree.prop(D.mounted);if(u&&u.overlay){let d=e.node.enter(u.overlay[0].from+l,1),O=this.highlighters.filter(g=>!g.scope||g.scope(u.tree.type)),m=e.firstChild();for(let g=0,b=l;;g++){let S=g=x||!e.nextSibling())););if(!S||x>i)break;b=S.to+l,b>t&&(this.highlightRange(d.cursor(),Math.max(t,S.from+l),Math.min(i,b),"",O),this.startSpan(Math.min(i,b),h))}m&&e.parent()}else if(e.firstChild()){u&&(s="");do if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,s,r),this.startSpan(Math.min(i,e.to),h)}while(e.nextSibling());e.parent()}}}function eg(n){let e=n.type.prop(vf);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const $=Ee.define,Dn=$(),Qt=$(),Xa=$(Qt),Ma=$(Qt),xt=$(),Wn=$(xt),or=$(xt),Je=$(),qt=$(Je),He=$(),Ke=$(),po=$(),$i=$(po),Ln=$(),p={comment:Dn,lineComment:$(Dn),blockComment:$(Dn),docComment:$(Dn),name:Qt,variableName:$(Qt),typeName:Xa,tagName:$(Xa),propertyName:Ma,attributeName:$(Ma),className:$(Qt),labelName:$(Qt),namespace:$(Qt),macroName:$(Qt),literal:xt,string:Wn,docString:$(Wn),character:$(Wn),attributeValue:$(Wn),number:or,integer:$(or),float:$(or),bool:$(xt),regexp:$(xt),escape:$(xt),color:$(xt),url:$(xt),keyword:He,self:$(He),null:$(He),atom:$(He),unit:$(He),modifier:$(He),operatorKeyword:$(He),controlKeyword:$(He),definitionKeyword:$(He),moduleKeyword:$(He),operator:Ke,derefOperator:$(Ke),arithmeticOperator:$(Ke),logicOperator:$(Ke),bitwiseOperator:$(Ke),compareOperator:$(Ke),updateOperator:$(Ke),definitionOperator:$(Ke),typeOperator:$(Ke),controlOperator:$(Ke),punctuation:po,separator:$(po),bracket:$i,angleBracket:$($i),squareBracket:$($i),paren:$($i),brace:$($i),content:Je,heading:qt,heading1:$(qt),heading2:$(qt),heading3:$(qt),heading4:$(qt),heading5:$(qt),heading6:$(qt),contentSeparator:$(Je),list:$(Je),quote:$(Je),emphasis:$(Je),strong:$(Je),link:$(Je),monospace:$(Je),strikethrough:$(Je),inserted:$(),deleted:$(),changed:$(),invalid:$(),meta:Ln,documentMeta:$(Ln),annotation:$(Ln),processingInstruction:$(Ln),definition:Ee.defineModifier("definition"),constant:Ee.defineModifier("constant"),function:Ee.defineModifier("function"),standard:Ee.defineModifier("standard"),local:Ee.defineModifier("local"),special:Ee.defineModifier("special")};for(let n in p){let e=p[n];e instanceof Ee&&(e.name=n)}Zf([{tag:p.link,class:"tok-link"},{tag:p.heading,class:"tok-heading"},{tag:p.emphasis,class:"tok-emphasis"},{tag:p.strong,class:"tok-strong"},{tag:p.keyword,class:"tok-keyword"},{tag:p.atom,class:"tok-atom"},{tag:p.bool,class:"tok-bool"},{tag:p.url,class:"tok-url"},{tag:p.labelName,class:"tok-labelName"},{tag:p.inserted,class:"tok-inserted"},{tag:p.deleted,class:"tok-deleted"},{tag:p.literal,class:"tok-literal"},{tag:p.string,class:"tok-string"},{tag:p.number,class:"tok-number"},{tag:[p.regexp,p.escape,p.special(p.string)],class:"tok-string2"},{tag:p.variableName,class:"tok-variableName"},{tag:p.local(p.variableName),class:"tok-variableName tok-local"},{tag:p.definition(p.variableName),class:"tok-variableName tok-definition"},{tag:p.special(p.variableName),class:"tok-variableName2"},{tag:p.definition(p.propertyName),class:"tok-propertyName tok-definition"},{tag:p.typeName,class:"tok-typeName"},{tag:p.namespace,class:"tok-namespace"},{tag:p.className,class:"tok-className"},{tag:p.macroName,class:"tok-macroName"},{tag:p.propertyName,class:"tok-propertyName"},{tag:p.operator,class:"tok-operator"},{tag:p.comment,class:"tok-comment"},{tag:p.meta,class:"tok-meta"},{tag:p.invalid,class:"tok-invalid"},{tag:p.punctuation,class:"tok-punctuation"}]);var lr;const ei=new D;function Cf(n){return C.define({combine:n?e=>e.concat(n):void 0})}const Fo=new D;class ze{constructor(e,t,i=[],s=""){this.data=e,this.name=s,j.prototype.hasOwnProperty("tree")||Object.defineProperty(j.prototype,"tree",{get(){return ee(this)}}),this.parser=t,this.extension=[At.of(this),j.languageData.of((r,o,l)=>{let a=Va(r,o,l),h=a.type.prop(ei);if(!h)return[];let c=r.facet(h),f=a.type.prop(Fo);if(f){let u=a.resolve(o-a.from,l);for(let d of f)if(d.test(u,r)){let O=r.facet(d.facet);return d.type=="replace"?O:O.concat(c)}}return c})].concat(i)}isActiveAt(e,t,i=-1){return Va(e,t,i).type.prop(ei)==this.data}findRegions(e){let t=e.facet(At);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],s=(r,o)=>{if(r.prop(ei)==this.data){i.push({from:o,to:o+r.length});return}let l=r.prop(D.mounted);if(l){if(l.tree.prop(ei)==this.data){if(l.overlay)for(let a of l.overlay)i.push({from:a.from+o,to:a.to+o});else i.push({from:o,to:o+r.length});return}else if(l.overlay){let a=i.length;if(s(l.tree,l.overlay[0].from+o),i.length>a)return}}for(let a=0;ai.isTop?t:void 0)]}),e.name)}configure(e,t){return new Ut(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function ee(n){let e=n.field(ze.state,!1);return e?e.tree:J.empty}class tg{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let vi=null;class gs{constructor(e,t,i=[],s,r,o,l,a){this.parser=e,this.state=t,this.fragments=i,this.tree=s,this.treeLen=r,this.viewport=o,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new gs(e,t,[],J.empty,0,i,[],null)}startParse(){return this.parser.startParse(new tg(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=J.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let s=Date.now()+e;e=()=>Date.now()>s}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(gt.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=vi;vi=this;try{return e()}finally{vi=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=qa(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:s,treeLen:r,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((h,c,f,u)=>a.push({fromA:h,toA:c,fromB:f,toB:u})),i=gt.applyChanges(i,a),s=J.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let h of this.skipped){let c=e.mapPos(h.from,1),f=e.mapPos(h.to,-1);ce.from&&(this.fragments=qa(this.fragments,s,r),this.skipped.splice(i--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends $f{createParse(t,i,s){let r=s[0].from,o=s[s.length-1].to;return{parsedPos:r,advance(){let a=vi;if(a){for(let h of s)a.tempSkipped.push(h);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=o,new J(Pe.none,[],[],o-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return vi}}function qa(n,e,t){return gt.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class Oi{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new Oi(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=gs.create(e.facet(At).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new Oi(i)}}ze.state=ce.define({create:Oi.init,update(n,e){for(let t of e.effects)if(t.is(ze.setState))return t.value;return e.startState.facet(At)!=e.state.facet(At)?Oi.init(e.state):n.apply(e)}});let Tf=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Tf=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const ar=typeof navigator<"u"&&(!((lr=navigator.scheduling)===null||lr===void 0)&&lr.isInputPending)?()=>navigator.scheduling.isInputPending():null,ig=ie.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(ze.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(ze.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Tf(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnds+1e3,a=r.context.work(()=>ar&&ar()||Date.now()>o,s+(l?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:ze.setState.of(new Oi(r.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Te(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),At=C.define({combine(n){return n.length?n[0]:null},enables:n=>[ze.state,ig,v.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class Ws{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const ng=C.define(),On=C.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function bs(n){let e=n.facet(On);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function Ji(n,e){let t="",i=n.tabSize,s=n.facet(On)[0];if(s==" "){for(;e>=i;)t+=" ",e-=i;s=" "}for(let r=0;r=e?sg(n,t,e):null}class Ls{constructor(e,t={}){this.state=e,this.options=t,this.unit=bs(e)}lineAt(e,t=1){let i=this.state.doc.lineAt(e),{simulateBreak:s,simulateDoubleBreak:r}=this.options;return s!=null&&s>=i.from&&s<=i.to?r&&s==e?{text:"",from:e}:(t<0?s-1&&(r+=o-this.countColumn(i,i.search(/\S|$/))),r}countColumn(e,t=e.length){return Si(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:i,from:s}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let o=r(s);if(o>-1)return o}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const pn=new D;function sg(n,e,t){let i=e.resolveStack(t),s=e.resolveInner(t,-1).resolve(t,0).enterUnfinishedNodesBefore(t);if(s!=i.node){let r=[];for(let o=s;o&&!(o.from==i.node.from&&o.type==i.node.type);o=o.parent)r.push(o);for(let o=r.length-1;o>=0;o--)i={node:r[o],next:i}}return Rf(i,n,t)}function Rf(n,e,t){for(let i=n;i;i=i.next){let s=og(i.node);if(s)return s(Ko.create(e,t,i))}return 0}function rg(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function og(n){let e=n.type.prop(pn);if(e)return e;let t=n.firstChild,i;if(t&&(i=t.type.prop(D.closedBy))){let s=n.lastChild,r=s&&i.indexOf(s.name)>-1;return o=>Af(o,!0,1,void 0,r&&!rg(o)?s.from:void 0)}return n.parent==null?lg:null}function lg(){return 0}class Ko extends Ls{constructor(e,t,i){super(e.state,e.options),this.base=e,this.pos=t,this.context=i}get node(){return this.context.node}static create(e,t,i){return new Ko(e,t,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(t.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(ag(i,e))break;t=this.state.doc.lineAt(i.from)}return this.lineIndent(t.from)}continue(){return Rf(this.context.next,this.base,this.pos)}}function ag(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function hg(n){let e=n.node,t=e.childAfter(e.from),i=e.lastChild;if(!t)return null;let s=n.options.simulateBreak,r=n.state.doc.lineAt(t.from),o=s==null||s<=r.from?r.to:Math.min(r.to,s);for(let l=t.to;;){let a=e.childAfter(l);if(!a||a==i)return null;if(!a.type.isSkipped){if(a.from>=o)return null;let h=/^ */.exec(r.text.slice(t.to-r.from))[0].length;return{from:t.from,to:t.to+h}}l=a.to}}function cg({closing:n,align:e=!0,units:t=1}){return i=>Af(i,e,t,n)}function Af(n,e,t,i,s){let r=n.textAfter,o=r.match(/^\s*/)[0].length,l=i&&r.slice(o,o+i.length)==i||s==n.pos+o,a=e?hg(n):null;return a?l?n.column(a.from):n.column(a.to):n.baseIndent+(l?0:n.unit*t)}const fg=n=>n.baseIndent;function ri({except:n,units:e=1}={}){return t=>{let i=n&&n.test(t.textAfter);return t.baseIndent+(i?0:e*t.unit)}}const ug=200;function dg(){return j.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:i}=n.newSelection.main,s=t.lineAt(i);if(i>s.from+ug)return n;let r=t.sliceString(s.from,i);if(!e.some(h=>h.test(r)))return n;let{state:o}=n,l=-1,a=[];for(let{head:h}of o.selection.ranges){let c=o.doc.lineAt(h);if(c.from==l)continue;l=c.from;let f=Ho(o,c.from);if(f==null)continue;let u=/^\s*/.exec(c.text)[0],d=Ji(o,f);u!=d&&a.push({from:c.from,to:c.from+u.length,insert:d})}return a.length?[n,{changes:a,sequential:!0}]:n})}const Og=C.define(),mn=new D;function Jo(n){let e=n.firstChild,t=n.lastChild;return e&&e.tot)continue;if(r&&l.from=e&&h.to>t&&(r=h)}}return r}function mg(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function Ss(n,e,t){for(let i of n.facet(Og)){let s=i(n,e,t);if(s)return s}return pg(n,e,t)}function Xf(n,e){let t=e.mapPos(n.from,1),i=e.mapPos(n.to,-1);return t>=i?void 0:{from:t,to:i}}const js=V.define({map:Xf}),gn=V.define({map:Xf});function Mf(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(i=>i.from<=t&&i.to>=t)||e.push(n.lineBlockAt(t));return e}const It=ce.define({create(){return A.none},update(n,e){n=n.map(e.changes);for(let t of e.effects)if(t.is(js)&&!gg(n,t.value.from,t.value.to)){let{preparePlaceholder:i}=e.state.facet(Ef),s=i?A.replace({widget:new kg(i(e.state,t.value))}):Ea;n=n.update({add:[s.range(t.value.from,t.value.to)]})}else t.is(gn)&&(n=n.update({filter:(i,s)=>t.value.from!=i||t.value.to!=s,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:i}=e.selection.main;n.between(i,i,(s,r)=>{si&&(t=!0)}),t&&(n=n.update({filterFrom:i,filterTo:i,filter:(s,r)=>r<=i||s>=i}))}return n},provide:n=>v.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(i,s)=>{t.push(i,s)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t{(!s||s.from>r)&&(s={from:r,to:o})}),s}function gg(n,e,t){let i=!1;return n.between(e,e,(s,r)=>{s==e&&r==t&&(i=!0)}),i}function Vf(n,e){return n.field(It,!1)?e:e.concat(V.appendConfig.of(Df()))}const bg=n=>{for(let e of Mf(n)){let t=Ss(n.state,e.from,e.to);if(t)return n.dispatch({effects:Vf(n.state,[js.of(t),qf(n,t)])}),!0}return!1},Sg=n=>{if(!n.state.field(It,!1))return!1;let e=[];for(let t of Mf(n)){let i=ys(n.state,t.from,t.to);i&&e.push(gn.of(i),qf(n,i,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function qf(n,e,t=!0){let i=n.state.doc.lineAt(e.from).number,s=n.state.doc.lineAt(e.to).number;return v.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${i} ${n.state.phrase("to")} ${s}.`)}const yg=n=>{let{state:e}=n,t=[];for(let i=0;i{let e=n.state.field(It,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(i,s)=>{t.push(gn.of({from:i,to:s}))}),n.dispatch({effects:t}),!0},xg=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:bg},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:Sg},{key:"Ctrl-Alt-[",run:yg},{key:"Ctrl-Alt-]",run:Qg}],wg={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Ef=C.define({combine(n){return ct(n,wg)}});function Df(n){return[It,vg]}function Wf(n,e){let{state:t}=n,i=t.facet(Ef),s=o=>{let l=n.lineBlockAt(n.posAtDOM(o.target)),a=ys(n.state,l.from,l.to);a&&n.dispatch({effects:gn.of(a)}),o.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(n,s,e);let r=document.createElement("span");return r.textContent=i.placeholderText,r.setAttribute("aria-label",t.phrase("folded code")),r.title=t.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=s,r}const Ea=A.replace({widget:new class extends ft{toDOM(n){return Wf(n,null)}}});class kg extends ft{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return Wf(e,this.value)}}const Pg={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class hr extends yt{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function $g(n={}){let e=Object.assign(Object.assign({},Pg),n),t=new hr(e,!0),i=new hr(e,!1),s=ie.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(At)!=o.state.facet(At)||o.startState.field(It,!1)!=o.state.field(It,!1)||ee(o.startState)!=ee(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let l=new bt;for(let a of o.viewportLineBlocks){let h=ys(o.state,a.from,a.to)?i:Ss(o.state,a.from,a.to)?t:null;h&&l.add(a.from,a.from,h)}return l.finish()}}),{domEventHandlers:r}=e;return[s,xm({class:"cm-foldGutter",markers(o){var l;return((l=o.plugin(s))===null||l===void 0?void 0:l.markers)||B.empty},initialSpacer(){return new hr(e,!1)},domEventHandlers:Object.assign(Object.assign({},r),{click:(o,l,a)=>{if(r.click&&r.click(o,l,a))return!0;let h=ys(o.state,l.from,l.to);if(h)return o.dispatch({effects:gn.of(h)}),!0;let c=Ss(o.state,l.from,l.to);return c?(o.dispatch({effects:js.of(c)}),!0):!1}})}),Df()]}const vg=v.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class bn{constructor(e,t){this.specs=e;let i;function s(l){let a=Zt.newName();return(i||(i=Object.create(null)))["."+a]=l,a}const r=typeof t.all=="string"?t.all:t.all?s(t.all):void 0,o=t.scope;this.scope=o instanceof ze?l=>l.prop(ei)==o.data:o?l=>l==o:void 0,this.style=Zf(e.map(l=>({tag:l.tag,class:l.class||s(Object.assign({},l,{tag:null}))})),{all:r}).style,this.module=i?new Zt(i):null,this.themeType=t.themeType}static define(e,t){return new bn(e,t||{})}}const mo=C.define(),Lf=C.define({combine(n){return n.length?[n[0]]:null}});function cr(n){let e=n.facet(mo);return e.length?e:n.facet(Lf)}function jf(n,e){let t=[Cg],i;return n instanceof bn&&(n.module&&t.push(v.styleModule.of(n.module)),i=n.themeType),e?.fallback?t.push(Lf.of(n)):i?t.push(mo.computeN([v.darkTheme],s=>s.facet(v.darkTheme)==(i=="dark")?[n]:[])):t.push(mo.of(n)),t}class Zg{constructor(e){this.markCache=Object.create(null),this.tree=ee(e.state),this.decorations=this.buildDeco(e,cr(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=ee(e.state),i=cr(e.state),s=i!=cr(e.startState),{viewport:r}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length=r.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||s)&&(this.tree=t,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=r.to)}buildDeco(e,t){if(!t||!this.tree.length)return A.none;let i=new bt;for(let{from:s,to:r}of e.visibleRanges)Km(this.tree,t,(o,l,a)=>{i.add(o,l,this.markCache[a]||(this.markCache[a]=A.mark({class:a})))},s,r);return i.finish()}}const Cg=Xt.high(ie.fromClass(Zg,{decorations:n=>n.decorations})),Tg=bn.define([{tag:p.meta,color:"#404740"},{tag:p.link,textDecoration:"underline"},{tag:p.heading,textDecoration:"underline",fontWeight:"bold"},{tag:p.emphasis,fontStyle:"italic"},{tag:p.strong,fontWeight:"bold"},{tag:p.strikethrough,textDecoration:"line-through"},{tag:p.keyword,color:"#708"},{tag:[p.atom,p.bool,p.url,p.contentSeparator,p.labelName],color:"#219"},{tag:[p.literal,p.inserted],color:"#164"},{tag:[p.string,p.deleted],color:"#a11"},{tag:[p.regexp,p.escape,p.special(p.string)],color:"#e40"},{tag:p.definition(p.variableName),color:"#00f"},{tag:p.local(p.variableName),color:"#30a"},{tag:[p.typeName,p.namespace],color:"#085"},{tag:p.className,color:"#167"},{tag:[p.special(p.variableName),p.macroName],color:"#256"},{tag:p.definition(p.propertyName),color:"#00c"},{tag:p.comment,color:"#940"},{tag:p.invalid,color:"#f00"}]),Rg=v.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),_f=1e4,Bf="()[]{}",Yf=C.define({combine(n){return ct(n,{afterCursor:!0,brackets:Bf,maxScanDistance:_f,renderMatch:Mg})}}),Ag=A.mark({class:"cm-matchingBracket"}),Xg=A.mark({class:"cm-nonmatchingBracket"});function Mg(n){let e=[],t=n.matched?Ag:Xg;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const Vg=ce.define({create(){return A.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],i=e.state.facet(Yf);for(let s of e.state.selection.ranges){if(!s.empty)continue;let r=st(e.state,s.head,-1,i)||s.head>0&&st(e.state,s.head-1,1,i)||i.afterCursor&&(st(e.state,s.head,1,i)||s.headv.decorations.from(n)}),qg=[Vg,Rg];function Eg(n={}){return[Yf.of(n),qg]}const zf=new D;function go(n,e,t){let i=n.prop(e<0?D.openedBy:D.closedBy);if(i)return i;if(n.name.length==1){let s=t.indexOf(n.name);if(s>-1&&s%2==(e<0?1:0))return[t[s+e]]}return null}function bo(n){let e=n.type.prop(zf);return e?e(n.node):n}function st(n,e,t,i={}){let s=i.maxScanDistance||_f,r=i.brackets||Bf,o=ee(n),l=o.resolveInner(e,t);for(let a=l;a;a=a.parent){let h=go(a.type,t,r);if(h&&a.from0?e>=c.from&&ec.from&&e<=c.to))return Dg(n,e,t,a,c,h,r)}}return Wg(n,e,t,o,l.type,s,r)}function Dg(n,e,t,i,s,r,o){let l=i.parent,a={from:s.from,to:s.to},h=0,c=l?.cursor();if(c&&(t<0?c.childBefore(i.from):c.childAfter(i.to)))do if(t<0?c.to<=i.from:c.from>=i.to){if(h==0&&r.indexOf(c.type.name)>-1&&c.from0)return null;let h={from:t<0?e-1:e,to:t>0?e+1:e},c=n.doc.iterRange(e,t>0?n.doc.length:0),f=0;for(let u=0;!c.next().done&&u<=r;){let d=c.value;t<0&&(u+=d.length);let O=e+u*t;for(let m=t>0?0:d.length-1,g=t>0?d.length:-1;m!=g;m+=t){let b=o.indexOf(d[m]);if(!(b<0||i.resolveInner(O+m,1).type!=s))if(b%2==0==t>0)f++;else{if(f==1)return{start:h,end:{from:O+m,to:O+m+1},matched:b>>1==a>>1};f--}}t>0&&(u+=d.length)}return c.done?{start:h,matched:!1}:null}const Lg=Object.create(null),Da=[Pe.none],Wa=[],La=Object.create(null),jg=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])jg[n]=_g(Lg,e);function fr(n,e){Wa.indexOf(n)>-1||(Wa.push(n),console.warn(e))}function _g(n,e){let t=[];for(let l of e.split(" ")){let a=[];for(let h of l.split(".")){let c=n[h]||p[h];c?typeof c=="function"?a.length?a=a.map(c):fr(h,`Modifier ${h} used at start of tag`):a.length?fr(h,`Tag ${h} used as modifier`):a=Array.isArray(c)?c:[c]:fr(h,`Unknown highlighting tag ${h}`)}for(let h of a)t.push(h)}if(!t.length)return 0;let i=e.replace(/ /g,"_"),s=i+" "+t.map(l=>l.id),r=La[s];if(r)return r.id;let o=La[s]=Pe.define({id:Da.length,name:i,props:[dn({[i]:t})]});return Da.push(o),o.id}H.RTL,H.LTR;const Bg=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),i=tl(n.state,t.from);return i.line?Yg(n):i.block?Ug(n):!1};function el(n,e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let s=n(e,t);return s?(i(t.update(s)),!0):!1}}const Yg=el(Gg,0),zg=el(Uf,0),Ug=el((n,e)=>Uf(n,e,Ng(e)),0);function tl(n,e){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const Zi=50;function Ig(n,{open:e,close:t},i,s){let r=n.sliceDoc(i-Zi,i),o=n.sliceDoc(s,s+Zi),l=/\s*$/.exec(r)[0].length,a=/^\s*/.exec(o)[0].length,h=r.length-l;if(r.slice(h-e.length,h)==e&&o.slice(a,a+t.length)==t)return{open:{pos:i-l,margin:l&&1},close:{pos:s+a,margin:a&&1}};let c,f;s-i<=2*Zi?c=f=n.sliceDoc(i,s):(c=n.sliceDoc(i,i+Zi),f=n.sliceDoc(s-Zi,s));let u=/^\s*/.exec(c)[0].length,d=/\s*$/.exec(f)[0].length,O=f.length-d-t.length;return c.slice(u,u+e.length)==e&&f.slice(O,O+t.length)==t?{open:{pos:i+u+e.length,margin:/\s/.test(c.charAt(u+e.length))?1:0},close:{pos:s-d-t.length,margin:/\s/.test(f.charAt(O-1))?1:0}}:null}function Ng(n){let e=[];for(let t of n.selection.ranges){let i=n.doc.lineAt(t.from),s=t.to<=i.to?i:n.doc.lineAt(t.to);s.from>i.from&&s.from==t.to&&(s=t.to==i.to+1?i:n.doc.lineAt(t.to-1));let r=e.length-1;r>=0&&e[r].to>i.from?e[r].to=s.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:s.to})}return e}function Uf(n,e,t=e.selection.ranges){let i=t.map(r=>tl(e,r.from).block);if(!i.every(r=>r))return null;let s=t.map((r,o)=>Ig(e,i[o],r.from,r.to));if(n!=2&&!s.every(r=>r))return{changes:e.changes(t.map((r,o)=>s[o]?[]:[{from:r.from,insert:i[o].open+" "},{from:r.to,insert:" "+i[o].close}]))};if(n!=1&&s.some(r=>r)){let r=[];for(let o=0,l;os&&(r==o||o>f.from)){s=f.from;let u=/^\s*/.exec(f.text)[0].length,d=u==f.length,O=f.text.slice(u,u+h.length)==h?u:-1;ur.comment<0&&(!r.empty||r.single))){let r=[];for(let{line:l,token:a,indent:h,empty:c,single:f}of i)(f||!c)&&r.push({from:l.from+h,insert:a+" "});let o=e.changes(r);return{changes:o,selection:e.selection.map(o,1)}}else if(n!=1&&i.some(r=>r.comment>=0)){let r=[];for(let{line:o,comment:l,token:a}of i)if(l>=0){let h=o.from+l,c=h+a.length;o.text[c-o.from]==" "&&c++,r.push({from:h,to:c})}return{changes:r}}return null}const So=ht.define(),Fg=ht.define(),Hg=C.define(),If=C.define({combine(n){return ct(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(i,s)=>e(i,s)||t(i,s)})}}),Nf=ce.define({create(){return rt.empty},update(n,e){let t=e.state.facet(If),i=e.annotation(So);if(i){let a=Re.fromTransaction(e,i.selection),h=i.side,c=h==0?n.undone:n.done;return a?c=Qs(c,c.length,t.minDepth,a):c=Hf(c,e.startState.selection),new rt(h==0?i.rest:c,h==0?c:i.rest)}let s=e.annotation(Fg);if((s=="full"||s=="before")&&(n=n.isolate()),e.annotation(re.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let r=Re.fromTransaction(e),o=e.annotation(re.time),l=e.annotation(re.userEvent);return r?n=n.addChanges(r,o,l,t,e):e.selection&&(n=n.addSelection(e.startState.selection,o,l,t.newGroupDelay)),(s=="full"||s=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new rt(n.done.map(Re.fromJSON),n.undone.map(Re.fromJSON))}});function Kg(n={}){return[Nf,If.of(n),v.domEventHandlers({beforeinput(e,t){let i=e.inputType=="historyUndo"?Gf:e.inputType=="historyRedo"?yo:null;return i?(e.preventDefault(),i(t)):!1}})]}function _s(n,e){return function({state:t,dispatch:i}){if(!e&&t.readOnly)return!1;let s=t.field(Nf,!1);if(!s)return!1;let r=s.pop(n,t,e);return r?(i(r),!0):!1}}const Gf=_s(0,!1),yo=_s(1,!1),Jg=_s(0,!0),e0=_s(1,!0);class Re{constructor(e,t,i,s,r){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=s,this.selectionsAfter=r}setSelAfter(e){return new Re(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(s=>s.toJSON())}}static fromJSON(e){return new Re(e.changes&&le.fromJSON(e.changes),[],e.mapped&&ot.fromJSON(e.mapped),e.startSelection&&y.fromJSON(e.startSelection),e.selectionsAfter.map(y.fromJSON))}static fromTransaction(e,t){let i=We;for(let s of e.startState.facet(Hg)){let r=s(e);r.length&&(i=i.concat(r))}return!i.length&&e.changes.empty?null:new Re(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,We)}static selection(e){return new Re(void 0,We,void 0,void 0,e)}}function Qs(n,e,t,i){let s=e+1>t+20?e-t-1:0,r=n.slice(s,e);return r.push(i),r}function t0(n,e){let t=[],i=!1;return n.iterChangedRanges((s,r)=>t.push(s,r)),e.iterChangedRanges((s,r,o,l)=>{for(let a=0;a=h&&o<=c&&(i=!0)}}),i}function i0(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,i)=>t.empty!=e.ranges[i].empty).length===0}function Ff(n,e){return n.length?e.length?n.concat(e):n:e}const We=[],n0=200;function Hf(n,e){if(n.length){let t=n[n.length-1],i=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-n0));return i.length&&i[i.length-1].eq(e)?n:(i.push(e),Qs(n,n.length-1,1e9,t.setSelAfter(i)))}else return[Re.selection([e])]}function s0(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function ur(n,e){if(!n.length)return n;let t=n.length,i=We;for(;t;){let s=r0(n[t-1],e,i);if(s.changes&&!s.changes.empty||s.effects.length){let r=n.slice(0,t);return r[t-1]=s,r}else e=s.mapped,t--,i=s.selectionsAfter}return i.length?[Re.selection(i)]:We}function r0(n,e,t){let i=Ff(n.selectionsAfter.length?n.selectionsAfter.map(l=>l.map(e)):We,t);if(!n.changes)return Re.selection(i);let s=n.changes.map(e),r=e.mapDesc(n.changes,!0),o=n.mapped?n.mapped.composeDesc(r):r;return new Re(s,V.mapEffects(n.effects,e),o,n.startSelection.map(r),i)}const o0=/^(input\.type|delete)($|\.)/;class rt{constructor(e,t,i=0,s=void 0){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=s}isolate(){return this.prevTime?new rt(this.done,this.undone):this}addChanges(e,t,i,s,r){let o=this.done,l=o[o.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!i||o0.test(i))&&(!l.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):Bs(t,e))}function Qe(n){return n.textDirectionAt(n.state.selection.main.head)==H.LTR}const Jf=n=>Kf(n,!Qe(n)),eu=n=>Kf(n,Qe(n));function tu(n,e){return Ne(n,t=>t.empty?n.moveByGroup(t,e):Bs(t,e))}const a0=n=>tu(n,!Qe(n)),h0=n=>tu(n,Qe(n));function c0(n,e,t){if(e.type.prop(t))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Ys(n,e,t){let i=ee(n).resolveInner(e.head),s=t?D.closedBy:D.openedBy;for(let a=e.head;;){let h=t?i.childAfter(a):i.childBefore(a);if(!h)break;c0(n,h,s)?i=h:a=t?h.to:h.from}let r=i.type.prop(s),o,l;return r&&(o=t?st(n,i.from,1):st(n,i.to,-1))&&o.matched?l=t?o.end.to:o.end.from:l=t?i.to:i.from,y.cursor(l,t?-1:1)}const f0=n=>Ne(n,e=>Ys(n.state,e,!Qe(n))),u0=n=>Ne(n,e=>Ys(n.state,e,Qe(n)));function iu(n,e){return Ne(n,t=>{if(!t.empty)return Bs(t,e);let i=n.moveVertically(t,e);return i.head!=t.head?i:n.moveToLineBoundary(t,e)})}const nu=n=>iu(n,!1),su=n=>iu(n,!0);function ru(n){let e=n.scrollDOM.clientHeighto.empty?n.moveVertically(o,e,t.height):Bs(o,e));if(s.eq(i.selection))return!1;let r;if(t.selfScroll){let o=n.coordsAtPos(i.selection.main.head),l=n.scrollDOM.getBoundingClientRect(),a=l.top+t.marginTop,h=l.bottom-t.marginBottom;o&&o.top>a&&o.bottomou(n,!1),Qo=n=>ou(n,!0);function Mt(n,e,t){let i=n.lineBlockAt(e.head),s=n.moveToLineBoundary(e,t);if(s.head==e.head&&s.head!=(t?i.to:i.from)&&(s=n.moveToLineBoundary(e,t,!1)),!t&&s.head==i.from&&i.length){let r=/^\s*/.exec(n.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;r&&e.head!=i.from+r&&(s=y.cursor(i.from+r))}return s}const d0=n=>Ne(n,e=>Mt(n,e,!0)),O0=n=>Ne(n,e=>Mt(n,e,!1)),p0=n=>Ne(n,e=>Mt(n,e,!Qe(n))),m0=n=>Ne(n,e=>Mt(n,e,Qe(n))),g0=n=>Ne(n,e=>y.cursor(n.lineBlockAt(e.head).from,1)),b0=n=>Ne(n,e=>y.cursor(n.lineBlockAt(e.head).to,-1));function S0(n,e,t){let i=!1,s=yi(n.selection,r=>{let o=st(n,r.head,-1)||st(n,r.head,1)||r.head>0&&st(n,r.head-1,1)||r.headS0(n,e);function Be(n,e){let t=yi(n.state.selection,i=>{let s=e(i);return y.range(i.anchor,s.head,s.goalColumn,s.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(ut(n.state,t)),!0)}function lu(n,e){return Be(n,t=>n.moveByChar(t,e))}const au=n=>lu(n,!Qe(n)),hu=n=>lu(n,Qe(n));function cu(n,e){return Be(n,t=>n.moveByGroup(t,e))}const Q0=n=>cu(n,!Qe(n)),x0=n=>cu(n,Qe(n)),w0=n=>Be(n,e=>Ys(n.state,e,!Qe(n))),k0=n=>Be(n,e=>Ys(n.state,e,Qe(n)));function fu(n,e){return Be(n,t=>n.moveVertically(t,e))}const uu=n=>fu(n,!1),du=n=>fu(n,!0);function Ou(n,e){return Be(n,t=>n.moveVertically(t,e,ru(n).height))}const _a=n=>Ou(n,!1),Ba=n=>Ou(n,!0),P0=n=>Be(n,e=>Mt(n,e,!0)),$0=n=>Be(n,e=>Mt(n,e,!1)),v0=n=>Be(n,e=>Mt(n,e,!Qe(n))),Z0=n=>Be(n,e=>Mt(n,e,Qe(n))),C0=n=>Be(n,e=>y.cursor(n.lineBlockAt(e.head).from)),T0=n=>Be(n,e=>y.cursor(n.lineBlockAt(e.head).to)),Ya=({state:n,dispatch:e})=>(e(ut(n,{anchor:0})),!0),za=({state:n,dispatch:e})=>(e(ut(n,{anchor:n.doc.length})),!0),Ua=({state:n,dispatch:e})=>(e(ut(n,{anchor:n.selection.main.anchor,head:0})),!0),Ia=({state:n,dispatch:e})=>(e(ut(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),R0=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),A0=({state:n,dispatch:e})=>{let t=zs(n).map(({from:i,to:s})=>y.range(i,Math.min(s+1,n.doc.length)));return e(n.update({selection:y.create(t),userEvent:"select"})),!0},X0=({state:n,dispatch:e})=>{let t=yi(n.selection,i=>{let s=ee(n),r=s.resolveStack(i.from,1);if(i.empty){let o=s.resolveStack(i.from,-1);o.node.from>=r.node.from&&o.node.to<=r.node.to&&(r=o)}for(let o=r;o;o=o.next){let{node:l}=o;if((l.from=i.to||l.to>i.to&&l.from<=i.from)&&o.next)return y.range(l.to,l.from)}return i});return t.eq(n.selection)?!1:(e(ut(n,t)),!0)},M0=({state:n,dispatch:e})=>{let t=n.selection,i=null;return t.ranges.length>1?i=y.create([t.main]):t.main.empty||(i=y.create([y.cursor(t.main.head)])),i?(e(ut(n,i)),!0):!1};function Sn(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:i}=n,s=i.changeByRange(r=>{let{from:o,to:l}=r;if(o==l){let a=e(r);ao&&(t="delete.forward",a=jn(n,a,!0)),o=Math.min(o,a),l=Math.max(l,a)}else o=jn(n,o,!1),l=jn(n,l,!0);return o==l?{range:r}:{changes:{from:o,to:l},range:y.cursor(o,os(n)))i.between(e,e,(s,r)=>{se&&(e=t?r:s)});return e}const pu=(n,e,t)=>Sn(n,i=>{let s=i.from,{state:r}=n,o=r.doc.lineAt(s),l,a;if(t&&!e&&s>o.from&&spu(n,!1,!0),mu=n=>pu(n,!0,!1),gu=(n,e)=>Sn(n,t=>{let i=t.head,{state:s}=n,r=s.doc.lineAt(i),o=s.charCategorizer(i);for(let l=null;;){if(i==(e?r.to:r.from)){i==t.head&&r.number!=(e?s.doc.lines:1)&&(i+=e?1:-1);break}let a=pe(r.text,i-r.from,e)+r.from,h=r.text.slice(Math.min(i,a)-r.from,Math.max(i,a)-r.from),c=o(h);if(l!=null&&c!=l)break;(h!=" "||i!=t.head)&&(l=c),i=a}return i}),bu=n=>gu(n,!1),V0=n=>gu(n,!0),q0=n=>Sn(n,e=>{let t=n.lineBlockAt(e.head).to;return e.headSn(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),D0=n=>Sn(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head{if(n.readOnly)return!1;let t=n.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:_.of(["",""])},range:y.cursor(i.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},L0=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>{if(!i.empty||i.from==0||i.from==n.doc.length)return{range:i};let s=i.from,r=n.doc.lineAt(s),o=s==r.from?s-1:pe(r.text,s-r.from,!1)+r.from,l=s==r.to?s+1:pe(r.text,s-r.from,!0)+r.from;return{changes:{from:o,to:l,insert:n.doc.slice(s,l).append(n.doc.slice(o,s))},range:y.cursor(l)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function zs(n){let e=[],t=-1;for(let i of n.selection.ranges){let s=n.doc.lineAt(i.from),r=n.doc.lineAt(i.to);if(!i.empty&&i.to==r.from&&(r=n.doc.lineAt(i.to-1)),t>=s.number){let o=e[e.length-1];o.to=r.to,o.ranges.push(i)}else e.push({from:s.from,to:r.to,ranges:[i]});t=r.number+1}return e}function Su(n,e,t){if(n.readOnly)return!1;let i=[],s=[];for(let r of zs(n)){if(t?r.to==n.doc.length:r.from==0)continue;let o=n.doc.lineAt(t?r.to+1:r.from-1),l=o.length+1;if(t){i.push({from:r.to,to:o.to},{from:r.from,insert:o.text+n.lineBreak});for(let a of r.ranges)s.push(y.range(Math.min(n.doc.length,a.anchor+l),Math.min(n.doc.length,a.head+l)))}else{i.push({from:o.from,to:r.from},{from:r.to,insert:n.lineBreak+o.text});for(let a of r.ranges)s.push(y.range(a.anchor-l,a.head-l))}}return i.length?(e(n.update({changes:i,scrollIntoView:!0,selection:y.create(s,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const j0=({state:n,dispatch:e})=>Su(n,e,!1),_0=({state:n,dispatch:e})=>Su(n,e,!0);function yu(n,e,t){if(n.readOnly)return!1;let i=[];for(let s of zs(n))t?i.push({from:s.from,insert:n.doc.slice(s.from,s.to)+n.lineBreak}):i.push({from:s.to,insert:n.lineBreak+n.doc.slice(s.from,s.to)});return e(n.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const B0=({state:n,dispatch:e})=>yu(n,e,!1),Y0=({state:n,dispatch:e})=>yu(n,e,!0),z0=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(zs(e).map(({from:s,to:r})=>(s>0?s--:r{let r;if(n.lineWrapping){let o=n.lineBlockAt(s.head),l=n.coordsAtPos(s.head,s.assoc||1);l&&(r=o.bottom+n.documentTop-l.bottom+n.defaultLineHeight/2)}return n.moveVertically(s,!0,r)}).map(t);return n.dispatch({changes:t,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function U0(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=ee(n).resolveInner(e),i=t.childBefore(e),s=t.childAfter(e),r;return i&&s&&i.to<=e&&s.from>=e&&(r=i.type.prop(D.closedBy))&&r.indexOf(s.name)>-1&&n.doc.lineAt(i.to).from==n.doc.lineAt(s.from).from&&!/\S/.test(n.sliceDoc(i.to,s.from))?{from:i.to,to:s.from}:null}const Na=Qu(!1),I0=Qu(!0);function Qu(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange(s=>{let{from:r,to:o}=s,l=e.doc.lineAt(r),a=!n&&r==o&&U0(e,r);n&&(r=o=(o<=l.to?l:e.doc.lineAt(o)).to);let h=new Ls(e,{simulateBreak:r,simulateDoubleBreak:!!a}),c=Ho(h,r);for(c==null&&(c=Si(/^\s*/.exec(e.doc.lineAt(r).text)[0],e.tabSize));ol.from&&r{let s=[];for(let o=i.from;o<=i.to;){let l=n.doc.lineAt(o);l.number>t&&(i.empty||i.to>l.from)&&(e(l,s,i),t=l.number),o=l.to+1}let r=n.changes(s);return{changes:s,range:y.range(r.mapPos(i.anchor,1),r.mapPos(i.head,1))}})}const N0=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),i=new Ls(n,{overrideIndentation:r=>{let o=t[r];return o??-1}}),s=il(n,(r,o,l)=>{let a=Ho(i,r.from);if(a==null)return;/\S/.test(r.text)||(a=0);let h=/^\s*/.exec(r.text)[0],c=Ji(n,a);(h!=c||l.fromn.readOnly?!1:(e(n.update(il(n,(t,i)=>{i.push({from:t.from,insert:n.facet(On)})}),{userEvent:"input.indent"})),!0),wu=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(il(n,(t,i)=>{let s=/^\s*/.exec(t.text)[0];if(!s)return;let r=Si(s,n.tabSize),o=0,l=Ji(n,Math.max(0,r-bs(n)));for(;o(n.setTabFocusMode(),!0),F0=[{key:"Ctrl-b",run:Jf,shift:au,preventDefault:!0},{key:"Ctrl-f",run:eu,shift:hu},{key:"Ctrl-p",run:nu,shift:uu},{key:"Ctrl-n",run:su,shift:du},{key:"Ctrl-a",run:g0,shift:C0},{key:"Ctrl-e",run:b0,shift:T0},{key:"Ctrl-d",run:mu},{key:"Ctrl-h",run:xo},{key:"Ctrl-k",run:q0},{key:"Ctrl-Alt-h",run:bu},{key:"Ctrl-o",run:W0},{key:"Ctrl-t",run:L0},{key:"Ctrl-v",run:Qo}],H0=[{key:"ArrowLeft",run:Jf,shift:au,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:a0,shift:Q0,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:p0,shift:v0,preventDefault:!0},{key:"ArrowRight",run:eu,shift:hu,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:h0,shift:x0,preventDefault:!0},{mac:"Cmd-ArrowRight",run:m0,shift:Z0,preventDefault:!0},{key:"ArrowUp",run:nu,shift:uu,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Ya,shift:Ua},{mac:"Ctrl-ArrowUp",run:ja,shift:_a},{key:"ArrowDown",run:su,shift:du,preventDefault:!0},{mac:"Cmd-ArrowDown",run:za,shift:Ia},{mac:"Ctrl-ArrowDown",run:Qo,shift:Ba},{key:"PageUp",run:ja,shift:_a},{key:"PageDown",run:Qo,shift:Ba},{key:"Home",run:O0,shift:$0,preventDefault:!0},{key:"Mod-Home",run:Ya,shift:Ua},{key:"End",run:d0,shift:P0,preventDefault:!0},{key:"Mod-End",run:za,shift:Ia},{key:"Enter",run:Na,shift:Na},{key:"Mod-a",run:R0},{key:"Backspace",run:xo,shift:xo},{key:"Delete",run:mu},{key:"Mod-Backspace",mac:"Alt-Backspace",run:bu},{key:"Mod-Delete",mac:"Alt-Delete",run:V0},{mac:"Mod-Backspace",run:E0},{mac:"Mod-Delete",run:D0}].concat(F0.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),K0=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:f0,shift:w0},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:u0,shift:k0},{key:"Alt-ArrowUp",run:j0},{key:"Shift-Alt-ArrowUp",run:B0},{key:"Alt-ArrowDown",run:_0},{key:"Shift-Alt-ArrowDown",run:Y0},{key:"Escape",run:M0},{key:"Mod-Enter",run:I0},{key:"Alt-l",mac:"Ctrl-l",run:A0},{key:"Mod-i",run:X0,preventDefault:!0},{key:"Mod-[",run:wu},{key:"Mod-]",run:xu},{key:"Mod-Alt-\\",run:N0},{key:"Shift-Mod-k",run:z0},{key:"Shift-Mod-\\",run:y0},{key:"Mod-/",run:Bg},{key:"Alt-A",run:zg},{key:"Ctrl-m",mac:"Shift-Alt-m",run:G0}].concat(H0),J0={key:"Tab",run:xu,shift:wu};function U(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=t[i];typeof s=="string"?n.setAttribute(i,s):s!=null&&(n[i]=s)}e++}for(;en.normalize("NFKD"):n=>n;class pi{constructor(e,t,i=0,s=e.length,r,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,s),this.bufferStart=i,this.normalize=r?l=>r(Ga(l)):Ga,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ve(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=To(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=tt(e);let s=this.normalize(t);if(s.length)for(let r=0,o=i;;r++){let l=s.charCodeAt(r),a=this.match(l,o,this.bufferPos+this.bufferStart);if(r==s.length-1){if(a)return this.value=a,this;break}o==i&&rthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let i=this.curLineStart+t.index,s=i+t[0].length;if(this.matchPos=xs(this.text,s+(i==s?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,s,t)))return this.value={from:i,to:s,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||s.to<=t){let l=new oi(t,e.sliceString(t,i));return dr.set(e,l),l}if(s.from==t&&s.to==i)return s;let{text:r,from:o}=s;return o>t&&(r=e.sliceString(t,o)+r,o=t),s.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let i=this.flat.from+t.index,s=i+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,s,t)))return this.value={from:i,to:s,match:t},this.matchPos=xs(this.text,s+(i==s?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=oi.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&($u.prototype[Symbol.iterator]=vu.prototype[Symbol.iterator]=function(){return this});function eb(n){try{return new RegExp(n,nl),!0}catch{return!1}}function xs(n,e){if(e>=n.length)return e;let t=n.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function wo(n){let e=String(n.state.doc.lineAt(n.state.selection.main.head).number),t=U("input",{class:"cm-textfield",name:"line",value:e}),i=U("form",{class:"cm-gotoLine",onkeydown:r=>{r.keyCode==27?(r.preventDefault(),n.dispatch({effects:_i.of(!1)}),n.focus()):r.keyCode==13&&(r.preventDefault(),s())},onsubmit:r=>{r.preventDefault(),s()}},U("label",n.state.phrase("Go to line"),": ",t)," ",U("button",{class:"cm-button",type:"submit"},n.state.phrase("go")),U("button",{name:"close",onclick:()=>{n.dispatch({effects:_i.of(!1)}),n.focus()},"aria-label":n.state.phrase("close"),type:"button"},["×"]));function s(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!r)return;let{state:o}=n,l=o.doc.lineAt(o.selection.main.head),[,a,h,c,f]=r,u=c?+c.slice(1):0,d=h?+h:l.number;if(h&&f){let g=d/100;a&&(g=g*(a=="-"?-1:1)+l.number/o.doc.lines),d=Math.round(o.doc.lines*g)}else h&&a&&(d=d*(a=="-"?-1:1)+l.number);let O=o.doc.line(Math.max(1,Math.min(o.doc.lines,d))),m=y.cursor(O.from+Math.max(0,Math.min(u,O.length)));n.dispatch({effects:[_i.of(!1),v.scrollIntoView(m.from,{y:"center"})],selection:m}),n.focus()}return{dom:i}}const _i=V.define(),Fa=ce.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(_i)&&(n=t.value);return n},provide:n=>Fi.from(n,e=>e?wo:null)}),tb=n=>{let e=Gi(n,wo);if(!e){let t=[_i.of(!0)];n.state.field(Fa,!1)==null&&t.push(V.appendConfig.of([Fa,ib])),n.dispatch({effects:t}),e=Gi(n,wo)}return e&&e.dom.querySelector("input").select(),!0},ib=v.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),nb={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},sb=C.define({combine(n){return ct(n,nb,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function rb(n){return[cb,hb]}const ob=A.mark({class:"cm-selectionMatch"}),lb=A.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Ha(n,e,t,i){return(t==0||n(e.sliceDoc(t-1,t))!=K.Word)&&(i==e.doc.length||n(e.sliceDoc(i,i+1))!=K.Word)}function ab(n,e,t,i){return n(e.sliceDoc(t,t+1))==K.Word&&n(e.sliceDoc(i-1,i))==K.Word}const hb=ie.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(sb),{state:t}=n,i=t.selection;if(i.ranges.length>1)return A.none;let s=i.main,r,o=null;if(s.empty){if(!e.highlightWordAroundCursor)return A.none;let a=t.wordAt(s.head);if(!a)return A.none;o=t.charCategorizer(s.head),r=t.sliceDoc(a.from,a.to)}else{let a=s.to-s.from;if(a200)return A.none;if(e.wholeWords){if(r=t.sliceDoc(s.from,s.to),o=t.charCategorizer(s.head),!(Ha(o,t,s.from,s.to)&&ab(o,t,s.from,s.to)))return A.none}else if(r=t.sliceDoc(s.from,s.to),!r)return A.none}let l=[];for(let a of n.visibleRanges){let h=new pi(t.doc,r,a.from,a.to);for(;!h.next().done;){let{from:c,to:f}=h.value;if((!o||Ha(o,t,c,f))&&(s.empty&&c<=s.from&&f>=s.to?l.push(lb.range(c,f)):(c>=s.to||f<=s.from)&&l.push(ob.range(c,f)),l.length>e.maxMatches))return A.none}}return A.set(l)}},{decorations:n=>n.decorations}),cb=v.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),fb=({state:n,dispatch:e})=>{let{selection:t}=n,i=y.create(t.ranges.map(s=>n.wordAt(s.head)||y.cursor(s.head)),t.mainIndex);return i.eq(t)?!1:(e(n.update({selection:i})),!0)};function ub(n,e){let{main:t,ranges:i}=n.selection,s=n.wordAt(t.head),r=s&&s.from==t.from&&s.to==t.to;for(let o=!1,l=new pi(n.doc,e,i[i.length-1].to);;)if(l.next(),l.done){if(o)return null;l=new pi(n.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(a=>a.from==l.value.from))continue;if(r){let a=n.wordAt(l.value.from);if(!a||a.from!=l.value.from||a.to!=l.value.to)continue}return l.value}}const db=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(r=>r.from===r.to))return fb({state:n,dispatch:e});let i=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(r=>n.sliceDoc(r.from,r.to)!=i))return!1;let s=ub(n,i);return s?(e(n.update({selection:n.selection.addRange(y.range(s.from,s.to),!1),effects:v.scrollIntoView(s.to)})),!0):!1},Qi=C.define({combine(n){return ct(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Pb(e),scrollToMatch:e=>v.scrollIntoView(e)})}});class Zu{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||eb(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,i)=>i=="n"?` +`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new gb(this):new pb(this)}getCursor(e,t=0,i){let s=e.doc?e:j.create({doc:e});return i==null&&(i=s.doc.length),this.regexp?Kt(this,s,t,i):Ht(this,s,t,i)}}class Cu{constructor(e){this.spec=e}}function Ht(n,e,t,i){return new pi(e.doc,n.unquoted,t,i,n.caseSensitive?void 0:s=>s.toLowerCase(),n.wholeWord?Ob(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function Ob(n,e){return(t,i,s,r)=>((r>t||r+s.length=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Ht(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function Kt(n,e,t,i){return new $u(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?mb(e.charCategorizer(e.selection.main.head)):void 0},t,i)}function ws(n,e){return n.slice(pe(n,e,!1),e)}function ks(n,e){return n.slice(e,pe(n,e))}function mb(n){return(e,t,i)=>!i[0].length||(n(ws(i.input,i.index))!=K.Word||n(ks(i.input,i.index))!=K.Word)&&(n(ks(i.input,i.index+i[0].length))!=K.Word||n(ws(i.input,i.index+i[0].length))!=K.Word)}class gb extends Cu{nextMatch(e,t,i){let s=Kt(this.spec,e,i,e.doc.length).next();return s.done&&(s=Kt(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=1;;s++){let r=Math.max(t,i-s*1e4),o=Kt(this.spec,e,r,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(r==t||l.from>r+10))return l;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,i)=>{if(i=="&")return e.match[0];if(i=="$")return"$";for(let s=i.length;s>0;s--){let r=+i.slice(0,s);if(r>0&&r=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Kt(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const en=V.define(),sl=V.define(),vt=ce.define({create(n){return new Or(ko(n).create(),null)},update(n,e){for(let t of e.effects)t.is(en)?n=new Or(t.value.create(),n.panel):t.is(sl)&&(n=new Or(n.query,t.value?rl:null));return n},provide:n=>Fi.from(n,e=>e.panel)});class Or{constructor(e,t){this.query=e,this.panel=t}}const bb=A.mark({class:"cm-searchMatch"}),Sb=A.mark({class:"cm-searchMatch cm-searchMatch-selected"}),yb=ie.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(vt))}update(n){let e=n.state.field(vt);(e!=n.startState.field(vt)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return A.none;let{view:t}=this,i=new bt;for(let s=0,r=t.visibleRanges,o=r.length;sr[s+1].from-2*250;)a=r[++s].to;n.highlight(t.state,l,a,(h,c)=>{let f=t.state.selection.ranges.some(u=>u.from==h&&u.to==c);i.add(h,c,f?Sb:bb)})}return i.finish()}},{decorations:n=>n.decorations});function yn(n){return e=>{let t=e.state.field(vt,!1);return t&&t.query.spec.valid?n(e,t):Au(e)}}const Ps=yn((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state,t,t);if(!i)return!1;let s=y.single(i.from,i.to),r=n.state.facet(Qi);return n.dispatch({selection:s,effects:[ol(n,i),r.scrollToMatch(s.main,n)],userEvent:"select.search"}),Ru(n),!0}),$s=yn((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,s=e.prevMatch(t,i,i);if(!s)return!1;let r=y.single(s.from,s.to),o=n.state.facet(Qi);return n.dispatch({selection:r,effects:[ol(n,s),o.scrollToMatch(r.main,n)],userEvent:"select.search"}),Ru(n),!0}),Qb=yn((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:y.create(t.map(i=>y.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),xb=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:i,to:s}=t.main,r=[],o=0;for(let l=new pi(n.doc,n.sliceDoc(i,s));!l.next().done;){if(r.length>1e3)return!1;l.value.from==i&&(o=r.length),r.push(y.range(l.value.from,l.value.to))}return e(n.update({selection:y.create(r,o),userEvent:"select.search.matches"})),!0},Ka=yn((n,{query:e})=>{let{state:t}=n,{from:i,to:s}=t.selection.main;if(t.readOnly)return!1;let r=e.nextMatch(t,i,i);if(!r)return!1;let o=r,l=[],a,h,c=[];if(o.from==i&&o.to==s&&(h=t.toText(e.getReplacement(o)),l.push({from:o.from,to:o.to,insert:h}),o=e.nextMatch(t,o.from,o.to),c.push(v.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(i).number)+"."))),o){let f=l.length==0||l[0].from>=r.to?0:r.to-r.from-h.length;a=y.single(o.from-f,o.to-f),c.push(ol(n,o)),c.push(t.facet(Qi).scrollToMatch(a.main,n))}return n.dispatch({changes:l,selection:a,effects:c,userEvent:"input.replace"}),!0}),wb=yn((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(s=>{let{from:r,to:o}=s;return{from:r,to:o,insert:e.getReplacement(s)}});if(!t.length)return!1;let i=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:v.announce.of(i),userEvent:"input.replace.all"}),!0});function rl(n){return n.state.facet(Qi).createPanel(n)}function ko(n,e){var t,i,s,r,o;let l=n.selection.main,a=l.empty||l.to>l.from+100?"":n.sliceDoc(l.from,l.to);if(e&&!a)return e;let h=n.facet(Qi);return new Zu({search:((t=e?.literal)!==null&&t!==void 0?t:h.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:(i=e?.caseSensitive)!==null&&i!==void 0?i:h.caseSensitive,literal:(s=e?.literal)!==null&&s!==void 0?s:h.literal,regexp:(r=e?.regexp)!==null&&r!==void 0?r:h.regexp,wholeWord:(o=e?.wholeWord)!==null&&o!==void 0?o:h.wholeWord})}function Tu(n){let e=Gi(n,rl);return e&&e.dom.querySelector("[main-field]")}function Ru(n){let e=Tu(n);e&&e==n.root.activeElement&&e.select()}const Au=n=>{let e=n.state.field(vt,!1);if(e&&e.panel){let t=Tu(n);if(t&&t!=n.root.activeElement){let i=ko(n.state,e.query.spec);i.valid&&n.dispatch({effects:en.of(i)}),t.focus(),t.select()}}else n.dispatch({effects:[sl.of(!0),e?en.of(ko(n.state,e.query.spec)):V.appendConfig.of(vb)]});return!0},Xu=n=>{let e=n.state.field(vt,!1);if(!e||!e.panel)return!1;let t=Gi(n,rl);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:sl.of(!1)}),!0},kb=[{key:"Mod-f",run:Au,scope:"editor search-panel"},{key:"F3",run:Ps,shift:$s,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Ps,shift:$s,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Xu,scope:"editor search-panel"},{key:"Mod-Shift-l",run:xb},{key:"Mod-Alt-g",run:tb},{key:"Mod-d",run:db,preventDefault:!0}];class Pb{constructor(e){this.view=e;let t=this.query=e.state.field(vt).query.spec;this.commit=this.commit.bind(this),this.searchField=U("input",{value:t.search,placeholder:Ae(e,"Find"),"aria-label":Ae(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=U("input",{value:t.replace,placeholder:Ae(e,"Replace"),"aria-label":Ae(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=U("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=U("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=U("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function i(s,r,o){return U("button",{class:"cm-button",name:s,onclick:r,type:"button"},o)}this.dom=U("div",{onkeydown:s=>this.keydown(s),class:"cm-search"},[this.searchField,i("next",()=>Ps(e),[Ae(e,"next")]),i("prev",()=>$s(e),[Ae(e,"previous")]),i("select",()=>Qb(e),[Ae(e,"all")]),U("label",null,[this.caseField,Ae(e,"match case")]),U("label",null,[this.reField,Ae(e,"regexp")]),U("label",null,[this.wordField,Ae(e,"by word")]),...e.state.readOnly?[]:[U("br"),this.replaceField,i("replace",()=>Ka(e),[Ae(e,"replace")]),i("replaceAll",()=>wb(e),[Ae(e,"replace all")])],U("button",{name:"close",onclick:()=>Xu(e),"aria-label":Ae(e,"close"),type:"button"},["×"])])}commit(){let e=new Zu({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:en.of(e)}))}keydown(e){Tp(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?$s:Ps)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Ka(this.view))}update(e){for(let t of e.transactions)for(let i of t.effects)i.is(en)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Qi).top}}function Ae(n,e){return n.state.phrase(e)}const _n=30,Bn=/[\s\.,:;?!]/;function ol(n,{from:e,to:t}){let i=n.state.doc.lineAt(e),s=n.state.doc.lineAt(t).to,r=Math.max(i.from,e-_n),o=Math.min(s,t+_n),l=n.state.sliceDoc(r,o);if(r!=i.from){for(let a=0;a<_n;a++)if(!Bn.test(l[a+1])&&Bn.test(l[a])){l=l.slice(a);break}}if(o!=s){for(let a=l.length-1;a>l.length-_n;a--)if(!Bn.test(l[a-1])&&Bn.test(l[a])){l=l.slice(0,a);break}}return v.announce.of(`${n.state.phrase("current match")}. ${l} ${n.state.phrase("on line")} ${i.number}.`)}const $b=v.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),vb=[vt,Xt.low(yb),$b];class Mu{constructor(e,t,i,s){this.state=e,this.pos=t,this.explicit=i,this.view=s,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=ee(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),i=Math.max(t.from,this.pos-250),s=t.text.slice(i-t.from,this.pos-t.from),r=s.search(qu(e,!1));return r<0?null:{from:i+r,to:this.pos,text:s.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,i){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function Ja(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Zb(n){let e=Object.create(null),t=Object.create(null);for(let{label:s}of n){e[s[0]]=!0;for(let r=1;rtypeof s=="string"?{label:s}:s),[t,i]=e.every(s=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:Zb(e);return s=>{let r=s.matchBefore(i);return r||s.explicit?{from:r?r.from:s.pos,options:e,validFor:t}:null}}function Cb(n,e){return t=>{for(let i=ee(t.state).resolveInner(t.pos,-1);i;i=i.parent){if(n.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(t)}}class eh{constructor(e,t,i,s){this.completion=e,this.source=t,this.match=i,this.score=s}}function jt(n){return n.selection.main.from}function qu(n,e){var t;let{source:i}=n,s=e&&i[0]!="^",r=i[i.length-1]!="$";return!s&&!r?n:new RegExp(`${s?"^":""}(?:${i})${r?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const ll=ht.define();function Tb(n,e,t,i){let{main:s}=n.selection,r=t-s.from,o=i-s.from;return Object.assign(Object.assign({},n.changeByRange(l=>{if(l!=s&&t!=i&&n.sliceDoc(l.from+r,l.from+o)!=n.sliceDoc(t,i))return{range:l};let a=n.toText(e);return{changes:{from:l.from+r,to:i==s.from?l.to:l.from+o,insert:a},range:y.cursor(l.from+r+a.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const th=new WeakMap;function Rb(n){if(!Array.isArray(n))return n;let e=th.get(n);return e||th.set(n,e=Vu(n)),e}const vs=V.define(),tn=V.define();class Ab{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&Q<=57||Q>=97&&Q<=122?2:Q>=65&&Q<=90?1:0:(k=To(Q))!=k.toLowerCase()?1:k!=k.toUpperCase()?2:0;(!S||P==1&&g||w==0&&P!=0)&&(t[f]==Q||i[f]==Q&&(u=!0)?o[f++]=S:o.length&&(b=!1)),w=P,S+=tt(Q)}return f==a&&o[0]==0&&b?this.result(-100+(u?-200:0),o,e):d==a&&O==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):d==a?this.ret(-900-e.length,[O,m]):f==a?this.result(-100+(u?-200:0)+-700+(b?0:-1100),o,e):t.length==2?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,t,i){let s=[],r=0;for(let o of t){let l=o+(this.astral?tt(ve(i,o)):1);r&&s[r-1]==o?s[r-1]=l:(s[r++]=o,s[r++]=l)}return this.ret(e-i.length,s)}}class Xb{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Mb,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>i=>ih(e(i),t(i)),optionClass:(e,t)=>i=>ih(e(i),t(i)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function ih(n,e){return n?e?n+" "+e:n:e}function Mb(n,e,t,i,s,r){let o=n.textDirection==H.RTL,l=o,a=!1,h="top",c,f,u=e.left-s.left,d=s.right-e.right,O=i.right-i.left,m=i.bottom-i.top;if(l&&u=m||S>e.top?c=t.bottom-e.top:(h="bottom",c=e.bottom-t.top)}let g=(e.bottom-e.top)/r.offsetHeight,b=(e.right-e.left)/r.offsetWidth;return{style:`${h}: ${c/g}px; max-width: ${f/b}px`,class:"cm-completionInfo-"+(a?o?"left-narrow":"right-narrow":l?"left":"right")}}function Vb(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),t.type&&i.classList.add(...t.type.split(/\s+/g).map(s=>"cm-completionIcon-"+s)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(t,i,s,r){let o=document.createElement("span");o.className="cm-completionLabel";let l=t.displayLabel||t.label,a=0;for(let h=0;ha&&o.appendChild(document.createTextNode(l.slice(a,c)));let u=o.appendChild(document.createElement("span"));u.appendChild(document.createTextNode(l.slice(c,f))),u.className="cm-completionMatchedText",a=f}return at.position-i.position).map(t=>t.render)}function pr(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let s=Math.floor(e/t);return{from:s*t,to:(s+1)*t}}let i=Math.floor((n-e)/t);return{from:n-(i+1)*t,to:n-i*t}}class qb{constructor(e,t,i){this.view=e,this.stateField=t,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:a=>this.placeInfo(a),key:this},this.space=null,this.currentClass="";let s=e.state.field(t),{options:r,selected:o}=s.open,l=e.state.facet(he);this.optionContent=Vb(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=pr(r.length,o,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",a=>{let{options:h}=e.state.field(t).open;for(let c=a.target,f;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(f=/-(\d+)$/.exec(c.id))&&+f[1]{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(he).closeOnBlur&&a.relatedTarget!=e.contentDOM&&e.dispatch({effects:tn.of(null)})}),this.showOptions(r,s.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let i=e.state.field(this.stateField),s=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=s){let{options:r,selected:o,disabled:l}=i.open;(!s.open||s.open.options!=r)&&(this.range=pr(r.length,o,e.state.facet(he).maxRenderedOptions),this.showOptions(r,i.id)),this.updateSel(),l!=((t=s.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of t.split(" "))i&&this.dom.classList.add(i);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=pr(t.options.length,t.selected,this.view.state.facet(he).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:i}=t.options[t.selected],{info:s}=i;if(!s)return;let r=typeof s=="string"?document.createTextNode(s):s(i);if(!r)return;"then"in r?r.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,i)}).catch(o=>Te(this.view.state,o,"completion info")):this.addInfoPane(r,i)}}addInfoPane(e,t){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:s,destroy:r}=e;i.appendChild(s),this.infoDestroy=r||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let i=this.list.firstChild,s=this.range.from;i;i=i.nextSibling,s++)i.nodeName!="LI"||!i.id?s--:s==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),t=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return t&&Db(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),s=e.getBoundingClientRect(),r=this.space;if(!r){let o=this.dom.ownerDocument.documentElement;r={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return s.top>Math.min(r.bottom,t.bottom)-10||s.bottom{o.target==s&&o.preventDefault()});let r=null;for(let o=i.from;oi.from||i.from==0))if(r=u,typeof h!="string"&&h.header)s.appendChild(h.header(h));else{let d=s.appendChild(document.createElement("completion-section"));d.textContent=u}}const c=s.appendChild(document.createElement("li"));c.id=t+"-"+o,c.setAttribute("role","option");let f=this.optionClass(l);f&&(c.className=f);for(let u of this.optionContent){let d=u(l,this.view.state,this.view,a);d&&c.appendChild(d)}}return i.from&&s.classList.add("cm-completionListIncompleteTop"),i.tonew qb(t,n,e)}function Db(n,e){let t=n.getBoundingClientRect(),i=e.getBoundingClientRect(),s=t.height/n.offsetHeight;i.topt.bottom&&(n.scrollTop+=(i.bottom-t.bottom)/s)}function nh(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function Wb(n,e){let t=[],i=null,s=h=>{t.push(h);let{section:c}=h.completion;if(c){i||(i=[]);let f=typeof c=="string"?c:c.name;i.some(u=>u.name==f)||i.push(typeof c=="string"?{name:f}:c)}},r=e.facet(he);for(let h of n)if(h.hasResult()){let c=h.result.getMatch;if(h.result.filter===!1)for(let f of h.result.options)s(new eh(f,h.source,c?c(f):[],1e9-t.length));else{let f=e.sliceDoc(h.from,h.to),u,d=r.filterStrict?new Xb(f):new Ab(f);for(let O of h.result.options)if(u=d.match(O.label)){let m=O.displayLabel?c?c(O,u.matched):[]:u.matched;s(new eh(O,h.source,m,u.score+(O.boost||0)))}}}if(i){let h=Object.create(null),c=0,f=(u,d)=>{var O,m;return((O=u.rank)!==null&&O!==void 0?O:1e9)-((m=d.rank)!==null&&m!==void 0?m:1e9)||(u.namef.score-c.score||a(c.completion,f.completion))){let c=h.completion;!l||l.label!=c.label||l.detail!=c.detail||l.type!=null&&c.type!=null&&l.type!=c.type||l.apply!=c.apply||l.boost!=c.boost?o.push(h):nh(h.completion)>nh(l)&&(o[o.length-1]=h),l=h.completion}return o}class ti{constructor(e,t,i,s,r,o){this.options=e,this.attrs=t,this.tooltip=i,this.timestamp=s,this.selected=r,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new ti(this.options,sh(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,i,s,r,o){if(s&&!o&&e.some(h=>h.isPending))return s.setDisabled();let l=Wb(e,t);if(!l.length)return s&&e.some(h=>h.isPending)?s.setDisabled():null;let a=t.facet(he).selectOnOpen?0:-1;if(s&&s.selected!=a&&s.selected!=-1){let h=s.options[s.selected].completion;for(let c=0;cc.hasResult()?Math.min(h,c.from):h,1e8),create:zb,above:r.aboveCursor},s?s.timestamp:Date.now(),a,!1)}map(e){return new ti(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new ti(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Zs{constructor(e,t,i){this.active=e,this.id=t,this.open=i}static start(){return new Zs(Bb,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,i=t.facet(he),r=(i.override||t.languageDataAt("autocomplete",jt(t)).map(Rb)).map(a=>(this.active.find(c=>c.source==a)||new Le(a,this.active.some(c=>c.state!=0)?1:0)).update(e,i));r.length==this.active.length&&r.every((a,h)=>a==this.active[h])&&(r=this.active);let o=this.open,l=e.effects.some(a=>a.is(al));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||r.some(a=>a.hasResult()&&e.changes.touchesRange(a.from,a.to))||!Lb(r,this.active)||l?o=ti.build(r,t,this.id,o,i,l):o&&o.disabled&&!r.some(a=>a.isPending)&&(o=null),!o&&r.every(a=>!a.isPending)&&r.some(a=>a.hasResult())&&(r=r.map(a=>a.hasResult()?new Le(a.source,0):a));for(let a of e.effects)a.is(Du)&&(o=o&&o.setSelected(a.value,this.id));return r==this.active&&o==this.open?this:new Zs(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?jb:_b}}function Lb(n,e){if(n==e)return!0;for(let t=0,i=0;;){for(;t-1&&(t["aria-activedescendant"]=n+"-"+e),t}const Bb=[];function Eu(n,e){if(n.isUserEvent("input.complete")){let i=n.annotation(ll);if(i&&e.activateOnCompletion(i))return 12}let t=n.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:n.isUserEvent("delete.backward")?2:n.selection?8:n.docChanged?16:0}class Le{constructor(e,t,i=!1){this.source=e,this.state=t,this.explicit=i}hasResult(){return!1}get isPending(){return this.state==1}update(e,t){let i=Eu(e,t),s=this;(i&8||i&16&&this.touches(e))&&(s=new Le(s.source,0)),i&4&&s.state==0&&(s=new Le(this.source,1)),s=s.updateFor(e,i);for(let r of e.effects)if(r.is(vs))s=new Le(s.source,1,r.value);else if(r.is(tn))s=new Le(s.source,0);else if(r.is(al))for(let o of r.value)o.source==s.source&&(s=o);return s}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(jt(e.state))}}class li extends Le{constructor(e,t,i,s,r,o){super(e,3,t),this.limit=i,this.result=s,this.from=r,this.to=o}hasResult(){return!0}updateFor(e,t){var i;if(!(t&3))return this.map(e.changes);let s=this.result;s.map&&!e.changes.empty&&(s=s.map(s,e.changes));let r=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),l=jt(e.state);if(l>o||!s||t&2&&(jt(e.startState)==this.from||lt.map(e))}}),Du=V.define(),Ce=ce.define({create(){return Zs.start()},update(n,e){return n.update(e)},provide:n=>[zo.from(n,e=>e.tooltip),v.contentAttributes.from(n,e=>e.attrs)]});function hl(n,e){const t=e.completion.apply||e.completion.label;let i=n.state.field(Ce).active.find(s=>s.source==e.source);return i instanceof li?(typeof t=="string"?n.dispatch(Object.assign(Object.assign({},Tb(n.state,t,i.from,i.to)),{annotations:ll.of(e.completion)})):t(n,e.completion,i.from,i.to),!0):!1}const zb=Eb(Ce,hl);function Yn(n,e="option"){return t=>{let i=t.state.field(Ce,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+s*(n?1:-1):n?0:o-1;return l<0?l=e=="page"?0:o-1:l>=o&&(l=e=="page"?o-1:0),t.dispatch({effects:Du.of(l)}),!0}}const Ub=n=>{let e=n.state.field(Ce,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampn.state.field(Ce,!1)?(n.dispatch({effects:vs.of(!0)}),!0):!1,Ib=n=>{let e=n.state.field(Ce,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:tn.of(null)}),!0)};class Nb{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const Gb=50,Fb=1e3,Hb=ie.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of n.state.field(Ce).active)e.isPending&&this.startQuery(e)}update(n){let e=n.state.field(Ce),t=n.state.facet(he);if(!n.selectionSet&&!n.docChanged&&n.startState.field(Ce)==e)return;let i=n.transactions.some(r=>{let o=Eu(r,t);return o&8||(r.selection||r.docChanged)&&!(o&3)});for(let r=0;rGb&&Date.now()-o.time>Fb){for(let l of o.context.abortListeners)try{l()}catch(a){Te(this.view.state,a)}o.context.abortListeners=null,this.running.splice(r--,1)}else o.updates.push(...n.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),n.transactions.some(r=>r.effects.some(o=>o.is(vs)))&&(this.pendingStart=!0);let s=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(r=>r.isPending&&!this.running.some(o=>o.active.source==r.source))?setTimeout(()=>this.startUpdate(),s):-1,this.composing!=0)for(let r of n.transactions)r.isUserEvent("input.type")?this.composing=2:this.composing==2&&r.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:n}=this.view,e=n.field(Ce);for(let t of e.active)t.isPending&&!this.running.some(i=>i.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(he).updateSyncTime))}startQuery(n){let{state:e}=this.view,t=jt(e),i=new Mu(e,t,n.explicit,this.view),s=new Nb(n,i);this.running.push(s),Promise.resolve(n.source(i)).then(r=>{s.context.aborted||(s.done=r||null,this.scheduleAccept())},r=>{this.view.dispatch({effects:tn.of(null)}),Te(this.view.state,r)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(he).updateSyncTime))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(he),i=this.view.state.field(Ce);for(let s=0;sl.source==r.active.source);if(o&&o.isPending)if(r.done==null){let l=new Le(r.active.source,0);for(let a of r.updates)l=l.update(a,t);l.isPending||e.push(l)}else this.startQuery(o)}(e.length||i.open&&i.open.disabled)&&this.view.dispatch({effects:al.of(e)})}},{eventHandlers:{blur(n){let e=this.view.state.field(Ce,!1);if(e&&e.tooltip&&this.view.state.facet(he).closeOnBlur){let t=e.open&&gf(this.view,e.open.tooltip);(!t||!t.dom.contains(n.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:tn.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:vs.of(!1)}),20),this.composing=0}}}),Kb=typeof navigator=="object"&&/Win/.test(navigator.platform),Jb=Xt.highest(v.domEventHandlers({keydown(n,e){let t=e.state.field(Ce,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||n.key.length>1||n.ctrlKey&&!(Kb&&n.altKey)||n.metaKey)return!1;let i=t.open.options[t.open.selected],s=t.active.find(o=>o.source==i.source),r=i.completion.commitCharacters||s.result.commitCharacters;return r&&r.indexOf(n.key)>-1&&hl(e,i),!1}})),Wu=v.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class eS{constructor(e,t,i,s){this.field=e,this.line=t,this.from=i,this.to=s}}class cl{constructor(e,t,i){this.field=e,this.from=t,this.to=i}map(e){let t=e.mapPos(this.from,-1,Oe.TrackDel),i=e.mapPos(this.to,1,Oe.TrackDel);return t==null||i==null?null:new cl(this.field,t,i)}}class fl{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let i=[],s=[t],r=e.doc.lineAt(t),o=/^\s*/.exec(r.text)[0];for(let a of this.lines){if(i.length){let h=o,c=/^\t*/.exec(a)[0].length;for(let f=0;fnew cl(a.field,s[a.line]+a.from,s[a.line]+a.to));return{text:i,ranges:l}}static parse(e){let t=[],i=[],s=[],r;for(let o of e.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o);){let l=r[1]?+r[1]:null,a=r[2]||r[3]||"",h=-1,c=a.replace(/\\[{}]/g,f=>f[1]);for(let f=0;f=h&&u.field++}s.push(new eS(h,i.length,r.index,r.index+c.length)),o=o.slice(0,r.index)+a+o.slice(r.index+r[0].length)}o=o.replace(/\\([{}])/g,(l,a,h)=>{for(let c of s)c.line==i.length&&c.from>h&&(c.from--,c.to--);return a}),i.push(o)}return new fl(i,s)}}let tS=A.widget({widget:new class extends ft{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),iS=A.mark({class:"cm-snippetField"});class xi{constructor(e,t){this.ranges=e,this.active=t,this.deco=A.set(e.map(i=>(i.from==i.to?tS:iS).range(i.from,i.to)))}map(e){let t=[];for(let i of this.ranges){let s=i.map(e);if(!s)return null;t.push(s)}return new xi(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(i=>i.field==this.active&&i.from<=t.from&&i.to>=t.to))}}const Qn=V.define({map(n,e){return n&&n.map(e)}}),nS=V.define(),nn=ce.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(Qn))return t.value;if(t.is(nS)&&n)return new xi(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>v.decorations.from(n,e=>e?e.deco:A.none)});function ul(n,e){return y.create(n.filter(t=>t.field==e).map(t=>y.range(t.from,t.to)))}function sS(n){let e=fl.parse(n);return(t,i,s,r)=>{let{text:o,ranges:l}=e.instantiate(t.state,s),{main:a}=t.state.selection,h={changes:{from:s,to:r==a.from?a.to:r,insert:_.of(o)},scrollIntoView:!0,annotations:i?[ll.of(i),re.userEvent.of("input.complete")]:void 0};if(l.length&&(h.selection=ul(l,0)),l.some(c=>c.field>0)){let c=new xi(l,0),f=h.effects=[Qn.of(c)];t.state.field(nn,!1)===void 0&&f.push(V.appendConfig.of([nn,hS,cS,Wu]))}t.dispatch(t.state.update(h))}}function Lu(n){return({state:e,dispatch:t})=>{let i=e.field(nn,!1);if(!i||n<0&&i.active==0)return!1;let s=i.active+n,r=n>0&&!i.ranges.some(o=>o.field==s+n);return t(e.update({selection:ul(i.ranges,s),effects:Qn.of(r?null:new xi(i.ranges,s)),scrollIntoView:!0})),!0}}const rS=({state:n,dispatch:e})=>n.field(nn,!1)?(e(n.update({effects:Qn.of(null)})),!0):!1,oS=Lu(1),lS=Lu(-1),aS=[{key:"Tab",run:oS,shift:lS},{key:"Escape",run:rS}],oh=C.define({combine(n){return n.length?n[0]:aS}}),hS=Xt.highest(fn.compute([oh],n=>n.facet(oh)));function $e(n,e){return Object.assign(Object.assign({},e),{apply:sS(n)})}const cS=v.domEventHandlers({mousedown(n,e){let t=e.state.field(nn,!1),i;if(!t||(i=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let s=t.ranges.find(r=>r.from<=i&&r.to>=i);return!s||s.field==t.active?!1:(e.dispatch({selection:ul(t.ranges,s.field),effects:Qn.of(t.ranges.some(r=>r.field>s.field)?new xi(t.ranges,s.field):null),scrollIntoView:!0}),!0)}}),sn={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Lt=V.define({map(n,e){let t=e.mapPos(n,-1,Oe.TrackAfter);return t??void 0}}),dl=new class extends _t{};dl.startSide=1;dl.endSide=-1;const ju=ce.define({create(){return B.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:i=>i>=t.from&&i<=t.to})}for(let t of e.effects)t.is(Lt)&&(n=n.update({add:[dl.range(t.value,t.value+1)]}));return n}});function fS(){return[dS,ju]}const mr="()[]{}<>«»»«[]{}";function _u(n){for(let e=0;e{if((uS?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let s=n.state.selection.main;if(i.length>2||i.length==2&&tt(ve(i,0))==1||e!=s.from||t!=s.to)return!1;let r=mS(n.state,i);return r?(n.dispatch(r),!0):!1}),OS=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let i=Bu(n,n.selection.main.head).brackets||sn.brackets,s=null,r=n.changeByRange(o=>{if(o.empty){let l=gS(n.doc,o.head);for(let a of i)if(a==l&&Us(n.doc,o.head)==_u(ve(a,0)))return{changes:{from:o.head-a.length,to:o.head+a.length},range:y.cursor(o.head-a.length)}}return{range:s=o}});return s||e(n.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!s},pS=[{key:"Backspace",run:OS}];function mS(n,e){let t=Bu(n,n.selection.main.head),i=t.brackets||sn.brackets;for(let s of i){let r=_u(ve(s,0));if(e==s)return r==s?yS(n,s,i.indexOf(s+s+s)>-1,t):bS(n,s,r,t.before||sn.before);if(e==r&&Yu(n,n.selection.main.from))return SS(n,s,r)}return null}function Yu(n,e){let t=!1;return n.field(ju).between(0,n.doc.length,i=>{i==e&&(t=!0)}),t}function Us(n,e){let t=n.sliceString(e,e+2);return t.slice(0,tt(ve(t,0)))}function gS(n,e){let t=n.sliceString(e-2,e);return tt(ve(t,0))==t.length?t:t.slice(1)}function bS(n,e,t,i){let s=null,r=n.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:Lt.of(o.to+e.length),range:y.range(o.anchor+e.length,o.head+e.length)};let l=Us(n.doc,o.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:e+t,from:o.head},effects:Lt.of(o.head+e.length),range:y.cursor(o.head+e.length)}:{range:s=o}});return s?null:n.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function SS(n,e,t){let i=null,s=n.changeByRange(r=>r.empty&&Us(n.doc,r.head)==t?{changes:{from:r.head,to:r.head+t.length,insert:t},range:y.cursor(r.head+t.length)}:i={range:r});return i?null:n.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function yS(n,e,t,i){let s=i.stringPrefixes||sn.stringPrefixes,r=null,o=n.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:Lt.of(l.to+e.length),range:y.range(l.anchor+e.length,l.head+e.length)};let a=l.head,h=Us(n.doc,a),c;if(h==e){if(lh(n,a))return{changes:{insert:e+e,from:a},effects:Lt.of(a+e.length),range:y.cursor(a+e.length)};if(Yu(n,a)){let u=t&&n.sliceDoc(a,a+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+u.length,insert:u},range:y.cursor(a+u.length)}}}else{if(t&&n.sliceDoc(a-2*e.length,a)==e+e&&(c=ah(n,a-2*e.length,s))>-1&&lh(n,c))return{changes:{insert:e+e+e+e,from:a},effects:Lt.of(a+e.length),range:y.cursor(a+e.length)};if(n.charCategorizer(a)(h)!=K.Word&&ah(n,a,s)>-1&&!QS(n,a,e,s))return{changes:{insert:e+e,from:a},effects:Lt.of(a+e.length),range:y.cursor(a+e.length)}}return{range:r=l}});return r?null:n.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function lh(n,e){let t=ee(n).resolveInner(e+1);return t.parent&&t.from==e}function QS(n,e,t,i){let s=ee(n).resolveInner(e,-1),r=i.reduce((o,l)=>Math.max(o,l.length),0);for(let o=0;o<5;o++){let l=n.sliceDoc(s.from,Math.min(s.to,s.from+t.length+r)),a=l.indexOf(t);if(!a||a>-1&&i.indexOf(l.slice(0,a))>-1){let c=s.firstChild;for(;c&&c.from==s.from&&c.to-c.from>t.length+a;){if(n.sliceDoc(c.to-t.length,c.to)==t)return!1;c=c.firstChild}return!0}let h=s.to==e&&s.parent;if(!h)break;s=h}return!1}function ah(n,e,t){let i=n.charCategorizer(e);if(i(n.sliceDoc(e-1,e))!=K.Word)return e;for(let s of t){let r=e-s.length;if(n.sliceDoc(r,e)==s&&i(n.sliceDoc(r-1,r))!=K.Word)return r}return-1}function xS(n={}){return[Jb,Ce,he.of(n),Hb,wS,Wu]}const zu=[{key:"Ctrl-Space",run:rh},{mac:"Alt-`",run:rh},{key:"Escape",run:Ib},{key:"ArrowDown",run:Yn(!0)},{key:"ArrowUp",run:Yn(!1)},{key:"PageDown",run:Yn(!0,"page")},{key:"PageUp",run:Yn(!1,"page")},{key:"Enter",run:Ub}],wS=Xt.highest(fn.computeN([he],n=>n.facet(he).defaultKeymap?[zu]:[]));class hh{constructor(e,t,i){this.from=e,this.to=t,this.diagnostic=i}}class Dt{constructor(e,t,i){this.diagnostics=e,this.panel=t,this.selected=i}static init(e,t,i){let s=e,r=i.facet(rn).markerFilter;r&&(s=r(s,i));let o=e.slice().sort((f,u)=>f.from-u.from||f.to-u.to),l=new bt,a=[],h=0;for(let f=0;;){let u=f==o.length?null:o[f];if(!u&&!a.length)break;let d,O;for(a.length?(d=h,O=a.reduce((g,b)=>Math.min(g,b.to),u&&u.from>d?u.from:1e8)):(d=u.from,O=u.to,a.push(u),f++);fg.from||g.to==d))a.push(g),f++,O=Math.min(g.to,O);else{O=Math.min(g.from,O);break}}let m=qS(a);if(a.some(g=>g.from==g.to||g.from==g.to-1&&i.doc.lineAt(g.from).to==g.from))l.add(d,d,A.widget({widget:new AS(m),diagnostics:a.slice()}));else{let g=a.reduce((b,S)=>S.markClass?b+" "+S.markClass:b,"");l.add(d,O,A.mark({class:"cm-lintRange cm-lintRange-"+m+g,diagnostics:a.slice(),inclusiveEnd:a.some(b=>b.to>O)}))}h=O;for(let g=0;g{if(!(e&&o.diagnostics.indexOf(e)<0))if(!i)i=new hh(s,r,e||o.diagnostics[0]);else{if(o.diagnostics.indexOf(i.diagnostic)<0)return!1;i=new hh(i.from,r,i.diagnostic)}}),i}function kS(n,e){let t=e.pos,i=e.end||t,s=n.state.facet(rn).hideOn(n,t,i);if(s!=null)return s;let r=n.startState.doc.lineAt(e.pos);return!!(n.effects.some(o=>o.is(Uu))||n.changes.touchesRange(r.from,Math.max(r.to,i)))}function PS(n,e){return n.field(qe,!1)?e:e.concat(V.appendConfig.of(ES))}const Uu=V.define(),Ol=V.define(),Iu=V.define(),qe=ce.define({create(){return new Dt(A.none,null,null)},update(n,e){if(e.docChanged&&n.diagnostics.size){let t=n.diagnostics.map(e.changes),i=null,s=n.panel;if(n.selected){let r=e.changes.mapPos(n.selected.from,1);i=mi(t,n.selected.diagnostic,r)||mi(t,null,r)}!t.size&&s&&e.state.facet(rn).autoPanel&&(s=null),n=new Dt(t,s,i)}for(let t of e.effects)if(t.is(Uu)){let i=e.state.facet(rn).autoPanel?t.value.length?on.open:null:n.panel;n=Dt.init(t.value,i,e.state)}else t.is(Ol)?n=new Dt(n.diagnostics,t.value?on.open:null,n.selected):t.is(Iu)&&(n=new Dt(n.diagnostics,n.panel,t.value));return n},provide:n=>[Fi.from(n,e=>e.panel),v.decorations.from(n,e=>e.diagnostics)]}),$S=A.mark({class:"cm-lintRange cm-lintRange-active"});function vS(n,e,t){let{diagnostics:i}=n.state.field(qe),s,r=-1,o=-1;i.between(e-(t<0?1:0),e+(t>0?1:0),(a,h,{spec:c})=>{if(e>=a&&e<=h&&(a==h||(e>a||t>0)&&(eGu(n,t,!1)))}const CS=n=>{let e=n.state.field(qe,!1);(!e||!e.panel)&&n.dispatch({effects:PS(n.state,[Ol.of(!0)])});let t=Gi(n,on.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},ch=n=>{let e=n.state.field(qe,!1);return!e||!e.panel?!1:(n.dispatch({effects:Ol.of(!1)}),!0)},TS=n=>{let e=n.state.field(qe,!1);if(!e)return!1;let t=n.state.selection.main,i=e.diagnostics.iter(t.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==t.from&&i.to==t.to)?!1:(n.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},RS=[{key:"Mod-Shift-m",run:CS,preventDefault:!0},{key:"F8",run:TS}],rn=C.define({combine(n){return Object.assign({sources:n.map(e=>e.source).filter(e=>e!=null)},ct(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?i=>e(i)||t(i):e:t}))}});function Nu(n){let e=[];if(n)e:for(let{name:t}of n){for(let i=0;ir.toLowerCase()==s.toLowerCase())){e.push(s);continue e}}e.push("")}return e}function Gu(n,e,t){var i;let s=t?Nu(e.actions):[];return U("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},U("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(n):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((r,o)=>{let l=!1,a=u=>{if(u.preventDefault(),l)return;l=!0;let d=mi(n.state.field(qe).diagnostics,e);d&&r.apply(n,d.from,d.to)},{name:h}=r,c=s[o]?h.indexOf(s[o]):-1,f=c<0?h:[h.slice(0,c),U("u",h.slice(c,c+1)),h.slice(c+1)];return U("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${h}${c<0?"":` (access key "${s[o]})"`}.`},f)}),e.source&&U("div",{class:"cm-diagnosticSource"},e.source))}class AS extends ft{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return U("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class fh{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Gu(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class on{constructor(e){this.view=e,this.items=[];let t=s=>{if(s.keyCode==27)ch(this.view),this.view.focus();else if(s.keyCode==38||s.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(s.keyCode==40||s.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(s.keyCode==36)this.moveSelection(0);else if(s.keyCode==35)this.moveSelection(this.items.length-1);else if(s.keyCode==13)this.view.focus();else if(s.keyCode>=65&&s.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:r}=this.items[this.selectedIndex],o=Nu(r.actions);for(let l=0;l{for(let r=0;rch(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(qe).selected;if(!e)return-1;for(let t=0;t{for(let c of h.diagnostics){if(o.has(c))continue;o.add(c);let f=-1,u;for(let d=i;di&&(this.items.splice(i,f-i),s=!0)),t&&u.diagnostic==t.diagnostic?u.dom.hasAttribute("aria-selected")||(u.dom.setAttribute("aria-selected","true"),r=u):u.dom.hasAttribute("aria-selected")&&u.dom.removeAttribute("aria-selected"),i++}});i({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:l,panel:a})=>{let h=a.height/this.list.offsetHeight;l.topa.bottom&&(this.list.scrollTop+=(l.bottom-a.bottom)/h)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}sync(){let e=this.list.firstChild;function t(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)t();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(qe),i=mi(t.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:Iu.of(i)})}static open(e){return new on(e)}}function XS(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(n)}')`}function zn(n){return XS(``,'width="6" height="3"')}const MS=v.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:zn("#d11")},".cm-lintRange-warning":{backgroundImage:zn("orange")},".cm-lintRange-info":{backgroundImage:zn("#999")},".cm-lintRange-hint":{backgroundImage:zn("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function VS(n){return n=="error"?4:n=="warning"?3:n=="info"?2:1}function qS(n){let e="hint",t=1;for(let i of n){let s=VS(i.severity);s>t&&(t=s,e=i.severity)}return e}const ES=[qe,v.decorations.compute([qe],n=>{let{selected:e,panel:t}=n.field(qe);return!e||!t||e.from==e.to?A.none:A.set([$S.range(e.from,e.to)])}),bm(vS,{hideOn:kS}),MS];var uh=function(e){e===void 0&&(e={});var{crosshairCursor:t=!1}=e,i=[];e.closeBracketsKeymap!==!1&&(i=i.concat(pS)),e.defaultKeymap!==!1&&(i=i.concat(K0)),e.searchKeymap!==!1&&(i=i.concat(kb)),e.historyKeymap!==!1&&(i=i.concat(l0)),e.foldKeymap!==!1&&(i=i.concat(xg)),e.completionKeymap!==!1&&(i=i.concat(zu)),e.lintKeymap!==!1&&(i=i.concat(RS));var s=[];return e.lineNumbers!==!1&&s.push(Cm()),e.highlightActiveLineGutter!==!1&&s.push(Am()),e.highlightSpecialChars!==!1&&s.push(Ip()),e.history!==!1&&s.push(Kg()),e.foldGutter!==!1&&s.push($g()),e.drawSelection!==!1&&s.push(qp()),e.dropCursor!==!1&&s.push(jp()),e.allowMultipleSelections!==!1&&s.push(j.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&s.push(dg()),e.syntaxHighlighting!==!1&&s.push(jf(Tg,{fallback:!0})),e.bracketMatching!==!1&&s.push(Eg()),e.closeBrackets!==!1&&s.push(fS()),e.autocompletion!==!1&&s.push(xS()),e.rectangularSelection!==!1&&s.push(lm()),t!==!1&&s.push(cm()),e.highlightActiveLine!==!1&&s.push(Jp()),e.highlightSelectionMatches!==!1&&s.push(rb()),e.tabSize&&typeof e.tabSize=="number"&&s.push(On.of(" ".repeat(e.tabSize))),s.concat([fn.of(i.flat())]).filter(Boolean)};const DS="#e5c07b",dh="#e06c75",WS="#56b6c2",LS="#ffffff",is="#abb2bf",Po="#7d8799",jS="#61afef",_S="#98c379",Oh="#d19a66",BS="#c678dd",YS="#21252b",ph="#2c313a",mh="#282c34",gr="#353a42",zS="#3E4451",gh="#528bff",US=v.theme({"&":{color:is,backgroundColor:mh},".cm-content":{caretColor:gh},".cm-cursor, .cm-dropCursor":{borderLeftColor:gh},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:zS},".cm-panels":{backgroundColor:YS,color:is},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:mh,color:Po,border:"none"},".cm-activeLineGutter":{backgroundColor:ph},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:gr},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:gr,borderBottomColor:gr},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:ph,color:is}}},{dark:!0}),IS=bn.define([{tag:p.keyword,color:BS},{tag:[p.name,p.deleted,p.character,p.propertyName,p.macroName],color:dh},{tag:[p.function(p.variableName),p.labelName],color:jS},{tag:[p.color,p.constant(p.name),p.standard(p.name)],color:Oh},{tag:[p.definition(p.name),p.separator],color:is},{tag:[p.typeName,p.className,p.number,p.changed,p.annotation,p.modifier,p.self,p.namespace],color:DS},{tag:[p.operator,p.operatorKeyword,p.url,p.escape,p.regexp,p.link,p.special(p.string)],color:WS},{tag:[p.meta,p.comment],color:Po},{tag:p.strong,fontWeight:"bold"},{tag:p.emphasis,fontStyle:"italic"},{tag:p.strikethrough,textDecoration:"line-through"},{tag:p.link,color:Po,textDecoration:"underline"},{tag:p.heading,fontWeight:"bold",color:dh},{tag:[p.atom,p.bool,p.special(p.variableName)],color:Oh},{tag:[p.processingInstruction,p.string,p.inserted],color:_S},{tag:p.invalid,color:LS}]),NS=[US,jf(IS)];var GS=v.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),FS=function(e){e===void 0&&(e={});var{indentWithTab:t=!0,editable:i=!0,readOnly:s=!1,theme:r="light",placeholder:o="",basicSetup:l=!0}=e,a=[];switch(t&&a.unshift(fn.of([J0])),l&&(typeof l=="boolean"?a.unshift(uh()):a.unshift(uh(l))),o&&a.unshift(nm(o)),r){case"light":a.push(GS);break;case"dark":a.push(NS);break;case"none":break;default:a.push(r);break}return i===!1&&a.push(v.editable.of(!1)),s&&a.push(j.readOnly.of(!0)),[...a]},HS=n=>({line:n.state.doc.lineAt(n.state.selection.main.from),lineCount:n.state.doc.lines,lineBreak:n.state.lineBreak,length:n.state.doc.length,readOnly:n.state.readOnly,tabSize:n.state.tabSize,selection:n.state.selection,selectionAsSingle:n.state.selection.asSingle().main,ranges:n.state.selection.ranges,selectionCode:n.state.sliceDoc(n.state.selection.main.from,n.state.selection.main.to),selections:n.state.selection.ranges.map(e=>n.state.sliceDoc(e.from,e.to)),selectedText:n.state.selection.ranges.some(e=>!e.empty)});class KS{constructor(e,t){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=t,this.timeoutMS=t,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(t=>{try{t()}catch(i){console.error("TimeoutLatch callback error:",i)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class bh{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var br=null,JS=()=>typeof window>"u"?new bh:(br||(br=new bh),br),Sh=ht.define(),ey=200,ty=[];function iy(n){var{value:e,selection:t,onChange:i,onStatistics:s,onCreateEditor:r,onUpdate:o,extensions:l=ty,autoFocus:a,theme:h="light",height:c=null,minHeight:f=null,maxHeight:u=null,width:d=null,minWidth:O=null,maxWidth:m=null,placeholder:g="",editable:b=!0,readOnly:S=!1,indentWithTab:x=!0,basicSetup:w=!0,root:Q,initialState:k}=n,[P,M]=xe.useState(),[R,L]=xe.useState(),[q,X]=xe.useState(),E=xe.useState(()=>({current:null}))[0],W=xe.useState(()=>({current:null}))[0],Y=v.theme({"&":{height:c,minHeight:f,maxHeight:u,width:d,minWidth:O,maxWidth:m},"& .cm-scroller":{height:"100% !important"}}),oe=v.updateListener.of(z=>{if(z.docChanged&&typeof i=="function"&&!z.transactions.some(ge=>ge.annotation(Sh))){E.current?E.current.reset():(E.current=new KS(()=>{if(W.current){var ge=W.current;W.current=null,ge()}E.current=null},ey),JS().add(E.current));var ne=z.state.doc,fe=ne.toString();i(fe,z)}s&&s(HS(z))}),ae=FS({theme:h,editable:b,readOnly:S,placeholder:g,indentWithTab:x,basicSetup:w}),me=[oe,Y,...ae];return o&&typeof o=="function"&&me.push(v.updateListener.of(o)),me=me.concat(l),xe.useLayoutEffect(()=>{if(P&&!q){var z={doc:e,selection:t,extensions:me},ne=k?j.fromJSON(k.json,z,k.fields):j.create(z);if(X(ne),!R){var fe=new v({state:ne,parent:P,root:Q});L(fe),r&&r(fe,ne)}}return()=>{R&&(X(void 0),L(void 0))}},[P,q]),xe.useEffect(()=>{n.container&&M(n.container)},[n.container]),xe.useEffect(()=>()=>{R&&(R.destroy(),L(void 0)),E.current&&(E.current.cancel(),E.current=null)},[R]),xe.useEffect(()=>{a&&R&&R.focus()},[a,R]),xe.useEffect(()=>{R&&R.dispatch({effects:V.reconfigure.of(me)})},[h,l,c,f,u,d,O,m,g,b,S,x,w,i,o]),xe.useEffect(()=>{if(e!==void 0){var z=R?R.state.doc.toString():"";if(R&&e!==z){var ne=E.current&&!E.current.isDone,fe=()=>{R&&e!==R.state.doc.toString()&&R.dispatch({changes:{from:0,to:R.state.doc.toString().length,insert:e||""},annotations:[Sh.of(!0)]})};ne?W.current=fe:fe()}}},[e,R]),{state:q,setState:X,view:R,setView:L,container:P,setContainer:M}}var ny=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],Fu=xe.forwardRef((n,e)=>{var{className:t,value:i="",selection:s,extensions:r=[],onChange:o,onStatistics:l,onCreateEditor:a,onUpdate:h,autoFocus:c,theme:f="light",height:u,minHeight:d,maxHeight:O,width:m,minWidth:g,maxWidth:b,basicSetup:S,placeholder:x,indentWithTab:w,editable:Q,readOnly:k,root:P,initialState:M}=n,R=Rd(n,ny),L=xe.useRef(null),{state:q,view:X,container:E,setContainer:W}=iy({root:P,value:i,autoFocus:c,theme:f,height:u,minHeight:d,maxHeight:O,width:m,minWidth:g,maxWidth:b,basicSetup:S,placeholder:x,indentWithTab:w,editable:Q,readOnly:k,selection:s,onChange:o,onStatistics:l,onCreateEditor:a,onUpdate:h,extensions:r,initialState:M});xe.useImperativeHandle(e,()=>({editor:L.current,state:q,view:X}),[L,E,q,X]);var Y=xe.useCallback(ae=>{L.current=ae,W(ae)},[W]);if(typeof i!="string")throw new Error("value must be typeof string but got "+typeof i);var oe=typeof f=="string"?"cm-theme-"+f:"cm-theme";return Ih.jsx("div",Ad({ref:Y,className:""+oe+(t?" "+t:"")},R))});Fu.displayName="CodeMirror";var yh={};class Cs{constructor(e,t,i,s,r,o,l,a,h,c=0,f){this.p=e,this.stack=t,this.state=i,this.reducePos=s,this.pos=r,this.score=o,this.buffer=l,this.bufferBase=a,this.curContext=h,this.lookAhead=c,this.parent=f}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,i=0){let s=e.parser.context;return new Cs(e,[],t,i,i,0,[],0,s?new Qh(s,s.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let i=e>>19,s=e&65535,{parser:r}=this.p,o=this.reducePos=2e3&&!(!((t=this.p.parser.nodeSet.types[s])===null||t===void 0)&&t.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSizea;)this.stack.pop();this.reduceContext(s,h)}storeNode(e,t,i,s=4,r=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&o.buffer[l-4]==0&&o.buffer[l-1]>-1){if(t==i)return;if(o.buffer[l-2]>=t){o.buffer[l-2]=i;return}}}if(!r||this.pos==i)this.buffer.push(e,t,i,s);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let l=!1;for(let a=o;a>0&&this.buffer[a-2]>i;a-=4)if(this.buffer[a-1]>=0){l=!0;break}if(l)for(;o>0&&this.buffer[o-2]>i;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,s>4&&(s-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=i,this.buffer[o+3]=s}}shift(e,t,i,s){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let r=e,{parser:o}=this.p;(s>this.pos||t<=o.maxNode)&&(this.pos=s,o.stateFlag(r,1)||(this.reducePos=s)),this.pushState(r,i),this.shiftContext(t,i),t<=o.maxNode&&this.buffer.push(t,i,s,4)}else this.pos=s,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,s,4)}apply(e,t,i,s){e&65536?this.reduce(e):this.shift(e,t,i,s)}useNode(e,t){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let s=this.pos;this.reducePos=this.pos=s+e.length,this.pushState(t,s),this.buffer.push(i,s,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let i=e.buffer.slice(t),s=e.bufferBase+t;for(;e&&s==e.bufferBase;)e=e.parent;return new Cs(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,s,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new sy(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(i==0)return!1;if((i&65536)==0)return!0;t.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let s=[];for(let r=0,o;ra&1&&l==o)||s.push(t[r],o)}t=s}let i=[];for(let s=0;s>19,s=t&65535,r=this.stack.length-i*3;if(r<0||e.getGoto(this.stack[r],s,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],i=(s,r)=>{if(!t.includes(s))return t.push(s),e.allActions(s,o=>{if(!(o&393216))if(o&65536){let l=(o>>19)-r;if(l>1){let a=o&65535,h=this.stack.length-l*3;if(h>=0&&e.getGoto(this.stack[h],a,!1)>=0)return l<<19|65536|a}}else{let l=i(o,r+1);if(l!=null)return l}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Qh{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class sy{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let s=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=s}}class Ts{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Ts(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Ts(this.stack,this.pos,this.index)}}function qi(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let i=0,s=0;i=92&&o--,o>=34&&o--;let a=o-32;if(a>=46&&(a-=46,l=!0),r+=a,l)break;r*=46}t?t[s++]=r:t=new e(r)}return t}class ns{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const xh=new ns;class ry{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=xh,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let i=this.range,s=this.rangeIndex,r=this.pos+e;for(;ri.to:r>=i.to;){if(s==this.ranges.length-1)return null;let o=this.ranges[++s];r+=o.from-i.to,i=o}return r}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,i,s;if(t>=0&&t=this.chunk2Pos&&il.to&&(this.chunk2=this.chunk2.slice(0,l.to-i)),s=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),s}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(i==null||i=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=xh,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let i="";for(let s of this.ranges){if(s.from>=t)break;s.to>e&&(i+=this.input.read(Math.max(s.from,e),Math.min(s.to,t)))}return i}}class ai{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:i}=t.p;Hu(this.data,e,t,this.id,i.data,i.tokenPrecTable)}}ai.prototype.contextual=ai.prototype.fallback=ai.prototype.extend=!1;class Rs{constructor(e,t,i){this.precTable=t,this.elseToken=i,this.data=typeof e=="string"?qi(e):e}token(e,t){let i=e.pos,s=0;for(;;){let r=e.next<0,o=e.resolveOffset(1,1);if(Hu(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(r||s++,o==null)break;e.reset(o,e.token)}s&&(e.reset(i,e.token),e.acceptToken(this.elseToken,s))}}Rs.prototype.contextual=ai.prototype.fallback=ai.prototype.extend=!1;class Ye{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function Hu(n,e,t,i,s,r){let o=0,l=1<0){let O=n[d];if(a.allows(O)&&(e.token.value==-1||e.token.value==O||oy(O,e.token.value,s,r))){e.acceptToken(O);break}}let c=e.next,f=0,u=n[o+2];if(e.next<0&&u>f&&n[h+u*3-3]==65535){o=n[h+u*3-1];continue e}for(;f>1,O=h+d+(d<<1),m=n[O],g=n[O+1]||65536;if(c=g)f=d+1;else{o=n[O+2],e.advance();continue e}}break}}function wh(n,e,t){for(let i=e,s;(s=n[i])!=65535;i++)if(s==t)return i-e;return-1}function oy(n,e,t,i){let s=wh(t,i,e);return s<0||wh(t,i,n)e)&&!i.type.isError)return t<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(n.length,Math.max(i.from+1,e+25));if(t<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return t<0?0:n.length}}class ly{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?kh(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?kh(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=o,null;if(r instanceof J){if(o==e){if(o=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+r.length}}}class ay{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new ns)}getActions(e){let t=0,i=null,{parser:s}=e.p,{tokenizers:r}=s,o=s.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,a=0;for(let h=0;hf.end+25&&(a=Math.max(f.lookAhead,a)),f.value!=0)){let u=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!c.extend&&(i=f,t>u))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),!i&&e.pos==this.stream.end&&(i=new ns,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new ns,{pos:i,p:s}=e;return t.start=i,t.end=Math.min(i+1,s.stream.end),t.value=i==s.stream.end?s.parser.eofTerm:0,t}updateCachedToken(e,t,i){let s=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(s,e),i),e.value>-1){let{parser:r}=i.p;for(let o=0;o=0&&i.p.parser.dialect.allows(l>>1)){(l&1)==0?e.value=l>>1:e.extended=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(s+1)}putAction(e,t,i,s){for(let r=0;re.bufferLength*4?new ly(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,i=this.stacks=[],s,r;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;ot)i.push(l);else{if(this.advanceStack(l,i,e))continue;{s||(s=[],r=[]),s.push(l);let a=this.tokens.getMainToken(l);r.push(a.value,a.end)}}break}}if(!i.length){let o=s&&fy(s);if(o)return Xe&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Xe&&s&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&s){let o=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,r,i);if(o)return Xe&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(i.length>o)for(i.sort((l,a)=>a.score-l.score);i.length>o;)i.pop();i.some(l=>l.reducePos>t)&&this.recovering--}else if(i.length>1){e:for(let o=0;o500&&h.buffer.length>500)if((l.score-h.score||l.buffer.length-h.buffer.length)>0)i.splice(a--,1);else{i.splice(o--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let o=1;o ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,c=h?e.curContext.hash:0;for(let f=this.fragments.nodeAt(s);f;){let u=this.parser.nodeSet.types[f.type.id]==f.type?r.getGoto(e.state,f.type.id):-1;if(u>-1&&f.length&&(!h||(f.prop(D.contextHash)||0)==c))return e.useNode(f,u),Xe&&console.log(o+this.stackID(e)+` (via reuse of ${r.getName(f.type.id)})`),!0;if(!(f instanceof J)||f.children.length==0||f.positions[0]>0)break;let d=f.children[0];if(d instanceof J&&f.positions[0]==0)f=d;else break}}let l=r.stateSlot(e.state,4);if(l>0)return e.reduce(l),Xe&&console.log(o+this.stackID(e)+` (via always-reduce ${r.getName(l&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let h=0;hs?t.push(O):i.push(O)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return Ph(e,t),!0}}runRecovery(e,t,i){let s=null,r=!1;for(let o=0;o ":"";if(l.deadEnd&&(r||(r=!0,l.restart(),Xe&&console.log(c+this.stackID(l)+" (restarted)"),this.advanceFully(l,i))))continue;let f=l.split(),u=c;for(let d=0;f.forceReduce()&&d<10&&(Xe&&console.log(u+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,i));d++)Xe&&(u=this.stackID(f)+" -> ");for(let d of l.recoverByInsert(a))Xe&&console.log(c+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,i);this.stream.end>l.pos?(h==l.pos&&(h++,a=0),l.recoverByDelete(a,h),Xe&&console.log(c+this.stackID(l)+` (via recover-delete ${this.parser.getName(a)})`),Ph(l,i)):(!s||s.scoren;class Ku{constructor(e){this.start=e.start,this.shift=e.shift||yr,this.reduce=e.reduce||yr,this.reuse=e.reuse||yr,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Nt extends $f{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let l=0;le.topRules[l][1]),s=[];for(let l=0;l=0)r(c,a,l[h++]);else{let f=l[h+-c];for(let u=-c;u>0;u--)r(l[h++],a,f);h++}}}this.nodeSet=new Uo(t.map((l,a)=>Pe.define({name:a>=this.minRepeatTerm?void 0:l,id:a,props:s[a],top:i.indexOf(a)>-1,error:a==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(a)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Qf;let o=qi(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;ltypeof l=="number"?new ai(o,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,i){let s=new hy(this,e,t,i);for(let r of this.wrappers)s=r(s,e,t,i);return s}getGoto(e,t,i=!1){let s=this.goto;if(t>=s[0])return-1;for(let r=s[t+1];;){let o=s[r++],l=o&1,a=s[r++];if(l&&i)return a;for(let h=r+(o>>1);r0}validAction(e,t){return!!this.allActions(e,i=>i==t?!0:null)}allActions(e,t){let i=this.stateSlot(e,4),s=i?t(i):void 0;for(let r=this.stateSlot(e,1);s==null;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Ot(this.data,r+2);else break;s=t(Ot(this.data,r+1))}return s}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=Ot(this.data,i+2);else break;if((this.data[i+2]&1)==0){let s=this.data[i+1];t.some((r,o)=>o&1&&r==s)||t.push(this.data[i],s)}}return t}configure(e){let t=Object.assign(Object.create(Nt.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=i}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(i=>{let s=e.tokenizers.find(r=>r.from==i);return s?s.to:i})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((i,s)=>{let r=e.specializers.find(l=>l.from==i.external);if(!r)return i;let o=Object.assign(Object.assign({},i),{external:r.to});return t.specializers[s]=$h(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map(()=>!1);if(e)for(let r of e.split(" ")){let o=t.indexOf(r);o>=0&&(i[o]=!0)}let s=null;for(let r=0;ri)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scoren.external(t,i)<<1|e}return n.get}const uy=dn({String:p.string,Number:p.number,"True False":p.bool,PropertyName:p.propertyName,Null:p.null,", :":p.separator,"[ ]":p.squareBracket,"{ }":p.brace}),dy=Nt.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[uy],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),Oy=Ut.define({name:"json",parser:dy.configure({props:[pn.add({Object:ri({except:/^\s*\}/}),Array:ri({except:/^\s*\]/})}),mn.add({"Object Array":Jo})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function py(){return new Ws(Oy)}const my=55,gy=1,by=56,Sy=2,yy=57,Qy=3,vh=4,xy=5,pl=6,Ju=7,ed=8,td=9,id=10,wy=11,ky=12,Py=13,Qr=58,$y=14,vy=15,Zh=59,nd=21,Zy=23,sd=24,Cy=25,$o=27,rd=28,Ty=29,Ry=32,Ay=35,Xy=37,My=38,Vy=0,qy=1,Ey={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Dy={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Ch={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Wy(n){return n==45||n==46||n==58||n>=65&&n<=90||n==95||n>=97&&n<=122||n>=161}let Th=null,Rh=null,Ah=0;function vo(n,e){let t=n.pos+e;if(Ah==t&&Rh==n)return Th;let i=n.peek(e),s="";for(;Wy(i);)s+=String.fromCharCode(i),i=n.peek(++e);return Rh=n,Ah=t,Th=s?s.toLowerCase():i==Ly||i==jy?void 0:null}const od=60,As=62,ml=47,Ly=63,jy=33,_y=45;function Xh(n,e){this.name=n,this.parent=e}const By=[pl,id,Ju,ed,td],Yy=new Ku({start:null,shift(n,e,t,i){return By.indexOf(e)>-1?new Xh(vo(i,1)||"",n):n},reduce(n,e){return e==nd&&n?n.parent:n},reuse(n,e,t,i){let s=e.type.id;return s==pl||s==Xy?new Xh(vo(i,1)||"",n):n},strict:!1}),zy=new Ye((n,e)=>{if(n.next!=od){n.next<0&&e.context&&n.acceptToken(Qr);return}n.advance();let t=n.next==ml;t&&n.advance();let i=vo(n,0);if(i===void 0)return;if(!i)return n.acceptToken(t?vy:$y);let s=e.context?e.context.name:null;if(t){if(i==s)return n.acceptToken(wy);if(s&&Dy[s])return n.acceptToken(Qr,-2);if(e.dialectEnabled(Vy))return n.acceptToken(ky);for(let r=e.context;r;r=r.parent)if(r.name==i)return;n.acceptToken(Py)}else{if(i=="script")return n.acceptToken(Ju);if(i=="style")return n.acceptToken(ed);if(i=="textarea")return n.acceptToken(td);if(Ey.hasOwnProperty(i))return n.acceptToken(id);s&&Ch[s]&&Ch[s][i]?n.acceptToken(Qr,-1):n.acceptToken(pl)}},{contextual:!0}),Uy=new Ye(n=>{for(let e=0,t=0;;t++){if(n.next<0){t&&n.acceptToken(Zh);break}if(n.next==_y)e++;else if(n.next==As&&e>=2){t>=3&&n.acceptToken(Zh,-2);break}else e=0;n.advance()}});function Iy(n){for(;n;n=n.parent)if(n.name=="svg"||n.name=="math")return!0;return!1}const Ny=new Ye((n,e)=>{if(n.next==ml&&n.peek(1)==As){let t=e.dialectEnabled(qy)||Iy(e.context);n.acceptToken(t?xy:vh,2)}else n.next==As&&n.acceptToken(vh,1)});function gl(n,e,t){let i=2+n.length;return new Ye(s=>{for(let r=0,o=0,l=0;;l++){if(s.next<0){l&&s.acceptToken(e);break}if(r==0&&s.next==od||r==1&&s.next==ml||r>=2&&ro?s.acceptToken(e,-o):s.acceptToken(t,-(o-2));break}else if((s.next==10||s.next==13)&&l){s.acceptToken(e,1);break}else r=o=0;s.advance()}})}const Gy=gl("script",my,gy),Fy=gl("style",by,Sy),Hy=gl("textarea",yy,Qy),Ky=dn({"Text RawText IncompleteTag IncompleteCloseTag":p.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":p.angleBracket,TagName:p.tagName,"MismatchedCloseTag/TagName":[p.tagName,p.invalid],AttributeName:p.attributeName,"AttributeValue UnquotedAttributeValue":p.attributeValue,Is:p.definitionOperator,"EntityReference CharacterReference":p.character,Comment:p.blockComment,ProcessingInst:p.processingInstruction,DoctypeDecl:p.documentMeta}),Jy=Nt.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOOOb7+$m7+$mOOOd7+$p7+$pOOO`7+$s7+$sO*bQ#|O,59fO*gQ#|O,59iO*lQ#|O,59lOOO`1G/Y1G/YO*qO7[O'#CwO+SOMhO'#CwOOQW1G.z1G.zOOO`1G/Q1G/QOOO`1G/T1G/TOOO`1G/W1G/WOOOO'#D]'#D]O+eO7[O,59cOOQW,59c,59cOOOO'#D^'#D^O+vOMhO,59cOOOO-E7Z-E7ZOOQW1G.}1G.}OOOO-E7[-E7[",stateData:",c~O!_OS~OUSOVPOWQOXROYTO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O|_O!eZO~OgaO~OgbO~OgcO~OgdO~OgeO~O!XfOPmP![mP~O!YiOQpP![pP~O!ZlORsP![sP~OUSOVPOWQOXROYTOZqO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:Yy,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[Ky],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zblWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOb!R!R7tP;=`<%l7S!Z8OYlWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{iiSlWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbiSlWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VP<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXiSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TalWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOc!R!RAwP;=`<%lAY!ZBRYlWc!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbiSlWc!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbiSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXiSc!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!cxaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYliSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_kiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_XaP!b`!dp!fQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZiSgQaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!b`!dpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!b`!dp!ePOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!b`!dpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!b`!dpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!b`!dpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!b`!dpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!b`!dpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!b`!dpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!b`!dpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!dpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO|PP!-nP;=`<%l!-Sq!-xS!dp|POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!b`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!b`|POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!b`!dp|POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!b`!dpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!b`!dpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!b`!dpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!b`!dpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!b`!dpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!b`!dpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let h=l.type.id;if(h==Ty)return xr(l,a,t);if(h==Ry)return xr(l,a,i);if(h==Ay)return xr(l,a,s);if(h==nd&&r.length){let c=l.node,f=c.firstChild,u=f&&Mh(f,a),d;if(u){for(let O of r)if(O.tag==u&&(!O.attrs||O.attrs(d||(d=ld(f,a))))){let m=c.lastChild,g=m.type.id==My?m.from:c.to;if(g>f.to)return{parser:O.parser,overlay:[{from:f.to,to:g}]}}}}if(o&&h==sd){let c=l.node,f;if(f=c.firstChild){let u=o[a.read(f.from,f.to)];if(u)for(let d of u){if(d.tagName&&d.tagName!=Mh(c.parent,a))continue;let O=c.lastChild;if(O.type.id==$o){let m=O.from+1,g=O.lastChild,b=O.to-(g&&g.isError?0:1);if(b>m)return{parser:d.parser,overlay:[{from:m,to:b}]}}else if(O.type.id==rd)return{parser:d.parser,overlay:[{from:O.from,to:O.to}]}}}}return null})}const eQ=100,Vh=1,tQ=101,iQ=102,qh=2,hd=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],nQ=58,sQ=40,cd=95,rQ=91,ss=45,oQ=46,lQ=35,aQ=37,hQ=38,cQ=92,fQ=10;function ln(n){return n>=65&&n<=90||n>=97&&n<=122||n>=161}function fd(n){return n>=48&&n<=57}const uQ=new Ye((n,e)=>{for(let t=!1,i=0,s=0;;s++){let{next:r}=n;if(ln(r)||r==ss||r==cd||t&&fd(r))!t&&(r!=ss||s>0)&&(t=!0),i===s&&r==ss&&i++,n.advance();else if(r==cQ&&n.peek(1)!=fQ)n.advance(),n.next>-1&&n.advance(),t=!0;else{t&&n.acceptToken(r==sQ?tQ:i==2&&e.canShift(qh)?qh:iQ);break}}}),dQ=new Ye(n=>{if(hd.includes(n.peek(-1))){let{next:e}=n;(ln(e)||e==cd||e==lQ||e==oQ||e==rQ||e==nQ&&ln(n.peek(1))||e==ss||e==hQ)&&n.acceptToken(eQ)}}),OQ=new Ye(n=>{if(!hd.includes(n.peek(-1))){let{next:e}=n;if(e==aQ&&(n.advance(),n.acceptToken(Vh)),ln(e)){do n.advance();while(ln(n.next)||fd(n.next));n.acceptToken(Vh)}}}),pQ=dn({"AtKeyword import charset namespace keyframes media supports":p.definitionKeyword,"from to selector":p.keyword,NamespaceName:p.namespace,KeyframeName:p.labelName,KeyframeRangeName:p.operatorKeyword,TagName:p.tagName,ClassName:p.className,PseudoClassName:p.constant(p.className),IdName:p.labelName,"FeatureName PropertyName":p.propertyName,AttributeName:p.attributeName,NumberLiteral:p.number,KeywordQuery:p.keyword,UnaryQueryOp:p.operatorKeyword,"CallTag ValueName":p.atom,VariableName:p.variableName,Callee:p.operatorKeyword,Unit:p.unit,"UniversalSelector NestingSelector":p.definitionOperator,MatchOp:p.compareOperator,"ChildOp SiblingOp, LogicOp":p.logicOperator,BinOp:p.arithmeticOperator,Important:p.modifier,Comment:p.blockComment,ColorLiteral:p.color,"ParenthesizedContent StringLiteral":p.string,":":p.punctuation,"PseudoOp #":p.derefOperator,"; ,":p.separator,"( )":p.paren,"[ ]":p.squareBracket,"{ }":p.brace}),mQ={__proto__:null,lang:34,"nth-child":34,"nth-last-child":34,"nth-of-type":34,"nth-last-of-type":34,dir:34,"host-context":34,url:62,"url-prefix":62,domain:62,regexp:62,selector:140},gQ={__proto__:null,"@import":120,"@media":144,"@charset":148,"@namespace":152,"@keyframes":158,"@supports":170},bQ={__proto__:null,not:134,only:134},SQ=Nt.deserialize({version:14,states:":jQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#CiO$qQ[O'#DUO$vQ[O'#DXOOQP'#En'#EnO${QdO'#DhO%jQ[O'#DuO${QdO'#DwO%{Q[O'#DyO&WQ[O'#D|O&`Q[O'#ESO&nQ[O'#EUOOQS'#Em'#EmOOQS'#EX'#EXQYQ[OOO&uQXO'#CdO'jQWO'#DdO'oQWO'#EsO'zQ[O'#EsQOQWOOP(UO#tO'#C_POOO)C@])C@]OOQP'#Ch'#ChOOQP,59Q,59QO#kQ[O,59QO(aQ[O'#E]O({QWO,58{O)TQ[O,59TO$qQ[O,59pO$vQ[O,59sO(aQ[O,59vO(aQ[O,59xO(aQ[O,59yO)`Q[O'#DcOOQS,58{,58{OOQP'#Cl'#ClOOQO'#DS'#DSOOQP,59T,59TO)gQWO,59TO)lQWO,59TOOQP'#DW'#DWOOQP,59p,59pOOQO'#DY'#DYO)qQ`O,59sOOQS'#Cq'#CqO${QdO'#CrO)yQvO'#CtO+ZQtO,5:SOOQO'#Cy'#CyO)lQWO'#CxO+oQWO'#CzO+tQ[O'#DPOOQS'#Ep'#EpOOQO'#Dk'#DkO+|Q[O'#DrO,[QWO'#EtO&`Q[O'#DpO,jQWO'#DsOOQO'#Eu'#EuO)OQWO,5:aO,oQpO,5:cOOQS'#D{'#D{O,wQWO,5:eO,|Q[O,5:eOOQO'#EO'#EOO-UQWO,5:hO-ZQWO,5:nO-cQWO,5:pOOQS-E8V-E8VO-kQdO,5:OO-{Q[O'#E_O.YQWO,5;_O.YQWO,5;_POOO'#EW'#EWP.eO#tO,58yPOOO,58y,58yOOQP1G.l1G.lO/[QXO,5:wOOQO-E8Z-E8ZOOQS1G.g1G.gOOQP1G.o1G.oO)gQWO1G.oO)lQWO1G.oOOQP1G/[1G/[O/iQ`O1G/_O0SQXO1G/bO0jQXO1G/dO1QQXO1G/eO1hQWO,59}O1mQ[O'#DTO1tQdO'#CpOOQP1G/_1G/_O${QdO1G/_O1{QpO,59^OOQS,59`,59`O${QdO,59bO2TQWO1G/nOOQS,59d,59dO2YQ!bO,59fOOQS'#DQ'#DQOOQS'#EZ'#EZO2eQ[O,59kOOQS,59k,59kO2mQWO'#DkO2xQWO,5:WO2}QWO,5:^O&`Q[O,5:YO&`Q[O'#E`O3VQWO,5;`O3bQWO,5:[O(aQ[O,5:_OOQS1G/{1G/{OOQS1G/}1G/}OOQS1G0P1G0PO3sQWO1G0PO3xQdO'#EPOOQS1G0S1G0SOOQS1G0Y1G0YOOQS1G0[1G0[O4TQtO1G/jOOQO1G/j1G/jOOQO,5:y,5:yO4kQ[O,5:yOOQO-E8]-E8]O4xQWO1G0yPOOO-E8U-E8UPOOO1G.e1G.eOOQP7+$Z7+$ZOOQP7+$y7+$yO${QdO7+$yOOQS1G/i1G/iO5TQXO'#ErO5[QWO,59oO5aQtO'#EYO6XQdO'#EoO6cQWO,59[O6hQpO7+$yOOQS1G.x1G.xOOQS1G.|1G.|OOQS7+%Y7+%YOOQS1G/Q1G/QO6pQWO1G/QOOQS-E8X-E8XOOQS1G/V1G/VO${QdO1G/rOOQO1G/x1G/xOOQO1G/t1G/tO6uQWO,5:zOOQO-E8^-E8^O7TQXO1G/yOOQS7+%k7+%kO7[QYO'#CtOOQO'#ER'#ERO7gQ`O'#EQOOQO'#EQ'#EQO7rQWO'#EaO7zQdO,5:kOOQS,5:k,5:kO8VQtO'#E^O${QdO'#E^O9WQdO7+%UOOQO7+%U7+%UOOQO1G0e1G0eO9kQpO<PAN>PO;]QdO,5:vOOQO-E8Y-E8YOOQO<T![;'S%^;'S;=`%o<%lO%^l;TUp`Oy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^l;nYp`#e[Oy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^l[[p`#e[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^n?VSu^Oy%^z;'S%^;'S;=`%o<%lO%^l?hWkWOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^n@VUZQOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTkWOy%^z{@}{;'S%^;'S;=`%o<%lO%^~AUSp`#]~Oy%^z;'S%^;'S;=`%o<%lO%^lAg[#e[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^bBbU^QOy%^z![%^![!]Bt!];'S%^;'S;=`%o<%lO%^bB{S_Qp`Oy%^z;'S%^;'S;=`%o<%lO%^nC^S!Z^Oy%^z;'S%^;'S;=`%o<%lO%^dCoS}SOy%^z;'S%^;'S;=`%o<%lO%^bDQU!PQOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS!PQp`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[!]Qp`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^nFfSr^Oy%^z;'S%^;'S;=`%o<%lO%^nFwSq^Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUp`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!cQp`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!UUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!T^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!SQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[dQ,OQ,uQ,1,2,3,4,new Rs("m~RRYZ[z{a~~g~aO#_~~dP!P!Qg~lO#`~~",28,106)],topRules:{StyleSheet:[0,4],Styles:[1,87]},specialized:[{term:101,get:n=>mQ[n]||-1},{term:59,get:n=>gQ[n]||-1},{term:102,get:n=>bQ[n]||-1}],tokenPrec:1219});let wr=null;function kr(){if(!wr&&typeof document=="object"&&document.body){let{style:n}=document.body,e=[],t=new Set;for(let i in n)i!="cssText"&&i!="cssFloat"&&typeof n[i]=="string"&&(/[A-Z]/.test(i)&&(i=i.replace(/[A-Z]/g,s=>"-"+s.toLowerCase())),t.has(i)||(e.push(i),t.add(i)));wr=e.sort().map(i=>({type:"property",label:i,apply:i+": "}))}return wr||[]}const Eh=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(n=>({type:"class",label:n})),Dh=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(n=>({type:"keyword",label:n})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(n=>({type:"constant",label:n}))),yQ=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(n=>({type:"type",label:n})),QQ=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(n=>({type:"keyword",label:n})),dt=/^(\w[\w-]*|-\w[\w-]*|)$/,xQ=/^-(-[\w-]*)?$/;function wQ(n,e){var t;if((n.name=="("||n.type.isError)&&(n=n.parent||n),n.name!="ArgList")return!1;let i=(t=n.parent)===null||t===void 0?void 0:t.firstChild;return i?.name!="Callee"?!1:e.sliceString(i.from,i.to)=="var"}const Wh=new Pf,kQ=["Declaration"];function PQ(n){for(let e=n;;){if(e.type.isTop)return e;if(!(e=e.parent))return n}}function ud(n,e,t){if(e.to-e.from>4096){let i=Wh.get(e);if(i)return i;let s=[],r=new Set,o=e.cursor(G.IncludeAnonymous);if(o.firstChild())do for(let l of ud(n,o.node,t))r.has(l.label)||(r.add(l.label),s.push(l));while(o.nextSibling());return Wh.set(e,s),s}else{let i=[],s=new Set;return e.cursor().iterate(r=>{var o;if(t(r)&&r.matchContext(kQ)&&((o=r.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let l=n.sliceString(r.from,r.to);s.has(l)||(s.add(l),i.push({label:l,type:"variable"}))}}),i}}const $Q=n=>e=>{let{state:t,pos:i}=e,s=ee(t).resolveInner(i,-1),r=s.type.isError&&s.from==s.to-1&&t.doc.sliceString(s.from,s.to)=="-";if(s.name=="PropertyName"||(r||s.name=="TagName")&&/^(Block|Styles)$/.test(s.resolve(s.to).name))return{from:s.from,options:kr(),validFor:dt};if(s.name=="ValueName")return{from:s.from,options:Dh,validFor:dt};if(s.name=="PseudoClassName")return{from:s.from,options:Eh,validFor:dt};if(n(s)||(e.explicit||r)&&wQ(s,t.doc))return{from:n(s)||r?s.from:i,options:ud(t.doc,PQ(s),n),validFor:xQ};if(s.name=="TagName"){for(let{parent:a}=s;a;a=a.parent)if(a.name=="Block")return{from:s.from,options:kr(),validFor:dt};return{from:s.from,options:yQ,validFor:dt}}if(s.name=="AtKeyword")return{from:s.from,options:QQ,validFor:dt};if(!e.explicit)return null;let o=s.resolve(i),l=o.childBefore(i);return l&&l.name==":"&&o.name=="PseudoClassSelector"?{from:i,options:Eh,validFor:dt}:l&&l.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:i,options:Dh,validFor:dt}:o.name=="Block"||o.name=="Styles"?{from:i,options:kr(),validFor:dt}:null},vQ=$Q(n=>n.name=="VariableName"),Xs=Ut.define({name:"css",parser:SQ.configure({props:[pn.add({Declaration:ri()}),mn.add({"Block KeyframeList":Jo})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function ZQ(){return new Ws(Xs,Xs.data.of({autocomplete:vQ}))}const CQ=314,TQ=315,Lh=1,RQ=2,AQ=3,XQ=4,MQ=316,VQ=318,qQ=319,EQ=5,DQ=6,WQ=0,Zo=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],dd=125,LQ=59,Co=47,jQ=42,_Q=43,BQ=45,YQ=60,zQ=44,UQ=63,IQ=46,NQ=91,GQ=new Ku({start:!1,shift(n,e){return e==EQ||e==DQ||e==VQ?n:e==qQ},strict:!1}),FQ=new Ye((n,e)=>{let{next:t}=n;(t==dd||t==-1||e.context)&&n.acceptToken(MQ)},{contextual:!0,fallback:!0}),HQ=new Ye((n,e)=>{let{next:t}=n,i;Zo.indexOf(t)>-1||t==Co&&((i=n.peek(1))==Co||i==jQ)||t!=dd&&t!=LQ&&t!=-1&&!e.context&&n.acceptToken(CQ)},{contextual:!0}),KQ=new Ye((n,e)=>{n.next==NQ&&!e.context&&n.acceptToken(TQ)},{contextual:!0}),JQ=new Ye((n,e)=>{let{next:t}=n;if(t==_Q||t==BQ){if(n.advance(),t==n.next){n.advance();let i=!e.context&&e.canShift(Lh);n.acceptToken(i?Lh:RQ)}}else t==UQ&&n.peek(1)==IQ&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(AQ))},{contextual:!0});function Pr(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const e1=new Ye((n,e)=>{if(n.next!=YQ||!e.dialectEnabled(WQ)||(n.advance(),n.next==Co))return;let t=0;for(;Zo.indexOf(n.next)>-1;)n.advance(),t++;if(Pr(n.next,!0)){for(n.advance(),t++;Pr(n.next,!1);)n.advance(),t++;for(;Zo.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==zQ)return;for(let i=0;;i++){if(i==7){if(!Pr(n.next,!0))return;break}if(n.next!="extends".charCodeAt(i))break;n.advance(),t++}}n.acceptToken(XQ,-t)}),t1=dn({"get set async static":p.modifier,"for while do if else switch try catch finally return throw break continue default case":p.controlKeyword,"in of await yield void typeof delete instanceof":p.operatorKeyword,"let var const using function class extends":p.definitionKeyword,"import export from":p.moduleKeyword,"with debugger as new":p.keyword,TemplateString:p.special(p.string),super:p.atom,BooleanLiteral:p.bool,this:p.self,null:p.null,Star:p.modifier,VariableName:p.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":p.function(p.variableName),VariableDefinition:p.definition(p.variableName),Label:p.labelName,PropertyName:p.propertyName,PrivatePropertyName:p.special(p.propertyName),"CallExpression/MemberExpression/PropertyName":p.function(p.propertyName),"FunctionDeclaration/VariableDefinition":p.function(p.definition(p.variableName)),"ClassDeclaration/VariableDefinition":p.definition(p.className),"NewExpression/VariableName":p.className,PropertyDefinition:p.definition(p.propertyName),PrivatePropertyDefinition:p.definition(p.special(p.propertyName)),UpdateOp:p.updateOperator,"LineComment Hashbang":p.lineComment,BlockComment:p.blockComment,Number:p.number,String:p.string,Escape:p.escape,ArithOp:p.arithmeticOperator,LogicOp:p.logicOperator,BitOp:p.bitwiseOperator,CompareOp:p.compareOperator,RegExp:p.regexp,Equals:p.definitionOperator,Arrow:p.function(p.punctuation),": Spread":p.punctuation,"( )":p.paren,"[ ]":p.squareBracket,"{ }":p.brace,"InterpolationStart InterpolationEnd":p.special(p.brace),".":p.derefOperator,", ;":p.separator,"@":p.meta,TypeName:p.typeName,TypeDefinition:p.definition(p.typeName),"type enum interface implements namespace module declare":p.definitionKeyword,"abstract global Privacy readonly override":p.modifier,"is keyof unique infer asserts":p.operatorKeyword,JSXAttributeValue:p.attributeValue,JSXText:p.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":p.angleBracket,"JSXIdentifier JSXNameSpacedName":p.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":p.attributeName,"JSXBuiltin/JSXIdentifier":p.standard(p.tagName)}),i1={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,const:52,extends:56,this:60,true:68,false:68,null:80,void:84,typeof:88,super:104,new:138,delete:150,yield:159,await:163,class:168,public:231,private:231,protected:231,readonly:233,instanceof:252,satisfies:255,in:256,import:290,keyof:347,unique:351,infer:357,asserts:393,is:395,abstract:415,implements:417,type:419,let:422,var:424,using:427,interface:433,enum:437,namespace:443,module:445,declare:449,global:453,for:472,of:481,while:484,with:488,do:492,if:496,else:498,switch:502,case:508,try:514,catch:518,finally:522,return:526,throw:530,break:534,continue:538,debugger:542},n1={__proto__:null,async:125,get:127,set:129,declare:191,public:193,private:193,protected:193,static:195,abstract:197,override:199,readonly:205,accessor:207,new:399},s1={__proto__:null,"<":189},r1=Nt.deserialize({version:14,states:"$EOQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D_O.QQlO'#DeO.bQlO'#DpO%[QlO'#DxO0fQlO'#EQOOQ!0Lf'#EY'#EYO1PQ`O'#EVOOQO'#En'#EnOOQO'#Ij'#IjO1XQ`O'#GrO1dQ`O'#EmO1iQ`O'#EmO3hQ!0MxO'#JpO6[Q!0MxO'#JqO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#F{O9UQ`O'#FzOOQ!0Lf'#Jq'#JqOOQ!0Lb'#Jp'#JpO9ZQ`O'#GvOOQ['#K]'#K]O9fQ`O'#IWO9kQ!0LrO'#IXOOQ['#J^'#J^OOQ['#I]'#I]Q`QlOOQ`QlOOO9sQ!L^O'#DtO9zQlO'#D|O:RQlO'#EOO9aQ`O'#GrO:YQMhO'#CoO:hQ`O'#ElO:sQ`O'#EwO:xQMhO'#FdO;gQ`O'#GrOOQO'#K^'#K^O;lQ`O'#K^O;zQ`O'#GzO;zQ`O'#G{O;zQ`O'#G}O9aQ`O'#HQOYQ`O'#CeO>jQ`O'#HaO>rQ`O'#HgO>rQ`O'#HiO`QlO'#HkO>rQ`O'#HmO>rQ`O'#HpO>wQ`O'#HvO>|Q!0LsO'#H|O%[QlO'#IOO?XQ!0LsO'#IQO?dQ!0LsO'#ISO9kQ!0LrO'#IUO?oQ!0MxO'#CiO@qQpO'#DjQOQ`OOO%[QlO'#EOOAXQ`O'#ERO:YQMhO'#ElOAdQ`O'#ElOAoQ!bO'#FdOOQ['#Cg'#CgOOQ!0Lb'#Do'#DoOOQ!0Lb'#Jt'#JtO%[QlO'#JtOOQO'#Jw'#JwOOQO'#If'#IfOBoQpO'#EeOOQ!0Lb'#Ed'#EdOOQ!0Lb'#J{'#J{OCkQ!0MSO'#EeOCuQpO'#EUOOQO'#Jv'#JvODZQpO'#JwOEhQpO'#EUOCuQpO'#EePEuO&2DjO'#CbPOOO)CD{)CD{OOOO'#I^'#I^OFQO#tO,59UOOQ!0Lh,59U,59UOOOO'#I_'#I_OF`O&jO,59UOFnQ!L^O'#DaOOOO'#Ia'#IaOFuO#@ItO,59yOOQ!0Lf,59y,59yOGTQlO'#IbOGhQ`O'#JrOIgQ!fO'#JrO+}QlO'#JrOInQ`O,5:POJUQ`O'#EnOJcQ`O'#KROJnQ`O'#KQOJnQ`O'#KQOJvQ`O,5;[OJ{Q`O'#KPOOQ!0Ln,5:[,5:[OKSQlO,5:[OMQQ!0MxO,5:dOMqQ`O,5:lON[Q!0LrO'#KOONcQ`O'#J}O9ZQ`O'#J}ONwQ`O'#J}O! PQ`O,5;ZO! UQ`O'#J}O!#ZQ!fO'#JqOOQ!0Lh'#Ci'#CiO%[QlO'#EQO!#yQ!fO,5:qOOQS'#Jx'#JxOOQO-ErOOQ['#Jf'#JfOOQ[,5>s,5>sOOQ[-EbQ!0MxO,5:hO%[QlO,5:hO!@xQ!0MxO,5:jOOQO,5@x,5@xO!AiQMhO,5=^O!AwQ!0LrO'#JgO9UQ`O'#JgO!BYQ!0LrO,59ZO!BeQpO,59ZO!BmQMhO,59ZO:YQMhO,59ZO!BxQ`O,5;XO!CQQ`O'#H`O!CfQ`O'#KbO%[QlO,5;|O!9lQpO,5wQ`O'#HVO9aQ`O'#HXO!D}Q`O'#HXO:YQMhO'#HZO!ESQ`O'#HZOOQ[,5=o,5=oO!EXQ`O'#H[O!EjQ`O'#CoO!EoQ`O,59PO!EyQ`O,59PO!HOQlO,59POOQ[,59P,59PO!H`Q!0LrO,59PO%[QlO,59PO!JkQlO'#HcOOQ['#Hd'#HdOOQ['#He'#HeO`QlO,5={O!KRQ`O,5={O`QlO,5>RO`QlO,5>TO!KWQ`O,5>VO`QlO,5>XO!K]Q`O,5>[O!KbQlO,5>bOOQ[,5>h,5>hO%[QlO,5>hO9kQ!0LrO,5>jOOQ[,5>l,5>lO# lQ`O,5>lOOQ[,5>n,5>nO# lQ`O,5>nOOQ[,5>p,5>pO#!YQpO'#D]O%[QlO'#JtO#!{QpO'#JtO##VQpO'#DkO##hQpO'#DkO#%yQlO'#DkO#&QQ`O'#JsO#&YQ`O,5:UO#&_Q`O'#ErO#&mQ`O'#KSO#&uQ`O,5;]O#&zQpO'#DkO#'XQpO'#ETOOQ!0Lf,5:m,5:mO%[QlO,5:mO#'`Q`O,5:mO>wQ`O,5;WO!BeQpO,5;WO!BmQMhO,5;WO:YQMhO,5;WO#'hQ`O,5@`O#'mQ07dO,5:qOOQO-E|O+}QlO,5>|OOQO,5?S,5?SO#*uQlO'#IbOOQO-E<`-E<`O#+SQ`O,5@^O#+[Q!fO,5@^O#+cQ`O,5@lOOQ!0Lf1G/k1G/kO%[QlO,5@mO#+kQ`O'#IhOOQO-ErQ`O1G3qO$4rQlO1G3sO$8vQlO'#HrOOQ[1G3v1G3vO$9TQ`O'#HxO>wQ`O'#HzOOQ[1G3|1G3|O$9]QlO1G3|O9kQ!0LrO1G4SOOQ[1G4U1G4UOOQ!0Lb'#G^'#G^O9kQ!0LrO1G4WO9kQ!0LrO1G4YO$=dQ`O,5@`O!(yQlO,5;^O9ZQ`O,5;^O>wQ`O,5:VO!(yQlO,5:VO!BeQpO,5:VO$=iQ?MtO,5:VOOQO,5;^,5;^O$=sQpO'#IcO$>ZQ`O,5@_OOQ!0Lf1G/p1G/pO$>cQpO'#IiO$>mQ`O,5@nOOQ!0Lb1G0w1G0wO##hQpO,5:VOOQO'#Ie'#IeO$>uQpO,5:oOOQ!0Ln,5:o,5:oO#'cQ`O1G0XOOQ!0Lf1G0X1G0XO%[QlO1G0XOOQ!0Lf1G0r1G0rO>wQ`O1G0rO!BeQpO1G0rO!BmQMhO1G0rOOQ!0Lb1G5z1G5zO!BYQ!0LrO1G0[OOQO1G0k1G0kO%[QlO1G0kO$>|Q!0LrO1G0kO$?XQ!0LrO1G0kO!BeQpO1G0[OCuQpO1G0[O$?gQ!0LrO1G0kOOQO1G0[1G0[O$?{Q!0MxO1G0kPOOO-E|O$@iQ`O1G5xO$@qQ`O1G6WO$@yQ!fO1G6XO9ZQ`O,5?SO$ATQ!0MxO1G6UO%[QlO1G6UO$AeQ!0LrO1G6UO$AvQ`O1G6TO$AvQ`O1G6TO9ZQ`O1G6TO$BOQ`O,5?VO9ZQ`O,5?VOOQO,5?V,5?VO$BdQ`O,5?VO$)iQ`O,5?VOOQO-E^OOQ[,5>^,5>^O%[QlO'#HsO%=zQ`O'#HuOOQ[,5>d,5>dO9ZQ`O,5>dOOQ[,5>f,5>fOOQ[7+)h7+)hOOQ[7+)n7+)nOOQ[7+)r7+)rOOQ[7+)t7+)tO%>PQpO1G5zO%>kQ?MtO1G0xO%>uQ`O1G0xOOQO1G/q1G/qO%?QQ?MtO1G/qO>wQ`O1G/qO!(yQlO'#DkOOQO,5>},5>}OOQO-EwQ`O7+&^O!BeQpO7+&^OOQO7+%v7+%vO$?{Q!0MxO7+&VOOQO7+&V7+&VO%[QlO7+&VO%?[Q!0LrO7+&VO!BYQ!0LrO7+%vO!BeQpO7+%vO%?gQ!0LrO7+&VO%?uQ!0MxO7++pO%[QlO7++pO%@VQ`O7++oO%@VQ`O7++oOOQO1G4q1G4qO9ZQ`O1G4qO%@_Q`O1G4qOOQS7+%{7+%{O#'cQ`O<_OOQ[,5>a,5>aO&=aQ`O1G4OO9ZQ`O7+&dO!(yQlO7+&dOOQO7+%]7+%]O&=fQ?MtO1G6XO>wQ`O7+%]OOQ!0Lf<wQ`O<]Q`O<= ZOOQO7+*]7+*]O9ZQ`O7+*]OOQ[ANAjANAjO&>eQ!fOANAjO!&iQMhOANAjO#'cQ`OANAjO4UQ!fOANAjO&>lQ`OANAjO%[QlOANAjO&>tQ!0MzO7+'yO&AVQ!0MzO,5?_O&CbQ!0MzO,5?aO&EmQ!0MzO7+'{O&HOQ!fO1G4jO&HYQ?MtO7+&_O&J^Q?MvO,5=WO&LeQ?MvO,5=YO&LuQ?MvO,5=WO&MVQ?MvO,5=YO&MgQ?MvO,59sO' mQ?MvO,5wQ`O7+)jO'-]Q`O<|AN>|O%[QlOAN?]OOQO<PPPP!>XHwPPPPPPPPPP!AhP!BuPPHw!DWPHwPHwHwHwHwHwPHw!EjP!HtP!KzP!LO!LY!L^!L^P!HqP!Lb!LbP# hP# lHwPHw# r#$wCV@yP@yP@y@yP#&U@y@y#(h@y#+`@y#-l@y@y#.[#0p#0p#0u#1O#0p#1ZPP#0pP@y#1s@y#5r@y@y6aPPP#9wPPP#:b#:bP#:bP#:x#:bPP#;OP#:uP#:u#;c#:u#;}#R#>X#>c#>i#>s#>y#?Z#?a#@R#@e#@k#@q#AP#Af#CZ#Ci#Cp#E[#Ej#G[#Gj#Gp#Gv#G|#HW#H^#Hd#Hn#IQ#IWPPPPPPPPPPP#I^PPPPPPP#JR#MY#Nr#Ny$ RPPP$&mP$&v$)o$0Y$0]$0`$1_$1b$1i$1qP$1w$1zP$2h$2l$3d$4r$4w$5_PP$5d$5j$5n$5q$5u$5y$6u$7^$7u$7y$7|$8P$8V$8Y$8^$8bR!|RoqOXst!Z#d%l&p&r&s&u,n,s2S2VY!vQ'^-`1g5qQ%svQ%{yQ&S|Q&h!VS'U!e-WQ'd!iS'j!r!yU*h$|*X*lQ+l%|Q+y&UQ,_&bQ-^']Q-h'eQ-p'kQ0U*nQ1q,`R < TypeParamList const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:378,context:GQ,nodeProps:[["isolate",-8,5,6,14,35,37,49,51,53,""],["group",-26,9,17,19,66,206,210,214,215,217,220,223,233,235,241,243,245,247,250,256,262,264,266,268,270,272,273,"Statement",-34,13,14,30,33,34,40,49,52,53,55,60,68,70,74,78,80,82,83,108,109,118,119,135,138,140,141,142,143,144,146,147,166,168,170,"Expression",-23,29,31,35,39,41,43,172,174,176,177,179,180,181,183,184,185,187,188,189,200,202,204,205,"Type",-3,86,101,107,"ClassItem"],["openedBy",23,"<",36,"InterpolationStart",54,"[",58,"{",71,"(",159,"JSXStartCloseTag"],["closedBy",-2,24,167,">",38,"InterpolationEnd",48,"]",59,"}",72,")",164,"JSXEndTag"]],propSources:[t1],skippedNodes:[0,5,6,276],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(X!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(X!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(UpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(UpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Up(X!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Up(X!b'z0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(V#S$h&j'{0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Up(X!b'{0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!n),Q(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(T':f$h&j(X!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(X!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(X!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(X!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(X!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Up(X!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(X!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(UpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(UpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Up(X!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!V7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!V7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!V7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(X!b!V7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(X!b!V7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(X!b!V7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(X!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(X!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Up(X!bq'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Up(X!bq'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Up(X!bq'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Up(X!bq'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!e$b$h&j#})Lv(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#P-v$?V_![(CdtBr$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!o7`$h&j(Up(X!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Up(X!b'z0/l$[#t(R,2j(c$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Up(X!b'{0/l$[#t(R,2j(c$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[HQ,KQ,JQ,e1,2,3,4,5,6,7,8,9,10,11,12,13,14,FQ,new Rs("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOv~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!S~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(a~~",141,338),new Rs("j~RQYZXz{^~^O(O~~aP!P!Qd~iO(P~~",25,321)],topRules:{Script:[0,7],SingleExpression:[1,274],SingleClassItem:[2,275]},dialects:{jsx:0,ts:15091},dynamicPrecedences:{78:1,80:1,92:1,168:1,198:1},specialized:[{term:325,get:n=>i1[n]||-1},{term:341,get:n=>n1[n]||-1},{term:93,get:n=>s1[n]||-1}],tokenPrec:15116}),Od=[$e("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),$e("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),$e("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),$e("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),$e("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),$e(`try { + \${} +} catch (\${error}) { + \${} +}`,{label:"try",detail:"/ catch block",type:"keyword"}),$e("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),$e(`if (\${}) { + \${} +} else { + \${} +}`,{label:"if",detail:"/ else block",type:"keyword"}),$e(`class \${name} { + constructor(\${params}) { + \${} + } +}`,{label:"class",detail:"definition",type:"keyword"}),$e('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),$e('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],o1=Od.concat([$e("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),$e("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),$e("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),jh=new Pf,pd=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Ci(n){return(e,t)=>{let i=e.node.getChild("VariableDefinition");return i&&t(i,n),!0}}const l1=["FunctionDeclaration"],a1={FunctionDeclaration:Ci("function"),ClassDeclaration:Ci("class"),ClassExpression:()=>!0,EnumDeclaration:Ci("constant"),TypeAliasDeclaration:Ci("type"),NamespaceDeclaration:Ci("namespace"),VariableDefinition(n,e){n.matchContext(l1)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function md(n,e){let t=jh.get(e);if(t)return t;let i=[],s=!0;function r(o,l){let a=n.sliceString(o.from,o.to);i.push({label:a,type:l})}return e.cursor(G.IncludeAnonymous).iterate(o=>{if(s)s=!1;else if(o.name){let l=a1[o.name];if(l&&l(o,r)||pd.has(o.name))return!1}else if(o.to-o.from>8192){for(let l of md(n,o.node))i.push(l);return!1}}),jh.set(e,i),i}const _h=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,gd=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function h1(n){let e=ee(n.state).resolveInner(n.pos,-1);if(gd.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&_h.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let i=[];for(let s=e;s;s=s.parent)pd.has(s.name)&&(i=i.concat(md(n.state.doc,s)));return{options:i,from:t?e.from:n.pos,validFor:_h}}const lt=Ut.define({name:"javascript",parser:r1.configure({props:[pn.add({IfStatement:ri({except:/^\s*({|else\b)/}),TryStatement:ri({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:fg,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:i?1:2)*n.unit},Block:cg({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":ri({except:/^{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),mn.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Jo,BlockComment(n){return{from:n.from+2,to:n.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),bd={test:n=>/^JSX/.test(n.name),facet:Cf({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Sd=lt.configure({dialect:"ts"},"typescript"),yd=lt.configure({dialect:"jsx",props:[Fo.add(n=>n.isTop?[bd]:void 0)]}),Qd=lt.configure({dialect:"jsx ts",props:[Fo.add(n=>n.isTop?[bd]:void 0)]},"typescript");let xd=n=>({label:n,type:"keyword"});const wd="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(xd),c1=wd.concat(["declare","implements","private","protected","public"].map(xd));function f1(n={}){let e=n.jsx?n.typescript?Qd:yd:n.typescript?Sd:lt,t=n.typescript?o1.concat(c1):Od.concat(wd);return new Ws(e,[lt.data.of({autocomplete:Cb(gd,Vu(t))}),lt.data.of({autocomplete:h1}),n.jsx?O1:[]])}function u1(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function Bh(n,e,t=n.length){for(let i=e?.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return n.sliceString(i.from,Math.min(i.to,t));return""}const d1=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),O1=v.inputHandler.of((n,e,t,i,s)=>{if((d1?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||i!=">"&&i!="/"||!lt.isActiveAt(n.state,e,-1))return!1;let r=s(),{state:o}=r,l=o.changeByRange(a=>{var h;let{head:c}=a,f=ee(o).resolveInner(c-1,-1),u;if(f.name=="JSXStartTag"&&(f=f.parent),!(o.doc.sliceString(c-1,c)!=i||f.name=="JSXAttributeValue"&&f.to>c)){if(i==">"&&f.name=="JSXFragmentTag")return{range:a,changes:{from:c,insert:""}};if(i=="/"&&f.name=="JSXStartCloseTag"){let d=f.parent,O=d.parent;if(O&&d.from==c-2&&((u=Bh(o.doc,O.firstChild,c))||((h=O.firstChild)===null||h===void 0?void 0:h.name)=="JSXFragmentTag")){let m=`${u}>`;return{range:y.cursor(c+m.length,-1),changes:{from:c,insert:m}}}}else if(i==">"){let d=u1(f);if(d&&d.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(c,c+2))&&(u=Bh(o.doc,d,c)))return{range:a,changes:{from:c,insert:``}}}}return{range:a}});return l.changes.empty?!1:(n.dispatch([r,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Ti=["_blank","_self","_top","_parent"],$r=["ascii","utf-8","utf-16","latin1","latin1"],vr=["get","post","put","delete"],Zr=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Me=["true","false"],T={},p1={a:{attrs:{href:null,ping:null,type:null,media:null,target:Ti,hreflang:null}},abbr:T,address:T,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:T,aside:T,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:T,base:{attrs:{href:null,target:Ti}},bdi:T,bdo:T,blockquote:{attrs:{cite:null}},body:T,br:T,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Zr,formmethod:vr,formnovalidate:["novalidate"],formtarget:Ti,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:T,center:T,cite:T,code:T,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:T,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:T,div:T,dl:T,dt:T,em:T,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:T,figure:T,footer:T,form:{attrs:{action:null,name:null,"accept-charset":$r,autocomplete:["on","off"],enctype:Zr,method:vr,novalidate:["novalidate"],target:Ti}},h1:T,h2:T,h3:T,h4:T,h5:T,h6:T,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:T,hgroup:T,hr:T,html:{attrs:{manifest:null}},i:T,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Zr,formmethod:vr,formnovalidate:["novalidate"],formtarget:Ti,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:T,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:T,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:T,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:$r,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:T,noscript:T,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:T,param:{attrs:{name:null,value:null}},pre:T,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:T,rt:T,ruby:T,samp:T,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:$r}},section:T,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:T,source:{attrs:{src:null,type:null,media:null}},span:T,strong:T,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:T,summary:T,sup:T,table:T,tbody:T,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:T,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:T,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:T,time:{attrs:{datetime:null}},title:T,tr:T,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:T,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:T},kd={accesskey:null,class:null,contenteditable:Me,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Me,autocorrect:Me,autocapitalize:Me,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Me,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Me,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Me,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Me,"aria-hidden":Me,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Me,"aria-multiselectable":Me,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Me,"aria-relevant":null,"aria-required":Me,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Pd="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(n=>"on"+n);for(let n of Pd)kd[n]=null;class Ms{constructor(e,t){this.tags={...p1,...e},this.globalAttrs={...kd,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}Ms.default=new Ms;function gi(n,e,t=n.length){if(!e)return"";let i=e.firstChild,s=i&&i.getChild("TagName");return s?n.sliceString(s.from,Math.min(s.to,t)):""}function bi(n,e=!1){for(;n;n=n.parent)if(n.name=="Element")if(e)e=!1;else return n;return null}function $d(n,e,t){let i=t.tags[gi(n,bi(e))];return i?.children||t.allTags}function bl(n,e){let t=[];for(let i=bi(e);i&&!i.type.isTop;i=bi(i.parent)){let s=gi(n,i);if(s&&i.lastChild.name=="CloseTag")break;s&&t.indexOf(s)<0&&(e.name=="EndTag"||e.from>=i.firstChild.to)&&t.push(s)}return t}const vd=/^[:\-\.\w\u00b7-\uffff]*$/;function Yh(n,e,t,i,s){let r=/\s*>/.test(n.sliceDoc(s,s+5))?"":">",o=bi(t,t.name=="StartTag"||t.name=="TagName");return{from:i,to:s,options:$d(n.doc,o,e).map(l=>({label:l,type:"type"})).concat(bl(n.doc,t).map((l,a)=>({label:"/"+l,apply:"/"+l+r,type:"type",boost:99-a}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function zh(n,e,t,i){let s=/\s*>/.test(n.sliceDoc(i,i+5))?"":">";return{from:t,to:i,options:bl(n.doc,e).map((r,o)=>({label:r,apply:r+s,type:"type",boost:99-o})),validFor:vd}}function m1(n,e,t,i){let s=[],r=0;for(let o of $d(n.doc,t,e))s.push({label:"<"+o,type:"type"});for(let o of bl(n.doc,t))s.push({label:"",type:"type",boost:99-r++});return{from:i,to:i,options:s,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function g1(n,e,t,i,s){let r=bi(t),o=r?e.tags[gi(n.doc,r)]:null,l=o&&o.attrs?Object.keys(o.attrs):[],a=o&&o.globalAttrs===!1?l:l.length?l.concat(e.globalAttrNames):e.globalAttrNames;return{from:i,to:s,options:a.map(h=>({label:h,type:"property"})),validFor:vd}}function b1(n,e,t,i,s){var r;let o=(r=t.parent)===null||r===void 0?void 0:r.getChild("AttributeName"),l=[],a;if(o){let h=n.sliceDoc(o.from,o.to),c=e.globalAttrs[h];if(!c){let f=bi(t),u=f?e.tags[gi(n.doc,f)]:null;c=u?.attrs&&u.attrs[h]}if(c){let f=n.sliceDoc(i,s).toLowerCase(),u='"',d='"';/^['"]/.test(f)?(a=f[0]=='"'?/^[^"]*$/:/^[^']*$/,u="",d=n.sliceDoc(s,s+1)==f[0]?"":f[0],f=f.slice(1),i++):a=/^[^\s<>='"]*$/;for(let O of c)l.push({label:O,apply:u+O+d,type:"constant"})}}return{from:i,to:s,options:l,validFor:a}}function S1(n,e){let{state:t,pos:i}=e,s=ee(t).resolveInner(i,-1),r=s.resolve(i);for(let o=i,l;r==s&&(l=s.childBefore(o));){let a=l.lastChild;if(!a||!a.type.isError||a.fromS1(i,s)}const Q1=lt.parser.configure({top:"SingleExpression"}),Zd=[{tag:"script",attrs:n=>n.type=="text/typescript"||n.lang=="ts",parser:Sd.parser},{tag:"script",attrs:n=>n.type=="text/babel"||n.type=="text/jsx",parser:yd.parser},{tag:"script",attrs:n=>n.type=="text/typescript-jsx",parser:Qd.parser},{tag:"script",attrs(n){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(n.type)},parser:Q1},{tag:"script",attrs(n){return!n.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(n.type)},parser:lt.parser},{tag:"style",attrs(n){return(!n.lang||n.lang=="css")&&(!n.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(n.type))},parser:Xs.parser}],Cd=[{name:"style",parser:Xs.parser.configure({top:"Styles"})}].concat(Pd.map(n=>({name:n,parser:lt.parser}))),Td=Ut.define({name:"html",parser:Jy.configure({props:[pn.add({Element(n){let e=/^(\s*)(<\/)?/.exec(n.textAfter);return n.node.to<=n.pos+e[0].length?n.continue():n.lineIndent(n.node.from)+(e[2]?0:n.unit)},"OpenTag CloseTag SelfClosingTag"(n){return n.column(n.node.from)+n.unit},Document(n){if(n.pos+/\s*/.exec(n.textAfter)[0].lengthn.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),rs=Td.configure({wrap:ad(Zd,Cd)});function x1(n={}){let e="",t;n.matchClosingTags===!1&&(e="noMatch"),n.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(n.nestedLanguages&&n.nestedLanguages.length||n.nestedAttributes&&n.nestedAttributes.length)&&(t=ad((n.nestedLanguages||[]).concat(Zd),(n.nestedAttributes||[]).concat(Cd)));let i=t?Td.configure({wrap:t,dialect:e}):e?rs.configure({dialect:e}):rs;return new Ws(i,[rs.data.of({autocomplete:y1(n)}),n.autoCloseTags!==!1?w1:[],f1().support,ZQ().support])}const Uh=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),w1=v.inputHandler.of((n,e,t,i,s)=>{if(n.composing||n.state.readOnly||e!=t||i!=">"&&i!="/"||!rs.isActiveAt(n.state,e,-1))return!1;let r=s(),{state:o}=r,l=o.changeByRange(a=>{var h,c,f;let u=o.doc.sliceString(a.from-1,a.to)==i,{head:d}=a,O=ee(o).resolveInner(d,-1),m;if(u&&i==">"&&O.name=="EndTag"){let g=O.parent;if(((c=(h=g.parent)===null||h===void 0?void 0:h.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(m=gi(o.doc,g.parent,d))&&!Uh.has(m)){let b=d+(o.doc.sliceString(d,d+1)===">"?1:0),S=``;return{range:a,changes:{from:d,to:b,insert:S}}}}else if(u&&i=="/"&&O.name=="IncompleteCloseTag"){let g=O.parent;if(O.from==d-2&&((f=g.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(m=gi(o.doc,g,d))&&!Uh.has(m)){let b=d+(o.doc.sliceString(d,d+1)===">"?1:0),S=`${m}>`;return{range:y.cursor(d+S.length,-1),changes:{from:d,to:b,insert:S}}}}return{range:a}});return l.changes.empty?!1:(n.dispatch([r,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function Z1({editable:n,basicSetup:e,_extensions:t={},...i}){const{theme:s}=Xd(),r=n?e:{...typeof e=="object"?e:{},highlightActiveLine:!1,highlightActiveLineGutter:!1},o=Object.entries(t??{}).map(([l,a])=>{switch(l){case"json":return py();case"liquid":case"html":return x1(a)}}).filter(Boolean);return Ih.jsx(Fu,{theme:s==="dark"?"dark":"light",editable:n,basicSetup:r,extensions:[...o,v.lineWrapping],...i})}export{Z1 as default}; diff --git a/public/admin/assets/DataSchemaCanvas-Bidf4HWW.js b/public/admin/assets/DataSchemaCanvas-Bidf4HWW.js new file mode 100644 index 0000000..6242c7f --- /dev/null +++ b/public/admin/assets/DataSchemaCanvas-Bidf4HWW.js @@ -0,0 +1 @@ +import{g as nt,r as it,j as A,D as Qe,t as at,H as Ke,P as X,T as st,a as ot,u as dt,b as ut,M as lt,R as ht,C as ft,c as ct}from"./main-CfjI0j-e.js";var Z,Je;function ze(){if(Je)return Z;Je=1;var v="\0",p="\0",u="";class d{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>{};_defaultEdgeLabelFn=()=>{};_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(r){r&&(this._isDirected=Object.hasOwn(r,"directed")?r.directed:!0,this._isMultigraph=Object.hasOwn(r,"multigraph")?r.multigraph:!1,this._isCompound=Object.hasOwn(r,"compound")?r.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[p]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(r){return this._label=r,this}graph(){return this._label}setDefaultNodeLabel(r){return this._defaultNodeLabelFn=r,typeof r!="function"&&(this._defaultNodeLabelFn=()=>r),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var r=this;return this.nodes().filter(t=>Object.keys(r._in[t]).length===0)}sinks(){var r=this;return this.nodes().filter(t=>Object.keys(r._out[t]).length===0)}setNodes(r,t){var l=arguments,h=this;return r.forEach(function(w){l.length>1?h.setNode(w,t):h.setNode(w)}),this}setNode(r,t){return Object.hasOwn(this._nodes,r)?(arguments.length>1&&(this._nodes[r]=t),this):(this._nodes[r]=arguments.length>1?t:this._defaultNodeLabelFn(r),this._isCompound&&(this._parent[r]=p,this._children[r]={},this._children[p][r]=!0),this._in[r]={},this._preds[r]={},this._out[r]={},this._sucs[r]={},++this._nodeCount,this)}node(r){return this._nodes[r]}hasNode(r){return Object.hasOwn(this._nodes,r)}removeNode(r){var t=this;if(Object.hasOwn(this._nodes,r)){var l=h=>t.removeEdge(t._edgeObjs[h]);delete this._nodes[r],this._isCompound&&(this._removeFromParentsChildList(r),delete this._parent[r],this.children(r).forEach(function(h){t.setParent(h)}),delete this._children[r]),Object.keys(this._in[r]).forEach(l),delete this._in[r],delete this._preds[r],Object.keys(this._out[r]).forEach(l),delete this._out[r],delete this._sucs[r],--this._nodeCount}return this}setParent(r,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(t===void 0)t=p;else{t+="";for(var l=t;l!==void 0;l=this.parent(l))if(l===r)throw new Error("Setting "+t+" as parent of "+r+" would create a cycle");this.setNode(t)}return this.setNode(r),this._removeFromParentsChildList(r),this._parent[r]=t,this._children[t][r]=!0,this}_removeFromParentsChildList(r){delete this._children[this._parent[r]][r]}parent(r){if(this._isCompound){var t=this._parent[r];if(t!==p)return t}}children(r=p){if(this._isCompound){var t=this._children[r];if(t)return Object.keys(t)}else{if(r===p)return this.nodes();if(this.hasNode(r))return[]}}predecessors(r){var t=this._preds[r];if(t)return Object.keys(t)}successors(r){var t=this._sucs[r];if(t)return Object.keys(t)}neighbors(r){var t=this.predecessors(r);if(t){const h=new Set(t);for(var l of this.successors(r))h.add(l);return Array.from(h.values())}}isLeaf(r){var t;return this.isDirected()?t=this.successors(r):t=this.neighbors(r),t.length===0}filterNodes(r){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var l=this;Object.entries(this._nodes).forEach(function([j,c]){r(j)&&t.setNode(j,c)}),Object.values(this._edgeObjs).forEach(function(j){t.hasNode(j.v)&&t.hasNode(j.w)&&t.setEdge(j,l.edge(j))});var h={};function w(j){var c=l.parent(j);return c===void 0||t.hasNode(c)?(h[j]=c,c):c in h?h[c]:w(c)}return this._isCompound&&t.nodes().forEach(j=>t.setParent(j,w(j))),t}setDefaultEdgeLabel(r){return this._defaultEdgeLabelFn=r,typeof r!="function"&&(this._defaultEdgeLabelFn=()=>r),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(r,t){var l=this,h=arguments;return r.reduce(function(w,j){return h.length>1?l.setEdge(w,j,t):l.setEdge(w,j),j}),this}setEdge(){var r,t,l,h,w=!1,j=arguments[0];typeof j=="object"&&j!==null&&"v"in j?(r=j.v,t=j.w,l=j.name,arguments.length===2&&(h=arguments[1],w=!0)):(r=j,t=arguments[1],l=arguments[3],arguments.length>2&&(h=arguments[2],w=!0)),r=""+r,t=""+t,l!==void 0&&(l=""+l);var c=e(this._isDirected,r,t,l);if(Object.hasOwn(this._edgeLabels,c))return w&&(this._edgeLabels[c]=h),this;if(l!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(r),this.setNode(t),this._edgeLabels[c]=w?h:this._defaultEdgeLabelFn(r,t,l);var E=s(this._isDirected,r,t,l);return r=E.v,t=E.w,Object.freeze(E),this._edgeObjs[c]=E,a(this._preds[t],r),a(this._sucs[r],t),this._in[t][c]=E,this._out[r][c]=E,this._edgeCount++,this}edge(r,t,l){var h=arguments.length===1?i(this._isDirected,arguments[0]):e(this._isDirected,r,t,l);return this._edgeLabels[h]}edgeAsObj(){const r=this.edge(...arguments);return typeof r!="object"?{label:r}:r}hasEdge(r,t,l){var h=arguments.length===1?i(this._isDirected,arguments[0]):e(this._isDirected,r,t,l);return Object.hasOwn(this._edgeLabels,h)}removeEdge(r,t,l){var h=arguments.length===1?i(this._isDirected,arguments[0]):e(this._isDirected,r,t,l),w=this._edgeObjs[h];return w&&(r=w.v,t=w.w,delete this._edgeLabels[h],delete this._edgeObjs[h],n(this._preds[t],r),n(this._sucs[r],t),delete this._in[t][h],delete this._out[r][h],this._edgeCount--),this}inEdges(r,t){var l=this._in[r];if(l){var h=Object.values(l);return t?h.filter(w=>w.v===t):h}}outEdges(r,t){var l=this._out[r];if(l){var h=Object.values(l);return t?h.filter(w=>w.w===t):h}}nodeEdges(r,t){var l=this.inEdges(r,t);if(l)return l.concat(this.outEdges(r,t))}}function a(o,r){o[r]?o[r]++:o[r]=1}function n(o,r){--o[r]||delete o[r]}function e(o,r,t,l){var h=""+r,w=""+t;if(!o&&h>w){var j=h;h=w,w=j}return h+u+w+u+(l===void 0?v:l)}function s(o,r,t,l){var h=""+r,w=""+t;if(!o&&h>w){var j=h;h=w,w=j}var c={v:h,w};return l&&(c.name=l),c}function i(o,r){return e(o,r.v,r.w,r.name)}return Z=d,Z}var ee,Ze;function pt(){return Ze||(Ze=1,ee="2.2.4"),ee}var re,er;function mt(){return er||(er=1,re={Graph:ze(),version:pt()}),re}var te,rr;function bt(){if(rr)return te;rr=1;var v=ze();te={write:p,read:a};function p(n){var e={options:{directed:n.isDirected(),multigraph:n.isMultigraph(),compound:n.isCompound()},nodes:u(n),edges:d(n)};return n.graph()!==void 0&&(e.value=structuredClone(n.graph())),e}function u(n){return n.nodes().map(function(e){var s=n.node(e),i=n.parent(e),o={v:e};return s!==void 0&&(o.value=s),i!==void 0&&(o.parent=i),o})}function d(n){return n.edges().map(function(e){var s=n.edge(e),i={v:e.v,w:e.w};return e.name!==void 0&&(i.name=e.name),s!==void 0&&(i.value=s),i})}function a(n){var e=new v(n.options).setGraph(n.value);return n.nodes.forEach(function(s){e.setNode(s.v,s.value),s.parent&&e.setParent(s.v,s.parent)}),n.edges.forEach(function(s){e.setEdge({v:s.v,w:s.w,name:s.name},s.value)}),e}return te}var ne,tr;function gt(){if(tr)return ne;tr=1,ne=v;function v(p){var u={},d=[],a;function n(e){Object.hasOwn(u,e)||(u[e]=!0,a.push(e),p.successors(e).forEach(n),p.predecessors(e).forEach(n))}return p.nodes().forEach(function(e){a=[],n(e),a.length&&d.push(a)}),d}return ne}var ie,nr;function $r(){if(nr)return ie;nr=1;class v{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map(function(u){return u.key})}has(u){return Object.hasOwn(this._keyIndices,u)}priority(u){var d=this._keyIndices[u];if(d!==void 0)return this._arr[d].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(u,d){var a=this._keyIndices;if(u=String(u),!Object.hasOwn(a,u)){var n=this._arr,e=n.length;return a[u]=e,n.push({key:u,priority:d}),this._decrease(e),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var u=this._arr.pop();return delete this._keyIndices[u.key],this._heapify(0),u.key}decrease(u,d){var a=this._keyIndices[u];if(d>this._arr[a].priority)throw new Error("New priority is greater than current priority. Key: "+u+" Old: "+this._arr[a].priority+" New: "+d);this._arr[a].priority=d,this._decrease(a)}_heapify(u){var d=this._arr,a=2*u,n=a+1,e=u;a>1,!(d[n].priority1;function u(a,n,e,s){return d(a,String(n),e||p,s||function(i){return a.outEdges(i)})}function d(a,n,e,s){var i={},o=new v,r,t,l=function(h){var w=h.v!==r?h.v:h.w,j=i[w],c=e(h),E=t.distance+c;if(c<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+h+" Weight: "+c);E0&&(r=o.removeMin(),t=i[r],t.distance!==Number.POSITIVE_INFINITY);)s(r).forEach(l);return i}return ae}var se,ar;function vt(){if(ar)return se;ar=1;var v=Ur();se=p;function p(u,d,a){return u.nodes().reduce(function(n,e){return n[e]=v(u,e,d,a),n},{})}return se}var oe,sr;function Xr(){if(sr)return oe;sr=1,oe=v;function v(p){var u=0,d=[],a={},n=[];function e(s){var i=a[s]={onStack:!0,lowlink:u,index:u++};if(d.push(s),p.successors(s).forEach(function(t){Object.hasOwn(a,t)?a[t].onStack&&(i.lowlink=Math.min(i.lowlink,a[t].index)):(e(t),i.lowlink=Math.min(i.lowlink,a[t].lowlink))}),i.lowlink===i.index){var o=[],r;do r=d.pop(),a[r].onStack=!1,o.push(r);while(s!==r);n.push(o)}}return p.nodes().forEach(function(s){Object.hasOwn(a,s)||e(s)}),n}return oe}var de,or;function wt(){if(or)return de;or=1;var v=Xr();de=p;function p(u){return v(u).filter(function(d){return d.length>1||d.length===1&&u.hasEdge(d[0],d[0])})}return de}var ue,dr;function Et(){if(dr)return ue;dr=1,ue=p;var v=()=>1;function p(d,a,n){return u(d,a||v,n||function(e){return d.outEdges(e)})}function u(d,a,n){var e={},s=d.nodes();return s.forEach(function(i){e[i]={},e[i][i]={distance:0},s.forEach(function(o){i!==o&&(e[i][o]={distance:Number.POSITIVE_INFINITY})}),n(i).forEach(function(o){var r=o.v===i?o.w:o.v,t=a(o);e[i][r]={distance:t,predecessor:i}})}),s.forEach(function(i){var o=e[i];s.forEach(function(r){var t=e[r];s.forEach(function(l){var h=t[i],w=o[l],j=t[l],c=h.distance+w.distance;ca.successors(t):t=>a.neighbors(t),i=e==="post"?p:u,o=[],r={};return n.forEach(t=>{if(!a.hasNode(t))throw new Error("Graph does not have node: "+t);i(t,s,r,o)}),o}function p(a,n,e,s){for(var i=[[a,!1]];i.length>0;){var o=i.pop();o[1]?s.push(o[0]):Object.hasOwn(e,o[0])||(e[o[0]]=!0,i.push([o[0],!0]),d(n(o[0]),r=>i.push([r,!1])))}}function u(a,n,e,s){for(var i=[a];i.length>0;){var o=i.pop();Object.hasOwn(e,o)||(e[o]=!0,s.push(o),d(n(o),r=>i.push(r)))}}function d(a,n){for(var e=a.length;e--;)n(a[e],e,a);return a}return fe}var ce,fr;function _t(){if(fr)return ce;fr=1;var v=Kr();ce=p;function p(u,d){return v(u,d,"post")}return ce}var pe,cr;function kt(){if(cr)return pe;cr=1;var v=Kr();pe=p;function p(u,d){return v(u,d,"pre")}return pe}var me,pr;function Ot(){if(pr)return me;pr=1;var v=ze(),p=$r();me=u;function u(d,a){var n=new v,e={},s=new p,i;function o(t){var l=t.v===i?t.w:t.v,h=s.priority(l);if(h!==void 0){var w=a(t);w0;){if(i=s.removeMin(),Object.hasOwn(e,i))n.setEdge(i,e[i]);else{if(r)throw new Error("Input graph is not connected: "+d);r=!0}d.nodeEdges(i).forEach(o)}return n}return me}var be,mr;function Nt(){return mr||(mr=1,be={components:gt(),dijkstra:Ur(),dijkstraAll:vt(),findCycles:wt(),floydWarshall:Et(),isAcyclic:yt(),postorder:_t(),preorder:kt(),prim:Ot(),tarjan:Xr(),topsort:Qr()}),be}var ge,br;function Y(){if(br)return ge;br=1;var v=mt();return ge={Graph:v.Graph,json:bt(),alg:Nt(),version:v.version},ge}var ve,gr;function xt(){if(gr)return ve;gr=1;class v{constructor(){let a={};a._next=a._prev=a,this._sentinel=a}dequeue(){let a=this._sentinel,n=a._prev;if(n!==a)return p(n),n}enqueue(a){let n=this._sentinel;a._prev&&a._next&&p(a),a._next=n._next,n._next._prev=a,n._next=a,a._prev=n}toString(){let a=[],n=this._sentinel,e=n._prev;for(;e!==n;)a.push(JSON.stringify(e,u)),e=e._prev;return"["+a.join(", ")+"]"}}function p(d){d._prev._next=d._next,d._next._prev=d._prev,delete d._next,delete d._prev}function u(d,a){if(d!=="_next"&&d!=="_prev")return a}return ve=v,ve}var we,vr;function jt(){if(vr)return we;vr=1;let v=Y().Graph,p=xt();we=d;let u=()=>1;function d(o,r){if(o.nodeCount()<=1)return[];let t=e(o,r||u);return a(t.graph,t.buckets,t.zeroIdx).flatMap(h=>o.outEdges(h.v,h.w))}function a(o,r,t){let l=[],h=r[r.length-1],w=r[0],j;for(;o.nodeCount();){for(;j=w.dequeue();)n(o,r,t,j);for(;j=h.dequeue();)n(o,r,t,j);if(o.nodeCount()){for(let c=r.length-2;c>0;--c)if(j=r[c].dequeue(),j){l=l.concat(n(o,r,t,j,!0));break}}}return l}function n(o,r,t,l,h){let w=h?[]:void 0;return o.inEdges(l.v).forEach(j=>{let c=o.edge(j),E=o.node(j.v);h&&w.push({v:j.v,w:j.w}),E.out-=c,s(r,t,E)}),o.outEdges(l.v).forEach(j=>{let c=o.edge(j),E=j.w,m=o.node(E);m.in-=c,s(r,t,m)}),o.removeNode(l.v),w}function e(o,r){let t=new v,l=0,h=0;o.nodes().forEach(c=>{t.setNode(c,{v:c,in:0,out:0})}),o.edges().forEach(c=>{let E=t.edge(c.v,c.w)||0,m=r(c),O=E+m;t.setEdge(c.v,c.w,O),h=Math.max(h,t.node(c.v).out+=m),l=Math.max(l,t.node(c.w).in+=m)});let w=i(h+l+3).map(()=>new p),j=l+1;return t.nodes().forEach(c=>{s(w,j,t.node(c))}),{graph:t,buckets:w,zeroIdx:j}}function s(o,r,t){t.out?t.in?o[t.out-t.in+r].enqueue(t):o[o.length-1].enqueue(t):o[0].enqueue(t)}function i(o){const r=[];for(let t=0;tb.setNode(y,f.node(y))),f.edges().forEach(y=>{let k=b.edge(y.v,y.w)||{weight:0,minlen:1},C=f.edge(y);b.setEdge(y.v,y.w,{weight:k.weight+C.weight,minlen:Math.max(k.minlen,C.minlen)})}),b}function d(f){let b=new v({multigraph:f.isMultigraph()}).setGraph(f.graph());return f.nodes().forEach(y=>{f.children(y).length||b.setNode(y,f.node(y))}),f.edges().forEach(y=>{b.setEdge(y,f.edge(y))}),b}function a(f){let b=f.nodes().map(y=>{let k={};return f.outEdges(y).forEach(C=>{k[C.w]=(k[C.w]||0)+f.edge(C).weight}),k});return q(f.nodes(),b)}function n(f){let b=f.nodes().map(y=>{let k={};return f.inEdges(y).forEach(C=>{k[C.v]=(k[C.v]||0)+f.edge(C).weight}),k});return q(f.nodes(),b)}function e(f,b){let y=f.x,k=f.y,C=b.x-y,T=b.y-k,S=f.width/2,D=f.height/2;if(!C&&!T)throw new Error("Not possible to find intersection inside of the rectangle");let H,z;return Math.abs(T)*S>Math.abs(C)*D?(T<0&&(D=-D),H=D*C/T,z=D):(C<0&&(S=-S),H=S,z=S*T/C),{x:y+H,y:k+z}}function s(f){let b=x(w(f)+1).map(()=>[]);return f.nodes().forEach(y=>{let k=f.node(y),C=k.rank;C!==void 0&&(b[C][k.order]=y)}),b}function i(f){let b=f.nodes().map(k=>{let C=f.node(k).rank;return C===void 0?Number.MAX_VALUE:C}),y=h(Math.min,b);f.nodes().forEach(k=>{let C=f.node(k);Object.hasOwn(C,"rank")&&(C.rank-=y)})}function o(f){let b=f.nodes().map(S=>f.node(S).rank),y=h(Math.min,b),k=[];f.nodes().forEach(S=>{let D=f.node(S).rank-y;k[D]||(k[D]=[]),k[D].push(S)});let C=0,T=f.graph().nodeRankFactor;Array.from(k).forEach((S,D)=>{S===void 0&&D%T!==0?--C:S!==void 0&&C&&S.forEach(H=>f.node(H).rank+=C)})}function r(f,b,y,k){let C={width:0,height:0};return arguments.length>=4&&(C.rank=y,C.order=k),p(f,"border",C,b)}function t(f,b=l){const y=[];for(let k=0;kl){const y=t(b);return f.apply(null,y.map(k=>f.apply(null,k)))}else return f.apply(null,b)}function w(f){const y=f.nodes().map(k=>{let C=f.node(k).rank;return C===void 0?Number.MIN_VALUE:C});return h(Math.max,y)}function j(f,b){let y={lhs:[],rhs:[]};return f.forEach(k=>{b(k)?y.lhs.push(k):y.rhs.push(k)}),y}function c(f,b){let y=Date.now();try{return b()}finally{console.log(f+" time: "+(Date.now()-y)+"ms")}}function E(f,b){return b()}let m=0;function O(f){var b=++m;return f+(""+b)}function x(f,b,y=1){b==null&&(b=f,f=0);let k=T=>Tbk[b]),Object.entries(f).reduce((k,[C,T])=>(k[C]=y(T,C),k),{})}function q(f,b){return f.reduce((y,k,C)=>(y[k]=b[C],y),{})}return Ee}var ye,Er;function Ct(){if(Er)return ye;Er=1;let v=jt(),p=F().uniqueId;ye={run:u,undo:a};function u(n){(n.graph().acyclicer==="greedy"?v(n,s(n)):d(n)).forEach(i=>{let o=n.edge(i);n.removeEdge(i),o.forwardName=i.name,o.reversed=!0,n.setEdge(i.w,i.v,o,p("rev"))});function s(i){return o=>i.edge(o).weight}}function d(n){let e=[],s={},i={};function o(r){Object.hasOwn(i,r)||(i[r]=!0,s[r]=!0,n.outEdges(r).forEach(t=>{Object.hasOwn(s,t.w)?e.push(t):o(t.w)}),delete s[r])}return n.nodes().forEach(o),e}function a(n){n.edges().forEach(e=>{let s=n.edge(e);if(s.reversed){n.removeEdge(e);let i=s.forwardName;delete s.reversed,delete s.forwardName,n.setEdge(e.w,e.v,s,i)}})}return ye}var _e,yr;function Rt(){if(yr)return _e;yr=1;let v=F();_e={run:p,undo:d};function p(a){a.graph().dummyChains=[],a.edges().forEach(n=>u(a,n))}function u(a,n){let e=n.v,s=a.node(e).rank,i=n.w,o=a.node(i).rank,r=n.name,t=a.edge(n),l=t.labelRank;if(o===s+1)return;a.removeEdge(n);let h,w,j;for(j=0,++s;s{let e=a.node(n),s=e.edgeLabel,i;for(a.setEdge(e.edgeObj,s);e.dummy;)i=a.successors(n)[0],a.removeNode(n),s.points.push({x:e.x,y:e.y}),e.dummy==="edge-label"&&(s.x=e.x,s.y=e.y,s.width=e.width,s.height=e.height),n=i,e=a.node(n)})}return _e}var ke,_r;function Q(){if(_r)return ke;_r=1;const{applyWithChunking:v}=F();ke={longestPath:p,slack:u};function p(d){var a={};function n(e){var s=d.node(e);if(Object.hasOwn(a,e))return s.rank;a[e]=!0;let i=d.outEdges(e).map(r=>r==null?Number.POSITIVE_INFINITY:n(r.w)-d.edge(r).minlen);var o=v(Math.min,i);return o===Number.POSITIVE_INFINITY&&(o=0),s.rank=o}d.sources().forEach(n)}function u(d,a){return d.node(a.w).rank-d.node(a.v).rank-d.edge(a).minlen}return ke}var Oe,kr;function Jr(){if(kr)return Oe;kr=1;var v=Y().Graph,p=Q().slack;Oe=u;function u(e){var s=new v({directed:!1}),i=e.nodes()[0],o=e.nodeCount();s.setNode(i,{});for(var r,t;d(s,e){var t=r.v,l=o===t?r.w:t;!e.hasNode(l)&&!p(s,r)&&(e.setNode(l,{}),e.setEdge(o,l,{}),i(l))})}return e.nodes().forEach(i),e.nodeCount()}function a(e,s){return s.edges().reduce((o,r)=>{let t=Number.POSITIVE_INFINITY;return e.hasNode(r.v)!==e.hasNode(r.w)&&(t=p(s,r)),ts.node(o).rank+=i)}return Oe}var Ne,Or;function It(){if(Or)return Ne;Or=1;var v=Jr(),p=Q().slack,u=Q().longestPath,d=Y().alg.preorder,a=Y().alg.postorder,n=F().simplify;Ne=e,e.initLowLimValues=r,e.initCutValues=s,e.calcCutValue=o,e.leaveEdge=l,e.enterEdge=h,e.exchangeEdges=w;function e(m){m=n(m),u(m);var O=v(m);r(O),s(O,m);for(var x,R;x=l(O);)R=h(O,m,x),w(O,m,x,R)}function s(m,O){var x=a(m,m.nodes());x=x.slice(0,x.length-1),x.forEach(R=>i(m,O,R))}function i(m,O,x){var R=m.node(x),I=R.parent;m.edge(x,I).cutvalue=o(m,O,x)}function o(m,O,x){var R=m.node(x),I=R.parent,q=!0,f=O.edge(x,I),b=0;return f||(q=!1,f=O.edge(I,x)),b=f.weight,O.nodeEdges(x).forEach(y=>{var k=y.v===x,C=k?y.w:y.v;if(C!==I){var T=k===q,S=O.edge(y).weight;if(b+=T?S:-S,c(m,x,C)){var D=m.edge(x,C).cutvalue;b+=T?-D:D}}}),b}function r(m,O){arguments.length<2&&(O=m.nodes()[0]),t(m,{},1,O)}function t(m,O,x,R,I){var q=x,f=m.node(R);return O[R]=!0,m.neighbors(R).forEach(b=>{Object.hasOwn(O,b)||(x=t(m,O,x,b,R))}),f.low=q,f.lim=x++,I?f.parent=I:delete f.parent,x}function l(m){return m.edges().find(O=>m.edge(O).cutvalue<0)}function h(m,O,x){var R=x.v,I=x.w;O.hasEdge(R,I)||(R=x.w,I=x.v);var q=m.node(R),f=m.node(I),b=q,y=!1;q.lim>f.lim&&(b=f,y=!0);var k=O.edges().filter(C=>y===E(m,m.node(C.v),b)&&y!==E(m,m.node(C.w),b));return k.reduce((C,T)=>p(O,T)!O.node(I).parent),R=d(m,x);R=R.slice(1),R.forEach(I=>{var q=m.node(I).parent,f=O.edge(I,q),b=!1;f||(f=O.edge(q,I),b=!0),O.node(I).rank=O.node(q).rank+(b?f.minlen:-f.minlen)})}function c(m,O,x){return m.hasEdge(O,x)}function E(m,O,x){return x.low<=O.lim&&O.lim<=x.lim}return Ne}var xe,Nr;function Lt(){if(Nr)return xe;Nr=1;var v=Q(),p=v.longestPath,u=Jr(),d=It();xe=a;function a(i){var o=i.graph().ranker;if(o instanceof Function)return o(i);switch(i.graph().ranker){case"network-simplex":s(i);break;case"tight-tree":e(i);break;case"longest-path":n(i);break;case"none":break;default:s(i)}}var n=p;function e(i){p(i),u(i)}function s(i){d(i)}return xe}var je,xr;function qt(){if(xr)return je;xr=1,je=v;function v(d){let a=u(d);d.graph().dummyChains.forEach(n=>{let e=d.node(n),s=e.edgeObj,i=p(d,a,s.v,s.w),o=i.path,r=i.lca,t=0,l=o[t],h=!0;for(;n!==s.w;){if(e=d.node(n),h){for(;(l=o[t])!==r&&d.node(l).maxRanko||r>a[t].lim));for(l=t,t=e;(t=d.parent(t))!==l;)i.push(t);return{path:s.concat(i.reverse()),lca:l}}function u(d){let a={},n=0;function e(s){let i=n;d.children(s).forEach(e),a[s]={low:i,lim:n++}}return d.children().forEach(e),a}return je}var Ce,jr;function Tt(){if(jr)return Ce;jr=1;let v=F();Ce={run:p,cleanup:n};function p(e){let s=v.addDummyNode(e,"root",{},"_root"),i=d(e),o=Object.values(i),r=v.applyWithChunking(Math.max,o)-1,t=2*r+1;e.graph().nestingRoot=s,e.edges().forEach(h=>e.edge(h).minlen*=t);let l=a(e)+1;e.children().forEach(h=>u(e,s,t,l,r,i,h)),e.graph().nodeRankFactor=t}function u(e,s,i,o,r,t,l){let h=e.children(l);if(!h.length){l!==s&&e.setEdge(s,l,{weight:0,minlen:i});return}let w=v.addBorderNode(e,"_bt"),j=v.addBorderNode(e,"_bb"),c=e.node(l);e.setParent(w,l),c.borderTop=w,e.setParent(j,l),c.borderBottom=j,h.forEach(E=>{u(e,s,i,o,r,t,E);let m=e.node(E),O=m.borderTop?m.borderTop:E,x=m.borderBottom?m.borderBottom:E,R=m.borderTop?o:2*o,I=O!==x?1:r-t[l]+1;e.setEdge(w,O,{weight:R,minlen:I,nestingEdge:!0}),e.setEdge(x,j,{weight:R,minlen:I,nestingEdge:!0})}),e.parent(l)||e.setEdge(s,w,{weight:0,minlen:r+t[l]})}function d(e){var s={};function i(o,r){var t=e.children(o);t&&t.length&&t.forEach(l=>i(l,r+1)),s[o]=r}return e.children().forEach(o=>i(o,1)),s}function a(e){return e.edges().reduce((s,i)=>s+e.edge(i).weight,0)}function n(e){var s=e.graph();e.removeNode(s.nestingRoot),delete s.nestingRoot,e.edges().forEach(i=>{var o=e.edge(i);o.nestingEdge&&e.removeEdge(i)})}return Ce}var Re,Cr;function St(){if(Cr)return Re;Cr=1;let v=F();Re=p;function p(d){function a(n){let e=d.children(n),s=d.node(n);if(e.length&&e.forEach(a),Object.hasOwn(s,"minRank")){s.borderLeft=[],s.borderRight=[];for(let i=s.minRank,o=s.maxRank+1;id(i.node(o))),i.edges().forEach(o=>d(i.edge(o)))}function d(i){let o=i.width;i.width=i.height,i.height=o}function a(i){i.nodes().forEach(o=>n(i.node(o))),i.edges().forEach(o=>{let r=i.edge(o);r.points.forEach(n),Object.hasOwn(r,"y")&&n(r)})}function n(i){i.y=-i.y}function e(i){i.nodes().forEach(o=>s(i.node(o))),i.edges().forEach(o=>{let r=i.edge(o);r.points.forEach(s),Object.hasOwn(r,"x")&&s(r)})}function s(i){let o=i.x;i.x=i.y,i.y=o}return Ie}var Le,Ir;function Pt(){if(Ir)return Le;Ir=1;let v=F();Le=p;function p(u){let d={},a=u.nodes().filter(r=>!u.children(r).length),n=a.map(r=>u.node(r).rank),e=v.applyWithChunking(Math.max,n),s=v.range(e+1).map(()=>[]);function i(r){if(d[r])return;d[r]=!0;let t=u.node(r);s[t.rank].push(r),u.successors(r).forEach(i)}return a.sort((r,t)=>u.node(r).rank-u.node(t).rank).forEach(i),s}return Le}var qe,Lr;function Dt(){if(Lr)return qe;Lr=1;let v=F().zipObject;qe=p;function p(d,a){let n=0;for(let e=1;eh)),s=a.flatMap(l=>d.outEdges(l).map(h=>({pos:e[h.w],weight:d.edge(h).weight})).sort((h,w)=>h.pos-w.pos)),i=1;for(;i{let h=l.pos+i;r[h]+=l.weight;let w=0;for(;h>0;)h%2&&(w+=r[h+1]),h=h-1>>1,r[h]+=l.weight;t+=l.weight*w}),t}return qe}var Te,qr;function Gt(){if(qr)return Te;qr=1,Te=v;function v(p,u=[]){return u.map(d=>{let a=p.inEdges(d);if(a.length){let n=a.reduce((e,s)=>{let i=p.edge(s),o=p.node(s.v);return{sum:e.sum+i.weight*o.order,weight:e.weight+i.weight}},{sum:0,weight:0});return{v:d,barycenter:n.sum/n.weight,weight:n.weight}}else return{v:d}})}return Te}var Se,Tr;function Ft(){if(Tr)return Se;Tr=1;let v=F();Se=p;function p(a,n){let e={};a.forEach((i,o)=>{let r=e[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};i.barycenter!==void 0&&(r.barycenter=i.barycenter,r.weight=i.weight)}),n.edges().forEach(i=>{let o=e[i.v],r=e[i.w];o!==void 0&&r!==void 0&&(r.indegree++,o.out.push(e[i.w]))});let s=Object.values(e).filter(i=>!i.indegree);return u(s)}function u(a){let n=[];function e(i){return o=>{o.merged||(o.barycenter===void 0||i.barycenter===void 0||o.barycenter>=i.barycenter)&&d(i,o)}}function s(i){return o=>{o.in.push(i),--o.indegree===0&&a.push(o)}}for(;a.length;){let i=a.pop();n.push(i),i.in.reverse().forEach(e(i)),i.out.forEach(s(i))}return n.filter(i=>!i.merged).map(i=>v.pick(i,["vs","i","barycenter","weight"]))}function d(a,n){let e=0,s=0;a.weight&&(e+=a.barycenter*a.weight,s+=a.weight),n.weight&&(e+=n.barycenter*n.weight,s+=n.weight),a.vs=n.vs.concat(a.vs),a.barycenter=e/s,a.weight=s,a.i=Math.min(n.i,a.i),n.merged=!0}return Se}var Me,Sr;function At(){if(Sr)return Me;Sr=1;let v=F();Me=p;function p(a,n){let e=v.partition(a,w=>Object.hasOwn(w,"barycenter")),s=e.lhs,i=e.rhs.sort((w,j)=>j.i-w.i),o=[],r=0,t=0,l=0;s.sort(d(!!n)),l=u(o,i,l),s.forEach(w=>{l+=w.vs.length,o.push(w.vs),r+=w.barycenter*w.weight,t+=w.weight,l=u(o,i,l)});let h={vs:o.flat(!0)};return t&&(h.barycenter=r/t,h.weight=t),h}function u(a,n,e){let s;for(;n.length&&(s=n[n.length-1]).i<=e;)n.pop(),a.push(s.vs),e++;return e}function d(a){return(n,e)=>n.barycentere.barycenter?1:a?e.i-n.i:n.i-e.i}return Me}var Pe,Mr;function Vt(){if(Mr)return Pe;Mr=1;let v=Gt(),p=Ft(),u=At();Pe=d;function d(e,s,i,o){let r=e.children(s),t=e.node(s),l=t?t.borderLeft:void 0,h=t?t.borderRight:void 0,w={};l&&(r=r.filter(m=>m!==l&&m!==h));let j=v(e,r);j.forEach(m=>{if(e.children(m.v).length){let O=d(e,m.v,i,o);w[m.v]=O,Object.hasOwn(O,"barycenter")&&n(m,O)}});let c=p(j,i);a(c,w);let E=u(c,o);if(l&&(E.vs=[l,E.vs,h].flat(!0),e.predecessors(l).length)){let m=e.node(e.predecessors(l)[0]),O=e.node(e.predecessors(h)[0]);Object.hasOwn(E,"barycenter")||(E.barycenter=0,E.weight=0),E.barycenter=(E.barycenter*E.weight+m.order+O.order)/(E.weight+2),E.weight+=2}return E}function a(e,s){e.forEach(i=>{i.vs=i.vs.flatMap(o=>s[o]?s[o].vs:o)})}function n(e,s){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+s.barycenter*s.weight)/(e.weight+s.weight),e.weight+=s.weight):(e.barycenter=s.barycenter,e.weight=s.weight)}return Pe}var De,Pr;function Bt(){if(Pr)return De;Pr=1;let v=Y().Graph,p=F();De=u;function u(a,n,e,s){s||(s=a.nodes());let i=d(a),o=new v({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(r=>a.node(r));return s.forEach(r=>{let t=a.node(r),l=a.parent(r);(t.rank===n||t.minRank<=n&&n<=t.maxRank)&&(o.setNode(r),o.setParent(r,l||i),a[e](r).forEach(h=>{let w=h.v===r?h.w:h.v,j=o.edge(w,r),c=j!==void 0?j.weight:0;o.setEdge(w,r,{weight:a.edge(h).weight+c})}),Object.hasOwn(t,"minRank")&&o.setNode(r,{borderLeft:t.borderLeft[n],borderRight:t.borderRight[n]}))}),o}function d(a){for(var n;a.hasNode(n=p.uniqueId("_root")););return n}return De}var Ge,Dr;function Wt(){if(Dr)return Ge;Dr=1,Ge=v;function v(p,u,d){let a={},n;d.forEach(e=>{let s=p.parent(e),i,o;for(;s;){if(i=p.parent(s),i?(o=a[i],a[i]=s):(o=n,n=s),o&&o!==s){u.setEdge(o,s);return}s=i}})}return Ge}var Fe,Gr;function Yt(){if(Gr)return Fe;Gr=1;let v=Pt(),p=Dt(),u=Vt(),d=Bt(),a=Wt(),n=Y().Graph,e=F();Fe=s;function s(t,l){if(l&&typeof l.customOrder=="function"){l.customOrder(t,s);return}let h=e.maxRank(t),w=i(t,e.range(1,h+1),"inEdges"),j=i(t,e.range(h-1,-1,-1),"outEdges"),c=v(t);if(r(t,c),l&&l.disableOptimalOrderHeuristic)return;let E=Number.POSITIVE_INFINITY,m;for(let O=0,x=0;x<4;++O,++x){o(O%2?w:j,O%4>=2),c=e.buildLayerMatrix(t);let R=p(t,c);R{w.has(c)||w.set(c,[]),w.get(c).push(E)};for(const c of t.nodes()){const E=t.node(c);if(typeof E.rank=="number"&&j(E.rank,c),typeof E.minRank=="number"&&typeof E.maxRank=="number")for(let m=E.minRank;m<=E.maxRank;m++)m!==E.rank&&j(m,c)}return l.map(function(c){return d(t,c,h,w.get(c)||[])})}function o(t,l){let h=new n;t.forEach(function(w){let j=w.graph().root,c=u(w,j,h,l);c.vs.forEach((E,m)=>w.node(E).order=m),a(w,h,c.vs)})}function r(t,l){Object.values(l).forEach(h=>h.forEach((w,j)=>t.node(w).order=j))}return Fe}var Ae,Fr;function Ht(){if(Fr)return Ae;Fr=1;let v=Y().Graph,p=F();Ae={positionX:h,findType1Conflicts:u,findType2Conflicts:d,addConflict:n,hasConflict:e,verticalAlignment:s,horizontalCompaction:i,alignCoordinates:t,findSmallestWidthAlignment:r,balance:l};function u(c,E){let m={};function O(x,R){let I=0,q=0,f=x.length,b=R[R.length-1];return R.forEach((y,k)=>{let C=a(c,y),T=C?c.node(C).order:f;(C||y===b)&&(R.slice(q,k+1).forEach(S=>{c.predecessors(S).forEach(D=>{let H=c.node(D),z=H.order;(z{y=R[k],c.node(y).dummy&&c.predecessors(y).forEach(C=>{let T=c.node(C);T.dummy&&(T.orderb)&&n(m,C,y)})})}function x(R,I){let q=-1,f,b=0;return I.forEach((y,k)=>{if(c.node(y).dummy==="border"){let C=c.predecessors(y);C.length&&(f=c.node(C[0]).order,O(I,b,k,q,f),b=k,q=f)}O(I,b,I.length,f,R.length)}),I}return E.length&&E.reduce(x),m}function a(c,E){if(c.node(E).dummy)return c.predecessors(E).find(m=>c.node(m).dummy)}function n(c,E,m){if(E>m){let x=E;E=m,m=x}let O=c[E];O||(c[E]=O={}),O[m]=!0}function e(c,E,m){if(E>m){let O=E;E=m,m=O}return!!c[E]&&Object.hasOwn(c[E],m)}function s(c,E,m,O){let x={},R={},I={};return E.forEach(q=>{q.forEach((f,b)=>{x[f]=f,R[f]=f,I[f]=b})}),E.forEach(q=>{let f=-1;q.forEach(b=>{let y=O(b);if(y.length){y=y.sort((C,T)=>I[C]-I[T]);let k=(y.length-1)/2;for(let C=Math.floor(k),T=Math.ceil(k);C<=T;++C){let S=y[C];R[b]===b&&fMath.max(C,R[T.v]+I.edge(T)),0)}function y(k){let C=I.outEdges(k).reduce((S,D)=>Math.min(S,R[D.w]-I.edge(D)),Number.POSITIVE_INFINITY),T=c.node(k);C!==Number.POSITIVE_INFINITY&&T.borderType!==q&&(R[k]=Math.max(R[k],C))}return f(b,I.predecessors.bind(I)),f(y,I.successors.bind(I)),Object.keys(O).forEach(k=>R[k]=R[m[k]]),R}function o(c,E,m,O){let x=new v,R=c.graph(),I=w(R.nodesep,R.edgesep,O);return E.forEach(q=>{let f;q.forEach(b=>{let y=m[b];if(x.setNode(y),f){var k=m[f],C=x.edge(k,y);x.setEdge(k,y,Math.max(I(c,b,f),C||0))}f=b})}),x}function r(c,E){return Object.values(E).reduce((m,O)=>{let x=Number.NEGATIVE_INFINITY,R=Number.POSITIVE_INFINITY;Object.entries(O).forEach(([q,f])=>{let b=j(c,q)/2;x=Math.max(f+b,x),R=Math.min(f-b,R)});const I=x-R;return I{["l","r"].forEach(I=>{let q=R+I,f=c[q];if(f===E)return;let b=Object.values(f),y=O-p.applyWithChunking(Math.min,b);I!=="l"&&(y=x-p.applyWithChunking(Math.max,b)),y&&(c[q]=p.mapValues(f,k=>k+y))})})}function l(c,E){return p.mapValues(c.ul,(m,O)=>{if(E)return c[E.toLowerCase()][O];{let x=Object.values(c).map(R=>R[O]).sort((R,I)=>R-I);return(x[1]+x[2])/2}})}function h(c){let E=p.buildLayerMatrix(c),m=Object.assign(u(c,E),d(c,E)),O={},x;["u","d"].forEach(I=>{x=I==="u"?E:Object.values(E).reverse(),["l","r"].forEach(q=>{q==="r"&&(x=x.map(k=>Object.values(k).reverse()));let f=(I==="u"?c.predecessors:c.successors).bind(c),b=s(c,x,m,f),y=i(c,x,b.root,b.align,q==="r");q==="r"&&(y=p.mapValues(y,k=>-k)),O[I+q]=y})});let R=r(c,O);return t(O,R),l(O,c.graph().align)}function w(c,E,m){return(O,x,R)=>{let I=O.node(x),q=O.node(R),f=0,b;if(f+=I.width/2,Object.hasOwn(I,"labelpos"))switch(I.labelpos.toLowerCase()){case"l":b=-I.width/2;break;case"r":b=I.width/2;break}if(b&&(f+=m?b:-b),b=0,f+=(I.dummy?E:c)/2,f+=(q.dummy?E:c)/2,f+=q.width/2,Object.hasOwn(q,"labelpos"))switch(q.labelpos.toLowerCase()){case"l":b=q.width/2;break;case"r":b=-q.width/2;break}return b&&(f+=m?b:-b),b=0,f}}function j(c,E){return c.node(E).width}return Ae}var Ve,Ar;function zt(){if(Ar)return Ve;Ar=1;let v=F(),p=Ht().positionX;Ve=u;function u(a){a=v.asNonCompoundGraph(a),d(a),Object.entries(p(a)).forEach(([n,e])=>a.node(n).x=e)}function d(a){let n=v.buildLayerMatrix(a),e=a.graph().ranksep,s=0;n.forEach(i=>{const o=i.reduce((r,t)=>{const l=a.node(t).height;return r>l?r:l},0);i.forEach(r=>a.node(r).y=s+o/2),s+=o+e})}return Ve}var Be,Vr;function $t(){if(Vr)return Be;Vr=1;let v=Ct(),p=Rt(),u=Lt(),d=F().normalizeRanks,a=qt(),n=F().removeEmptyRanks,e=Tt(),s=St(),i=Mt(),o=Yt(),r=zt(),t=F(),l=Y().Graph;Be=h;function h(g,_){let N=_&&_.debugTiming?t.time:t.notime;N("layout",()=>{let L=N(" buildLayoutGraph",()=>f(g));N(" runLayout",()=>w(L,N,_)),N(" updateInputGraph",()=>j(g,L))})}function w(g,_,N){_(" makeSpaceForEdgeLabels",()=>b(g)),_(" removeSelfEdges",()=>et(g)),_(" acyclic",()=>v.run(g)),_(" nestingGraph.run",()=>e.run(g)),_(" rank",()=>u(t.asNonCompoundGraph(g))),_(" injectEdgeLabelProxies",()=>y(g)),_(" removeEmptyRanks",()=>n(g)),_(" nestingGraph.cleanup",()=>e.cleanup(g)),_(" normalizeRanks",()=>d(g)),_(" assignRankMinMax",()=>k(g)),_(" removeEdgeLabelProxies",()=>C(g)),_(" normalize.run",()=>p.run(g)),_(" parentDummyChains",()=>a(g)),_(" addBorderSegments",()=>s(g)),_(" order",()=>o(g,N)),_(" insertSelfEdges",()=>rt(g)),_(" adjustCoordinateSystem",()=>i.adjust(g)),_(" position",()=>r(g)),_(" positionSelfEdges",()=>tt(g)),_(" removeBorderNodes",()=>z(g)),_(" normalize.undo",()=>p.undo(g)),_(" fixupEdgeLabelCoords",()=>D(g)),_(" undoCoordinateSystem",()=>i.undo(g)),_(" translateGraph",()=>T(g)),_(" assignNodeIntersects",()=>S(g)),_(" reversePoints",()=>H(g)),_(" acyclic.undo",()=>v.undo(g))}function j(g,_){g.nodes().forEach(N=>{let L=g.node(N),M=_.node(N);L&&(L.x=M.x,L.y=M.y,L.rank=M.rank,_.children(N).length&&(L.width=M.width,L.height=M.height))}),g.edges().forEach(N=>{let L=g.edge(N),M=_.edge(N);L.points=M.points,Object.hasOwn(M,"x")&&(L.x=M.x,L.y=M.y)}),g.graph().width=_.graph().width,g.graph().height=_.graph().height}let c=["nodesep","edgesep","ranksep","marginx","marginy"],E={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},m=["acyclicer","ranker","rankdir","align"],O=["width","height","rank"],x={width:0,height:0},R=["minlen","weight","width","height","labeloffset"],I={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},q=["labelpos"];function f(g){let _=new l({multigraph:!0,compound:!0}),N=J(g.graph());return _.setGraph(Object.assign({},E,K(N,c),t.pick(N,m))),g.nodes().forEach(L=>{let M=J(g.node(L));const P=K(M,O);Object.keys(x).forEach(G=>{P[G]===void 0&&(P[G]=x[G])}),_.setNode(L,P),_.setParent(L,g.parent(L))}),g.edges().forEach(L=>{let M=J(g.edge(L));_.setEdge(L,Object.assign({},I,K(M,R),t.pick(M,q)))}),_}function b(g){let _=g.graph();_.ranksep/=2,g.edges().forEach(N=>{let L=g.edge(N);L.minlen*=2,L.labelpos.toLowerCase()!=="c"&&(_.rankdir==="TB"||_.rankdir==="BT"?L.width+=L.labeloffset:L.height+=L.labeloffset)})}function y(g){g.edges().forEach(_=>{let N=g.edge(_);if(N.width&&N.height){let L=g.node(_.v),P={rank:(g.node(_.w).rank-L.rank)/2+L.rank,e:_};t.addDummyNode(g,"edge-proxy",P,"_ep")}})}function k(g){let _=0;g.nodes().forEach(N=>{let L=g.node(N);L.borderTop&&(L.minRank=g.node(L.borderTop).rank,L.maxRank=g.node(L.borderBottom).rank,_=Math.max(_,L.maxRank))}),g.graph().maxRank=_}function C(g){g.nodes().forEach(_=>{let N=g.node(_);N.dummy==="edge-proxy"&&(g.edge(N.e).labelRank=N.rank,g.removeNode(_))})}function T(g){let _=Number.POSITIVE_INFINITY,N=0,L=Number.POSITIVE_INFINITY,M=0,P=g.graph(),G=P.marginx||0,B=P.marginy||0;function $e(W){let V=W.x,$=W.y,Ue=W.width,Xe=W.height;_=Math.min(_,V-Ue/2),N=Math.max(N,V+Ue/2),L=Math.min(L,$-Xe/2),M=Math.max(M,$+Xe/2)}g.nodes().forEach(W=>$e(g.node(W))),g.edges().forEach(W=>{let V=g.edge(W);Object.hasOwn(V,"x")&&$e(V)}),_-=G,L-=B,g.nodes().forEach(W=>{let V=g.node(W);V.x-=_,V.y-=L}),g.edges().forEach(W=>{let V=g.edge(W);V.points.forEach($=>{$.x-=_,$.y-=L}),Object.hasOwn(V,"x")&&(V.x-=_),Object.hasOwn(V,"y")&&(V.y-=L)}),P.width=N-_+G,P.height=M-L+B}function S(g){g.edges().forEach(_=>{let N=g.edge(_),L=g.node(_.v),M=g.node(_.w),P,G;N.points?(P=N.points[0],G=N.points[N.points.length-1]):(N.points=[],P=M,G=L),N.points.unshift(t.intersectRect(L,P)),N.points.push(t.intersectRect(M,G))})}function D(g){g.edges().forEach(_=>{let N=g.edge(_);if(Object.hasOwn(N,"x"))switch((N.labelpos==="l"||N.labelpos==="r")&&(N.width-=N.labeloffset),N.labelpos){case"l":N.x-=N.width/2+N.labeloffset;break;case"r":N.x+=N.width/2+N.labeloffset;break}})}function H(g){g.edges().forEach(_=>{let N=g.edge(_);N.reversed&&N.points.reverse()})}function z(g){g.nodes().forEach(_=>{if(g.children(_).length){let N=g.node(_),L=g.node(N.borderTop),M=g.node(N.borderBottom),P=g.node(N.borderLeft[N.borderLeft.length-1]),G=g.node(N.borderRight[N.borderRight.length-1]);N.width=Math.abs(G.x-P.x),N.height=Math.abs(M.y-L.y),N.x=P.x+N.width/2,N.y=L.y+N.height/2}}),g.nodes().forEach(_=>{g.node(_).dummy==="border"&&g.removeNode(_)})}function et(g){g.edges().forEach(_=>{if(_.v===_.w){var N=g.node(_.v);N.selfEdges||(N.selfEdges=[]),N.selfEdges.push({e:_,label:g.edge(_)}),g.removeEdge(_)}})}function rt(g){var _=t.buildLayerMatrix(g);_.forEach(N=>{var L=0;N.forEach((M,P)=>{var G=g.node(M);G.order=P+L,(G.selfEdges||[]).forEach(B=>{t.addDummyNode(g,"selfedge",{width:B.label.width,height:B.label.height,rank:G.rank,order:P+ ++L,e:B.e,label:B.label},"_se")}),delete G.selfEdges})})}function tt(g){g.nodes().forEach(_=>{var N=g.node(_);if(N.dummy==="selfedge"){var L=g.node(N.e.v),M=L.x+L.width/2,P=L.y,G=N.x-M,B=L.height/2;g.setEdge(N.e,N.label),g.removeNode(_),N.label.points=[{x:M+2*G/3,y:P-B},{x:M+5*G/6,y:P-B},{x:M+G,y:P},{x:M+5*G/6,y:P+B},{x:M+2*G/3,y:P+B}],N.label.x=N.x,N.label.y=N.y}})}function K(g,_){return t.mapValues(t.pick(g,_),Number)}function J(g){var _={};return g&&Object.entries(g).forEach(([N,L])=>{typeof N=="string"&&(N=N.toLowerCase()),_[N]=L}),_}return Be}var We,Br;function Ut(){if(Br)return We;Br=1;let v=F(),p=Y().Graph;We={debugOrdering:u};function u(d){let a=v.buildLayerMatrix(d),n=new p({compound:!0,multigraph:!0}).setGraph({});return d.nodes().forEach(e=>{n.setNode(e,{label:e}),n.setParent(e,"layer"+d.node(e).rank)}),d.edges().forEach(e=>n.setEdge(e.v,e.w,{},e.name)),a.forEach((e,s)=>{let i="layer"+s;n.setNode(i,{rank:"same"}),e.reduce((o,r)=>(n.setEdge(o,r,{style:"invis"}),r))}),n}return We}var Ye,Wr;function Xt(){return Wr||(Wr=1,Ye="1.1.8"),Ye}var He,Yr;function Qt(){return Yr||(Yr=1,He={graphlib:Y(),layout:$t(),debug:Ut(),util:{time:F().time,notime:F().notime},version:Xt()}),He}var Kt=Qt();const Hr=nt(Kt),Jt=({nodes:v,edges:p,graph:u})=>{const d=new Hr.graphlib.Graph;return d.setDefaultEdgeLabel(()=>({})),d.setGraph(u||{}),v.forEach(a=>{d.setNode(a.id,{width:a.width,height:a.height})}),p.forEach(a=>{d.setEdge(a.target,a.source)}),Hr.layout(d),{nodes:v.map(a=>{const n=d.node(a.id);return{...a,x:n.x-(a.width??0)/2,y:n.y-(a.height??0)/2}}),edges:p}};function Zt(v){const[p,u]=it.useState(!1),{data:d}=v,a=v.data.fields??{},n=Object.keys(a).length;return A.jsxs(Qe,{selected:v.selected,children:[A.jsx(Qe.Header,{label:d.label}),A.jsx("div",{children:Object.entries(a).map(([e,s],i)=>A.jsx(en,{field:{name:e,...s},table:d.label,index:i,last:n===i+1},i))})]})}const zr={background:"transparent",border:"none"},en=({field:v,table:p,index:u,onHover:d,last:a})=>{const n=U.header+U.row*u+U.row/2,e=`${p}:${v.name}`;return A.jsxs("div",{className:at("flex flex-row w-full justify-between font-mono py-1.5 px-2.5 border-b border-primary/15 border-l border-r cursor-auto",a&&"rounded-bl-lg rounded-br-lg","hover:bg-primary/5"),children:[A.jsx(Ke,{title:e,type:"source",id:e,position:X.Left,style:{top:n,left:0,...zr}}),A.jsxs("div",{className:"flex w-6 pr-1.5 justify-center items-center",children:[v.type==="primary"&&A.jsx(st,{className:"text-yellow-700"}),v.type==="relation"&&A.jsx(ot,{className:"text-sky-700"})]}),A.jsx("div",{className:"flex flex-grow",children:v.name}),A.jsx("div",{className:"flex opacity-60",children:v.type}),A.jsx(Ke,{type:"target",title:e,id:e,position:X.Right,style:{top:n,right:-5,...zr}})]})},U={header:30,row:32.5},Zr={Component:Zt,getSize:v=>{const p=v.fields??{},u=Object.keys(p).length;return{width:320,height:U.header+U.row*u}}};function rn(v){return Object.entries(v??{}).map(([p,u])=>({id:p,data:{label:p,...u},type:"entity",dragHandle:".drag-handle",position:{x:0,y:0},sourcePosition:X.Right,targetPosition:X.Left}))}function tn(v){return Object.entries(v??{}).flatMap(([p,u])=>{if(u.type==="m:n"){const a=`${u.source}_${u.target}`;return[{id:p,target:u.source,source:a,targetHandle:`${u.source}:id`,sourceHandle:`${a}:${u.source}_id`},{id:`${p}-2`,target:u.target,source:a,targetHandle:`${u.target}:id`,sourceHandle:`${a}:${u.target}_id`}]}let d=u.source+`:${u.target}`;return u.config?.mappedBy&&(d=`${u.source}:${u.config?.mappedBy}`),u.type!=="poly"&&(d+="_id"),{id:p,source:u.source,target:u.target,sourceHandle:d,targetHandle:u.target+":id"}})}const nn={entity:Zr.Component};function sn(){const{config:{data:v}}=dt(),{theme:p}=ut(),u=rn(v.entities),d=tn(v.relations).map(n=>({...n,style:{stroke:p==="light"?"#ccc":"#666"},type:"smoothstep",markerEnd:{type:lt.Arrow,width:20,height:20,color:p==="light"?"#aaa":"#777"}}));return Jt({nodes:u.map(n=>({id:n.id,...Zr.getSize(n.data)})),edges:d,graph:{rankdir:"LR",marginx:50,marginy:50}}).nodes.forEach(n=>{const e=u.find(s=>s.id===n.id);e&&(e.position={x:n.x,y:n.y})}),A.jsx(ht,{children:A.jsx(ft,{nodes:u,edges:d,nodeTypes:nn,minZoom:.1,maxZoom:2,fitViewOptions:{minZoom:.1,maxZoom:.8},children:A.jsx(ct,{zoom:!0,minimap:!0})})})}export{sn as DataSchemaCanvas}; diff --git a/public/admin/assets/JsonSchemaForm-CE_Yijem.js b/public/admin/assets/JsonSchemaForm-CE_Yijem.js new file mode 100644 index 0000000..4eb3c9e --- /dev/null +++ b/public/admin/assets/JsonSchemaForm-CE_Yijem.js @@ -0,0 +1,24 @@ +import{i as Xp,d as Qp,e as em,f as rm,h as tm,k as nm,l as im,m as am,n as Vr,g as Q,r as N,j as v,o as sm,t as xo,J as om,p as um,q as cm,s as lm,B as fm,v as dm,I as qo,w as hm,x as pm,y as mm,z as ym,S as gm,A as vm}from"./main-CfjI0j-e.js";var bm="[object Map]",_m="[object Set]",Sm=Object.prototype,Am=Sm.hasOwnProperty;function xm(t){if(t==null)return!0;if(Xp(t)&&(Qp(t)||typeof t=="string"||typeof t.splice=="function"||em(t)||rm(t)||tm(t)))return!t.length;var e=nm(t);if(e==bm||e==_m)return!t.size;if(im(t))return!am(t).length;for(var r in t)if(Am.call(t,r))return!1;return!0}function re(t){return typeof File<"u"&&t instanceof File||typeof Date<"u"&&t instanceof Date?!1:typeof t=="object"&&t!==null&&!Array.isArray(t)}function qm(t){return t.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),re(t.additionalItems)}function cu(t){if(t==="")return;if(t===null)return null;if(/\.$/.test(t)||/\.0$/.test(t)||/\.\d*0$/.test(t))return t;const e=Number(t);return typeof e=="number"&&!Number.isNaN(e)?e:t}const Fr="__additional_property",yo="additionalProperties",jr="allOf",_e="anyOf",Cr="const",Om="default",nt="dependencies",Cm="enum",we="__errors",Zr="$id",wm="if",We="items",Im="_$junk_option_schema_id$_",Hr="$name",pe="oneOf",ue="properties",Tm="required",Xr="submitButtonOptions",ce="$ref",dh="__rjsf_additionalProperties",Em="ui:field",Oo="ui:widget",Or="ui:options",Rm="ui:globalOptions";function H(t={},e={}){return Object.keys(t).filter(r=>r.indexOf("ui:")===0).reduce((r,n)=>{const i=t[n];return n===Oo&&re(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),r):n===Or&&re(i)?{...r,...i}:{...r,[n.substring(3)]:i}},{...e})}function hh(t,e={},r){if(!t.additionalProperties)return!1;const{expandable:n=!0}=H(e);return n===!1?n:t.maxProperties!==void 0&&r?Object.keys(r).length-1}return Bt=e,Bt}var Lt,Cu;function Lm(){if(Cu)return Lt;Cu=1;var t=at();function e(r,n){var i=this.__data__,a=t(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return Lt=e,Lt}var Ut,wu;function st(){if(wu)return Ut;wu=1;var t=Nm(),e=Mm(),r=km(),n=Bm(),i=Lm();function a(s){var o=-1,u=s==null?0:s.length;for(this.clear();++od))return!1;var y=h.get(s),m=h.get(o);if(y&&m)return y==o&&m==s;var g=-1,b=!0,_=u&i?new t:void 0;for(h.set(s,o),h.set(o,s);++g-1&&n%1==0&&n-1&&r%1==0&&r<=t}return Ln=e,Ln}var Un,wc;function yy(){if(wc)return Un;wc=1;var t=De(),e=Ro(),r=Oe(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",s="[object Date]",o="[object Error]",u="[object Function]",l="[object Map]",f="[object Number]",h="[object Object]",c="[object RegExp]",d="[object Set]",p="[object String]",y="[object WeakMap]",m="[object ArrayBuffer]",g="[object DataView]",b="[object Float32Array]",_="[object Float64Array]",A="[object Int8Array]",x="[object Int16Array]",S="[object Int32Array]",q="[object Uint8Array]",w="[object Uint8ClampedArray]",T="[object Uint16Array]",C="[object Uint32Array]",I={};I[b]=I[_]=I[A]=I[x]=I[S]=I[q]=I[w]=I[T]=I[C]=!0,I[n]=I[i]=I[m]=I[a]=I[g]=I[s]=I[o]=I[u]=I[l]=I[f]=I[h]=I[c]=I[d]=I[p]=I[y]=!1;function P(O){return r(O)&&e(O.length)&&!!I[t(O)]}return Un=P,Un}var $n,Ic;function nr(){if(Ic)return $n;Ic=1;function t(e){return function(r){return e(r)}}return $n=t,$n}var xr={exports:{}};xr.exports;var Tc;function Fo(){return Tc||(Tc=1,function(t,e){var r=ph(),n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,s=a&&r.process,o=function(){try{var u=i&&i.require&&i.require("util").types;return u||s&&s.binding&&s.binding("util")}catch{}}();t.exports=o}(xr,xr.exports)),xr.exports}var Wn,Ec;function Dr(){if(Ec)return Wn;Ec=1;var t=yy(),e=nr(),r=Fo(),n=r&&r.isTypedArray,i=n?e(n):t;return Wn=i,Wn}var Kn,Rc;function Ah(){if(Rc)return Kn;Rc=1;var t=Sh(),e=Pr(),r=le(),n=dr(),i=ht(),a=Dr(),s=Object.prototype,o=s.hasOwnProperty;function u(l,f){var h=r(l),c=!h&&e(l),d=!h&&!c&&n(l),p=!h&&!c&&!d&&a(l),y=h||c||d||p,m=y?t(l.length,String):[],g=m.length;for(var b in l)(f||o.call(l,b))&&!(y&&(b=="length"||d&&(b=="offset"||b=="parent")||p&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||i(b,g)))&&m.push(b);return m}return Kn=u,Kn}var Vn,Fc;function pt(){if(Fc)return Vn;Fc=1;var t=Object.prototype;function e(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||t;return r===i}return Vn=e,Vn}var Gn,jc;function gy(){if(jc)return Gn;jc=1;var t=mh(),e=t(Object.keys,Object);return Gn=e,Gn}var Hn,Pc;function xh(){if(Pc)return Hn;Pc=1;var t=pt(),e=gy(),r=Object.prototype,n=r.hasOwnProperty;function i(a){if(!t(a))return e(a);var s=[];for(var o in Object(a))n.call(a,o)&&o!="constructor"&&s.push(o);return s}return Hn=i,Hn}var zn,Dc;function ir(){if(Dc)return zn;Dc=1;var t=ot(),e=Ro();function r(n){return n!=null&&e(n.length)&&!t(n)}return zn=r,zn}var Yn,Nc;function Nr(){if(Nc)return Yn;Nc=1;var t=Ah(),e=xh(),r=ir();function n(i){return r(i)?t(i):e(i)}return Yn=n,Yn}var Jn,Mc;function qh(){if(Mc)return Jn;Mc=1;var t=bh(),e=Eo(),r=Nr();function n(i){return t(i,r,e)}return Jn=n,Jn}var Zn,kc;function vy(){if(kc)return Zn;kc=1;var t=qh(),e=1,r=Object.prototype,n=r.hasOwnProperty;function i(a,s,o,u,l,f){var h=o&e,c=t(a),d=c.length,p=t(s),y=p.length;if(d!=y&&!h)return!1;for(var m=d;m--;){var g=c[m];if(!(h?g in s:n.call(s,g)))return!1}var b=f.get(a),_=f.get(s);if(b&&_)return b==s&&_==a;var A=!0;f.set(a,s),f.set(s,a);for(var x=h;++m{if(typeof r=="function"&&typeof n=="function")return!0})}var si,Hc;function hr(){if(Hc)return si;Hc=1;var t=De(),e=Oe(),r="[object Symbol]";function n(i){return typeof i=="symbol"||e(i)&&t(i)==r}return si=n,si}var oi,zc;function jo(){if(zc)return oi;zc=1;var t=le(),e=hr(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,s){if(t(a))return!1;var o=typeof a;return o=="number"||o=="symbol"||o=="boolean"||a==null||e(a)?!0:n.test(a)||!r.test(a)||s!=null&&a in Object(s)}return oi=i,oi}var ui,Yc;function Cy(){if(Yc)return ui;Yc=1;var t=wo(),e="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(e);var a=function(){var s=arguments,o=i?i.apply(this,s):s[0],u=a.cache;if(u.has(o))return u.get(o);var l=n.apply(this,s);return a.cache=u.set(o,l)||u,l};return a.cache=new(r.Cache||t),a}return r.Cache=t,ui=r,ui}var ci,Jc;function wy(){if(Jc)return ci;Jc=1;var t=Cy(),e=500;function r(n){var i=t(n,function(s){return a.size===e&&a.clear(),s}),a=i.cache;return i}return ci=r,ci}var li,Zc;function Ch(){if(Zc)return li;Zc=1;var t=wy(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=t(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(e,function(s,o,u,l){a.push(u?l.replace(r,"$1"):o||s)}),a});return li=n,li}var fi,Xc;function Ne(){if(Xc)return fi;Xc=1;function t(e,r){for(var n=-1,i=e==null?0:e.length,a=Array(i);++np,typeof l[c]>"u"&&(Array.isArray(l)&&c==="-"&&(c=l.length),d&&(f[p]!==""&&f[p]<1/0||f[p]==="-"?l[c]=[]:l[c]={})),!d)break;l=l[c]}var m=l[c];return h===void 0?delete l[c]:l[c]=h,m}function a(l){if(typeof l=="string"){if(l=l.split("/"),l[0]==="")return l;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(l)){for(const f of l)if(typeof f!="string"&&typeof f!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return l}throw new Error("Invalid JSON pointer.")}function s(l,f){if(typeof l!="object")throw new Error("Invalid input object.");f=a(f);var h=f.length;if(h===1)return l;for(var c=1;ca?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var s=Array(a);++i0&&a(f)?i>1?r(f,i-1,a,s,o):t(o,f):s||(o[o.length]=f)}return o}return ea=r,ea}var ra,Kl;function ko(){if(Kl)return ra;Kl=1;var t=gt();function e(r){var n=r==null?0:r.length;return n?t(r,1):[]}return ra=e,ra}var ta,Vl;function Bh(){if(Vl)return ta;Vl=1;function t(e,r,n){switch(n.length){case 0:return e.call(r);case 1:return e.call(r,n[0]);case 2:return e.call(r,n[0],n[1]);case 3:return e.call(r,n[0],n[1],n[2])}return e.apply(r,n)}return ta=t,ta}var na,Gl;function Lh(){if(Gl)return na;Gl=1;var t=Bh(),e=Math.max;function r(n,i,a){return i=e(i===void 0?n.length-1:i,0),function(){for(var s=arguments,o=-1,u=e(s.length-i,0),l=Array(u);++o0){if(++a>=t)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return oa=n,oa}var ua,Zl;function Uh(){if(Zl)return ua;Zl=1;var t=rg(),e=tg(),r=e(t);return ua=r,ua}var ca,Xl;function $h(){if(Xl)return ca;Xl=1;var t=ko(),e=Lh(),r=Uh();function n(i){return r(e(i,void 0,t),i+"")}return ca=n,ca}var la,Ql;function ng(){if(Ql)return la;Ql=1;var t=Ne(),e=Nh(),r=kh(),n=pr(),i=mr(),a=Xy(),s=$h(),o=Fh(),u=1,l=2,f=4,h=s(function(c,d){var p={};if(c==null)return p;var y=!1;d=t(d,function(g){return g=n(g,c),y||(y=g.length>1),g}),i(c,o(c),p),y&&(p=e(p,u|l|f,a));for(var m=d.length;m--;)r(p,d[m]);return p});return la=h,la}var ig=ng();const Qr=Q(ig);function Bo(t,e){const r=e[t];return[Qr(e,[t]),r]}function Wh(t,e={},r=[]){const n=t||"";let i;if(n.startsWith("#"))i=decodeURIComponent(n.substring(1));else throw new Error(`Could not find a definition for ${t}.`);const a=Py.get(e,i);if(a===void 0)throw new Error(`Could not find a definition for ${t}.`);const s=a[ce];if(s){if(r.includes(s)){if(r.length===1)throw new Error(`Definition for ${t} is a circular reference`);const[f,...h]=r,c=[...h,n,f].join(" -> ");throw new Error(`Definition for ${f} contains a circular reference through ${c}`)}const[o,u]=Bo(ce,a),l=Wh(u,e,[...r,n]);return Object.keys(o).length>0?{...o,...l}:l}return a}function Kh(t,e={}){return Wh(t,e,[])}var fa,ef;function ag(){if(ef)return fa;ef=1;var t=Object.prototype,e=t.hasOwnProperty;function r(n,i){return n!=null&&e.call(n,i)}return fa=r,fa}var da,rf;function Vh(){if(rf)return da;rf=1;var t=pr(),e=Pr(),r=le(),n=ht(),i=Ro(),a=ar();function s(o,u,l){u=t(u,o);for(var f=-1,h=u.length,c=!1;++fn)return[];var l=i,f=a(o,i);u=e(u),o-=i;for(var h=t(f,u);++l({required:[f]}))};let l;if(o.anyOf){const{...f}=o;f.allOf?f.allOf=f.allOf.slice():f.allOf=[],f.allOf.push(u),l=f}else l=Object.assign({},o,u);if(delete l.required,t.isValid(l,e,n))return s}else if(t.isValid(o,e,n))return s}return 0}function Wo(t,e,r,n,i){return rp(t,e,r,n,i)}var Wa,jf;function Ko(){if(jf)return Wa;jf=1;var t=mt();function e(r,n){return t(r,n)}return Wa=e,Wa}var Dg=Ko();const er=Q(Dg);var Ka,Pf;function Vo(){if(Pf)return Ka;Pf=1;var t=No(),e=pr(),r=ht(),n=Se(),i=ar();function a(s,o,u,l){if(!n(s))return s;o=e(o,s);for(var f=-1,h=o.length,c=h-1,d=s;d!=null&&++f1?a[o-1]:void 0,l=o>2?a[2]:void 0;for(u=n.length>3&&typeof u=="function"?(o--,u):void 0,l&&e(a[0],a[1],l)&&(u=o<3?void 0:u,o=1),i=Object(i);++s-1}return us=e,us}var cs,Qf;function Jo(){if(Qf)return cs;Qf=1;function t(e,r,n){for(var i=-1,a=e==null?0:e.length;++i=s){var g=l?null:i(u);if(g)return a(g);p=!1,c=n,m=new t}else m=l?[]:y;e:for(;++hn||o&&u&&f&&!l&&!h||a&&u&&f||!i&&f||!s)return 1;if(!a&&!o&&!h&&r=l)return f;var h=i[a];return f*(h=="desc"?-1:1)}}return r.index-n.index}return vs=e,vs}var bs,cd;function av(){if(cd)return bs;cd=1;var t=Ne(),e=kr(),r=$o(),n=rv(),i=tv(),a=nr(),s=iv(),o=Br(),u=le();function l(f,h,c){h.length?h=t(h,function(y){return u(y)?function(m){return e(m,y.length===1?y[0]:y)}:y}):h=[o];var d=-1;h=t(h,a(r));var p=n(f,function(y,m,g){var b=t(h,function(_){return _(y)});return{criteria:b,index:++d,value:y}});return i(p,function(y,m){return s(y,m,c)})}return bs=l,bs}var _s,ld;function op(){if(ld)return _s;ld=1;var t=gt(),e=av(),r=ze(),n=Ho(),i=r(function(a,s){if(a==null)return[];var o=s.length;return o>1&&n(a,s[0],s[1])?s=[]:o>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),e(a,t(s,1),[])});return _s=i,_s}var Ss,fd;function Xo(){if(fd)return Ss;fd=1;var t=Zo();function e(r,n){return n=typeof n=="function"?n:void 0,r&&r.length?t(r,void 0,n):[]}return Ss=e,Ss}var As,dd;function sv(){if(dd)return As;dd=1;var t=ze(),e=fr(),r=Ho(),n=yr(),i=Object.prototype,a=i.hasOwnProperty,s=t(function(o,u){o=Object(o);var l=-1,f=u.length,h=f>2?u[2]:void 0;for(h&&r(u[0],u[1],h)&&(f=1);++l=120&&b.length>=120)?new t(p&&b):void 0}b=u[0];var _=-1,A=y[0];e:for(;++_Array.isArray(O)?O:[O],l=O=>O===void 0,f=O=>s(O)||Array.isArray(O)?Object.keys(O):[],h=(O,E)=>O.hasOwnProperty(E),c=O=>e(r(O)),d=O=>l(O)||Array.isArray(O)&&O.length===0,p=(O,E,F,k)=>E&&h(E,F)&&O&&h(O,F)&&k(O[F],E[F]),y=(O,E)=>l(O)&&E===0||l(E)&&O===0||t(O,E),m=(O,E)=>l(O)&&E===!1||l(E)&&O===!1||t(O,E),g=O=>l(O)||t(O,{})||O===!0,b=O=>l(O)||t(O,{}),_=O=>l(O)||s(O)||O===!0||O===!1;function A(O,E){return d(O)&&d(E)?!0:t(c(O),c(E))}function x(O,E){return O=u(O),E=u(E),t(c(O),c(E))}function S(O,E,F,k){var Y=r(f(O).concat(f(E)));return b(O)&&b(E)?!0:b(O)&&f(E).length||b(E)&&f(O).length?!1:Y.every(function(D){var j=O[D],z=E[D];return Array.isArray(j)&&Array.isArray(z)?t(c(O),c(E)):Array.isArray(j)&&!Array.isArray(z)||Array.isArray(z)&&!Array.isArray(j)?!1:p(O,E,D,k)})}function q(O,E,F,k){return s(O)&&s(E)?k(O,E):Array.isArray(O)&&Array.isArray(E)?S(O,E,F,k):t(O,E)}function w(O,E,F,k){var Y=n(O,k),D=n(E,k),j=a(Y,D,k);return j.length===Math.max(Y.length,D.length)}var T={title:t,uniqueItems:m,minLength:y,minItems:y,minProperties:y,required:A,enum:A,type:x,items:q,anyOf:w,allOf:w,oneOf:w,properties:S,patternProperties:S,dependencies:S},C=["properties","patternProperties","dependencies","uniqueItems","minLength","minItems","minProperties","required"],I=["additionalProperties","additionalItems","contains","propertyNames","not"];function P(O,E,F){if(F=i(F,{ignore:[]}),g(O)&&g(E))return!0;if(!_(O)||!_(E))throw new Error("Either of the values are not a JSON schema.");if(O===E)return!0;if(o(O)&&o(E))return O===E;if(O===void 0&&E===!1||E===void 0&&O===!1||l(O)&&!l(E)||!l(O)&&l(E))return!1;var k=r(Object.keys(O).concat(Object.keys(E)));if(F.ignore.length&&(k=k.filter(D=>F.ignore.indexOf(D)===-1)),!k.length)return!0;function Y(D,j){return P(D,j,F)}return k.every(function(D){var j=O[D],z=E[D];if(I.indexOf(D)!==-1)return P(j,z,F);var te=T[D];if(te||(te=t),t(j,z))return!0;if(C.indexOf(D)===-1&&(!h(O,D)&&h(E,D)||h(O,D)&&!h(E,D)))return j===z;var me=te(j,z,D,Y);if(!o(me))throw new Error("Comparer must return true or false");return me})}return ws=P,ws}var Is,vd;function eu(){if(vd)return Is;vd=1;function t(e){return Object.prototype.toString.call(e)==="[object Array]"}return Is=Array.isArray||t,Is}var Ts,bd;function uv(){if(bd)return Ts;bd=1;function t(e){return(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")&&e.valueOf()===e.valueOf()}return Ts=t,Ts}var Es,_d;function cv(){if(_d)return Es;_d=1;var t=uv();function e(r){return t(r)&&r%1===0}return Es=e,Es}var Rs,Sd;function fp(){if(Sd)return Rs;Sd=1;var t=eu(),e=cv();function r(n){var i;if(!t(n)||(i=n.length,!i))return!1;for(var a=0;au&&(f=u,u=o,o=f),u=u-o}return l*o}function a(o,u){var l=0,f;if(o===0)return u;if(u===0)return o;for(;(o&1)===0&&(u&1)===0;)o>>>=1,u>>>=1,l++;for(;(o&1)===0;)o>>>=1;for(;u;){for(;(u&1)===0;)u>>>=1;o>u&&(f=u,u=o,o=f),u=u-o}return o<1){if(f=u[0],l=u[1],!r(l))throw new TypeError("gcd()::invalid input argument. Accessor must be a function. Value: `"+l+"`.")}else f=u[0];else throw new TypeError("gcd()::invalid input argument. Must provide an array of integers. Value: `"+u[0]+"`.");if(h=f.length,h<2)return null;if(l){for(c=new Array(h),p=0;p1){if(u=s[0],o=s[1],!n(o))throw new TypeError("lcm()::invalid input argument. Accessor must be a function. Value: `"+o+"`.")}else u=s[0];else throw new TypeError("lcm()::invalid input argument. Must provide an array of integers. Value: `"+s[0]+"`.");if(l=u.length,l<2)return null;if(o){for(f=new Array(l),c=0;c-1;)y!==u&&s.call(y,m,1),s.call(u,m,1);return u}return Ls=o,Ls}var Us,Rd;function vv(){if(Rd)return Us;Rd=1;var t=gv();function e(r,n){return r&&r.length&&n&&n.length?t(r,n):r}return Us=e,Us}var $s,Fd;function ru(){if(Fd)return $s;Fd=1;var t=Po(),e=Uo(),r=Xh(),n=le();function i(a,s){var o=n(a)?t:e;return o(a,r(s))}return $s=i,$s}var Ws,jd;function bv(){if(jd)return Ws;jd=1;var t=ft(),e=Yo(),r=Jo(),n=Ne(),i=nr(),a=dt(),s=200;function o(u,l,f,h){var c=-1,d=e,p=!0,y=u.length,m=[],g=l.length;if(!y)return m;f&&(l=n(l,i(f))),h?(d=r,p=!1):l.length>=s&&(d=a,p=!1,l=new t(l));e:for(;++cn(e(y.map(f))),u=(y,m)=>y.map(g=>g&&g[m]),l=(y,m)=>Object.prototype.hasOwnProperty.call(y,m),f=y=>r(y)||Array.isArray(y)?Object.keys(y):[],h=y=>y!==void 0,c=y=>r(y)||y===!0||y===!1,d=y=>!f(y).length&&y!==!1&&y!==!0;return Vs={allUniqueKeys:o,deleteUndefinedProps:s,getValues:u,has:l,isEmptySchema:d,isSchema:c,keys:f,notUndefined:h,uniqWith:i,withoutArr:(y,...m)=>a.apply(null,[y].concat(t(m)))},Vs}var Gs,Nd;function Sv(){if(Nd)return Gs;Nd=1;const t=Qo(),e=ru(),{allUniqueKeys:r,deleteUndefinedProps:n,getValues:i,keys:a,notUndefined:s,uniqWith:o,withoutArr:u}=hp();function l(h){e(h,function(c,d){c===!1&&delete h[d]})}function f(h,c){return r(h).reduce(function(p,y){const m=i(h,y),g=o(m.filter(s),t);return p[y]=c(g,y),p},{})}return Gs={keywords:["properties","patternProperties","additionalProperties"],resolver(h,c,d,p){p.ignoreAdditionalProperties||(h.forEach(function(m){const g=h.filter(x=>x!==m),b=a(m.properties),A=a(m.patternProperties).map(x=>new RegExp(x));g.forEach(function(x){const S=a(x.properties),q=S.filter(T=>A.some(C=>C.test(T)));u(S,b,q).forEach(function(T){x.properties[T]=d.properties([x.properties[T],m.additionalProperties],T)})})}),h.forEach(function(m){const g=h.filter(_=>_!==m),b=a(m.patternProperties);m.additionalProperties===!1&&g.forEach(function(_){const A=a(_.patternProperties);u(A,b).forEach(S=>delete _.patternProperties[S])})}));const y={additionalProperties:d.additionalProperties(h.map(m=>m.additionalProperties)),patternProperties:f(h.map(m=>m.patternProperties),d.patternProperties),properties:f(h.map(m=>m.properties),d.properties)};return y.additionalProperties===!1&&l(y.properties),n(y)}},Gs}var Hs,Md;function Av(){if(Md)return Hs;Md=1;const t=Qo(),e=ru(),{allUniqueKeys:r,deleteUndefinedProps:n,has:i,isSchema:a,notUndefined:s,uniqWith:o}=hp();function u(c){e(c,function(d,p){d===!1&&c.splice(p,1)})}function l(c,d){return c.map(function(p){if(p)if(Array.isArray(p.items)){const y=p.items[d];if(a(y))return y;if(i(p,"additionalItems"))return p.additionalItems}else return p.items})}function f(c){return c.map(function(d){if(d)return Array.isArray(d.items)?d.additionalItems:d.items})}function h(c,d,p){return r(p).reduce(function(m,g){const b=l(c,g),_=o(b.filter(s),t);return m[g]=d(_,g),m},[])}return Hs={keywords:["items","additionalItems"],resolver(c,d,p){const y=c.map(_=>_.items),m=y.filter(s),g={};m.every(a)?g.items=p.items(y):g.items=h(c,p.items,y);let b;return m.every(Array.isArray)?b=c.map(_=>_.additionalItems):m.some(Array.isArray)&&(b=f(c)),b&&(g.additionalItems=p.additionalItems(b)),g.additionalItems===!1&&Array.isArray(g.items)&&u(g.items),n(g)}},Hs}var zs,kd;function xv(){if(kd)return zs;kd=1;const t=sp(),e=Qo(),r=fv(),n=pv(),i=ko(),a=zo(),s=mv(),o=lp(),u=Ko(),l=lr(),f=vv(),h=op(),c=bt(),d=Xo(),p=Sv(),y=Av(),m=(R,B)=>R.indexOf(B)!==-1,g=R=>l(R)||R===!0||R===!1,b=R=>R===!1,_=R=>R===!0,A=(R,B,U)=>U(R),x=R=>h(c(a(R))),S=R=>R!==void 0,q=R=>c(a(R.map(D))),w=R=>R[0],T=R=>x(R),C=R=>Math.max.apply(Math,R),I=R=>Math.min.apply(Math,R),P=R=>R.some(_),O=R=>d(i(R),u);function E(R){return function(B,U){return e({[R]:B},{[R]:U})}}function F(R){let{allOf:B=[],...U}=R;return U=l(R)?U:R,[U,...B.map(F)]}function k(R,B){return R.map(U=>U&&U[B])}function Y(R,B){return R.map(function(U,ee){try{return B(U,ee)}catch{return}}).filter(S)}function D(R){return l(R)||Array.isArray(R)?Object.keys(R):[]}function j(R,B){if(B=B||[],!R.length)return B;const U=R.slice(0).shift(),ee=R.slice(1);return B.length?j(ee,i(B.map(ie=>U.map(se=>[se].concat(ie))))):j(ee,U.map(ie=>ie))}function z(R,B){let U;try{U=R.map(function(ee){return JSON.stringify(ee,null,2)}).join(` +`)}catch{U=R.join(", ")}throw new Error('Could not resolve values for path:"'+B.join(".")+`". They are probably incompatible. Values: +`+U)}function te(R,B,U,ee,ie,se){if(R.length){const K=ie.complexResolvers[B];if(!K||!K.resolver)throw new Error("No resolver found for "+B);const X=U.map(Ae=>R.reduce((ve,V)=>(Ae[V]!==void 0&&(ve[V]=Ae[V]),ve),{})),$=d(X,e),ne=K.keywords.reduce((Ae,ve)=>({...Ae,[ve]:(V,ae=[])=>ee(V,null,se.concat(ve,ae))}),{}),oe=K.resolver($,se.concat(B),ne,ie);return l(oe)||z($,se.concat(B)),oe}}function me(R){return{required:R}}const fe=["properties","patternProperties","definitions","dependencies"],Ce=["anyOf","oneOf"],Me=["additionalProperties","additionalItems","contains","propertyNames","not","items"],W={type(R){if(R.some(Array.isArray)){const B=R.map(function(ee){return Array.isArray(ee)?ee:[ee]}),U=s.apply(null,B);if(U.length===1)return U[0];if(U.length>1)return c(U)}},dependencies(R,B,U){return q(R).reduce(function(ie,se){const K=k(R,se);let X=d(K.filter(S),u);const $=X.filter(Array.isArray);if($.length){if($.length===X.length)ie[se]=x(X);else{const ne=X.filter(g),oe=$.map(me);ie[se]=U(ne.concat(oe),se)}return ie}return X=d(X,e),ie[se]=U(X,se),ie},{})},oneOf(R,B,U){const ee=j(t(R)),ie=Y(ee,U),se=d(ie,e);if(se.length)return se},not(R){return{anyOf:R}},pattern(R){return R.map(B=>"(?="+B+")").join("")},multipleOf(R){let B=R.slice(0),U=1;for(;B.some(ee=>!Number.isInteger(ee));)B=B.map(ee=>ee*10),U=U*10;return r(B)/U},enum(R){const B=o.apply(null,R.concat(u));if(B.length)return h(B)}};W.$id=w,W.$ref=w,W.$schema=w,W.additionalItems=A,W.additionalProperties=A,W.anyOf=W.oneOf,W.contains=A,W.default=w,W.definitions=W.dependencies,W.description=w,W.examples=O,W.exclusiveMaximum=I,W.exclusiveMinimum=C,W.items=y,W.maximum=I,W.maxItems=I,W.maxLength=I,W.maxProperties=I,W.minimum=C,W.minItems=C,W.minLength=C,W.minProperties=C,W.properties=p,W.propertyNames=A,W.required=T,W.title=w,W.uniqueItems=P;const Ye={properties:p,items:y};function Je(R,B,U){B=n(B,{ignoreAdditionalProperties:!1,resolvers:W,complexResolvers:Ye,deep:!0});const ee=Object.entries(B.complexResolvers);function ie(X,$,ne){X=t(X.filter(S)),ne=ne||[];const oe=l($)?$:{};if(!X.length)return;if(X.some(b))return!1;if(X.every(_))return!0;X=X.filter(l);const Ae=q(X);if(B.deep&&m(Ae,"allOf"))return Je({allOf:X},B);const ve=ee.map(([V,ae])=>Ae.filter(be=>ae.keywords.includes(be)));return ve.forEach(V=>f(Ae,V)),Ae.forEach(function(V){const ae=k(X,V),be=d(ae.filter(S),E(V));if(be.length===1&&m(Ce,V))oe[V]=be[0].map(qe=>ie([qe],qe));else if(be.length===1&&!m(fe,V)&&!m(Me,V))oe[V]=be[0];else{const qe=B.resolvers[V]||B.resolvers.defaultResolver;if(!qe)throw new Error("No resolver found for key "+V+". You can provide a resolver for this keyword in the options, or provide a default resolver.");const xt=(Kr,ke=[])=>ie(Kr,null,ne.concat(V,ke));oe[V]=qe(be,ne.concat(V),xt,B),oe[V]===void 0?z(be,ne.concat(V)):oe[V]===void 0&&delete oe[V]}}),ee.reduce((V,[ae,be],qe)=>({...V,...te(ve[qe],ae,X,ie,B,ne)}),oe)}const se=a(F(R));return ie(se)}return Je.options={resolvers:W},zs=Je,zs}var qv=xv();const Ov=Q(qv);function rr(t){let e;const r=M(t,"discriminator.propertyName",void 0);return Lo(r)?e=r:r!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof r}" instead`),e}function wr(t){return Array.isArray(t)?"array":typeof t=="string"?"string":t==null?"null":typeof t=="boolean"?"boolean":isNaN(t)?typeof t=="object"?"object":"string":"number"}var Ys,Bd;function Cv(){if(Bd)return Ys;Bd=1;var t=gt(),e=ze(),r=Zo(),n=vt(),i=e(function(a){return r(t(a,1,n,!0))});return Ys=i,Ys}var wv=Cv();const Iv=Q(wv);function He(t){let{type:e}=t;return!e&&t.const?wr(t.const):!e&&t.enum?"string":!e&&(t.properties||t.additionalProperties)?"object":(Array.isArray(e)&&(e.length===2&&e.includes("null")?e=e.find(r=>r!=="null"):e=e[0]),e)}function Fe(t,e){const r=Object.assign({},t);return Object.keys(e).reduce((n,i)=>{const a=t?t[i]:{},s=e[i];return t&&i in t&&re(s)?n[i]=Fe(a,s):t&&e&&(He(t)==="object"||He(e)==="object")&&i===Tm&&Array.isArray(a)&&Array.isArray(s)?n[i]=Iv(a,s):n[i]=s,n},r)}function xe(t,e,r={},n,i){return Ee(t,e,r,n,void 0,void 0,i)[0]}function Tv(t,e,r,n,i,a,s){const{if:o,then:u,else:l,...f}=e,h=t.isValid(o,a||{},r);let c=[f],d=[];if(n)u&&typeof u!="boolean"&&(d=d.concat(Ee(t,u,r,a,n,i,s))),l&&typeof l!="boolean"&&(d=d.concat(Ee(t,l,r,a,n,i,s)));else{const p=h?u:l;p&&typeof p!="boolean"&&(d=d.concat(Ee(t,p,r,a,n,i,s)))}return d.length&&(c=d.map(p=>Fe(f,p))),c.flatMap(p=>Ee(t,p,r,a,n,i,s))}function pp(t){return t.reduce((r,n)=>n.length>1?n.flatMap(i=>Qh(r.length,a=>[...r[a]].concat(i))):(r.forEach(i=>i.push(n[0])),r),[[]])}function Ev(t,e,r,n,i,a,s){const o=mp(t,e,r,n,i,a);if(o.length>1||o[0]!==e)return o;if(nt in e)return yp(t,e,r,n,i,a).flatMap(l=>Ee(t,l,r,a,n,i,s));if(jr in e&&Array.isArray(e.allOf)){const u=e.allOf.map(f=>Ee(t,f,r,a,n,i,s));return pp(u).map(f=>({...e,allOf:f}))}return[e]}function mp(t,e,r,n,i,a,s){const o=Ir(e,r,i);return o!==e?Ee(t,o,r,a,n,i,s):[e]}function Ir(t,e,r){if(!re(t))return t;let n=t;if(ce in n){const{$ref:i,...a}=n;if(r.includes(i))return n;r.push(i),n={...Kh(i,e),...a}}if(ue in n){const i=[],a=Lg(n[ue],(s,o,u)=>{const l=[...r];s[u]=Ir(o,e,l),i.push(l)},{});Vg(r,ev(Hg(i))),n={...n,[ue]:a}}return We in n&&!Array.isArray(n.items)&&typeof n.items!="boolean"&&(n={...n,items:Ir(n.items,e,r)}),er(t,n)?t:n}function Rv(t,e,r,n){const i={...e,properties:{...e.properties}},a=n&&re(n)?n:{};return Object.keys(a).forEach(s=>{if(s in i.properties)return;let o={};typeof i.additionalProperties!="boolean"?ce in i.additionalProperties?o=xe(t,{$ref:M(i.additionalProperties,[ce])},r,a):"type"in i.additionalProperties?o={...i.additionalProperties}:_e in i.additionalProperties||pe in i.additionalProperties?o={type:"object",...i.additionalProperties}:o={type:wr(M(a,[s]))}:o={type:wr(M(a,[s]))},i.properties[s]=o,ye(i.properties,[s,Fr],!0)}),i}function Ee(t,e,r,n,i=!1,a=[],s){return re(e)?Ev(t,e,r,i,a,n).flatMap(u=>{var l;let f=u;if(wm in f)return Tv(t,f,r,i,a,n,s);if(jr in f){if(i){const{allOf:c,...d}=f;return[...c,d]}try{const c=[],d=[];(l=f.allOf)===null||l===void 0||l.forEach(p=>{typeof p=="object"&&p.contains?c.push(p):d.push(p)}),c.length&&(f={...f,allOf:d}),f=s?s(f):Ov(f,{deep:!1}),c.length&&(f.allOf=c)}catch(c){console.warn(`could not merge subschemas in allOf: +`,c);const{allOf:d,...p}=f;return p}}return yo in f&&f.additionalProperties!==!1?Rv(t,f,r,n):f}):[{}]}function Fv(t,e,r,n,i){let a;const{oneOf:s,anyOf:o,...u}=e;if(Array.isArray(s)?a=s:Array.isArray(o)&&(a=o),a){const l=i===void 0&&n?{}:i,f=rr(e);a=a.map(c=>Ir(c,r,[]));const h=Wo(t,l,a,r,f);if(n)return a.map(c=>Fe(u,c));e=Fe(u,a[h])}return[e]}function yp(t,e,r,n,i,a,s){const{dependencies:o,...u}=e;return Fv(t,u,r,n,a).flatMap(f=>gp(t,o,f,r,n,i,a,s))}function gp(t,e,r,n,i,a,s,o){let u=[r];for(const l in e){if(!i&&M(s,[l])===void 0||r.properties&&!(l in r.properties))continue;const[f,h]=Bo(l,e);return Array.isArray(h)?u[0]=jv(r,h):re(h)&&(u=Pv(t,r,n,l,h,i,a,s,o)),u.flatMap(c=>gp(t,f,c,n,i,a,s,o))}return u}function jv(t,e){if(!e)return t;const r=Array.isArray(t.required)?Array.from(new Set([...t.required,...e])):e;return{...t,required:r}}function Pv(t,e,r,n,i,a,s,o,u){return Ee(t,i,r,o,a,s,u).flatMap(f=>{const{oneOf:h,...c}=f;if(e=Fe(e,c),h===void 0)return e;const d=h.map(y=>typeof y=="boolean"||!(ce in y)?[y]:mp(t,y,r,a,s,o));return pp(d).flatMap(y=>Dv(t,e,r,n,y,a,s,o,u))})}function Dv(t,e,r,n,i,a,s,o,u){const l=i.filter(f=>{if(typeof f=="boolean"||!f||!f.properties)return!1;const{[n]:h}=f.properties;if(h){const c={type:"object",properties:{[n]:h}};return t.isValid(c,o,r)||a}return!1});return!a&&l.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[e]):l.flatMap(f=>{const h=f,[c]=Bo(n,h.properties),d={...h,properties:c};return Ee(t,d,r,o,a,s,u).map(y=>Fe(e,y))})}const Nv={type:"object",$id:Im,properties:{__not_really_there__:{type:"number"}}};function go(t,e,r,n){let i=0;return r&&(Te(r.properties)?i+=wg(r.properties,(a,s,o)=>{const u=M(n,o);if(typeof s=="boolean")return a;if(ge(s,ce)){const l=xe(t,s,e,u);return a+go(t,e,l,u||{})}if((ge(s,pe)||ge(s,_e))&&u){const l=ge(s,pe)?pe:_e,f=rr(s);return a+Tr(t,e,u,M(s,l),-1,f)}if(s.type==="object")return Te(u)&&(a+=1),a+go(t,e,s,u);if(s.type===wr(u)){let l=a+1;return s.default?l+=u===s.default?1:-1:s.const&&(l+=u===s.const?1:-1),l}return a},0):Lo(r.type)&&r.type===wr(n)&&(i+=1)),i}function Tr(t,e,r,n,i=-1,a){const s=n.map(h=>Ir(h,e,[])),o=ep(r,n,a);if(Gh(o))return o;const u=s.reduce((h,c,d)=>(Wo(t,r,[Nv,c],e,a)===1&&h.push(d),h),[]);if(u.length===1)return u[0];u.length||Qh(s.length,h=>u.push(h));const l=new Set,{bestIndex:f}=u.reduce((h,c)=>{const{bestScore:d}=h,p=s[c],y=go(t,e,p,r);return l.add(y),y>d?{bestIndex:c,bestScore:y}:h},{bestIndex:i,bestScore:0});return l.size===1&&i>=0?i:f}function vo(t){return Array.isArray(t.items)&&t.items.length>0&&t.items.every(e=>re(e))}function et(t,e,r=!1,n=!1){if(Array.isArray(e)){const i=Array.isArray(t)?t:[],a=e.map((s,o)=>i[o]?et(i[o],s,r,n):s);return r&&a.length(a[s]=et(t?M(t,s):{},M(e,s),r,n),a),i)}return n&&e===void 0?t:e}function Ke(t,e,r=!1){return Object.keys(e).reduce((n,i)=>{const a=t?t[i]:{},s=e[i];if(t&&i in t&&re(s))n[i]=Ke(a,s,r);else if(r&&Array.isArray(a)&&Array.isArray(s)){let o=s;r==="preventDuplicates"&&(o=s.reduce((u,l)=>(a.includes(l)||u.push(l),u),[])),n[i]=a.concat(o)}else n[i]=s;return n},Object.assign({},t))}function vp(t){return Array.isArray(t.enum)&&t.enum.length===1||Cr in t}function bp(t,e,r={}){const n=xe(t,e,r,void 0),i=n.oneOf||n.anyOf;return Array.isArray(n.enum)?!0:Array.isArray(i)?i.every(a=>typeof a!="boolean"&&vp(a)):!1}function tu(t,e,r){return!e.uniqueItems||!e.items||typeof e.items=="boolean"?!1:bp(t,e.items,r)}var or;(function(t){t[t.Ignore=0]="Ignore",t[t.Invert=1]="Invert",t[t.Fallback=2]="Fallback"})(or||(or={}));function Js(t,e=or.Ignore,r=-1){if(r>=0){if(Array.isArray(t.items)&&rVe(t,g,{rootSchema:a,includeUndefinedValues:s,_recurseList:o,experimental_defaultFormStateBehavior:u,parentDefaults:Array.isArray(n)?n[b]:void 0,rawFormData:h,required:f}));else if(pe in c){const{oneOf:g,...b}=c;if(g.length===0)return;const _=rr(c);p=g[Tr(t,a,Ge(h)?void 0:h,g,0,_)],p=Fe(b,p)}else if(_e in c){const{anyOf:g,...b}=c;if(g.length===0)return;const _=rr(c);p=g[Tr(t,a,Ge(h)?void 0:h,g,0,_)],p=Fe(b,p)}if(p)return Ve(t,p,{rootSchema:a,includeUndefinedValues:s,_recurseList:y,experimental_defaultFormStateBehavior:u,parentDefaults:d,rawFormData:h,required:f});d===void 0&&(d=c.default);const m=Ud(t,c,r,d);return m??d}function Mv(t,e,{rawFormData:r,rootSchema:n={},includeUndefinedValues:i=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:s=void 0,experimental_customMergeAllOf:o=void 0,required:u}={},l){{const f=re(r)?r:{},h=e,c=s?.allOf==="populateDefaults"&&jr in h?xe(t,h,n,f,o):h,d=c[Cr],p=Object.keys(c.properties||{}).reduce((y,m)=>{var g;const b=M(c,[ue,m]),_=re(d)&&d[m]!==void 0,A=re(b)&&Cr in b||_,x=Ve(t,b,{rootSchema:n,_recurseList:a,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,includeUndefinedValues:i===!0,parentDefaults:M(l,[m]),rawFormData:M(f,[m]),required:(g=c.required)===null||g===void 0?void 0:g.includes(m)});return Ld(y,m,x,i,u,c.required,s,A),y},{});if(c.additionalProperties){const y=re(c.additionalProperties)?c.additionalProperties:{},m=new Set;re(l)&&Object.keys(l).filter(b=>!c.properties||!c.properties[b]).forEach(b=>m.add(b));const g=[];Object.keys(f).filter(b=>!c.properties||!c.properties[b]).forEach(b=>{m.add(b),g.push(b)}),m.forEach(b=>{var _;const A=Ve(t,y,{rootSchema:n,_recurseList:a,experimental_defaultFormStateBehavior:s,includeUndefinedValues:i===!0,parentDefaults:M(l,[b]),rawFormData:M(f,[b]),required:(_=c.required)===null||_===void 0?void 0:_.includes(b)});Ld(p,b,A,i,u,g)})}return p}}function kv(t,e,{rawFormData:r,rootSchema:n={},_recurseList:i=[],experimental_defaultFormStateBehavior:a=void 0,required:s}={},o){var u,l,f,h;const c=e,d=((u=a?.arrayMinItems)===null||u===void 0?void 0:u.populate)==="never",p=((l=a?.arrayMinItems)===null||l===void 0?void 0:l.populate)==="requiredOnly",y=a?.emptyObjectFields==="skipEmptyDefaults",m=(h=(f=a?.arrayMinItems)===null||f===void 0?void 0:f.computeSkipPopulate)!==null&&h!==void 0?h:()=>!1,g=y?void 0:[];if(Array.isArray(o)&&(o=o.map((w,T)=>{const C=Js(c,or.Fallback,T);return Ve(t,C,{rootSchema:n,_recurseList:i,experimental_defaultFormStateBehavior:a,parentDefaults:w,required:s})})),Array.isArray(r)){const w=Js(c);d?o=r:o=r.map((T,C)=>Ve(t,w,{rootSchema:n,_recurseList:i,experimental_defaultFormStateBehavior:a,rawFormData:T,parentDefaults:M(o,[C]),required:s}))}if((re(c)&&Cr in c)===!1){if(d)return o??g;if(p&&!s)return o||void 0}const _=Array.isArray(o)?o.length:0;if(!c.minItems||tu(t,c,n)||m(t,c,n)||c.minItems<=_)return o||g;const A=o||[],x=Js(c,or.Invert),S=x.default,q=new Array(c.minItems-_).fill(Ve(t,x,{parentDefaults:S,rootSchema:n,_recurseList:i,experimental_defaultFormStateBehavior:a,required:s}));return A.concat(q)}function Ud(t,e,r={},n){switch(He(e)){case"object":return Mv(t,e,r,n);case"array":return kv(t,e,r,n)}}function Bv(t,e,r,n,i=!1,a,s){if(!re(e))throw new Error("Invalid schema: "+e);const o=xe(t,e,n,r,s),u=Ve(t,o,{rootSchema:n,includeUndefinedValues:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:s,rawFormData:r});if(r==null||typeof r=="number"&&isNaN(r))return u;const{mergeDefaultsIntoFormData:l,arrayMinItems:f={}}=a||{},{mergeExtraDefaults:h}=f,c=l==="useDefaultIfFormDataUndefined";return re(r)||Array.isArray(r)?et(u,r,h,c):r}function _p(t={}){return"widget"in H(t)&&H(t).widget!=="hidden"}function Sp(t,e,r={},n){if(r[Oo]==="files")return!0;if(e.items){const i=xe(t,e.items,n);return i.type==="string"&&i.format==="data-url"}return!1}function Lv(t,e,r={},n,i){const a=H(r,i),{label:s=!0}=a;let o=!!s;const u=He(e);return u==="array"&&(o=tu(t,e,n)||Sp(t,e,r,n)||_p(r)),u==="object"&&(o=!1),u==="boolean"&&!r[Oo]&&(o=!1),r[Em]&&(o=!1),o}function Uv(t,e,r){if(!r)return e;const{errors:n,errorSchema:i}=e;let a=t.toErrorList(r),s=r;return Ge(i)||(s=Ke(i,r,!0),a=[...n].concat(a)),{errorSchema:s,errors:a}}const sr=Symbol("no Value");function bo(t,e,r,n,i={}){let a;if(ge(r,ue)){const s={};if(ge(n,ue)){const l=M(n,ue,{});Object.keys(l).forEach(f=>{ge(i,f)&&(s[f]=void 0)})}const o=Object.keys(M(r,ue,{})),u={};o.forEach(l=>{const f=M(i,l);let h=M(n,[ue,l],{}),c=M(r,[ue,l],{});ge(h,ce)&&(h=xe(t,h,e,f)),ge(c,ce)&&(c=xe(t,c,e,f));const d=M(h,"type"),p=M(c,"type");if(!d||d===p)if(ge(s,l)&&delete s[l],p==="object"||p==="array"&&Array.isArray(f)){const y=bo(t,e,c,h,f);(y!==void 0||p==="array")&&(u[l]=y)}else{const y=M(c,"default",sr),m=M(h,"default",sr);y!==sr&&y!==f&&(m===f?s[l]=y:M(c,"readOnly")===!0&&(s[l]=void 0));const g=M(c,"const",sr),b=M(h,"const",sr);g!==sr&&g!==f&&(s[l]=b===f?g:void 0)}}),a={...typeof i=="string"||Array.isArray(i)?void 0:i,...s,...u}}else if(M(n,"type")==="array"&&M(r,"type")==="array"&&Array.isArray(i)){let s=M(n,"items"),o=M(r,"items");if(typeof s=="object"&&typeof o=="object"&&!Array.isArray(s)&&!Array.isArray(o)){ge(s,ce)&&(s=xe(t,s,e,i)),ge(o,ce)&&(o=xe(t,o,e,i));const u=M(s,"type"),l=M(o,"type");if(!u||u===l){const f=M(r,"maxItems",-1);l==="object"?a=i.reduce((h,c)=>{const d=bo(t,e,o,s,c);return d!==void 0&&(f<0||h.length0&&i.length>f?i.slice(0,f):i}}else typeof s=="boolean"&&typeof o=="boolean"&&s===o&&(a=i)}return a}function zr(t,e,r,n,i,a,s,o=[],u){if(ce in e||nt in e||jr in e){const h=xe(t,e,a,s);if(o.findIndex(d=>er(d,h))===-1)return zr(t,h,r,n,i,a,s,o.concat(h))}if(We in e&&!M(e,[We,ce]))return zr(t,M(e,We),r,n,i,a,s,o);const f={$id:i||r};if(He(e)==="object"&&ue in e)for(const h in e.properties){const c=M(e,[ue,h]),d=f[Zr]+n+h;f[h]=zr(t,re(c)?c:{},r,n,d,a,M(s,[h]),o)}return f}function $v(t,e,r,n,i,a="root",s="_",o){return zr(t,e,a,s,r,n,i,void 0)}function Xe(t,e,r,n,i,a=[]){if(ce in e||nt in e||jr in e){const o=xe(t,e,n,i);if(a.findIndex(l=>er(l,o))===-1)return Xe(t,o,r,n,i,a.concat(o))}let s={[Hr]:r.replace(/^\./,"")};if(pe in e||_e in e){const o=pe in e?e.oneOf:e.anyOf,u=rr(e),l=Tr(t,n,i,o,0,u),f=o[l];s={...s,...Xe(t,f,r,n,i,a)}}if(yo in e&&e[yo]!==!1&&ye(s,dh,!0),We in e&&Array.isArray(i)){const{items:o,additionalItems:u}=e;Array.isArray(o)?i.forEach((l,f)=>{o[f]?s[f]=Xe(t,o[f],`${r}.${f}`,n,l,a):u?s[f]=Xe(t,u,`${r}.${f}`,n,l,a):console.warn(`Unable to generate path schema for "${r}.${f}". No schema defined for it`)}):i.forEach((l,f)=>{s[f]=Xe(t,o,`${r}.${f}`,n,l,a)})}else if(ue in e)for(const o in e.properties){const u=M(e,[ue,o]);s[o]=Xe(t,u,`${r}.${o}`,n,M(i,[o]),a)}return s}function Wv(t,e,r="",n,i){return Xe(t,e,r,n,i)}class Kv{constructor(e,r,n,i){this.rootSchema=r,this.validator=e,this.experimental_defaultFormStateBehavior=n,this.experimental_customMergeAllOf=i}getValidator(){return this.validator}doesSchemaUtilsDiffer(e,r,n={},i){return!e||!r?!1:this.validator!==e||!he(this.rootSchema,r)||!he(this.experimental_defaultFormStateBehavior,n)||this.experimental_customMergeAllOf!==i}getDefaultFormState(e,r,n=!1){return Bv(this.validator,e,r,this.rootSchema,n,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf)}getDisplayLabel(e,r,n){return Lv(this.validator,e,r,this.rootSchema,n)}getClosestMatchingOption(e,r,n,i){return Tr(this.validator,this.rootSchema,e,r,n,i)}getFirstMatchingOption(e,r,n){return Wo(this.validator,e,r,this.rootSchema,n)}getMatchingOption(e,r,n){return rp(this.validator,e,r,this.rootSchema,n)}isFilesArray(e,r){return Sp(this.validator,e,r,this.rootSchema)}isMultiSelect(e){return tu(this.validator,e,this.rootSchema)}isSelect(e){return bp(this.validator,e,this.rootSchema)}mergeValidationData(e,r){return Uv(this.validator,e,r)}retrieveSchema(e,r){return xe(this.validator,e,this.rootSchema,r,this.experimental_customMergeAllOf)}sanitizeDataForNewSchema(e,r,n){return bo(this.validator,this.rootSchema,e,r,n)}toIdSchema(e,r,n,i="root",a="_"){return $v(this.validator,e,r,this.rootSchema,n,i,a,this.experimental_customMergeAllOf)}toPathSchema(e,r,n){return Wv(this.validator,e,r,this.rootSchema,n)}}function Vv(t,e,r={},n){return new Kv(t,e,r,n)}function Gv(t){var e;if(t.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const n=t.slice(5).split(";base64,");if(n.length!==2)throw new Error("File is invalid: dataURI must be base64");const[i,a]=n,[s,...o]=i.split(";"),u=s||"",l=decodeURI(((e=o.map(f=>f.split("=")).find(([f])=>f==="name"))===null||e===void 0?void 0:e[1])||"unknown");try{const f=atob(a),h=new Array(f.length);for(let d=0;d 0, got one of each`);if(t>e)return Ap(e,t).reverse();const r=[];for(let n=t;n<=e;n++)r.push({value:n,label:$e(n,2)});return r}function Hv(t,e){let r=t;if(Array.isArray(e)){const n=r.split(/(%\d)/);e.forEach((i,a)=>{const s=n.findIndex(o=>o===`%${a+1}`);s>=0&&(n[s]=i)}),r=n.join("")}return r}function zv(t,e){return Hv(t,e)}function de(t,e=[],r){if(Array.isArray(t))return t.map(a=>de(a,e)).filter(a=>a!==r);const n=t===""||t===null?-1:Number(t),i=e[n];return i?i.value:r}function xp(t,e,r=[]){const n=de(t,r);return Array.isArray(e)?e.filter(i=>!er(i,n)):er(n,e)?void 0:e}function Lr(t,e){return Array.isArray(e)?e.some(r=>er(r,t)):er(e,t)}function qp(t,e=[],r=!1){const n=e.map((i,a)=>Lr(i.value,t)?String(a):void 0).filter(i=>typeof i<"u");return r?n:n[0]}var Zs,$d;function Yv(){if($d)return Zs;$d=1;function t(e){return e==null}return Zs=t,Zs}var Jv=Yv();const Op=Q(Jv);function Cp(t,e,r=[]){const n=de(t,r);if(!Op(n)){const i=r.findIndex(o=>n===o.value),a=r.map(({value:o})=>o);return e.slice(0,i).concat(n,e.slice(i)).sort((o,u)=>+(a.indexOf(o)>a.indexOf(u)))}return e}var Zv=sp();const wp=Q(Zv);var Xs,Wd;function Xv(){if(Wd)return Xs;Wd=1;var t=Vo();function e(r,n,i,a){return a=typeof a=="function"?a:void 0,r==null?r:t(r,n,i,a)}return Xs=e,Xs}var Qv=Xv();const eb=Q(Qv);class rb{constructor(e){this.errorSchema={},this.resetAllErrors(e)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(e){let n=Array.isArray(e)&&e.length>0||typeof e=="string"?M(this.errorSchema,e):this.errorSchema;return!n&&e&&(n={},eb(this.errorSchema,e,n,Object)),n}resetAllErrors(e){return this.errorSchema=e?wp(e):{},this}addErrors(e,r){const n=this.getOrCreateErrorBlock(r);let i=M(n,we);return Array.isArray(i)||(i=[],n[we]=i),Array.isArray(e)?i.push(...e):i.push(e),this}setErrors(e,r){const n=this.getOrCreateErrorBlock(r),i=Array.isArray(e)?[...e]:[e];return ye(n,we,i),this}clearErrors(e){const r=this.getOrCreateErrorBlock(e);return ye(r,we,[]),this}}function tb(t,e,r=[1900,new Date().getFullYear()+2],n="YMD"){const{day:i,month:a,year:s,hour:o,minute:u,second:l}=t,f={type:"day",range:[1,31],value:i},h={type:"month",range:[1,12],value:a},c={type:"year",range:r,value:s},d=[];switch(n){case"MDY":d.push(h,f,c);break;case"DMY":d.push(f,h,c);break;case"YMD":default:d.push(c,h,f)}return e&&d.push({type:"hour",range:[0,23],value:o},{type:"minute",range:[0,59],value:u},{type:"second",range:[0,59],value:l}),d}function nb(t){const e={};return t.multipleOf&&(e.step=t.multipleOf),(t.minimum||t.minimum===0)&&(e.min=t.minimum),(t.maximum||t.maximum===0)&&(e.max=t.maximum),e}function Ip(t,e,r={},n=!0){const i={type:e||"text",...nb(t)};return r.inputType?i.type=r.inputType:e||(t.type==="number"?(i.type="number",n&&i.step===void 0&&(i.step="any")):t.type==="integer"&&(i.type="number",i.step===void 0&&(i.step=1))),r.autocomplete&&(i.autoComplete=r.autocomplete),i}const Kd={props:{disabled:!1},submitText:"Submit",norender:!1};function ib(t={}){const e=H(t);if(e&&e[Xr]){const r=e[Xr];return{...Kd,...r}}return Kd}function G(t,e,r={}){const{templates:n}=e;return t==="ButtonTemplates"?n[t]:r[t]||n[t]}var Qs={exports:{}},J={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Vd;function ab(){if(Vd)return J;Vd=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),o=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),p;p=Symbol.for("react.module.reference");function y(m){if(typeof m=="object"&&m!==null){var g=m.$$typeof;switch(g){case t:switch(m=m.type,m){case r:case i:case n:case l:case f:return m;default:switch(m=m&&m.$$typeof,m){case o:case s:case u:case c:case h:case a:return m;default:return g}}case e:return g}}}return J.ContextConsumer=s,J.ContextProvider=a,J.Element=t,J.ForwardRef=u,J.Fragment=r,J.Lazy=c,J.Memo=h,J.Portal=e,J.Profiler=i,J.StrictMode=n,J.Suspense=l,J.SuspenseList=f,J.isAsyncMode=function(){return!1},J.isConcurrentMode=function(){return!1},J.isContextConsumer=function(m){return y(m)===s},J.isContextProvider=function(m){return y(m)===a},J.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},J.isForwardRef=function(m){return y(m)===u},J.isFragment=function(m){return y(m)===r},J.isLazy=function(m){return y(m)===c},J.isMemo=function(m){return y(m)===h},J.isPortal=function(m){return y(m)===e},J.isProfiler=function(m){return y(m)===i},J.isStrictMode=function(m){return y(m)===n},J.isSuspense=function(m){return y(m)===l},J.isSuspenseList=function(m){return y(m)===f},J.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===i||m===n||m===l||m===f||m===d||typeof m=="object"&&m!==null&&(m.$$typeof===c||m.$$typeof===h||m.$$typeof===a||m.$$typeof===s||m.$$typeof===u||m.$$typeof===p||m.getModuleId!==void 0)},J.typeOf=y,J}var Gd;function sb(){return Gd||(Gd=1,Qs.exports=ab()),Qs.exports}var ob=sb();const Hd=Q(ob),eo={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function ub(t){let e=M(t,"MergedWidget");if(!e){const r=t.defaultProps&&t.defaultProps.options||{};e=({options:n,...i})=>v.jsx(t,{options:{...r,...n},...i}),ye(t,"MergedWidget",e)}return e}function Re(t,e,r={}){const n=He(t);if(typeof e=="function"||e&&Hd.isForwardRef(N.createElement(e))||Hd.isMemo(e))return ub(e);if(typeof e!="string")throw new Error(`Unsupported widget definition: ${typeof e}`);if(e in r){const i=r[e];return Re(t,i,r)}if(typeof n=="string"){if(!(n in eo))throw new Error(`No widget for type '${n}'`);if(e in eo[n]){const i=r[eo[n][e]];return Re(t,i,r)}}throw new Error(`No widget '${e}' for type '${n}'`)}function cb(t,e,r={}){try{return Re(t,e,r),!0}catch(n){const i=n;if(i.message&&(i.message.startsWith("No widget")||i.message.startsWith("Unsupported widget")))return!1;throw n}}function Ur(t,e){return`${Lo(t)?t:t[Zr]}__${e}`}function gr(t){return Ur(t,"description")}function Tp(t){return Ur(t,"error")}function Er(t){return Ur(t,"examples")}function Ep(t){return Ur(t,"help")}function nu(t){return Ur(t,"title")}function Ie(t,e=!1){const r=e?` ${Er(t)}`:"";return`${Tp(t)} ${gr(t)} ${Ep(t)}${r}`}function _t(t,e){return`${t}-${e}`}function lb(t,e,r){return e?r:t}function fb(t){return t?new Date(t).toJSON():void 0}function db(t){if(Cm in t&&Array.isArray(t.enum)&&t.enum.length===1)return t.enum[0];if(Cr in t)return t.const;throw new Error("schema cannot be inferred as a constant")}function rt(t,e){const r=t;if(t.enum){let a;if(e){const{enumNames:s}=H(e);a=s}return!a&&r.enumNames&&(a=r.enumNames),t.enum.map((s,o)=>({label:a?.[o]||String(s),value:s}))}let n,i;return t.anyOf?(n=t.anyOf,i=e?.anyOf):t.oneOf&&(n=t.oneOf,i=e?.oneOf),n&&n.map((a,s)=>{const{title:o}=H(i?.[s]),u=a,l=db(u),f=o||u.title||String(l);return{schema:u,label:f,value:l}})}function hb(t,e){if(!Array.isArray(e))return t;const r=f=>f.reduce((h,c)=>(h[c]=!0,h),{}),n=f=>f.length>1?`properties '${f.join("', '")}'`:`property '${f[0]}'`,i=r(t),a=e.filter(f=>f==="*"||i[f]),s=r(a),o=t.filter(f=>!s[f]),u=a.indexOf("*");if(u===-1){if(o.length)throw new Error(`uiSchema order list does not contain ${n(o)}`);return a}if(u!==a.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const l=[...a];return l.splice(u,1,...o),l}function ro(t,e=!0){if(!t)return{year:-1,month:-1,day:-1,hour:e?-1:0,minute:e?-1:0,second:e?-1:0};const r=new Date(t);if(Number.isNaN(r.getTime()))throw new Error("Unable to parse date "+t);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:e?r.getUTCHours():0,minute:e?r.getUTCMinutes():0,second:e?r.getUTCSeconds():0}}function Yr(t){if(t.const||t.enum&&t.enum.length===1&&t.enum[0]===!0)return!0;if(t.anyOf&&t.anyOf.length===1)return Yr(t.anyOf[0]);if(t.oneOf&&t.oneOf.length===1)return Yr(t.oneOf[0]);if(t.allOf){const e=r=>Yr(r);return t.allOf.some(e)}return!1}function pb(t,e,r){const{props:n,state:i}=t;return!he(n,e)||!he(i,r)}function zd(t,e=!0){const{year:r,month:n,day:i,hour:a=0,minute:s=0,second:o=0}=t,u=Date.UTC(r,n-1,i,a,s,o),l=new Date(u).toJSON();return e?l:l.slice(0,10)}function tt(t,e=[]){if(!t)return[];let r=[];return we in t&&(r=r.concat(t[we].map(n=>{const i=`.${e.join(".")}`;return{property:i,message:n,stack:`${i} ${n}`}}))),Object.keys(t).reduce((n,i)=>{if(i!==we){const a=t[i];Dm(a)&&(n=n.concat(tt(a,[...e,i])))}return n},r)}var to,Yd;function mb(){if(Yd)return to;Yd=1;var t=Ne(),e=yt(),r=le(),n=hr(),i=Ch(),a=ar(),s=wh();function o(u){return r(u)?t(u,a):n(u)?[u]:e(i(s(u)))}return to=o,to}var yb=mb();const Rp=Q(yb);function gb(t){const e=new rb;return t.length&&t.forEach(r=>{const{property:n,message:i}=r,a=n==="."?[]:Rp(n);a.length>0&&a[0]===""&&a.splice(0,1),i&&e.addErrors(i,a)}),e.ErrorSchema}function vb(t){if(!t)return"";const e=new Date(t),r=$e(e.getFullYear(),4),n=$e(e.getMonth()+1,2),i=$e(e.getDate(),2),a=$e(e.getHours(),2),s=$e(e.getMinutes(),2),o=$e(e.getSeconds(),2),u=$e(e.getMilliseconds(),3);return`${r}-${n}-${i}T${a}:${s}:${o}.${u}`}function no(t,e){if(!e)return t;const{errors:r,errorSchema:n}=t;let i=tt(e),a=e;return Ge(n)||(a=Ke(n,e,!0),i=[...r].concat(i)),{errorSchema:a,errors:i}}var Z;(function(t){t.ArrayItemTitle="Item",t.MissingItems="Missing items definition",t.YesLabel="Yes",t.NoLabel="No",t.CloseLabel="Close",t.ErrorsLabel="Errors",t.NewStringDefault="New Value",t.AddButton="Add",t.AddItemButton="Add Item",t.CopyButton="Copy",t.MoveDownButton="Move down",t.MoveUpButton="Move up",t.RemoveButton="Remove",t.NowLabel="Now",t.ClearLabel="Clear",t.AriaDateLabel="Select a date",t.PreviewLabel="Preview",t.DecrementAriaLabel="Decrease value by 1",t.IncrementAriaLabel="Increase value by 1",t.UnknownFieldType="Unknown field type %1",t.OptionPrefix="Option %1",t.TitleOptionPrefix="%1 option %2",t.KeyLabel="%1 Key",t.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',t.UnsupportedField="Unsupported field schema.",t.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",t.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",t.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",t.FilesInfo="**%1** (%2, %3 bytes)"})(Z||(Z={}));var bb=ru();const _b=Q(bb);var io,Jd;function Sb(){if(Jd)return io;Jd=1;var t=kr(),e=Vo(),r=pr();function n(i,a,s){for(var o=-1,u=a.length,l={};++ocrypto.getRandomValues(new Uint8Array(t)).reduce((e,r)=>(r&=63,r<36?e+=r.toString(36):r<62?e+=(r-26).toString(36).toUpperCase():r>62?e+="-":e+="_",e),"");function _o(){return Ob()}function eh(t){return Array.isArray(t)?t.map(e=>({key:_o(),item:e})):[]}function br(t){return Array.isArray(t)?t.map(e=>e.item):[]}class Cb extends N.Component{constructor(e){super(e),this._getNewFormDataRow=()=>{const{schema:i,registry:a}=this.props,{schemaUtils:s}=a;let o=i.items;return vo(i)&&qm(i)&&(o=i.additionalItems),s.getDefaultFormState(o)},this.onAddClick=i=>{this._handleAddClick(i)},this.onAddIndexClick=i=>a=>{this._handleAddClick(a,i)},this.onCopyIndexClick=i=>a=>{a&&a.preventDefault();const{onChange:s,errorSchema:o}=this.props,{keyedFormData:u}=this.state;let l;if(o){l={};for(const c in o){const d=parseInt(c);d<=i?ye(l,[d],o[c]):d>i&&ye(l,[d+1],o[c])}}const f={key:_o(),item:wp(u[i].item)},h=[...u];i!==void 0?h.splice(i+1,0,f):h.push(f),this.setState({keyedFormData:h,updatedKeyedFormData:!0},()=>s(br(h),l))},this.onDropIndexClick=i=>a=>{a&&a.preventDefault();const{onChange:s,errorSchema:o}=this.props,{keyedFormData:u}=this.state;let l;if(o){l={};for(const h in o){const c=parseInt(h);ci&&ye(l,[c-1],o[h])}}const f=u.filter((h,c)=>c!==i);this.setState({keyedFormData:f,updatedKeyedFormData:!0},()=>s(br(f),l))},this.onReorderClick=(i,a)=>s=>{s&&(s.preventDefault(),s.currentTarget.blur());const{onChange:o,errorSchema:u}=this.props;let l;if(u){l={};for(const d in u){const p=parseInt(d);p==i?ye(l,[a],u[i]):p==a?ye(l,[i],u[a]):ye(l,[d],u[p])}}const{keyedFormData:f}=this.state;function h(){const d=f.slice();return d.splice(i,1),d.splice(a,0,f[i]),d}const c=h();this.setState({keyedFormData:c},()=>o(br(c),l))},this.onChangeForIndex=i=>(a,s,o)=>{const{formData:u,onChange:l,errorSchema:f}=this.props,c=(Array.isArray(u)?u:[]).map((d,p)=>i===p?typeof a>"u"?null:a:d);l(c,f&&f&&{...f,[i]:s},o)},this.onSelectChange=i=>{const{onChange:a,idSchema:s}=this.props;a(i,void 0,s&&s.$id)};const{formData:r=[]}=e,n=eh(r);this.state={keyedFormData:n,updatedKeyedFormData:!1}}static getDerivedStateFromProps(e,r){if(r.updatedKeyedFormData)return{updatedKeyedFormData:!1};const n=Array.isArray(e.formData)?e.formData:[],i=r.keyedFormData||[];return{keyedFormData:n.length===i.length?i.map((s,o)=>({key:s.key,item:n[o]})):eh(n)}}get itemTitle(){const{schema:e,registry:r}=this.props,{translateString:n}=r;return M(e,[We,"title"],M(e,[We,"description"],n(Z.ArrayItemTitle)))}isItemRequired(e){return Array.isArray(e.type)?!e.type.includes("null"):e.type!=="null"}canAddItem(e){const{schema:r,uiSchema:n,registry:i}=this.props;let{addable:a}=H(n,i.globalUiOptions);return a!==!1&&(r.maxItems!==void 0?a=e.length=r&&ye(s,[f+1],i[l])}}const o={key:_o(),item:this._getNewFormDataRow()},u=[...a];r!==void 0?u.splice(r,0,o):u.push(o),this.setState({keyedFormData:u,updatedKeyedFormData:!0},()=>n(br(u),s))}render(){const{schema:e,uiSchema:r,idSchema:n,registry:i}=this.props,{schemaUtils:a,translateString:s}=i;if(!(We in e)){const o=H(r),u=G("UnsupportedFieldTemplate",i,o);return v.jsx(u,{schema:e,idSchema:n,reason:s(Z.MissingItems),registry:i})}return a.isMultiSelect(e)?this.renderMultiSelect():_p(r)?this.renderCustomWidget():vo(e)?this.renderFixedArray():a.isFilesArray(e,r)?this.renderFiles():this.renderNormalArray()}renderNormalArray(){const{schema:e,uiSchema:r={},errorSchema:n,idSchema:i,name:a,title:s,disabled:o=!1,readonly:u=!1,autofocus:l=!1,required:f=!1,registry:h,onBlur:c,onFocus:d,idPrefix:p,idSeparator:y="_",rawErrors:m}=this.props,{keyedFormData:g}=this.state,b=e.title||s||a,{schemaUtils:_,formContext:A}=h,x=H(r),S=Te(e.items)?e.items:{},q=_.retrieveSchema(S),w=br(this.state.keyedFormData),T=this.canAddItem(w),C={canAdd:T,items:g.map((P,O)=>{const{key:E,item:F}=P,k=F,Y=_.retrieveSchema(S,k),D=n?n[O]:void 0,j=i.$id+y+O,z=_.toIdSchema(Y,j,k,p,y);return this.renderArrayFieldItem({key:E,index:O,name:a&&`${a}-${O}`,title:b?`${b}-${O+1}`:void 0,canAdd:T,canMoveUp:O>0,canMoveDown:OS.retrieveSchema(E,n[F])),C=Te(e.additionalItems)?S.retrieveSchema(e.additionalItems,n):null;(!_||_.length{const{key:k,item:Y}=E,D=Y,j=F>=T.length,z=(j&&Te(e.additionalItems)?S.retrieveSchema(e.additionalItems,D):T[F])||{},te=o.$id+s+F,me=S.toIdSchema(z,te,D,a,s),fe=j?r.additionalItems||{}:Array.isArray(r.items)?r.items[F]:r.items||{},Ce=i?i[F]:void 0;return this.renderArrayFieldItem({key:k,index:F,name:u&&`${u}-${F}`,title:A?`${A}-${F+1}`:void 0,canAdd:I,canRemove:j,canMoveUp:F>=T.length+1,canMoveDown:j&&F<_.length-1,itemSchema:z,itemData:D,itemUiSchema:fe,itemIdSchema:me,itemErrorSchema:Ce,autofocus:c&&F===0,onBlur:y,onFocus:m,rawErrors:g,totalItems:b.length})}),onAddClick:this.onAddClick,readonly:h,required:d,registry:p,schema:e,uiSchema:r,title:A,formContext:q,errorSchema:i,rawErrors:g},O=G("ArrayFieldTemplate",p,x);return v.jsx(O,{...P})}renderArrayFieldItem(e){const{key:r,index:n,name:i,canAdd:a,canRemove:s=!0,canMoveUp:o,canMoveDown:u,itemSchema:l,itemData:f,itemUiSchema:h,itemIdSchema:c,itemErrorSchema:d,autofocus:p,onBlur:y,onFocus:m,rawErrors:g,totalItems:b,title:_}=e,{disabled:A,hideError:x,idPrefix:S,idSeparator:q,readonly:w,uiSchema:T,registry:C,formContext:I}=this.props,{fields:{ArraySchemaField:P,SchemaField:O},globalUiOptions:E}=C,F=P||O,{orderable:k=!0,removable:Y=!0,copyable:D=!1}=H(T,E),j={moveUp:k&&o,moveDown:k&&u,copy:D&&a,remove:Y&&s,toolbar:!1};return j.toolbar=Object.keys(j).some(z=>j[z]),{children:v.jsx(F,{name:i,title:_,index:n,schema:l,uiSchema:h,formData:f,formContext:I,errorSchema:d,idPrefix:S,idSeparator:q,idSchema:c,required:this.isItemRequired(l),onChange:this.onChangeForIndex(n),onBlur:y,onFocus:m,registry:C,disabled:A,readonly:w,hideError:x,autofocus:p,rawErrors:g}),className:"array-item",disabled:A,canAdd:a,hasCopy:j.copy,hasToolbar:j.toolbar,hasMoveUp:j.moveUp,hasMoveDown:j.moveDown,hasRemove:j.remove,index:n,totalItems:b,key:r,onAddIndexClick:this.onAddIndexClick,onCopyIndexClick:this.onCopyIndexClick,onDropIndexClick:this.onDropIndexClick,onReorderClick:this.onReorderClick,readonly:w,registry:C,schema:l,uiSchema:h}}}function wb(t){var e,r,n;const{schema:i,name:a,uiSchema:s,idSchema:o,formData:u,registry:l,required:f,disabled:h,readonly:c,hideError:d,autofocus:p,title:y,onChange:m,onFocus:g,onBlur:b,rawErrors:_}=t,{title:A}=i,{widgets:x,formContext:S,translateString:q,globalUiOptions:w}=l,{widget:T="checkbox",title:C,label:I=!0,...P}=H(s,w),O=Re(i,T,x),E=q(Z.YesLabel),F=q(Z.NoLabel);let k;const Y=(r=(e=C??A)!==null&&e!==void 0?e:y)!==null&&r!==void 0?r:a;if(Array.isArray(i.oneOf))k=rt({oneOf:i.oneOf.map(D=>{if(Te(D))return{...D,title:D.title||(D.const===!0?E:F)}}).filter(D=>D)},s);else{const D=i,j=(n=i.enum)!==null&&n!==void 0?n:[!0,!1];!D.enumNames&&j.length===2&&j.every(z=>typeof z=="boolean")?k=[{value:j[0],label:j[0]?E:F},{value:j[1],label:j[1]?E:F}]:k=rt({enum:j,enumNames:D.enumNames},s)}return v.jsx(O,{options:{...P,enumOptions:k},schema:i,uiSchema:s,id:o.$id,name:a,onChange:m,onFocus:g,onBlur:b,label:Y,hideLabel:!I,value:u,required:f,disabled:h,readonly:c,hideError:d,registry:l,formContext:S,autofocus:p,rawErrors:_})}class rh extends N.Component{constructor(e){super(e),this.onOptionChange=s=>{const{selectedOption:o,retrievedOptions:u}=this.state,{formData:l,onChange:f,registry:h}=this.props,{schemaUtils:c}=h,d=s!==void 0?parseInt(s,10):-1;if(d===o)return;const p=d>=0?u[d]:void 0,y=o>=0?u[o]:void 0;let m=c.sanitizeDataForNewSchema(p,y,l);m&&p&&(m=c.getDefaultFormState(p,m,"excludeObjectChildren")),this.setState({selectedOption:d},()=>{f(m,void 0,this.getFieldId())})};const{formData:r,options:n,registry:{schemaUtils:i}}=this.props,a=n.map(s=>i.retrieveSchema(s,r));this.state={retrievedOptions:a,selectedOption:this.getMatchingOption(0,r,a)}}componentDidUpdate(e,r){const{formData:n,options:i,idSchema:a}=this.props,{selectedOption:s}=this.state;let o=this.state;if(!he(e.options,i)){const{registry:{schemaUtils:u}}=this.props,l=i.map(f=>u.retrieveSchema(f,n));o={selectedOption:s,retrievedOptions:l}}if(!he(n,e.formData)&&a.$id===e.idSchema.$id){const{retrievedOptions:u}=o,l=this.getMatchingOption(s,n,u);r&&l!==s&&(o={selectedOption:l,retrievedOptions:u})}o!==this.state&&this.setState(o)}getMatchingOption(e,r,n){const{schema:i,registry:{schemaUtils:a}}=this.props,s=rr(i);return a.getClosestMatchingOption(r,n,e,s)}getFieldId(){const{idSchema:e,schema:r}=this.props;return`${e.$id}${r.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:e,disabled:r=!1,errorSchema:n={},formContext:i,onBlur:a,onFocus:s,registry:o,schema:u,uiSchema:l}=this.props,{widgets:f,fields:h,translateString:c,globalUiOptions:d,schemaUtils:p}=o,{SchemaField:y}=h,{selectedOption:m,retrievedOptions:g}=this.state,{widget:b="select",placeholder:_,autofocus:A,autocomplete:x,title:S=u.title,...q}=H(l,d),w=Re({type:"number"},b,f),T=M(n,we,[]),C=Qr(n,[we]),I=p.getDisplayLabel(u,l,d),P=m>=0&&g[m]||null;let O;if(P){const{required:j}=u;O=j?Fe({required:j},P):P}let E=[];pe in u&&l&&pe in l?Array.isArray(l[pe])?E=l[pe]:console.warn(`uiSchema.oneOf is not an array for "${S||e}"`):_e in u&&l&&_e in l&&(Array.isArray(l[_e])?E=l[_e]:console.warn(`uiSchema.anyOf is not an array for "${S||e}"`));let F=l;m>=0&&E.length>m&&(F=E[m]);const k=S?Z.TitleOptionPrefix:Z.OptionPrefix,Y=S?[S]:[],D=g.map((j,z)=>{const{title:te=j.title}=H(E[z]);return{label:te||c(k,Y.concat(String(z+1))),value:z}});return v.jsxs("div",{className:"panel panel-default panel-body",children:[v.jsx("div",{className:"form-group",children:v.jsx(w,{id:this.getFieldId(),name:`${e}${u.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:a,onFocus:s,disabled:r||Ge(D),multiple:!1,rawErrors:T,errorSchema:C,value:m>=0?m:void 0,options:{enumOptions:D,...q},registry:o,formContext:i,placeholder:_,autocomplete:x,autofocus:A,label:S??e,hideLabel:!I})}),O&&v.jsx(y,{...this.props,schema:O,uiSchema:F})]})}}const Ib=/\.([0-9]*0)*$/,Tb=/[0.]0*$/;function Eb(t){const{registry:e,onChange:r,formData:n,value:i}=t,[a,s]=N.useState(i),{StringField:o}=e.fields;let u=n;const l=N.useCallback(f=>{s(f),`${f}`.charAt(0)==="."&&(f=`0${f}`);const h=typeof f=="string"&&f.match(Ib)?cu(f.replace(Tb,"")):cu(f);r(h)},[r]);if(typeof a=="string"&&typeof u=="number"){const f=new RegExp(`^(${String(u).replace(".","\\.")})?\\.?0*$`);a.match(f)&&(u=a)}return v.jsx(o,{...t,formData:u,onChange:l})}function Qe(){return Qe=Object.assign?Object.assign.bind():function(t){for(var e=1;e(t[e.toLowerCase()]=e,t),{class:"className",for:"htmlFor"}),ih={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Fb=["style","script"],jb=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Pb=/mailto:/i,Db=/\n{2,}$/,Fp=/^(\s*>[\s\S]*?)(?=\n\n|$)/,Nb=/^ *> ?/gm,Mb=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,kb=/^ {2,}\n/,Bb=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,jp=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,Pp=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Lb=/^(`+)((?:\\`|[^`])+)\1/,Ub=/^(?:\n *)*\n/,$b=/\r\n?/g,Wb=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,Kb=/^\[\^([^\]]+)]/,Vb=/\f/g,Gb=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,Hb=/^\s*?\[(x|\s)\]/,Dp=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Np=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Mp=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,So=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,zb=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,kp=/^)/,Yb=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Ao=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,Jb=/^\{.*\}$/,Zb=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Xb=/^<([^ >]+@[^ >]+)>/,Qb=/^<([^ >]+:\/[^ >]+)>/,e_=/-([a-z])?/gi,Bp=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,r_=/^\[([^\]]*)\]:\s+]+)>?\s*("([^"]*)")?/,t_=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,n_=/^\[([^\]]*)\] ?\[([^\]]*)\]/,i_=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,a_=/\t/g,s_=/(^ *\||\| *$)/g,o_=/^ *:-+: *$/,u_=/^ *:-+ *$/,c_=/^ *-+: *$/,St="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",l_=new RegExp(`^([*_])\\1${St}\\1\\1(?!\\1)`),f_=new RegExp(`^([*_])${St}\\1(?!\\1)`),d_=new RegExp(`^(==)${St}\\1`),h_=new RegExp(`^(~~)${St}\\1`),p_=/^\\([^0-9A-Za-z\s])/,oo=/\\([^0-9A-Za-z\s])/g,m_=/^([\s\S](?:(?! |[0-9]\.)[^*_~\-\n<`\\\[!])*)/,y_=/^\n+/,g_=/^([ \t]*)/,v_=/\\([^\\])/g,b_=/(?:^|\n)( *)$/,iu="(?:\\d+\\.)",au="(?:[*+-])";function Lp(t){return"( *)("+(t===1?iu:au)+") +"}const Up=Lp(1),$p=Lp(2);function Wp(t){return new RegExp("^"+(t===1?Up:$p))}const __=Wp(1),S_=Wp(2);function Kp(t){return new RegExp("^"+(t===1?Up:$p)+"[^\\n]*(?:\\n(?!\\1"+(t===1?iu:au)+" )[^\\n]*)*(\\n|$)","gm")}const A_=Kp(1),x_=Kp(2);function Vp(t){const e=t===1?iu:au;return new RegExp("^( *)("+e+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+e+" (?!"+e+" ))\\n*|\\s*\\n*$)")}const Gp=Vp(1),Hp=Vp(2);function ah(t,e){const r=e===1,n=r?Gp:Hp,i=r?A_:x_,a=r?__:S_;return{match:ur(function(s,o){const u=b_.exec(o.prevCapture);return u&&(o.list||!o.inline&&!o.simple)?n.exec(s=u[1]+s):null}),order:1,parse(s,o,u){const l=r?+s[2]:void 0,f=s[0].replace(Db,` +`).match(i);let h=!1;return{items:f.map(function(c,d){const p=a.exec(c)[0].length,y=new RegExp("^ {1,"+p+"}","gm"),m=c.replace(y,"").replace(a,""),g=d===f.length-1,b=m.indexOf(` + +`)!==-1||g&&h;h=b;const _=u.inline,A=u.list;let x;u.list=!0,b?(u.inline=!1,x=Rr(m)+` + +`):(u.inline=!0,x=Rr(m));const S=o(x,u);return u.inline=_,u.list=A,S}),ordered:r,start:l}},render:(s,o,u)=>t(s.ordered?"ol":"ul",{key:u.key,start:s.type===L.orderedList?s.start:void 0},s.items.map(function(l,f){return t("li",{key:f},o(l,u))}))}}const q_=new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),O_=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,zp=[Fp,jp,Pp,Dp,Mp,Np,Bp,Gp,Hp],C_=[...zp,/^[^\n]+(?: \n|\n{2,})/,So,kp,Ao];function Rr(t){let e=t.length;for(;e>0&&t[e-1]<=" ";)e--;return t.slice(0,e)}function _r(t){return t.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function w_(t){return c_.test(t)?"right":o_.test(t)?"center":u_.test(t)?"left":null}function sh(t,e,r,n){const i=r.inTable;r.inTable=!0;let a=[[]],s="";function o(){if(!s)return;const u=a[a.length-1];u.push.apply(u,e(s,r)),s=""}return t.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((u,l,f)=>{u.trim()==="|"&&(o(),n)?l!==0&&l!==f.length-1&&a.push([]):s+=u}),o(),r.inTable=i,a}function I_(t,e,r){r.inline=!0;const n=t[2]?t[2].replace(s_,"").split("|").map(w_):[],i=t[3]?function(s,o,u){return s.trim().split(` +`).map(function(l){return sh(l,o,u,!0)})}(t[3],e,r):[],a=sh(t[1],e,r,!!i.length);return r.inline=!1,i.length?{align:n,cells:i,header:a,type:L.table}:{children:a,type:L.paragraph}}function oh(t,e){return t.align[e]==null?{}:{textAlign:t.align[e]}}function ur(t){return t.inline=1,t}function Le(t){return ur(function(e,r){return r.inline?t.exec(e):null})}function Ue(t){return ur(function(e,r){return r.inline||r.simple?t.exec(e):null})}function Pe(t){return function(e,r){return r.inline||r.simple?null:t.exec(e)}}function Sr(t){return ur(function(e){return t.exec(e)})}function T_(t,e){if(e.inline||e.simple)return null;let r="";t.split(` +`).every(i=>(i+=` +`,!zp.some(a=>a.test(i))&&(r+=i,!!i.trim())));const n=Rr(r);return n==""?null:[r,,n]}function E_(t){try{if(decodeURIComponent(t).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return null}catch{return null}return t}function uh(t){return t.replace(v_,"$1")}function Jr(t,e,r){const n=r.inline||!1,i=r.simple||!1;r.inline=!0,r.simple=!0;const a=t(e,r);return r.inline=n,r.simple=i,a}function R_(t,e,r){const n=r.inline||!1,i=r.simple||!1;r.inline=!1,r.simple=!0;const a=t(e,r);return r.inline=n,r.simple=i,a}function F_(t,e,r){const n=r.inline||!1;r.inline=!1;const i=t(e,r);return r.inline=n,i}const uo=(t,e,r)=>({children:Jr(e,t[2],r)});function co(){return{}}function lo(){return null}function j_(...t){return t.filter(Boolean).join(" ")}function fo(t,e,r){let n=t;const i=e.split(".");for(;i.length&&(n=n[i[0]],n!==void 0);)i.shift();return n||r}function P_(t="",e={}){function r(c,d,...p){const y=fo(e.overrides,`${c}.props`,{});return e.createElement(function(m,g){const b=fo(g,m);return b?typeof b=="function"||typeof b=="object"&&"render"in b?b:fo(g,`${m}.component`,m):m}(c,e.overrides),Qe({},d,y,{className:j_(d?.className,y.className)||void 0}),...p)}function n(c){c=c.replace(Gb,"");let d=!1;e.forceInline?d=!0:e.forceBlock||(d=i_.test(c)===!1);const p=l(u(d?c:`${Rr(c).replace(y_,"")} + +`,{inline:d}));for(;typeof p[p.length-1]=="string"&&!p[p.length-1].trim();)p.pop();if(e.wrapper===null)return p;const y=e.wrapper||(d?"span":"div");let m;if(p.length>1||e.forceWrapper)m=p;else{if(p.length===1)return m=p[0],typeof m=="string"?r("span",{key:"outer"},m):m;m=null}return e.createElement(y,{key:"outer"},m)}function i(c,d){const p=d.match(jb);return p?p.reduce(function(y,m){const g=m.indexOf("=");if(g!==-1){const b=function(S){return S.indexOf("-")!==-1&&S.match(Yb)===null&&(S=S.replace(e_,function(q,w){return w.toUpperCase()})),S}(m.slice(0,g)).trim(),_=function(S){const q=S[0];return(q==='"'||q==="'")&&S.length>=2&&S[S.length-1]===q?S.slice(1,-1):S}(m.slice(g+1).trim()),A=nh[b]||b;if(A==="ref")return y;const x=y[A]=function(S,q,w,T){return q==="style"?w.split(/;\s?/).reduce(function(C,I){const P=I.slice(0,I.indexOf(":"));return C[P.trim().replace(/(-[a-z])/g,O=>O[1].toUpperCase())]=I.slice(P.length+1).trim(),C},{}):q==="href"||q==="src"?T(w,S,q):(w.match(Jb)&&(w=w.slice(1,w.length-1)),w==="true"||w!=="false"&&w)}(c,b,_,e.sanitizer);typeof x=="string"&&(So.test(x)||Ao.test(x))&&(y[A]=n(x.trim()))}else m!=="style"&&(y[nh[m]||m]=!0);return y},{}):null}e.overrides=e.overrides||{},e.sanitizer=e.sanitizer||E_,e.slugify=e.slugify||_r,e.namedCodesToUnicode=e.namedCodesToUnicode?Qe({},ih,e.namedCodesToUnicode):ih,e.createElement=e.createElement||N.createElement;const a=[],s={},o={[L.blockQuote]:{match:Pe(Fp),order:1,parse(c,d,p){const[,y,m]=c[0].replace(Nb,"").match(Mb);return{alert:y,children:d(m,p)}},render(c,d,p){const y={key:p.key};return c.alert&&(y.className="markdown-alert-"+e.slugify(c.alert.toLowerCase(),_r),c.children.unshift({attrs:{},children:[{type:L.text,text:c.alert}],noInnerParse:!0,type:L.htmlBlock,tag:"header"})),r("blockquote",y,d(c.children,p))}},[L.breakLine]:{match:Sr(kb),order:1,parse:co,render:(c,d,p)=>r("br",{key:p.key})},[L.breakThematic]:{match:Pe(Bb),order:1,parse:co,render:(c,d,p)=>r("hr",{key:p.key})},[L.codeBlock]:{match:Pe(Pp),order:0,parse:c=>({lang:void 0,text:Rr(c[0].replace(/^ {4}/gm,"")).replace(oo,"$1")}),render:(c,d,p)=>r("pre",{key:p.key},r("code",Qe({},c.attrs,{className:c.lang?`lang-${c.lang}`:""}),c.text))},[L.codeFenced]:{match:Pe(jp),order:0,parse:c=>({attrs:i("code",c[3]||""),lang:c[2]||void 0,text:c[4].replace(oo,"$1"),type:L.codeBlock})},[L.codeInline]:{match:Ue(Lb),order:3,parse:c=>({text:c[2].replace(oo,"$1")}),render:(c,d,p)=>r("code",{key:p.key},c.text)},[L.footnote]:{match:Pe(Wb),order:0,parse:c=>(a.push({footnote:c[2],identifier:c[1]}),{}),render:lo},[L.footnoteReference]:{match:Le(Kb),order:1,parse:c=>({target:`#${e.slugify(c[1],_r)}`,text:c[1]}),render:(c,d,p)=>r("a",{key:p.key,href:e.sanitizer(c.target,"a","href")},r("sup",{key:p.key},c.text))},[L.gfmTask]:{match:Le(Hb),order:1,parse:c=>({completed:c[1].toLowerCase()==="x"}),render:(c,d,p)=>r("input",{checked:c.completed,key:p.key,readOnly:!0,type:"checkbox"})},[L.heading]:{match:Pe(e.enforceAtxHeadings?Np:Dp),order:1,parse:(c,d,p)=>({children:Jr(d,c[2],p),id:e.slugify(c[2],_r),level:c[1].length}),render:(c,d,p)=>r(`h${c.level}`,{id:c.id,key:p.key},d(c.children,p))},[L.headingSetext]:{match:Pe(Mp),order:0,parse:(c,d,p)=>({children:Jr(d,c[1],p),level:c[2]==="="?1:2,type:L.heading})},[L.htmlBlock]:{match:Sr(So),order:1,parse(c,d,p){const[,y]=c[3].match(g_),m=new RegExp(`^${y}`,"gm"),g=c[3].replace(m,""),b=(_=g,C_.some(w=>w.test(_))?F_:Jr);var _;const A=c[1].toLowerCase(),x=Fb.indexOf(A)!==-1,S=(x?A:c[1]).trim(),q={attrs:i(S,c[2]),noInnerParse:x,tag:S};return p.inAnchor=p.inAnchor||A==="a",x?q.text=c[3]:q.children=b(d,g,p),p.inAnchor=!1,q},render:(c,d,p)=>r(c.tag,Qe({key:p.key},c.attrs),c.text||(c.children?d(c.children,p):""))},[L.htmlSelfClosing]:{match:Sr(Ao),order:1,parse(c){const d=c[1].trim();return{attrs:i(d,c[2]||""),tag:d}},render:(c,d,p)=>r(c.tag,Qe({},c.attrs,{key:p.key}))},[L.htmlComment]:{match:Sr(kp),order:1,parse:()=>({}),render:lo},[L.image]:{match:Ue(O_),order:1,parse:c=>({alt:c[1],target:uh(c[2]),title:c[3]}),render:(c,d,p)=>r("img",{key:p.key,alt:c.alt||void 0,title:c.title||void 0,src:e.sanitizer(c.target,"img","src")})},[L.link]:{match:Le(q_),order:3,parse:(c,d,p)=>({children:R_(d,c[1],p),target:uh(c[2]),title:c[3]}),render:(c,d,p)=>r("a",{key:p.key,href:e.sanitizer(c.target,"a","href"),title:c.title},d(c.children,p))},[L.linkAngleBraceStyleDetector]:{match:Le(Qb),order:0,parse:c=>({children:[{text:c[1],type:L.text}],target:c[1],type:L.link})},[L.linkBareUrlDetector]:{match:ur((c,d)=>d.inAnchor||e.disableAutoLink?null:Le(Zb)(c,d)),order:0,parse:c=>({children:[{text:c[1],type:L.text}],target:c[1],title:void 0,type:L.link})},[L.linkMailtoDetector]:{match:Le(Xb),order:0,parse(c){let d=c[1],p=c[1];return Pb.test(p)||(p="mailto:"+p),{children:[{text:d.replace("mailto:",""),type:L.text}],target:p,type:L.link}}},[L.orderedList]:ah(r,1),[L.unorderedList]:ah(r,2),[L.newlineCoalescer]:{match:Pe(Ub),order:3,parse:co,render:()=>` +`},[L.paragraph]:{match:ur(T_),order:3,parse:uo,render:(c,d,p)=>r("p",{key:p.key},d(c.children,p))},[L.ref]:{match:Le(r_),order:0,parse:c=>(s[c[1]]={target:c[2],title:c[4]},{}),render:lo},[L.refImage]:{match:Ue(t_),order:0,parse:c=>({alt:c[1]||void 0,ref:c[2]}),render:(c,d,p)=>s[c.ref]?r("img",{key:p.key,alt:c.alt,src:e.sanitizer(s[c.ref].target,"img","src"),title:s[c.ref].title}):null},[L.refLink]:{match:Le(n_),order:0,parse:(c,d,p)=>({children:d(c[1],p),fallbackChildren:c[0],ref:c[2]}),render:(c,d,p)=>s[c.ref]?r("a",{key:p.key,href:e.sanitizer(s[c.ref].target,"a","href"),title:s[c.ref].title},d(c.children,p)):r("span",{key:p.key},c.fallbackChildren)},[L.table]:{match:Pe(Bp),order:1,parse:I_,render(c,d,p){const y=c;return r("table",{key:p.key},r("thead",null,r("tr",null,y.header.map(function(m,g){return r("th",{key:g,style:oh(y,g)},d(m,p))}))),r("tbody",null,y.cells.map(function(m,g){return r("tr",{key:g},m.map(function(b,_){return r("td",{key:_,style:oh(y,_)},d(b,p))}))})))}},[L.text]:{match:Sr(m_),order:4,parse:c=>({text:c[0].replace(zb,(d,p)=>e.namedCodesToUnicode[p]?e.namedCodesToUnicode[p]:d)}),render:c=>c.text},[L.textBolded]:{match:Ue(l_),order:2,parse:(c,d,p)=>({children:d(c[2],p)}),render:(c,d,p)=>r("strong",{key:p.key},d(c.children,p))},[L.textEmphasized]:{match:Ue(f_),order:3,parse:(c,d,p)=>({children:d(c[2],p)}),render:(c,d,p)=>r("em",{key:p.key},d(c.children,p))},[L.textEscaped]:{match:Ue(p_),order:1,parse:c=>({text:c[1],type:L.text})},[L.textMarked]:{match:Ue(d_),order:3,parse:uo,render:(c,d,p)=>r("mark",{key:p.key},d(c.children,p))},[L.textStrikethroughed]:{match:Ue(h_),order:3,parse:uo,render:(c,d,p)=>r("del",{key:p.key},d(c.children,p))}};e.disableParsingRawHTML===!0&&(delete o[L.htmlBlock],delete o[L.htmlSelfClosing]);const u=function(c){let d=Object.keys(c);function p(y,m){let g,b,_=[],A="",x="";for(m.prevCapture=m.prevCapture||"";y;){let S=0;for(;Sg(p,y,m),p,y,m):g(p,y,m)}}(o,e.renderRule),function c(d,p={}){if(Array.isArray(d)){const y=p.key,m=[];let g=!1;for(let b=0;b{let{children:e="",options:r}=t,n=function(i,a){if(i==null)return{};var s,o,u={},l=Object.keys(i);for(o=0;o=0||(u[s]=i[s]);return u}(t,Rb);return N.cloneElement(P_(e,r),n)};var ho,ch;function D_(){if(ch)return ho;ch=1;var t=kh();function e(r,n){return r==null?!0:t(r,n)}return ho=e,ho}var N_=D_();const M_=Q(N_);class k_ extends N.Component{constructor(){super(...arguments),this.state={wasPropertyKeyModified:!1,additionalProperties:{}},this.onPropertyChange=(e,r=!1)=>(n,i,a)=>{const{formData:s,onChange:o,errorSchema:u}=this.props;n===void 0&&r&&(n="");const l={...s,[e]:n};o(l,u&&u&&{...u,[e]:i},a)},this.onDropPropertyClick=e=>r=>{r.preventDefault();const{onChange:n,formData:i}=this.props,a={...i};M_(a,e),n(a)},this.getAvailableKey=(e,r)=>{const{uiSchema:n,registry:i}=this.props,{duplicateKeySuffixSeparator:a="-"}=H(n,i.globalUiOptions);let s=0,o=e;for(;ge(r,o);)o=`${e}${a}${++s}`;return o},this.onKeyChange=e=>(r,n)=>{if(e===r)return;const{formData:i,onChange:a,errorSchema:s}=this.props;r=this.getAvailableKey(r,i);const o={...i},u={[e]:r},l=Object.keys(o).map(h=>({[u[h]||h]:o[h]})),f=Object.assign({},...l);this.setState({wasPropertyKeyModified:!0}),a(f,s&&s&&{...s,[r]:n})},this.handleAddClick=e=>()=>{var r;if(!e.additionalProperties)return;const{formData:n,onChange:i,registry:a}=this.props,s={...n};let o,u,l;if(Te(e.additionalProperties)){o=e.additionalProperties.type,u=e.additionalProperties.const,l=e.additionalProperties.default;let c=e.additionalProperties;if(ce in c){const{schemaUtils:d}=a;c=d.retrieveSchema({$ref:c[ce]},n),o=c.type,u=c.const,l=c.default}!o&&(_e in c||pe in c)&&(o="object")}const f=this.getAvailableKey("newKey",s),h=(r=u??l)!==null&&r!==void 0?r:this.getDefaultValue(o);ye(s,f,h),i(s)}}isRequired(e){const{schema:r}=this.props;return Array.isArray(r.required)&&r.required.indexOf(e)!==-1}getDefaultValue(e){const{registry:{translateString:r}}=this.props;switch(e){case"array":return[];case"boolean":return!1;case"null":return null;case"number":return 0;case"object":return{};case"string":default:return r(Z.NewStringDefault)}}render(){var e,r,n,i;const{schema:a,uiSchema:s={},formData:o,errorSchema:u,idSchema:l,name:f,required:h=!1,disabled:c,readonly:d,hideError:p,idPrefix:y,idSeparator:m,onBlur:g,onFocus:b,registry:_,title:A}=this.props,{fields:x,formContext:S,schemaUtils:q,translateString:w,globalUiOptions:T}=_,{SchemaField:C}=x,I=q.retrieveSchema(a,o),P=H(s,T),{properties:O={}}=I,E=(n=(r=(e=P.title)!==null&&e!==void 0?e:I.title)!==null&&r!==void 0?r:A)!==null&&n!==void 0?n:f,F=(i=P.description)!==null&&i!==void 0?i:I.description;let k;try{const j=Object.keys(O);k=hb(j,P.order)}catch(j){return v.jsxs("div",{children:[v.jsx("p",{className:"config-error",style:{color:"red"},children:v.jsx(At,{options:{disableParsingRawHTML:!0},children:w(Z.InvalidObjectField,[f||"root",j.message])})}),v.jsx("pre",{children:JSON.stringify(I)})]})}const Y=G("ObjectFieldTemplate",_,P),D={title:P.label===!1?"":E,description:P.label===!1?void 0:F,properties:k.map(j=>{const z=ge(I,[ue,j,Fr]),te=z?s.additionalProperties:s[j],me=H(te).widget==="hidden",fe=M(l,[j],{});return{content:v.jsx(C,{name:j,required:this.isRequired(j),schema:M(I,[ue,j],{}),uiSchema:te,errorSchema:M(u,j),idSchema:fe,idPrefix:y,idSeparator:m,formData:M(o,j),formContext:S,wasPropertyKeyModified:this.state.wasPropertyKeyModified,onKeyChange:this.onKeyChange(j),onChange:this.onPropertyChange(j,z),onBlur:g,onFocus:b,registry:_,disabled:c,readonly:d,hideError:p,onDropPropertyClick:this.onDropPropertyClick},j),name:j,readonly:d,disabled:c,required:h,hidden:me}}),readonly:d,disabled:c,required:h,idSchema:l,uiSchema:s,errorSchema:u,schema:I,formData:o,formContext:S,registry:_};return v.jsx(Y,{...D,onAddClick:this.handleAddClick})}}const B_={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function L_(t,e,r,n){const i=e.field,{fields:a,translateString:s}=n;if(typeof i=="function")return i;if(typeof i=="string"&&i in a)return a[i];const o=He(t),u=Array.isArray(o)?o[0]:o||"",l=t.$id;let f=B_[u];return l&&l in a&&(f=l),!f&&(t.anyOf||t.oneOf)?()=>null:f in a?a[f]:()=>{const h=G("UnsupportedFieldTemplate",n,e);return v.jsx(h,{schema:t,idSchema:r,reason:s(Z.UnknownFieldType,[String(t.type)]),registry:n})}}function U_(t){var e,r,n;const{schema:i,idSchema:a,uiSchema:s,formData:o,errorSchema:u,idPrefix:l,idSeparator:f,name:h,onChange:c,onKeyChange:d,onDropPropertyClick:p,required:y,registry:m,wasPropertyKeyModified:g=!1}=t,{formContext:b,schemaUtils:_,globalUiOptions:A}=m,x=H(s,A),S=G("FieldTemplate",m,x),q=G("DescriptionFieldTemplate",m,x),w=G("FieldHelpTemplate",m,x),T=G("FieldErrorTemplate",m,x),C=_.retrieveSchema(i,o),I=a[Zr],P=Ke(_.toIdSchema(C,I,o,l,f),a),O=N.useCallback((ne,oe,Ae)=>c(ne,oe,Ae||I),[I,c]),E=L_(C,x,P,m),F=!!((e=x.disabled)!==null&&e!==void 0?e:t.disabled),k=!!((r=x.readonly)!==null&&r!==void 0?r:t.readonly||t.schema.const||t.schema.readOnly||C.readOnly),Y=x.hideError,D=Y===void 0?t.hideError:!!Y,j=!!((n=x.autofocus)!==null&&n!==void 0?n:t.autofocus);if(Object.keys(C).length===0)return null;const z=_.getDisplayLabel(C,s,A),{__errors:te,...me}=u||{},fe=Qr(s,["ui:classNames","classNames","ui:style"]);Or in fe&&(fe[Or]=Qr(fe[Or],["classNames","style"]));const Ce=v.jsx(E,{...t,onChange:O,idSchema:P,schema:C,uiSchema:fe,disabled:F,readonly:k,hideError:D,autofocus:j,errorSchema:me,formContext:b,rawErrors:te}),Me=P[Zr];let W;g?W=h:W=Fr in C?h:x.title||t.schema.title||C.title||t.title||h;const Ye=x.description||t.schema.description||C.description||"",Je=x.enableMarkdownInDescription?v.jsx(At,{options:{disableParsingRawHTML:!0},children:Ye}):Ye,R=x.help,B=x.widget==="hidden",U=["form-group","field",`field-${He(C)}`];!D&&te&&te.length>0&&U.push("field-error has-error has-danger"),s?.classNames&&U.push(s.classNames),x.classNames&&U.push(x.classNames);const ee=v.jsx(w,{help:R,idSchema:P,schema:C,uiSchema:s,hasErrors:!D&&te&&te.length>0,registry:m}),ie=D||(C.anyOf||C.oneOf)&&!_.isSelect(C)?void 0:v.jsx(T,{errors:te,errorSchema:u,idSchema:P,schema:C,uiSchema:s,registry:m}),se={description:v.jsx(q,{id:gr(Me),description:Je,schema:C,uiSchema:s,registry:m}),rawDescription:Ye,help:ee,rawHelp:typeof R=="string"?R:void 0,errors:ie,rawErrors:D?void 0:te,id:Me,label:W,hidden:B,onChange:c,onKeyChange:d,onDropPropertyClick:p,required:y,disabled:F,readonly:k,hideError:D,displayLabel:z,classNames:U.join(" ").trim(),style:x.style,formContext:b,formData:o,schema:C,uiSchema:s,registry:m},K=m.fields.AnyOfField,X=m.fields.OneOfField,$=s?.["ui:field"]&&s?.["ui:fieldReplacesAnyOrOneOf"]===!0;return v.jsx(S,{...se,children:v.jsxs(v.Fragment,{children:[Ce,C.anyOf&&!$&&!_.isSelect(C)&&v.jsx(K,{name:h,disabled:F,readonly:k,hideError:D,errorSchema:u,formData:o,formContext:b,idPrefix:l,idSchema:P,idSeparator:f,onBlur:t.onBlur,onChange:t.onChange,onFocus:t.onFocus,options:C.anyOf.map(ne=>_.retrieveSchema(Te(ne)?ne:{},o)),registry:m,required:y,schema:C,uiSchema:s}),C.oneOf&&!$&&!_.isSelect(C)&&v.jsx(X,{name:h,disabled:F,readonly:k,hideError:D,errorSchema:u,formData:o,formContext:b,idPrefix:l,idSchema:P,idSeparator:f,onBlur:t.onBlur,onChange:t.onChange,onFocus:t.onFocus,options:C.oneOf.map(ne=>_.retrieveSchema(Te(ne)?ne:{},o)),registry:m,required:y,schema:C,uiSchema:s})]})})}class $_ extends N.Component{shouldComponentUpdate(e){return!he(this.props,e)}render(){return v.jsx(U_,{...this.props})}}function W_(t){var e;const{schema:r,name:n,uiSchema:i,idSchema:a,formData:s,required:o,disabled:u=!1,readonly:l=!1,autofocus:f=!1,onChange:h,onBlur:c,onFocus:d,registry:p,rawErrors:y,hideError:m}=t,{title:g,format:b}=r,{widgets:_,formContext:A,schemaUtils:x,globalUiOptions:S}=p,q=x.isSelect(r)?rt(r,i):void 0;let w=q?"select":"text";b&&cb(r,b,_)&&(w=b);const{widget:T=w,placeholder:C="",title:I,...P}=H(i),O=x.getDisplayLabel(r,i,S),E=(e=I??g)!==null&&e!==void 0?e:n,F=Re(r,T,_);return v.jsx(F,{options:{...P,enumOptions:q},schema:r,uiSchema:i,id:a.$id,name:n,label:E,hideLabel:!O,hideError:m,value:s,onChange:h,onBlur:c,onFocus:d,required:o,disabled:u,readonly:l,formContext:A,autofocus:f,registry:p,placeholder:C,rawErrors:y})}function K_(t){const{formData:e,onChange:r}=t;return N.useEffect(()=>{e===void 0&&r(null)},[e,r]),null}function V_(){return{AnyOfField:rh,ArrayField:Cb,BooleanField:wb,NumberField:Eb,ObjectField:k_,OneOfField:rh,SchemaField:$_,StringField:W_,NullField:K_}}function G_(t){const{idSchema:e,description:r,registry:n,schema:i,uiSchema:a}=t,s=H(a,n.globalUiOptions),{label:o=!0}=s;if(!r||!o)return null;const u=G("DescriptionFieldTemplate",n,s);return v.jsx(u,{id:gr(e),description:r,schema:i,uiSchema:a,registry:n})}function H_(t){const{children:e,className:r,disabled:n,hasToolbar:i,hasMoveDown:a,hasMoveUp:s,hasRemove:o,hasCopy:u,index:l,onCopyIndexClick:f,onDropIndexClick:h,onReorderClick:c,readonly:d,registry:p,uiSchema:y}=t,{CopyButton:m,MoveDownButton:g,MoveUpButton:b,RemoveButton:_}=p.templates.ButtonTemplates,A={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"};return v.jsxs("div",{className:r,children:[v.jsx("div",{className:i?"col-xs-9":"col-xs-12",children:e}),i&&v.jsx("div",{className:"col-xs-3 array-item-toolbox",children:v.jsxs("div",{className:"btn-group",style:{display:"flex",justifyContent:"space-around"},children:[(s||a)&&v.jsx(b,{style:A,disabled:n||d||!s,onClick:c(l,l-1),uiSchema:y,registry:p}),(s||a)&&v.jsx(g,{style:A,disabled:n||d||!a,onClick:c(l,l+1),uiSchema:y,registry:p}),u&&v.jsx(m,{style:A,disabled:n||d,onClick:f(l),uiSchema:y,registry:p}),o&&v.jsx(_,{style:A,disabled:n||d,onClick:h(l),uiSchema:y,registry:p})]})})]})}function z_(t){const{canAdd:e,className:r,disabled:n,idSchema:i,uiSchema:a,items:s,onAddClick:o,readonly:u,registry:l,required:f,schema:h,title:c}=t,d=H(a),p=G("ArrayFieldDescriptionTemplate",l,d),y=G("ArrayFieldItemTemplate",l,d),m=G("ArrayFieldTitleTemplate",l,d),{ButtonTemplates:{AddButton:g}}=l.templates;return v.jsxs("fieldset",{className:r,id:i.$id,children:[v.jsx(m,{idSchema:i,title:d.title||c,required:f,schema:h,uiSchema:a,registry:l}),v.jsx(p,{idSchema:i,description:d.description||h.description,schema:h,uiSchema:a,registry:l}),v.jsx("div",{className:"row array-item-list",children:s&&s.map(({key:b,..._})=>v.jsx(y,{..._},b))}),e&&v.jsx(g,{className:"array-item-add",onClick:o,disabled:n||u,uiSchema:a,registry:l})]})}function Y_(t){const{idSchema:e,title:r,schema:n,uiSchema:i,required:a,registry:s}=t,o=H(i,s.globalUiOptions),{label:u=!0}=o;if(!r||!u)return null;const l=G("TitleFieldTemplate",s,o);return v.jsx(l,{id:nu(e),title:r,required:a,schema:n,uiSchema:i,registry:s})}function J_(t){const{id:e,name:r,value:n,readonly:i,disabled:a,autofocus:s,onBlur:o,onFocus:u,onChange:l,onChangeOverride:f,options:h,schema:c,uiSchema:d,formContext:p,registry:y,rawErrors:m,type:g,hideLabel:b,hideError:_,...A}=t;if(!e)throw console.log("No id for",t),new Error(`no id for props ${JSON.stringify(t)}`);const x={...A,...Ip(c,g,h)};let S;x.type==="number"||x.type==="integer"?S=n||n===0?n:"":S=n??"";const q=N.useCallback(({target:{value:C}})=>l(C===""?h.emptyValue:C),[l,h]),w=N.useCallback(({target:C})=>o(e,C&&C.value),[o,e]),T=N.useCallback(({target:C})=>u(e,C&&C.value),[u,e]);return v.jsxs(v.Fragment,{children:[v.jsx("input",{id:e,name:e,className:"form-control",readOnly:i,disabled:a,autoFocus:s,value:S,...x,list:c.examples?Er(e):void 0,onChange:f||q,onBlur:w,onFocus:T,"aria-describedby":Ie(e,!!c.examples)}),Array.isArray(c.examples)&&v.jsx("datalist",{id:Er(e),children:c.examples.concat(c.default&&!c.examples.includes(c.default)?[c.default]:[]).map(C=>v.jsx("option",{value:C},C))},`datalist_${e}`)]})}function Z_({uiSchema:t}){const{submitText:e,norender:r,props:n={}}=ib(t);return r?null:v.jsx("div",{children:v.jsx("button",{type:"submit",...n,className:`btn btn-info ${n.className||""}`,children:e})})}function $r(t){const{iconType:e="default",icon:r,className:n,uiSchema:i,registry:a,...s}=t;return v.jsx("button",{type:"button",className:`btn btn-${e} ${n}`,...s,children:v.jsx("i",{className:`glyphicon glyphicon-${r}`})})}function X_(t){const{registry:{translateString:e}}=t;return v.jsx($r,{title:e(Z.CopyButton),className:"array-item-copy",...t,icon:"copy"})}function Q_(t){const{registry:{translateString:e}}=t;return v.jsx($r,{title:e(Z.MoveDownButton),className:"array-item-move-down",...t,icon:"arrow-down"})}function eS(t){const{registry:{translateString:e}}=t;return v.jsx($r,{title:e(Z.MoveUpButton),className:"array-item-move-up",...t,icon:"arrow-up"})}function rS(t){const{registry:{translateString:e}}=t;return v.jsx($r,{title:e(Z.RemoveButton),className:"array-item-remove",...t,iconType:"danger",icon:"remove"})}function tS({className:t,onClick:e,disabled:r,registry:n}){const{translateString:i}=n;return v.jsx("div",{className:"row",children:v.jsx("p",{className:`col-xs-3 col-xs-offset-9 text-right ${t}`,children:v.jsx($r,{iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:i(Z.AddButton),onClick:e,disabled:r,registry:n})})})}function nS(){return{SubmitButton:Z_,AddButton:tS,CopyButton:X_,MoveDownButton:Q_,MoveUpButton:eS,RemoveButton:rS}}function iS(t){const{id:e,description:r}=t;return r?typeof r=="string"?v.jsx("p",{id:e,className:"field-description",children:r}):v.jsx("div",{id:e,className:"field-description",children:r}):null}function aS({errors:t,registry:e}){const{translateString:r}=e;return v.jsxs("div",{className:"panel panel-danger errors",children:[v.jsx("div",{className:"panel-heading",children:v.jsx("h3",{className:"panel-title",children:r(Z.ErrorsLabel)})}),v.jsx("ul",{className:"list-group",children:t.map((n,i)=>v.jsx("li",{className:"list-group-item text-danger",children:n.stack},i))})]})}const sS="*";function Yp(t){const{label:e,required:r,id:n}=t;return e?v.jsxs("label",{className:"control-label",htmlFor:n,children:[e,r&&v.jsx("span",{className:"required",children:sS})]}):null}function oS(t){const{id:e,label:r,children:n,errors:i,help:a,description:s,hidden:o,required:u,displayLabel:l,registry:f,uiSchema:h}=t,c=H(h),d=G("WrapIfAdditionalTemplate",f,c);return o?v.jsx("div",{className:"hidden",children:n}):v.jsxs(d,{...t,children:[l&&v.jsx(Yp,{label:r,required:u,id:e}),l&&s?s:null,n,i,a]})}function uS(t){const{errors:e=[],idSchema:r}=t;if(e.length===0)return null;const n=Tp(r);return v.jsx("div",{children:v.jsx("ul",{id:n,className:"error-detail bs-callout bs-callout-info",children:e.filter(i=>!!i).map((i,a)=>v.jsx("li",{className:"text-danger",children:i},a))})})}function cS(t){const{idSchema:e,help:r}=t;if(!r)return null;const n=Ep(e);return typeof r=="string"?v.jsx("p",{id:n,className:"help-block",children:r}):v.jsx("div",{id:n,className:"help-block",children:r})}function lS(t){const{description:e,disabled:r,formData:n,idSchema:i,onAddClick:a,properties:s,readonly:o,registry:u,required:l,schema:f,title:h,uiSchema:c}=t,d=H(c),p=G("TitleFieldTemplate",u,d),y=G("DescriptionFieldTemplate",u,d),{ButtonTemplates:{AddButton:m}}=u.templates;return v.jsxs("fieldset",{id:i.$id,children:[h&&v.jsx(p,{id:nu(i),title:h,required:l,schema:f,uiSchema:c,registry:u}),e&&v.jsx(y,{id:gr(i),description:e,schema:f,uiSchema:c,registry:u}),s.map(g=>g.content),hh(f,c,n)&&v.jsx(m,{className:"object-property-expand",onClick:a(f),disabled:r||o,uiSchema:c,registry:u})]})}const fS="*";function dS(t){const{id:e,title:r,required:n}=t;return v.jsxs("legend",{id:e,children:[r,n&&v.jsx("span",{className:"required",children:fS})]})}function hS(t){const{schema:e,idSchema:r,reason:n,registry:i}=t,{translateString:a}=i;let s=Z.UnsupportedField;const o=[];return r&&r.$id&&(s=Z.UnsupportedFieldWithId,o.push(r.$id)),n&&(s=s===Z.UnsupportedField?Z.UnsupportedFieldWithReason:Z.UnsupportedFieldWithIdAndReason,o.push(n)),v.jsxs("div",{className:"unsupported-field",children:[v.jsx("p",{children:v.jsx(At,{options:{disableParsingRawHTML:!0},children:a(s,o)})}),e&&v.jsx("pre",{children:JSON.stringify(e,null,2)})]})}function pS(t){const{id:e,classNames:r,style:n,disabled:i,label:a,onKeyChange:s,onDropPropertyClick:o,readonly:u,required:l,schema:f,children:h,uiSchema:c,registry:d}=t,{templates:p,translateString:y}=d,{RemoveButton:m}=p.ButtonTemplates,g=y(Z.KeyLabel,[a]);return Fr in f?v.jsx("div",{className:r,style:n,children:v.jsxs("div",{className:"row",children:[v.jsx("div",{className:"col-xs-5 form-additional",children:v.jsxs("div",{className:"form-group",children:[v.jsx(Yp,{label:g,required:l,id:`${e}-key`}),v.jsx("input",{className:"form-control",type:"text",id:`${e}-key`,onBlur:({target:_})=>s(_&&_.value),defaultValue:a})]})}),v.jsx("div",{className:"form-additional form-group col-xs-5",children:h}),v.jsx("div",{className:"col-xs-2",children:v.jsx(m,{className:"array-item-remove btn-block",style:{border:"0"},disabled:i||u,onClick:o(a),uiSchema:c,registry:d})})]})}):v.jsx("div",{className:r,style:n,children:h})}function mS(){return{ArrayFieldDescriptionTemplate:G_,ArrayFieldItemTemplate:H_,ArrayFieldTemplate:z_,ArrayFieldTitleTemplate:Y_,ButtonTemplates:nS(),BaseInputTemplate:J_,DescriptionFieldTemplate:iS,ErrorListTemplate:aS,FieldTemplate:oS,FieldErrorTemplate:uS,FieldHelpTemplate:cS,ObjectFieldTemplate:lS,TitleFieldTemplate:dS,UnsupportedFieldTemplate:hS,WrapIfAdditionalTemplate:pS}}function yS(t){return Object.values(t).every(e=>e!==-1)}function gS({type:t,range:e,value:r,select:n,rootId:i,name:a,disabled:s,readonly:o,autofocus:u,registry:l,onBlur:f,onFocus:h}){const c=i+"_"+t,{SelectWidget:d}=l.widgets;return v.jsx(d,{schema:{type:"integer"},id:c,name:a,className:"form-control",options:{enumOptions:Ap(e[0],e[1])},placeholder:t,value:r,disabled:s,readonly:o,autofocus:u,onChange:p=>n(t,p),onBlur:f,onFocus:h,registry:l,label:"","aria-describedby":Ie(i)})}function vS({time:t=!1,disabled:e=!1,readonly:r=!1,autofocus:n=!1,options:i,id:a,name:s,registry:o,onBlur:u,onFocus:l,onChange:f,value:h}){const{translateString:c}=o,[d,p]=N.useState(h),[y,m]=N.useReducer((A,x)=>({...A,...x}),ro(h,t));N.useEffect(()=>{const A=zd(y,t);yS(y)&&A!==h?f(A):d!==h&&(p(h),m(ro(h,t)))},[t,h,f,y,d]);const g=N.useCallback((A,x)=>{m({[A]:x})},[]),b=N.useCallback(A=>{if(A.preventDefault(),e||r)return;const x=ro(new Date().toJSON(),t);f(zd(x,t))},[e,r,t]),_=N.useCallback(A=>{A.preventDefault(),!(e||r)&&f(void 0)},[e,r,f]);return v.jsxs("ul",{className:"list-inline",children:[tb(y,t,i.yearsRange,i.format).map((A,x)=>v.jsx("li",{className:"list-inline-item",children:v.jsx(gS,{rootId:a,name:s,select:g,...A,disabled:e,readonly:r,registry:o,onBlur:u,onFocus:l,autofocus:n&&x===0})},x)),(i.hideNowButton!=="undefined"?!i.hideNowButton:!0)&&v.jsx("li",{className:"list-inline-item",children:v.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:b,children:c(Z.NowLabel)})}),(i.hideClearButton!=="undefined"?!i.hideClearButton:!0)&&v.jsx("li",{className:"list-inline-item",children:v.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:_,children:c(Z.ClearLabel)})})]})}function bS({time:t=!0,...e}){const{AltDateWidget:r}=e.registry.widgets;return v.jsx(r,{time:t,...e})}function _S({schema:t,uiSchema:e,options:r,id:n,value:i,disabled:a,readonly:s,label:o,hideLabel:u,autofocus:l=!1,onBlur:f,onFocus:h,onChange:c,registry:d}){var p;const y=G("DescriptionFieldTemplate",d,r),m=Yr(t),g=N.useCallback(x=>c(x.target.checked),[c]),b=N.useCallback(x=>f(n,x.target.checked),[f,n]),_=N.useCallback(x=>h(n,x.target.checked),[h,n]),A=(p=r.description)!==null&&p!==void 0?p:t.description;return v.jsxs("div",{className:`checkbox ${a||s?"disabled":""}`,children:[!u&&!!A&&v.jsx(y,{id:gr(n),description:A,schema:t,uiSchema:e,registry:d}),v.jsxs("label",{children:[v.jsx("input",{type:"checkbox",id:n,name:n,checked:typeof i>"u"?!1:i,required:m,disabled:a||s,autoFocus:l,onChange:g,onBlur:b,onFocus:_,"aria-describedby":Ie(n)}),lb(v.jsx("span",{children:o}),u)]})]})}function SS({id:t,disabled:e,options:{inline:r=!1,enumOptions:n,enumDisabled:i,emptyValue:a},value:s,autofocus:o=!1,readonly:u,onChange:l,onBlur:f,onFocus:h}){const c=Array.isArray(s)?s:[s],d=N.useCallback(({target:y})=>f(t,de(y&&y.value,n,a)),[f,t]),p=N.useCallback(({target:y})=>h(t,de(y&&y.value,n,a)),[h,t]);return v.jsx("div",{className:"checkboxes",id:t,children:Array.isArray(n)&&n.map((y,m)=>{const g=Lr(y.value,c),b=Array.isArray(i)&&i.indexOf(y.value)!==-1,_=e||b||u?"disabled":"",A=S=>{S.target.checked?l(Cp(m,c,n)):l(xp(m,c,n))},x=v.jsxs("span",{children:[v.jsx("input",{type:"checkbox",id:_t(t,m),name:t,checked:g,value:String(m),disabled:e||b||u,autoFocus:o&&m===0,onChange:A,onBlur:d,onFocus:p,"aria-describedby":Ie(t)}),v.jsx("span",{children:y.label})]});return r?v.jsx("label",{className:`checkbox-inline ${_}`,children:x},m):v.jsx("div",{className:`checkbox ${_}`,children:v.jsx("label",{children:x})},m)})})}function AS(t){const{disabled:e,readonly:r,options:n,registry:i}=t,a=G("BaseInputTemplate",i,n);return v.jsx(a,{type:"color",...t,disabled:e||r})}function xS(t){const{onChange:e,options:r,registry:n}=t,i=G("BaseInputTemplate",n,r),a=N.useCallback(s=>e(s||void 0),[e]);return v.jsx(i,{type:"date",...t,onChange:a})}function qS(t){const{onChange:e,value:r,options:n,registry:i}=t,a=G("BaseInputTemplate",i,n);return v.jsx(a,{type:"datetime-local",...t,value:vb(r),onChange:s=>e(fb(s))})}function OS(t){const{options:e,registry:r}=t,n=G("BaseInputTemplate",r,e);return v.jsx(n,{type:"email",...t})}function CS(t,e){return t===null?null:t.replace(";base64",`;name=${encodeURIComponent(e)};base64`)}function wS(t){const{name:e,size:r,type:n}=t;return new Promise((i,a)=>{const s=new window.FileReader;s.onerror=a,s.onload=o=>{var u;typeof((u=o.target)===null||u===void 0?void 0:u.result)=="string"?i({dataURL:CS(o.target.result,e),name:e,size:r,type:n}):i({dataURL:null,name:e,size:r,type:n})},s.readAsDataURL(t)})}function IS(t){return Promise.all(Array.from(t).map(wS))}function TS({fileInfo:t,registry:e}){const{translateString:r}=e,{dataURL:n,type:i,name:a}=t;return n?["image/jpeg","image/png"].includes(i)?v.jsx("img",{src:n,style:{maxWidth:"100%"},className:"file-preview"}):v.jsxs(v.Fragment,{children:[" ",v.jsx("a",{download:`preview-${a}`,href:n,className:"file-download",children:r(Z.PreviewLabel)})]}):null}function ES({filesInfo:t,registry:e,preview:r,onRemove:n,options:i}){if(t.length===0)return null;const{translateString:a}=e,{RemoveButton:s}=G("ButtonTemplates",e,i);return v.jsx("ul",{className:"file-info",children:t.map((o,u)=>{const{name:l,size:f,type:h}=o,c=()=>n(u);return v.jsxs("li",{children:[v.jsx(At,{children:a(Z.FilesInfo,[l,h,String(f)])}),r&&v.jsx(TS,{fileInfo:o,registry:e}),v.jsx(s,{onClick:c,registry:e})]},u)})})}function RS(t){return t.reduce((e,r)=>{if(!r)return e;try{const{blob:n,name:i}=Gv(r);return[...e,{dataURL:r,name:i,size:n.size,type:n.type}]}catch{return e}},[])}function FS(t){const{disabled:e,readonly:r,required:n,multiple:i,onChange:a,value:s,options:o,registry:u}=t,l=G("BaseInputTemplate",u,o),f=N.useCallback(d=>{d.target.files&&IS(d.target.files).then(p=>{const y=p.map(m=>m.dataURL);a(i?s.concat(y):y[0])})},[i,s,a]),h=N.useMemo(()=>RS(Array.isArray(s)?s:[s]),[s]),c=N.useCallback(d=>{if(i){const p=s.filter((y,m)=>m!==d);a(p)}else a(void 0)},[i,s,a]);return v.jsxs("div",{children:[v.jsx(l,{...t,disabled:e||r,type:"file",required:s?!1:n,onChangeOverride:f,value:"",accept:o.accept?String(o.accept):void 0}),v.jsx(ES,{filesInfo:h,onRemove:c,registry:u,preview:o.filePreview,options:o})]})}function jS({id:t,value:e}){return v.jsx("input",{type:"hidden",id:t,name:t,value:typeof e>"u"?"":e})}function PS(t){const{options:e,registry:r}=t,n=G("BaseInputTemplate",r,e);return v.jsx(n,{type:"password",...t})}function DS({options:t,value:e,required:r,disabled:n,readonly:i,autofocus:a=!1,onBlur:s,onFocus:o,onChange:u,id:l}){const{enumOptions:f,enumDisabled:h,inline:c,emptyValue:d}=t,p=N.useCallback(({target:m})=>s(l,de(m&&m.value,f,d)),[s,l]),y=N.useCallback(({target:m})=>o(l,de(m&&m.value,f,d)),[o,l]);return v.jsx("div",{className:"field-radio-group",id:l,children:Array.isArray(f)&&f.map((m,g)=>{const b=Lr(m.value,e),_=Array.isArray(h)&&h.indexOf(m.value)!==-1,A=n||_||i?"disabled":"",x=()=>u(m.value),S=v.jsxs("span",{children:[v.jsx("input",{type:"radio",id:_t(l,g),checked:b,name:l,required:r,value:String(g),disabled:n||_||i,autoFocus:a&&g===0,onChange:x,onBlur:p,onFocus:y,"aria-describedby":Ie(l)}),v.jsx("span",{children:m.label})]});return c?v.jsx("label",{className:`radio-inline ${A}`,children:S},g):v.jsx("div",{className:`radio ${A}`,children:v.jsx("label",{children:S})},g)})})}function NS(t){const{value:e,registry:{templates:{BaseInputTemplate:r}}}=t;return v.jsxs("div",{className:"field-range-wrapper",children:[v.jsx(r,{type:"range",...t}),v.jsx("span",{className:"range-view",children:e})]})}function po(t,e){return e?Array.from(t.target.options).slice().filter(r=>r.selected).map(r=>r.value):t.target.value}function MS({schema:t,id:e,options:r,value:n,required:i,disabled:a,readonly:s,multiple:o=!1,autofocus:u=!1,onChange:l,onBlur:f,onFocus:h,placeholder:c}){const{enumOptions:d,enumDisabled:p,emptyValue:y}=r,m=o?[]:"",g=N.useCallback(S=>{const q=po(S,o);return h(e,de(q,d,y))},[h,e,t,o,d,y]),b=N.useCallback(S=>{const q=po(S,o);return f(e,de(q,d,y))},[f,e,t,o,d,y]),_=N.useCallback(S=>{const q=po(S,o);return l(de(q,d,y))},[l,t,o,d,y]),A=qp(n,d,o),x=!o&&t.default===void 0;return v.jsxs("select",{id:e,name:e,multiple:o,className:"form-control",value:typeof A>"u"?m:A,required:i,disabled:a||s,autoFocus:u,onBlur:b,onFocus:g,onChange:_,"aria-describedby":Ie(e),children:[x&&v.jsx("option",{value:"",children:c}),Array.isArray(d)&&d.map(({value:S,label:q},w)=>{const T=p&&p.indexOf(S)!==-1;return v.jsx("option",{value:String(w),disabled:T,children:q},w)})]})}function Jp({id:t,options:e={},placeholder:r,value:n,required:i,disabled:a,readonly:s,autofocus:o=!1,onChange:u,onBlur:l,onFocus:f}){const h=N.useCallback(({target:{value:p}})=>u(p===""?e.emptyValue:p),[u,e.emptyValue]),c=N.useCallback(({target:p})=>l(t,p&&p.value),[l,t]),d=N.useCallback(({target:p})=>f(t,p&&p.value),[t,f]);return v.jsx("textarea",{id:t,name:t,className:"form-control",value:n||"",placeholder:r,required:i,disabled:a,readOnly:s,autoFocus:o,rows:e.rows,onBlur:c,onFocus:d,onChange:h,"aria-describedby":Ie(t)})}Jp.defaultProps={autofocus:!1,options:{}};function kS(t){const{options:e,registry:r}=t,n=G("BaseInputTemplate",r,e);return v.jsx(n,{...t})}function BS(t){const{onChange:e,options:r,registry:n}=t,i=G("BaseInputTemplate",n,r),a=N.useCallback(s=>e(s?`${s}:00`:void 0),[e]);return v.jsx(i,{type:"time",...t,onChange:a})}function LS(t){const{options:e,registry:r}=t,n=G("BaseInputTemplate",r,e);return v.jsx(n,{type:"url",...t})}function US(t){const{options:e,registry:r}=t,n=G("BaseInputTemplate",r,e);return v.jsx(n,{type:"number",...t})}function $S(){return{AltDateWidget:vS,AltDateTimeWidget:bS,CheckboxWidget:_S,CheckboxesWidget:SS,ColorWidget:AS,DateWidget:xS,DateTimeWidget:qS,EmailWidget:OS,FileWidget:FS,HiddenWidget:jS,PasswordWidget:PS,RadioWidget:DS,RangeWidget:NS,SelectWidget:MS,TextWidget:kS,TextareaWidget:Jp,TimeWidget:BS,UpDownWidget:US,URLWidget:LS}}function WS(){return{fields:V_(),templates:mS(),widgets:$S(),rootSchema:{},formContext:{},translateString:zv}}class KS extends N.Component{constructor(e){if(super(e),this.getUsedFormData=(r,n)=>{if(n.length===0&&typeof r!="object")return r;const i=Qd(r,n);return Array.isArray(r)?Object.keys(i).map(a=>i[a]):i},this.getFieldNames=(r,n)=>{const i=(a,s=[],o=[[]])=>(Object.keys(a).forEach(u=>{if(typeof a[u]=="object"){const l=o.map(f=>[...f,u]);a[u][dh]&&a[u][Hr]!==""?s.push(a[u][Hr]):i(a[u],s,l)}else u===Hr&&a[u]!==""&&o.forEach(l=>{const f=M(n,l);(typeof f!="object"||Ge(f)||Array.isArray(f)&&f.every(h=>typeof h!="object"))&&s.push(l)})}),s);return i(r)},this.omitExtraData=r=>{const{schema:n,schemaUtils:i}=this.state,a=i.retrieveSchema(n,r),s=i.toPathSchema(a,"",r),o=this.getFieldNames(s,r);return this.getUsedFormData(r,o)},this.onChange=(r,n,i)=>{const{extraErrors:a,omitExtraData:s,liveOmit:o,noValidate:u,liveValidate:l,onChange:f}=this.props,{schemaUtils:h,schema:c,retrievedSchema:d}=this.state;(re(r)||Array.isArray(r))&&(r=this.getStateFromProps(this.props,r,d).formData);const p=!u&&l;let y={formData:r,schema:c},m=r;if(s===!0&&o===!0&&(m=this.omitExtraData(r),y={formData:m}),p){const g=this.validate(m,c,h,d);let b=g.errors,_=g.errorSchema;const A=b,x=_;if(a){const S=no(g,a);_=S.errorSchema,b=S.errors}if(n){const S=this.filterErrorsBasedOnSchema(n,d,m);_=Ke(_,S,"preventDuplicates")}y={formData:m,errors:b,errorSchema:_,schemaValidationErrors:A,schemaValidationErrorSchema:x}}else if(!u&&n){const g=a?Ke(n,a,"preventDuplicates"):n;y={formData:m,errorSchema:g,errors:tt(g)}}this.setState(y,()=>f&&f({...this.state,...y},i))},this.reset=()=>{const{onChange:r}=this.props,a={formData:this.getStateFromProps(this.props,void 0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{}};this.setState(a,()=>r&&r({...this.state,...a}))},this.onBlur=(r,n)=>{const{onBlur:i}=this.props;i&&i(r,n)},this.onFocus=(r,n)=>{const{onFocus:i}=this.props;i&&i(r,n)},this.onSubmit=r=>{if(r.preventDefault(),r.target!==r.currentTarget)return;r.persist();const{omitExtraData:n,extraErrors:i,noValidate:a,onSubmit:s}=this.props;let{formData:o}=this.state;if(n===!0&&(o=this.omitExtraData(o)),a||this.validateFormWithFormData(o)){const u=i||{},l=i?tt(i):[];this.setState({formData:o,errors:l,errorSchema:u,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{s&&s({...this.state,formData:o,status:"submitted"},r)})}},this.submit=()=>{if(this.formElement.current){const r=new CustomEvent("submit",{cancelable:!0});r.preventDefault(),this.formElement.current.dispatchEvent(r),this.formElement.current.requestSubmit()}},this.validateFormWithFormData=r=>{const{extraErrors:n,extraErrorsBlockSubmit:i,focusOnFirstError:a,onError:s}=this.props,{errors:o}=this.state,u=this.validate(r);let l=u.errors,f=u.errorSchema;const h=l,c=f,d=l.length>0||n&&i;if(d){if(n){const p=no(u,n);f=p.errorSchema,l=p.errors}a&&(typeof a=="function"?a(l[0]):this.focusOnError(l[0])),this.setState({errors:l,errorSchema:f,schemaValidationErrors:h,schemaValidationErrorSchema:c},()=>{s?s(l):console.error("Form validation failed",l)})}else o.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}});return!d},!e.validator)throw new Error("A validator is required for Form functionality to work");this.state=this.getStateFromProps(e,e.formData),this.props.onChange&&!he(this.state.formData,this.props.formData)&&this.props.onChange(this.state),this.formElement=N.createRef()}getSnapshotBeforeUpdate(e,r){if(!he(this.props,e)){const n=!he(e.schema,this.props.schema),i=!he(e.formData,this.props.formData),a=this.getStateFromProps(this.props,this.props.formData,n||i?void 0:this.state.retrievedSchema,n),s=!he(a,r);return{nextState:a,shouldUpdate:s}}return{shouldUpdate:!1}}componentDidUpdate(e,r,n){if(n.shouldUpdate){const{nextState:i}=n;!he(i.formData,this.props.formData)&&!he(i.formData,r.formData)&&this.props.onChange&&this.props.onChange(i),this.setState(i)}}getStateFromProps(e,r,n,i=!1){var a;const s=this.state||{},o="schema"in e?e.schema:this.props.schema,u=("uiSchema"in e?e.uiSchema:this.props.uiSchema)||{},l=typeof r<"u",f="liveValidate"in e?e.liveValidate:this.props.liveValidate,h=l&&!e.noValidate&&f,c=o,d="experimental_defaultFormStateBehavior"in e?e.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,p="experimental_customMergeAllOf"in e?e.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let y=s.schemaUtils;(!y||y.doesSchemaUtilsDiffer(e.validator,c,d,p))&&(y=Vv(e.validator,c,d,p));const m=y.getDefaultFormState(o,r),g=n??y.retrieveSchema(o,m),b=()=>e.noValidate||i?{errors:[],errorSchema:{}}:e.liveValidate?{errors:s.errors||[],errorSchema:s.errorSchema||{}}:{errors:s.schemaValidationErrors||[],errorSchema:s.schemaValidationErrorSchema||{}};let _,A,x=s.schemaValidationErrors,S=s.schemaValidationErrorSchema;if(h){const T=this.validate(m,o,y,g);_=T.errors,n===void 0?A=T.errorSchema:A=Ke((a=this.state)===null||a===void 0?void 0:a.errorSchema,T.errorSchema,"preventDuplicates"),x=_,S=A}else{const T=b();_=T.errors,A=T.errorSchema}if(e.extraErrors){const T=no({errorSchema:A,errors:_},e.extraErrors);A=T.errorSchema,_=T.errors}const q=y.toIdSchema(g,u["ui:rootFieldId"],m,e.idPrefix,e.idSeparator);return{schemaUtils:y,schema:o,uiSchema:u,idSchema:q,formData:m,edit:l,errors:_,errorSchema:A,schemaValidationErrors:x,schemaValidationErrorSchema:S,retrievedSchema:g}}shouldComponentUpdate(e,r){return pb(this,e,r)}validate(e,r=this.props.schema,n,i){const a=n||this.state.schemaUtils,{customValidate:s,transformErrors:o,uiSchema:u}=this.props,l=i??a.retrieveSchema(r,e);return a.getValidator().validateFormData(e,l,s,o,u)}renderErrors(e){const{errors:r,errorSchema:n,schema:i,uiSchema:a}=this.state,{formContext:s}=this.props,o=H(a),u=G("ErrorListTemplate",e,o);return r&&r.length?v.jsx(u,{errors:r,errorSchema:n||{},schema:i,uiSchema:a,formContext:s,registry:e}):null}filterErrorsBasedOnSchema(e,r,n){const{retrievedSchema:i,schemaUtils:a}=this.state,s=r??i,o=a.toPathSchema(s,"",n),u=this.getFieldNames(o,n),l=Qd(e,u);r?.type!=="object"&&r?.type!=="array"&&(l.__errors=e.__errors);const f=h=>(_b(h,(c,d)=>{Op(c)?delete h[d]:typeof c=="object"&&!Array.isArray(c.__errors)&&f(c)}),h);return f(l)}getRegistry(){var e;const{translateString:r,uiSchema:n={}}=this.props,{schemaUtils:i}=this.state,{fields:a,templates:s,widgets:o,formContext:u,translateString:l}=WS();return{fields:{...a,...this.props.fields},templates:{...s,...this.props.templates,ButtonTemplates:{...s.ButtonTemplates,...(e=this.props.templates)===null||e===void 0?void 0:e.ButtonTemplates}},widgets:{...o,...this.props.widgets},rootSchema:this.props.schema,formContext:this.props.formContext||u,schemaUtils:i,translateString:r||l,globalUiOptions:n[Rm]}}focusOnError(e){const{idPrefix:r="root",idSeparator:n="_"}=this.props,{property:i}=e,a=Rp(i);a[0]===""?a[0]=r:a.unshift(r);const s=a.join(n);let o=this.formElement.current.elements[s];o||(o=this.formElement.current.querySelector(`input[id^="${s}"`)),o&&o.length&&(o=o[0]),o&&o.focus()}validateForm(){const{omitExtraData:e}=this.props;let{formData:r}=this.state;return e===!0&&(r=this.omitExtraData(r)),this.validateFormWithFormData(r)}render(){const{children:e,id:r,idPrefix:n,idSeparator:i,className:a="",tagName:s,name:o,method:u,target:l,action:f,autoComplete:h,enctype:c,acceptcharset:d,acceptCharset:p,noHtml5Validate:y=!1,disabled:m,readonly:g,formContext:b,showErrorList:_="top",_internalFormWrapper:A}=this.props,{schema:x,uiSchema:S,formData:q,errorSchema:w,idSchema:T}=this.state,C=this.getRegistry(),{SchemaField:I}=C.fields,{SubmitButton:P}=C.templates.ButtonTemplates,O=A?s:void 0,E=A||s||"form";let{[Xr]:F={}}=H(S);m&&(F={...F,props:{...F.props,disabled:!0}});const k={[Or]:{[Xr]:F}};return v.jsxs(E,{className:a||"rjsf",id:r,name:o,method:u,target:l,action:f,autoComplete:h,encType:c,acceptCharset:p||d,noValidate:y,onSubmit:this.onSubmit,as:O,ref:this.formElement,children:[_==="top"&&this.renderErrors(C),v.jsx(I,{name:"",schema:x,uiSchema:S,errorSchema:w,idSchema:T,idPrefix:n,idSeparator:i,formContext:b,formData:q,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:C,disabled:m,readonly:g}),e||v.jsx(P,{uiSchema:k,registry:C}),_==="bottom"&&this.renderErrors(C)]})}}const VS="*";function Wr(t){const{label:e,required:r,id:n}=t;return e?v.jsxs("label",{className:"control-label",htmlFor:n,children:[sm(e),r&&v.jsx("span",{className:"required",children:VS})]}):null}function GS(t){const{id:e,label:r,children:n,errors:i,help:a,description:s,hidden:o,required:u,displayLabel:l,registry:f,uiSchema:h}=t,c=H(h,f.globalUiOptions),d=G("WrapIfAdditionalTemplate",f,c);return o?v.jsx("div",{className:"hidden",children:n}):v.jsxs(d,{...t,children:[v.jsxs("div",{className:"flex flex-col flex-grow gap-2 additional",children:[v.jsx("div",{className:xo("flex flex-grow additional-children",c.flexDirection==="row"?"flex-row items-center gap-3":"flex-col flex-grow gap-2"),children:n}),l&&s?s:null]}),i,a]})}function HS({formData:t,onChange:e,disabled:r,readonly:n,...i}){const a=r||n,s=i.idSchema.$id;return v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(Wr,{label:i.name,id:s}),v.jsx(om,{value:t,editable:!a,onChange:e})]})}class lh extends N.Component{constructor(e){super(e);const{formData:r,options:n,registry:{schemaUtils:i}}=this.props,a=n.map(s=>i.retrieveSchema(s,r));this.state={retrievedOptions:a,selectedOption:this.getMatchingOption(0,r,a)}}componentDidUpdate(e,r){const{formData:n,options:i,idSchema:a}=this.props,{selectedOption:s}=this.state;let o=this.state;if(!he(e.options,i)){const{registry:{schemaUtils:u}}=this.props,l=i.map(f=>u.retrieveSchema(f,n));o={selectedOption:s,retrievedOptions:l}}if(!he(n,e.formData)&&a.$id===e.idSchema.$id){const{retrievedOptions:u}=o,l=this.getMatchingOption(s,n,u);r&&l!==s&&(o={selectedOption:l,retrievedOptions:u})}o!==this.state&&this.setState(o)}getMatchingOption(e,r,n){const{schema:i,registry:{schemaUtils:a}}=this.props,s=rr(i);return a.getClosestMatchingOption(r,n,e,s)}onOptionChange=e=>{const{selectedOption:r,retrievedOptions:n}=this.state,{formData:i,onChange:a,registry:s}=this.props;console.log("onOptionChange",{state:{selectedOption:r,retrievedOptions:n},option:e});const{schemaUtils:o}=s,u=e!==void 0?Number.parseInt(e,10):-1;if(u===r)return;const l=u>=0?n[u]:void 0,f=r>=0?n[r]:void 0;let h=o.sanitizeDataForNewSchema(l,f,i);h&&l&&(h=o.getDefaultFormState(l,h,"excludeObjectChildren")),a(h,void 0,this.getFieldId()),this.setState({selectedOption:u})};getFieldId(){const{idSchema:e,schema:r}=this.props;return`${e.$id}${r.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:e,disabled:r=!1,errorSchema:n={},formContext:i,onBlur:a,onFocus:s,registry:o,schema:u,uiSchema:l,readonly:f}=this.props,{widgets:h,fields:c,translateString:d,globalUiOptions:p,schemaUtils:y}=o,{SchemaField:m}=c,{selectedOption:g,retrievedOptions:b}=this.state,{widget:_="select",placeholder:A,autofocus:x,autocomplete:S,title:q=u.title,flexDirection:w,wrap:T,...C}=H(l,p),I=Re({type:"number"},_,h),P=um(n,we,[]),O=cm(n,[we]),E=y.getDisplayLabel(u,l,p),F=g>=0&&b[g]||null;let k;if(F){const{required:fe}=u;k=fe?Fe({required:fe},F):F}let Y=[];pe in u&&l&&pe in l?Array.isArray(l[pe])?Y=l[pe]:console.warn(`uiSchema.oneOf is not an array for "${q||e}"`):_e in u&&l&&_e in l&&(Array.isArray(l[_e])?Y=l[_e]:console.warn(`uiSchema.anyOf is not an array for "${q||e}"`));let D=l;g>=0&&Y.length>g&&(D=Y[g]);const j=q?Z.TitleOptionPrefix:Z.OptionPrefix,z=q?[q]:[],te=b.map((fe,Ce)=>{const{title:Me=fe.title}=H(Y[Ce]);return{label:Me||d(j,z.concat(String(Ce+1))),value:Ce}}),me=k&&v.jsx(m,{...this.props,schema:k,uiSchema:{...D,"ui:options":{...D?.["ui:options"],hideLabel:!0}}});return v.jsxs("div",{className:xo("panel multischema flex",w==="row"?"flex-row gap-3":"flex-col gap-2"),children:[v.jsxs("div",{className:"flex flex-row gap-2 items-center panel-select",children:[v.jsx(Wr,{label:this.props.name,required:this.props.required,id:this.getFieldId()}),v.jsx(I,{id:this.getFieldId(),name:`${e}${u.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:a,onFocus:s,disabled:r||xm(te)||f,multiple:!1,rawErrors:P,errorSchema:O,value:g>=0?g:void 0,options:{enumOptions:te,...C},registry:o,formContext:i,placeholder:A,autocomplete:S,autofocus:x,label:"",hideLabel:!E})]}),T?v.jsx("fieldset",{children:me}):me]})}}function zS({formData:t,onChange:e,disabled:r,readonly:n,...i}){function a(u){e(u)}const s=r||n,o=i.idSchema.$id;return v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(Wr,{label:i.name,id:o}),v.jsx(lm,{value:t,editable:!s,onChange:a})]})}const YS={AnyOfField:lh,OneOfField:lh,JsonField:HS,HtmlField:zS};function JS(t){const{children:e,className:r,disabled:n,hasToolbar:i,hasMoveDown:a,hasMoveUp:s,hasRemove:o,hasCopy:u,index:l,onCopyIndexClick:f,onDropIndexClick:h,onReorderClick:c,readonly:d,registry:p,uiSchema:y}=t,{CopyButton:m,MoveDownButton:g,MoveUpButton:b,RemoveButton:_}=p.templates.ButtonTemplates;return v.jsxs("div",{className:xo("flex flex-row w-full overflow-hidden",r),children:[i&&v.jsxs("div",{className:"flex flex-col gap-1 p-1 mr-2",children:[(s||a)&&v.jsx(b,{disabled:n||d||!s,onClick:c(l,l-1),uiSchema:y,registry:p}),(s||a)&&v.jsx(g,{disabled:n||d||!a,onClick:c(l,l+1),uiSchema:y,registry:p}),u&&v.jsx(m,{disabled:n||d,onClick:f(l),uiSchema:y,registry:p}),o&&v.jsx(_,{disabled:n||d,onClick:h(l),uiSchema:y,registry:p})]}),v.jsx("div",{className:"flex flex-col flex-grow",children:e})]})}function ZS(t){const{canAdd:e,className:r,disabled:n,idSchema:i,uiSchema:a,items:s,onAddClick:o,readonly:u,registry:l,required:f,schema:h,title:c}=t,d=H(a),p=G("ArrayFieldDescriptionTemplate",l,d),y=G("ArrayFieldItemTemplate",l,d),m=G("ArrayFieldTitleTemplate",l,d),{ButtonTemplates:{AddButton:g}}=l.templates;return v.jsxs("fieldset",{className:r,id:i.$id,children:[v.jsx(m,{idSchema:i,title:d.title||c,required:f,schema:h,uiSchema:a,registry:l}),v.jsx(p,{idSchema:i,description:d.description||h.description,schema:h,uiSchema:a,registry:l}),s&&s.length>0&&v.jsx("div",{className:"flex flex-col gap-3 array-items",children:s.map(({key:b,children:_,...A})=>{const x=N.cloneElement(_,{..._.props,name:void 0,title:void 0});return v.jsx(y,{...A,children:x},b)})}),e&&v.jsx(g,{className:"array-item-add",onClick:o,disabled:n||u,uiSchema:a,registry:l})]})}function XS(t){const{id:e,name:r,value:n,readonly:i,disabled:a,autofocus:s,onBlur:o,onFocus:u,onChange:l,onChangeOverride:f,options:h,schema:c,uiSchema:d,formContext:p,registry:y,rawErrors:m,type:g,hideLabel:b,hideError:_,...A}=t;if(!e)throw console.log("No id for",t),new Error(`no id for props ${JSON.stringify(t)}`);const x={...A,...Ip(c,g,h)};let S;x.type==="number"||x.type==="integer"?S=n||n===0?n:"":S=n??"";const q=N.useCallback(({target:{value:I}})=>l(I===""?h.emptyValue:I),[l,h]),w=N.useCallback(({target:I})=>o(e,I?.value),[o,e]),T=N.useCallback(({target:I})=>u(e,I?.value),[u,e]),C=!t.label||d["ui:options"]?.hideLabel||t.options?.hideLabel||t.hideLabel;return v.jsxs(v.Fragment,{children:[!C&&v.jsx(Wr,{label:t.label,required:t.required,id:e}),v.jsx("input",{id:e,name:e,className:"form-control",readOnly:i,disabled:a,autoFocus:s,value:S,...x,placeholder:t.label,list:c.examples?Er(e):void 0,onChange:f||q,onBlur:w,onFocus:T,"aria-describedby":Ie(e,!!c.examples)}),Array.isArray(c.examples)&&v.jsx("datalist",{id:Er(e),children:c.examples.concat(c.default&&!c.examples.includes(c.default)?[c.default]:[]).map(I=>v.jsx("option",{value:I},I))},`datalist_${e}`)]})}const QS=({onClick:t,disabled:e,...r})=>v.jsx("div",{className:"flex flex-row",children:v.jsx(fm,{onClick:t,disabled:e,IconLeft:dm,children:"Add"})}),e1=({onClick:t,disabled:e,...r})=>v.jsx("div",{className:"flex flex-row",children:v.jsx(qo,{onClick:t,disabled:e,Icon:hm})}),r1=({onClick:t,disabled:e,...r})=>v.jsx("div",{className:"flex flex-row",children:v.jsx(qo,{onClick:t,disabled:e,Icon:pm})}),t1=({onClick:t,disabled:e,...r})=>v.jsx("div",{className:"flex flex-row",children:v.jsx(qo,{onClick:t,disabled:e,Icon:mm})}),n1=Object.freeze(Object.defineProperty({__proto__:null,AddButton:QS,MoveDownButton:t1,MoveUpButton:r1,RemoveButton:e1},Symbol.toStringTag,{value:"Module"}));function i1(t){const{description:e,disabled:r,formData:n,idSchema:i,onAddClick:a,properties:s,readonly:o,registry:u,required:l,schema:f,title:h,uiSchema:c}=t,d=H(c),p=G("TitleFieldTemplate",u,d),y=G("DescriptionFieldTemplate",u,d),m=hh(f,c,n);if(s.length===0&&!m)return null;const{ButtonTemplates:{AddButton:g}}=u.templates;return v.jsx(v.Fragment,{children:v.jsxs("fieldset",{id:i.$id,className:"object-field",children:[h&&v.jsx(p,{id:nu(i),title:h,required:l,schema:f,uiSchema:c,registry:u}),e&&v.jsx(y,{id:gr(i),description:e,schema:f,uiSchema:c,registry:u}),s.map(b=>b.content),m&&v.jsx(g,{className:"object-property-expand",onClick:a(f),disabled:r||o,uiSchema:c,registry:u})]})})}function a1(t){const{id:e,title:r,required:n}=t;return v.jsx("legend",{id:e,className:"title-field",children:ym(r)})}function s1(t){const{id:e,classNames:r,style:n,disabled:i,label:a,onKeyChange:s,onDropPropertyClick:o,readonly:u,required:l,schema:f,children:h,uiSchema:c,registry:d}=t,{templates:p,translateString:y}=d,{RemoveButton:m}=p.ButtonTemplates;y(Z.KeyLabel,[a]);const g=Fr in f,[b,_]=N.useState(!0);return g?v.jsx("div",{className:r,style:n,children:v.jsx("div",{className:"flex flex-col",children:v.jsxs("fieldset",{children:[v.jsxs("legend",{className:"flex flex-row justify-between gap-3",children:[v.jsx(m,{className:"array-item-remove btn-block",style:{border:"0"},disabled:i||u,onClick:o(a),uiSchema:c,registry:d}),v.jsx("div",{className:"form-group",children:v.jsx("input",{className:"form-control",type:"text",id:`${e}-key`,onBlur:A=>s(A.target.value),defaultValue:a})}),v.jsx("button",{onClick:()=>_(A=>!A),children:b?"collapse":"expand"})]}),b&&v.jsx("div",{className:"form-additional additional-start form-group",children:h})]})})}):v.jsx("div",{className:r,style:n,children:h})}const o1={ButtonTemplates:n1,ArrayFieldItemTemplate:JS,ArrayFieldTemplate:ZS,FieldTemplate:GS,TitleFieldTemplate:a1,ObjectFieldTemplate:i1,BaseInputTemplate:XS,WrapIfAdditionalTemplate:s1};function u1({schema:t,uiSchema:e,options:r,id:n,value:i,disabled:a,readonly:s,label:o,hideLabel:u,autofocus:l=!1,onBlur:f,onFocus:h,onChange:c,registry:d,...p}){const y=N.useCallback(m=>c(m.target.checked),[c]);return v.jsx(gm,{id:n,onChange:y,defaultChecked:i,disabled:a||s,label:o.toLowerCase()===p.name.toLowerCase()?void 0:o})}function c1({id:t,disabled:e,options:{inline:r=!1,enumOptions:n,enumDisabled:i,emptyValue:a},value:s,autofocus:o=!1,readonly:u,onChange:l,onBlur:f,onFocus:h}){const c=Array.isArray(s)?s:[s],d=N.useCallback(({target:y})=>f(t,de(y?.value,n,a)),[f,t]),p=N.useCallback(({target:y})=>h(t,de(y?.value,n,a)),[h,t]);return v.jsx("div",{className:"checkboxes",id:t,children:Array.isArray(n)&&n.map((y,m)=>{const g=Lr(y.value,c),b=Array.isArray(i)&&i.indexOf(y.value)!==-1,_=e||b||u?"disabled":"",A=S=>{S.target.checked?l(Cp(m,c,n)):l(xp(m,c,n))},x=v.jsxs("span",{children:[v.jsx("input",{type:"checkbox",id:_t(t,m),name:t,checked:g,value:String(m),disabled:e||b||u,autoFocus:o&&m===0,onChange:A,onBlur:d,onFocus:p,"aria-describedby":Ie(t)}),v.jsx("span",{children:y.label})]});return r?v.jsx("label",{className:`checkbox-inline ${_}`,children:x},m):v.jsx("div",{className:`checkbox ${_}`,children:v.jsx("label",{children:x})},m)})})}function l1({value:t,onChange:e,disabled:r,readonly:n,...i}){const[a,s]=N.useState(JSON.stringify(t,null,2));function o(u){s(u.target.value);try{e(JSON.parse(u.target.value))}catch(l){console.error(l)}}return v.jsx("textarea",{value:a,rows:10,disabled:r||n,onChange:o})}function f1({options:t,value:e,required:r,disabled:n,readonly:i,autofocus:a=!1,onBlur:s,onFocus:o,onChange:u,id:l}){const{enumOptions:f,enumDisabled:h,inline:c,emptyValue:d}=t,p=N.useCallback(({target:{value:m}})=>s(l,de(m,f,d)),[s,l]),y=N.useCallback(({target:{value:m}})=>o(l,de(m,f,d)),[o,l]);return v.jsx("div",{className:"field-radio-group",id:l,children:Array.isArray(f)&&f.map((m,g)=>{const b=Lr(m.value,e),_=Array.isArray(h)&&h.indexOf(m.value)!==-1,A=n||_||i?"disabled":"",x=()=>u(m.value),S=v.jsxs("span",{children:[v.jsx("input",{type:"radio",id:_t(l,g),checked:b,name:l,required:r,value:String(g),disabled:n||_||i,autoFocus:a&&g===0,onChange:x,onBlur:p,onFocus:y,"aria-describedby":Ie(l)}),v.jsx("span",{children:m.label})]});return c?v.jsx("label",{className:`radio-inline ${b?"checked":""} ${A}`,children:S},g):v.jsx("div",{className:`radio ${b?"checked":""} ${A}`,children:v.jsx("label",{children:S})},g)})})}function mo(t,e){return e?Array.from(t.target.options).slice().filter(r=>r.selected).map(r=>r.value):t.target.value}function d1({schema:t,id:e,options:r,value:n,required:i,disabled:a,readonly:s,multiple:o=!1,autofocus:u=!1,onChange:l,onBlur:f,onFocus:h,placeholder:c}){const{enumOptions:d,enumDisabled:p,emptyValue:y}=r,m=o?[]:"",g=N.useCallback(S=>{const q=mo(S,o);return h(e,de(q,d,y))},[h,e,t,o,d,y]),b=N.useCallback(S=>{const q=mo(S,o);return f(e,de(q,d,y))},[f,e,t,o,d,y]),_=N.useCallback(S=>{const q=mo(S,o);return l(de(q,d,y))},[l,t,o,d,y]),A=qp(n,d,o),x=!o&&t.default===void 0;return v.jsxs("select",{id:e,name:e,multiple:o,className:"form-control",value:typeof A>"u"?m:A,required:i,disabled:a||s,autoFocus:u,onBlur:b,onFocus:g,onChange:_,"aria-describedby":Ie(e),children:[x&&v.jsx("option",{value:"",children:c}),Array.isArray(d)&&d.map(({value:S,label:q},w)=>{const T=p&&p.indexOf(S)!==-1;return v.jsx("option",{value:String(w),disabled:T,children:q},w)})]})}const Gr=(t,e)=>r=>{const n=!r.label||r.uiSchema["ui:options"]?.hideLabel||r.options?.hideLabel||r.hideLabel;return v.jsxs(v.Fragment,{children:[!n&&v.jsx(Wr,{label:r.label,required:r.required,id:r.id}),v.jsx(t,{...r})]})},h1={RadioWidget:f1,CheckboxWidget:Gr(u1),SelectWidget:Gr(d1),CheckboxesWidget:Gr(c1),JsonWidget:Gr(l1)};class p1{rawValidation(e,r){const i=vm(JSON.parse(JSON.stringify(e))).validate(r);return i.valid?{errors:[],validationError:null}:{errors:i.errors,validationError:null}}validateFormData(e,r,n,i,a){const{errors:s}=this.rawValidation(r,e),o=s.map(u=>({name:"any",message:u.error,property:"."+u.instanceLocation.substring(1).split("/").join("."),schemaPath:u.instanceLocation,stack:u.error}));return{errors:o,errorSchema:gb(o)}}isValid(e,r,n){return this.rawValidation(e,r).errors.length===0}toErrorList(){return[]}}const fh=new p1,y1=N.forwardRef(({className:t,direction:e="vertical",schema:r,onChange:n,uiSchema:i,templates:a,fields:s,widgets:o,cleanOnChange:u,...l},f)=>{const h=N.useRef(null),c=N.useId(),[d,p]=N.useState(l.formData),y=({formData:S},q)=>(q.preventDefault(),console.log("Data submitted: ",S),l.onSubmit?.(S),!1),m=({formData:S},q)=>{const w=u!==!1?JSON.parse(JSON.stringify(S)):S;console.log("Data changed: ",w,{cleanOnChange:u}),p(w),n?.(w,()=>g(w))},g=S=>fh.validateFormData(S,r).errors.length===0;N.useImperativeHandle(f,()=>({formData:()=>d,validateForm:()=>h.current.validateForm(),silentValidate:()=>g(d),cancel:()=>h.current.reset()}),[d]);const b={...i,"ui:globalOptions":{...i?.["ui:globalOptions"],enableMarkdownInDescription:!0},"ui:submitButtonOptions":{norender:!0}},_={...YS,...s},A={...o1,...a},x={...h1,...o};return v.jsx(KS,{tagName:"div",idSeparator:"--",idPrefix:c,...l,ref:h,className:["json-form",e,t].join(" "),showErrorList:!1,schema:r,fields:_,templates:A,widgets:x,uiSchema:b,onChange:m,onSubmit:y,validator:fh})});export{y1 as JsonSchemaForm}; diff --git a/public/admin/assets/main-CfjI0j-e.js b/public/admin/assets/main-CfjI0j-e.js new file mode 100644 index 0000000..a0e0710 --- /dev/null +++ b/public/admin/assets/main-CfjI0j-e.js @@ -0,0 +1,443 @@ +function QY(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var R8e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function es(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var DE={exports:{}},jp={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Z4;function ZY(){if(Z4)return jp;Z4=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,i){var s=null;if(i!==void 0&&(s=""+i),o.key!==void 0&&(s=""+o.key),"key"in o){i={};for(var a in o)a!=="key"&&(i[a]=o[a])}else i=o;return o=i.ref,{$$typeof:e,type:r,key:s,ref:o!==void 0?o:null,props:i}}return jp.Fragment=t,jp.jsx=n,jp.jsxs=n,jp}var eR;function eK(){return eR||(eR=1,DE.exports=ZY()),DE.exports}var h=eK(),IE={exports:{}},ct={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var tR;function tK(){if(tR)return ct;tR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function y(D){return D===null||typeof D!="object"?null:(D=g&&D[g]||D["@@iterator"],typeof D=="function"?D:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function E(D,W,K){this.props=D,this.context=W,this.refs=S,this.updater=K||v}E.prototype.isReactComponent={},E.prototype.setState=function(D,W){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,W,"setState")},E.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function C(){}C.prototype=E.prototype;function _(D,W,K){this.props=D,this.context=W,this.refs=S,this.updater=K||v}var j=_.prototype=new C;j.constructor=_,x(j,E.prototype),j.isPureReactComponent=!0;var A=Array.isArray;function T(){}var k={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function V(D,W,K){var Q=K.ref;return{$$typeof:e,type:D,key:W,ref:Q!==void 0?Q:null,props:K}}function H(D,W){return V(D.type,W,D.props)}function F(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function B(D){var W={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(K){return W[K]})}var U=/\/+/g;function M(D,W){return typeof D=="object"&&D!==null&&D.key!=null?B(""+D.key):W.toString(36)}function z(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(T,T):(D.status="pending",D.then(function(W){D.status==="pending"&&(D.status="fulfilled",D.value=W)},function(W){D.status==="pending"&&(D.status="rejected",D.reason=W)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function $(D,W,K,Q,ie){var pe=typeof D;(pe==="undefined"||pe==="boolean")&&(D=null);var ue=!1;if(D===null)ue=!0;else switch(pe){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(D.$$typeof){case e:case t:ue=!0;break;case f:return ue=D._init,$(ue(D._payload),W,K,Q,ie)}}if(ue)return ie=ie(D),ue=Q===""?"."+M(D,0):Q,A(ie)?(K="",ue!=null&&(K=ue.replace(U,"$&/")+"/"),$(ie,W,K,"",function(xe){return xe})):ie!=null&&(F(ie)&&(ie=H(ie,K+(ie.key==null||D&&D.key===ie.key?"":(""+ie.key).replace(U,"$&/")+"/")+ue)),W.push(ie)),1;ue=0;var se=Q===""?".":Q+":";if(A(D))for(var me=0;me>>1,Y=$[q];if(0>>1;qo(K,P))Qo(ie,K)?($[q]=ie,$[Q]=P,q=Q):($[q]=K,$[W]=P,q=W);else if(Qo(ie,P))$[q]=ie,$[Q]=P,q=Q;else break e}}return L}function o($,L){var P=$.sortIndex-L.sortIndex;return P!==0?P:$.id-L.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var c=[],u=[],f=1,p=null,g=3,y=!1,v=!1,x=!1,S=!1,E=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function j($){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=$)r(u),L.sortIndex=L.expirationTime,t(c,L);else break;L=n(u)}}function A($){if(x=!1,j($),!v)if(n(c)!==null)v=!0,T||(T=!0,B());else{var L=n(u);L!==null&&z(A,L.startTime-$)}}var T=!1,k=-1,R=5,V=-1;function H(){return S?!0:!(e.unstable_now()-V$&&H());){var q=p.callback;if(typeof q=="function"){p.callback=null,g=p.priorityLevel;var Y=q(p.expirationTime<=$);if($=e.unstable_now(),typeof Y=="function"){p.callback=Y,j($),L=!0;break t}p===n(c)&&r(c),j($)}else r(c);p=n(c)}if(p!==null)L=!0;else{var D=n(u);D!==null&&z(A,D.startTime-$),L=!1}}break e}finally{p=null,g=P,y=!1}L=void 0}}finally{L?B():T=!1}}}var B;if(typeof _=="function")B=function(){_(F)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,M=U.port2;U.port1.onmessage=F,B=function(){M.postMessage(null)}}else B=function(){E(F,0)};function z($,L){k=E(function(){$(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function($){$.callback=null},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function($){switch(g){case 1:case 2:case 3:var L=3;break;default:L=g}var P=g;g=L;try{return $()}finally{g=P}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function($,L){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var P=g;g=$;try{return L()}finally{g=P}},e.unstable_scheduleCallback=function($,L,P){var q=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0q?($.sortIndex=P,t(u,$),n(c)===null&&$===n(u)&&(x?(C(k),k=-1):x=!0,z(A,P-q))):($.sortIndex=Y,t(c,$),v||y||(v=!0,T||(T=!0,B()))),$},e.unstable_shouldYield=H,e.unstable_wrapCallback=function($){var L=g;return function(){var P=g;g=L;try{return $.apply(this,arguments)}finally{g=P}}}}(zE)),zE}var oR;function rK(){return oR||(oR=1,FE.exports=nK()),FE.exports}var BE={exports:{}},gr={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var iR;function oK(){if(iR)return gr;iR=1;var e=dc();function t(c){var u="https://react.dev/errors/"+c;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),BE.exports=oK(),BE.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var aR;function iK(){if(aR)return Ap;aR=1;var e=rK(),t=dc(),n=s9();function r(l){var d="https://react.dev/errors/"+l;if(1Y||(l.current=q[Y],q[Y]=null,Y--)}function K(l,d){Y++,q[Y]=l.current,l.current=d}var Q=D(null),ie=D(null),pe=D(null),ue=D(null);function se(l,d){switch(K(pe,d),K(ie,l),K(Q,null),d.nodeType){case 9:case 11:l=(l=d.documentElement)&&(l=l.namespaceURI)?S4(l):0;break;default:if(l=d.tagName,d=d.namespaceURI)d=S4(d),l=E4(d,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}W(Q),K(Q,l)}function me(){W(Q),W(ie),W(pe)}function xe(l){l.memoizedState!==null&&K(ue,l);var d=Q.current,m=E4(d,l.type);d!==m&&(K(ie,l),K(Q,m))}function je(l){ie.current===l&&(W(Q),W(ie)),ue.current===l&&(W(ue),Np._currentValue=P)}var _e,Ee;function Re(l){if(_e===void 0)try{throw Error()}catch(m){var d=m.stack.trim().match(/\n( *(at )?)/);_e=d&&d[1]||"",Ee=-1)":-1N||ee[b]!==he[N]){var be=` +`+ee[b].replace(" at new "," at ");return l.displayName&&be.includes("")&&(be=be.replace("",l.displayName)),be}while(1<=b&&0<=N);break}}}finally{Me=!1,Error.prepareStackTrace=m}return(m=l?l.displayName||l.name:"")?Re(m):""}function ve(l,d){switch(l.tag){case 26:case 27:case 5:return Re(l.type);case 16:return Re("Lazy");case 13:return l.child!==d&&d!==null?Re("Suspense Fallback"):Re("Suspense");case 19:return Re("SuspenseList");case 0:case 15:return ze(l.type,!1);case 11:return ze(l.type.render,!1);case 1:return ze(l.type,!0);case 31:return Re("Activity");default:return""}}function Ce(l){try{var d="",m=null;do d+=ve(l,m),m=l,l=l.return;while(l);return d}catch(b){return` +Error generating stack: `+b.message+` +`+b.stack}}var Ae=Object.prototype.hasOwnProperty,G=e.unstable_scheduleCallback,re=e.unstable_cancelCallback,ne=e.unstable_shouldYield,ce=e.unstable_requestPaint,te=e.unstable_now,Z=e.unstable_getCurrentPriorityLevel,de=e.unstable_ImmediatePriority,Te=e.unstable_UserBlockingPriority,$e=e.unstable_NormalPriority,Ke=e.unstable_LowPriority,At=e.unstable_IdlePriority,yn=e.log,ls=e.unstable_setDisableYieldValue,pr=null,dn=null;function Ut(l){if(typeof yn=="function"&&ls(l),dn&&typeof dn.setStrictMode=="function")try{dn.setStrictMode(pr,l)}catch{}}var nn=Math.clz32?Math.clz32:Ku,qo=Math.log,cs=Math.LN2;function Ku(l){return l>>>=0,l===0?32:31-(qo(l)/cs|0)|0}var Ja=256,Is=262144,Ya=4194304;function Wn(l){var d=l&42;if(d!==0)return d;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function Ka(l,d,m){var b=l.pendingLanes;if(b===0)return 0;var N=0,O=l.suspendedLanes,I=l.pingedLanes;l=l.warmLanes;var J=b&134217727;return J!==0?(b=J&~O,b!==0?N=Wn(b):(I&=J,I!==0?N=Wn(I):m||(m=J&~l,m!==0&&(N=Wn(m))))):(J=b&~O,J!==0?N=Wn(J):I!==0?N=Wn(I):m||(m=b&~l,m!==0&&(N=Wn(m)))),N===0?0:d!==0&&d!==N&&(d&O)===0&&(O=N&-N,m=d&-d,O>=m||O===32&&(m&4194048)!==0)?d:N}function Xa(l,d){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&d)===0}function Ih(l,d){switch(l){case 1:case 2:case 4:case 8:case 64:return d+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xu(){var l=Ya;return Ya<<=1,(Ya&62914560)===0&&(Ya=4194304),l}function rn(l){for(var d=[],m=0;31>m;m++)d.push(l);return d}function Cr(l,d){l.pendingLanes|=d,d!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function Ei(l,d,m,b,N,O){var I=l.pendingLanes;l.pendingLanes=m,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=m,l.entangledLanes&=m,l.errorRecoveryDisabledLanes&=m,l.shellSuspendCounter=0;var J=l.entanglements,ee=l.expirationTimes,he=l.hiddenUpdates;for(m=I&~m;0"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var $1=/[\n"\\]/g;function mr(l){return l.replace($1,function(d){return"\\"+d.charCodeAt(0).toString(16)+" "})}function zh(l,d,m,b,N,O,I,J){l.name="",I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?l.type=I:l.removeAttribute("type"),d!=null?I==="number"?(d===0&&l.value===""||l.value!=d)&&(l.value=""+Hr(d)):l.value!==""+Hr(d)&&(l.value=""+Hr(d)):I!=="submit"&&I!=="reset"||l.removeAttribute("value"),d!=null?od(l,I,Hr(d)):m!=null?od(l,I,Hr(m)):b!=null&&l.removeAttribute("value"),N==null&&O!=null&&(l.defaultChecked=!!O),N!=null&&(l.checked=N&&typeof N!="function"&&typeof N!="symbol"),J!=null&&typeof J!="function"&&typeof J!="symbol"&&typeof J!="boolean"?l.name=""+Hr(J):l.removeAttribute("name")}function jy(l,d,m,b,N,O,I,J){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(l.type=O),d!=null||m!=null){if(!(O!=="submit"&&O!=="reset"||d!=null)){nd(l);return}m=m!=null?""+Hr(m):"",d=d!=null?""+Hr(d):m,J||d===l.value||(l.value=d),l.defaultValue=d}b=b??N,b=typeof b!="function"&&typeof b!="symbol"&&!!b,l.checked=J?l.checked:!!b,l.defaultChecked=!!b,I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(l.name=I),nd(l)}function od(l,d,m){d==="number"&&rd(l.ownerDocument)===l||l.defaultValue===""+m||(l.defaultValue=""+m)}function id(l,d,m,b){if(l=l.options,d){d={};for(var N=0;N"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),D1=!1;if(zs)try{var Vh={};Object.defineProperty(Vh,"passive",{get:function(){D1=!0}}),window.addEventListener("test",Vh,Vh),window.removeEventListener("test",Vh,Vh)}catch{D1=!1}var sl=null,I1=null,Ty=null;function E$(){if(Ty)return Ty;var l,d=I1,m=d.length,b,N="value"in sl?sl.value:sl.textContent,O=N.length;for(l=0;l=qh),A$=" ",T$=!1;function $$(l,d){switch(l){case"keyup":return xJ.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function R$(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var cd=!1;function SJ(l,d){switch(l){case"compositionend":return R$(d);case"keypress":return d.which!==32?null:(T$=!0,A$);case"textInput":return l=d.data,l===A$&&T$?null:l;default:return null}}function EJ(l,d){if(cd)return l==="compositionend"||!V1&&$$(l,d)?(l=E$(),Ty=I1=sl=null,cd=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1=d)return{node:m,offset:d-l};l=b}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=z$(m)}}function V$(l,d){return l&&d?l===d?!0:l&&l.nodeType===3?!1:d&&d.nodeType===3?V$(l,d.parentNode):"contains"in l?l.contains(d):l.compareDocumentPosition?!!(l.compareDocumentPosition(d)&16):!1:!1}function U$(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var d=rd(l.document);d instanceof l.HTMLIFrameElement;){try{var m=typeof d.contentWindow.location.href=="string"}catch{m=!1}if(m)l=d.contentWindow;else break;d=rd(l.document)}return d}function q1(l){var d=l&&l.nodeName&&l.nodeName.toLowerCase();return d&&(d==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||d==="textarea"||l.contentEditable==="true")}var $J=zs&&"documentMode"in document&&11>=document.documentMode,ud=null,W1=null,Yh=null,G1=!1;function H$(l,d,m){var b=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;G1||ud==null||ud!==rd(b)||(b=ud,"selectionStart"in b&&q1(b)?b={start:b.selectionStart,end:b.selectionEnd}:(b=(b.ownerDocument&&b.ownerDocument.defaultView||window).getSelection(),b={anchorNode:b.anchorNode,anchorOffset:b.anchorOffset,focusNode:b.focusNode,focusOffset:b.focusOffset}),Yh&&Jh(Yh,b)||(Yh=b,b=E0(W1,"onSelect"),0>=I,N-=I,us=1<<32-nn(d)+N|m<ht?(St=Ye,Ye=null):St=Ye.sibling;var $t=ge(ae,Ye,fe[ht],we);if($t===null){Ye===null&&(Ye=St);break}l&&Ye&&$t.alternate===null&&d(ae,Ye),oe=O($t,oe,ht),Tt===null?et=$t:Tt.sibling=$t,Tt=$t,Ye=St}if(ht===fe.length)return m(ae,Ye),Et&&Vs(ae,ht),et;if(Ye===null){for(;htht?(St=Ye,Ye=null):St=Ye.sibling;var jl=ge(ae,Ye,$t.value,we);if(jl===null){Ye===null&&(Ye=St);break}l&&Ye&&jl.alternate===null&&d(ae,Ye),oe=O(jl,oe,ht),Tt===null?et=jl:Tt.sibling=jl,Tt=jl,Ye=St}if($t.done)return m(ae,Ye),Et&&Vs(ae,ht),et;if(Ye===null){for(;!$t.done;ht++,$t=fe.next())$t=Se(ae,$t.value,we),$t!==null&&(oe=O($t,oe,ht),Tt===null?et=$t:Tt.sibling=$t,Tt=$t);return Et&&Vs(ae,ht),et}for(Ye=b(Ye);!$t.done;ht++,$t=fe.next())$t=ye(Ye,ae,ht,$t.value,we),$t!==null&&(l&&$t.alternate!==null&&Ye.delete($t.key===null?ht:$t.key),oe=O($t,oe,ht),Tt===null?et=$t:Tt.sibling=$t,Tt=$t);return l&&Ye.forEach(function(XY){return d(ae,XY)}),Et&&Vs(ae,ht),et}function Jt(ae,oe,fe,we){if(typeof fe=="object"&&fe!==null&&fe.type===x&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case y:e:{for(var et=fe.key;oe!==null;){if(oe.key===et){if(et=fe.type,et===x){if(oe.tag===7){m(ae,oe.sibling),we=N(oe,fe.props.children),we.return=ae,ae=we;break e}}else if(oe.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===R&&zc(et)===oe.type){m(ae,oe.sibling),we=N(oe,fe.props),tp(we,fe),we.return=ae,ae=we;break e}m(ae,oe);break}else d(ae,oe);oe=oe.sibling}fe.type===x?(we=Pc(fe.props.children,ae.mode,we,fe.key),we.return=ae,ae=we):(we=zy(fe.type,fe.key,fe.props,null,ae.mode,we),tp(we,fe),we.return=ae,ae=we)}return I(ae);case v:e:{for(et=fe.key;oe!==null;){if(oe.key===et)if(oe.tag===4&&oe.stateNode.containerInfo===fe.containerInfo&&oe.stateNode.implementation===fe.implementation){m(ae,oe.sibling),we=N(oe,fe.children||[]),we.return=ae,ae=we;break e}else{m(ae,oe);break}else d(ae,oe);oe=oe.sibling}we=eS(fe,ae.mode,we),we.return=ae,ae=we}return I(ae);case R:return fe=zc(fe),Jt(ae,oe,fe,we)}if(z(fe))return He(ae,oe,fe,we);if(B(fe)){if(et=B(fe),typeof et!="function")throw Error(r(150));return fe=et.call(fe),it(ae,oe,fe,we)}if(typeof fe.then=="function")return Jt(ae,oe,Gy(fe),we);if(fe.$$typeof===_)return Jt(ae,oe,Uy(ae,fe),we);Jy(ae,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,oe!==null&&oe.tag===6?(m(ae,oe.sibling),we=N(oe,fe),we.return=ae,ae=we):(m(ae,oe),we=Z1(fe,ae.mode,we),we.return=ae,ae=we),I(ae)):m(ae,oe)}return function(ae,oe,fe,we){try{ep=0;var et=Jt(ae,oe,fe,we);return wd=null,et}catch(Ye){if(Ye===xd||Ye===qy)throw Ye;var Tt=wo(29,Ye,null,ae.mode);return Tt.lanes=we,Tt.return=ae,Tt}finally{}}}var Vc=h3(!0),p3=h3(!1),dl=!1;function fS(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function hS(l,d){l=l.updateQueue,d.updateQueue===l&&(d.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function fl(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function hl(l,d,m){var b=l.updateQueue;if(b===null)return null;if(b=b.shared,(Mt&2)!==0){var N=b.pending;return N===null?d.next=d:(d.next=N.next,N.next=d),b.pending=d,d=Fy(l),X$(l,null,m),d}return Ly(l,b,d,m),Fy(l)}function np(l,d,m){if(d=d.updateQueue,d!==null&&(d=d.shared,(m&4194048)!==0)){var b=d.lanes;b&=l.pendingLanes,m|=b,d.lanes=m,Ni(l,m)}}function pS(l,d){var m=l.updateQueue,b=l.alternate;if(b!==null&&(b=b.updateQueue,m===b)){var N=null,O=null;if(m=m.firstBaseUpdate,m!==null){do{var I={lane:m.lane,tag:m.tag,payload:m.payload,callback:null,next:null};O===null?N=O=I:O=O.next=I,m=m.next}while(m!==null);O===null?N=O=d:O=O.next=d}else N=O=d;m={baseState:b.baseState,firstBaseUpdate:N,lastBaseUpdate:O,shared:b.shared,callbacks:b.callbacks},l.updateQueue=m;return}l=m.lastBaseUpdate,l===null?m.firstBaseUpdate=d:l.next=d,m.lastBaseUpdate=d}var mS=!1;function rp(){if(mS){var l=vd;if(l!==null)throw l}}function op(l,d,m,b){mS=!1;var N=l.updateQueue;dl=!1;var O=N.firstBaseUpdate,I=N.lastBaseUpdate,J=N.shared.pending;if(J!==null){N.shared.pending=null;var ee=J,he=ee.next;ee.next=null,I===null?O=he:I.next=he,I=ee;var be=l.alternate;be!==null&&(be=be.updateQueue,J=be.lastBaseUpdate,J!==I&&(J===null?be.firstBaseUpdate=he:J.next=he,be.lastBaseUpdate=ee))}if(O!==null){var Se=N.baseState;I=0,be=he=ee=null,J=O;do{var ge=J.lane&-536870913,ye=ge!==J.lane;if(ye?(wt&ge)===ge:(b&ge)===ge){ge!==0&&ge===bd&&(mS=!0),be!==null&&(be=be.next={lane:0,tag:J.tag,payload:J.payload,callback:null,next:null});e:{var He=l,it=J;ge=d;var Jt=m;switch(it.tag){case 1:if(He=it.payload,typeof He=="function"){Se=He.call(Jt,Se,ge);break e}Se=He;break e;case 3:He.flags=He.flags&-65537|128;case 0:if(He=it.payload,ge=typeof He=="function"?He.call(Jt,Se,ge):He,ge==null)break e;Se=p({},Se,ge);break e;case 2:dl=!0}}ge=J.callback,ge!==null&&(l.flags|=64,ye&&(l.flags|=8192),ye=N.callbacks,ye===null?N.callbacks=[ge]:ye.push(ge))}else ye={lane:ge,tag:J.tag,payload:J.payload,callback:J.callback,next:null},be===null?(he=be=ye,ee=Se):be=be.next=ye,I|=ge;if(J=J.next,J===null){if(J=N.shared.pending,J===null)break;ye=J,J=ye.next,ye.next=null,N.lastBaseUpdate=ye,N.shared.pending=null}}while(!0);be===null&&(ee=Se),N.baseState=ee,N.firstBaseUpdate=he,N.lastBaseUpdate=be,O===null&&(N.shared.lanes=0),bl|=I,l.lanes=I,l.memoizedState=Se}}function m3(l,d){if(typeof l!="function")throw Error(r(191,l));l.call(d)}function g3(l,d){var m=l.callbacks;if(m!==null)for(l.callbacks=null,l=0;lO?O:8;var I=$.T,J={};$.T=J,MS(l,!1,d,m);try{var ee=N(),he=$.S;if(he!==null&&he(J,ee),ee!==null&&typeof ee=="object"&&typeof ee.then=="function"){var be=zJ(ee,b);ap(l,d,be,Co(l))}else ap(l,d,b,Co(l))}catch(Se){ap(l,d,{then:function(){},status:"rejected",reason:Se},Co())}finally{L.p=O,I!==null&&J.types!==null&&(I.types=J.types),$.T=I}}function WJ(){}function RS(l,d,m,b){if(l.tag!==5)throw Error(r(476));var N=J3(l).queue;G3(l,N,d,P,m===null?WJ:function(){return Y3(l),m(b)})}function J3(l){var d=l.memoizedState;if(d!==null)return d;d={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ws,lastRenderedState:P},next:null};var m={};return d.next={memoizedState:m,baseState:m,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ws,lastRenderedState:m},next:null},l.memoizedState=d,l=l.alternate,l!==null&&(l.memoizedState=d),d}function Y3(l){var d=J3(l);d.next===null&&(d=l.alternate.memoizedState),ap(l,d.next.queue,{},Co())}function kS(){return lr(Np)}function K3(){return Rn().memoizedState}function X3(){return Rn().memoizedState}function GJ(l){for(var d=l.return;d!==null;){switch(d.tag){case 24:case 3:var m=Co();l=fl(m);var b=hl(d,l,m);b!==null&&(Kr(b,d,m),np(b,d,m)),d={cache:lS()},l.payload=d;return}d=d.return}}function JJ(l,d,m){var b=Co();m={lane:b,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},o0(l)?Z3(d,m):(m=X1(l,d,m,b),m!==null&&(Kr(m,l,b),e5(m,d,b)))}function Q3(l,d,m){var b=Co();ap(l,d,m,b)}function ap(l,d,m,b){var N={lane:b,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null};if(o0(l))Z3(d,N);else{var O=l.alternate;if(l.lanes===0&&(O===null||O.lanes===0)&&(O=d.lastRenderedReducer,O!==null))try{var I=d.lastRenderedState,J=O(I,m);if(N.hasEagerState=!0,N.eagerState=J,xo(J,I))return Ly(l,d,N,0),Xt===null&&Iy(),!1}catch{}finally{}if(m=X1(l,d,N,b),m!==null)return Kr(m,l,b),e5(m,d,b),!0}return!1}function MS(l,d,m,b){if(b={lane:2,revertLane:fE(),gesture:null,action:b,hasEagerState:!1,eagerState:null,next:null},o0(l)){if(d)throw Error(r(479))}else d=X1(l,m,b,2),d!==null&&Kr(d,l,2)}function o0(l){var d=l.alternate;return l===dt||d!==null&&d===dt}function Z3(l,d){Ed=Xy=!0;var m=l.pending;m===null?d.next=d:(d.next=m.next,m.next=d),l.pending=d}function e5(l,d,m){if((m&4194048)!==0){var b=d.lanes;b&=l.pendingLanes,m|=b,d.lanes=m,Ni(l,m)}}var lp={readContext:lr,use:e0,useCallback:wn,useContext:wn,useEffect:wn,useImperativeHandle:wn,useLayoutEffect:wn,useInsertionEffect:wn,useMemo:wn,useReducer:wn,useRef:wn,useState:wn,useDebugValue:wn,useDeferredValue:wn,useTransition:wn,useSyncExternalStore:wn,useId:wn,useHostTransitionStatus:wn,useFormState:wn,useActionState:wn,useOptimistic:wn,useMemoCache:wn,useCacheRefresh:wn};lp.useEffectEvent=wn;var t5={readContext:lr,use:e0,useCallback:function(l,d){return Or().memoizedState=[l,d===void 0?null:d],l},useContext:lr,useEffect:L3,useImperativeHandle:function(l,d,m){m=m!=null?m.concat([l]):null,n0(4194308,4,V3.bind(null,d,l),m)},useLayoutEffect:function(l,d){return n0(4194308,4,l,d)},useInsertionEffect:function(l,d){n0(4,2,l,d)},useMemo:function(l,d){var m=Or();d=d===void 0?null:d;var b=l();if(Uc){Ut(!0);try{l()}finally{Ut(!1)}}return m.memoizedState=[b,d],b},useReducer:function(l,d,m){var b=Or();if(m!==void 0){var N=m(d);if(Uc){Ut(!0);try{m(d)}finally{Ut(!1)}}}else N=d;return b.memoizedState=b.baseState=N,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:N},b.queue=l,l=l.dispatch=JJ.bind(null,dt,l),[b.memoizedState,l]},useRef:function(l){var d=Or();return l={current:l},d.memoizedState=l},useState:function(l){l=OS(l);var d=l.queue,m=Q3.bind(null,dt,d);return d.dispatch=m,[l.memoizedState,m]},useDebugValue:TS,useDeferredValue:function(l,d){var m=Or();return $S(m,l,d)},useTransition:function(){var l=OS(!1);return l=G3.bind(null,dt,l.queue,!0,!1),Or().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,d,m){var b=dt,N=Or();if(Et){if(m===void 0)throw Error(r(407));m=m()}else{if(m=d(),Xt===null)throw Error(r(349));(wt&127)!==0||S3(b,d,m)}N.memoizedState=m;var O={value:m,getSnapshot:d};return N.queue=O,L3(N3.bind(null,b,O,l),[l]),b.flags|=2048,_d(9,{destroy:void 0},E3.bind(null,b,O,m,d),null),m},useId:function(){var l=Or(),d=Xt.identifierPrefix;if(Et){var m=ds,b=us;m=(b&~(1<<32-nn(b)-1)).toString(32)+m,d="_"+d+"R_"+m,m=Qy++,0<\/script>",O=O.removeChild(O.firstChild);break;case"select":O=typeof b.is=="string"?I.createElement("select",{is:b.is}):I.createElement("select"),b.multiple?O.multiple=!0:b.size&&(O.size=b.size);break;default:O=typeof b.is=="string"?I.createElement(N,{is:b.is}):I.createElement(N)}}O[Tn]=d,O[er]=b;e:for(I=d.child;I!==null;){if(I.tag===5||I.tag===6)O.appendChild(I.stateNode);else if(I.tag!==4&&I.tag!==27&&I.child!==null){I.child.return=I,I=I.child;continue}if(I===d)break e;for(;I.sibling===null;){if(I.return===null||I.return===d)break e;I=I.return}I.sibling.return=I.return,I=I.sibling}d.stateNode=O;e:switch(ur(O,N,b),N){case"button":case"input":case"select":case"textarea":b=!!b.autoFocus;break e;case"img":b=!0;break e;default:b=!1}b&&Js(d)}}return sn(d),JS(d,d.type,l===null?null:l.memoizedProps,d.pendingProps,m),null;case 6:if(l&&d.stateNode!=null)l.memoizedProps!==b&&Js(d);else{if(typeof b!="string"&&d.stateNode===null)throw Error(r(166));if(l=pe.current,gd(d)){if(l=d.stateNode,m=d.memoizedProps,b=null,N=ar,N!==null)switch(N.tag){case 27:case 5:b=N.memoizedProps}l[Tn]=d,l=!!(l.nodeValue===m||b!==null&&b.suppressHydrationWarning===!0||x4(l.nodeValue,m)),l||cl(d,!0)}else l=N0(l).createTextNode(b),l[Tn]=d,d.stateNode=l}return sn(d),null;case 31:if(m=d.memoizedState,l===null||l.memoizedState!==null){if(b=gd(d),m!==null){if(l===null){if(!b)throw Error(r(318));if(l=d.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(r(557));l[Tn]=d}else Dc(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;sn(d),l=!1}else m=oS(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=m),l=!0;if(!l)return d.flags&256?(Eo(d),d):(Eo(d),null);if((d.flags&128)!==0)throw Error(r(558))}return sn(d),null;case 13:if(b=d.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(N=gd(d),b!==null&&b.dehydrated!==null){if(l===null){if(!N)throw Error(r(318));if(N=d.memoizedState,N=N!==null?N.dehydrated:null,!N)throw Error(r(317));N[Tn]=d}else Dc(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;sn(d),N=!1}else N=oS(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=N),N=!0;if(!N)return d.flags&256?(Eo(d),d):(Eo(d),null)}return Eo(d),(d.flags&128)!==0?(d.lanes=m,d):(m=b!==null,l=l!==null&&l.memoizedState!==null,m&&(b=d.child,N=null,b.alternate!==null&&b.alternate.memoizedState!==null&&b.alternate.memoizedState.cachePool!==null&&(N=b.alternate.memoizedState.cachePool.pool),O=null,b.memoizedState!==null&&b.memoizedState.cachePool!==null&&(O=b.memoizedState.cachePool.pool),O!==N&&(b.flags|=2048)),m!==l&&m&&(d.child.flags|=8192),c0(d,d.updateQueue),sn(d),null);case 4:return me(),l===null&&gE(d.stateNode.containerInfo),sn(d),null;case 10:return Hs(d.type),sn(d),null;case 19:if(W($n),b=d.memoizedState,b===null)return sn(d),null;if(N=(d.flags&128)!==0,O=b.rendering,O===null)if(N)up(b,!1);else{if(Sn!==0||l!==null&&(l.flags&128)!==0)for(l=d.child;l!==null;){if(O=Ky(l),O!==null){for(d.flags|=128,up(b,!1),l=O.updateQueue,d.updateQueue=l,c0(d,l),d.subtreeFlags=0,l=m,m=d.child;m!==null;)Q$(m,l),m=m.sibling;return K($n,$n.current&1|2),Et&&Vs(d,b.treeForkCount),d.child}l=l.sibling}b.tail!==null&&te()>p0&&(d.flags|=128,N=!0,up(b,!1),d.lanes=4194304)}else{if(!N)if(l=Ky(O),l!==null){if(d.flags|=128,N=!0,l=l.updateQueue,d.updateQueue=l,c0(d,l),up(b,!0),b.tail===null&&b.tailMode==="hidden"&&!O.alternate&&!Et)return sn(d),null}else 2*te()-b.renderingStartTime>p0&&m!==536870912&&(d.flags|=128,N=!0,up(b,!1),d.lanes=4194304);b.isBackwards?(O.sibling=d.child,d.child=O):(l=b.last,l!==null?l.sibling=O:d.child=O,b.last=O)}return b.tail!==null?(l=b.tail,b.rendering=l,b.tail=l.sibling,b.renderingStartTime=te(),l.sibling=null,m=$n.current,K($n,N?m&1|2:m&1),Et&&Vs(d,b.treeForkCount),l):(sn(d),null);case 22:case 23:return Eo(d),yS(),b=d.memoizedState!==null,l!==null?l.memoizedState!==null!==b&&(d.flags|=8192):b&&(d.flags|=8192),b?(m&536870912)!==0&&(d.flags&128)===0&&(sn(d),d.subtreeFlags&6&&(d.flags|=8192)):sn(d),m=d.updateQueue,m!==null&&c0(d,m.retryQueue),m=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),b=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),b!==m&&(d.flags|=2048),l!==null&&W(Fc),null;case 24:return m=null,l!==null&&(m=l.memoizedState.cache),d.memoizedState.cache!==m&&(d.flags|=2048),Hs(In),sn(d),null;case 25:return null;case 30:return null}throw Error(r(156,d.tag))}function ZJ(l,d){switch(nS(d),d.tag){case 1:return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 3:return Hs(In),me(),l=d.flags,(l&65536)!==0&&(l&128)===0?(d.flags=l&-65537|128,d):null;case 26:case 27:case 5:return je(d),null;case 31:if(d.memoizedState!==null){if(Eo(d),d.alternate===null)throw Error(r(340));Dc()}return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 13:if(Eo(d),l=d.memoizedState,l!==null&&l.dehydrated!==null){if(d.alternate===null)throw Error(r(340));Dc()}return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 19:return W($n),null;case 4:return me(),null;case 10:return Hs(d.type),null;case 22:case 23:return Eo(d),yS(),l!==null&&W(Fc),l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 24:return Hs(In),null;case 25:return null;default:return null}}function _5(l,d){switch(nS(d),d.tag){case 3:Hs(In),me();break;case 26:case 27:case 5:je(d);break;case 4:me();break;case 31:d.memoizedState!==null&&Eo(d);break;case 13:Eo(d);break;case 19:W($n);break;case 10:Hs(d.type);break;case 22:case 23:Eo(d),yS(),l!==null&&W(Fc);break;case 24:Hs(In)}}function dp(l,d){try{var m=d.updateQueue,b=m!==null?m.lastEffect:null;if(b!==null){var N=b.next;m=N;do{if((m.tag&l)===l){b=void 0;var O=m.create,I=m.inst;b=O(),I.destroy=b}m=m.next}while(m!==N)}}catch(J){qt(d,d.return,J)}}function gl(l,d,m){try{var b=d.updateQueue,N=b!==null?b.lastEffect:null;if(N!==null){var O=N.next;b=O;do{if((b.tag&l)===l){var I=b.inst,J=I.destroy;if(J!==void 0){I.destroy=void 0,N=d;var ee=m,he=J;try{he()}catch(be){qt(N,ee,be)}}}b=b.next}while(b!==O)}}catch(be){qt(d,d.return,be)}}function C5(l){var d=l.updateQueue;if(d!==null){var m=l.stateNode;try{g3(d,m)}catch(b){qt(l,l.return,b)}}}function O5(l,d,m){m.props=Hc(l.type,l.memoizedProps),m.state=l.memoizedState;try{m.componentWillUnmount()}catch(b){qt(l,d,b)}}function fp(l,d){try{var m=l.ref;if(m!==null){switch(l.tag){case 26:case 27:case 5:var b=l.stateNode;break;case 30:b=l.stateNode;break;default:b=l.stateNode}typeof m=="function"?l.refCleanup=m(b):m.current=b}}catch(N){qt(l,d,N)}}function fs(l,d){var m=l.ref,b=l.refCleanup;if(m!==null)if(typeof b=="function")try{b()}catch(N){qt(l,d,N)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof m=="function")try{m(null)}catch(N){qt(l,d,N)}else m.current=null}function j5(l){var d=l.type,m=l.memoizedProps,b=l.stateNode;try{e:switch(d){case"button":case"input":case"select":case"textarea":m.autoFocus&&b.focus();break e;case"img":m.src?b.src=m.src:m.srcSet&&(b.srcset=m.srcSet)}}catch(N){qt(l,l.return,N)}}function YS(l,d,m){try{var b=l.stateNode;wY(b,l.type,m,d),b[er]=d}catch(N){qt(l,l.return,N)}}function A5(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&El(l.type)||l.tag===4}function KS(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||A5(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&El(l.type)||l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function XS(l,d,m){var b=l.tag;if(b===5||b===6)l=l.stateNode,d?(m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m).insertBefore(l,d):(d=m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m,d.appendChild(l),m=m._reactRootContainer,m!=null||d.onclick!==null||(d.onclick=Fs));else if(b!==4&&(b===27&&El(l.type)&&(m=l.stateNode,d=null),l=l.child,l!==null))for(XS(l,d,m),l=l.sibling;l!==null;)XS(l,d,m),l=l.sibling}function u0(l,d,m){var b=l.tag;if(b===5||b===6)l=l.stateNode,d?m.insertBefore(l,d):m.appendChild(l);else if(b!==4&&(b===27&&El(l.type)&&(m=l.stateNode),l=l.child,l!==null))for(u0(l,d,m),l=l.sibling;l!==null;)u0(l,d,m),l=l.sibling}function T5(l){var d=l.stateNode,m=l.memoizedProps;try{for(var b=l.type,N=d.attributes;N.length;)d.removeAttributeNode(N[0]);ur(d,b,m),d[Tn]=l,d[er]=m}catch(O){qt(l,l.return,O)}}var Ys=!1,zn=!1,QS=!1,$5=typeof WeakSet=="function"?WeakSet:Set,nr=null;function eY(l,d){if(l=l.containerInfo,vE=$0,l=U$(l),q1(l)){if("selectionStart"in l)var m={start:l.selectionStart,end:l.selectionEnd};else e:{m=(m=l.ownerDocument)&&m.defaultView||window;var b=m.getSelection&&m.getSelection();if(b&&b.rangeCount!==0){m=b.anchorNode;var N=b.anchorOffset,O=b.focusNode;b=b.focusOffset;try{m.nodeType,O.nodeType}catch{m=null;break e}var I=0,J=-1,ee=-1,he=0,be=0,Se=l,ge=null;t:for(;;){for(var ye;Se!==m||N!==0&&Se.nodeType!==3||(J=I+N),Se!==O||b!==0&&Se.nodeType!==3||(ee=I+b),Se.nodeType===3&&(I+=Se.nodeValue.length),(ye=Se.firstChild)!==null;)ge=Se,Se=ye;for(;;){if(Se===l)break t;if(ge===m&&++he===N&&(J=I),ge===O&&++be===b&&(ee=I),(ye=Se.nextSibling)!==null)break;Se=ge,ge=Se.parentNode}Se=ye}m=J===-1||ee===-1?null:{start:J,end:ee}}else m=null}m=m||{start:0,end:0}}else m=null;for(xE={focusedElem:l,selectionRange:m},$0=!1,nr=d;nr!==null;)if(d=nr,l=d.child,(d.subtreeFlags&1028)!==0&&l!==null)l.return=d,nr=l;else for(;nr!==null;){switch(d=nr,O=d.alternate,l=d.flags,d.tag){case 0:if((l&4)!==0&&(l=d.updateQueue,l=l!==null?l.events:null,l!==null))for(m=0;m title"))),ur(O,b,m),O[Tn]=l,Dn(O),b=O;break e;case"link":var I=I4("link","href",N).get(b+(m.href||""));if(I){for(var J=0;JJt&&(I=Jt,Jt=it,it=I);var ae=B$(J,it),oe=B$(J,Jt);if(ae&&oe&&(ye.rangeCount!==1||ye.anchorNode!==ae.node||ye.anchorOffset!==ae.offset||ye.focusNode!==oe.node||ye.focusOffset!==oe.offset)){var fe=Se.createRange();fe.setStart(ae.node,ae.offset),ye.removeAllRanges(),it>Jt?(ye.addRange(fe),ye.extend(oe.node,oe.offset)):(fe.setEnd(oe.node,oe.offset),ye.addRange(fe))}}}}for(Se=[],ye=J;ye=ye.parentNode;)ye.nodeType===1&&Se.push({element:ye,left:ye.scrollLeft,top:ye.scrollTop});for(typeof J.focus=="function"&&J.focus(),J=0;Jm?32:m,$.T=null,m=iE,iE=null;var O=xl,I=ea;if(Gn=0,Td=xl=null,ea=0,(Mt&6)!==0)throw Error(r(331));var J=Mt;if(Mt|=4,V5(O.current),F5(O,O.current,I,m),Mt=J,bp(0,!1),dn&&typeof dn.onPostCommitFiberRoot=="function")try{dn.onPostCommitFiberRoot(pr,O)}catch{}return!0}finally{L.p=N,$.T=b,s4(l,d)}}function l4(l,d,m){d=Jo(m,d),d=LS(l.stateNode,d,2),l=hl(l,d,2),l!==null&&(Cr(l,2),hs(l))}function qt(l,d,m){if(l.tag===3)l4(l,l,m);else for(;d!==null;){if(d.tag===3){l4(d,l,m);break}else if(d.tag===1){var b=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof b.componentDidCatch=="function"&&(vl===null||!vl.has(b))){l=Jo(m,l),m=c5(2),b=hl(d,m,2),b!==null&&(u5(m,b,d,l),Cr(b,2),hs(b));break}}d=d.return}}function cE(l,d,m){var b=l.pingCache;if(b===null){b=l.pingCache=new rY;var N=new Set;b.set(d,N)}else N=b.get(d),N===void 0&&(N=new Set,b.set(d,N));N.has(m)||(tE=!0,N.add(m),l=lY.bind(null,l,d,m),d.then(l,l))}function lY(l,d,m){var b=l.pingCache;b!==null&&b.delete(d),l.pingedLanes|=l.suspendedLanes&m,l.warmLanes&=~m,Xt===l&&(wt&m)===m&&(Sn===4||Sn===3&&(wt&62914560)===wt&&300>te()-h0?(Mt&2)===0&&$d(l,0):nE|=m,Ad===wt&&(Ad=0)),hs(l)}function c4(l,d){d===0&&(d=Xu()),l=Mc(l,d),l!==null&&(Cr(l,d),hs(l))}function cY(l){var d=l.memoizedState,m=0;d!==null&&(m=d.retryLane),c4(l,m)}function uY(l,d){var m=0;switch(l.tag){case 31:case 13:var b=l.stateNode,N=l.memoizedState;N!==null&&(m=N.retryLane);break;case 19:b=l.stateNode;break;case 22:b=l.stateNode._retryCache;break;default:throw Error(r(314))}b!==null&&b.delete(d),c4(l,m)}function dY(l,d){return G(l,d)}var x0=null,kd=null,uE=!1,w0=!1,dE=!1,Sl=0;function hs(l){l!==kd&&l.next===null&&(kd===null?x0=kd=l:kd=kd.next=l),w0=!0,uE||(uE=!0,hY())}function bp(l,d){if(!dE&&w0){dE=!0;do for(var m=!1,b=x0;b!==null;){if(l!==0){var N=b.pendingLanes;if(N===0)var O=0;else{var I=b.suspendedLanes,J=b.pingedLanes;O=(1<<31-nn(42|l)+1)-1,O&=N&~(I&~J),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(m=!0,h4(b,O))}else O=wt,O=Ka(b,b===Xt?O:0,b.cancelPendingCommit!==null||b.timeoutHandle!==-1),(O&3)===0||Xa(b,O)||(m=!0,h4(b,O));b=b.next}while(m);dE=!1}}function fY(){u4()}function u4(){w0=uE=!1;var l=0;Sl!==0&&EY()&&(l=Sl);for(var d=te(),m=null,b=x0;b!==null;){var N=b.next,O=d4(b,d);O===0?(b.next=null,m===null?x0=N:m.next=N,N===null&&(kd=m)):(m=b,(l!==0||(O&3)!==0)&&(w0=!0)),b=N}Gn!==0&&Gn!==5||bp(l),Sl!==0&&(Sl=0)}function d4(l,d){for(var m=l.suspendedLanes,b=l.pingedLanes,N=l.expirationTimes,O=l.pendingLanes&-62914561;0J)break;var be=ee.transferSize,Se=ee.initiatorType;be&&w4(Se)&&(ee=ee.responseEnd,I+=be*(ee"u"?null:document;function k4(l,d,m){var b=Md;if(b&&typeof d=="string"&&d){var N=mr(d);N='link[rel="'+l+'"][href="'+N+'"]',typeof m=="string"&&(N+='[crossorigin="'+m+'"]'),R4.has(N)||(R4.add(N),l={rel:l,crossOrigin:m,href:d},b.querySelector(N)===null&&(d=b.createElement("link"),ur(d,"link",l),Dn(d),b.head.appendChild(d)))}}function RY(l){ta.D(l),k4("dns-prefetch",l,null)}function kY(l,d){ta.C(l,d),k4("preconnect",l,d)}function MY(l,d,m){ta.L(l,d,m);var b=Md;if(b&&l&&d){var N='link[rel="preload"][as="'+mr(d)+'"]';d==="image"&&m&&m.imageSrcSet?(N+='[imagesrcset="'+mr(m.imageSrcSet)+'"]',typeof m.imageSizes=="string"&&(N+='[imagesizes="'+mr(m.imageSizes)+'"]')):N+='[href="'+mr(l)+'"]';var O=N;switch(d){case"style":O=Pd(l);break;case"script":O=Dd(l)}ei.has(O)||(l=p({rel:"preload",href:d==="image"&&m&&m.imageSrcSet?void 0:l,as:d},m),ei.set(O,l),b.querySelector(N)!==null||d==="style"&&b.querySelector(Sp(O))||d==="script"&&b.querySelector(Ep(O))||(d=b.createElement("link"),ur(d,"link",l),Dn(d),b.head.appendChild(d)))}}function PY(l,d){ta.m(l,d);var m=Md;if(m&&l){var b=d&&typeof d.as=="string"?d.as:"script",N='link[rel="modulepreload"][as="'+mr(b)+'"][href="'+mr(l)+'"]',O=N;switch(b){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=Dd(l)}if(!ei.has(O)&&(l=p({rel:"modulepreload",href:l},d),ei.set(O,l),m.querySelector(N)===null)){switch(b){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(m.querySelector(Ep(O)))return}b=m.createElement("link"),ur(b,"link",l),Dn(b),m.head.appendChild(b)}}}function DY(l,d,m){ta.S(l,d,m);var b=Md;if(b&&l){var N=ol(b).hoistableStyles,O=Pd(l);d=d||"default";var I=N.get(O);if(!I){var J={loading:0,preload:null};if(I=b.querySelector(Sp(O)))J.loading=5;else{l=p({rel:"stylesheet",href:l,"data-precedence":d},m),(m=ei.get(O))&&OE(l,m);var ee=I=b.createElement("link");Dn(ee),ur(ee,"link",l),ee._p=new Promise(function(he,be){ee.onload=he,ee.onerror=be}),ee.addEventListener("load",function(){J.loading|=1}),ee.addEventListener("error",function(){J.loading|=2}),J.loading|=4,C0(I,d,b)}I={type:"stylesheet",instance:I,count:1,state:J},N.set(O,I)}}}function IY(l,d){ta.X(l,d);var m=Md;if(m&&l){var b=ol(m).hoistableScripts,N=Dd(l),O=b.get(N);O||(O=m.querySelector(Ep(N)),O||(l=p({src:l,async:!0},d),(d=ei.get(N))&&jE(l,d),O=m.createElement("script"),Dn(O),ur(O,"link",l),m.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},b.set(N,O))}}function LY(l,d){ta.M(l,d);var m=Md;if(m&&l){var b=ol(m).hoistableScripts,N=Dd(l),O=b.get(N);O||(O=m.querySelector(Ep(N)),O||(l=p({src:l,async:!0,type:"module"},d),(d=ei.get(N))&&jE(l,d),O=m.createElement("script"),Dn(O),ur(O,"link",l),m.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},b.set(N,O))}}function M4(l,d,m,b){var N=(N=pe.current)?_0(N):null;if(!N)throw Error(r(446));switch(l){case"meta":case"title":return null;case"style":return typeof m.precedence=="string"&&typeof m.href=="string"?(d=Pd(m.href),m=ol(N).hoistableStyles,b=m.get(d),b||(b={type:"style",instance:null,count:0,state:null},m.set(d,b)),b):{type:"void",instance:null,count:0,state:null};case"link":if(m.rel==="stylesheet"&&typeof m.href=="string"&&typeof m.precedence=="string"){l=Pd(m.href);var O=ol(N).hoistableStyles,I=O.get(l);if(I||(N=N.ownerDocument||N,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(l,I),(O=N.querySelector(Sp(l)))&&!O._p&&(I.instance=O,I.state.loading=5),ei.has(l)||(m={rel:"preload",as:"style",href:m.href,crossOrigin:m.crossOrigin,integrity:m.integrity,media:m.media,hrefLang:m.hrefLang,referrerPolicy:m.referrerPolicy},ei.set(l,m),O||FY(N,l,m,I.state))),d&&b===null)throw Error(r(528,""));return I}if(d&&b!==null)throw Error(r(529,""));return null;case"script":return d=m.async,m=m.src,typeof m=="string"&&d&&typeof d!="function"&&typeof d!="symbol"?(d=Dd(m),m=ol(N).hoistableScripts,b=m.get(d),b||(b={type:"script",instance:null,count:0,state:null},m.set(d,b)),b):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,l))}}function Pd(l){return'href="'+mr(l)+'"'}function Sp(l){return'link[rel="stylesheet"]['+l+"]"}function P4(l){return p({},l,{"data-precedence":l.precedence,precedence:null})}function FY(l,d,m,b){l.querySelector('link[rel="preload"][as="style"]['+d+"]")?b.loading=1:(d=l.createElement("link"),b.preload=d,d.addEventListener("load",function(){return b.loading|=1}),d.addEventListener("error",function(){return b.loading|=2}),ur(d,"link",m),Dn(d),l.head.appendChild(d))}function Dd(l){return'[src="'+mr(l)+'"]'}function Ep(l){return"script[async]"+l}function D4(l,d,m){if(d.count++,d.instance===null)switch(d.type){case"style":var b=l.querySelector('style[data-href~="'+mr(m.href)+'"]');if(b)return d.instance=b,Dn(b),b;var N=p({},m,{"data-href":m.href,"data-precedence":m.precedence,href:null,precedence:null});return b=(l.ownerDocument||l).createElement("style"),Dn(b),ur(b,"style",N),C0(b,m.precedence,l),d.instance=b;case"stylesheet":N=Pd(m.href);var O=l.querySelector(Sp(N));if(O)return d.state.loading|=4,d.instance=O,Dn(O),O;b=P4(m),(N=ei.get(N))&&OE(b,N),O=(l.ownerDocument||l).createElement("link"),Dn(O);var I=O;return I._p=new Promise(function(J,ee){I.onload=J,I.onerror=ee}),ur(O,"link",b),d.state.loading|=4,C0(O,m.precedence,l),d.instance=O;case"script":return O=Dd(m.src),(N=l.querySelector(Ep(O)))?(d.instance=N,Dn(N),N):(b=m,(N=ei.get(O))&&(b=p({},m),jE(b,N)),l=l.ownerDocument||l,N=l.createElement("script"),Dn(N),ur(N,"link",b),l.head.appendChild(N),d.instance=N);case"void":return null;default:throw Error(r(443,d.type))}else d.type==="stylesheet"&&(d.state.loading&4)===0&&(b=d.instance,d.state.loading|=4,C0(b,m.precedence,l));return d.instance}function C0(l,d,m){for(var b=m.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),N=b.length?b[b.length-1]:null,O=N,I=0;I title"):null)}function zY(l,d,m){if(m===1||d.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof d.precedence!="string"||typeof d.href!="string"||d.href==="")break;return!0;case"link":if(typeof d.rel!="string"||typeof d.href!="string"||d.href===""||d.onLoad||d.onError)break;switch(d.rel){case"stylesheet":return l=d.disabled,typeof d.precedence=="string"&&l==null;default:return!0}case"script":if(d.async&&typeof d.async!="function"&&typeof d.async!="symbol"&&!d.onLoad&&!d.onError&&d.src&&typeof d.src=="string")return!0}return!1}function F4(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function BY(l,d,m,b){if(m.type==="stylesheet"&&(typeof b.media!="string"||matchMedia(b.media).matches!==!1)&&(m.state.loading&4)===0){if(m.instance===null){var N=Pd(b.href),O=d.querySelector(Sp(N));if(O){d=O._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(l.count++,l=j0.bind(l),d.then(l,l)),m.state.loading|=4,m.instance=O,Dn(O);return}O=d.ownerDocument||d,b=P4(b),(N=ei.get(N))&&OE(b,N),O=O.createElement("link"),Dn(O);var I=O;I._p=new Promise(function(J,ee){I.onload=J,I.onerror=ee}),ur(O,"link",b),m.instance=O}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(m,d),(d=m.state.preload)&&(m.state.loading&3)===0&&(l.count++,m=j0.bind(l),d.addEventListener("load",m),d.addEventListener("error",m))}}var AE=0;function VY(l,d){return l.stylesheets&&l.count===0&&T0(l,l.stylesheets),0AE?50:800)+d);return l.unsuspend=m,function(){l.unsuspend=null,clearTimeout(b),clearTimeout(N)}}:null}function j0(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)T0(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var A0=null;function T0(l,d){l.stylesheets=null,l.unsuspend!==null&&(l.count++,A0=new Map,d.forEach(UY,l),A0=null,j0.call(l))}function UY(l,d){if(!(d.state.loading&4)){var m=A0.get(l);if(m)var b=m.get(null);else{m=new Map,A0.set(l,m);for(var N=l.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),LE.exports=iK(),LE.exports}var aK=sK(),xs=function(){return xs=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return NK;var t=_K(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},OK=u9(),mf="data-scroll-locked",jK=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),` + .`.concat(cK,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(a,"px ").concat(r,`; + } + body[`).concat(mf,`] { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(o,`px; + padding-top: `).concat(i,`px; + padding-right: `).concat(s,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(a,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat($b,` { + right: `).concat(a,"px ").concat(r,`; + } + + .`).concat(Rb,` { + margin-right: `).concat(a,"px ").concat(r,`; + } + + .`).concat($b," .").concat($b,` { + right: 0 `).concat(r,`; + } + + .`).concat(Rb," .").concat(Rb,` { + margin-right: 0 `).concat(r,`; + } + + body[`).concat(mf,`] { + `).concat(uK,": ").concat(a,`px; + } +`)},uR=function(){var e=parseInt(document.body.getAttribute(mf)||"0",10);return isFinite(e)?e:0},AK=function(){w.useEffect(function(){return document.body.setAttribute(mf,(uR()+1).toString()),function(){var e=uR()-1;e<=0?document.body.removeAttribute(mf):document.body.setAttribute(mf,e.toString())}},[])},TK=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;AK();var i=w.useMemo(function(){return CK(o)},[o]);return w.createElement(OK,{styles:jK(i,!t,o,n?"":"!important")})},KN=!1;if(typeof window<"u")try{var L0=Object.defineProperty({},"passive",{get:function(){return KN=!0,!0}});window.addEventListener("test",L0,L0),window.removeEventListener("test",L0,L0)}catch{KN=!1}var Ld=KN?{passive:!1}:!1,$K=function(e){return e.tagName==="TEXTAREA"},d9=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!$K(e)&&n[t]==="visible")},RK=function(e){return d9(e,"overflowY")},kK=function(e){return d9(e,"overflowX")},dR=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=f9(e,r);if(o){var i=h9(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},MK=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},PK=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},f9=function(e,t){return e==="v"?RK(t):kK(t)},h9=function(e,t){return e==="v"?MK(t):PK(t)},DK=function(e,t){return e==="h"&&t==="rtl"?-1:1},IK=function(e,t,n,r,o){var i=DK(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,c=t.contains(a),u=!1,f=s>0,p=0,g=0;do{var y=h9(e,a),v=y[0],x=y[1],S=y[2],E=x-S-i*v;(v||E)&&f9(e,a)&&(p+=E,g+=v),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(f&&Math.abs(p)<1||!f&&Math.abs(g)<1)&&(u=!0),u},F0=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},fR=function(e){return[e.deltaX,e.deltaY]},hR=function(e){return e&&"current"in e?e.current:e},LK=function(e,t){return e[0]===t[0]&&e[1]===t[1]},FK=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},zK=0,Fd=[];function BK(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),o=w.useState(zK++)[0],i=w.useState(u9)[0],s=w.useRef(e);w.useEffect(function(){s.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var x=lK([e.lockRef.current],(e.shards||[]).map(hR),!0).filter(Boolean);return x.forEach(function(S){return S.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),x.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=w.useCallback(function(x,S){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!s.current.allowPinchZoom;var E=F0(x),C=n.current,_="deltaX"in x?x.deltaX:C[0]-E[0],j="deltaY"in x?x.deltaY:C[1]-E[1],A,T=x.target,k=Math.abs(_)>Math.abs(j)?"h":"v";if("touches"in x&&k==="h"&&T.type==="range")return!1;var R=dR(k,T);if(!R)return!0;if(R?A=k:(A=k==="v"?"h":"v",R=dR(k,T)),!R)return!1;if(!r.current&&"changedTouches"in x&&(_||j)&&(r.current=A),!A)return!0;var V=r.current||A;return IK(V,S,x,V==="h"?_:j)},[]),c=w.useCallback(function(x){var S=x;if(!(!Fd.length||Fd[Fd.length-1]!==i)){var E="deltaY"in S?fR(S):F0(S),C=t.current.filter(function(A){return A.name===S.type&&(A.target===S.target||S.target===A.shadowParent)&&LK(A.delta,E)})[0];if(C&&C.should){S.cancelable&&S.preventDefault();return}if(!C){var _=(s.current.shards||[]).map(hR).filter(Boolean).filter(function(A){return A.contains(S.target)}),j=_.length>0?a(S,_[0]):!s.current.noIsolation;j&&S.cancelable&&S.preventDefault()}}},[]),u=w.useCallback(function(x,S,E,C){var _={name:x,delta:S,target:E,should:C,shadowParent:VK(E)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(j){return j!==_})},1)},[]),f=w.useCallback(function(x){n.current=F0(x),r.current=void 0},[]),p=w.useCallback(function(x){u(x.type,fR(x),x.target,a(x,e.lockRef.current))},[]),g=w.useCallback(function(x){u(x.type,F0(x),x.target,a(x,e.lockRef.current))},[]);w.useEffect(function(){return Fd.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",c,Ld),document.addEventListener("touchmove",c,Ld),document.addEventListener("touchstart",f,Ld),function(){Fd=Fd.filter(function(x){return x!==i}),document.removeEventListener("wheel",c,Ld),document.removeEventListener("touchmove",c,Ld),document.removeEventListener("touchstart",f,Ld)}},[]);var y=e.removeScrollBar,v=e.inert;return w.createElement(w.Fragment,null,v?w.createElement(i,{styles:FK(o)}):null,y?w.createElement(TK,{gapMode:e.gapMode}):null)}function VK(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const UK=yK(c9,BK);var rv=w.forwardRef(function(e,t){return w.createElement(Nx,xs({},e,{ref:t,sideCar:UK}))});rv.classNames=Nx.classNames;function Es(e){return Object.keys(e)}function qE(e){return e&&typeof e=="object"&&!Array.isArray(e)}function hO(e,t){const n={...e},r=t;return qE(e)&&qE(t)&&Object.keys(t).forEach(o=>{qE(r[o])&&o in e?n[o]=hO(n[o],r[o]):n[o]=r[o]}),n}function HK(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function qK(e){return typeof e!="string"||!e.includes("var(--mantine-scale)")?e:e.match(/^calc\((.*?)\)$/)?.[1].split("*")[0].trim()}function WK(e){const t=qK(e);return typeof t=="number"?t:typeof t=="string"?t.includes("calc")||t.includes("var")?t:t.includes("px")?Number(t.replace("px","")):t.includes("rem")?Number(t.replace("rem",""))*16:t.includes("em")?Number(t.replace("em",""))*16:Number(t):NaN}function WE(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function p9(e,{shouldScale:t=!1}={}){function n(r){if(r===0||r==="0")return`0${e}`;if(typeof r=="number"){const o=`${r/16}${e}`;return t?WE(o):o}if(typeof r=="string"){if(r===""||r.startsWith("calc(")||r.startsWith("clamp(")||r.includes("rgba("))return r;if(r.includes(","))return r.split(",").map(i=>n(i)).join(",");if(r.includes(" "))return r.split(" ").map(i=>n(i)).join(" ");if(r.includes(e))return t?WE(r):r;const o=r.replace("px","");if(!Number.isNaN(Number(o))){const i=`${Number(o)/16}${e}`;return t?WE(i):i}}return r}return n}const Oe=p9("rem",{shouldScale:!0}),pR=p9("em");function pO(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}function m9(e){if(typeof e=="number")return!0;if(typeof e=="string"){if(e.startsWith("calc(")||e.startsWith("var(")||e.includes(" ")&&e.trim()!=="")return!0;const t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(r=>t.test(r))}return!1}function fc(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==w.Fragment:!1}function Pa(e){const t=w.createContext(null);return[({children:o,value:i})=>h.jsx(t.Provider,{value:i,children:o}),()=>{const o=w.useContext(t);if(o===null)throw new Error(e);return o}]}function Lu(e=null){const t=w.createContext(e);return[({children:o,value:i})=>h.jsx(t.Provider,{value:i,children:o}),()=>w.useContext(t)]}function mR(e,t){return n=>{if(typeof n!="string"||n.trim().length===0)throw new Error(t);return`${e}-${n}`}}function ov(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function GK(e,t,n){for(let r=e-1;r>=0;r-=1)if(!t[r].disabled)return r;if(n){for(let r=t.length-1;r>-1;r-=1)if(!t[r].disabled)return r}return e}function JK(e,t,n){for(let r=e+1;r{n?.(a);const c=Array.from(ov(a.currentTarget,e)?.querySelectorAll(t)||[]).filter(v=>YK(a.currentTarget,v,e)),u=c.findIndex(v=>a.currentTarget===v),f=JK(u,c,r),p=GK(u,c,r),g=i==="rtl"?p:f,y=i==="rtl"?f:p;switch(a.key){case"ArrowRight":{s==="horizontal"&&(a.stopPropagation(),a.preventDefault(),c[g].focus(),o&&c[g].click());break}case"ArrowLeft":{s==="horizontal"&&(a.stopPropagation(),a.preventDefault(),c[y].focus(),o&&c[y].click());break}case"ArrowUp":{s==="vertical"&&(a.stopPropagation(),a.preventDefault(),c[p].focus(),o&&c[p].click());break}case"ArrowDown":{s==="vertical"&&(a.stopPropagation(),a.preventDefault(),c[f].focus(),o&&c[f].click());break}case"Home":{a.stopPropagation(),a.preventDefault(),!c[0].disabled&&c[0].focus();break}case"End":{a.stopPropagation(),a.preventDefault();const v=c.length-1;!c[v].disabled&&c[v].focus();break}}}}const KK={app:100,modal:200,popover:300,overlay:400,max:9999};function ts(e){return KK[e]}const XN=()=>{};function XK(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||XN:n=>{n.key==="Escape"&&(e(n),t.onTrigger?.())}}function jt(e,t="size",n=!0){if(e!==void 0)return m9(e)?n?Oe(e):e:`var(--${t}-${e})`}function mO(e){return jt(e,"mantine-spacing")}function Qn(e){return e===void 0?"var(--mantine-radius-default)":jt(e,"mantine-radius")}function zr(e){return jt(e,"mantine-font-size")}function gO(e){if(e)return jt(e,"mantine-shadow",!1)}function Ss(e,t){return n=>{e?.(n),t?.(n)}}function QK(e,t,n){return n?Array.from(ov(n,t)?.querySelectorAll(e)||[]).findIndex(r=>r===n):null}function ZK(){const[e,t]=w.useState(-1);return[e,{setHovered:t,resetHovered:()=>t(-1)}]}function ya(e,t,n){return t===void 0&&n===void 0?e:t!==void 0&&n===void 0?Math.max(e,t):Math.min(t===void 0&&n!==void 0?e:Math.max(e,t),n)}function Yl(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}function eX(e,t){if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;const n=Object.keys(e),{length:r}=n;if(r!==Object.keys(t).length)return!1;for(let o=0;o{t.current=e}),w.useMemo(()=>(...n)=>t.current?.(...n),[])}function Og(e,t){const n=typeof t=="number"?t:t.delay,r=typeof t=="number"?!1:t.flushOnUnmount,o=ru(e),i=w.useRef(0),s=w.useRef(()=>{}),a=Object.assign(w.useCallback((...c)=>{window.clearTimeout(i.current);const u=()=>{i.current!==0&&(i.current=0,o(...c))};s.current=u,a.flush=u,i.current=window.setTimeout(u,n)},[o,n]),{flush:s.current});return w.useEffect(()=>()=>{window.clearTimeout(i.current),r&&a.flush()},[a,r]),a}const gR=["mousedown","touchstart"];function jg(e,t,n){const r=w.useRef(null);return w.useEffect(()=>{const o=i=>{const{target:s}=i??{};if(Array.isArray(n)){const a=s?.hasAttribute("data-ignore-outside-clicks")||!document.body.contains(s)&&s.tagName!=="HTML";n.every(u=>!!u&&!i.composedPath().includes(u))&&!a&&e()}else r.current&&!r.current.contains(s)&&e()};return(t||gR).forEach(i=>document.addEventListener(i,o)),()=>{(t||gR).forEach(i=>document.removeEventListener(i,o))}},[r,e,n]),r}function tX({timeout:e=2e3}={}){const[t,n]=w.useState(null),[r,o]=w.useState(!1),[i,s]=w.useState(null),a=f=>{window.clearTimeout(i),s(window.setTimeout(()=>o(!1),e)),o(f)};return{copy:f=>{"clipboard"in navigator?navigator.clipboard.writeText(f).then(()=>a(!0)).catch(p=>n(p)):n(new Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{o(!1),n(null),window.clearTimeout(i)},error:t,copied:r}}function nX(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function rX(e,t){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function oX(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){const[r,o]=w.useState(n?t:rX(e)),i=w.useRef(null);return w.useEffect(()=>{if("matchMedia"in window)return i.current=window.matchMedia(e),o(i.current.matches),nX(i.current,s=>o(s.matches))},[e]),r}const rh=typeof document<"u"?w.useLayoutEffect:w.useEffect;function _a(e,t){const n=w.useRef(!1);w.useEffect(()=>()=>{n.current=!1},[]),w.useEffect(()=>{if(n.current)return e();n.current=!0},t)}function y9({opened:e,shouldReturnFocus:t=!0}){const n=w.useRef(null),r=()=>{n.current&&"focus"in n.current&&typeof n.current.focus=="function"&&n.current?.focus({preventScroll:!0})};return _a(()=>{let o=-1;const i=s=>{s.key==="Tab"&&window.clearTimeout(o)};return document.addEventListener("keydown",i),e?n.current=document.activeElement:t&&(o=window.setTimeout(r,10)),()=>{window.clearTimeout(o),document.removeEventListener("keydown",i)}},[e,t]),r}const iX=/input|select|textarea|button|object/,b9="a, input, select, textarea, button, object, [tabindex]";function sX(e){return e.style.display==="none"}function aX(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let n=e;for(;n&&!(n===document.body||n.nodeType===11);){if(sX(n))return!1;n=n.parentNode}return!0}function v9(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function QN(e){const t=e.nodeName.toLowerCase(),n=!Number.isNaN(v9(e));return(iX.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||n)&&aX(e)}function x9(e){const t=v9(e);return(Number.isNaN(t)||t>=0)&&QN(e)}function lX(e){return Array.from(e.querySelectorAll(b9)).filter(x9)}function cX(e,t){const n=lX(e);if(!n.length){t.preventDefault();return}const r=n[t.shiftKey?0:n.length-1],o=e.getRootNode();let i=r===o.activeElement||e===o.activeElement;const s=o.activeElement;if(s.tagName==="INPUT"&&s.getAttribute("type")==="radio"&&(i=n.filter(f=>f.getAttribute("type")==="radio"&&f.getAttribute("name")===s.getAttribute("name")).includes(r)),!i)return;t.preventDefault();const c=n[t.shiftKey?n.length-1:0];c&&c.focus()}function _x(e=!0){const t=w.useRef(null),n=o=>{let i=o.querySelector("[data-autofocus]");if(!i){const s=Array.from(o.querySelectorAll(b9));i=s.find(x9)||s.find(QN)||null,!i&&QN(o)&&(i=o)}i&&i.focus({preventScroll:!0})},r=w.useCallback(o=>{e&&o!==null&&t.current!==o&&(o?(setTimeout(()=>{o.getRootNode()&&n(o)}),t.current=o):t.current=null)},[e]);return w.useEffect(()=>{if(!e)return;t.current&&setTimeout(()=>n(t.current));const o=i=>{i.key==="Tab"&&t.current&&cX(t.current,i)};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[e]),r}const uX=e=>(e+1)%1e6;function dX(){const[,e]=w.useReducer(uX,0);return e}const fX=Ne.useId||(()=>{});function hX(){const e=fX();return e?`mantine-${e.replace(/:/g,"")}`:""}function gi(e){const t=hX(),[n,r]=w.useState(t);return rh(()=>{r(Yl())},[]),typeof e=="string"?e:typeof window>"u"?t:n}function ZN(e,t,n){w.useEffect(()=>(window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)),[e,t])}function iv(e,t){if(typeof e=="function")return e(t);typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function pX(...e){const t=new Map;return n=>{if(e.forEach(r=>{const o=iv(r,n);o&&t.set(r,o)}),t.size>0)return()=>{e.forEach(r=>{const o=t.get(r);o?o():iv(r,null)}),t.clear()}}}function jn(...e){return w.useCallback(pX(...e),e)}function mX(e,t,n="ltr"){const r=w.useRef(null),o=w.useRef(!1),i=w.useRef(!1),s=w.useRef(0),[a,c]=w.useState(!1);return w.useEffect(()=>{o.current=!0},[]),w.useEffect(()=>{const u=r.current,f=({x:_,y:j})=>{cancelAnimationFrame(s.current),s.current=requestAnimationFrame(()=>{if(o.current&&u){u.style.userSelect="none";const A=u.getBoundingClientRect();if(A.width&&A.height){const T=ya((_-A.left)/A.width,0,1);e({x:n==="ltr"?T:1-T,y:ya((j-A.top)/A.height,0,1)})}}})},p=()=>{document.addEventListener("mousemove",S),document.addEventListener("mouseup",v),document.addEventListener("touchmove",C),document.addEventListener("touchend",v)},g=()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",v),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",v)},y=()=>{!i.current&&o.current&&(i.current=!0,typeof t?.onScrubStart=="function"&&t.onScrubStart(),c(!0),p())},v=()=>{i.current&&o.current&&(i.current=!1,c(!1),g(),setTimeout(()=>{typeof t?.onScrubEnd=="function"&&t.onScrubEnd()},0))},x=_=>{y(),_.preventDefault(),S(_)},S=_=>f({x:_.clientX,y:_.clientY}),E=_=>{_.cancelable&&_.preventDefault(),y(),C(_)},C=_=>{_.cancelable&&_.preventDefault(),f({x:_.changedTouches[0].clientX,y:_.changedTouches[0].clientY})};return u?.addEventListener("mousedown",x),u?.addEventListener("touchstart",E,{passive:!1}),()=>{u&&(u.removeEventListener("mousedown",x),u.removeEventListener("touchstart",E))}},[n,e]),{ref:r,active:a}}function ho({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){const[o,i]=w.useState(t!==void 0?t:n),s=(a,...c)=>{i(a),r?.(a,...c)};return e!==void 0?[e,r,!0]:[o,s,!1]}function yO(e,t){return oX("(prefers-reduced-motion: reduce)",e,t)}function gX(e,t){if(!e||!t)return!1;if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{const i=o instanceof Function?o(r[0]):o,s=Math.abs(r.indexOf(i));return r.slice(s).concat(r.slice(0,s))},e);return[t,n]}const yR={passive:!0};function vX(){const[e,t]=w.useState({width:0,height:0}),n=w.useCallback(()=>{t({width:window.innerWidth||0,height:window.innerHeight||0})},[]);return ZN("resize",n,yR),ZN("orientationchange",n,yR),w.useEffect(n,[]),e}const xX={" ":"space",ArrowLeft:"arrowleft",ArrowRight:"arrowright",ArrowUp:"arrowup",ArrowDown:"arrowdown",Escape:"esc",Esc:"esc",Enter:"enter",Tab:"tab",Backspace:"backspace",Delete:"delete",Insert:"insert",Home:"home",End:"end",PageUp:"pageup",PageDown:"pagedown","+":"plus","-":"minus","*":"asterisk","/":"slash"};function z0(e){const t=e.replace("Key","").toLowerCase();return xX[e]||t}function wX(e){const t=e.toLowerCase().split("+").map(i=>i.trim()),n={alt:t.includes("alt"),ctrl:t.includes("ctrl"),meta:t.includes("meta"),mod:t.includes("mod"),shift:t.includes("shift"),plus:t.includes("[plus]")},r=["alt","ctrl","meta","shift","mod"],o=t.find(i=>!r.includes(i));return{...n,key:o==="[plus]"?"+":o}}function SX(e,t,n){const{alt:r,ctrl:o,meta:i,mod:s,shift:a,key:c}=e,{altKey:u,ctrlKey:f,metaKey:p,shiftKey:g,key:y,code:v}=t;if(r!==u)return!1;if(s){if(!f&&!p)return!1}else if(o!==f||i!==p)return!1;return a!==g?!1:!!(c&&(n?z0(v)===z0(c):z0(y??v)===z0(c)))}function S9(e,t){return n=>SX(wX(e),n,t)}function EX(e){return t=>{const n="nativeEvent"in t?t.nativeEvent:t;e.forEach(([r,o,i={preventDefault:!0,usePhysicalKeys:!1}])=>{S9(r,i.usePhysicalKeys)(n)&&(i.preventDefault&&t.preventDefault(),o(n))})}}function NX(e,t,n=!1){return e.target instanceof HTMLElement?(n||!e.target.isContentEditable)&&!t.includes(e.target.tagName):!0}function bO(e,t=["INPUT","TEXTAREA","SELECT"],n=!1){w.useEffect(()=>{const r=o=>{e.forEach(([i,s,a={preventDefault:!0,usePhysicalKeys:!1}])=>{S9(i,a.usePhysicalKeys)(o)&&NX(o,t,n)&&(a.preventDefault&&o.preventDefault(),s(o))})};return document.documentElement.addEventListener("keydown",r),()=>document.documentElement.removeEventListener("keydown",r)},[e])}function oh(e=!1,t){const{onOpen:n,onClose:r}={},[o,i]=w.useState(e),s=w.useCallback(()=>{i(u=>u||(n?.(),!0))},[n]),a=w.useCallback(()=>{i(u=>u&&(r?.(),!1))},[r]),c=w.useCallback(()=>{o?a():s()},[a,s,o]);return[o,{open:s,close:a,toggle:c}]}function _X(e,t,n={autoInvoke:!1}){const r=w.useRef(null),o=w.useCallback((...s)=>{r.current||(r.current=window.setTimeout(()=>{e(s),r.current=null},t))},[t]),i=w.useCallback(()=>{r.current&&(window.clearTimeout(r.current),r.current=null)},[]);return w.useEffect(()=>(n.autoInvoke&&o(),i),[i,o]),{start:o,clear:i}}function CX(e){const t=w.useRef(void 0);return w.useEffect(()=>{t.current=e},[e]),t.current}function OX(){const e=w.useRef(null),[t,n]=w.useState(!1);return{ref:w.useCallback(o=>{typeof IntersectionObserver<"u"&&(o&&!e.current?e.current=new IntersectionObserver(i=>n(i.some(s=>s.isIntersecting))):e.current?.disconnect(),o?e.current?.observe(o):n(!1))},[]),inViewport:t}}function jX(e,t,n){const r=w.useRef(null),o=w.useRef(null);return w.useEffect(()=>{const i=typeof n=="function"?n():n;return(i||o.current)&&(r.current=new MutationObserver(e),r.current.observe(i||o.current,t)),()=>{r.current?.disconnect()}},[e,t]),o}function AX(){const[e,t]=w.useState(!1);return w.useEffect(()=>t(!0),[]),e}function TX(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}function $X(e){function t(r){const o=Object.keys(r).reduce((i,s)=>(i[`${e}:${s}`]=a=>r[s](a.detail),i),{});rh(()=>(Object.keys(o).forEach(i=>{window.removeEventListener(i,o[i]),window.addEventListener(i,o[i])}),()=>Object.keys(o).forEach(i=>{window.removeEventListener(i,o[i])})),[o])}function n(r){return(...o)=>TX(`${e}:${String(r)}`,o[0])}return[t,n]}var RX={};function E9(){return typeof process<"u"&&RX?"production":"development"}function bR(e,t){return t.length===0?e:t.reduce((n,r)=>Math.abs(r-e){Object.entries(n).forEach(([r,o])=>{t[r]?t[r]=pn(t[r],o):t[r]=o})}),t}function Ox({theme:e,classNames:t,props:n,stylesCtx:r}){const i=(Array.isArray(t)?t:[t]).map(s=>typeof s=="function"?s(e,n,r):s||kX);return MX(i)}function sv({theme:e,styles:t,props:n,stylesCtx:r}){return(Array.isArray(t)?t:[t]).reduce((i,s)=>typeof s=="function"?{...i,...s(e,n,r)}:{...i,...s},{})}const _9=w.createContext(null);function hc(){const e=w.useContext(_9);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function PX(){return hc().cssVariablesResolver}function DX(){return hc().classNamesPrefix}function vO(){return hc().getStyleNonce}function IX(){return hc().withStaticClasses}function LX(){return hc().headless}function FX(){return hc().stylesTransform?.sx}function zX(){return hc().stylesTransform?.styles}function C9(){return hc().env||"default"}function BX(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function VX(e){let t=e.replace("#","");if(t.length===3){const s=t.split("");t=[s[0],s[0],s[1],s[1],s[2],s[2]].join("")}if(t.length===8){const s=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:s}}const n=parseInt(t,16),r=n>>16&255,o=n>>8&255,i=n&255;return{r,g:o,b:i,a:1}}function UX(e){const[t,n,r,o]=e.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:t,g:n,b:r,a:o===void 0?1:o}}function HX(e){const t=/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i,n=e.match(t);if(!n)return{r:0,g:0,b:0,a:1};const r=parseInt(n[1],10),o=parseInt(n[2],10)/100,i=parseInt(n[3],10)/100,s=n[5]?parseFloat(n[5]):void 0,a=(1-Math.abs(2*i-1))*o,c=r/60,u=a*(1-Math.abs(c%2-1)),f=i-a/2;let p,g,y;return c>=0&&c<1?(p=a,g=u,y=0):c>=1&&c<2?(p=u,g=a,y=0):c>=2&&c<3?(p=0,g=a,y=u):c>=3&&c<4?(p=0,g=u,y=a):c>=4&&c<5?(p=u,g=0,y=a):(p=a,g=0,y=u),{r:Math.round((p+f)*255),g:Math.round((g+f)*255),b:Math.round((y+f)*255),a:s||1}}function xO(e){return BX(e)?VX(e):e.startsWith("rgb")?UX(e):e.startsWith("hsl")?HX(e):{r:0,g:0,b:0,a:1}}function B0(e,t){if(e.startsWith("var("))return`color-mix(in srgb, ${e}, black ${t*100}%)`;const{r:n,g:r,b:o,a:i}=xO(e),s=1-t,a=c=>Math.round(c*s);return`rgba(${a(n)}, ${a(r)}, ${a(o)}, ${i})`}function Om(e,t){return typeof e.primaryShade=="number"?e.primaryShade:t==="dark"?e.primaryShade.dark:e.primaryShade.light}function GE(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function qX(e){const t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function WX(e){if(e.startsWith("oklch("))return(qX(e)||0)/100;const{r:t,g:n,b:r}=xO(e),o=t/255,i=n/255,s=r/255,a=GE(o),c=GE(i),u=GE(s);return .2126*a+.7152*c+.0722*u}function Tp(e,t=.179){return e.startsWith("var(")?!1:WX(e)>t}function pc({color:e,theme:t,colorScheme:n}){if(typeof e!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e==="bright")return{color:e,value:n==="dark"?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:Tp(n==="dark"?t.white:t.black,t.luminanceThreshold),variable:"--mantine-color-bright"};if(e==="dimmed")return{color:e,value:n==="dark"?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:Tp(n==="dark"?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:"--mantine-color-dimmed"};if(e==="white"||e==="black")return{color:e,value:e==="white"?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:Tp(e==="white"?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};const[r,o]=e.split("."),i=o?Number(o):void 0,s=r in t.colors;if(s){const a=i!==void 0?t.colors[r][i]:t.colors[r][Om(t,n||"light")];return{color:r,value:a,shade:i,isThemeColor:s,isLight:Tp(a,t.luminanceThreshold),variable:o?`--mantine-color-${r}-${i}`:`--mantine-color-${r}-filled`}}return{color:e,value:e,isThemeColor:s,isLight:Tp(e,t.luminanceThreshold),shade:i,variable:void 0}}function Sr(e,t){const n=pc({color:e||t.primaryColor,theme:t});return n.variable?`var(${n.variable})`:e}function vR(e,t){const n={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},r=Sr(n.from,t),o=Sr(n.to,t);return`linear-gradient(${n.deg}deg, ${r} 0%, ${o} 100%)`}function gs(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(")){const i=(1-t)*100;return`color-mix(in srgb, ${e}, transparent ${i}%)`}if(e.startsWith("oklch"))return e.includes("/")?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(")",` / ${t})`);const{r:n,g:r,b:o}=xO(e);return`rgba(${n}, ${r}, ${o}, ${t})`}const zd=gs,GX=({color:e,theme:t,variant:n,gradient:r,autoContrast:o})=>{const i=pc({color:e,theme:t}),s=typeof o=="boolean"?o:t.autoContrast;if(n==="filled"){const a=s&&i.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return i.isThemeColor?i.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:a,border:`${Oe(1)} solid transparent`}:{background:`var(--mantine-color-${i.color}-${i.shade})`,hover:`var(--mantine-color-${i.color}-${i.shade===9?8:i.shade+1})`,color:a,border:`${Oe(1)} solid transparent`}:{background:e,hover:B0(e,.1),color:a,border:`${Oe(1)} solid transparent`}}if(n==="light"){if(i.isThemeColor){if(i.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${Oe(1)} solid transparent`};const a=t.colors[i.color][i.shade];return{background:gs(a,.1),hover:gs(a,.12),color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${Oe(1)} solid transparent`}}return{background:gs(e,.1),hover:gs(e,.12),color:e,border:`${Oe(1)} solid transparent`}}if(n==="outline")return i.isThemeColor?i.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${Oe(1)} solid var(--mantine-color-${e}-outline)`}:{background:"transparent",hover:gs(t.colors[i.color][i.shade],.05),color:`var(--mantine-color-${i.color}-${i.shade})`,border:`${Oe(1)} solid var(--mantine-color-${i.color}-${i.shade})`}:{background:"transparent",hover:gs(e,.05),color:e,border:`${Oe(1)} solid ${e}`};if(n==="subtle"){if(i.isThemeColor){if(i.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${Oe(1)} solid transparent`};const a=t.colors[i.color][i.shade];return{background:"transparent",hover:gs(a,.12),color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${Oe(1)} solid transparent`}}return{background:"transparent",hover:gs(e,.12),color:e,border:`${Oe(1)} solid transparent`}}return n==="transparent"?i.isThemeColor?i.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${e}-light-color)`,border:`${Oe(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${Oe(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:e,border:`${Oe(1)} solid transparent`}:n==="white"?i.isThemeColor?i.shade===void 0?{background:"var(--mantine-color-white)",hover:B0(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${Oe(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:B0(t.white,.01),color:`var(--mantine-color-${i.color}-${i.shade})`,border:`${Oe(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:B0(t.white,.01),color:e,border:`${Oe(1)} solid transparent`}:n==="gradient"?{background:vR(r,t),hover:vR(r,t),color:"var(--mantine-color-white)",border:"none"}:n==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${Oe(1)} solid var(--mantine-color-default-border)`}:{}},JX={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},xR="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",wO={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:JX,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:GX,autoContrast:!1,luminanceThreshold:.3,fontFamily:xR,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"sm",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:xR,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:Oe(34),lineHeight:"1.3"},h2:{fontSize:Oe(26),lineHeight:"1.35"},h3:{fontSize:Oe(22),lineHeight:"1.4"},h4:{fontSize:Oe(18),lineHeight:"1.45"},h5:{fontSize:Oe(16),lineHeight:"1.5"},h6:{fontSize:Oe(14),lineHeight:"1.5"}}},fontSizes:{xs:Oe(12),sm:Oe(14),md:Oe(16),lg:Oe(18),xl:Oe(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},radius:{xs:Oe(2),sm:Oe(4),md:Oe(8),lg:Oe(16),xl:Oe(32)},spacing:{xs:Oe(10),sm:Oe(12),md:Oe(16),lg:Oe(20),xl:Oe(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${Oe(1)} ${Oe(3)} rgba(0, 0, 0, 0.05), 0 ${Oe(1)} ${Oe(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${Oe(1)} ${Oe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Oe(10)} ${Oe(15)} ${Oe(-5)}, rgba(0, 0, 0, 0.04) 0 ${Oe(7)} ${Oe(7)} ${Oe(-5)}`,md:`0 ${Oe(1)} ${Oe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Oe(20)} ${Oe(25)} ${Oe(-5)}, rgba(0, 0, 0, 0.04) 0 ${Oe(10)} ${Oe(10)} ${Oe(-5)}`,lg:`0 ${Oe(1)} ${Oe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Oe(28)} ${Oe(23)} ${Oe(-7)}, rgba(0, 0, 0, 0.04) 0 ${Oe(12)} ${Oe(12)} ${Oe(-7)}`,xl:`0 ${Oe(1)} ${Oe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Oe(36)} ${Oe(28)} ${Oe(-7)}, rgba(0, 0, 0, 0.04) 0 ${Oe(17)} ${Oe(17)} ${Oe(-7)}`},other:{},components:{}};function wR(e){return e==="auto"||e==="dark"||e==="light"}function YX({key:e="mantine-color-scheme-value"}={}){let t;return{get:n=>{if(typeof window>"u")return n;try{const r=window.localStorage.getItem(e);return wR(r)?r:n}catch{return n}},set:n=>{try{window.localStorage.setItem(e,n)}catch(r){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",r)}},subscribe:n=>{t=r=>{r.storageArea===window.localStorage&&r.key===e&&wR(r.newValue)&&n(r.newValue)},window.addEventListener("storage",t)},unsubscribe:()=>{window.removeEventListener("storage",t)},clear:()=>{window.localStorage.removeItem(e)}}}const KX="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",SR="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function JE(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function ER(e){if(!(e.primaryColor in e.colors))throw new Error(KX);if(typeof e.primaryShade=="object"&&(!JE(e.primaryShade.dark)||!JE(e.primaryShade.light)))throw new Error(SR);if(typeof e.primaryShade=="number"&&!JE(e.primaryShade))throw new Error(SR)}function XX(e,t){if(!t)return ER(e),e;const n=hO(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(n.headings.fontFamily=t.fontFamily),ER(n),n}const SO=w.createContext(null),QX=()=>w.useContext(SO)||wO;function zo(){const e=w.useContext(SO);if(!e)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return e}function O9({theme:e,children:t,inherit:n=!0}){const r=QX(),o=w.useMemo(()=>XX(n?r:wO,e),[e,r,n]);return h.jsx(SO.Provider,{value:o,children:t})}O9.displayName="@mantine/core/MantineThemeProvider";function ZX(){const e=zo(),t=vO(),n=Es(e.breakpoints).reduce((r,o)=>{const i=e.breakpoints[o].includes("px"),s=WK(e.breakpoints[o]),a=i?`${s-.1}px`:pR(s-.1),c=i?`${s}px`:pR(s);return`${r}@media (max-width: ${a}) {.mantine-visible-from-${o} {display: none !important;}}@media (min-width: ${c}) {.mantine-hidden-from-${o} {display: none !important;}}`},"");return h.jsx("style",{"data-mantine-styles":"classes",nonce:t?.(),dangerouslySetInnerHTML:{__html:n}})}function YE(e){return Object.entries(e).map(([t,n])=>`${t}: ${n};`).join("")}function $p(e,t){return(Array.isArray(e)?e:[e]).reduce((r,o)=>`${o}{${r}}`,t)}function eQ(e,t){const n=YE(e.variables),r=n?$p(t,n):"",o=YE(e.dark),i=YE(e.light),s=o?$p(t===":host"?`${t}([data-mantine-color-scheme="dark"])`:`${t}[data-mantine-color-scheme="dark"]`,o):"",a=i?$p(t===":host"?`${t}([data-mantine-color-scheme="light"])`:`${t}[data-mantine-color-scheme="light"]`,i):"";return`${r}${s}${a}`}function Ag({color:e,theme:t,autoContrast:n}){return(typeof n=="boolean"?n:t.autoContrast)&&pc({color:e||t.primaryColor,theme:t}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function NR(e,t){return Ag({color:e.colors[e.primaryColor][Om(e,t)],theme:e,autoContrast:null})}function V0({theme:e,color:t,colorScheme:n,name:r=t,withColorValues:o=!0}){if(!e.colors[t])return{};if(n==="light"){const a=Om(e,"light"),c={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${a===9?8:a+1})`,[`--mantine-color-${r}-light`]:zd(e.colors[t][a],.1),[`--mantine-color-${r}-light-hover`]:zd(e.colors[t][a],.12),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-outline-hover`]:zd(e.colors[t][a],.05)};return o?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...c}:c}const i=Om(e,"dark"),s={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${i})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${i===9?8:i+1})`,[`--mantine-color-${r}-light`]:zd(e.colors[t][Math.max(0,i-2)],.15),[`--mantine-color-${r}-light-hover`]:zd(e.colors[t][Math.max(0,i-2)],.2),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-${Math.max(i-5,0)})`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(i-4,0)})`,[`--mantine-color-${r}-outline-hover`]:zd(e.colors[t][Math.max(i-4,0)],.05)};return o?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...s}:s}function tQ(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function Bd(e,t,n){Es(t).forEach(r=>Object.assign(e,{[`--mantine-${n}-${r}`]:t[r]}))}const j9=e=>{const t=Om(e,"light"),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:Oe(e.defaultRadius),r={variables:{"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-color-scheme":"light dark","--mantine-webkit-font-smoothing":e.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":e.fontSmoothing?"grayscale":"unset","--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-primary-color-contrast":NR(e,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)"},dark:{"--mantine-primary-color-contrast":NR(e,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)"}};Bd(r.variables,e.breakpoints,"breakpoint"),Bd(r.variables,e.spacing,"spacing"),Bd(r.variables,e.fontSizes,"font-size"),Bd(r.variables,e.lineHeights,"line-height"),Bd(r.variables,e.shadows,"shadow"),Bd(r.variables,e.radius,"radius"),e.colors[e.primaryColor].forEach((i,s)=>{r.variables[`--mantine-primary-color-${s}`]=`var(--mantine-color-${e.primaryColor}-${s})`}),Es(e.colors).forEach(i=>{const s=e.colors[i];if(tQ(s)){Object.assign(r.light,V0({theme:e,name:s.name,color:s.light,colorScheme:"light",withColorValues:!0})),Object.assign(r.dark,V0({theme:e,name:s.name,color:s.dark,colorScheme:"dark",withColorValues:!0}));return}s.forEach((a,c)=>{r.variables[`--mantine-color-${i}-${c}`]=a}),Object.assign(r.light,V0({theme:e,color:i,colorScheme:"light",withColorValues:!1})),Object.assign(r.dark,V0({theme:e,color:i,colorScheme:"dark",withColorValues:!1}))});const o=e.headings.sizes;return Es(o).forEach(i=>{r.variables[`--mantine-${i}-font-size`]=o[i].fontSize,r.variables[`--mantine-${i}-line-height`]=o[i].lineHeight,r.variables[`--mantine-${i}-font-weight`]=o[i].fontWeight||e.headings.fontWeight}),r};function nQ({theme:e,generator:t}){const n=j9(e),r=t?.(e);return r?hO(n,r):n}const KE=j9(wO);function rQ(e){const t={variables:{},light:{},dark:{}};return Es(e.variables).forEach(n=>{KE.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),Es(e.light).forEach(n=>{KE.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),Es(e.dark).forEach(n=>{KE.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function oQ(e){return` + ${e}[data-mantine-color-scheme="dark"] { --mantine-color-scheme: dark; } + ${e}[data-mantine-color-scheme="light"] { --mantine-color-scheme: light; } +`}function A9({cssVariablesSelector:e,deduplicateCssVariables:t}){const n=zo(),r=vO(),o=PX(),i=nQ({theme:n,generator:o}),s=e===":root"&&t,a=s?rQ(i):i,c=eQ(a,e);return c?h.jsx("style",{"data-mantine-styles":!0,nonce:r?.(),dangerouslySetInnerHTML:{__html:`${c}${s?"":oQ(e)}`}}):null}A9.displayName="@mantine/CssVariables";function iQ(){const e=console.error;console.error=(...t)=>{t.length>1&&typeof t[0]=="string"&&t[0].toLowerCase().includes("extra attributes from the server")&&typeof t[1]=="string"&&t[1].toLowerCase().includes("data-mantine-color-scheme")||e(...t)}}function Vd(e,t){const n=typeof window<"u"&&"matchMedia"in window&&window.matchMedia("(prefers-color-scheme: dark)")?.matches,r=e!=="auto"?e:n?"dark":"light";t()?.setAttribute("data-mantine-color-scheme",r)}function sQ({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){const o=w.useRef(null),[i,s]=w.useState(()=>e.get(t)),a=r||i,c=w.useCallback(f=>{r||(Vd(f,n),s(f),e.set(f))},[e.set,a,r]),u=w.useCallback(()=>{s(t),Vd(t,n),e.clear()},[e.clear,t]);return w.useEffect(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),rh(()=>{Vd(e.get(t),n)},[]),w.useEffect(()=>{if(r)return Vd(r,n),()=>{};r===void 0&&Vd(i,n),typeof window<"u"&&"matchMedia"in window&&(o.current=window.matchMedia("(prefers-color-scheme: dark)"));const f=p=>{i==="auto"&&Vd(p.matches?"dark":"light",n)};return o.current?.addEventListener("change",f),()=>o.current?.removeEventListener("change",f)},[i,r]),{colorScheme:a,setColorScheme:c,clearColorScheme:u}}function aQ({respectReducedMotion:e,getRootElement:t}){rh(()=>{e&&t()?.setAttribute("data-respect-reduced-motion","true")},[e])}iQ();function T9({theme:e,children:t,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:o=!0,deduplicateCssVariables:i=!0,withCssVariables:s=!0,cssVariablesSelector:a=":root",classNamesPrefix:c="mantine",colorSchemeManager:u=YX(),defaultColorScheme:f="light",getRootElement:p=()=>document.documentElement,cssVariablesResolver:g,forceColorScheme:y,stylesTransform:v,env:x}){const{colorScheme:S,setColorScheme:E,clearColorScheme:C}=sQ({defaultColorScheme:f,forceColorScheme:y,manager:u,getRootElement:p});return aQ({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:p}),h.jsx(_9.Provider,{value:{colorScheme:S,setColorScheme:E,clearColorScheme:C,getRootElement:p,classNamesPrefix:c,getStyleNonce:n,cssVariablesResolver:g,cssVariablesSelector:a,withStaticClasses:r,stylesTransform:v,env:x},children:h.jsxs(O9,{theme:e,children:[s&&h.jsx(A9,{cssVariablesSelector:a,deduplicateCssVariables:i}),o&&h.jsx(ZX,{}),t]})})}T9.displayName="@mantine/core/MantineProvider";function ih({classNames:e,styles:t,props:n,stylesCtx:r}){const o=zo();return{resolvedClassNames:Ox({theme:o,classNames:e,props:n,stylesCtx:r||void 0}),resolvedStyles:sv({theme:o,styles:t,props:n,stylesCtx:r||void 0})}}const lQ={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function cQ({theme:e,options:t,unstyled:n}){return pn(t?.focusable&&!n&&(e.focusClassName||lQ[e.focusRing]),t?.active&&!n&&e.activeClassName)}function uQ({selector:e,stylesCtx:t,options:n,props:r,theme:o}){return Ox({theme:o,classNames:n?.classNames,props:n?.props||r,stylesCtx:t})[e]}function _R({selector:e,stylesCtx:t,theme:n,classNames:r,props:o}){return Ox({theme:n,classNames:r,props:o,stylesCtx:t})[e]}function dQ({rootSelector:e,selector:t,className:n}){return e===t?n:void 0}function fQ({selector:e,classes:t,unstyled:n}){return n?void 0:t[e]}function hQ({themeName:e,classNamesPrefix:t,selector:n,withStaticClass:r}){return r===!1?[]:e.map(o=>`${t}-${o}-${n}`)}function pQ({themeName:e,theme:t,selector:n,props:r,stylesCtx:o}){return e.map(i=>Ox({theme:t,classNames:t.components[i]?.classNames,props:r,stylesCtx:o})?.[n])}function mQ({options:e,classes:t,selector:n,unstyled:r}){return e?.variant&&!r?t[`${n}--${e.variant}`]:void 0}function gQ({theme:e,options:t,themeName:n,selector:r,classNamesPrefix:o,classNames:i,classes:s,unstyled:a,className:c,rootSelector:u,props:f,stylesCtx:p,withStaticClasses:g,headless:y,transformedStyles:v}){return pn(cQ({theme:e,options:t,unstyled:a||y}),pQ({theme:e,themeName:n,selector:r,props:f,stylesCtx:p}),mQ({options:t,classes:s,selector:r,unstyled:a}),_R({selector:r,stylesCtx:p,theme:e,classNames:i,props:f}),_R({selector:r,stylesCtx:p,theme:e,classNames:v,props:f}),uQ({selector:r,stylesCtx:p,options:t,props:f,theme:e}),dQ({rootSelector:u,selector:r,className:c}),fQ({selector:r,classes:s,unstyled:a||y}),g&&!y&&hQ({themeName:n,classNamesPrefix:o,selector:r,withStaticClass:t?.withStaticClass}),t?.className)}function yQ({theme:e,themeName:t,props:n,stylesCtx:r,selector:o}){return t.map(i=>sv({theme:e,styles:e.components[i]?.styles,props:n,stylesCtx:r})[o]).reduce((i,s)=>({...i,...s}),{})}function e_({style:e,theme:t}){return Array.isArray(e)?[...e].reduce((n,r)=>({...n,...e_({style:r,theme:t})}),{}):typeof e=="function"?e(t):e??{}}function bQ(e){return e.reduce((t,n)=>(n&&Object.keys(n).forEach(r=>{t[r]={...t[r],...pO(n[r])}}),t),{})}function vQ({vars:e,varsResolver:t,theme:n,props:r,stylesCtx:o,selector:i,themeName:s,headless:a}){return bQ([a?{}:t?.(n,r,o),...s.map(c=>n.components?.[c]?.vars?.(n,r,o)),e?.(n,r,o)])?.[i]}function xQ({theme:e,themeName:t,selector:n,options:r,props:o,stylesCtx:i,rootSelector:s,styles:a,style:c,vars:u,varsResolver:f,headless:p,withStylesTransform:g}){return{...!g&&yQ({theme:e,themeName:t,props:o,stylesCtx:i,selector:n}),...!g&&sv({theme:e,styles:a,props:o,stylesCtx:i})[n],...!g&&sv({theme:e,styles:r?.styles,props:r?.props||o,stylesCtx:i})[n],...vQ({theme:e,props:o,stylesCtx:i,vars:u,varsResolver:f,selector:n,themeName:t,headless:p}),...s===n?e_({style:c,theme:e}):null,...e_({style:r?.style,theme:e})}}function wQ({props:e,stylesCtx:t,themeName:n}){const r=zo(),o=zX()?.();return{getTransformedStyles:s=>o?[...s.map(c=>o(c,{props:e,theme:r,ctx:t})),...n.map(c=>o(r.components[c]?.styles,{props:e,theme:r,ctx:t}))].filter(Boolean):[],withStylesTransform:!!o}}function gt({name:e,classes:t,props:n,stylesCtx:r,className:o,style:i,rootSelector:s="root",unstyled:a,classNames:c,styles:u,vars:f,varsResolver:p}){const g=zo(),y=DX(),v=IX(),x=LX(),S=(Array.isArray(e)?e:[e]).filter(_=>_),{withStylesTransform:E,getTransformedStyles:C}=wQ({props:n,stylesCtx:r,themeName:S});return(_,j)=>({className:gQ({theme:g,options:j,themeName:S,selector:_,classNamesPrefix:y,classNames:c,classes:t,unstyled:a,className:o,rootSelector:s,props:n,stylesCtx:r,withStaticClasses:v,headless:x,transformedStyles:C([j?.styles,u])}),style:xQ({theme:g,themeName:S,selector:_,options:j,props:n,stylesCtx:r,rootSelector:s,styles:u,style:i,vars:f,varsResolver:p,headless:x,withStylesTransform:E})})}function EO(e,t){return typeof e=="boolean"?e:t.autoContrast}function Pe(e,t,n){const r=zo(),o=r.components[e]?.defaultProps,i=typeof o=="function"?o(r):o;return{...t,...i,...pO(n)}}function XE(e){return Es(e).reduce((t,n)=>e[n]!==void 0?`${t}${HK(n)}:${e[n]};`:t,"").trim()}function SQ({selector:e,styles:t,media:n,container:r}){const o=t?XE(t):"",i=Array.isArray(n)?n.map(a=>`@media${a.query}{${e}{${XE(a.styles)}}}`):[],s=Array.isArray(r)?r.map(a=>`@container ${a.query}{${e}{${XE(a.styles)}}}`):[];return`${o?`${e}{${o}}`:""}${i.join("")}${s.join("")}`.trim()}function EQ(e){const t=vO();return h.jsx("style",{"data-mantine-styles":"inline",nonce:t?.(),dangerouslySetInnerHTML:{__html:SQ(e)}})}function sh(e){const{m:t,mx:n,my:r,mt:o,mb:i,ml:s,mr:a,me:c,ms:u,p:f,px:p,py:g,pt:y,pb:v,pl:x,pr:S,pe:E,ps:C,bd:_,bg:j,c:A,opacity:T,ff:k,fz:R,fw:V,lts:H,ta:F,lh:B,fs:U,tt:M,td:z,w:$,miw:L,maw:P,h:q,mih:Y,mah:D,bgsz:W,bgp:K,bgr:Q,bga:ie,pos:pe,top:ue,left:se,bottom:me,right:xe,inset:je,display:_e,flex:Ee,hiddenFrom:Re,visibleFrom:Me,lightHidden:ze,darkHidden:ve,sx:Ce,...Ae}=e;return{styleProps:pO({m:t,mx:n,my:r,mt:o,mb:i,ml:s,mr:a,me:c,ms:u,p:f,px:p,py:g,pt:y,pb:v,pl:x,pr:S,pe:E,ps:C,bd:_,bg:j,c:A,opacity:T,ff:k,fz:R,fw:V,lts:H,ta:F,lh:B,fs:U,tt:M,td:z,w:$,miw:L,maw:P,h:q,mih:Y,mah:D,bgsz:W,bgp:K,bgr:Q,bga:ie,pos:pe,top:ue,left:se,bottom:me,right:xe,inset:je,display:_e,flex:Ee,hiddenFrom:Re,visibleFrom:Me,lightHidden:ze,darkHidden:ve,sx:Ce}),rest:Ae}}const NQ={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function NO(e,t){const n=pc({color:e,theme:t});return n.color==="dimmed"?"var(--mantine-color-dimmed)":n.color==="bright"?"var(--mantine-color-bright)":n.variable?`var(${n.variable})`:n.color}function _Q(e,t){const n=pc({color:e,theme:t});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:NO(e,t)}function CQ(e,t){if(typeof e=="number")return Oe(e);if(typeof e=="string"){const[n,r,...o]=e.split(" ").filter(s=>s.trim()!=="");let i=`${Oe(n)}`;return r&&(i+=` ${r}`),o.length>0&&(i+=` ${NO(o.join(" "),t)}`),i.trim()}return e}const CR={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function OQ(e){return typeof e=="string"&&e in CR?CR[e]:e}const jQ=["h1","h2","h3","h4","h5","h6"];function AQ(e,t){return typeof e=="string"&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&jQ.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"||typeof e=="string"?Oe(e):e}function TQ(e){return e}const $Q=["h1","h2","h3","h4","h5","h6"];function RQ(e,t){return typeof e=="string"&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&$Q.includes(e)?`var(--mantine-${e}-line-height)`:e}function kQ(e){return typeof e=="number"?Oe(e):e}function MQ(e,t){if(typeof e=="number")return Oe(e);if(typeof e=="string"){const n=e.replace("-","");if(!(n in t.spacing))return Oe(e);const r=`--mantine-spacing-${n}`;return e.startsWith("-")?`calc(var(${r}) * -1)`:`var(${r})`}return e}const QE={color:NO,textColor:_Q,fontSize:AQ,spacing:MQ,identity:TQ,size:kQ,lineHeight:RQ,fontFamily:OQ,border:CQ};function OR(e){return e.replace("(min-width: ","").replace("em)","")}function PQ({media:e,...t}){const r=Object.keys(e).sort((o,i)=>Number(OR(o))-Number(OR(i))).map(o=>({query:o,styles:e[o]}));return{...t,media:r}}function DQ(e){if(typeof e!="object"||e===null)return!1;const t=Object.keys(e);return!(t.length===1&&t[0]==="base")}function IQ(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function LQ(e){return typeof e=="object"&&e!==null?Es(e).filter(t=>t!=="base"):[]}function FQ(e,t){return typeof e=="object"&&e!==null&&t in e?e[t]:e}function zQ({styleProps:e,data:t,theme:n}){return PQ(Es(e).reduce((r,o)=>{if(o==="hiddenFrom"||o==="visibleFrom"||o==="sx")return r;const i=t[o],s=Array.isArray(i.property)?i.property:[i.property],a=IQ(e[o]);if(!DQ(e[o]))return s.forEach(u=>{r.inlineStyles[u]=QE[i.type](a,n)}),r;r.hasResponsiveStyles=!0;const c=LQ(e[o]);return s.forEach(u=>{a&&(r.styles[u]=QE[i.type](a,n)),c.forEach(f=>{const p=`(min-width: ${n.breakpoints[f]})`;r.media[p]={...r.media[p],[u]:QE[i.type](FQ(e[o],f),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function BQ(){return`__m__-${w.useId().replace(/:/g,"")}`}function $9(e,t){return Array.isArray(e)?[...e].reduce((n,r)=>({...n,...$9(r,t)}),{}):typeof e=="function"?e(t):e??{}}function R9(e){return e.startsWith("data-")?e:`data-${e}`}function VQ(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return r===void 0||r===""||r===!1||r===null||(t[R9(n)]=e[n]),t},{})}function k9(e){return e?typeof e=="string"?{[R9(e)]:!0}:Array.isArray(e)?[...e].reduce((t,n)=>({...t,...k9(n)}),{}):VQ(e):null}function t_(e,t){return Array.isArray(e)?[...e].reduce((n,r)=>({...n,...t_(r,t)}),{}):typeof e=="function"?e(t):e??{}}function UQ({theme:e,style:t,vars:n,styleProps:r}){const o=t_(t,e),i=t_(n,e);return{...o,...i,...r}}const M9=w.forwardRef(({component:e,style:t,__vars:n,className:r,variant:o,mod:i,size:s,hiddenFrom:a,visibleFrom:c,lightHidden:u,darkHidden:f,renderRoot:p,__size:g,...y},v)=>{const x=zo(),S=e||"div",{styleProps:E,rest:C}=sh(y),j=FX()?.()?.(E.sx),A=BQ(),T=zQ({styleProps:E,theme:x,data:NQ}),k={ref:v,style:UQ({theme:x,style:t,vars:n,styleProps:T.inlineStyles}),className:pn(r,j,{[A]:T.hasResponsiveStyles,"mantine-light-hidden":u,"mantine-dark-hidden":f,[`mantine-hidden-from-${a}`]:a,[`mantine-visible-from-${c}`]:c}),"data-variant":o,"data-size":m9(s)?void 0:s||void 0,size:g,...k9(i),...C};return h.jsxs(h.Fragment,{children:[T.hasResponsiveStyles&&h.jsx(EQ,{selector:`.${A}`,styles:T.styles,media:T.media}),typeof p=="function"?p(k):h.jsx(S,{...k})]})});M9.displayName="@mantine/core/Box";const Fe=M9;function P9(e){return e}function HQ(e){const t=e;return n=>{const r=w.forwardRef((o,i)=>h.jsx(t,{...n,...o,ref:i}));return r.extend=t.extend,r.displayName=`WithProps(${t.displayName})`,r}}function Ue(e){const t=w.forwardRef(e);return t.extend=P9,t.withProps=n=>{const r=w.forwardRef((o,i)=>h.jsx(t,{...n,...o,ref:i}));return r.extend=t.extend,r.displayName=`WithProps(${t.displayName})`,r},t}function mc(e){const t=w.forwardRef(e);return t.withProps=n=>{const r=w.forwardRef((o,i)=>h.jsx(t,{...n,...o,ref:i}));return r.extend=t.extend,r.displayName=`WithProps(${t.displayName})`,r},t.extend=P9,t}const qQ=w.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function gc(){return w.useContext(qQ)}var Tg=s9();const sf=es(Tg);function jx(){return typeof window<"u"}function ah(e){return D9(e)?(e.nodeName||"").toLowerCase():"#document"}function lo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Rs(e){var t;return(t=(D9(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function D9(e){return jx()?e instanceof Node||e instanceof lo(e).Node:!1}function cn(e){return jx()?e instanceof Element||e instanceof lo(e).Element:!1}function Do(e){return jx()?e instanceof HTMLElement||e instanceof lo(e).HTMLElement:!1}function n_(e){return!jx()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof lo(e).ShadowRoot}function $g(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=fi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function WQ(e){return["table","td","th"].includes(ah(e))}function Ax(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function _O(e){const t=Tx(),n=cn(e)?fi(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function GQ(e){let t=Ca(e);for(;Do(t)&&!nc(t);){if(_O(t))return t;if(Ax(t))return null;t=Ca(t)}return null}function Tx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function nc(e){return["html","body","#document"].includes(ah(e))}function fi(e){return lo(e).getComputedStyle(e)}function $x(e){return cn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ca(e){if(ah(e)==="html")return e;const t=e.assignedSlot||e.parentNode||n_(e)&&e.host||Rs(e);return n_(t)?t.host:t}function I9(e){const t=Ca(e);return nc(t)?e.ownerDocument?e.ownerDocument.body:e.body:Do(t)&&$g(t)?t:I9(t)}function ba(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=I9(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=lo(o);if(i){const a=r_(s);return t.concat(s,s.visualViewport||[],$g(o)?o:[],a&&n?ba(a):[])}return t.concat(o,ba(o,[],n))}function r_(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function jR(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function jm(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&n_(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function L9(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function F9(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function JQ(e){return XQ()?!1:!AR()&&e.width===0&&e.height===0||AR()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function YQ(){return/apple/i.test(navigator.vendor)}function AR(){const e=/android/i;return e.test(L9())||e.test(F9())}function KQ(){return L9().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function XQ(){return F9().includes("jsdom/")}function o_(e,t){const n=["mouse","pen"];return n.push("",void 0),n.includes(e)}function QQ(e){return"nativeEvent"in e}function ZQ(e){return e.matches("html,body")}function uu(e){return e?.ownerDocument||document}function ZE(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Kd(e){return"composedPath"in e?e.composedPath()[0]:e.target}const eZ="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function tZ(e){return Do(e)&&e.matches(eZ)}const Yi=Math.min,xr=Math.max,av=Math.round,U0=Math.floor,Ns=e=>({x:e,y:e}),nZ={left:"right",right:"left",bottom:"top",top:"bottom"},rZ={start:"end",end:"start"};function i_(e,t,n){return xr(e,Yi(t,n))}function Oa(e,t){return typeof e=="function"?e(t):e}function Ki(e){return e.split("-")[0]}function lh(e){return e.split("-")[1]}function CO(e){return e==="x"?"y":"x"}function OO(e){return e==="y"?"height":"width"}function ja(e){return["top","bottom"].includes(Ki(e))?"y":"x"}function jO(e){return CO(ja(e))}function oZ(e,t,n){n===void 0&&(n=!1);const r=lh(e),o=jO(e),i=OO(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=lv(s)),[s,lv(s)]}function iZ(e){const t=lv(e);return[s_(e),t,s_(t)]}function s_(e){return e.replace(/start|end/g,t=>rZ[t])}function sZ(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function aZ(e,t,n,r){const o=lh(e);let i=sZ(Ki(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(s_)))),i}function lv(e){return e.replace(/left|right|bottom|top/g,t=>nZ[t])}function lZ(e){return{top:0,right:0,bottom:0,left:0,...e}}function AO(e){return typeof e!="number"?lZ(e):{top:e,right:e,bottom:e,left:e}}function Cf(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function TR(e,t,n){let{reference:r,floating:o}=e;const i=ja(t),s=jO(t),a=OO(s),c=Ki(t),u=i==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,g=r[a]/2-o[a]/2;let y;switch(c){case"top":y={x:f,y:r.y-o.height};break;case"bottom":y={x:f,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-o.width,y:p};break;default:y={x:r.x,y:r.y}}switch(lh(t)){case"start":y[s]-=g*(n&&u?-1:1);break;case"end":y[s]+=g*(n&&u?-1:1);break}return y}const cZ=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=TR(u,r,c),g=r,y={},v=0;for(let x=0;x({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:c}=t,{element:u,padding:f=0}=Oa(e,t)||{};if(u==null)return{};const p=AO(f),g={x:n,y:r},y=jO(o),v=OO(y),x=await s.getDimensions(u),S=y==="y",E=S?"top":"left",C=S?"bottom":"right",_=S?"clientHeight":"clientWidth",j=i.reference[v]+i.reference[y]-g[y]-i.floating[v],A=g[y]-i.reference[y],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let k=T?T[_]:0;(!k||!await(s.isElement==null?void 0:s.isElement(T)))&&(k=a.floating[_]||i.floating[v]);const R=j/2-A/2,V=k/2-x[v]/2-1,H=Yi(p[E],V),F=Yi(p[C],V),B=H,U=k-x[v]-F,M=k/2-x[v]/2+R,z=i_(B,M,U),$=!c.arrow&&lh(o)!=null&&M!==z&&i.reference[v]/2-(MM<=0)){var F,B;const M=(((F=i.flip)==null?void 0:F.index)||0)+1,z=k[M];if(z)return{data:{index:M,overflows:H},reset:{placement:z}};let $=(B=H.filter(L=>L.overflows[0]<=0).sort((L,P)=>L.overflows[1]-P.overflows[1])[0])==null?void 0:B.placement;if(!$)switch(y){case"bestFit":{var U;const L=(U=H.filter(P=>{if(T){const q=ja(P.placement);return q===C||q==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(q=>q>0).reduce((q,Y)=>q+Y,0)]).sort((P,q)=>P[1]-q[1])[0])==null?void 0:U[0];L&&($=L);break}case"initialPlacement":$=a;break}if(o!==$)return{reset:{placement:$}}}return{}}}};function z9(e){const t=Yi(...e.map(i=>i.left)),n=Yi(...e.map(i=>i.top)),r=xr(...e.map(i=>i.right)),o=xr(...e.map(i=>i.bottom));return{x:t,y:n,width:r-t,height:o-n}}function fZ(e){const t=e.slice().sort((o,i)=>o.y-i.y),n=[];let r=null;for(let o=0;or.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(o=>Cf(z9(o)))}const hZ=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:o,platform:i,strategy:s}=t,{padding:a=2,x:c,y:u}=Oa(e,t),f=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(r.reference))||[]),p=fZ(f),g=Cf(z9(f)),y=AO(a);function v(){if(p.length===2&&p[0].left>p[1].right&&c!=null&&u!=null)return p.find(S=>c>S.left-y.left&&cS.top-y.top&&u=2){if(ja(n)==="y"){const H=p[0],F=p[p.length-1],B=Ki(n)==="top",U=H.top,M=F.bottom,z=B?H.left:F.left,$=B?H.right:F.right,L=$-z,P=M-U;return{top:U,bottom:M,left:z,right:$,width:L,height:P,x:z,y:U}}const S=Ki(n)==="left",E=xr(...p.map(H=>H.right)),C=Yi(...p.map(H=>H.left)),_=p.filter(H=>S?H.left===C:H.right===E),j=_[0].top,A=_[_.length-1].bottom,T=C,k=E,R=k-T,V=A-j;return{top:j,bottom:A,left:T,right:k,width:R,height:V,x:T,y:j}}return g}const x=await i.getElementRects({reference:{getBoundingClientRect:v},floating:r.floating,strategy:s});return o.reference.x!==x.reference.x||o.reference.y!==x.reference.y||o.reference.width!==x.reference.width||o.reference.height!==x.reference.height?{reset:{rects:x}}:{}}}};async function pZ(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Ki(n),a=lh(n),c=ja(n)==="y",u=["left","top"].includes(s)?-1:1,f=i&&c?-1:1,p=Oa(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof v=="number"&&(y=a==="end"?v*-1:v),c?{x:y*f,y:g*u}:{x:g*u,y:y*f}}const mZ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,c=await pZ(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:s}}}}},gZ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:S=>{let{x:E,y:C}=S;return{x:E,y:C}}},...c}=Oa(e,t),u={x:n,y:r},f=await TO(t,c),p=ja(Ki(o)),g=CO(p);let y=u[g],v=u[p];if(i){const S=g==="y"?"top":"left",E=g==="y"?"bottom":"right",C=y+f[S],_=y-f[E];y=i_(C,y,_)}if(s){const S=p==="y"?"top":"left",E=p==="y"?"bottom":"right",C=v+f[S],_=v-f[E];v=i_(C,v,_)}const x=a.fn({...t,[g]:y,[p]:v});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[g]:i,[p]:s}}}}}},yZ=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=Oa(e,t),f={x:n,y:r},p=ja(o),g=CO(p);let y=f[g],v=f[p];const x=Oa(a,t),S=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(c){const _=g==="y"?"height":"width",j=i.reference[g]-i.floating[_]+S.mainAxis,A=i.reference[g]+i.reference[_]-S.mainAxis;yA&&(y=A)}if(u){var E,C;const _=g==="y"?"width":"height",j=["top","left"].includes(Ki(o)),A=i.reference[p]-i.floating[_]+(j&&((E=s.offset)==null?void 0:E[p])||0)+(j?0:S.crossAxis),T=i.reference[p]+i.reference[_]+(j?0:((C=s.offset)==null?void 0:C[p])||0)-(j?S.crossAxis:0);vT&&(v=T)}return{[g]:y,[p]:v}}}},bZ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:c=()=>{},...u}=Oa(e,t),f=await TO(t,u),p=Ki(o),g=lh(o),y=ja(o)==="y",{width:v,height:x}=i.floating;let S,E;p==="top"||p==="bottom"?(S=p,E=g===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(E=p,S=g==="end"?"top":"bottom");const C=x-f.top-f.bottom,_=v-f.left-f.right,j=Yi(x-f[S],C),A=Yi(v-f[E],_),T=!t.middlewareData.shift;let k=j,R=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=_),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=C),T&&!g){const H=xr(f.left,0),F=xr(f.right,0),B=xr(f.top,0),U=xr(f.bottom,0);y?R=v-2*(H!==0||F!==0?H+F:xr(f.left,f.right)):k=x-2*(B!==0||U!==0?B+U:xr(f.top,f.bottom))}await c({...t,availableWidth:R,availableHeight:k});const V=await s.getDimensions(a.floating);return v!==V.width||x!==V.height?{reset:{rects:!0}}:{}}}};function B9(e){const t=fi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Do(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=av(n)!==i||av(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function $O(e){return cn(e)?e:e.contextElement}function gf(e){const t=$O(e);if(!Do(t))return Ns(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=B9(t);let s=(i?av(n.width):n.width)/r,a=(i?av(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const vZ=Ns(0);function V9(e){const t=lo(e);return!Tx()||!t.visualViewport?vZ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xZ(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==lo(e)?!1:t}function Eu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=$O(e);let s=Ns(1);t&&(r?cn(r)&&(s=gf(r)):s=gf(e));const a=xZ(i,n,r)?V9(i):Ns(0);let c=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(i){const g=lo(i),y=r&&cn(r)?lo(r):r;let v=g,x=r_(v);for(;x&&r&&y!==v;){const S=gf(x),E=x.getBoundingClientRect(),C=fi(x),_=E.left+(x.clientLeft+parseFloat(C.paddingLeft))*S.x,j=E.top+(x.clientTop+parseFloat(C.paddingTop))*S.y;c*=S.x,u*=S.y,f*=S.x,p*=S.y,c+=_,u+=j,v=lo(x),x=r_(v)}}return Cf({width:f,height:p,x:c,y:u})}function RO(e,t){const n=$x(e).scrollLeft;return t?t.left+n:Eu(Rs(e)).left+n}function U9(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:RO(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function wZ(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Rs(r),a=t?Ax(t.floating):!1;if(r===s||a&&i)return n;let c={scrollLeft:0,scrollTop:0},u=Ns(1);const f=Ns(0),p=Do(r);if((p||!p&&!i)&&((ah(r)!=="body"||$g(s))&&(c=$x(r)),Do(r))){const y=Eu(r);u=gf(r),f.x=y.x+r.clientLeft,f.y=y.y+r.clientTop}const g=s&&!p&&!i?U9(s,c,!0):Ns(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+g.x,y:n.y*u.y-c.scrollTop*u.y+f.y+g.y}}function SZ(e){return Array.from(e.getClientRects())}function EZ(e){const t=Rs(e),n=$x(e),r=e.ownerDocument.body,o=xr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=xr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+RO(e);const a=-n.scrollTop;return fi(r).direction==="rtl"&&(s+=xr(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function NZ(e,t){const n=lo(e),r=Rs(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,c=0;if(o){i=o.width,s=o.height;const u=Tx();(!u||u&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:a,y:c}}function _Z(e,t){const n=Eu(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Do(e)?gf(e):Ns(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,c=o*i.x,u=r*i.y;return{width:s,height:a,x:c,y:u}}function $R(e,t,n){let r;if(t==="viewport")r=NZ(e,n);else if(t==="document")r=EZ(Rs(e));else if(cn(t))r=_Z(t,n);else{const o=V9(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Cf(r)}function H9(e,t){const n=Ca(e);return n===t||!cn(n)||nc(n)?!1:fi(n).position==="fixed"||H9(n,t)}function CZ(e,t){const n=t.get(e);if(n)return n;let r=ba(e,[],!1).filter(a=>cn(a)&&ah(a)!=="body"),o=null;const i=fi(e).position==="fixed";let s=i?Ca(e):e;for(;cn(s)&&!nc(s);){const a=fi(s),c=_O(s);!c&&a.position==="fixed"&&(o=null),(i?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||$g(s)&&!c&&H9(e,s))?r=r.filter(f=>f!==s):o=a,s=Ca(s)}return t.set(e,r),r}function OZ(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Ax(t)?[]:CZ(t,this._c):[].concat(n),r],a=s[0],c=s.reduce((u,f)=>{const p=$R(t,f,o);return u.top=xr(p.top,u.top),u.right=Yi(p.right,u.right),u.bottom=Yi(p.bottom,u.bottom),u.left=xr(p.left,u.left),u},$R(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function jZ(e){const{width:t,height:n}=B9(e);return{width:t,height:n}}function AZ(e,t,n){const r=Do(t),o=Rs(t),i=n==="fixed",s=Eu(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=Ns(0);if(r||!r&&!i)if((ah(t)!=="body"||$g(o))&&(a=$x(t)),r){const g=Eu(t,!0,i,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else o&&(c.x=RO(o));const u=o&&!r&&!i?U9(o,a):Ns(0),f=s.left+a.scrollLeft-c.x-u.x,p=s.top+a.scrollTop-c.y-u.y;return{x:f,y:p,width:s.width,height:s.height}}function e2(e){return fi(e).position==="static"}function RR(e,t){if(!Do(e)||fi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Rs(e)===n&&(n=n.ownerDocument.body),n}function q9(e,t){const n=lo(e);if(Ax(e))return n;if(!Do(e)){let o=Ca(e);for(;o&&!nc(o);){if(cn(o)&&!e2(o))return o;o=Ca(o)}return n}let r=RR(e,t);for(;r&&WQ(r)&&e2(r);)r=RR(r,t);return r&&nc(r)&&e2(r)&&!_O(r)?n:r||GQ(e)||n}const TZ=async function(e){const t=this.getOffsetParent||q9,n=this.getDimensions,r=await n(e.floating);return{reference:AZ(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function $Z(e){return fi(e).direction==="rtl"}const RZ={convertOffsetParentRelativeRectToViewportRelativeRect:wZ,getDocumentElement:Rs,getClippingRect:OZ,getOffsetParent:q9,getElementRects:TZ,getClientRects:SZ,getDimensions:jZ,getScale:gf,isElement:cn,isRTL:$Z};function W9(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kZ(e,t){let n=null,r;const o=Rs(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const u=e.getBoundingClientRect(),{left:f,top:p,width:g,height:y}=u;if(a||t(),!g||!y)return;const v=U0(p),x=U0(o.clientWidth-(f+g)),S=U0(o.clientHeight-(p+y)),E=U0(f),_={rootMargin:-v+"px "+-x+"px "+-S+"px "+-E+"px",threshold:xr(0,Yi(1,c))||1};let j=!0;function A(T){const k=T[0].intersectionRatio;if(k!==c){if(!j)return s();k?s(!1,k):r=setTimeout(()=>{s(!1,1e-7)},1e3)}k===1&&!W9(u,e.getBoundingClientRect())&&s(),j=!1}try{n=new IntersectionObserver(A,{..._,root:o.ownerDocument})}catch{n=new IntersectionObserver(A,_)}n.observe(e)}return s(!0),i}function MZ(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=$O(e),f=o||i?[...u?ba(u):[],...ba(t)]:[];f.forEach(E=>{o&&E.addEventListener("scroll",n,{passive:!0}),i&&E.addEventListener("resize",n)});const p=u&&a?kZ(u,n):null;let g=-1,y=null;s&&(y=new ResizeObserver(E=>{let[C]=E;C&&C.target===u&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var _;(_=y)==null||_.observe(t)})),n()}),u&&!c&&y.observe(u),y.observe(t));let v,x=c?Eu(e):null;c&&S();function S(){const E=Eu(e);x&&!W9(x,E)&&n(),x=E,v=requestAnimationFrame(S)}return n(),()=>{var E;f.forEach(C=>{o&&C.removeEventListener("scroll",n),i&&C.removeEventListener("resize",n)}),p?.(),(E=y)==null||E.disconnect(),y=null,c&&cancelAnimationFrame(v)}}const PZ=mZ,DZ=gZ,IZ=dZ,LZ=bZ,kR=uZ,FZ=hZ,zZ=yZ,BZ=(e,t,n)=>{const r=new Map,o={platform:RZ,...n},i={...o.platform,_c:r};return cZ(e,t,{...o,platform:i})};var kb=typeof document<"u"?w.useLayoutEffect:w.useEffect;function cv(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!cv(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!cv(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function G9(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function MR(e,t){const n=G9(e);return Math.round(t*n)/n}function t2(e){const t=w.useRef(e);return kb(()=>{t.current=e}),t}function VZ(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[f,p]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=w.useState(r);cv(g,r)||y(r);const[v,x]=w.useState(null),[S,E]=w.useState(null),C=w.useCallback(P=>{P!==T.current&&(T.current=P,x(P))},[]),_=w.useCallback(P=>{P!==k.current&&(k.current=P,E(P))},[]),j=i||v,A=s||S,T=w.useRef(null),k=w.useRef(null),R=w.useRef(f),V=c!=null,H=t2(c),F=t2(o),B=t2(u),U=w.useCallback(()=>{if(!T.current||!k.current)return;const P={placement:t,strategy:n,middleware:g};F.current&&(P.platform=F.current),BZ(T.current,k.current,P).then(q=>{const Y={...q,isPositioned:B.current!==!1};M.current&&!cv(R.current,Y)&&(R.current=Y,Tg.flushSync(()=>{p(Y)}))})},[g,t,n,F,B]);kb(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,p(P=>({...P,isPositioned:!1})))},[u]);const M=w.useRef(!1);kb(()=>(M.current=!0,()=>{M.current=!1}),[]),kb(()=>{if(j&&(T.current=j),A&&(k.current=A),j&&A){if(H.current)return H.current(j,A,U);U()}},[j,A,U,H,V]);const z=w.useMemo(()=>({reference:T,floating:k,setReference:C,setFloating:_}),[C,_]),$=w.useMemo(()=>({reference:j,floating:A}),[j,A]),L=w.useMemo(()=>{const P={position:n,left:0,top:0};if(!$.floating)return P;const q=MR($.floating,f.x),Y=MR($.floating,f.y);return a?{...P,transform:"translate("+q+"px, "+Y+"px)",...G9($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:Y}},[n,a,$.floating,f.x,f.y]);return w.useMemo(()=>({...f,update:U,refs:z,elements:$,floatingStyles:L}),[f,U,z,$,L])}const UZ=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?kR({element:r.current,padding:o}).fn(n):{}:r?kR({element:r,padding:o}).fn(n):{}}}},J9=(e,t)=>({...PZ(e),options:[e,t]}),kO=(e,t)=>({...DZ(e),options:[e,t]}),PR=(e,t)=>({...zZ(e),options:[e,t]}),uv=(e,t)=>({...IZ(e),options:[e,t]}),HZ=(e,t)=>({...LZ(e),options:[e,t]}),am=(e,t)=>({...FZ(e),options:[e,t]}),Y9=(e,t)=>({...UZ(e),options:[e,t]});function qZ(e){return w.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const K9={...fO},WZ=K9.useInsertionEffect,GZ=WZ||(e=>e());function da(e){const t=w.useRef(()=>{});return GZ(()=>{t.current=e}),w.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o"floating-ui-"+Math.random().toString(36).slice(2,6)+JZ++;function YZ(){const[e,t]=w.useState(()=>DR?IR():void 0);return _s(()=>{e==null&&t(IR())},[]),w.useEffect(()=>{DR=!0},[]),e}const KZ=K9.useId,X9=KZ||YZ;function XZ(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const QZ=w.createContext(null),ZZ=w.createContext(null),MO=()=>{var e;return((e=w.useContext(QZ))==null?void 0:e.id)||null},PO=()=>w.useContext(ZZ);function DO(e){return"data-floating-ui-"+e}function n2(e){const t=w.useRef(e);return _s(()=>{t.current=e}),t}const LR=DO("safe-polygon");function Mb(e,t,n){return n&&!o_(n)?0:typeof e=="number"?e:e?.[t]}function eee(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:c=0,handleClose:u=null,mouseOnly:f=!1,restMs:p=0,move:g=!0}=t,y=PO(),v=MO(),x=n2(u),S=n2(c),E=n2(n),C=w.useRef(),_=w.useRef(-1),j=w.useRef(),A=w.useRef(-1),T=w.useRef(!0),k=w.useRef(!1),R=w.useRef(()=>{}),V=w.useRef(!1),H=w.useCallback(()=>{var L;const P=(L=o.current.openEvent)==null?void 0:L.type;return P?.includes("mouse")&&P!=="mousedown"},[o]);w.useEffect(()=>{if(!a)return;function L(P){let{open:q}=P;q||(clearTimeout(_.current),clearTimeout(A.current),T.current=!0,V.current=!1)}return i.on("openchange",L),()=>{i.off("openchange",L)}},[a,i]),w.useEffect(()=>{if(!a||!x.current||!n)return;function L(q){H()&&r(!1,q,"hover")}const P=uu(s.floating).documentElement;return P.addEventListener("mouseleave",L),()=>{P.removeEventListener("mouseleave",L)}},[s.floating,n,r,a,x,H]);const F=w.useCallback(function(L,P,q){P===void 0&&(P=!0),q===void 0&&(q="hover");const Y=Mb(S.current,"close",C.current);Y&&!j.current?(clearTimeout(_.current),_.current=window.setTimeout(()=>r(!1,L,q),Y)):P&&(clearTimeout(_.current),r(!1,L,q))},[S,r]),B=da(()=>{R.current(),j.current=void 0}),U=da(()=>{if(k.current){const L=uu(s.floating).body;L.style.pointerEvents="",L.removeAttribute(LR),k.current=!1}}),M=da(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);w.useEffect(()=>{if(!a)return;function L(D){if(clearTimeout(_.current),T.current=!1,f&&!o_(C.current)||p>0&&!Mb(S.current,"open"))return;const W=Mb(S.current,"open",C.current);W?_.current=window.setTimeout(()=>{E.current||r(!0,D,"hover")},W):n||r(!0,D,"hover")}function P(D){if(M())return;R.current();const W=uu(s.floating);if(clearTimeout(A.current),V.current=!1,x.current&&o.current.floatingContext){n||clearTimeout(_.current),j.current=x.current({...o.current.floatingContext,tree:y,x:D.clientX,y:D.clientY,onClose(){U(),B(),M()||F(D,!0,"safe-polygon")}});const Q=j.current;W.addEventListener("mousemove",Q),R.current=()=>{W.removeEventListener("mousemove",Q)};return}(C.current==="touch"?!jm(s.floating,D.relatedTarget):!0)&&F(D)}function q(D){M()||o.current.floatingContext&&(x.current==null||x.current({...o.current.floatingContext,tree:y,x:D.clientX,y:D.clientY,onClose(){U(),B(),M()||F(D)}})(D))}if(cn(s.domReference)){var Y;const D=s.domReference;return n&&D.addEventListener("mouseleave",q),(Y=s.floating)==null||Y.addEventListener("mouseleave",q),g&&D.addEventListener("mousemove",L,{once:!0}),D.addEventListener("mouseenter",L),D.addEventListener("mouseleave",P),()=>{var W;n&&D.removeEventListener("mouseleave",q),(W=s.floating)==null||W.removeEventListener("mouseleave",q),g&&D.removeEventListener("mousemove",L),D.removeEventListener("mouseenter",L),D.removeEventListener("mouseleave",P)}}},[s,a,e,f,p,g,F,B,U,r,n,E,y,S,x,o,M]),_s(()=>{var L;if(a&&n&&(L=x.current)!=null&&L.__options.blockPointerEvents&&H()){k.current=!0;const q=s.floating;if(cn(s.domReference)&&q){var P;const Y=uu(s.floating).body;Y.setAttribute(LR,"");const D=s.domReference,W=y==null||(P=y.nodesRef.current.find(K=>K.id===v))==null||(P=P.context)==null?void 0:P.elements.floating;return W&&(W.style.pointerEvents=""),Y.style.pointerEvents="none",D.style.pointerEvents="auto",q.style.pointerEvents="auto",()=>{Y.style.pointerEvents="",D.style.pointerEvents="",q.style.pointerEvents=""}}}},[a,n,v,s,y,x,H]),_s(()=>{n||(C.current=void 0,V.current=!1,B(),U())},[n,B,U]),w.useEffect(()=>()=>{B(),clearTimeout(_.current),clearTimeout(A.current),U()},[a,s.domReference,B,U]);const z=w.useMemo(()=>{function L(P){C.current=P.pointerType}return{onPointerDown:L,onPointerEnter:L,onMouseMove(P){const{nativeEvent:q}=P;function Y(){!T.current&&!E.current&&r(!0,q,"hover")}f&&!o_(C.current)||n||p===0||V.current&&P.movementX**2+P.movementY**2<2||(clearTimeout(A.current),C.current==="touch"?Y():(V.current=!0,A.current=window.setTimeout(Y,p)))}}},[f,r,n,E,p]),$=w.useMemo(()=>({onMouseEnter(){clearTimeout(_.current)},onMouseLeave(L){M()||F(L.nativeEvent,!1)}}),[F,M]);return w.useMemo(()=>a?{reference:z,floating:$}:{},[a,z,$])}const a_=()=>{},Q9=w.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:a_,setState:a_,isInstantPhase:!1}),tee=()=>w.useContext(Q9);function nee(e){const{children:t,delay:n,timeoutMs:r=0}=e,[o,i]=w.useReducer((c,u)=>({...c,...u}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),s=w.useRef(null),a=w.useCallback(c=>{i({currentId:c})},[]);return _s(()=>{o.currentId?s.current===null?s.current=o.currentId:o.isInstantPhase||i({isInstantPhase:!0}):(o.isInstantPhase&&i({isInstantPhase:!1}),s.current=null)},[o.currentId,o.isInstantPhase]),w.createElement(Q9.Provider,{value:w.useMemo(()=>({...o,setState:i,setCurrentId:a}),[o,a])},t)}function ree(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,floatingId:o}=e,{id:i,enabled:s=!0}=t,a=i??o,c=tee(),{currentId:u,setCurrentId:f,initialDelay:p,setState:g,timeoutMs:y}=c;return _s(()=>{s&&u&&(g({delay:{open:1,close:Mb(p,"close")}}),u!==a&&r(!1))},[s,a,r,g,u,p]),_s(()=>{function v(){r(!1),g({delay:p,currentId:null})}if(s&&u&&!n&&u===a){if(y){const x=window.setTimeout(v,y);return()=>{clearTimeout(x)}}v()}},[s,n,g,u,a,r,p,y]),_s(()=>{s&&(f===a_||!n||f(a))},[s,n,f,a]),c}function r2(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}const oee="data-floating-ui-focusable",iee={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},see={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},FR=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function aee(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:f=!1,referencePressEvent:p="pointerdown",ancestorScroll:g=!1,bubbles:y,capture:v}=t,x=PO(),S=da(typeof c=="function"?c:()=>!1),E=typeof c=="function"?S:c,C=w.useRef(!1),_=w.useRef(!1),{escapeKey:j,outsidePress:A}=FR(y),{escapeKey:T,outsidePress:k}=FR(v),R=w.useRef(!1),V=da(z=>{var $;if(!n||!s||!a||z.key!=="Escape"||R.current)return;const L=($=i.current.floatingContext)==null?void 0:$.nodeId,P=x?r2(x.nodesRef.current,L):[];if(!j&&(z.stopPropagation(),P.length>0)){let q=!0;if(P.forEach(Y=>{var D;if((D=Y.context)!=null&&D.open&&!Y.context.dataRef.current.__escapeKeyBubbles){q=!1;return}}),!q)return}r(!1,QQ(z)?z.nativeEvent:z,"escape-key")}),H=da(z=>{var $;const L=()=>{var P;V(z),(P=Kd(z))==null||P.removeEventListener("keydown",L)};($=Kd(z))==null||$.addEventListener("keydown",L)}),F=da(z=>{var $;const L=C.current;C.current=!1;const P=_.current;if(_.current=!1,u==="click"&&P||L||typeof E=="function"&&!E(z))return;const q=Kd(z),Y="["+DO("inert")+"]",D=uu(o.floating).querySelectorAll(Y);let W=cn(q)?q:null;for(;W&&!nc(W);){const pe=Ca(W);if(nc(pe)||!cn(pe))break;W=pe}if(D.length&&cn(q)&&!ZQ(q)&&!jm(q,o.floating)&&Array.from(D).every(pe=>!jm(W,pe)))return;if(Do(q)&&M){const pe=q.clientWidth>0&&q.scrollWidth>q.clientWidth,ue=q.clientHeight>0&&q.scrollHeight>q.clientHeight;let se=ue&&z.offsetX>q.clientWidth;if(ue&&fi(q).direction==="rtl"&&(se=z.offsetX<=q.offsetWidth-q.clientWidth),se||pe&&z.offsetY>q.clientHeight)return}const K=($=i.current.floatingContext)==null?void 0:$.nodeId,Q=x&&r2(x.nodesRef.current,K).some(pe=>{var ue;return ZE(z,(ue=pe.context)==null?void 0:ue.elements.floating)});if(ZE(z,o.floating)||ZE(z,o.domReference)||Q)return;const ie=x?r2(x.nodesRef.current,K):[];if(ie.length>0){let pe=!0;if(ie.forEach(ue=>{var se;if((se=ue.context)!=null&&se.open&&!ue.context.dataRef.current.__outsidePressBubbles){pe=!1;return}}),!pe)return}r(!1,z,"outside-press")}),B=da(z=>{var $;const L=()=>{var P;F(z),(P=Kd(z))==null||P.removeEventListener(u,L)};($=Kd(z))==null||$.addEventListener(u,L)});w.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=j,i.current.__outsidePressBubbles=A;let z=-1;function $(D){r(!1,D,"ancestor-scroll")}function L(){window.clearTimeout(z),R.current=!0}function P(){z=window.setTimeout(()=>{R.current=!1},Tx()?5:0)}const q=uu(o.floating);a&&(q.addEventListener("keydown",T?H:V,T),q.addEventListener("compositionstart",L),q.addEventListener("compositionend",P)),E&&q.addEventListener(u,k?B:F,k);let Y=[];return g&&(cn(o.domReference)&&(Y=ba(o.domReference)),cn(o.floating)&&(Y=Y.concat(ba(o.floating))),!cn(o.reference)&&o.reference&&o.reference.contextElement&&(Y=Y.concat(ba(o.reference.contextElement)))),Y=Y.filter(D=>{var W;return D!==((W=q.defaultView)==null?void 0:W.visualViewport)}),Y.forEach(D=>{D.addEventListener("scroll",$,{passive:!0})}),()=>{a&&(q.removeEventListener("keydown",T?H:V,T),q.removeEventListener("compositionstart",L),q.removeEventListener("compositionend",P)),E&&q.removeEventListener(u,k?B:F,k),Y.forEach(D=>{D.removeEventListener("scroll",$)}),window.clearTimeout(z)}},[i,o,a,E,u,n,r,g,s,j,A,V,T,H,F,k,B]),w.useEffect(()=>{C.current=!1},[E,u]);const U=w.useMemo(()=>({onKeyDown:V,[iee[p]]:z=>{f&&r(!1,z.nativeEvent,"reference-press")}}),[V,r,f,p]),M=w.useMemo(()=>({onKeyDown:V,onMouseDown(){_.current=!0},onMouseUp(){_.current=!0},[see[u]]:()=>{C.current=!0}}),[V,u]);return w.useMemo(()=>s?{reference:U,floating:M}:{},[s,U,M])}function lee(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=X9(),i=w.useRef({}),[s]=w.useState(()=>XZ()),a=MO()!=null,[c,u]=w.useState(r.reference),f=da((y,v,x)=>{i.current.openEvent=y?v:void 0,s.emit("openchange",{open:y,event:v,reason:x,nested:a}),n?.(y,v,x)}),p=w.useMemo(()=>({setPositionReference:u}),[]),g=w.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return w.useMemo(()=>({dataRef:i,open:t,onOpenChange:f,elements:g,events:s,floatingId:o,refs:p}),[t,f,g,s,o,p])}function IO(e){e===void 0&&(e={});const{nodeId:t}=e,n=lee({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=w.useState(null),[a,c]=w.useState(null),f=o?.domReference||i,p=w.useRef(null),g=PO();_s(()=>{f&&(p.current=f)},[f]);const y=VZ({...e,elements:{...o,...a&&{reference:a}}}),v=w.useCallback(_=>{const j=cn(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),contextElement:_}:_;c(j),y.refs.setReference(j)},[y.refs]),x=w.useCallback(_=>{(cn(_)||_===null)&&(p.current=_,s(_)),(cn(y.refs.reference.current)||y.refs.reference.current===null||_!==null&&!cn(_))&&y.refs.setReference(_)},[y.refs]),S=w.useMemo(()=>({...y.refs,setReference:x,setPositionReference:v,domReference:p}),[y.refs,x,v]),E=w.useMemo(()=>({...y.elements,domReference:f}),[y.elements,f]),C=w.useMemo(()=>({...y,...r,refs:S,elements:E,nodeId:t}),[y,S,E,t,r]);return _s(()=>{r.dataRef.current.floatingContext=C;const _=g?.nodesRef.current.find(j=>j.id===t);_&&(_.context=C)}),w.useMemo(()=>({...y,context:C,refs:S,elements:E}),[y,S,E,C])}function cee(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:a=!0,visibleOnly:c=!0}=t,u=w.useRef(!1),f=w.useRef(),p=w.useRef(!0);w.useEffect(()=>{if(!a)return;const y=lo(s.domReference);function v(){!n&&Do(s.domReference)&&s.domReference===jR(uu(s.domReference))&&(u.current=!0)}function x(){p.current=!0}return y.addEventListener("blur",v),y.addEventListener("keydown",x,!0),()=>{y.removeEventListener("blur",v),y.removeEventListener("keydown",x,!0)}},[s.domReference,n,a]),w.useEffect(()=>{if(!a)return;function y(v){let{reason:x}=v;(x==="reference-press"||x==="escape-key")&&(u.current=!0)}return o.on("openchange",y),()=>{o.off("openchange",y)}},[o,a]),w.useEffect(()=>()=>{clearTimeout(f.current)},[]);const g=w.useMemo(()=>({onPointerDown(y){JQ(y.nativeEvent)||(p.current=!1)},onMouseLeave(){u.current=!1},onFocus(y){if(u.current)return;const v=Kd(y.nativeEvent);if(c&&cn(v))try{if(YQ()&&KQ())throw Error();if(!v.matches(":focus-visible"))return}catch{if(!p.current&&!tZ(v))return}r(!0,y.nativeEvent,"focus")},onBlur(y){u.current=!1;const v=y.relatedTarget,x=y.nativeEvent,S=cn(v)&&v.hasAttribute(DO("focus-guard"))&&v.getAttribute("data-type")==="outside";f.current=window.setTimeout(()=>{var E;const C=jR(s.domReference?s.domReference.ownerDocument:document);!v&&C===s.domReference||jm((E=i.current.floatingContext)==null?void 0:E.refs.floating.current,C)||jm(s.domReference,C)||S||r(!1,x,"focus")})}}),[i,s.domReference,r,c]);return w.useMemo(()=>a?{reference:g}:{},[a,g])}const zR="active",BR="selected";function o2(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[zR]:s,[BR]:a,...c}=e;i=c}return{...n==="floating"&&{tabIndex:-1,[oee]:""},...i,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(c=>{let[u,f]=c;if(!(o&&[zR,BR].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof f=="function"){var p;(p=r.get(u))==null||p.push(f),s[u]=function(){for(var g,y=arguments.length,v=new Array(y),x=0;xS(...v)).find(S=>S!==void 0)}}}else s[u]=f}),s),{})}}function uee(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),r=e.map(a=>a?.item),o=w.useCallback(a=>o2(a,e,"reference"),t),i=w.useCallback(a=>o2(a,e,"floating"),n),s=w.useCallback(a=>o2(a,e,"item"),r);return w.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}const dee=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function fee(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:s="dialog"}=t,a=(n=dee.get(s))!=null?n:s,c=X9(),f=MO()!=null,p=w.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="label"?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:c},...a==="menu"&&f&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[a,o,f,r,c,s]),g=w.useMemo(()=>{const v={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?v:{...v,...a==="menu"&&{"aria-labelledby":c}}},[a,o,c,s]),y=w.useCallback(v=>{let{active:x,selected:S}=v;const E={role:"option",...x&&{id:o+"-option"}};switch(s){case"select":return{...E,"aria-selected":x&&S};case"combobox":return{...E,...x&&{"aria-selected":!0}}}return{}},[o,s]);return w.useMemo(()=>i?{reference:p,floating:g,item:y}:{},[i,p,g,y])}const[hee,yi]=Pa("ScrollArea.Root component was not found in tree");function Of(e,t){const n=ru(t);rh(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}const pee=w.forwardRef((e,t)=>{const{style:n,...r}=e,o=yi(),[i,s]=w.useState(0),[a,c]=w.useState(0),u=!!(i&&a);return Of(o.scrollbarX,()=>{const f=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(f),c(f)}),Of(o.scrollbarY,()=>{const f=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(f),s(f)}),u?h.jsx("div",{...r,ref:t,style:{...n,width:i,height:a}}):null}),mee=w.forwardRef((e,t)=>{const n=yi(),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?h.jsx(pee,{...e,ref:t}):null}),gee={scrollHideDelay:1e3,type:"hover"},Z9=w.forwardRef((e,t)=>{const n=Pe("ScrollAreaRoot",gee,e),{type:r,scrollHideDelay:o,scrollbars:i,...s}=n,[a,c]=w.useState(null),[u,f]=w.useState(null),[p,g]=w.useState(null),[y,v]=w.useState(null),[x,S]=w.useState(null),[E,C]=w.useState(0),[_,j]=w.useState(0),[A,T]=w.useState(!1),[k,R]=w.useState(!1),V=jn(t,H=>c(H));return h.jsx(hee,{value:{type:r,scrollHideDelay:o,scrollArea:a,viewport:u,onViewportChange:f,content:p,onContentChange:g,scrollbarX:y,onScrollbarXChange:v,scrollbarXEnabled:A,onScrollbarXEnabledChange:T,scrollbarY:x,onScrollbarYChange:S,scrollbarYEnabled:k,onScrollbarYEnabledChange:R,onCornerWidthChange:C,onCornerHeightChange:j},children:h.jsx(Fe,{...s,ref:V,__vars:{"--sa-corner-width":i!=="xy"?"0px":`${E}px`,"--sa-corner-height":i!=="xy"?"0px":`${_}px`}})})});Z9.displayName="@mantine/core/ScrollAreaRoot";function e8(e,t){const n=e/t;return Number.isNaN(n)?0:n}function Rx(e){const t=e8(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function t8(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function yee(e,[t,n]){return Math.min(n,Math.max(t,e))}function VR(e,t,n="ltr"){const r=Rx(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,a=i-r,c=n==="ltr"?[0,s]:[s*-1,0],u=yee(e,c);return t8([0,s],[0,a])(u)}function bee(e,t,n,r="ltr"){const o=Rx(n),i=o/2,s=t||i,a=o-s,c=n.scrollbar.paddingStart+s,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,f=n.content-n.viewport,p=r==="ltr"?[0,f]:[f*-1,0];return t8([c,u],p)(e)}function n8(e,t){return e>0&&e{e?.(r),(n===!1||!r.defaultPrevented)&&t?.(r)}}const[vee,r8]=Pa("ScrollAreaScrollbar was not found in tree"),o8=w.forwardRef((e,t)=>{const{sizes:n,hasThumb:r,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:a,onDragScroll:c,onWheelScroll:u,onResize:f,...p}=e,g=yi(),[y,v]=w.useState(null),x=jn(t,R=>v(R)),S=w.useRef(null),E=w.useRef(""),{viewport:C}=g,_=n.content-n.viewport,j=ru(u),A=ru(a),T=Og(f,10),k=R=>{if(S.current){const V=R.clientX-S.current.left,H=R.clientY-S.current.top;c({x:V,y:H})}};return w.useEffect(()=>{const R=V=>{const H=V.target;y?.contains(H)&&j(V,_)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[C,y,_,j]),w.useEffect(A,[n,A]),Of(y,T),Of(g.content,T),h.jsx(vee,{value:{scrollbar:y,hasThumb:r,onThumbChange:ru(o),onThumbPointerUp:ru(i),onThumbPositionChange:A,onThumbPointerDown:ru(s)},children:h.jsx("div",{...p,ref:x,"data-mantine-scrollbar":!0,style:{position:"absolute",...p.style},onPointerDown:vu(e.onPointerDown,R=>{R.preventDefault(),R.button===0&&(R.target.setPointerCapture(R.pointerId),S.current=y.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",k(R))}),onPointerMove:vu(e.onPointerMove,k),onPointerUp:vu(e.onPointerUp,R=>{const V=R.target;V.hasPointerCapture(R.pointerId)&&(R.preventDefault(),V.releasePointerCapture(R.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=E.current,S.current=null}})})}),i8=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,style:o,...i}=e,s=yi(),[a,c]=w.useState(),u=w.useRef(null),f=jn(t,u,s.onScrollbarXChange);return w.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),h.jsx(o8,{"data-orientation":"horizontal",...i,ref:f,sizes:n,style:{...o,"--sa-thumb-width":`${Rx(n)}px`},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,g)=>{if(s.viewport){const y=s.viewport.scrollLeft+p.deltaX;e.onWheelScroll(y),n8(y,g)&&p.preventDefault()}},onResize:()=>{u.current&&s.viewport&&a&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:Ul(a.paddingLeft),paddingEnd:Ul(a.paddingRight)}})}})});i8.displayName="@mantine/core/ScrollAreaScrollbarX";const s8=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,style:o,...i}=e,s=yi(),[a,c]=w.useState(),u=w.useRef(null),f=jn(t,u,s.onScrollbarYChange);return w.useEffect(()=>{u.current&&c(window.getComputedStyle(u.current))},[]),h.jsx(o8,{...i,"data-orientation":"vertical",ref:f,sizes:n,style:{"--sa-thumb-height":`${Rx(n)}px`,...o},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,g)=>{if(s.viewport){const y=s.viewport.scrollTop+p.deltaY;e.onWheelScroll(y),n8(y,g)&&p.preventDefault()}},onResize:()=>{u.current&&s.viewport&&a&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:Ul(a.paddingTop),paddingEnd:Ul(a.paddingBottom)}})}})});s8.displayName="@mantine/core/ScrollAreaScrollbarY";const kx=w.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,{dir:o}=gc(),i=yi(),s=w.useRef(null),a=w.useRef(0),[c,u]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=e8(c.viewport,c.content),p={...r,sizes:c,onSizesChange:u,hasThumb:f>0&&f<1,onThumbChange:y=>{s.current=y},onThumbPointerUp:()=>{a.current=0},onThumbPointerDown:y=>{a.current=y}},g=(y,v)=>bee(y,a.current,c,v);return n==="horizontal"?h.jsx(i8,{...p,ref:t,onThumbPositionChange:()=>{if(i.viewport&&s.current){const y=i.viewport.scrollLeft,v=VR(y,c,o);s.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:y=>{i.viewport&&(i.viewport.scrollLeft=y)},onDragScroll:y=>{i.viewport&&(i.viewport.scrollLeft=g(y,o))}}):n==="vertical"?h.jsx(s8,{...p,ref:t,onThumbPositionChange:()=>{if(i.viewport&&s.current){const y=i.viewport.scrollTop,v=VR(y,c);c.scrollbar.size===0?s.current.style.setProperty("--thumb-opacity","0"):s.current.style.setProperty("--thumb-opacity","1"),s.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:y=>{i.viewport&&(i.viewport.scrollTop=y)},onDragScroll:y=>{i.viewport&&(i.viewport.scrollTop=g(y))}}):null});kx.displayName="@mantine/core/ScrollAreaScrollbarVisible";const LO=w.forwardRef((e,t)=>{const n=yi(),{forceMount:r,...o}=e,[i,s]=w.useState(!1),a=e.orientation==="horizontal",c=Og(()=>{if(n.viewport){const u=n.viewport.offsetWidth{const{forceMount:n,...r}=e,o=yi(),[i,s]=w.useState(!1);return w.useEffect(()=>{const{scrollArea:a}=o;let c=0;if(a){const u=()=>{window.clearTimeout(c),s(!0)},f=()=>{c=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",f),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),n||i?h.jsx(LO,{"data-state":i?"visible":"hidden",...r,ref:t}):null});a8.displayName="@mantine/core/ScrollAreaScrollbarHover";const xee=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=yi(),i=e.orientation==="horizontal",[s,a]=w.useState("hidden"),c=Og(()=>a("idle"),100);return w.useEffect(()=>{if(s==="idle"){const u=window.setTimeout(()=>a("hidden"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,o.scrollHideDelay]),w.useEffect(()=>{const{viewport:u}=o,f=i?"scrollLeft":"scrollTop";if(u){let p=u[f];const g=()=>{const y=u[f];p!==y&&(a("scrolling"),c()),p=y};return u.addEventListener("scroll",g),()=>u.removeEventListener("scroll",g)}},[o.viewport,i,c]),n||s!=="hidden"?h.jsx(kx,{"data-state":s==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:vu(e.onPointerEnter,()=>a("interacting")),onPointerLeave:vu(e.onPointerLeave,()=>a("idle"))}):null}),l_=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=yi(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,a=e.orientation==="horizontal";return w.useEffect(()=>(a?i(!0):s(!0),()=>{a?i(!1):s(!1)}),[a,i,s]),o.type==="hover"?h.jsx(a8,{...r,ref:t,forceMount:n}):o.type==="scroll"?h.jsx(xee,{...r,ref:t,forceMount:n}):o.type==="auto"?h.jsx(LO,{...r,ref:t,forceMount:n}):o.type==="always"?h.jsx(kx,{...r,ref:t}):null});l_.displayName="@mantine/core/ScrollAreaScrollbar";function wee(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=n.left!==i.left,a=n.top!==i.top;(s||a)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)}const l8=w.forwardRef((e,t)=>{const{style:n,...r}=e,o=yi(),i=r8(),{onThumbPositionChange:s}=i,a=jn(t,f=>i.onThumbChange(f)),c=w.useRef(void 0),u=Og(()=>{c.current&&(c.current(),c.current=void 0)},100);return w.useEffect(()=>{const{viewport:f}=o;if(f){const p=()=>{if(u(),!c.current){const g=wee(f,s);c.current=g,s()}};return s(),f.addEventListener("scroll",p),()=>f.removeEventListener("scroll",p)}},[o.viewport,u,s]),h.jsx("div",{"data-state":i.hasThumb?"visible":"hidden",...r,ref:a,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...n},onPointerDownCapture:vu(e.onPointerDownCapture,f=>{const g=f.target.getBoundingClientRect(),y=f.clientX-g.left,v=f.clientY-g.top;i.onThumbPointerDown({x:y,y:v})}),onPointerUp:vu(e.onPointerUp,i.onThumbPointerUp)})});l8.displayName="@mantine/core/ScrollAreaThumb";const c_=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=r8();return n||o.hasThumb?h.jsx(l8,{ref:t,...r}):null});c_.displayName="@mantine/core/ScrollAreaThumb";const c8=w.forwardRef(({children:e,style:t,...n},r)=>{const o=yi(),i=jn(r,o.onViewportChange);return h.jsx(Fe,{...n,ref:i,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t},children:h.jsx("div",{style:{minWidth:"100%"},ref:o.onContentChange,children:e})})});c8.displayName="@mantine/core/ScrollAreaViewport";var FO={root:"m_d57069b5",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};const u8={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},See=(e,{scrollbarSize:t,overscrollBehavior:n})=>({root:{"--scrollarea-scrollbar-size":Oe(t),"--scrollarea-over-scroll-behavior":n}}),ch=Ue((e,t)=>{const n=Pe("ScrollArea",u8,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,scrollbarSize:c,vars:u,type:f,scrollHideDelay:p,viewportProps:g,viewportRef:y,onScrollPositionChange:v,children:x,offsetScrollbars:S,scrollbars:E,onBottomReached:C,onTopReached:_,overscrollBehavior:j,...A}=n,[T,k]=w.useState(!1),[R,V]=w.useState(!1),[H,F]=w.useState(!1),B=gt({name:"ScrollArea",props:n,classes:FO,className:o,style:i,classNames:r,styles:s,unstyled:a,vars:u,varsResolver:See}),U=w.useRef(null),M=qZ([y,U]);return w.useEffect(()=>{if(!U.current||S!=="present")return;const z=U.current,$=new ResizeObserver(()=>{const{scrollHeight:L,clientHeight:P,scrollWidth:q,clientWidth:Y}=z;V(L>P),F(q>Y)});return $.observe(z),()=>$.disconnect()},[U,S]),h.jsxs(Z9,{type:f==="never"?"always":f,scrollHideDelay:p,ref:t,scrollbars:E,...B("root"),...A,children:[h.jsx(c8,{...g,...B("viewport",{style:g?.style}),ref:M,"data-offset-scrollbars":S===!0?"xy":S||void 0,"data-scrollbars":E||void 0,"data-horizontal-hidden":S==="present"&&!H?"true":void 0,"data-vertical-hidden":S==="present"&&!R?"true":void 0,onScroll:z=>{g?.onScroll?.(z),v?.({x:z.currentTarget.scrollLeft,y:z.currentTarget.scrollTop});const{scrollTop:$,scrollHeight:L,clientHeight:P}=z.currentTarget;$-(L-P)>=-.6&&C?.(),$===0&&_?.()},children:x}),(E==="xy"||E==="x")&&h.jsx(l_,{...B("scrollbar"),orientation:"horizontal","data-hidden":f==="never"||S==="present"&&!H?!0:void 0,forceMount:!0,onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),children:h.jsx(c_,{...B("thumb")})}),(E==="xy"||E==="y")&&h.jsx(l_,{...B("scrollbar"),orientation:"vertical","data-hidden":f==="never"||S==="present"&&!R?!0:void 0,forceMount:!0,onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),children:h.jsx(c_,{...B("thumb")})}),h.jsx(mee,{...B("corner"),"data-hovered":T||void 0,"data-hidden":f==="never"||void 0})]})});ch.displayName="@mantine/core/ScrollArea";const zO=Ue((e,t)=>{const{children:n,classNames:r,styles:o,scrollbarSize:i,scrollHideDelay:s,type:a,dir:c,offsetScrollbars:u,viewportRef:f,onScrollPositionChange:p,unstyled:g,variant:y,viewportProps:v,scrollbars:x,style:S,vars:E,onBottomReached:C,onTopReached:_,...j}=Pe("ScrollAreaAutosize",u8,e);return h.jsx(Fe,{...j,ref:t,style:[{display:"flex",overflow:"auto"},S],children:h.jsx(Fe,{style:{display:"flex",flexDirection:"column",flex:1},children:h.jsx(ch,{classNames:r,styles:o,scrollHideDelay:s,scrollbarSize:i,type:a,dir:c,offsetScrollbars:u,viewportRef:f,onScrollPositionChange:p,unstyled:g,variant:y,viewportProps:v,vars:E,scrollbars:x,onBottomReached:C,onTopReached:_,children:n})})})});ch.classes=FO;zO.displayName="@mantine/core/ScrollAreaAutosize";zO.classes=FO;ch.Autosize=zO;var d8={root:"m_87cf2631"};const Eee={__staticSelector:"UnstyledButton"},Aa=mc((e,t)=>{const n=Pe("UnstyledButton",Eee,e),{className:r,component:o="button",__staticSelector:i,unstyled:s,classNames:a,styles:c,style:u,...f}=n,p=gt({name:i,props:n,classes:d8,className:r,style:u,classNames:a,styles:c,unstyled:s});return h.jsx(Fe,{...p("root",{focusable:!0}),component:o,ref:t,type:o==="button"?"button":void 0,...f})});Aa.classes=d8;Aa.displayName="@mantine/core/UnstyledButton";var f8={root:"m_515a97f8"};const Nee={},BO=Ue((e,t)=>{const n=Pe("VisuallyHidden",Nee,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,vars:c,...u}=n,f=gt({name:"VisuallyHidden",classes:f8,props:n,className:o,style:i,classNames:r,styles:s,unstyled:a});return h.jsx(Fe,{component:"span",ref:t,...f("root"),...u})});BO.classes=f8;BO.displayName="@mantine/core/VisuallyHidden";var h8={root:"m_1b7284a3"};const _ee={},Cee=(e,{radius:t,shadow:n})=>({root:{"--paper-radius":t===void 0?void 0:Qn(t),"--paper-shadow":gO(n)}}),VO=mc((e,t)=>{const n=Pe("Paper",_ee,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,withBorder:c,vars:u,radius:f,shadow:p,variant:g,mod:y,...v}=n,x=gt({name:"Paper",props:n,classes:h8,className:o,style:i,classNames:r,styles:s,unstyled:a,vars:u,varsResolver:Cee});return h.jsx(Fe,{ref:t,mod:[{"data-with-border":c},y],...x("root"),variant:g,...v})});VO.classes=h8;VO.displayName="@mantine/core/Paper";function p8(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){const[n,r]=t.split("-"),o=n==="right"?"left":"right";return r===void 0?o:`${o}-${r}`}return t}function UR(e,t,n,r){return e==="center"||r==="center"?{top:t}:e==="end"?{bottom:n}:e==="start"?{top:n}:{}}function HR(e,t,n,r,o){return e==="center"||r==="center"?{left:t}:e==="end"?{[o==="ltr"?"right":"left"]:n}:e==="start"?{[o==="ltr"?"left":"right"]:n}:{}}const Oee={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function jee({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:o,arrowX:i,arrowY:s,dir:a}){const[c,u="center"]=e.split("-"),f={width:t,height:t,transform:"rotate(45deg)",position:"absolute",[Oee[c]]:r},p=-t/2;return c==="left"?{...f,...UR(u,s,n,o),right:p,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:c==="right"?{...f,...UR(u,s,n,o),left:p,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:c==="top"?{...f,...HR(u,i,n,o,a),bottom:p,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:c==="bottom"?{...f,...HR(u,i,n,o,a),top:p,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}const UO=w.forwardRef(({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:o,visible:i,arrowX:s,arrowY:a,style:c,...u},f)=>{const{dir:p}=gc();return i?h.jsx("div",{...u,ref:f,style:{...c,...jee({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:o,dir:p,arrowX:s,arrowY:a})}}):null});UO.displayName="@mantine/core/FloatingArrow";var m8={root:"m_9814e45f"};const Aee={zIndex:ts("modal")},Tee=(e,{gradient:t,color:n,backgroundOpacity:r,blur:o,radius:i,zIndex:s})=>({root:{"--overlay-bg":t||(n!==void 0||r!==void 0)&&gs(n||"#000",r??.6)||void 0,"--overlay-filter":o?`blur(${Oe(o)})`:void 0,"--overlay-radius":i===void 0?void 0:Qn(i),"--overlay-z-index":s?.toString()}}),Mx=mc((e,t)=>{const n=Pe("Overlay",Aee,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,vars:c,fixed:u,center:f,children:p,radius:g,zIndex:y,gradient:v,blur:x,color:S,backgroundOpacity:E,mod:C,..._}=n,j=gt({name:"Overlay",props:n,classes:m8,className:o,style:i,classNames:r,styles:s,unstyled:a,vars:c,varsResolver:Tee});return h.jsx(Fe,{ref:t,...j("root"),mod:[{center:f,fixed:u},C],..._,children:p})});Mx.classes=m8;Mx.displayName="@mantine/core/Overlay";function i2(e){const t=document.createElement("div");return t.setAttribute("data-portal","true"),typeof e.className=="string"&&t.classList.add(...e.className.split(" ").filter(Boolean)),typeof e.style=="object"&&Object.assign(t.style,e.style),typeof e.id=="string"&&t.setAttribute("id",e.id),t}function $ee({target:e,reuseTargetNode:t,...n}){if(e)return typeof e=="string"?document.querySelector(e)||i2(n):e;if(t){const r=document.querySelector("[data-mantine-shared-portal-node]");if(r)return r;const o=i2(n);return o.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(o),o}return i2(n)}const Ree={},g8=Ue((e,t)=>{const{children:n,target:r,reuseTargetNode:o,...i}=Pe("Portal",Ree,e),[s,a]=w.useState(!1),c=w.useRef(null);return rh(()=>(a(!0),c.current=$ee({target:r,reuseTargetNode:o,...i}),iv(t,c.current),!r&&!o&&c.current&&document.body.appendChild(c.current),()=>{!r&&!o&&c.current&&document.body.removeChild(c.current)}),[r]),!s||!c.current?null:Tg.createPortal(h.jsx(h.Fragment,{children:n}),c.current)});g8.displayName="@mantine/core/Portal";const Fu=Ue(({withinPortal:e=!0,children:t,...n},r)=>C9()==="test"||!e?h.jsx(h.Fragment,{children:t}):h.jsx(g8,{ref:r,...n,children:t}));Fu.displayName="@mantine/core/OptionalPortal";const Rp=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${e==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),H0={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...Rp("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...Rp("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...Rp("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...Rp("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...Rp("top"),common:{transformOrigin:"top right"}}},qR={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function kee({transition:e,state:t,duration:n,timingFunction:r}){const o={WebkitBackfaceVisibility:"hidden",willChange:"transform, opacity",transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e=="string"?e in H0?{transitionProperty:H0[e].transitionProperty,...o,...H0[e].common,...H0[e][qR[t]]}:{}:{transitionProperty:e.transitionProperty,...o,...e.common,...e[qR[t]]}}function Mee({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:o,onExit:i,onEntered:s,onExited:a,enterDelay:c,exitDelay:u}){const f=zo(),p=yO(),g=f.respectReducedMotion?p:!1,[y,v]=w.useState(g?0:e),[x,S]=w.useState(r?"entered":"exited"),E=w.useRef(-1),C=w.useRef(-1),_=w.useRef(-1);function j(){window.clearTimeout(E.current),window.clearTimeout(C.current),cancelAnimationFrame(_.current)}const A=k=>{j();const R=k?o:i,V=k?s:a,H=g?0:k?e:t;v(H),H===0?(typeof R=="function"&&R(),typeof V=="function"&&V(),S(k?"entered":"exited")):_.current=requestAnimationFrame(()=>{sf.flushSync(()=>{S(k?"pre-entering":"pre-exiting")}),_.current=requestAnimationFrame(()=>{typeof R=="function"&&R(),S(k?"entering":"exiting"),E.current=window.setTimeout(()=>{typeof V=="function"&&V(),S(k?"entered":"exited")},H)})})},T=k=>{if(j(),typeof(k?c:u)!="number"){A(k);return}C.current=window.setTimeout(()=>{A(k)},k?c:u)};return _a(()=>{T(r)},[r]),w.useEffect(()=>()=>{j()},[]),{transitionDuration:y,transitionStatus:x,transitionTimingFunction:n||"ease"}}function yc({keepMounted:e,transition:t="fade",duration:n=250,exitDuration:r=n,mounted:o,children:i,timingFunction:s="ease",onExit:a,onEntered:c,onEnter:u,onExited:f,enterDelay:p,exitDelay:g}){const y=C9(),{transitionDuration:v,transitionStatus:x,transitionTimingFunction:S}=Mee({mounted:o,exitDuration:r,duration:n,timingFunction:s,onExit:a,onEntered:c,onEnter:u,onExited:f,enterDelay:p,exitDelay:g});return v===0||y==="test"?o?h.jsx(h.Fragment,{children:i({})}):e?i({display:"none"}):null:x==="exited"?e?i({display:"none"}):null:h.jsx(h.Fragment,{children:i(kee({transition:t,duration:v,state:x,timingFunction:S}))})}yc.displayName="@mantine/core/Transition";const[Pee,y8]=Pa("Popover component was not found in the tree");function Px({children:e,active:t=!0,refProp:n="ref",innerRef:r}){const o=_x(t),i=jn(o,r);return fc(e)?w.cloneElement(e,{[n]:i}):e}function b8(e){return h.jsx(BO,{tabIndex:-1,"data-autofocus":!0,...e})}Px.displayName="@mantine/core/FocusTrap";b8.displayName="@mantine/core/FocusTrapInitialFocus";Px.InitialFocus=b8;var v8={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const Dee={},HO=Ue((e,t)=>{const n=Pe("PopoverDropdown",Dee,e),{className:r,style:o,vars:i,children:s,onKeyDownCapture:a,variant:c,classNames:u,styles:f,...p}=n,g=y8(),y=y9({opened:g.opened,shouldReturnFocus:g.returnFocus}),v=g.withRoles?{"aria-labelledby":g.getTargetId(),id:g.getDropdownId(),role:"dialog",tabIndex:-1}:{},x=jn(t,g.floating);return g.disabled?null:h.jsx(Fu,{...g.portalProps,withinPortal:g.withinPortal,children:h.jsx(yc,{mounted:g.opened,...g.transitionProps,transition:g.transitionProps?.transition||"fade",duration:g.transitionProps?.duration??150,keepMounted:g.keepMounted,exitDuration:typeof g.transitionProps?.exitDuration=="number"?g.transitionProps.exitDuration:g.transitionProps?.duration,children:S=>h.jsx(Px,{active:g.trapFocus&&g.opened,innerRef:x,children:h.jsxs(Fe,{...v,...p,variant:c,onKeyDownCapture:XK(()=>{g.onClose?.(),g.onDismiss?.()},{active:g.closeOnEscape,onTrigger:y,onKeyDown:a}),"data-position":g.placement,"data-fixed":g.floatingStrategy==="fixed"||void 0,...g.getStyles("dropdown",{className:r,props:n,classNames:u,styles:f,style:[{...S,zIndex:g.zIndex,top:g.y??0,left:g.x??0,width:g.width==="target"?void 0:Oe(g.width)},g.resolvedStyles.dropdown,f?.dropdown,o]}),children:[s,h.jsx(UO,{ref:g.arrowRef,arrowX:g.arrowX,arrowY:g.arrowY,visible:g.withArrow,position:g.placement,arrowSize:g.arrowSize,arrowRadius:g.arrowRadius,arrowOffset:g.arrowOffset,arrowPosition:g.arrowPosition,...g.getStyles("arrow",{props:n,classNames:u,styles:f})})]})})})})});HO.classes=v8;HO.displayName="@mantine/core/PopoverDropdown";const Iee={refProp:"ref",popupType:"dialog"},x8=Ue((e,t)=>{const{children:n,refProp:r,popupType:o,...i}=Pe("PopoverTarget",Iee,e);if(!fc(n))throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const s=i,a=y8(),c=jn(a.reference,Cx(n),t),u=a.withRoles?{"aria-haspopup":o,"aria-expanded":a.opened,"aria-controls":a.getDropdownId(),id:a.getTargetId()}:{};return w.cloneElement(n,{...s,...u,...a.targetProps,className:pn(a.targetProps.className,s.className,n.props.className),[r]:c,...a.controlled?null:{onClick:a.onToggle}})});x8.displayName="@mantine/core/PopoverTarget";function w8({opened:e,floating:t,position:n,positionDependencies:r}){const[o,i]=w.useState(0);w.useEffect(()=>{if(t.refs.reference.current&&t.refs.floating.current&&e)return MZ(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,n]),_a(()=>{t.update()},r),_a(()=>{i(s=>s+1)},[e])}function Lee(e){if(e===void 0)return{shift:!0,flip:!0};const t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function Fee(e,t){const n=Lee(e.middlewares),r=[J9(e.offset)];return n.shift&&r.push(kO(typeof n.shift=="boolean"?{limiter:PR(),padding:5}:{limiter:PR(),padding:5,...n.shift})),n.flip&&r.push(typeof n.flip=="boolean"?uv():uv(n.flip)),n.inline&&r.push(typeof n.inline=="boolean"?am():am(n.inline)),r.push(Y9({element:e.arrowRef,padding:e.arrowOffset})),(n.size||e.width==="target")&&r.push(HZ({...typeof n.size=="boolean"?{}:n.size,apply({rects:o,availableWidth:i,availableHeight:s,...a}){const u=t().refs.floating.current?.style??{};n.size&&(typeof n.size=="object"&&n.size.apply?n.size.apply({rects:o,availableWidth:i,availableHeight:s,...a}):Object.assign(u,{maxWidth:`${i}px`,maxHeight:`${s}px`})),e.width==="target"&&Object.assign(u,{width:`${o.reference.width}px`})}})),r}function zee(e){const[t,n]=ho({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=w.useRef(t),o=()=>{t&&!e.disabled&&n(!1)},i=()=>!e.disabled&&n(!t),s=IO({strategy:e.strategy,placement:e.position,middleware:Fee(e,()=>s)});return w8({opened:t,position:e.position,positionDependencies:e.positionDependencies||[],floating:s}),_a(()=>{e.onPositionChange?.(s.placement)},[s.placement]),_a(()=>{t!==r.current&&(t?e.onOpen?.():e.onClose?.()),r.current=t},[t,e.onClose,e.onOpen]),{floating:s,controlled:typeof e.opened=="boolean",opened:t,onClose:o,onToggle:i}}const Bee={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:ts("popover"),__staticSelector:"Popover",width:"max-content"},Vee=(e,{radius:t,shadow:n})=>({dropdown:{"--popover-radius":t===void 0?void 0:Qn(t),"--popover-shadow":gO(n)}});function co(e){const t=Pe("Popover",Bee,e),{children:n,position:r,offset:o,onPositionChange:i,positionDependencies:s,opened:a,transitionProps:c,onExitTransitionEnd:u,onEnterTransitionEnd:f,width:p,middlewares:g,withArrow:y,arrowSize:v,arrowOffset:x,arrowRadius:S,arrowPosition:E,unstyled:C,classNames:_,styles:j,closeOnClickOutside:A,withinPortal:T,portalProps:k,closeOnEscape:R,clickOutsideEvents:V,trapFocus:H,onClose:F,onDismiss:B,onOpen:U,onChange:M,zIndex:z,radius:$,shadow:L,id:P,defaultOpened:q,__staticSelector:Y,withRoles:D,disabled:W,returnFocus:K,variant:Q,keepMounted:ie,vars:pe,floatingStrategy:ue,withOverlay:se,overlayProps:me,...xe}=t,je=gt({name:Y,props:t,classes:v8,classNames:_,styles:j,unstyled:C,rootSelector:"dropdown",vars:pe,varsResolver:Vee}),{resolvedStyles:_e}=ih({classNames:_,styles:j,props:t}),Ee=w.useRef(null),[Re,Me]=w.useState(null),[ze,ve]=w.useState(null),{dir:Ce}=gc(),Ae=gi(P),G=zee({middlewares:g,width:p,position:p8(Ce,r),offset:typeof o=="number"?o+(y?v/2:0):o,arrowRef:Ee,arrowOffset:x,onPositionChange:i,positionDependencies:s,opened:a,defaultOpened:q,onChange:M,onOpen:U,onClose:F,onDismiss:B,strategy:ue,disabled:W});jg(()=>{A&&(G.onClose(),B?.())},V,[Re,ze]);const re=w.useCallback(Z=>{Me(Z),G.floating.refs.setReference(Z)},[G.floating.refs.setReference]),ne=w.useCallback(Z=>{ve(Z),G.floating.refs.setFloating(Z)},[G.floating.refs.setFloating]),ce=w.useCallback(()=>{c?.onExited?.(),u?.()},[c?.onExited,u]),te=w.useCallback(()=>{c?.onEntered?.(),f?.()},[c?.onEntered,f]);return h.jsxs(Pee,{value:{returnFocus:K,disabled:W,controlled:G.controlled,reference:re,floating:ne,x:G.floating.x,y:G.floating.y,arrowX:G.floating?.middlewareData?.arrow?.x,arrowY:G.floating?.middlewareData?.arrow?.y,opened:G.opened,arrowRef:Ee,transitionProps:{...c,onExited:ce,onEntered:te},width:p,withArrow:y,arrowSize:v,arrowOffset:x,arrowRadius:S,arrowPosition:E,placement:G.floating.placement,trapFocus:H,withinPortal:T,portalProps:k,zIndex:z,radius:$,shadow:L,closeOnEscape:R,onDismiss:B,onClose:G.onClose,onToggle:G.onToggle,getTargetId:()=>`${Ae}-target`,getDropdownId:()=>`${Ae}-dropdown`,withRoles:D,targetProps:xe,__staticSelector:Y,classNames:_,styles:j,unstyled:C,variant:Q,keepMounted:ie,getStyles:je,resolvedStyles:_e,floatingStrategy:ue},children:[n,se&&h.jsx(yc,{transition:"fade",mounted:G.opened,duration:c?.duration||250,exitDuration:c?.exitDuration||250,children:Z=>h.jsx(Fu,{withinPortal:T,children:h.jsx(Mx,{...me,...je("overlay",{className:me?.className,style:[Z,me?.style]})})})})]})}co.Target=x8;co.Dropdown=HO;co.displayName="@mantine/core/Popover";co.extend=e=>e;var zi={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const S8=w.forwardRef(({className:e,...t},n)=>h.jsxs(Fe,{component:"span",className:pn(zi.barsLoader,e),...t,ref:n,children:[h.jsx("span",{className:zi.bar}),h.jsx("span",{className:zi.bar}),h.jsx("span",{className:zi.bar})]}));S8.displayName="@mantine/core/Bars";const E8=w.forwardRef(({className:e,...t},n)=>h.jsxs(Fe,{component:"span",className:pn(zi.dotsLoader,e),...t,ref:n,children:[h.jsx("span",{className:zi.dot}),h.jsx("span",{className:zi.dot}),h.jsx("span",{className:zi.dot})]}));E8.displayName="@mantine/core/Dots";const N8=w.forwardRef(({className:e,...t},n)=>h.jsx(Fe,{component:"span",className:pn(zi.ovalLoader,e),...t,ref:n}));N8.displayName="@mantine/core/Oval";const _8={bars:S8,oval:N8,dots:E8},Uee={loaders:_8,type:"oval"},Hee=(e,{size:t,color:n})=>({root:{"--loader-size":jt(t,"loader-size"),"--loader-color":n?Sr(n,e):void 0}}),Rg=Ue((e,t)=>{const n=Pe("Loader",Uee,e),{size:r,color:o,type:i,vars:s,className:a,style:c,classNames:u,styles:f,unstyled:p,loaders:g,variant:y,children:v,...x}=n,S=gt({name:"Loader",props:n,classes:zi,className:a,style:c,classNames:u,styles:f,unstyled:p,vars:s,varsResolver:Hee});return v?h.jsx(Fe,{...S("root"),ref:t,...x,children:v}):h.jsx(Fe,{...S("root"),ref:t,component:g[i],variant:y,size:r,...x})});Rg.defaultLoaders=_8;Rg.classes=zi;Rg.displayName="@mantine/core/Loader";const C8=w.forwardRef(({size:e="var(--cb-icon-size, 70%)",style:t,...n},r)=>h.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:e,height:e},ref:r,...n,children:h.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}));C8.displayName="@mantine/core/CloseIcon";var O8={root:"m_86a44da5","root--subtle":"m_220c80f2"};const qee={variant:"subtle"},Wee=(e,{size:t,radius:n,iconSize:r})=>({root:{"--cb-size":jt(t,"cb-size"),"--cb-radius":n===void 0?void 0:Qn(n),"--cb-icon-size":Oe(r)}}),uh=mc((e,t)=>{const n=Pe("CloseButton",qee,e),{iconSize:r,children:o,vars:i,radius:s,className:a,classNames:c,style:u,styles:f,unstyled:p,"data-disabled":g,disabled:y,variant:v,icon:x,mod:S,__staticSelector:E,...C}=n,_=gt({name:E||"CloseButton",props:n,className:a,style:u,classes:O8,classNames:c,styles:f,unstyled:p,vars:i,varsResolver:Wee});return h.jsxs(Aa,{ref:t,...C,unstyled:p,variant:v,disabled:y,mod:[{disabled:y||g},S],..._("root",{variant:v,active:!y&&!g}),children:[x||h.jsx(C8,{}),o]})});uh.classes=O8;uh.displayName="@mantine/core/CloseButton";function Gee(e){return w.Children.toArray(e).filter(Boolean)}var j8={root:"m_4081bf90"};const Jee={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},Yee=(e,{grow:t,preventGrowOverflow:n,gap:r,align:o,justify:i,wrap:s},{childWidth:a})=>({root:{"--group-child-width":t&&n?a:void 0,"--group-gap":mO(r),"--group-align":o,"--group-justify":i,"--group-wrap":s}}),qO=Ue((e,t)=>{const n=Pe("Group",Jee,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,children:c,gap:u,align:f,justify:p,wrap:g,grow:y,preventGrowOverflow:v,vars:x,variant:S,__size:E,mod:C,..._}=n,j=Gee(c),A=j.length,T=mO(u??"md"),R={childWidth:`calc(${100/A}% - (${T} - ${T} / ${A}))`},V=gt({name:"Group",props:n,stylesCtx:R,className:o,style:i,classes:j8,classNames:r,styles:s,unstyled:a,vars:x,varsResolver:Yee});return h.jsx(Fe,{...V("root"),ref:t,variant:S,mod:[{grow:y},C],size:E,..._,children:j})});qO.classes=j8;qO.displayName="@mantine/core/Group";const[Kee,Da]=Pa("ModalBase component was not found in tree");function Xee({opened:e,transitionDuration:t}){const[n,r]=w.useState(e),o=w.useRef(-1),s=yO()?0:t;return w.useEffect(()=>(e?(r(!0),window.clearTimeout(o.current)):s===0?r(!1):o.current=window.setTimeout(()=>r(!1),s),()=>window.clearTimeout(o.current)),[e,s]),n}function Qee({id:e,transitionProps:t,opened:n,trapFocus:r,closeOnEscape:o,onClose:i,returnFocus:s}){const a=gi(e),[c,u]=w.useState(!1),[f,p]=w.useState(!1),g=typeof t?.duration=="number"?t?.duration:200,y=Xee({opened:n,transitionDuration:g});return ZN("keydown",v=>{v.key==="Escape"&&o&&!v.isComposing&&n&&v.target?.getAttribute("data-mantine-stop-propagation")!=="true"&&i()},{capture:!0}),y9({opened:n,shouldReturnFocus:r&&s}),{_id:a,titleMounted:c,bodyMounted:f,shouldLockScroll:y,setTitleMounted:u,setBodyMounted:p}}const A8=w.forwardRef(({keepMounted:e,opened:t,onClose:n,id:r,transitionProps:o,onExitTransitionEnd:i,onEnterTransitionEnd:s,trapFocus:a,closeOnEscape:c,returnFocus:u,closeOnClickOutside:f,withinPortal:p,portalProps:g,lockScroll:y,children:v,zIndex:x,shadow:S,padding:E,__vars:C,unstyled:_,removeScrollProps:j,...A},T)=>{const{_id:k,titleMounted:R,bodyMounted:V,shouldLockScroll:H,setTitleMounted:F,setBodyMounted:B}=Qee({id:r,transitionProps:o,opened:t,trapFocus:a,closeOnEscape:c,onClose:n,returnFocus:u}),{key:U,...M}=j||{};return h.jsx(Fu,{...g,withinPortal:p,children:h.jsx(Kee,{value:{opened:t,onClose:n,closeOnClickOutside:f,onExitTransitionEnd:i,onEnterTransitionEnd:s,transitionProps:{...o,keepMounted:e},getTitleId:()=>`${k}-title`,getBodyId:()=>`${k}-body`,titleMounted:R,bodyMounted:V,setTitleMounted:F,setBodyMounted:B,trapFocus:a,closeOnEscape:c,zIndex:x,unstyled:_},children:h.jsx(rv,{enabled:H&&y,...M,children:h.jsx(Fe,{ref:T,...A,__vars:{...C,"--mb-z-index":(x||ts("modal")).toString(),"--mb-shadow":gO(S),"--mb-padding":mO(E)},children:v})},U)})})});A8.displayName="@mantine/core/ModalBase";function Zee(){const e=Da();return w.useEffect(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var jf={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};const T8=w.forwardRef(({className:e,...t},n)=>{const r=Zee(),o=Da();return h.jsx(Fe,{ref:n,...t,id:r,className:pn({[jf.body]:!o.unstyled},e)})});T8.displayName="@mantine/core/ModalBaseBody";const $8=w.forwardRef(({className:e,onClick:t,...n},r)=>{const o=Da();return h.jsx(uh,{ref:r,...n,onClick:i=>{o.onClose(),t?.(i)},className:pn({[jf.close]:!o.unstyled},e),unstyled:o.unstyled})});$8.displayName="@mantine/core/ModalBaseCloseButton";const R8=w.forwardRef(({transitionProps:e,className:t,innerProps:n,onKeyDown:r,style:o,...i},s)=>{const a=Da();return h.jsx(yc,{mounted:a.opened,transition:"pop",...a.transitionProps,onExited:()=>{a.onExitTransitionEnd?.(),a.transitionProps?.onExited?.()},onEntered:()=>{a.onEnterTransitionEnd?.(),a.transitionProps?.onEntered?.()},...e,children:c=>h.jsx("div",{...n,className:pn({[jf.inner]:!a.unstyled},n.className),children:h.jsx(Px,{active:a.opened&&a.trapFocus,innerRef:s,children:h.jsx(VO,{...i,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":a.bodyMounted?a.getBodyId():void 0,"aria-labelledby":a.titleMounted?a.getTitleId():void 0,style:[o,c],className:pn({[jf.content]:!a.unstyled},t),unstyled:a.unstyled,children:i.children})})})})});R8.displayName="@mantine/core/ModalBaseContent";const k8=w.forwardRef(({className:e,...t},n)=>{const r=Da();return h.jsx(Fe,{component:"header",ref:n,className:pn({[jf.header]:!r.unstyled},e),...t})});k8.displayName="@mantine/core/ModalBaseHeader";const ete={duration:200,timingFunction:"ease",transition:"fade"};function tte(e){const t=Da();return{...ete,...t.transitionProps,...e}}const M8=w.forwardRef(({onClick:e,transitionProps:t,style:n,visible:r,...o},i)=>{const s=Da(),a=tte(t);return h.jsx(yc,{mounted:r!==void 0?r:s.opened,...a,transition:"fade",children:c=>h.jsx(Mx,{ref:i,fixed:!0,style:[n,c],zIndex:s.zIndex,unstyled:s.unstyled,onClick:u=>{e?.(u),s.closeOnClickOutside&&s.onClose()},...o})})});M8.displayName="@mantine/core/ModalBaseOverlay";function nte(){const e=Da();return w.useEffect(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}const P8=w.forwardRef(({className:e,...t},n)=>{const r=nte(),o=Da();return h.jsx(Fe,{component:"h2",ref:n,className:pn({[jf.title]:!o.unstyled},e),...t,id:r})});P8.displayName="@mantine/core/ModalBaseTitle";function rte({children:e}){return h.jsx(h.Fragment,{children:e})}const[ote,ite]=Lu({size:"sm"}),ste={},D8=Ue((e,t)=>{const n=Pe("InputClearButton",ste,e),{size:r,variant:o,vars:i,classNames:s,styles:a,...c}=n,u=ite(),{resolvedClassNames:f,resolvedStyles:p}=ih({classNames:s,styles:a,props:n});return h.jsx(uh,{variant:o||"transparent",ref:t,size:r||u?.size||"sm",classNames:f,styles:p,__staticSelector:"InputClearButton",...c})});D8.displayName="@mantine/core/InputClearButton";const[ate,dh]=Lu({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var bi={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};const WR={},lte=(e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${zr(t)} - ${Oe(2)})`}}),Dx=Ue((e,t)=>{const n=Pe("InputDescription",WR,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,vars:c,size:u,__staticSelector:f,__inheritStyles:p=!0,variant:g,...y}=Pe("InputDescription",WR,n),v=dh(),x=gt({name:["InputWrapper",f],props:n,classes:bi,className:o,style:i,classNames:r,styles:s,unstyled:a,rootSelector:"description",vars:c,varsResolver:lte}),S=p&&v?.getStyles||x;return h.jsx(Fe,{component:"p",ref:t,variant:g,size:u,...S("description",v?.getStyles?{className:o,style:i}:void 0),...y})});Dx.classes=bi;Dx.displayName="@mantine/core/InputDescription";const cte={},ute=(e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${zr(t)} - ${Oe(2)})`}}),Ix=Ue((e,t)=>{const n=Pe("InputError",cte,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,vars:c,size:u,__staticSelector:f,__inheritStyles:p=!0,variant:g,...y}=n,v=gt({name:["InputWrapper",f],props:n,classes:bi,className:o,style:i,classNames:r,styles:s,unstyled:a,rootSelector:"error",vars:c,varsResolver:ute}),x=dh(),S=p&&x?.getStyles||v;return h.jsx(Fe,{component:"p",ref:t,variant:g,size:u,...S("error",x?.getStyles?{className:o,style:i}:void 0),...y})});Ix.classes=bi;Ix.displayName="@mantine/core/InputError";const GR={labelElement:"label"},dte=(e,{size:t})=>({label:{"--input-label-size":zr(t),"--input-asterisk-color":void 0}}),Lx=Ue((e,t)=>{const n=Pe("InputLabel",GR,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,vars:c,labelElement:u,size:f,required:p,htmlFor:g,onMouseDown:y,children:v,__staticSelector:x,variant:S,mod:E,...C}=Pe("InputLabel",GR,n),_=gt({name:["InputWrapper",x],props:n,classes:bi,className:o,style:i,classNames:r,styles:s,unstyled:a,rootSelector:"label",vars:c,varsResolver:dte}),j=dh(),A=j?.getStyles||_;return h.jsxs(Fe,{...A("label",j?.getStyles?{className:o,style:i}:void 0),component:u,variant:S,size:f,ref:t,htmlFor:u==="label"?g:void 0,mod:[{required:p},E],onMouseDown:T=>{y?.(T),!T.defaultPrevented&&T.detail>1&&T.preventDefault()},...C,children:[v,p&&h.jsx("span",{...A("required"),"aria-hidden":!0,children:" *"})]})});Lx.classes=bi;Lx.displayName="@mantine/core/InputLabel";const JR={},WO=Ue((e,t)=>{const n=Pe("InputPlaceholder",JR,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,vars:c,__staticSelector:u,variant:f,error:p,mod:g,...y}=Pe("InputPlaceholder",JR,n),v=gt({name:["InputPlaceholder",u],props:n,classes:bi,className:o,style:i,classNames:r,styles:s,unstyled:a,rootSelector:"placeholder"});return h.jsx(Fe,{...v("placeholder"),mod:[{error:!!p},g],component:"span",variant:f,ref:t,...y})});WO.classes=bi;WO.displayName="@mantine/core/InputPlaceholder";function fte(e,{hasDescription:t,hasError:n}){const r=e.findIndex(c=>c==="input"),o=e.slice(0,r),i=e.slice(r+1),s=t&&o.includes("description")||n&&o.includes("error");return{offsetBottom:t&&i.includes("description")||n&&i.includes("error"),offsetTop:s}}const hte={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},pte=(e,{size:t})=>({label:{"--input-label-size":zr(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${zr(t)} - ${Oe(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${zr(t)} - ${Oe(2)})`}}),GO=Ue((e,t)=>{const n=Pe("InputWrapper",hte,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,vars:c,size:u,variant:f,__staticSelector:p,inputContainer:g,inputWrapperOrder:y,label:v,error:x,description:S,labelProps:E,descriptionProps:C,errorProps:_,labelElement:j,children:A,withAsterisk:T,id:k,required:R,__stylesApiProps:V,mod:H,...F}=n,B=gt({name:["InputWrapper",p],props:V||n,classes:bi,className:o,style:i,classNames:r,styles:s,unstyled:a,vars:c,varsResolver:pte}),U={size:u,variant:f,__staticSelector:p},M=gi(k),z=typeof T=="boolean"?T:R,$=_?.id||`${M}-error`,L=C?.id||`${M}-description`,P=M,q=!!x&&typeof x!="boolean",Y=!!S,D=`${q?$:""} ${Y?L:""}`,W=D.trim().length>0?D.trim():void 0,K=E?.id||`${M}-label`,Q=v&&h.jsx(Lx,{labelElement:j,id:K,htmlFor:P,required:z,...U,...E,children:v},"label"),ie=Y&&h.jsx(Dx,{...C,...U,size:C?.size||U.size,id:C?.id||L,children:S},"description"),pe=h.jsx(w.Fragment,{children:g(A)},"input"),ue=q&&w.createElement(Ix,{..._,...U,size:_?.size||U.size,key:"error",id:_?.id||$},x),se=y.map(me=>{switch(me){case"label":return Q;case"input":return pe;case"description":return ie;case"error":return ue;default:return null}});return h.jsx(ate,{value:{getStyles:B,describedBy:W,inputId:P,labelId:K,...fte(y,{hasDescription:Y,hasError:q})},children:h.jsx(Fe,{ref:t,variant:f,size:u,mod:[{error:!!x},H],...B("root"),...F,children:se})})});GO.classes=bi;GO.displayName="@mantine/core/InputWrapper";const mte={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0},gte=(e,t,n)=>({wrapper:{"--input-margin-top":n.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":n.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":jt(t.size,"input-height"),"--input-fz":zr(t.size),"--input-radius":t.radius===void 0?void 0:Qn(t.radius),"--input-left-section-width":t.leftSectionWidth!==void 0?Oe(t.leftSectionWidth):void 0,"--input-right-section-width":t.rightSectionWidth!==void 0?Oe(t.rightSectionWidth):void 0,"--input-padding-y":t.multiline?jt(t.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}}),Lt=mc((e,t)=>{const n=Pe("Input",mte,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,required:c,__staticSelector:u,__stylesApiProps:f,size:p,wrapperProps:g,error:y,disabled:v,leftSection:x,leftSectionProps:S,leftSectionWidth:E,rightSection:C,rightSectionProps:_,rightSectionWidth:j,rightSectionPointerEvents:A,leftSectionPointerEvents:T,variant:k,vars:R,pointer:V,multiline:H,radius:F,id:B,withAria:U,withErrorStyles:M,mod:z,inputSize:$,__clearSection:L,__clearable:P,__defaultRightSection:q,...Y}=n,{styleProps:D,rest:W}=sh(Y),K=dh(),Q={offsetBottom:K?.offsetBottom,offsetTop:K?.offsetTop},ie=gt({name:["Input",u],props:f||n,classes:bi,className:o,style:i,classNames:r,styles:s,unstyled:a,stylesCtx:Q,rootSelector:"wrapper",vars:R,varsResolver:gte}),pe=U?{required:c,disabled:v,"aria-invalid":!!y,"aria-describedby":K?.describedBy,id:K?.inputId||B}:{},ue=C||P&&L||q;return h.jsx(ote,{value:{size:p||"sm"},children:h.jsxs(Fe,{...ie("wrapper"),...D,...g,mod:[{error:!!y&&M,pointer:V,disabled:v,multiline:H,"data-with-right-section":!!ue,"data-with-left-section":!!x},z],variant:k,size:p,children:[x&&h.jsx("div",{...S,"data-position":"left",...ie("section",{className:S?.className,style:S?.style}),children:x}),h.jsx(Fe,{component:"input",...W,...pe,ref:t,required:c,mod:{disabled:v,error:!!y&&M},variant:k,__size:$,...ie("input")}),ue&&h.jsx("div",{..._,"data-position":"right",...ie("section",{className:_?.className,style:_?.style}),children:ue})]})})});Lt.classes=bi;Lt.Wrapper=GO;Lt.Label=Lx;Lt.Error=Ix;Lt.Description=Dx;Lt.Placeholder=WO;Lt.ClearButton=D8;Lt.displayName="@mantine/core/Input";function yte(e,t,n){const r=Pe(e,t,n),{label:o,description:i,error:s,required:a,classNames:c,styles:u,className:f,unstyled:p,__staticSelector:g,__stylesApiProps:y,errorProps:v,labelProps:x,descriptionProps:S,wrapperProps:E,id:C,size:_,style:j,inputContainer:A,inputWrapperOrder:T,withAsterisk:k,variant:R,vars:V,mod:H,...F}=r,{styleProps:B,rest:U}=sh(F),M={label:o,description:i,error:s,required:a,classNames:c,className:f,__staticSelector:g,__stylesApiProps:y||r,errorProps:v,labelProps:x,descriptionProps:S,unstyled:p,styles:u,size:_,style:j,inputContainer:A,inputWrapperOrder:T,withAsterisk:k,variant:R,id:C,mod:H,...E};return{...U,classNames:c,styles:u,unstyled:p,wrapperProps:{...M,...B},inputProps:{required:a,classNames:c,styles:u,unstyled:p,size:_,__staticSelector:g,__stylesApiProps:y||r,error:s,variant:R,id:C}}}const bte={__staticSelector:"InputBase",withAria:!0},vi=mc((e,t)=>{const{inputProps:n,wrapperProps:r,...o}=yte("InputBase",bte,e);return h.jsx(Lt.Wrapper,{...r,children:h.jsx(Lt,{...n,...o,ref:t})})});vi.classes={...Lt.classes,...Lt.Wrapper.classes};vi.displayName="@mantine/core/InputBase";function vte(e,t){if(!t||!e)return!1;let n=t.parentNode;for(;n!=null;){if(n===e)return!0;n=n.parentNode}return!1}function xte({target:e,parent:t,ref:n,displayAfterTransitionEnd:r}){const o=w.useRef(-1),[i,s]=w.useState(!1),[a,c]=w.useState(typeof r=="boolean"?r:!1),u=()=>{if(!e||!t||!n.current)return;const y=e.getBoundingClientRect(),v=t.getBoundingClientRect(),x=window.getComputedStyle(e),S=window.getComputedStyle(t),E=Ul(x.borderTopWidth)+Ul(S.borderTopWidth),C=Ul(x.borderLeftWidth)+Ul(S.borderLeftWidth),_={top:y.top-v.top-E,left:y.left-v.left-C,width:y.width,height:y.height};n.current.style.transform=`translateY(${_.top}px) translateX(${_.left}px)`,n.current.style.width=`${_.width}px`,n.current.style.height=`${_.height}px`},f=()=>{window.clearTimeout(o.current),n.current&&(n.current.style.transitionDuration="0ms"),u(),o.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration="")},30)},p=w.useRef(null),g=w.useRef(null);return w.useEffect(()=>{if(u(),e)return p.current=new ResizeObserver(f),p.current.observe(e),t&&(g.current=new ResizeObserver(f),g.current.observe(t)),()=>{p.current?.disconnect(),g.current?.disconnect()}},[t,e]),w.useEffect(()=>{if(t){const y=v=>{vte(v.target,t)&&(f(),c(!1))};return t.addEventListener("transitionend",y),()=>{t.removeEventListener("transitionend",y)}}},[t]),_X(()=>{E9()!=="test"&&s(!0)},20,{autoInvoke:!0}),jX(y=>{y.forEach(v=>{v.type==="attributes"&&v.attributeName==="dir"&&f()})},{attributes:!0,attributeFilter:["dir"]},()=>document.documentElement),{initialized:i,hidden:a}}var I8={root:"m_96b553a6"};const wte={},Ste=(e,{transitionDuration:t})=>({root:{"--transition-duration":typeof t=="number"?`${t}ms`:t}}),JO=Ue((e,t)=>{const n=Pe("FloatingIndicator",wte,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,vars:c,target:u,parent:f,transitionDuration:p,mod:g,displayAfterTransitionEnd:y,...v}=n,x=gt({name:"FloatingIndicator",classes:I8,props:n,className:o,style:i,classNames:r,styles:s,unstyled:a,vars:c,varsResolver:Ste}),S=w.useRef(null),{initialized:E,hidden:C}=xte({target:u,parent:f,ref:S,displayAfterTransitionEnd:y}),_=jn(t,S);return!u||!f?null:h.jsx(Fe,{ref:_,mod:[{initialized:E,hidden:C},g],...x("root"),...v})});JO.displayName="@mantine/core/FloatingIndicator";JO.classes=I8;function L8(e){return typeof e=="string"?{value:e,label:e}:"value"in e&&!("label"in e)?{value:e.value,label:e.value,disabled:e.disabled}:typeof e=="number"?{value:e.toString(),label:e.toString()}:"group"in e?{group:e.group,items:e.items.map(t=>L8(t))}:e}function F8(e){return e?e.map(t=>L8(t)):[]}function YO(e){return e.reduce((t,n)=>"group"in n?{...t,...YO(n.items)}:(t[n.value]=n,t),{})}var po={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2"};const Ete={error:null},Nte=(e,{size:t,color:n})=>({chevron:{"--combobox-chevron-size":jt(t,"combobox-chevron-size"),"--combobox-chevron-color":n?Sr(n,e):void 0}}),KO=Ue((e,t)=>{const n=Pe("ComboboxChevron",Ete,e),{size:r,error:o,style:i,className:s,classNames:a,styles:c,unstyled:u,vars:f,mod:p,...g}=n,y=gt({name:"ComboboxChevron",classes:po,props:n,style:i,className:s,classNames:a,styles:c,unstyled:u,vars:f,varsResolver:Nte,rootSelector:"chevron"});return h.jsx(Fe,{component:"svg",...g,...y("chevron"),size:r,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:o},p],ref:t,children:h.jsx("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});KO.classes=po;KO.displayName="@mantine/core/ComboboxChevron";const[_te,xi]=Pa("Combobox component was not found in tree"),z8=w.forwardRef(({size:e,onMouseDown:t,onClick:n,onClear:r,...o},i)=>h.jsx(Lt.ClearButton,{ref:i,tabIndex:-1,"aria-hidden":!0,...o,onMouseDown:s=>{s.preventDefault(),t?.(s)},onClick:s=>{r(),n?.(s)}}));z8.displayName="@mantine/core/ComboboxClearButton";const Cte={},XO=Ue((e,t)=>{const{classNames:n,styles:r,className:o,style:i,hidden:s,...a}=Pe("ComboboxDropdown",Cte,e),c=xi();return h.jsx(co.Dropdown,{...a,ref:t,role:"presentation","data-hidden":s||void 0,...c.getStyles("dropdown",{className:o,style:i,classNames:n,styles:r})})});XO.classes=po;XO.displayName="@mantine/core/ComboboxDropdown";const Ote={refProp:"ref"},B8=Ue((e,t)=>{const{children:n,refProp:r}=Pe("ComboboxDropdownTarget",Ote,e);if(xi(),!fc(n))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return h.jsx(co.Target,{ref:t,refProp:r,children:n})});B8.displayName="@mantine/core/ComboboxDropdownTarget";const jte={},QO=Ue((e,t)=>{const{classNames:n,className:r,style:o,styles:i,vars:s,...a}=Pe("ComboboxEmpty",jte,e),c=xi();return h.jsx(Fe,{ref:t,...c.getStyles("empty",{className:r,classNames:n,styles:i,style:o}),...a})});QO.classes=po;QO.displayName="@mantine/core/ComboboxEmpty";function ZO({onKeyDown:e,withKeyboardNavigation:t,withAriaAttributes:n,withExpandedAttribute:r,targetType:o,autoComplete:i}){const s=xi(),[a,c]=w.useState(null),u=p=>{if(e?.(p),!s.readOnly&&t){if(p.nativeEvent.isComposing)return;if(p.nativeEvent.code==="ArrowDown"&&(p.preventDefault(),s.store.dropdownOpened?c(s.store.selectNextOption()):(s.store.openDropdown("keyboard"),c(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),p.nativeEvent.code==="ArrowUp"&&(p.preventDefault(),s.store.dropdownOpened?c(s.store.selectPreviousOption()):(s.store.openDropdown("keyboard"),c(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),p.nativeEvent.code==="Enter"||p.nativeEvent.code==="NumpadEnter"){if(p.nativeEvent.keyCode===229)return;const g=s.store.getSelectedOptionIndex();s.store.dropdownOpened&&g!==-1?(p.preventDefault(),s.store.clickSelectedOption()):o==="button"&&(p.preventDefault(),s.store.openDropdown("keyboard"))}p.key==="Escape"&&s.store.closeDropdown("keyboard"),p.nativeEvent.code==="Space"&&o==="button"&&(p.preventDefault(),s.store.toggleDropdown("keyboard"))}};return{...n?{"aria-haspopup":"listbox","aria-expanded":r&&!!(s.store.listId&&s.store.dropdownOpened)||void 0,"aria-controls":s.store.dropdownOpened?s.store.listId:void 0,"aria-activedescendant":s.store.dropdownOpened&&a||void 0,autoComplete:i,"data-expanded":s.store.dropdownOpened||void 0,"data-mantine-stop-propagation":s.store.dropdownOpened||void 0}:{},onKeyDown:u}}const Ate={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},V8=Ue((e,t)=>{const{children:n,refProp:r,withKeyboardNavigation:o,withAriaAttributes:i,withExpandedAttribute:s,targetType:a,autoComplete:c,...u}=Pe("ComboboxEventsTarget",Ate,e);if(!fc(n))throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const f=xi(),p=ZO({targetType:a,withAriaAttributes:i,withKeyboardNavigation:o,withExpandedAttribute:s,onKeyDown:n.props.onKeyDown,autoComplete:c});return w.cloneElement(n,{...p,...u,[r]:jn(t,f.store.targetRef,Cx(n))})});V8.displayName="@mantine/core/ComboboxEventsTarget";const Tte={},ej=Ue((e,t)=>{const{classNames:n,className:r,style:o,styles:i,vars:s,...a}=Pe("ComboboxFooter",Tte,e),c=xi();return h.jsx(Fe,{ref:t,...c.getStyles("footer",{className:r,classNames:n,style:o,styles:i}),...a,onMouseDown:u=>{u.preventDefault()}})});ej.classes=po;ej.displayName="@mantine/core/ComboboxFooter";const $te={},tj=Ue((e,t)=>{const{classNames:n,className:r,style:o,styles:i,vars:s,children:a,label:c,...u}=Pe("ComboboxGroup",$te,e),f=xi();return h.jsxs(Fe,{ref:t,...f.getStyles("group",{className:r,classNames:n,style:o,styles:i}),...u,children:[c&&h.jsx("div",{...f.getStyles("groupLabel",{classNames:n,styles:i}),children:c}),a]})});tj.classes=po;tj.displayName="@mantine/core/ComboboxGroup";const Rte={},nj=Ue((e,t)=>{const{classNames:n,className:r,style:o,styles:i,vars:s,...a}=Pe("ComboboxHeader",Rte,e),c=xi();return h.jsx(Fe,{ref:t,...c.getStyles("header",{className:r,classNames:n,style:o,styles:i}),...a,onMouseDown:u=>{u.preventDefault()}})});nj.classes=po;nj.displayName="@mantine/core/ComboboxHeader";function U8({value:e,valuesDivider:t=",",...n}){return h.jsx("input",{type:"hidden",value:Array.isArray(e)?e.join(t):e||"",...n})}U8.displayName="@mantine/core/ComboboxHiddenInput";const kte={},rj=Ue((e,t)=>{const n=Pe("ComboboxOption",kte,e),{classNames:r,className:o,style:i,styles:s,vars:a,onClick:c,id:u,active:f,onMouseDown:p,onMouseOver:g,disabled:y,selected:v,mod:x,...S}=n,E=xi(),C=w.useId(),_=u||C;return h.jsx(Fe,{...E.getStyles("option",{className:o,classNames:r,styles:s,style:i}),...S,ref:t,id:_,mod:["combobox-option",{"combobox-active":f,"combobox-disabled":y,"combobox-selected":v},x],role:"option",onClick:j=>{y?j.preventDefault():(E.onOptionSubmit?.(n.value,n),c?.(j))},onMouseDown:j=>{j.preventDefault(),p?.(j)},onMouseOver:j=>{E.resetSelectionOnOptionHover&&E.store.resetSelectedOption(),g?.(j)}})});rj.classes=po;rj.displayName="@mantine/core/ComboboxOption";const Mte={},oj=Ue((e,t)=>{const n=Pe("ComboboxOptions",Mte,e),{classNames:r,className:o,style:i,styles:s,id:a,onMouseDown:c,labelledBy:u,...f}=n,p=xi(),g=gi(a);return w.useEffect(()=>{p.store.setListId(g)},[g]),h.jsx(Fe,{ref:t,...p.getStyles("options",{className:o,style:i,classNames:r,styles:s}),...f,id:g,role:"listbox","aria-labelledby":u,onMouseDown:y=>{y.preventDefault(),c?.(y)}})});oj.classes=po;oj.displayName="@mantine/core/ComboboxOptions";const Pte={withAriaAttributes:!0,withKeyboardNavigation:!0},ij=Ue((e,t)=>{const n=Pe("ComboboxSearch",Pte,e),{classNames:r,styles:o,unstyled:i,vars:s,withAriaAttributes:a,onKeyDown:c,withKeyboardNavigation:u,size:f,...p}=n,g=xi(),y=g.getStyles("search"),v=ZO({targetType:"input",withAriaAttributes:a,withKeyboardNavigation:u,withExpandedAttribute:!1,onKeyDown:c,autoComplete:"off"});return h.jsx(Lt,{ref:jn(t,g.store.searchRef),classNames:[{input:y.className},r],styles:[{input:y.style},o],size:f||g.size,...v,...p,__staticSelector:"Combobox"})});ij.classes=po;ij.displayName="@mantine/core/ComboboxSearch";const Dte={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},H8=Ue((e,t)=>{const{children:n,refProp:r,withKeyboardNavigation:o,withAriaAttributes:i,withExpandedAttribute:s,targetType:a,autoComplete:c,...u}=Pe("ComboboxTarget",Dte,e);if(!fc(n))throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const f=xi(),p=ZO({targetType:a,withAriaAttributes:i,withKeyboardNavigation:o,withExpandedAttribute:s,onKeyDown:n.props.onKeyDown,autoComplete:c}),g=w.cloneElement(n,{...p,...u});return h.jsx(co.Target,{ref:jn(t,f.store.targetRef),children:g})});H8.displayName="@mantine/core/ComboboxTarget";function Ite(e,t,n){for(let r=e-1;r>=0;r-=1)if(!t[r].hasAttribute("data-combobox-disabled"))return r;if(n){for(let r=t.length-1;r>-1;r-=1)if(!t[r].hasAttribute("data-combobox-disabled"))return r}return e}function Lte(e,t,n){for(let r=e+1;r{a||(c(!0),o?.($))},[c,o,a]),E=w.useCallback(($="unknown")=>{a&&(c(!1),r?.($))},[c,r,a]),C=w.useCallback(($="unknown")=>{a?E($):S($)},[E,S,a]),_=w.useCallback(()=>{const $=document.querySelector(`#${u.current} [data-combobox-selected]`);$?.removeAttribute("data-combobox-selected"),$?.removeAttribute("aria-selected")},[]),j=w.useCallback($=>{const P=document.getElementById(u.current)?.querySelectorAll("[data-combobox-option]");if(!P)return null;const q=$>=P.length?0:$<0?P.length-1:$;return f.current=q,P?.[q]&&!P[q].hasAttribute("data-combobox-disabled")?(_(),P[q].setAttribute("data-combobox-selected","true"),P[q].setAttribute("aria-selected","true"),P[q].scrollIntoView({block:"nearest",behavior:s}),P[q].id):null},[s,_]),A=w.useCallback(()=>{const $=document.querySelector(`#${u.current} [data-combobox-active]`);if($){const L=document.querySelectorAll(`#${u.current} [data-combobox-option]`),P=Array.from(L).findIndex(q=>q===$);return j(P)}return j(0)},[j]),T=w.useCallback(()=>j(Lte(f.current,document.querySelectorAll(`#${u.current} [data-combobox-option]`),i)),[j,i]),k=w.useCallback(()=>j(Ite(f.current,document.querySelectorAll(`#${u.current} [data-combobox-option]`),i)),[j,i]),R=w.useCallback(()=>j(Fte(document.querySelectorAll(`#${u.current} [data-combobox-option]`))),[j]),V=w.useCallback(($="selected",L)=>{x.current=window.setTimeout(()=>{const P=document.querySelectorAll(`#${u.current} [data-combobox-option]`),q=Array.from(P).findIndex(Y=>Y.hasAttribute(`data-combobox-${$}`));f.current=q,L?.scrollIntoView&&P[q]?.scrollIntoView({block:"nearest",behavior:s})},0)},[]),H=w.useCallback(()=>{f.current=-1,_()},[_]),F=w.useCallback(()=>{document.querySelectorAll(`#${u.current} [data-combobox-option]`)?.[f.current]?.click()},[]),B=w.useCallback($=>{u.current=$},[]),U=w.useCallback(()=>{y.current=window.setTimeout(()=>p.current.focus(),0)},[]),M=w.useCallback(()=>{v.current=window.setTimeout(()=>g.current.focus(),0)},[]),z=w.useCallback(()=>f.current,[]);return w.useEffect(()=>()=>{window.clearTimeout(y.current),window.clearTimeout(v.current),window.clearTimeout(x.current)},[]),{dropdownOpened:a,openDropdown:S,closeDropdown:E,toggleDropdown:C,selectedOptionIndex:f.current,getSelectedOptionIndex:z,selectOption:j,selectFirstOption:R,selectActiveOption:A,selectNextOption:T,selectPreviousOption:k,resetSelectedOption:H,updateSelectedOptionIndex:V,listId:u.current,setListId:B,clickSelectedOption:F,searchRef:p,focusSearchInput:U,targetRef:g,focusTarget:M}}const zte={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0}},Bte=(e,{size:t,dropdownPadding:n})=>({options:{"--combobox-option-fz":zr(t),"--combobox-option-padding":jt(t,"combobox-option-padding")},dropdown:{"--combobox-padding":n===void 0?void 0:Oe(n),"--combobox-option-fz":zr(t),"--combobox-option-padding":jt(t,"combobox-option-padding")}});function Ct(e){const t=Pe("Combobox",zte,e),{classNames:n,styles:r,unstyled:o,children:i,store:s,vars:a,onOptionSubmit:c,onClose:u,size:f,dropdownPadding:p,resetSelectionOnOptionHover:g,__staticSelector:y,readOnly:v,...x}=t,S=sj(),E=s||S,C=gt({name:y||"Combobox",classes:po,props:t,classNames:n,styles:r,unstyled:o,vars:a,varsResolver:Bte}),_=()=>{u?.(),E.closeDropdown()};return h.jsx(_te,{value:{getStyles:C,store:E,onOptionSubmit:c,size:f,resetSelectionOnOptionHover:g,readOnly:v},children:h.jsx(co,{opened:E.dropdownOpened,...x,onChange:j=>!j&&_(),withRoles:!1,unstyled:o,children:i})})}const Vte=e=>e;Ct.extend=Vte;Ct.classes=po;Ct.displayName="@mantine/core/Combobox";Ct.Target=H8;Ct.Dropdown=XO;Ct.Options=oj;Ct.Option=rj;Ct.Search=ij;Ct.Empty=QO;Ct.Chevron=KO;Ct.Footer=ej;Ct.Header=nj;Ct.EventsTarget=V8;Ct.DropdownTarget=B8;Ct.Group=tj;Ct.ClearButton=z8;Ct.HiddenInput=U8;var q8={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const Ute=q8,aj=w.forwardRef(({__staticSelector:e,__stylesApiProps:t,className:n,classNames:r,styles:o,unstyled:i,children:s,label:a,description:c,id:u,disabled:f,error:p,size:g,labelPosition:y="left",bodyElement:v="div",labelElement:x="label",variant:S,style:E,vars:C,mod:_,...j},A)=>{const T=gt({name:e,props:t,className:n,style:E,classes:q8,classNames:r,styles:o,unstyled:i});return h.jsx(Fe,{...T("root"),ref:A,__vars:{"--label-fz":zr(g),"--label-lh":jt(g,"label-lh")},mod:[{"label-position":y},_],variant:S,size:g,...j,children:h.jsxs(Fe,{component:v,htmlFor:v==="label"?u:void 0,...T("body"),children:[s,h.jsxs("div",{...T("labelWrapper"),"data-disabled":f||void 0,children:[a&&h.jsx(Fe,{component:x,htmlFor:x==="label"?u:void 0,...T("label"),"data-disabled":f||void 0,children:a}),c&&h.jsx(Lt.Description,{size:g,__inheritStyles:!1,...T("description"),children:c}),p&&typeof p!="boolean"&&h.jsx(Lt.Error,{size:g,__inheritStyles:!1,...T("error"),children:p})]})]})})});aj.displayName="@mantine/core/InlineInput";function W8({children:e,role:t}){const n=dh();return n?h.jsx("div",{role:t,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:e}):h.jsx(h.Fragment,{children:e})}function Hte({size:e,style:t,...n}){const r=e!==void 0?{width:Oe(e),height:Oe(e),...t}:t;return h.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:r,"aria-hidden":!0,...n,children:h.jsx("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function Af(e){return"group"in e}function G8({options:e,search:t,limit:n}){const r=t.trim().toLowerCase(),o=[];for(let i=0;i0)return!1;return!0}function J8(e,t=new Set){if(Array.isArray(e))for(const n of e)if(Af(n))J8(n.items,t);else{if(typeof n.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(typeof n.value!="string")throw new Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof n.value}`);if(t.has(n.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);t.add(n.value)}}function Wte(e,t){return Array.isArray(e)?e.includes(t):e===t}function Y8({data:e,withCheckIcon:t,value:n,checkIconPosition:r,unstyled:o,renderOption:i}){if(!Af(e)){const a=Wte(n,e.value),c=t&&a&&h.jsx(Hte,{className:po.optionsDropdownCheckIcon}),u=h.jsxs(h.Fragment,{children:[r==="left"&&c,h.jsx("span",{children:e.label}),r==="right"&&c]});return h.jsx(Ct.Option,{value:e.value,disabled:e.disabled,className:pn({[po.optionsDropdownOption]:!o}),"data-reverse":r==="right"||void 0,"data-checked":a||void 0,"aria-selected":a,active:a,children:typeof i=="function"?i({option:e,checked:a}):u})}const s=e.items.map(a=>h.jsx(Y8,{data:a,value:n,unstyled:o,withCheckIcon:t,checkIconPosition:r,renderOption:i},a.value));return h.jsx(Ct.Group,{label:e.group,children:s})}function K8({data:e,hidden:t,hiddenWhenEmpty:n,filter:r,search:o,limit:i,maxDropdownHeight:s,withScrollArea:a=!0,filterOptions:c=!0,withCheckIcon:u=!1,value:f,checkIconPosition:p,nothingFoundMessage:g,unstyled:y,labelId:v,renderOption:x,scrollAreaProps:S,"aria-label":E}){J8(e);const _=typeof o=="string"?(r||G8)({options:e,search:c?o:"",limit:i??1/0}):e,j=qte(_),A=_.map(T=>h.jsx(Y8,{data:T,withCheckIcon:u,value:f,checkIconPosition:p,unstyled:y,renderOption:x},Af(T)?T.group:T.value));return h.jsx(Ct.Dropdown,{hidden:t||n&&j,"data-composed":!0,children:h.jsxs(Ct.Options,{labelledBy:v,"aria-label":E,children:[a?h.jsx(ch.Autosize,{mah:s??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",...S,children:A}):A,j&&g&&h.jsx(Ct.Empty,{children:g})]})})}var fh={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const YR={orientation:"horizontal"},Gte=(e,{borderWidth:t})=>({group:{"--button-border-width":Oe(t)}}),lj=Ue((e,t)=>{const n=Pe("ButtonGroup",YR,e),{className:r,style:o,classNames:i,styles:s,unstyled:a,orientation:c,vars:u,borderWidth:f,variant:p,mod:g,...y}=Pe("ButtonGroup",YR,e),v=gt({name:"ButtonGroup",props:n,classes:fh,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:u,varsResolver:Gte,rootSelector:"group"});return h.jsx(Fe,{...v("group"),ref:t,variant:p,mod:[{"data-orientation":c},g],role:"group",...y})});lj.classes=fh;lj.displayName="@mantine/core/ButtonGroup";const KR={},Jte=(e,{radius:t,color:n,gradient:r,variant:o,autoContrast:i,size:s})=>{const a=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:o||"filled",autoContrast:i});return{groupSection:{"--section-height":jt(s,"section-height"),"--section-padding-x":jt(s,"section-padding-x"),"--section-fz":s?.includes("compact")?zr(s.replace("compact-","")):zr(s),"--section-radius":t===void 0?void 0:Qn(t),"--section-bg":n||o?a.background:void 0,"--section-color":a.color,"--section-bd":n||o?a.border:void 0}}},cj=Ue((e,t)=>{const n=Pe("ButtonGroupSection",KR,e),{className:r,style:o,classNames:i,styles:s,unstyled:a,vars:c,variant:u,gradient:f,radius:p,autoContrast:g,...y}=Pe("ButtonGroupSection",KR,e),v=gt({name:"ButtonGroupSection",props:n,classes:fh,className:r,style:o,classNames:i,styles:s,unstyled:a,vars:c,varsResolver:Jte,rootSelector:"groupSection"});return h.jsx(Fe,{...v("groupSection"),ref:t,variant:u,...y})});cj.classes=fh;cj.displayName="@mantine/core/ButtonGroupSection";const Yte={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${Oe(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},Kte={},Xte=(e,{radius:t,color:n,gradient:r,variant:o,size:i,justify:s,autoContrast:a})=>{const c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:o||"filled",autoContrast:a});return{root:{"--button-justify":s,"--button-height":jt(i,"button-height"),"--button-padding-x":jt(i,"button-padding-x"),"--button-fz":i?.includes("compact")?zr(i.replace("compact-","")):zr(i),"--button-radius":t===void 0?void 0:Qn(t),"--button-bg":n||o?c.background:void 0,"--button-hover":n||o?c.hover:void 0,"--button-color":c.color,"--button-bd":n||o?c.border:void 0,"--button-hover-color":n||o?c.hoverColor:void 0}}},Nu=mc((e,t)=>{const n=Pe("Button",Kte,e),{style:r,vars:o,className:i,color:s,disabled:a,children:c,leftSection:u,rightSection:f,fullWidth:p,variant:g,radius:y,loading:v,loaderProps:x,gradient:S,classNames:E,styles:C,unstyled:_,"data-disabled":j,autoContrast:A,mod:T,...k}=n,R=gt({name:"Button",props:n,classes:fh,className:i,style:r,classNames:E,styles:C,unstyled:_,vars:o,varsResolver:Xte}),V=!!u,H=!!f;return h.jsxs(Aa,{ref:t,...R("root",{active:!a&&!v&&!j}),unstyled:_,variant:g,disabled:a||v,mod:[{disabled:a||j,loading:v,block:p,"with-left-section":V,"with-right-section":H},T],...k,children:[h.jsx(yc,{mounted:!!v,transition:Yte,duration:150,children:F=>h.jsx(Fe,{component:"span",...R("loader",{style:F}),"aria-hidden":!0,children:h.jsx(Rg,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...x})})}),h.jsxs("span",{...R("inner"),children:[u&&h.jsx(Fe,{component:"span",...R("section"),mod:{position:"left"},children:u}),h.jsx(Fe,{component:"span",mod:{loading:v},...R("label"),children:c}),f&&h.jsx(Fe,{component:"span",...R("section"),mod:{position:"right"},children:f})]})]})});Nu.classes=fh;Nu.displayName="@mantine/core/Button";Nu.Group=lj;Nu.GroupSection=cj;function Qte({open:e,close:t,openDelay:n,closeDelay:r}){const o=w.useRef(-1),i=w.useRef(-1),s=()=>{window.clearTimeout(o.current),window.clearTimeout(i.current)},a=()=>{s(),n===0||n===void 0?e():o.current=window.setTimeout(e,n)},c=()=>{s(),r===0||r===void 0?t():i.current=window.setTimeout(t,r)};return w.useEffect(()=>s,[]),{openDropdown:a,closeDropdown:c}}function Tf(){return Tf=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{autosize:n,maxRows:r,minRows:o,__staticSelector:i,resize:s,...a}=Pe("Textarea",mne,e),c=n&&E9()!=="test",u=c?{maxRows:r,minRows:o}:{};return h.jsx(vi,{component:c?pne:"textarea",ref:t,...a,__staticSelector:i||"Textarea",multiline:!0,"data-no-overflow":n&&r===void 0||void 0,__vars:{"--input-resize":s},...u})});kg.classes=vi.classes;kg.displayName="@mantine/core/Textarea";const[gne,Mg]=Pa("Menu component was not found in the tree");var hh={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504"};const yne={},fj=Ue((e,t)=>{const{classNames:n,className:r,style:o,styles:i,vars:s,...a}=Pe("MenuDivider",yne,e),c=Mg();return h.jsx(Fe,{ref:t,...c.getStyles("divider",{className:r,style:o,styles:i,classNames:n}),...a})});fj.classes=hh;fj.displayName="@mantine/core/MenuDivider";const bne={},hj=Ue((e,t)=>{const{classNames:n,className:r,style:o,styles:i,vars:s,onMouseEnter:a,onMouseLeave:c,onKeyDown:u,children:f,...p}=Pe("MenuDropdown",bne,e),g=w.useRef(null),y=Mg(),v=Ss(u,E=>{(E.key==="ArrowUp"||E.key==="ArrowDown")&&(E.preventDefault(),g.current?.querySelectorAll("[data-menu-item]:not(:disabled)")[0]?.focus())}),x=Ss(a,()=>(y.trigger==="hover"||y.trigger==="click-hover")&&y.openDropdown()),S=Ss(c,()=>(y.trigger==="hover"||y.trigger==="click-hover")&&y.closeDropdown());return h.jsxs(co.Dropdown,{...p,onMouseEnter:x,onMouseLeave:S,role:"menu","aria-orientation":"vertical",ref:jn(t,g),...y.getStyles("dropdown",{className:r,style:o,styles:i,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:v,children:[y.withInitialFocusPlaceholder&&h.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),f]})});hj.classes=hh;hj.displayName="@mantine/core/MenuDropdown";const vne={},pj=mc((e,t)=>{const{classNames:n,className:r,style:o,styles:i,vars:s,color:a,closeMenuOnClick:c,leftSection:u,rightSection:f,children:p,disabled:g,"data-disabled":y,...v}=Pe("MenuItem",vne,e),x=Mg(),S=zo(),{dir:E}=gc(),C=w.useRef(null),_=x.getItemIndex(C.current),j=v,A=Ss(j.onMouseLeave,()=>x.setHovered(-1)),T=Ss(j.onMouseEnter,()=>x.setHovered(x.getItemIndex(C.current))),k=Ss(j.onClick,()=>{y||(typeof c=="boolean"?c&&x.closeDropdownImmediately():x.closeOnItemClick&&x.closeDropdownImmediately())}),R=Ss(j.onFocus,()=>x.setHovered(x.getItemIndex(C.current))),V=a?S.variantColorResolver({color:a,theme:S,variant:"light"}):void 0,H=a?pc({color:a,theme:S}):null;return h.jsxs(Aa,{...v,unstyled:x.unstyled,tabIndex:x.menuItemTabIndex,onFocus:R,...x.getStyles("item",{className:r,style:o,styles:i,classNames:n}),ref:jn(C,t),role:"menuitem",disabled:g,"data-menu-item":!0,"data-disabled":g||y||void 0,"data-hovered":x.hovered===_?!0:void 0,"data-mantine-stop-propagation":!0,onMouseEnter:T,onMouseLeave:A,onClick:k,onKeyDown:g9({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:x.loop,dir:E,orientation:"vertical",onKeyDown:j.onKeyDown}),__vars:{"--menu-item-color":H?.isThemeColor&&H?.shade===void 0?`var(--mantine-color-${H.color}-6)`:V?.color,"--menu-item-hover":V?.hover},children:[u&&h.jsx("div",{...x.getStyles("itemSection",{styles:i,classNames:n}),"data-position":"left",children:u}),p&&h.jsx("div",{...x.getStyles("itemLabel",{styles:i,classNames:n}),children:p}),f&&h.jsx("div",{...x.getStyles("itemSection",{styles:i,classNames:n}),"data-position":"right",children:f})]})});pj.classes=hh;pj.displayName="@mantine/core/MenuItem";const xne={},mj=Ue((e,t)=>{const{classNames:n,className:r,style:o,styles:i,vars:s,...a}=Pe("MenuLabel",xne,e),c=Mg();return h.jsx(Fe,{ref:t,...c.getStyles("label",{className:r,style:o,styles:i,classNames:n}),...a})});mj.classes=hh;mj.displayName="@mantine/core/MenuLabel";const wne={refProp:"ref"},X8=w.forwardRef((e,t)=>{const{children:n,refProp:r,...o}=Pe("MenuTarget",wne,e);if(!fc(n))throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const i=Mg(),s=n.props,a=Ss(s.onClick,()=>{i.trigger==="click"?i.toggleDropdown():i.trigger==="click-hover"&&(i.setOpenedViaClick(!0),i.opened||i.openDropdown())}),c=Ss(s.onMouseEnter,()=>(i.trigger==="hover"||i.trigger==="click-hover")&&i.openDropdown()),u=Ss(s.onMouseLeave,()=>{(i.trigger==="hover"||i.trigger==="click-hover"&&!i.openedViaClick)&&i.closeDropdown()});return h.jsx(co.Target,{refProp:r,popupType:"menu",ref:t,...o,children:w.cloneElement(n,{onClick:a,onMouseEnter:c,onMouseLeave:u,"data-expanded":i.opened?!0:void 0})})});X8.displayName="@mantine/core/MenuTarget";const Sne={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1};function Lr(e){const t=Pe("Menu",Sne,e),{children:n,onOpen:r,onClose:o,opened:i,defaultOpened:s,trapFocus:a,onChange:c,closeOnItemClick:u,loop:f,closeOnEscape:p,trigger:g,openDelay:y,closeDelay:v,classNames:x,styles:S,unstyled:E,variant:C,vars:_,menuItemTabIndex:j,keepMounted:A,withInitialFocusPlaceholder:T,...k}=t,R=gt({name:"Menu",classes:hh,props:t,classNames:x,styles:S,unstyled:E}),[V,{setHovered:H,resetHovered:F}]=ZK(),[B,U]=ho({value:i,defaultValue:s,finalValue:!1,onChange:c}),[M,z]=w.useState(!1),$=()=>{U(!1),z(!1),B&&o?.()},L=()=>{U(!0),!B&&r?.()},P=()=>{B?$():L()},{openDropdown:q,closeDropdown:Y}=Qte({open:L,close:$,closeDelay:v,openDelay:y}),D=Q=>QK("[data-menu-item]","[data-menu-dropdown]",Q),{resolvedClassNames:W,resolvedStyles:K}=ih({classNames:x,styles:S,props:t});return _a(()=>{F()},[B]),h.jsx(gne,{value:{getStyles:R,opened:B,toggleDropdown:P,getItemIndex:D,hovered:V,setHovered:H,openedViaClick:M,setOpenedViaClick:z,closeOnItemClick:u,closeDropdown:g==="click"?$:Y,openDropdown:g==="click"?L:q,closeDropdownImmediately:$,loop:f,trigger:g,unstyled:E,menuItemTabIndex:j,withInitialFocusPlaceholder:T},children:h.jsx(co,{...k,opened:B,onChange:P,defaultOpened:s,trapFocus:A?!1:a,closeOnEscape:p,__staticSelector:"Menu",classNames:W,styles:K,unstyled:E,variant:C,keepMounted:A,children:n})})}Lr.extend=e=>e;Lr.withProps=HQ(Lr);Lr.classes=hh;Lr.displayName="@mantine/core/Menu";Lr.Item=pj;Lr.Label=mj;Lr.Dropdown=hj;Lr.Target=X8;Lr.Divider=fj;const[Ene,ph]=Pa("Modal component was not found in tree");var Ia={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const Nne={},Fx=Ue((e,t)=>{const n=Pe("ModalBody",Nne,e),{classNames:r,className:o,style:i,styles:s,vars:a,...c}=n,u=ph();return h.jsx(T8,{ref:t,...u.getStyles("body",{classNames:r,style:i,styles:s,className:o}),...c})});Fx.classes=Ia;Fx.displayName="@mantine/core/ModalBody";const _ne={},zx=Ue((e,t)=>{const n=Pe("ModalCloseButton",_ne,e),{classNames:r,className:o,style:i,styles:s,vars:a,...c}=n,u=ph();return h.jsx($8,{ref:t,...u.getStyles("close",{classNames:r,style:i,styles:s,className:o}),...c})});zx.classes=Ia;zx.displayName="@mantine/core/ModalCloseButton";const Cne={},Bx=Ue((e,t)=>{const n=Pe("ModalContent",Cne,e),{classNames:r,className:o,style:i,styles:s,vars:a,children:c,__hidden:u,...f}=n,p=ph(),g=p.scrollAreaComponent||rte;return h.jsx(R8,{...p.getStyles("content",{className:o,style:i,styles:s,classNames:r}),innerProps:p.getStyles("inner",{className:o,style:i,styles:s,classNames:r}),"data-full-screen":p.fullScreen||void 0,"data-modal-content":!0,"data-hidden":u||void 0,ref:t,...f,children:h.jsx(g,{style:{maxHeight:p.fullScreen?"100dvh":`calc(100dvh - (${Oe(p.yOffset)} * 2))`},children:c})})});Bx.classes=Ia;Bx.displayName="@mantine/core/ModalContent";const One={},Vx=Ue((e,t)=>{const n=Pe("ModalHeader",One,e),{classNames:r,className:o,style:i,styles:s,vars:a,...c}=n,u=ph();return h.jsx(k8,{ref:t,...u.getStyles("header",{classNames:r,style:i,styles:s,className:o}),...c})});Vx.classes=Ia;Vx.displayName="@mantine/core/ModalHeader";const jne={},Ux=Ue((e,t)=>{const n=Pe("ModalOverlay",jne,e),{classNames:r,className:o,style:i,styles:s,vars:a,...c}=n,u=ph();return h.jsx(M8,{ref:t,...u.getStyles("overlay",{classNames:r,style:i,styles:s,className:o}),...c})});Ux.classes=Ia;Ux.displayName="@mantine/core/ModalOverlay";const Ane={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ts("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},Tne=(e,{radius:t,size:n,yOffset:r,xOffset:o})=>({root:{"--modal-radius":t===void 0?void 0:Qn(t),"--modal-size":jt(n,"modal-size"),"--modal-y-offset":Oe(r),"--modal-x-offset":Oe(o)}}),Hx=Ue((e,t)=>{const n=Pe("ModalRoot",Ane,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,vars:c,yOffset:u,scrollAreaComponent:f,radius:p,fullScreen:g,centered:y,xOffset:v,__staticSelector:x,...S}=n,E=gt({name:x,classes:Ia,props:n,className:o,style:i,classNames:r,styles:s,unstyled:a,vars:c,varsResolver:Tne});return h.jsx(Ene,{value:{yOffset:u,scrollAreaComponent:f,getStyles:E,fullScreen:g},children:h.jsx(A8,{ref:t,...E("root"),"data-full-screen":g||void 0,"data-centered":y||void 0,"data-offset-scrollbars":f===ch.Autosize||void 0,unstyled:a,...S})})});Hx.classes=Ia;Hx.displayName="@mantine/core/ModalRoot";const[$ne,Rne]=Lu();function Q8({children:e}){const[t,n]=w.useState([]),[r,o]=w.useState(ts("modal"));return h.jsx($ne,{value:{stack:t,addModal:(i,s)=>{n(a=>[...new Set([...a,i])]),o(a=>typeof s=="number"&&typeof a=="number"?Math.max(a,s):a)},removeModal:i=>n(s=>s.filter(a=>a!==i)),getZIndex:i=>`calc(${r} + ${t.indexOf(i)} + 1)`,currentId:t[t.length-1],maxZIndex:r},children:e})}Q8.displayName="@mantine/core/ModalStack";const kne={},qx=Ue((e,t)=>{const n=Pe("ModalTitle",kne,e),{classNames:r,className:o,style:i,styles:s,vars:a,...c}=n,u=ph();return h.jsx(P8,{ref:t,...u.getStyles("title",{classNames:r,style:i,styles:s,className:o}),...c})});qx.classes=Ia;qx.displayName="@mantine/core/ModalTitle";const Mne={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ts("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},Bo=Ue((e,t)=>{const{title:n,withOverlay:r,overlayProps:o,withCloseButton:i,closeButtonProps:s,children:a,radius:c,opened:u,stackId:f,zIndex:p,...g}=Pe("Modal",Mne,e),y=Rne(),v=!!n||i,x=y&&f?{closeOnEscape:y.currentId===f,trapFocus:y.currentId===f,zIndex:y.getZIndex(f)}:{},S=r===!1?!1:f&&y?y.currentId===f:u;return w.useEffect(()=>{y&&f&&(u?y.addModal(f,p||ts("modal")):y.removeModal(f))},[u,f,p]),h.jsxs(Hx,{ref:t,radius:c,opened:u,zIndex:y&&f?y.getZIndex(f):p,...g,...x,children:[r&&h.jsx(Ux,{visible:S,transitionProps:y&&f?{duration:0}:void 0,...o}),h.jsxs(Bx,{radius:c,__hidden:y&&f&&u?f!==y.currentId:!1,children:[v&&h.jsxs(Vx,{children:[n&&h.jsx(qx,{children:n}),i&&h.jsx(zx,{...s})]}),h.jsx(Fx,{children:a})]})]})});Bo.classes=Ia;Bo.displayName="@mantine/core/Modal";Bo.Root=Hx;Bo.Overlay=Ux;Bo.Content=Bx;Bo.Body=Fx;Bo.Header=Vx;Bo.Title=qx;Bo.CloseButton=zx;Bo.Stack=Q8;const[Pne,gj]=Lu(),[Dne,Ine]=Lu();var Wx={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const Lne={},Fne=(e,{gap:t},{size:n})=>({group:{"--pg-gap":t!==void 0?jt(t):jt(n,"pg-gap")}}),yj=Ue((e,t)=>{const n=Pe("PillGroup",Lne,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,vars:c,size:u,disabled:f,...p}=n,y=gj()?.size||u||void 0,v=gt({name:"PillGroup",classes:Wx,props:n,className:o,style:i,classNames:r,styles:s,unstyled:a,vars:c,varsResolver:Fne,stylesCtx:{size:y},rootSelector:"group"});return h.jsx(Dne,{value:{size:y,disabled:f},children:h.jsx(Fe,{ref:t,size:y,...v("group"),...p})})});yj.classes=Wx;yj.displayName="@mantine/core/PillGroup";const zne={variant:"default"},Bne=(e,{radius:t},{size:n})=>({root:{"--pill-fz":jt(n,"pill-fz"),"--pill-height":jt(n,"pill-height"),"--pill-radius":t===void 0?void 0:Qn(t)}}),Am=Ue((e,t)=>{const n=Pe("Pill",zne,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,vars:c,variant:u,children:f,withRemoveButton:p,onRemove:g,removeButtonProps:y,radius:v,size:x,disabled:S,mod:E,...C}=n,_=Ine(),j=gj(),A=x||_?.size||void 0,T=j?.variant==="filled"?"contrast":u||"default",k=gt({name:"Pill",classes:Wx,props:n,className:o,style:i,classNames:r,styles:s,unstyled:a,vars:c,varsResolver:Bne,stylesCtx:{size:A}});return h.jsxs(Fe,{component:"span",ref:t,variant:T,size:A,...k("root",{variant:T}),mod:[{"with-remove":p&&!S,disabled:S||_?.disabled},E],...C,children:[h.jsx("span",{...k("label"),children:f}),p&&h.jsx(uh,{variant:"transparent",radius:v,tabIndex:-1,"aria-hidden":!0,unstyled:a,...y,...k("remove",{className:y?.className,style:y?.style}),onMouseDown:R=>{R.preventDefault(),R.stopPropagation(),y?.onMouseDown?.(R)},onClick:R=>{R.stopPropagation(),g?.(),y?.onClick?.(R)}})]})});Am.classes=Wx;Am.displayName="@mantine/core/Pill";Am.Group=yj;var Z8={field:"m_45c4369d"};const Vne={type:"visible"},bj=Ue((e,t)=>{const n=Pe("PillsInputField",Vne,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,vars:c,type:u,disabled:f,id:p,pointer:g,mod:y,...v}=n,x=gj(),S=dh(),E=gt({name:"PillsInputField",classes:Z8,props:n,className:o,style:i,classNames:r,styles:s,unstyled:a,rootSelector:"field"}),C=f||x?.disabled;return h.jsx(Fe,{component:"input",ref:jn(t,x?.fieldRef),"data-type":u,disabled:C,mod:[{disabled:C,pointer:g},y],...E("field"),...v,id:S?.inputId||p,"aria-invalid":x?.hasError,"aria-describedby":S?.describedBy,type:"text",onMouseDown:_=>!g&&_.stopPropagation()})});bj.classes=Z8;bj.displayName="@mantine/core/PillsInputField";const Une={},dv=Ue((e,t)=>{const n=Pe("PillsInput",Une,e),{children:r,onMouseDown:o,onClick:i,size:s,disabled:a,__staticSelector:c,error:u,variant:f,...p}=n,g=w.useRef(null);return h.jsx(Pne,{value:{fieldRef:g,size:s,disabled:a,hasError:!!u,variant:f},children:h.jsx(vi,{size:s,error:u,variant:f,component:"div",ref:t,onMouseDown:y=>{y.preventDefault(),o?.(y),g.current?.focus()},onClick:y=>{y.preventDefault(),y.currentTarget.closest("fieldset")?.disabled||(g.current?.focus(),i?.(y))},...p,multiline:!0,disabled:a,__staticSelector:c||"PillsInput",withAria:!1,children:r})})});dv.displayName="@mantine/core/PillsInput";dv.Field=bj;var eL={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const Hne={withCloseButton:!0},qne=(e,{radius:t,color:n})=>({root:{"--notification-radius":t===void 0?void 0:Qn(t),"--notification-color":n?Sr(n,e):void 0}}),vj=Ue((e,t)=>{const n=Pe("Notification",Hne,e),{className:r,color:o,radius:i,loading:s,withCloseButton:a,withBorder:c,title:u,icon:f,children:p,onClose:g,closeButtonProps:y,classNames:v,style:x,styles:S,unstyled:E,variant:C,vars:_,mod:j,loaderProps:A,role:T,...k}=n,R=gt({name:"Notification",classes:eL,props:n,className:r,style:x,classNames:v,styles:S,unstyled:E,vars:_,varsResolver:qne});return h.jsxs(Fe,{...R("root"),mod:[{"data-with-icon":!!f||s,"data-with-border":c},j],ref:t,variant:C,role:T||"alert",...k,children:[f&&!s&&h.jsx("div",{...R("icon"),children:f}),s&&h.jsx(Rg,{size:28,color:o,...A,...R("loader")}),h.jsxs("div",{...R("body"),children:[u&&h.jsx("div",{...R("title"),children:u}),h.jsx(Fe,{...R("description"),mod:{"data-with-title":!!u},children:p})]}),a&&h.jsx(uh,{iconSize:16,color:"gray",...y,unstyled:E,onClick:g,...R("closeButton")})]})});vj.classes=eL;vj.displayName="@mantine/core/Notification";function tL(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o=a?o=o+nk("0",s-a):o=(o.substring(0,s)||"0")+"."+o.substring(s),n+o}function rk(e,t,n){if(["","-"].indexOf(e)!==-1)return e;var r=(e.indexOf(".")!==-1||n)&&t,o=xj(e),i=o.beforeDecimal,s=o.afterDecimal,a=o.hasNegation,c=parseFloat("0."+(s||"0")),u=s.length<=t?"0."+s:c.toFixed(t),f=u.split("."),p=i;i&&Number(f[0])&&(p=i.split("").reverse().reduce(function(x,S,E){return x.length>E?(Number(x[0])+Number(S)).toString()+x.substring(1,x.length):S+x},f[0]));var g=oL(f[1]||"",t,n),y=a?"-":"",v=r?".":"";return""+y+p+v+g}function ou(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var sL=Wne(function(e,t){for(var n=0,r=0,o=e.length,i=t.length;e[n]===t[n]&&nn&&o-r>n;)r++;return{from:{start:n,end:o-r},to:{start:n,end:i-r}}}),Qne=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function Zne(e,t,n){return Math.min(Math.max(e,t),n)}function s2(e){return Math.max(e.selectionStart,e.selectionEnd)}function ere(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function tre(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function nre(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,o=e.formattedValueIndex;return t[r]===n[o]}function rre(e,t,n,r,o,i,s){s===void 0&&(s=nre);var a=o.findIndex(function(j){return j}),c=e.slice(0,a);!t&&!n.startsWith(c)&&(t=c,n=c+n,r=r+c.length);for(var u=n.length,f=e.length,p={},g=new Array(u),y=0;y0&&g[E]===-1;)E--;var _=E===-1||g[E]===-1?0:g[E]+1;return _>C?C:r-_=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=o&&!n[t];)t++;t>o&&(t=n.lastIndexOf(!0))}return t===-1&&(t=o),t}function ore(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;nk.length-s.length||TF||p>e.length-s.length)&&(H=p),e=e.substring(0,H),e=lre(_?"-"+e:e,o),e=(e.match(cre(v))||[]).join("");var B=e.indexOf(v);e=e.replace(new RegExp(rL(v),"g"),function(L,P){return P===B?".":""});var U=xj(e,o),M=U.beforeDecimal,z=U.afterDecimal,$=U.addNegation;return u.end-u.startD?!1:Y>=ie.start&&Y=t,o=n===void 0||e<=n;return r&&o}const xre={step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0},wre=(e,{size:t})=>({controls:{"--ni-chevron-size":jt(t,"ni-chevron-size")}});function Sre(e,t,n){const r=e.toString().replace(/^0+/,""),o=parseFloat(r);return Number.isNaN(o)?r:o>Number.MAX_SAFE_INTEGER?t!==void 0?String(t):r:ya(o,n,t)}const Jx=Ue((e,t)=>{const n=Pe("NumberInput",xre,e),{className:r,classNames:o,styles:i,unstyled:s,vars:a,onChange:c,onValueChange:u,value:f,defaultValue:p,max:g,min:y,step:v,hideControls:x,rightSection:S,isAllowed:E,clampBehavior:C,onBlur:_,allowDecimal:j,decimalScale:A,onKeyDown:T,onKeyDownCapture:k,handlersRef:R,startValue:V,disabled:H,rightSectionPointerEvents:F,allowNegative:B,readOnly:U,size:M,rightSectionWidth:z,stepHoldInterval:$,stepHoldDelay:L,allowLeadingZeros:P,withKeyboardEvents:q,trimLeadingZeroesOnBlur:Y,...D}=n,W=gt({name:"NumberInput",classes:u_,props:n,classNames:o,styles:i,unstyled:s,vars:a,varsResolver:wre}),{resolvedClassNames:K,resolvedStyles:Q}=ih({classNames:o,styles:i,props:n}),[ie,pe]=ho({value:f,defaultValue:p,finalValue:"",onChange:c}),ue=L!==void 0&&$!==void 0,se=w.useRef(null),me=w.useRef(null),xe=w.useRef(0),je=(te,Z)=>{Z.source==="event"&&pe(vre(te.floatValue,te.value)&&!gre.test(te.value)&&!(P&&yre.test(te.value))?te.floatValue:te.value),u?.(te,Z)},_e=te=>{const Z=String(te).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return Z?Math.max(0,(Z[1]?Z[1].length:0)-(Z[2]?+Z[2]:0)):0},Ee=te=>{se.current&&typeof te<"u"&&se.current.setSelectionRange(te,te)},Re=w.useRef(XN);Re.current=()=>{if(!a2(ie))return;let te;const Z=_e(ie),de=_e(v),Te=Math.max(Z,de),$e=10**Te;if(!d_(ie)&&(typeof ie!="number"||Number.isNaN(ie)))te=ya(V,y,g);else if(g!==void 0){const At=(Math.round(Number(ie)*$e)+Math.round(v*$e))/$e;te=At<=g?At:g}else te=(Math.round(Number(ie)*$e)+Math.round(v*$e))/$e;const Ke=te.toFixed(Te);pe(parseFloat(Ke)),u?.({floatValue:parseFloat(Ke),formattedValue:Ke,value:Ke},{source:"increment"}),setTimeout(()=>Ee(se.current?.value.length),0)};const Me=w.useRef(XN);Me.current=()=>{if(!a2(ie))return;let te;const Z=y!==void 0?y:B?Number.MIN_SAFE_INTEGER:0,de=_e(ie),Te=_e(v),$e=Math.max(de,Te),Ke=10**$e;if(!d_(ie)&&typeof ie!="number"||Number.isNaN(ie))te=ya(V,Z,g);else{const yn=(Math.round(Number(ie)*Ke)-Math.round(v*Ke))/Ke;te=Z!==void 0&&ynEe(se.current?.value.length),0)};const ze=te=>{T?.(te),!(U||!q)&&(te.key==="ArrowUp"&&(te.preventDefault(),Re.current()),te.key==="ArrowDown"&&(te.preventDefault(),Me.current()))},ve=te=>{if(k?.(te),te.key==="Backspace"){const Z=se.current;Z.selectionStart===0&&Z.selectionStart===Z.selectionEnd&&(te.preventDefault(),window.setTimeout(()=>Ee(0),0))}},Ce=te=>{let Z=ie;C==="blur"&&typeof Z=="number"&&(Z=ya(Z,y,g)),Y&&typeof Z=="string"&&_e(Z)<15&&(Z=Sre(Z,g,y)),ie!==Z&&pe(Z),_?.(te)};iv(R,{increment:Re.current,decrement:Me.current});const Ae=te=>{te?Re.current():Me.current(),xe.current+=1},G=te=>{if(Ae(te),ue){const Z=typeof $=="number"?$:$(xe.current);me.current=window.setTimeout(()=>G(te),Z)}},re=(te,Z)=>{te.preventDefault(),se.current?.focus(),Ae(Z),ue&&(me.current=window.setTimeout(()=>G(Z),L))},ne=()=>{me.current&&window.clearTimeout(me.current),me.current=null,xe.current=0},ce=h.jsxs("div",{...W("controls"),children:[h.jsx(Aa,{...W("control"),tabIndex:-1,"aria-hidden":!0,disabled:H||typeof ie=="number"&&g!==void 0&&ie>=g,mod:{direction:"up"},onMouseDown:te=>te.preventDefault(),onPointerDown:te=>{re(te,!0)},onPointerUp:ne,onPointerLeave:ne,children:h.jsx(sk,{direction:"up"})}),h.jsx(Aa,{...W("control"),tabIndex:-1,"aria-hidden":!0,disabled:H||typeof ie=="number"&&y!==void 0&&ie<=y,mod:{direction:"down"},onMouseDown:te=>te.preventDefault(),onPointerDown:te=>{re(te,!1)},onPointerUp:ne,onPointerLeave:ne,children:h.jsx(sk,{direction:"down"})})]});return h.jsx(vi,{component:mre,allowNegative:B,className:pn(u_.root,r),size:M,...D,readOnly:U,disabled:H,value:ie,getInputRef:jn(t,se),onValueChange:je,rightSection:x||U||!a2(ie)?S:S||ce,classNames:K,styles:Q,unstyled:s,__staticSelector:"NumberInput",decimalScale:j?A:0,onKeyDown:ze,onKeyDownCapture:ve,rightSectionPointerEvents:F??(H?"none":void 0),rightSectionWidth:z??`var(--ni-right-section-width-${M||"sm"})`,allowLeadingZeros:P,onBlur:Ce,isAllowed:te=>C==="strict"?E?E(te)&&ak(te.floatValue,y,g):ak(te.floatValue,y,g):E?E(te):!0})});Jx.classes={...vi.classes,...u_};Jx.displayName="@mantine/core/NumberInput";const[Ere,lL]=Lu(),[Nre,_re]=Lu();var cL={card:"m_9dc8ae12"};const Cre={withBorder:!0},Ore=(e,{radius:t})=>({card:{"--card-radius":Qn(t)}}),wj=Ue((e,t)=>{const n=Pe("RadioCard",Cre,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,vars:c,checked:u,mod:f,withBorder:p,value:g,onClick:y,name:v,onKeyDown:x,...S}=n,E=gt({name:"RadioCard",classes:cL,props:n,className:o,style:i,classNames:r,styles:s,unstyled:a,vars:c,varsResolver:Ore,rootSelector:"card"}),{dir:C}=gc(),_=lL(),j=typeof u=="boolean"?u:_?.value===g||!1,A=v||_?.name,T=k=>{if(x?.(k),["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(k.nativeEvent.code)){k.preventDefault();const R=Array.from(document.querySelectorAll(`[role="radio"][name="${A||"__mantine"}"]`)),V=R.findIndex(B=>B===k.target),H=V+1>=R.length?0:V+1,F=V-1<0?R.length-1:V-1;k.nativeEvent.code==="ArrowDown"&&(R[H].focus(),R[H].click()),k.nativeEvent.code==="ArrowUp"&&(R[F].focus(),R[F].click()),k.nativeEvent.code==="ArrowLeft"&&(R[C==="ltr"?F:H].focus(),R[C==="ltr"?F:H].click()),k.nativeEvent.code==="ArrowRight"&&(R[C==="ltr"?H:F].focus(),R[C==="ltr"?H:F].click())}};return h.jsx(Nre,{value:{checked:j},children:h.jsx(Aa,{ref:t,mod:[{"with-border":p,checked:j},f],...E("card"),...S,role:"radio","aria-checked":j,name:A,onClick:k=>{y?.(k),_?.onChange(g||"")},onKeyDown:T})})});wj.displayName="@mantine/core/RadioCard";wj.classes=cL;const jre={},Yx=Ue((e,t)=>{const{value:n,defaultValue:r,onChange:o,size:i,wrapperProps:s,children:a,name:c,readOnly:u,...f}=Pe("RadioGroup",jre,e),p=gi(c),[g,y]=ho({value:n,defaultValue:r,finalValue:"",onChange:o}),v=x=>!u&&y(typeof x=="string"?x:x.currentTarget.value);return h.jsx(Ere,{value:{value:g,onChange:v,size:i,name:p},children:h.jsx(Lt.Wrapper,{size:i,ref:t,...s,...f,labelElement:"div",__staticSelector:"RadioGroup",children:h.jsx(W8,{role:"radiogroup",children:a})})})});Yx.classes=Lt.Wrapper.classes;Yx.displayName="@mantine/core/RadioGroup";function uL({size:e,style:t,...n}){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 5 5",style:{width:Oe(e),height:Oe(e),...t},"aria-hidden":!0,...n,children:h.jsx("circle",{cx:"2.5",cy:"2.5",r:"2.5",fill:"currentColor"})})}var dL={indicator:"m_717d7ff6",icon:"m_3e4da632","indicator--outline":"m_2980836c"};const Are={icon:uL},Tre=(e,{radius:t,color:n,size:r,iconColor:o,variant:i,autoContrast:s})=>{const a=pc({color:n||e.primaryColor,theme:e}),c=a.isThemeColor&&a.shade===void 0?`var(--mantine-color-${a.color}-outline)`:a.color;return{indicator:{"--radio-size":jt(r,"radio-size"),"--radio-radius":t===void 0?void 0:Qn(t),"--radio-color":i==="outline"?c:Sr(n,e),"--radio-icon-size":jt(r,"radio-icon-size"),"--radio-icon-color":o?Sr(o,e):EO(s,e)?Ag({color:n,theme:e,autoContrast:s}):void 0}}},Sj=Ue((e,t)=>{const n=Pe("RadioIndicator",Are,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,vars:c,icon:u,radius:f,color:p,iconColor:g,autoContrast:y,checked:v,mod:x,variant:S,disabled:E,...C}=n,_=u,j=gt({name:"RadioIndicator",classes:dL,props:n,className:o,style:i,classNames:r,styles:s,unstyled:a,vars:c,varsResolver:Tre,rootSelector:"indicator"}),A=_re(),T=typeof v=="boolean"?v:A?.checked||!1;return h.jsx(Fe,{ref:t,...j("indicator",{variant:S}),variant:S,mod:[{checked:T,disabled:E},x],...C,children:h.jsx(_,{...j("icon")})})});Sj.displayName="@mantine/core/RadioIndicator";Sj.classes=dL;var fL={root:"m_f3f1af94",inner:"m_89c4f5e4",icon:"m_f3ed6b2b",radio:"m_8a3dbb89","radio--outline":"m_1bfe9d39"};const $re={labelPosition:"right"},Rre=(e,{size:t,radius:n,color:r,iconColor:o,variant:i,autoContrast:s})=>{const a=pc({color:r||e.primaryColor,theme:e}),c=a.isThemeColor&&a.shade===void 0?`var(--mantine-color-${a.color}-outline)`:a.color;return{root:{"--radio-size":jt(t,"radio-size"),"--radio-radius":n===void 0?void 0:Qn(n),"--radio-color":i==="outline"?c:Sr(r,e),"--radio-icon-color":o?Sr(o,e):EO(s,e)?Ag({color:r,theme:e,autoContrast:s}):void 0,"--radio-icon-size":jt(t,"radio-icon-size")}}},Os=Ue((e,t)=>{const n=Pe("Radio",$re,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,vars:c,id:u,size:f,label:p,labelPosition:g,description:y,error:v,radius:x,color:S,variant:E,disabled:C,wrapperProps:_,icon:j=uL,rootRef:A,iconColor:T,onChange:k,mod:R,...V}=n,H=gt({name:"Radio",classes:fL,props:n,className:o,style:i,classNames:r,styles:s,unstyled:a,vars:c,varsResolver:Rre}),F=lL(),B=F?.size??f,U=n.size?f:B,{styleProps:M,rest:z}=sh(V),$=gi(u),L=F?{checked:F.value===z.value,name:z.name??F.name,onChange:P=>{F.onChange(P),k?.(P)}}:{};return h.jsx(aj,{...H("root"),__staticSelector:"Radio",__stylesApiProps:n,id:$,size:U,labelPosition:g,label:p,description:y,error:v,disabled:C,classNames:r,styles:s,unstyled:a,"data-checked":L.checked||void 0,variant:E,ref:A,mod:R,...M,..._,children:h.jsxs(Fe,{...H("inner"),mod:{"label-position":g},children:[h.jsx(Fe,{...H("radio",{focusable:!0,variant:E}),onChange:k,...z,...L,component:"input",mod:{error:!!v},ref:t,id:$,disabled:C,type:"radio"}),h.jsx(j,{...H("icon"),"aria-hidden":!0})]})})});Os.classes=fL;Os.displayName="@mantine/core/Radio";Os.Group=Yx;Os.Card=wj;Os.Indicator=Sj;const kre={duration:100,transition:"fade"};function Mre(e,t){return{...kre,...t,...e}}function Pre({offset:e,position:t,defaultOpened:n}){const[r,o]=w.useState(n),i=w.useRef(null),{x:s,y:a,elements:c,refs:u,update:f,placement:p}=IO({placement:t,middleware:[kO({crossAxis:!0,padding:5,rootBoundary:"document"})]}),g=p.includes("right")?e:t.includes("left")?e*-1:0,y=p.includes("bottom")?e:t.includes("top")?e*-1:0,v=w.useCallback(({clientX:x,clientY:S})=>{u.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x,y:S,left:x+g,top:S+y,right:x,bottom:S}}})},[c.reference]);return w.useEffect(()=>{if(u.floating.current){const x=i.current;x.addEventListener("mousemove",v);const S=ba(u.floating.current);return S.forEach(E=>{E.addEventListener("scroll",f)}),()=>{x.removeEventListener("mousemove",v),S.forEach(E=>{E.removeEventListener("scroll",f)})}}},[c.reference,u.floating.current,f,v,r]),{handleMouseMove:v,x:s,y:a,opened:r,setOpened:o,boundaryRef:i,floating:u.setFloating}}var Kx={tooltip:"m_1b3c8819",arrow:"m_f898399f"};const Dre={refProp:"ref",withinPortal:!0,offset:10,defaultOpened:!1,position:"right",zIndex:ts("popover")},Ire=(e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:Qn(t),"--tooltip-bg":n?Sr(n,e):void 0,"--tooltip-color":n?"var(--mantine-color-white)":void 0}}),Ej=Ue((e,t)=>{const n=Pe("TooltipFloating",Dre,e),{children:r,refProp:o,withinPortal:i,style:s,className:a,classNames:c,styles:u,unstyled:f,radius:p,color:g,label:y,offset:v,position:x,multiline:S,zIndex:E,disabled:C,defaultOpened:_,variant:j,vars:A,portalProps:T,...k}=n,R=zo(),V=gt({name:"TooltipFloating",props:n,classes:Kx,className:a,style:s,classNames:c,styles:u,unstyled:f,rootSelector:"tooltip",vars:A,varsResolver:Ire}),{handleMouseMove:H,x:F,y:B,opened:U,boundaryRef:M,floating:z,setOpened:$}=Pre({offset:v,position:x,defaultOpened:_});if(!fc(r))throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const L=jn(M,Cx(r),t),P=r.props,q=D=>{P.onMouseEnter?.(D),H(D),$(!0)},Y=D=>{P.onMouseLeave?.(D),$(!1)};return h.jsxs(h.Fragment,{children:[h.jsx(Fu,{...T,withinPortal:i,children:h.jsx(Fe,{...k,...V("tooltip",{style:{...$9(s,R),zIndex:E,display:!C&&U?"block":"none",top:(B&&Math.round(B))??"",left:(F&&Math.round(F))??""}}),variant:j,ref:z,mod:{multiline:S},children:y})}),w.cloneElement(r,{...P,[o]:L,onMouseEnter:q,onMouseLeave:Y})]})});Ej.classes=Kx;Ej.displayName="@mantine/core/TooltipFloating";const hL=w.createContext(!1),Lre=hL.Provider,Fre=()=>w.useContext(hL),zre={openDelay:0,closeDelay:0};function Nj(e){const{openDelay:t,closeDelay:n,children:r}=Pe("TooltipGroup",zre,e);return h.jsx(Lre,{value:!0,children:h.jsx(nee,{delay:{open:t,close:n},children:r})})}Nj.displayName="@mantine/core/TooltipGroup";Nj.extend=e=>e;function Bre(e){if(e===void 0)return{shift:!0,flip:!0};const t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function Vre(e){const t=Bre(e.middlewares),n=[J9(e.offset)];return t.shift&&n.push(kO(typeof t.shift=="boolean"?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip=="boolean"?uv():uv(t.flip)),n.push(Y9({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline=="boolean"?am():am(t.inline)):e.inline&&n.push(am()),n}function Ure(e){const[t,n]=w.useState(e.defaultOpened),o=typeof e.opened=="boolean"?e.opened:t,i=Fre(),s=gi(),a=w.useCallback(T=>{n(T),T&&C(s)},[s]),{x:c,y:u,context:f,refs:p,update:g,placement:y,middlewareData:{arrow:{x:v,y:x}={}}}=IO({strategy:e.strategy,placement:e.position,open:o,onOpenChange:a,middleware:Vre(e)}),{delay:S,currentId:E,setCurrentId:C}=ree(f,{id:s}),{getReferenceProps:_,getFloatingProps:j}=uee([eee(f,{enabled:e.events?.hover,delay:i?S:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch}),cee(f,{enabled:e.events?.focus,visibleOnly:!0}),fee(f,{role:"tooltip"}),aee(f,{enabled:typeof e.opened>"u"})]);w8({opened:o,position:e.position,positionDependencies:e.positionDependencies,floating:{refs:p,update:g}}),_a(()=>{e.onPositionChange?.(y)},[y]);const A=o&&E&&E!==s;return{x:c,y:u,arrowX:v,arrowY:x,reference:p.setReference,floating:p.setFloating,getFloatingProps:j,getReferenceProps:_,isGroupPhase:A,opened:o,placement:y}}const lk={position:"top",refProp:"ref",withinPortal:!0,inline:!1,defaultOpened:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:ts("popover"),positionDependencies:[],middlewares:{flip:!0,shift:!0,inline:!1}},Hre=(e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:Qn(t),"--tooltip-bg":n?Sr(n,e):void 0,"--tooltip-color":n?"var(--mantine-color-white)":void 0}}),ns=Ue((e,t)=>{const n=Pe("Tooltip",lk,e),{children:r,position:o,refProp:i,label:s,openDelay:a,closeDelay:c,onPositionChange:u,opened:f,defaultOpened:p,withinPortal:g,radius:y,color:v,classNames:x,styles:S,unstyled:E,style:C,className:_,withArrow:j,arrowSize:A,arrowOffset:T,arrowRadius:k,arrowPosition:R,offset:V,transitionProps:H,multiline:F,events:B,zIndex:U,disabled:M,positionDependencies:z,onClick:$,onMouseEnter:L,onMouseLeave:P,inline:q,variant:Y,keepMounted:D,vars:W,portalProps:K,mod:Q,floatingStrategy:ie,middlewares:pe,...ue}=Pe("Tooltip",lk,n),{dir:se}=gc(),me=w.useRef(null),xe=Ure({position:p8(se,o),closeDelay:c,openDelay:a,onPositionChange:u,opened:f,defaultOpened:p,events:B,arrowRef:me,arrowOffset:T,offset:typeof V=="number"?V+(j?A/2:0):V,positionDependencies:[...z,r],inline:q,strategy:ie,middlewares:pe}),je=gt({name:"Tooltip",props:n,classes:Kx,className:_,style:C,classNames:x,styles:S,unstyled:E,rootSelector:"tooltip",vars:W,varsResolver:Hre});if(!fc(r))throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const _e=jn(xe.reference,Cx(r),t),Ee=Mre(H,{duration:100,transition:"fade"}),Re=r.props;return h.jsxs(h.Fragment,{children:[h.jsx(Fu,{...K,withinPortal:g,children:h.jsx(yc,{...Ee,keepMounted:D,mounted:!M&&!!xe.opened,duration:xe.isGroupPhase?10:Ee.duration,children:Me=>h.jsxs(Fe,{...ue,"data-fixed":ie==="fixed"||void 0,variant:Y,mod:[{multiline:F},Q],...xe.getFloatingProps({ref:xe.floating,className:je("tooltip").className,style:{...je("tooltip").style,...Me,zIndex:U,top:xe.y??0,left:xe.x??0}}),children:[s,h.jsx(UO,{ref:me,arrowX:xe.arrowX,arrowY:xe.arrowY,visible:j,position:xe.placement,arrowSize:A,arrowOffset:T,arrowRadius:k,arrowPosition:R,...je("arrow")})]})})}),w.cloneElement(r,xe.getReferenceProps({onClick:$,onMouseEnter:L,onMouseLeave:P,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,className:pn(_,Re.className),...Re,[i]:_e}))]})});ns.classes=Kx;ns.displayName="@mantine/core/Tooltip";ns.Floating=Ej;ns.Group=Nj;var pL={root:"m_cf365364",indicator:"m_9e182ccd",label:"m_1738fcb2",input:"m_1714d588",control:"m_69686b9b",innerLabel:"m_78882f40"};const qre={withItemsBorders:!0},Wre=(e,{radius:t,color:n,transitionDuration:r,size:o,transitionTimingFunction:i})=>({root:{"--sc-radius":t===void 0?void 0:Qn(t),"--sc-color":n?Sr(n,e):void 0,"--sc-shadow":n?void 0:"var(--mantine-shadow-xs)","--sc-transition-duration":r===void 0?void 0:`${r}ms`,"--sc-transition-timing-function":i,"--sc-padding":jt(o,"sc-padding"),"--sc-font-size":zr(o)}}),bc=Ue((e,t)=>{const n=Pe("SegmentedControl",qre,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,vars:c,data:u,value:f,defaultValue:p,onChange:g,size:y,name:v,disabled:x,readOnly:S,fullWidth:E,orientation:C,radius:_,color:j,transitionDuration:A,transitionTimingFunction:T,variant:k,autoContrast:R,withItemsBorders:V,mod:H,...F}=n,B=gt({name:"SegmentedControl",props:n,classes:pL,className:o,style:i,classNames:r,styles:s,unstyled:a,vars:c,varsResolver:Wre}),U=zo(),M=u.map(se=>typeof se=="string"?{label:se,value:se}:se),z=AX(),[$,L]=w.useState(Yl()),[P,q]=w.useState(null),[Y,D]=w.useState({}),W=(se,me)=>{Y[me]=se,D(Y)},[K,Q]=ho({value:f,defaultValue:p,finalValue:Array.isArray(u)?M.find(se=>!se.disabled)?.value??u[0]?.value??null:null,onChange:g}),ie=gi(v),pe=M.map(se=>w.createElement(Fe,{...B("control"),mod:{active:K===se.value,orientation:C},key:se.value},w.createElement("input",{...B("input"),disabled:x||se.disabled,type:"radio",name:ie,value:se.value,id:`${ie}-${se.value}`,checked:K===se.value,onChange:()=>!S&&Q(se.value),"data-focus-ring":U.focusRing,key:`${se.value}-input`}),w.createElement(Fe,{component:"label",...B("label"),mod:{active:K===se.value&&!(x||se.disabled),disabled:x||se.disabled,"read-only":S},htmlFor:`${ie}-${se.value}`,ref:me=>W(me,se.value),__vars:{"--sc-label-color":j!==void 0?Ag({color:j,theme:U,autoContrast:R}):void 0},key:`${se.value}-label`},h.jsx("span",{...B("innerLabel"),children:se.label})))),ue=jn(t,se=>q(se));return bX(()=>{L(Yl())},[u.length]),u.length===0?null:h.jsxs(Fe,{...B("root"),variant:k,size:y,ref:ue,mod:[{"full-width":E,orientation:C,initialized:z,"with-items-borders":V},H],...F,role:"radiogroup","data-disabled":x,children:[typeof K=="string"&&h.jsx(JO,{target:Y[K],parent:P,component:"span",transitionDuration:"var(--sc-transition-duration)",...B("indicator")},$),pe]})});bc.classes=pL;bc.displayName="@mantine/core/SegmentedControl";const Gre={searchable:!1,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left"},Xx=Ue((e,t)=>{const n=Pe("Select",Gre,e),{classNames:r,styles:o,unstyled:i,vars:s,dropdownOpened:a,defaultDropdownOpened:c,onDropdownClose:u,onDropdownOpen:f,onFocus:p,onBlur:g,onClick:y,onChange:v,data:x,value:S,defaultValue:E,selectFirstOptionOnChange:C,onOptionSubmit:_,comboboxProps:j,readOnly:A,disabled:T,filter:k,limit:R,withScrollArea:V,maxDropdownHeight:H,size:F,searchable:B,rightSection:U,checkIconPosition:M,withCheckIcon:z,nothingFoundMessage:$,name:L,form:P,searchValue:q,defaultSearchValue:Y,onSearchChange:D,allowDeselect:W,error:K,rightSectionPointerEvents:Q,id:ie,clearable:pe,clearButtonProps:ue,hiddenInputProps:se,renderOption:me,onClear:xe,autoComplete:je,scrollAreaProps:_e,__defaultRightSection:Ee,__clearSection:Re,__clearable:Me,chevronColor:ze,...ve}=n,Ce=w.useMemo(()=>F8(x),[x]),Ae=w.useMemo(()=>YO(Ce),[Ce]),G=gi(ie),[re,ne,ce]=ho({value:S,defaultValue:E,finalValue:null,onChange:v}),te=typeof re=="string"?Ae[re]:void 0,Z=CX(te),[de,Te,$e]=ho({value:q,defaultValue:Y,finalValue:te?te.label:"",onChange:D}),Ke=sj({opened:a,defaultOpened:c,onDropdownOpen:()=>{f?.(),Ke.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{u?.(),Ke.resetSelectedOption()}}),At=Ut=>{Te(Ut),Ke.resetSelectedOption()},{resolvedClassNames:yn,resolvedStyles:ls}=ih({props:n,styles:o,classNames:r});w.useEffect(()=>{C&&Ke.selectFirstOption()},[C,de]),w.useEffect(()=>{S===null&&At(""),typeof S=="string"&&te&&(Z?.value!==te.value||Z?.label!==te.label)&&At(te.label)},[S,te]),w.useEffect(()=>{!ce&&!$e&&At(typeof re=="string"&&Ae[re]?.label||"")},[x,re]);const pr=h.jsx(Ct.ClearButton,{...ue,onClear:()=>{ne(null,null),At(""),xe?.()}}),dn=pe&&!!re&&!T&&!A;return h.jsxs(h.Fragment,{children:[h.jsxs(Ct,{store:Ke,__staticSelector:"Select",classNames:yn,styles:ls,unstyled:i,readOnly:A,onOptionSubmit:Ut=>{_?.(Ut);const nn=W&&Ae[Ut].value===re?null:Ae[Ut],qo=nn?nn.value:null;qo!==re&&ne(qo,nn),!ce&&At(typeof qo=="string"&&nn?.label||""),Ke.closeDropdown()},size:F,...j,children:[h.jsx(Ct.Target,{targetType:B?"input":"button",autoComplete:je,children:h.jsx(vi,{id:G,ref:t,__defaultRightSection:h.jsx(Ct.Chevron,{size:F,error:K,unstyled:i,color:ze}),__clearSection:pr,__clearable:dn,rightSection:U,rightSectionPointerEvents:Q||(dn?"all":"none"),...ve,size:F,__staticSelector:"Select",disabled:T,readOnly:A||!B,value:de,onChange:Ut=>{At(Ut.currentTarget.value),Ke.openDropdown(),C&&Ke.selectFirstOption()},onFocus:Ut=>{B&&Ke.openDropdown(),p?.(Ut)},onBlur:Ut=>{B&&Ke.closeDropdown(),At(re!=null&&Ae[re]?.label||""),g?.(Ut)},onClick:Ut=>{B?Ke.openDropdown():Ke.toggleDropdown(),y?.(Ut)},classNames:yn,styles:ls,unstyled:i,pointer:!B,error:K})}),h.jsx(K8,{data:Ce,hidden:A||T,filter:k,search:de,limit:R,hiddenWhenEmpty:!$,withScrollArea:V,maxDropdownHeight:H,filterOptions:B&&te?.label!==de,value:re,checkIconPosition:M,withCheckIcon:z,nothingFoundMessage:$,unstyled:i,labelId:ve.label?`${G}-label`:void 0,"aria-label":ve.label?void 0:ve["aria-label"],renderOption:me,scrollAreaProps:_e})]}),h.jsx(Ct.HiddenInput,{value:re,name:L,form:P,disabled:T,...se})]})});Xx.classes={...vi.classes,...Ct.classes};Xx.displayName="@mantine/core/Select";const[Jre,Qx]=Pa("SliderProvider was not found in tree"),mL=w.forwardRef(({size:e,disabled:t,variant:n,color:r,thumbSize:o,radius:i,...s},a)=>{const{getStyles:c}=Qx();return h.jsx(Fe,{tabIndex:-1,variant:n,size:e,ref:a,...c("root"),...s})});mL.displayName="@mantine/core/SliderRoot";const gL=w.forwardRef(({max:e,min:t,value:n,position:r,label:o,dragging:i,onMouseDown:s,onKeyDownCapture:a,labelTransitionProps:c,labelAlwaysOn:u,thumbLabel:f,onFocus:p,onBlur:g,showLabelOnHover:y,isHovered:v,children:x=null,disabled:S},E)=>{const{getStyles:C}=Qx(),[_,j]=w.useState(!1),A=u||i||_||y&&v;return h.jsxs(Fe,{tabIndex:0,role:"slider","aria-label":f,"aria-valuemax":e,"aria-valuemin":t,"aria-valuenow":n,ref:E,__vars:{"--slider-thumb-offset":`${r}%`},...C("thumb",{focusable:!0}),mod:{dragging:i,disabled:S},onFocus:T=>{j(!0),typeof p=="function"&&p(T)},onBlur:T=>{j(!1),typeof g=="function"&&g(T)},onTouchStart:s,onMouseDown:s,onKeyDownCapture:a,onClick:T=>T.stopPropagation(),children:[x,h.jsx(yc,{mounted:o!=null&&!!A,transition:"fade",duration:0,...c,children:T=>h.jsx("div",{...C("label",{style:T}),children:o})})]})});gL.displayName="@mantine/core/SliderThumb";function yL({value:e,min:t,max:n}){const r=(e-t)/(n-t)*100;return Math.min(Math.max(r,0),100)}function Yre({mark:e,offset:t,value:n,inverted:r=!1}){return r?typeof t=="number"&&e.value<=t||e.value>=n:typeof t=="number"?e.value>=t&&e.value<=n:e.value<=n}function bL({marks:e,min:t,max:n,disabled:r,value:o,offset:i,inverted:s}){const{getStyles:a}=Qx();if(!e)return null;const c=e.map((u,f)=>w.createElement(Fe,{...a("markWrapper"),__vars:{"--mark-offset":`${yL({value:u.value,min:t,max:n})}%`},key:f},h.jsx(Fe,{...a("mark"),mod:{filled:Yre({mark:u,value:o,offset:i,inverted:s}),disabled:r}}),u.label&&h.jsx("div",{...a("markLabel"),children:u.label})));return h.jsx("div",{children:c})}bL.displayName="@mantine/core/SliderMarks";function vL({filled:e,children:t,offset:n,disabled:r,marksOffset:o,inverted:i,containerProps:s,...a}){const{getStyles:c}=Qx();return h.jsx(Fe,{...c("trackContainer"),mod:{disabled:r},...s,children:h.jsxs(Fe,{...c("track"),mod:{inverted:i,disabled:r},children:[h.jsx(Fe,{mod:{inverted:i,disabled:r},__vars:{"--slider-bar-width":`calc(${e}% + var(--slider-size))`,"--slider-bar-offset":`calc(${n}% - var(--slider-size))`},...c("bar")}),t,h.jsx(bL,{...a,offset:o,disabled:r,inverted:i})]})})}vL.displayName="@mantine/core/SliderTrack";function Kre({value:e,containerWidth:t,min:n,max:r,step:o,precision:i}){const a=(t?Math.min(Math.max(e,0),t)/t:e)*(r-n),c=(a!==0?Math.round(a/o)*o:0)+n,u=Math.max(c,n);return i!==void 0?Number(u.toFixed(i)):u}function q0(e,t){return parseFloat(e.toFixed(t))}function Xre(e){if(!e)return 0;const t=e.toString().split(".");return t.length>1?t[1].length:0}function l2(e,t){const r=[...t].sort((o,i)=>o.value-i.value).find(o=>o.value>e);return r?r.value:e}function c2(e,t){const r=[...t].sort((o,i)=>i.value-o.value).find(o=>o.valuen.value-r.value);return t.length>0?t[0].value:0}function uk(e){const t=[...e].sort((n,r)=>n.value-r.value);return t.length>0?t[t.length-1].value:100}var xL={root:"m_dd36362e",label:"m_c9357328",thumb:"m_c9a9a60a",trackContainer:"m_a8645c2",track:"m_c9ade57f",bar:"m_38aeed47",markWrapper:"m_b7b0423a",mark:"m_dd33bc19",markLabel:"m_68c77a5b"};const Qre={radius:"xl",min:0,max:100,step:1,marks:[],label:e=>e,labelTransitionProps:{transition:"fade",duration:0},labelAlwaysOn:!1,thumbLabel:"",showLabelOnHover:!0,disabled:!1,scale:e=>e},Zre=(e,{size:t,color:n,thumbSize:r,radius:o})=>({root:{"--slider-size":jt(t,"slider-size"),"--slider-color":n?Sr(n,e):void 0,"--slider-radius":o===void 0?void 0:Qn(o),"--slider-thumb-size":r!==void 0?Oe(r):"calc(var(--slider-size) * 2)"}}),_j=Ue((e,t)=>{const n=Pe("Slider",Qre,e),{classNames:r,styles:o,value:i,onChange:s,onChangeEnd:a,size:c,min:u,max:f,step:p,precision:g,defaultValue:y,name:v,marks:x,label:S,labelTransitionProps:E,labelAlwaysOn:C,thumbLabel:_,showLabelOnHover:j,thumbChildren:A,disabled:T,unstyled:k,scale:R,inverted:V,className:H,style:F,vars:B,hiddenInputProps:U,restrictToMarks:M,thumbProps:z,...$}=n,L=gt({name:"Slider",props:n,classes:xL,classNames:r,className:H,styles:o,style:F,vars:B,varsResolver:Zre,unstyled:k}),{dir:P}=gc(),[q,Y]=w.useState(!1),[D,W]=ho({value:typeof i=="number"?ya(i,u,f):i,defaultValue:typeof y=="number"?ya(y,u,f):y,finalValue:ya(0,u,f),onChange:s}),K=w.useRef(D),Q=w.useRef(a);w.useEffect(()=>{Q.current=a},[a]);const ie=w.useRef(null),pe=w.useRef(null),ue=yL({value:D,min:u,max:f}),se=R(D),me=typeof S=="function"?S(se):S,xe=g??Xre(p),je=w.useCallback(({x:ve})=>{if(!T){const Ce=Kre({value:ve,min:u,max:f,step:p,precision:xe});W(M&&x?.length?bR(Ce,x.map(Ae=>Ae.value)):Ce),K.current=Ce}},[T,u,f,p,xe,W,x,M]),_e=w.useCallback(()=>{if(!T&&Q.current){const ve=M&&x?.length?bR(K.current,x.map(Ce=>Ce.value)):K.current;Q.current(ve)}},[T,x,M]),{ref:Ee,active:Re}=mX(je,{onScrubEnd:_e},P),Me=w.useCallback(ve=>{!T&&Q.current&&Q.current(ve)},[T]),ze=ve=>{if(!T)switch(ve.key){case"ArrowUp":{if(ve.preventDefault(),pe.current?.focus(),M&&x){const Ae=l2(D,x);W(Ae),Me(Ae);break}const Ce=q0(Math.min(Math.max(D+p,u),f),xe);W(Ce),Me(Ce);break}case"ArrowRight":{if(ve.preventDefault(),pe.current?.focus(),M&&x){const Ae=P==="rtl"?c2(D,x):l2(D,x);W(Ae),Me(Ae);break}const Ce=q0(Math.min(Math.max(P==="rtl"?D-p:D+p,u),f),xe);W(Ce),Me(Ce);break}case"ArrowDown":{if(ve.preventDefault(),pe.current?.focus(),M&&x){const Ae=c2(D,x);W(Ae),Me(Ae);break}const Ce=q0(Math.min(Math.max(D-p,u),f),xe);W(Ce),Me(Ce);break}case"ArrowLeft":{if(ve.preventDefault(),pe.current?.focus(),M&&x){const Ae=P==="rtl"?l2(D,x):c2(D,x);W(Ae),Me(Ae);break}const Ce=q0(Math.min(Math.max(P==="rtl"?D+p:D-p,u),f),xe);W(Ce),Me(Ce);break}case"Home":{if(ve.preventDefault(),pe.current?.focus(),M&&x){W(ck(x)),Me(ck(x));break}W(u),Me(u);break}case"End":{if(ve.preventDefault(),pe.current?.focus(),M&&x){W(uk(x)),Me(uk(x));break}W(f),Me(f);break}}};return h.jsx(Jre,{value:{getStyles:L},children:h.jsxs(mL,{...$,ref:jn(t,ie),onKeyDownCapture:ze,onMouseDownCapture:()=>ie.current?.focus(),size:c,disabled:T,children:[h.jsx(vL,{inverted:V,offset:0,filled:ue,marks:x,min:u,max:f,value:se,disabled:T,containerProps:{ref:Ee,onMouseEnter:j?()=>Y(!0):void 0,onMouseLeave:j?()=>Y(!1):void 0},children:h.jsx(gL,{max:f,min:u,value:se,position:ue,dragging:Re,label:me,ref:pe,labelTransitionProps:E,labelAlwaysOn:C,thumbLabel:_,showLabelOnHover:j,isHovered:q,disabled:T,...z,children:A})}),h.jsx("input",{type:"hidden",name:v,value:se,...U})]})})});_j.classes=xL;_j.displayName="@mantine/core/Slider";const wL=w.createContext(null),eoe=wL.Provider,toe=()=>w.useContext(wL),noe={},Cj=Ue((e,t)=>{const{value:n,defaultValue:r,onChange:o,size:i,wrapperProps:s,children:a,readOnly:c,...u}=Pe("SwitchGroup",noe,e),[f,p]=ho({value:n,defaultValue:r,finalValue:[],onChange:o}),g=y=>{const v=y.currentTarget.value;!c&&p(f.includes(v)?f.filter(x=>x!==v):[...f,v])};return h.jsx(eoe,{value:{value:f,onChange:g,size:i},children:h.jsx(Lt.Wrapper,{size:i,ref:t,...s,...u,labelElement:"div",__staticSelector:"SwitchGroup",children:h.jsx(W8,{role:"group",children:a})})})});Cj.classes=Lt.Wrapper.classes;Cj.displayName="@mantine/core/SwitchGroup";var SL={root:"m_5f93f3bb",input:"m_926b4011",track:"m_9307d992",thumb:"m_93039a1d",trackLabel:"m_8277e082"};const roe={labelPosition:"right"},ooe=(e,{radius:t,color:n,size:r})=>({root:{"--switch-radius":t===void 0?void 0:Qn(t),"--switch-height":jt(r,"switch-height"),"--switch-width":jt(r,"switch-width"),"--switch-thumb-size":jt(r,"switch-thumb-size"),"--switch-label-font-size":jt(r,"switch-label-font-size"),"--switch-track-label-padding":jt(r,"switch-track-label-padding"),"--switch-color":n?Sr(n,e):void 0}}),vc=Ue((e,t)=>{const n=Pe("Switch",roe,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,vars:c,color:u,label:f,offLabel:p,onLabel:g,id:y,size:v,radius:x,wrapperProps:S,thumbIcon:E,checked:C,defaultChecked:_,onChange:j,labelPosition:A,description:T,error:k,disabled:R,variant:V,rootRef:H,mod:F,...B}=n,U=toe(),M=v||U?.size,z=gt({name:"Switch",props:n,classes:SL,className:o,style:i,classNames:r,styles:s,unstyled:a,vars:c,varsResolver:ooe}),{styleProps:$,rest:L}=sh(B),P=gi(y),q=U?{checked:U.value.includes(L.value),onChange:U.onChange}:{},[Y,D]=ho({value:q.checked??C,defaultValue:_,finalValue:!1});return h.jsxs(aj,{...z("root"),__staticSelector:"Switch",__stylesApiProps:n,id:P,size:M,labelPosition:A,label:f,description:T,error:k,disabled:R,bodyElement:"label",labelElement:"span",classNames:r,styles:s,unstyled:a,"data-checked":q.checked||C||void 0,variant:V,ref:H,mod:F,...$,...S,children:[h.jsx("input",{...L,disabled:R,checked:Y,"data-checked":q.checked||C||void 0,onChange:W=>{U?q.onChange?.(W):j?.(W),D(W.currentTarget.checked)},id:P,ref:t,type:"checkbox",role:"switch",...z("input")}),h.jsxs(Fe,{"aria-hidden":"true",component:"span",mod:{error:k,"label-position":A,"without-labels":!g&&!p},...z("track"),children:[h.jsx(Fe,{component:"span",mod:"reduce-motion",...z("thumb"),children:E}),h.jsx("span",{...z("trackLabel"),children:Y?g:p})]})]})});vc.classes={...SL,...Ute};vc.displayName="@mantine/core/Switch";vc.Group=Cj;const[ioe,Oj]=Pa("Tabs component was not found in the tree");var Pg={root:"m_89d60db1","list--default":"m_576c9d4",list:"m_89d33d6d",panel:"m_b0c91715",tab:"m_4ec4dce6",tabSection:"m_fc420b1f","tab--default":"m_539e827b","list--outline":"m_6772fbd5","tab--outline":"m_b59ab47c","tab--pills":"m_c3381914"};const soe={},jj=Ue((e,t)=>{const n=Pe("TabsList",soe,e),{children:r,className:o,grow:i,justify:s,classNames:a,styles:c,style:u,mod:f,...p}=n,g=Oj();return h.jsx(Fe,{...p,...g.getStyles("list",{className:o,style:u,classNames:a,styles:c,props:n,variant:g.variant}),ref:t,role:"tablist",variant:g.variant,mod:[{grow:i,orientation:g.orientation,placement:g.orientation==="vertical"&&g.placement,inverted:g.inverted},f],"aria-orientation":g.orientation,__vars:{"--tabs-justify":s},children:r})});jj.classes=Pg;jj.displayName="@mantine/core/TabsList";const aoe={},Aj=Ue((e,t)=>{const n=Pe("TabsPanel",aoe,e),{children:r,className:o,value:i,classNames:s,styles:a,style:c,mod:u,keepMounted:f,...p}=n,g=Oj(),y=g.value===i,v=g.keepMounted||f||y?r:null;return h.jsx(Fe,{...p,...g.getStyles("panel",{className:o,classNames:s,styles:a,style:[c,y?void 0:{display:"none"}],props:n}),ref:t,mod:[{orientation:g.orientation},u],role:"tabpanel",id:g.getPanelId(i),"aria-labelledby":g.getTabId(i),children:v})});Aj.classes=Pg;Aj.displayName="@mantine/core/TabsPanel";const loe={},Tj=Ue((e,t)=>{const n=Pe("TabsTab",loe,e),{className:r,children:o,rightSection:i,leftSection:s,value:a,onClick:c,onKeyDown:u,disabled:f,color:p,style:g,classNames:y,styles:v,vars:x,mod:S,tabIndex:E,...C}=n,_=zo(),{dir:j}=gc(),A=Oj(),T=a===A.value,k=V=>{A.onChange(A.allowTabDeactivation&&a===A.value?null:a),c?.(V)},R={classNames:y,styles:v,props:n};return h.jsxs(Aa,{...C,...A.getStyles("tab",{className:r,style:g,variant:A.variant,...R}),disabled:f,unstyled:A.unstyled,variant:A.variant,mod:[{active:T,disabled:f,orientation:A.orientation,inverted:A.inverted,placement:A.orientation==="vertical"&&A.placement},S],ref:t,role:"tab",id:A.getTabId(a),"aria-selected":T,tabIndex:E!==void 0?E:T||A.value===null?0:-1,"aria-controls":A.getPanelId(a),onClick:k,__vars:{"--tabs-color":p?Sr(p,_):void 0},onKeyDown:g9({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:A.activateTabWithKeyboard,loop:A.loop,orientation:A.orientation||"horizontal",dir:j,onKeyDown:u}),children:[s&&h.jsx("span",{...A.getStyles("tabSection",R),"data-position":"left",children:s}),o&&h.jsx("span",{...A.getStyles("tabLabel",R),children:o}),i&&h.jsx("span",{...A.getStyles("tabSection",R),"data-position":"right",children:i})]})});Tj.classes=Pg;Tj.displayName="@mantine/core/TabsTab";const dk="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",coe={keepMounted:!0,orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,allowTabDeactivation:!1,unstyled:!1,inverted:!1,variant:"default",placement:"left"},uoe=(e,{radius:t,color:n,autoContrast:r})=>({root:{"--tabs-radius":Qn(t),"--tabs-color":Sr(n,e),"--tabs-text-color":EO(r,e)?Ag({color:n,theme:e,autoContrast:r}):void 0}}),xn=Ue((e,t)=>{const n=Pe("Tabs",coe,e),{defaultValue:r,value:o,onChange:i,orientation:s,children:a,loop:c,id:u,activateTabWithKeyboard:f,allowTabDeactivation:p,variant:g,color:y,radius:v,inverted:x,placement:S,keepMounted:E,classNames:C,styles:_,unstyled:j,className:A,style:T,vars:k,autoContrast:R,mod:V,...H}=n,F=gi(u),[B,U]=ho({value:o,defaultValue:r,finalValue:null,onChange:i}),M=gt({name:"Tabs",props:n,classes:Pg,className:A,style:T,classNames:C,styles:_,unstyled:j,vars:k,varsResolver:uoe});return h.jsx(ioe,{value:{placement:S,value:B,orientation:s,id:F,loop:c,activateTabWithKeyboard:f,getTabId:mR(`${F}-tab`,dk),getPanelId:mR(`${F}-panel`,dk),onChange:U,allowTabDeactivation:p,variant:g,color:y,radius:v,inverted:x,keepMounted:E,unstyled:j,getStyles:M},children:h.jsx(Fe,{ref:t,id:F,variant:g,mod:[{orientation:s,inverted:s==="horizontal"&&x,placement:s==="vertical"&&S},V],...M("root"),...H,children:a})})});xn.classes=Pg;xn.displayName="@mantine/core/Tabs";xn.Tab=Tj;xn.Panel=Aj;xn.List=jj;function doe({data:e,value:t}){const n=t.map(o=>o.trim().toLowerCase());return e.reduce((o,i)=>(Af(i)?o.push({group:i.group,items:i.items.filter(s=>n.indexOf(s.label.toLowerCase().trim())===-1)}):n.indexOf(i.label.toLowerCase().trim())===-1&&o.push(i),o),[])}function foe(e,t){return e?t.split(new RegExp(`[${e.join("")}]`)).map(n=>n.trim()).filter(n=>n!==""):[t]}function fk({splitChars:e,allowDuplicates:t,maxTags:n,value:r,currentTags:o}){const i=foe(e,r),s=t?[...o,...i]:[...new Set([...o,...i])];return n?s.slice(0,n):s}const hoe={maxTags:1/0,allowDuplicates:!1,acceptValueOnBlur:!0,splitChars:[","],hiddenInputValuesDivider:","},$j=Ue((e,t)=>{const n=Pe("TagsInput",hoe,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,vars:c,size:u,value:f,defaultValue:p,onChange:g,onKeyDown:y,maxTags:v,allowDuplicates:x,onDuplicate:S,variant:E,data:C,dropdownOpened:_,defaultDropdownOpened:j,onDropdownOpen:A,onDropdownClose:T,selectFirstOptionOnChange:k,onOptionSubmit:R,comboboxProps:V,filter:H,limit:F,withScrollArea:B,maxDropdownHeight:U,searchValue:M,defaultSearchValue:z,onSearchChange:$,readOnly:L,disabled:P,splitChars:q,onFocus:Y,onBlur:D,onPaste:W,radius:K,rightSection:Q,rightSectionWidth:ie,rightSectionPointerEvents:pe,rightSectionProps:ue,leftSection:se,leftSectionWidth:me,leftSectionPointerEvents:xe,leftSectionProps:je,inputContainer:_e,inputWrapperOrder:Ee,withAsterisk:Re,required:Me,labelProps:ze,descriptionProps:ve,errorProps:Ce,wrapperProps:Ae,description:G,label:re,error:ne,withErrorStyles:ce,name:te,form:Z,id:de,clearable:Te,clearButtonProps:$e,hiddenInputProps:Ke,hiddenInputValuesDivider:At,mod:yn,renderOption:ls,onRemove:pr,onClear:dn,scrollAreaProps:Ut,acceptValueOnBlur:nn,...qo}=n,cs=gi(de),Ku=F8(C),Ja=YO(Ku),Is=w.useRef(null),Ya=jn(Is,t),Wn=sj({opened:_,defaultOpened:j,onDropdownOpen:A,onDropdownClose:()=>{T?.(),Wn.resetSelectedOption()}}),{styleProps:Ka,rest:{type:Xa,autoComplete:Ih,...Xu}}=sh(qo),[rn,Cr]=ho({value:f,defaultValue:p,finalValue:[],onChange:g}),[Ei,Qu]=ho({value:M,defaultValue:z,finalValue:"",onChange:$}),Ni=lt=>{Qu(lt),Wn.resetSelectedOption()},Qa=gt({name:"TagsInput",classes:{},props:n,classNames:r,styles:s,unstyled:a}),{resolvedClassNames:Za,resolvedStyles:el}=ih({props:n,styles:s,classNames:r}),Ac=lt=>{const tr=rn.some(vo=>vo.toLowerCase()===lt.toLowerCase());tr&&S?.(lt),(!tr||tr&&x)&&rn.length0&&Cr([...rn,lt]))},Zu=lt=>{if(y?.(lt),lt.isPropagationStopped())return;const tr=Ei.trim(),{length:vo}=tr;if(q.includes(lt.key)&&vo>0&&(Cr(fk({splitChars:q,allowDuplicates:x,maxTags:v,value:Ei,currentTags:rn})),Ni(""),lt.preventDefault()),lt.key==="Enter"&&vo>0&&!lt.nativeEvent.isComposing){if(lt.preventDefault(),!!document.querySelector(`#${Wn.listId} [data-combobox-option][data-combobox-selected]`))return;Ac(tr)}lt.key==="Backspace"&&vo===0&&rn.length>0&&!lt.nativeEvent.isComposing&&(pr?.(rn[rn.length-1]),Cr(rn.slice(0,rn.length-1)))},Wo=lt=>{if(W?.(lt),lt.preventDefault(),lt.clipboardData){const tr=lt.clipboardData.getData("text/plain");Cr(fk({splitChars:q,allowDuplicates:x,maxTags:v,value:`${Ei}${tr}`,currentTags:rn})),Ni("")}},Tn=rn.map((lt,tr)=>h.jsx(Am,{withRemoveButton:!L,onRemove:()=>{const vo=rn.slice();vo.splice(tr,1),Cr(vo),pr?.(lt)},unstyled:a,disabled:P,...Qa("pill"),children:lt},`${lt}-${tr}`));w.useEffect(()=>{k&&Wn.selectFirstOption()},[k,rn,Ei]);const er=h.jsx(Ct.ClearButton,{...$e,onClear:()=>{Cr([]),Ni(""),Is.current?.focus(),Wn.openDropdown(),dn?.()}});return h.jsxs(h.Fragment,{children:[h.jsxs(Ct,{store:Wn,classNames:Za,styles:el,unstyled:a,size:u,readOnly:L,__staticSelector:"TagsInput",onOptionSubmit:lt=>{R?.(lt),Ni(""),rn.length0&&!P&&!L,rightSectionWidth:ie,rightSectionPointerEvents:pe,rightSectionProps:ue,leftSection:se,leftSectionWidth:me,leftSectionPointerEvents:xe,leftSectionProps:je,inputContainer:_e,inputWrapperOrder:Ee,withAsterisk:Re,required:Me,labelProps:ze,descriptionProps:ve,errorProps:Ce,wrapperProps:Ae,description:G,label:re,error:ne,withErrorStyles:ce,__stylesApiProps:{...n,multiline:!0},id:cs,mod:yn,children:h.jsxs(Am.Group,{disabled:P,unstyled:a,...Qa("pillsList"),children:[Tn,h.jsx(Ct.EventsTarget,{autoComplete:Ih,children:h.jsx(dv.Field,{...Xu,ref:Ya,...Qa("inputField"),unstyled:a,onKeyDown:Zu,onFocus:lt=>{Y?.(lt),Wn.openDropdown()},onBlur:lt=>{D?.(lt),nn&&Ac(Ei),Wn.closeDropdown()},onPaste:Wo,value:Ei,onChange:lt=>Ni(lt.currentTarget.value),required:Me&&rn.length===0,disabled:P,readOnly:L,id:cs})})]})})}),h.jsx(K8,{data:doe({data:Ku,value:rn}),hidden:L||P,filter:H,search:Ei,limit:F,hiddenWhenEmpty:!0,withScrollArea:B,maxDropdownHeight:U,unstyled:a,labelId:re?`${cs}-label`:void 0,"aria-label":re?void 0:qo["aria-label"],renderOption:ls,scrollAreaProps:Ut})]}),h.jsx(Ct.HiddenInput,{name:te,form:Z,value:rn,valuesDivider:At,disabled:P,...Ke})]})});$j.classes={...vi.classes,...Ct.classes};$j.displayName="@mantine/core/TagsInput";const poe={},_n=Ue((e,t)=>{const n=Pe("TextInput",poe,e);return h.jsx(vi,{component:"input",ref:t,...n,__staticSelector:"TextInput"})});_n.classes=vi.classes;_n.displayName="@mantine/core/TextInput";function moe(e){let t=e,n=!1;const r=new Set;return{getState(){return t},updateState(o){t=typeof o=="function"?o(t):o},setState(o){this.updateState(o),r.forEach(i=>i(t))},initialize(o){n||(t=o,n=!0)},subscribe(o){return r.add(o),()=>r.delete(o)}}}function goe(e){return w.useSyncExternalStore(e.subscribe,()=>e.getState(),()=>e.getState())}function yoe(e,t,n){const r=[],o=[],i={};for(const s of e){const a=s.position||t;i[a]=i[a]||0,i[a]+=1,i[a]<=n?o.push(s):r.push(s)}return{notifications:o,queue:r}}const boe=()=>moe({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),zu=boe(),voe=(e=zu)=>goe(e);function mh(e,t){const n=e.getState(),r=t([...n.notifications,...n.queue]),o=yoe(r,n.defaultPosition,n.limit);e.setState({notifications:o.notifications,queue:o.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function xoe(e,t=zu){const n=e.id||Yl();return mh(t,r=>e.id&&r.some(o=>o.id===e.id)?r:[...r,{...e,id:n}]),n}function EL(e,t=zu){return mh(t,n=>n.filter(r=>r.id===e?(r.onClose?.(r),!1):!0)),e}function woe(e,t=zu){return mh(t,n=>n.map(r=>r.id===e.id?{...r,...e}:r)),e.id}function Soe(e=zu){mh(e,()=>[])}function Eoe(e=zu){mh(e,t=>t.slice(0,e.getState().limit))}const ci={show:xoe,hide:EL,update:woe,clean:Soe,cleanQueue:Eoe,updateState:mh};function f_(e,t){return f_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},f_(e,t)}function NL(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,f_(e,t)}const hk={disabled:!1},fv=Ne.createContext(null);var Noe=function(t){return t.scrollTop},Zp="unmounted",Xc="exited",Qc="entering",Xd="entered",h_="exiting",La=function(e){NL(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var s=o,a=s&&!s.isMounting?r.enter:r.appear,c;return i.appearStatus=null,r.in?a?(c=Xc,i.appearStatus=Qc):c=Xd:r.unmountOnExit||r.mountOnEnter?c=Zp:c=Xc,i.state={status:c},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var s=o.in;return s&&i.status===Zp?{status:Xc}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==Qc&&s!==Xd&&(i=Qc):(s===Qc||s===Xd)&&(i=h_)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,s,a;return i=s=a=o,o!=null&&typeof o!="number"&&(i=o.exit,s=o.enter,a=o.appear!==void 0?o.appear:s),{exit:i,enter:s,appear:a}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===Qc){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:sf.findDOMNode(this);s&&Noe(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Xc&&this.setState({status:Zp})},n.performEnter=function(o){var i=this,s=this.props.enter,a=this.context?this.context.isMounting:o,c=this.props.nodeRef?[a]:[sf.findDOMNode(this),a],u=c[0],f=c[1],p=this.getTimeouts(),g=a?p.appear:p.enter;if(!o&&!s||hk.disabled){this.safeSetState({status:Xd},function(){i.props.onEntered(u)});return}this.props.onEnter(u,f),this.safeSetState({status:Qc},function(){i.props.onEntering(u,f),i.onTransitionEnd(g,function(){i.safeSetState({status:Xd},function(){i.props.onEntered(u,f)})})})},n.performExit=function(){var o=this,i=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:sf.findDOMNode(this);if(!i||hk.disabled){this.safeSetState({status:Xc},function(){o.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:h_},function(){o.props.onExiting(a),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:Xc},function(){o.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,i.nextCallback=null,o(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:sf.findDOMNode(this),a=o==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=c[0],f=c[1];this.props.addEndListener(u,f)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===Zp)return null;var i=this.props,s=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var a=uj(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Ne.createElement(fv.Provider,{value:null},typeof s=="function"?s(o,a):Ne.cloneElement(Ne.Children.only(s),a))},t}(Ne.Component);La.contextType=fv;La.propTypes={};function Ud(){}La.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ud,onEntering:Ud,onEntered:Ud,onExit:Ud,onExiting:Ud,onExited:Ud};La.UNMOUNTED=Zp;La.EXITED=Xc;La.ENTERING=Qc;La.ENTERED=Xd;La.EXITING=h_;function _oe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rj(e,t){var n=function(i){return t&&w.isValidElement(i)?t(i):i},r=Object.create(null);return e&&w.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function Coe(e,t){e=e||{},t=t||{};function n(f){return f in t?t[f]:e[f]}var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var s,a={};for(var c in t){if(r[c])for(s=0;s(n[r.position||t].push(r),n),_L.reduce((n,r)=>(n[r]=[],n),{}))}const pk={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},Roe={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function koe({state:e,maxHeight:t,position:n,transitionDuration:r}){const[o,i]=n.split("-"),s=i==="center"?`${o}-center`:i,a={opacity:0,maxHeight:t,transform:pk[s],transitionDuration:`${r}ms, ${r}ms, ${r}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},c={opacity:1,transform:Roe[s]},u={opacity:0,maxHeight:0,transform:pk[s]};return{...a,...{entering:c,entered:c,exiting:u,exited:u}[e]}}function Moe(e,t){return typeof t=="number"?t:t===!1||e===!1?!1:e}const CL=w.forwardRef(({data:e,onHide:t,autoClose:n,...r},o)=>{const{autoClose:i,message:s,...a}=e,c=Moe(n,e.autoClose),u=w.useRef(-1),f=()=>window.clearTimeout(u.current),p=()=>{t(e.id),f()},g=()=>{typeof c=="number"&&(u.current=window.setTimeout(p,c))};return w.useEffect(()=>{e.onOpen?.(e)},[]),w.useEffect(()=>(g(),f),[c]),h.jsx(vj,{...r,...a,onClose:p,ref:o,onMouseEnter:f,onMouseLeave:g,children:s})});CL.displayName="@mantine/notifications/NotificationContainer";var OL={root:"m_b37d9ac7",notification:"m_5ed0edd0"};const Poe=La,Doe={position:"bottom-right",autoClose:4e3,transitionDuration:250,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:ts("overlay"),store:zu,withinPortal:!0},Ioe=(e,{zIndex:t,containerWidth:n})=>({root:{"--notifications-z-index":t?.toString(),"--notifications-container-width":Oe(n)}}),ks=Ue((e,t)=>{const n=Pe("Notifications",Doe,e),{classNames:r,className:o,style:i,styles:s,unstyled:a,vars:c,position:u,autoClose:f,transitionDuration:p,containerWidth:g,notificationMaxHeight:y,limit:v,zIndex:x,store:S,portalProps:E,withinPortal:C,..._}=n,j=zo(),A=voe(S),T=dX(),k=yO(),R=w.useRef({}),V=w.useRef(0),F=(j.respectReducedMotion?k:!1)?1:p,B=gt({name:"Notifications",classes:OL,props:n,className:o,style:i,classNames:r,styles:s,unstyled:a,vars:c,varsResolver:Ioe});w.useEffect(()=>{S?.updateState(z=>({...z,limit:v||5,defaultPosition:u}))},[v,u]),_a(()=>{A.notifications.length>V.current&&setTimeout(()=>T(),0),V.current=A.notifications.length},[A.notifications]);const U=$oe(A.notifications,u),M=_L.reduce((z,$)=>(z[$]=U[$].map(({style:L,...P})=>h.jsx(Poe,{timeout:F,onEnter:()=>R.current[P.id].offsetHeight,nodeRef:{current:R.current[P.id]},children:q=>h.jsx(CL,{ref:Y=>{R.current[P.id]=Y},data:P,onHide:Y=>EL(Y,S),autoClose:f,...B("notification",{style:{...koe({state:q,position:$,transitionDuration:F,maxHeight:y}),...L}})})},P.id)),z),{});return h.jsxs(Fu,{withinPortal:C,...E,children:[h.jsx(Fe,{...B("root"),"data-position":"top-center",ref:t,..._,children:h.jsx(Il,{children:M["top-center"]})}),h.jsx(Fe,{...B("root"),"data-position":"top-left",..._,children:h.jsx(Il,{children:M["top-left"]})}),h.jsx(Fe,{...B("root",{className:rv.classNames.fullWidth}),"data-position":"top-right",..._,children:h.jsx(Il,{children:M["top-right"]})}),h.jsx(Fe,{...B("root",{className:rv.classNames.fullWidth}),"data-position":"bottom-right",..._,children:h.jsx(Il,{children:M["bottom-right"]})}),h.jsx(Fe,{...B("root"),"data-position":"bottom-left",..._,children:h.jsx(Il,{children:M["bottom-left"]})}),h.jsx(Fe,{...B("root"),"data-position":"bottom-center",..._,children:h.jsx(Il,{children:M["bottom-center"]})})]})});ks.classes=OL;ks.displayName="@mantine/notifications/Notifications";ks.show=ci.show;ks.hide=ci.hide;ks.update=ci.update;ks.clean=ci.clean;ks.cleanQueue=ci.cleanQueue;ks.updateState=ci.updateState;var Pb={exports:{}},Loe=Pb.exports,mk;function Foe(){return mk||(mk=1,function(e,t){(function(n,r){e.exports=r()})(Loe,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",s="second",a="minute",c="hour",u="day",f="week",p="month",g="quarter",y="year",v="date",x="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(M){var z=["th","st","nd","rd"],$=M%100;return"["+M+(z[($-20)%10]||z[$]||z[0])+"]"}},_=function(M,z,$){var L=String(M);return!L||L.length>=z?M:""+Array(z+1-L.length).join($)+M},j={s:_,z:function(M){var z=-M.utcOffset(),$=Math.abs(z),L=Math.floor($/60),P=$%60;return(z<=0?"+":"-")+_(L,2,"0")+":"+_(P,2,"0")},m:function M(z,$){if(z.date()<$.date())return-M($,z);var L=12*($.year()-z.year())+($.month()-z.month()),P=z.clone().add(L,p),q=$-P<0,Y=z.clone().add(L+(q?-1:1),p);return+(-(L+($-P)/(q?P-Y:Y-P))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:p,y,w:f,d:u,D:v,h:c,m:a,s,ms:i,Q:g}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},A="en",T={};T[A]=C;var k="$isDayjsObject",R=function(M){return M instanceof B||!(!M||!M[k])},V=function M(z,$,L){var P;if(!z)return A;if(typeof z=="string"){var q=z.toLowerCase();T[q]&&(P=q),$&&(T[q]=$,P=q);var Y=z.split("-");if(!P&&Y.length>1)return M(Y[0])}else{var D=z.name;T[D]=z,P=D}return!L&&P&&(A=P),P||!L&&A},H=function(M,z){if(R(M))return M.clone();var $=typeof z=="object"?z:{};return $.date=M,$.args=arguments,new B($)},F=j;F.l=V,F.i=R,F.w=function(M,z){return H(M,{locale:z.$L,utc:z.$u,x:z.$x,$offset:z.$offset})};var B=function(){function M($){this.$L=V($.locale,null,!0),this.parse($),this.$x=this.$x||$.x||{},this[k]=!0}var z=M.prototype;return z.parse=function($){this.$d=function(L){var P=L.date,q=L.utc;if(P===null)return new Date(NaN);if(F.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var Y=P.match(S);if(Y){var D=Y[2]-1||0,W=(Y[7]||"0").substring(0,3);return q?new Date(Date.UTC(Y[1],D,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,W)):new Date(Y[1],D,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,W)}}return new Date(P)}($),this.init()},z.init=function(){var $=this.$d;this.$y=$.getFullYear(),this.$M=$.getMonth(),this.$D=$.getDate(),this.$W=$.getDay(),this.$H=$.getHours(),this.$m=$.getMinutes(),this.$s=$.getSeconds(),this.$ms=$.getMilliseconds()},z.$utils=function(){return F},z.isValid=function(){return this.$d.toString()!==x},z.isSame=function($,L){var P=H($);return this.startOf(L)<=P&&P<=this.endOf(L)},z.isAfter=function($,L){return H($)25){var f=s(this).startOf(r).add(1,r).date(u),p=s(this).endOf(n);if(f.isBefore(p))return 1}var g=s(this).startOf(r).date(u).startOf(n).subtract(1,"millisecond"),y=this.diff(g,n,!0);return y<0?s(this).startOf("week").week():Math.ceil(y)},a.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})}(Db)),Db.exports}var Uoe=Voe();const Hoe=es(Uoe);hv.extend(Hoe);function jL(e){return hv(e).format("YYYY-MM-DD HH:mm:ss")}var W0={exports:{}},yk;function qoe(){if(yk)return W0.exports;yk=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return W0.exports=t(),W0.exports.createColors=t,W0.exports}var Woe=qoe();const ri=es(Woe);var Goe={};const p_=(e,t)=>typeof e=="string"?[1,"1","true"].includes(e):!!(e||t);function ir(){try{return p_(0)}catch{return!1}}function Joe(){try{return"0.20.0"}catch{return"0.0.0"}}const Yoe={cli_log_level:{key:"BKND_CLI_LOG_LEVEL",validate:e=>{if(typeof e=="string"&&["log","info","warn","error","debug"].includes(e.toLowerCase()))return e.toLowerCase()}},cli_create_ref:{key:"BKND_CLI_CREATE_REF",validate:e=>typeof e=="string"?e:void 0},cli_telemetry:{key:"BKND_CLI_TELEMETRY",validate:e=>{if(!(typeof e>"u"))return p_(e,!0)}},modules_debug:{key:"BKND_MODULES_DEBUG",validate:p_}},AL=(e,t,n)=>{try{const r=n?.source??Goe,o=Yoe[e],i=r[o.key],s=o.validate(i);if(typeof s<"u")return n?.onValid?.(s),s;n?.onFallback?.(i)}catch{}return t};function Koe(){try{const e=process||{},t=e.argv||[],n=e.env||{};return!(n.NO_COLOR||t.includes("--no-color"))&&(!!n.FORCE_COLOR||t.includes("--color")||e.platform==="win32"||(e.stdout||{}).isTTY&&n.TERM!=="dumb"||!!n.CI)}catch{return!1}}const kj={critical:{prefix:"CRT",color:ri.red,args_color:ri.red,original:console.error},error:{prefix:"ERR",color:ri.red,args_color:ri.red,original:console.error},warn:{prefix:"WRN",color:ri.yellow,args_color:ri.yellow,original:console.warn},info:{prefix:"INF",color:ri.cyan,original:console.info},log:{prefix:"LOG",color:ri.dim,args_color:ri.dim,original:console.log},debug:{prefix:"DBG",color:ri.yellow,args_color:ri.dim,original:console.debug}};function Xoe(e,t){const n=Koe(),r=kj[e],o=r.color(`[${r.prefix}]`),i=t.map(s=>"args_color"in r&&n&&typeof s=="string"?r.args_color(s):s);return r.original(o,ri.gray(jL()),...i)}const TL=AL("cli_log_level","log"),Gc=globalThis.__consoleConfig??={level:TL,enabled:!0},bk=Object.keys(kj),rt=new Proxy(Gc,{get:(e,t)=>{switch(t){case"original":return console;case"disable":return()=>{Gc.enabled=!1};case"enable":return()=>{Gc.enabled=!0};case"setLevel":return o=>{Gc.level=o};case"resetLevel":return()=>{Gc.level=TL}}if(!Gc.enabled)return()=>null;const n=bk.indexOf(Gc.level),r=bk.indexOf(t);return t in kj&&r<=n?(...o)=>Xoe(t,o):()=>null}});function Qoe(){return(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))!==-1?"Opera":navigator.userAgent.indexOf("Edg")!==-1?"Edge":navigator.userAgent.indexOf("Chrome")!==-1?"Chrome":navigator.userAgent.indexOf("Safari")!==-1?"Safari":navigator.userAgent.indexOf("Firefox")!==-1?"Firefox":navigator.userAgent.indexOf("MSIE")!==-1||document.documentMode?"IE":"unknown"}function Io(e){return!e||e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function Zoe(e,t=" "){return!e||e.length===0?e:e.split(t).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(t)}function $L(e,t=!1){const o="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"+(t?"!@#$%^&*()_+{}:\"<>?|[];',./`~":"");let i="";for(let s=0;st.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}function m_(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function eie(e){return/^[a-z]+(_[a-z]+)*$/.test(e)?"snake_case":/^[A-Z][a-zA-Z]*$/.test(e)?"PascalCase":/^[a-z][a-zA-Z]*$/.test(e)?"camelCase":/^[a-z]+(-[a-z]+)*$/.test(e)?"kebab-case":/^[A-Z]+(_[A-Z]+)*$/.test(e)?"SCREAMING_SNAKE_CASE":"unknown"}function tie(e){switch(eie(e)){case"snake_case":return $f(e);case"PascalCase":return u2(m_(e));case"camelCase":return Io(u2(m_(e)));case"kebab-case":return u2(e);case"SCREAMING_SNAKE_CASE":return $f(e.toLowerCase());case"unknown":return Io(e)}}function Ta(e){return tie(e)}function u2(e){return e.split("-").map(Io).join(" ")}function Dg(e,t=" "){return Zoe($f(e),t)}function nie(e,t){return t instanceof RegExp?t.test(e):typeof t=="string"&&t.startsWith("/")?new RegExp(t).test(e):typeof t=="string"?e.startsWith(t):!1}function rie(e,t=50,n="..."){return e.length<=t?e:e.substring(0,t)+n}function $a(e){return Object.prototype.toString.call(e)==="[object Object]"}function _u(e){return e!==null&&typeof e=="object"}function mo(e,t){const n=new Set(t),r={};for(const[o,i]of Object.entries(e))n.has(o)||(r[o]=i);return r}function Rm(e,t){const n=new Set(t),r={};for(const[o,i]of Object.entries(e))n.has(o)&&(r[o]=i);return r}function g_(e,t=[]){return e===null||typeof e!="object"?e:Array.isArray(e)?e.map(n=>g_(n,t)):Object.keys(e).reduce((n,r)=>{const o=t.includes(r)?r:m_(r);return n[o]=g_(e[r],t),n},{})}function RL(e,t){const n={};for(const r in e)t.some(i=>r.includes(i))||(typeof e[r]=="object"&&e[r]!==null&&!Array.isArray(e[r])?n[r]=RL(e[r],t):n[r]=e[r]);return n}function Vt(e,t){const n={};for(const[r,o]of Object.entries(e)){const i=t(o,r);typeof i<"u"&&(n[r]=i)}return n}const Zx=Vt;function kL(e,t=""){let n=[];for(const r in e){const o=t?`${t}.${r}`:r;n.push(o),typeof e[r]=="object"&&e[r]!==null&&(n=n.concat(kL(e[r],o)))}return n}function ML(e){let t=1;for(const n in e)if(typeof e[n]=="object"){const r=ML(e[n])+1;t=Math.max(r,t)}return t}function oie(e,t){function n(r,o){if($a(r)){if(o>t)return;const i={};for(const s in r)Object.prototype.hasOwnProperty.call(r,s)&&(i[s]=n(r[s],o+1));return i}return Array.isArray(r)?r.map(i=>n(i,o)):r}return n(e,1)}function km(e){return e&&Object.entries(e).reduce((t,[n,r])=>{if(r&&Array.isArray(r)&&r.some(o=>typeof o=="object")){const o=r.map(km);o.length>0&&(t[n]=o)}else if(r&&typeof r=="object"&&!Array.isArray(r)){const o=km(r);Object.keys(o).length>0&&(t[n]=o)}else r!==""&&r!==null&&r!==void 0&&(t[n]=r);return t},{})}function PL(e,...t){for(const n of t)for(const[r,o]of Object.entries(n))o!==void 0&&(!$a(o)&&!Array.isArray(o)||Array.isArray(o)&&!Array.isArray(e[r])?e[r]=o:_u(e[r])?PL(e[r],o):e[r]=o);return e}function DL(e,t,n){for(const[r,o]of Object.entries(t)){const i=n(e[r],o,r,e,t);if(i!==void 0){e[r]=i;continue}o!==void 0&&(!$a(o)&&!Array.isArray(o)||Array.isArray(o)&&!Array.isArray(e[r])?e[r]=o:_u(e[r])?DL(e[r],o,n):e[r]=o)}return e}function va(e,t){const n=o=>{if(o!==Object(o))return"primitive";if(Array.isArray(o))return"array";if(o instanceof Map)return"map";if(o!=null&&[null,Object.prototype].includes(Object.getPrototypeOf(o)))return"plainObject";if(o instanceof Function)return"function";throw new Error(`deeply comparing an instance of type ${e.constructor?.name} is not supported.`)},r=n(e);if(r!==n(t))return!1;if(r==="primitive")return e===t||Number.isNaN(e)&&Number.isNaN(t);if(r==="array")return e.length===t.length&&e.every((o,i)=>va(o,t[i]));if(r==="map")return e.size===t.size&&[...e].every(([o,i])=>t.has(o)&&va(i,t.get(o)));if(r==="plainObject"){const o=new Map(Object.entries(e)),i=new Map(Object.entries(t));return o.size===i.size&&[...o].every(([s,a])=>i.has(s)&&va(a,i.get(s)))}else{if(r==="function")return e.toString()===t.toString();throw new Error("Unreachable")}}function Bn(e,t,n=void 0){const r=typeof t=="string"?t.split(/[.\[\]\"]+/).filter(o=>o):t;if(r.length===0)return e;try{const[o,...i]=r;return!o||!(o in e)?n:Bn(e[o],i,n)}catch{if(typeof n<"u")return n;throw new Error(`Invalid path: ${r.join(".")}`)}}function y_(e,t=0,n=0){const r=t?` +`:"",o=c=>t?" ".repeat(t*c):"",i=o(n+1),s=o(n);if(e===null)return"null";if(e===void 0)return"undefined";const a=typeof e;if(a==="string")return JSON.stringify(e);if(a==="number"||a==="boolean")return String(e);if(Array.isArray(e)){const c=e.map(u=>y_(u,t,n+1)).join(", "+(t?r+i:""));return"["+(t&&e.length?r+i:"")+c+(t&&e.length?r+s:"")+"]"}if(a==="object"){const c=Object.entries(e).map(([f,p])=>(/^[A-Za-z_$][\w$]*$/.test(f)?f:JSON.stringify(f))+": "+y_(p,t,n+1)),u=c.join(", "+(t?r+i:""));return"{"+(t&&c.length?r+i:"")+u+(t&&c.length?r+s:"")+"}"}throw new TypeError(`Unsupported data type: ${a}`)}function IL(e,t){return t.reduce((n,r)=>(r in e&&(n[r]=e[r]),n),{})}function Qd(e){if(Object.isFrozen(e))return e;const t=Reflect.ownKeys(e);for(const n of t){const r=e[n];(r&&typeof r=="object"||typeof r=="function")&&Qd(r)}return Object.freeze(e)}function iie(e){return Object.keys(e).every(t=>Number.isInteger(Number(t)))?Object.values(e):e}function b_(e,t,n,r){if(typeof e=="string"){const o=e.match(t);if(o&&o[0]===e&&o[1]){const i=o[1],s=Bn(n,i,null);return s!==null?s:r!==void 0?r:e}if(t.test(e))return e.replace(t,(i,s)=>{const a=Bn(n,s,null);return a!==null?String(a):r!==void 0?String(r):i})}return Array.isArray(e)?e.map(o=>b_(o,t,n,r)):e&&typeof e=="object"?Object.entries(e).reduce((o,[i,s])=>(o[i]=b_(s,t,n,r),o),{}):e}const Mj={video:["mp4","webm"],audio:["ogg"],image:["jpeg","png","gif","webp","bmp","tiff","avif","heic","heif"],text:["html","css","mdx","yaml","vcard","csv","vtt"],application:["zip","toml","json","json5","pdf","xml"],font:["woff","woff2","ttf","otf"]},pt={vnd:"vnd.openxmlformats-officedocument",z:"application/x-7z-compressed",t:(e="plain")=>`text/${e}`,a:(e="octet-stream")=>`application/${e}`,i:e=>`image/${e}`,v:e=>`video/${e}`,au:e=>`audio/${e}`},Pj=new Map([["7z",pt.z],["7zip",pt.z],["txt",pt.t()],["ai",pt.a("postscript")],["apk",pt.a("vnd.android.package-archive")],["doc",pt.a("msword")],["docx",`${pt.vnd}.wordprocessingml.document`],["eps",pt.a("postscript")],["epub",pt.a("epub+zip")],["ini",pt.t()],["ico",pt.i("vnd.microsoft.icon")],["jar",pt.a("java-archive")],["jsonld",pt.a("ld+json")],["jpg",pt.i("jpeg")],["js",pt.t("javascript")],["log",pt.t()],["m3u",pt.au("x-mpegurl")],["m3u8",pt.a("vnd.apple.mpegurl")],["manifest",pt.t("cache-manifest")],["md",pt.t("markdown")],["mkv",pt.v("x-matroska")],["mp3",pt.au("mpeg")],["mobi",pt.a("x-mobipocket-ebook")],["ppt",pt.a("powerpoint")],["pptx",`${pt.vnd}.presentationml.presentation`],["qt",pt.v("quicktime")],["svg",pt.i("svg+xml")],["tif",pt.i("tiff")],["tsv",pt.t("tab-separated-values")],["tgz",pt.a("x-tar")],["text",pt.t()],["vcd",pt.a("x-cdlink")],["vcs",pt.t("x-vcalendar")],["wav",pt.au("vnd.wav")],["webmanifest",pt.a("manifest+json")],["xls",pt.a("vnd.ms-excel")],["xlsx",`${pt.vnd}.spreadsheetml.sheet`],["yml",pt.t("yaml")]]);function LL(e){try{const t=e.split(".").pop();if(!t)return pt.a();for(const[n,r]of Object.entries(Mj))if(r.includes(t))return`${n}/${t}`;return Pj.get(t)}catch{return pt.a()}}function sie(e,t=[]){const n=e.toLowerCase();if(t.includes(n))return!1;if(Object.entries(Mj).flatMap(([r,o])=>o.map(i=>`${r}/${i}`)).includes(n))return!0;for(const[r,o]of Pj.entries())if(o===n&&!t.includes(r))return!0;return!1}function FL(e){const t=e.toLowerCase();for(const[n,r]of Object.entries(Mj))for(const o of r)if(t===`${n}/${o}`)return o;for(const[n,r]of Pj.entries())if(r===t)return n;return""}var aie={deno:"Deno",bun:"Bun",workerd:"Cloudflare-Workers",node:"Node.js"},zL=()=>{const e=globalThis;if(typeof navigator<"u"&&typeof navigator.userAgent=="string"){for(const[n,r]of Object.entries(aie))if(lie(r))return n}return typeof e?.EdgeRuntime=="string"?"edge-light":e?.fastly!==void 0?"fastly":e?.process?.release?.name==="node"?"node":"other"},lie=e=>navigator.userAgent.startsWith(e);function cie(){const e=globalThis;return e?.process?.env?.NEXT_RUNTIME==="nodejs"?"nextjs":e?.process?.env?.NEXT_RUNTIME==="edge"?"nextjs-edge":typeof window<"u"&&window.__NEXT_DATA__?"nextjs-client":zL()}const vk={redirects_non_fq:!0};function uie(e){return cie().startsWith("nextjs")&&(vk.redirects_non_fq=!1),vk[e]}function Hl(e,t){if(!e)throw new Error(t)}function die(e,t){try{return e(),!1}catch(n){if(t){if(n instanceof t)return!0;throw n}return!0}}function fie(e){let t="";typeof e=="string"?t=e:e instanceof Headers?t=e.get("Content-Disposition")||"":e instanceof Request&&(t=e.headers.get("Content-Disposition")||"");const n=t.match(/filename\*?=(?:UTF-8'')?("?)([^";]+)\1/);return n?n[2]:void 0}function hie(e){return typeof e=="object"&&e!==null&&typeof e.getReader=="function"}function ew(e){return typeof e=="object"&&e!==null&&typeof e.arrayBuffer=="function"&&typeof e.type=="string"}function xc(e){return ew(e)&&typeof e.name=="string"&&typeof e.lastModified=="number"}function pie(e){return typeof e=="object"&&e!==null&&Object.prototype.toString.call(e)==="[object ArrayBuffer]"}function mie(e){return typeof e=="object"&&e!==null&&ArrayBuffer.isView(e)}const gie={"89504E47":"image/png",FFD8FF:"image/jpeg",47494638:"image/gif","49492A00":"image/tiff","4D4D002A":"image/tiff","52494646????57454250":"image/webp","504B0304":"application/zip",25504446:"application/pdf","00000020667479706D70":"video/mp4","000001BA":"video/mpeg","000001B3":"video/mpeg","1A45DFA3":"video/webm","4F676753":"audio/ogg",494433:"audio/mpeg",FFF1:"audio/aac",FFF9:"audio/aac","52494646????41564920":"audio/wav","52494646????57415645":"audio/wave","52494646????415550":"audio/aiff"};async function yie(e){if(!e)return;let t;if(hie(e)){const r=e.getReader(),{value:o}=await r.read();if(!o)return;t=new Uint8Array(o)}else if(ew(e)||xc(e))t=new Uint8Array(await e.slice(0,12).arrayBuffer());else if(pie(e))t=new Uint8Array(e);else if(mie(e))t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);else if(typeof e=="string")t=new TextEncoder().encode(e);else return;const n=Array.from(t.slice(0,12)).map(r=>r.toString(16).padStart(2,"0").toUpperCase()).join("");for(const[r,o]of Object.entries(gie))if(new RegExp("^"+r.replace(/\?\?/g,"..")).test(n))return o}async function d2(e){const t=e.req.header("Content-Type")??"application/octet-stream";if(t?.startsWith("multipart/form-data")||t?.startsWith("application/x-www-form-urlencoded"))try{const n=await e.req.formData();if([...n.values()].length>0){const r=[...n.values()][0];return await xk(r)}}catch(n){rt.warn("Error parsing form data",n)}else try{const n=await e.req.blob();if(xc(n))return n;if(ew(n))return await xk(n,{name:fie(e.req.raw),type:t})}catch(n){rt.warn("Error parsing blob",n)}throw new Error("No file found in request")}async function bie(e,t){const n=xc(e),r=n?e.type:t;Hl(r&&typeof r=="string"&&r.startsWith("image/"),"type must be image/*");const o=n?await e.arrayBuffer():e;Hl(o.byteLength>=128,"Buffer must be at least 128 bytes");const i=new DataView(o);if(r==="image/jpeg"){let s=2;for(;ss.trim().toLowerCase()).filter(Boolean).some(s=>{if(s.startsWith("."))return r.endsWith(s);if(s.indexOf("/")!==-1){const[c,u]=s.split("/");if(u==="*"){if(!o)return!1;const[f]=o.split("/");return f===c}else return o.startsWith(s)}return!1})}function xie(e){return e?{...Object.fromEntries(e.entries())}:{}}function wie(e,t){const n=xie(e),r={};for(const o of t)n[o]&&(r[o]=n[o]);return r}function Sie(e,t){const n=new Headers;for(const r of t)e.has(r)&&n.set(r,e.get(r));return n}function tw(e,t){let n="";function r(o){return t?.encode?encodeURIComponent(o):o}for(const o in e){let i=e[o];if(i!==void 0)if(Array.isArray(i))for(let s=0;s0&&(n+="&"),n+=`${r(o)}=${r(i[s])}`;else typeof i=="object"&&(i=JSON.stringify(i)),n.length>0&&(n+="&"),n+=`${r(o)}=${r(i)}`}return(t?.prefix||"")+n}function Eie(e){function t(s){if(!s)return"";const a=decodeURIComponent(s);if(a==="false")return!1;if(a==="true")return!0;try{return JSON.parse(a)}catch{return+a*0===0?+a:a}}let n,r;const o={},i=e.split("&");for(;n=i.shift();)n=n.split("="),r=n.shift(),o[r]!==void 0?o[r]=[].concat(o[r],t(n.shift())):o[r]=t(n.shift());return o}var Qt=(e=>(e[e.CONTINUE=100]="CONTINUE",e[e.PROCESSING=102]="PROCESSING",e[e.EARLY_HINTS=103]="EARLY_HINTS",e[e.OK=200]="OK",e[e.CREATED=201]="CREATED",e[e.ACCEPTED=202]="ACCEPTED",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.ALREADY_REPORTED=208]="ALREADY_REPORTED",e[e.IM_USED=226]="IM_USED",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.FOUND=302]="FOUND",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.USE_PROXY=305]="USE_PROXY",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.CONFLICT=409]="CONFLICT",e[e.GONE=410]="GONE",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",e[e.URI_TOO_LONG=414]="URI_TOO_LONG",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.IM_A_TEAPOT=418]="IM_A_TEAPOT",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.LOCKED=423]="LOCKED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.TOO_EARLY=425]="TOO_EARLY",e[e.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.LOOP_DETECTED=508]="LOOP_DETECTED",e[e.NOT_EXTENDED=510]="NOT_EXTENDED",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",e))(Qt||{});const BL=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Nie=BL+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",_ie="["+BL+"]["+Nie+"]*",Cie=new RegExp("^"+_ie+"$");function VL(e,t){const n=[];let r=t.exec(e);for(;r;){const o=[];o.startIndex=t.lastIndex-r[0].length;const i=r.length;for(let s=0;s"u")};function Oie(e){return typeof e<"u"}const jie={allowBooleanAttributes:!1,unpairedTags:[]};function Aie(e,t){t=Object.assign({},jie,t);const n=[];let r=!1,o=!1;e[0]==="\uFEFF"&&(e=e.substr(1));for(let i=0;i"&&e[i]!==" "&&e[i]!==" "&&e[i]!==` +`&&e[i]!=="\r";i++)c+=e[i];if(c=c.trim(),c[c.length-1]==="/"&&(c=c.substring(0,c.length-1),i--),!Iie(c)){let p;return c.trim().length===0?p="Invalid space after '<'.":p="Tag '"+c+"' is an invalid name.",Mn("InvalidTag",p,Rr(e,i))}const u=Rie(e,i);if(u===!1)return Mn("InvalidAttr","Attributes for '"+c+"' have open quote.",Rr(e,i));let f=u.value;if(i=u.index,f[f.length-1]==="/"){const p=i-f.length;f=f.substring(0,f.length-1);const g=Nk(f,t);if(g===!0)r=!0;else return Mn(g.err.code,g.err.msg,Rr(e,p+g.err.line))}else if(a)if(u.tagClosed){if(f.trim().length>0)return Mn("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",Rr(e,s));if(n.length===0)return Mn("InvalidTag","Closing tag '"+c+"' has not been opened.",Rr(e,s));{const p=n.pop();if(c!==p.tagName){let g=Rr(e,p.tagStartPos);return Mn("InvalidTag","Expected closing tag '"+p.tagName+"' (opened in line "+g.line+", col "+g.col+") instead of closing tag '"+c+"'.",Rr(e,s))}n.length==0&&(o=!0)}}else return Mn("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",Rr(e,i));else{const p=Nk(f,t);if(p!==!0)return Mn(p.err.code,p.err.msg,Rr(e,i-f.length+p.err.line));if(o===!0)return Mn("InvalidXml","Multiple possible root nodes found.",Rr(e,i));t.unpairedTags.indexOf(c)!==-1||n.push({tagName:c,tagStartPos:s}),r=!0}for(i++;i0)return Mn("InvalidXml","Invalid '"+JSON.stringify(n.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Mn("InvalidXml","Start tag expected.",1);return!0}function wk(e){return e===" "||e===" "||e===` +`||e==="\r"}function Sk(e,t){const n=t;for(;t5&&r==="xml")return Mn("InvalidXml","XML declaration allowed only at the start of the document.",Rr(e,t));if(e[t]=="?"&&e[t+1]==">"){t++;break}else continue}return t}function Ek(e,t){if(e.length>t+5&&e[t+1]==="-"&&e[t+2]==="-"){for(t+=3;t"){t+=2;break}}else if(e.length>t+8&&e[t+1]==="D"&&e[t+2]==="O"&&e[t+3]==="C"&&e[t+4]==="T"&&e[t+5]==="Y"&&e[t+6]==="P"&&e[t+7]==="E"){let n=1;for(t+=8;t"&&(n--,n===0))break}else if(e.length>t+9&&e[t+1]==="["&&e[t+2]==="C"&&e[t+3]==="D"&&e[t+4]==="A"&&e[t+5]==="T"&&e[t+6]==="A"&&e[t+7]==="["){for(t+=8;t"){t+=2;break}}return t}const Tie='"',$ie="'";function Rie(e,t){let n="",r="",o=!1;for(;t"&&r===""){o=!0;break}n+=e[t]}return r!==""?!1:{value:n,index:t,tagClosed:o}}const kie=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Nk(e,t){const n=VL(e,kie),r={};for(let o=0;o!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e},captureMetaData:!1},Fie=function(e){return Object.assign({},Lie,e)};let pv;typeof Symbol!="function"?pv="@@xmlMetadata":pv=Symbol("XML Node Metadata");class iu{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,n){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:n})}addChild(t,n){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),n!==void 0&&(this.child[this.child.length-1][pv]={startIndex:n})}static getMetaDataSymbol(){return pv}}class zie{constructor(t){this.suppressValidationErr=!t}readDocType(t,n){const r={};if(t[n+3]==="O"&&t[n+4]==="C"&&t[n+5]==="T"&&t[n+6]==="Y"&&t[n+7]==="P"&&t[n+8]==="E"){n=n+9;let o=1,i=!1,s=!1,a="";for(;n"){if(s?t[n-1]==="-"&&t[n-2]==="-"&&(s=!1,o--):o--,o===0)break}else t[n]==="["?i=!0:a+=t[n];if(o!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:r,i:n}}readEntityExp(t,n){n=Xr(t,n);let r="";for(;n{for(;t1||i.length===1&&!a))return e;{const c=Number(n),u=String(c);if(c===0)return c;if(u.search(/[eE]/)!==-1)return t.eNotation?c:e;if(n.indexOf(".")!==-1)return u==="0"||u===s||u===`${o}${s}`?c:e;let f=i?s:n;return i?f===u||o+f===u?c:e:f===u||f===o+u?c:e}}else return e}}const qie=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Wie(e,t,n){if(!n.eNotation)return e;const r=t.match(qie);if(r){let o=r[1]||"";const i=r[3].indexOf("e")===-1?"E":"e",s=r[2],a=o?e[s.length+1]===i:e[s.length]===i;return s.length>1&&a?e:s.length===1&&(r[3].startsWith(`.${i}`)||r[3][0]===i)?Number(t):n.leadingZeros&&!a?(t=(r[1]||"")+r[3],Number(t)):e}else return e}function Gie(e){return e&&e.indexOf(".")!==-1&&(e=e.replace(/0+$/,""),e==="."?e="0":e[0]==="."?e="0"+e:e[e.length-1]==="."&&(e=e.substring(0,e.length-1))),e}function Jie(e,t){if(parseInt)return parseInt(e,t);if(Number.parseInt)return Number.parseInt(e,t);if(window&&window.parseInt)return window.parseInt(e,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function Yie(e){return typeof e=="function"?e:Array.isArray(e)?t=>{for(const n of e)if(typeof n=="string"&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}class Kie{constructor(t){if(this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(n,r)=>String.fromCodePoint(Number.parseInt(r,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(n,r)=>String.fromCodePoint(Number.parseInt(r,16))}},this.addExternalEntities=Xie,this.parseXml=nse,this.parseTextData=Qie,this.resolveNameSpace=Zie,this.buildAttributesMap=tse,this.isItStopNode=sse,this.replaceEntitiesValue=ose,this.readStopNodeData=lse,this.saveTextToParentTag=ise,this.addChild=rse,this.ignoreAttributesFn=Yie(this.options.ignoreAttributes),this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let n=0;n0)){s||(e=this.replaceEntitiesValue(e));const a=this.options.tagValueProcessor(t,e,n,o,i);return a==null?e:typeof a!=typeof e||a!==e?a:this.options.trimValues?x_(e,this.options.parseTagValue,this.options.numberParseOptions):e.trim()===e?x_(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function Zie(e){if(this.options.removeNSPrefix){const t=e.split(":"),n=e.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(e=n+t[1])}return e}const ese=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function tse(e,t,n){if(this.options.ignoreAttributes!==!0&&typeof e=="string"){const r=VL(e,ese),o=r.length,i={};for(let s=0;s",s,"Closing Tag is not closed.");let u=e.substring(s+2,c).trim();if(this.options.removeNSPrefix){const g=u.indexOf(":");g!==-1&&(u=u.substr(g+1))}this.options.transformTagName&&(u=this.options.transformTagName(u)),n&&(r=this.saveTextToParentTag(r,n,o));const f=o.substring(o.lastIndexOf(".")+1);if(u&&this.options.unpairedTags.indexOf(u)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let p=0;f&&this.options.unpairedTags.indexOf(f)!==-1?(p=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):p=o.lastIndexOf("."),o=o.substring(0,p),n=this.tagsNodeStack.pop(),r="",s=c}else if(e[s+1]==="?"){let c=v_(e,s,!1,"?>");if(!c)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,o),!(this.options.ignoreDeclaration&&c.tagName==="?xml"||this.options.ignorePiTags)){const u=new iu(c.tagName);u.add(this.options.textNodeName,""),c.tagName!==c.tagExp&&c.attrExpPresent&&(u[":@"]=this.buildAttributesMap(c.tagExp,o,c.tagName)),this.addChild(n,u,o,s)}s=c.closeIndex+1}else if(e.substr(s+1,3)==="!--"){const c=fu(e,"-->",s+4,"Comment is not closed.");if(this.options.commentPropName){const u=e.substring(s+4,c-2);r=this.saveTextToParentTag(r,n,o),n.add(this.options.commentPropName,[{[this.options.textNodeName]:u}])}s=c}else if(e.substr(s+1,2)==="!D"){const c=i.readDocType(e,s);this.docTypeEntities=c.entities,s=c.i}else if(e.substr(s+1,2)==="!["){const c=fu(e,"]]>",s,"CDATA is not closed.")-2,u=e.substring(s+9,c);r=this.saveTextToParentTag(r,n,o);let f=this.parseTextData(u,n.tagname,o,!0,!1,!0,!0);f==null&&(f=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:u}]):n.add(this.options.textNodeName,f),s=c+2}else{let c=v_(e,s,this.options.removeNSPrefix),u=c.tagName;const f=c.rawTagName;let p=c.tagExp,g=c.attrExpPresent,y=c.closeIndex;this.options.transformTagName&&(u=this.options.transformTagName(u)),n&&r&&n.tagname!=="!xml"&&(r=this.saveTextToParentTag(r,n,o,!1));const v=n;v&&this.options.unpairedTags.indexOf(v.tagname)!==-1&&(n=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),u!==t.tagname&&(o+=o?"."+u:u);const x=s;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,o,u)){let S="";if(p.length>0&&p.lastIndexOf("/")===p.length-1)u[u.length-1]==="/"?(u=u.substr(0,u.length-1),o=o.substr(0,o.length-1),p=u):p=p.substr(0,p.length-1),s=c.closeIndex;else if(this.options.unpairedTags.indexOf(u)!==-1)s=c.closeIndex;else{const C=this.readStopNodeData(e,f,y+1);if(!C)throw new Error(`Unexpected end of ${f}`);s=C.i,S=C.tagContent}const E=new iu(u);u!==p&&g&&(E[":@"]=this.buildAttributesMap(p,o,u)),S&&(S=this.parseTextData(S,u,o,!0,g,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),E.add(this.options.textNodeName,S),this.addChild(n,E,o,x)}else{if(p.length>0&&p.lastIndexOf("/")===p.length-1){u[u.length-1]==="/"?(u=u.substr(0,u.length-1),o=o.substr(0,o.length-1),p=u):p=p.substr(0,p.length-1),this.options.transformTagName&&(u=this.options.transformTagName(u));const S=new iu(u);u!==p&&g&&(S[":@"]=this.buildAttributesMap(p,o,u)),this.addChild(n,S,o,x),o=o.substr(0,o.lastIndexOf("."))}else{const S=new iu(u);this.tagsNodeStack.push(n),u!==p&&g&&(S[":@"]=this.buildAttributesMap(p,o,u)),this.addChild(n,S,o,x),n=S}r="",s=y}}else r+=e[s];return t.child};function rse(e,t,n,r){this.options.captureMetaData||(r=void 0);const o=this.options.updateTag(t.tagname,n,t[":@"]);o===!1||(typeof o=="string"&&(t.tagname=o),e.addChild(t,r))}const ose=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function ise(e,t,n,r){return e&&(r===void 0&&(r=t.child.length===0),e=this.parseTextData(e,t.tagname,n,!1,t[":@"]?Object.keys(t[":@"]).length!==0:!1,r),e!==void 0&&e!==""&&t.add(this.options.textNodeName,e),e=""),e}function sse(e,t,n,r){return!!(t&&t.has(r)||e&&e.has(n))}function ase(e,t,n=">"){let r,o="";for(let i=t;i",n,`${t} is not closed`);if(e.substring(n+2,i).trim()===t&&(o--,o===0))return{tagContent:e.substring(r,n),i};n=i}else if(e[n+1]==="?")n=fu(e,"?>",n+1,"StopNode is not closed.");else if(e.substr(n+1,3)==="!--")n=fu(e,"-->",n+3,"StopNode is not closed.");else if(e.substr(n+1,2)==="![")n=fu(e,"]]>",n,"StopNode is not closed.")-2;else{const i=v_(e,n,">");i&&((i&&i.tagName)===t&&i.tagExp[i.tagExp.length-1]!=="/"&&o++,n=i.closeIndex)}}function x_(e,t,n){if(t&&typeof e=="string"){const r=e.trim();return r==="true"?!0:r==="false"?!1:Hie(e,n)}else return Oie(e)?e:""}const f2=iu.getMetaDataSymbol();function cse(e,t){return UL(e,t)}function UL(e,t,n){let r;const o={};for(let i=0;i0&&(o[t.textNodeName]=r):r!==void 0&&(o[t.textNodeName]=r),o}function use(e){const t=Object.keys(e);for(let n=0;na.toString(16).padStart(2,"0")).join("")}const HL={sha256:async(e,t,n)=>_k("SHA-256",e,t,n),sha1:async(e,t,n)=>_k("SHA-1",e,t,n)};function gse(e){const t=new Uint8Array(e);return crypto.getRandomValues(t),Array.from(t,n=>String.fromCharCode(33+n%94)).join("")}const dr=[];for(let e=0;e<256;++e)dr.push((e+256).toString(16).slice(1));function qL(e,t=0){return(dr[e[t+0]]+dr[e[t+1]]+dr[e[t+2]]+dr[e[t+3]]+"-"+dr[e[t+4]]+dr[e[t+5]]+"-"+dr[e[t+6]]+dr[e[t+7]]+"-"+dr[e[t+8]]+dr[e[t+9]]+"-"+dr[e[t+10]]+dr[e[t+11]]+dr[e[t+12]]+dr[e[t+13]]+dr[e[t+14]]+dr[e[t+15]]).toLowerCase()}let h2;const yse=new Uint8Array(16);function WL(){if(!h2){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");h2=crypto.getRandomValues.bind(crypto)}return h2(yse)}const bse=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ck={randomUUID:bse};function vse(e,t,n){e=e||{};const r=e.random??e.rng?.()??WL();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,qL(r)}function xse(e,t,n){return Ck.randomUUID&&!e?Ck.randomUUID():vse(e)}const p2={};function wse(e,t,n){let r;{const o=Date.now(),i=WL();Sse(p2,o,i),r=Ese(i,p2.msecs,p2.seq,t,n)}return t??qL(r)}function Sse(e,t,n){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=n[6]<<23|n[7]<<16|n[8]<<8|n[9],e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function Ese(e,t,n,r,o=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(!r)r=new Uint8Array(16),o=0;else if(o<0||o+16>r.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);return t??=Date.now(),n??=e[6]*127<<24|e[7]<<16|e[8]<<8|e[9],r[o++]=t/1099511627776&255,r[o++]=t/4294967296&255,r[o++]=t/16777216&255,r[o++]=t/65536&255,r[o++]=t/256&255,r[o++]=t&255,r[o++]=112|n>>>28&15,r[o++]=n>>>20&255,r[o++]=128|n>>>14&63,r[o++]=n>>>6&255,r[o++]=n<<2&255|e[10]&3,r[o++]=e[11],r[o++]=e[12],r[o++]=e[13],r[o++]=e[14],r[o++]=e[15],r}function Nse(){return xse()}function _se(){return wse()}function GL(e,t,n){const r=Math.min(t,n),o=Math.max(t,n);return Math.max(r,Math.min(e,o))}function Ok(e){return e==null?0:typeof e=="number"?e:Number.parseInt(e,10)}const rw={fileSize:(e,t=2)=>{if(e===0)return"0 B";const n=1024,r=t<0?0:t,o=["B","KB","MB","GB","TB"],i=Math.floor(Math.log(e)/Math.log(n));return Number.parseFloat((e/n**i).toFixed(r))+" "+o[i]}};let Br=class extends Error{code=Qt.BAD_REQUEST;name="Exception";_context=void 0;constructor(t,n){super(t),n&&(this.code=n)}context(t){return this._context=t,this}toJSON(){return{error:this.message,type:this.name,context:this._context}}};class af extends Error{constructor(t,n,r){super(t),this.details=n,this.type=r}static with(t,n,r){throw new af(t,n,r)}toJSON(){return{type:this.type??"unknown",message:this.message,details:this.details}}}var w_=(e=[],t="")=>"/"+[t,...e.map(n=>String(n).replace(/\./g,"/"))].filter(Boolean).join("/"),JL=e=>e.split("/").slice(1);function Cse(e,t,n=void 0){let r=typeof t=="string"?JL(t):w_(t);return ow(e,r,n)}function ow(e,t,n=void 0){let r=typeof t=="string"?t.split(/[.\[\]\"]+/).filter(o=>o):t;if(r.length===0)return e;try{let[o,...i]=r;return!o||!(o in e)?n:ow(e[o],i,n)}catch{if(typeof n<"u")return n;throw new Error(`Invalid path: ${r.join(".")}`)}}var Zt=(e={},t,n,r)=>({valid:!1,errors:[...e.errors??[],{keywordLocation:w_([...e.keywordPath??[],t]),instanceLocation:w_(e.instancePath),error:typeof n=="string"?n:`Invalid value for ${t}`,data:r}]}),Qe=()=>({valid:!0,errors:[]}),gh=(e,t,n)=>{let r=Array.isArray(t)?t:[t],o=n?Array.isArray(n)?n:[n]:[];return{...e,keywordPath:[...e.keywordPath??[],...r],instancePath:o?[...e.instancePath??[],...o]:e.instancePath}},Ib=(e={})=>({...e,errors:[]}),Cu=class extends Error{constructor(e){super(`Expected ${e}`)}},Ose=class extends Error{constructor(t,n){super(`${t??"Invalid raw schema"}: ${JSON.stringify(n)}`),this.schema=n}},jse=class extends Error{constructor(e,t){super(`${e}, got: 'type "${typeof t}": ${JSON.stringify(t)}'`),this.value=t}},Mr=Symbol.for("jsonv-ts:schema");function Ase(e){return e===null}function Xn(e){return!Array.isArray(e)&&typeof e=="object"&&e!==null}function Tse(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ms(e){return typeof e=="string"}function Fa(e){return typeof e=="number"}function $se(e){return typeof e=="number"&&Number.isInteger(e)}function Dj(e){return typeof e=="boolean"}function wc(e){return Array.isArray(e)}function Rse(e){return typeof e!="boolean"}function kse(e){return e!==void 0&&Rse(e)&&"type"in e}function Lo(e){return e!==void 0&&Xn(e)&&Mr in e}function YL(e){return Lo(e)&&typeof e.toJSON()=="boolean"}function Mse(e,t,n){if(!e)throw new jse(t,n)}function KL(e){return Ms(e)?e.normalize("NFC"):e}function Mm(e,t){let n=typeof e;if(n!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=e.length;if(r!==t.length)return!1;for(let o=0;o(r in e&&(n[r]=e[r]),n),{})}function XL(e){try{return structuredClone(e)}catch{return e}}var Ij=class{constructor(e){this.root=e,this.cache=new Map}cache;hasRef(e,t){return t!==void 0&&"$ref"in e&&Ms(e.$ref)}resolve(e){let t=this.cache.get(e);if(!t){if(t=Cse(this.root,e),!Lo(t))throw new Error(`ref not found: ${e}`);if("$ref"in t&&t.$ref===e)throw new Error(`ref loop: ${e}`);this.cache.set(e,t)}return t}};function Dse(e,t,n={}){let r=t;try{r=structuredClone(t)}catch{r=JSON.parse(JSON.stringify(t))}let o={resolver:n.resolver||new Ij(e),depth:n.depth||0,dropUnknown:n.dropUnknown??!1};return o.resolver.hasRef(e,r)?o.resolver.resolve(e.$ref).coerce(r,{...o,depth:o.depth+1}):r}var Ise=({type:e},t,n={})=>{if(e===void 0||t===void 0)return Qe();let r,o={string:Ms,number:Fa,integer:$se,object:Xn,array:wc,boolean:Dj,null:Ase};if(Array.isArray(e)){for(let i of e){if(!(i in o))throw new Cu(`Unknown type: ${i}`);if(o[i](t))return Qe()}r=`Expected one of: ${e.join(", ")}`}else{if(!(e in o))throw new Cu(`Unknown type: ${e}`);o[e](t)||(r=`Expected ${e}`)}return r?Zt(n,"type",r,t):Qe()},Lse=({const:e},t,n={})=>Mm(e,t)?Qe():Zt(n,"const",`Expected const: ${e}`,t),Fse=({enum:e=[]},t,n={})=>e.some(r=>Mm(r,t))?Qe():Zt(n,"enum",`Expected enum: ${JSON.stringify(e)}`,t);function iw(e,t,n={}){return e.map(r=>r.validate(t,Ib(n)).valid?r:void 0).filter(Boolean)}var zse=({anyOf:e=[]},t,n={})=>iw(e,t,n).length>0?Qe():Zt(n,"anyOf","Expected at least one to match",t),Bse=({oneOf:e=[]},t,n={})=>iw(e,t).length===1?Qe():Zt(n,"oneOf","Expected exactly one to match",t),Vse=({allOf:e=[]},t,n={})=>iw(e,t,n).length===e.length?Qe():Zt(n,"allOf","Expected all to match",t),Use=({not:e},t,n={})=>t===void 0?Qe():Lo(e)&&e.validate(t,n).valid?Zt(n,"not","Expected not to match",t):Qe(),Hse=({if:e,then:t,else:n},r,o={})=>{if(e&&(t||n)){if(e.validate(r,Ib(o)).valid)return t?t.validate(r,Ib(o)):Qe();if(n)return n.validate(r,Ib(o))}return Qe()},qse=({pattern:e=""},t,n={})=>{if(!Ms(t))return Qe();if(e instanceof RegExp){if(e.test(t))return Qe()}else if(new RegExp(e,"u").test(t))return Qe();return Zt(n,"pattern",`Expected string matching pattern ${e}`,t)},Wse=({minLength:e=0},t,n={})=>Ms(t)?[...KL(t)].length>=e?Qe():Zt(n,"minLength",`Expected string with minimum length of ${e}`,t):Qe(),Gse=({maxLength:e=0},t,n={})=>Ms(t)?[...KL(t)].length<=e?Qe():Zt(n,"maxLength",`Expected string with maximum length of ${e}`,t):Qe(),Jse=({multipleOf:e=0},t,n={})=>{if(!Fa(t))return Qe();if(!(Number.isFinite(t)&&Number.isFinite(e))||e<=0)throw new Cu("number");let r=t/e,o=Number.EPSILON*Math.max(1,Math.abs(r));return Math.abs(r-Math.round(r))<=o?Qe():Zt(n,"multipleOf",`Expected number being a multiple of ${e}`,t)},Yse=({maximum:e=0},t,n={})=>!Fa(t)||t<=e?Qe():Zt(n,"maximum",`Expected number less than or equal to ${e}`,t),Kse=({exclusiveMaximum:e=0},t,n={})=>!Fa(t)||t!Fa(t)||t>=e?Qe():Zt(n,"minimum",`Expected number greater than or equal to ${e}`,t),Qse=({exclusiveMinimum:e=0},t,n={})=>!Fa(t)||t>e?Qe():Zt(n,"exclusiveMinimum",`Expected number greater than ${e}`,t),Zse=({properties:e={}},t,n={})=>{if(!Xn(t))return Qe();for(let[r,o]of Object.entries(t)){let i=e[r];if(!Lo(i))continue;let s=i.validate(o,gh(n,["properties",r],r));if(!s.valid)return s}return Qe()},eae=({properties:e={},additionalProperties:t,patternProperties:n},r,o={})=>{if(!Xn(r))return Qe();if(!Lo(t))throw new Cu("additionalProperties must be a boolean or a managed schema");let i=Object.keys(e),s=Xn(n)?Object.keys(r).filter(c=>Object.keys(n).some(u=>new RegExp(u).test(c))):[],a=Object.keys(r).filter(c=>!i.includes(c)&&!s.includes(c));if(a.length>0){if(YL(t)){if(t.toJSON()===!0)return Qe();let c=a.reduce((u,f)=>(u[f]=r[f],u),{});return Zt(o,"additionalProperties","Additional properties are not allowed",c)}else if(Lo(t))for(let c of a){let u=t.validate(r[c],gh(o,["additionalProperties"],c));if(!u.valid)return u}}return Qe()},tae=({dependentRequired:e},t,n={})=>{if(!Xn(t))return Qe();let r=Object.keys(t).filter(o=>typeof t[o]!="function");if(Xn(e)){for(let[o,i]of Object.entries(e))if(r.includes(o)){for(let s of i)if(!r.includes(s))return Zt(n,"dependentRequired",`Expected dependent required property ${s}`,t)}}return Qe()},nae=({required:e=[]},t,n={})=>{if(!Xn(t))return Qe();let r=Object.keys(t).filter(o=>typeof t[o]!="function");return e.every(o=>r.includes(o))?Qe():Zt(n,"required",`Expected object with required properties ${e.join(", ")}`,t)},rae=({dependentSchemas:e},t,n={})=>{if(!Xn(t))return Qe();let r=Object.keys(t).filter(o=>typeof t[o]!="function");if(Xn(e)){for(let[o,i]of Object.entries(e))if(r.includes(o)){let s=i.validate(t,n);if(!s.valid)return s}}return Qe()},oae=({minProperties:e=0},t,n={})=>Xn(t)?Object.keys(t).length>=e?Qe():Zt(n,"minProperties",`Expected object with at least ${e} properties`,t):Qe(),iae=({maxProperties:e=0},t,n={})=>!Xn(t)||Object.keys(t).length<=e?Qe():Zt(n,"maxProperties",`Expected object with at most ${e} properties`,t),sae=({patternProperties:e={}},t,n={})=>{if(!Xn(t))return Qe();if(!Xn(e))throw new Cu("patternProperties must be an object");for(let[r,o]of Object.entries(t))for(let[i,s]of Object.entries(e))if(new RegExp(i,"u").test(r)){let a=s.validate(o,gh(n,["patternProperties"],r));if(!a.valid)return a}return Qe()},aae=({propertyNames:e},t,n={})=>{if(!Xn(t)||e===void 0)return Qe();if(!Lo(e))throw new Cu("propertyNames must be a managed schema");for(let r of Object.keys(t)){let o=e.validate(r,gh(n,["propertyNames"],r));if(!o.valid)return o}return Qe()},lae=({items:e,prefixItems:t=[]},n,r={})=>{if(!wc(n)||e===void 0)return Qe();if(!Lo(e))throw new Cu("items must be a managed schema");for(let[o,i]of n.slice(t.length).entries()){let s=e.validate(i,gh(r,["items"],String(o)));if(!s.valid)return s}return Qe()},cae=({minItems:e=0},t,n={})=>!wc(t)||t.length>=e?Qe():Zt(n,"minItems",`Expected array with at least ${e} items`,t),uae=({maxItems:e=0},t,n={})=>!wc(t)||t.length<=e?Qe():Zt(n,"maxItems",`Expected array with at most ${e} items`,t),dae=({uniqueItems:e=!1},t,n={})=>{if(!wc(t)||!e)return Qe();for(let r=0;r{if(!Lo(e))throw new Error("contains must be a managed schema");if(!wc(r))return Qe();let i=r.filter(s=>e.validate(s).valid).length;return i<(t??1)?Zt(o,t?"minContains":"contains",`Expected array to contain at least ${t??1}, but found ${i}`,r):n!==void 0&&i>n?Zt(o,"maxContains",`Expected array to contain at most ${n}, but found ${i}`,r):Qe()},hae=({prefixItems:e=[]},t,n={})=>{if(!wc(t))return Qe();for(let r=0;r{if(e.length>318)return!1;if(/^[a-z0-9!#$%&'*+/=?^_`{|}~-]{1,20}(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]{1,21}){0,2}@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,60}[a-z0-9])?){0,3}$/i.test(e))return!0;if(!e.includes("@")||/(^\.|^"|\.@|\.\.)/.test(e))return!1;let[t,n,...r]=e.split("@");return!t||!n||r.length!==0||t.length>64||n.length>253||!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t)?!1:n.split(".").every(o=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(o))},hostname:e=>e.length>(e.endsWith(".")?254:253)?!1:/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*\.?$/i.test(e),date:e=>{if(e.length!==10)return!1;if(e[5]==="0"&&e[6]==="2"){if(/^\d\d\d\d-02-(?:[012][1-8]|[12]0|[01]9)$/.test(e))return!0;let t=e.match(/^(\d\d\d\d)-02-29$/);if(!t)return!1;let n=Number(t[1]);return n%16===0||n%4===0&&n%25!==0}return e.endsWith("31")?/^\d\d\d\d-(?:0[13578]|1[02])-31$/.test(e):/^\d\d\d\d-(?:0[13-9]|1[012])-(?:[012][1-9]|[123]0)$/.test(e)},time:e=>{if(e.length>27||!/^(?:2[0-3]|[0-1]\d):[0-5]\d:(?:[0-5]\d|60)(?:\.\d+)?(?:z|[+-](?:2[0-3]|[0-1]\d)(?::?[0-5]\d)?)?$/i.test(e))return!1;if(!/:60/.test(e))return!0;let t=e.match(/([0-9.]+|[^0-9.])/g);if(!t)return!1;let n=Number(t[0])*60+Number(t[2]);return t[5]==="+"?n+=24*60-Number(t[6]||0)*60-Number(t[8]||0):t[5]==="-"&&(n+=Number(t[6]||0)*60+Number(t[8]||0)),n%(24*60)===23*60+59},"date-time":e=>{if(e.length>38)return!1;let t=/^\d\d\d\d-(?:0[1-9]|1[0-2])-(?:[0-2]\d|3[01])[t\s](?:2[0-3]|[0-1]\d):[0-5]\d:(?:[0-5]\d|60)(?:\.\d+)?(?:z|[+-](?:2[0-3]|[0-1]\d)(?::?[0-5]\d)?)$/i,n=e[5]==="0"&&e[6]==="2";if(n&&e[8]==="3"||!t.test(e))return!1;if(e[17]==="6"){let r=e.slice(11).match(/([0-9.]+|[^0-9.])/g);if(!r)return!1;let o=Number(r[0])*60+Number(r[2]);if(r[5]==="+"?o+=24*60-Number(r[6]||0)*60-Number(r[8]||0):r[5]==="-"&&(o+=Number(r[6]||0)*60+Number(r[8]||0)),o%(24*60)!==23*60+59)return!1}if(n){if(/^\d\d\d\d-02-(?:[012][1-8]|[12]0|[01]9)/.test(e))return!0;let r=e.match(/^(\d\d\d\d)-02-29/);if(!r)return!1;let o=Number(r[1]??0);return o%16===0||o%4===0&&o%25!==0}return e[8]==="3"&&e[9]==="1"?/^\d\d\d\d-(?:0[13578]|1[02])-31/.test(e):/^\d\d\d\d-(?:0[13-9]|1[012])-(?:[012][1-9]|[123]0)/.test(e)},ipv4:e=>e.length<=15&&/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d\d?)$/.test(e),ipv6:e=>{if(e.length>45||e.length<2)return!1;let t=0,n=0,r=0,o=!1,i=!1,s=0,a=!0;for(let u=0;u=48&&f<=57){if(++r>4)return!1}else if(f===46){if(t>6||n>=3||r===0||i)return!1;n++,r=0}else if(f===58){if(n>0||t>=7)return!1;if(s===58){if(o)return!1;o=!0}else u===0&&(a=!1);t++,r=0,i=!1}else if(f>=97&&f<=102||f>=65&&f<=70){if(n>0||++r>4)return!1;i=!0}else return!1;s=f}if(t<2||n>0&&(n!==3||r===0))return!1;if(o&&e.length===2)return!0;if(n>0&&!/(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}$/.test(e))return!1;let c=n>0?6:7;return o?(a||r>0)&&t0},uri:e=>/^[a-z][a-z0-9+\-.]*:(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|v[0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/?(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(e),"uri-reference":e=>/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|v[0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/?(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?)?(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i.test(e),"uri-template":e=>/^(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2}|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i.test(e),"json-pointer":e=>/^(?:|\/(?:[^~]|~0|~1)*)$/.test(e),"relative-json-pointer":e=>/^(?:0|[1-9][0-9]*)(?:|#|\/(?:[^~]|~0|~1)*)$/.test(e),uuid:e=>/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e),duration:e=>e.length>1&&e.length<80&&(/^P\d+([.,]\d+)?W$/.test(e)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e)),regex:e=>{if(/[^\\]\\Z/.test(e))return!1;try{return new RegExp(e,"u"),!0}catch{return!1}},binary:()=>!0,password:()=>!0},pae=({format:e},t,n={})=>!Ms(t)||!e?Qe():jk[e]?jk[e](t)?Qe():Zt(n,"format",`Expected format: ${e}`,t):Qe(),m2={type:Ise,const:Lse,enum:Fse,allOf:Vse,anyOf:zse,oneOf:Bse,not:Use,minLength:Wse,maxLength:Gse,pattern:qse,format:pae,minimum:Xse,exclusiveMinimum:Qse,maximum:Yse,exclusiveMaximum:Kse,multipleOf:Jse,required:nae,dependentRequired:tae,dependentSchemas:rae,minProperties:oae,maxProperties:iae,propertyNames:aae,properties:Zse,patternProperties:sae,additionalProperties:eae,minItems:cae,maxItems:uae,uniqueItems:dae,contains:fae,prefixItems:hae,items:lae,if:Hse};function mae(e,t,n={}){let r={keywordPath:n.keywordPath||[],instancePath:n.instancePath||[],coerce:n.coerce||!1,errors:n.errors||[],shortCircuit:n.shortCircuit||!1,ignoreUnsupported:n.ignoreUnsupported||!1,resolver:n.resolver||e.getResolver?.()||new Ij(e),depth:n.depth?n.depth+1:0,skipClone:n.skipClone||!1},o;if(n?.coerce&&e.coerce){let i=e.coerce(t,{resolver:r.resolver,depth:r.depth});o=r.skipClone?i:structuredClone(i)}else o=r.skipClone?t:structuredClone(t);if(n.ignoreUnsupported!==!0){let i=["$defs"];for(let s of i)if(e[s])throw new Error(`${s} not implemented`)}if(r.resolver.hasRef(e,o)){let i=r.resolver.resolve(e.$ref).validate(o,{...r,errors:[]});i.valid||r.errors.push(...i.errors)}else{let i={keywordPath:r.keywordPath,instancePath:r.instancePath,coerce:r.coerce,errors:[],shortCircuit:r.shortCircuit,ignoreUnsupported:r.ignoreUnsupported,resolver:r.resolver,depth:r.depth};for(let s in e)if(s==="type"&&e.type!==void 0){if(o!==void 0){let a=m2[s];if(a){i.errors=[];let c=a(e,o,i);if(!c.valid){if(n.shortCircuit)return c;r.errors.push(...c.errors)}}}}else if(s in m2&&e[s]!==void 0){if(o===void 0)continue;let a=m2[s];if(a){i.errors=[];let c=a(e,o,i);if(!c.valid){if(n.shortCircuit)return c;r.errors.push(...c.errors)}}}}return{valid:r.errors.length===0,errors:r.errors}}var Sc=class{"~standard";[Mr];_resolver;type;$id;$ref;$schema;title;description;readOnly;writeOnly;$comment;examples;constructor(t,n){let{type:r,validate:o,coerce:i,template:s,...a}=t||{};Object.assign(this,{type:r},a),this[Mr]={raw:t,optional:!1,overrides:n},this["~standard"]={version:1,vendor:"jsonv-ts",validate:c=>{let u=this.validate(c);return u.valid?{value:c}:{issues:u.errors.map(f=>({message:f.error,path:JL(f.instanceLocation)}))}}}}template(t,n){let r=this,o=t;if(r.const!==void 0?o=r.const:o===void 0&&(r.default!==void 0&&(o=r.default),n?.withExtendedOptional&&r.enum!==void 0&&(o=r.enum[0])),n?.withOptional!==!0&&o===void 0&&this.isOptional())return o;if(this[Mr].raw?.template){let s=this[Mr].raw.template(o,n);s!==void 0&&(o=s)}let i=this[Mr].overrides?.template?.(o,n);return i!==void 0&&(o=i),o}validate(t,n){let r={keywordPath:n?.keywordPath||[],instancePath:n?.instancePath||[],coerce:n?.coerce||!1,errors:n?.errors||[],shortCircuit:n?.shortCircuit||!1,ignoreUnsupported:n?.ignoreUnsupported||!1,resolver:n?.resolver||this.getResolver(),depth:n?.depth?n.depth+1:0,skipClone:n?.skipClone??!0},o=this[Mr].raw?.validate;if(o!==void 0){let i=o(t,r);if(!i.valid)return i}return mae(this,t,r)}coerce(t,n){let r={...n,resolver:n?.resolver||this.getResolver(),depth:n?.depth?n.depth+1:0,dropUnknown:n?.dropUnknown??!1},o=this[Mr].raw?.coerce;if(o!==void 0)return o(t,r);let i=this[Mr].overrides?.coerce?.(t,r)??t;return Dse(this,i,r)}optional(){return this[Mr].optional=!0,this}isOptional(){return this[Mr].optional}getResolver(){return this._resolver||(this._resolver=new Ij(this)),this._resolver}children(t){return[]}*walk({instancePath:t=[],keywordPath:n=[],data:r,maxDepth:o=Number.POSITIVE_INFINITY,...i}={}){let s=t.length===0&&r?XL(r):r;if(i.includeSelf!==!1&&(yield new Ig(this,{instancePath:t,keywordPath:n,data:s,...i})),!(t.length>=o))for(let a of this.children(i)){let c=[...t,...a.instancePath];yield*a.schema.walk({...i,data:s,maxDepth:o,instancePath:c,keywordPath:[...n,...a.keywordPath]})}}*[Symbol.iterator](t){for(let n of this.walk(t))yield n}toJSON(){let{toJSON:t,"~standard":n,_resolver:r,...o}=this;return JSON.parse(JSON.stringify(o))}},Ig=class{constructor(t,n={}){this.schema=t,this.instancePath=n.instancePath||[],this.keywordPath=n.keywordPath||[],this.depth=this.instancePath.length;try{if(n.data!==void 0){let r=ow(n.data,this.instancePath);t.validate(r).valid&&(this.data=r)}}catch{}}instancePath;keywordPath;data;depth;appendInstancePath(t){return this.instancePath=[...this.instancePath,...t],this}appendKeywordPath(t){return this.keywordPath=[...this.keywordPath,...t],this}setData(t){return this.data=t,this}};function sw(e,t,n){return new class extends Sc{type=e}(t,n)}var gae=class extends Sc{constructor(e){super(),this.bool=e}toJSON(){return this.bool}validate(e,t){return this.bool?Qe():Zt(t,"","Always fails",e)}};function S_(e){return new gae(e)}var Xi=e=>sw(e?.type,e),ui=(e,t)=>sw(void 0,{...t,const:e}),Lj=class extends Sc{type="object";properties;required;constructor(e,t){let n=[];for(let[o,i]of Object.entries(e||{}))Mse(Lo(i),"properties must be managed schemas",i),i[Mr].optional||n.push(o);let r=t?.additionalProperties===!1?S_(!1):t?.additionalProperties;n=n.length>0?n:void 0,super({...t,additionalProperties:r,properties:e,required:n},{template:(o,i)=>{let s=structuredClone(Xn(o)?o:{}),a={...s};if(this.properties)for(let[c,u]of Object.entries(this.properties)){let f=ow(s,c);if(u.isOptional()&&i?.withOptional!==!0&&f===void 0&&o===void 0)continue;let p=u.template(f,i);p!==void 0&&(a[c]=p)}if(!(Object.keys(a).length===0&&!i?.withExtendedOptional))return a},coerce:(o,i)=>{let s=Object.keys(this.properties),a=XL(o),c=s.length>0&&Object.values(this.properties).every(f=>!f[Mr].optional);if(Tse(a)&&(i?.dropUnknown===!0||c)&&(a=Pse(a,s)),typeof a=="string"&&a.match(/^\{/)&&(a=JSON.parse(a)),typeof a!="object"||a===null)return;if(this.properties)for(let[f,p]of Object.entries(this.properties)){let g=a[f];g!==void 0&&(a[f]=p.coerce(g,i))}let u=this.additionalProperties;if(i?.dropUnknown!==!0&&(!u||u.validate(null).valid)){let f=Xn(o)?o:{},p=Object.keys(f).filter(g=>!s.includes(g));for(let g of p)a[g]=u?u.coerce(f[g],i):f[g]}return a}}),this.properties=e,this.required=n}strict(){return this.additionalProperties=S_(!1),this[Mr].raw.additionalProperties=!1,this}partial(){for(let[,e]of Object.entries(this.properties))e[Mr].optional=!0;return this.required=void 0,this}children(e){let t=[];for(let[n,r]of Object.entries(this.properties)){let o=new Ig(r,e);o.appendInstancePath([n]),o.appendKeywordPath(["properties",n]),t.push(o)}return t}},ke=(e,t)=>new Lj(e,t),Ve=(e,t)=>ke(e,t).strict(),QL=(e,t)=>ke(e,t).partial(),Fj=class extends Sc{type="object";additionalProperties;constructor(t,n){super({...n,additionalProperties:t},{template:(r,o)=>o?.withExtendedOptional&&(r===void 0||!Xn(r))?{}:r}),this.additionalProperties=t}children(t){let n=[],r=new Ig(this.additionalProperties,t);return r.appendKeywordPath(["additionalProperties"]),n.push(r),n}},Ou=(e,t)=>new Fj(e,t),ZL=class extends Sc{type="string";constructor(e){super(e,{template:(t,n)=>n?.withExtendedOptional&&(t===void 0||!Ms(t))?"":t,coerce:t=>Fa(t)?String(t):t})}toJSON(){let{pattern:e,"~standard":t,_resolver:n,...r}=this;return JSON.parse(JSON.stringify({...r,pattern:e instanceof RegExp?e.source:e}))}},le=e=>new ZL(e),e7=(e,t,n)=>sw(e,n,{template:(r,o)=>o?.withExtendedOptional&&(r===void 0||!Fa(r))?n?.minimum??0:r,coerce:r=>{if(Ms(r)){let o=t.parseFn(r);if(!Number.isNaN(o))return o}return r}}),bt=e=>e7("number",{parseFn:Number},e),yae=e=>e7("integer",{parseFn:Number.parseInt},e),t7=class extends Sc{constructor(e,t={}){super({...t,items:e},{template:n=>n===void 0||!Array.isArray(n)?[]:n,coerce:(n,r)=>{try{let o=typeof n=="string"?JSON.parse(n):n;if(!Array.isArray(o))return;if(Lo(this.items))for(let[i,s]of o.entries())o[i]=this.items.coerce(s,r);return o}catch{}return n}}),this.items=e,this.items=e}type="array";children(e){let t=[];if(this.items){let n=new Ig(this.items,e);n.appendKeywordPath(["items"]),t.push(n)}return t}},un=(e,t)=>new t7(e,t),at=e=>sw("boolean",e,{template:(t,n)=>n?.withExtendedOptional&&(t===void 0||!Dj(t))?!1:t,coerce:t=>{if(Ms(t)&&["true","false","1","0"].includes(t))return t==="true"||t==="1";if(Fa(t)){if(t===1)return!0;if(t===0)return!1}return t}}),G0=Symbol.for("unionType"),n7=class extends Sc{[G0];constructor(e,t,n){super({...n,[t]:e},{coerce:(r,o)=>{let i=n?.coerce;if(i!==void 0)return i.bind(this)(r,o);let s=iw(e,r,{ignoreUnsupported:!0,resolver:o?.resolver,coerce:!0});return s.length>0?s[0].coerce(r,o):r}}),this[G0]=t}get schemas(){return this[this[G0]]}children(e){let t=[];for(let[n,r]of this.schemas.entries()){let o=new Ig(r,e);o.appendKeywordPath([this[G0],n]),t.push(o)}return t}},Rt=(e,t)=>new n7(e,"anyOf",t),bae=(e,t)=>new n7(e,"oneOf",t);function Ak(e,t){return Array.isArray(e)?e.map(t):e!==void 0?[t(e)]:[]}function Tk(e,t,n=r=>r){return Object.fromEntries(Object.entries(e).map(([r,o])=>[r,n(t(o,r),r)]))}function Pi(e){if(Dj(e))return S_(e);let t=structuredClone(e);if(!Xn(t))throw new Ose("non-object schemas cannot be converted to a schema",t);"properties"in t&&t.properties&&(t.properties=Tk(t.properties,(i,s)=>{try{return Pi(i)}catch(a){throw new Error(`Couldn't schemaize property "${s}": ${String(a)}`)}},(i,s)=>"required"in t&&Array.isArray(t.required)&&t.required.includes(s)?i:i.optional()));let n=["patternProperties","dependentSchemas","$defs"];for(let i of n)i in t&&t[i]&&(t[i]=Tk(t[i],Pi));let r=["additionalProperties","items","prefixItems","propertyNames","contains","not","if","then","else"];for(let i of r)i in t&&typeof t[i]<"u"&&(wc(t[i])?t[i]=Ak(t[i],Pi):t[i]=Pi(t[i]));let o=["anyOf","oneOf","allOf"];for(let i of o)if(i in t){let{[i]:s}=t;t[i]=Ak(s,Pi)}if(kse(t))switch(t.type){case"string":return le(t);case"number":return bt(t);case"integer":return yae(t);case"boolean":return at(t);case"object":{let{properties:i,...s}=t;return ke(i,s)}case"array":{let{items:i,...s}=t;return un(i,s)}}return Xi(t)}var E_=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),g2=e=>typeof globalThis.structuredClone=="function"?globalThis.structuredClone(e):JSON.parse(JSON.stringify(e)),vae=["maximum","exclusiveMaximum","maxLength","maxItems","maxProperties"],xae=["minimum","exclusiveMinimum","minLength","minItems","minProperties"];function wae(){return{type(e){let t=e.map(n=>Array.isArray(n)?new Set(n):new Set([n])).reduce((n,r)=>n?new Set([...n].filter(o=>r.has(o))):new Set(r));if(!t.size)throw new Error('Incompatible "type" in allOf');return t.size===1?[...t][0]:[...t]},enum(e){let t=e.map(n=>new Set(n)).reduce((n,r)=>new Set([...n].filter(o=>r.has(o))));if(!t.size)throw new Error('Incompatible "enum" in allOf');return[...t]},required(e){return[...new Set(e.flat())]},properties(e,t,n){return e.reduce((r,o)=>n(r,o),{})},patternProperties(e,t,n){return e.reduce((r,o)=>n(r,o),{})},$defs(e,t,n){return e.reduce((r,o)=>n(r,o),{})},definitions(e,t,n){return e.reduce((r,o)=>n(r,o),{})},...Object.fromEntries(vae.map(e=>[e,t=>Math.min(...t)])),...Object.fromEntries(xae.map(e=>[e,t=>Math.max(...t)]))}}function Sae(e){let t={...wae(),...e.resolvers};function n(r,o){if(Array.isArray(r)&&Array.isArray(o))return[...new Set([...r,...o])];if(E_(r)&&E_(o)){let i={...r};for(let[s,a]of Object.entries(o))if(s in i){let c=t[s];i[s]=c?c([i[s],a],s,n):g2(a)}else i[s]=g2(a);return i}return g2(o)}return n}var Eae=e=>e===!0||e===!1?e:null;function Nae(e,t={}){let n=t.deep!==!1,r=Sae(t);function o(i){if(Array.isArray(i))return i.map(o);if(!E_(i))return i;if(Array.isArray(i.allOf)){let a=i.allOf.map(o);if(a.some(y=>y===!1))return!1;let c=a.filter(y=>y!==!0);if(!c.length)return!0;let u=c.reduce((y,v)=>r(y,v),{}),f=Eae(u);if(f!==null)return f;let p={...i};delete p.allOf;let g=r(u,n?o(p):p);return n?o(g):g}let s={};for(let[a,c]of Object.entries(i))s[a]=o(c);return s}return o(e)}var _ae=(e,t)=>{let n=JSON.parse(JSON.stringify({...t,allOf:e}));return Pi(Nae(n))},Cae=e=>e(new Sc({$ref:"#",coerce:(t,n)=>{let r=n?.resolver?.resolve("#");if(!Lo(r))throw new Error("Ref not found: #");return r.coerce(t,n)}}));function $k(e){return typeof e=="string"?`"${e}"`:e===null?"null":String(e)}var r7=e=>e.description?`/** + * ${e.description} + */ +`:"";function Rk(e,t,n={}){let{type:r,export:o,...i}=n,s=t??e.title??"Schema",a=r==="interface"?`interface ${s} `:`type ${s} = `;return`${r7(e)}${o?"export ":""}${a}${o7(e,i)}`}function o7(e,t={}){let n={indent:t.indent??" ",currentIndent:t.currentIndent??0,fallback:t.fallback??"unknown",generateChild:t.generateChild??o7};if(!Lo(e))return n.fallback;let r=(i,s=0)=>i.split(` +`).map(a=>n.indent.repeat(s)+a).join(` +`),o=n.currentIndent;if(e instanceof Lj){let i=e.properties;return Object.keys(i).length===0?"{}":r(`{ +`)+Object.entries(i).map(([s,a])=>{let c=a.isOptional()?"?":"";return r(`${r7(a)}${s}${c}: ${n.generateChild(a,n)}`,o+1)}).join(`, +`)+` +`+r("}",o)}else{if(e instanceof Fj)return`Record`;if(e instanceof t7)return n.generateChild(e.items)+"[]";if("anyOf"in e&&Array.isArray(e.anyOf))return e.anyOf.map(i=>n.generateChild(i)).join(" | ");if("oneOf"in e&&Array.isArray(e.oneOf))return e.oneOf.map(i=>n.generateChild(i)).join(" | ");if(YL(e))return e.toJSON()?"any":"never"}return"const"in e&&typeof e.const<"u"?$k(e.const):"enum"in e&&typeof e.enum<"u"?e.enum.map(i=>$k(i)).join(" | ")??n.fallback:e.type??n.fallback}var i7=e=>{const t=e.split("/");return t[0]===""&&t.shift(),t},Oae=e=>{const{groups:t,path:n}=jae(e),r=i7(n);return Aae(r,t)},jae=e=>{const t=[];return e=e.replace(/\{[^}]+\}/g,(n,r)=>{const o=`@${r}`;return t.push([o,n]),o}),{groups:t,path:e}},Aae=(e,t)=>{for(let n=t.length-1;n>=0;n--){const[r]=t[n];for(let o=e.length-1;o>=0;o--)if(e[o].includes(r)){e[o]=e[o].replace(r,t[n][1]);break}}return e},J0={},Tae=(e,t)=>{if(e==="*")return"*";const n=e.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/);if(n){const r=`${e}#${t}`;return J0[r]||(n[2]?J0[r]=t&&t[0]!==":"&&t[0]!=="*"?[r,n[1],new RegExp(`^${n[2]}(?=/${t})`)]:[e,n[1],new RegExp(`^${n[2]}$`)]:J0[r]=[e,n[1],!0]),J0[r]}return null},aw=(e,t)=>{try{return t(e)}catch{return e.replace(/(?:%[0-9A-Fa-f]{2})+/g,n=>{try{return t(n)}catch{return n}})}},$ae=e=>aw(e,decodeURI),s7=e=>{const t=e.url,n=t.indexOf("/",t.indexOf(":")+4);let r=n;for(;r{const t=s7(e);return t.length>1&&t.at(-1)==="/"?t.slice(0,-1):t},Zd=(e,t,...n)=>(n.length&&(t=Zd(t,...n)),`${e?.[0]==="/"?"":"/"}${e}${t==="/"?"":`${e?.at(-1)==="/"?"":"/"}${t?.[0]==="/"?t.slice(1):t}`}`),a7=e=>{if(e.charCodeAt(e.length-1)!==63||!e.includes(":"))return null;const t=e.split("/"),n=[];let r="";return t.forEach(o=>{if(o!==""&&!/\:/.test(o))r+="/"+o;else if(/\:/.test(o))if(/\?/.test(o)){n.length===0&&r===""?n.push("/"):n.push(r);const i=o.replace("?","");r+="/"+i,n.push(r)}else r+="/"+o}),n.filter((o,i,s)=>s.indexOf(o)===i)},y2=e=>/[%+]/.test(e)?(e.indexOf("+")!==-1&&(e=e.replace(/\+/g," ")),e.indexOf("%")!==-1?aw(e,zj):e):e,l7=(e,t,n)=>{let r;if(!n&&t&&!/[%+]/.test(t)){let s=e.indexOf(`?${t}`,8);for(s===-1&&(s=e.indexOf(`&${t}`,8));s!==-1;){const a=e.charCodeAt(s+t.length+1);if(a===61){const c=s+t.length+2,u=e.indexOf("&",c);return y2(e.slice(c,u===-1?void 0:u))}else if(a==38||isNaN(a))return"";s=e.indexOf(`&${t}`,s+1)}if(r=/[%+]/.test(e),!r)return}const o={};r??=/[%+]/.test(e);let i=e.indexOf("?",8);for(;i!==-1;){const s=e.indexOf("&",i+1);let a=e.indexOf("=",i);a>s&&s!==-1&&(a=-1);let c=e.slice(i+1,a===-1?s===-1?void 0:s:a);if(r&&(c=y2(c)),i=s,c==="")continue;let u;a===-1?u="":(u=e.slice(a+1,s===-1?void 0:s),r&&(u=y2(u))),n?(o[c]&&Array.isArray(o[c])||(o[c]=[]),o[c].push(u)):o[c]??=u}return t?o[t]:o},kae=l7,Mae=(e,t)=>l7(e,t,!0),zj=decodeURIComponent,Bj={name:"HMAC",hash:"SHA-256"},c7=async e=>{const t=typeof e=="string"?new TextEncoder().encode(e):e;return await crypto.subtle.importKey("raw",t,Bj,!1,["sign","verify"])},Pae=async(e,t)=>{const n=await c7(t),r=await crypto.subtle.sign(Bj.name,n,new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(r)))},Dae=async(e,t,n)=>{try{const r=atob(e),o=new Uint8Array(r.length);for(let i=0,s=r.length;i{if(t&&e.indexOf(t)===-1)return{};const n=e.trim().split(";"),r={};for(let o of n){o=o.trim();const i=o.indexOf("=");if(i===-1)continue;const s=o.substring(0,i).trim();if(t&&t!==s||!Iae.test(s))continue;let a=o.substring(i+1).trim();if(a.startsWith('"')&&a.endsWith('"')&&(a=a.slice(1,-1)),Lae.test(a)&&(r[s]=a.indexOf("%")!==-1?aw(a,zj):a,t))break}return r},kk=async(e,t,n)=>{const r={},o=await c7(t);for(const[i,s]of Object.entries(N_(e,n))){const a=s.lastIndexOf(".");if(a<1)continue;const c=s.substring(0,a),u=s.substring(a+1);if(u.length!==44||!u.endsWith("="))continue;const f=await Dae(u,c,o);r[i]=f?c:!1}return r},u7=(e,t,n={})=>{let r=`${e}=${t}`;if(e.startsWith("__Secure-")&&!n.secure)throw new Error("__Secure- Cookie must have Secure attributes");if(e.startsWith("__Host-")){if(!n.secure)throw new Error("__Host- Cookie must have Secure attributes");if(n.path!=="/")throw new Error('__Host- Cookie must have Path attributes with "/"');if(n.domain)throw new Error("__Host- Cookie must not have Domain attributes")}if(n&&typeof n.maxAge=="number"&&n.maxAge>=0){if(n.maxAge>3456e4)throw new Error("Cookies Max-Age SHOULD NOT be greater than 400 days (34560000 seconds) in duration.");r+=`; Max-Age=${n.maxAge|0}`}if(n.domain&&n.prefix!=="host"&&(r+=`; Domain=${n.domain}`),n.path&&(r+=`; Path=${n.path}`),n.expires){if(n.expires.getTime()-Date.now()>3456e7)throw new Error("Cookies Expires SHOULD NOT be greater than 400 days (34560000 seconds) in the future.");r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+="; HttpOnly"),n.secure&&(r+="; Secure"),n.sameSite&&(r+=`; SameSite=${n.sameSite.charAt(0).toUpperCase()+n.sameSite.slice(1)}`),n.priority&&(r+=`; Priority=${n.priority.charAt(0).toUpperCase()+n.priority.slice(1)}`),n.partitioned){if(!n.secure)throw new Error("Partitioned Cookie must have Secure attributes");r+="; Partitioned"}return r},b2=(e,t,n)=>(t=encodeURIComponent(t),u7(e,t,n)),Lb=async(e,t,n,r={})=>{const o=await Pae(t,n);return t=`${t}.${o}`,t=encodeURIComponent(t),u7(e,t,r)},d7=(e,t,n)=>{const r=e.req.raw.headers.get("Cookie");if(typeof t=="string"){if(!r)return;let i=t;return n==="secure"?i="__Secure-"+t:n==="host"&&(i="__Host-"+t),N_(r,i)[i]}return r?N_(r):{}},f7=async(e,t,n,r)=>{const o=e.req.raw.headers.get("Cookie");if(typeof n=="string"){if(!o)return;let s=n;return(await kk(o,t,s))[s]}return o?await kk(o,t):{}},Fae=(e,t,n)=>{let r;return n?.prefix==="secure"?r=b2("__Secure-"+e,t,{path:"/",...n,secure:!0}):n?.prefix==="host"?r=b2("__Host-"+e,t,{...n,path:"/",secure:!0,domain:void 0}):r=b2(e,t,{path:"/",...n}),r},h7=(e,t,n,r)=>{const o=Fae(t,n,r);e.header("Set-Cookie",o,{append:!0})},zae=async(e,t,n,r)=>{let o;return r?.prefix==="secure"?o=await Lb("__Secure-"+e,t,n,{path:"/",...r,secure:!0}):r?.prefix==="host"?o=await Lb("__Host-"+e,t,n,{...r,path:"/",secure:!0,domain:void 0}):o=await Lb(e,t,n,{path:"/",...r}),o},p7=async(e,t,n,r,o)=>{const i=await zae(t,n,r,o);e.header("set-cookie",i,{append:!0})},Bae=(e,t,n)=>{const r=d7(e,t,n?.prefix);return h7(e,t,"",{...n,maxAge:0}),r},Mk=class extends Error{res;status;constructor(e=500,t){super(t?.message,{cause:t?.cause}),this.res=t?.res,this.status=e}getResponse(){return this.res?new Response(this.res.body,{status:this.status,headers:this.res.headers}):new Response(this.message,{status:this.status})}},Vae=(e,t)=>new Response(e,{headers:{"Content-Type":t}}).formData(),Uae=/^application\/([a-z-\.]+\+)?json(;\s*[a-zA-Z0-9\-]+\=([^;]+))*$/,Hae=/^multipart\/form-data(;\s?boundary=[a-zA-Z0-9'"()+_,\-./:=?]+)?$/,qae=/^application\/x-www-form-urlencoded(;\s*[a-zA-Z0-9\-]+\=([^;]+))*$/,Wae=(e,t)=>async(n,r)=>{let o={};const i=n.req.header("Content-Type");switch(e){case"json":if(!i||!Uae.test(i))break;try{o=await n.req.json()}catch{const a="Malformed JSON in request body";throw new Mk(400,{message:a})}break;case"form":{if(!i||!(Hae.test(i)||qae.test(i)))break;let a;if(n.req.bodyCache.formData)a=await n.req.bodyCache.formData;else try{const u=await n.req.arrayBuffer();a=await Vae(u,i),n.req.bodyCache.formData=a}catch(u){let f="Malformed FormData request.";throw f+=u instanceof Error?` ${u.message}`:` ${String(u)}`,new Mk(400,{message:f})}const c={};a.forEach((u,f)=>{f.endsWith("[]")?(c[f]??=[]).push(u):Array.isArray(c[f])?c[f].push(u):f in c?c[f]=[c[f],u]:c[f]=u}),o=c;break}case"query":o=Object.fromEntries(Object.entries(n.req.queries()).map(([a,c])=>c.length===1?[a,c[0]]:[a,c]));break;case"param":o=n.req.param();break;case"header":o=n.req.header();break;case"cookie":o=d7(n);break}const s=await t(o,n);return s instanceof Response?s:(n.req.addValidatedData(e,s),await r())},Gae=Symbol.for("jsonv"),m7=(e,t)=>Object.assign(e,{[Gae]:t}),Ft=(e,t,n,r)=>{let o=Wae(e,async(i,s)=>{let a=n?.coerce!==!1?t.coerce(i,{dropUnknown:n?.dropUnknown}):i,c=t.validate(a);return c.valid?a:s.json({...c,schema:t},400)});return m7(o,{type:"parameters",skip:n?.skipOpenAPI,value:{target:e,schema:t}})},Jae={query:"query",param:"path",header:"header",cookie:"cookie"};function Yae(e,t){let n=Jae[t];return{parameters:Object.entries(e.properties).map(([r,o])=>({name:r,in:n,required:e.required?.includes(r)||void 0,description:o?.description||void 0,schema:structuredClone(o.toJSON())}))}}var zt=e=>m7(async(t,n)=>{await n()},{type:"route-doc",value:e??{}}),Pp={ConnectionClosed:{code:-32e3,message:"Connection closed"},RequestTimeout:{code:-32001,message:"Request timeout"},ParseError:{code:-32700,message:"Parse error"},InvalidRequest:{code:-32600,message:"Invalid request"},MethodNotFound:{code:-32601,message:"Method not found"},InvalidParams:{code:-32602,message:"Invalid params"},InternalError:{code:-32603,message:"Internal error",statusCode:500}},Kae=class extends Error{constructor(e,t,n){super(n??Pp[e].message),this.code=e,this.data=t}jsonrpc="2.0";id;static get codes(){return Object.fromEntries(Object.entries(Pp).map(([e,t])=>[e,e]))}setId(e){return this.id=e,this}get statusCode(){return Pp[this.code]?.statusCode??400}toJSON(){return{jsonrpc:this.jsonrpc,id:this.id,error:{code:Pp[this.code].code,message:this.message,data:this.data}}}toString(){return`MCP Error (${Pp[this.code].code} ${this.code}): ${this.message}`}},Xae=ke({}),g7=ke({jsonrpc:le({const:"2.0"}),id:bae([le(),bt()]).optional()});ke({...g7.properties,method:le(),params:Xi().optional()});ke({...g7.properties,result:Xae.optional(),error:ke({}).optional()});ke({title:le(),readOnlyHint:at(),destructiveHint:at({default:!0}),idempotentHint:at(),openWorldHint:at({default:!0})}).partial().strict();var ql=class{constructor(e,t,n){this.name=e,this.config=t,this.handler=n}async call(e,t,n){if(this.config?.inputSchema){let r=this.config.inputSchema.validate(e);if(!r.valid)throw new Kae("InvalidParams",{method:this.name,errors:r.errors,given:e,schema:this.config.inputSchema.toJSON()},"Invalid tool parameters")}return await this.handler(e,{context:t,raw:n,text:r=>({type:"text",text:r}),json:r=>({type:"text",text:JSON.stringify(r)})})}toJSON(){return{name:this.name,title:this.config?.title,description:this.config?.description,inputSchema:this.config?.inputSchema?.toJSON()??{type:"object"},outputSchema:this.config?.outputSchema?.toJSON(),annotations:Object.keys(this.config?.annotations??{}).length>0?this.config?.annotations:void 0,_meta:this.config?._meta}}};Ve({name:le(),version:le()});var Qae={emergency:"error",alert:"error",critical:"error",error:"error",warning:"warn",notice:"log",info:"info",debug:"debug"},Zae=Object.keys(Qae),ele="2025-06-18",tle=class{constructor(e){this.config=e}id=1;sessionId;async request(e,t){let n={jsonrpc:"2.0",id:this.id++,method:e,params:t},r=new Headers({"Content-Type":"application/json",Accept:"application/json"});this.config.headers&&Object.entries(this.config.headers).forEach(([i,s])=>{r.set(i,s)}),this.sessionId&&r.set("Mcp-Session-Id",this.sessionId);let o=await(this.config.fetch??fetch)(this.config.url,{method:"POST",headers:r,body:JSON.stringify(n)});if(!o.ok)throw new Error(`HTTP ${o.status} ${o.statusText}`);this.sessionId||(this.sessionId=o.headers.get("Mcp-Session-Id")??void 0);try{let i=await o.json();if(i.jsonrpc!=="2.0")throw new Error("Invalid JSON-RPC version");return i.result}catch(i){throw console.error(i),i}}async connect(){return this.request("initialize",{protocolVersion:ele,capabilities:{},clientInfo:{name:this.config.name,version:this.config.version}})}async ping(){return this.request("ping",{})}async setLoggingLevel(e){return this.request("logging/setLevel",{level:e})}async listResources(){return this.request("resources/list",{})}async listResourceTemplates(){return this.request("resources/templates/list",{})}async readResource(e){return this.request("resources/read",e)}async callTool(e){return this.request("tools/call",e)}async listTools(){return this.request("tools/list",{})}},nle=Symbol("mcp-feature"),eo=(e,t={})=>Object.assign(async(n,r)=>{await r()},{[nle]:{type:"tool",tool:{name:e,config:t}}});class rle extends ZL{}const Pm=e=>new rle(e),__=Symbol("bknd-validation-mark");function ole(e){const t=structuredClone(e);return y7(t,!1),t}function y7(e,t=!0){try{if(typeof e=="object"&&e!==null&&!Array.isArray(e)){t?e[__]=!0:delete e[__];for(const n in e)typeof e[n]=="object"&&e[n]!==null&&y7(e[n],t)}}catch{}}function ile(e){return typeof e!="object"||e===null?!1:e[__]===!0}const ju=le({pattern:"^[a-zA-Z_][a-zA-Z0-9_]*$",minLength:2,maxLength:150});class yh extends Br{constructor(t,n,r=[]){super(`Invalid schema given for ${JSON.stringify(n,null,2)} + +Error: ${JSON.stringify(r[0],null,2)} + +Schema: ${JSON.stringify(t.toJSON(),null,2)}`),this.schema=t,this.value=n,this.errors=r}name="InvalidSchemaError";code=Qt.UNPROCESSABLE_ENTITY;first(){return this.errors[0]}firstToString(){const t=this.first();return`${t.error} at ${t.instanceLocation}`}}const b7=e=>{const t=e.toJSON();return Pi(t)};function Cn(e,t,n){if(!n?.forceParse&&!n?.coerce&&ile(t))return t;const r=n?.clone?b7(e):e;let o=n?.coerce!==!1?r.coerce(t,{dropUnknown:n?.coerceDropUnknown??!1}):t;n?.withDefaults!==!1&&(o=r.template(o,{withOptional:!0,withExtendedOptional:n?.withExtendedDefaults??!1}));const i=e.validate(o,{shortCircuit:!0,ignoreUnsupported:!0});if(!i.valid)if(n?.onError)n.onError(i.errors);else throw new yh(r,t,i.errors);return o}function $i(e){return["string","number","boolean"].includes(typeof e)}function sle(e){return[!0,!1,0,1].includes(e)}class ale{constructor(t,n,r){this.key=t,this.valid=n,this.validate=r}expect}function hn(e,t,n){return Hl(typeof e=="string","key must be a string"),Hl(e[0]==="$","key must start with '$'"),Hl(typeof t=="function","valid must be a function"),Hl(typeof n=="function","validate must be a function"),new ale(e,t,n)}function v7(e,t){const n=e.find(r=>r.key===t);if(!n)throw new Error(`Expression does not exist: "${t}"`);return n}const Pk="$or";function Vj(e,t,n=[]){Hl(typeof e=="object","$query must be an object");const r=t.map(c=>c.key),o=Object.keys(e??{}),i=[Pk],s={};if(o.some(c=>c.startsWith("$")&&!i.includes(c)))throw new Error(`Invalid key '${o}'. Keys must not start with '$'.`);if(n.length>0&&o.some(c=>i.includes(c)))throw new Error(`Operand ${Pk} can only appear at the top level.`);function a(c,u,f=[]){if(v7(t,c).valid(u)===!1)throw new Error(`Given value at "${[...f,c].join(".")}" is invalid, got "${JSON.stringify(u)}"`)}for(const[c,u]of Object.entries(e))if(u!==void 0)if(c==="$or")Hl($a(u),"$or must be an object"),s.$or=Vj(u,t,[...n,c]);else if($i(u))a("$eq",u,n),s[c]={$eq:u};else if($a(u)){const f=Object.keys(u).filter(p=>!r.includes(p));if(f.length===0){s[c]={};for(const[p,g]of Object.entries(u))a(p,g,[...n,c]),s[c][p]=g}else throw new Error(`Invalid key(s) at "${c}": ${f.join(", ")}. Expected expression key: ${r.join(", ")}.`)}else throw new Error(`Invalid value at "${[...n,c].join(".")}", got "${JSON.stringify(u)}"`);return s}function Dk(e,t,n){const r=n.convert?Vj(e,t):e,o={$and:[],$or:[],keys:new Set},{$or:i,...s}=r;function a(c,u,f,p=[]){const g=v7(t,c);if(!g)throw new Error(`Expression does not exist: "${c}"`);if(!g.valid(u))throw new Error(`Invalid value at "${[...p,c].join(".")}", got "${JSON.stringify(u)}"`);return g.validate(u,f,n.exp_ctx)}for(const[c,u]of Object.entries(s))if(u!==void 0)for(const[f,p]of Object.entries(u)){const g=n.value_is_kv?c:Bn(n.object,c);o.$and.push(a(f,p,g,[c])),o.keys.add(c)}for(const[c,u]of Object.entries(i??{})){const f=n.value_is_kv?c:Bn(n.object,c);for(const[p,g]of Object.entries(u))o.$or.push(a(p,g,f,[c])),o.keys.add(c)}return o}function lle(e){const t={$and:void 0,$or:void 0};return t.$and=e.$and.every(n=>!!n),t.$or=e.$or.some(n=>!!n),!!t.$and||!!t.$or}function x7(e){if(!e.some(t=>t.key==="$eq"))throw new Error("'$eq' expression is required");return{convert:t=>Vj(t,e),build:(t,n)=>Dk(t,e,n),validate:(t,n)=>{const r=Dk(t,e,n);return lle(r)},expressions:e,expressionKeys:e.map(t=>t.key)}}const cle=[hn("$eq",e=>$i(e),(e,t)=>e===t),hn("$ne",e=>$i(e),(e,t)=>e!==t),hn("$like",e=>$i(e),(e,t)=>{switch(typeof t){case"string":return t.includes(e);case"number":return t===Number(e);case"boolean":return t===!!e;default:return!1}}),hn("$regex",e=>e instanceof RegExp?!0:typeof e=="string",(e,t)=>e instanceof RegExp?e.test(t):typeof e=="string"?new RegExp(e).test(t):!1),hn("$isnull",e=>!0,(e,t)=>e?t===null:t!==null),hn("$notnull",e=>!0,(e,t)=>e?t!==null:t===null),hn("$in",e=>Array.isArray(e),(e,t)=>e.includes(t)),hn("$notin",e=>Array.isArray(e),(e,t)=>!e.includes(t)),hn("$gt",e=>typeof e=="number",(e,t)=>t>e),hn("$gte",e=>typeof e=="number",(e,t)=>t>=e),hn("$lt",e=>typeof e=="number",(e,t)=>ttypeof e=="number",(e,t)=>t<=e),hn("$between",e=>Array.isArray(e)&&e.length===2&&e.every(t=>typeof t=="number"),(e,t)=>e[0]<=t&&t<=e[1])],ule=x7(cle),Ik=(e,t)=>ule.validate(e,{object:t,convert:!0});class dle extends Br{constructor(t,n,r){super(`Permission "${t.name}" not granted`),this.permission=t,this.policy=n,this.description=r}name="PermissionsException";code=Qt.FORBIDDEN;toJSON(){return{...super.toJSON(),description:this.description,permission:this.permission.name,policy:this.policy?.toJSON()}}}let Ur=class{_returning;static slug="untitled-event";params;returned=!1;validate(t){throw new fle(this,t)}clone(t){const n=new this.constructor(t);return n.returned=!0,n}constructor(t){this.params=t}};class lw extends Error{constructor(t,n){super(`Expected "${t}", got "${n}"`)}}class fle extends Error{constructor(t,n){super(`Event "${t.constructor.slug}" returned without validation`),this.data=n}}class hle{mode="async";event;handler;once=!1;id;constructor(t,n,r="async",o){this.event=t,this.handler=n,this.mode=r,this.id=o}}class Lg{constructor(t,n){this.options=n,t&&this.registerEvents(t),n?.listeners?.forEach(r=>this.addListener(r))}events=[];listeners=[];enabled=!0;asyncs=[];enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}clearEvents(){return this.events=[],this}clearAll(){return this.clearEvents(),this.listeners=[],this}getListeners(){return[...this.listeners]}get Events(){return new Proxy(this,{get:(t,n)=>this.events.find(r=>r.slug===n)})}eventExists(t){let n;return typeof t=="string"?n=t:n=t.constructor?.slug??t.slug,!!this.events.find(r=>n===r.slug)}throwIfEventNotRegistered(t){if(!this.eventExists(t)){const n=t.constructor?.slug??t.slug??t;throw new Error(`Event "${n}" not registered`)}}registerEvent(t,n=!1){if(this.eventExists(t)){if(n)return this;throw new Error(`Event "${t.name}" already registered.`)}return this.events.push(t),this}registerEvents(t){return(typeof t=="object"?Object.values(t):t).forEach(r=>this.registerEvent(r,!0)),this}addListener(t){return this.throwIfEventNotRegistered(t.event),t.id&&this.listeners.find(r=>r.id===t.id)?(rt.debug(`Listener with id "${t.id}" already exists.`),this):(this.listeners.push(t),this)}createEventListener(t,n,r="async"){const o=typeof t=="string"?this.events.find(a=>a.slug===t):t,i=typeof r=="string"?{mode:r}:r,s=new hle(o,n,i.mode);i.once&&(s.once=!0),i.id&&(s.id=`${o.slug}-${i.id}`),this.addListener(s)}onEvent(t,n,r){this.createEventListener(t,n,r)}on(t,n,r){this.createEventListener(t,n,r)}onAny(t,n){this.events.forEach(r=>this.onEvent(r,t,n))}collectAsyncs(t){this.asyncs.push(...t)}async executeAsyncs(t=n=>Promise.all(n)){if(this.asyncs.length===0)return;const n=[...this.asyncs];this.asyncs=[],await t(n.map(r=>r()))}async emit(t){const n=t.constructor.slug;if(!this.enabled)return rt.debug("EventManager disabled, not emitting",n),t;if(!this.eventExists(t))throw new Error(`Event "${n}" not registered`);const r=[],o=[];this.listeners=this.listeners.filter(s=>s.event.slug!==n?!0:(s.mode==="sync"?r.push(s):o.push(async()=>{try{await s.handler(t,s.event.slug)}catch(a){this.options?.onError?this.options.onError(t,a):rt.error("Error executing async listener",s,a)}}),!s.once)),this.collectAsyncs(o);let i=t;for(const s of r)try{const a=await s.handler(i,s.event.slug);if(typeof a<"u"){const c=i.validate(a);if(c&&c.constructor.slug===n){if(!c.returned)throw new Error(`Returned event ${c.constructor.slug} must be marked as returned.`);i=c}}}catch(a){if(a instanceof lw)this.options?.onInvalidReturn?.(i,a),rt.warn(`Invalid return of event listener for "${n}": ${a.message}`);else if(this.options?.onError)this.options.onError(i,a);else throw a}return i}}function mv(e){return typeof e>"u"||e===void 0}function hi(e){return typeof e=="string"}function Uj(e){return typeof e=="number"}function w7(e){return typeof e=="boolean"}function S7(e){return e===null}function E7(e){return typeof e=="bigint"}function Bu(e){return typeof e=="function"}function Fg(e){return typeof e=="object"&&e!==null}function X(e){return Object.freeze(e)}function Y0(e){return rc(e)?e:[e]}function rc(e){return Array.isArray(e)}const uo=X({is(e){return e.kind==="IdentifierNode"},create(e){return X({kind:"IdentifierNode",name:e})}}),C_=X({is(e){return e.kind==="SchemableIdentifierNode"},create(e){return X({kind:"SchemableIdentifierNode",identifier:uo.create(e)})},createWithSchema(e,t){return X({kind:"SchemableIdentifierNode",schema:uo.create(e),identifier:uo.create(t)})}}),Ec=X({is(e){return e.kind==="AliasNode"},create(e,t){return X({kind:"AliasNode",node:e,alias:t})}}),Wl=X({is(e){return e.kind==="TableNode"},create(e){return X({kind:"TableNode",table:C_.create(e)})},createWithSchema(e,t){return X({kind:"TableNode",table:C_.createWithSchema(e,t)})}});function Vo(e){return Fg(e)&&Bu(e.toOperationNode)}function N7(e){return Fg(e)&&"expressionType"in e&&Vo(e)}function ple(e){return Fg(e)&&"expression"in e&&hi(e.alias)&&Vo(e)}const na=X({is(e){return e.kind==="SelectModifierNode"},create(e,t){return X({kind:"SelectModifierNode",modifier:e,of:t})},createWithExpression(e){return X({kind:"SelectModifierNode",rawModifier:e})}}),oc=X({is(e){return e.kind==="AndNode"},create(e,t){return X({kind:"AndNode",left:e,right:t})}}),bh=X({is(e){return e.kind==="OrNode"},create(e,t){return X({kind:"OrNode",left:e,right:t})}}),v2=X({is(e){return e.kind==="OnNode"},create(e){return X({kind:"OnNode",on:e})},cloneWithOperation(e,t,n){return X({...e,on:t==="And"?oc.create(e.on,n):bh.create(e.on,n)})}}),xu=X({is(e){return e.kind==="JoinNode"},create(e,t){return X({kind:"JoinNode",joinType:e,table:t,on:void 0})},createWithOn(e,t,n){return X({kind:"JoinNode",joinType:e,table:t,on:v2.create(n)})},cloneWithOn(e,t){return X({...e,on:e.on?v2.cloneWithOperation(e.on,"And",t):v2.create(t)})}}),Rf=X({is(e){return e.kind==="BinaryOperationNode"},create(e,t,n){return X({kind:"BinaryOperationNode",leftOperand:e,operator:t,rightOperand:n})}}),mle=["=","==","!=","<>",">",">=","<","<=","in","not in","is","is not","like","not like","match","ilike","not ilike","@>","<@","^@","&&","?","?&","?|","!<","!>","<=>","!~","~","~*","!~*","@@","@@@","!!","<->","regexp","is distinct from","is not distinct from"],gle=["+","-","*","/","%","^","&","|","#","<<",">>"],_7=["->","->>"],yle=[...mle,...gle,"&&","||"],ble=["exists","not exists"],vle=["not","-",...ble],xle=[...yle,..._7,...vle,"between","between symmetric"],Au=X({is(e){return e.kind==="OperatorNode"},create(e){return X({kind:"OperatorNode",operator:e})}});function Lk(e){return hi(e)&&_7.includes(e)}const Hj=X({is(e){return e.kind==="ColumnNode"},create(e){return X({kind:"ColumnNode",column:uo.create(e)})}}),C7=X({is(e){return e.kind==="SelectAllNode"},create(){return X({kind:"SelectAllNode"})}}),cw=X({is(e){return e.kind==="ReferenceNode"},create(e,t){return X({kind:"ReferenceNode",table:t,column:e})},createSelectAll(e){return X({kind:"ReferenceNode",table:e,column:C7.create()})}});function O7(e){return Fg(e)&&Vo(e)&&hi(e.dynamicReference)}const fa=X({is(e){return e.kind==="OrderByItemNode"},create(e,t){return X({kind:"OrderByItemNode",orderBy:e,direction:t})},cloneWith(e,t){return X({...e,...t})}}),Dr=X({is(e){return e.kind==="RawNode"},create(e,t){return X({kind:"RawNode",sqlFragments:X(e),parameters:X(t)})},createWithSql(e){return Dr.create([e],[])},createWithChild(e){return Dr.create(["",""],[e])},createWithChildren(e){return Dr.create(new Array(e.length+1).fill(""),e)}}),wle={is(e){return e.kind==="CollateNode"},create(e){return X({kind:"CollateNode",collation:uo.create(e)})}};class su{#e;constructor(t){this.#e=X(t)}desc(){return new su({node:fa.cloneWith(this.#e.node,{direction:Dr.createWithSql("desc")})})}asc(){return new su({node:fa.cloneWith(this.#e.node,{direction:Dr.createWithSql("asc")})})}nullsLast(){return new su({node:fa.cloneWith(this.#e.node,{nulls:"last"})})}nullsFirst(){return new su({node:fa.cloneWith(this.#e.node,{nulls:"first"})})}collate(t){return new su({node:fa.cloneWith(this.#e.node,{collation:wle.create(t)})})}toOperationNode(){return this.#e.node}}const Fk=new Set;function uw(e){Fk.has(e)||(Fk.add(e),console.log(e))}function Sle(e){return e==="asc"||e==="desc"}function gv(e){if(e.length===2)return[x2(e[0],e[1])];if(e.length===1){const[t]=e;return Array.isArray(t)?(uw("orderBy(array) is deprecated, use multiple orderBy calls instead."),t.map(n=>x2(n))):[x2(t)]}throw new Error(`Invalid number of arguments at order by! expected 1-2, received ${e.length}`)}function x2(e,t){const n=Ele(e);if(fa.is(n)){if(t)throw new Error("Cannot specify direction twice!");return n}return j7(n,t)}function Ele(e){if(pw(e))return hw(e);if(O7(e))return e.toOperationNode();const[t,n]=e.split(" ");return n?(uw("`orderBy('column asc')` is deprecated. Use `orderBy('column', 'asc')` instead."),j7(ic(t),n)):ic(e)}function j7(e,t){if(typeof t=="string"){if(!Sle(t))throw new Error(`Invalid order by direction: ${t}`);return fa.create(e,Dr.createWithSql(t))}if(N7(t))return uw("`orderBy(..., expr)` is deprecated. Use `orderBy(..., 'asc')` or `orderBy(..., (ob) => ...)` instead."),fa.create(e,t.toOperationNode());const n=fa.create(e);return t?t(new su({node:n})).toOperationNode():n}const yv=X({is(e){return e.kind==="JSONReferenceNode"},create(e,t){return X({kind:"JSONReferenceNode",reference:e,traversal:t})},cloneWithTraversal(e,t){return X({...e,traversal:t})}}),A7=X({is(e){return e.kind==="JSONOperatorChainNode"},create(e){return X({kind:"JSONOperatorChainNode",operator:e,values:X([])})},cloneWithValue(e,t){return X({...e,values:X([...e.values,t])})}}),lm=X({is(e){return e.kind==="JSONPathNode"},create(e){return X({kind:"JSONPathNode",inOperator:e,pathLegs:X([])})},cloneWithLeg(e,t){return X({...e,pathLegs:X([...e.pathLegs,t])})}});function Nle(e){return hi(e)?ic(e):e.toOperationNode()}function Dm(e){return rc(e)?e.map(t=>ii(t)):[ii(e)]}function ii(e){return pw(e)?hw(e):Nle(e)}function _le(e,t){const n=ic(e);if(Lk(t))return yv.create(n,A7.create(Au.create(t)));const r=t.slice(0,-1);if(Lk(r))return yv.create(n,lm.create(Au.create(r)));throw new Error(`Invalid JSON operator: ${t}`)}function ic(e){const t=".";if(!e.includes(t))return cw.create(Hj.create(e));const n=e.split(t).map(T7);if(n.length===3)return Ole(n);if(n.length===2)return jle(n);throw new Error(`invalid column reference ${e}`)}function Cle(e){const t=" as ";if(e.includes(t)){const[n,r]=e.split(t).map(T7);return Ec.create(ic(n),uo.create(r))}else return ic(e)}function Ole(e){const[t,n,r]=e;return cw.create(Hj.create(r),Wl.createWithSchema(t,n))}function jle(e){const[t,n]=e;return cw.create(Hj.create(n),Wl.create(t))}function T7(e){return e.trim()}const Ale=X({is(e){return e.kind==="PrimitiveValueListNode"},create(e){return X({kind:"PrimitiveValueListNode",values:X([...e])})}}),Tle=X({is(e){return e.kind==="ValueListNode"},create(e){return X({kind:"ValueListNode",values:X(e)})}}),sc=X({is(e){return e.kind==="ValueNode"},create(e){return X({kind:"ValueNode",value:e})},createImmediate(e){return X({kind:"ValueNode",value:e,immediate:!0})}});function $le(e){return rc(e)?Rle(e):Ir(e)}function Ir(e){return pw(e)?hw(e):sc.create(e)}function qj(e){return Uj(e)||w7(e)||S7(e)}function Wj(e){if(!qj(e))throw new Error(`unsafe immediate value ${JSON.stringify(e)}`);return sc.createImmediate(e)}function Rle(e){return e.some(pw)?Tle.create(e.map(t=>Ir(t))):Ale.create(e)}const Im=X({is(e){return e.kind==="ParensNode"},create(e){return X({kind:"ParensNode",node:e})}});function Qi(e){if(e.length===3)return Gj(e[0],e[1],e[2]);if(e.length===1)return Ir(e[0]);throw new Error(`invalid arguments: ${JSON.stringify(e)}`)}function Gj(e,t,n){return kle(t)&&$7(n)?Rf.create(ii(e),j_(t),sc.createImmediate(n)):Rf.create(ii(e),j_(t),$le(n))}function Lm(e,t,n){return Rf.create(ii(e),j_(t),ii(n))}function zk(e,t){return O_(Object.entries(e).filter(([,n])=>!mv(n)).map(([n,r])=>Gj(n,$7(r)?"is":"=",r)),t)}function O_(e,t,n=!0){const r=t==="and"?oc.create:bh.create;if(e.length===0)return Rf.create(sc.createImmediate(1),Au.create("="),sc.createImmediate(t==="and"?1:0));let o=Bk(e[0]);for(let i=1;i1&&n?Im.create(o):o}function kle(e){return e==="is"||e==="is not"}function $7(e){return S7(e)||w7(e)}function j_(e){if(hi(e)&&xle.includes(e))return Au.create(e);if(Vo(e))return e.toOperationNode();throw new Error(`invalid operator ${JSON.stringify(e)}`)}function Bk(e){return Vo(e)?e.toOperationNode():e}const kf=X({is(e){return e.kind==="OrderByNode"},create(e){return X({kind:"OrderByNode",items:X([...e])})},cloneWithItems(e,t){return X({...e,items:X([...e.items,...t])})}}),Vk=X({is(e){return e.kind==="PartitionByNode"},create(e){return X({kind:"PartitionByNode",items:X(e)})},cloneWithItems(e,t){return X({...e,items:X([...e.items,...t])})}}),A_=X({is(e){return e.kind==="OverNode"},create(){return X({kind:"OverNode"})},cloneWithOrderByItems(e,t){return X({...e,orderBy:e.orderBy?kf.cloneWithItems(e.orderBy,t):kf.create(t)})},cloneWithPartitionByItems(e,t){return X({...e,partitionBy:e.partitionBy?Vk.cloneWithItems(e.partitionBy,t):Vk.create(t)})}}),bv=X({is(e){return e.kind==="FromNode"},create(e){return X({kind:"FromNode",froms:X(e)})},cloneWithFroms(e,t){return X({...e,froms:X([...e.froms,...t])})}}),Uk=X({is(e){return e.kind==="GroupByNode"},create(e){return X({kind:"GroupByNode",items:X(e)})},cloneWithItems(e,t){return X({...e,items:X([...e.items,...t])})}}),Hk=X({is(e){return e.kind==="HavingNode"},create(e){return X({kind:"HavingNode",having:e})},cloneWithOperation(e,t,n){return X({...e,having:t==="And"?oc.create(e.having,n):bh.create(e.having,n)})}}),Mle=X({is(e){return e.kind==="InsertQueryNode"},create(e,t,n){return X({kind:"InsertQueryNode",into:e,...t&&{with:t},replace:n})},createWithoutInto(){return X({kind:"InsertQueryNode"})},cloneWith(e,t){return X({...e,...t})}}),R7=X({is(e){return e.kind==="ListNode"},create(e){return X({kind:"ListNode",items:X(e)})}}),Ple=X({is(e){return e.kind==="UpdateQueryNode"},create(e,t){return X({kind:"UpdateQueryNode",table:e.length===1?e[0]:R7.create(e),...t&&{with:t}})},createWithoutTable(){return X({kind:"UpdateQueryNode"})},cloneWithFromItems(e,t){return X({...e,from:e.from?bv.cloneWithFroms(e.from,t):bv.create(t)})},cloneWithUpdates(e,t){return X({...e,updates:e.updates?X([...e.updates,...t]):t})},cloneWithLimit(e,t){return X({...e,limit:t})}}),qk=X({is(e){return e.kind==="UsingNode"},create(e){return X({kind:"UsingNode",tables:X(e)})},cloneWithTables(e,t){return X({...e,tables:X([...e.tables,...t])})}}),Dle=X({is(e){return e.kind==="DeleteQueryNode"},create(e,t){return X({kind:"DeleteQueryNode",from:bv.create(e),...t&&{with:t}})},cloneWithOrderByItems:(e,t)=>En.cloneWithOrderByItems(e,t),cloneWithoutOrderBy:e=>En.cloneWithoutOrderBy(e),cloneWithLimit(e,t){return X({...e,limit:t})},cloneWithoutLimit(e){return X({...e,limit:void 0})},cloneWithUsing(e,t){return X({...e,using:e.using!==void 0?qk.cloneWithTables(e.using,t):qk.create(t)})}}),lf=X({is(e){return e.kind==="WhereNode"},create(e){return X({kind:"WhereNode",where:e})},cloneWithOperation(e,t,n){return X({...e,where:t==="And"?oc.create(e.where,n):bh.create(e.where,n)})}}),Wk=X({is(e){return e.kind==="ReturningNode"},create(e){return X({kind:"ReturningNode",selections:X(e)})},cloneWithSelections(e,t){return X({...e,selections:e.selections?X([...e.selections,...t]):X(t)})}}),Ile=X({is(e){return e.kind==="ExplainNode"},create(e,t){return X({kind:"ExplainNode",format:e,options:t})}}),dw=X({is(e){return e.kind==="WhenNode"},create(e){return X({kind:"WhenNode",condition:e})},cloneWithResult(e,t){return X({...e,result:t})}}),Lle=X({is(e){return e.kind==="MergeQueryNode"},create(e,t){return X({kind:"MergeQueryNode",into:e,...t&&{with:t}})},cloneWithUsing(e,t){return X({...e,using:t})},cloneWithWhen(e,t){return X({...e,whens:e.whens?X([...e.whens,t]):X([t])})},cloneWithThen(e,t){return X({...e,whens:e.whens?X([...e.whens.slice(0,-1),dw.cloneWithResult(e.whens[e.whens.length-1],t)]):void 0})}}),Gk=X({is(e){return e.kind==="OutputNode"},create(e){return X({kind:"OutputNode",selections:X(e)})},cloneWithSelections(e,t){return X({...e,selections:e.selections?X([...e.selections,...t]):X(t)})}}),En=X({is(e){return vn.is(e)||Mle.is(e)||Ple.is(e)||Dle.is(e)||Lle.is(e)},cloneWithEndModifier(e,t){return X({...e,endModifiers:e.endModifiers?X([...e.endModifiers,t]):X([t])})},cloneWithWhere(e,t){return X({...e,where:e.where?lf.cloneWithOperation(e.where,"And",t):lf.create(t)})},cloneWithJoin(e,t){return X({...e,joins:e.joins?X([...e.joins,t]):X([t])})},cloneWithReturning(e,t){return X({...e,returning:e.returning?Wk.cloneWithSelections(e.returning,t):Wk.create(t)})},cloneWithoutReturning(e){return X({...e,returning:void 0})},cloneWithoutWhere(e){return X({...e,where:void 0})},cloneWithExplain(e,t,n){return X({...e,explain:Ile.create(t,n?.toOperationNode())})},cloneWithTop(e,t){return X({...e,top:t})},cloneWithOutput(e,t){return X({...e,output:e.output?Gk.cloneWithSelections(e.output,t):Gk.create(t)})},cloneWithOrderByItems(e,t){return X({...e,orderBy:e.orderBy?kf.cloneWithItems(e.orderBy,t):kf.create(t)})},cloneWithoutOrderBy(e){return X({...e,orderBy:void 0})}}),vn=X({is(e){return e.kind==="SelectQueryNode"},create(e){return X({kind:"SelectQueryNode",...e&&{with:e}})},createFrom(e,t){return X({kind:"SelectQueryNode",from:bv.create(e),...t&&{with:t}})},cloneWithSelections(e,t){return X({...e,selections:e.selections?X([...e.selections,...t]):X(t)})},cloneWithDistinctOn(e,t){return X({...e,distinctOn:e.distinctOn?X([...e.distinctOn,...t]):X(t)})},cloneWithFrontModifier(e,t){return X({...e,frontModifiers:e.frontModifiers?X([...e.frontModifiers,t]):X([t])})},cloneWithOrderByItems:(e,t)=>En.cloneWithOrderByItems(e,t),cloneWithGroupByItems(e,t){return X({...e,groupBy:e.groupBy?Uk.cloneWithItems(e.groupBy,t):Uk.create(t)})},cloneWithLimit(e,t){return X({...e,limit:t})},cloneWithOffset(e,t){return X({...e,offset:t})},cloneWithFetch(e,t){return X({...e,fetch:t})},cloneWithHaving(e,t){return X({...e,having:e.having?Hk.cloneWithOperation(e.having,"And",t):Hk.create(t)})},cloneWithSetOperations(e,t){return X({...e,setOperations:e.setOperations?X([...e.setOperations,...t]):X([...t])})},cloneWithoutSelections(e){return X({...e,selections:[]})},cloneWithoutLimit(e){return X({...e,limit:void 0})},cloneWithoutOffset(e){return X({...e,offset:void 0})},cloneWithoutOrderBy:e=>En.cloneWithoutOrderBy(e),cloneWithoutGroupBy(e){return X({...e,groupBy:void 0})}});let Fle=class Fb{#e;constructor(t){this.#e=X(t)}on(...t){return new Fb({...this.#e,joinNode:xu.cloneWithOn(this.#e.joinNode,Qi(t))})}onRef(t,n,r){return new Fb({...this.#e,joinNode:xu.cloneWithOn(this.#e.joinNode,Lm(t,n,r))})}onTrue(){return new Fb({...this.#e,joinNode:xu.cloneWithOn(this.#e.joinNode,Dr.createWithSql("true"))})}$call(t){return t(this)}toOperationNode(){return this.#e.joinNode}};const zle=X({is(e){return e.kind==="PartitionByItemNode"},create(e){return X({kind:"PartitionByItemNode",partitionBy:e})}});function Ble(e){return Dm(e).map(zle.create)}class cm{#e;constructor(t){this.#e=X(t)}orderBy(...t){return new cm({overNode:A_.cloneWithOrderByItems(this.#e.overNode,gv(t))})}clearOrderBy(){return new cm({overNode:En.cloneWithoutOrderBy(this.#e.overNode)})}partitionBy(t){return new cm({overNode:A_.cloneWithPartitionByItems(this.#e.overNode,Ble(t))})}$call(t){return t(this)}toOperationNode(){return this.#e.overNode}}const um=X({is(e){return e.kind==="SelectionNode"},create(e){return X({kind:"SelectionNode",selection:e})},createSelectAll(){return X({kind:"SelectionNode",selection:C7.create()})},createSelectAllFromTable(e){return X({kind:"SelectionNode",selection:cw.createSelectAll(e)})}});function k7(e){return Bu(e)?k7(e(fw())):rc(e)?e.map(t=>Jk(t)):[Jk(e)]}function Jk(e){return hi(e)?um.create(Cle(e)):O7(e)?um.create(e.toOperationNode()):um.create(I7(e))}function M7(e){return e?Array.isArray(e)?e.map(Yk):[Yk(e)]:[um.createSelectAll()]}function Yk(e){if(hi(e))return um.createSelectAllFromTable(Bi(e));throw new Error(`invalid value selectAll expression: ${JSON.stringify(e)}`)}class Vle extends Error{node;constructor(t){super("no result"),this.node=t}}function Ule(e){return Object.prototype.hasOwnProperty.call(e,"prototype")}const Hle=X({is(e){return e.kind==="TopNode"},create(e,t){return X({kind:"TopNode",expression:e,modifiers:t})}});function qle(e,t){if(!Uj(e)&&!E7(e))throw new Error(`Invalid top expression: ${e}`);if(!mv(t)&&!Wle(t))throw new Error(`Invalid top modifiers: ${t}`);return Hle.create(e,t)}function Wle(e){return e==="percent"||e==="with ties"||e==="percent with ties"}const Gle=X({is(e){return e.kind==="LimitNode"},create(e){return X({kind:"LimitNode",limit:e})}}),Kk=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"];function Jle(e){let t="";for(let n=0;nthis.transformNode(r,n)))}transformSelectQuery(t,n){return{kind:"SelectQueryNode",from:this.transformNode(t.from,n),selections:this.transformNodeList(t.selections,n),distinctOn:this.transformNodeList(t.distinctOn,n),joins:this.transformNodeList(t.joins,n),groupBy:this.transformNode(t.groupBy,n),orderBy:this.transformNode(t.orderBy,n),where:this.transformNode(t.where,n),frontModifiers:this.transformNodeList(t.frontModifiers,n),endModifiers:this.transformNodeList(t.endModifiers,n),limit:this.transformNode(t.limit,n),offset:this.transformNode(t.offset,n),with:this.transformNode(t.with,n),having:this.transformNode(t.having,n),explain:this.transformNode(t.explain,n),setOperations:this.transformNodeList(t.setOperations,n),fetch:this.transformNode(t.fetch,n),top:this.transformNode(t.top,n)}}transformSelection(t,n){return{kind:"SelectionNode",selection:this.transformNode(t.selection,n)}}transformColumn(t,n){return{kind:"ColumnNode",column:this.transformNode(t.column,n)}}transformAlias(t,n){return{kind:"AliasNode",node:this.transformNode(t.node,n),alias:this.transformNode(t.alias,n)}}transformTable(t,n){return{kind:"TableNode",table:this.transformNode(t.table,n)}}transformFrom(t,n){return{kind:"FromNode",froms:this.transformNodeList(t.froms,n)}}transformReference(t,n){return{kind:"ReferenceNode",column:this.transformNode(t.column,n),table:this.transformNode(t.table,n)}}transformAnd(t,n){return{kind:"AndNode",left:this.transformNode(t.left,n),right:this.transformNode(t.right,n)}}transformOr(t,n){return{kind:"OrNode",left:this.transformNode(t.left,n),right:this.transformNode(t.right,n)}}transformValueList(t,n){return{kind:"ValueListNode",values:this.transformNodeList(t.values,n)}}transformParens(t,n){return{kind:"ParensNode",node:this.transformNode(t.node,n)}}transformJoin(t,n){return{kind:"JoinNode",joinType:t.joinType,table:this.transformNode(t.table,n),on:this.transformNode(t.on,n)}}transformRaw(t,n){return{kind:"RawNode",sqlFragments:X([...t.sqlFragments]),parameters:this.transformNodeList(t.parameters,n)}}transformWhere(t,n){return{kind:"WhereNode",where:this.transformNode(t.where,n)}}transformInsertQuery(t,n){return{kind:"InsertQueryNode",into:this.transformNode(t.into,n),columns:this.transformNodeList(t.columns,n),values:this.transformNode(t.values,n),returning:this.transformNode(t.returning,n),onConflict:this.transformNode(t.onConflict,n),onDuplicateKey:this.transformNode(t.onDuplicateKey,n),endModifiers:this.transformNodeList(t.endModifiers,n),with:this.transformNode(t.with,n),ignore:t.ignore,orAction:this.transformNode(t.orAction,n),replace:t.replace,explain:this.transformNode(t.explain,n),defaultValues:t.defaultValues,top:this.transformNode(t.top,n),output:this.transformNode(t.output,n)}}transformValues(t,n){return{kind:"ValuesNode",values:this.transformNodeList(t.values,n)}}transformDeleteQuery(t,n){return{kind:"DeleteQueryNode",from:this.transformNode(t.from,n),using:this.transformNode(t.using,n),joins:this.transformNodeList(t.joins,n),where:this.transformNode(t.where,n),returning:this.transformNode(t.returning,n),endModifiers:this.transformNodeList(t.endModifiers,n),with:this.transformNode(t.with,n),orderBy:this.transformNode(t.orderBy,n),limit:this.transformNode(t.limit,n),explain:this.transformNode(t.explain,n),top:this.transformNode(t.top,n),output:this.transformNode(t.output,n)}}transformReturning(t,n){return{kind:"ReturningNode",selections:this.transformNodeList(t.selections,n)}}transformCreateTable(t,n){return{kind:"CreateTableNode",table:this.transformNode(t.table,n),columns:this.transformNodeList(t.columns,n),constraints:this.transformNodeList(t.constraints,n),temporary:t.temporary,ifNotExists:t.ifNotExists,onCommit:t.onCommit,frontModifiers:this.transformNodeList(t.frontModifiers,n),endModifiers:this.transformNodeList(t.endModifiers,n),selectQuery:this.transformNode(t.selectQuery,n)}}transformColumnDefinition(t,n){return{kind:"ColumnDefinitionNode",column:this.transformNode(t.column,n),dataType:this.transformNode(t.dataType,n),references:this.transformNode(t.references,n),primaryKey:t.primaryKey,autoIncrement:t.autoIncrement,unique:t.unique,notNull:t.notNull,unsigned:t.unsigned,defaultTo:this.transformNode(t.defaultTo,n),check:this.transformNode(t.check,n),generated:this.transformNode(t.generated,n),frontModifiers:this.transformNodeList(t.frontModifiers,n),endModifiers:this.transformNodeList(t.endModifiers,n),nullsNotDistinct:t.nullsNotDistinct,identity:t.identity,ifNotExists:t.ifNotExists}}transformAddColumn(t,n){return{kind:"AddColumnNode",column:this.transformNode(t.column,n)}}transformDropTable(t,n){return{kind:"DropTableNode",table:this.transformNode(t.table,n),ifExists:t.ifExists,cascade:t.cascade}}transformOrderBy(t,n){return{kind:"OrderByNode",items:this.transformNodeList(t.items,n)}}transformOrderByItem(t,n){return{kind:"OrderByItemNode",orderBy:this.transformNode(t.orderBy,n),direction:this.transformNode(t.direction,n),collation:this.transformNode(t.collation,n),nulls:t.nulls}}transformGroupBy(t,n){return{kind:"GroupByNode",items:this.transformNodeList(t.items,n)}}transformGroupByItem(t,n){return{kind:"GroupByItemNode",groupBy:this.transformNode(t.groupBy,n)}}transformUpdateQuery(t,n){return{kind:"UpdateQueryNode",table:this.transformNode(t.table,n),from:this.transformNode(t.from,n),joins:this.transformNodeList(t.joins,n),where:this.transformNode(t.where,n),updates:this.transformNodeList(t.updates,n),returning:this.transformNode(t.returning,n),endModifiers:this.transformNodeList(t.endModifiers,n),with:this.transformNode(t.with,n),explain:this.transformNode(t.explain,n),limit:this.transformNode(t.limit,n),top:this.transformNode(t.top,n),output:this.transformNode(t.output,n),orderBy:this.transformNode(t.orderBy,n)}}transformColumnUpdate(t,n){return{kind:"ColumnUpdateNode",column:this.transformNode(t.column,n),value:this.transformNode(t.value,n)}}transformLimit(t,n){return{kind:"LimitNode",limit:this.transformNode(t.limit,n)}}transformOffset(t,n){return{kind:"OffsetNode",offset:this.transformNode(t.offset,n)}}transformOnConflict(t,n){return{kind:"OnConflictNode",columns:this.transformNodeList(t.columns,n),constraint:this.transformNode(t.constraint,n),indexExpression:this.transformNode(t.indexExpression,n),indexWhere:this.transformNode(t.indexWhere,n),updates:this.transformNodeList(t.updates,n),updateWhere:this.transformNode(t.updateWhere,n),doNothing:t.doNothing}}transformOnDuplicateKey(t,n){return{kind:"OnDuplicateKeyNode",updates:this.transformNodeList(t.updates,n)}}transformCreateIndex(t,n){return{kind:"CreateIndexNode",name:this.transformNode(t.name,n),table:this.transformNode(t.table,n),columns:this.transformNodeList(t.columns,n),unique:t.unique,using:this.transformNode(t.using,n),ifNotExists:t.ifNotExists,where:this.transformNode(t.where,n),nullsNotDistinct:t.nullsNotDistinct}}transformList(t,n){return{kind:"ListNode",items:this.transformNodeList(t.items,n)}}transformDropIndex(t,n){return{kind:"DropIndexNode",name:this.transformNode(t.name,n),table:this.transformNode(t.table,n),ifExists:t.ifExists,cascade:t.cascade}}transformPrimaryKeyConstraint(t,n){return{kind:"PrimaryKeyConstraintNode",columns:this.transformNodeList(t.columns,n),name:this.transformNode(t.name,n),deferrable:t.deferrable,initiallyDeferred:t.initiallyDeferred}}transformUniqueConstraint(t,n){return{kind:"UniqueConstraintNode",columns:this.transformNodeList(t.columns,n),name:this.transformNode(t.name,n),nullsNotDistinct:t.nullsNotDistinct,deferrable:t.deferrable,initiallyDeferred:t.initiallyDeferred}}transformForeignKeyConstraint(t,n){return{kind:"ForeignKeyConstraintNode",columns:this.transformNodeList(t.columns,n),references:this.transformNode(t.references,n),name:this.transformNode(t.name,n),onDelete:t.onDelete,onUpdate:t.onUpdate,deferrable:t.deferrable,initiallyDeferred:t.initiallyDeferred}}transformSetOperation(t,n){return{kind:"SetOperationNode",operator:t.operator,expression:this.transformNode(t.expression,n),all:t.all}}transformReferences(t,n){return{kind:"ReferencesNode",table:this.transformNode(t.table,n),columns:this.transformNodeList(t.columns,n),onDelete:t.onDelete,onUpdate:t.onUpdate}}transformCheckConstraint(t,n){return{kind:"CheckConstraintNode",expression:this.transformNode(t.expression,n),name:this.transformNode(t.name,n)}}transformWith(t,n){return{kind:"WithNode",expressions:this.transformNodeList(t.expressions,n),recursive:t.recursive}}transformCommonTableExpression(t,n){return{kind:"CommonTableExpressionNode",name:this.transformNode(t.name,n),materialized:t.materialized,expression:this.transformNode(t.expression,n)}}transformCommonTableExpressionName(t,n){return{kind:"CommonTableExpressionNameNode",table:this.transformNode(t.table,n),columns:this.transformNodeList(t.columns,n)}}transformHaving(t,n){return{kind:"HavingNode",having:this.transformNode(t.having,n)}}transformCreateSchema(t,n){return{kind:"CreateSchemaNode",schema:this.transformNode(t.schema,n),ifNotExists:t.ifNotExists}}transformDropSchema(t,n){return{kind:"DropSchemaNode",schema:this.transformNode(t.schema,n),ifExists:t.ifExists,cascade:t.cascade}}transformAlterTable(t,n){return{kind:"AlterTableNode",table:this.transformNode(t.table,n),renameTo:this.transformNode(t.renameTo,n),setSchema:this.transformNode(t.setSchema,n),columnAlterations:this.transformNodeList(t.columnAlterations,n),addConstraint:this.transformNode(t.addConstraint,n),dropConstraint:this.transformNode(t.dropConstraint,n),renameConstraint:this.transformNode(t.renameConstraint,n),addIndex:this.transformNode(t.addIndex,n),dropIndex:this.transformNode(t.dropIndex,n)}}transformDropColumn(t,n){return{kind:"DropColumnNode",column:this.transformNode(t.column,n)}}transformRenameColumn(t,n){return{kind:"RenameColumnNode",column:this.transformNode(t.column,n),renameTo:this.transformNode(t.renameTo,n)}}transformAlterColumn(t,n){return{kind:"AlterColumnNode",column:this.transformNode(t.column,n),dataType:this.transformNode(t.dataType,n),dataTypeExpression:this.transformNode(t.dataTypeExpression,n),setDefault:this.transformNode(t.setDefault,n),dropDefault:t.dropDefault,setNotNull:t.setNotNull,dropNotNull:t.dropNotNull}}transformModifyColumn(t,n){return{kind:"ModifyColumnNode",column:this.transformNode(t.column,n)}}transformAddConstraint(t,n){return{kind:"AddConstraintNode",constraint:this.transformNode(t.constraint,n)}}transformDropConstraint(t,n){return{kind:"DropConstraintNode",constraintName:this.transformNode(t.constraintName,n),ifExists:t.ifExists,modifier:t.modifier}}transformRenameConstraint(t,n){return{kind:"RenameConstraintNode",oldName:this.transformNode(t.oldName,n),newName:this.transformNode(t.newName,n)}}transformCreateView(t,n){return{kind:"CreateViewNode",name:this.transformNode(t.name,n),temporary:t.temporary,orReplace:t.orReplace,ifNotExists:t.ifNotExists,materialized:t.materialized,columns:this.transformNodeList(t.columns,n),as:this.transformNode(t.as,n)}}transformRefreshMaterializedView(t,n){return{kind:"RefreshMaterializedViewNode",name:this.transformNode(t.name,n),concurrently:t.concurrently,withNoData:t.withNoData}}transformDropView(t,n){return{kind:"DropViewNode",name:this.transformNode(t.name,n),ifExists:t.ifExists,materialized:t.materialized,cascade:t.cascade}}transformGenerated(t,n){return{kind:"GeneratedNode",byDefault:t.byDefault,always:t.always,identity:t.identity,stored:t.stored,expression:this.transformNode(t.expression,n)}}transformDefaultValue(t,n){return{kind:"DefaultValueNode",defaultValue:this.transformNode(t.defaultValue,n)}}transformOn(t,n){return{kind:"OnNode",on:this.transformNode(t.on,n)}}transformSelectModifier(t,n){return{kind:"SelectModifierNode",modifier:t.modifier,rawModifier:this.transformNode(t.rawModifier,n),of:this.transformNodeList(t.of,n)}}transformCreateType(t,n){return{kind:"CreateTypeNode",name:this.transformNode(t.name,n),enum:this.transformNode(t.enum,n)}}transformDropType(t,n){return{kind:"DropTypeNode",name:this.transformNode(t.name,n),ifExists:t.ifExists}}transformExplain(t,n){return{kind:"ExplainNode",format:t.format,options:this.transformNode(t.options,n)}}transformSchemableIdentifier(t,n){return{kind:"SchemableIdentifierNode",schema:this.transformNode(t.schema,n),identifier:this.transformNode(t.identifier,n)}}transformAggregateFunction(t,n){return{kind:"AggregateFunctionNode",func:t.func,aggregated:this.transformNodeList(t.aggregated,n),distinct:t.distinct,orderBy:this.transformNode(t.orderBy,n),withinGroup:this.transformNode(t.withinGroup,n),filter:this.transformNode(t.filter,n),over:this.transformNode(t.over,n)}}transformOver(t,n){return{kind:"OverNode",orderBy:this.transformNode(t.orderBy,n),partitionBy:this.transformNode(t.partitionBy,n)}}transformPartitionBy(t,n){return{kind:"PartitionByNode",items:this.transformNodeList(t.items,n)}}transformPartitionByItem(t,n){return{kind:"PartitionByItemNode",partitionBy:this.transformNode(t.partitionBy,n)}}transformBinaryOperation(t,n){return{kind:"BinaryOperationNode",leftOperand:this.transformNode(t.leftOperand,n),operator:this.transformNode(t.operator,n),rightOperand:this.transformNode(t.rightOperand,n)}}transformUnaryOperation(t,n){return{kind:"UnaryOperationNode",operator:this.transformNode(t.operator,n),operand:this.transformNode(t.operand,n)}}transformUsing(t,n){return{kind:"UsingNode",tables:this.transformNodeList(t.tables,n)}}transformFunction(t,n){return{kind:"FunctionNode",func:t.func,arguments:this.transformNodeList(t.arguments,n)}}transformCase(t,n){return{kind:"CaseNode",value:this.transformNode(t.value,n),when:this.transformNodeList(t.when,n),else:this.transformNode(t.else,n),isStatement:t.isStatement}}transformWhen(t,n){return{kind:"WhenNode",condition:this.transformNode(t.condition,n),result:this.transformNode(t.result,n)}}transformJSONReference(t,n){return{kind:"JSONReferenceNode",reference:this.transformNode(t.reference,n),traversal:this.transformNode(t.traversal,n)}}transformJSONPath(t,n){return{kind:"JSONPathNode",inOperator:this.transformNode(t.inOperator,n),pathLegs:this.transformNodeList(t.pathLegs,n)}}transformJSONPathLeg(t,n){return{kind:"JSONPathLegNode",type:t.type,value:t.value}}transformJSONOperatorChain(t,n){return{kind:"JSONOperatorChainNode",operator:this.transformNode(t.operator,n),values:this.transformNodeList(t.values,n)}}transformTuple(t,n){return{kind:"TupleNode",values:this.transformNodeList(t.values,n)}}transformMergeQuery(t,n){return{kind:"MergeQueryNode",into:this.transformNode(t.into,n),using:this.transformNode(t.using,n),whens:this.transformNodeList(t.whens,n),with:this.transformNode(t.with,n),top:this.transformNode(t.top,n),endModifiers:this.transformNodeList(t.endModifiers,n),output:this.transformNode(t.output,n),returning:this.transformNode(t.returning,n)}}transformMatched(t,n){return{kind:"MatchedNode",not:t.not,bySource:t.bySource}}transformAddIndex(t,n){return{kind:"AddIndexNode",name:this.transformNode(t.name,n),columns:this.transformNodeList(t.columns,n),unique:t.unique,using:this.transformNode(t.using,n),ifNotExists:t.ifNotExists}}transformCast(t,n){return{kind:"CastNode",expression:this.transformNode(t.expression,n),dataType:this.transformNode(t.dataType,n)}}transformFetch(t,n){return{kind:"FetchNode",rowCount:this.transformNode(t.rowCount,n),modifier:t.modifier}}transformTop(t,n){return{kind:"TopNode",expression:t.expression,modifiers:t.modifiers}}transformOutput(t,n){return{kind:"OutputNode",selections:this.transformNodeList(t.selections,n)}}transformDataType(t,n){return t}transformSelectAll(t,n){return t}transformIdentifier(t,n){return t}transformValue(t,n){return t}transformPrimitiveValueList(t,n){return t}transformOperator(t,n){return t}transformDefaultInsertValue(t,n){return t}transformOrAction(t,n){return t}transformCollate(t,n){return t}}const Qle=X({AlterTableNode:!0,CreateIndexNode:!0,CreateSchemaNode:!0,CreateTableNode:!0,CreateTypeNode:!0,CreateViewNode:!0,RefreshMaterializedViewNode:!0,DeleteQueryNode:!0,DropIndexNode:!0,DropSchemaNode:!0,DropTableNode:!0,DropTypeNode:!0,DropViewNode:!0,InsertQueryNode:!0,RawNode:!0,SelectQueryNode:!0,UpdateQueryNode:!0,MergeQueryNode:!0}),Zle={json_agg:!0,to_json:!0};class ece extends Xle{#e;#t=new Set;#n=new Set;constructor(t){super(),this.#e=t}transformNodeImpl(t,n){if(!this.#r(t))return super.transformNodeImpl(t,n);const r=this.#a(t);for(const s of r)this.#n.add(s);const o=this.#o(t);for(const s of o)this.#t.add(s);const i=super.transformNodeImpl(t,n);for(const s of o)this.#t.delete(s);for(const s of r)this.#n.delete(s);return i}transformSchemableIdentifier(t,n){const r=super.transformSchemableIdentifier(t,n);return r.schema||!this.#t.has(t.identifier.name)?r:{...r,schema:uo.create(this.#e)}}transformReferences(t,n){const r=super.transformReferences(t,n);return r.table.table.schema?r:{...r,table:Wl.createWithSchema(this.#e,r.table.table.identifier.name)}}transformAggregateFunction(t,n){return{...super.transformAggregateFunction({...t,aggregated:[]},n),aggregated:this.#i(t,n,"aggregated")}}transformFunction(t,n){return{...super.transformFunction({...t,arguments:[]},n),arguments:this.#i(t,n,"arguments")}}#i(t,n,r){return Zle[t.func]?t[r].map(o=>!Wl.is(o)||o.table.schema?this.transformNode(o,n):{...o,table:this.transformIdentifier(o.table.identifier,n)}):this.transformNodeList(t[r],n)}#r(t){return t.kind in Qle}#o(t){const n=new Set;if("name"in t&&t.name&&C_.is(t.name)&&this.#l(t.name,n),"from"in t&&t.from)for(const r of t.from.froms)this.#s(r,n);if("into"in t&&t.into&&this.#s(t.into,n),"table"in t&&t.table&&this.#s(t.table,n),"joins"in t&&t.joins)for(const r of t.joins)this.#s(r.table,n);return"using"in t&&t.using&&(xu.is(t.using)?this.#s(t.using.table,n):this.#s(t.using,n)),n}#a(t){const n=new Set;return"with"in t&&t.with&&this.#c(t.with,n),n}#s(t,n){if(Wl.is(t))this.#l(t.table,n);else if(Ec.is(t)&&Wl.is(t.node))this.#l(t.node.table,n);else if(R7.is(t))for(const r of t.items)this.#s(r,n)}#l(t,n){const r=t.identifier.name;!this.#t.has(r)&&!this.#n.has(r)&&n.add(r)}#c(t,n){for(const r of t.expressions){const o=r.name.table.table.identifier.name;this.#n.has(o)||n.add(o)}}}class tce{#e;constructor(t){this.#e=new ece(t)}transformQuery(t){return this.#e.transformNode(t.node,t.queryId)}async transformResult(t){return t.result}}class Xk{#e;#t;#n;constructor(){this.#e=new Promise((t,n)=>{this.#n=n,this.#t=t})}get promise(){return this.#e}resolve=t=>{this.#t&&this.#t(t)};reject=t=>{this.#n&&this.#n(t)}}async function nce(e){const t=new Xk,n=new Xk;return e.provideConnection(async r=>(t.resolve(r),await n.promise)).catch(r=>t.reject(r)),X({connection:await t.promise,release:n.resolve})}const rce=X([]);class oce{#e;constructor(t=rce){this.#e=t}get plugins(){return this.#e}transformQuery(t,n){for(const r of this.#e){const o=r.transformQuery({node:t,queryId:n});if(o.kind===t.kind)t=o;else throw new Error(["KyselyPlugin.transformQuery must return a node","of the same kind that was given to it.",`The plugin was given a ${t.kind}`,`but it returned a ${o.kind}`].join(" "))}return t}async executeQuery(t){return await this.provideConnection(async n=>{const r=await n.executeQuery(t);return"numUpdatedOrDeletedRows"in r&&uw("kysely:warning: outdated driver/plugin detected! `QueryResult.numUpdatedOrDeletedRows` has been replaced with `QueryResult.numAffectedRows`."),await this.#t(r,t.queryId)})}async*stream(t,n){const{connection:r,release:o}=await nce(this);try{for await(const i of r.streamQuery(t,n))yield await this.#t(i,t.queryId)}finally{o()}}async#t(t,n){for(const r of this.#e)t=await r.transformResult({result:t,queryId:n});return t}}class cf extends oce{get adapter(){throw new Error("this query cannot be compiled to SQL")}compileQuery(){throw new Error("this query cannot be compiled to SQL")}provideConnection(){throw new Error("this query cannot be executed")}withConnectionProvider(){throw new Error("this query cannot have a connection provider")}withPlugin(t){return new cf([...this.plugins,t])}withPlugins(t){return new cf([...this.plugins,...t])}withPluginAtFront(t){return new cf([t,...this.plugins])}withoutPlugins(){return new cf([])}}const P7=new cf;function ice(e,t){return new Fle({joinNode:xu.create(e,zm(t))})}function sce(){return new cm({overNode:A_.create()})}function ace(e,t){if(t.length===3)return cce(e,t[0],t[1],t[2]);if(t.length===2)return lce(e,t[0],t[1]);if(t.length===1)return uce(e,t[0]);throw new Error("not implemented")}function lce(e,t,n){return n(ice(e,t)).toOperationNode()}function cce(e,t,n,r){return xu.createWithOn(e,zm(t),Lm(n,"=",r))}function uce(e,t){return xu.create(e,zm(t))}const dce=X({is(e){return e.kind==="OffsetNode"},create(e){return X({kind:"OffsetNode",offset:e})}}),fce=X({is(e){return e.kind==="GroupByItemNode"},create(e){return X({kind:"GroupByItemNode",groupBy:e})}});function hce(e){return e=Bu(e)?e(fw()):e,Dm(e).map(fce.create)}const pce=X({is(e){return e.kind==="SetOperationNode"},create(e,t,n){return X({kind:"SetOperationNode",operator:e,expression:t,all:n})}});function Hd(e,t,n){return Bu(t)&&(t=t(Yj())),rc(t)||(t=[t]),t.map(r=>pce.create(e,hw(r),n))}class Yt{#e;constructor(t){this.#e=t}get expressionType(){}as(t){return new Jj(this,t)}or(...t){return new vv(bh.create(this.#e,Qi(t)))}and(...t){return new xv(oc.create(this.#e,Qi(t)))}$castTo(){return new Yt(this.#e)}$notNull(){return new Yt(this.#e)}toOperationNode(){return this.#e}}class Jj{#e;#t;constructor(t,n){this.#e=t,this.#t=n}get expression(){return this.#e}get alias(){return this.#t}toOperationNode(){return Ec.create(this.#e.toOperationNode(),Vo(this.#t)?this.#t.toOperationNode():uo.create(this.#t))}}class vv{#e;constructor(t){this.#e=t}get expressionType(){}as(t){return new Jj(this,t)}or(...t){return new vv(bh.create(this.#e,Qi(t)))}$castTo(){return new vv(this.#e)}toOperationNode(){return Im.create(this.#e)}}class xv{#e;constructor(t){this.#e=t}get expressionType(){}as(t){return new Jj(this,t)}and(...t){return new xv(oc.create(this.#e,Qi(t)))}$castTo(){return new xv(this.#e)}toOperationNode(){return Im.create(this.#e)}}const mce={is(e){return e.kind==="FetchNode"},create(e,t){return{kind:"FetchNode",rowCount:sc.create(e),modifier:t}}};function gce(e,t){if(!Uj(e)&&!E7(e))throw new Error(`Invalid fetch row count: ${e}`);if(!yce(t))throw new Error(`Invalid fetch modifier: ${t}`);return mce.create(e,t)}function yce(e){return e==="only"||e==="with ties"}class ut{#e;constructor(t){this.#e=X(t)}get expressionType(){}get isSelectQueryBuilder(){return!0}where(...t){return new ut({...this.#e,queryNode:En.cloneWithWhere(this.#e.queryNode,Qi(t))})}whereRef(t,n,r){return new ut({...this.#e,queryNode:En.cloneWithWhere(this.#e.queryNode,Lm(t,n,r))})}having(...t){return new ut({...this.#e,queryNode:vn.cloneWithHaving(this.#e.queryNode,Qi(t))})}havingRef(t,n,r){return new ut({...this.#e,queryNode:vn.cloneWithHaving(this.#e.queryNode,Lm(t,n,r))})}select(t){return new ut({...this.#e,queryNode:vn.cloneWithSelections(this.#e.queryNode,k7(t))})}distinctOn(t){return new ut({...this.#e,queryNode:vn.cloneWithDistinctOn(this.#e.queryNode,Dm(t))})}modifyFront(t){return new ut({...this.#e,queryNode:vn.cloneWithFrontModifier(this.#e.queryNode,na.createWithExpression(t.toOperationNode()))})}modifyEnd(t){return new ut({...this.#e,queryNode:En.cloneWithEndModifier(this.#e.queryNode,na.createWithExpression(t.toOperationNode()))})}distinct(){return new ut({...this.#e,queryNode:vn.cloneWithFrontModifier(this.#e.queryNode,na.create("Distinct"))})}forUpdate(t){return new ut({...this.#e,queryNode:En.cloneWithEndModifier(this.#e.queryNode,na.create("ForUpdate",t?Y0(t).map(Bi):void 0))})}forShare(t){return new ut({...this.#e,queryNode:En.cloneWithEndModifier(this.#e.queryNode,na.create("ForShare",t?Y0(t).map(Bi):void 0))})}forKeyShare(t){return new ut({...this.#e,queryNode:En.cloneWithEndModifier(this.#e.queryNode,na.create("ForKeyShare",t?Y0(t).map(Bi):void 0))})}forNoKeyUpdate(t){return new ut({...this.#e,queryNode:En.cloneWithEndModifier(this.#e.queryNode,na.create("ForNoKeyUpdate",t?Y0(t).map(Bi):void 0))})}skipLocked(){return new ut({...this.#e,queryNode:En.cloneWithEndModifier(this.#e.queryNode,na.create("SkipLocked"))})}noWait(){return new ut({...this.#e,queryNode:En.cloneWithEndModifier(this.#e.queryNode,na.create("NoWait"))})}selectAll(t){return new ut({...this.#e,queryNode:vn.cloneWithSelections(this.#e.queryNode,M7(t))})}innerJoin(...t){return this.#t("InnerJoin",t)}leftJoin(...t){return this.#t("LeftJoin",t)}rightJoin(...t){return this.#t("RightJoin",t)}fullJoin(...t){return this.#t("FullJoin",t)}crossJoin(...t){return this.#t("CrossJoin",t)}innerJoinLateral(...t){return this.#t("LateralInnerJoin",t)}leftJoinLateral(...t){return this.#t("LateralLeftJoin",t)}crossJoinLateral(...t){return this.#t("LateralCrossJoin",t)}crossApply(...t){return this.#t("CrossApply",t)}outerApply(...t){return this.#t("OuterApply",t)}#t(t,n){return new ut({...this.#e,queryNode:En.cloneWithJoin(this.#e.queryNode,ace(t,n))})}orderBy(...t){return new ut({...this.#e,queryNode:En.cloneWithOrderByItems(this.#e.queryNode,gv(t))})}groupBy(t){return new ut({...this.#e,queryNode:vn.cloneWithGroupByItems(this.#e.queryNode,hce(t))})}limit(t){return new ut({...this.#e,queryNode:vn.cloneWithLimit(this.#e.queryNode,Gle.create(Ir(t)))})}offset(t){return new ut({...this.#e,queryNode:vn.cloneWithOffset(this.#e.queryNode,dce.create(Ir(t)))})}fetch(t,n="only"){return new ut({...this.#e,queryNode:vn.cloneWithFetch(this.#e.queryNode,gce(t,n))})}top(t,n){return new ut({...this.#e,queryNode:En.cloneWithTop(this.#e.queryNode,qle(t,n))})}union(t){return new ut({...this.#e,queryNode:vn.cloneWithSetOperations(this.#e.queryNode,Hd("union",t,!1))})}unionAll(t){return new ut({...this.#e,queryNode:vn.cloneWithSetOperations(this.#e.queryNode,Hd("union",t,!0))})}intersect(t){return new ut({...this.#e,queryNode:vn.cloneWithSetOperations(this.#e.queryNode,Hd("intersect",t,!1))})}intersectAll(t){return new ut({...this.#e,queryNode:vn.cloneWithSetOperations(this.#e.queryNode,Hd("intersect",t,!0))})}except(t){return new ut({...this.#e,queryNode:vn.cloneWithSetOperations(this.#e.queryNode,Hd("except",t,!1))})}exceptAll(t){return new ut({...this.#e,queryNode:vn.cloneWithSetOperations(this.#e.queryNode,Hd("except",t,!0))})}as(t){return new vce(this,t)}clearSelect(){return new ut({...this.#e,queryNode:vn.cloneWithoutSelections(this.#e.queryNode)})}clearWhere(){return new ut({...this.#e,queryNode:En.cloneWithoutWhere(this.#e.queryNode)})}clearLimit(){return new ut({...this.#e,queryNode:vn.cloneWithoutLimit(this.#e.queryNode)})}clearOffset(){return new ut({...this.#e,queryNode:vn.cloneWithoutOffset(this.#e.queryNode)})}clearOrderBy(){return new ut({...this.#e,queryNode:En.cloneWithoutOrderBy(this.#e.queryNode)})}clearGroupBy(){return new ut({...this.#e,queryNode:vn.cloneWithoutGroupBy(this.#e.queryNode)})}$call(t){return t(this)}$if(t,n){return t?n(this):new ut({...this.#e})}$castTo(){return new ut(this.#e)}$narrowType(){return new ut(this.#e)}$assertType(){return new ut(this.#e)}$asTuple(){return new Yt(this.toOperationNode())}$asScalar(){return new Yt(this.toOperationNode())}withPlugin(t){return new ut({...this.#e,executor:this.#e.executor.withPlugin(t)})}toOperationNode(){return this.#e.executor.transformQuery(this.#e.queryNode,this.#e.queryId)}compile(){return this.#e.executor.compileQuery(this.toOperationNode(),this.#e.queryId)}async execute(){const t=this.compile();return(await this.#e.executor.executeQuery(t)).rows}async executeTakeFirst(){const[t]=await this.execute();return t}async executeTakeFirstOrThrow(t=Vle){const n=await this.executeTakeFirst();if(n===void 0)throw Ule(t)?new t(this.toOperationNode()):t(this.toOperationNode());return n}async*stream(t=100){const n=this.compile(),r=this.#e.executor.stream(n,t);for await(const o of r)yield*o.rows}async explain(t,n){return await new ut({...this.#e,queryNode:En.cloneWithExplain(this.#e.queryNode,t,n)}).execute()}}function bce(e){return new ut(e)}class vce{#e;#t;constructor(t,n){this.#e=t,this.#t=n}get expression(){return this.#e}get alias(){return this.#t}get isAliasedSelectQueryBuilder(){return!0}toOperationNode(){return Ec.create(this.#e.toOperationNode(),uo.create(this.#t))}}const Bl=X({is(e){return e.kind==="AggregateFunctionNode"},create(e,t=[]){return X({kind:"AggregateFunctionNode",func:e,aggregated:t})},cloneWithDistinct(e){return X({...e,distinct:!0})},cloneWithOrderBy(e,t,n=!1){const r=n?"withinGroup":"orderBy";return X({...e,[r]:e[r]?kf.cloneWithItems(e[r],t):kf.create(t)})},cloneWithFilter(e,t){return X({...e,filter:e.filter?lf.cloneWithOperation(e.filter,"And",t):lf.create(t)})},cloneWithOrFilter(e,t){return X({...e,filter:e.filter?lf.cloneWithOperation(e.filter,"Or",t):lf.create(t)})},cloneWithOver(e,t){return X({...e,over:t})}}),Qk=X({is(e){return e.kind==="FunctionNode"},create(e,t){return X({kind:"FunctionNode",func:e,arguments:t})}});class jo{#e;constructor(t){this.#e=X(t)}get expressionType(){}as(t){return new xce(this,t)}distinct(){return new jo({...this.#e,aggregateFunctionNode:Bl.cloneWithDistinct(this.#e.aggregateFunctionNode)})}orderBy(...t){return new jo({...this.#e,aggregateFunctionNode:En.cloneWithOrderByItems(this.#e.aggregateFunctionNode,gv(t))})}clearOrderBy(){return new jo({...this.#e,aggregateFunctionNode:En.cloneWithoutOrderBy(this.#e.aggregateFunctionNode)})}withinGroupOrderBy(...t){return new jo({...this.#e,aggregateFunctionNode:Bl.cloneWithOrderBy(this.#e.aggregateFunctionNode,gv(t),!0)})}filterWhere(...t){return new jo({...this.#e,aggregateFunctionNode:Bl.cloneWithFilter(this.#e.aggregateFunctionNode,Qi(t))})}filterWhereRef(t,n,r){return new jo({...this.#e,aggregateFunctionNode:Bl.cloneWithFilter(this.#e.aggregateFunctionNode,Lm(t,n,r))})}over(t){const n=sce();return new jo({...this.#e,aggregateFunctionNode:Bl.cloneWithOver(this.#e.aggregateFunctionNode,(t?t(n):n).toOperationNode())})}$call(t){return t(this)}$castTo(){return new jo(this.#e)}$notNull(){return new jo(this.#e)}toOperationNode(){return this.#e.aggregateFunctionNode}}class xce{#e;#t;constructor(t,n){this.#e=t,this.#t=n}get expression(){return this.#e}get alias(){return this.#t}toOperationNode(){return Ec.create(this.#e.toOperationNode(),uo.create(this.#t))}}function wce(){const e=(n,r)=>new Yt(Qk.create(n,Dm(r??[]))),t=(n,r)=>new jo({aggregateFunctionNode:Bl.create(n,r?Dm(r):void 0)});return Object.assign(e,{agg:t,avg(n){return t("avg",[n])},coalesce(...n){return e("coalesce",n)},count(n){return t("count",[n])},countAll(n){return new jo({aggregateFunctionNode:Bl.create("count",M7(n))})},max(n){return t("max",[n])},min(n){return t("min",[n])},sum(n){return t("sum",[n])},any(n){return e("any",[n])},jsonAgg(n){return new jo({aggregateFunctionNode:Bl.create("json_agg",[hi(n)?Bi(n):n.toOperationNode()])})},toJson(n){return new Yt(Qk.create("to_json",[hi(n)?Bi(n):n.toOperationNode()]))}})}const Sce=X({is(e){return e.kind==="UnaryOperationNode"},create(e,t){return X({kind:"UnaryOperationNode",operator:e,operand:t})}});function Ece(e,t){return Sce.create(Au.create(e),ii(t))}const ma=X({is(e){return e.kind==="CaseNode"},create(e){return X({kind:"CaseNode",value:e})},cloneWithWhen(e,t){return X({...e,when:X(e.when?[...e.when,t]:[t])})},cloneWithThen(e,t){return X({...e,when:e.when?X([...e.when.slice(0,-1),dw.cloneWithResult(e.when[e.when.length-1],t)]):void 0})},cloneWith(e,t){return X({...e,...t})}});class Nce{#e;constructor(t){this.#e=X(t)}when(...t){return new D7({...this.#e,node:ma.cloneWithWhen(this.#e.node,dw.create(Qi(t)))})}}class D7{#e;constructor(t){this.#e=X(t)}then(t){return new _ce({...this.#e,node:ma.cloneWithThen(this.#e.node,qj(t)?Wj(t):Ir(t))})}}class _ce{#e;constructor(t){this.#e=X(t)}when(...t){return new D7({...this.#e,node:ma.cloneWithWhen(this.#e.node,dw.create(Qi(t)))})}else(t){return new Cce({...this.#e,node:ma.cloneWith(this.#e.node,{else:qj(t)?Wj(t):Ir(t)})})}end(){return new Yt(ma.cloneWith(this.#e.node,{isStatement:!1}))}endCase(){return new Yt(ma.cloneWith(this.#e.node,{isStatement:!0}))}}class Cce{#e;constructor(t){this.#e=X(t)}end(){return new Yt(ma.cloneWith(this.#e.node,{isStatement:!1}))}endCase(){return new Yt(ma.cloneWith(this.#e.node,{isStatement:!0}))}}const Zk=X({is(e){return e.kind==="JSONPathLegNode"},create(e,t){return X({kind:"JSONPathLegNode",type:e,value:t})}});class T_{#e;constructor(t){this.#e=t}at(t){return this.#t("ArrayLocation",t)}key(t){return this.#t("Member",t)}#t(t,n){return yv.is(this.#e)?new Fm(yv.cloneWithTraversal(this.#e,lm.is(this.#e.traversal)?lm.cloneWithLeg(this.#e.traversal,Zk.create(t,n)):A7.cloneWithValue(this.#e.traversal,sc.createImmediate(n)))):new Fm(lm.cloneWithLeg(this.#e,Zk.create(t,n)))}}class Fm extends T_{#e;constructor(t){super(t),this.#e=t}get expressionType(){}as(t){return new Oce(this,t)}$castTo(){return new Fm(this.#e)}$notNull(){return new Fm(this.#e)}toOperationNode(){return this.#e}}class Oce{#e;#t;constructor(t,n){this.#e=t,this.#t=n}get expression(){return this.#e}get alias(){return this.#t}toOperationNode(){return Ec.create(this.#e.toOperationNode(),Vo(this.#t)?this.#t.toOperationNode():uo.create(this.#t))}}const eM=X({is(e){return e.kind==="TupleNode"},create(e){return X({kind:"TupleNode",values:X(e)})}}),jce=["varchar","char","text","integer","int2","int4","int8","smallint","bigint","boolean","real","double precision","float4","float8","decimal","numeric","binary","bytea","date","datetime","time","timetz","timestamp","timestamptz","serial","bigserial","uuid","json","jsonb","blob","varbinary","int4range","int4multirange","int8range","int8multirange","numrange","nummultirange","tsrange","tsmultirange","tstzrange","tstzmultirange","daterange","datemultirange"],Ace=[/^varchar\(\d+\)$/,/^char\(\d+\)$/,/^decimal\(\d+, \d+\)$/,/^numeric\(\d+, \d+\)$/,/^binary\(\d+\)$/,/^datetime\(\d+\)$/,/^time\(\d+\)$/,/^timetz\(\d+\)$/,/^timestamp\(\d+\)$/,/^timestamptz\(\d+\)$/,/^varbinary\(\d+\)$/],Tce=X({is(e){return e.kind==="DataTypeNode"},create(e){return X({kind:"DataTypeNode",dataType:e})}});function $ce(e){return!!(jce.includes(e)||Ace.some(t=>t.test(e)))}function Rce(e){if(Vo(e))return e.toOperationNode();if($ce(e))return Tce.create(e);throw new Error(`invalid column data type ${JSON.stringify(e)}`)}const kce=X({is(e){return e.kind==="CastNode"},create(e,t){return X({kind:"CastNode",expression:e,dataType:t})}});function Yj(e=P7){function t(o,i,s){return new Yt(Gj(o,i,s))}function n(o,i){return new Yt(Ece(o,i))}const r=Object.assign(t,{fn:void 0,eb:void 0,selectFrom(o){return bce({queryId:sa(),executor:e,queryNode:vn.createFrom(Pce(o))})},case(o){return new Nce({node:ma.create(mv(o)?void 0:ii(o))})},ref(o,i){return mv(i)?new Yt(ic(o)):new T_(_le(o,i))},jsonPath(){return new T_(lm.create())},table(o){return new Yt(Bi(o))},val(o){return new Yt(Ir(o))},refTuple(...o){return new Yt(eM.create(o.map(ii)))},tuple(...o){return new Yt(eM.create(o.map(Ir)))},lit(o){return new Yt(Wj(o))},unary:n,not(o){return n("not",o)},exists(o){return n("exists",o)},neg(o){return n("-",o)},between(o,i,s){return new Yt(Rf.create(ii(o),Au.create("between"),oc.create(Ir(i),Ir(s))))},betweenSymmetric(o,i,s){return new Yt(Rf.create(ii(o),Au.create("between symmetric"),oc.create(Ir(i),Ir(s))))},and(o){return rc(o)?new Yt(O_(o,"and")):new Yt(zk(o,"and"))},or(o){return rc(o)?new Yt(O_(o,"or")):new Yt(zk(o,"or"))},parens(...o){const i=Qi(o);return Im.is(i)?new Yt(i):new Yt(Im.create(i))},cast(o,i){return new Yt(kce.create(ii(o),Rce(i)))},withSchema(o){return Yj(e.withPluginAtFront(new tce(o)))}});return r.fn=wce(),r.eb=r,r}function fw(e){return Yj()}function hw(e){if(Vo(e))return e.toOperationNode();if(Bu(e))return e(fw()).toOperationNode();throw new Error(`invalid expression: ${JSON.stringify(e)}`)}function I7(e){if(Vo(e))return e.toOperationNode();if(Bu(e))return e(fw()).toOperationNode();throw new Error(`invalid aliased expression: ${JSON.stringify(e)}`)}function pw(e){return N7(e)||ple(e)||Bu(e)}function Mce(e){return Fg(e)&&Vo(e)&&hi(e.table)&&hi(e.alias)}function Pce(e){return rc(e)?e.map(t=>zm(t)):[zm(e)]}function zm(e){return hi(e)?Dce(e):Mce(e)?e.toOperationNode():I7(e)}function Dce(e){const t=" as ";if(e.includes(t)){const[n,r]=e.split(t).map(L7);return Ec.create(Bi(n),uo.create(r))}else return Bi(e)}function Bi(e){const t=".";if(e.includes(t)){const[n,r]=e.split(t).map(L7);return Wl.createWithSchema(n,r)}else return Wl.create(e)}function L7(e){return e.trim()}class dm{#e;constructor(t){this.#e=X(t)}get expressionType(){}get isRawBuilder(){return!0}as(t){return new Ice(this,t)}$castTo(){return new dm({...this.#e})}$notNull(){return new dm(this.#e)}withPlugin(t){return new dm({...this.#e,plugins:this.#e.plugins!==void 0?X([...this.#e.plugins,t]):X([t])})}toOperationNode(){return this.#n(this.#t())}compile(t){return this.#i(this.#t(t))}async execute(t){const n=this.#t(t);return n.executeQuery(this.#i(n))}#t(t){const n=t!==void 0?t.getExecutor():P7;return this.#e.plugins!==void 0?n.withPlugins(this.#e.plugins):n}#n(t){return t.transformQuery(this.#e.rawNode,this.#e.queryId)}#i(t){return t.compileQuery(this.#n(t),this.#e.queryId)}}function Al(e){return new dm(e)}class Ice{#e;#t;constructor(t,n){this.#e=t,this.#t=n}get expression(){return this.#e}get alias(){return this.#t}get rawBuilder(){return this.#e}toOperationNode(){return Ec.create(this.#e.toOperationNode(),Vo(this.#t)?this.#t.toOperationNode():uo.create(this.#t))}}const Bm=Object.assign((e,...t)=>Al({queryId:sa(),rawNode:Dr.create(e,t?.map(tM)??[])}),{ref(e){return Al({queryId:sa(),rawNode:Dr.createWithChild(ic(e))})},val(e){return Al({queryId:sa(),rawNode:Dr.createWithChild(Ir(e))})},value(e){return this.val(e)},table(e){return Al({queryId:sa(),rawNode:Dr.createWithChild(Bi(e))})},id(...e){const t=new Array(e.length+1).fill(".");return t[0]="",t[t.length-1]="",Al({queryId:sa(),rawNode:Dr.create(t,e.map(uo.create))})},lit(e){return Al({queryId:sa(),rawNode:Dr.createWithChild(sc.createImmediate(e))})},literal(e){return this.lit(e)},raw(e){return Al({queryId:sa(),rawNode:Dr.createWithSql(e)})},join(e,t=Bm`, `){const n=new Array(Math.max(2*e.length-1,0)),r=t.toOperationNode();for(let o=0;o0}async transformResultRows(t){return await this.pluginRunner.transformResultRows(t)}async executeQueries(...t){return Promise.all(t.map(async n=>await this.kysely.executeQuery(n)))}async executeQuery(t){return(await this.executeQueries(t))[0]}getCompiled(...t){return t.map(n=>"compile"in n?n.compile():n)}async withTransformedRows(t,n){return await Promise.all(t.map(async r=>{const o=n??"rows",{[o]:i,...s}=r;return{...s,rows:await this.transformResultRows(i)}}))}validateFieldSpecType(t){if(!nM.includes(t))throw new Error(`Invalid field type "${t}". Allowed types are: ${nM.join(", ")}`);return!0}toDriver(t,n){return t}fromDriver(t,n){return t}async close(){}}class Fce extends Br{name="UnableToConnectException";code=Qt.INTERNAL_SERVER_ERROR}class ua extends Br{name="InvalidSearchParamsException";code=Qt.UNPROCESSABLE_ENTITY}class zce extends Br{name="TransformRetrieveFailedException";code=Qt.UNPROCESSABLE_ENTITY}class fo extends Br{name="TransformPersistFailedException";code=Qt.UNPROCESSABLE_ENTITY;static invalidType(t,n,r){const o=typeof r=="object"?JSON.stringify(r):r,i=`Property "${t}" must be of type "${n}", "${o}" of type "${typeof r}" given.`;return new fo(i)}static required(t){return new fo(`Property "${t}" is required`)}}class Bce extends Br{constructor(t,n,r){console.error("InvalidFieldConfigException",{given:n,error:r.first()}),super(`Invalid Field config given for field "${t.name}": ${r.firstToString()}`),this.given=n}name="InvalidFieldConfigException";code=Qt.BAD_REQUEST}class Vce extends Br{name="EntityNotDefinedException";code=Qt.BAD_REQUEST;constructor(t){t?super(`Entity "${typeof t!="string"?t.name:t}" not defined`):super("Cannot find an entity that is undefined")}}class Uce extends Ur{static slug="mutator-insert-before";validate(t){const{entity:n}=this.params;if(!n.isValidData(t,"create"))throw rt.warn("MutatorInsertBefore.validate: invalid",{entity:n.name,data:t}),new lw("EntityData","invalid");return this.clone({entity:n,data:t})}}class Hce extends Ur{static slug="mutator-insert-after"}class qce extends Ur{static slug="mutator-update-before";validate(t){const{entity:n,entityId:r}=this.params;if(!n.isValidData(t,"update"))throw rt.warn("MutatorUpdateBefore.validate: invalid",{entity:n.name,entityId:r,data:t}),new lw("EntityData","invalid");return this.clone({entityId:r,entity:n,data:t})}}class Wce extends Ur{static slug="mutator-update-after"}class Gce extends Ur{static slug="mutator-delete-before"}class z7 extends Ur{static slug="mutator-delete-after"}const wv={MutatorInsertBefore:Uce,MutatorInsertAfter:Hce,MutatorUpdateBefore:qce,MutatorUpdateAfter:Wce,MutatorDeleteBefore:Gce,MutatorDeleteAfter:z7};class Jce extends Ur{static slug="repository-find-one-before"}class Yce extends Ur{static slug="repository-find-one-after"}class Kce extends Ur{static slug="repository-find-many-before";static another="one"}class Xce extends Ur{static slug="repository-find-many-after"}const B7={RepositoryFindOneBefore:Jce,RepositoryFindOneAfter:Yce,RepositoryFindManyBefore:Kce,RepositoryFindManyAfter:Xce};class V7{_relations=[];constructor(t){this._relations=t}get all(){return this._relations}exists(t){return this._relations.some(n=>n.source.entity.name===t.source.entity.name&&n.target.entity.name===t.target.entity.name&&n.type===t.type)}relationsOf(t){return this._relations.filter(n=>n.visibleFrom("source")&&n.source.entity.name===t.name||n.visibleFrom("target")&&n.target.entity.name===t.name)}sourceRelationsOf(t){return this._relations.filter(n=>n.source.entity.name===t.name)}targetRelationsOf(t){return this._relations.filter(n=>n.visibleFrom("target")&&n.target.entity.name===t.name)}listableRelationsOf(t){return this.relationsOf(t).filter(n=>n.isListableFor(t))}relationOf(t,n){return this.relationsOf(t).find(r=>r.target.entity.name===t.name&&r.source.reference===n||r.source.entity.name===t.name&&r.target.reference===n)}hasRelations(t){return this.relationsOf(t).length>0}relatedEntitiesOf(t){return this.relationsOf(t).map(n=>n.other(t).entity)}relationReferencesOf(t){return this.relationsOf(t).map(n=>n.other(t).reference)}}const Qce=["create","read","update","delete"],Zce=["create","read","update","delete","form","table","submit"],oM=!0,iM=!1,rs=Ve({label:le(),description:le(),required:at({default:!1}),fillable:Rt([at({title:"Boolean"}),un(le({enum:Qce}),{title:"Context",uniqueItems:!0})]),hidden:Rt([at({title:"Boolean"}),un(le({enum:Zce}),{title:"Context",uniqueItems:!0})]),virtual:at(),default_value:Xi()}).partial();let os=class{_required;_type;name;type="field";config;constructor(t,n){this.name=t,this._type,this._required;try{this.config=Cn(this.getSchema(),n||{})}catch(r){throw r instanceof yh?new Bce(this,n,r):r}}getType(){return this.type}schema(){return Object.freeze({name:this.name,type:"text",nullable:!0,dflt:void 0})}hasDefault(){return this.config.default_value!==void 0}getDefault(){return this.config?.default_value}isFillable(t){return Array.isArray(this.config.fillable)?t?this.config.fillable.includes(t):oM:this.config.fillable??oM}isHidden(t){return Array.isArray(this.config.hidden)?t?this.config.hidden.includes(t):iM:this.config.hidden??iM}isRequired(){return this.config?.required??!1}isVirtual(){return this.config.virtual??!1}getLabel(t){return this.config.label?this.config.label:t?.fallback!==!1?$f(this.name):void 0}getDescription(){return this.config.description}getValue(t,n){return t}getHtmlConfig(){return{element:"input",props:{type:"text"}}}isValid(t,n){return typeof t<"u"?this.isFillable(n):n==="create"?!this.isRequired():!0}transformRetrieve(t){return t}async transformPersist(t,n,r){if(this.nullish(t)){if(this.isRequired()&&!this.hasDefault())throw fo.required(this.name);return this.getDefault()}return t}toSchemaWrapIfRequired(t){return this.isRequired()?t:t.optional()}nullish(t){return t==null}toJsonSchema(){return this.toSchemaWrapIfRequired(Xi())}toType(){return{required:this.isRequired(),comment:this.getDescription(),type:"any"}}toJSON(){return{type:this.type,config:this.config}}};const U7=Ve({default_value:at(),...mo(rs.properties,["default_value"])}).partial();class H7 extends os{type="boolean";getSchema(){return U7}getValue(t,n){switch(n){case"table":return t?"Yes":"No";default:return t}}schema(){return Object.freeze({...super.schema(),type:"boolean"})}getHtmlConfig(){return{...super.getHtmlConfig(),element:"boolean"}}transformRetrieve(t){return typeof t>"u"||t===null?this.isRequired()?!1:this.hasDefault()?this.getDefault():null:typeof t=="string"?t==="1":!!t}async transformPersist(t,n,r){const o=await super.transformPersist(t,n,r);if(this.nullish(o))return this.isRequired()?!!this.config.default_value:void 0;if(typeof o=="number")return o!==0;if(typeof o!="boolean")throw fo.invalidType(this.name,"boolean",o);return o}toJsonSchema(){return this.toSchemaWrapIfRequired(at({default:this.getDefault()}))}toType(){return{...super.toType(),type:"boolean"}}}const q7=Ve({type:le({enum:["date","datetime","week"],default:"date"}),timezone:le(),min_date:le(),max_date:le(),...rs.properties}).partial();class $_ extends os{type="date";getSchema(){return q7}schema(){return Object.freeze({...super.schema(),type:this.config.type==="datetime"?"datetime":"date"})}getHtmlConfig(){const t=this.config.type==="datetime"?"datetime-local":this.config.type;return{...super.getHtmlConfig(),element:"date",props:{type:t}}}parseDateFromString(t){if(this.config.type==="week"&&t.includes("-W")){const[n,r]=t.split("-W").map(o=>Number.parseInt(o,10));return hv().year(n).week(r).toDate()}return new Date(t)}getValue(t,n){if(t===null||!t)return;const r=this.parseDateFromString(t);if(n==="submit")try{return r.toISOString()}catch{return}if(this.config.type==="week")try{return`${r.getFullYear()}-W${hv(r).week()}`}catch(o){rt.warn("DateField.getValue:week error",t,String(o));return}try{const i=new Date().getTimezoneOffset(),s=new Date(r.getTime()-i*6e4);return this.formatDate(s)}catch(o){rt.warn("DateField.getValue error",this.config.type,t,String(o));return}}formatDate(t){switch(this.config.type){case"datetime":return t.toISOString().split(".")[0].replace("T"," ");default:return t.toISOString().split("T")[0]}}transformRetrieve(t){const n=super.transformRetrieve(t);if(n===null)return null;try{return new Date(n)}catch{return null}}async transformPersist(t,n,r){const o=await super.transformPersist(t,n,r);if(this.nullish(o))return o;switch(this.config.type){case"date":case"week":return new Date(o).toISOString().split("T")[0];default:return new Date(o).toISOString()}}toJsonSchema(){return this.toSchemaWrapIfRequired(le({default:this.getDefault()}))}toType(){return{...super.toType(),type:"Date | string"}}}const W7=Ve({default_value:le(),options:Rt([ke({type:ui("strings"),values:un(le())}),ke({type:ui("objects"),values:un(ke({label:le(),value:le()}))})]),...mo(rs.properties,["default_value"])}).partial();class G7 extends os{type="enum";constructor(t,n){if(super(t,n),this.config.default_value&&!this.isValidValue(this.config.default_value))throw new Error(`Default value "${this.config.default_value}" is not a valid option`)}getSchema(){return W7}getOptions(){const t=this.config?.options??{type:"strings",values:[]};return t.type==="strings"?t.values?.map(n=>({label:n,value:n})):t?.values}isValidValue(t){return this.getOptions().map(r=>r.value).includes(t)}getValue(t,n){if(!this.isValidValue(t))return this.hasDefault()?this.getDefault():null;switch(n){case"table":return this.getOptions().find(r=>r.value===t)?.label??t}return t}transformRetrieve(t){const n=super.transformRetrieve(t);return n===null&&this.hasDefault()?this.getDefault():this.isValidValue(n)?n:this.hasDefault()?this.getDefault():null}async transformPersist(t,n,r){const o=await super.transformPersist(t,n,r);if(this.nullish(o))return o;if(!this.isValidValue(o))throw new fo(`Field "${this.name}" must be one of the following values: ${this.getOptions().map(i=>i.value).join(", ")}`);return o}toJsonSchema(){const n=(this.config?.options??{values:[]}).values?.map(r=>typeof r=="string"?r:r.value)??[];return this.toSchemaWrapIfRequired(le({enum:n,default:this.getDefault()}))}toType(){const t=this.getOptions().map(({value:n})=>typeof n=="string"?`"${n}"`:n);return{...super.toType(),type:t.length>0?t.join(" | "):"string"}}}const J7=Ve({default_value:Xi(),...mo(rs.properties,["default_value"])}).partial();class Y7 extends os{type="json";getSchema(){return J7}transformRetrieve(t){const n=super.transformRetrieve(t);return n===null&&this.hasDefault()?this.getDefault():this.isSerialized(n)?JSON.parse(n):n}isSerializable(t){try{const n=JSON.stringify(t);if(n===JSON.stringify(JSON.parse(n)))return!0}catch{}return!1}isSerialized(t){try{if(typeof t=="string")return t===JSON.stringify(JSON.parse(t))}catch{}return!1}isValid(t){return this.isSerializable(t)}getValue(t,n){switch(n){case"table":return t===null?null:JSON.stringify(t);case"submit":if(!t||typeof t=="string"&&t.length===0)return null;if(typeof t=="object")return t;try{return JSON.parse(t)}catch{return t}}return t}async transformPersist(t,n,r){const o=await super.transformPersist(t,n,r);if(this.nullish(o))return o;if(!this.isSerializable(o))throw new fo(`Field "${this.name}" must be serializable to JSON.`);return this.isSerialized(o)?o:JSON.stringify(o)}toType(){return{...super.toType(),type:"any"}}}function fm(e,t){const n=typeof e;if(n!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;const r=e.length;if(r!==t.length)return!1;for(let o=0;o1?t[s.href]=e:(s.hash="",r===""?n=s:hu(e,t,n))}}else if(e!==!0&&e!==!1)return t;const o=n.href+(r?"#"+r:"");if(t[o]!==void 0)throw new Error(`Duplicate schema URI "${o}".`);if(t[o]=e,e===!0||e===!1)return t;if(e.__absolute_uri__===void 0&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:o}),e.$ref&&e.__absolute_ref__===void 0){const i=new URL(e.$ref,n.href);i.hash=i.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:i.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){const i=new URL(e.$recursiveRef,n.href);i.hash=i.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:i.href})}if(e.$anchor){const i=new URL("#"+e.$anchor,n.href);t[i.href]=e}for(let i in e){if(rue[i])continue;const s=`${r}/${Ti(i)}`,a=e[i];if(Array.isArray(a)){if(tue[i]){const c=a.length;for(let u=0;u%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,due=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,fue=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,hue=/^(?:\/(?:[^~/]|~0|~1)*)*$/,pue=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,mue=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,gue=e=>{if(e[0]==='"')return!1;const[t,n,...r]=e.split("@");return!t||!n||r.length!==0||t.length>64||n.length>253||t[0]==="."||t.endsWith(".")||t.includes("..")||!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t)?!1:n.split(".").every(o=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(o))},yue=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,bue=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,vue=e=>e.length>1&&e.length<80&&(/^P\d+([.,]\d+)?W$/.test(e)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e));function ps(e){return e.test.bind(e)}const sM={date:K7,time:X7.bind(void 0,!1),"date-time":Sue,duration:vue,uri:_ue,"uri-reference":ps(cue),"uri-template":ps(uue),url:ps(due),email:gue,hostname:ps(lue),ipv4:ps(yue),ipv6:ps(bue),regex:Oue,uuid:ps(fue),"json-pointer":ps(hue),"json-pointer-uri-fragment":ps(pue),"relative-json-pointer":ps(mue)};function xue(e){return e%4===0&&(e%100!==0||e%400===0)}function K7(e){const t=e.match(iue);if(!t)return!1;const n=+t[1],r=+t[2],o=+t[3];return r>=1&&r<=12&&o>=1&&o<=(r==2&&xue(n)?29:sue[r])}function X7(e,t){const n=t.match(aue);if(!n)return!1;const r=+n[1],o=+n[2],i=+n[3],s=!!n[5];return(r<=23&&o<=59&&i<=59||r==23&&o==59&&i==60)&&(!e||s)}const wue=/t|\s/i;function Sue(e){const t=e.split(wue);return t.length==2&&K7(t[0])&&X7(!0,t[1])}const Eue=/\/|:/,Nue=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function _ue(e){return Eue.test(e)&&Nue.test(e)}const Cue=/[^\\]\\Z/;function Oue(e){if(Cue.test(e))return!1;try{return new RegExp(e,"u"),!0}catch{return!1}}function jue(e){let t=0,n=e.length,r=0,o;for(;r=55296&&o<=56319&&rfm(e,ne))||G.push({instanceLocation:s,keyword:"enum",keywordLocation:`${a}/enum`,error:`Instance does not match any of ${JSON.stringify(S)}.`}):S.some(ne=>e===ne)||G.push({instanceLocation:s,keyword:"enum",keywordLocation:`${a}/enum`,error:`Instance does not match any of ${JSON.stringify(S)}.`})),C!==void 0){const ne=`${a}/not`;bn(e,C,n,r,o,i,s,ne).valid&&G.push({instanceLocation:s,keyword:"not",keywordLocation:ne,error:'Instance matched "not" schema.'})}let re=[];if(_!==void 0){const ne=`${a}/anyOf`,ce=G.length;let te=!1;for(let Z=0;Z<_.length;Z++){const de=_[Z],Te=Object.create(c),$e=bn(e,de,n,r,o,y===!0?i:null,s,`${ne}/${Z}`,Te);G.push(...$e.errors),te=te||$e.valid,$e.valid&&re.push(Te)}te?G.length=ce:G.splice(ce,0,{instanceLocation:s,keyword:"anyOf",keywordLocation:ne,error:"Instance does not match any subschemas."})}if(j!==void 0){const ne=`${a}/allOf`,ce=G.length;let te=!0;for(let Z=0;Z{const Te=Object.create(c),$e=bn(e,Z,n,r,o,y===!0?i:null,s,`${ne}/${de}`,Te);return G.push(...$e.errors),$e.valid&&re.push(Te),$e.valid}).length;te===1?G.length=ce:G.splice(ce,0,{instanceLocation:s,keyword:"oneOf",keywordLocation:ne,error:`Instance does not match exactly one subschema (${te} matches).`})}if((f==="object"||f==="array")&&Object.assign(c,...re),T!==void 0){const ne=`${a}/if`;if(bn(e,T,n,r,o,i,s,ne,c).valid){if(k!==void 0){const te=bn(e,k,n,r,o,i,s,`${a}/then`,c);te.valid||G.push({instanceLocation:s,keyword:"if",keywordLocation:ne,error:'Instance does not match "then" schema.'},...te.errors)}}else if(R!==void 0){const te=bn(e,R,n,r,o,i,s,`${a}/else`,c);te.valid||G.push({instanceLocation:s,keyword:"if",keywordLocation:ne,error:'Instance does not match "else" schema.'},...te.errors)}}if(f==="object"){if(E!==void 0)for(const Z of E)Z in e||G.push({instanceLocation:s,keyword:"required",keywordLocation:`${a}/required`,error:`Instance does not have required property "${Z}".`});const ne=Object.keys(e);if(M!==void 0&&ne.lengthz&&G.push({instanceLocation:s,keyword:"maxProperties",keywordLocation:`${a}/maxProperties`,error:`Instance does not have at least ${z} properties.`}),$!==void 0){const Z=`${a}/propertyNames`;for(const de in e){const Te=`${s}/${Ti(de)}`,$e=bn(de,$,n,r,o,i,Te,Z);$e.valid||G.push({instanceLocation:s,keyword:"propertyNames",keywordLocation:Z,error:`Property name "${de}" does not match schema.`},...$e.errors)}}if(L!==void 0){const Z=`${a}/dependantRequired`;for(const de in L)if(de in e){const Te=L[de];for(const $e of Te)$e in e||G.push({instanceLocation:s,keyword:"dependentRequired",keywordLocation:Z,error:`Instance has "${de}" but does not have "${$e}".`})}}if(P!==void 0)for(const Z in P){const de=`${a}/dependentSchemas`;if(Z in e){const Te=bn(e,P[Z],n,r,o,i,s,`${de}/${Ti(Z)}`,c);Te.valid||G.push({instanceLocation:s,keyword:"dependentSchemas",keywordLocation:de,error:`Instance has "${Z}" but does not match dependant schema.`},...Te.errors)}}if(q!==void 0){const Z=`${a}/dependencies`;for(const de in q)if(de in e){const Te=q[de];if(Array.isArray(Te))for(const $e of Te)$e in e||G.push({instanceLocation:s,keyword:"dependencies",keywordLocation:Z,error:`Instance has "${de}" but does not have "${$e}".`});else{const $e=bn(e,Te,n,r,o,i,s,`${Z}/${Ti(de)}`);$e.valid||G.push({instanceLocation:s,keyword:"dependencies",keywordLocation:Z,error:`Instance has "${de}" but does not match dependant schema.`},...$e.errors)}}}const ce=Object.create(null);let te=!1;if(H!==void 0){const Z=`${a}/properties`;for(const de in H){if(!(de in e))continue;const Te=`${s}/${Ti(de)}`,$e=bn(e[de],H[de],n,r,o,i,Te,`${Z}/${Ti(de)}`);if($e.valid)c[de]=ce[de]=!0;else if(te=o,G.push({instanceLocation:s,keyword:"properties",keywordLocation:Z,error:`Property "${de}" does not match schema.`},...$e.errors),te)break}}if(!te&&F!==void 0){const Z=`${a}/patternProperties`;for(const de in F){const Te=new RegExp(de,"u"),$e=F[de];for(const Ke in e){if(!Te.test(Ke))continue;const At=`${s}/${Ti(Ke)}`,yn=bn(e[Ke],$e,n,r,o,i,At,`${Z}/${Ti(de)}`);yn.valid?c[Ke]=ce[Ke]=!0:(te=o,G.push({instanceLocation:s,keyword:"patternProperties",keywordLocation:Z,error:`Property "${Ke}" matches pattern "${de}" but does not match associated schema.`},...yn.errors))}}}if(!te&&B!==void 0){const Z=`${a}/additionalProperties`;for(const de in e){if(ce[de])continue;const Te=`${s}/${Ti(de)}`,$e=bn(e[de],B,n,r,o,i,Te,Z);$e.valid?c[de]=!0:(te=o,G.push({instanceLocation:s,keyword:"additionalProperties",keywordLocation:Z,error:`Property "${de}" does not match additional properties schema.`},...$e.errors))}}else if(!te&&U!==void 0){const Z=`${a}/unevaluatedProperties`;for(const de in e)if(!c[de]){const Te=`${s}/${Ti(de)}`,$e=bn(e[de],U,n,r,o,i,Te,Z);$e.valid?c[de]=!0:G.push({instanceLocation:s,keyword:"unevaluatedProperties",keywordLocation:Z,error:`Property "${de}" does not match unevaluated properties schema.`},...$e.errors)}}}else if(f==="array"){se!==void 0&&e.length>se&&G.push({instanceLocation:s,keyword:"maxItems",keywordLocation:`${a}/maxItems`,error:`Array has too many items (${e.length} > ${se}).`}),ue!==void 0&&e.length=(ie||0)&&(G.length=de),ie===void 0&&pe===void 0&&Te===0?G.splice(de,0,{instanceLocation:s,keyword:"contains",keywordLocation:Z,error:"Array does not contain item matching schema."}):ie!==void 0&&Tepe&&G.push({instanceLocation:s,keyword:"maxContains",keywordLocation:`${a}/maxContains`,error:`Array may contain at most ${pe} items matching schema. ${Te} items were found.`})}if(!te&&K!==void 0){const Z=`${a}/unevaluatedItems`;for(ce;ce=je||e>je)&&G.push({instanceLocation:s,keyword:"maximum",keywordLocation:`${a}/maximum`,error:`${e} is greater than ${Ee?"or equal to ":""} ${je}.`})):(xe!==void 0&&eje&&G.push({instanceLocation:s,keyword:"maximum",keywordLocation:`${a}/maximum`,error:`${e} is greater than ${je}.`}),_e!==void 0&&e<=_e&&G.push({instanceLocation:s,keyword:"exclusiveMinimum",keywordLocation:`${a}/exclusiveMinimum`,error:`${e} is less than ${_e}.`}),Ee!==void 0&&e>=Ee&&G.push({instanceLocation:s,keyword:"exclusiveMaximum",keywordLocation:`${a}/exclusiveMaximum`,error:`${e} is greater than or equal to ${Ee}.`})),Re!==void 0){const ne=e%Re;Math.abs(0-ne)>=11920929e-14&&Math.abs(Re-ne)>=11920929e-14&&G.push({instanceLocation:s,keyword:"multipleOf",keywordLocation:`${a}/multipleOf`,error:`${e} is not a multiple of ${Re}.`})}}else if(f==="string"){const ne=Me===void 0&&ze===void 0?0:jue(e);Me!==void 0&&neze&&G.push({instanceLocation:s,keyword:"maxLength",keywordLocation:`${a}/maxLength`,error:`String is too long (${ne} > ${ze}).`}),ve!==void 0&&!new RegExp(ve,"u").test(e)&&G.push({instanceLocation:s,keyword:"pattern",keywordLocation:`${a}/pattern`,error:"String does not match pattern."}),V!==void 0&&sM[V]&&!sM[V](e)&&G.push({instanceLocation:s,keyword:"format",keywordLocation:`${a}/format`,error:`String does not match format "${V}".`})}return{valid:G.length===0,errors:G}}class Aue{schema;draft;shortCircuit;lookup;constructor(t,n="2019-09",r=!0){this.schema=t,this.draft=n,this.shortCircuit=r,this.lookup=hu(t)}validate(t){return bn(t,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(t,n){n&&(t={...t,$id:n}),hu(t,this.lookup)}}const Q7=Ve({schema:Xi({type:"object"}),ui_schema:Xi({type:"object"}),default_from_schema:at(),...rs.properties}).partial();class Z7 extends os{type="jsonschema";validator;constructor(t,n){super(t,n);const r=this.getJsonSchema();this.validator=new Aue(typeof r=="object"?JSON.parse(JSON.stringify(r)):{})}getSchema(){return Q7}getJsonSchema(){return this.config?.schema}getJsonUiSchema(){return this.config.ui_schema??{}}isValid(t,n="update"){return super.isValid(t,n)?!this.isRequired()&&(!t||typeof t!="object")?!0:this.validator.validate(t).valid:!1}getValue(t,n){switch(n){case"form":return t===null?"":t;case"table":return t===null?null:JSON.stringify(t)}return t}transformRetrieve(t){const n=super.transformRetrieve(t);if(n===null){if(this.config.default_from_schema)try{return Pi(this.getJsonSchema()).template()}catch{return null}else if(this.hasDefault())return this.getDefault()}return n}async transformPersist(t,n,r){const o=await super.transformPersist(t,n,r);if(this.nullish(o))return o;if(!this.isValid(o))throw new fo(this.name,o);return!o||typeof o!="object"?this.getDefault():JSON.stringify(o)}toJsonSchema(){const t=this.getJsonSchema()??{type:"object"};return this.toSchemaWrapIfRequired(Pi({default:this.getDefault(),...t}))}toType(){return{...super.toType(),import:[{package:"json-schema-to-ts",name:"FromSchema"}],type:`FromSchema<${y_(this.getJsonSchema(),2,1)}>`}}}const eF=Ve({default_value:bt(),minimum:bt(),maximum:bt(),exclusiveMinimum:bt(),exclusiveMaximum:bt(),multipleOf:bt(),...mo(rs.properties,["default_value"])}).partial();class tF extends os{type="number";getSchema(){return eF}getHtmlConfig(){return{element:"input",props:{type:"number",pattern:"d*",inputMode:"numeric"}}}schema(){return Object.freeze({...super.schema(),type:"integer"})}getValue(t,n){if(typeof t>"u"||t===null)return null;switch(n){case"submit":return Number.parseInt(t,10)}return t}async transformPersist(t,n,r){const o=await super.transformPersist(t,n,r);if(!this.nullish(o)&&typeof o!="number")throw fo.invalidType(this.name,"number",o);if(this.config.maximum&&o>this.config.maximum)throw new fo(`Field "${this.name}" cannot be greater than ${this.config.maximum}`);if(this.config.minimum&&o`}}}const oF=Ve({default_value:le(),minLength:bt(),maxLength:bt(),pattern:le(),html_config:QL({element:le(),props:Ou(Rt([le({title:"String"}),bt({title:"Number"})]))}),...mo(rs.properties,["default_value"])}).partial();class Sv extends os{type="text";getSchema(){return oF}getHtmlConfig(){return this.config.html_config?this.config.html_config:super.getHtmlConfig()}transformRetrieve(t){const n=super.transformRetrieve(t);return this.config.maxLength?n.substring(0,this.config.maxLength):this.isRequired()?n?n.toString():"":n}async transformPersist(t,n,r){let o=await super.transformPersist(t,n,r);if(this.nullish(o))return o;if(o!==null&&typeof o!="string"&&(o=String(o)),this.config.maxLength&&o?.length>this.config.maxLength)throw new fo(`Field "${this.name}" must be at most ${this.config.maxLength} character(s)`);if(this.config.minLength&&o?.length!(i instanceof os)))throw new Error("All fields must be instances of Field");o||(this.name=[r?"idx_unique":"idx",t.name,...n.map(i=>i.name)].join("_"))}toJSON(){return{entity:this.entity.name,fields:this.fields.map(t=>t.name),unique:this.unique}}}var sF=typeof global=="object"&&global&&global.Object===Object&&global,Tue=typeof self=="object"&&self&&self.Object===Object&&self,is=sF||Tue||Function("return this")(),pi=is.Symbol,aF=Object.prototype,$ue=aF.hasOwnProperty,Rue=aF.toString,Dp=pi?pi.toStringTag:void 0;function kue(e){var t=$ue.call(e,Dp),n=e[Dp];try{e[Dp]=void 0;var r=!0}catch{}var o=Rue.call(e);return r&&(t?e[Dp]=n:delete e[Dp]),o}var Mue=Object.prototype,Pue=Mue.toString;function Due(e){return Pue.call(e)}var Iue="[object Null]",Lue="[object Undefined]",aM=pi?pi.toStringTag:void 0;function Vu(e){return e==null?e===void 0?Lue:Iue:aM&&aM in Object(e)?kue(e):Due(e)}function js(e){return e!=null&&typeof e=="object"}var Fue="[object Symbol]";function mw(e){return typeof e=="symbol"||js(e)&&Vu(e)==Fue}function lF(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n0){if(++t>=dde)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function mde(e){return function(){return e}}var Ev=function(){try{var e=Hu(Object,"defineProperty");return e({},"",{}),e}catch{}}(),gde=Ev?function(e,t){return Ev(e,"toString",{configurable:!0,enumerable:!1,value:mde(t),writable:!0})}:Xj,fF=pde(gde);function hF(e,t){for(var n=-1,r=e==null?0:e.length;++n-1&&e%1==0&&e-1&&e%1==0&&e<=Sde}function bw(e){return e!=null&&eA(e.length)&&!gw(e)}function Ede(e,t,n){if(!Er(n))return!1;var r=typeof t;return(r=="number"?bw(n)&&yw(t,n.length):r=="string"&&t in n)?zg(n[t],e):!1}function Nde(e){return wde(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,s&&Ede(n[0],n[1],s)&&(i=o<3?void 0:i,o=1),t=Object(t);++r-1}function Mfe(e,t){var n=this.__data__,r=xw(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function za(e){var t=-1,n=e==null?0:e.length;for(this.clear();++to?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++ra))return!1;var u=i.get(e),f=i.get(t);if(u&&f)return u==t&&f==e;var p=-1,g=!0,y=n&Ipe?new _v:void 0;for(i.set(e,t),i.set(t,e);++p=t||k<0||p&&R>=i}function E(){var T=N2();if(S(T))return C(T);a=setTimeout(E,x(T))}function C(T){return a=void 0,g&&r?y(T):(r=o=void 0,s)}function _(){a!==void 0&&clearTimeout(a),u=0,r=c=o=a=void 0}function j(){return a===void 0?s:C(N2())}function A(){var T=N2(),k=S(T);if(r=arguments,o=this,c=T,k){if(a===void 0)return v(c);if(p)return clearTimeout(a),a=setTimeout(E,t),y(c)}return a===void 0&&(a=setTimeout(E,t)),s}return A.cancel=_,A.flush=j,A}function I_(e,t,n){(n!==void 0&&!zg(e[t],n)||n===void 0&&!(t in e))&&Qj(e,t,n)}function Cme(e){return js(e)&&bw(e)}function L_(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Ome(e){return vh(e,Vg(e))}function jme(e,t,n,r,o,i,s){var a=L_(e,n),c=L_(t,n),u=s.get(c);if(u){I_(e,n,u);return}var f=i?i(a,c,n+"",e,t,s):void 0,p=f===void 0;if(p){var g=go(c),y=!g&&Mf(c),v=!g&&!y&&vw(c);f=c,g||y||v?go(a)?f=a:Cme(a)?f=dF(a):y?(p=!1,f=NF(c,!0)):v?(p=!1,f=AF(c,!0)):f=[]:SF(c)||Um(c)?(f=a,Um(a)?f=Ome(a):(!Er(a)||gw(a))&&(f=TF(c))):p=!1}p&&(s.set(c,f),o(f,c,r,i,s),s.delete(c)),I_(e,n,f)}function zF(e,t,n,r,o){e!==t&&FF(t,function(i,s){if(o||(o=new Gi),Er(i))jme(e,t,s,n,zF,r,o);else{var a=r?r(L_(e,s),i,s+"",e,t,o):void 0;a===void 0&&(a=i),I_(e,s,a)}},Vg)}var Ame=Nde(function(e,t,n,r){zF(e,t,n,r)});function Tme(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var $me=Object.prototype,Rme=$me.hasOwnProperty;function kme(e,t){return e!=null&&Rme.call(e,t)}function _2(e,t){return e!=null&&IF(e,t,kme)}function Mme(e,t){return t.length<2?e:Sw(e,nhe(t,0,-1))}function BF(e,t){return _w(e,t)}function Pme(e,t){return t=xh(t,e),e=Mme(e,t),e==null||delete e[wh(Tme(t))]}function Dme(e){return SF(e)?void 0:e}var Ime=1,Lme=2,Fme=4,Cv=xF(function(e,t){var n={};if(e==null)return n;var r=!1;t=lF(t,function(i){return i=xh(i,e),r||(r=i.length>1),i}),vh(e,jF(e),n),r&&(n=pm(n,Ime|Lme|Fme,Dme));for(var o=t.length;o--;)Pme(n,t[o]);return n});function VF(e,t,n,r){if(!Er(e))return e;t=xh(t,e);for(var o=-1,i=t.length,s=i-1,a=e;a!=null&&++oi.table===o.name)});return r}getIntrospectionFromEntity(t){const n=t.getFields(!1),r=this.em.getIndicesOf(t);return{name:t.name,isView:!1,columns:n.map(o=>({name:o.name,dataType:"TEXT",isNullable:!0,isAutoIncrementing:o instanceof Vm,hasDefaultValue:!1,comment:void 0})),indices:r.map(o=>({name:o.name,table:t.name,isUnique:o.unique,columns:o.fields.map(i=>({name:i.name,order:0}))}))}}async getDiff(){const t=await this.introspect(),n=this.em.entities.map(i=>this.getIntrospectionFromEntity(i)),r=[],o=i=>i.name;t.filter(i=>/bknd/.test(i.name)||i.isView?!1:!n.map(s=>s.name).includes(i.name)).forEach(i=>{r.push({name:i.name,isDrop:!0,isNew:!1,columns:{add:[],drop:[],change:[]},indices:{add:[],drop:[]}})});for(const i of n){const s=t.find(a=>a.name===i.name);if(!s)r.push({name:i.name,isNew:!0,columns:{add:i.columns.map(o),drop:[],change:[]},indices:{add:i.indices.map(o),drop:[]}});else{const a=i.columns.filter(y=>!s.columns.map(o).includes(y.name)),c=s.columns.filter(y=>!i.columns.map(o).includes(y.name)),u=[];for(const y of i.columns){const v=s.columns.find(S=>S.name===y.name),x=[];for(const[S,E]of Object.entries(y))v&&v[S]!==E&&x.push({attribute:S,prev:v[S],next:E});Object.keys(x).length>0&&u.push({name:y.name,changes:x})}const f=i.indices.filter(y=>!s.indices.map(v=>v.name).includes(y.name)),p=s.indices.filter(y=>!i.indices.map(v=>v.name).includes(y.name));[a,c,f,p].some(y=>y.length>0)&&r.push({name:i.name,isNew:!1,columns:{add:a.map(o),drop:c.map(o),change:[]},indices:{add:f.map(o),drop:p.map(o)}})}}return r}collectFieldSchemas(t,n){const r=[];if(n.length===0)return r;for(const o of n){const s=this.em.entity(t).getField(o).schema();s&&r.push(this.em.connection.getFieldSchema(s))}return r}async sync(t={force:!1,drop:!1}){const n=await this.getDiff(),r=[],o=this.em.connection.kysely.schema,i=[];for(const s of n){const a=this.collectFieldSchemas(s.name,s.columns.add),c=s.columns.drop,u=s.indices.drop;if(s.isDrop)t.drop&&i.push(o.dropTable(s.name));else if(s.isNew){let f=o.createTable(s.name);for(const p of a)f=f.addColumn(...p);i.push(f)}else{if(a.length>0)for(const f of a)i.push(o.alterTable(s.name).addColumn(...f));if(t.drop&&c.length>0)for(const f of c)i.push(o.alterTable(s.name).dropColumn(f))}for(const f of s.indices.add){const g=this.em.getIndicesOf(s.name).find(v=>v.name===f);let y=o.createIndex(f).on(s.name).columns(g.fields.map(v=>v.name));g.unique&&(y=y.unique()),i.push(y)}if(t.drop)for(const f of u)i.push(o.dropIndex(f))}if(i.length>0){r.push(...i.map(s=>{const{sql:a,parameters:c}=s.compile();return{sql:a,parameters:c}})),rt.debug("[SchemaManager]",`${i.length} statements +${r.map(s=>s.sql).join(`; +`)}`);try{await this.em.connection.executeQueries(...i)}catch(s){throw new Error(`Failed to execute batch: ${String(s)}`)}}return r}}const uA=Ve({name:le(),name_singular:le(),description:le(),sort_field:le({default:nF.data.default_primary_field}),sort_dir:le({enum:["asc","desc"],default:"asc"}),primary_format:le({enum:Kj})},{default:{}}).partial(),HF=["regular","system","generated"],IM=Symbol.for("bknd:entity");class Kl{#e;#t;name;fields;config;data;type="regular";constructor(t,n,r,o){if(typeof t!="string"||t.length===0)throw new Error("Entity name must be a non-empty string");this.name=t,this.config=Cn(uA,r||{});const i=n?.filter(s=>s instanceof Vm).length??0;if(i>1)throw new Error(`Entity "${t}" has more than one primary field`);this.fields=i===1?[]:[new Vm(void 0,{format:this.config.primary_format})],n&&n.forEach(s=>this.addField(s)),o&&(this.type=o),this[IM]=!0}static isEntity(t){return t?t[IM]===!0:!1}static create(t){return new Kl(t.name,t.fields,t.config,t.type)}getType(){return this.type}getSelect(t,n){return this.getFields().filter(r=>!r.isHidden(n??"read")).map(r=>t?`${t}.${r.name} as ${r.name}`:r.name)}getDefaultSort(){return{by:this.config.sort_field??"id",dir:this.config.sort_dir??"asc"}}getAliasedSelectFrom(t,n,r){const o=n??this.name;return this.getFields().filter(i=>!i.isVirtual()&&!i.isHidden(r??"read")&&t.includes(i.name)).map(i=>o?`${o}.${i.name} as ${i.name}`:i.name)}getFillableFields(t,n){return this.getFields(n).filter(r=>r.isFillable(t))}getRequiredFields(){return this.getFields().filter(t=>t.isRequired())}getDefaultObject(){return this.getFields().reduce((t,n)=>(n.hasDefault()&&(t[n.name]=n.getDefault()),t),{})}getField(t){return this.fields.find(n=>n.name===t)}__replaceField(t,n){const r=this.fields.findIndex(o=>o.name===t);if(r===-1)throw new Error(`Field "${t}" not found on entity "${this.name}"`);this.fields[r]=n}getPrimaryField(){return this.fields[0]}id(){return this.getPrimaryField()}get label(){return this.config.name??$f(this.name)}field(t){return this.getField(t)}hasField(t){const n=typeof t=="string"?t:t.name;return this.fields.findIndex(r=>r.name===n)!==-1}getFields(t=!1){return t?this.fields:this.fields.filter(n=>!n.isVirtual())}addField(t){const n=this.getField(t.name);if(n){if(JSON.stringify(n)===JSON.stringify(t)){rt.warn(`Field "${t.name}" already exists on entity "${this.name}", but it's the same, so skipping.`);return}throw new Error(`Field "${t.name}" already exists on entity "${this.name}"`)}this.fields.push(t)}__setData(t){this.data=t}isValidData(t,n,r){if(typeof t!="object"&&r?.explain)throw new Error(`Entity "${this.name}" data must be an object`);const o=this.getFillableFields(n,!1);if(r?.ignoreUnknown!==!0){const i=o.map(c=>c.name),a=Object.keys(t).filter(c=>!i.includes(c));if(a.length>0&&r?.explain)throw new Error(`Entity "${this.name}" data must only contain known keys, unknown: "${a}"`)}for(const i of o)if(!i.isValid(t?.[i.name],n)){if(rt.warn("invalid data given for",this.name,n,i.name,t[i.name]),r?.explain)throw new Error(`Field "${i.name}" has invalid data: "${t[i.name]}"`);return!1}return!0}toSchema(t){let n;switch(t?.context){case"create":case"update":n=this.getFillableFields(t.context);break;default:n=this.getFields(!0)}const r=Object.fromEntries(n.map(i=>[i.name,i])),o={type:"object",additionalProperties:!1,properties:Vt(r,i=>{const s=i.isFillable(t?.context);return{title:i.config.label,$comment:i.config.description,$field:i.type,readOnly:s?void 0:!0,...i.toJsonSchema()}})};return t?.clean?JSON.parse(JSON.stringify(o)):o}toTypes(){return{name:this.name,type:this.type,comment:this.config.description,fields:Object.fromEntries(this.getFields().map(t=>[t.name,t.toType()]))}}toJSON(){return{type:this.type,fields:Object.fromEntries(this.fields.map(t=>[t.name,t.toJSON()])),config:this.config}}}function Ai(e){if(typeof e!="string")throw new Error(`Invalid key: ${e}`);return e}const Hme=[hn("$eq",e=>$i(e),(e,t,n)=>n(Ai(t),"=",e)),hn("$ne",e=>$i(e),(e,t,n)=>n(Ai(t),"!=",e)),hn("$gt",e=>$i(e),(e,t,n)=>n(Ai(t),">",e)),hn("$gte",e=>$i(e),(e,t,n)=>n(Ai(t),">=",e)),hn("$lt",e=>$i(e),(e,t,n)=>n(Ai(t),"<",e)),hn("$lte",e=>$i(e),(e,t,n)=>n(Ai(t),"<=",e)),hn("$isnull",e=>sle(e),(e,t,n)=>n(Ai(t),e?"is":"is not",null)),hn("$in",e=>Array.isArray(e),(e,t,n)=>n(Ai(t),"in",e)),hn("$notin",e=>Array.isArray(e),(e,t,n)=>n(Ai(t),"not in",e)),hn("$between",e=>Array.isArray(e)&&e.length===2,(e,t,n)=>n.between(Ai(t),e[0],e[1])),hn("$like",e=>$i(e),(e,t,n)=>n(Ai(t),"like",String(e).replace(/\*/g,"%")))],C2=x7(Hme);class Gl{static addClause(t,n){return Object.keys(n).length===0?t:t.where(r=>{const o=C2.build(n,{value_is_kv:!0,exp_ctx:r,convert:!0});return o.$or.length>0&&o.$and.length>0?r.and(o.$and).or(r.and(o.$or)):o.$or.length>0?r.or(o.$or):r.and(o.$and)})}static convert(t){return C2.convert(t)}static getPropertyNames(t){const{keys:n}=C2.build(t,{value_is_kv:!0,exp_ctx:()=>null,convert:!0});return Array.from(n)}}class Df{config;source;target;directions=["source","target"];static schema=Ve({mappedBy:le().optional(),inversedBy:le().optional(),required:at().optional()});constructor(t,n,r={}){this.source=t,this.target=n;const o=this.constructor.schema;this.config=Cn(o,r)}getReferenceQuery(t,n,r){return{}}helper(t){return new Wme(this,t)}other(t){const n=typeof t=="string"?t:t.name;if(this.source.entity.name===this.target.entity.name)return this.source.cardinality===1?this.target:this.source;if(this.source.entity.name===n)return this.target;if(this.target.entity.name===n)return this.source;throw new Error(`Entity "${n}" is not part of the relation "${this.source.entity.name} <-> ${this.target.entity.name}"`)}self(t){return this.other(t).entity.name===this.source.entity.name?this.target:this.source}ref(t){return this.source.reference===t?this.source:this.target}otherRef(t){return this.source.reference===t?this.target:this.source}visibleFrom(t){return this.directions.includes(t)}hydrate(t,n,r){const o=typeof t=="string"?t:t.name,i=this.ref(o),s=r.hydrate(i.entity.name,n);if(i.cardinality===1){if(Array.isArray(s)&&s.length>1)throw new Error(`Failed to hydrate "${i.entity.name}" with value: ${JSON.stringify(n)} (cardinality: 1)`);return s[0]}if(!s)throw new Error(`Failed to hydrate "${i.entity.name}" with value: ${JSON.stringify(n)} (cardinality: -)`);return s}isListableFor(t){return this.target.entity.name===t.name}get required(){return!!this.config.required}async $set(t,n,r){throw new Error("$set is not allowed")}async $create(t,n,r){throw new Error("$create is not allowed")}async $attach(t,n,r){throw new Error("$attach is not allowed")}async $detach(t,n,r){throw new Error("$detach is not allowed")}getName(){return[this.type().replace(":",""),this.source.entity.name,this.target.entity.name,this.config.mappedBy,this.config.inversedBy].filter(Boolean).join("_")}toJSON(){return{type:this.type(),source:this.source.entity.name,target:this.target.entity.name,config:this.config}}}class If{entity;cardinality;reference;constructor(t,n,r){this.entity=t,this.cardinality=r,this.reference=n}toJSON(){return{entity:this.entity.name,cardinality:this.cardinality,name:this.reference}}}const qme=["cascade","set null","set default","restrict","no action"],qF=Ve({reference:le(),target:le(),target_field:le({default:"id"}).optional(),target_field_type:le({enum:["text","integer"],default:"integer"}).optional(),on_delete:le({enum:qme,default:"set null"}).optional(),...rs.properties});class To extends os{type="relation";getSchema(){return qF}static create(t,n,r){const o=[n.reference??n.entity.name,n.entity.getPrimaryField().name].join("_");return new To(o,{...r,required:t.required,reference:n.reference,target:n.entity.name,target_field:n.entity.getPrimaryField().name,target_field_type:n.entity.getPrimaryField().fieldType})}reference(){return this.config.reference}target(){return this.config.target}targetField(){return this.config.target_field}schema(){return Object.freeze({...super.schema(),type:this.config.target_field_type??"integer",references:`${this.config.target}.${this.config.target_field}`,onDelete:this.config.on_delete??"set null"})}transformRetrieve(t){return t}async transformPersist(t,n){throw new Error("RelationField: This function should not be called")}toJsonSchema(){return this.toSchemaWrapIfRequired(bt({$ref:`${this.config?.target}#/properties/${this.config?.target_field}`}))}toType(){const t=this.config.target_field_type==="integer"?"number":"string";return{...super.toType(),type:t}}}const Fr={OneToOne:"1:1",ManyToOne:"n:1",ManyToMany:"m:n",Polymorphic:"poly"};class Ra extends Df{connectionEntity;additionalFields=[];connectionTableMappedName;em;static schema=Ve({connectionTable:le().optional(),connectionTableMappedName:le().optional(),...Df.schema.properties});constructor(t,n,r,o){const i=r?.connectionTable||Ra.defaultConnectionTable(t,n),s=new If(t,t.name),a=new If(n,n.name);super(s,a,r),this.connectionEntity=new Kl(i,o,void 0,"generated"),this.connectionTableMappedName=r?.connectionTableMappedName||i,this.additionalFields=o||[]}static defaultConnectionTable(t,n){return`${t.name}_${n.name}`}type(){return Fr.ManyToMany}isListableFor(){return!0}getField(t){const n=this.connectionEntity,r=n.fields.find(o=>o instanceof To&&o.target()===t.name);if(!r||!(r instanceof To))throw new Error(`Connection entity "${n.name}" does not have a relation to "${t.name}"`);return r}getQueryInfo(t){const n=this.other(t),r=this.connectionEntity,o=this.getField(t),i=this.getField(n.entity),s=`${t.name}.${t.getPrimaryField().name}`,a=`${r.name}.${o.name}`,c=`${r.name}.${i.name}`,u=[r.name,`${n.entity.name}.${n.entity.getPrimaryField().name}`,c],f=`${t.name}.${t.getPrimaryField().name}`;return{other:n,join:u,entityRef:s,selfRef:a,otherRef:c,groupBy:f}}getReferenceQuery(t,n){const{other:r,otherRef:o}=this.getQueryInfo(t);return{where:{[o]:n},join:[r.reference]}}buildJoin(t,n){const{other:r,join:o,entityRef:i,selfRef:s,groupBy:a}=this.getQueryInfo(t);return n.innerJoin(r.entity.name,i,s).innerJoin(...o).groupBy(a)}buildWith(t){if(!this.em)throw new Error("EntityManager not set, can't build");const n=this.em.connection.fn.jsonBuildObject;if(!n)throw new Error("Connection does not support jsonBuildObject");const r=5,{other:o,join:i,entityRef:s,selfRef:a}=this.getQueryInfo(t),c=this.connectionEntity.fields.filter(u=>!(u instanceof To||u instanceof Vm));return u=>u.selectFrom(o.entity.name).select(f=>{const p=[];if(c.length>0){const g=this.connectionEntity.name;p.push(n(Object.fromEntries(c.map(y=>[y.name,f.ref(`${g}.${y.name}`)]))).as(this.connectionTableMappedName))}return p}).whereRef(s,"=",a).innerJoin(...i).limit(r)}initialize(t){this.em=t;const n=To.create(this,this.source),r=To.create(this,this.target);t.hasEntity(this.connectionEntity)?(this.connectionEntity.hasField(n)||this.connectionEntity.addField(n),this.connectionEntity.hasField(r)||this.connectionEntity.addField(r)):(this.connectionEntity.addField(n),this.connectionEntity.addField(r),t.addEntity(this.connectionEntity))}getName(){return[...Array.from(new Set([this.type().replace(":",""),this.connectionEntity.name,this.connectionTableMappedName].filter(Boolean)))].join("_")}}class ac extends Df{fieldConfig;static DEFAULTS={with_limit:5};static schema=Ve({sourceCardinality:bt().optional(),with_limit:bt({default:ac.DEFAULTS.with_limit}).optional(),fieldConfig:ke({label:le()}).optional(),...Df.schema.properties});constructor(t,n,r={}){const o=r.mappedBy||n.name,i=r.inversedBy||t.name,s=typeof r.sourceCardinality=="number"&&r.sourceCardinality>0?r.sourceCardinality:void 0,a=new If(t,i,s),c=new If(n,o,1);super(a,c,r),this.fieldConfig=r.fieldConfig??{}}type(){return Fr.ManyToOne}initialize(t){const n=$f(this.target.reference),r=To.create(this,this.target,{label:n,...this.fieldConfig});this.source.entity.field(r.name)||this.source.entity.addField(To.create(this,this.target,{label:n,...this.fieldConfig}))}getField(){const t=this.target.entity.getPrimaryField().name,n=this.source.entity.getField(`${this.target.reference}_${t}`);if(!(n instanceof To))throw new Error(`Field "${this.target.reference}_${t}" not found on entity "${this.source.entity.name}"`);return n}queryInfo(t,n){const r=this.source.reference===n?"source":"target",o=this[r],i=this[r==="source"?"target":"source"];let s,a,c;r==="source"?(s=this.source.reference,a=`${s}.${this.getField().name}`,c=`${t.name}.${o.entity.getPrimaryField().name}`):(s=this.target.reference,a=`${s}.${t.getPrimaryField().name}`,c=`${t.name}.${this.getField().name}`);const u=`${t.name}.${t.getPrimaryField().name}`;return{other:i,self:o,relationRef:s,entityRef:a,otherRef:c,groupBy:u}}getReferenceQuery(t,n,r){const o=this.source.reference===r?"source":"target",i=this[o],s=this[o==="source"?"target":"source"];return{where:{[`${s.reference}_${s.entity.getPrimaryField().name}`]:n},join:s.entity.name===i.entity.name?[]:[s.entity.name]}}buildJoin(t,n,r){const{self:o,entityRef:i,otherRef:s,groupBy:a}=this.queryInfo(t,r);return n.innerJoin(o.entity.name,i,s).groupBy(a)}buildWith(t,n){const{self:r,entityRef:o,otherRef:i,relationRef:s}=this.queryInfo(t,n);return a=>a.selectFrom(`${r.entity.name} as ${s}`).whereRef(o,"=",i).$if(r.cardinality===1,c=>c.limit(1))}async $set(t,n,r){if(typeof r!="object")throw new Error(`Invalid value for relation field "${n}" given, expected object.`);const o=this.source.entity,s=this.helper(o.name).getMutationInfo();if(!s.$set)throw new Error(`Cannot perform $set for relation "${n}"`);const a=s.local_field,c=this.getField(),u=r[Object.keys(r)[0]];if(!a||!(c instanceof To))throw new Error(`Cannot perform $set for relation "${n}"`);if(u===null&&!c.isRequired())return[a,null];if(!(await t.repository(c.target()).exists({[c.targetField()]:u})).data.exists){const p=c.targetField();throw new Error(`Cannot connect "${o.name}.${n}" to "${c.target()}.${p}" = "${u}": not found.`)}return[a,u]}}class F_ extends ac{constructor(t,n,r){const{mappedBy:o,inversedBy:i,required:s}=r||{};super(t,n,{mappedBy:o,inversedBy:i,sourceCardinality:1,required:s,with_limit:1})}type(){return Fr.OneToOne}isListableFor(){return!1}async $set(t,n,r){throw new Error("$set is not allowed")}async $create(t,n,r){if(r===null||typeof r!="object")throw new Error(`Invalid value for relation field "${n}" given, expected object.`);const o=this.other(this.source.entity).entity,s=this.helper(this.source.entity.name).getMutationInfo(),a=s.primary,c=s.local_field;if(!s.$create||!a||!c)throw new Error(`Cannot perform $create for relation "${n}"`);try{const{data:u}=await t.mutator(o).insertOne(r),f=u[a];return[c,f]}catch{throw new Error(`Error performing $create on "${o.name}".`)}}}class Ov extends Df{static schema=Ve({targetCardinality:bt().optional(),...Df.schema.properties});constructor(t,n,r={}){const o=r.mappedBy||n.name,i=r.inversedBy||t.name,s=typeof r.targetCardinality=="number"&&r.targetCardinality>0?r.targetCardinality:void 0,a=new If(t,i,1),c=new If(n,o,s);super(a,c,r),this.directions=["source"]}type(){return Fr.Polymorphic}queryInfo(t){const n=this.other(t),r=`${n.entity.name}.${this.getReferenceField().name}`,o=`${t.name}.${this.config.mappedBy}`,i=`${n.entity.name}.${this.config.mappedBy}`,s=`${t.name}.${t.getPrimaryField().name}`,a=`${n.entity.name}.${this.getEntityIdField().name}`,c=`${t.name}.${t.getPrimaryField().name}`;return{other:n,whereLhs:r,reference:o,reference_other:i,entityRef:s,otherRef:a,groupBy:c}}buildJoin(t,n){const{other:r,whereLhs:o,reference:i,entityRef:s,otherRef:a,groupBy:c}=this.queryInfo(t);return n.innerJoin(r.entity.name,u=>u.onRef(s,"=",a).on(o,"=",i)).groupBy(c)}getReferenceQuery(t,n){const r=this.queryInfo(t);return{where:{[this.getReferenceField().name]:r.reference_other,[this.getEntityIdField().name]:n}}}buildWith(t){const{other:n,whereLhs:r,reference:o,entityRef:i,otherRef:s}=this.queryInfo(t);return a=>a.selectFrom(n.entity.name).where(r,"=",o).whereRef(i,"=",s).$if(n.cardinality===1,c=>c.limit(1))}isListableFor(t){return this.source.entity.name===t.name&&this.target.cardinality!==1}getReferenceField(){return new Sv("reference",{hidden:!0,fillable:["create"]})}getEntityIdField(){return new Sv("entity_id",{hidden:!0,fillable:["create"]})}initialize(t){const n=this.getReferenceField(),r=this.getEntityIdField();this.target.entity.field(n.name)||this.target.entity.addField(n),this.target.entity.field(r.name)||this.target.entity.addField(r)}}const LM=["$set","$create","$attach","$detach"];class Wme{relation;access;self;other;constructor(t,n){if(this.relation=t,t.source.entity.name===n)this.access="source",this.self=t.source,this.other=t.target;else if(t.target.entity.name===n)this.access="target",this.self=t.target,this.other=t.source;else throw new Error(`Entity "${n}" is not part of the relation "${t.source.entity.name} <-> ${t.target.entity.name}"`)}getMutationInfo(){const t={$set:!1,$create:!1,$attach:!1,$detach:!1};let n,r;switch(this.relation.type()){case Fr.ManyToOne:typeof this.self.cardinality>"u"&&this.other.cardinality===1&&(t.$set=!0,n=this.relation.getField()?.name,r=this.other.entity.getPrimaryField().name);break;case Fr.OneToOne:this.access==="source"&&(t.$create=!0,t.$set=!0,n=this.relation.getField()?.name,r=this.other.entity.getPrimaryField().name);break;case Fr.ManyToMany:this.access==="source"&&(t.$attach=!0,t.$detach=!0,r=this.other.entity.getPrimaryField().name);break}return{reference:this.other.reference,local_field:n,...t,primary:r,cardinality:this.other.cardinality,relation_type:this.relation.type()}}}class Gme{constructor(t,n){this.entity=t,this.em=n}getRelationalKeys(){const t=[];return this.entity.type==="generated"&&this.em.relations.all.find(r=>r instanceof Ra&&r.connectionEntity.name===this.entity.name)instanceof Ra&&t.push(...this.entity.fields.filter(r=>r.type==="relation").map(r=>r.name)),this.em.relationsOf(this.entity.name).map(n=>{const r=n.helper(this.entity.name).getMutationInfo();t.push(r.reference),r.local_field&&t.push(r.local_field)}),t}async persistRelationField(t,n,r){if(r===null&&!t.isRequired())return[n,r];if(typeof r=="object")throw new Error(`Invalid value for relation field "${n}" given, expected primitive.`);if(!(await this.em.repository(t.target()).exists({[t.targetField()]:r})).data.exists){const i=t.targetField();throw new Error(`Cannot connect "${this.entity.name}.${n}" to "${t.target()}.${i}" = "${r}": not found.`)}return[n,r]}async persistReference(t,n,r){if(typeof r!="object"||r===null||typeof r>"u")throw new Error(`Invalid value for relation "${n}" given, expected object to persist reference. Like '{$set: {id: 1}}'.`);const o=Object.keys(r)[0];if(!LM.includes(o))throw new Error(`Invalid operation "${o}" for relation "${n}". Allowed: ${LM.join(", ")}`);const i=r[o];return await t[o](this.em,n,i)}async persistRelation(t,n){const r=this.entity.getField(t);if(r instanceof To)return this.persistRelationField(r,t,n);const o=this.em.relationOf(this.entity.name,t);if(o)return this.persistReference(o,t,n);throw new Error(`Relation "${t}" failed to resolve on entity "${this.entity.name}": Unable to resolve relation origin.`)}}const dA={[Fr.OneToOne]:{schema:F_.schema,cls:F_},[Fr.ManyToOne]:{schema:ac.schema,cls:ac},[Fr.ManyToMany]:{schema:Ra.schema,cls:Ra},[Fr.Polymorphic]:{schema:Ov.schema,cls:Ov}},Jme={relation:{schema:qF,field:To}};class WF{constructor(t,n={}){this.conn=t,this.options=n}results=[];time=0;get(){if(!this.results)throw new Error("Result not executed");return Array.isArray(this.results)?this.results??[]:this.results[0]}first(){const t=this.get();return(Array.isArray(t)?t[0]:t)??{}}get sql(){return this.first().sql}get parameters(){return this.first().parameters}get data(){return this.options.single?this.first().data?.[0]:this.first().data??[]}async execute(t){const n=Array.isArray(t)?t:[t];for(const r of n){const o=r.compile();await this.options.beforeExecute?.(o);try{const i=performance.now(),s=await this.conn.executeQuery(o);this.time=Number.parseFloat((performance.now()-i).toFixed(2)),this.results.push({...s,data:this.options.hydrator?.(s.rows),items:s.rows.length,time:this.time,sql:o.sql,parameters:[...o.parameters]})}catch(i){if(this.options.onError)await this.options.onError(i);else throw i}}return this}additionalMetaKeys(){return[]}toJSON(){const{rows:t,data:n,...r}=this.first(),o=ir()?["items","time","sql","parameters"]:["items","time"],i=IL(r,[...o,...this.additionalMetaKeys()]);return{data:this.data,meta:i}}}class Yme extends WF{constructor(t,n,r){const o=r?.logParams===void 0?ir():r.logParams;super(t.connection,{hydrator:i=>t.hydrate(n.name,i),beforeExecute:i=>{r?.silent||rt.debug(`[Mutation] +${i.sql} +`,o?i.parameters:void 0)},onError:i=>{if(!r?.silent)throw rt.error("[ERROR] Mutator:",i.message),i},...r}),this.em=t,this.entity=n}}class Ll{constructor(t,n,r){this.em=t,this.entity=n,this.options=r,this.emgr=r?.emgr??new Lg(wv)}static Events=wv;emgr;__unstable_disable_system_entity_creation=!0;__unstable_toggleSystemEntityCreation(t){this.__unstable_disable_system_entity_creation=t}get conn(){return this.em.connection.kysely}async getValidatedData(t,n){const r=this.entity;if(!n)throw new Error("Context must be provided for validation");const o=Object.keys(t),i={},s=new Gme(r,this.em),a=s.getRelationalKeys();for(const c of o){if(a.includes(c)){const f=await s.persistRelation(c,t[c]);if(Array.isArray(f)){const[p,g]=f;i[p]=g}continue}const u=r.getField(c);if(!u)throw new Error(`Field "${c}" not found on entity "${r.name}". Fields: ${r.getFillableFields().map(f=>f.name).join(", ")}`);if(!u.isFillable(n))throw new Error(`Field "${c}" is not fillable on entity "${r.name}"`);i[c]=await u.transformPersist(t[c],this.em,n),i[c]=this.em.connection.toDriver(i[c],u)}if(Object.keys(i).length===0)throw new Error(`No data left to update "${r.name}"`);return i}async performQuery(t,n){return await new Yme(this.em,this.entity,{silent:!1,...n}).execute(t)}async insertOne(t){const n=this.entity;if(n.type==="system"&&this.__unstable_disable_system_entity_creation)throw new Error(`Creation of system entity "${n.name}" is disabled`);const r=await this.emgr.emit(new Ll.Events.MutatorInsertBefore({entity:n,data:t})),o=r.returned?r.params.data:t;let i=await this.getValidatedData({...n.getDefaultObject(),...o},"create");const s=n.getRequiredFields();for(const p of s)if(typeof i[p.name]>"u"||i[p.name]===null)throw new Error(`Field "${p.name}" is required`);const a=n.getPrimaryField(),c=a.getNewValue();c&&(i={[a.name]:c,...i});const u=this.conn.insertInto(n.name).values(i).returning(n.getSelect()),f=await this.performQuery(u,{single:!0});return await this.emgr.emit(new Ll.Events.MutatorInsertAfter({entity:n,data:f.data,changed:i})),f}async updateOne(t,n){const r=this.entity;if(!t)throw new Error("ID must be provided for update");const o=await this.emgr.emit(new Ll.Events.MutatorUpdateBefore({entity:r,entityId:t,data:n})),i=o.returned?o.params.data:n,s=await this.getValidatedData(i,"update"),a=this.conn.updateTable(r.name).set(s).where(r.id().name,"=",t).returning(r.getSelect()),c=await this.performQuery(a,{single:!0});return await this.emgr.emit(new Ll.Events.MutatorUpdateAfter({entity:r,entityId:t,data:c.data,changed:s})),c}async deleteOne(t){const n=this.entity;if(!t)throw new Error("ID must be provided for deletion");await this.emgr.emit(new Ll.Events.MutatorDeleteBefore({entity:n,entityId:t}));const r=this.conn.deleteFrom(n.name).where(n.id().name,"=",t).returning(n.getSelect()),o=await this.performQuery(r,{single:!0});return await this.emgr.emit(new Ll.Events.MutatorDeleteAfter({entity:n,entityId:t,data:o.data})),o}getValidOptions(t){const n=this.entity,r={};if(t?.where){const o=Gl.getPropertyNames(t.where).filter(i=>typeof n.getField(i)>"u");if(o.length>0)throw new ua(`Invalid where field(s): ${o.join(", ")}`);r.where=t.where}return r}appendWhere(t,n){const r=this.entity;if(r.name,n){const o=Gl.getPropertyNames(n).filter(i=>typeof r.getField(i)>"u");if(o.length>0)throw new ua(`Invalid where field(s): ${o.join(", ")}`);return Gl.addClause(t,n)}return t}async deleteWhere(t){const n=this.entity;if(!t||typeof t!="object"||Object.keys(t).length===0)throw new Error("Where clause must be provided for mass deletion");const r=this.appendWhere(this.conn.deleteFrom(n.name),t).returning(n.getSelect());return await this.performQuery(r)}async updateWhere(t,n){const r=this.entity,o=await this.getValidatedData(t,"update");if(!n||typeof n!="object"||Object.keys(n).length===0)throw new Error("Where clause must be provided for mass update");const i=this.appendWhere(this.conn.updateTable(r.name),n).set(o).returning(r.getSelect());return await this.performQuery(i)}async insertMany(t){const n=this.entity;if(n.type==="system"&&this.__unstable_disable_system_entity_creation)throw new Error(`Creation of system entity "${n.name}" is disabled`);const r=[];for(const i of t){const s={...n.getDefaultObject(),...await this.getValidatedData(i,"create")},a=n.getRequiredFields();for(const c of a)if(typeof s[c.name]>"u"||s[c.name]===null)throw new Error(`Field "${c.name}" is required`);r.push(s)}const o=this.conn.insertInto(n.name).values(r).returning(n.getSelect());return await this.performQuery(o)}}const jv=le({}),FM=Rt([jv,un(jv,{uniqueItems:!0})],{default:[],coerce:e=>Array.isArray(e)?e:typeof e=="string"?e.includes(",")?e.split(","):[e].filter(Boolean):[]}),Q0={by:"id",dir:"asc"},Kme=ke({by:le(),dir:le({enum:["asc","desc"]}).optional()}).strict(),Xme=Rt([le(),Kme],{default:Q0,coerce:e=>{if(typeof e=="string"){if(/^-?[a-zA-Z_][a-zA-Z0-9_.]*$/.test(e)){const t=e[0]==="-"?"desc":"asc";return{by:t==="desc"?e.slice(1):e,dir:t}}else if(/^{.*}$/.test(e))return{...Q0,...JSON.parse(e)};return rt.warn(`Invalid sort given: '${JSON.stringify(e)}'`),Q0}else if(_u(e))return{...Q0,...e};return e}}),Qme=Rt([le(),ke({})],{default:{},examples:[{attribute:{$eq:1}}],coerce:e=>{if(e==null||e==="")return{};const t=typeof e=="string"?JSON.parse(e):e;return Gl.convert(t)}}),Zme=e=>Rt([jv,un(jv),e],{coerce:function(t,n={}){let r=t;if(typeof r=="string"&&(r.match(/^\{/)||r.match(/^\[/)?r=JSON.parse(r):r.includes(",")?r=r.split(","):r=[r]),Array.isArray(r)&&(r=r.reduce((o,i)=>(o[i]={},o),{})),_u(r))for(const o in r)r[o]=e.coerce(r[o],n);return r}}),oi=Cae(e=>ke({limit:bt({default:10}),offset:bt({default:0}),sort:Xme,where:Qme,select:FM,join:FM,with:Zme(e)}).partial()),ege=()=>oi.template({},{withOptional:!0});class Av{static buildClause(t,n,r,o){const i=t.relationOf(r.name,o);if(!i)throw new Error(`Relation "${o}" not found`);return i.buildJoin(r,n,o)}static getJoinedEntityNames(t,n,r){return r.flatMap(o=>{const i=t.relationOf(n.name,o);if(!i)throw new Error(`Relation "${o}" not found`);const s=i.other(n);return i instanceof ac?[s.entity.name]:i instanceof Ra?[s.entity.name,i.connectionEntity.name]:[]})}static addClause(t,n,r,o){if(o.length===0)return n;let i=n;for(const s of o)i=Av.buildClause(t,i,r,s);return i}}class tge extends WF{constructor(t,n,r){super(t.connection,{hydrator:o=>t.hydrate(n.name,o),beforeExecute:o=>{r?.silent||rt.debug(`Query: +${o.sql} +`,o.parameters)},onError:o=>{if(r?.silent!==!0)throw rt.error("Repository:",String(o)),o},...r}),this.em=t,this.entity=n}shouldIncludeCounts(t){return t===void 0?this.conn.supports("softscans"):t}async execute(t,n){if(this.shouldIncludeCounts(n?.includeCounts)){const o=(c="count")=>this.conn.kysely.fn.countAll().as(c),i=t.clearSelect().select(o()).clearLimit().clearOffset().clearGroupBy().clearOrderBy(),s=this.conn.kysely.selectFrom(this.entity.name).select(o()),a=t.compile();this.options.beforeExecute?.(a);try{const c=performance.now(),[u,f,p]=await this.em.connection.executeQueries(a,i,s);this.time=Number.parseFloat((performance.now()-c).toFixed(2)),this.results.push({...u,data:this.options.hydrator?.(u.rows),items:u.rows.length,count:Ok(f.rows[0]?.count??0),total:Ok(p.rows[0]?.count??0),time:this.time,sql:a.sql,parameters:[...a.parameters]})}catch(c){if(this.options.onError)await this.options.onError(c);else throw c}return this}return await super.execute(t)}get count(){return this.first().count}get total(){return this.first().total}additionalMetaKeys(){return["count","total"]}}class au{constructor(t,n,r={}){this.em=t,this.entity=n,this.options=r,this.emgr=r?.emgr??new Lg(wv)}static Events=B7;emgr;cloneFor(t,n={}){return new au(this.em,this.em.entity(t),{...this.options,...n,emgr:this.emgr})}get conn(){return this.em.connection.kysely}checkIndex(t,n,r){!this.em.getIndexedFields(t).map(i=>i.name).includes(n)&&this.options?.silent!==!0&&rt.warn(`Field "${t}.${n}" used in "${r}" is not indexed`)}getValidOptions(t){const n=this.entity,r={...structuredClone(ege()),sort:n.getDefaultSort(),select:n.getSelect()};if(!t)return r;if(t.sort){if(!r.select.includes(t.sort.by))throw new ua(`Invalid sort field "${t.sort.by}"`);if(!["asc","desc"].includes(t.sort.dir))throw new ua(`Invalid sort direction "${t.sort.dir}"`);this.checkIndex(n.name,t.sort.by,"sort"),r.sort={dir:t.sort.dir??"asc",by:t.sort.by}}if(t.select&&t.select.length>0){const o=t.select.filter(i=>!r.select.includes(i));if(o.length>0)throw new ua(`Invalid select field(s): ${o.join(", ")}`).context({entity:n.name,valid:r.select});r.select=t.select}if(t.with&&(Gm.validateWiths(this.em,n.name,t.with),r.with=t.with),t.join&&t.join.length>0)for(const o of t.join){if(!this.em.relationOf(n.name,o))throw new ua(`JOIN: "${o}" is not a relation of "${n.name}"`);r.join.push(o)}if(t.where){const o=[n.name];r.join?.length>0&&o.push(...Av.getJoinedEntityNames(this.em,n,r.join));const i=Gl.getPropertyNames(t.where).filter(s=>{if(s.includes(".")){const[a,c]=s.split(".");if(o.includes(a))return this.checkIndex(a,c,"where"),!this.em.entity(a).getField(c);if(!this.em.hasEntity(a))return!0;const u=this.em.relationOf(n.name,a);return u&&u.other(n).entity.getField(c)?(r.join?.push(a),this.checkIndex(a,c,"where"),!1):!0}return this.checkIndex(n.name,s,"where"),typeof n.getField(s)>"u"});if(i.length>0)throw new ua(`Invalid where field(s): ${i.join(", ")}`).context({aliases:o,entity:n.name});r.where=t.where}return t.limit&&(r.limit=t.limit),t.offset&&(r.offset=t.offset),r}async performQuery(t,n,r){return await new tge(this.em,this.entity,{silent:this.options.silent,...n}).execute(t,{includeCounts:r?.includeCounts??this.options.includeCounts})}async triggerFindBefore(t,n){const r=n.limit===1?au.Events.RepositoryFindOneBefore:au.Events.RepositoryFindManyBefore;await this.emgr.emit(new r({entity:t,options:n}))}async triggerFindAfter(t,n,r){n.limit===1?await this.emgr.emit(new au.Events.RepositoryFindOneAfter({entity:t,options:n,data:r})):await this.emgr.emit(new au.Events.RepositoryFindManyAfter({entity:t,options:n,data:r}))}async single(t,n){await this.triggerFindBefore(this.entity,n);const r=await this.performQuery(t,{single:!0});return await this.triggerFindAfter(this.entity,n,r.data),r}addOptionsToQueryBuilder(t,n,r){const o=this.entity;let i=t??this.conn.selectFrom(o.name);const s=r?.validate!==!1?this.getValidOptions(n):n;if(!s)return i;const a=r?.alias??o.name,c=p=>`${a}.${p}`,u=r?.ignore??[],f={limit:10,offset:0,...r?.defaults};return!u.includes("select")&&s.select&&(i=i.select(o.getAliasedSelectFrom(s.select,a))),!u.includes("with")&&s.with&&(i=Gm.addClause(this.em,i,o,s.with)),!u.includes("join")&&s.join&&(i=Av.addClause(this.em,i,o,s.join)),!u.includes("where")&&s.where&&(i=Gl.addClause(i,s.where)),u.includes("limit")||(i=i.limit(s.limit??f.limit),u.includes("offset")||(i=i.offset(s.offset??f.offset))),u.includes("sort")||(i=i.orderBy(c(s.sort?.by??"id"),s.sort?.dir??"asc")),i}buildQuery(t,n=[]){const r=this.entity,o=this.getValidOptions(t);return{qb:this.addOptionsToQueryBuilder(void 0,o,{ignore:n,alias:r.name,validate:!1}),options:o}}async findId(t,n){if(typeof t>"u"||t===null)throw new ua("id is required");return this.findOne({[this.entity.getPrimaryField().name]:t},n)}async findOne(t,n){const{qb:r,options:o}=this.buildQuery({...n,where:t,limit:1});return await this.single(r,o)}async findMany(t){const{qb:n,options:r}=this.buildQuery(t);await this.triggerFindBefore(this.entity,r);const o=await this.performQuery(n);return await this.triggerFindAfter(this.entity,r,o.data),o}getEntityByReference(t){const r=this.em.relations.listableRelationsOf(this.entity).find(o=>o.ref(t).reference===t);if(!r)throw new Error(`Relation "${t}" not found or not listable on entity "${this.entity.name}"`);return{entity:r.other(this.entity).entity,relation:r}}async findManyByReference(t,n,r){const{entity:o,relation:i}=this.getEntityByReference(n),s=i.getReferenceQuery(o,t,n);if(!("where"in s)||Object.keys(s.where).length===0)throw new Error(`Invalid reference query for "${n}" on entity "${o.name}"`);const a={...r,...s,where:{...s.where,...r?.where??{}}};return this.cloneFor(o).findMany(a)}async count(t){const n=this.entity,r=this.getValidOptions({where:t}),o=this.conn.fn.count(Bm`*`).as("count");let i=this.conn.selectFrom(n.name).select(o);return r.where&&(i=Gl.addClause(i,r.where)),await this.performQuery(i,{hydrator:s=>({count:s[0]?.count??0})},{includeCounts:!1})}async exists(t){const n=this.entity,r=this.getValidOptions({where:t}),o=this.conn.fn.count(Bm`*`).as("count");let i=this.conn.selectFrom(n.name).select(o);return i=Gl.addClause(i,r.where).limit(1),await this.performQuery(i,{hydrator:s=>({exists:s[0]?.count>0})})}}class Gm{static addClause(t,n,r,o){if(!o||!_u(o))return rt.warn(`'withs' undefined or invalid, given: ${JSON.stringify(o)}`),n;const i=t.connection.fn;let s=n;for(const[a,c]of Object.entries(o)){const u=t.relationOf(r.name,a);if(!u)throw new Error(`Relation "${r.name}<>${a}" not found`);const f=u.ref(a).cardinality,p=f===1?i.jsonObjectFrom:i.jsonArrayFrom;if(!p)throw new Error("Connection does not support jsonObjectFrom/jsonArrayFrom");const g=u.other(r);s=s.select(y=>{let v=u.buildWith(r,a)(y);return c&&(v=t.repo(g.entity).addOptionsToQueryBuilder(v,c,{ignore:["with",f===1?"limit":void 0].filter(Boolean)})),c.with&&(v=Gm.addClause(t,v,g.entity,c.with)),p(v).as(g.reference)})}return s}static validateWiths(t,n,r){let o=0;if(!r||!_u(r))return r&&rt.warn(`'withs' invalid, given: ${JSON.stringify(r)}`),o;const i=[];for(const[s,a]of Object.entries(r)){if(!t.relationOf(n,s))throw new ua(`WITH: "${s}" is not a relation of "${n}"`);o++,"with"in a&&i.push(Gm.validateWiths(t,s,a.with))}return i.length>0&&(o+=Math.max(...i)),o}}class Jm{connection;_entities=[];_relations=[];_indices=[];emgr;static Events={...wv,...B7};constructor(t,n,r=[],o=[],i){if(t.forEach(s=>this.addEntity(s)),r.forEach(s=>this.addRelation(s)),o.forEach(s=>this.addIndex(s)),!F7.isConnection(n))throw new Fce("");this.connection=n,this.emgr=i??new Lg,this.emgr.registerEvents(Jm.Events)}fork(){return new Jm(this._entities,this.connection,this._relations,this._indices)}clear(){return this._entities=[],this._relations=[],this._indices=[],this}get entities(){return this._entities}get relations(){return new V7(this._relations)}get indices(){return this._indices}async ping(){return(await Bm`SELECT 1`.execute(this.connection.kysely)).rows.length>0}addEntity(t){const n=this.entities.find(r=>r.name===t.name);if(n){if(JSON.stringify(n)===JSON.stringify(t)){rt.warn(`Entity "${t.name}" already exists, but it's the same, skipping adding it.`);return}throw new Error(`Entity "${t.name}" already exists`)}this.entities.push(t)}__replaceEntity(t,n=t.name){const r=this._entities.findIndex(o=>o.name===n);if(r===-1)throw new Error(`Entity "${n}" not found and cannot be replaced`);this._entities[r]=t}entity(t,n){const r=this.entities.find(o=>Kl.isEntity(t)?o.name===t.name:o.name===t);if(!r){if(n===!0)return;throw new Vce(Kl.isEntity(t)?t.name:t)}return r}hasEntity(t){const n=typeof t=="string"?t:t.name;return this.entities.some(r=>r.name===n)}hasIndex(t){const n=typeof t=="string"?t:t.name;return this.indices.some(r=>r.name===n)}getIndexedFields(t){const n=this.entity(t),r=this.getIndicesOf(n),o=n.fields.filter(s=>s.type==="relation"),i=r.map(s=>s.fields[0]);return[n.getPrimaryField(),...o,...i].filter(Boolean)}addRelation(t){if(!this.entity(t.source.entity.name)||!this.entity(t.target.entity.name))throw new Error("Relation source or target entity not found");if(this._relations.find(r=>{const o=r.source.entity.name===t.source.entity.name&&r.target.entity.name===t.target.entity.name,i=r.source.reference===t.source.reference&&r.target.reference===t.target.reference;return o&&i}))throw new Error(`Relation "${t.type}" between "${t.source.entity.name}" and "${t.target.entity.name}" already exists`);this._relations.push(t),t.initialize(this)}relationsOf(t){return this.relations.relationsOf(this.entity(t))}relationOf(t,n){return this.relations.relationOf(this.entity(t),n)}hasRelations(t){return this.relations.hasRelations(this.entity(t))}relatedEntitiesOf(t){return this.relations.relatedEntitiesOf(this.entity(t))}relationReferencesOf(t){return this.relations.relationReferencesOf(this.entity(t))}repository(t,n={}){return this.repo(t,n)}repo(t,n={}){return new au(this,this.entity(t),{...n,emgr:this.emgr})}mutator(t){return new Ll(this,this.entity(t),{emgr:this.emgr})}addIndex(t,n=!1){if(this.indices.find(r=>r.name===t.name)){if(n)throw new Error(`Index "${t.name}" already exists`);return}this._indices.push(t)}getIndicesOf(t){const n=Kl.isEntity(t)?t:this.entity(t);return this.indices.filter(r=>r.entity.name===n.name)}schema(){return new cA(this)}hydrate(t,n){if(!Array.isArray(n)||n.length===0)return[];const r=this.entity(t),o=[];for(const i of n){for(let[s,a]of Object.entries(i)){const c=r.getField(s);if(!c||c.isVirtual()){const u=this.relationOf(t,s);if(u){if(!a)continue;a=u.hydrate(s,Array.isArray(a)?a:[a],this),i[s]=a;continue}else if(c?.isVirtual())continue;throw new Error(`Field "${s}" not found on entity "${r.name}"`)}try{a===null&&c.hasDefault()&&(i[s]=c.getDefault()),a=this.connection.fromDriver(a,c),i[s]=c.transformRetrieve(a)}catch(u){throw new zce(`"${c.type}" field "${s}" on entity "${r.name}": ${u.message}`)}}o.push(i)}return o}toJSON(){return{entities:Object.fromEntries(this.entities.map(t=>[t.name,t.toJSON()])),relations:Object.fromEntries(this.relations.all.map(t=>[t.getName(),t.toJSON()])),indices:Object.fromEntries(this.indices.map(t=>[t.name,t.toJSON()]))}}}var zM=(e,t,n)=>(r,o)=>{let i=-1;return s(0);async function s(a){if(a<=i)throw new Error("next() called multiple times");i=a;let c,u=!1,f;if(e[a]?(f=e[a][0][0],r.req.routeIndex=a):f=a===e.length&&o||void 0,f)try{c=await f(r,()=>s(a+1))}catch(p){if(p instanceof Error&&t)r.error=p,c=await t(p,r),u=!0;else throw p}else r.finalized===!1&&n&&(c=await n(r));return c&&(r.finalized===!1||u)&&(r.res=c),r}},nge=Symbol(),rge=async(e,t=Object.create(null))=>{const{all:n=!1,dot:r=!1}=t,i=(e instanceof GF?e.raw.headers:e.headers).get("Content-Type");return i?.startsWith("multipart/form-data")||i?.startsWith("application/x-www-form-urlencoded")?oge(e,{all:n,dot:r}):{}};async function oge(e,t){const n=await e.formData();return n?ige(n,t):{}}function ige(e,t){const n=Object.create(null);return e.forEach((r,o)=>{t.all||o.endsWith("[]")?sge(n,o,r):n[o]=r}),t.dot&&Object.entries(n).forEach(([r,o])=>{r.includes(".")&&(age(n,r,o),delete n[r])}),n}var sge=(e,t,n)=>{e[t]!==void 0?Array.isArray(e[t])?e[t].push(n):e[t]=[e[t],n]:t.endsWith("[]")?e[t]=[n]:e[t]=n},age=(e,t,n)=>{let r=e;const o=t.split(".");o.forEach((i,s)=>{s===o.length-1?r[i]=n:((!r[i]||typeof r[i]!="object"||Array.isArray(r[i])||r[i]instanceof File)&&(r[i]=Object.create(null)),r=r[i])})},BM=e=>aw(e,zj),GF=class{raw;#e;#t;routeIndex=0;path;bodyCache={};constructor(e,t="/",n=[[]]){this.raw=e,this.path=t,this.#t=n,this.#e={}}param(e){return e?this.#n(e):this.#i()}#n(e){const t=this.#t[0][this.routeIndex][1][e],n=this.#r(t);return n&&/\%/.test(n)?BM(n):n}#i(){const e={},t=Object.keys(this.#t[0][this.routeIndex][1]);for(const n of t){const r=this.#r(this.#t[0][this.routeIndex][1][n]);r!==void 0&&(e[n]=/\%/.test(r)?BM(r):r)}return e}#r(e){return this.#t[1]?this.#t[1][e]:e}query(e){return kae(this.url,e)}queries(e){return Mae(this.url,e)}header(e){if(e)return this.raw.headers.get(e)??void 0;const t={};return this.raw.headers.forEach((n,r)=>{t[r]=n}),t}async parseBody(e){return this.bodyCache.parsedBody??=await rge(this,e)}#o=e=>{const{bodyCache:t,raw:n}=this,r=t[e];if(r)return r;const o=Object.keys(t)[0];return o?t[o].then(i=>(o==="json"&&(i=JSON.stringify(i)),new Response(i)[e]())):t[e]=n[e]()};json(){return this.#o("text").then(e=>JSON.parse(e))}text(){return this.#o("text")}arrayBuffer(){return this.#o("arrayBuffer")}blob(){return this.#o("blob")}formData(){return this.#o("formData")}addValidatedData(e,t){this.#e[e]=t}valid(e){return this.#e[e]}get url(){return this.raw.url}get method(){return this.raw.method}get[nge](){return this.#t}get matchedRoutes(){return this.#t[0].map(([[,e]])=>e)}get routePath(){return this.#t[0].map(([[,e]])=>e)[this.routeIndex].path}},lge={Stringify:1},JF=async(e,t,n,r,o)=>{typeof e=="object"&&!(e instanceof String)&&(e instanceof Promise||(e=e.toString()),e instanceof Promise&&(e=await e));const i=e.callbacks;return i?.length?(o?o[0]+=e:o=[e],Promise.all(i.map(a=>a({phase:t,buffer:o,context:r}))).then(a=>Promise.all(a.filter(Boolean).map(c=>JF(c,t,!1,r,o))).then(()=>o[0]))):Promise.resolve(e)},cge="text/plain; charset=UTF-8",O2=(e,t)=>({"Content-Type":e,...t}),uge=class{#e;#t;env={};#n;finalized=!1;error;#i;#r;#o;#a;#s;#l;#c;#d;#u;constructor(e,t){this.#e=e,t&&(this.#r=t.executionCtx,this.env=t.env,this.#l=t.notFoundHandler,this.#u=t.path,this.#d=t.matchResult)}get req(){return this.#t??=new GF(this.#e,this.#u,this.#d),this.#t}get event(){if(this.#r&&"respondWith"in this.#r)return this.#r;throw Error("This context has no FetchEvent")}get executionCtx(){if(this.#r)return this.#r;throw Error("This context has no ExecutionContext")}get res(){return this.#o||=new Response(null,{headers:this.#c??=new Headers})}set res(e){if(this.#o&&e){e=new Response(e.body,e);for(const[t,n]of this.#o.headers.entries())if(t!=="content-type")if(t==="set-cookie"){const r=this.#o.headers.getSetCookie();e.headers.delete("set-cookie");for(const o of r)e.headers.append("set-cookie",o)}else e.headers.set(t,n)}this.#o=e,this.finalized=!0}render=(...e)=>(this.#s??=t=>this.html(t),this.#s(...e));setLayout=e=>this.#a=e;getLayout=()=>this.#a;setRenderer=e=>{this.#s=e};header=(e,t,n)=>{this.finalized&&(this.#o=new Response(this.#o.body,this.#o));const r=this.#o?this.#o.headers:this.#c??=new Headers;t===void 0?r.delete(e):n?.append?r.append(e,t):r.set(e,t)};status=e=>{this.#i=e};set=(e,t)=>{this.#n??=new Map,this.#n.set(e,t)};get=e=>this.#n?this.#n.get(e):void 0;get var(){return this.#n?Object.fromEntries(this.#n):{}}#f(e,t,n){const r=this.#o?new Headers(this.#o.headers):this.#c??new Headers;if(typeof t=="object"&&"headers"in t){const i=t.headers instanceof Headers?t.headers:new Headers(t.headers);for(const[s,a]of i)s.toLowerCase()==="set-cookie"?r.append(s,a):r.set(s,a)}if(n)for(const[i,s]of Object.entries(n))if(typeof s=="string")r.set(i,s);else{r.delete(i);for(const a of s)r.append(i,a)}const o=typeof t=="number"?t:t?.status??this.#i;return new Response(e,{status:o,headers:r})}newResponse=(...e)=>this.#f(...e);body=(e,t,n)=>this.#f(e,t,n);text=(e,t,n)=>!this.#c&&!this.#i&&!t&&!n&&!this.finalized?new Response(e):this.#f(e,t,O2(cge,n));json=(e,t,n)=>this.#f(JSON.stringify(e),t,O2("application/json",n));html=(e,t,n)=>{const r=o=>this.#f(o,t,O2("text/html; charset=UTF-8",n));return typeof e=="object"?JF(e,lge.Stringify,!1,{}).then(r):r(e)};redirect=(e,t)=>{const n=String(e);return this.header("Location",/[^\x00-\xFF]/.test(n)?encodeURI(n):n),this.newResponse(null,t??302)};notFound=()=>(this.#l??=()=>new Response,this.#l(this))},Yn="ALL",dge="all",fge=["get","post","put","delete","options","patch"],YF="Can not add a route since the matcher is already built.",KF=class extends Error{},hge="__COMPOSED_HANDLER",pge=e=>e.text("404 Not Found",404),VM=(e,t)=>{if("getResponse"in e){const n=e.getResponse();return t.newResponse(n.body,n)}return console.error(e),t.text("Internal Server Error",500)},XF=class{get;post;put;delete;options;patch;all;on;use;router;getPath;_basePath="/";#e="/";routes=[];constructor(t={}){[...fge,dge].forEach(i=>{this[i]=(s,...a)=>(typeof s=="string"?this.#e=s:this.#i(i,this.#e,s),a.forEach(c=>{this.#i(i,this.#e,c)}),this)}),this.on=(i,s,...a)=>{for(const c of[s].flat()){this.#e=c;for(const u of[i].flat())a.map(f=>{this.#i(u.toUpperCase(),this.#e,f)})}return this},this.use=(i,...s)=>(typeof i=="string"?this.#e=i:(this.#e="*",s.unshift(i)),s.forEach(a=>{this.#i(Yn,this.#e,a)}),this);const{strict:r,...o}=t;Object.assign(this,o),this.getPath=r??!0?t.getPath??s7:Rae}#t(){const t=new XF({router:this.router,getPath:this.getPath});return t.errorHandler=this.errorHandler,t.#n=this.#n,t.routes=this.routes,t}#n=pge;errorHandler=VM;route(t,n){const r=this.basePath(t);return n.routes.map(o=>{let i;n.errorHandler===VM?i=o.handler:(i=async(s,a)=>(await zM([],n.errorHandler)(s,()=>o.handler(s,a))).res,i[hge]=o.handler),r.#i(o.method,o.path,i)}),this}basePath(t){const n=this.#t();return n._basePath=Zd(this._basePath,t),n}onError=t=>(this.errorHandler=t,this);notFound=t=>(this.#n=t,this);mount(t,n,r){let o,i;r&&(typeof r=="function"?i=r:(i=r.optionHandler,r.replaceRequest===!1?o=c=>c:o=r.replaceRequest));const s=i?c=>{const u=i(c);return Array.isArray(u)?u:[u]}:c=>{let u;try{u=c.executionCtx}catch{}return[c.env,u]};o||=(()=>{const c=Zd(this._basePath,t),u=c==="/"?0:c.length;return f=>{const p=new URL(f.url);return p.pathname=p.pathname.slice(u)||"/",new Request(p,f)}})();const a=async(c,u)=>{const f=await n(o(c.req.raw),...s(c));if(f)return f;await u()};return this.#i(Yn,Zd(t,"*"),a),this}#i(t,n,r){t=t.toUpperCase(),n=Zd(this._basePath,n);const o={basePath:this._basePath,path:n,method:t,handler:r};this.router.add(t,n,[r,o]),this.routes.push(o)}#r(t,n){if(t instanceof Error)return this.errorHandler(t,n);throw t}#o(t,n,r,o){if(o==="HEAD")return(async()=>new Response(null,await this.#o(t,n,r,"GET")))();const i=this.getPath(t,{env:r}),s=this.router.match(o,i),a=new uge(t,{path:i,matchResult:s,env:r,executionCtx:n,notFoundHandler:this.#n});if(s[0].length===1){let u;try{u=s[0][0][0][0](a,async()=>{a.res=await this.#n(a)})}catch(f){return this.#r(f,a)}return u instanceof Promise?u.then(f=>f||(a.finalized?a.res:this.#n(a))).catch(f=>this.#r(f,a)):u??this.#n(a)}const c=zM(s[0],this.errorHandler,this.#n);return(async()=>{try{const u=await c(a);if(!u.finalized)throw new Error("Context is not finalized. Did you forget to return a Response object or `await next()`?");return u.res}catch(u){return this.#r(u,a)}})()}fetch=(t,...n)=>this.#o(t,n[1],n[0],t.method);request=(t,n,r,o)=>t instanceof Request?this.fetch(n?new Request(t,n):t,r,o):(t=t.toString(),this.fetch(new Request(/^https?:\/\//.test(t)?t:`http://localhost${Zd("/",t)}`,n),r,o));fire=()=>{addEventListener("fetch",t=>{t.respondWith(this.#o(t.request,t,void 0,t.request.method))})}},QF=[];function mge(e,t){const n=this.buildAllMatchers(),r=(o,i)=>{const s=n[o]||n[Yn],a=s[2][i];if(a)return a;const c=i.match(s[0]);if(!c)return[[],QF];const u=c.indexOf("",1);return[s[1][u],c]};return this.match=r,r(e,t)}var Tv="[^/]+",mm=".*",gm="(?:|/.*)",ef=Symbol(),gge=new Set(".\\+*[^]$()");function yge(e,t){return e.length===1?t.length===1?eg!==mm&&g!==gm))throw ef;if(i)return;u=this.#n[p]=new z_,f!==""&&(u.#t=o.varIndex++)}!i&&f!==""&&r.push([f,u.#t])}else if(u=this.#n[s],!u){if(Object.keys(this.#n).some(f=>f.length>1&&f!==mm&&f!==gm))throw ef;if(i)return;u=this.#n[s]=new z_}u.insert(a,n,r,o,i)}buildRegExpStr(){const n=Object.keys(this.#n).sort(yge).map(r=>{const o=this.#n[r];return(typeof o.#t=="number"?`(${r})@${o.#t}`:gge.has(r)?`\\${r}`:r)+o.buildRegExpStr()});return typeof this.#e=="number"&&n.unshift(`#${this.#e}`),n.length===0?"":n.length===1?n[0]:"(?:"+n.join("|")+")"}},bge=class{#e={varIndex:0};#t=new z_;insert(e,t,n){const r=[],o=[];for(let s=0;;){let a=!1;if(e=e.replace(/\{[^}]+\}/g,c=>{const u=`@\\${s}`;return o[s]=[u,c],s++,a=!0,u}),!a)break}const i=e.match(/(?::[^\/]+)|(?:\/\*$)|./g)||[];for(let s=o.length-1;s>=0;s--){const[a]=o[s];for(let c=i.length-1;c>=0;c--)if(i[c].indexOf(a)!==-1){i[c]=i[c].replace(a,o[s][1]);break}}return this.#t.insert(i,t,r,this.#e,n),r}buildRegExp(){let e=this.#t.buildRegExpStr();if(e==="")return[/^$/,[],[]];let t=0;const n=[],r=[];return e=e.replace(/#(\d+)|@(\d+)|\.\*\$/g,(o,i,s)=>i!==void 0?(n[++t]=Number(i),"$()"):(s!==void 0&&(r[Number(s)]=++t),"")),[new RegExp(`^${e}`),n,r]}},vge=[/^$/,[],Object.create(null)],ZF=Object.create(null);function ez(e){return ZF[e]??=new RegExp(e==="*"?"":`^${e.replace(/\/\*$|([.\\+*[^\]$()])/g,(t,n)=>n?`\\${n}`:"(?:|/.*)")}$`)}function xge(){ZF=Object.create(null)}function wge(e){const t=new bge,n=[];if(e.length===0)return vge;const r=e.map(u=>[!/\*|\/:/.test(u[0]),...u]).sort(([u,f],[p,g])=>u?1:p?-1:f.length-g.length),o=Object.create(null);for(let u=0,f=-1,p=r.length;u[S,Object.create(null)]),QF]:f++;let x;try{x=t.insert(y,f,g)}catch(S){throw S===ef?new KF(y):S}g||(n[f]=v.map(([S,E])=>{const C=Object.create(null);for(E-=1;E>=0;E--){const[_,j]=x[E];C[_]=j}return[S,C]}))}const[i,s,a]=t.buildRegExp();for(let u=0,f=n.length;uo.length-r.length))if(ez(n).test(t))return[...e[n]]}}var Sge=class{name="RegExpRouter";#e;#t;constructor(){this.#e={[Yn]:Object.create(null)},this.#t={[Yn]:Object.create(null)}}add(e,t,n){const r=this.#e,o=this.#t;if(!r||!o)throw new Error(YF);r[e]||[r,o].forEach(a=>{a[e]=Object.create(null),Object.keys(a[Yn]).forEach(c=>{a[e][c]=[...a[Yn][c]]})}),t==="/*"&&(t="*");const i=(t.match(/\/:/g)||[]).length;if(/\*$/.test(t)){const a=ez(t);e===Yn?Object.keys(r).forEach(c=>{r[c][t]||=qd(r[c],t)||qd(r[Yn],t)||[]}):r[e][t]||=qd(r[e],t)||qd(r[Yn],t)||[],Object.keys(r).forEach(c=>{(e===Yn||e===c)&&Object.keys(r[c]).forEach(u=>{a.test(u)&&r[c][u].push([n,i])})}),Object.keys(o).forEach(c=>{(e===Yn||e===c)&&Object.keys(o[c]).forEach(u=>a.test(u)&&o[c][u].push([n,i]))});return}const s=a7(t)||[t];for(let a=0,c=s.length;a{(e===Yn||e===f)&&(o[f][u]||=[...qd(r[f],u)||qd(r[Yn],u)||[]],o[f][u].push([n,i-c+a+1]))})}}match=mge;buildAllMatchers(){const e=Object.create(null);return Object.keys(this.#t).concat(Object.keys(this.#e)).forEach(t=>{e[t]||=this.#n(t)}),this.#e=this.#t=void 0,xge(),e}#n(e){const t=[];let n=e===Yn;return[this.#e,this.#t].forEach(r=>{const o=r[e]?Object.keys(r[e]).map(i=>[i,r[e][i]]):[];o.length!==0?(n||=!0,t.push(...o)):e!==Yn&&t.push(...Object.keys(r[Yn]).map(i=>[i,r[Yn][i]]))}),n?wge(t):null}},Ege=class{name="SmartRouter";#e=[];#t=[];constructor(e){this.#e=e.routers}add(e,t,n){if(!this.#t)throw new Error(YF);this.#t.push([e,t,n])}match(e,t){if(!this.#t)throw new Error("Fatal error");const n=this.#e,r=this.#t,o=n.length;let i=0,s;for(;iu.indexOf(a)===c),score:this.#i}}),o}#o(t,n,r,o){const i=[];for(let s=0,a=t.#e.length;s1&&r.sort((c,u)=>c.score-u.score),[r.map(({handler:c,params:u})=>[c,u])]}},Nge=class{name="TrieRouter";#e;constructor(){this.#e=new tz}add(e,t,n){const r=a7(t);if(r){for(let o=0,i=r.length;o0){for(const r of n)if(typeof t=="string"?t.startsWith(r):_2(t,r))throw new Error(`Path "${r}" is restricted`)}}async patch(t,n){const r=this.clone(),o=t.length>0?X0({},t,n):n;this.throwIfRestricted(o);const i=DL(r,o,(a,c)=>{if(Array.isArray(a)&&Array.isArray(c))return c});if(this.options?.overwritePaths){const c=kL(n).map(u=>t.length>0?t+"."+u:u).filter(u=>this.options?.overwritePaths?.some(f=>typeof f=="string"?u===f:f.test(u)));if(c.length>0){const u=c.length>1?c.filter(f=>c.some(p=>p!==f&&p.startsWith(f))):c;for(const f of u)X0(i,f,Wm(o,f))}}const s=await this.set(i);return[o,s]}async overwrite(t,n){const r=this.clone(),o=t.length>0?X0({},t,n):n;this.throwIfRestricted(o);const i=X0(r,t,n),s=await this.set(i);return[o,s]}has(t){const n=t.split(".");if(n.length>1){const r=n.slice(0,-1).join(".");if(!_2(this._config,r))throw new Error(`Parent path "${r}" does not exist`)}return _2(this._config,t)}async remove(t){if(this.throwIfRestricted(t),!this.has(t))throw new Error(`Path "${t}" does not exist`);const n=this.clone(),r=Wm(n,t),o=Cv(n,t),i=await this.set(o);return[r,i]}}let Ug=class{constructor(t,n){this._ctx=n,this._schema=new UM(this.getSchema(),t,{forceParse:this.useForceParse(),onUpdate:async r=>{await this._listener(r)},restrictPaths:this.getRestrictedPaths(),overwritePaths:this.getOverwritePaths(),onBeforeUpdate:this.onBeforeUpdate.bind(this)})}_built=!1;_schema;_listener=()=>null;static ctx_flags={sync_required:!1,ctx_reload_required:!1};onBeforeUpdate(t,n){return n}setListener(t){return this._listener=t,this}useForceParse(){return!1}getRestrictedPaths(){}getOverwritePaths(){}get configDefault(){return this._schema.default()}get config(){return this._schema.get()}setContext(t){return this._ctx=t,this}schema(){return this._schema}onServerInit(t){}get ctx(){if(!this._ctx)throw new Error("Context not set");return this._ctx}async build(){throw new Error("Not implemented")}setBuilt(){this._built=!0,this._schema=new UM(this.getSchema(),this.toJSON(!0),{onUpdate:async t=>{await this._listener(t)},forceParse:this.useForceParse(),restrictPaths:this.getRestrictedPaths(),overwritePaths:this.getOverwritePaths(),onBeforeUpdate:this.onBeforeUpdate.bind(this)})}isBuilt(){return this._built}throwIfNotBuilt(){if(!this._built)throw new Error("Config not built: "+this.constructor.name)}toJSON(t){return this.config}};class _ge extends F7{name="dummy";supported={batching:!0};constructor(){super(void 0)}getFieldSchema(t,n){throw new Error("Method not implemented.")}}const nz=Ve({entity:le(),min_items:bt(),max_items:bt(),mime_types:un(le()),...rs.properties}).partial();class Ym extends os{type="media";constructor(t,n){super(t,{...n,fillable:["update"],virtual:!0})}getSchema(){return nz}getMaxItems(){return this.config.max_items}getAllowedMimeTypes(){return this.config.mime_types}getMinItems(){return this.config.min_items}schema(){}toJsonSchema(){const t="../schema.json#/properties/media",n=this.config?.min_items,r=this.config?.max_items;return r===1?{$ref:t}:{type:"array",items:{$ref:t},minItems:n,maxItems:r}}}const Z0={text:e=>new Sv(e.field_name,{...e.config,required:e.is_required}),number:e=>new tF(e.field_name,{...e.config,required:e.is_required}),date:e=>new $_(e.field_name,{...e.config,required:e.is_required}),datetime:e=>new $_(e.field_name,{...e.config,required:e.is_required}),boolean:e=>new H7(e.field_name,{...e.config,required:e.is_required}),enumm:e=>new G7(e.field_name,{...e.config,required:e.is_required}),json:e=>new Y7(e.field_name,{...e.config,required:e.is_required}),jsonSchema:e=>new Z7(e.field_name,{...e.config,required:e.is_required}),media:e=>new Ym(e.field_name,{...e.config,entity:e.entity.name,required:e.is_required}),medium:e=>new Ym(e.field_name,{...e.config,entity:e.entity.name,required:e.is_required})};class Sh{constructor(t,n,r){this.type=t,this.config=n,this.is_required=r}required(){return this.is_required=!0,this}getField(t){if(!Z0[this.type])throw new Error(`Unknown field type: ${this.type}`);try{return Z0[this.type](t)}catch(n){throw new Error(`Faild to construct field "${this.type}": ${n}`)}}make(t){if(!Z0[this.type])throw new Error(`Unknown field type: ${this.type}`);try{return Z0[this.type]({entity:{name:"unknown",fields:{}},field_name:t,config:this.config,is_required:this.is_required})}catch(n){throw new Error(`Faild to construct field "${this.type}": ${n}`)}}}function ys(e){return new Sh("text",e,!1)}function Cge(e){return new Sh("number",e,!1)}function Oge(e){return new Sh("date",{...e,type:"datetime"},!1)}function jge(e){return new Sh("boolean",e,!1)}function HM(e){const n={options:{type:typeof e?.enum?.[0]!="string"?"objects":"strings",values:e?.enum??[]}};return new Sh("enumm",n,!1)}function Age(e){return new Sh("json",e,!1)}function rz(e,t,n,r){const o=[];for(const[i,s]of Object.entries(t)){const a=s,c={entity:{name:e,fields:t},field_name:i,config:a.config,is_required:a.is_required};o.push(a.getField(c))}return new Kl(e,o,n,r)}function Tge(e){return{manyToOne:(t,n)=>new ac(e,t,n),oneToOne:(t,n)=>new F_(e,t,n),manyToMany:(t,n,r)=>{const o=[];if(r){const i=r,s=[],a=n?.connectionTable??Ra.defaultConnectionTable(e,t);for(const[c,u]of Object.entries(r)){const f=u,p={entity:{name:a,fields:i},field_name:c,config:f.config,is_required:f.is_required};s.push(f.getField(p))}o.push(s)}return new Ra(e,t,n,o)},polyToOne:(t,n)=>new Ov(e,t,{...n,targetCardinality:1}),polyToMany:(t,n)=>new Ov(e,t,n)}}function $ge(e){return{on:(t,n)=>{const r=t.map(o=>{const i=e.field(o);if(!i)throw new Error(`Field "${String(o)}" not found on entity "${e.name}"`);return i});return new iF(e,r,n)}}}class Rge extends Jm{constructor(t,n=[],r=[]){super(Object.values(t),new _ge,n,r),this.__entities=t}withConnection(t){return new Jm(this.entities,t,this.relations.all,this.indices)}}function oz(e,t){const n=[],r=[],o=a=>new Proxy(Tge(a),{get(c,u){return(...f)=>(n.push(c[u](...f)),o(a))}}),i=a=>new Proxy($ge(a),{get(c,u){return(...f)=>(r.push(c[u](...f)),i(a))}});t&&t({relation:o,index:i},e);const s=new Rge(e,n,r);return{DB:s.__entities,entities:s.__entities,relations:n,indices:r,proto:s,toJSON:()=>s.toJSON()}}function kge(e,t){const n=e.toJSON(),r=o=>{if($a(o)&&("required"in o&&t?.removeRequired&&(o.required=void 0),"default"in o&&t?.removeDefault&&(o.default=void 0),"properties"in o&&$a(o.properties)))for(const i in o.properties)o.properties[i]=r(o.properties[i]);return o};return r(n),Pi(n)}function Mge(e,t){const n={...e.properties};return Vt(n,(r,o)=>{if(!t(r))return r})}const Lf=Symbol.for("bknd-mcp-schema");class fA{constructor(t,n,r){this.schema=t,this.name=n,this.options=r,this.cleanSchema=this.getCleanSchema(this.schema)}cleanSchema;getCleanSchema(t){if(t.type!=="object")return t;const n=Mge(t,o=>$a(o)&&Lf in o),r=Ve(n);return kge(r,{removeRequired:!0,removeDefault:!1})}getToolOptions(t){const{tools:n,resources:r,...o}=this.options,i=s=>s&&[t&&Ta(t),s].filter(Boolean).join(" ");return{title:i(this.options.title??this.schema.title),description:i(this.options.description??this.schema.description),annotations:{destructiveHint:!0,idempotentHint:!0,...o.annotations}}}getManager(t){const n=t.context.app.modules;if("mutateConfigSafe"in n)return n;throw new Error("Manager not found")}}class Pge extends Lj{constructor(t,n,r){const{mcp:o,...i}=r||{};super(n,i),this[Lf]=new fA(this,t,o||{})}get mcp(){return this[Lf]}toolGet(t){return new ql([this.mcp.name,"get"].join("_"),{...this.mcp.getToolOptions("get"),inputSchema:Ve({path:le({pattern:/^[a-zA-Z0-9_.]{0,}$/,title:"Path",description:"Path to the property to get, e.g. `key.subkey`"}).optional(),depth:bt({description:"Limit the depth of the response"}).optional(),secrets:at({default:!1,description:"Include secrets in the response config"}).optional()}),annotations:{readOnlyHint:!0,destructiveHint:!1}},async(n,r)=>{const o=r.context.app.toJSON(n.secrets),i=Bn(o,t.instancePath);let s=Bn(i,n.path??[]);return n.depth&&(s=oie(s,n.depth)),r.json({path:n.path??"",secrets:n.secrets??!1,partial:!!n.depth,value:s??null})})}toolUpdate(t){const n=this.mcp.cleanSchema;return new ql([this.mcp.name,"update"].join("_"),{...this.mcp.getToolOptions("update"),inputSchema:Ve({full:at({default:!1}).optional(),return_config:at({default:!1,description:"If the new configuration should be returned"}).optional(),value:Ve(n.properties).partial()})},async(r,o)=>{const{full:i,value:s,return_config:a}=r,[c]=t.instancePath,u=this.mcp.getManager(o);i?await u.mutateConfigSafe(c).set(s):await u.mutateConfigSafe(c).patch("",s);let f;if(a){const p=o.context.app.toJSON();f=Bn(p,t.instancePath)}return o.json({success:!0,module:c,config:f})})}getTools(t){const{tools:n=[]}=this.mcp.options;return[this.toolGet(t),this.toolUpdate(t),...n]}}const Ow=(e,t,n)=>new Pge(e,t,n),qM=Symbol.for("bknd-mcp-record-opts");class Dge extends Fj{constructor(t,n,r,o){const{mcp:i,...s}=r||{};super(n,s),this[Lf]=new fA(this,t,i||{}),this[qM]={new_schema:o}}get mcp(){return this[Lf]}getNewSchema(t=this.additionalProperties){return this[qM].new_schema??this.additionalProperties??t}toolGet(t){return new ql([this.mcp.name,"get"].join("_"),{...this.mcp.getToolOptions("get"),inputSchema:Ve({key:le({description:"key to get"}).optional(),secrets:at({default:!1,description:"(optional) include secrets in the response config"}).optional(),schema:at({default:!1,description:"(optional) include the schema in the response"}).optional()}),annotations:{readOnlyHint:!0,destructiveHint:!1}},async(n,r)=>{const o=r.context.app.toJSON(n.secrets),i=Bn(o,t.instancePath),[s]=t.instancePath,a=n.schema?this.getNewSchema().toJSON():void 0;if(n.key){if(!(n.key in i))throw new Error(`Key "${n.key}" not found in config`);const c=Bn(i,n.key);return r.json({secrets:n.secrets??!1,module:s,key:n.key,value:c??null,schema:a})}return r.json({secrets:n.secrets??!1,module:s,key:null,value:i??null,schema:a})})}toolAdd(t){return new ql([this.mcp.name,"add"].join("_"),{...this.mcp.getToolOptions("add"),inputSchema:Ve({key:le({description:"key to add"}),value:this.getNewSchema(),return_config:at({default:!1,description:"If the new configuration should be returned"}).optional()})},async(n,r)=>{const o=r.context.app.toJSON(!0),i=Bn(o,t.instancePath),[s,...a]=t.instancePath,c=this.mcp.getManager(r);if(n.key in i)throw new Error(`Key "${n.key}" already exists in config`);await c.mutateConfigSafe(s).patch([...a,n.key],n.value);const u=Bn(r.context.app.toJSON(),t.instancePath);return r.json({success:!0,module:s,action:{type:"add",key:n.key},config:n.return_config?u:void 0})})}toolUpdate(t){return new ql([this.mcp.name,"update"].join("_"),{...this.mcp.getToolOptions("update"),inputSchema:Ve({key:le({description:"key to update"}),value:this.mcp.getCleanSchema(this.getNewSchema(ke({}))),return_config:at({default:!1,description:"If the new configuration should be returned"}).optional()})},async(n,r)=>{const o=r.context.app.toJSON(!0),i=Bn(o,t.instancePath),[s,...a]=t.instancePath,c=this.mcp.getManager(r);if(!(n.key in i))throw new Error(`Key "${n.key}" not found in config`);await c.mutateConfigSafe(s).patch([...a,n.key],n.value);const u=Bn(r.context.app.toJSON(),t.instancePath);return r.json({success:!0,module:s,action:{type:"update",key:n.key},config:n.return_config?u:void 0})})}toolRemove(t){return new ql([this.mcp.name,"remove"].join("_"),{...this.mcp.getToolOptions("get"),inputSchema:Ve({key:le({description:"key to remove"}),return_config:at({default:!1,description:"If the new configuration should be returned"}).optional()})},async(n,r)=>{const o=r.context.app.toJSON(!0),i=Bn(o,t.instancePath),[s,...a]=t.instancePath,c=this.mcp.getManager(r);if(!(n.key in i))throw new Error(`Key "${n.key}" not found in config`);await c.mutateConfigSafe(s).remove([...a,n.key].join("."));const u=Bn(r.context.app.toJSON(),t.instancePath);return r.json({success:!0,module:s,action:{type:"remove",key:n.key},config:n.return_config?u:void 0})})}getTools(t){const{tools:n=[],get:r=!0,add:o=!0,update:i=!0,remove:s=!0}=this.mcp.options;return[r&&this.toolGet(t),o&&this.toolAdd(t),i&&this.toolUpdate(t),s&&this.toolRemove(t),...n].filter(Boolean)}}const ym=(e,t,n,r)=>new Dge(e,t,n,r),Ige=(e,t,n)=>{const r=new fA(t,e,{}),o=a=>new ql([r.name,"get"].join("_"),{...r.getToolOptions("get"),inputSchema:Ve({secrets:at({default:!1,description:"Include secrets in the response config"}).optional()})},async(c,u)=>{const f=u.context.app.toJSON(c.secrets),p=Bn(f,a.instancePath);return u.json({secrets:c.secrets??!1,value:p??null})}),i=a=>new ql([r.name,"update"].join("_"),{...r.getToolOptions("update"),inputSchema:Ve({value:t,return_config:at({default:!1}).optional(),secrets:at({default:!1}).optional()})},async(c,u)=>{const{value:f,return_config:p,secrets:g}=c,[y,...v]=a.instancePath;await r.getManager(u).mutateConfigSafe(y).overwrite(v,f);let S;if(p){const E=u.context.app.toJSON(g);S=Bn(E,a.instancePath)}return u.json({success:!0,module:y,config:S})}),s=a=>{const{tools:c=[]}=r.options;return[o(a),i(a),...c]};return Object.assign(t,{[Lf]:r,getTools:s})};var Lge=e=>{const n={...{origin:"*",allowMethods:["GET","HEAD","PUT","POST","DELETE","PATCH"],allowHeaders:[],exposeHeaders:[]},...e},r=(i=>typeof i=="string"?i==="*"?()=>i:s=>i===s?s:null:typeof i=="function"?i:s=>i.includes(s)?s:null)(n.origin),o=(i=>typeof i=="function"?i:Array.isArray(i)?()=>i:()=>[])(n.allowMethods);return async function(s,a){function c(f,p){s.res.headers.set(f,p)}const u=await r(s.req.header("origin")||"",s);if(u&&c("Access-Control-Allow-Origin",u),n.credentials&&c("Access-Control-Allow-Credentials","true"),n.exposeHeaders?.length&&c("Access-Control-Expose-Headers",n.exposeHeaders.join(",")),s.req.method==="OPTIONS"){n.origin!=="*"&&c("Vary","Origin"),n.maxAge!=null&&c("Access-Control-Max-Age",n.maxAge.toString());const f=await o(s.req.header("origin")||"",s);f.length&&c("Access-Control-Allow-Methods",f.join(","));let p=n.allowHeaders;if(!p?.length){const g=s.req.header("Access-Control-Request-Headers");g&&(p=g.split(/\s*,\s*/))}return p?.length&&(c("Access-Control-Allow-Headers",p.join(",")),s.res.headers.append("Vary","Access-Control-Request-Headers")),s.res.headers.delete("Content-Length"),s.res.headers.delete("Content-Type"),new Response(null,{headers:s.res.headers,status:204,statusText:"No Content"})}await a(),n.origin!=="*"&&s.header("Vary","Origin",{append:!0})}};class Hg extends Br{getSafeErrorAndCode(){return{error:"Invalid credentials",code:Qt.UNAUTHORIZED}}toJSON(){return ir()?super.toJSON():{error:this.getSafeErrorAndCode().error,type:"AuthException"}}}class Fge extends Hg{name="UserNotFoundException";code=Qt.NOT_FOUND;constructor(){super("User not found")}}class Lp extends Hg{name="InvalidCredentialsException";code=Qt.UNAUTHORIZED;constructor(){super("Invalid credentials")}}class zge extends Hg{name="UnableToCreateUserException";code=Qt.INTERNAL_SERVER_ERROR;constructor(){super("Unable to create user")}}class aa extends Hg{code=Qt.UNPROCESSABLE_ENTITY;constructor(t){super(t??"Invalid conditions")}}const WM=["GET","POST","PATCH","PUT","DELETE"],Bge=Ow("config_server",{cors:Ve({origin:le({default:"*"}),allow_methods:un(le({enum:WM}),{default:WM,uniqueItems:!0}),allow_headers:un(le(),{default:["Content-Type","Content-Length","Authorization","Accept"]}),allow_credentials:at({default:!0})}),mcp:Ve({enabled:at({default:!1}),path:le({default:"/api/system/mcp"}),logLevel:le({enum:Zae,default:"warning"})})},{description:"Server configuration"}).strict();class Vge extends Ug{getRestrictedPaths(){return[]}get client(){return this.ctx.server}getSchema(){return Bge}async build(){const t=this.config.cors.origin??"*",n=t.includes(",")?t.split(",").map(o=>o.trim()):[t],r=n.includes("*");this.client.use("*",Lge({origin:o=>r||n.includes(o)?o:void 0,allowMethods:this.config.cors.allow_methods,allowHeaders:this.config.cors.allow_headers,credentials:this.config.cors.allow_credentials})),this.client.use("/",async(o,i)=>{await i(),(!o.finalized||o.res.status===404)&&new URL(o.req.url).pathname==="/"&&(o.res=void 0,o.res=Response.json({bknd:"hello world!"}))}),this.client.onError((o,i)=>(rt.error("[AppServer:onError]",o),o instanceof Response?o:o instanceof Hg?ir()?i.json(o.toJSON(),o.code):i.json(o.toJSON(),o.getSafeErrorAndCode().code):o instanceof Br?i.json(o.toJSON(),o.code):o instanceof Error&&ir()?i.json({error:o.message,stack:o.stack?.split(` +`).map(s=>s.trim())},500):i.json({error:o.message},500))),this.setBuilt()}toJSON(t){return this.config}}Ve({description:le(),filterable:at()}).partial();class hA extends yh{name="InvalidPermissionContextError";code=Qt.INTERNAL_SERVER_ERROR;static from(t){return new hA(t.schema,t.value,t.errors)}}let On=class{constructor(t,n={},r=void 0){this.name=t,this.options=n,this.context=r}isFilterable(){return this.options.filterable===!0}parseContext(t,n){if(!this.context)return t;try{return this.context?Cn(this.context,t,n):void 0}catch(r){throw r instanceof yh?hA.from(r):r}}toJSON(){return{name:this.name,...this.options,context:this.context}}};const B_=new On("auth.user.create"),iz=new On("auth.user.password.test"),sz=new On("auth.user.password.change"),az=new On("auth.user.token.create"),Uge=Object.freeze(Object.defineProperty({__proto__:null,changePassword:sz,createToken:az,createUser:B_,testPassword:iz},Symbol.toStringTag,{value:"Module"})),Zr=new On("data.entity.read",{filterable:!0},ke({entity:le(),id:Rt([bt(),le()]).optional()})),Km=new On("data.entity.create",{filterable:!0},ke({entity:le()})),em=new On("data.entity.update",{filterable:!0},ke({entity:le(),id:Rt([bt(),le()]).optional()})),tm=new On("data.entity.delete",{filterable:!0},ke({entity:le(),id:Rt([bt(),le()]).optional()})),lz=new On("data.database.sync"),Hge=new On("data.raw.query"),qge=new On("data.raw.mutate"),Wge=Object.freeze(Object.defineProperty({__proto__:null,databaseSync:lz,entityCreate:Km,entityDelete:tm,entityRead:Zr,entityUpdate:em,rawMutate:qge,rawQuery:Hge},Symbol.toStringTag,{value:"Module"}));var cz=e=>e;function uz(e){const t=e instanceof Request?e:e.req.raw;return new URL(t.url).pathname}function Gge(e,t){const n=e.get("auth");if(!n)throw new Error("auth ctx not found");if(n.skip)return!0;const r=e.req.raw;if(!t)return!1;const o=uz(r),i=t.some(s=>nie(o,s));return n.skip=i,i}const Jge=e=>cz(async(t,n)=>{t.get("auth")||t.set("auth",{registered:!1,resolved:!1,skip:!1,user:void 0});const r=t.get("app"),o=t.get("auth"),i=r?.module.auth.authenticator;let s=Gge(t,e?.skip)||!r?.module.auth.enabled;o.registered?(s=!0,rt.debug(`auth middleware already registered for ${uz(t)}`)):(o.registered=!0,!s&&!o.resolved&&r?.module.auth.enabled&&(o.user=await i?.resolveAuthFromRequest(t),o.resolved=!0)),await n(),o.skip=!1,o.resolved=!1,o.user=void 0});function Yge(e){const t=e instanceof Request?e:e.req.raw;return new URL(t.url).pathname}const Kge=Symbol.for("permission");function Xge(e,t){const n=cz(async(r,o)=>{const i=r.get("app"),s=r.get("auth");if(!s)throw new Error("auth ctx not found");if(!s.registered||!i){const a=`auth middleware not registered, cannot check permissions for ${Yge(r)}`;if(i?.module.auth.enabled)throw new Error(a);rt.warn(a)}else if(!s.skip){const a=i.modules.ctx().guard,c=await t?.context?.(r)??{};if(t?.onGranted||t?.onDenied){let u;if(die(()=>a.granted(e,r,c),dle)?u=await t?.onDenied?.(r):u=await t?.onGranted?.(r),u instanceof Response)return u}else a.granted(e,r,c)}await o()});return Object.assign(n,{[Kge]:{permission:e,options:t}})}const Qge=Object.freeze(Object.defineProperty({__proto__:null,auth:Jge,permission:Xge},Symbol.toStringTag,{value:"Module"}));class qg{middlewares=Qge;create(){return qg.createServer()}static createServer(){return new Cw}getController(){return this.create()}isJsonRequest(t){return t.req.header("Content-Type")==="application/json"||t.req.header("Accept")==="application/json"}notFound(t){return this.isJsonRequest(t)?t.json({error:"Not found"},404):t.notFound()}getEntitiesEnum(t){const n=t.entities.map(r=>r.name);return n.length>0?Rt([le({enum:n}),le()]):le()}registerMcp(){}}class Zge extends qg{constructor(t){super(),this.auth=t}get guard(){return this.auth.ctx.guard}get em(){return this.auth.ctx.em}get userRepo(){const t=this.auth.config.entity_name;return this.em.repo(t)}registerStrategyActions(t,n){if(!this.auth.isStrategyEnabled(t))return;const r=t.getActions?.();if(!r)return;const{auth:o,permission:i}=this.middlewares,s=this.create().use(o()),a=t.getName(),{create:c,change:u}=r,f=this.auth.em;c&&(s.post("/create",i(B_,{}),i(Km,{context:p=>({entity:this.auth.config.entity_name})}),zt({summary:"Create a new user",tags:["auth"]}),async p=>{try{const g=await this.auth.authenticator.getBody(p),y=Cn(c.schema,g,{}),v=await c.preprocess?.(y)??y,x=f.mutator(this.auth.config.entity_name);x.__unstable_toggleSystemEntityCreation(!1);const{data:S}=await x.insertOne({...v,strategy:a});return x.__unstable_toggleSystemEntityCreation(!0),p.json({success:!0,action:"create",strategy:a,data:S})}catch(g){if(g instanceof yh)return p.json({success:!1,errors:g.errors},400);throw g}}),s.get("create/schema.json",zt({summary:"Get the schema for creating a user",tags:["auth"]}),async p=>p.json(c.schema))),n.route(`/${a}/actions`,s)}getController(){const{auth:t}=this.middlewares,n=this.create();n.get("/me",zt({summary:"Get the current user",tags:["auth"]}),eo("auth_me",{noErrorCodes:[403]}),t(),async o=>{const i=o.get("auth")?.user;if(i){const{data:s}=await this.userRepo.findId(i.id);return await this.auth.authenticator?.requestCookieRefresh(o),o.json({user:s})}return o.json({user:null},403)}),n.get("/logout",zt({summary:"Logout the current user",tags:["auth"]}),t(),async o=>{if(await this.auth.authenticator.logout(o),this.auth.authenticator.isJsonRequest(o))return o.json({ok:!0});const i=o.req.header("referer");return i?o.redirect(i):o.redirect("/")}),n.get("/strategies",zt({summary:"Get the available authentication strategies",tags:["auth"]}),eo("auth_strategies"),Ft("query",ke({include_disabled:at().optional()})),async o=>{const{include_disabled:i}=o.req.valid("query"),{strategies:s,basepath:a}=this.auth.toJSON(!1);return i?o.json({strategies:s,basepath:a}):o.json({strategies:Vt(s??{},(c,u)=>this.auth.isStrategyEnabled(u)?c:void 0),basepath:a})});const r=this.auth.authenticator.getStrategies();for(const[o,i]of Object.entries(r))this.auth.isStrategyEnabled(i)&&(n.route(`/${o}`,i.getController(this.auth.authenticator)),this.registerStrategyActions(i,n));return n}registerMcp(){const{mcp:t}=this.auth.ctx,n=Rt([bt({title:"Integer"}),le({title:"UUID"})]),r=async i=>{let s;if(i.id){const{data:a}=await this.userRepo.findId(i.id);s=a}else if(i.email){const{data:a}=await this.userRepo.findOne({email:i.email});s=a}if(!s)throw new Error("User not found");return s},o=Object.keys(this.auth.config.roles??{});try{const i=this.auth.authenticator.strategy("password").getActions();if(i.create){const s=i.create.schema;t.tool("auth_user_create",{description:"Create a new user",inputSchema:ke({...s.properties,role:le({enum:o.length>0?o:void 0}).optional()})},async(a,c)=>(await c.context.ctx().helper.granted(c,B_),c.json(await this.auth.createUser(a))))}}catch(i){rt.warn("error creating auth_user_create tool",i)}t.tool("auth_user_token",{description:"Get a user token",inputSchema:ke({id:n.optional(),email:le({format:"email"}).optional()})},async(i,s)=>{await s.context.ctx().helper.granted(s,az);const a=await r(i);return s.json({user:a,token:await this.auth.authenticator.jwt(a)})}),t.tool("auth_user_password_change",{description:"Change a user's password",inputSchema:ke({id:n.optional(),email:le({format:"email"}).optional(),password:le({minLength:8})})},async(i,s)=>{await s.context.ctx().helper.granted(s,sz);const a=await r(i);if(!await this.auth.changePassword(a.id,i.password))throw new Error("Failed to change password");return s.json({changed:!0})}),t.tool("auth_user_password_test",{description:"Test a user's password",inputSchema:ke({email:le({format:"email"}),password:le({minLength:8})})},async(i,s)=>{await s.context.ctx().helper.granted(s,iz);const u=await this.auth.authenticator.strategy("password").getController(this.auth.authenticator).request(new Request("https://localhost/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:i.email,password:i.password})}));return s.json({valid:u.ok})})}}const V_="__bknd_flash";function GM(e,t,n="info"){e.req.header("Accept")?.includes("text/html")&&h7(e,V_,JSON.stringify({type:n,message:t}),{path:"/"})}function eye(e){const t=document.cookie.split("; ");for(const n of t){const[r,o]=n.split("=");if(r===e)try{return decodeURIComponent(o)}catch{return null}}return null}function tye(e=!0){const t=eye(V_);return t&&e&&(document.cookie=`${V_}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`),t?JSON.parse(t):void 0}var dz=e=>hz(e.replace(/_|-/g,t=>({_:"/","-":"+"})[t]??t)),fz=e=>nye(e).replace(/\/|\+/g,t=>({"/":"_","+":"-"})[t]??t),nye=e=>{let t="";const n=new Uint8Array(e);for(let r=0,o=n.length;r{const t=atob(e),n=new Uint8Array(new ArrayBuffer(t.length)),r=t.length/2;for(let o=0,i=t.length-1;o<=r;o++,i--)n[o]=t.charCodeAt(o),n[i]=t.charCodeAt(i);return n},pz=(e=>(e.HS256="HS256",e.HS384="HS384",e.HS512="HS512",e.RS256="RS256",e.RS384="RS384",e.RS512="RS512",e.PS256="PS256",e.PS384="PS384",e.PS512="PS512",e.ES256="ES256",e.ES384="ES384",e.ES512="ES512",e.EdDSA="EdDSA",e))(pz||{}),rye=class extends Error{constructor(e){super(`${e} is not an implemented algorithm`),this.name="JwtAlgorithmNotImplemented"}},mz=class extends Error{constructor(e){super(`invalid JWT token: ${e}`),this.name="JwtTokenInvalid"}},oye=class extends Error{constructor(e){super(`token (${e}) is being used before it's valid`),this.name="JwtTokenNotBefore"}},iye=class extends Error{constructor(e){super(`token (${e}) expired`),this.name="JwtTokenExpired"}},sye=class extends Error{constructor(e,t){super(`Invalid "iat" claim, must be a valid number lower than "${e}" (iat: "${t}")`),this.name="JwtTokenIssuedAt"}},j2=class extends Error{constructor(e,t){super(`expected issuer "${e}", got ${t?`"${t}"`:"none"} `),this.name="JwtTokenIssuer"}},aye=class extends Error{constructor(e){super(`jwt header is invalid: ${JSON.stringify(e)}`),this.name="JwtHeaderInvalid"}},lye=class extends Error{constructor(e){super(`token(${e}) signature mismatched`),this.name="JwtTokenSignatureMismatched"}},cye=class extends Error{constructor(e){super(`required "aud" in jwt payload: ${JSON.stringify(e)}`),this.name="JwtPayloadRequiresAud"}},uye=class extends Error{constructor(e,t){super(`expected audience "${Array.isArray(e)?e.join(", "):e}", got "${t}"`),this.name="JwtTokenAudience"}},Xm=(e=>(e.Encrypt="encrypt",e.Decrypt="decrypt",e.Sign="sign",e.Verify="verify",e.DeriveKey="deriveKey",e.DeriveBits="deriveBits",e.WrapKey="wrapKey",e.UnwrapKey="unwrapKey",e))(Xm||{}),Wg=new TextEncoder,dye=new TextDecoder;async function fye(e,t,n){const r=gz(t),o=await pye(e,r);return await crypto.subtle.sign(r,o,n)}async function hye(e,t,n,r){const o=gz(t),i=await mye(e,o);return await crypto.subtle.verify(o,i,n,r)}function U_(e){return hz(e.replace(/-+(BEGIN|END).*/g,"").replace(/\s/g,""))}async function pye(e,t){if(!crypto.subtle||!crypto.subtle.importKey)throw new Error("`crypto.subtle.importKey` is undefined. JWT auth middleware requires it.");if(yz(e)){if(e.type!=="private"&&e.type!=="secret")throw new Error(`unexpected key type: CryptoKey.type is ${e.type}, expected private or secret`);return e}const n=[Xm.Sign];return typeof e=="object"?await crypto.subtle.importKey("jwk",e,t,!1,n):e.includes("PRIVATE")?await crypto.subtle.importKey("pkcs8",U_(e),t,!1,n):await crypto.subtle.importKey("raw",Wg.encode(e),t,!1,n)}async function mye(e,t){if(!crypto.subtle||!crypto.subtle.importKey)throw new Error("`crypto.subtle.importKey` is undefined. JWT auth middleware requires it.");if(yz(e)){if(e.type==="public"||e.type==="secret")return e;e=await JM(e)}if(typeof e=="string"&&e.includes("PRIVATE")){const r=await crypto.subtle.importKey("pkcs8",U_(e),t,!0,[Xm.Sign]);e=await JM(r)}const n=[Xm.Verify];return typeof e=="object"?await crypto.subtle.importKey("jwk",e,t,!1,n):e.includes("PUBLIC")?await crypto.subtle.importKey("spki",U_(e),t,!1,n):await crypto.subtle.importKey("raw",Wg.encode(e),t,!1,n)}async function JM(e){if(e.type!=="private")throw new Error(`unexpected key type: ${e.type}`);if(!e.extractable)throw new Error("unexpected private key is unextractable");const t=await crypto.subtle.exportKey("jwk",e),{kty:n}=t,{alg:r,e:o,n:i}=t,{crv:s,x:a,y:c}=t;return{kty:n,alg:r,e:o,n:i,crv:s,x:a,y:c,key_ops:[Xm.Verify]}}function gz(e){switch(e){case"HS256":return{name:"HMAC",hash:{name:"SHA-256"}};case"HS384":return{name:"HMAC",hash:{name:"SHA-384"}};case"HS512":return{name:"HMAC",hash:{name:"SHA-512"}};case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"RS384":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}};case"RS512":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}};case"PS256":return{name:"RSA-PSS",hash:{name:"SHA-256"},saltLength:32};case"PS384":return{name:"RSA-PSS",hash:{name:"SHA-384"},saltLength:48};case"PS512":return{name:"RSA-PSS",hash:{name:"SHA-512"},saltLength:64};case"ES256":return{name:"ECDSA",hash:{name:"SHA-256"},namedCurve:"P-256"};case"ES384":return{name:"ECDSA",hash:{name:"SHA-384"},namedCurve:"P-384"};case"ES512":return{name:"ECDSA",hash:{name:"SHA-512"},namedCurve:"P-521"};case"EdDSA":return{name:"Ed25519",namedCurve:"Ed25519"};default:throw new rye(e)}}function yz(e){return zL()==="node"&&crypto.webcrypto?e instanceof crypto.webcrypto.CryptoKey:e instanceof CryptoKey}var A2=e=>fz(Wg.encode(JSON.stringify(e)).buffer).replace(/=/g,""),gye=e=>fz(e).replace(/=/g,""),YM=e=>JSON.parse(dye.decode(dz(e)));function yye(e){if(typeof e=="object"&&e!==null){const t=e;return"alg"in t&&Object.values(pz).includes(t.alg)&&(!("typ"in t)||t.typ==="JWT")}return!1}var bye=async(e,t,n="HS256")=>{const r=A2(e);let o;typeof t=="object"&&"alg"in t?(n=t.alg,o=A2({alg:n,typ:"JWT",kid:t.kid})):o=A2({alg:n,typ:"JWT"});const i=`${o}.${r}`,s=await fye(t,n,Wg.encode(i)),a=gye(s);return`${i}.${a}`},vye=async(e,t,n)=>{const{alg:r="HS256",iss:o,nbf:i=!0,exp:s=!0,iat:a=!0,aud:c}=typeof n=="string"?{alg:n}:n||{},u=e.split(".");if(u.length!==3)throw new mz(e);const{header:f,payload:p}=bz(e);if(!yye(f))throw new aye(f);const g=Date.now()/1e3|0;if(i&&p.nbf&&p.nbf>g)throw new oye(e);if(s&&p.exp&&p.exp<=g)throw new iye(e);if(a&&p.iat&&gc instanceof RegExp?c.test(E):typeof c=="string"?E===c:Array.isArray(c)&&c.includes(E)))throw new uye(c,p.aud)}const y=e.substring(0,e.lastIndexOf("."));if(!await hye(t,r,dz(u[2]),Wg.encode(y)))throw new lye(e);return p},bz=e=>{try{const[t,n]=e.split("."),r=YM(t),o=YM(n);return{header:r,payload:o}}catch{throw new mz(e)}},pA={sign:bye,verify:vye,decode:bz},xye=pA.verify,wye=pA.decode,Sye=pA.sign;const vz=60*60*24*7,xz=Ve({domain:le().optional(),path:le({default:"/"}),sameSite:le({enum:["strict","lax","none"],default:"lax"}),secure:at({default:!0}),httpOnly:at({default:!0}),expires:bt({default:vz}),partitioned:at({default:!1}),renew:at({default:!0}),pathSuccess:le({default:"/"}),pathLoggedOut:le({default:"/"})}).partial(),wz=Ve({secret:Pm({default:""}),alg:le({enum:["HS256","HS384","HS512"],default:"HS256"}).optional(),expires:bt().optional(),issuer:le().optional(),fields:un(le(),{default:["id","email","role"]})},{default:{}}),Eye=ke({jwt:wz,cookie:xz,default_role_register:le().optional()});class Nye{constructor(t,n,r){this.strategies=t,this.userPool=n,this.config=Cn(Eye,r??{})}config;async resolveLogin(t,n,r,o,i){try{const s=i?.identifier||"email";if(typeof s!="string"||s.length===0)throw new aa("Identifier must be a string");if(!(s in r))throw new aa(`Profile must have identifier "${s}"`);const a=await this.userPool.findBy(n.getName(),s,r[s]);if(a.strategy_value){if(a.strategy!==n.getName())throw new aa("User signed up with a different strategy")}else throw new aa("User must have a strategy value");await o(a);const c=await this.safeAuthResponse(a);return this.respondWithUser(t,c,i)}catch(s){return this.respondWithError(t,s,i)}}async resolveRegister(t,n,r,o,i){try{const s=i?.identifier||"email";if(typeof s!="string"||s.length===0)throw new aa("Identifier must be a string");if(!(s in r))throw new aa(`Profile must have identifier "${s}"`);if(!("strategy_value"in r))throw new aa("Profile must have a strategy value");if("role"in r)throw new aa("Role cannot be provided during registration");const a=await this.userPool.create(n.getName(),{...r,role:this.config.default_role_register,strategy_value:r.strategy_value});await o(a);const c=await this.safeAuthResponse(a);return this.respondWithUser(t,c,i)}catch(s){return this.respondWithError(t,s,i)}}async respondWithUser(t,n,r){const o=this.getSafeUrl(t,r?.redirect??this.config.cookie.pathSuccess??"/");if("token"in n)return await this.setAuthCookie(t,n.token),this.isJsonRequest(t)||r?.forceJsonResponse?t.json(n):t.redirect(o);throw new Br("Invalid response")}async respondWithError(t,n,r){if(rt.error("respondWithError",n),this.isJsonRequest(t)||r?.forceJsonResponse)throw n;await GM(t,String(n),"error");const o=this.getSafeUrl(t,t.req.header("Referer")??"/");return t.redirect(o)}getStrategies(){return this.strategies}strategy(t){try{return this.strategies[t]}catch{throw new Error(`Strategy "${String(t)}" not found`)}}async jwt(t){const r={...Rm(t,this.config.jwt.fields),iat:Math.floor(Date.now()/1e3)};this.config.jwt?.issuer&&(r.iss=this.config.jwt.issuer),this.config.jwt?.expires&&(r.exp=Math.floor(Date.now()/1e3)+this.config.jwt.expires);const o=this.config.jwt.secret;if(!o||o.length===0)throw new Error("Cannot sign JWT without a secret");return Sye(r,o,this.config.jwt?.alg??"HS256")}async safeAuthResponse(t){const n=Rm(t,this.config.jwt.fields);return{user:n,token:await this.jwt(n)}}async verify(t){try{const n=await xye(t,this.config.jwt?.secret??"",this.config.jwt?.alg??"HS256");if(this.config.jwt?.issuer&&n.iss!==this.config.jwt.issuer)throw new Br("Invalid issuer",403);return n}catch(n){rt.debug("Authenticator jwt verify error",String(n))}}get cookieOptions(){const{expires:t=vz,renew:n,...r}=this.config.cookie;return{...r,domain:r.domain??void 0,expires:new Date(Date.now()+t*1e3)}}async getAuthCookie(t){try{const n=this.config.jwt.secret,r=await f7(t,n,"auth");return typeof r!="string"?void 0:r}catch(n){n instanceof Error&&rt.error("[getAuthCookie]",n.message);return}}async requestCookieRefresh(t){if(this.config.cookie.renew&&t.get("auth")?.user){const n=await this.getAuthCookie(t);n&&await this.setAuthCookie(t,n)}}async setAuthCookie(t,n){rt.debug("setting auth cookie",rie(n));const r=this.config.jwt.secret;await p7(t,"auth",n,r,this.cookieOptions)}async getAuthCookieHeader(t,n=new Headers){const r={header:(o,i)=>{n.set(o,i)}};return await this.setAuthCookie(r,t),n}async removeAuthCookieHeader(t=new Headers){const n={header:(r,o)=>{t.set(r,o)},req:{raw:{headers:t}}};return this.deleteAuthCookie(n),t}async unsafeGetAuthCookie(t){return Lb("auth",t,this.config.jwt.secret,this.cookieOptions)}deleteAuthCookie(t){rt.debug("deleting auth cookie"),Bae(t,"auth",this.cookieOptions)}async logout(t){rt.info("Logging out"),t.set("auth",void 0),await this.getAuthCookie(t)&&GM(t,"Signed out","info"),this.deleteAuthCookie(t)}isJsonRequest(t){return t.req.header("Content-Type")==="application/json"||t.req.header("Accept")==="application/json"}async getBody(t){return this.isJsonRequest(t)?await t.req.json():Object.fromEntries((await t.req.formData()).entries())}getSafeUrl(t,n){const r=n.replace(/\/+$/,"/");return uie("redirects_non_fq")?r:new URL(t.req.url).origin+r}async resolveAuthFromRequest(t){let n,r=!1;if(t instanceof Headers)n=t;else if(t instanceof Request)n=t.headers;else{r=!0;try{n=t.req.raw.headers}catch{throw new Br("Request/Headers/Context is required to resolve auth",400)}}let o;if(n.has("Authorization"))o=String(n.get("Authorization")).replace("Bearer ","");else{const i=r?t:{req:{raw:{headers:n}}};o=await this.getAuthCookie(i)}if(o)return await this.verify(o)}toJSON(t){return{...this.config,jwt:t?this.config.jwt:void 0}}}let H_;(typeof navigator>"u"||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(H_="oauth4webapi/v2.17.0");function Gg(e,t){if(e==null)return!1;try{return e instanceof t||Object.getPrototypeOf(e)[Symbol.toStringTag]===t.prototype[Symbol.toStringTag]}catch{return!1}}const $v=Symbol(),_ye=Symbol(),mA=Symbol(),Cye=Symbol(),Sz=Symbol(),Oye=Symbol(),jye=new TextEncoder,Aye=new TextDecoder;function Xl(e){return typeof e=="string"?jye.encode(e):Aye.decode(e)}const KM=32768;function Tye(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));const t=[];for(let n=0;n=this.maxSize&&(this._cache=this.cache,this.cache=new Map)}}class Zi extends Error{constructor(t){super(t??"operation not supported"),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}class kye extends Error{constructor(t,n){super(t,n),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}const Ge=kye,Ez=new Rye(100);function Nz(e){return e instanceof CryptoKey}function Mye(e){return Nz(e)&&e.type==="private"}function Pye(e){return Nz(e)&&e.type==="public"}function gA(e){try{const t=e.headers.get("dpop-nonce");t&&Ez.set(new URL(e.url).origin,t)}catch{}return e}function Ff(e){return!(e===null||typeof e!="object"||Array.isArray(e))}function jw(e){Gg(e,Headers)&&(e=Object.fromEntries(e.entries()));const t=new Headers(e);if(H_&&!t.has("user-agent")&&t.set("user-agent",H_),t.has("authorization"))throw new TypeError('"options.headers" must not include the "authorization" header name');if(t.has("dpop"))throw new TypeError('"options.headers" must not include the "dpop" header name');return t}function Dye(e){if(typeof e=="function"&&(e=e()),!(e instanceof AbortSignal))throw new TypeError('"options.signal" must return or be an instance of AbortSignal');return e}async function Iye(e,t){if(!(e instanceof URL))throw new TypeError('"issuerIdentifier" must be an instance of URL');if(e.protocol!=="https:"&&e.protocol!=="http:")throw new TypeError('"issuer.protocol" must be "https:" or "http:"');const n=new URL(e.href);switch(t?.algorithm){case void 0:case"oidc":n.pathname=`${n.pathname}/.well-known/openid-configuration`.replace("//","/");break;case"oauth2":n.pathname==="/"?n.pathname=".well-known/oauth-authorization-server":n.pathname=`.well-known/oauth-authorization-server/${n.pathname}`.replace("//","/");break;default:throw new TypeError('"options.algorithm" must be "oidc" (default), or "oauth2"')}const r=jw(t?.headers);return r.set("accept","application/json"),(t?.[mA]||fetch)(n.href,{headers:Object.fromEntries(r.entries()),method:"GET",redirect:"manual",signal:null}).then(gA)}function rr(e){return typeof e=="string"&&e.length!==0}async function Lye(e,t){if(!(e instanceof URL))throw new TypeError('"expectedIssuer" must be an instance of URL');if(!Gg(t,Response))throw new TypeError('"response" must be an instance of Response');if(t.status!==200)throw new Ge('"response" is not a conform Authorization Server Metadata response');Qm(t);let n;try{n=await t.json()}catch(r){throw new Ge('failed to parse "response" body as JSON',{cause:r})}if(!Ff(n))throw new Ge('"response" body must be a top level object');if(!rr(n.issuer))throw new Ge('"response" body "issuer" property must be a non-empty string');if(new URL(n.issuer).href!==e.href)throw new Ge('"response" body "issuer" does not match "expectedIssuer"');return n}function _z(){return xa(crypto.getRandomValues(new Uint8Array(32)))}function XM(){return _z()}async function Fye(e){if(!rr(e))throw new TypeError('"codeVerifier" must be a non-empty string');return xa(await crypto.subtle.digest("SHA-256",Xl(e)))}function QM(e){return encodeURIComponent(e).replace(/%20/g,"+")}function zye(e,t){const n=QM(e),r=QM(t);return`Basic ${btoa(`${n}:${r}`)}`}function Bye(e){switch(e.algorithm.hash.name){case"SHA-256":return"PS256";case"SHA-384":return"PS384";case"SHA-512":return"PS512";default:throw new Zi("unsupported RsaHashedKeyAlgorithm hash name")}}function Vye(e){switch(e.algorithm.hash.name){case"SHA-256":return"RS256";case"SHA-384":return"RS384";case"SHA-512":return"RS512";default:throw new Zi("unsupported RsaHashedKeyAlgorithm hash name")}}function Uye(e){switch(e.algorithm.namedCurve){case"P-256":return"ES256";case"P-384":return"ES384";case"P-521":return"ES512";default:throw new Zi("unsupported EcKeyAlgorithm namedCurve")}}function Hye(e){switch(e.algorithm.name){case"RSA-PSS":return Bye(e);case"RSASSA-PKCS1-v1_5":return Vye(e);case"ECDSA":return Uye(e);case"Ed25519":case"Ed448":return"EdDSA";default:throw new Zi("unsupported CryptoKey algorithm name")}}function Jg(e){const t=e?.[$v];return typeof t=="number"&&Number.isFinite(t)?t:0}function yA(e){const t=e?.[_ye];return typeof t=="number"&&Number.isFinite(t)&&Math.sign(t)!==-1?t:30}function bA(){return Math.floor(Date.now()/1e3)}function Yg(e){if(typeof e!="object"||e===null)throw new TypeError('"as" must be an object');if(!rr(e.issuer))throw new TypeError('"as.issuer" property must be a non-empty string');return!0}function Kg(e){if(typeof e!="object"||e===null)throw new TypeError('"client" must be an object');if(!rr(e.client_id))throw new TypeError('"client.client_id" property must be a non-empty string');return!0}function ZM(e){if(!rr(e))throw new TypeError('"client.client_secret" property must be a non-empty string');return e}function e6(e,t){if(t!==void 0)throw new TypeError(`"client.client_secret" property must not be provided when ${e} client authentication method is used.`)}async function qye(e,t,n,r,o){switch(n.delete("client_secret"),n.delete("client_assertion_type"),n.delete("client_assertion"),t.token_endpoint_auth_method){case void 0:case"client_secret_basic":{r.set("authorization",zye(t.client_id,ZM(t.client_secret)));break}case"client_secret_post":{n.set("client_id",t.client_id),n.set("client_secret",ZM(t.client_secret));break}case"private_key_jwt":throw e6("private_key_jwt",t.client_secret),new TypeError('"options.clientPrivateKey" must be provided when "client.token_endpoint_auth_method" is "private_key_jwt"');case"tls_client_auth":case"self_signed_tls_client_auth":case"none":{e6(t.token_endpoint_auth_method,t.client_secret),t.token_endpoint_auth_method,n.set("client_id",t.client_id);break}default:throw new Zi("unsupported client token_endpoint_auth_method")}}async function Wye(e,t,n){if(!n.usages.includes("sign"))throw new TypeError('CryptoKey instances used for signing assertions must include "sign" in their "usages"');const r=`${xa(Xl(JSON.stringify(e)))}.${xa(Xl(JSON.stringify(t)))}`,o=xa(await crypto.subtle.sign(Mz(n),n,Xl(r)));return`${r}.${o}`}async function Gye(e,t,n,r,o,i){const{privateKey:s,publicKey:a,nonce:c=Ez.get(n.origin)}=t;if(!Mye(s))throw new TypeError('"DPoP.privateKey" must be a private CryptoKey');if(!Pye(a))throw new TypeError('"DPoP.publicKey" must be a public CryptoKey');if(c!==void 0&&!rr(c))throw new TypeError('"DPoP.nonce" must be a non-empty string or undefined');if(!a.extractable)throw new TypeError('"DPoP.publicKey.extractable" must be true');const u=bA()+o,f={alg:Hye(s),typ:"dpop+jwt",jwk:await Yye(a)},p={iat:u,jti:_z(),htm:r,nonce:c,htu:`${n.origin}${n.pathname}`,ath:i?xa(await crypto.subtle.digest("SHA-256",Xl(i))):void 0};t[Cye]?.(f,p),e.set("dpop",await Wye(f,p,s))}let zb;async function Jye(e){const{kty:t,e:n,n:r,x:o,y:i,crv:s}=await crypto.subtle.exportKey("jwk",e),a={kty:t,e:n,n:r,x:o,y:i,crv:s};return zb.set(e,a),a}async function Yye(e){return zb||(zb=new WeakMap),zb.get(e)||Jye(e)}function t6(e,t,n){if(typeof e!="string")throw n?new TypeError(`"as.mtls_endpoint_aliases.${t}" must be a string`):new TypeError(`"as.${t}" must be a string`);return new URL(e)}function Cz(e,t,n=!1){return n&&e.mtls_endpoint_aliases&&t in e.mtls_endpoint_aliases?t6(e.mtls_endpoint_aliases[t],t,n):t6(e[t],t,n)}function Oz(e,t){return!!(e.use_mtls_endpoint_aliases||t?.[Oye])}function uf(e){const t=e;return typeof t!="object"||Array.isArray(t)||t===null?!1:t.error!==void 0}function Kye(e){return e.length>=2&&e[0]==='"'&&e[e.length-1]==='"'?e.slice(1,-1):e}const Xye=/((?:,|, )?[0-9a-zA-Z!#$%&'*+-.^_`|~]+=)/,Qye=/(?:^|, ?)([0-9a-zA-Z!#$%&'*+\-.^_`|~]+)(?=$|[ ,])/g;function Zye(e,t){const n=t.split(Xye).slice(1);if(!n.length)return{scheme:e.toLowerCase(),parameters:{}};n[n.length-1]=n[n.length-1].replace(/,$/,"");const r={};for(let o=1;o{const c=a[s+1];let u;return c?u=t.slice(i,c[1]):u=t.slice(i),Zye(o,u)}):void 0}async function e0e(e,t,n,r,o,i){if(!rr(e))throw new TypeError('"accessToken" must be a non-empty string');if(!(n instanceof URL))throw new TypeError('"url" must be an instance of URL');return r=jw(r),i?.DPoP===void 0?r.set("authorization",`Bearer ${e}`):(await Gye(r,i.DPoP,n,t.toUpperCase(),Jg({[$v]:i?.[$v]}),e),r.set("authorization",`DPoP ${e}`)),(i?.[mA]||fetch)(n.href,{body:o,headers:Object.fromEntries(r.entries()),method:t,redirect:"manual",signal:i?.signal?Dye(i.signal):null}).then(gA)}async function r6(e,t,n,r){Yg(e),Kg(t);const o=Cz(e,"userinfo_endpoint",Oz(t,r)),i=jw(r?.headers);return t.userinfo_signed_response_alg?i.set("accept","application/jwt"):(i.set("accept","application/json"),i.append("accept","application/jwt")),e0e(n,"GET",o,i,null,{...r,[$v]:Jg(t)})}const t0e=Symbol();function n0e(e){return e.headers.get("content-type")?.split(";")[0]}async function r0e(e,t,n,r){if(Yg(e),Kg(t),!Gg(r,Response))throw new TypeError('"response" must be an instance of Response');if(r.status!==200)throw new Ge('"response" is not a conform UserInfo Endpoint response');let o;if(n0e(r)==="application/jwt"){Qm(r);const{claims:i,jwt:s}=await Pz(await r.text(),Dz.bind(void 0,t.userinfo_signed_response_alg,e.userinfo_signing_alg_values_supported),vA,Jg(t),yA(t),t[Sz]).then(a0e.bind(void 0,t.client_id)).then(l0e.bind(void 0,e.issuer));s0e.set(r,s),o=i}else{if(t.userinfo_signed_response_alg)throw new Ge("JWT UserInfo Response expected");Qm(r);try{o=await r.json()}catch(i){throw new Ge('failed to parse "response" body as JSON',{cause:i})}}if(!Ff(o))throw new Ge('"response" body must be a top level object');if(!rr(o.sub))throw new Ge('"response" body "sub" property must be a non-empty string');switch(n){case t0e:break;default:if(!rr(n))throw new Ge('"expectedSubject" must be a non-empty string');if(o.sub!==n)throw new Ge('unexpected "response" body "sub" value')}return o}async function o0e(e,t,n,r,o,i,s){return await qye(e,t,o,i),i.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),(s?.[mA]||fetch)(r.href,{body:o,headers:Object.fromEntries(i.entries()),method:n,redirect:"manual",signal:null}).then(gA)}async function i0e(e,t,n,r,o){const i=Cz(e,"token_endpoint",Oz(t,o));r.set("grant_type",n);const s=jw(o?.headers);return s.set("accept","application/json"),o0e(e,t,"POST",i,r,s,o)}const jz=new WeakMap,s0e=new WeakMap;function Az(e){if(!e.id_token)return;const t=jz.get(e);if(!t)throw new TypeError('"ref" was already garbage collected or did not resolve from the proper sources');return t[0]}async function Tz(e,t,n,r=!1,o=!1){if(Yg(e),Kg(t),!Gg(n,Response))throw new TypeError('"response" must be an instance of Response');if(n.status!==200){let s;if(s=await m0e(n))return s;throw new Ge('"response" is not a conform Token Endpoint response')}Qm(n);let i;try{i=await n.json()}catch(s){throw new Ge('failed to parse "response" body as JSON',{cause:s})}if(!Ff(i))throw new Ge('"response" body must be a top level object');if(!rr(i.access_token))throw new Ge('"response" body "access_token" property must be a non-empty string');if(!rr(i.token_type))throw new Ge('"response" body "token_type" property must be a non-empty string');if(i.token_type=i.token_type.toLowerCase(),i.token_type!=="dpop"&&i.token_type!=="bearer")throw new Zi("unsupported `token_type` value");if(i.expires_in!==void 0&&(typeof i.expires_in!="number"||i.expires_in<=0))throw new Ge('"response" body "expires_in" property must be a positive number');if(!o&&i.refresh_token!==void 0&&!rr(i.refresh_token))throw new Ge('"response" body "refresh_token" property must be a non-empty string');if(i.scope!==void 0&&typeof i.scope!="string")throw new Ge('"response" body "scope" property must be a string');if(!r){if(i.id_token!==void 0&&!rr(i.id_token))throw new Ge('"response" body "id_token" property must be a non-empty string');if(i.id_token){const{claims:s,jwt:a}=await Pz(i.id_token,Dz.bind(void 0,t.id_token_signed_response_alg,e.id_token_signing_alg_values_supported),vA,Jg(t),yA(t),t[Sz]).then(d0e.bind(void 0,["aud","exp","iat","iss","sub"])).then(Rz.bind(void 0,e.issuer)).then($z.bind(void 0,t.client_id));if(Array.isArray(s.aud)&&s.aud.length!==1){if(s.azp===void 0)throw new Ge('ID Token "aud" (audience) claim includes additional untrusted audiences');if(s.azp!==t.client_id)throw new Ge('unexpected ID Token "azp" (authorized party) claim value')}if(s.auth_time!==void 0&&(!Number.isFinite(s.auth_time)||Math.sign(s.auth_time)!==1))throw new Ge('ID Token "auth_time" (authentication time) must be a positive number');jz.set(i,[s,a])}}return i}function a0e(e,t){return t.claims.aud!==void 0?$z(e,t):t}function $z(e,t){if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e))throw new Ge('unexpected JWT "aud" (audience) claim value')}else if(t.claims.aud!==e)throw new Ge('unexpected JWT "aud" (audience) claim value');return t}function l0e(e,t){return t.claims.iss!==void 0?Rz(e,t):t}function Rz(e,t){if(t.claims.iss!==e)throw new Ge('unexpected JWT "iss" (issuer) claim value');return t}const kz=new WeakSet;function c0e(e){return kz.add(e),e}async function o6(e,t,n,r,o,i){if(Yg(e),Kg(t),!kz.has(n))throw new TypeError('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()');if(!rr(r))throw new TypeError('"redirectUri" must be a non-empty string');if(!rr(o))throw new TypeError('"codeVerifier" must be a non-empty string');const s=la(n,"code");if(!s)throw new Ge('no authorization code in "callbackParameters"');const a=new URLSearchParams(i?.additionalParameters);return a.set("redirect_uri",r),a.set("code_verifier",o),a.set("code",s),i0e(e,t,"authorization_code",a,i)}const u0e={aud:"audience",c_hash:"code hash",client_id:"client id",exp:"expiration time",iat:"issued at",iss:"issuer",jti:"jwt id",nonce:"nonce",s_hash:"state hash",sub:"subject",ath:"access token hash",htm:"http method",htu:"http uri",cnf:"confirmation"};function d0e(e,t){for(const n of e)if(t.claims[n]===void 0)throw new Ge(`JWT "${n}" (${u0e[n]}) claim missing`);return t}const f0e=Symbol(),T2=Symbol();async function h0e(e,t,n,r,o){const i=await Tz(e,t,n);if(uf(i))return i;if(!rr(i.id_token))throw new Ge('"response" body "id_token" property must be a non-empty string');o??(o=t.default_max_age??T2);const s=Az(i);if((t.require_auth_time||o!==T2)&&s.auth_time===void 0)throw new Ge('ID Token "auth_time" (authentication time) claim missing');if(o!==T2){if(typeof o!="number"||o<0)throw new TypeError('"maxAge" must be a non-negative number');const a=bA()+Jg(t),c=yA(t);if(s.auth_time+o399&&e.status<500){Qm(e);try{const t=await e.json();if(Ff(t)&&typeof t.error=="string"&&t.error.length)return t.error_description!==void 0&&typeof t.error_description!="string"&&delete t.error_description,t.error_uri!==void 0&&typeof t.error_uri!="string"&&delete t.error_uri,t.algs!==void 0&&typeof t.algs!="string"&&delete t.algs,t.scope!==void 0&&typeof t.scope!="string"&&delete t.scope,t}catch{}}}function i6(e){if(typeof e.modulusLength!="number"||e.modulusLength<2048)throw new Ge(`${e.name} modulusLength must be at least 2048 bits`)}function g0e(e){switch(e){case"P-256":return"SHA-256";case"P-384":return"SHA-384";case"P-521":return"SHA-512";default:throw new Zi}}function Mz(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:g0e(e.algorithm.namedCurve)};case"RSA-PSS":switch(i6(e.algorithm),e.algorithm.hash.name){case"SHA-256":case"SHA-384":case"SHA-512":return{name:e.algorithm.name,saltLength:parseInt(e.algorithm.hash.name.slice(-3),10)>>3};default:throw new Zi}case"RSASSA-PKCS1-v1_5":return i6(e.algorithm),e.algorithm.name;case"Ed448":case"Ed25519":return e.algorithm.name}throw new Zi}const vA=Symbol();async function y0e(e,t,n,r){const o=`${e}.${t}`;if(!await crypto.subtle.verify(Mz(n),n,r,Xl(o)))throw new Ge("JWT signature verification failed")}async function Pz(e,t,n,r,o,i){let{0:s,1:a,2:c,length:u}=e.split(".");if(u===5)if(i!==void 0)e=await i(e),{0:s,1:a,2:c,length:u}=e.split(".");else throw new Zi("JWE structure JWTs are not supported");if(u!==3)throw new Ge("Invalid JWT");let f;try{f=JSON.parse(Xl(xa(s)))}catch(x){throw new Ge("failed to parse JWT Header body as base64url encoded JSON",{cause:x})}if(!Ff(f))throw new Ge("JWT Header must be a top level object");if(t(f),f.crit!==void 0)throw new Ge('unexpected JWT "crit" header parameter');const p=xa(c);let g;n!==vA&&(g=await n(f),await y0e(s,a,g,p));let y;try{y=JSON.parse(Xl(xa(a)))}catch(x){throw new Ge("failed to parse JWT Payload body as base64url encoded JSON",{cause:x})}if(!Ff(y))throw new Ge("JWT Payload must be a top level object");const v=bA()+r;if(y.exp!==void 0){if(typeof y.exp!="number")throw new Ge('unexpected JWT "exp" (expiration time) claim type');if(y.exp<=v-o)throw new Ge('unexpected JWT "exp" (expiration time) claim value, timestamp is <= now()')}if(y.iat!==void 0&&typeof y.iat!="number")throw new Ge('unexpected JWT "iat" (issued at) claim type');if(y.iss!==void 0&&typeof y.iss!="string")throw new Ge('unexpected JWT "iss" (issuer) claim type');if(y.nbf!==void 0){if(typeof y.nbf!="number")throw new Ge('unexpected JWT "nbf" (not before) claim type');if(y.nbf>v+o)throw new Ge('unexpected JWT "nbf" (not before) claim value, timestamp is > now()')}if(y.aud!==void 0&&typeof y.aud!="string"&&!Array.isArray(y.aud))throw new Ge('unexpected JWT "aud" (audience) claim type');return{header:f,claims:y,signature:p,key:g,jwt:e}}function Dz(e,t,n){if(e!==void 0){if(n.alg!==e)throw new Ge('unexpected JWT "alg" header parameter');return}if(Array.isArray(t)){if(!t.includes(n.alg))throw new Ge('unexpected JWT "alg" header parameter');return}if(n.alg!=="RS256")throw new Ge('unexpected JWT "alg" header parameter')}function la(e,t){const{0:n,length:r}=e.getAll(t);if(r>1)throw new Ge(`"${t}" parameter must be provided only once`);return n}const b0e=Symbol(),q_=Symbol();function s6(e,t,n,r){if(Yg(e),Kg(t),n instanceof URL&&(n=n.searchParams),!(n instanceof URLSearchParams))throw new TypeError('"parameters" must be an instance of URLSearchParams, or URL');if(la(n,"response"))throw new Ge('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()');const o=la(n,"iss"),i=la(n,"state");if(!o&&e.authorization_response_iss_parameter_supported)throw new Ge('response parameter "iss" (issuer) missing');if(o&&o!==e.issuer)throw new Ge('unexpected "iss" (issuer) response parameter value');switch(r){case void 0:case q_:if(i!==void 0)throw new Ge('unexpected "state" response parameter encountered');break;case b0e:break;default:if(!rr(r))throw new Ge('"expectedState" must be a non-empty string');if(i===void 0)throw new Ge('response parameter "state" missing');if(i!==r)throw new Ge('unexpected "state" response parameter value')}const s=la(n,"error");if(s)return{error:s,error_description:la(n,"error_description"),error_uri:la(n,"error_uri")};const a=la(n,"id_token"),c=la(n,"token");if(a!==void 0||c!==void 0)throw new Zi("implicit and hybrid flows are not supported");return c0e(new URLSearchParams(n))}const v0e={type:"oidc",client:{token_endpoint_auth_method:"client_secret_basic"},as:{issuer:"https://accounts.google.com"},profile:async e=>({...e,sub:e.sub,email:e.email})},x0e={type:"oauth2",client:{token_endpoint_auth_method:"client_secret_basic"},as:{code_challenge_methods_supported:["S256"],issuer:"https://github.com",scopes_supported:["read:user","user:email"],scope_separator:" ",authorization_endpoint:"https://github.com/login/oauth/authorize",token_endpoint:"https://github.com/login/oauth/access_token",userinfo_endpoint:"https://api.github.com/user"},profile:async(e,t,n)=>{try{const i=(await(await fetch("https://api.github.com/user/emails",{headers:{"User-Agent":"bknd",Accept:"application/json",Authorization:`Bearer ${n.access_token}`}})).json()).find(s=>s.primary)?.email;if(!i)throw new Error("No primary email found");return{...e,sub:String(e.id),email:i}}catch{throw new Error("Couldn't retrive github email")}}},Iz=Object.freeze(Object.defineProperty({__proto__:null,github:x0e,google:v0e},Symbol.toStringTag,{value:"Module"}));class Lz{constructor(t,n,r,o){this.config=t,this.type=n,this.name=r,this.mode=o,this.config=Cn(this.getSchema(),t??{})}actions={};registerAction(t,n,r){this.actions[t]={schema:n,preprocess:r}}getType(){return this.type}getMode(){return this.mode}getName(){return this.name}toJSON(t){return{type:this.getType(),config:t?this.config:void 0}}getActions(){return this.actions}}const w0e=ke({name:le({enum:Object.keys(Iz)}),type:le({enum:["oidc","oauth2"],default:"oauth2"}),client:ke({client_id:le(),client_secret:le()}).strict()},{title:"OAuth"});class Fp extends Br{constructor(t,n){super("OAuthCallbackException on "+n),this.error=t,this.step=n}name="OAuthCallbackException"}class W_ extends Lz{constructor(t){super(t,"oauth",t.name,"external")}getSchema(){return w0e}getIssuerConfig(){return Iz[this.config.name]}async getConfig(){const t=this.getIssuerConfig();if(t.type==="oidc"){const n=new URL(t.as.issuer),r=await Iye(n);t.as=await Lye(n,r)}return{...t,type:t.type,client:{...t.client,...this.config.client}}}async getCodeChallenge(t,n,r="S256"){const o=t.code_challenge_methods_supported?.includes(r);let i,s;return o&&(i=await Fye(n),s=r),{challenge_supported:o,challenge:i,challenge_method:s}}async request(t){const{client:n,as:r}=await this.getConfig(),{challenge_supported:o,challenge:i,challenge_method:s}=await this.getCodeChallenge(r,t.state);if(!r.authorization_endpoint)throw new Error("authorization_endpoint is not provided");const a=t.scopes??r.scopes_supported;if(!Array.isArray(a)||a.length===0)throw new Error("No scopes provided");if(a.every(f=>!r.scopes_supported?.includes(f)))throw new Error("Invalid scopes provided");const c=r.authorization_endpoint,u={client_id:n.client_id,redirect_uri:t.redirect_uri,response_type:"code",scope:a.join(r.scope_separator??" ")};return o?(u.code_challenge=i,u.code_challenge_method=s):u.nonce=t.state,{url:new URL(c)+"?"+new URLSearchParams(u).toString(),endpoint:c,params:u}}async oidc(t,n){const r=await this.getConfig(),{client:o,as:i,type:s}=r,a=s6(i,o,t,q_);if(uf(a))throw new Fp(a,"validateAuthResponse");const c=await o6(i,o,a,n.redirect_uri,n.state),u=n6(c);if(u)throw new Fp(u,"www-authenticate");const{challenge_supported:f,challenge:p}=await this.getCodeChallenge(i,n.state),y=await h0e(i,o,c,f?void 0:p);if(uf(y))throw new Fp(y,"processAuthorizationCodeOpenIDResponse");const v=Az(y),x=await r6(i,o,y.access_token),S=await r0e(i,o,v.sub,x);return await r.profile(S,r,v)}async oauth2(t,n){const r=await this.getConfig(),{client:o,type:i,as:s,profile:a}=r,c=s6(s,o,t,q_);if(uf(c))throw new Fp(c,"validateAuthResponse");const u=await o6(s,o,c,n.redirect_uri,n.state),f=n6(u);if(f)throw new Fp(f,"www-authenticate");const p=u.clone();let g={};try{if(g=await p0e(s,o,u),uf(g))throw new Error}catch{g=await p.json()}const v=await(await r6(s,o,g.access_token)).json();return await r.profile(v,r,g)}async callback(t,n){switch(this.getIssuerConfig().type){case"oidc":return await this.oidc(t,n);case"oauth2":return await this.oauth2(t,n);default:throw new Error("Unsupported type")}}getController(t){const n=new Cw,r="secret",o="_challenge",i=async(a,c)=>{await p7(a,o,JSON.stringify(c),r,{secure:!0,httpOnly:!0,sameSite:"Lax",maxAge:60*5})},s=async a=>{if(a.req.header("X-State-Challenge"))return{state:a.req.header("X-State-Challenge"),action:a.req.header("X-State-Action"),mode:"token"};const c=await f7(a,r,o);try{return JSON.parse(c)}catch{throw new Error("Invalid state")}};return n.get("/callback",async a=>{const c=new URL(a.req.url),u=new URLSearchParams(c.search),f=await s(a),p=f.mode==="cookie"?c.origin+c.pathname:c.origin+c.pathname.replace("/callback","/token"),g=await this.callback(u,{redirect_uri:p,state:f.state}),y={email:g.email,strategy_value:g.sub},v=async S=>{if(S.strategy_value!==g.sub)throw new Br("Invalid credentials")},x={redirect:f.redirect,forceJsonResponse:f.mode!=="cookie"};switch(f.action){case"login":return t.resolveLogin(a,this,y,v,x);case"register":return t.resolveRegister(a,this,y,v,x);default:throw new Error("Invalid action")}}),n.get("/token",async a=>{const c=new URL(a.req.url),u=new URLSearchParams(c.search);return a.json({code:u.get("code")??null})}),n.post("/:action",async a=>{const c=a.req.param("action");if(!["login","register"].includes(c))return a.notFound();const u=new URL(a.req.url),f=u.pathname.replace(`/${c}`,""),p=u.origin+f+"/callback",g=new URL(a.req.header("Referer")??"/"),y=XM(),v=await this.request({redirect_uri:p,state:y});return await i(a,{state:y,action:c,redirect:g.toString(),mode:"cookie"}),a.redirect(v.url)}),n.get("/:action",async a=>{const c=a.req.param("action");if(!["login","register"].includes(c))return a.notFound();const u=new URL(a.req.url),f=u.pathname.replace(`/${c}`,""),p=u.origin+f+"/token",g=XM(),y=await this.request({redirect_uri:p,state:g});return ir()?a.json({url:y.url,redirect_uri:p,challenge:g,action:c,params:y.params}):a.json({url:y.url,challenge:g,action:c})}),n}toJSON(t){const n=t?this.config:RL(this.config,["secret","client_id"]);return{...super.toJSON(t),config:{...n,type:this.getIssuerConfig().type}}}}const $2=le({pattern:"^(https?|wss?)://[^\\s/$.?#].[^\\s]*$"}),S0e=Ve({type:le({enum:["oidc","oauth2"],default:"oidc"}),name:le(),client:ke({client_id:le(),client_secret:le(),token_endpoint_auth_method:le({enum:["client_secret_basic"]})}),as:Ve({issuer:le(),code_challenge_methods_supported:le({enum:["S256"]}).optional(),scopes_supported:un(le()).optional(),scope_separator:le({default:" "}).optional(),authorization_endpoint:$2.optional(),token_endpoint:$2.optional(),userinfo_endpoint:$2.optional()})},{title:"Custom OAuth"});class a6 extends W_{constructor(t){super(t),this.type="custom_oauth"}getIssuerConfig(){return{...this.config,profile:async t=>t}}getSchema(){return S0e}}const E0e={};function N0e(e){try{return crypto.getRandomValues(new Uint8Array(e))}catch{}try{return E0e.randomBytes(e)}catch{}throw Error("Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative")}function _0e(e,t){if(e=e||Bz,typeof e!="number")throw Error("Illegal arguments: "+typeof e+", "+typeof t);e<4?e=4:e>31&&(e=31);var n=[];return n.push("$2b$"),e<10&&n.push("0"),n.push(e.toString()),n.push("$"),n.push(G_(N0e(Zm),Zm)),n.join("")}function Fz(e,t,n){if(typeof t=="function"&&(n=t,t=void 0),typeof e=="function"&&(n=e,e=void 0),typeof e>"u")e=Bz;else if(typeof e!="number")throw Error("illegal arguments: "+typeof e);function r(o){Ui(function(){try{o(null,_0e(e))}catch(i){o(i)}})}if(n){if(typeof n!="function")throw Error("Illegal callback: "+typeof n);r(n)}else return new Promise(function(o,i){r(function(s,a){if(s){i(s);return}o(a)})})}function zz(e,t,n,r){function o(i){typeof e=="string"&&typeof t=="number"?Fz(t,function(s,a){f6(e,a,i,r)}):typeof e=="string"&&typeof t=="string"?f6(e,t,i,r):Ui(i.bind(this,Error("Illegal arguments: "+typeof e+", "+typeof t)))}if(n){if(typeof n!="function")throw Error("Illegal callback: "+typeof n);o(n)}else return new Promise(function(i,s){o(function(a,c){if(a){s(a);return}i(c)})})}function C0e(e,t){for(var n=e.length^t.length,r=0;r>6|192,o[t++]=n&63|128):(n&64512)===55296&&((r=e.charCodeAt(i+1))&64512)===56320?(n=65536+((n&1023)<<10)+(r&1023),++i,o[t++]=n>>18|240,o[t++]=n>>12&63|128,o[t++]=n>>6&63|128,o[t++]=n&63|128):(o[t++]=n>>12|224,o[t++]=n>>6&63|128,o[t++]=n&63|128);return o}var Wd="./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),Tl=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,54,55,56,57,58,59,60,61,62,63,-1,-1,-1,-1,-1,-1,-1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,-1,-1,-1,-1,-1,-1,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,-1,-1,-1,-1,-1];function G_(e,t){var n=0,r=[],o,i;if(t<=0||t>e.length)throw Error("Illegal len: "+t);for(;n>2&63]),o=(o&3)<<4,n>=t){r.push(Wd[o&63]);break}if(i=e[n++]&255,o|=i>>4&15,r.push(Wd[o&63]),o=(i&15)<<2,n>=t){r.push(Wd[o&63]);break}i=e[n++]&255,o|=i>>6&3,r.push(Wd[o&63]),r.push(Wd[i&63])}return r.join("")}function T0e(e,t){for(var n=0,r=e.length,o=0,i=[],s,a,c,u,f,p;n>>0,f|=(a&48)>>4,i.push(String.fromCharCode(f)),++o>=t||n>=r)||(p=e.charCodeAt(n++),c=p>>0,f|=(c&60)>>2,i.push(String.fromCharCode(f)),++o>=t||n>=r)));)p=e.charCodeAt(n++),u=p>>0,f|=u,i.push(String.fromCharCode(f)),++o;var g=[];for(n=0;n>>24],o+=r[256|i>>16&255],o^=r[512|i>>8&255],o+=r[768|i&255],s^=o^n[1],o=r[s>>>24],o+=r[256|s>>16&255],o^=r[512|s>>8&255],o+=r[768|s&255],i^=o^n[2],o=r[i>>>24],o+=r[256|i>>16&255],o^=r[512|i>>8&255],o+=r[768|i&255],s^=o^n[3],o=r[s>>>24],o+=r[256|s>>16&255],o^=r[512|s>>8&255],o+=r[768|s&255],i^=o^n[4],o=r[i>>>24],o+=r[256|i>>16&255],o^=r[512|i>>8&255],o+=r[768|i&255],s^=o^n[5],o=r[s>>>24],o+=r[256|s>>16&255],o^=r[512|s>>8&255],o+=r[768|s&255],i^=o^n[6],o=r[i>>>24],o+=r[256|i>>16&255],o^=r[512|i>>8&255],o+=r[768|i&255],s^=o^n[7],o=r[s>>>24],o+=r[256|s>>16&255],o^=r[512|s>>8&255],o+=r[768|s&255],i^=o^n[8],o=r[i>>>24],o+=r[256|i>>16&255],o^=r[512|i>>8&255],o+=r[768|i&255],s^=o^n[9],o=r[s>>>24],o+=r[256|s>>16&255],o^=r[512|s>>8&255],o+=r[768|s&255],i^=o^n[10],o=r[i>>>24],o+=r[256|i>>16&255],o^=r[512|i>>8&255],o+=r[768|i&255],s^=o^n[11],o=r[s>>>24],o+=r[256|s>>16&255],o^=r[512|s>>8&255],o+=r[768|s&255],i^=o^n[12],o=r[i>>>24],o+=r[256|i>>16&255],o^=r[512|i>>8&255],o+=r[768|i&255],s^=o^n[13],o=r[s>>>24],o+=r[256|s>>16&255],o^=r[512|s>>8&255],o+=r[768|s&255],i^=o^n[14],o=r[i>>>24],o+=r[256|i>>16&255],o^=r[512|i>>8&255],o+=r[768|i&255],s^=o^n[15],o=r[s>>>24],o+=r[256|s>>16&255],o^=r[512|s>>8&255],o+=r[768|s&255],i^=o^n[16],e[t]=s^n[$0e+1],e[t+1]=i,e}function tf(e,t){for(var n=0,r=0;n<4;++n)r=r<<8|e[t]&255,t=(t+1)%e.length;return{key:r,offp:t}}function u6(e,t,n){for(var r=0,o=[0,0],i=t.length,s=n.length,a,c=0;c31)if(a=Error("Illegal number of rounds (4-31): "+n),r){Ui(r.bind(this,a));return}else throw a;if(t.length!==Zm)if(a=Error("Illegal salt length: "+t.length+" != "+Zm),r){Ui(r.bind(this,a));return}else throw a;n=1<>>0;var c,u,f=0,p;typeof Int32Array=="function"?(c=new Int32Array(l6),u=new Int32Array(c6)):(c=l6.slice(),u=c6.slice()),k0e(t,e,c,u);function g(){if(o&&o(f/n),fR0e)););else{for(f=0;f<64;f++)for(p=0;p>1;p++)eg(i,p<<1,c,u);var x=[];for(f=0;f>24&255)>>>0),x.push((i[f]>>16&255)>>>0),x.push((i[f]>>8&255)>>>0),x.push((i[f]&255)>>>0);if(r){r(null,x);return}else return x}r&&Ui(g)}if(typeof r<"u")g();else for(var y;;)if(typeof(y=g())<"u")return y||[]}function f6(e,t,n,r){var o;if(typeof e!="string"||typeof t!="string")if(o=Error("Invalid string / salt: Not a string"),n){Ui(n.bind(this,o));return}else throw o;var i,s;if(t.charAt(0)!=="$"||t.charAt(1)!=="2")if(o=Error("Invalid salt version: "+t.substring(0,2)),n){Ui(n.bind(this,o));return}else throw o;if(t.charAt(2)==="$")i="\0",s=3;else{if(i=t.charAt(2),i!=="a"&&i!=="b"&&i!=="y"||t.charAt(3)!=="$")if(o=Error("Invalid salt revision: "+t.substring(2,4)),n){Ui(n.bind(this,o));return}else throw o;s=4}if(t.charAt(s+2)>"$")if(o=Error("Missing salt rounds"),n){Ui(n.bind(this,o));return}else throw o;var a=parseInt(t.substring(s,s+1),10)*10,c=parseInt(t.substring(s+1,s+2),10),u=a+c,f=t.substring(s+3,s+25);e+=i>="a"?"\0":"";var p=A0e(e),g=T0e(f,Zm);function y(v){var x=[];return x.push("$2"),i>="a"&&x.push(i),x.push("$"),u<10&&x.push("0"),x.push(u.toString()),x.push("$"),x.push(G_(g,g.length)),x.push(G_(v,Vz.length*4-1)),x.join("")}if(typeof n>"u")return y(d6(p,g,u));d6(p,g,u,function(v,x){v?n(v,null):n(null,y(x))},r)}const M0e=ke({hashing:le({enum:["plain","sha256","bcrypt"],default:"sha256"}),rounds:bt({minimum:1,maximum:10}).optional(),minLength:bt({default:8,minimum:1}).optional()}).strict();class h6 extends Lz{constructor(t={}){super(t,"password","password","form"),this.registerAction("create",this.getPayloadSchema(),async({password:n,...r})=>({...r,strategy_value:await this.hash(n)}))}getSchema(){return M0e}getPayloadSchema(){return ke({email:le({format:"email"}),password:le({minLength:this.config.minLength})})}async hash(t){switch(this.config.hashing){case"sha256":return HL.sha256(t);case"bcrypt":{const n=await Fz(this.config.rounds??4);return zz(t,n)}default:return t}}async compare(t,n){switch(this.config.hashing){case"sha256":{const r=await this.hash(n);return t===r}case"bcrypt":return await O0e(n,t)}return t===n}verify(t){return async n=>{if(!n||!n.strategy_value)throw new Lp;if(!this.getPayloadSchema().properties.password.validate(t).valid)throw rt.debug("PasswordStrategy: Invalid password",t),new Lp;if(await this.compare(n.strategy_value,t)!==!0)throw new Lp}}getController(t){const n=new Cw,r=ke({redirect:le().optional()}),o=this.getPayloadSchema();return n.post("/login",zt({summary:"Login with email and password",tags:["auth"]}),Ft("query",r),async i=>{try{const s=Cn(o,await t.getBody(i),{onError:c=>{throw rt.error("Invalid login payload",[...c]),new Lp}}),{redirect:a}=i.req.valid("query");return await t.resolveLogin(i,this,s,this.verify(s.password),{redirect:a})}catch(s){return t.respondWithError(i,s)}}),n.post("/register",zt({summary:"Register a new user with email and password",tags:["auth"]}),Ft("query",r),async i=>{try{const{redirect:s}=i.req.valid("query"),{password:a,email:c,...u}=Cn(o,await t.getBody(i),{onError:p=>{rt.error("Invalid register payload",[...p]),new Lp}}),f={...u,email:c,strategy_value:await this.hash(a)};return await t.resolveRegister(i,this,f,async()=>{},{redirect:s})}catch(s){return t.respondWithError(i,s)}}),n}}const Uz=Ve({description:le(),condition:ke({}).optional(),effect:le({enum:["allow","deny","filter"],default:"allow"}),filter:ke({}).optional()}).partial();let P0e=class{content;constructor(t){this.content=Cn(Uz,t??{},{withDefaults:!0})}replace(t,n,r){return n?b_(t,/^@([a-zA-Z_\.]+)$/,n,r):t}getReplacedFilter(t,n){return this.content.filter?this.replace(this.content.filter,t,n):t}meetsCondition(t,n){return this.content.condition?Ik(this.replace(this.content.condition,n),t):!0}meetsFilter(t,n){return this.content.filter?Ik(this.replace(this.content.filter,n),t):!0}getFiltered(t){return t.filter(n=>this.meetsFilter(n))}toJSON(){return this.content}};const Hz="allow",D0e=Ve({permission:le(),effect:le({enum:["allow","deny"],default:Hz}).optional(),policies:un(Uz).optional()}),I0e=Ve({permissions:Rt([un(le()),un(D0e)]).optional(),is_default:at().optional(),implicit_allow:at().optional()});class p6{constructor(t,n=[],r=Hz){this.permission=t,this.policies=n,this.effect=r}toJSON(){return{permission:this.permission.name,policies:this.policies.map(t=>t.toJSON()),effect:this.effect}}}class xA{constructor(t,n=[],r=!1,o=!1){this.name=t,this.permissions=n,this.is_default=r,this.implicit_allow=o}static create(t,n){const r=n.permissions?.map(o=>{if(typeof o=="string")return new p6(new On(o),[]);const i=o.policies?.map(s=>new P0e(s));return new p6(new On(o.permission),i,o.effect)})??[];return new xA(t,r,n.is_default,n.implicit_allow)}toJSON(){return{permissions:this.permissions.map(t=>t.toJSON()),is_default:this.is_default,implicit_allow:this.implicit_allow}}}const L0e={password:{cls:h6,schema:h6.prototype.getSchema()},oauth:{cls:W_,schema:W_.prototype.getSchema()},custom_oauth:{cls:a6,schema:a6.prototype.getSchema()}},qz=L0e,F0e=Zx(qz,(e,t)=>Ve({enabled:at({default:!0}).optional(),type:ui(t),config:e.schema},{title:t})),z0e=Rt(Object.values(F0e)),B0e=ke({enabled:at({default:!1}).optional()}),V0e=I0e,m6=Ow("config_auth",{enabled:at({default:!1}),basepath:le({default:"/api/auth"}),entity_name:le({default:"users"}),allow_register:at({default:!0}).optional(),default_role_register:le().optional(),jwt:wz,cookie:xz,strategies:ym("config_auth_strategies",z0e,{title:"Strategies",default:{password:{type:"password",enabled:!0,config:{hashing:"sha256"}}}},Ve({type:le(),enabled:at({default:!0}).optional(),config:ke({})})),guard:B0e.optional(),roles:ym("config_auth_roles",V0e,{default:{}}).optional()},{title:"Authentication"});class U0e{constructor(t){this.appAuth=t}get em(){return this.appAuth.em}get users(){return this.appAuth.getUsersEntity()}async findBy(t,n,r){rt.debug("[AppUserPool:findBy]",{strategy:t,prop:n,value:r}),this.toggleStrategyValueVisibility(!0);const o=await this.em.repo(this.users).findOne({[n]:r,strategy:t});if(this.toggleStrategyValueVisibility(!1),!o.data)throw rt.debug("[AppUserPool]: User not found"),new Fge;return o.data}async create(t,n){if(rt.debug("[AppUserPool:create]",{strategy:t,payload:n}),!("strategy_value"in n))throw new aa("Profile must have a strategy_value value");const r=this.users.getSelect(void 0,"create"),i={...UF(n,r),strategy:t},s=this.em.mutator(this.users);s.__unstable_toggleSystemEntityCreation(!1),this.toggleStrategyValueVisibility(!0);const a=await s.insertOne(i);if(s.__unstable_toggleSystemEntityCreation(!0),this.toggleStrategyValueVisibility(!1),!a.data)throw new zge;return rt.debug("[AppUserPool]: User created",a.data),a.data}toggleStrategyValueVisibility(t){const n=(r,o)=>{const i=this.users.field(r);if(o)i.config.hidden=!1,i.config.fillable=!0;else{const s=Aw.usersFields.strategy_value.config;i.config.hidden=s.hidden,i.config.fillable=s.fillable}};n("strategy_value",t),n("strategy",t)}}const Wz={email:ys().required(),strategy:ys({fillable:["create"],hidden:["update","form"]}).required(),strategy_value:ys({fillable:["create"],hidden:["read","table","update","form"]}).required(),role:ys()};class Aw extends Ug{_authenticator;cache={};_controller;async onBeforeUpdate(t,n){const r=m6.properties.jwt.properties.secret.default;if(!t.enabled&&n.enabled&&n.jwt.secret===r&&(rt.warn("No JWT secret provided, generating a random one"),n.jwt.secret=gse(64)),n.strategies?.password?.enabled||(rt.warn("Password strategy cannot be disabled."),n.strategies.password.enabled=!0),n.default_role_register&&n.default_role_register?.length>0&&!Object.keys(n.roles??{}).includes(n.default_role_register)){const i=`Default role for registration not found: ${n.default_role_register}`;if(t.default_role_register!==n.default_role_register)throw new Error(i);rt.warn(`${i}, resetting to undefined`),n.default_role_register=void 0}return n}get enabled(){return this.config.enabled}async build(){if(!this.enabled){this.setBuilt();return}const t=Vt(this.config.roles??{},(r,o)=>xA.create(o,r));this.ctx.guard.setRoles(Object.values(t)),this.ctx.guard.setConfig(this.config.guard??{});const n=Vt(this.config.strategies??{},(r,o)=>{try{return new qz[r.type].cls(r.config)}catch{throw new Error(`Could not build strategy ${String(o)} with config ${JSON.stringify(r.config)}`)}});this._authenticator=new Nye(n,new U0e(this),{jwt:this.config.jwt,cookie:this.config.cookie,default_role_register:this.config.default_role_register}),this.registerEntities(),super.setBuilt(),this._controller=new Zge(this),this._controller.registerMcp(),this.ctx.server.route(this.config.basepath,this._controller.getController()),this.ctx.guard.registerPermissions(Uge)}isStrategyEnabled(t){const n=typeof t=="string"?t:t.getName();return n==="password"?!0:this.config.strategies?.[n]?.enabled??!1}get controller(){if(!this.isBuilt())throw new Error("Can't access controller, AppAuth not built yet");return this._controller}getSchema(){return m6}getGuardContextSchema(){const t=this.getUsersEntity().toSchema();return{type:"object",properties:{user:{type:"object",properties:Rm(t.properties,this.config.jwt.fields)}}}}get authenticator(){return this.throwIfNotBuilt(),this._authenticator}get em(){return this.ctx.em}getUsersEntity(t){const n=this.config.entity_name;return t||!this.em.hasEntity(n)?rz(n,Aw.usersFields,void 0,"system"):this.em.entity(n)}static usersFields=Wz;registerEntities(){const t=this.getUsersEntity(!0);this.ctx.helper.ensureSchema(oz({[t.name]:t},({index:n},{users:r})=>{n(r).on(["email"],!0).on(["strategy"]).on(["strategy_value"])}));try{const n=Object.keys(this.config.roles??{});this.ctx.helper.replaceEntityField(t,"role",HM({enum:n}))}catch{}try{const n=Object.keys(this.config.strategies??{});this.ctx.helper.replaceEntityField(t,"strategy",HM({enum:n}))}catch{}}async createUser({email:t,password:n,role:r,...o}){if(!this.enabled)throw new Error("Cannot create user, auth not enabled");if(r&&!Object.keys(this.config.roles??{}).includes(r))throw new Error(`Role "${r}" not found`);const i="password",a=await this.authenticator.strategy(i).hash(n),c=this.em.mutator(this.config.entity_name);c.__unstable_toggleSystemEntityCreation(!1);const{data:u}=await c.insertOne({...o,role:r||this.config.default_role_register||void 0,email:t,strategy:i,strategy_value:a});return c.__unstable_toggleSystemEntityCreation(!0),u}async changePassword(t,n){const r=this.config.entity_name,{data:o}=await this.em.repository(r).findId(t);if(o){if(o.strategy!=="password")throw new Error("User is not using password strategy")}else throw new Error("User not found");const i=a=>{const c=this.em.entity(r).field("strategy_value");c.config.hidden=!a,c.config.fillable=a},s=this.authenticator.strategy("password");return i(!0),await this.em.mutator(r).updateOne(o.id,{strategy_value:await s.hash(n)}),i(!1),!0}toJSON(t){if(!this.config.enabled)return this.configDefault;const n=this.authenticator.getStrategies(),r=Object.fromEntries(this.ctx.guard.getRoles().map(o=>[o.name,o.toJSON()]));return{...this.config,...this.authenticator.toJSON(t),roles:r,strategies:Vt(n,o=>({enabled:this.isStrategyEnabled(o),...o.toJSON(t)}))}}}const H0e=new On("system.access.api");new On("system.config.read",{},ke({module:le().optional()}));new On("system.config.read.secrets",{},ke({module:le().optional()}));new On("system.config.write",{},ke({module:le().optional()}));const eb=new On("system.schema.read",{},ke({module:le().optional()})),Gz={path:ys().required(),folder:jge({default_value:!1,hidden:!0,fillable:["create"]}),mime_type:ys(),size:Cge(),scope:ys({hidden:!0,fillable:["create"]}),etag:ys(),modified_at:Oge(),reference:ys(),entity_id:ys(),metadata:Age()},q0e={users:Wz,media:Gz};class W0e{constructor(t,n={}){this.em=t,this._options=n}get options(){return{...this._options,indentWidth:2,indentChar:" ",entityCommentMultiline:!0,fieldCommentMultiline:!0}}toTypes(){return this.em.entities.map(t=>t.toTypes())}getTab(t=1){return this.options.indentChar.repeat(this.options.indentWidth).repeat(t)}collectImports(t,n={}){for(const[,r]of Object.entries(t.fields))for(const o of r.import??[]){const i=o.name,s=o.package;n[s]||(n[s]=[]),n[s].includes(i)||n[s].push(i)}return n}typeName(t){return Ta(t).replace(/ /g,"")}fieldTypesToString(t,n){let r="";const o=this.options.fieldCommentMultiline,i=n?.indent??1;for(const[s,a]of Object.entries(t.fields)){if(n?.ignore_fields?.includes(s))continue;let c="";c+=this.commentString(a.comment,i,o),c+=`${this.getTab(i)}${s}${a.required?"":"?"}: `,c+=a.type+";",c+=` +`,r+=c}return r}relationToFieldType(t,n){const r=t.other(n),o=t.isListableFor(n);let s=this.typeName(r.entity.name);return r.entity.type==="system"&&(s=`DB["${r.entity.name}"]`),{fields:{[r.reference]:{required:!1,type:`${s}${o?"[]":""}`}}}}importsToString(t){const n=[];for(const[r,o]of Object.entries(t))n.push(`import type { ${o.join(", ")} } from "${r}";`);return n}commentString(t,n=0,r=!0){if(!t)return"";const o=this.getTab(n);return r?`${o}/** +${o} * ${t} +${o} */ +`:`${o}// ${t} +`}entityToTypeString(t,n){const r=t.toTypes(),o=this.typeName(r.name),i=n?.indent??1,s=Math.max(0,i-1);let a=this.commentString(r.comment,s,this.options.entityCommentMultiline);a+=`${n?.export?"export ":""}interface ${o} { +`,a+=this.fieldTypesToString(r,n);const u=this.em.relations.relationsOf(t).map(f=>this.relationToFieldType(f,t));for(const f of u)a+=this.fieldTypesToString(f,{indent:i});return a+=`${this.getTab(s)}}`,a}toString(){const t=[],n={},r={bknd:["DB"],kysely:["Insertable","Selectable","Updateable","Generated"]};let o=`declare global { +`;o+=`${this.getTab(1)}type BkndEntity = Selectable; +`,o+=`${this.getTab(1)}type BkndEntityCreate = Insertable; +`,o+=`${this.getTab(1)}type BkndEntityUpdate = Updateable; +`,o+="}",t.push(o);const i=this.em.entities.filter(u=>u.type==="system");for(const u of this.em.entities){if(i.includes(u))continue;const f=u.toTypes();if(!f)continue;this.collectImports(f,r),n[f.name]=this.typeName(f.name);const p=this.entityToTypeString(u,{export:!0});t.push(p)}let s=`interface Database { +`;for(const[u,f]of Object.entries(n))s+=`${this.getTab(1)}${u}: ${f}; +`;s+="}",t.push(s);let a=`declare module "bknd" { +`;for(const u of i){const f=Object.keys(q0e[u.name]);u.fields.filter(g=>!f.includes(g.name)&&g.type!=="primary").map(g=>g.name).length!==0&&(a+=`${this.getTab(1)}${this.entityToTypeString(u,{ignore_fields:["id",...f],indent:2})} + +`)}return a+=`${this.getTab(1)}interface DB extends Database {} +}`,t.push(a),[this.importsToString(r).join(` +`),t.join(` + +`)].join(` + +`)}}class G0e extends qg{constructor(t,n){super(),this.ctx=t,this.config=n}get em(){return this.ctx.em}get guard(){return this.ctx.guard}entityExists(t){try{return!!this.em.entity(t)}catch{return!1}}getController(){const{permission:t,auth:n}=this.middlewares,r=this.create().use(n(),t(H0e,{})),o=this.getEntitiesEnum(this.em);return r.get("/",zt({summary:"Retrieve data configuration",tags:["data"]}),i=>i.json(this.em.toJSON())),r.get("/sync",t(lz,{}),eo("data_sync",{annotations:{destructiveHint:!0}}),zt({summary:"Sync database schema",tags:["data"]}),Ft("query",ke({force:at(),drop:at()}).partial()),async i=>{const{force:s,drop:a}=i.req.valid("query"),c=await this.em.schema().introspect(),u=await this.em.schema().sync({force:s,drop:a});return i.json({tables:c.map(f=>f.name),changes:u})}),r.get("/schema.json",t(eb,{context:i=>({module:"data"})}),t(Zr,{context:i=>({entity:i.req.param("entity")})}),zt({summary:"Retrieve data schema",tags:["data"]}),async i=>{const s=`${this.config.basepath}/schema.json`,a=Object.fromEntries(this.em.entities.map(c=>[c.name,{$ref:`${this.config.basepath}/schemas/${c.name}`}]));return i.json({$schema:"https://json-schema.org/draft/2020-12/schema",$id:s,properties:a})}),r.get("/schemas/:entity/:context?",t(eb,{context:i=>({module:"data"})}),t(Zr,{context:i=>({entity:i.req.param("entity")})}),zt({summary:"Retrieve entity schema",tags:["data"]}),Ft("param",ke({entity:o,context:le({enum:["create","update"],default:"create"}).optional()})),async i=>{const{entity:s,context:a}=i.req.param();if(!this.entityExists(s))return this.notFound(i);const c=this.em.entity(s),u=c.toSchema({context:a}),p=`${new URL(i.req.url).origin}${this.config.basepath}`,g=`${this.config.basepath}/schemas/${s}`;return i.json({$schema:`${p}/schema.json`,$id:g,title:c.label,$comment:c.config.description,...u})}),r.get("/types",t(eb,{context:i=>({module:"data"})}),zt({summary:"Retrieve data typescript definitions",tags:["data"]}),eo("data_types"),async i=>{const s=new W0e(this.em);return i.text(s.toString())}),r.route("/entity",this.getEntityRoutes()),r.get("/info/:entity",t(eb,{context:i=>({module:"data"})}),t(Zr,{context:i=>({entity:i.req.param("entity")})}),zt({summary:"Retrieve entity info",tags:["data"]}),eo("data_entity_info"),Ft("param",ke({entity:o})),async i=>{const{entity:s}=i.req.param();if(!this.entityExists(s))return this.notFound(i);const a=this.em.entity(s),c=a.fields.map(f=>f.name),u=f=>f.map(p=>({entity:p.other(a).entity.name,ref:p.other(a).reference}));return i.json({name:a.name,fields:c,relations:{all:u(this.em.relations.relationsOf(a)),listable:u(this.em.relations.listableRelationsOf(a)),source:u(this.em.relations.sourceRelationsOf(a)),target:u(this.em.relations.targetRelationsOf(a))}})}),r}getEntityRoutes(){const{permission:t}=this.middlewares,n=this.create(),r=this.getEntitiesEnum(this.em),o=Rt([bt({title:"Integer"}),le({title:"UUID"})],{coerce:u=>u});n.post("/:entity/fn/count",t(Zr,{context:u=>({entity:u.req.param("entity")})}),zt({summary:"Count entities",tags:["data"]}),eo("data_entity_fn_count"),Ft("param",ke({entity:r})),Ft("json",oi.properties.where),async u=>{const{entity:f}=u.req.valid("param");if(!this.entityExists(f))return this.notFound(u);const p=u.req.valid("json"),g=await this.em.repository(f).count(p);return u.json({entity:f,...g.data})}),n.post("/:entity/fn/exists",t(Zr,{context:u=>({entity:u.req.param("entity")})}),zt({summary:"Check if entity exists",tags:["data"]}),eo("data_entity_fn_exists"),Ft("param",ke({entity:r})),Ft("json",oi.properties.where),async u=>{const{entity:f}=u.req.valid("param");if(!this.entityExists(f))return this.notFound(u);const p=u.req.valid("json"),g=await this.em.repository(f).exists(p);return u.json({entity:f,...g.data})});const i=ke({...mo(oi.properties,["with"]),sort:le({default:"id"}),select:un(le()),join:un(le())}).partial(),s=(u=Object.keys(oi.properties))=>[...Yae(i,"query").parameters?.filter(f=>u.includes(f.name))],a=(u=Object.keys(i.properties))=>ke(Rm(i.properties,u));n.get("/:entity",zt({summary:"Read many",parameters:s(["limit","offset","sort","select","join"]),tags:["data"]}),Ft("param",ke({entity:r})),Ft("query",oi,{skipOpenAPI:!0}),t(Zr,{context:u=>({entity:u.req.param("entity")})}),async u=>{const{entity:f}=u.req.valid("param");if(!this.entityExists(f))return this.notFound(u);const{merge:p}=this.ctx.guard.filters(Zr,u,{entity:f}),g=u.req.valid("query"),y=await this.em.repository(f).findMany({...g,where:p(g.where)});return u.json(y,{status:y.data?200:404})}),n.get("/:entity/:id",zt({summary:"Read one",parameters:s(["offset","sort","select"]),tags:["data"]}),t(Zr,{context:u=>({...u.req.param()})}),eo("data_entity_read_one",{inputSchema:{param:ke({entity:r,id:o}),query:a(["offset","sort","select"])},noErrorCodes:[404]}),Ft("param",ke({entity:r,id:o})),Ft("query",oi,{skipOpenAPI:!0}),async u=>{const{entity:f,id:p}=u.req.valid("param");if(!this.entityExists(f)||!p)return this.notFound(u);const g=u.req.valid("query"),{merge:y}=this.ctx.guard.filters(Zr,u,u.req.valid("param")),v=this.em.entity(f).getPrimaryField().name,x=await this.em.repository(f).findOne(y({[v]:p}),g);return u.json(x,{status:x.data?200:404})}),n.get("/:entity/:id/:reference",zt({summary:"Read many by reference",parameters:s(),tags:["data"]}),t(Zr,{context:u=>({...u.req.param()})}),Ft("param",ke({entity:r,id:o,reference:le()})),Ft("query",oi,{skipOpenAPI:!0}),async u=>{const{entity:f,id:p,reference:g}=u.req.valid("param");if(!this.entityExists(f))return this.notFound(u);const y=u.req.valid("query"),{entity:v}=this.em.repository(f).getEntityByReference(g),{merge:x}=this.ctx.guard.filters(Zr,u,{entity:v.name,id:p,reference:g}),S=await this.em.repository(f).findManyByReference(p,g,{...y,where:x(y.where)});return u.json(S,{status:S.data?200:404})});const c=ke({...i.properties,with:ke({})}).partial();return n.post("/:entity/query",zt({summary:"Query entities",requestBody:{content:{"application/json":{schema:c.toJSON(),example:c.template({withOptional:!0})}}},tags:["data"]}),t(Zr,{context:u=>({entity:u.req.param("entity")})}),eo("data_entity_read_many",{inputSchema:{param:ke({entity:r}),json:c}}),Ft("param",ke({entity:r})),Ft("json",oi,{skipOpenAPI:!0}),async u=>{const{entity:f}=u.req.valid("param");if(!this.entityExists(f))return this.notFound(u);const p=u.req.valid("json"),{merge:g}=this.ctx.guard.filters(Zr,u,{entity:f}),y=await this.em.repository(f).findMany({...p,where:g(p.where)});return u.json(y,{status:y.data?200:404})}),n.post("/:entity",zt({summary:"Insert one or many",tags:["data"]}),t(Km,{context:u=>({...u.req.param()})}),eo("data_entity_insert"),Ft("param",ke({entity:r})),Ft("json",Rt([ke({}),un(ke({}))])),async u=>{const{entity:f}=u.req.valid("param");if(!this.entityExists(f))return this.notFound(u);const p=await u.req.json(),g=iie(p);if(this.ctx.guard.filters(Km,u,{entity:f}).matches(g,{throwOnError:!0}),Array.isArray(g)){const v=await this.em.mutator(f).insertMany(g);return u.json(v,201)}const y=await this.em.mutator(f).insertOne(g);return u.json(y,201)}),n.patch("/:entity",zt({summary:"Update many",tags:["data"]}),t(em,{context:u=>({...u.req.param()})}),eo("data_entity_update_many",{inputSchema:{param:ke({entity:r}),json:ke({update:ke({}),where:ke({})})}}),Ft("param",ke({entity:r})),Ft("json",ke({update:ke({}),where:oi.properties.where})),async u=>{const{entity:f}=u.req.param();if(!this.entityExists(f))return this.notFound(u);const{update:p,where:g}=await u.req.json(),{merge:y}=this.ctx.guard.filters(em,u,{entity:f}),v=await this.em.mutator(f).updateWhere(p,y(g));return u.json(v)}),n.patch("/:entity/:id",zt({summary:"Update one",tags:["data"]}),t(em,{context:u=>({...u.req.param()})}),eo("data_entity_update_one"),Ft("param",ke({entity:r,id:o})),Ft("json",ke({})),async u=>{const{entity:f,id:p}=u.req.valid("param");if(!this.entityExists(f))return this.notFound(u);const g=await u.req.json(),y=this.ctx.guard.filters(em,u,{entity:f,id:p});if(y.filters.length>0){const{data:x}=await this.em.repository(f).findId(p);y.matches(x,{throwOnError:!0})}const v=await this.em.mutator(f).updateOne(p,g);return u.json(v)}),n.delete("/:entity/:id",zt({summary:"Delete one",tags:["data"]}),t(tm,{context:u=>({...u.req.param()})}),eo("data_entity_delete_one"),Ft("param",ke({entity:r,id:o})),async u=>{const{entity:f,id:p}=u.req.valid("param");if(!this.entityExists(f))return this.notFound(u);const g=this.ctx.guard.filters(tm,u,{entity:f,id:p});if(g.filters.length>0){const{data:v}=await this.em.repository(f).findId(p);g.matches(v,{throwOnError:!0})}const y=await this.em.mutator(f).deleteOne(p);return u.json(y)}),n.delete("/:entity",zt({summary:"Delete many",tags:["data"]}),t(tm,{context:u=>({...u.req.param()})}),eo("data_entity_delete_many",{inputSchema:{param:ke({entity:r}),json:ke({})}}),Ft("param",ke({entity:r})),Ft("json",oi.properties.where),async u=>{const{entity:f}=u.req.valid("param");if(!this.entityExists(f))return this.notFound(u);const p=await u.req.json(),{merge:g}=this.ctx.guard.filters(tm,u,{entity:f}),y=await this.em.mutator(f).deleteWhere(g(p));return u.json(y)}),n}registerMcp(){this.ctx.mcp.resource("data_entities","bknd://data/entities",t=>t.json(t.context.ctx().em.toJSON().entities),{title:"Entities",description:"Retrieve all entities"}).resource("data_relations","bknd://data/relations",t=>t.json(t.context.ctx().em.toJSON().relations),{title:"Relations",description:"Retrieve all relations"}).resource("data_indices","bknd://data/indices",t=>t.json(t.context.ctx().em.toJSON().indices),{title:"Indices",description:"Retrieve all indices"})}}const Rv={...Ume,...Jme,media:{schema:nz,field:Ym}},J0e=Object.keys(Rv),Y0e=dA,Jz=Zx(Rv,(e,t)=>Ve({name:le().optional(),type:ui(t),config:e.schema.optional()},{title:t})),wA=Rt(Object.values(Jz)),Yz=Ou(wA,{default:{}}),SA=Ve({name:le().optional(),type:le({enum:HF,default:"regular"}).optional(),config:uA.optional(),fields:Yz.optional()});Ve({type:le({enum:HF,default:"regular"}).optional(),config:uA.optional(),fields:Ou(ke({type:Rt([le({enum:J0e}),le()]),config:rs.optional()}),{default:{}}).optional()});const EA=Object.entries(dA).map(([e,t])=>Ve({type:ui(e),source:le(),target:le(),config:t.schema.optional()},{title:e})),K0e=Ve({entity:le(),fields:un(le(),{minItems:1}),unique:at({default:!1}).optional()}),X0e=Ow("config_data",{basepath:le({default:"/api/data"}).optional(),default_primary_format:le({enum:Kj,default:"integer"}).optional(),entities:ym("config_data_entities",SA,{default:{}}).optional(),relations:ym("config_data_relations",Rt(EA),{default:{}},Ve({type:le({enum:Object.keys(dA)}),source:le(),target:le(),config:ke({}).optional()})).optional(),indices:ym("config_data_indices",K0e,{default:{},mcp:{update:!1}}).optional()}).strict();function NA(e,t){const n=Vt(t.fields??{},(r,o)=>{const{type:i}=r;if(!(i in Rv))throw new Error(`Field type "${i}" not found`);const{field:s}=Rv[i];return new s(o,r.config)});return new Kl(e,Object.values(n),t.config,t.type)}function Kz(e,t){return new Y0e[e.type].cls(t(e.source),t(e.target),e.config)}class Q0e extends Ug{async build(){const{entities:t={},relations:n={},indices:r={}}=this.config,o=Vt(t,(u,f)=>NA(f,u)),i=u=>{const f=typeof u=="string"?u:u.name,p=o[f];if(p)return p;throw new Error(`[AppData] Entity "${f}" not found`)},s=Vt(n,u=>Kz(u,i)),a=Vt(r,(u,f)=>{const p=i(u.entity),g=u.fields.map(y=>p.field(y));return new iF(p,g,u.unique,f)});for(const u of Object.values(o))this.ctx.em.addEntity(u);for(const u of Object.values(s))this.ctx.em.addRelation(u);for(const u of Object.values(a))this.ctx.em.addIndex(u);const c=new G0e(this.ctx,this.config);c.registerMcp(),this.ctx.server.route(this.basepath,c.getController()),this.ctx.guard.registerPermissions(Object.values(Wge)),this.setBuilt()}async onBeforeUpdate(t,n){const r={from:Object.keys(t.entities??{}),to:Object.keys(n.entities??{})};if(r.from.length-r.to.length>1)throw new Error("Cannot remove more than one entity at a time");return n}getSchema(){return X0e}get em(){return this.throwIfNotBuilt(),this.ctx.em}get basepath(){return this.config.basepath??"/api/data"}getOverwritePaths(){return[/^entities\..*\.config$/,/^entities\..*\.fields\..*\.config$/]}toJSON(t){return{...this.config,...this.em.toJSON()}}}class g6{constructor(t={},n={}){this.variables=t,this.options=n}another(){return 1}static hasMarkup(t){let n="";if(Array.isArray(t)||typeof t=="object"){if(!["Array","Object"].includes(t.constructor.name))return!1;n=JSON.stringify(t)}else n=String(t);return["{{"].some(o=>n.includes(o))}async render(t){if(typeof t>"u"||t===null)return t;if(typeof t=="string")return await this.renderString(t);if(Array.isArray(t))return await Promise.all(t.map(n=>this.render(n)));if(typeof t=="object")return await this.renderObject(t);throw new Error("Invalid template type")}async renderString(t){return t.replace(/{{\s*([^{}]+?)\s*}}/g,(n,r)=>{const o=Wm(this.variables,r.trim());return o==null?"":String(o)})}async renderObject(t){const n={};for(const[r,o]of Object.entries(t)){let i=r;this.options.renderKeys&&(i=await this.renderString(r)),n[i]=await this.render(o)}return n}}const nm=(e,t)=>e;class $u{name;static schema=Xi();_params;constructor(t,n){if(typeof t!="string")throw new Error(`Task name must be a string, got ${typeof t}`);this.name=t;const r=this.constructor.schema;if(r===$u.schema&&typeof n<"u"&&Object.keys(n||{}).length>0)throw new Error(`Task "${t}" has no schema defined but params passed: ${JSON.stringify(n)}`);this._params=Cn(r,n||{})}get params(){return this._params}clone(t,n){return new this.constructor(t,n)}static async resolveParams(t,n,r={}){const o={},i=new g6(r,{renderKeys:!0});for(const[s,a]of Object.entries(n)){if(a&&g6.hasMarkup(a)){try{o[s]=await i.render(a)}catch(c){throw c instanceof af?c:new af("Failed to resolve param",{key:s,value:a,error:c.message},"resolve-params")}continue}o[s]=a}return t.coerce(o)}async cloneWithResolvedParams(t){const n=Object.fromEntries(t.entries()),r=await $u.resolveParams(this.constructor.schema,this._params,n);return this.clone(this.name,r)}async run(t=new Map){const n=new Date;let r,o,i,s;const a=performance.now();try{const c=await this.cloneWithResolvedParams(t);s=c.params,r=await c.execute(t),i=!0}catch(c){i=!1,c instanceof af?o=c.toJSON():o={type:"unknown",message:c.message}}return{start:n,output:r,error:o,success:i,params:s,time:performance.now()-a}}error(t,n){return new af(t,n,"runtime")}get label(){return this.name}toJSON(){return{type:this.type,params:this.params}}}const R2=["GET","POST","PUT","PATCH","DELETE"];class Xz extends $u{type="fetch";static schema=Ve({url:le({pattern:"^(http|https)://"}),method:nm(le({enum:R2,default:"GET"})).optional(),headers:nm(un(Ve({key:le(),value:le()}))).optional(),body:nm(le()).optional(),normal:nm(bt()).optional()});getBody(){const t=this.params.body;if(t){if(typeof t=="string")return t;if(typeof t=="object")return JSON.stringify(t);throw new Error(`Invalid body type: ${typeof t}`)}}async execute(){if(!R2.includes(this.params.method??"GET"))throw this.error("Invalid method",{given:this.params.method,valid:R2});const t=this.getBody(),n=new Headers(this.params.headers?.map(i=>[i.key,i.value])),r=await fetch(this.params.url,{method:this.params.method??"GET",headers:n,body:t});if(!r.ok)throw this.error("Failed to fetch",{status:r.status,statusText:r.statusText});return await r.json()}}class Z0e extends $u{type="log";static schema=Ve({delay:bt({default:10})});async execute(){return await new Promise(t=>setTimeout(t,this.params.delay)),rt.log(`[DONE] LogTask: ${this.name}`),!0}}class ebe extends $u{type="render";static schema=Ve({render:le()});async execute(){return this.params.render}}class Qz{source;target;config;id;constructor(t,n,r,o){this.source=t,this.target=n,this.config=r??{},this.config.condition instanceof bs||(this.config.condition=bs.default()),this.id=o??Nse()}get condition(){return this.config.condition}get max_retries(){return this.config.max_retries??0}toJSON(){return km({source:this.source.name,target:this.target.name,config:{...this.config,condition:this.config.condition?.toJSON()}})}}class bs{constructor(t,n="",r=void 0){this.type=t,this.path=n,this.value=r}static default(){return bs.success()}static success(){return new bs("success")}static error(){return new bs("error")}static matches(t,n){if(typeof t!="string"||t.length===0)throw new Error("Invalid path");return new bs("matches",t,n)}isMet(t){switch(this.type){case"success":return t.success;case"error":return t.success===!1;case"matches":return Wm(t.output,this.path)===this.value}}sameAs(t=bs.default()){return this.type===t.type&&this.path===t.path&&this.value===t.value}toJSON(){return{type:this.type,path:this.path.length===0?void 0:this.path,value:this.value}}static fromObject(t){return new bs(t.type,t.path,t.value)}}class k2 extends Ur{static slug="flow-execution-event";task(){return this.params.task}getState(){return this.succeeded()?"success":this.failed()?"failed":this.isStart()?"running":"idle"}isStart(){return this.params.end===void 0}isEnd(){return!this.isStart()}succeeded(){return this.isEnd()&&this.params.result?.success}failed(){return this.isEnd()&&!this.params.result?.success}}class M2 extends Ur{static slug="flow-execution-state"}class _A{flow;started_at;finished_at;logs=[];inputs=new Map;queue=[];emgr;static Events={ExecutionEvent:k2,ExecutionState:M2};constructor(t){this.flow=t,this.logs=[],this.queue=[this.flow.startTask],this.emgr=new Lg(_A.Events)}subscribe(t){this.emgr.onAny(t)}async onDone(t,n){const r=new Date;if(this.logs.push({...n,task:t,end:r}),this.inputs.set(t.name,n),this.flow.respondingTask===t){this.queue=[];return}this.queue=this.queue.filter(i=>i!==t);const o=this.flow.task(t).getOutConnections(n).filter(i=>{const s=i.target,a=this.logs.filter(u=>u.task===s&&u.success).length,c=this.flow.task(s).getInConnections().find(u=>u.source===t)?.max_retries??0;if(a>c)throw new Error(`Task "${s.name}" reached max retries (${a}/${c})`);return this.flow.task(s).getInTasks(!0).every(u=>this.logs.some(f=>f.task===u&&f.end!==void 0))}).map(i=>i.target);this.queue.push(...o)}__getLastTaskLog(t){for(let n=this.logs.length-1;n>=0;n--)if(this.logs[n]?.task===t)return this.logs[n];return null}async run(){const t=this.queue;if(t.length===0)return;const n=t.map(async r=>{await this.emgr.emit(new k2({task:r}));const o=await r.run(this.inputs);return await this.emgr.emit(new k2({task:r,result:o,end:new Date})),await this.onDone(r,o),o});try{return await Promise.all(n),this.run()}catch(r){throw rt.error("RuntimeExecutor: error",r),r}}async start(t){await this.emgr.emit(new M2({execution:this,state:"started"})),this.inputs.set("flow",{start:new Date,output:t,error:void 0,success:!0,params:t}),this.started_at=new Date,await this.run(),this.finished_at=new Date,await this.emgr.emit(new M2({execution:this,state:"ended"}))}finished(){return this.finished_at!==void 0}errorCount(){return this.logs.filter(t=>!t.success).length}hasErrors(){return this.errorCount()>0}getErrorLogs(){return this.logs.filter(t=>!t.success)}getErrors(){return this.getErrorLogs().map(t=>t.error)}getResponse(){let t=this.flow.respondingTask;t||(t=this.flow.tasks[this.flow.tasks.length-1]);const n=this.__getLastTaskLog(t);if(n)return n.output}}class CA{flow;source;constructor(t,n){this.flow=t,this.source=n}task(t){return new CA(this.flow,t)}asInputFor(t,n,r){const o=this.getDepth(),i=this.getOutConnections(),s=i.map(c=>c.condition),a=i.some(c=>this.task(c.target).getDepth()<=o);if(s.length>0&&a&&this.getOutConnections().some(c=>c.condition.sameAs(n)))throw new Error("Task cannot be connected to a deeper task with the same condition");this.flow.addConnection(new Qz(this.source,t,{condition:n,max_retries:r}))}asOutputFor(t,n){this.task(t).asInputFor(this.source,n)}getNext(){return this.flow.connections.filter(t=>t.source===this.source).map(t=>t.target)}getDepth(){return this.flow.getSequence().findIndex(t=>t.includes(this.source))}getInConnections(t=!1){if(t){const n=this.getDepth();return this.getInConnections().filter(r=>r.target===this.source&&this.task(r.source).getDepth()n.target===this.source)}getInTasks(t=!1){if(t){const n=this.getDepth();return this.getInConnections().map(r=>r.source).filter(r=>this.task(r).getDepth()n.source)}getOutConnections(t){return t?this.flow.connections.filter(n=>n.source===this.source&&n.condition.isMet(t)):this.flow.connections.filter(n=>n.source===this.source)}getOutTasks(t){return this.getOutConnections(t).map(n=>n.target)}}class zf{executions=[];type="manual";config;static schema=Ve({mode:le({enum:["sync","async"],default:"async"})});constructor(t){const n=this.constructor.schema;this.config=Cn(n,t??{})}async register(t,...n){this.executions.push(await t.start())}toJSON(){return{type:this.type,config:this.config}}}class Xg{name;trigger;tasks=[];connections=[];respondingTask;startTask;sequence;constructor(t,n,r,o){this.name=t,this.trigger=o??new zf,n.map(i=>this.addTask(i)),this.connections=r||[],this.startTask=n[0],this.sequence=this.getSequence()}setStartTask(t){return this.startTask=t,this.sequence=this.getSequence(),this}getSequence(t=[]){if(t.length===0)return t.push([this.startTask]),this.getSequence(t);const n=t[t.length-1],r=[];return n?.forEach(o=>{this.task(o).getOutTasks().forEach(s=>{t.some(a=>a.includes(s))||r.push(s)})}),r.length===0?t:(t.push(r),this.getSequence(t))}addTask(t){if(this.tasks.includes(t))throw new Error("Task already defined");if(this.tasks.some(n=>n.name===t.name))throw new Error(`Task with name "${t.name}" already defined. Use a unique name.`);return this.tasks.push(t),this}setRespondingTask(t){if(!this.tasks.includes(t))throw new Error(`Cannot set task "${t.name}" as responding, not registered.`);return this.respondingTask=t,this}addConnection(t){if(this.connections.some(r=>r.source===t.source&&r.target===t.target&&r.condition[0]===t.condition[0]&&r.condition[1]===t.condition[1]))throw new Error("Connection already defined");return this.connections.push(t),this}task(t){return new CA(this,t)}createExecution(){return this.sequence=this.getSequence(),new _A(this)}async start(t=void 0){const n=this.createExecution();return await n.start(t),n}toJSON(){return{trigger:this.trigger.toJSON(),tasks:Object.fromEntries(this.tasks.map(t=>[t.name,t.toJSON()])),connections:Object.fromEntries(this.connections.map(t=>[t.id,t.toJSON()])),start_task:this.startTask?.name,responding_task:this.respondingTask?.name}}static fromObject(t,n,r){const o=Vt(n.tasks??{},(c,u)=>{const f=r[c.type];if(!f)throw new Error(`Task ${u} not found in taskMap`);try{const p=f.cls;return new p(u,c.params)}catch(p){throw rt.error("Error creating task",u,c.type,c,f),new Error(`Error creating task ${c.type}: ${p.message}`)}}),i=Vt(n.connections??{},(c,u)=>{const f=c.config.condition?bs.fromObject(c.config.condition):void 0;return new Qz(o[c.source],o[c.target],{...c.config,condition:f},u)});let s;if(n.trigger){const c=OA[n.trigger.type]?.cls;c&&(s=new c(n.trigger.config))}const a=new Xg(t,Object.values(o),Object.values(i),s);return a.startTask=n.start_task?o[n.start_task]:null,n.responding_task&&(a.respondingTask=o[n.responding_task]),a}}class tbe extends $u{type="subflow";static schema=Ve({flow:Xi(),input:nm(Xi()).optional(),loop:at().optional()});async execute(){const t=this.params.flow;if(!(t instanceof Xg))throw new Error("Invalid flow provided");if(this.params.loop){const r=Array.isArray(this.params.input)?this.params.input:[this.params.input],o=[];for(const i of r){const s=t.createExecution();await s.start(i),o.push(await s.getResponse())}return o}const n=t.createExecution();return await n.start(this.params.input),n.getResponse()}}class nbe extends zf{type="event";static schema=Ve({event:le(),...zf.schema.properties});async register(t,n){if(!n.eventExists(this.config.event))throw new Error(`Event ${this.config.event} is not registered.`);n.on(this.config.event,async r=>{const o=t.createExecution();this.executions.push(o);try{await o.start(r.params)}catch(i){rt.error(i)}},this.config.mode)}}const rbe=["GET","POST","PUT","PATCH","DELETE"];class Zz extends zf{type="http";static schema=Ve({path:le({pattern:"^/.*$"}),method:le({enum:rbe,default:"GET"}),response_type:le({enum:["json","text","html"],default:"json"}),...zf.schema.properties});async register(t,n){const r=this.config.method.toLowerCase();n[r](this.config.path,async o=>{const i=o.req.raw,s=o[this.config.response_type],a=t.createExecution();if(this.executions.push(a),this.config.mode==="sync"){await a.start(i);const c=a.getResponse(),u=a.getErrors();return u.length>0?o.json({success:!1,errors:u}):s(c)}return a.start(i),o.json({success:!0})})}}const OA={manual:{cls:zf},event:{cls:nbe},http:{cls:Zz}},eB={fetch:{cls:Xz},log:{cls:Z0e},render:{cls:ebe},subflow:{cls:tbe}},tB={...eB},nB=OA,rB=Vt(tB,(e,t)=>Ve({type:ui(t),params:e.cls.schema},{title:String(t)}));Rt(Object.values(rB));const oB=Vt(nB,(e,t)=>Ve({type:ui(t),config:e.cls.schema.optional()},{title:String(t)}));Rt(Object.values(oB));const obe=Ve({source:le(),target:le(),config:Ve({condition:Rt([Ve({type:ui("success")},{title:"success"}),Ve({type:ui("error")},{title:"error"}),Ve({type:ui("matches"),path:le(),value:le()},{title:"matches"})]),max_retries:bt()}).partial()}),iB=Ve({trigger:Rt(Object.values(oB)),tasks:Ou(Rt(Object.values(rB))).optional(),connections:Ou(obe).optional(),start_task:le().optional(),responding_task:le().optional()}),ibe=Ve({basepath:le({default:"/api/flows"}),flows:Ou(iB,{default:{}})});class sbe extends Ug{flows={};getSchema(){return ibe}getFlowInfo(t){return{...t.toJSON(),tasks:t.tasks.length,connections:t.connections}}async build(){const t=Vt(this.config.flows,(r,o)=>Xg.fromObject(o,r,tB));this.flows=t;const n=new Cw;n.get("/",async r=>{const o=Vt(this.flows,i=>this.getFlowInfo(i));return r.json(o)}),n.get("/flow/:name",async r=>{const o=r.req.param("name");return r.json(this.flows[o]?.toJSON())}),n.get("/flow/:name/run",async r=>{const o=r.req.param("name"),i=this.flows[o],s=i.createExecution(),a=performance.now();await s.start();const c=performance.now()-a,u=s.getErrors();return r.json({success:u.length===0,time:c,errors:u,response:s.getResponse(),flow:this.getFlowInfo(i),logs:s.logs})}),n.all("*",r=>r.notFound()),this.ctx.server.route(this.config.basepath,n);for(const[r,o]of Object.entries(this.flows)){const i=o.trigger;switch(!0){case i instanceof Zz:await i.register(o,this.ctx.server);break}}this.setBuilt()}toJSON(){return{...this.config,flows:Vt(this.flows,t=>t.toJSON())}}}class sB extends Ur{static slug="file-uploaded";validate(t){if(typeof t!="object")throw new lw("object",typeof t);return this.clone({...t,...this.params})}}class aB extends Ur{static slug="file-deleted"}class lB extends Ur{static slug="file-access"}const abe=Object.freeze(Object.defineProperty({__proto__:null,FileAccessEvent:lB,FileDeletedEvent:aB,FileUploadedEvent:sB},Symbol.toStringTag,{value:"Module"}));class bm{#e;static Events=abe;emgr;config;constructor(t,n={},r){this.#e=t,this.config={...n,body_max_size:n.body_max_size&&n.body_max_size>0?n.body_max_size:void 0},this.emgr=r??new Lg,this.emgr.registerEvents(bm.Events)}getAdapter(){return this.#e}async objectMetadata(t){return await this.#e.getObjectMeta(t)}getConfig(){return this.config}async uploadFile(t,n,r){const o=await this.#e.putObject(n,t);if(typeof o>"u")throw new Error("Failed to upload file");let i={name:n,meta:xc(t)?{size:t.size,type:t.type}:{size:0,type:"application/octet-stream"},etag:typeof o=="string"?o:""};if(typeof o=="object"&&(i=o),!i.meta.type||["application/octet-stream","application/json"].includes(i.meta.type)||!i.meta.size){const a=await this.#e.getObjectMeta(n);if(!a)throw new Error("Failed to get object meta");i.meta=a}if(i.meta.type.startsWith("image")&&(!i.meta.width||!i.meta.height))try{const a=await bie(t);i.meta={...i.meta,...a}}catch(a){rt.warn("Failed to get image dimensions",a,t)}const s={file:t,...i,state:{name:i.name,path:i.name}};if(!r){const a=await this.emgr.emit(new sB(s));if(a.returned)return a.params}return s}async deleteFile(t){await this.#e.deleteObject(t),await this.emgr.emit(new aB({name:t}))}async fileExists(t){return await this.#e.objectExists(t)}}const cB=new On("media.file.read"),uB=new On("media.file.list"),J_=new On("media.file.upload"),dB=new On("media.file.delete"),lbe=Object.freeze(Object.defineProperty({__proto__:null,deleteFile:dB,listFiles:uB,readFile:cB,uploadFile:J_},Symbol.toStringTag,{value:"Module"}));function cbe(e){if(!e.includes("."))return;const t=e.split(".");return t[t.length-1]?.toLowerCase()}function y6(e,t=16){const n=typeof e=="string"?e:e.name;if(typeof n!="string")throw console.error("Couldn't extract filename from",e),new Error("Invalid file name");let r=cbe(n);if(!r&&xc(e)&&e.type){const o=FL(e.type);o.length>0&&(r=o)}return[$L(t),r].filter(Boolean).join(".")}class ube extends qg{constructor(t){super(),this.media=t}getStorageAdapter(){return this.getStorage().getAdapter()}getStorage(){return this.media.storage}getController(){const{auth:t,permission:n}=this.middlewares,r=this.create().use(t()),o=this.getEntitiesEnum(this.media.em);r.get("/files",zt({summary:"Get the list of files",tags:["media"]}),n(uB,{}),async a=>{const c=await this.getStorageAdapter().listObjects();return a.json(c)}),r.get("/file/:filename",zt({summary:"Get a file by name",tags:["media"]}),n(cB,{}),async a=>{const{filename:c}=a.req.param();if(!c)throw new Error("No file name provided");await this.getStorage().emgr.emit(new lB({name:c}));const u=await this.getStorageAdapter().getObject(c,a.req.raw.headers),f=new Headers(u.headers);return f.set("Cache-Control","public, max-age=31536000, immutable"),new Response(u.body,{status:u.status,statusText:u.statusText,headers:f})}),r.delete("/file/:filename",zt({summary:"Delete a file by name",tags:["media"]}),n(dB,{}),async a=>{const{filename:c}=a.req.param();if(!c)throw new Error("No file name provided");return await this.getStorage().deleteFile(c),a.json({message:"File deleted"})});const i=this.media.options.body_max_size??this.getStorage().getConfig().body_max_size??Number.POSITIVE_INFINITY;ir()&&r.post("/inspect",zt({summary:"Inspect a file",tags:["media"]}),async a=>{const c=await d2(a);return a.json({type:c?.type,name:c?.name,size:c?.size})});const s={content:{"multipart/form-data":{schema:{type:"object",properties:{file:{type:"string",format:"binary"}},required:["file"]}},"application/octet-stream":{schema:{type:"string",format:"binary"}}}};return r.post("/upload/:filename?",zt({summary:"Upload a file",tags:["media"],requestBody:s}),Ft("param",ke({filename:le().optional()})),n(J_,{}),async a=>{const c=a.req.param("filename"),u=await d2(a);if(!u)return a.json({error:"No file provided"},Qt.BAD_REQUEST);if(u.size>i)return a.json({error:`Max size (${i} bytes) exceeded`},Qt.PAYLOAD_TOO_LARGE);const f=c??y6(u),p=await this.getStorage().uploadFile(u,f);return a.json(p,Qt.CREATED)}),r.post("/entity/:entity/:id/:field",zt({summary:"Add a file to an entity",tags:["media"],requestBody:s}),Ft("param",ke({entity:o,id:Rt([bt(),le()]),field:le()})),Ft("query",ke({overwrite:at().optional()})),n(Km,{context:a=>({entity:a.req.param("entity")})}),n(J_,{}),async a=>{const{entity:c,id:u,field:f}=a.req.valid("param"),p=this.media.em.entity(c);if(!p)return a.json({error:`Entity "${c}" not found`},Qt.NOT_FOUND);const g=p.field(f);if(!g||!(g instanceof Ym))return a.json({error:`Invalid field "${f}"`},Qt.BAD_REQUEST);const y=this.media.getMediaEntity().name,v=`${c}.${f}`,x={scope:f,reference:v,entity_id:u},S=g.getMaxItems(),E=[];if(S){const{overwrite:R}=a.req.valid("query"),{data:{count:V}}=await this.media.em.repository(y).count(x);if(V>=S){if(!R)return a.json({error:`Max items (${S}) reached`},Qt.BAD_REQUEST);if(V>S)return a.json({error:`Max items (${S}) exceeded already with ${V} items.`},Qt.UNPROCESSABLE_ENTITY);const H=await this.media.em.repo(y).findMany({select:["path"],where:x,sort:{by:"id",dir:"asc"},limit:V-S+1});H.data&&H.data.length>0&&H.data.map(F=>E.push(F.path))}}const{data:{exists:C}}=await this.media.em.repository(p).exists({id:u});if(!C)return a.json({error:`Entity "${c}" with ID "${u}" doesn't exist found`},Qt.NOT_FOUND);const _=await d2(a);if(!_)return a.json({error:"No file provided"},Qt.BAD_REQUEST);if(_.size>i)return a.json({error:`Max size (${i} bytes) exceeded`},Qt.PAYLOAD_TOO_LARGE);const j=y6(_),A=await this.getStorage().uploadFile(_,j,!0),T=this.media.em.mutator(y);T.__unstable_toggleSystemEntityCreation(!1);const k=await T.insertOne({...this.media.uploadedEventDataToMediaPayload(A),...x});if(T.__unstable_toggleSystemEntityCreation(!0),E.length>0)for(const R of E)await this.getStorage().deleteFile(R);return a.json({ok:!0,result:k.data,...A},Qt.CREATED)}),r}}class dbe{constructor(t){this.registerFn=t}is_set=!1;items={};set(t){if(this.is_set)throw new Error("Registry is already set");return this.items=t,this.is_set=!0,this}add(t,n){return this.items[t]=n,this}register(t,n){if(this.registerFn){const r=this.registerFn(n);return this.items[t]=r,this}return this.add(t,n)}get(t){return this.items[t]}has(t){return t in this.items}all(){return this.items}}/** + * @license MIT + * @copyright Michael Hart 2024 + */const Y_=new TextEncoder,fbe={appstream2:"appstream",cloudhsmv2:"cloudhsm",email:"ses",marketplace:"aws-marketplace",mobile:"AWSMobileHubService",pinpoint:"mobiletargeting",queue:"sqs","git-codecommit":"codecommit","mturk-requester-sandbox":"mturk-requester","personalize-runtime":"personalize"},hbe=new Set(["authorization","content-type","content-length","user-agent","presigned-expires","expect","x-amzn-trace-id","range","connection"]);let pbe=class{constructor({accessKeyId:t,secretAccessKey:n,sessionToken:r,service:o,region:i,cache:s,retries:a,initRetryMs:c}){if(t==null)throw new TypeError("accessKeyId is a required option");if(n==null)throw new TypeError("secretAccessKey is a required option");this.accessKeyId=t,this.secretAccessKey=n,this.sessionToken=r,this.service=o,this.region=i,this.cache=s||new Map,this.retries=a??10,this.initRetryMs=c||50}async sign(t,n){if(t instanceof Request){const{method:i,url:s,headers:a,body:c}=t;n=Object.assign({method:i,url:s,headers:a},n),n.body==null&&a.has("Content-Type")&&(n.body=c!=null&&a.has("X-Amz-Content-Sha256")?c:await t.clone().arrayBuffer()),t=s}const r=new mbe(Object.assign({url:t.toString()},n,this,n&&n.aws)),o=Object.assign({},n,await r.sign());delete o.aws;try{return new Request(o.url.toString(),o)}catch(i){if(i instanceof TypeError)return new Request(o.url.toString(),Object.assign({duplex:"half"},o));throw i}}async fetch(t,n){for(let r=0;r<=this.retries;r++){const o=fetch(await this.sign(t,n));if(r===this.retries)return o;const i=await o;if(i.status<500&&i.status!==429)return i;await new Promise(s=>setTimeout(s,Math.random()*this.initRetryMs*Math.pow(2,r)))}throw new Error("An unknown error occurred, ensure retries is not negative")}};class mbe{constructor({method:t,url:n,headers:r,body:o,accessKeyId:i,secretAccessKey:s,sessionToken:a,service:c,region:u,cache:f,datetime:p,signQuery:g,appendSessionToken:y,allHeaders:v,singleEncode:x}){if(n==null)throw new TypeError("url is a required option");if(i==null)throw new TypeError("accessKeyId is a required option");if(s==null)throw new TypeError("secretAccessKey is a required option");this.method=t||(o?"POST":"GET"),this.url=new URL(n),this.headers=new Headers(r||{}),this.body=o,this.accessKeyId=i,this.secretAccessKey=s,this.sessionToken=a;let S,E;(!c||!u)&&([S,E]=gbe(this.url,this.headers)),this.service=c||S||"",this.region=u||E||"us-east-1",this.cache=f||new Map,this.datetime=p||new Date().toISOString().replace(/[:-]|\.\d{3}/g,""),this.signQuery=g,this.appendSessionToken=y||this.service==="iotdevicegateway",this.headers.delete("Host"),this.service==="s3"&&!this.signQuery&&!this.headers.has("X-Amz-Content-Sha256")&&this.headers.set("X-Amz-Content-Sha256","UNSIGNED-PAYLOAD");const C=this.signQuery?this.url.searchParams:this.headers;if(C.set("X-Amz-Date",this.datetime),this.sessionToken&&!this.appendSessionToken&&C.set("X-Amz-Security-Token",this.sessionToken),this.signableHeaders=["host",...this.headers.keys()].filter(j=>v||!hbe.has(j)).sort(),this.signedHeaders=this.signableHeaders.join(";"),this.canonicalHeaders=this.signableHeaders.map(j=>j+":"+(j==="host"?this.url.host:(this.headers.get(j)||"").replace(/\s+/g," "))).join(` +`),this.credentialString=[this.datetime.slice(0,8),this.region,this.service,"aws4_request"].join("/"),this.signQuery&&(this.service==="s3"&&!C.has("X-Amz-Expires")&&C.set("X-Amz-Expires","86400"),C.set("X-Amz-Algorithm","AWS4-HMAC-SHA256"),C.set("X-Amz-Credential",this.accessKeyId+"/"+this.credentialString),C.set("X-Amz-SignedHeaders",this.signedHeaders)),this.service==="s3")try{this.encodedPath=decodeURIComponent(this.url.pathname.replace(/\+/g," "))}catch{this.encodedPath=this.url.pathname}else this.encodedPath=this.url.pathname.replace(/\/+/g,"/");x||(this.encodedPath=encodeURIComponent(this.encodedPath).replace(/%2F/g,"/")),this.encodedPath=x6(this.encodedPath);const _=new Set;this.encodedSearch=[...this.url.searchParams].filter(([j])=>{if(!j)return!1;if(this.service==="s3"){if(_.has(j))return!1;_.add(j)}return!0}).map(j=>j.map(A=>x6(encodeURIComponent(A)))).sort(([j,A],[T,k])=>jT?1:Ak?1:0).map(j=>j.join("=")).join("&")}async sign(){return this.signQuery?(this.url.searchParams.set("X-Amz-Signature",await this.signature()),this.sessionToken&&this.appendSessionToken&&this.url.searchParams.set("X-Amz-Security-Token",this.sessionToken)):this.headers.set("Authorization",await this.authHeader()),{method:this.method,url:this.url,headers:this.headers,body:this.body}}async authHeader(){return["AWS4-HMAC-SHA256 Credential="+this.accessKeyId+"/"+this.credentialString,"SignedHeaders="+this.signedHeaders,"Signature="+await this.signature()].join(", ")}async signature(){const t=this.datetime.slice(0,8),n=[this.secretAccessKey,t,this.region,this.service].join();let r=this.cache.get(n);if(!r){const o=await zp("AWS4"+this.secretAccessKey,t),i=await zp(o,this.region),s=await zp(i,this.service);r=await zp(s,"aws4_request"),this.cache.set(n,r)}return P2(await zp(r,await this.stringToSign()))}async stringToSign(){return["AWS4-HMAC-SHA256",this.datetime,this.credentialString,P2(await b6(await this.canonicalString()))].join(` +`)}async canonicalString(){return[this.method.toUpperCase(),this.encodedPath,this.encodedSearch,this.canonicalHeaders+` +`,this.signedHeaders,await this.hexBodyHash()].join(` +`)}async hexBodyHash(){let t=this.headers.get("X-Amz-Content-Sha256")||(this.service==="s3"&&this.signQuery?"UNSIGNED-PAYLOAD":null);if(t==null){if(this.body&&typeof this.body!="string"&&!("byteLength"in this.body))throw new Error("body must be a string, ArrayBuffer or ArrayBufferView, unless you include the X-Amz-Content-Sha256 header");t=P2(await b6(this.body||""))}return t}}async function zp(e,t){const n=await crypto.subtle.importKey("raw",typeof e=="string"?Y_.encode(e):e,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]);return crypto.subtle.sign("HMAC",n,Y_.encode(t))}async function b6(e){return crypto.subtle.digest("SHA-256",typeof e=="string"?Y_.encode(e):e)}const v6=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function P2(e){const t=new Uint8Array(e);let n="";for(let r=0;r>>4&15],n+=v6[o&15]}return n}function x6(e){return e.replace(/[!'()*]/g,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase())}function gbe(e,t){const{hostname:n,pathname:r}=e;if(n.endsWith(".on.aws")){const a=n.match(/^[^.]{1,63}\.lambda-url\.([^.]{1,63})\.on\.aws$/);return a!=null?["lambda",a[1]||""]:["",""]}if(n.endsWith(".r2.cloudflarestorage.com"))return["s3","auto"];if(n.endsWith(".backblazeb2.com")){const a=n.match(/^(?:[^.]{1,63}\.)?s3\.([^.]{1,63})\.backblazeb2\.com$/);return a!=null?["s3",a[1]||""]:["",""]}const o=n.replace("dualstack.","").match(/([^.]{1,63})\.(?:([^.]{0,63})\.)?amazonaws\.com(?:\.cn)?$/);let i=o&&o[1]||"",s=o&&o[2];if(s==="us-gov")s="us-gov-west-1";else if(s==="s3"||s==="s3-accelerate")s="us-east-1",i="s3";else if(i==="iot")n.startsWith("iot.")?i="execute-api":n.startsWith("data.jobs.iot.")?i="iot-jobs-data":i=r==="/mqtt"?"iotdevicegateway":"iotdata";else if(i==="autoscaling"){const a=(t.get("X-Amz-Target")||"").split(".")[0];a==="AnyScaleFrontendService"?i="application-autoscaling":a==="AnyScaleScalingPlannerFrontendService"&&(i="autoscaling-plans")}else s==null&&i.startsWith("s3-")?(s=i.slice(3).replace(/^fips-|^external-1/,""),i="s3"):i.endsWith("-fips")?i=i.slice(0,-5):s&&/-\d$/.test(i)&&!/-\d$/.test(s)&&([i,s]=[s,i]);return[fbe[i]||i,s||""]}class ybe extends pbe{#e;constructor(t,n){super(t),this.#e=n??{responseType:"json"}}convertParams(t){switch(this.#e.convertParams){case"pascalToKebab":return g_(t);default:return t}}getUrl(t="/",n={}){const r=new URL(t),o=this.convertParams(n);return Object.entries(o).forEach(([i,s])=>{r.searchParams.append(i,s)}),r.toString()}updateKeysRecursively(t,n){return t==null?t:Array.isArray(t)?t.map(r=>this.updateKeysRecursively(r,n)):typeof t=="object"?Object.keys(t).reduce((r,o)=>{let i=o;return o.indexOf(" ")===-1&&(i=o.charAt(0)[n]()+o.slice(1)),r[i]=this.updateKeysRecursively(t[o],n),r},{}):t}async fetchJson(t,n){const r=await this.fetch(t,n);if(this.#e.responseType==="xml"){if(!r.ok){const s=await r.text();throw new Error(s)}const i=await r.text();return pse(i)}if(!r.ok){const i=await r.json();throw new Error(i.message)}const o=await r.json();return this.#e.responseKeysToUpper?this.updateKeysRecursively(o,"toUpperCase"):o}}const w6=Symbol.for("bknd:storage");class fB{constructor(){this[w6]=!0}static isAdapter(t){return t?t[w6]===!0:!1}}const S6=ke({access_key:Pm(),secret_access_key:Pm(),url:le({pattern:"^https?://(?:.*)?[^/.]+$",description:"URL to S3 compatible endpoint without trailing slash",examples:["https://{account_id}.r2.cloudflarestorage.com/{bucket}","https://{bucket}.s3.{region}.amazonaws.com"]})},{title:"AWS S3",description:"AWS S3 or compatible storage"});class hB extends fB{#e;client;constructor(t){super(),this.client=new ybe({accessKeyId:t.access_key,secretAccessKey:t.secret_access_key,retries:ir()?0:10,service:"s3"},{convertParams:"pascalToKebab",responseType:"xml"}),this.#e=Cn(S6,t)}getName(){return"s3"}getSchema(){return S6}getUrl(t="",n={}){let r=this.getObjectUrl("").slice(0,-1);return t.length>0&&(r+=`/${t}`),this.client.getUrl(r,n)}getObjectUrl(t){return`${this.#e.url}/${t}`}async listObjects(t=""){const n={ListType:2,Prefix:t},r=this.getUrl("",n),o=await this.client.fetchJson(r,{method:"GET"}),{Contents:i}=o.ListBucketResult,s=i?Array.isArray(i)?i:[i]:[];return Vi(s,(c,u)=>{u.Key&&u.LastModified&&u.Size&&c.push({key:u.Key,last_modified:u.LastModified,size:u.Size})},[])}async putObject(t,n,r={}){const o=this.getUrl(t,{}),i=await this.client.fetch(o,{method:"PUT",body:n,headers:xc(n)?{"Content-Length":String(n.size)}:{}});if(!i.ok)throw new Error(`Failed to upload object: ${i.status} ${i.statusText}`);return String(i.headers.get("etag"))}async headObject(t,n={}){const r=this.getUrl(t,{});return await this.client.fetch(r,{method:"HEAD",headers:{Range:"bytes=0-1"}})}async getObjectMeta(t){const n=await this.headObject(t),r=String(n.headers.get("content-type")),o=Number(String(n.headers.get("content-range")?.split("/")[1]));return{type:r,size:o}}async objectExists(t,n={}){return(await this.headObject(t)).ok}async getObject(t,n){const r=this.getUrl(t),o=await this.client.fetch(r,{method:"GET",headers:Sie(n,["if-none-match","accept","if-modified-since"])});return new Response(o.body,{status:o.status,statusText:o.statusText,headers:o.headers})}async deleteObject(t,n={}){const r=this.getUrl(t,n);await this.client.fetch(r,{method:"DELETE"})}toJSON(t){return{type:this.getName(),config:t?this.#e:void 0}}}const E6=ke({cloud_name:le(),api_key:Pm(),api_secret:Pm(),upload_preset:le().optional()},{title:"Cloudinary",description:"Cloudinary media storage"});class pB extends fB{config;constructor(t){super(),this.config=Cn(E6,t)}getSchema(){return E6}getMimeType(t){switch(!0){case(t.format==="jpeg"||t.format==="jpg"):return"image/jpeg"}return`${t.resource_type}/${t.format}`}getName(){return"cloudinary"}getAuthorizationHeader(){return{Authorization:`Basic ${btoa(`${this.config.api_key}:${this.config.api_secret}`)}`}}async putObject(t,n){const r=t.replace(/\.[a-z0-9]{2,5}$/,""),o=new FormData;o.append("file",n),o.append("public_id",r),o.append("api_key",this.config.api_key),this.config.upload_preset&&o.append("upload_preset",this.config.upload_preset);const i=await fetch(`https://api.cloudinary.com/v1_1/${this.config.cloud_name}/auto/upload`,{method:"POST",headers:{Accept:"application/json"},body:o});if(!i.ok)return;const s=await i.json();return{name:s.public_id+"."+s.format,etag:s.etag,meta:{type:this.getMimeType(s),size:s.bytes}}}async listObjects(t){const n=await fetch(`https://api.cloudinary.com/v1_1/${this.config.cloud_name}/resources/search`,{method:"GET",headers:{Accept:"application/json","Cache-Control":"no-cache",...this.getAuthorizationHeader()}});if(!n.ok)throw new Error("Failed to list objects");return(await n.json()).resources.map(i=>({key:i.public_id,last_modified:new Date(i.uploaded_at),size:i.bytes}))}async headObject(t){const n=this.getObjectUrl(t);return await fetch(n,{method:"HEAD",headers:{"Cache-Control":"no-cache, no-store, must-revalidate",Pragma:"no-cache",Expires:"0",Range:"bytes=0-1"}})}async objectExists(t){return(await this.headObject(t)).ok}async getObjectMeta(t){const n=await this.headObject(t);if(n.ok){const r=n.headers.get("content-type"),o=Number(n.headers.get("content-range")?.split("/")[1]);return{type:r,size:o}}throw new Error("Cannot get object meta")}guessType(t){const n={image:["jpg","jpeg","png","gif","webp","svg"],video:["mp4","webm","ogg"]},r=t.split(".").pop();return Object.keys(n).find(o=>n[o].includes(r))}getObjectUrl(t){const n=this.guessType(t)??"image";return`https://res.cloudinary.com/${this.config.cloud_name}/${n}/upload/${t}`}async generateSignature(t,n){const r=t.timestamp??Math.floor(Date.now()/1e3),o=Object.entries({...t,timestamp:r}).sort(([s],[a])=>s.localeCompare(a)).map(([s,a])=>`${s}=${a}`).join("&");return{signature:await HL.sha1(o+(n??this.config.api_secret)),timestamp:r}}filenameToPublicId(t){return t.split(".").slice(0,-1).join(".")}async getObject(t,n){const r=await fetch(this.getObjectUrl(t),{method:"GET",headers:wie(n,["range"])});return new Response(r.body,{status:r.status,statusText:r.statusText,headers:r.headers})}async deleteObject(t){const n=this.guessType(t)??"image",r=this.filenameToPublicId(t),{timestamp:o,signature:i}=await this.generateSignature({public_id:r}),s=new FormData;s.append("public_id",r),s.append("timestamp",String(o)),s.append("signature",i),s.append("api_key",this.config.api_key);const a=`https://api.cloudinary.com/v1_1/${this.config.cloud_name}/${n}/destroy`,c=await fetch(a,{headers:{Accept:"application/json","Cache-Control":"no-cache",...this.getAuthorizationHeader()},method:"POST",body:s});if(!c.ok)throw new Error(`Failed to delete object: ${c.status} ${c.statusText}`)}toJSON(t){return{type:"cloudinary",config:t?this.config:{cloud_name:this.config.cloud_name}}}}const bbe=new dbe(e=>({cls:e,schema:e.prototype.getSchema()})).register("s3",hB).register("cloudinary",pB);hB.prototype.getSchema(),pB.prototype.getSchema();const vbe={media:bbe},mB=vbe.media;function gB(){const e=Zx(mB.all(),(t,n)=>Ve({type:ui(n),config:t.schema},{title:t.schema?.title??n,description:t.schema?.description}));return Ow("config_media",{enabled:at({default:!1}),basepath:le({default:"/api/media"}),entity_name:le({default:"media"}),storage:Ve({body_max_size:bt({description:"Max size of the body in bytes. Leave blank for unlimited."}).optional()},{default:{}}),adapter:Ige("config_media_adapter",Rt(Object.values(e))).optional()},{default:{}}).strict()}gB();class jA extends Ug{_storage;options={body_max_size:null};async build(){if(!this.config.enabled){this.setBuilt();return}if(!this.config.adapter){console.info("No storage adapter provided, skip building media.");return}let t;try{const{type:n,config:r}=this.config.adapter,o=mB.get(n).cls;t=new o(r),this._storage=new bm(t,this.config.storage,this.ctx.emgr),this.setBuilt(),this.setupListeners(),this.ctx.guard.registerPermissions(lbe),this.ctx.server.route(this.basepath,new ube(this).getController());const i=this.getMediaEntity(!0);this.ctx.helper.ensureSchema(oz({[i.name]:i},({index:s},{media:a})=>{s(a).on(["path"],!0).on(["reference"]).on(["entity_id"])}))}catch(n){throw console.error(n),new Error(`Could not build adapter with config ${JSON.stringify(this.config.adapter)}`)}}getSchema(){return gB()}get basepath(){return this.config.basepath}get storage(){return this.throwIfNotBuilt(),this._storage}uploadedEventDataToMediaPayload(t){const n={};return t.meta.width&&t.meta.height&&(n.width=t.meta.width,n.height=t.meta.height),{path:t.name,mime_type:t.meta.type,size:t.meta.size,etag:t.etag,modified_at:new Date,metadata:n}}static mediaFields=Gz;getMediaEntity(t){const n=this.config.entity_name;return t||!this.em.hasEntity(n)?rz(n,jA.mediaFields,void 0,"system"):this.em.entity(n)}get em(){return this.ctx.em}setupListeners(){const{emgr:t,em:n}=this.ctx,r=this.getMediaEntity().name;t.onEvent(bm.Events.FileUploadedEvent,async o=>{const i=n.mutator(r);i.__unstable_toggleSystemEntityCreation(!1);const s=this.uploadedEventDataToMediaPayload(o.params),{data:a}=await i.insertOne(s);return i.__unstable_toggleSystemEntityCreation(!0),{data:a}},{mode:"sync",id:"add-data-media"}),t.onEvent(bm.Events.FileDeletedEvent,async o=>{const{data:i}=await n.repo(r).findOne({path:o.params.name});i&&await n.mutator(r).deleteOne(i.id),rt.log("App:storage:file deleted",o.params)},{mode:"sync",id:"delete-data-media"}),t.onEvent(z7,async o=>{const{entity:i,data:s}=o.params,a=i.fields.filter(c=>c.type==="media");if(a.length>0){const c=a.map(f=>`${i.name}.${f.name}`);rt.log("App:storage:file cleaning up",{reference:{$in:c},entity_id:String(s.id)});const{data:u}=await n.mutator(r).deleteWhere({reference:{$in:c},entity_id:String(s.id)});for(const f of u)await this.storage.deleteFile(f.path);rt.log("App:storage:file cleaned up files:",u.length)}},{mode:"async",id:"delete-data-media-after"})}getOverwritePaths(){return[/^\.?adapter$/]}toJSON(t){return!this.isBuilt()||!this.config.enabled?this.configDefault:{...this.config,adapter:this.storage.getAdapter().toJSON(t)}}}const yB={server:Vge,data:Q0e,auth:Aw,media:jA,flows:sbe};AL("modules_debug",!1);function xbe(){return{type:"object",...Vt(yB,t=>t.prototype.getSchema())}}function wbe(){const e=Vt(yB,t=>t.prototype.getSchema().template({},{withOptional:!0,withExtendedOptional:!0}));return structuredClone(e)}class Tw{constructor(t={},n){this._options=t,this.fetcher=n??fetch}fetcher;getDefaultOptions(){return{}}get options(){return{host:"http://localhost",token:void 0,...this.getDefaultOptions(),...this._options}}key(){return this.options.basepath??""}getUrl(t){const n=this.options.basepath??"";return this.options.host+(n+"/"+t).replace(/\/{2,}/g,"/").replace(/\/$/,"")}request(t,n,r){const o=r?.method??"GET",i=Array.isArray(t)?t.join("/"):t;let s=this.getUrl(i);n instanceof URLSearchParams?s+="?"+n.toString():typeof n=="object"&&Object.keys(n).length>0&&(s+="?"+tw(n));const a=new Headers(this.options.headers??{});for(const[f,p]of Object.entries(r?.headers??{}))a.set(f,p);a.has("Accept")||a.set("Accept","application/json"),this.options.token&&this.options.token_transport==="header"&&a.set("Authorization",`Bearer ${this.options.token}`);let c=r?.body;if(r&&"body"in r&&["POST","PATCH","PUT"].includes(o)){const f=a.get("Content-Type")??void 0;(!f||f.startsWith("application/json")||$a(c))&&(c=JSON.stringify(r.body),a.set("Content-Type","application/json"))}const u=new Request(s,{...r,credentials:this.options.credentials,method:o,body:c,headers:a});return new $w(u,{fetcher:this.fetcher,verbose:this.options.verbose})}get(t,n,r){return this.request(t,n,{...r,method:"GET"})}post(t,n,r){return this.request(t,void 0,{...r,body:n,method:"POST"})}patch(t,n,r){return this.request(t,void 0,{...r,body:n,method:"PATCH"})}put(t,n,r){return this.request(t,void 0,{...r,body:n,method:"PUT"})}delete(t,n,r){return this.request(t,void 0,{...r,body:n,method:"DELETE"})}}function Sbe(e,t,n){let r=typeof n<"u"?n:t;const o=["raw","body","ok","status","res","data","toJSON"];return typeof r!="object"&&(r={}),new Proxy(r,{get(i,s,a){return s==="raw"||s==="res"?e:s==="body"?t:s==="data"?n:s==="ok"?e.ok:s==="status"?e.status:s==="toJSON"?()=>i:Reflect.get(i,s,a)},has(i,s){return o.includes(s)?!0:Reflect.has(i,s)},ownKeys(i){return Array.from(new Set([...Reflect.ownKeys(i),...o]))},getOwnPropertyDescriptor(i,s){return o.includes(s)?{configurable:!0,enumerable:!0,value:Reflect.get({raw:e,body:t,ok:e.ok,status:e.status},s)}:Reflect.getOwnPropertyDescriptor(i,s)}})}class $w{constructor(t,n,r){this.request=t,this.options=n,this.refineData=r}[Symbol.toStringTag];get verbose(){return this.options?.verbose??!1}refine(t){return new $w(this.request,this.options,t)}async execute(){ir()&&await new Promise(s=>setTimeout(s,200));const t=this.options?.fetcher??fetch;this.verbose&&rt.debug("[FetchPromise] Request",{method:this.request.method,url:this.request.url});const n=await t(this.request);this.verbose&&rt.debug("[FetchPromise] Response",{res:n,ok:n.ok,status:n.status});let r,o;const i=n.headers.get("Content-Type")??"";if(i.startsWith("application/json")?(r=await n.json(),typeof r=="object"&&(o="data"in r?r.data:r)):i.startsWith("text")?r=await n.text():r=n.body,this.refineData)try{o=this.refineData(o)}catch(s){console.warn("[FetchPromise] Error in refineData",s),o=void 0}return Sbe(n,r,o)}then(t,n){return this.execute().then(t,n)}catch(t){return this.then(void 0,t)}finally(t){return this.then(n=>(t?.(),n),n=>{throw t?.(),n})}path(){return new URL(this.request.url).pathname}key(t){const n=new URL(this.request.url);return t?.search!==!1?this.path()+n.search:this.path()}keyArray(t){const n=new URL(this.request.url),r=this.path().split("/");return(t?.search!==!1?[...r,n.searchParams.toString()]:r).filter(Boolean)}toString(){return this.key({search:!0})}toJSON(){return{url:this.request.url,method:this.request.method}}}class Ebe extends Tw{getDefaultOptions(){return{basepath:"/api/auth",credentials:"include"}}async login(t,n){const r=await this.post([t,"login"],n);return r.ok&&r.body.token&&await this.options.onTokenUpdate?.(r.body.token,!0),r}async register(t,n){const r=await this.post([t,"register"],n);return r.ok&&r.body.token&&await this.options.onTokenUpdate?.(r.body.token,!0),r}async actionSchema(t,n){return this.get([t,"actions",n,"schema.json"])}async action(t,n,r){return this.post([t,"actions",n],r)}async loginWithPassword(t){return this.login("password",t)}async registerWithPassword(t){return this.register("password",t)}me(){return this.get(["me"])}strategies(){return this.get(["strategies"])}async logout(){return this.get(["logout"],void 0,{headers:{Accept:"application/json"}}).then(()=>this.options.onTokenUpdate?.(void 0,!0))}}class Nbe extends Tw{getDefaultOptions(){return{basepath:"/api/data",queryLengthLimit:1e3,defaultQuery:{limit:10}}}requireObjectSet(t,n){if(!t||typeof t!="object"||Object.keys(t).length===0)throw new Error(n??"object is required")}readOne(t,n,r={}){return this.get(["entity",t,n],r)}readOneBy(t,n={}){return this.readMany(t,{...n,limit:1,offset:0}).refine(r=>r[0])}readMany(t,n={}){const r=n??this.options.defaultQuery,o=this.get(["entity",t],r);return o.request.url.length<=this.options.queryLengthLimit?o:this.post(["entity",t,"query"],r)}readManyByReference(t,n,r,o={}){return this.get(["entity",t,n,r],o??this.options.defaultQuery)}createOne(t,n){return this.post(["entity",t],n)}createMany(t,n){if(!n||!Array.isArray(n)||n.length===0)throw new Error("input is required");return this.post(["entity",t],n)}updateOne(t,n,r){if(!n)throw new Error("ID is required");return this.patch(["entity",t,n],r)}updateMany(t,n,r){return this.requireObjectSet(n),this.patch(["entity",t],{update:r,where:n})}deleteOne(t,n){if(!n)throw new Error("ID is required");return this.delete(["entity",t,n])}deleteMany(t,n){return this.requireObjectSet(n),this.delete(["entity",t],n)}count(t,n={}){return this.post(["entity",t,"fn","count"],n)}exists(t,n={}){return this.post(["entity",t,"fn","exists"],n)}}class _be extends Tw{getDefaultOptions(){return{basepath:"/api/media",upload_fetcher:fetch,init:{}}}listFiles(){return this.get(["files"])}getFile(t){return this.get(["file",t],void 0,{headers:{Accept:"*/*"}})}async getFileStream(t){const{res:n}=await this.getFile(t);if(!n.ok||!n.body)throw new Error("Failed to fetch file");return n.body}async download(t){const{res:n}=await this.getFile(t);if(!n.ok||!n.body)throw new Error("Failed to fetch file");return await n.blob()}getFileUploadUrl(t){return t?this.getUrl(`/upload/${t.path}`):this.getUrl("/upload")}getEntityUploadUrl(t,n,r){return this.getUrl(`/entity/${t}/${n}/${r}`)}getUploadHeaders(){return this.options.token_transport==="header"&&this.options.token?new Headers({Authorization:`Bearer ${this.options.token}`}):new Headers}uploadFile(t,n){const r={"Content-Type":"application/octet-stream",...n?._init?.headers||{}};let o=n?.filename||"";try{typeof t.type<"u"&&(r["Content-Type"]=t.type),n?.filename||(o=t.name)}catch{}o&&o.length>0&&o.includes("/")&&(o=o.split("/").pop()||"");const i={...this.options.init,...n?._init||{},headers:r};if(n?.path)return this.request(n.path,n?.query,{...i,body:t,method:"POST"});if(!o||o.length===0)throw new Error("Invalid filename");return this.request(n?.path??["upload",o],n?.query,{...i,body:t,method:"POST"})}async upload(t,n={}){if(t instanceof Request||typeof t=="string"){const o=await(n.fetcher??this.options.upload_fetcher)(t);if(!o.ok||!o.body)throw new Error("Failed to fetch file");return this.uploadFile(o.body,n)}else if(t instanceof Response){if(!t.body)throw new Error("Invalid response");return this.uploadFile(t.body,{...n??{},_init:{...n._init??{},headers:{...n._init?.headers??{},"Content-Type":t.headers.get("Content-Type")||"application/octet-stream"}}})}return this.uploadFile(t,n)}async uploadToEntity(t,n,r,o,i){const s=i?.overwrite!==void 0?{overwrite:i.overwrite}:void 0;return this.upload(o,{...i,path:["entity",t,n,r],query:s})}deleteFile(t){return this.delete(["file",t])}}class Cbe extends Tw{getDefaultOptions(){return{basepath:"/api/system"}}readConfig(){return this.get("config")}readSchema(t){return this.get("schema",{config:t?.config?1:0,secrets:t?.secrets?1:0,fresh:t?.fresh?1:0})}setConfig(t,n,r){return this.post(["config","set",t].join("/")+`?force=${r?1:0}`,n)}addConfig(t,n,r){return this.post(["config","add",t,n],r)}patchConfig(t,n,r){return this.patch(["config","patch",t,n],r)}overwriteConfig(t,n,r){return this.put(["config","overwrite",t,n],r)}removeConfig(t,n){return this.delete(["config","remove",t,n])}permissions(){return this.get("permissions")}}class bB{constructor(t={}){this.options=t,this.verified=t.verified===!0,"request"in t&&t.request?(this.options.host=t.host??new URL(t.request.url).origin,this.options.headers=t.headers??t.request.headers,this.extractToken()):"token"in t&&t.token?(this.token_transport="header",this.updateToken(t.token,{trigger:!1})):"user"in t&&t.user?(this.token_transport="none",this.user=t.user,this.verified=t.verified!==!1):this.extractToken(),this.buildApis()}token;user;verified=!1;token_transport="header";system;data;auth;media;get fetcher(){return this.options.fetcher??fetch}get baseUrl(){return this.options.host??"http://localhost"}get tokenKey(){return this.options.key??"auth"}extractToken(){if(this.verified=!1,this.options.headers){const t=Obe(this.options.headers.get("cookie"),"auth");if(t){this.token_transport="cookie",this.updateToken(t);return}const n=this.options.headers.get("authorization")?.replace("Bearer ","");if(n){this.token_transport="header",this.updateToken(n);return}}else this.storage&&this.storage.getItem(this.tokenKey).then(t=>{this.token_transport="header",this.updateToken(t?String(t):void 0,{verified:!0,trigger:!1})})}get storage(){const t=this.options.storage;return new Proxy({},{get(n,r){return(...o)=>{const i=t?t[r](...o):void 0;return i instanceof Promise?i:{then:s=>s(i)}}}})}updateToken(t,n){this.token=t,this.verified=n?.verified===!0,t?this.user=mo(wye(t).payload,["iat","iss","exp"]):this.user=void 0;const r=()=>{n?.trigger!==!1&&this.options.onAuthStateChange?.(this.getAuthState())};if(this.storage){const o=this.tokenKey;t?this.storage.setItem(o,t).then(r):this.storage.removeItem(o).then(r)}else n?.trigger!==!1&&r();n?.rebuild&&this.buildApis()}markAuthVerified(t){return this.verified=t,this.options.onAuthStateChange?.(this.getAuthState()),this}isAuthVerified(){return this.verified}getAuthState(){return{token:this.token,user:this.user,verified:this.verified}}isAuthenticated(){const{token:t,user:n}=this.getAuthState();return!!t&&!!n}async getVerifiedAuthState(){return await this.verifyAuth(),this.getAuthState()}async verifyAuth(){try{const{ok:t,data:n}=await this.auth.me(),r=n?.user;if(!t||!r)throw new Error;this.user=r}catch{this.updateToken(void 0)}finally{this.markAuthVerified(!0)}}getUser(){return this.user||null}getParams(){return Object.freeze({host:this.baseUrl,token:this.token,headers:this.options.headers,token_transport:this.token_transport,verbose:this.options.verbose,credentials:this.options.credentials})}buildApis(){const t=this.getParams(),n=this.options.fetcher;this.system=new Cbe(t,n),this.data=new Nbe({...t,...this.options.data},n),this.auth=new Ebe({...t,...this.options.auth,onTokenUpdate:(r,o)=>{this.updateToken(r,{rebuild:!0,verified:o,trigger:!0}),this.options.auth?.onTokenUpdate?.(r)}},n),this.media=new _be({...t,...this.options.media},n)}}function Obe(e,t){if(!e)return null;for(const n of e.split("; ")){const[r,o]=n.split("=");if(r===t&&o)return decodeURIComponent(o)}return null}const AA=w.createContext(void 0),jbe=({children:e,host:t,baseUrl:n=t,api:r,...o})=>{const i=Rw(),s=vB();let a=n??s?.baseUrl??"",c;if(i&&(c=i.user),!a)try{a=window.location.origin}catch{}const u={user:c,...o,host:a},f=w.useMemo(()=>r??new bB({...u,verbose:ir(),onAuthStateChange:y=>{o.onAuthStateChange?.(y),(!p?.token||y.token!==p?.token)&&g(y)}}),[r,JSON.stringify(u)]),[p,g]=w.useState(f.getAuthState());return h.jsx(AA.Provider,{value:{baseUrl:f.baseUrl,api:f,authState:p},children:e})},ss=e=>{const t=w.useContext(AA);if(!t?.api||e)return console.info("creating new api",{host:e}),new bB({host:""});if(!t)throw new Error("useApi must be used within a ClientProvider");return t.api},vB=()=>w.useContext(AA);function Rw(){const e={logout_route:"/api/auth/logout",admin_basepath:""};return typeof window<"u"&&window.__BKND__?{...e,...window.__BKND__}:e}var D2={exports:{}},I2={};/** + * @license React + * use-sync-external-store-shim.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var N6;function Abe(){if(N6)return I2;N6=1;var e=dc();function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(p,g){var y=g(),v=r({inst:{value:y,getSnapshot:g}}),x=v[0].inst,S=v[1];return i(function(){x.value=y,x.getSnapshot=g,c(x)&&S({inst:x})},[p,y,g]),o(function(){return c(x)&&S({inst:x}),p(function(){c(x)&&S({inst:x})})},[p]),s(y),y}function c(p){var g=p.getSnapshot;p=p.value;try{var y=g();return!n(p,y)}catch{return!0}}function u(p,g){return g()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return I2.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,I2}var _6;function xB(){return _6||(_6=1,D2.exports=Abe()),D2.exports}var TA=xB();const wB=0,SB=1,EB=2,C6=3;var O6=Object.prototype.hasOwnProperty;function K_(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&K_(e[r],t[r]););return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(O6.call(e,n)&&++r&&!O6.call(t,n)||!(n in t)||!K_(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}const ws=new WeakMap,Jl=()=>{},Kn=Jl(),X_=Object,mt=e=>e===Kn,Di=e=>typeof e=="function",lc=(e,t)=>({...e,...t}),NB=e=>Di(e.then),L2={},tb={},$A="undefined",Qg=typeof window!=$A,Q_=typeof document!=$A,Tbe=Qg&&"Deno"in window,$be=()=>Qg&&typeof window.requestAnimationFrame!=$A,Fl=(e,t)=>{const n=ws.get(e);return[()=>!mt(t)&&e.get(t)||L2,r=>{if(!mt(t)){const o=e.get(t);t in tb||(tb[t]=o),n[5](t,lc(o,r),o||L2)}},n[6],()=>!mt(t)&&t in tb?tb[t]:!mt(t)&&e.get(t)||L2]};let Z_=!0;const Rbe=()=>Z_,[eC,tC]=Qg&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Jl,Jl],kbe=()=>{const e=Q_&&document.visibilityState;return mt(e)||e!=="hidden"},Mbe=e=>(Q_&&document.addEventListener("visibilitychange",e),eC("focus",e),()=>{Q_&&document.removeEventListener("visibilitychange",e),tC("focus",e)}),Pbe=e=>{const t=()=>{Z_=!0,e()},n=()=>{Z_=!1};return eC("online",t),eC("offline",n),()=>{tC("online",t),tC("offline",n)}},Dbe={isOnline:Rbe,isVisible:kbe},Ibe={initFocus:Mbe,initReconnect:Pbe},j6=!Ne.useId,tg=!Qg||Tbe,Lbe=e=>$be()?window.requestAnimationFrame(e):setTimeout(e,1),Bb=tg?w.useEffect:w.useLayoutEffect,F2=typeof navigator<"u"&&navigator.connection,A6=!tg&&F2&&(["slow-2g","2g"].includes(F2.effectiveType)||F2.saveData),nb=new WeakMap,Fbe=e=>X_.prototype.toString.call(e),z2=(e,t)=>e===`[object ${t}]`;let zbe=0;const nC=e=>{const t=typeof e,n=Fbe(e),r=z2(n,"Date"),o=z2(n,"RegExp"),i=z2(n,"Object");let s,a;if(X_(e)===e&&!r&&!o){if(s=nb.get(e),s)return s;if(s=++zbe+"~",nb.set(e,s),Array.isArray(e)){for(s="@",a=0;a{if(Di(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?nC(e):"",[e,t]};let Bbe=0;const rC=()=>++Bbe;async function _B(...e){const[t,n,r,o]=e,i=lc({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let s=i.populateCache;const a=i.rollbackOnError;let c=i.optimisticData;const u=g=>typeof a=="function"?a(g):a!==!1,f=i.throwOnError;if(Di(n)){const g=n,y=[],v=t.keys();for(const x of v)!/^\$(inf|sub)\$/.test(x)&&g(t.get(x)._k)&&y.push(x);return Promise.all(y.map(p))}return p(n);async function p(g){const[y]=ng(g);if(!y)return;const[v,x]=Fl(t,y),[S,E,C,_]=ws.get(t),j=()=>{const M=S[y];return(Di(i.revalidate)?i.revalidate(v().data,g):i.revalidate!==!1)&&(delete C[y],delete _[y],M&&M[0])?M[0](EB).then(()=>v().data):v().data};if(e.length<3)return j();let A=r,T,k=!1;const R=rC();E[y]=[R,0];const V=!mt(c),H=v(),F=H.data,B=H._c,U=mt(B)?F:B;if(V&&(c=Di(c)?c(U,F):c,x({data:c,_c:U})),Di(A))try{A=A(U)}catch(M){T=M,k=!0}if(A&&NB(A))if(A=await A.catch(M=>{T=M,k=!0}),R!==E[y][0]){if(k)throw T;return A}else k&&V&&u(T)&&(s=!0,x({data:U,_c:Kn}));if(s&&!k)if(Di(s)){const M=s(A,U);x({data:M,error:Kn,_c:Kn})}else x({data:A,error:Kn,_c:Kn});if(E[y][1]=rC(),Promise.resolve(j()).then(()=>{x({_c:Kn})}),k){if(f)throw T;return}return A}}const T6=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Vbe=(e,t)=>{if(!ws.has(e)){const n=lc(Ibe,t),r=Object.create(null),o=_B.bind(Kn,e);let i=Jl;const s=Object.create(null),a=(f,p)=>{const g=s[f]||[];return s[f]=g,g.push(p),()=>g.splice(g.indexOf(p),1)},c=(f,p,g)=>{e.set(f,p);const y=s[f];if(y)for(const v of y)v(p,g)},u=()=>{if(!ws.has(e)&&(ws.set(e,[r,Object.create(null),Object.create(null),Object.create(null),o,c,a]),!tg)){const f=n.initFocus(setTimeout.bind(Kn,T6.bind(Kn,r,wB))),p=n.initReconnect(setTimeout.bind(Kn,T6.bind(Kn,r,SB)));i=()=>{f&&f(),p&&p(),ws.delete(e)}}};return u(),[e,o,u,i]}return[e,ws.get(e)[4]]},Ube=(e,t,n,r,o)=>{const i=n.errorRetryCount,s=o.retryCount,a=~~((Math.random()+.5)*(1<<(s<8?s:8)))*n.errorRetryInterval;!mt(i)&&s>i||setTimeout(r,a,o)},Hbe=K_,[RA,kA]=Vbe(new Map),qbe=lc({onLoadingSlow:Jl,onSuccess:Jl,onError:Jl,onErrorRetry:Ube,onDiscarded:Jl,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:A6?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:A6?5e3:3e3,compare:Hbe,isPaused:()=>!1,cache:RA,mutate:kA,fallback:{}},Dbe),Wbe=(e,t)=>{const n=lc(e,t);if(t){const{use:r,fallback:o}=e,{use:i,fallback:s}=t;r&&i&&(n.use=r.concat(i)),o&&s&&(n.fallback=lc(o,s))}return n},Gbe=w.createContext({}),CB="$inf$",OB=Qg&&window.__SWR_DEVTOOLS_USE__,Jbe=OB?window.__SWR_DEVTOOLS_USE__:[],Ybe=()=>{OB&&(window.__SWR_DEVTOOLS_REACT__=Ne)},jB=e=>Di(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],AB=()=>{const e=w.useContext(Gbe);return w.useMemo(()=>lc(qbe,e),[e])},Kbe=e=>(t,n,r)=>e(t,n&&((...i)=>{const[s]=ng(t),[,,,a]=ws.get(RA);if(s.startsWith(CB))return n(...i);const c=a[s];return mt(c)?n(...i):(delete a[s],c)}),r),Xbe=Jbe.concat(Kbe),Qbe=e=>function(...n){const r=AB(),[o,i,s]=jB(n),a=Wbe(r,s);let c=e;const{use:u}=a,f=(u||[]).concat(Xbe);for(let p=f.length;p--;)c=f[p](c);return c(o,i||a.fetcher||null,a)},Zbe=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const o=r.indexOf(n);o>=0&&(r[o]=r[r.length-1],r.pop())}},eve=(e,t)=>(...n)=>{const[r,o,i]=jB(n),s=(i.use||[]).concat(t);return e(r,o,{...i,use:s})};Ybe();const B2=Ne.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),V2={dedupe:!0},$6=Promise.resolve(Kn),tve=(e,t,n)=>{const{cache:r,compare:o,suspense:i,fallbackData:s,revalidateOnMount:a,revalidateIfStale:c,refreshInterval:u,refreshWhenHidden:f,refreshWhenOffline:p,keepPreviousData:g}=n,[y,v,x,S]=ws.get(r),[E,C]=ng(e),_=w.useRef(!1),j=w.useRef(!1),A=w.useRef(E),T=w.useRef(t),k=w.useRef(n),R=()=>k.current,V=()=>R().isVisible()&&R().isOnline(),[H,F,B,U]=Fl(r,E),M=w.useRef({}).current,z=mt(s)?mt(n.fallback)?Kn:n.fallback[E]:s,$=(Ee,Re)=>{for(const Me in M){const ze=Me;if(ze==="data"){if(!o(Ee[ze],Re[ze])&&(!mt(Ee[ze])||!o(ie,Re[ze])))return!1}else if(Re[ze]!==Ee[ze])return!1}return!0},L=w.useMemo(()=>{const Ee=!E||!t?!1:mt(a)?R().isPaused()||i?!1:c!==!1:a,Re=G=>{const re=lc(G);return delete re._k,Ee?{isValidating:!0,isLoading:!0,...re}:re},Me=H(),ze=U(),ve=Re(Me),Ce=Me===ze?ve:Re(ze);let Ae=ve;return[()=>{const G=Re(H());return $(G,Ae)?(Ae.data=G.data,Ae.isLoading=G.isLoading,Ae.isValidating=G.isValidating,Ae.error=G.error,Ae):(Ae=G,G)},()=>Ce]},[r,E]),P=TA.useSyncExternalStore(w.useCallback(Ee=>B(E,(Re,Me)=>{$(Me,Re)||Ee()}),[r,E]),L[0],L[1]),q=!_.current,Y=y[E]&&y[E].length>0,D=P.data,W=mt(D)?z&&NB(z)?B2(z):z:D,K=P.error,Q=w.useRef(W),ie=g?mt(D)?mt(Q.current)?W:Q.current:D:W,pe=Y&&!mt(K)?!1:q&&!mt(a)?a:R().isPaused()?!1:i?mt(W)?!1:c:mt(W)||c,ue=!!(E&&t&&q&&pe),se=mt(P.isValidating)?ue:P.isValidating,me=mt(P.isLoading)?ue:P.isLoading,xe=w.useCallback(async Ee=>{const Re=T.current;if(!E||!Re||j.current||R().isPaused())return!1;let Me,ze,ve=!0;const Ce=Ee||{},Ae=!x[E]||!Ce.dedupe,G=()=>j6?!j.current&&E===A.current&&_.current:E===A.current,re={isValidating:!1,isLoading:!1},ne=()=>{F(re)},ce=()=>{const Z=x[E];Z&&Z[1]===ze&&delete x[E]},te={isValidating:!0};mt(H().data)&&(te.isLoading=!0);try{if(Ae&&(F(te),n.loadingTimeout&&mt(H().data)&&setTimeout(()=>{ve&&G()&&R().onLoadingSlow(E,n)},n.loadingTimeout),x[E]=[Re(C),rC()]),[Me,ze]=x[E],Me=await Me,Ae&&setTimeout(ce,n.dedupingInterval),!x[E]||x[E][1]!==ze)return Ae&&G()&&R().onDiscarded(E),!1;re.error=Kn;const Z=v[E];if(!mt(Z)&&(ze<=Z[0]||ze<=Z[1]||Z[1]===0))return ne(),Ae&&G()&&R().onDiscarded(E),!1;const de=H().data;re.data=o(de,Me)?de:Me,Ae&&G()&&R().onSuccess(Me,E,n)}catch(Z){ce();const de=R(),{shouldRetryOnError:Te}=de;de.isPaused()||(re.error=Z,Ae&&G()&&(de.onError(Z,E,de),(Te===!0||Di(Te)&&Te(Z))&&(!R().revalidateOnFocus||!R().revalidateOnReconnect||V())&&de.onErrorRetry(Z,E,de,$e=>{const Ke=y[E];Ke&&Ke[0]&&Ke[0](C6,$e)},{retryCount:(Ce.retryCount||0)+1,dedupe:!0})))}return ve=!1,ne(),!0},[E,r]),je=w.useCallback((...Ee)=>_B(r,A.current,...Ee),[]);if(Bb(()=>{T.current=t,k.current=n,mt(D)||(Q.current=D)}),Bb(()=>{if(!E)return;const Ee=xe.bind(Kn,V2);let Re=0;R().revalidateOnFocus&&(Re=Date.now()+R().focusThrottleInterval);const ze=Zbe(E,y,(ve,Ce={})=>{if(ve==wB){const Ae=Date.now();R().revalidateOnFocus&&Ae>Re&&V()&&(Re=Ae+R().focusThrottleInterval,Ee())}else if(ve==SB)R().revalidateOnReconnect&&V()&&Ee();else{if(ve==EB)return xe();if(ve==C6)return xe(Ce)}});return j.current=!1,A.current=E,_.current=!0,F({_k:C}),pe&&(x[E]||(mt(W)||tg?Ee():Lbe(Ee))),()=>{j.current=!0,ze()}},[E]),Bb(()=>{let Ee;function Re(){const ze=Di(u)?u(H().data):u;ze&&Ee!==-1&&(Ee=setTimeout(Me,ze))}function Me(){!H().error&&(f||R().isVisible())&&(p||R().isOnline())?xe(V2).then(Re):Re()}return Re(),()=>{Ee&&(clearTimeout(Ee),Ee=-1)}},[u,f,p,E]),w.useDebugValue(ie),i){const Ee=E&&mt(W);if(!j6&&tg&&Ee)throw new Error("Fallback data is required when using Suspense in SSR.");Ee&&(T.current=t,k.current=n,j.current=!1);const Re=S[E],Me=!mt(Re)&&Ee?je(Re):$6;if(B2(Me),!mt(K)&&Ee)throw K;const ze=Ee?xe(V2):$6;!mt(ie)&&Ee&&(ze.status="fulfilled",ze.value=!0),B2(ze)}return{mutate:je,get data(){return M.data=!0,ie},get error(){return M.error=!0,K},get isValidating(){return M.isValidating=!0,se},get isLoading(){return M.isLoading=!0,me}}},MA=Qbe(tve),nve=()=>{},rve=nve(),oC=Object,R6=e=>e===rve,ove=e=>typeof e=="function",rb=new WeakMap,ive=e=>oC.prototype.toString.call(e),U2=(e,t)=>e===`[object ${t}]`;let sve=0;const iC=e=>{const t=typeof e,n=ive(e),r=U2(n,"Date"),o=U2(n,"RegExp"),i=U2(n,"Object");let s,a;if(oC(e)===e&&!r&&!o){if(s=rb.get(e),s)return s;if(s=++sve+"~",rb.set(e,s),Array.isArray(e)){for(s="@",a=0;a{if(ove(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?iC(e):"",[e,t]},lve=e=>ave(e?e(0,null):null)[0],H2=Promise.resolve(),cve=e=>(t,n,r)=>{const o=w.useRef(!1),{cache:i,initialSize:s=1,revalidateAll:a=!1,persistSize:c=!1,revalidateFirstPage:u=!0,revalidateOnMount:f=!1,parallel:p=!1}=r,[,,,g]=ws.get(RA);let y;try{y=lve(t),y&&(y=CB+y)}catch{}const[v,x,S]=Fl(i,y),E=w.useCallback(()=>mt(v()._l)?s:v()._l,[i,y,s]);TA.useSyncExternalStore(w.useCallback(R=>y?S(y,()=>{R()}):()=>{},[i,y]),E,E);const C=w.useCallback(()=>{const R=v()._l;return mt(R)?s:R},[y,s]),_=w.useRef(C());Bb(()=>{if(!o.current){o.current=!0;return}y&&x({_l:c?_.current:C()})},[y,i]);const j=f&&!o.current,A=e(y,async R=>{const V=v()._i,H=v()._r;x({_r:Kn});const F=[],B=C(),[U]=Fl(i,R),M=U().data,z=[];let $=null;for(let L=0;L{if(!(P in g))W=await n(q);else{const pe=g[P];delete g[P],W=await pe}D({data:W,_k:q}),F[L]=W};p?z.push(Q):await Q()}else F[L]=W;p||($=W)}return p&&await Promise.all(z.map(L=>L())),x({_i:Kn}),F},r),T=w.useCallback(function(R,V){const H=typeof V=="boolean"?{revalidate:V}:V||{},F=H.revalidate!==!1;return y?(F&&(mt(R)?x({_i:!0,_r:H.revalidate}):x({_i:!1,_r:H.revalidate})),arguments.length?A.mutate(R,{...H,revalidate:F}):A.mutate()):H2},[y,i]),k=w.useCallback(R=>{if(!y)return H2;const[,V]=Fl(i,y);let H;if(Di(R)?H=R(C()):typeof R=="number"&&(H=R),typeof H!="number")return H2;V({_l:H}),_.current=H;const F=[],[B]=Fl(i,y);let U=null;for(let M=0;M{const n=ss(),r=e(n),o=t?.refine??(c=>c),i=()=>r.execute().then(o),s=r.key();return{...MA(t?.enabled===!1?null:s,i,t),promise:r,key:s,api:n}},dve=(e,t)=>{const[n,r]=w.useState(!1),o=ss(),i=u=>e(o,u),s=t?.refine??(u=>u),a=uve((u,f)=>u>0&&f&&f.length<(t?.pageSize??0)?(r(!0),null):i(u).request.url,u=>new $w(new Request(u),{fetcher:o.fetcher},s).execute(),{revalidateFirstPage:!1}),c=a.data?[].concat(...a.data):[];return{...a,_data:a.data,data:c,endReached:n,promise:i(a.size),key:i(a.size).key(),api:o}},PA=e=>{const t=AB().mutate,n=ss();return async r=>{let o="";return typeof r=="string"?o=r:typeof r=="function"&&(o=r(n).key()),t(i=>typeof i=="string"&&i.startsWith(o))}},k6=new Map,fve=e=>(t,n,r)=>{if(typeof t=="string"){if(k6.has(t))return e(t,n,{...r,revalidateOnMount:!1});const o=e(t,n,r);return o.data&&k6.set(t,!0),o}return e(t,n,r)};class ob extends Error{constructor(t,n){let r=n;"error"in t&&(r=t.error,n&&(r=`${n}: ${r}`)),super(r??"UseEntityApiError"),this.response=t}}const hve=(e,t)=>{const n=ss().data;return{create:async r=>{const o=await n.createOne(e,r);if(!o.ok)throw new ob(o,`Failed to create entity "${e}"`);return o},read:async r=>{const o=t?await n.readOne(e,t,r):await n.readMany(e,r);if(!o.ok)throw new ob(o,`Failed to read entity "${e}"`);return o},update:async(r,o=t)=>{if(!o)throw new Error("id is required");const i=await n.updateOne(e,o,r);if(!i.ok)throw new ob(i,`Failed to update entity "${e}"`);return i},_delete:async(r=t)=>{if(!r)throw new Error("id is required");const o=await n.deleteOne(e,r);if(!o.ok)throw new ob(o,`Failed to delete entity "${e}"`);return o}}};function sC(e,t,n,r){return"/"+[...e.options?.basepath?.split("/")??[],t,...n?[n]:[]].filter(Boolean).join("/")+(r?"?"+tw(r):"")}const kw=(e,t,n,r)=>{const o=ss().data,i=sC(o,e,t,n),{read:s,...a}=hve(e,t),c=()=>s(n??{}),u=MA(r?.enabled===!1?null:i,c,{revalidateOnFocus:!1,keepPreviousData:!0,...r}),f=async g=>{const y=sC(o,e,g);return kA(v=>typeof v=="string"&&v.startsWith(y),void 0,{revalidate:!0})},p=Zx(a,g=>async(...y)=>{const v=await g(...y);return r?.revalidateOnMutate!==!1&&await f(),v});return{...u,...p,mutate:f,mutateRaw:u.mutate,api:o,key:i}};async function pve(e,t,n,r){function o(s,a){return typeof s<"u"&&typeof a<"u"&&"id"in s&&s.id===n?{...s,...a}:s}const i=sC(e,t);return kA(s=>typeof s=="string"&&s.startsWith(i),async s=>{if(!(typeof s>"u"))return Array.isArray(s)?s.map(a=>o(a,r)):o(s,r)},{revalidate:!1})}const mve=(e,t,n)=>{const{data:r,...o}=kw(e,t,void 0,{...n,enabled:!1});return{...o,mutate:(s,a)=>pve(o.api,e,s,a)}},DA=e=>{const t=ss(e?.baseUrl),n=PA(),{authState:r}=vB(),o=r?.verified??!1;async function i(f){return(await t.auth.login("password",f)).data}async function s(f){return(await t.auth.register("password",f)).data}function a(f){t.updateToken(f)}async function c(){await t.auth.logout(),await n()}async function u(){await t.verifyAuth(),await n()}return{data:r,user:r?.user,token:r?.token,verified:o,login:i,register:s,logout:c,setToken:a,verify:u,local:!!t.options.storage}};function gve({api:e,setSchema:t,reloadSchema:n}){async function r(o,i,s,a){const c={id:"schema-"+[o,i,a].join("-"),position:"top-right",autoClose:3e3};return s.success?(console.log("update config",o,i,a,s.body),s.body.success&&t(u=>u&&{...u,config:{...u.config,[i]:s.config}}),ci.show({...c,title:`Config updated: ${Io(i)}`,color:"blue",message:`Operation ${o.toUpperCase()} at ${i}${a?"."+a:""}`})):ci.show({...c,title:`Config Update failed: ${Io(i)}${a?"."+a:""}`,color:"red",withCloseButton:!0,autoClose:!1,message:s.error??"Failed to complete config update"}),s.success}return{reload:n,set:async(o,i,s)=>{const a=await e.system.setConfig(o,i,s);return await r("set",o,a)},patch:async(o,i,s)=>{const a=await e.system.patchConfig(o,i,s);return await r("patch",o,a,i)},overwrite:async(o,i,s)=>{const a=await e.system.overwriteConfig(o,i,s);return await r("overwrite",o,a,i)},add:async(o,i,s)=>{const a=await e.system.addConfig(o,i,s);return await r("add",o,a,i)},remove:async(o,i)=>{const s=await e.system.removeConfig(o,i);return await r("remove",o,s,i)}}}class yve{constructor(t,n={}){this.appJson=t,this._options=n,this._entities=Object.entries(this.appJson.data.entities??{}).map(([r,o])=>NA(r,o)),this._relations=Object.entries(this.appJson.data.relations??{}).map(([,r])=>Kz(r,this.entity.bind(this)));for(const[r,o]of Object.entries(this.appJson.flows.flows??{})){const i=Xg.fromObject(r,o,eB);this._flows.push(i)}}_entities=[];_relations=[];_flows=[];get entities(){return this._entities}entity(t){const n=typeof t=="string"?t:t.name,r=this._entities.find(o=>o.name===n);if(!r)throw new Error(`Entity "${n}" not found`);return r}get relations(){return new V7(this._relations)}get flows(){return this._flows}get config(){return this.appJson}get options(){return{basepath:"",logo_return_path:"/",...this._options}}getSettingsPath(t=[]){return[`~/${this.options.basepath}/settings`.replace(/\/+/g,"/"),...t].join("/")}getAbsolutePath(t){const{basepath:n}=this.options;return(t?`~/${n}/${t}`:`~/${n}`).replace(/\/+/g,"/")}getAuthConfig(){return this.appJson.auth}}/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */var bve={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const kt=(e,t,n,r)=>{const o=w.forwardRef(({color:i="currentColor",size:s=24,stroke:a=2,title:c,className:u,children:f,...p},g)=>w.createElement("svg",{ref:g,...bve[e],width:s,height:s,className:["tabler-icon",`tabler-icon-${t}`,u].join(" "),...e==="filled"?{fill:i}:{strokeWidth:a,stroke:i},...p},[c&&w.createElement("title",{key:"svg-title"},c),...r.map(([y,v])=>w.createElement(y,v)),...Array.isArray(f)?f:[f]]));return o.displayName=`${n}`,o};/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const vve=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l12 0",key:"svg-2"}]],IA=kt("outline","align-justified","AlignJustified",vve);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const xve=[["path",{d:"M4 13h5",key:"svg-0"}],["path",{d:"M12 16v-8h3a2 2 0 0 1 2 2v1a2 2 0 0 1 -2 2h-3",key:"svg-1"}],["path",{d:"M20 8v8",key:"svg-2"}],["path",{d:"M9 16v-5.5a2.5 2.5 0 0 0 -5 0v5.5",key:"svg-3"}]],wve=kt("outline","api","Api",xve);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Sve=[["path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11",key:"svg-0"}]],Eve=kt("outline","bolt","Bolt",Sve);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Nve=[["path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0",key:"svg-0"}],["path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0",key:"svg-1"}],["path",{d:"M3 6l0 13",key:"svg-2"}],["path",{d:"M12 6l0 13",key:"svg-3"}],["path",{d:"M21 6l0 13",key:"svg-4"}]],_ve=kt("outline","book","Book",Nve);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Cve=[["path",{d:"M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5",key:"svg-0"}],["path",{d:"M12 12l8 -4.5",key:"svg-1"}],["path",{d:"M12 12l0 9",key:"svg-2"}],["path",{d:"M12 12l-8 -4.5",key:"svg-3"}]],Ove=kt("outline","box","Box",Cve);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const jve=[["path",{d:"M17 18.5a15.198 15.198 0 0 1 -7.37 1.44a14.62 14.62 0 0 1 -6.63 -2.94",key:"svg-0"}],["path",{d:"M19.5 21c.907 -1.411 1.451 -3.323 1.5 -5c-1.197 -.773 -2.577 -.935 -4 -1",key:"svg-1"}],["path",{d:"M3 11v-4.5a1.5 1.5 0 0 1 3 0v4.5",key:"svg-2"}],["path",{d:"M3 9h3",key:"svg-3"}],["path",{d:"M9 5l1.2 6l1.8 -4l1.8 4l1.2 -6",key:"svg-4"}],["path",{d:"M18 10.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75",key:"svg-5"}]],Ave=kt("outline","brand-aws","BrandAws",jve);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Tve=[["path",{d:"M13.031 7.007c2.469 -.007 3.295 1.293 3.969 2.993c4 0 4.994 3.825 5 6h-20c-.001 -1.64 1.36 -2.954 3 -3c0 -1.5 1 -3 3 -3c.66 -1.942 2.562 -2.986 5.031 -2.993z",key:"svg-0"}],["path",{d:"M12 13h6",key:"svg-1"}],["path",{d:"M17 10l-2.5 6",key:"svg-2"}]],$ve=kt("outline","brand-cloudflare","BrandCloudflare",Tve);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Rve=[["path",{d:"M9 9v-1a3 3 0 0 1 6 0v1",key:"svg-0"}],["path",{d:"M8 9h8a6 6 0 0 1 1 3v3a5 5 0 0 1 -10 0v-3a6 6 0 0 1 1 -3",key:"svg-1"}],["path",{d:"M3 13l4 0",key:"svg-2"}],["path",{d:"M17 13l4 0",key:"svg-3"}],["path",{d:"M12 20l0 -6",key:"svg-4"}],["path",{d:"M4 19l3.35 -2",key:"svg-5"}],["path",{d:"M20 19l-3.35 -2",key:"svg-6"}],["path",{d:"M4 7l3.75 2.4",key:"svg-7"}],["path",{d:"M20 7l-3.75 2.4",key:"svg-8"}]],TB=kt("outline","bug","Bug",Rve);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const kve=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],Mve=kt("outline","chevron-down","ChevronDown",kve);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Pve=[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]],Dve=kt("outline","chevron-up","ChevronUp",Pve);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Ive=[["path",{d:"M9.183 6.117a6 6 0 1 0 4.511 3.986",key:"svg-0"}],["path",{d:"M14.813 17.883a6 6 0 1 0 -4.496 -3.954",key:"svg-1"}]],LA=kt("outline","circles-relation","CirclesRelation",Ive);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Lve=[["path",{d:"M6.657 18c-2.572 0 -4.657 -2.007 -4.657 -4.483c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486c0 1.927 -1.551 3.487 -3.465 3.487h-11.878",key:"svg-0"}]],Fve=kt("outline","cloud","Cloud",Lve);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const zve=[["path",{d:"M12 6m-8 0a8 3 0 1 0 16 0a8 3 0 1 0 -16 0",key:"svg-0"}],["path",{d:"M4 6v6a8 3 0 0 0 16 0v-6",key:"svg-1"}],["path",{d:"M4 12v6a8 3 0 0 0 16 0v-6",key:"svg-2"}]],Ru=kt("outline","database","Database",zve);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Bve=[["path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6",key:"svg-0"}],["path",{d:"M11 13l9 -9",key:"svg-1"}],["path",{d:"M15 4h5v5",key:"svg-2"}]],Vve=kt("outline","external-link","ExternalLink",Bve);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Uve=[["path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]],Hve=kt("outline","grip-vertical","GripVertical",Uve);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const qve=[["path",{d:"M10 3h4v4h-4z",key:"svg-0"}],["path",{d:"M3 17h4v4h-4z",key:"svg-1"}],["path",{d:"M17 17h4v4h-4z",key:"svg-2"}],["path",{d:"M7 17l5 -4l5 4",key:"svg-3"}],["path",{d:"M12 7l0 6",key:"svg-4"}]],Wve=kt("outline","hierarchy-2","Hierarchy2",qve);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Gve=[["path",{d:"M5 12l-2 0l9 -9l9 9l-2 0",key:"svg-0"}],["path",{d:"M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7",key:"svg-1"}],["path",{d:"M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6",key:"svg-2"}]],Jve=kt("outline","home","Home",Gve);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Yve=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]],$B=kt("outline","info-circle","InfoCircle",Yve);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Kve=[["path",{d:"M10.17 6.159l2.316 -2.316a2.877 2.877 0 0 1 4.069 0l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.33 2.33",key:"svg-0"}],["path",{d:"M14.931 14.948a2.863 2.863 0 0 1 -1.486 -.79l-.301 -.302l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.863 2.863 0 0 1 -.794 -1.504",key:"svg-1"}],["path",{d:"M15 9h.01",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]],Xve=kt("outline","key-off","KeyOff",Kve);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Qve=[["path",{d:"M7 3m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z",key:"svg-0"}],["path",{d:"M4.012 7.26a2.005 2.005 0 0 0 -1.012 1.737v10c0 1.1 .9 2 2 2h10c.75 0 1.158 -.385 1.5 -1",key:"svg-1"}],["path",{d:"M11 10h6",key:"svg-2"}],["path",{d:"M14 7v6",key:"svg-3"}]],Zve=kt("outline","library-plus","LibraryPlus",Qve);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const exe=[["path",{d:"M4 8v-2c0 -.554 .225 -1.055 .588 -1.417",key:"svg-0"}],["path",{d:"M4 16v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M16 20h2c.55 0 1.05 -.222 1.41 -.582",key:"svg-3"}],["path",{d:"M15 11a1 1 0 0 1 1 1m-.29 3.704a1 1 0 0 1 -.71 .296h-6a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h2",key:"svg-4"}],["path",{d:"M10 11v-1m1.182 -2.826a2 2 0 0 1 2.818 1.826v1",key:"svg-5"}],["path",{d:"M3 3l18 18",key:"svg-6"}]],txe=kt("outline","lock-access-off","LockAccessOff",exe);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const nxe=[["path",{d:"M5 12l14 0",key:"svg-0"}]],rxe=kt("outline","minus","Minus",nxe);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const oxe=[["path",{d:"M15 8h.01",key:"svg-0"}],["path",{d:"M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z",key:"svg-1"}],["path",{d:"M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5",key:"svg-2"}],["path",{d:"M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3",key:"svg-3"}]],RB=kt("outline","photo","Photo",oxe);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const ixe=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],FA=kt("outline","plus","Plus",ixe);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const sxe=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],axe=kt("outline","refresh","Refresh",sxe);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const lxe=[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]],cxe=kt("outline","server","Server",lxe);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const uxe=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],rg=kt("outline","settings","Settings",uxe);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const dxe=[["path",{d:"M16 3l4 4l-4 4",key:"svg-0"}],["path",{d:"M10 7l10 0",key:"svg-1"}],["path",{d:"M8 13l-4 4l4 4",key:"svg-2"}],["path",{d:"M4 17l9 0",key:"svg-3"}]],fxe=kt("outline","switch-horizontal","SwitchHorizontal",dxe);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const hxe=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],kB=kt("outline","trash","Trash",hxe);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const pxe=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]],mxe=kt("outline","user","User",pxe);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const gxe=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M3.6 9h16.8",key:"svg-1"}],["path",{d:"M3.6 15h16.8",key:"svg-2"}],["path",{d:"M11.5 3a17 17 0 0 0 0 18",key:"svg-3"}],["path",{d:"M12.5 3a17 17 0 0 1 0 18",key:"svg-4"}]],MB=kt("outline","world","World",gxe);/** + * @license @tabler/icons-react v3.35.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const yxe=[["path",{d:"M13 2l.018 .001l.016 .001l.083 .005l.011 .002h.011l.038 .009l.052 .008l.016 .006l.011 .001l.029 .011l.052 .014l.019 .009l.015 .004l.028 .014l.04 .017l.021 .012l.022 .01l.023 .015l.031 .017l.034 .024l.018 .011l.013 .012l.024 .017l.038 .034l.022 .017l.008 .01l.014 .012l.036 .041l.026 .027l.006 .009c.12 .147 .196 .322 .218 .513l.001 .012l.002 .041l.004 .064v6h5a1 1 0 0 1 .868 1.497l-.06 .091l-8 11c-.568 .783 -1.808 .38 -1.808 -.588v-6h-5a1 1 0 0 1 -.868 -1.497l.06 -.091l8 -11l.01 -.013l.018 -.024l.033 -.038l.018 -.022l.009 -.008l.013 -.014l.04 -.036l.028 -.026l.008 -.006a1 1 0 0 1 .402 -.199l.011 -.001l.027 -.005l.074 -.013l.011 -.001l.041 -.002z",key:"svg-0"}]],bxe=kt("filled","bolt-filled","BoltFilled",yxe),zA="-",vxe=e=>{const t=wxe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const a=s.split(zA);return a[0]===""&&a.length!==1&&a.shift(),PB(a,t)||xxe(s)},getConflictingClassGroupIds:(s,a)=>{const c=n[s]||[];return a&&r[s]?[...c,...r[s]]:c}}},PB=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?PB(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(zA);return t.validators.find(({validator:s})=>s(i))?.classGroupId},M6=/^\[(.+)\]$/,xxe=e=>{if(M6.test(e)){const t=M6.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},wxe=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)aC(n[o],r,o,t);return r},aC=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:P6(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(Sxe(o)){aC(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{aC(s,P6(t,i),n,r)})})},P6=(e,t)=>{let n=e;return t.split(zA).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Sxe=e=>e.isThemeGetter,Exe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,s)=>{n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}},lC="!",cC=":",Nxe=cC.length,_xe=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,c=0,u;for(let v=0;vc?u-c:void 0;return{modifiers:i,hasImportantModifier:g,baseClassName:p,maybePostfixModifierPosition:y}};if(t){const o=t+cC,i=r;r=s=>s.startsWith(o)?i(s.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Cxe=e=>e.endsWith(lC)?e.substring(0,e.length-1):e.startsWith(lC)?e.substring(1):e,Oxe=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let i=[];return r.forEach(s=>{s[0]==="["||t[s]?(o.push(...i.sort(),s),i=[]):i.push(s)}),o.push(...i.sort()),o}},jxe=e=>({cache:Exe(e.cacheSize),parseClassName:_xe(e),sortModifiers:Oxe(e),...vxe(e)}),Axe=/\s+/,Txe=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(Axe);let c="";for(let u=a.length-1;u>=0;u-=1){const f=a[u],{isExternal:p,modifiers:g,hasImportantModifier:y,baseClassName:v,maybePostfixModifierPosition:x}=n(f);if(p){c=f+(c.length>0?" "+c:c);continue}let S=!!x,E=r(S?v.substring(0,x):v);if(!E){if(!S){c=f+(c.length>0?" "+c:c);continue}if(E=r(v),!E){c=f+(c.length>0?" "+c:c);continue}S=!1}const C=i(g).join(":"),_=y?C+lC:C,j=_+E;if(s.includes(j))continue;s.push(j);const A=o(E,S);for(let T=0;T0?" "+c:c)}return c};function $xe(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rp(f),e());return n=jxe(u),r=n.cache.get,o=n.cache.set,i=a,a(c)}function a(c){const u=r(c);if(u)return u;const f=Txe(c,n);return o(c,f),f}return function(){return i($xe.apply(null,arguments))}}const Jn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},IB=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,LB=/^\((?:(\w[\w-]*):)?(.+)\)$/i,kxe=/^\d+\/\d+$/,Mxe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pxe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Dxe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ixe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Lxe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gd=e=>kxe.test(e),yt=e=>!!e&&!Number.isNaN(Number(e)),$l=e=>!!e&&Number.isInteger(Number(e)),q2=e=>e.endsWith("%")&&yt(e.slice(0,-1)),ra=e=>Mxe.test(e),Fxe=()=>!0,zxe=e=>Pxe.test(e)&&!Dxe.test(e),FB=()=>!1,Bxe=e=>Ixe.test(e),Vxe=e=>Lxe.test(e),Uxe=e=>!qe(e)&&!We(e),Hxe=e=>Eh(e,VB,FB),qe=e=>IB.test(e),Yc=e=>Eh(e,UB,zxe),W2=e=>Eh(e,Yxe,yt),D6=e=>Eh(e,zB,FB),qxe=e=>Eh(e,BB,Vxe),ib=e=>Eh(e,HB,Bxe),We=e=>LB.test(e),Bp=e=>Nh(e,UB),Wxe=e=>Nh(e,Kxe),I6=e=>Nh(e,zB),Gxe=e=>Nh(e,VB),Jxe=e=>Nh(e,BB),sb=e=>Nh(e,HB,!0),Eh=(e,t,n)=>{const r=IB.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Nh=(e,t,n=!1)=>{const r=LB.exec(e);return r?r[1]?t(r[1]):n:!1},zB=e=>e==="position"||e==="percentage",BB=e=>e==="image"||e==="url",VB=e=>e==="length"||e==="size"||e==="bg-size",UB=e=>e==="length",Yxe=e=>e==="number",Kxe=e=>e==="family-name",HB=e=>e==="shadow",Xxe=()=>{const e=Jn("color"),t=Jn("font"),n=Jn("text"),r=Jn("font-weight"),o=Jn("tracking"),i=Jn("leading"),s=Jn("breakpoint"),a=Jn("container"),c=Jn("spacing"),u=Jn("radius"),f=Jn("shadow"),p=Jn("inset-shadow"),g=Jn("text-shadow"),y=Jn("drop-shadow"),v=Jn("blur"),x=Jn("perspective"),S=Jn("aspect"),E=Jn("ease"),C=Jn("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...j(),We,qe],T=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],R=()=>[We,qe,c],V=()=>[Gd,"full","auto",...R()],H=()=>[$l,"none","subgrid",We,qe],F=()=>["auto",{span:["full",$l,We,qe]},$l,We,qe],B=()=>[$l,"auto",We,qe],U=()=>["auto","min","max","fr",We,qe],M=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],z=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...R()],L=()=>[Gd,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],P=()=>[e,We,qe],q=()=>[...j(),I6,D6,{position:[We,qe]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],D=()=>["auto","cover","contain",Gxe,Hxe,{size:[We,qe]}],W=()=>[q2,Bp,Yc],K=()=>["","none","full",u,We,qe],Q=()=>["",yt,Bp,Yc],ie=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[yt,q2,I6,D6],se=()=>["","none",v,We,qe],me=()=>["none",yt,We,qe],xe=()=>["none",yt,We,qe],je=()=>[yt,We,qe],_e=()=>[Gd,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ra],breakpoint:[ra],color:[Fxe],container:[ra],"drop-shadow":[ra],ease:["in","out","in-out"],font:[Uxe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ra],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ra],shadow:[ra],spacing:["px",yt],text:[ra],"text-shadow":[ra],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Gd,qe,We,S]}],container:["container"],columns:[{columns:[yt,qe,We,a]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{start:V()}],end:[{end:V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[$l,"auto",We,qe]}],basis:[{basis:[Gd,"full","auto",a,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[yt,Gd,"auto","initial","none",qe]}],grow:[{grow:["",yt,We,qe]}],shrink:[{shrink:["",yt,We,qe]}],order:[{order:[$l,"first","last","none",We,qe]}],"grid-cols":[{"grid-cols":H()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":H()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...M(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",...M()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":M()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],w:[{w:[a,"screen",...L()]}],"min-w":[{"min-w":[a,"screen","none",...L()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",n,Bp,Yc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,We,W2]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",q2,qe]}],"font-family":[{font:[Wxe,qe,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,We,qe]}],"line-clamp":[{"line-clamp":[yt,"none",We,W2]}],leading:[{leading:[i,...R()]}],"list-image":[{"list-image":["none",We,qe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",We,qe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:[yt,"from-font","auto",We,Yc]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[yt,"auto",We,qe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",We,qe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",We,qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:q()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:D()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},$l,We,qe],radial:["",We,qe],conic:[$l,We,qe]},Jxe,qxe]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ie(),"hidden","none"]}],"divide-style":[{divide:[...ie(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...ie(),"none","hidden"]}],"outline-offset":[{"outline-offset":[yt,We,qe]}],"outline-w":[{outline:["",yt,Bp,Yc]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",f,sb,ib]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",p,sb,ib]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[yt,Yc]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",g,sb,ib]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[yt,We,qe]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[yt]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[We,qe]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":j()}],"mask-image-conic-pos":[{"mask-conic":[yt]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:q()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:D()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",We,qe]}],filter:[{filter:["","none",We,qe]}],blur:[{blur:se()}],brightness:[{brightness:[yt,We,qe]}],contrast:[{contrast:[yt,We,qe]}],"drop-shadow":[{"drop-shadow":["","none",y,sb,ib]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",yt,We,qe]}],"hue-rotate":[{"hue-rotate":[yt,We,qe]}],invert:[{invert:["",yt,We,qe]}],saturate:[{saturate:[yt,We,qe]}],sepia:[{sepia:["",yt,We,qe]}],"backdrop-filter":[{"backdrop-filter":["","none",We,qe]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[yt,We,qe]}],"backdrop-contrast":[{"backdrop-contrast":[yt,We,qe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",yt,We,qe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[yt,We,qe]}],"backdrop-invert":[{"backdrop-invert":["",yt,We,qe]}],"backdrop-opacity":[{"backdrop-opacity":[yt,We,qe]}],"backdrop-saturate":[{"backdrop-saturate":[yt,We,qe]}],"backdrop-sepia":[{"backdrop-sepia":["",yt,We,qe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",We,qe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[yt,"initial",We,qe]}],ease:[{ease:["linear","initial",E,We,qe]}],delay:[{delay:[yt,We,qe]}],animate:[{animate:["none",C,We,qe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,We,qe]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":["scale-3d"],skew:[{skew:je()}],"skew-x":[{"skew-x":je()}],"skew-y":[{"skew-y":je()}],transform:[{transform:[We,qe,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:_e()}],"translate-x":[{"translate-x":_e()}],"translate-y":[{"translate-y":_e()}],"translate-z":[{"translate-z":_e()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",We,qe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",We,qe]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[yt,Bp,Yc,W2]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Be=Rxe(Xxe);function Qxe(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,r,o,i,s=[],a="",c=e.split("/");for(c[0]||c.shift();o=c.shift();)n=o[0],n==="*"?(s.push(n),a+=o[1]==="?"?"(?:/(.*))?":"/(.*)"):n===":"?(r=o.indexOf("?",1),i=o.indexOf(".",1),s.push(o.substring(1,~r?r:~i?i:o.length)),a+=~r&&!~i?"(?:/([^/]+?))?":"/([^/]+?)",~i&&(a+=(~r?"?":"")+"\\"+o.substring(i))):a+="/"+o;return{keys:s,pattern:new RegExp("^"+a+(t?"(?=$|/)":"/?$"),"i")}}const Zxe=fO.useInsertionEffect,ewe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",twe=ewe?w.useLayoutEffect:w.useEffect,nwe=Zxe||twe,qB=e=>{const t=w.useRef([e,(...n)=>t[0](...n)]).current;return nwe(()=>{t[0]=e}),t[1]},rwe="popstate",BA="pushState",VA="replaceState",owe="hashchange",L6=[rwe,BA,VA,owe],iwe=e=>{for(const t of L6)addEventListener(t,e);return()=>{for(const t of L6)removeEventListener(t,e)}},WB=(e,t)=>TA.useSyncExternalStore(iwe,e,t),swe=()=>location.search,awe=({ssrSearch:e=""}={})=>WB(swe,()=>e),F6=()=>location.pathname,lwe=({ssrPath:e}={})=>WB(F6,e?()=>e:F6),cwe=(e,{replace:t=!1,state:n=null}={})=>history[t?VA:BA](n,"",e),uwe=(e={})=>[lwe(e),cwe],z6=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[z6]>"u"){for(const e of[BA,VA]){const t=history[e];history[e]=function(){const n=t.apply(this,arguments),r=new Event(e);return r.arguments=arguments,dispatchEvent(r),n}}Object.defineProperty(window,z6,{value:!0})}const dwe=(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())?"~"+t:t.slice(e.length)||"/",GB=(e="")=>e==="/"?"":e,fwe=(e,t)=>e[0]==="~"?e.slice(1):GB(t)+e,hwe=(e="",t)=>dwe(uC(GB(e)),uC(t)),pwe=e=>e[0]==="?"?e.slice(1):e,uC=e=>{try{return decodeURI(e)}catch{return e}},mwe=e=>uC(pwe(e)),JB={hook:uwe,searchHook:awe,parser:Qxe,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:e=>e},YB=w.createContext(JB),Nc=()=>w.useContext(YB),KB={},XB=w.createContext(KB),Mw=()=>w.useContext(XB),Pw=e=>{const[t,n]=e.hook(e);return[hwe(e.base,t),qB((r,o)=>n(fwe(r,e.base),o))]},Uo=()=>Pw(Nc()),gwe=()=>{const e=Nc();return mwe(e.searchHook(e))},QB=(e,t,n,r)=>{const{pattern:o,keys:i}=t instanceof RegExp?{keys:!1,pattern:t}:e(t||"*",r),s=o.exec(n)||[],[a,...c]=s;return a!==void 0?[!0,(()=>{const u=i!==!1?Object.fromEntries(i.map((p,g)=>[p,c[g]])):s.groups;let f={...c};return u&&Object.assign(f,u),f})(),...r?[a]:[]]:[!1,null]},ZB=({children:e,...t})=>{const n=Nc(),r=t.hook?JB:n;let o=r;const[i,s]=t.ssrPath?.split("?")??[];s&&(t.ssrSearch=s,t.ssrPath=i),t.hrefs=t.hrefs??t.hook?.hrefs;let a=w.useRef({}),c=a.current,u=c;for(let f in r){const p=f==="base"?r[f]+(t[f]||""):t[f]||r[f];c===u&&p!==u[f]&&(a.current=u={...u}),u[f]=p,(p!==r[f]||p!==o[f])&&(o=u)}return w.createElement(YB.Provider,{value:o,children:e})},B6=({children:e,component:t},n)=>t?w.createElement(t,{params:n}):typeof e=="function"?e(n):e,ywe=e=>{let t=w.useRef(KB);const n=t.current;return t.current=Object.keys(e).length!==Object.keys(n).length||Object.entries(e).some(([r,o])=>o!==n[r])?e:n},tt=({path:e,nest:t,match:n,...r})=>{const o=Nc(),[i]=Pw(o),[s,a,c]=n??QB(o.parser,e,i,t),u=ywe({...Mw(),...a});if(!s)return null;const f=c?w.createElement(ZB,{base:c},B6(r,u)):B6(r,u);return w.createElement(XB.Provider,{value:u,children:f})},Dw=w.forwardRef((e,t)=>{const n=Nc(),[r,o]=Pw(n),{to:i="",href:s=i,onClick:a,asChild:c,children:u,className:f,replace:p,state:g,...y}=e,v=qB(S=>{S.ctrlKey||S.metaKey||S.altKey||S.shiftKey||S.button!==0||(a?.(S),S.defaultPrevented||(S.preventDefault(),o(s,e)))}),x=n.hrefs(s[0]==="~"?s.slice(1):n.base+s,n);return c&&w.isValidElement(u)?w.cloneElement(u,{onClick:v,href:x}):w.createElement("a",{...y,onClick:v,href:x,className:f?.call?f(r===s):f,children:u,ref:t})}),eV=e=>Array.isArray(e)?e.flatMap(t=>eV(t&&t.type===w.Fragment?t.props.children:t)):[e],As=({children:e,location:t})=>{const n=Nc(),[r]=Pw(n);for(const o of eV(e)){let i=0;if(w.isValidElement(o)&&(i=QB(n.parser,o.props.path,t||r,o.props.nest))[0])return w.cloneElement(o,{match:i})}return null},It=e=>(ir(),e),bwe=(e="",t="")=>t.toLowerCase().indexOf(e.toLowerCase())?"~"+t:t.slice(e.length)||"/",tV=(e,t="")=>e[0]==="~"?e.slice(1):t+e,vwe=e=>{try{return decodeURI(e)}catch{return e}},xwe=e=>{const[t,n]=e.hook(e);return[vwe(bwe(e.base,t)),It((r,o)=>n(tV(r,e.base),o))]};function wwe(e,t){const n=window.location.pathname;return n===e||n.endsWith(e)||n.includes(e+"/")}function Nn({className:e,native:t,onClick:n,...r}){const o=Nc(),[i]=xwe(o);function s(g,y){if(g.startsWith(y)){const v=g.replace(y,"");return v.length===0||v[0]==="/"}return!1}const a=r.href??r.to,c=o.hrefs(a[0]==="~"?a.slice(1):o.base+a,o).replace("//","/"),u=tV(i,o.base).replace("//","/"),f=c.replace(o.base,"").length<=1?c===u:s(u,c);if(t)return h.jsx("a",{className:`${f?"active ":""}${e}`,...r});const p=g=>{n?.(g)};return h.jsx(Dw,{className:`${f?"active ":""}${e}`,...r,onClick:p})}const Swe={smaller:"px-1.5 py-1 rounded-md gap-1 !text-xs",small:"px-2 py-1.5 rounded-md gap-1 text-sm",default:"px-3 py-2.5 rounded-md gap-1.5",large:"px-4 py-3 rounded-md gap-2.5 text-lg"},Ewe={smaller:12,small:14,default:16,large:20},Nwe={default:"bg-primary/5 hover:bg-primary/10 link text-primary/70",primary:"bg-primary hover:bg-primary/80 link text-background",ghost:"bg-transparent hover:bg-primary/5 link text-primary/70",outline:"border border-primary/20 bg-transparent hover:bg-primary/5 link text-primary/80",red:"dark:bg-red-950 dark:hover:bg-red-900 bg-red-100 hover:bg-red-200 link text-primary/70",subtlered:"dark:text-red-700 text-red-700 dark:hover:bg-red-900 dark:hover:text-red-200 bg-transparent hover:bg-red-50 link"},nV=({children:e,size:t,variant:n,IconLeft:r,IconRight:o,iconSize:i=Ewe[t??"default"],iconProps:s,labelClassName:a,...c})=>({...c,className:Be("flex flex-row flex-nowrap items-center !font-semibold disabled:opacity-50 cursor-pointer disabled:cursor-not-allowed transition-[opacity,background-color,color,border-color]",Swe[t??"default"],Nwe[n??"default"],c.className),children:h.jsxs(h.Fragment,{children:[r&&h.jsx(r,{size:i,...s}),e&&w.Children.count(e)===1?h.jsx("span",{className:Be("leading-none",a),children:e}):e,o&&h.jsx(o,{size:i,...s})]})}),Xe=w.forwardRef((e,t)=>h.jsx("button",{type:"button",ref:t,...nV(e)})),dC=w.forwardRef((e,t)=>h.jsx(Nn,{ref:t,href:"#",...nV(e)})),Hn=({Icon:e=void 0,title:t=void 0,description:n="Check back later my friend.",primary:r,secondary:o,className:i,children:s})=>h.jsx("div",{className:Be("flex flex-col h-full w-full justify-center items-center",i),children:h.jsxs("div",{className:"flex flex-col gap-3 items-center max-w-80",children:[e&&h.jsx(e,{size:48,className:"opacity-50",stroke:1}),h.jsxs("div",{className:"flex flex-col gap-1",children:[t&&h.jsx("h3",{className:"text-center text-lg font-bold",children:t}),h.jsx("p",{className:"text-center text-primary/60",children:n})]}),h.jsxs("div",{className:"mt-1.5 flex flex-row gap-2",children:[o&&h.jsx(Xe,{variant:"default",...o}),r&&h.jsx(Xe,{variant:"primary",...r}),s]})]})}),_we=e=>h.jsx(Hn,{title:"Not Found",...e}),Cwe=e=>h.jsx(Hn,{title:"Not Allowed",...e}),Owe=({what:e,...t})=>h.jsx(Hn,{Icon:txe,title:"Missing Permission",description:`You're not allowed to access ${e??"this"}.`,...t}),jwe=e=>h.jsx(Hn,{title:"Not Enabled",...e}),yo={NotFound:_we,NotAllowed:Cwe,NotEnabled:jwe,MissingPermission:Owe},st={data:{root:()=>"/data",entity:{list:e=>`/entity/${e}`,create:e=>`/entity/${e}/create`,edit:(e,t)=>`/entity/${e}/edit/${t}`},schema:{root:()=>"/schema",entity:e=>`/schema/entity/${e}`}},auth:{root:()=>"/auth",users:{list:()=>"/users",edit:e=>`/users/edit/${e}`},roles:{list:()=>"/roles",edit:e=>`/roles/edit/${e}`},settings:()=>"/settings",strategies:()=>"/strategies"},flows:{root:()=>"/flows",flows:{list:()=>"/",edit:e=>`/flow/${e}`}},settings:{root:()=>"/settings",path:e=>`/settings/${e.join("/")}`}};function Awe(e,t){const n=tw(t,{encode:!1});return`${e}?${n}`}function Twe(){const[e]=Pn();return(t,n)=>{e(t(st),n)}}function Pn(){const[e,t]=Uo(),n=Nc(),{app:r}=ot(),o=r.options.basepath;return[(i,s)=>{(c=>{c()})(()=>{if(s){if("reload"in s){window.location.href=i;return}else if("target"in s){const f=window.location.origin+n.base+i;window.open(f,s.target);return}}const c=s?.absolute?`~/${o}${i}`.replace(/\/+/g,"/"):i,u={...s?.state,referrer:e};t(s?.query?Awe(c,s?.query):c,{replace:s?.replace,state:u})})},e,i=>{const s=window.history.state;s?.referrer?t(s.referrer,{replace:!0}):i?.fallback?t(i.fallback,{replace:!0}):window.history.back()}]}function $we(e="/",t){const{app:n}=ot(),[r]=Pn(),o=document.referrer,i=window.history.length,s=o.length===0,a=s&&i>1||!!s;function c(){s&&i>2?window.history.back():typeof e=="string"?r(e):typeof e=="function"&&e()}return{same:s,canGoBack:a,goBack:c}}const rV=w.createContext(void 0);function Rwe({includeSecrets:e=!1,options:t,children:n,fallback:r=null}){const[o,i]=w.useState(e),[s,a]=w.useState(),[c,u]=w.useState(!1),[f,p]=w.useState(),g=w.useRef(!1),y=w.useRef(0),[v,x]=w.useState(0),S=ss();async function E(){await C(e,{force:!0,fresh:!0})}async function C(k=!1,R){const V=o?2:1;if(y.current===V||o&&R?.force!==!0)return;y.current=V;const H=await S.system.readSchema({config:!0,secrets:k,fresh:R?.fresh});if(H.ok)f&&p(!1);else if(g.current||(g.current=!0,p(!0),c&&s?.schema))return;const F=H.ok?H.body:{version:0,mode:"db",schema:xbe(),config:wbe(),permissions:[],fallback:!0};w.startTransition(()=>{(()=>{a(F),i(k),u(!0),x(U=>U+1),y.current=0})()})}async function _(){o||await C(!0)}if(w.useEffect(()=>{s?.schema||C(e)},[]),!c||!s)return r;const j=new yve(s?.config,t),A=gve({api:S,setSchema:a,reloadSchema:E}),T=o&&!f;return h.jsx(rV.Provider,{value:{...s,actions:A,requireSecrets:_,app:j,options:j.options,hasSecrets:T},children:f?h.jsx(kwe,{}):n},v)}function kwe(){const[e]=Pn();return h.jsx(yo.MissingPermission,{what:"the Admin UI",primary:{children:"Login",onClick:()=>e("/auth/login")}})}function ot({withSecrets:e}={}){const t=w.useContext(rV);return e&&t.requireSecrets(),t}function Iw({children:e}){const{readonly:t}=ot();return t?null:e}const Mwe={},V6=e=>{let t;const n=new Set,r=(f,p)=>{const g=typeof f=="function"?f(t):f;if(!Object.is(g,t)){const y=t;t=p??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(v=>v(t,y))}},o=()=>t,c={setState:r,getState:o,getInitialState:()=>u,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(Mwe?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,o,c);return c},UA=e=>e?V6(e):V6;var G2={exports:{}},J2={};/** + * @license React + * use-sync-external-store-shim/with-selector.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var U6;function Pwe(){if(U6)return J2;U6=1;var e=dc(),t=xB();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,c=e.useDebugValue;return J2.useSyncExternalStoreWithSelector=function(u,f,p,g,y){var v=i(null);if(v.current===null){var x={hasValue:!1,value:null};v.current=x}else x=v.current;v=a(function(){function E(T){if(!C){if(C=!0,_=T,T=g(T),y!==void 0&&x.hasValue){var k=x.value;if(y(k,T))return j=k}return j=T}if(k=j,r(_,T))return k;var R=g(T);return y!==void 0&&y(k,R)?(_=T,k):(_=T,j=R)}var C=!1,_,j,A=p===void 0?null:p;return[function(){return E(f())},A===null?void 0:function(){return E(A())}]},[f,p,g,y]);var S=o(u,v[0],v[1]);return s(function(){x.hasValue=!0,x.value=S},[S]),c(S),S},J2}var H6;function Dwe(){return H6||(H6=1,G2.exports=Pwe()),G2.exports}var Iwe=Dwe();const oV=es(Iwe),iV={},{useDebugValue:Lwe}=Ne,{useSyncExternalStoreWithSelector:Fwe}=oV;let q6=!1;const zwe=e=>e;function Pr(e,t=zwe,n){(iV?"production":void 0)!=="production"&&n&&!q6&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),q6=!0);const r=Fwe(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Lwe(r),r}const W6=e=>{(iV?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?UA(e):e,n=(r,o)=>Pr(t,r,o);return Object.assign(n,t),n},Lw=e=>e?W6(e):W6,Bwe={},ey=(e,t)=>(...n)=>Object.assign({},e,t(...n));function Vwe(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var i;const s=c=>c===null?null:JSON.parse(c,void 0),a=(i=n.getItem(o))!=null?i:null;return a instanceof Promise?a.then(s):s(a)},setItem:(o,i)=>n.setItem(o,JSON.stringify(i,void 0)),removeItem:o=>n.removeItem(o)}}const og=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return og(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return og(r)(n)}}}},Uwe=(e,t)=>(n,r,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:S=>S,version:0,merge:(S,E)=>({...E,...S}),...t},s=!1;const a=new Set,c=new Set;let u;try{u=i.getStorage()}catch{}if(!u)return e((...S)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...S)},r,o);const f=og(i.serialize),p=()=>{const S=i.partialize({...r()});let E;const C=f({state:S,version:i.version}).then(_=>u.setItem(i.name,_)).catch(_=>{E=_});if(E)throw E;return C},g=o.setState;o.setState=(S,E)=>{g(S,E),p()};const y=e((...S)=>{n(...S),p()},r,o);let v;const x=()=>{var S;if(!u)return;s=!1,a.forEach(C=>C(r()));const E=((S=i.onRehydrateStorage)==null?void 0:S.call(i,r()))||void 0;return og(u.getItem.bind(u))(i.name).then(C=>{if(C)return i.deserialize(C)}).then(C=>{if(C)if(typeof C.version=="number"&&C.version!==i.version){if(i.migrate)return i.migrate(C.state,C.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return C.state}).then(C=>{var _;return v=i.merge(C,(_=r())!=null?_:y),n(v,!0),p()}).then(()=>{E?.(v,void 0),s=!0,c.forEach(C=>C(v))}).catch(C=>{E?.(void 0,C)})};return o.persist={setOptions:S=>{i={...i,...S},S.getStorage&&(u=S.getStorage())},clearStorage:()=>{u?.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>x(),hasHydrated:()=>s,onHydrate:S=>(a.add(S),()=>{a.delete(S)}),onFinishHydration:S=>(c.add(S),()=>{c.delete(S)})},x(),v||y},Hwe=(e,t)=>(n,r,o)=>{let i={storage:Vwe(()=>localStorage),partialize:x=>x,version:0,merge:(x,S)=>({...S,...x}),...t},s=!1;const a=new Set,c=new Set;let u=i.storage;if(!u)return e((...x)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...x)},r,o);const f=()=>{const x=i.partialize({...r()});return u.setItem(i.name,{state:x,version:i.version})},p=o.setState;o.setState=(x,S)=>{p(x,S),f()};const g=e((...x)=>{n(...x),f()},r,o);o.getInitialState=()=>g;let y;const v=()=>{var x,S;if(!u)return;s=!1,a.forEach(C=>{var _;return C((_=r())!=null?_:g)});const E=((S=i.onRehydrateStorage)==null?void 0:S.call(i,(x=r())!=null?x:g))||void 0;return og(u.getItem.bind(u))(i.name).then(C=>{if(C)if(typeof C.version=="number"&&C.version!==i.version){if(i.migrate)return[!0,i.migrate(C.state,C.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,C.state];return[!1,void 0]}).then(C=>{var _;const[j,A]=C;if(y=i.merge(A,(_=r())!=null?_:g),n(y,!0),j)return f()}).then(()=>{E?.(y,void 0),y=r(),s=!0,c.forEach(C=>C(y))}).catch(C=>{E?.(void 0,C)})};return o.persist={setOptions:x=>{i={...i,...x},x.storage&&(u=x.storage)},clearStorage:()=>{u?.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>v(),hasHydrated:()=>s,onHydrate:x=>(a.add(x),()=>{a.delete(x)}),onFinishHydration:x=>(c.add(x),()=>{c.delete(x)})},i.skipHydration||v(),y||g},qwe=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Bwe?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),Uwe(e,t)):Hwe(e,t),sV=qwe,aV=["dark","light","system"],G6=Lw(sV(ey({theme:null},e=>({setTheme:t=>{aV.includes(t)&&document.startViewTransition(()=>{e({theme:t})})}})),{name:"bknd-admin-theme"}));function Va(e="system"){const t=ot(),n=G6(a=>a.theme),r=G6(a=>a.setTheme),o=t?.options?.theme,i=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches,s=o??n??e;return{theme:s==="system"?i?"dark":"light":s,value:s,themes:aV,setTheme:r,state:n,prefersDark:i,override:o}}function Fw({scale:e=.2,fill:t,...n}){const r=Va(),o=n.theme??r.theme,i=t||(o==="light"?"black":"white"),s={width:Math.round(578*e),height:Math.round(188*e)};return h.jsx("div",{style:s,children:h.jsxs("svg",{width:s.width,height:s.height,viewBox:"0 0 578 188",fill:i,xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M41.5 34C37.0817 34 33.5 37.5817 33.5 42V146C33.5 150.418 37.0817 154 41.5 154H158.5C162.918 154 166.5 150.418 166.5 146V42C166.5 37.5817 162.918 34 158.5 34H41.5ZM123.434 113.942C124.126 111.752 124.5 109.42 124.5 107C124.5 94.2975 114.203 84 101.5 84C99.1907 84 96.9608 84.3403 94.8579 84.9736L87.2208 65.1172C90.9181 63.4922 93.5 59.7976 93.5 55.5C93.5 49.701 88.799 45 83 45C77.201 45 72.5 49.701 72.5 55.5C72.5 61.299 77.201 66 83 66C83.4453 66 83.8841 65.9723 84.3148 65.9185L92.0483 86.0256C87.1368 88.2423 83.1434 92.1335 80.7957 96.9714L65.4253 91.1648C65.4746 90.7835 65.5 90.3947 65.5 90C65.5 85.0294 61.4706 81 56.5 81C51.5294 81 47.5 85.0294 47.5 90C47.5 94.9706 51.5294 99 56.5 99C60.0181 99 63.0648 96.9814 64.5449 94.0392L79.6655 99.7514C78.9094 102.03 78.5 104.467 78.5 107C78.5 110.387 79.2321 113.603 80.5466 116.498L69.0273 123.731C67.1012 121.449 64.2199 120 61 120C55.201 120 50.5 124.701 50.5 130.5C50.5 136.299 55.201 141 61 141C66.799 141 71.5 136.299 71.5 130.5C71.5 128.997 71.1844 127.569 70.6158 126.276L81.9667 119.149C86.0275 125.664 93.2574 130 101.5 130C110.722 130 118.677 124.572 122.343 116.737L132.747 120.899C132.585 121.573 132.5 122.276 132.5 123C132.5 127.971 136.529 132 141.5 132C146.471 132 150.5 127.971 150.5 123C150.5 118.029 146.471 114 141.5 114C138.32 114 135.525 115.649 133.925 118.139L123.434 113.942Z"}),h.jsx("path",{d:"M243.9 151.5C240.4 151.5 237 151 233.7 150C230.4 149 227.4 147.65 224.7 145.95C222 144.15 219.75 142.15 217.95 139.95C216.15 137.65 215 135.3 214.5 132.9L219.3 131.1L218.25 149.7H198.15V39H219.45V89.25L215.4 87.6C216 85.2 217.15 82.9 218.85 80.7C220.55 78.4 222.7 76.4 225.3 74.7C227.9 72.9 230.75 71.5 233.85 70.5C236.95 69.5 240.15 69 243.45 69C250.35 69 256.5 70.8 261.9 74.4C267.3 77.9 271.55 82.75 274.65 88.95C277.85 95.15 279.45 102.25 279.45 110.25C279.45 118.25 277.9 125.35 274.8 131.55C271.7 137.75 267.45 142.65 262.05 146.25C256.75 149.75 250.7 151.5 243.9 151.5ZM238.8 133.35C242.8 133.35 246.25 132.4 249.15 130.5C252.15 128.5 254.5 125.8 256.2 122.4C257.9 118.9 258.75 114.85 258.75 110.25C258.75 105.75 257.9 101.75 256.2 98.25C254.6 94.75 252.3 92.05 249.3 90.15C246.3 88.25 242.8 87.3 238.8 87.3C234.8 87.3 231.3 88.25 228.3 90.15C225.3 92.05 222.95 94.75 221.25 98.25C219.55 101.75 218.7 105.75 218.7 110.25C218.7 114.85 219.55 118.9 221.25 122.4C222.95 125.8 225.3 128.5 228.3 130.5C231.3 132.4 234.8 133.35 238.8 133.35ZM308.312 126.15L302.012 108.6L339.512 70.65H367.562L308.312 126.15ZM288.062 150V39H309.362V150H288.062ZM341.762 150L313.262 114.15L328.262 102.15L367.412 150H341.762ZM371.675 150V70.65H392.075L392.675 86.85L388.475 88.65C389.575 85.05 391.525 81.8 394.325 78.9C397.225 75.9 400.675 73.5 404.675 71.7C408.675 69.9 412.875 69 417.275 69C423.275 69 428.275 70.2 432.275 72.6C436.375 75 439.425 78.65 441.425 83.55C443.525 88.35 444.575 94.3 444.575 101.4V150H423.275V103.05C423.275 99.45 422.775 96.45 421.775 94.05C420.775 91.65 419.225 89.9 417.125 88.8C415.125 87.6 412.625 87.1 409.625 87.3C407.225 87.3 404.975 87.7 402.875 88.5C400.875 89.2 399.125 90.25 397.625 91.65C396.225 93.05 395.075 94.65 394.175 96.45C393.375 98.25 392.975 100.2 392.975 102.3V150H382.475C380.175 150 378.125 150 376.325 150C374.525 150 372.975 150 371.675 150ZM488.536 151.5C481.636 151.5 475.436 149.75 469.936 146.25C464.436 142.65 460.086 137.8 456.886 131.7C453.786 125.5 452.236 118.35 452.236 110.25C452.236 102.35 453.786 95.3 456.886 89.1C460.086 82.9 464.386 78 469.786 74.4C475.286 70.8 481.536 69 488.536 69C492.236 69 495.786 69.6 499.186 70.8C502.686 71.9 505.786 73.45 508.486 75.45C511.286 77.45 513.536 79.7 515.236 82.2C516.936 84.6 517.886 87.15 518.086 89.85L512.686 90.75V39H533.986V150H513.886L512.986 131.7L517.186 132.15C516.986 134.65 516.086 137.05 514.486 139.35C512.886 141.65 510.736 143.75 508.036 145.65C505.436 147.45 502.436 148.9 499.036 150C495.736 151 492.236 151.5 488.536 151.5ZM493.336 133.8C497.336 133.8 500.836 132.8 503.836 130.8C506.836 128.8 509.186 126.05 510.886 122.55C512.586 119.05 513.436 114.95 513.436 110.25C513.436 105.65 512.586 101.6 510.886 98.1C509.186 94.5 506.836 91.75 503.836 89.85C500.836 87.85 497.336 86.85 493.336 86.85C489.336 86.85 485.836 87.85 482.836 89.85C479.936 91.75 477.636 94.5 475.936 98.1C474.336 101.6 473.536 105.65 473.536 110.25C473.536 114.95 474.336 119.05 475.936 122.55C477.636 126.05 479.936 128.8 482.836 130.8C485.836 132.8 489.336 133.8 493.336 133.8Z"})]})})}function J6(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lV(...e){return t=>{let n=!1;const r=e.map(o=>{const i=J6(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o{const{children:i,...s}=r,a=w.Children.toArray(i),c=a.find(Ywe);if(c){const u=c.props.children,f=a.map(p=>p===c?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:p);return h.jsx(t,{...s,ref:o,children:w.isValidElement(u)?w.cloneElement(u,void 0,f):null})}return h.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Gwe(e){const t=w.forwardRef((n,r)=>{const{children:o,...i}=n;if(w.isValidElement(o)){const s=Xwe(o),a=Kwe(i,o.props);return o.type!==w.Fragment&&(a.ref=r?lV(r,s):s),w.cloneElement(o,a)}return w.Children.count(o)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Jwe=Symbol("radix.slottable");function Ywe(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Jwe}function Kwe(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const c=i(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Xwe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Qwe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qu=Qwe.reduce((e,t)=>{const n=Wwe(`Primitive.${t}`),r=w.forwardRef((o,i)=>{const{asChild:s,...a}=o,c=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(c,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function cV(e,t=[]){let n=[];function r(i,s){const a=w.createContext(s),c=n.length;n=[...n,s];const u=p=>{const{scope:g,children:y,...v}=p,x=g?.[e]?.[c]||a,S=w.useMemo(()=>v,Object.values(v));return h.jsx(x.Provider,{value:S,children:y})};u.displayName=i+"Provider";function f(p,g){const y=g?.[e]?.[c]||a,v=w.useContext(y);if(v)return v;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[u,f]}const o=()=>{const i=n.map(s=>w.createContext(s));return function(a){const c=a?.[e]||i;return w.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,Zwe(o,...t)]}function Zwe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:c,scopeName:u})=>{const p=c(i)[`__scope${u}`];return{...a,...p}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Ql(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var ig=globalThis?.document?w.useLayoutEffect:()=>{},e1e=fO[" useInsertionEffect ".trim().toString()]||ig;function t1e({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=n1e({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:o;{const f=w.useRef(e!==void 0);w.useEffect(()=>{const p=f.current;p!==a&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=a},[a,r])}const u=w.useCallback(f=>{if(a){const p=r1e(f)?f(e):f;p!==e&&s.current?.(p)}else i(f)},[a,e,i,s]);return[c,u]}function n1e({defaultProp:e,onChange:t}){const[n,r]=w.useState(e),o=w.useRef(n),i=w.useRef(t);return e1e(()=>{i.current=t},[t]),w.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function r1e(e){return typeof e=="function"}function o1e(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var ty=e=>{const{present:t,children:n}=e,r=i1e(t),o=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),i=Ua(r.ref,s1e(o));return typeof n=="function"||r.isPresent?w.cloneElement(o,{ref:i}):null};ty.displayName="Presence";function i1e(e){const[t,n]=w.useState(),r=w.useRef(null),o=w.useRef(e),i=w.useRef("none"),s=e?"mounted":"unmounted",[a,c]=o1e(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const u=ab(r.current);i.current=a==="mounted"?u:"none"},[a]),ig(()=>{const u=r.current,f=o.current;if(f!==e){const g=i.current,y=ab(u);e?c("MOUNT"):y==="none"||u?.display==="none"?c("UNMOUNT"):c(f&&g!==y?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),ig(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=y=>{const x=ab(r.current).includes(CSS.escape(y.animationName));if(y.target===t&&x&&(c("ANIMATION_END"),!o.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},g=y=>{y.target===t&&(i.current=ab(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:w.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function ab(e){return e?.animationName||"none"}function s1e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var a1e=w.createContext(void 0);function l1e(e){const t=w.useContext(a1e);return e||t||"ltr"}function lu(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>t.current?.(...n),[])}var Y2={exports:{}},K2={};/** + * @license React + * use-sync-external-store-shim.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Y6;function c1e(){if(Y6)return K2;Y6=1;var e=dc();function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(p,g){var y=g(),v=r({inst:{value:y,getSnapshot:g}}),x=v[0].inst,S=v[1];return i(function(){x.value=y,x.getSnapshot=g,c(x)&&S({inst:x})},[p,y,g]),o(function(){return c(x)&&S({inst:x}),p(function(){c(x)&&S({inst:x})})},[p]),s(y),y}function c(p){var g=p.getSnapshot;p=p.value;try{var y=g();return!n(p,y)}catch{return!0}}function u(p,g){return g()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return K2.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,K2}var K6;function u1e(){return K6||(K6=1,Y2.exports=c1e()),Y2.exports}function d1e(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function f1e(e){const[t,n]=w.useState(void 0);return ig(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,a=u.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function h1e(e,[t,n]){return Math.min(n,Math.max(t,e))}function p1e(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var HA="ScrollArea",[uV]=cV(HA),[m1e,wi]=uV(HA),dV=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...s}=e,[a,c]=w.useState(null),[u,f]=w.useState(null),[p,g]=w.useState(null),[y,v]=w.useState(null),[x,S]=w.useState(null),[E,C]=w.useState(0),[_,j]=w.useState(0),[A,T]=w.useState(!1),[k,R]=w.useState(!1),V=Ua(t,F=>c(F)),H=l1e(o);return h.jsx(m1e,{scope:n,type:r,dir:H,scrollHideDelay:i,scrollArea:a,viewport:u,onViewportChange:f,content:p,onContentChange:g,scrollbarX:y,onScrollbarXChange:v,scrollbarXEnabled:A,onScrollbarXEnabledChange:T,scrollbarY:x,onScrollbarYChange:S,scrollbarYEnabled:k,onScrollbarYEnabledChange:R,onCornerWidthChange:C,onCornerHeightChange:j,children:h.jsx(qu.div,{dir:H,...s,ref:V,style:{position:"relative","--radix-scroll-area-corner-width":E+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})})});dV.displayName=HA;var fV="ScrollAreaViewport",hV=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...i}=e,s=wi(fV,n),a=w.useRef(null),c=Ua(t,a,s.onViewportChange);return h.jsxs(h.Fragment,{children:[h.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),h.jsx(qu.div,{"data-radix-scroll-area-viewport":"",...i,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:h.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});hV.displayName=fV;var Ps="ScrollAreaScrollbar",pV=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=wi(Ps,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,a=e.orientation==="horizontal";return w.useEffect(()=>(a?i(!0):s(!0),()=>{a?i(!1):s(!1)}),[a,i,s]),o.type==="hover"?h.jsx(g1e,{...r,ref:t,forceMount:n}):o.type==="scroll"?h.jsx(y1e,{...r,ref:t,forceMount:n}):o.type==="auto"?h.jsx(mV,{...r,ref:t,forceMount:n}):o.type==="always"?h.jsx(qA,{...r,ref:t}):null});pV.displayName=Ps;var g1e=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=wi(Ps,e.__scopeScrollArea),[i,s]=w.useState(!1);return w.useEffect(()=>{const a=o.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),s(!0)},f=()=>{c=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",f),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),h.jsx(ty,{present:n||i,children:h.jsx(mV,{"data-state":i?"visible":"hidden",...r,ref:t})})}),y1e=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=wi(Ps,e.__scopeScrollArea),i=e.orientation==="horizontal",s=Bw(()=>c("SCROLL_END"),100),[a,c]=p1e("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,o.scrollHideDelay,c]),w.useEffect(()=>{const u=o.viewport,f=i?"scrollLeft":"scrollTop";if(u){let p=u[f];const g=()=>{const y=u[f];p!==y&&(c("SCROLL"),s()),p=y};return u.addEventListener("scroll",g),()=>u.removeEventListener("scroll",g)}},[o.viewport,i,c,s]),h.jsx(ty,{present:n||a!=="hidden",children:h.jsx(qA,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ql(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:Ql(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),mV=w.forwardRef((e,t)=>{const n=wi(Ps,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,s]=w.useState(!1),a=e.orientation==="horizontal",c=Bw(()=>{if(n.viewport){const u=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,o=wi(Ps,e.__scopeScrollArea),i=w.useRef(null),s=w.useRef(0),[a,c]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=vV(a.viewport,a.content),f={...r,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:g=>i.current=g,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:g=>s.current=g};function p(g,y){return N1e(g,s.current,a,y)}return n==="horizontal"?h.jsx(b1e,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const g=o.viewport.scrollLeft,y=X6(g,a,o.dir);i.current.style.transform=`translate3d(${y}px, 0, 0)`}},onWheelScroll:g=>{o.viewport&&(o.viewport.scrollLeft=g)},onDragScroll:g=>{o.viewport&&(o.viewport.scrollLeft=p(g,o.dir))}}):n==="vertical"?h.jsx(v1e,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const g=o.viewport.scrollTop,y=X6(g,a);i.current.style.transform=`translate3d(0, ${y}px, 0)`}},onWheelScroll:g=>{o.viewport&&(o.viewport.scrollTop=g)},onDragScroll:g=>{o.viewport&&(o.viewport.scrollTop=p(g))}}):null}),b1e=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=wi(Ps,e.__scopeScrollArea),[s,a]=w.useState(),c=w.useRef(null),u=Ua(t,c,i.onScrollbarXChange);return w.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),h.jsx(yV,{"data-orientation":"horizontal",...o,ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":zw(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,p)=>{if(i.viewport){const g=i.viewport.scrollLeft+f.deltaX;e.onWheelScroll(g),wV(g,p)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&s&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Mv(s.paddingLeft),paddingEnd:Mv(s.paddingRight)}})}})}),v1e=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=wi(Ps,e.__scopeScrollArea),[s,a]=w.useState(),c=w.useRef(null),u=Ua(t,c,i.onScrollbarYChange);return w.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),h.jsx(yV,{"data-orientation":"vertical",...o,ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":zw(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,p)=>{if(i.viewport){const g=i.viewport.scrollTop+f.deltaY;e.onWheelScroll(g),wV(g,p)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&s&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Mv(s.paddingTop),paddingEnd:Mv(s.paddingBottom)}})}})}),[x1e,gV]=uV(Ps),yV=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:f,onResize:p,...g}=e,y=wi(Ps,n),[v,x]=w.useState(null),S=Ua(t,V=>x(V)),E=w.useRef(null),C=w.useRef(""),_=y.viewport,j=r.content-r.viewport,A=lu(f),T=lu(c),k=Bw(p,10);function R(V){if(E.current){const H=V.clientX-E.current.left,F=V.clientY-E.current.top;u({x:H,y:F})}}return w.useEffect(()=>{const V=H=>{const F=H.target;v?.contains(F)&&A(H,j)};return document.addEventListener("wheel",V,{passive:!1}),()=>document.removeEventListener("wheel",V,{passive:!1})},[_,v,j,A]),w.useEffect(T,[r,T]),Bf(v,k),Bf(y.content,k),h.jsx(x1e,{scope:n,scrollbar:v,hasThumb:o,onThumbChange:lu(i),onThumbPointerUp:lu(s),onThumbPositionChange:T,onThumbPointerDown:lu(a),children:h.jsx(qu.div,{...g,ref:S,style:{position:"absolute",...g.style},onPointerDown:Ql(e.onPointerDown,V=>{V.button===0&&(V.target.setPointerCapture(V.pointerId),E.current=v.getBoundingClientRect(),C.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",y.viewport&&(y.viewport.style.scrollBehavior="auto"),R(V))}),onPointerMove:Ql(e.onPointerMove,R),onPointerUp:Ql(e.onPointerUp,V=>{const H=V.target;H.hasPointerCapture(V.pointerId)&&H.releasePointerCapture(V.pointerId),document.body.style.webkitUserSelect=C.current,y.viewport&&(y.viewport.style.scrollBehavior=""),E.current=null})})})}),kv="ScrollAreaThumb",bV=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=gV(kv,e.__scopeScrollArea);return h.jsx(ty,{present:n||o.hasThumb,children:h.jsx(w1e,{ref:t,...r})})}),w1e=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=wi(kv,n),s=gV(kv,n),{onThumbPositionChange:a}=s,c=Ua(t,p=>s.onThumbChange(p)),u=w.useRef(void 0),f=Bw(()=>{u.current&&(u.current(),u.current=void 0)},100);return w.useEffect(()=>{const p=i.viewport;if(p){const g=()=>{if(f(),!u.current){const y=_1e(p,a);u.current=y,a()}};return a(),p.addEventListener("scroll",g),()=>p.removeEventListener("scroll",g)}},[i.viewport,f,a]),h.jsx(qu.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ql(e.onPointerDownCapture,p=>{const y=p.target.getBoundingClientRect(),v=p.clientX-y.left,x=p.clientY-y.top;s.onThumbPointerDown({x:v,y:x})}),onPointerUp:Ql(e.onPointerUp,s.onThumbPointerUp)})});bV.displayName=kv;var WA="ScrollAreaCorner",S1e=w.forwardRef((e,t)=>{const n=wi(WA,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?h.jsx(E1e,{...e,ref:t}):null});S1e.displayName=WA;var E1e=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=wi(WA,n),[i,s]=w.useState(0),[a,c]=w.useState(0),u=!!(i&&a);return Bf(o.scrollbarX,()=>{const f=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(f),c(f)}),Bf(o.scrollbarY,()=>{const f=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(f),s(f)}),u?h.jsx(qu.div,{...r,ref:t,style:{width:i,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Mv(e){return e?parseInt(e,10):0}function vV(e,t){const n=e/t;return isNaN(n)?0:n}function zw(e){const t=vV(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function N1e(e,t,n,r="ltr"){const o=zw(n),i=o/2,s=t||i,a=o-s,c=n.scrollbar.paddingStart+s,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,f=n.content-n.viewport,p=r==="ltr"?[0,f]:[f*-1,0];return xV([c,u],p)(e)}function X6(e,t,n="ltr"){const r=zw(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,a=i-r,c=n==="ltr"?[0,s]:[s*-1,0],u=h1e(e,c);return xV([0,s],[0,a])(u)}function xV(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function wV(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=n.left!==i.left,a=n.top!==i.top;(s||a)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Bw(e,t){const n=lu(e),r=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),w.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Bf(e,t){const n=lu(t);ig(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var SV=dV,EV=hV,Pv=pV,Dv=bV,Vw="Switch",[C1e]=cV(Vw),[O1e,j1e]=C1e(Vw),NV=w.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:s,disabled:a,value:c="on",onCheckedChange:u,form:f,...p}=e,[g,y]=w.useState(null),v=Ua(t,_=>y(_)),x=w.useRef(!1),S=g?f||!!g.closest("form"):!0,[E,C]=t1e({prop:o,defaultProp:i??!1,onChange:u,caller:Vw});return h.jsxs(O1e,{scope:n,checked:E,disabled:a,children:[h.jsx(qu.button,{type:"button",role:"switch","aria-checked":E,"aria-required":s,"data-state":jV(E),"data-disabled":a?"":void 0,disabled:a,value:c,...p,ref:v,onClick:Ql(e.onClick,_=>{C(j=>!j),S&&(x.current=_.isPropagationStopped(),x.current||_.stopPropagation())})}),S&&h.jsx(OV,{control:g,bubbles:!x.current,name:r,value:c,checked:E,required:s,disabled:a,form:f,style:{transform:"translateX(-100%)"}})]})});NV.displayName=Vw;var _V="SwitchThumb",CV=w.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=j1e(_V,n);return h.jsx(qu.span,{"data-state":jV(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});CV.displayName=_V;var A1e="SwitchBubbleInput",OV=w.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},i)=>{const s=w.useRef(null),a=Ua(s,i),c=d1e(n),u=f1e(t);return w.useEffect(()=>{const f=s.current;if(!f)return;const p=window.HTMLInputElement.prototype,y=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==n&&y){const v=new Event("click",{bubbles:r});y.call(f,n),f.dispatchEvent(v)}},[c,n,r]),h.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});OV.displayName=A1e;function jV(e){return e?"checked":"unchecked"}var T1e=NV,$1e=CV;const R1e={xs:{className:"p-0.5",size:13},sm:{className:"p-0.5",size:15},md:{className:"p-1",size:18},lg:{className:"p-1.5",size:22}},ft=w.forwardRef(({Icon:e,size:t,variant:n="ghost",onClick:r,disabled:o,iconProps:i,tabIndex:s,...a},c)=>{const u=R1e[t??"md"];return h.jsx(Xe,{ref:c,variant:n,iconSize:u.size,iconProps:i,IconLeft:e,className:Be(u.className,a.className),onClick:r,disabled:o,tabIndex:s})});function AV(e){return e.match(/:(\w+)\??/)?.[1]??""}function Q6(e,t){return t?e.replace(/:\w+\??/,t):e.replace(/\/:\w+\??/,"")}function GA(e,t){const n=k1e(e??""),r=e??n?.path??"",o=AV(r),i=Mw()[o],[s,a]=w.useState(i===t),c=n?t===n.activeIdentifier:s,[,u]=Uo();function f(p){const g=p??!s;n&&n.setActiveIdentifier(t),r?u(g?Q6(r,t):Q6(r)):a(g)}return w.useEffect(()=>{!n&&e&&t&&a(i===t)},[i,t,e]),{active:c,toggle:f}}const TV=w.createContext(void 0);function $V({children:e,defaultIdentifier:t,path:n}){const r=AV(n),o=Mw()[r],[i,s]=w.useState(o??t);return h.jsx(TV.Provider,{value:{defaultIdentifier:t,path:n,activeIdentifier:i,setActiveIdentifier:s},children:e})}function k1e(e){const t=w.use(TV);if(t&&(!e||t.path===e))return t}const RV=w.createContext(void 0);function M1e({children:e}){const{width:t}=vX(),[n,r]=oh(t>768);return h.jsx(RV.Provider,{value:{sidebar:{open:n,handler:r}},children:e})}function P1e(){return w.useContext(RV)}const wa=Lw(sV(ey({sidebars:{default:{open:!1,width:350}}},e=>({toggleSidebar:t=>()=>e(n=>{const r=n.sidebars[t];return r?{sidebars:{...n.sidebars,[t]:{...r,open:!r.open}}}:n}),closeSidebar:t=>()=>e(n=>{const r=n.sidebars[t];return r?{sidebars:{...n.sidebars,[t]:{...r,open:!1}}}:n}),setSidebarWidth:t=>n=>e(r=>{const o=r.sidebars[t];return o?{sidebars:{...r.sidebars,[t]:{...o,width:n}}}:{sidebars:{...r.sidebars,[t]:{open:!1,width:n}}}}),resetSidebarWidth:t=>e(n=>{const r=n.sidebars[t];return r?{sidebars:{...n.sidebars,[t]:{...r,width:350}}}:n}),setSidebarState:(t,n)=>e(r=>({sidebars:{...r.sidebars,[t]:n}}))})),{name:"appshell",version:1,migrate:()=>({sidebars:{default:{open:!1,width:350}}})}));var kV={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Z6=Ne.createContext&&Ne.createContext(kV),D1e=["attr","size","title"];function I1e(e,t){if(e==null)return{};var n=L1e(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function L1e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Iv(){return Iv=Object.assign?Object.assign.bind():function(e){for(var t=1;tNe.createElement(t.tag,Lv({key:n},t.attr),MV(t.child)))}function Le(e){return t=>Ne.createElement(V1e,Iv({attr:Lv({},e.attr)},t),MV(e.child))}function V1e(e){var t=n=>{var{attr:r,size:o,title:i}=e,s=I1e(e,D1e),a=o||n.size||"1em",c;return n.className&&(c=n.className),e.className&&(c=(c?c+" ":"")+e.className),Ne.createElement("svg",Iv({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:c,style:Lv(Lv({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),i&&Ne.createElement("title",null,i),e.children)};return Z6!==void 0?Ne.createElement(Z6.Consumer,null,n=>t(n)):t(kV)}function U1e(e){return Le({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15.079 5.999l.239 .012c1.43 .097 3.434 1.013 4.508 2.586a1 1 0 0 1 -.344 1.44c-.05 .028 -.372 .158 -.497 .217a4.15 4.15 0 0 0 -.722 .431c-.614 .461 -.948 1.009 -.942 1.694c.01 .885 .339 1.454 .907 1.846c.208 .143 .436 .253 .666 .33c.126 .043 .426 .116 .444 .122a1 1 0 0 1 .662 .942c0 2.621 -3.04 6.381 -5.286 6.381c-.79 0 -1.272 -.091 -1.983 -.315l-.098 -.031c-.463 -.146 -.702 -.192 -1.133 -.192c-.52 0 -.863 .06 -1.518 .237l-.197 .053c-.575 .153 -.964 .226 -1.5 .248c-2.749 0 -5.285 -5.093 -5.285 -9.072c0 -3.87 1.786 -6.92 5.286 -6.92c.297 0 .598 .045 .909 .128c.403 .107 .774 .26 1.296 .508c.787 .374 .948 .44 1.009 .44h.016c.03 -.003 .128 -.047 1.056 -.457c1.061 -.467 1.864 -.685 2.746 -.616l-.24 -.012z"},child:[]},{tag:"path",attr:{d:"M14 1a1 1 0 0 1 1 1a3 3 0 0 1 -3 3a1 1 0 0 1 -1 -1a3 3 0 0 1 3 -3z"},child:[]}]})(e)}function H1e(e){return Le({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14.983 3l.123 .006c2.014 .214 3.527 .672 4.966 1.673a1 1 0 0 1 .371 .488c1.876 5.315 2.373 9.987 1.451 12.28c-1.003 2.005 -2.606 3.553 -4.394 3.553c-.732 0 -1.693 -.968 -2.328 -2.045a21.512 21.512 0 0 0 2.103 -.493a1 1 0 1 0 -.55 -1.924c-3.32 .95 -6.13 .95 -9.45 0a1 1 0 0 0 -.55 1.924c.717 .204 1.416 .37 2.103 .494c-.635 1.075 -1.596 2.044 -2.328 2.044c-1.788 0 -3.391 -1.548 -4.428 -3.629c-.888 -2.217 -.39 -6.89 1.485 -12.204a1 1 0 0 1 .371 -.488c1.439 -1.001 2.952 -1.459 4.966 -1.673a1 1 0 0 1 .935 .435l.063 .107l.651 1.285l.137 -.016a12.97 12.97 0 0 1 2.643 0l.134 .016l.65 -1.284a1 1 0 0 1 .754 -.54l.122 -.009zm-5.983 7a2 2 0 0 0 -1.977 1.697l-.018 .154l-.005 .149l.005 .15a2 2 0 1 0 1.995 -2.15zm6 0a2 2 0 0 0 -1.977 1.697l-.018 .154l-.005 .149l.005 .15a2 2 0 1 0 1.995 -2.15z"},child:[]}]})(e)}function q1e(e){return Le({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M18 2a1 1 0 0 1 .993 .883l.007 .117v4a1 1 0 0 1 -.883 .993l-.117 .007h-3v1h3a1 1 0 0 1 .991 1.131l-.02 .112l-1 4a1 1 0 0 1 -.858 .75l-.113 .007h-2v6a1 1 0 0 1 -.883 .993l-.117 .007h-4a1 1 0 0 1 -.993 -.883l-.007 -.117v-6h-2a1 1 0 0 1 -.993 -.883l-.007 -.117v-4a1 1 0 0 1 .883 -.993l.117 -.007h2v-1a6 6 0 0 1 5.775 -5.996l.225 -.004h3z"},child:[]}]})(e)}function W1e(e){return Le({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M5.315 2.1c.791 -.113 1.9 .145 3.333 .966l.272 .161l.16 .1l.397 -.083a13.3 13.3 0 0 1 4.59 -.08l.456 .08l.396 .083l.161 -.1c1.385 -.84 2.487 -1.17 3.322 -1.148l.164 .008l.147 .017l.076 .014l.05 .011l.144 .047a1 1 0 0 1 .53 .514a5.2 5.2 0 0 1 .397 2.91l-.047 .267l-.046 .196l.123 .163c.574 .795 .93 1.728 1.03 2.707l.023 .295l.007 .272c0 3.855 -1.659 5.883 -4.644 6.68l-.245 .061l-.132 .029l.014 .161l.008 .157l.004 .365l-.002 .213l-.003 3.834a1 1 0 0 1 -.883 .993l-.117 .007h-6a1 1 0 0 1 -.993 -.883l-.007 -.117v-.734c-1.818 .26 -3.03 -.424 -4.11 -1.878l-.535 -.766c-.28 -.396 -.455 -.579 -.589 -.644l-.048 -.019a1 1 0 0 1 .564 -1.918c.642 .188 1.074 .568 1.57 1.239l.538 .769c.76 1.079 1.36 1.459 2.609 1.191l.001 -.678l-.018 -.168a5.03 5.03 0 0 1 -.021 -.824l.017 -.185l.019 -.12l-.108 -.024c-2.976 -.71 -4.703 -2.573 -4.875 -6.139l-.01 -.31l-.004 -.292a5.6 5.6 0 0 1 .908 -3.051l.152 -.222l.122 -.163l-.045 -.196a5.2 5.2 0 0 1 .145 -2.642l.1 -.282l.106 -.253a1 1 0 0 1 .529 -.514l.144 -.047l.154 -.03z"},child:[]}]})(e)}function G1e(e){return Le({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 2a9.96 9.96 0 0 1 6.29 2.226a1 1 0 0 1 .04 1.52l-1.51 1.362a1 1 0 0 1 -1.265 .06a6 6 0 1 0 2.103 6.836l.001 -.004h-3.66a1 1 0 0 1 -.992 -.883l-.007 -.117v-2a1 1 0 0 1 1 -1h6.945a1 1 0 0 1 .994 .89c.04 .367 .061 .737 .061 1.11c0 5.523 -4.477 10 -10 10s-10 -4.477 -10 -10s4.477 -10 10 -10z"},child:[]}]})(e)}function J1e(e){return Le({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z"},child:[]}]})(e)}function Y1e(e){return Le({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z"},child:[]}]})(e)}function K1e(e){return Le({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M18.333 2c1.96 0 3.56 1.537 3.662 3.472l.005 .195v12.666c0 1.96 -1.537 3.56 -3.472 3.662l-.195 .005h-12.666a3.667 3.667 0 0 1 -3.662 -3.472l-.005 -.195v-12.666c0 -1.96 1.537 -3.56 3.472 -3.662l.195 -.005h12.666zm-2.626 7.293a1 1 0 0 0 -1.414 0l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.32 1.497l2 2l.094 .083a1 1 0 0 0 1.32 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z"},child:[]}]})(e)}function X1e(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"},child:[]},{tag:"path",attr:{d:"M6 4v4"},child:[]},{tag:"path",attr:{d:"M6 12v8"},child:[]},{tag:"path",attr:{d:"M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"},child:[]},{tag:"path",attr:{d:"M12 4v10"},child:[]},{tag:"path",attr:{d:"M12 18v2"},child:[]},{tag:"path",attr:{d:"M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"},child:[]},{tag:"path",attr:{d:"M18 4v1"},child:[]},{tag:"path",attr:{d:"M18 9v11"},child:[]}]})(e)}function PV(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"},child:[]},{tag:"path",attr:{d:"M12 8v4"},child:[]},{tag:"path",attr:{d:"M12 16h.01"},child:[]}]})(e)}function Q1e(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 5l0 14"},child:[]},{tag:"path",attr:{d:"M18 13l-6 6"},child:[]},{tag:"path",attr:{d:"M6 13l6 6"},child:[]}]})(e)}function JA(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M5 12l14 0"},child:[]},{tag:"path",attr:{d:"M5 12l6 6"},child:[]},{tag:"path",attr:{d:"M5 12l6 -6"},child:[]}]})(e)}function Z1e(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M5 12l14 0"},child:[]},{tag:"path",attr:{d:"M13 18l6 -6"},child:[]},{tag:"path",attr:{d:"M13 6l6 6"},child:[]}]})(e)}function eSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 5l0 14"},child:[]},{tag:"path",attr:{d:"M18 11l-6 -6"},child:[]},{tag:"path",attr:{d:"M6 11l6 -6"},child:[]}]})(e)}function tSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0"},child:[]},{tag:"path",attr:{d:"M16 12v1.5a2.5 2.5 0 0 0 5 0v-1.5a9 9 0 1 0 -5.5 8.28"},child:[]}]})(e)}function nSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5"},child:[]},{tag:"path",attr:{d:"M12 12l8 -4.5"},child:[]},{tag:"path",attr:{d:"M12 12l0 9"},child:[]},{tag:"path",attr:{d:"M12 12l-8 -4.5"},child:[]}]})(e)}function rSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M7 4a2 2 0 0 0 -2 2v3a2 3 0 0 1 -2 3a2 3 0 0 1 2 3v3a2 2 0 0 0 2 2"},child:[]},{tag:"path",attr:{d:"M17 4a2 2 0 0 1 2 2v3a2 3 0 0 0 2 3a2 3 0 0 0 -2 3v3a2 2 0 0 1 -2 2"},child:[]}]})(e)}function oSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 8a4 4 0 0 1 4 -4h8a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-8a4 4 0 0 1 -4 -4z"},child:[]},{tag:"path",attr:{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"},child:[]},{tag:"path",attr:{d:"M16.5 7.5v.01"},child:[]}]})(e)}function iSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 12m-10 0a10 10 0 1 0 20 0a10 10 0 1 0 -20 0"},child:[]},{tag:"path",attr:{d:"M12.556 6c.65 0 1.235 .373 1.508 .947l2.839 7.848a1.646 1.646 0 0 1 -1.01 2.108a1.673 1.673 0 0 1 -2.068 -.851l-.46 -1.052h-2.73l-.398 .905a1.67 1.67 0 0 1 -1.977 1.045l-.153 -.047a1.647 1.647 0 0 1 -1.056 -1.956l2.824 -7.852a1.664 1.664 0 0 1 1.409 -1.087l1.272 -.008z"},child:[]}]})(e)}function sSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 4l11.733 16h4.267l-11.733 -16z"},child:[]},{tag:"path",attr:{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"},child:[]}]})(e)}function DV(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z"},child:[]},{tag:"path",attr:{d:"M16 3v4"},child:[]},{tag:"path",attr:{d:"M8 3v4"},child:[]},{tag:"path",attr:{d:"M4 11h16"},child:[]},{tag:"path",attr:{d:"M11 15h1"},child:[]},{tag:"path",attr:{d:"M12 15v3"},child:[]}]})(e)}function aSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M5 12l5 5l10 -10"},child:[]}]})(e)}function IV(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M6 9l6 6l6 -6"},child:[]}]})(e)}function lSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 6l-6 6l6 6"},child:[]}]})(e)}function cSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 6l6 6l-6 6"},child:[]}]})(e)}function uSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M6 15l6 -6l6 6"},child:[]}]})(e)}function dSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M11 7l-5 5l5 5"},child:[]},{tag:"path",attr:{d:"M17 7l-5 5l5 5"},child:[]}]})(e)}function fSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M7 7l5 5l-5 5"},child:[]},{tag:"path",attr:{d:"M13 7l5 5l-5 5"},child:[]}]})(e)}function hSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},child:[]}]})(e)}function YA(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9.183 6.117a6 6 0 1 0 4.511 3.986"},child:[]},{tag:"path",attr:{d:"M14.813 17.883a6 6 0 1 0 -4.496 -3.954"},child:[]}]})(e)}function pSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 12h.01"},child:[]},{tag:"path",attr:{d:"M12 12h.01"},child:[]},{tag:"path",attr:{d:"M9 12h.01"},child:[]},{tag:"path",attr:{d:"M6 19a2 2 0 0 1 -2 -2v-4l-1 -1l1 -1v-4a2 2 0 0 1 2 -2"},child:[]},{tag:"path",attr:{d:"M18 19a2 2 0 0 0 2 -2v-4l1 -1l-1 -1v-4a2 2 0 0 0 -2 -2"},child:[]}]})(e)}function mSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 12h6"},child:[]},{tag:"path",attr:{d:"M12 9v6"},child:[]},{tag:"path",attr:{d:"M6 19a2 2 0 0 1 -2 -2v-4l-1 -1l1 -1v-4a2 2 0 0 1 2 -2"},child:[]},{tag:"path",attr:{d:"M18 19a2 2 0 0 0 2 -2v-4l1 -1l-1 -1v-4a2 2 0 0 0 -2 -2"},child:[]}]})(e)}function LV(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z"},child:[]},{tag:"path",attr:{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1"},child:[]}]})(e)}function FV(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 6c0 1.657 3.582 3 8 3s8 -1.343 8 -3s-3.582 -3 -8 -3s-8 1.343 -8 3"},child:[]},{tag:"path",attr:{d:"M4 6v6c0 1.657 3.582 3 8 3c1.075 0 2.1 -.08 3.037 -.224"},child:[]},{tag:"path",attr:{d:"M20 12v-6"},child:[]},{tag:"path",attr:{d:"M4 12v6c0 1.657 3.582 3 8 3c.166 0 .331 -.002 .495 -.006"},child:[]},{tag:"path",attr:{d:"M16 19h6"},child:[]},{tag:"path",attr:{d:"M19 16v6"},child:[]}]})(e)}function gSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 6m-8 0a8 3 0 1 0 16 0a8 3 0 1 0 -16 0"},child:[]},{tag:"path",attr:{d:"M4 6v6a8 3 0 0 0 16 0v-6"},child:[]},{tag:"path",attr:{d:"M4 12v6a8 3 0 0 0 16 0v-6"},child:[]}]})(e)}function G8e(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.831 20.413l-5.375 -6.91c-.608 -.783 -.608 -2.223 0 -3l5.375 -6.911a1.457 1.457 0 0 1 2.338 0l5.375 6.91c.608 .783 .608 2.223 0 3l-5.375 6.911a1.457 1.457 0 0 1 -2.338 0z"},child:[]}]})(e)}function ySe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},child:[]},{tag:"path",attr:{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},child:[]},{tag:"path",attr:{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},child:[]}]})(e)}function Ha(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},child:[]},{tag:"path",attr:{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},child:[]},{tag:"path",attr:{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},child:[]}]})(e)}function bSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6"},child:[]},{tag:"path",attr:{d:"M11 13l9 -9"},child:[]},{tag:"path",attr:{d:"M15 4h5v5"},child:[]}]})(e)}function vSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"},child:[]},{tag:"path",attr:{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"},child:[]},{tag:"path",attr:{d:"M3 3l18 18"},child:[]}]})(e)}function zV(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"},child:[]},{tag:"path",attr:{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"},child:[]}]})(e)}function xSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 3v4a1 1 0 0 0 1 1h4"},child:[]},{tag:"path",attr:{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"},child:[]},{tag:"path",attr:{d:"M9 9l1 0"},child:[]},{tag:"path",attr:{d:"M9 13l6 0"},child:[]},{tag:"path",attr:{d:"M9 17l6 0"},child:[]}]})(e)}function wSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 3v4a1 1 0 0 0 1 1h4"},child:[]},{tag:"path",attr:{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"},child:[]},{tag:"path",attr:{d:"M7 16.5a1.5 1.5 0 0 0 -3 0v3a1.5 1.5 0 0 0 3 0"},child:[]},{tag:"path",attr:{d:"M10 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"},child:[]},{tag:"path",attr:{d:"M16 15l2 6l2 -6"},child:[]}]})(e)}function SSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 3v4a1 1 0 0 0 1 1h4"},child:[]},{tag:"path",attr:{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"},child:[]},{tag:"path",attr:{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"},child:[]},{tag:"path",attr:{d:"M17 18h2"},child:[]},{tag:"path",attr:{d:"M20 15h-3v6"},child:[]},{tag:"path",attr:{d:"M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1z"},child:[]}]})(e)}function ESe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 3v4a1 1 0 0 0 1 1h4"},child:[]},{tag:"path",attr:{d:"M14 3v4a1 1 0 0 0 1 1h4"},child:[]},{tag:"path",attr:{d:"M5 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"},child:[]},{tag:"path",attr:{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"},child:[]},{tag:"path",attr:{d:"M18 15v6h2"},child:[]},{tag:"path",attr:{d:"M13 15a2 2 0 0 1 2 2v2a2 2 0 1 1 -4 0v-2a2 2 0 0 1 2 -2z"},child:[]},{tag:"path",attr:{d:"M14 20l1.5 1.5"},child:[]}]})(e)}function NSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 3v4a1 1 0 0 0 1 1h4"},child:[]},{tag:"path",attr:{d:"M14 3v4a1 1 0 0 0 1 1h4"},child:[]},{tag:"path",attr:{d:"M16.5 15h3"},child:[]},{tag:"path",attr:{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"},child:[]},{tag:"path",attr:{d:"M4.5 15h3"},child:[]},{tag:"path",attr:{d:"M6 15v6"},child:[]},{tag:"path",attr:{d:"M18 15v6"},child:[]},{tag:"path",attr:{d:"M10 15l4 6"},child:[]},{tag:"path",attr:{d:"M10 21l4 -6"},child:[]}]})(e)}function _Se(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 3v4a1 1 0 0 0 1 1h4"},child:[]},{tag:"path",attr:{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"},child:[]},{tag:"path",attr:{d:"M4 15l4 6"},child:[]},{tag:"path",attr:{d:"M4 21l4 -6"},child:[]},{tag:"path",attr:{d:"M19 15v6h3"},child:[]},{tag:"path",attr:{d:"M11 21v-6l2.5 3l2.5 -3v6"},child:[]}]})(e)}function CSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"},child:[]}]})(e)}function BV(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18.9 7a8 8 0 0 1 1.1 5v1a6 6 0 0 0 .8 3"},child:[]},{tag:"path",attr:{d:"M8 11a4 4 0 0 1 8 0v1a10 10 0 0 0 2 6"},child:[]},{tag:"path",attr:{d:"M12 11v2a14 14 0 0 0 2.5 8"},child:[]},{tag:"path",attr:{d:"M8 15a18 18 0 0 0 1.8 6"},child:[]},{tag:"path",attr:{d:"M4.9 19a22 22 0 0 1 -.9 -7v-1a8 8 0 0 1 12 -6.95"},child:[]}]})(e)}function OSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},child:[]},{tag:"path",attr:{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},child:[]},{tag:"path",attr:{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},child:[]},{tag:"path",attr:{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},child:[]},{tag:"path",attr:{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},child:[]},{tag:"path",attr:{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},child:[]}]})(e)}function jSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10 3h4v4h-4z"},child:[]},{tag:"path",attr:{d:"M3 17h4v4h-4z"},child:[]},{tag:"path",attr:{d:"M17 17h4v4h-4z"},child:[]},{tag:"path",attr:{d:"M7 17l5 -4l5 4"},child:[]},{tag:"path",attr:{d:"M12 7l0 6"},child:[]}]})(e)}function ASe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3.05 11a8.975 8.975 0 0 1 2.54 -5.403m2.314 -1.697a9 9 0 0 1 12.113 12.112m-1.695 2.312a9 9 0 0 1 -14.772 -3.324m-.5 5v-5h5"},child:[]},{tag:"path",attr:{d:"M3 3l18 18"},child:[]}]})(e)}function TSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 8l0 4l2 2"},child:[]},{tag:"path",attr:{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5"},child:[]}]})(e)}function VV(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"},child:[]},{tag:"path",attr:{d:"M12 9h.01"},child:[]},{tag:"path",attr:{d:"M11 12h1v4h1"},child:[]}]})(e)}function $Se(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 16v-8l3 8v-8"},child:[]},{tag:"path",attr:{d:"M15 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2z"},child:[]},{tag:"path",attr:{d:"M1 8h3v6.5a1.5 1.5 0 0 1 -3 0v-.5"},child:[]},{tag:"path",attr:{d:"M7 15a1 1 0 0 0 1 1h1a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h1a1 1 0 0 1 1 1"},child:[]}]})(e)}function J8e(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0z"},child:[]},{tag:"path",attr:{d:"M15 9h.01"},child:[]}]})(e)}function RSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 5m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z"},child:[]},{tag:"path",attr:{d:"M7 15v-6l2 2l2 -2v6"},child:[]},{tag:"path",attr:{d:"M14 13l2 2l2 -2m-2 2v-6"},child:[]}]})(e)}function kSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 8v-2a2 2 0 0 1 2 -2h2"},child:[]},{tag:"path",attr:{d:"M4 16v2a2 2 0 0 0 2 2h2"},child:[]},{tag:"path",attr:{d:"M16 4h2a2 2 0 0 1 2 2v2"},child:[]},{tag:"path",attr:{d:"M16 20h2a2 2 0 0 0 2 -2v-2"},child:[]}]})(e)}function MSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 6l16 0"},child:[]},{tag:"path",attr:{d:"M4 12l16 0"},child:[]},{tag:"path",attr:{d:"M4 18l16 0"},child:[]}]})(e)}function PSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M5 12l14 0"},child:[]}]})(e)}function DSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 17a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"},child:[]},{tag:"path",attr:{d:"M13 17a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"},child:[]},{tag:"path",attr:{d:"M9 17v-13h10v13"},child:[]},{tag:"path",attr:{d:"M9 8h10"},child:[]}]})(e)}function ISe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 10l2 -2v8"},child:[]},{tag:"path",attr:{d:"M9 8h3a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 0 -1 1v2a1 1 0 0 0 1 1h3"},child:[]},{tag:"path",attr:{d:"M17 8h2.5a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1 -1.5 1.5h-1.5h1.5a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1 -1.5 1.5h-2.5"},child:[]}]})(e)}function ny(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 8h.01"},child:[]},{tag:"path",attr:{d:"M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z"},child:[]},{tag:"path",attr:{d:"M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5"},child:[]},{tag:"path",attr:{d:"M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3"},child:[]}]})(e)}function UV(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 5l0 14"},child:[]},{tag:"path",attr:{d:"M5 12l14 0"},child:[]}]})(e)}function HV(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"},child:[]},{tag:"path",attr:{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"},child:[]}]})(e)}function KA(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 9l4 -4l4 4"},child:[]},{tag:"path",attr:{d:"M16 15l-4 4l-4 -4"},child:[]}]})(e)}function _h(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z"},child:[]},{tag:"path",attr:{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"},child:[]}]})(e)}function fC(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 15m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z"},child:[]},{tag:"path",attr:{d:"M15 15m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z"},child:[]},{tag:"path",attr:{d:"M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z"},child:[]},{tag:"path",attr:{d:"M6 15v-1a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v1"},child:[]},{tag:"path",attr:{d:"M12 9l0 3"},child:[]}]})(e)}function LSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 3m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z"},child:[]}]})(e)}function tP(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 15h16"},child:[]},{tag:"path",attr:{d:"M4 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"},child:[]},{tag:"path",attr:{d:"M4 20h12"},child:[]}]})(e)}function FSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},child:[]},{tag:"path",attr:{d:"M2 6m0 6a6 6 0 0 1 6 -6h8a6 6 0 0 1 6 6v0a6 6 0 0 1 -6 6h-8a6 6 0 0 1 -6 -6z"},child:[]}]})(e)}function XA(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 7l16 0"},child:[]},{tag:"path",attr:{d:"M10 11l0 6"},child:[]},{tag:"path",attr:{d:"M14 11l0 6"},child:[]},{tag:"path",attr:{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"},child:[]},{tag:"path",attr:{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"},child:[]}]})(e)}function zSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},child:[]},{tag:"path",attr:{d:"M7 9l5 -5l5 5"},child:[]},{tag:"path",attr:{d:"M12 4l0 12"},child:[]}]})(e)}function BSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"},child:[]},{tag:"path",attr:{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"},child:[]}]})(e)}function VSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M5 4c-2.5 5 -2.5 10 0 16m14 -16c2.5 5 2.5 10 0 16m-10 -11h1c1 0 1 1 2.016 3.527c.984 2.473 .984 3.473 1.984 3.473h1"},child:[]},{tag:"path",attr:{d:"M8 16c1.5 0 3 -2 4 -3.5s2.5 -3.5 4 -3.5"},child:[]}]})(e)}function USe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"},child:[]},{tag:"path",attr:{d:"M3.6 9h16.8"},child:[]},{tag:"path",attr:{d:"M3.6 15h16.8"},child:[]},{tag:"path",attr:{d:"M11.5 3a17 17 0 0 0 0 18"},child:[]},{tag:"path",attr:{d:"M12.5 3a17 17 0 0 1 0 18"},child:[]}]})(e)}function QA(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 6l-12 12"},child:[]},{tag:"path",attr:{d:"M6 6l12 12"},child:[]}]})(e)}function HSe(e){return Le({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M16 16v-8h2a2 2 0 1 1 0 4h-2"},child:[]},{tag:"path",attr:{d:"M12 8v8"},child:[]},{tag:"path",attr:{d:"M4 8h4l-4 8h4"},child:[]}]})(e)}function Nr({children:e,defaultOpen:t=!1,openEvent:n="onClick",position:r="bottom-start",dropdownWrapperProps:o,items:i,title:s,hideOnEmpty:a=!0,onClickItem:c,renderItem:u,itemsClassName:f,className:p}){const[g,y]=w.useState(t),[v,x]=w.useState(r),S=jg(()=>y(!1)),E=i.filter(Boolean),[C,_]=w.useState(0),j=It((B=50)=>setTimeout(()=>y(U=>!U),typeof B=="number"?B:0)),A=n==="onClick"?B=>{B.stopPropagation(),j()}:void 0,T=It(B=>{if(n!=="onContextMenu")return;if(B.preventDefault(),g){j(0),setTimeout(()=>{x(r),_(0)},10);return}const U=B.clientX-B.currentTarget.getBoundingClientRect().left,{left:M=0,right:z=0}=S.current?.getBoundingClientRect()??{};if(M>0&&z>0){const $=GL(U,M,z);U<(M+z)/2?(x("bottom-start"),_($)):(x("bottom-end"),_(z-$))}else x(r),_(0);j()}),k=4,R={"bottom-start":{top:"100%",left:C,marginTop:k},"bottom-end":{right:C,top:"100%",marginTop:k},"top-start":{bottom:"100%",marginBottom:k},"top-end":{bottom:"100%",right:C,marginBottom:k}}[v],V=It(B=>{B.onClick&&B.onClick(),c&&c(B),j(50)});if(E.length===0&&a)return null;const H=E.some(B=>"icon"in B&&B.icon),F=u||((B,{key:U,onClick:M})=>typeof B=="function"?h.jsx(w.Fragment,{children:B()},U):h.jsxs("button",{type:"button",disabled:B.disabled,className:Be("flex flex-row flex-nowrap text-nowrap items-center outline-none cursor-pointer px-2.5 rounded-md link leading-none h-8",f,B.disabled?"opacity-50 cursor-not-allowed":"hover:bg-primary/10",B.destructive&&"text-red-500 hover:bg-red-600 hover:text-white"),onClick:M,title:B.title,children:[H&&h.jsx("div",{className:"size-[16px] text-left mr-1.5 opacity-80",children:B.icon&&h.jsx(B.icon,{className:"size-[16px]"})}),h.jsx("div",{className:"flex flex-grow truncate text-nowrap",children:B.label})]},U));return h.jsxs("div",{role:"dropdown",className:Be("relative flex",p),ref:S,onContextMenu:T,children:[w.cloneElement(e,{onClick:A}),g&&h.jsxs("div",{...o,className:Be("absolute z-30 flex flex-col bg-background border border-muted px-1 py-1 rounded-lg shadow-lg min-w-full",o?.className),style:R,children:[s&&h.jsx("div",{className:"text-sm font-bold px-2.5 mb-1 mt-1 opacity-50 truncate",children:s}),E.map((B,U)=>F(B,{key:U,onClick:M=>{M.stopPropagation(),V(B)}}))]})]})}const ZA=()=>h.jsxs("svg",{fill:"currentColor",fillRule:"evenodd",height:"1em",style:{flex:"none",lineHeight:"1"},viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("title",{children:"ModelContextProtocol"}),h.jsx("path",{d:"M15.688 2.343a2.588 2.588 0 00-3.61 0l-9.626 9.44a.863.863 0 01-1.203 0 .823.823 0 010-1.18l9.626-9.44a4.313 4.313 0 016.016 0 4.116 4.116 0 011.204 3.54 4.3 4.3 0 013.609 1.18l.05.05a4.115 4.115 0 010 5.9l-8.706 8.537a.274.274 0 000 .393l1.788 1.754a.823.823 0 010 1.18.863.863 0 01-1.203 0l-1.788-1.753a1.92 1.92 0 010-2.754l8.706-8.538a2.47 2.47 0 000-3.54l-.05-.049a2.588 2.588 0 00-3.607-.003l-7.172 7.034-.002.002-.098.097a.863.863 0 01-1.204 0 .823.823 0 010-1.18l7.273-7.133a2.47 2.47 0 00-.003-3.537z"}),h.jsx("path",{d:"M14.485 4.703a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a4.115 4.115 0 000 5.9 4.314 4.314 0 006.016 0l7.12-6.982a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a2.588 2.588 0 01-3.61 0 2.47 2.47 0 010-3.54l7.12-6.982z"})]});function Uw(e,t,n){const o=ot().options?.entities?.[e.name],i=o?.footer?.(t,e,n)??null,s=o?.header?.(t,e,n)??null,a=o?.actions?.(t,e,n);return{footer:i,header:s,field:c=>o?.fields?.[c],actions:a}}function qSe(){const{options:e}=ot();return{userMenu:e?.appShell?.userMenu??[]}}function WSe(){const[e,t]=Uo(),{config:n}=ot(),r=[{label:"Data",href:"/data",Icon:gSe},{label:"Auth",href:"/auth",Icon:BV},{label:"Media",href:"/media",Icon:ny}];(ir()||Object.keys(n.flows?.flows??{}).length>0)&&r.push({label:"Flows",href:"/flows",Icon:jSe}),n.server.mcp.enabled&&r.push({label:"MCP",href:"/tools/mcp",Icon:ZA});const o=r.find(a=>a.exact?e===a.href:e.startsWith(a.href)),i=It(a=>{t(a.href)}),s=(a,{key:c,onClick:u})=>h.jsx(vm,{onClick:u,as:"button",className:"rounded-md",children:h.jsxs("div",{"data-active":o?.label===a.label,className:"flex flex-row items-center gap-2.5 data-[active=true]:opacity-50",children:[h.jsx(a.Icon,{size:18}),h.jsx("span",{className:"text-lg",children:a.label})]})},c);return h.jsxs(h.Fragment,{children:[h.jsx("nav",{className:"hidden md:flex flex-row gap-2.5 pl-0 p-2.5 items-center",children:r.map(a=>h.jsx(vm,{as:Nn,href:a.href,Icon:a.Icon,disabled:a.disabled,children:a.label},a.href))}),h.jsx("nav",{className:"flex md:hidden flex-row items-center",children:o&&h.jsx(Nr,{items:r,onClickItem:i,renderItem:s,children:h.jsx(vm,{as:"button",Icon:o.Icon,className:"active pl-6 pr-3.5",children:h.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[h.jsx("span",{className:"text-lg",children:o.label}),h.jsx(KA,{size:18,className:"opacity-70"})]})})})})]})}function GSe({name:e="default"}){const t=wa(r=>r.toggleSidebar(e)),n=wa(r=>r.sidebars[e]?.open);return h.jsx(ft,{id:"toggle-sidebar",size:"lg",Icon:n?QA:MSe,onClick:t})}function JSe({hasSidebar:e=!0}){const{app:t}=ot(),{theme:n}=Va(),{logo_return_path:r="/"}=t.options;return h.jsxs("header",{id:"header","data-shell":"header",className:"flex flex-row w-full h-16 gap-2.5 border-muted border-b justify-start bg-muted/10",children:[h.jsx(Nn,{href:r,native:r!=="/",className:"max-h-full flex hover:bg-primary/5 link p-2.5 w-[134px] outline-none",children:h.jsx(Fw,{theme:n})}),h.jsx(WSe,{}),h.jsx("div",{className:"flex flex-grow"}),h.jsxs("div",{className:"flex md:hidden flex-row items-center pr-2 gap-2",children:[h.jsx(GSe,{name:"default"}),h.jsx(nP,{})]}),h.jsx("div",{className:"hidden md:flex flex-row items-center px-4 gap-2",children:h.jsx(nP,{})})]})}function nP(){const{config:e}=ot(),t=qSe(),n=DA(),[r]=Pn(),{logout_route:o}=Rw();async function i(){await n.logout(),n.local||r(o,{reload:!0})}async function s(){r("/auth/login")}const a=[...t.userMenu??[],{label:"Settings",onClick:()=>r("/settings"),icon:rg},{label:"OpenAPI",onClick:()=>window.open("/api/system/swagger","_blank"),icon:wve},{label:"Docs",onClick:()=>window.open("https://docs.bknd.io","_blank"),icon:_ve}];return e.server.mcp.enabled&&a.push({label:"MCP",onClick:()=>r("/tools/mcp"),icon:ZA}),e.auth.enabled&&(n.user?a.push({label:"Logout",title:`Logout ${n.user.email}`,onClick:i,icon:Xve}):a.push({label:"Login",onClick:s,icon:mxe})),a.push(()=>h.jsx(YSe,{})),a.push(()=>h.jsx("div",{className:"font-mono leading-none text-xs text-primary/50 text-center pb-1 pt-2 mt-1 border-t border-primary/5",children:Joe()})),h.jsx(h.Fragment,{children:h.jsx(Nr,{items:a,position:"bottom-end",children:n.user?h.jsx(Xe,{className:"rounded-full w-12 h-12 justify-center p-0 text-lg",children:n.user.email[0]?.toUpperCase()}):h.jsx(Xe,{className:"rounded-full w-12 h-12 justify-center p-0",IconLeft:BSe})})})}function YSe(){const{value:e,themes:t,setTheme:n}=Va();return h.jsx("div",{className:"flex flex-col items-center mt-1 pt-1 border-t border-primary/5",children:h.jsx(bc,{withItemsBorders:!1,className:"w-full",data:t.map(r=>({value:r,label:Ta(r)})),value:e,onChange:n,size:"xs"})})}function qV({children:e}){const t=wa(r=>r.sidebars),n=Vt(t,r=>r.width);return h.jsx(M1e,{children:h.jsx("div",{id:"app-shell","data-shell":"root",className:"flex flex-1 flex-col select-none h-dvh",style:Object.fromEntries(Object.entries(n).map(([r,o])=>[`--sidebar-width-${r}`,`${o}px`])),children:e})})}const vm=({children:e,as:t,className:n,Icon:r,disabled:o,...i})=>{const s=t||"a";return h.jsxs(s,{...i,className:Be("px-6 py-2 [&.active]:bg-muted [&.active]:hover:bg-primary/15 hover:bg-primary/5 flex flex-row items-center rounded-full gap-2.5 link transition-colors",o&&"opacity-50 cursor-not-allowed",n),children:[r&&h.jsx(r,{size:18}),typeof e=="string"?h.jsx("span",{className:"text-lg",children:e}):e]})};function WV({children:e,center:t}){return h.jsx("main",{"data-shell":"content",className:Be("flex flex-1 flex-row max-w-screen h-full",t&&"justify-center items-center"),children:e})}function ry({children:e}){const{sidebar:t}=P1e();return h.jsx("div",{"data-shell":"main",className:Be("flex flex-col flex-grow w-1 flex-shrink-1",t.open&&"md:max-w-[calc(100%-var(--sidebar-width))]"),children:e})}function Wu({children:e,name:t="default",handle:n="right",minWidth:r,maxWidth:o}){const i=wa(g=>g.sidebars[t]?.open),s=wa(g=>g.closeSidebar(t)),a=wa(g=>g.sidebars[t]?.width??350),c=jg(s,["mouseup","touchend"]),u=w.useRef(null),[f]=Uo(),p=()=>{i&&s()};return w.useEffect(p,[f]),bO([["Escape",p]]),h.jsxs(h.Fragment,{children:[n==="left"&&h.jsx(rP,{name:t,handle:n,sidebarRef:u,minWidth:r,maxWidth:o}),h.jsx("aside",{"data-shell":"sidebar",ref:u,className:"hidden md:flex flex-col flex-shrink-0 flex-grow-0 h-full bg-muted/10",style:{width:a},children:e}),n==="right"&&h.jsx(rP,{name:t,handle:n,sidebarRef:u,minWidth:r,maxWidth:o}),h.jsx("div",{"data-open":i,className:"absolute w-full md:hidden data-[open=true]:translate-x-0 translate-x-[-100%] transition-transform z-10 backdrop-blur-sm max-w-[90%]",children:h.jsx("aside",{ref:c,"data-shell":"sidebar",className:"flex-col w-[var(--sidebar-width)] flex-shrink-0 flex-grow-0 h-full border-muted border-r bg-background",children:h.jsx(XSe,{className:"overflow-y-scroll md:overflow-y-hidden",children:e})})})]})}const rP=({name:e="default",handle:t="right",sidebarRef:n,minWidth:r=250,maxWidth:o=window.innerWidth*.5})=>{const i=wa(x=>x.setSidebarWidth(e)),[s,a]=w.useState(!1),[c,u]=w.useState(0),[f,p]=w.useState(n.current?.offsetWidth??0),g=x=>{x.preventDefault(),a(!0),u(x.clientX),p(n.current?.offsetWidth??0)},y=x=>{if(!s)return;const S=t==="right"?x.clientX-c:c-x.clientX,E=GL(f+S,r,o);i(E)},v=()=>{a(!1)};return w.useEffect(()=>(s&&(window.addEventListener("mousemove",y),window.addEventListener("mouseup",v)),()=>{window.removeEventListener("mousemove",y),window.removeEventListener("mouseup",v)}),[s,c,f,r,o]),h.jsx("div",{"data-shell":"sidebar-resize","data-active":s?1:void 0,className:"w-px h-full hidden md:flex bg-muted after:transition-colors relative after:absolute after:inset-0 after:-left-px after:w-[2px] select-none data-[active]:after:bg-sky-400 data-[active]:cursor-col-resize hover:after:bg-sky-400 hover:cursor-col-resize after:z-2",onMouseDown:g,style:{touchAction:"none"}})};function oy({children:e,className:t,...n}){return h.jsx("h2",{...n,className:Be("text-lg dark:font-bold font-semibold select-text",t),children:e})}function An({children:e,right:t,className:n,scrollable:r,sticky:o}={}){return h.jsxs("div",{className:Be("flex flex-row h-14 flex-shrink-0 py-2 pl-5 pr-3 border-muted border-b items-center justify-between bg-muted/10",o&&"sticky top-0 bottom-10 z-10",n),children:[h.jsx("div",{className:Be("",r&&"overflow-x-scroll overflow-y-visible app-scrollbar"),children:typeof e=="string"?h.jsx(oy,{children:e}):e}),t&&!r&&h.jsx("div",{className:"flex flex-row gap-2.5",children:t}),t&&r&&h.jsxs("div",{className:"flex flex-row sticky z-10 right-0 h-full",children:[h.jsx("div",{className:"h-full w-5 bg-gradient-to-l from-background"}),h.jsx("div",{className:"flex flex-row gap-2.5 bg-background",children:t})]})]})}const oo=({children:e,as:t,className:n,disabled:r=!1,...o})=>{const i=t||"a";return h.jsx(i,{...o,className:Be("flex flex-row px-4 items-center gap-2 h-12",!r&&"cursor-pointer rounded-md [&.active]:bg-primary/10 [&.active]:hover:bg-primary/15 [&.active]:font-medium hover:bg-primary/5 focus:bg-primary/5 link",r&&"opacity-50 cursor-not-allowed pointer-events-none",n),children:e})},KSe=({children:e,as:t,className:n,disabled:r=!1,active:o=!1,badge:i,...s})=>{const a=t||"a";return h.jsxs(a,{...s,className:Be("hover:bg-primary/5 flex flex-row items-center justify-center gap-2.5 px-5 h-12 leading-none font-medium text-primary/80 rounded-tr-lg rounded-tl-lg cursor-pointer border border-transparent border-b-0",o?"bg-background hover:bg-background text-primary border-muted border-b-0":"link opacity-80",i&&"pr-4",n),children:[h.jsx("span",{className:"truncate",children:e}),i?h.jsx("span",{className:"px-3 py-1 rounded-full font-mono bg-primary/5 text-sm leading-none",children:i}):null]})},GV=({title:e,items:t})=>h.jsxs("div",{className:"relative",children:[h.jsx("div",{className:"absolute left-0 right-0 bottom-0 z-0 h-px bg-muted"}),h.jsx("div",{className:"overflow-x-scroll app-scrollbar mt-10 border-t border-t-muted",children:h.jsx(An,{className:"pl-3 pb-0 items-end ",children:h.jsxs("div",{className:"flex flex-row items-center gap-6 -mb-px",children:[e&&h.jsx(oy,{className:"pl-2 hidden md:block",children:e}),h.jsx("div",{className:"flex flex-row items-center gap-3 pr-3",children:t?.map(({label:n,...r},o)=>h.jsx(KSe,{...r,className:"relative z-2",children:n},o))})]})})})]});function XSe(e){const t=w.useRef(null),[n,r]=w.useState(0),[o,i]=w.useState(window.innerHeight);function s(){if(t.current){const a=t.current.getBoundingClientRect().top,c=window.innerHeight;r(a),i(c)}}return w.useEffect(()=>{s();const a=lA(s,500);return window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[]),h.jsx("div",{ref:t,style:{height:`${o-n}px`},...e,children:e.children})}function Zn({children:e,initialOffset:t=64}){const n=w.useRef(null),[r,o]=w.useState(t);function i(){if(n.current){const s=n.current.getBoundingClientRect().top;o(s)}}return w.useEffect(i,[]),typeof window<"u"&&window.addEventListener("resize",lA(i,500)),h.jsxs(SV,{style:{height:`calc(100dvh - ${r}px`},ref:n,children:[h.jsx(EV,{className:"w-full h-full",children:e}),h.jsx(Pv,{forceMount:!0,className:"flex select-none touch-none bg-transparent w-0.5",orientation:"vertical",children:h.jsx(Dv,{className:"flex-1 bg-primary/50"})}),h.jsx(Pv,{forceMount:!0,className:"flex select-none touch-none bg-muted flex-col h-0.5",orientation:"horizontal",children:h.jsx(Dv,{className:"flex-1 bg-primary/50 "})})]})}const QSe=({title:e,open:t,toggle:n,ActiveIcon:r=Dve,children:o,renderHeaderRight:i,scrollContainerRef:s})=>h.jsxs("div",{style:{minHeight:49},className:Be("flex flex-col flex-animate overflow-hidden",t?"flex-open border-b border-b-muted":"flex-initial cursor-pointer hover:bg-primary/5"),children:[h.jsxs("div",{className:Be("flex flex-row bg-muted/10 border-muted border-b h-14 py-4 pr-4 pl-2 items-center gap-2"),onClick:n,children:[h.jsx(ft,{Icon:t?r:Mve,disabled:t}),h.jsx("h2",{className:"text-lg dark:font-bold font-semibold select-text",children:e}),h.jsx("div",{className:"flex grow"}),i?.({open:t})]}),h.jsx("div",{ref:s,className:Be("overflow-y-scroll transition-all",t?" grow":"h-0 opacity-0"),children:o})]}),Vf=({routePattern:e,identifier:t,renderHeaderRight:n,...r})=>{const{active:o,toggle:i}=GA(e,t);return h.jsx(QSe,{...r,open:o,toggle:i,renderHeaderRight:n&&(s=>n?.({open:s.open,active:o}))})},hC=({className:e,...t})=>h.jsx("hr",{...t,className:Be("border-muted my-3",e)});function ZSe(e){const t=e==="light",n={offset:2,transitionProps:{transition:"pop",duration:75}},r="!bg-muted/40 border-transparent disabled:bg-muted/50 disabled:text-primary/50 focus:!border-zinc-500";return{theme:{components:{Button:Nu.extend({vars:(o,i)=>({root:{"--button-height":"auto"}}),classNames:(o,i)=>({root:Be("px-3 py-2 rounded-md h-auto")}),defaultProps:{size:"md",variant:t?"filled":"white"}}),Switch:vc.extend({defaultProps:{size:"md",color:t?"dark":"blue"}}),Select:Xx.extend({classNames:(o,i)=>({input:r,dropdown:`bknd-admin ${e} bg-background border-primary/20`}),defaultProps:{checkIconPosition:"right",comboboxProps:n}}),TagsInput:$j.extend({defaultProps:{comboboxProps:n}}),Radio:Os.extend({defaultProps:{classNames:{body:"items-center"}}}),TextInput:_n.extend({classNames:(o,i)=>({wrapper:"leading-none",input:r})}),NumberInput:Jx.extend({classNames:(o,i)=>({wrapper:"leading-none",input:r})}),Textarea:kg.extend({classNames:(o,i)=>({wrapper:"leading-none",input:r})}),Modal:Bo.extend({classNames:(o,i)=>({...i.classNames,root:`bknd-admin ${e} ${i.className??""}`,content:"!bg-background !rounded-lg !select-none",overlay:"!backdrop-blur-sm"})}),Tabs:xn.extend({vars:(o,i)=>({root:{"--tabs-color":"border-primary"}})}),Menu:Lr.extend({defaultProps:{offset:2},classNames:(o,i)=>({dropdown:"!rounded-lg !px-1",item:"!rounded-md !text-[14px]"})}),SegmentedControl:bc.extend({classNames:(o,i)=>({root:t?"bg-primary/5":"bg-lightest/60",indicator:t?"bg-background":"bg-primary/15"})}),Notifications:ks.extend({classNames:(o,i)=>({notification:"-top-4 -right-4"})})},primaryColor:"dark",primaryShade:9},forceColorScheme:e}}function _c(){const{config:e,schema:t,actions:n,app:r}=ot(),o={config:{set:async a=>(console.log("--set",a),await n.set("auth",a,!0)?(await n.reload(),!0):!1)},roles:{add:async(a,c={})=>(console.log("add role",a,c),await n.add("auth",`roles.${a}`,c)),patch:async(a,c)=>(console.log("patch role",a,c),await n.patch("auth",`roles.${a}`,c)),delete:async a=>(console.log("delete role",a),window.confirm(`Are you sure you want to delete the role "${a}"?`)?await n.remove("auth",`roles.${a}`):!1)}},i=["system.access.admin","system.access.api","system.config.read","system.config.read.secrets","system.build"];return{$auth:{roles:{none:Object.keys(e.auth.roles??{}).length===0,minimum_permissions:i,has_admin:Object.entries(e.auth.roles??{}).some(([a,c])=>c.implicit_allow||i.every(u=>c.permissions?.some(f=>f.permission===f)))},routes:{settings:r.getSettingsPath(["auth"]),listUsers:r.getAbsolutePath("/data/"+st.data.entity.list(e.auth.entity_name))}},config:e.auth,schema:t.auth,actions:o}}const eEe=({className:e,...t})=>h.jsx(PV,{...t,className:Be("dark:text-amber-300 text-amber-700 cursor-help",e)}),tEe=({className:e,...t})=>h.jsx(PV,{...t,className:Be("dark:text-red-300 text-red-700 cursor-help",e)}),Hw={Warning:eEe,Err:tEe};function hr(e=[]){w.useLayoutEffect(()=>{const t="BKND";document.title=[t,...e].join(" / ")})}function nEe({children:e}){const{config:t,$auth:n}=_c();return h.jsxs(h.Fragment,{children:[h.jsxs(Wu,{children:[h.jsx(An,{right:h.jsx(Nn,{href:n.routes.settings,children:h.jsx(ft,{Icon:_h})}),children:"Auth"}),h.jsx(Zn,{initialOffset:96,children:h.jsx("div",{className:"flex flex-col flex-grow p-3 gap-3",children:h.jsxs("nav",{className:"flex flex-col flex-1 gap-1",children:[h.jsx(oo,{as:Nn,href:"/",children:"Overview"}),h.jsxs(oo,{as:Nn,href:n.routes.listUsers,disabled:!t.enabled,className:"justify-between",children:["Users",!t.enabled&&h.jsx(Vp,{title:"Auth is not enabled."})]}),h.jsxs(oo,{as:Nn,href:st.auth.roles.list(),disabled:!t.enabled,className:"justify-between",children:["Roles & Permissions",t.enabled?n.roles.none?h.jsx(Vp,{title:"No roles defined."}):n.roles.has_admin?null:h.jsx(Vp,{title:"No admin role defined."}):h.jsx(Vp,{title:"Auth is not enabled."})]}),h.jsxs(oo,{as:Nn,href:st.auth.strategies(),disabled:!t.enabled,className:"justify-between",children:["Strategies",!t.enabled&&h.jsx(Vp,{title:"Auth is not enabled."})]}),h.jsx(oo,{as:Nn,href:st.auth.settings(),className:"justify-between",children:"Settings"})]})})})]}),h.jsx(ry,{children:e})]})}const Vp=({title:e})=>h.jsx(Hw.Warning,{title:e,className:"size-5 pointer-events-auto"}),qw=({visible:e=!0,title:t,message:n,className:r,children:o,...i})=>e?h.jsx("div",{...i,className:Be("flex flex-row items-center p-4",r),children:h.jsxs("p",{children:[t&&h.jsxs("b",{children:[t,": "]}),n||o]})}):null,rEe=({className:e,...t})=>h.jsx(qw,{...t,className:Be("bg-warning text-warning-foreground",e)}),oEe=({className:e,...t})=>h.jsx(qw,{...t,className:Be("bg-error text-error-foreground",e)}),iEe=({className:e,...t})=>h.jsx(qw,{...t,className:Be("bg-success text-success-foreground",e)}),sEe=({className:e,...t})=>h.jsx(qw,{...t,className:Be("bg-info text-info-foreground",e)}),ai={Warning:rEe,Exception:oEe,Success:iEe,Info:sEe};function aEe(){const{app:e}=ot(),{config:{roles:t,strategies:n,entity_name:r,enabled:o}}=_c(),i=r,a=Zg(y=>y.data.count(i),{enabled:o}).data?.count??0,c=Object.keys(t??{}).length??0,u=Object.keys(n??{}).length??0,f=e.getAbsolutePath("/data/"+st.data.entity.list(i)),p=st.auth.roles.list(),g=st.auth.strategies();return h.jsxs(h.Fragment,{children:[h.jsx(An,{children:"Overview"}),h.jsxs(Zn,{children:[h.jsx(ai.Warning,{visible:!o,title:"Auth not enabled",message:"To use authentication features, please enable it in the settings."}),h.jsxs("div",{className:"flex flex-col md:flex-row flex-1 p-3 gap-3",children:[h.jsxs("div",{className:"flex flex-col border border-primary/20 self-stretch md:self-start",children:[h.jsxs("div",{className:"flex flex-row gap-3 py-3 px-4 border-b border-b-muted font-medium bg-muted items-center justify-between",children:["Getting started",h.jsx(BV,{className:"size-5"})]}),h.jsx(lb,{title:"Enable authentication",done:o,to:st.auth.settings()}),h.jsx(lb,{title:"Create Roles",done:c>0,to:p}),h.jsx(lb,{title:"Create an user",done:a>0,to:f}),h.jsx(lb,{title:"Enable a second strategy",done:u>1,to:g})]}),h.jsxs("div",{className:"grid xs:grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 gap-5 flex-grow",children:[h.jsx(X2,{title:"Users registered",value:o?a:0,actions:[{label:"View all",href:f},{label:"Add new",variant:"default",href:f}]}),h.jsx(X2,{title:"Roles",value:o?c:0,actions:[{label:"View all",href:p},{label:"Manage",variant:"default",href:p}]}),h.jsx(X2,{title:"Strategies enabled",value:o?u:0,actions:[{label:"View all",href:g},{label:"Manage",variant:"default",href:g}]})]})]})]})]})}const X2=({title:e,value:t,actions:n})=>h.jsxs("div",{className:"flex flex-col border border-muted h-auto self-start",children:[h.jsxs("div",{className:"flex flex-col gap-2 px-5 pt-3.5 pb-4 border-b border-b-muted",children:[h.jsx("div",{children:h.jsx("span",{className:"opacity-50",children:e})}),h.jsx("div",{className:"text-4xl font-medium",children:t})]}),h.jsx("div",{className:"flex flex-row gap-3 p-3 justify-between",children:n.map((r,o)=>h.jsx(dC,{size:"small",variant:"ghost",href:"#",...r,children:r.label},o))})]}),lb=({title:e,done:t=!1,to:n})=>{const[r]=Pn();return h.jsx("div",{className:"flex border-b border-b-muted",children:h.jsxs("div",{className:pn("flex flex-1 flex-row gap-3 py-3 px-4",t&&"opacity-50"),children:[h.jsxs("div",{className:"flex flex-row flex-1 gap-3 items-center",children:[t?h.jsx(J1e,{className:"size-5"}):h.jsx(hSe,{className:"size-5"}),h.jsx("p",{className:pn("font-medium text-primary/80 leading-none",t?"line-through":""),children:e})]}),n&&h.jsx(ft,{Icon:Z1e,onClick:()=>r(n)})]})})},eT=w.createContext(null);eT.displayName="@mantine/modals/ModalsContext";function lEe(){const e=w.useContext(eT);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}function cEe({id:e,cancelProps:t,confirmProps:n,labels:r={cancel:"",confirm:""},closeOnConfirm:o=!0,closeOnCancel:i=!0,groupProps:s,onCancel:a,onConfirm:c,children:u}){const{cancel:f,confirm:p}=r,g=lEe(),y=x=>{typeof t?.onClick=="function"&&t?.onClick(x),typeof a=="function"&&a(),i&&g.closeModal(e)},v=x=>{typeof n?.onClick=="function"&&n?.onClick(x),typeof c=="function"&&c(),o&&g.closeModal(e)};return h.jsxs(h.Fragment,{children:[u&&h.jsx(Fe,{mb:"md",children:u}),h.jsxs(qO,{mt:u?0:"md",justify:"flex-end",...s,children:[h.jsx(Nu,{variant:"default",...t,onClick:y,children:t?.children||f}),h.jsx(Nu,{...n,onClick:v,children:n?.children||p})]})]})}const[uEe,tT]=$X("mantine-modals"),dEe=e=>{const t=e.modalId||Yl();return tT("openContextModal")({...e,modalId:t}),t},fEe=tT("closeModal"),hEe=tT("closeAllModals"),JV={closeAll:hEe};function oP(e,t){t&&e.type==="confirm"&&e.props.onCancel?.(),e.props.onClose?.()}function pEe(e,t){switch(t.type){case"OPEN":return{current:t.modal,modals:[...e.modals,t.modal]};case"CLOSE":{const n=e.modals.find(o=>o.id===t.modalId);if(!n)return e;oP(n,t.canceled);const r=e.modals.filter(o=>o.id!==t.modalId);return{current:r[r.length-1]||e.current,modals:r}}case"CLOSE_ALL":return e.modals.length?(e.modals.concat().reverse().forEach(n=>{oP(n,t.canceled)}),{current:e.current,modals:[]}):e;case"UPDATE":{const{modalId:n,newProps:r}=t,o=e.modals.map(s=>s.id!==n?s:s.type==="content"||s.type==="confirm"?{...s,props:{...s.props,...r}}:s.type==="context"?{...s,props:{...s.props,...r,innerProps:{...s.props.innerProps,...r.innerProps}}}:s),i=e.current?.id===n&&o.find(s=>s.id===n)||e.current;return{...e,modals:o,current:i}}default:return e}}function mEe(e){if(!e)return{confirmProps:{},modalProps:{}};const{id:t,children:n,onCancel:r,onConfirm:o,closeOnConfirm:i,closeOnCancel:s,cancelProps:a,confirmProps:c,groupProps:u,labels:f,...p}=e;return{confirmProps:{id:t,children:n,onCancel:r,onConfirm:o,closeOnConfirm:i,closeOnCancel:s,cancelProps:a,confirmProps:c,groupProps:u,labels:f},modalProps:{id:t,...p}}}function gEe({children:e,modalProps:t,labels:n,modals:r}){const[o,i]=w.useReducer(pEe,{modals:[],current:null}),s=w.useRef(o);s.current=o;const a=w.useCallback(C=>{i({type:"CLOSE_ALL",canceled:C})},[s,i]),c=w.useCallback(({modalId:C,..._})=>{const j=C||Yl();return i({type:"OPEN",modal:{id:j,type:"content",props:_}}),j},[i]),u=w.useCallback(({modalId:C,..._})=>{const j=C||Yl();return i({type:"OPEN",modal:{id:j,type:"confirm",props:_}}),j},[i]),f=w.useCallback((C,{modalId:_,...j})=>{const A=_||Yl();return i({type:"OPEN",modal:{id:A,type:"context",props:j,ctx:C}}),A},[i]),p=w.useCallback((C,_)=>{i({type:"CLOSE",modalId:C,canceled:_})},[s,i]),g=w.useCallback(({modalId:C,..._})=>{i({type:"UPDATE",modalId:C,newProps:_})},[i]),y=w.useCallback(({modalId:C,..._})=>{i({type:"UPDATE",modalId:C,newProps:_})},[i]);uEe({openModal:c,openConfirmModal:u,openContextModal:({modal:C,..._})=>f(C,_),closeModal:p,closeContextModal:p,closeAllModals:a,updateModal:g,updateContextModal:y});const v={modalProps:t||{},modals:o.modals,openModal:c,openConfirmModal:u,openContextModal:f,closeModal:p,closeContextModal:p,closeAll:a,updateModal:g,updateContextModal:y},x=()=>{const C=s.current.current;switch(C?.type){case"context":{const{innerProps:_,...j}=C.props,A=r[C.ctx];return{modalProps:j,content:h.jsx(A,{innerProps:_,context:v,id:C.id})}}case"confirm":{const{modalProps:_,confirmProps:j}=mEe(C.props);return{modalProps:_,content:h.jsx(cEe,{...j,id:C.id,labels:C.props.labels||n})}}case"content":{const{children:_,...j}=C.props;return{modalProps:j,content:_}}default:return{modalProps:{},content:null}}},{modalProps:S,content:E}=x();return h.jsxs(eT.Provider,{value:v,children:[h.jsx(Bo,{zIndex:ts("modal")+1,...t,...S,opened:o.modals.length>0,onClose:()=>p(o.current?.id),children:E}),e]})}function nT({context:e,id:t,innerProps:{content:n}}){return n}nT.defaultTitle=void 0;nT.modalProps={withCloseButton:!1,classNames:{size:"md",root:"bknd-admin",content:"text-center justify-center",title:"font-bold !text-md",body:"py-3 px-5 gap-4 flex flex-col"}};const yEe=e=>typeof e=="boolean"||e instanceof Boolean,bEe=e=>typeof e=="number"||e instanceof Number,vEe=e=>typeof e=="bigint"||e instanceof BigInt,YV=e=>!!e&&e instanceof Date,xEe=e=>typeof e=="string"||e instanceof String,wEe=e=>Array.isArray(e),KV=e=>typeof e=="object"&&e!==null,XV=e=>!!e&&e instanceof Object&&typeof e=="function";function Fv(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function SEe(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function QV(e){let{field:t,value:n,data:r,lastElement:o,openBracket:i,closeBracket:s,level:a,style:c,shouldExpandNode:u,clickToExpandNode:f,outerRef:p,beforeExpandChange:g}=e;const y=w.useRef(!1),[v,x]=w.useState(()=>u(a,n,t)),S=w.useRef(null);w.useEffect(()=>{y.current?x(u(a,n,t)):y.current=!0},[u]);const E=w.useId();if(r.length===0)return EEe({field:t,openBracket:i,closeBracket:s,lastElement:o,style:c});const C=v?c.collapseIcon:c.expandIcon,_=v?c.ariaLables.collapseJson:c.ariaLables.expandJson,j=a+1,A=r.length-1,T=V=>{v!==V&&(!g||g({level:a,value:n,field:t,newExpandValue:V}))&&x(V)},k=V=>{if(V.key==="ArrowRight"||V.key==="ArrowLeft")V.preventDefault(),T(V.key==="ArrowRight");else if(V.key==="ArrowUp"||V.key==="ArrowDown"){V.preventDefault();const H=V.key==="ArrowUp"?-1:1;if(!p.current)return;const F=p.current.querySelectorAll("[role=button]");let B=-1;for(let M=0;M{var V;T(!v);const H=S.current;if(!H)return;const F=(V=p.current)===null||V===void 0?void 0:V.querySelector('[role=button][tabindex="0"]');F&&(F.tabIndex=-1),H.tabIndex=0,H.focus()};return w.createElement("div",{className:c.basicChildStyle,role:"treeitem","aria-expanded":v,"aria-selected":void 0},w.createElement("span",{className:C,onClick:R,onKeyDown:k,role:"button","aria-label":_,"aria-expanded":v,"aria-controls":v?E:void 0,ref:S,tabIndex:a===0?0:-1}),(t||t==="")&&(f?w.createElement("span",{className:c.clickableLabel,onClick:R,onKeyDown:k},Fv(t,c.quotesForFieldNames),":"):w.createElement("span",{className:c.label},Fv(t,c.quotesForFieldNames),":")),w.createElement("span",{className:c.punctuation},i),v?w.createElement("ul",{id:E,role:"group",className:c.childFieldsContainer},r.map((V,H)=>w.createElement(pC,{key:V[0]||H,field:V[0],value:V[1],style:c,lastElement:H===A,level:j,shouldExpandNode:u,clickToExpandNode:f,beforeExpandChange:g,outerRef:p}))):w.createElement("span",{className:c.collapsedContent,onClick:R,onKeyDown:k}),w.createElement("span",{className:c.punctuation},s),!o&&w.createElement("span",{className:c.punctuation},","))}function EEe(e){let{field:t,openBracket:n,closeBracket:r,lastElement:o,style:i}=e;return w.createElement("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&w.createElement("span",{className:i.label},Fv(t,i.quotesForFieldNames),":"),w.createElement("span",{className:i.punctuation},n),w.createElement("span",{className:i.punctuation},r),!o&&w.createElement("span",{className:i.punctuation},","))}function NEe(e){let{field:t,value:n,style:r,lastElement:o,shouldExpandNode:i,clickToExpandNode:s,level:a,outerRef:c,beforeExpandChange:u}=e;return QV({field:t,value:n,lastElement:o||!1,level:a,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:i,clickToExpandNode:s,data:Object.keys(n).map(f=>[f,n[f]]),outerRef:c,beforeExpandChange:u})}function _Ee(e){let{field:t,value:n,style:r,lastElement:o,level:i,shouldExpandNode:s,clickToExpandNode:a,outerRef:c,beforeExpandChange:u}=e;return QV({field:t,value:n,lastElement:o||!1,level:i,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:s,clickToExpandNode:a,data:n.map(f=>[void 0,f]),outerRef:c,beforeExpandChange:u})}function CEe(e){let{field:t,value:n,style:r,lastElement:o}=e,i,s=r.otherValue;return n===null?(i="null",s=r.nullValue):n===void 0?(i="undefined",s=r.undefinedValue):xEe(n)?(i=SEe(n,!r.noQuotesForStringValues,r.stringifyStringValues),s=r.stringValue):yEe(n)?(i=n?"true":"false",s=r.booleanValue):bEe(n)?(i=n.toString(),s=r.numberValue):vEe(n)?(i=`${n.toString()}n`,s=r.numberValue):YV(n)?i=n.toISOString():XV(n)?i="function() { }":i=n.toString(),w.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&w.createElement("span",{className:r.label},Fv(t,r.quotesForFieldNames),":"),w.createElement("span",{className:s},i),!o&&w.createElement("span",{className:r.punctuation},","))}function pC(e){const t=e.value;return wEe(t)?w.createElement(_Ee,Object.assign({},e)):KV(t)&&!YV(t)&&!XV(t)?w.createElement(NEe,Object.assign({},e)):w.createElement(CEe,Object.assign({},e))}var Ar={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti"};const OEe={collapseJson:"collapse JSON",expandJson:"expand JSON"},Q2={container:Ar["container-light"],basicChildStyle:Ar["basic-element-style"],childFieldsContainer:Ar["child-fields-container"],label:Ar["label-light"],clickableLabel:Ar["clickable-label-light"],nullValue:Ar["value-null-light"],undefinedValue:Ar["value-undefined-light"],stringValue:Ar["value-string-light"],booleanValue:Ar["value-boolean-light"],numberValue:Ar["value-number-light"],otherValue:Ar["value-other-light"],punctuation:Ar["punctuation-light"],collapseIcon:Ar["collapse-icon-light"],expandIcon:Ar["expand-icon-light"],collapsedContent:Ar["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:OEe,stringifyStringValues:!1},jEe=()=>!0,AEe=e=>{let{data:t,style:n=Q2,shouldExpandNode:r=jEe,clickToExpandNode:o=!1,beforeExpandChange:i,compactTopLevel:s,...a}=e;const c=w.useRef(null);return w.createElement("div",Object.assign({"aria-label":"JSON view"},a,{className:n.container,ref:c,role:"tree"}),s&&KV(t)?Object.entries(t).map(u=>{let[f,p]=u;return w.createElement(pC,{key:f,field:f,value:p,style:{...Q2,...n},lastElement:!0,level:1,shouldExpandNode:r,clickToExpandNode:o,beforeExpandChange:i,outerRef:c})}):w.createElement(pC,{value:t,style:{...Q2,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:o,outerRef:c,beforeExpandChange:i}))};let Ch=class extends w.Component{constructor(t){super(t),this.state={hasError:!1,error:void 0}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){const r=this.props.suppressError?"warn":"error";console[r]("ErrorBoundary caught an error:",t,n)}resetError=()=>{this.setState({hasError:!1,error:void 0})};renderFallback(){return this.props.fallback?typeof this.props.fallback=="function"?this.props.fallback({error:this.state.error,resetError:this.resetError}):h.jsx(iP,{children:this.props.fallback}):h.jsx(iP,{children:this.state.error?.message??"Unknown error"})}render(){if(this.state.hasError)return this.renderFallback();if(this.props.suppressError)try{return this.props.children}catch{return this.renderFallback()}return this.props.children}};const iP=({children:e})=>h.jsx("div",{className:"bg-red-700 text-white py-1 px-2 rounded-md leading-tight font-mono",children:e}),TEe={basicChildStyle:"pl-5 ml-1 border-l border-muted hover:border-primary/20",container:"ml-[-10px]",label:"text-primary/90 font-bold font-mono mr-2",stringValue:"text-emerald-600 dark:text-emerald-500 font-mono select-text text-wrap whitespace-wrap break-words",numberValue:"text-sky-500 dark:text-sky-400 font-mono select-text",nullValue:"text-zinc-400 font-mono",undefinedValue:"text-zinc-400 font-mono",otherValue:"text-zinc-400 font-mono",booleanValue:"text-orange-500 dark:text-orange-400 font-mono",punctuation:"text-zinc-400 font-bold font-mono m-0.5",collapsedContent:"text-zinc-400 font-mono after:content-['...']",collapseIcon:"text-zinc-400 font-mono font-bold text-lg after:content-['▾'] mr-1.5",expandIcon:"text-zinc-400 font-mono font-bold text-lg after:content-['▸'] mr-1.5",noQuotesForStringValues:!1},Vr=({json:e,title:t,expand:n=0,showSize:r=!1,showCopy:o=!1,copyIconProps:i={},className:s})=>{const a=r?e?JSON.stringify(e).length:0:void 0,c=rw.fileSize(a??0),u=a||t||o;function f(){navigator.clipboard?.writeText(JSON.stringify(e,null,2))}return h.jsxs("div",{className:Be("bg-primary/5 py-3 relative overflow-hidden",s),children:[u&&h.jsxs("div",{className:"absolute right-4 top-3 font-mono text-zinc-400 flex flex-row gap-2 items-center",children:[(t||a!==void 0)&&h.jsxs("div",{className:"flex flex-row",children:[t&&h.jsx("span",{children:t})," ",a!==void 0&&h.jsxs("span",{children:["(",c,")"]})]}),o&&h.jsx("div",{children:h.jsx(ft,{Icon:LV,onClick:f,...i})})]}),h.jsx(Ch,{children:h.jsx(AEe,{data:e,shouldExpandNode:p=>p{const r=Object.fromEntries(Object.entries(e).filter(([s,a])=>a.enabled!==!1)),[o,i]=w.useState(t.selected??Object.keys(r)[0]);return w.useImperativeHandle(n,()=>({setSelected:i})),h.jsxs("div",{className:"flex flex-col bg-primary/5 rounded-md flex-shrink-0",children:[h.jsx("div",{className:"flex flex-row gap-4 border-b px-3 border-primary/10 min-w-0",children:Object.keys(r).map(s=>h.jsx("button",{type:"button",className:Be("flex flex-row text-sm cursor-pointer py-3 pt-3.5 px-1 border-b border-transparent -mb-px transition-opacity flex-shrink-0",o===s?"border-primary":"opacity-50 hover:opacity-70"),onClick:()=>i(s),children:h.jsx("span",{className:"font-mono leading-none truncate",children:s})},s))}),h.jsx(Vr,{className:"bg-transparent overflow-x-auto",...t,...r[o],title:void 0})]})}),REe=w.forwardRef(({classNames:e,children:t,opened:n,closeOnClickOutside:r=!1,...o},i)=>{const[s,{open:a,close:c}]=oh(n);return w.useImperativeHandle(i,()=>({open:a,close:c})),h.jsx(Bo,{withCloseButton:!1,padding:0,size:"xl",opened:s,...o,closeOnClickOutside:r,onClose:c,classNames:{...e,root:"bknd-admin",content:"rounded-lg select-none"},children:t})}),Zc=({path:e,onClose:t})=>h.jsxs("div",{className:"py-3 px-5 font-bold bg-lightest flex flex-row justify-between items-center sticky top-0 left-0 right-0 z-10 border-none",children:[h.jsx("div",{className:"flex flex-row gap-1",children:e.map((n,r)=>{const o=r+1===e.length;return h.jsxs(w.Fragment,{children:[h.jsx("span",{className:Be("",!o&&"opacity-70"),children:n},r),!o&&h.jsx("span",{className:"opacity-40",children:"/"})]},r)})}),h.jsx(ft,{Icon:QA,onClick:t})]}),Gu=({children:e,className:t})=>h.jsxs(SV,{className:Be("flex flex-col min-h-96",t),style:{maxHeight:"calc(80vh)"},children:[h.jsx(EV,{className:"w-full h-full",children:h.jsx("div",{className:"py-3 px-5 gap-4 flex flex-col",children:e})}),h.jsx(Pv,{forceMount:!0,className:"flex select-none touch-none bg-transparent w-0.5",orientation:"vertical",children:h.jsx(Dv,{className:"flex-1 bg-primary/50"})}),h.jsx(Pv,{forceMount:!0,className:"flex select-none touch-none bg-muted flex-col h-0.5",orientation:"horizontal",children:h.jsx(Dv,{className:"flex-1 bg-primary/50 "})})]}),Ju=({next:e,prev:t,nextLabel:n="Next",prevLabel:r="Back",debug:o})=>{const[i,s]=oh(!1);return h.jsx("div",{className:"flex flex-col border-t border-t-muted",children:h.jsxs("div",{className:"flex flex-row justify-between items-center py-3 px-4",children:[h.jsx("div",{children:o&&h.jsxs(co,{position:"right-start",shadow:"md",opened:i,classNames:{dropdown:"!px-1 !pr-2.5 !py-2 text-sm"},children:[h.jsx(co.Target,{children:h.jsx(ft,{onClick:s.toggle,Icon:TB,variant:i?"default":"ghost"})}),h.jsx(co.Dropdown,{children:h.jsx(Vr,{json:o,expand:6,className:"p-0"})})]})}),h.jsxs("div",{className:"flex flex-row gap-2",children:[h.jsx(Xe,{className:"w-24 justify-center",...t,children:r}),h.jsx(Xe,{className:"w-24 justify-center",variant:"primary",...e,children:n})]})]})})},ZV=w.createContext(void 0);function eU({children:e,initialPath:t=[],initialState:n={},lastBack:r}){const[o,i]=w.useState(n),[s,a]=w.useState(t),c=w.Children.toArray(e).filter(g=>g.props.disabled!==!0);function u(){s.length===0?r?.():a(g=>g.slice(0,-1))}const f=g=>()=>{a(y=>[...y,g])},p=c.find(g=>g.props.id===s[s.length-1])||c[0];return h.jsx(ZV.Provider,{value:{nextStep:f,stepBack:u,state:o,path:s,setState:i,close:r},children:p})}function Yu(){return w.useContext(ZV)}function eu({children:e,disabled:t=!1,path:n=[],id:r,...o}){return h.jsx("div",{...o,children:e})}function Ho(){const{config:e,app:t,schema:n,actions:r}=ot(),o=Vt(e.data.entities??{},(a,c)=>NA(c,a)),i={entity:{add:async(a,c)=>{const u=Cn(SA,c,{skipMark:!0,forceParse:!0});return await r.add("data",`entities.${a}`,u)},patch:a=>{if(!o[a])throw new Error(`Entity "${a}" not found`);return{config:async u=>await r.overwrite("data",`entities.${a}.config`,u),fields:MEe(r,a)}}},relations:{add:async a=>{const c=crypto.randomUUID(),u=Cn(Rt(EA),a,{skipMark:!0,forceParse:!0});return await r.add("data",`relations.${c}`,u)}}};return{$data:{entity:a=>o[a],modals:kEe,system:a=>({any:o[a]?.type==="system",users:a===e.auth.entity_name,media:a===e.media.entity_name})},entities:o,relations:t.relations,config:e.data,schema:n.data,actions:i}}const kEe={createAny:()=>vr.open(vr.ids.dataCreate,{}),createEntity:()=>vr.open(vr.ids.dataCreate,{initialPath:["entities","entity"],initialState:{action:"entity"}}),createRelation:e=>vr.open(vr.ids.dataCreate,{initialPath:["entities","relation"],initialState:{action:"relation",relations:{create:[{source:e,type:"n:1"}]}}}),createMedia:e=>vr.open(vr.ids.dataCreate,{initialPath:["entities","template-media"],initialState:{action:"template-media",initial:{entity:e}}})};function MEe(e,t){return{add:async(n,r)=>{const o=Cn(wA,r,{skipMark:!0,forceParse:!0});return await e.add("data",`entities.${t}.fields.${n}`,o)},patch:()=>null,set:async n=>{try{const r=Cn(Yz,n,{skipMark:!0,forceParse:!0}),o=await e.overwrite("data",`entities.${t}.fields`,r)}catch(r){console.error("error",r),r instanceof yh?alert("Error updating fields: "+r.firstToString()):alert("An error occured, check console. There will be nice error handling soon.")}}}}function PEe(){const{stepBack:e,state:t,close:n}=Yu(),[r,o]=w.useState([]),[i,s]=w.useState(!1),a=Ho(),c=ot(),u=[];t.entities?.create&&u.push(...t.entities.create.map(p=>({action:"add",Icon:Ove,type:"Entity",name:p.name,json:p,run:async()=>await a.actions.entity.add(p.name,p)}))),t.fields?.create&&u.push(...t.fields.create.map(p=>({action:"add",Icon:IA,type:"Field",name:p.name,json:p,run:async()=>await a.actions.entity.patch(p.entity).fields.add(p.name,p.field)}))),t.relations?.create&&u.push(...t.relations.create.map(p=>({action:"add",Icon:LA,type:"Relation",name:`${p.source} -> ${p.target} (${p.type})`,json:p,run:async()=>await a.actions.relations.add(p)})));async function f(){s(!0);for(const p of u)try{const g=await p.run();if(o(y=>[...y,g]),g!==!0)break}catch(g){o(y=>[...y,g.message])}}return w.useEffect(()=>{console.log("states",r,u,r.length,u.length,r.every(p=>p===!0)),u.length===r.length&&r.every(p=>p===!0)?c.actions.reload().then(n):s(!1)},[r]),h.jsxs(h.Fragment,{children:[h.jsxs(Gu,{children:[h.jsx("div",{children:'This is what will be created. Please confirm by clicking "Next".'}),h.jsx("div",{className:"flex flex-col gap-1",children:u.map((p,g)=>h.jsx(DEe,{...p,state:r[g]},g))})]}),h.jsx(Ju,{nextLabel:"Create",next:{onClick:f,disabled:i},prev:{onClick:e,disabled:i},debug:{state:t}})]})}const DEe=({Icon:e,type:t,name:n,json:r,state:o,action:i,initialExpanded:s=!1})=>{const[a,c]=oh(s),u=typeof o<"u"&&o!==!0,f=o===!0;return h.jsxs("div",{className:Be("flex flex-col border border-muted rounded bg-background mb-2",u&&"bg-red-500/20",f&&"bg-green-500/20"),children:[h.jsxs("div",{className:"flex flex-row gap-4 px-2 py-2 items-center",children:[h.jsx("div",{className:"flex flex-row items-center p-1 bg-primary/5 rounded",children:h.jsx(e,{className:"w-6 h-6"})}),h.jsxs("div",{className:"flex flex-row flex-grow gap-5",children:[h.jsx(Z2,{type:"action",name:i}),h.jsx(Z2,{type:"type",name:t}),h.jsx(Z2,{type:"name",name:n})]}),r&&h.jsx(ft,{Icon:$B,variant:a?"default":"ghost",onClick:c.toggle})]}),r&&a&&h.jsx("div",{className:"flex flex-col border-t border-t-muted",children:h.jsx(Vr,{json:r,expand:8,className:"text-sm"})}),u&&typeof o=="string"&&h.jsx("div",{className:"text-sm text-red-500",children:o})]})},Z2=({type:e,name:t})=>h.jsxs("div",{className:"flex flex-row text-sm font-mono gap-2",children:[h.jsx("div",{className:"opacity-50",children:Io(e)}),h.jsx("div",{className:"font-semibold",children:t})]});var iy=e=>e.type==="checkbox",pu=e=>e instanceof Date,to=e=>e==null;const tU=e=>typeof e=="object";var Vn=e=>!to(e)&&!Array.isArray(e)&&tU(e)&&!pu(e),nU=e=>Vn(e)&&e.target?iy(e.target)?e.target.checked:e.target.value:e,IEe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,rU=(e,t)=>e.has(IEe(t)),LEe=e=>{const t=e.constructor&&e.constructor.prototype;return Vn(t)&&t.hasOwnProperty("isPrototypeOf")},rT=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function an(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(rT&&(e instanceof Blob||r))&&(n||Vn(e)))if(t=n?[]:Object.create(Object.getPrototypeOf(e)),!n&&!LEe(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=an(e[o]));else return e;return t}var Ww=e=>/^\w*$/.test(e),tn=e=>e===void 0,Gw=e=>Array.isArray(e)?e.filter(Boolean):[],oT=e=>Gw(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ie=(e,t,n)=>{if(!t||!Vn(e))return n;const r=(Ww(t)?[t]:oT(t)).reduce((o,i)=>to(o)?o:o[i],e);return tn(r)||r===e?tn(e[t])?n:e[t]:r},Ao=e=>typeof e=="boolean",Pt=(e,t,n)=>{let r=-1;const o=Ww(t)?[t]:oT(t),i=o.length,s=i-1;for(;++rNe.useContext(oU);var iU=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const s=i;return t._proxyFormState[s]!==si.all&&(t._proxyFormState[s]=!r||si.all),n&&(n[s]=!0),e[s]}});return o};const Yw=typeof window<"u"?Ne.useLayoutEffect:Ne.useEffect;function FEe(e){const t=Jw(),{control:n=t.control,disabled:r,name:o,exact:i}=e||{},[s,a]=Ne.useState(n._formState),c=Ne.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Yw(()=>n._subscribe({name:o,formState:c.current,exact:i,callback:u=>{!r&&a({...n._formState,...u})}}),[o,r,i]),Ne.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),Ne.useMemo(()=>iU(s,n,c.current,!1),[s,n])}var $o=e=>typeof e=="string",mC=(e,t,n,r,o)=>$o(e)?(r&&t.watch.add(e),Ie(n,e,o)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),Ie(n,i))):(r&&(t.watchAll=!0),n),gC=e=>to(e)||!tU(e);function Ii(e,t,n=new WeakSet){if(gC(e)||gC(t))return e===t;if(pu(e)&&pu(t))return e.getTime()===t.getTime();const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const i of r){const s=e[i];if(!o.includes(i))return!1;if(i!=="ref"){const a=t[i];if(pu(s)&&pu(a)||Vn(s)&&Vn(a)||Array.isArray(s)&&Array.isArray(a)?!Ii(s,a,n):s!==a)return!1}}return!0}function zEe(e){const t=Jw(),{control:n=t.control,name:r,defaultValue:o,disabled:i,exact:s,compute:a}=e||{},c=Ne.useRef(o),u=Ne.useRef(a),f=Ne.useRef(void 0),p=Ne.useRef(n),g=Ne.useRef(r);u.current=a;const[y,v]=Ne.useState(()=>{const j=n._getWatch(r,c.current);return u.current?u.current(j):j}),x=Ne.useCallback(j=>{const A=mC(r,n._names,j||n._formValues,!1,c.current);return u.current?u.current(A):A},[n._formValues,n._names,r]),S=Ne.useCallback(j=>{if(!i){const A=mC(r,n._names,j||n._formValues,!1,c.current);if(u.current){const T=u.current(A);Ii(T,f.current)||(v(T),f.current=T)}else v(A)}},[n._formValues,n._names,i,r]);Yw(()=>((p.current!==n||!Ii(g.current,r))&&(p.current=n,g.current=r,S()),n._subscribe({name:r,formState:{values:!0},exact:s,callback:j=>{S(j.values)}})),[n,s,r,S]),Ne.useEffect(()=>n._removeUnmounted());const E=p.current!==n,C=g.current,_=Ne.useMemo(()=>{if(i)return null;const j=!E&&!Ii(C,r);return E||j?x():null},[i,E,r,C,x]);return _!==null?_:y}function Oh(e){const t=Jw(),{name:n,disabled:r,control:o=t.control,shouldUnregister:i,defaultValue:s}=e,a=rU(o._names.array,n),c=Ne.useMemo(()=>Ie(o._formValues,n,Ie(o._defaultValues,n,s)),[o,n,s]),u=zEe({control:o,name:n,defaultValue:c,exact:!0}),f=FEe({control:o,name:n,exact:!0}),p=Ne.useRef(e),g=Ne.useRef(void 0),y=Ne.useRef(o.register(n,{...e.rules,value:u,...Ao(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const v=Ne.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ie(f.errors,n)},isDirty:{enumerable:!0,get:()=>!!Ie(f.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Ie(f.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Ie(f.validatingFields,n)},error:{enumerable:!0,get:()=>Ie(f.errors,n)}}),[f,n]),x=Ne.useCallback(_=>y.current.onChange({target:{value:nU(_),name:n},type:zv.CHANGE}),[n]),S=Ne.useCallback(()=>y.current.onBlur({target:{value:Ie(o._formValues,n),name:n},type:zv.BLUR}),[n,o._formValues]),E=Ne.useCallback(_=>{const j=Ie(o._fields,n);j&&_&&(j._f.ref={focus:()=>_.focus&&_.focus(),select:()=>_.select&&_.select(),setCustomValidity:A=>_.setCustomValidity(A),reportValidity:()=>_.reportValidity()})},[o._fields,n]),C=Ne.useMemo(()=>({name:n,value:u,...Ao(r)||f.disabled?{disabled:f.disabled||r}:{},onChange:x,onBlur:S,ref:E}),[n,r,f.disabled,x,S,E,u]);return Ne.useEffect(()=>{const _=o._options.shouldUnregister||i,j=g.current;j&&j!==n&&!a&&o.unregister(j),o.register(n,{...p.current.rules,...Ao(p.current.disabled)?{disabled:p.current.disabled}:{}});const A=(T,k)=>{const R=Ie(o._fields,T);R&&R._f&&(R._f.mount=k)};if(A(n,!0),_){const T=an(Ie(o._options.defaultValues,n,p.current.defaultValue));Pt(o._defaultValues,n,T),tn(Ie(o._formValues,n))&&Pt(o._formValues,n,T)}return!a&&o.register(n),g.current=n,()=>{(a?_&&!o._state.action:_)?o.unregister(n):A(n,!1)}},[n,o,a,i]),Ne.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),Ne.useMemo(()=>({field:C,formState:f,fieldState:v}),[C,f,v])}var BEe=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},so=e=>Array.isArray(e)?e:[e],sP=()=>{let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}};function sU(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],i=t[r];if(o&&Vn(o)&&i){const s=sU(o,i);Vn(s)&&(n[r]=s)}else e[r]&&(n[r]=i)}return n}var yr=e=>Vn(e)&&!Object.keys(e).length,iT=e=>e.type==="file",Li=e=>typeof e=="function",Bv=e=>{if(!rT)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},aU=e=>e.type==="select-multiple",sT=e=>e.type==="radio",VEe=e=>sT(e)||iy(e),eN=e=>Bv(e)&&e.isConnected;function UEe(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{for(const t in e)if(Li(e[t]))return!0;return!1};function lU(e){return Array.isArray(e)||Vn(e)&&!qEe(e)}function yC(e,t={}){for(const n in e)lU(e[n])?(t[n]=Array.isArray(e[n])?[]:{},yC(e[n],t[n])):tn(e[n])||(t[n]=!0);return t}function nf(e,t,n){n||(n=yC(t));for(const r in e)lU(e[r])?tn(t)||gC(n[r])?n[r]=yC(e[r],Array.isArray(e[r])?[]:{}):nf(e[r],to(t)?{}:t[r],n[r]):n[r]=!Ii(e[r],t[r]);return n}const aP={value:!1,isValid:!1},lP={value:!0,isValid:!0};var cU=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!tn(e[0].attributes.value)?tn(e[0].value)||e[0].value===""?lP:{value:e[0].value,isValid:!0}:lP:aP}return aP},uU=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>tn(e)?e:t?e===""?NaN:e&&+e:n&&$o(e)?new Date(e):r?r(e):e;const cP={isValid:!1,value:null};var dU=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,cP):cP;function uP(e){const t=e.ref;return iT(t)?t.files:sT(t)?dU(e.refs).value:aU(t)?[...t.selectedOptions].map(({value:n})=>n):iy(t)?cU(e.refs).value:uU(tn(t.value)?e.ref.value:t.value,e)}var WEe=(e,t,n,r)=>{const o={};for(const i of e){const s=Ie(t,i);s&&Pt(o,i,s._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},Vv=e=>e instanceof RegExp,Up=e=>tn(e)?e:Vv(e)?e.source:Vn(e)?Vv(e.value)?e.value.source:e.value:e,df=e=>({isOnSubmit:!e||e===si.onSubmit,isOnBlur:e===si.onBlur,isOnChange:e===si.onChange,isOnAll:e===si.all,isOnTouch:e===si.onTouched});const dP="AsyncFunction";var GEe=e=>!!e&&!!e.validate&&!!(Li(e.validate)&&e.validate.constructor.name===dP||Vn(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===dP)),JEe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),bC=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const bf=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const i=Ie(e,o);if(i){const{_f:s,...a}=i;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],o)&&!r)return!0;if(s.ref&&t(s.ref,s.name)&&!r)return!0;if(bf(a,t))break}else if(Vn(a)&&bf(a,t))break}}};function fP(e,t,n){const r=Ie(e,n);if(r||Ww(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),s=Ie(t,i),a=Ie(e,i);if(s&&!Array.isArray(s)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};if(a&&a.root&&a.root.type)return{name:`${i}.root`,error:a.root};o.pop()}return{name:n}}var YEe=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return yr(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(s=>t[s]===(!r||si.all))},KEe=(e,t,n)=>!e||!t||e===t||so(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),XEe=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,QEe=(e,t)=>!Gw(Ie(e,t)).length&&kn(e,t),fU=(e,t,n)=>{const r=so(Ie(e,n));return Pt(r,"root",t[n]),Pt(e,n,r),e};function hP(e,t,n="validate"){if($o(e)||Array.isArray(e)&&e.every($o)||Ao(e)&&!e)return{type:n,message:$o(e)?e:"",ref:t}}var Jd=e=>Vn(e)&&!Vv(e)?e:{value:e,message:""},vC=async(e,t,n,r,o,i)=>{const{ref:s,refs:a,required:c,maxLength:u,minLength:f,min:p,max:g,pattern:y,validate:v,name:x,valueAsNumber:S,mount:E}=e._f,C=Ie(n,x);if(!E||t.has(x))return{};const _=a?a[0]:s,j=B=>{o&&_.reportValidity&&(_.setCustomValidity(Ao(B)?"":B||""),_.reportValidity())},A={},T=sT(s),k=iy(s),R=T||k,V=(S||iT(s))&&tn(s.value)&&tn(C)||Bv(s)&&s.value===""||C===""||Array.isArray(C)&&!C.length,H=BEe.bind(null,x,r,A),F=(B,U,M,z=oa.maxLength,$=oa.minLength)=>{const L=B?U:M;A[x]={type:B?z:$,message:L,ref:s,...H(B?z:$,L)}};if(i?!Array.isArray(C)||!C.length:c&&(!R&&(V||to(C))||Ao(C)&&!C||k&&!cU(a).isValid||T&&!dU(a).isValid)){const{value:B,message:U}=$o(c)?{value:!!c,message:c}:Jd(c);if(B&&(A[x]={type:oa.required,message:U,ref:_,...H(oa.required,U)},!r))return j(U),A}if(!V&&(!to(p)||!to(g))){let B,U;const M=Jd(g),z=Jd(p);if(!to(C)&&!isNaN(C)){const $=s.valueAsNumber||C&&+C;to(M.value)||(B=$>M.value),to(z.value)||(U=$new Date(new Date().toDateString()+" "+Y),P=s.type=="time",q=s.type=="week";$o(M.value)&&C&&(B=P?L(C)>L(M.value):q?C>M.value:$>new Date(M.value)),$o(z.value)&&C&&(U=P?L(C)+B.value,z=!to(U.value)&&C.length<+U.value;if((M||z)&&(F(M,B.message,U.message),!r))return j(A[x].message),A}if(y&&!V&&$o(C)){const{value:B,message:U}=Jd(y);if(Vv(B)&&!C.match(B)&&(A[x]={type:oa.pattern,message:U,ref:s,...H(oa.pattern,U)},!r))return j(U),A}if(v){if(Li(v)){const B=await v(C,n),U=hP(B,_);if(U&&(A[x]={...U,...H(oa.validate,U.message)},!r))return j(U.message),A}else if(Vn(v)){let B={};for(const U in v){if(!yr(B)&&!r)break;const M=hP(await v[U](C,n),_,U);M&&(B={...M,...H(U,M.message)},j(M.message),r&&(A[x]=B))}if(!yr(B)&&(A[x]={ref:_,...B},!r))return A}}return j(!0),A};const ZEe={mode:si.onSubmit,reValidateMode:si.onChange,shouldFocusError:!0};function e2e(e={}){let t={...ZEe,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Li(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=Vn(t.defaultValues)||Vn(t.values)?an(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:an(o),s={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let p={...f};const g={array:sP(),state:sP()},y=t.criteriaMode===si.all,v=G=>re=>{clearTimeout(u),u=setTimeout(G,re)},x=async G=>{if(!t.disabled&&(f.isValid||p.isValid||G)){const re=t.resolver?yr((await k()).errors):await V(r,!0);re!==n.isValid&&g.state.next({isValid:re})}},S=(G,re)=>{!t.disabled&&(f.isValidating||f.validatingFields||p.isValidating||p.validatingFields)&&((G||Array.from(a.mount)).forEach(ne=>{ne&&(re?Pt(n.validatingFields,ne,re):kn(n.validatingFields,ne))}),g.state.next({validatingFields:n.validatingFields,isValidating:!yr(n.validatingFields)}))},E=(G,re=[],ne,ce,te=!0,Z=!0)=>{if(ce&&ne&&!t.disabled){if(s.action=!0,Z&&Array.isArray(Ie(r,G))){const de=ne(Ie(r,G),ce.argA,ce.argB);te&&Pt(r,G,de)}if(Z&&Array.isArray(Ie(n.errors,G))){const de=ne(Ie(n.errors,G),ce.argA,ce.argB);te&&Pt(n.errors,G,de),QEe(n.errors,G)}if((f.touchedFields||p.touchedFields)&&Z&&Array.isArray(Ie(n.touchedFields,G))){const de=ne(Ie(n.touchedFields,G),ce.argA,ce.argB);te&&Pt(n.touchedFields,G,de)}(f.dirtyFields||p.dirtyFields)&&(n.dirtyFields=nf(o,i)),g.state.next({name:G,isDirty:F(G,re),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Pt(i,G,re)},C=(G,re)=>{Pt(n.errors,G,re),g.state.next({errors:n.errors})},_=G=>{n.errors=G,g.state.next({errors:n.errors,isValid:!1})},j=(G,re,ne,ce)=>{const te=Ie(r,G);if(te){const Z=Ie(i,G,tn(ne)?Ie(o,G):ne);tn(Z)||ce&&ce.defaultChecked||re?Pt(i,G,re?Z:uP(te._f)):M(G,Z),s.mount&&x()}},A=(G,re,ne,ce,te)=>{let Z=!1,de=!1;const Te={name:G};if(!t.disabled){if(!ne||ce){(f.isDirty||p.isDirty)&&(de=n.isDirty,n.isDirty=Te.isDirty=F(),Z=de!==Te.isDirty);const $e=Ii(Ie(o,G),re);de=!!Ie(n.dirtyFields,G),$e?kn(n.dirtyFields,G):Pt(n.dirtyFields,G,!0),Te.dirtyFields=n.dirtyFields,Z=Z||(f.dirtyFields||p.dirtyFields)&&de!==!$e}if(ne){const $e=Ie(n.touchedFields,G);$e||(Pt(n.touchedFields,G,ne),Te.touchedFields=n.touchedFields,Z=Z||(f.touchedFields||p.touchedFields)&&$e!==ne)}Z&&te&&g.state.next(Te)}return Z?Te:{}},T=(G,re,ne,ce)=>{const te=Ie(n.errors,G),Z=(f.isValid||p.isValid)&&Ao(re)&&n.isValid!==re;if(t.delayError&&ne?(c=v(()=>C(G,ne)),c(t.delayError)):(clearTimeout(u),c=null,ne?Pt(n.errors,G,ne):kn(n.errors,G)),(ne?!Ii(te,ne):te)||!yr(ce)||Z){const de={...ce,...Z&&Ao(re)?{isValid:re}:{},errors:n.errors,name:G};n={...n,...de},g.state.next(de)}},k=async G=>{S(G,!0);const re=await t.resolver(i,t.context,WEe(G||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return S(G),re},R=async G=>{const{errors:re}=await k(G);if(G)for(const ne of G){const ce=Ie(re,ne);ce?Pt(n.errors,ne,ce):kn(n.errors,ne)}else n.errors=re;return re},V=async(G,re,ne={valid:!0})=>{for(const ce in G){const te=G[ce];if(te){const{_f:Z,...de}=te;if(Z){const Te=a.array.has(Z.name),$e=te._f&&GEe(te._f);$e&&f.validatingFields&&S([Z.name],!0);const Ke=await vC(te,a.disabled,i,y,t.shouldUseNativeValidation&&!re,Te);if($e&&f.validatingFields&&S([Z.name]),Ke[Z.name]&&(ne.valid=!1,re))break;!re&&(Ie(Ke,Z.name)?Te?fU(n.errors,Ke,Z.name):Pt(n.errors,Z.name,Ke[Z.name]):kn(n.errors,Z.name))}!yr(de)&&await V(de,re,ne)}}return ne.valid},H=()=>{for(const G of a.unMount){const re=Ie(r,G);re&&(re._f.refs?re._f.refs.every(ne=>!eN(ne)):!eN(re._f.ref))&&ue(G)}a.unMount=new Set},F=(G,re)=>!t.disabled&&(G&&re&&Pt(i,G,re),!Ii(Y(),o)),B=(G,re,ne)=>mC(G,a,{...s.mount?i:tn(re)?o:$o(G)?{[G]:re}:re},ne,re),U=G=>Gw(Ie(s.mount?i:o,G,t.shouldUnregister?Ie(o,G,[]):[])),M=(G,re,ne={})=>{const ce=Ie(r,G);let te=re;if(ce){const Z=ce._f;Z&&(!Z.disabled&&Pt(i,G,uU(re,Z)),te=Bv(Z.ref)&&to(re)?"":re,aU(Z.ref)?[...Z.ref.options].forEach(de=>de.selected=te.includes(de.value)):Z.refs?iy(Z.ref)?Z.refs.forEach(de=>{(!de.defaultChecked||!de.disabled)&&(Array.isArray(te)?de.checked=!!te.find(Te=>Te===de.value):de.checked=te===de.value||!!te)}):Z.refs.forEach(de=>de.checked=de.value===te):iT(Z.ref)?Z.ref.value="":(Z.ref.value=te,Z.ref.type||g.state.next({name:G,values:an(i)})))}(ne.shouldDirty||ne.shouldTouch)&&A(G,te,ne.shouldTouch,ne.shouldDirty,!0),ne.shouldValidate&&q(G)},z=(G,re,ne)=>{for(const ce in re){if(!re.hasOwnProperty(ce))return;const te=re[ce],Z=G+"."+ce,de=Ie(r,Z);(a.array.has(G)||Vn(te)||de&&!de._f)&&!pu(te)?z(Z,te,ne):M(Z,te,ne)}},$=(G,re,ne={})=>{const ce=Ie(r,G),te=a.array.has(G),Z=an(re);Pt(i,G,Z),te?(g.array.next({name:G,values:an(i)}),(f.isDirty||f.dirtyFields||p.isDirty||p.dirtyFields)&&ne.shouldDirty&&g.state.next({name:G,dirtyFields:nf(o,i),isDirty:F(G,Z)})):ce&&!ce._f&&!to(Z)?z(G,Z,ne):M(G,Z,ne),bC(G,a)&&g.state.next({...n,name:G}),g.state.next({name:s.mount?G:void 0,values:an(i)})},L=async G=>{s.mount=!0;const re=G.target;let ne=re.name,ce=!0;const te=Ie(r,ne),Z=$e=>{ce=Number.isNaN($e)||pu($e)&&isNaN($e.getTime())||Ii($e,Ie(i,ne,$e))},de=df(t.mode),Te=df(t.reValidateMode);if(te){let $e,Ke;const At=re.type?uP(te._f):nU(G),yn=G.type===zv.BLUR||G.type===zv.FOCUS_OUT,ls=!JEe(te._f)&&!t.resolver&&!Ie(n.errors,ne)&&!te._f.deps||XEe(yn,Ie(n.touchedFields,ne),n.isSubmitted,Te,de),pr=bC(ne,a,yn);Pt(i,ne,At),yn?(!re||!re.readOnly)&&(te._f.onBlur&&te._f.onBlur(G),c&&c(0)):te._f.onChange&&te._f.onChange(G);const dn=A(ne,At,yn),Ut=!yr(dn)||pr;if(!yn&&g.state.next({name:ne,type:G.type,values:an(i)}),ls)return(f.isValid||p.isValid)&&(t.mode==="onBlur"?yn&&x():yn||x()),Ut&&g.state.next({name:ne,...pr?{}:dn});if(!yn&&pr&&g.state.next({...n}),t.resolver){const{errors:nn}=await k([ne]);if(Z(At),ce){const qo=fP(n.errors,r,ne),cs=fP(nn,r,qo.name||ne);$e=cs.error,ne=cs.name,Ke=yr(nn)}}else S([ne],!0),$e=(await vC(te,a.disabled,i,y,t.shouldUseNativeValidation))[ne],S([ne]),Z(At),ce&&($e?Ke=!1:(f.isValid||p.isValid)&&(Ke=await V(r,!0)));ce&&(te._f.deps&&(!Array.isArray(te._f.deps)||te._f.deps.length>0)&&q(te._f.deps),T(ne,Ke,$e,dn))}},P=(G,re)=>{if(Ie(n.errors,re)&&G.focus)return G.focus(),1},q=async(G,re={})=>{let ne,ce;const te=so(G);if(t.resolver){const Z=await R(tn(G)?G:te);ne=yr(Z),ce=G?!te.some(de=>Ie(Z,de)):ne}else G?(ce=(await Promise.all(te.map(async Z=>{const de=Ie(r,Z);return await V(de&&de._f?{[Z]:de}:de)}))).every(Boolean),!(!ce&&!n.isValid)&&x()):ce=ne=await V(r);return g.state.next({...!$o(G)||(f.isValid||p.isValid)&&ne!==n.isValid?{}:{name:G},...t.resolver||!G?{isValid:ne}:{},errors:n.errors}),re.shouldFocus&&!ce&&bf(r,P,G?te:a.mount),ce},Y=(G,re)=>{let ne={...s.mount?i:o};return re&&(ne=sU(re.dirtyFields?n.dirtyFields:n.touchedFields,ne)),tn(G)?ne:$o(G)?Ie(ne,G):G.map(ce=>Ie(ne,ce))},D=(G,re)=>({invalid:!!Ie((re||n).errors,G),isDirty:!!Ie((re||n).dirtyFields,G),error:Ie((re||n).errors,G),isValidating:!!Ie(n.validatingFields,G),isTouched:!!Ie((re||n).touchedFields,G)}),W=G=>{G&&so(G).forEach(re=>kn(n.errors,re)),g.state.next({errors:G?n.errors:{}})},K=(G,re,ne)=>{const ce=(Ie(r,G,{_f:{}})._f||{}).ref,te=Ie(n.errors,G)||{},{ref:Z,message:de,type:Te,...$e}=te;Pt(n.errors,G,{...$e,...re,ref:ce}),g.state.next({name:G,errors:n.errors,isValid:!1}),ne&&ne.shouldFocus&&ce&&ce.focus&&ce.focus()},Q=(G,re)=>Li(G)?g.state.subscribe({next:ne=>"values"in ne&&G(B(void 0,re),ne)}):B(G,re,!0),ie=G=>g.state.subscribe({next:re=>{KEe(G.name,re.name,G.exact)&&YEe(re,G.formState||f,ve,G.reRenderRoot)&&G.callback({values:{...i},...n,...re,defaultValues:o})}}).unsubscribe,pe=G=>(s.mount=!0,p={...p,...G.formState},ie({...G,formState:p})),ue=(G,re={})=>{for(const ne of G?so(G):a.mount)a.mount.delete(ne),a.array.delete(ne),re.keepValue||(kn(r,ne),kn(i,ne)),!re.keepError&&kn(n.errors,ne),!re.keepDirty&&kn(n.dirtyFields,ne),!re.keepTouched&&kn(n.touchedFields,ne),!re.keepIsValidating&&kn(n.validatingFields,ne),!t.shouldUnregister&&!re.keepDefaultValue&&kn(o,ne);g.state.next({values:an(i)}),g.state.next({...n,...re.keepDirty?{isDirty:F()}:{}}),!re.keepIsValid&&x()},se=({disabled:G,name:re})=>{(Ao(G)&&s.mount||G||a.disabled.has(re))&&(G?a.disabled.add(re):a.disabled.delete(re))},me=(G,re={})=>{let ne=Ie(r,G);const ce=Ao(re.disabled)||Ao(t.disabled);return Pt(r,G,{...ne||{},_f:{...ne&&ne._f?ne._f:{ref:{name:G}},name:G,mount:!0,...re}}),a.mount.add(G),ne?se({disabled:Ao(re.disabled)?re.disabled:t.disabled,name:G}):j(G,!0,re.value),{...ce?{disabled:re.disabled||t.disabled}:{},...t.progressive?{required:!!re.required,min:Up(re.min),max:Up(re.max),minLength:Up(re.minLength),maxLength:Up(re.maxLength),pattern:Up(re.pattern)}:{},name:G,onChange:L,onBlur:L,ref:te=>{if(te){me(G,re),ne=Ie(r,G);const Z=tn(te.value)&&te.querySelectorAll&&te.querySelectorAll("input,select,textarea")[0]||te,de=VEe(Z),Te=ne._f.refs||[];if(de?Te.find($e=>$e===Z):Z===ne._f.ref)return;Pt(r,G,{_f:{...ne._f,...de?{refs:[...Te.filter(eN),Z,...Array.isArray(Ie(o,G))?[{}]:[]],ref:{type:Z.type,name:G}}:{ref:Z}}}),j(G,!1,void 0,Z)}else ne=Ie(r,G,{}),ne._f&&(ne._f.mount=!1),(t.shouldUnregister||re.shouldUnregister)&&!(rU(a.array,G)&&s.action)&&a.unMount.add(G)}}},xe=()=>t.shouldFocusError&&bf(r,P,a.mount),je=G=>{Ao(G)&&(g.state.next({disabled:G}),bf(r,(re,ne)=>{const ce=Ie(r,ne);ce&&(re.disabled=ce._f.disabled||G,Array.isArray(ce._f.refs)&&ce._f.refs.forEach(te=>{te.disabled=ce._f.disabled||G}))},0,!1))},_e=(G,re)=>async ne=>{let ce;ne&&(ne.preventDefault&&ne.preventDefault(),ne.persist&&ne.persist());let te=an(i);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:Z,values:de}=await k();n.errors=Z,te=an(de)}else await V(r);if(a.disabled.size)for(const Z of a.disabled)kn(te,Z);if(kn(n.errors,"root"),yr(n.errors)){g.state.next({errors:{}});try{await G(te,ne)}catch(Z){ce=Z}}else re&&await re({...n.errors},ne),xe(),setTimeout(xe);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:yr(n.errors)&&!ce,submitCount:n.submitCount+1,errors:n.errors}),ce)throw ce},Ee=(G,re={})=>{Ie(r,G)&&(tn(re.defaultValue)?$(G,an(Ie(o,G))):($(G,re.defaultValue),Pt(o,G,an(re.defaultValue))),re.keepTouched||kn(n.touchedFields,G),re.keepDirty||(kn(n.dirtyFields,G),n.isDirty=re.defaultValue?F(G,an(Ie(o,G))):F()),re.keepError||(kn(n.errors,G),f.isValid&&x()),g.state.next({...n}))},Re=(G,re={})=>{const ne=G?an(G):o,ce=an(ne),te=yr(G),Z=te?o:ce;if(re.keepDefaultValues||(o=ne),!re.keepValues){if(re.keepDirtyValues){const de=new Set([...a.mount,...Object.keys(nf(o,i))]);for(const Te of Array.from(de))Ie(n.dirtyFields,Te)?Pt(Z,Te,Ie(i,Te)):$(Te,Ie(Z,Te))}else{if(rT&&tn(G))for(const de of a.mount){const Te=Ie(r,de);if(Te&&Te._f){const $e=Array.isArray(Te._f.refs)?Te._f.refs[0]:Te._f.ref;if(Bv($e)){const Ke=$e.closest("form");if(Ke){Ke.reset();break}}}}if(re.keepFieldsRef)for(const de of a.mount)$(de,Ie(Z,de));else r={}}i=t.shouldUnregister?re.keepDefaultValues?an(o):{}:an(Z),g.array.next({values:{...Z}}),g.state.next({values:{...Z}})}a={mount:re.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!f.isValid||!!re.keepIsValid||!!re.keepDirtyValues||!t.shouldUnregister&&!yr(Z),s.watch=!!t.shouldUnregister,g.state.next({submitCount:re.keepSubmitCount?n.submitCount:0,isDirty:te?!1:re.keepDirty?n.isDirty:!!(re.keepDefaultValues&&!Ii(G,o)),isSubmitted:re.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:te?{}:re.keepDirtyValues?re.keepDefaultValues&&i?nf(o,i):n.dirtyFields:re.keepDefaultValues&&G?nf(o,G):re.keepDirty?n.dirtyFields:{},touchedFields:re.keepTouched?n.touchedFields:{},errors:re.keepErrors?n.errors:{},isSubmitSuccessful:re.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Me=(G,re)=>Re(Li(G)?G(i):G,re),ze=(G,re={})=>{const ne=Ie(r,G),ce=ne&&ne._f;if(ce){const te=ce.refs?ce.refs[0]:ce.ref;te.focus&&(te.focus(),re.shouldSelect&&Li(te.select)&&te.select())}},ve=G=>{n={...n,...G}},Ae={control:{register:me,unregister:ue,getFieldState:D,handleSubmit:_e,setError:K,_subscribe:ie,_runSchema:k,_focusError:xe,_getWatch:B,_getDirty:F,_setValid:x,_setFieldArray:E,_setDisabledField:se,_setErrors:_,_getFieldArray:U,_reset:Re,_resetDefaultValues:()=>Li(t.defaultValues)&&t.defaultValues().then(G=>{Me(G,t.resetOptions),g.state.next({isLoading:!1})}),_removeUnmounted:H,_disableForm:je,_subjects:g,_proxyFormState:f,get _fields(){return r},get _formValues(){return i},get _state(){return s},set _state(G){s=G},get _defaultValues(){return o},get _names(){return a},set _names(G){a=G},get _formState(){return n},get _options(){return t},set _options(G){t={...t,...G}}},subscribe:pe,trigger:q,register:me,handleSubmit:_e,watch:Q,setValue:$,getValues:Y,reset:Me,resetField:Ee,clearErrors:W,unregister:ue,setError:K,setFocus:ze,getFieldState:D};return{...Ae,formControl:Ae}}var Rl=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(Math.random()*16+e)%16|0;return(t=="x"?n:n&3|8).toString(16)})},tN=(e,t,n={})=>n.shouldFocus||tn(n.shouldFocus)?n.focusName||`${e}.${tn(n.focusIndex)?t:n.focusIndex}.`:"",nN=(e,t)=>[...e,...so(t)],rN=e=>Array.isArray(e)?e.map(()=>{}):void 0;function oN(e,t,n){return[...e.slice(0,t),...so(n),...e.slice(t)]}var iN=(e,t,n)=>Array.isArray(e)?(tn(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],sN=(e,t)=>[...so(t),...so(e)];function t2e(e,t){let n=0;const r=[...e];for(const o of t)r.splice(o-n,1),n++;return Gw(r).length?r:[]}var aN=(e,t)=>tn(t)?[]:t2e(e,so(t).sort((n,r)=>n-r)),lN=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},pP=(e,t,n)=>(e[t]=n,e);function n2e(e){const t=Jw(),{control:n=t.control,name:r,keyName:o="id",shouldUnregister:i,rules:s}=e,[a,c]=Ne.useState(n._getFieldArray(r)),u=Ne.useRef(n._getFieldArray(r).map(Rl)),f=Ne.useRef(!1);n._names.array.add(r),Ne.useMemo(()=>s&&a.length>=0&&n.register(r,s),[n,r,a.length,s]),Yw(()=>n._subjects.array.subscribe({next:({values:j,name:A})=>{if(A===r||!A){const T=Ie(j,r);Array.isArray(T)&&(c(T),u.current=T.map(Rl))}}}).unsubscribe,[n,r]);const p=Ne.useCallback(j=>{f.current=!0,n._setFieldArray(r,j)},[n,r]),g=(j,A)=>{const T=so(an(j)),k=nN(n._getFieldArray(r),T);n._names.focus=tN(r,k.length-1,A),u.current=nN(u.current,T.map(Rl)),p(k),c(k),n._setFieldArray(r,k,nN,{argA:rN(j)})},y=(j,A)=>{const T=so(an(j)),k=sN(n._getFieldArray(r),T);n._names.focus=tN(r,0,A),u.current=sN(u.current,T.map(Rl)),p(k),c(k),n._setFieldArray(r,k,sN,{argA:rN(j)})},v=j=>{const A=aN(n._getFieldArray(r),j);u.current=aN(u.current,j),p(A),c(A),!Array.isArray(Ie(n._fields,r))&&Pt(n._fields,r,void 0),n._setFieldArray(r,A,aN,{argA:j})},x=(j,A,T)=>{const k=so(an(A)),R=oN(n._getFieldArray(r),j,k);n._names.focus=tN(r,j,T),u.current=oN(u.current,j,k.map(Rl)),p(R),c(R),n._setFieldArray(r,R,oN,{argA:j,argB:rN(A)})},S=(j,A)=>{const T=n._getFieldArray(r);lN(T,j,A),lN(u.current,j,A),p(T),c(T),n._setFieldArray(r,T,lN,{argA:j,argB:A},!1)},E=(j,A)=>{const T=n._getFieldArray(r);iN(T,j,A),iN(u.current,j,A),p(T),c(T),n._setFieldArray(r,T,iN,{argA:j,argB:A},!1)},C=(j,A)=>{const T=an(A),k=pP(n._getFieldArray(r),j,T);u.current=[...k].map((R,V)=>!R||V===j?Rl():u.current[V]),p(k),c([...k]),n._setFieldArray(r,k,pP,{argA:j,argB:T},!0,!1)},_=j=>{const A=so(an(j));u.current=A.map(Rl),p([...A]),c([...A]),n._setFieldArray(r,[...A],T=>T,{},!0,!1)};return Ne.useEffect(()=>{if(n._state.action=!1,bC(r,n._names)&&n._subjects.state.next({...n._formState}),f.current&&(!df(n._options.mode).isOnSubmit||n._formState.isSubmitted)&&!df(n._options.reValidateMode).isOnSubmit)if(n._options.resolver)n._runSchema([r]).then(j=>{const A=Ie(j.errors,r),T=Ie(n._formState.errors,r);(T?!A&&T.type||A&&(T.type!==A.type||T.message!==A.message):A&&A.type)&&(A?Pt(n._formState.errors,r,A):kn(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const j=Ie(n._fields,r);j&&j._f&&!(df(n._options.reValidateMode).isOnSubmit&&df(n._options.mode).isOnSubmit)&&vC(j,n._names.disabled,n._formValues,n._options.criteriaMode===si.all,n._options.shouldUseNativeValidation,!0).then(A=>!yr(A)&&n._subjects.state.next({errors:fU(n._formState.errors,A,r)}))}n._subjects.state.next({name:r,values:an(n._formValues)}),n._names.focus&&bf(n._fields,(j,A)=>{if(n._names.focus&&A.startsWith(n._names.focus)&&j.focus)return j.focus(),1}),n._names.focus="",n._setValid(),f.current=!1},[a,r,n]),Ne.useEffect(()=>(!Ie(n._formValues,r)&&n._setFieldArray(r),()=>{const j=(A,T)=>{const k=Ie(n._fields,A);k&&k._f&&(k._f.mount=T)};n._options.shouldUnregister||i?n.unregister(r):j(r,!1)}),[r,n,o,i]),{swap:Ne.useCallback(S,[p,r,n]),move:Ne.useCallback(E,[p,r,n]),prepend:Ne.useCallback(y,[p,r,n]),append:Ne.useCallback(g,[p,r,n]),remove:Ne.useCallback(v,[p,r,n]),insert:Ne.useCallback(x,[p,r,n]),update:Ne.useCallback(C,[p,r,n]),replace:Ne.useCallback(_,[p,r,n]),fields:Ne.useMemo(()=>a.map((j,A)=>({...j,[o]:u.current[A]||Rl()})),[a,o])}}function Cc(e={}){const t=Ne.useRef(void 0),n=Ne.useRef(void 0),[r,o]=Ne.useState({isDirty:!1,isValidating:!1,isLoading:Li(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Li(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Li(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:s,...a}=e2e(e);t.current={...a,formState:r}}const i=t.current.control;return i._options=e,Yw(()=>{const s=i._subscribe({formState:i._proxyFormState,callback:()=>o({...i._formState}),reRenderRoot:!0});return o(a=>({...a,isReady:!0})),i._formState.isReady=!0,s},[i]),Ne.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),Ne.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),Ne.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),Ne.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),Ne.useEffect(()=>{if(i._proxyFormState.isDirty){const s=i._getDirty();s!==r.isDirty&&i._subjects.state.next({isDirty:s})}},[i,r.isDirty]),Ne.useEffect(()=>{e.values&&!Ii(e.values,n.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),n.current=e.values,o(s=>({...s}))):i._resetDefaultValues()},[i,e.values]),Ne.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=iU(r,i),t.current}const mP=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Ie(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},hU=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?mP(r.ref,n,e):r&&r.refs&&r.refs.forEach(o=>mP(o,n,e))}},r2e=(e,t)=>{t.shouldUseNativeValidation&&hU(e,t);const n={};for(const r in e){const o=Ie(t.fields,r),i=Object.assign(e[r]||{},{ref:o&&o.ref});if(o2e(t.names||Object.keys(e),r)){const s=Object.assign({},Ie(n,r));Pt(s,"root",i),Pt(n,r,s)}else Pt(n,r,i)}return n},o2e=(e,t)=>{const n=gP(t);return e.some(r=>gP(r).match(`^${n}\\.\\d+`))};function gP(e){return e.replace(/\]|\[/g,"")}function i2e(e){if(e.path?.length){let t="";for(const n of e.path){const r=typeof n=="object"?n.key:n;if(typeof r=="string"||typeof r=="number")t?t+=`.${r}`:t+=r;else return null}return t}return null}function xC(){return xC=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const y=g.entities?.create?.[0];return y&&y.name!==p.name?{...g,entities:{create:[{...p,fields:y.fields}]}}:{...g,entities:{create:[p]}}}),a.isValid&&(console.log("would go next"),t("entity-fields")())}return h.jsx(h.Fragment,{children:h.jsxs("form",{onSubmit:s(f),ref:e,children:[h.jsxs(Gu,{children:[h.jsx("input",{type:"hidden",...i("type"),defaultValue:"regular"}),h.jsx(_n,{"data-autofocus":!0,required:!0,error:a.errors.name?.message,...i("name"),placeholder:"posts",size:"md",label:"What's the name of the entity?",description:"Use plural form, and all lowercase. It will be used as the database table."}),h.jsx(_n,{...i("config.name"),error:a.errors.config?.name?.message,placeholder:"Posts",size:"md",label:"How should it be called?",description:"Use plural form. This will be used to display in the UI."}),h.jsx(_n,{...i("config.name_singular"),error:a.errors.config?.name_singular?.message,placeholder:"Post",size:"md",label:"What's the singular form of it?"}),h.jsx(kg,{placeholder:"This is a post (optional)",error:a.errors.config?.description?.message,...i("config.description"),size:"md",label:"Description"})]}),h.jsx(Ju,{next:{type:"submit",disabled:!a.isValid},prev:{onClick:n},debug:{state:r}})]})})}function Sa({name:e,control:t,defaultValue:n,rules:r,shouldUnregister:o,onChange:i,...s}){const{field:{value:a,onChange:c,...u},fieldState:f}=Oh({name:e,control:t,defaultValue:n,rules:r,shouldUnregister:o});return h.jsx(Xx,{value:a,onChange:async p=>{await c({...new Event("change",{bubbles:!0,cancelable:!0}),target:{value:p,name:u.name}}),i?.(p)},error:f.error?.message,...u,...s})}function cN({name:e,control:t,defaultValue:n,rules:r,shouldUnregister:o,onChange:i,...s}){const{field:{value:a,onChange:c,...u},fieldState:f}=Oh({name:e,control:t,defaultValue:n,rules:r,shouldUnregister:o});return h.jsx(vc,{value:a,checked:a,onChange:p=>{c(p),i?.(p)},error:f.error?.message,...u,...s})}const u2e="modulepreload",d2e=function(e){return"/"+e},yP={},Kw=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let c=function(u){return Promise.all(u.map(f=>Promise.resolve(f).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=s?.nonce||s?.getAttribute("nonce");o=c(n.map(u=>{if(u=d2e(u),u in yP)return;yP[u]=!0;const f=u.endsWith(".css"),p=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${p}`))return;const g=document.createElement("link");if(g.rel=f?"stylesheet":u2e,f||(g.as="script"),g.crossOrigin="",g.href=u,a&&g.setAttribute("nonce",a),document.head.appendChild(g),f)return new Promise((y,v)=>{g.addEventListener("load",y),g.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return o.then(s=>{for(const a of s||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})},f2e=w.lazy(()=>Kw(()=>import("./JsonSchemaForm-CE_Yijem.js"),[]).then(e=>({default:e.JsonSchemaForm}))),jh=w.forwardRef((e,t)=>h.jsx(w.Suspense,{children:h.jsx(f2e,{ref:t,...e})}));function kr(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var h2e=typeof Symbol=="function"&&Symbol.observable||"@@observable",bP=h2e,vP=()=>Math.random().toString(36).substring(7).split("").join("."),p2e={INIT:`@@redux/INIT${vP()}`,REPLACE:`@@redux/REPLACE${vP()}`},xP=p2e;function m2e(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function pU(e,t,n){if(typeof e!="function")throw new Error(kr(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(kr(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(kr(1));return n(pU)(e,t)}let r=e,o=t,i=new Map,s=i,a=0,c=!1;function u(){s===i&&(s=new Map,i.forEach((S,E)=>{s.set(E,S)}))}function f(){if(c)throw new Error(kr(3));return o}function p(S){if(typeof S!="function")throw new Error(kr(4));if(c)throw new Error(kr(5));let E=!0;u();const C=a++;return s.set(C,S),function(){if(E){if(c)throw new Error(kr(6));E=!1,u(),s.delete(C),i=null}}}function g(S){if(!m2e(S))throw new Error(kr(7));if(typeof S.type>"u")throw new Error(kr(8));if(typeof S.type!="string")throw new Error(kr(17));if(c)throw new Error(kr(9));try{c=!0,o=r(o,S)}finally{c=!1}return(i=s).forEach(C=>{C()}),S}function y(S){if(typeof S!="function")throw new Error(kr(10));r=S,g({type:xP.REPLACE})}function v(){const S=p;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(kr(11));function C(){const j=E;j.next&&j.next(f())}return C(),{unsubscribe:S(C)}},[bP](){return this}}}return g({type:xP.INIT}),{dispatch:g,subscribe:p,getState:f,replaceReducer:y,[bP]:v}}function wP(e,t){return function(...n){return t(e.apply(this,n))}}function SP(e,t){if(typeof e=="function")return wP(e,t);if(typeof e!="object"||e===null)throw new Error(kr(16));const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=wP(o,t))}return n}function mU(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function g2e(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(kr(15))};const s={getState:o.getState,dispatch:(c,...u)=>i(c,...u)},a=e.map(c=>c(s));return i=mU(...a)(o.dispatch),{...o,dispatch:i}}}var uN={exports:{}},dN={};/** + * @license React + * use-sync-external-store-with-selector.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var EP;function y2e(){if(EP)return dN;EP=1;var e=dc();function t(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,s=e.useMemo,a=e.useDebugValue;return dN.useSyncExternalStoreWithSelector=function(c,u,f,p,g){var y=o(null);if(y.current===null){var v={hasValue:!1,value:null};y.current=v}else v=y.current;y=s(function(){function S(A){if(!E){if(E=!0,C=A,A=p(A),g!==void 0&&v.hasValue){var T=v.value;if(g(T,A))return _=T}return _=A}if(T=_,n(C,A))return T;var k=p(A);return g!==void 0&&g(T,k)?(C=A,T):(C=A,_=k)}var E=!1,C,_,j=f===void 0?null:f;return[function(){return S(u())},j===null?void 0:function(){return S(j())}]},[u,f,p,g]);var x=r(c,y[0],y[1]);return i(function(){v.hasValue=!0,v.value=x},[x]),a(x),x},dN}var NP;function b2e(){return NP||(NP=1,uN.exports=y2e()),uN.exports}b2e();var v2e=w.version.startsWith("19"),x2e=Symbol.for(v2e?"react.transitional.element":"react.element"),w2e=Symbol.for("react.portal"),S2e=Symbol.for("react.fragment"),E2e=Symbol.for("react.strict_mode"),N2e=Symbol.for("react.profiler"),_2e=Symbol.for("react.consumer"),C2e=Symbol.for("react.context"),gU=Symbol.for("react.forward_ref"),O2e=Symbol.for("react.suspense"),j2e=Symbol.for("react.suspense_list"),lT=Symbol.for("react.memo"),A2e=Symbol.for("react.lazy"),T2e=gU,$2e=lT;function R2e(e){if(typeof e=="object"&&e!==null){const{$$typeof:t}=e;switch(t){case x2e:switch(e=e.type,e){case S2e:case N2e:case E2e:case O2e:case j2e:return e;default:switch(e=e&&e.$$typeof,e){case C2e:case gU:case A2e:case lT:return e;case _2e:return e;default:return t}}case w2e:return t}}}function k2e(e){return R2e(e)===lT}function M2e(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,c,u,f,p,g;function y(C,_){return c=C,u=_,f=e(c,u),p=t(r,u),g=n(f,p,u),a=!0,g}function v(){return f=e(c,u),t.dependsOnOwnProps&&(p=t(r,u)),g=n(f,p,u),g}function x(){return e.dependsOnOwnProps&&(f=e(c,u)),t.dependsOnOwnProps&&(p=t(r,u)),g=n(f,p,u),g}function S(){const C=e(c,u),_=!s(C,f);return f=C,_&&(g=n(f,p,u)),g}function E(C,_){const j=!i(_,u),A=!o(C,c,_,u);return c=C,u=_,j&&A?v():j?x():A?S():g}return function(_,j){return a?E(_,j):y(_,j)}}function P2e(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){const i=t(e,o),s=n(e,o),a=r(e,o);return M2e(i,s,a,e,o)}function D2e(e,t){const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=(...i)=>t(o(...i)))}return n}function wC(e){return function(n){const r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function _P(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function yU(e,t){return function(r,{displayName:o}){const i=function(a,c){return i.dependsOnOwnProps?i.mapToProps(a,c):i.mapToProps(a,void 0)};return i.dependsOnOwnProps=!0,i.mapToProps=function(a,c){i.mapToProps=e,i.dependsOnOwnProps=_P(e);let u=i(a,c);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=_P(u),u=i(a,c)),u},i}}function cT(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function I2e(e){return e&&typeof e=="object"?wC(t=>D2e(e,t)):e?typeof e=="function"?yU(e):cT(e,"mapDispatchToProps"):wC(t=>({dispatch:t}))}function L2e(e){return e?typeof e=="function"?yU(e):cT(e,"mapStateToProps"):wC(()=>({}))}function F2e(e,t,n){return{...n,...e,...t}}function z2e(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(c,u,f){const p=e(c,u,f);return i?o(p,s)||(s=p):(i=!0,s=p),s}}}function B2e(e){return e?typeof e=="function"?z2e(e):cT(e,"mergeProps"):()=>F2e}function V2e(e){e()}function U2e(){let e=null,t=null;return{clear(){e=null,t=null},notify(){V2e(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var CP={notify(){},get:()=>[]};function bU(e,t){let n,r=CP,o=0,i=!1;function s(x){f();const S=r.subscribe(x);let E=!1;return()=>{E||(E=!0,S(),p())}}function a(){r.notify()}function c(){v.onStateChange&&v.onStateChange()}function u(){return i}function f(){o++,n||(n=t?t.addNestedSub(c):e.subscribe(c),r=U2e())}function p(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=CP)}function g(){i||(i=!0,f())}function y(){i&&(i=!1,p())}const v={addNestedSub:s,notifyNestedSubs:a,handleChangeWrapper:c,isSubscribed:u,trySubscribe:g,tryUnsubscribe:y,getListeners:()=>r};return v}var H2e=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",q2e=H2e(),W2e=()=>typeof navigator<"u"&&navigator.product==="ReactNative",G2e=W2e(),J2e=()=>q2e||G2e?w.useLayoutEffect:w.useEffect,Uv=J2e();function OP(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function fN(e,t){if(OP(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;oe(...t),n)}function lNe(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function cNe(e,t,n,r,o,i,s,a,c,u,f){if(!e)return()=>{};let p=!1,g=null;const y=()=>{if(p||!a.current)return;const x=t.getState();let S,E;try{S=r(x,o.current)}catch(C){E=C,g=C}E||(g=null),S===i.current?s.current||u():(i.current=S,c.current=S,s.current=!0,f())};return n.onStateChange=y,n.trySubscribe(),y(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,g)throw g}}function uNe(e,t){return e===t}function dNe(e,t,n,{pure:r,areStatesEqual:o=uNe,areOwnPropsEqual:i=fN,areStatePropsEqual:s=fN,areMergedPropsEqual:a=fN,forwardRef:c=!1,context:u=xU}={}){const f=u,p=L2e(e),g=I2e(t),y=B2e(n),v=!!e;return S=>{const E=S.displayName||S.name||"Component",C=`Connect(${E})`,_={shouldHandleStateChanges:v,displayName:C,wrappedComponentName:E,WrappedComponent:S,initMapStateToProps:p,initMapDispatchToProps:g,initMergeProps:y,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function j(k){const[R,V,H]=w.useMemo(()=>{const{reactReduxForwardedRef:_e,...Ee}=k;return[k.context,_e,Ee]},[k]),F=w.useMemo(()=>{let _e=f;return R?.Consumer,_e},[R,f]),B=w.useContext(F),U=!!k.store&&!!k.store.getState&&!!k.store.dispatch,M=!!B&&!!B.store,z=U?k.store:B.store,$=M?B.getServerState:z.getState,L=w.useMemo(()=>P2e(z.dispatch,_),[z]),[P,q]=w.useMemo(()=>{if(!v)return sNe;const _e=bU(z,U?void 0:B.subscription),Ee=_e.notifyNestedSubs.bind(_e);return[_e,Ee]},[z,U,B]),Y=w.useMemo(()=>U?B:{...B,subscription:P},[U,B,P]),D=w.useRef(void 0),W=w.useRef(H),K=w.useRef(void 0),Q=w.useRef(!1),ie=w.useRef(!1),pe=w.useRef(void 0);Uv(()=>(ie.current=!0,()=>{ie.current=!1}),[]);const ue=w.useMemo(()=>()=>K.current&&H===W.current?K.current:L(z.getState(),H),[z,H]),se=w.useMemo(()=>Ee=>P?cNe(v,z,P,L,W,D,Q,ie,K,q,Ee):()=>{},[P]);aNe(lNe,[W,D,Q,H,K,q]);let me;try{me=w.useSyncExternalStore(se,ue,$?()=>L($(),H):ue)}catch(_e){throw pe.current&&(_e.message+=` +The error may be correlated with this previous error: +${pe.current.stack} + +`),_e}Uv(()=>{pe.current=void 0,K.current=void 0,D.current=me});const xe=w.useMemo(()=>w.createElement(S,{...me,ref:V}),[V,S,me]);return w.useMemo(()=>v?w.createElement(F.Provider,{value:Y},xe):xe,[F,xe,Y])}const T=w.memo(j);if(T.WrappedComponent=S,T.displayName=j.displayName=C,c){const R=w.forwardRef(function(H,F){return w.createElement(T,{...H,reactReduxForwardedRef:F})});return R.displayName=C,R.WrappedComponent=S,SC(R,S)}return SC(T,S)}}var wU=dNe;function fNe(e){const{children:t,context:n,serverState:r,store:o}=e,i=w.useMemo(()=>{const c=bU(o);return{store:o,subscription:c,getServerState:r?()=>r:void 0}},[o,r]),s=w.useMemo(()=>o.getState(),[o]);Uv(()=>{const{subscription:c}=i;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),s!==o.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[i,s]);const a=n||xU;return w.createElement(a.Provider,{value:i},t)}var hNe=fNe,pNe="Invariant failed";function mNe(e,t){throw new Error(pNe)}var Hi=function(t){var n=t.top,r=t.right,o=t.bottom,i=t.left,s=r-i,a=o-n,c={top:n,right:r,bottom:o,left:i,width:s,height:a,x:i,y:n,center:{x:(r+i)/2,y:(o+n)/2}};return c},uT=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},$P=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},gNe=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},hN={top:0,right:0,bottom:0,left:0},dT=function(t){var n=t.borderBox,r=t.margin,o=r===void 0?hN:r,i=t.border,s=i===void 0?hN:i,a=t.padding,c=a===void 0?hN:a,u=Hi(uT(n,o)),f=Hi($P(n,s)),p=Hi($P(f,c));return{marginBox:u,borderBox:Hi(n),paddingBox:f,contentBox:p,margin:o,border:s,padding:c}},ti=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var o=Number(n);return isNaN(o)&&mNe(),o},yNe=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Hv=function(t,n){var r=t.borderBox,o=t.border,i=t.margin,s=t.padding,a=gNe(r,n);return dT({borderBox:a,border:o,margin:i,padding:s})},qv=function(t,n){return n===void 0&&(n=yNe()),Hv(t,n)},SU=function(t,n){var r={top:ti(n.marginTop),right:ti(n.marginRight),bottom:ti(n.marginBottom),left:ti(n.marginLeft)},o={top:ti(n.paddingTop),right:ti(n.paddingRight),bottom:ti(n.paddingBottom),left:ti(n.paddingLeft)},i={top:ti(n.borderTopWidth),right:ti(n.borderRightWidth),bottom:ti(n.borderBottomWidth),left:ti(n.borderLeftWidth)};return dT({borderBox:t,margin:r,padding:o,border:i})},EU=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return SU(n,r)},sg=function(t){var n=[],r=null,o=function(){for(var s=arguments.length,a=new Array(s),c=0;c{const i=bNe(n,o.options);return e.addEventListener(o.eventName,o.fn,i),function(){e.removeEventListener(o.eventName,o.fn,i)}});return function(){r.forEach(i=>{i()})}}const vNe="Invariant failed";class Wv extends Error{}Wv.prototype.toString=function(){return this.message};function De(e,t){throw new Wv(vNe)}class xNe extends Ne.Component{constructor(...t){super(...t),this.callbacks=null,this.unbind=Zl,this.onWindowError=n=>{const r=this.getCallbacks();r.isDragging()&&r.tryAbort(),n.error instanceof Wv&&n.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in ");return this.callbacks},this.setCallbacks=n=>{this.callbacks=n}}componentDidMount(){this.unbind=li(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(t){if(t instanceof Wv){this.setState({});return}throw t}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const wNe=` + Press space bar to start a drag. + When dragging you can use the arrow keys to move the item around and escape to cancel. + Some screen readers may require you to be in focus mode or to use your pass through key +`,Gv=e=>e+1,SNe=e=>` + You have lifted an item in position ${Gv(e.source.index)} +`,_U=(e,t)=>{const n=e.droppableId===t.droppableId,r=Gv(e.index),o=Gv(t.index);return n?` + You have moved the item from position ${r} + to position ${o} + `:` + You have moved the item from position ${r} + in list ${e.droppableId} + to list ${t.droppableId} + in position ${o} + `},CU=(e,t,n)=>t.droppableId===n.droppableId?` + The item ${e} + has been combined with ${n.draggableId}`:` + The item ${e} + in list ${t.droppableId} + has been combined with ${n.draggableId} + in list ${n.droppableId} + `,ENe=e=>{const t=e.destination;if(t)return _U(e.source,t);const n=e.combine;return n?CU(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},RP=e=>` + The item has returned to its starting position + of ${Gv(e.index)} +`,NNe=e=>{if(e.reason==="CANCEL")return` + Movement cancelled. + ${RP(e.source)} + `;const t=e.destination,n=e.combine;return t?` + You have dropped the item. + ${_U(e.source,t)} + `:n?` + You have dropped the item. + ${CU(e.draggableId,e.source,n)} + `:` + The item has been dropped while not over a drop area. + ${RP(e.source)} + `},Vb={dragHandleUsageInstructions:wNe,onDragStart:SNe,onDragUpdate:ENe,onDragEnd:NNe};function _Ne(e,t){return!!(e===t||Number.isNaN(e)&&Number.isNaN(t))}function OU(e,t){if(e.length!==t.length)return!1;for(let n=0;n({inputs:t,result:e()}))[0],r=w.useRef(!0),o=w.useRef(n),s=r.current||!!(t&&o.current.inputs&&OU(t,o.current.inputs))?o.current:{inputs:t,result:e()};return w.useEffect(()=>{r.current=!1,o.current=s},[s]),s.result}function Ze(e,t){return _t(()=>e,t)}const sr={x:0,y:0},fr=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),ko=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),ec=(e,t)=>e.x===t.x&&e.y===t.y,Ah=e=>({x:e.x!==0?-e.x:0,y:e.y!==0?-e.y:0}),ku=(e,t,n=0)=>e==="x"?{x:t,y:n}:{x:n,y:t},ag=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),kP=(e,t)=>Math.min(...t.map(n=>ag(e,n))),jU=e=>t=>({x:e(t.x),y:e(t.y)});var CNe=(e,t)=>{const n=Hi({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n};const sy=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),MP=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],ONe={top:0,right:0,bottom:0,left:0},jNe=(e,t)=>t?sy(e,t.scroll.diff.displacement):e,ANe=(e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e,TNe=(e,t)=>t&&t.shouldClipSubject?CNe(t.pageMarginBox,e):Hi(e);var Uf=({page:e,withPlaceholder:t,axis:n,frame:r})=>{const o=jNe(e.marginBox,r),i=ANe(o,n,t),s=TNe(i,r);return{page:e,withPlaceholder:t,active:s}},fT=(e,t)=>{e.frame||De();const n=e.frame,r=ko(t,n.scroll.initial),o=Ah(r),i={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}},s=Uf({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:s}};function or(e,t=OU){let n=null;function r(...o){if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;const i=e.apply(this,o);return n={lastResult:i,lastArgs:o,lastThis:this},i}return r.clear=function(){n=null},r}const AU=or(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),TU=or(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),Xw=or(e=>Object.values(e)),$Ne=or(e=>Object.values(e));var Th=or((e,t)=>$Ne(t).filter(r=>e===r.descriptor.droppableId).sort((r,o)=>r.descriptor.index-o.descriptor.index));function hT(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function Qw(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var Zw=or((e,t)=>t.filter(n=>n.descriptor.id!==e.descriptor.id)),RNe=({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:o})=>{if(!n.isCombineEnabled||!hT(o))return null;function s(y){const v={type:"COMBINE",combine:{draggableId:y,droppableId:n.descriptor.id}};return{...o,at:v}}const a=o.displaced.all,c=a.length?a[0]:null;if(e)return c?s(c):null;const u=Zw(t,r);if(!c){if(!u.length)return null;const y=u[u.length-1];return s(y.descriptor.id)}const f=u.findIndex(y=>y.descriptor.id===c);f===-1&&De();const p=f-1;if(p<0)return null;const g=u[p];return s(g.descriptor.id)},$h=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const $U={point:sr,value:0},lg={invisible:{},visible:{},all:[]},kNe={displaced:lg,displacedBy:$U,at:null};var di=(e,t)=>n=>e<=n&&n<=t,RU=e=>{const t=di(e.top,e.bottom),n=di(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;const i=t(r.top)||t(r.bottom),s=n(r.left)||n(r.right);if(i&&s)return!0;const c=r.tope.bottom,u=r.lefte.right;return c&&u?!0:c&&s||u&&i}},MNe=e=>{const t=di(e.top,e.bottom),n=di(e.left,e.right);return r=>t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right)};const pT={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},kU={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};var PNe=e=>t=>{const n=di(t.top,t.bottom),r=di(t.left,t.right);return o=>e===pT?n(o.top)&&n(o.bottom):r(o.left)&&r(o.right)};const DNe=(e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:sr;return sy(e,n)},INe=(e,t,n)=>t.subject.active?n(t.subject.active)(e):!1,LNe=(e,t,n)=>n(t)(e),mT=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:o})=>{const i=r?DNe(e,t):e;return INe(i,t,o)&&LNe(i,n,o)},FNe=e=>mT({...e,isVisibleThroughFrameFn:RU}),MU=e=>mT({...e,isVisibleThroughFrameFn:MNe}),zNe=e=>mT({...e,isVisibleThroughFrameFn:PNe(e.destination.axis)}),BNe=(e,t,n)=>{if(typeof n=="boolean")return n;if(!t)return!0;const{invisible:r,visible:o}=t;if(r[e])return!1;const i=o[e];return i?i.shouldAnimate:!0};function VNe(e,t){const n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return Hi(uT(n,r))}function cg({afterDragging:e,destination:t,displacedBy:n,viewport:r,forceShouldAnimate:o,last:i}){return e.reduce(function(a,c){const u=VNe(c,n),f=c.descriptor.id;if(a.all.push(f),!FNe({target:u,destination:t,viewport:r,withDroppableDisplacement:!0}))return a.invisible[c.descriptor.id]=!0,a;const g=BNe(f,i,o),y={draggableId:f,shouldAnimate:g};return a.visible[f]=y,a},{all:[],visible:{},invisible:{}})}function UNe(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function PP({insideDestination:e,inHomeList:t,displacedBy:n,destination:r}){const o=UNe(e,{inHomeList:t});return{displaced:lg,displacedBy:n,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:o}}}}function Jv({draggable:e,insideDestination:t,destination:n,viewport:r,displacedBy:o,last:i,index:s,forceShouldAnimate:a}){const c=$h(e,n);if(s==null)return PP({insideDestination:t,inHomeList:c,displacedBy:o,destination:n});const u=t.find(v=>v.descriptor.index===s);if(!u)return PP({insideDestination:t,inHomeList:c,displacedBy:o,destination:n});const f=Zw(e,t),p=t.indexOf(u),g=f.slice(p);return{displaced:cg({afterDragging:g,destination:n,displacedBy:o,last:i,viewport:r.frame,forceShouldAnimate:a}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:s}}}}function cc(e,t){return!!t.effected[e]}var HNe=({isMovingForward:e,destination:t,draggables:n,combine:r,afterCritical:o})=>{if(!t.isCombineEnabled)return null;const i=r.draggableId,a=n[i].descriptor.index;return cc(i,o)?e?a:a-1:e?a+1:a},qNe=({isMovingForward:e,isInHomeList:t,insideDestination:n,location:r})=>{if(!n.length)return null;const o=r.index,i=e?o+1:o-1,s=n[0].descriptor.index,a=n[n.length-1].descriptor.index,c=t?a:a+1;return ic?null:i},WNe=({isMovingForward:e,isInHomeList:t,draggable:n,draggables:r,destination:o,insideDestination:i,previousImpact:s,viewport:a,afterCritical:c})=>{const u=s.at;if(u||De(),u.type==="REORDER"){const p=qNe({isMovingForward:e,isInHomeList:t,location:u.destination,insideDestination:i});return p==null?null:Jv({draggable:n,insideDestination:i,destination:o,viewport:a,last:s.displaced,displacedBy:s.displacedBy,index:p})}const f=HNe({isMovingForward:e,destination:o,displaced:s.displaced,draggables:r,combine:u.combine,afterCritical:c});return f==null?null:Jv({draggable:n,insideDestination:i,destination:o,viewport:a,last:s.displaced,displacedBy:s.displacedBy,index:f})},GNe=({displaced:e,afterCritical:t,combineWith:n,displacedBy:r})=>{const o=!!(e.visible[n]||e.invisible[n]);return cc(n,t)?o?sr:Ah(r.point):o?r.point:sr},JNe=({afterCritical:e,impact:t,draggables:n})=>{const r=Qw(t);r||De();const o=r.draggableId,i=n[o].page.borderBox.center,s=GNe({displaced:t.displaced,afterCritical:e,combineWith:o,displacedBy:t.displacedBy});return fr(i,s)};const PU=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,YNe=(e,t)=>t.margin[e.end]+t.borderBox[e.size]/2,gT=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,DP=({axis:e,moveRelativeTo:t,isMoving:n})=>ku(e.line,t.marginBox[e.end]+PU(e,n),gT(e,t.marginBox,n)),IP=({axis:e,moveRelativeTo:t,isMoving:n})=>ku(e.line,t.marginBox[e.start]-YNe(e,n),gT(e,t.marginBox,n)),KNe=({axis:e,moveInto:t,isMoving:n})=>ku(e.line,t.contentBox[e.start]+PU(e,n),gT(e,t.contentBox,n));var XNe=({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:o})=>{const i=Th(r.descriptor.id,n),s=t.page,a=r.axis;if(!i.length)return KNe({axis:a,moveInto:r.page,isMoving:s});const{displaced:c,displacedBy:u}=e,f=c.all[0];if(f){const g=n[f];if(cc(f,o))return IP({axis:a,moveRelativeTo:g.page,isMoving:s});const y=Hv(g.page,u.point);return IP({axis:a,moveRelativeTo:y,isMoving:s})}const p=i[i.length-1];if(p.descriptor.id===t.descriptor.id)return s.borderBox.center;if(cc(p.descriptor.id,o)){const g=Hv(p.page,Ah(o.displacedBy.point));return DP({axis:a,moveRelativeTo:g,isMoving:s})}return DP({axis:a,moveRelativeTo:p.page,isMoving:s})},EC=(e,t)=>{const n=e.frame;return n?fr(t,n.scroll.diff.displacement):t};const QNe=({impact:e,draggable:t,droppable:n,draggables:r,afterCritical:o})=>{const i=t.page.borderBox.center,s=e.at;return!n||!s?i:s.type==="REORDER"?XNe({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:o}):JNe({impact:e,draggables:r,afterCritical:o})};var e1=e=>{const t=QNe(e),n=e.droppable;return n?EC(n,t):t},DU=(e,t)=>{const n=ko(t,e.scroll.initial),r=Ah(n);return{frame:Hi({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function LP(e,t){return e.map(n=>t[n])}function ZNe(e,t){for(let n=0;n{const i=DU(t,fr(t.scroll.current,o)),s=n.frame?fT(n,fr(n.frame.scroll.current,o)):n,a=e.displaced,c=cg({afterDragging:LP(a.all,r),destination:n,displacedBy:e.displacedBy,viewport:i.frame,last:a,forceShouldAnimate:!1}),u=cg({afterDragging:LP(a.all,r),destination:s,displacedBy:e.displacedBy,viewport:t.frame,last:a,forceShouldAnimate:!1}),f={},p={},g=[a,c,u];return a.all.forEach(v=>{const x=ZNe(v,g);if(x){p[v]=x;return}f[v]=!0}),{...e,displaced:{all:a.all,invisible:f,visible:p}}},t_e=(e,t)=>fr(e.scroll.diff.displacement,t),yT=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const r=t_e(n,e),o=ko(r,t.page.borderBox.center);return fr(t.client.borderBox.center,o)},IU=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:r,withDroppableDisplacement:o,onlyOnMainAxis:i=!1})=>{const s=ko(n,e.page.borderBox.center),c={target:sy(e.page.borderBox,s),destination:t,withDroppableDisplacement:o,viewport:r};return i?zNe(c):MU(c)},n_e=({isMovingForward:e,draggable:t,destination:n,draggables:r,previousImpact:o,viewport:i,previousPageBorderBoxCenter:s,previousClientSelection:a,afterCritical:c})=>{if(!n.isEnabled)return null;const u=Th(n.descriptor.id,r),f=$h(t,n),p=RNe({isMovingForward:e,draggable:t,destination:n,insideDestination:u,previousImpact:o})||WNe({isMovingForward:e,isInHomeList:f,draggable:t,draggables:r,destination:n,insideDestination:u,previousImpact:o,viewport:i,afterCritical:c});if(!p)return null;const g=e1({impact:p,draggable:t,droppable:n,draggables:r,afterCritical:c});if(IU({draggable:t,destination:n,newPageBorderBoxCenter:g,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:yT({pageBorderBoxCenter:g,draggable:t,viewport:i}),impact:p,scrollJumpRequest:null};const v=ko(g,s),x=e_e({impact:p,viewport:i,destination:n,draggables:r,maxScrollChange:v});return{clientSelection:a,impact:x,scrollJumpRequest:v}};const Tr=e=>{const t=e.subject.active;return t||De(),t};var r_e=({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:r,viewport:o})=>{const i=n.subject.active;if(!i)return null;const s=n.axis,a=di(i[s.start],i[s.end]),c=Xw(r).filter(f=>f!==n).filter(f=>f.isEnabled).filter(f=>!!f.subject.active).filter(f=>RU(o.frame)(Tr(f))).filter(f=>{const p=Tr(f);return e?i[s.crossAxisEnd]{const p=Tr(f),g=di(p[s.start],p[s.end]);return a(p[s.start])||a(p[s.end])||g(i[s.start])||g(i[s.end])}).sort((f,p)=>{const g=Tr(f)[s.crossAxisStart],y=Tr(p)[s.crossAxisStart];return e?g-y:y-g}).filter((f,p,g)=>Tr(f)[s.crossAxisStart]===Tr(g[0])[s.crossAxisStart]);if(!c.length)return null;if(c.length===1)return c[0];const u=c.filter(f=>di(Tr(f)[s.start],Tr(f)[s.end])(t[s.line]));return u.length===1?u[0]:u.length>1?u.sort((f,p)=>Tr(f)[s.start]-Tr(p)[s.start])[0]:c.sort((f,p)=>{const g=kP(t,MP(Tr(f))),y=kP(t,MP(Tr(p)));return g!==y?g-y:Tr(f)[s.start]-Tr(p)[s.start]})[0]};const FP=(e,t)=>{const n=e.page.borderBox.center;return cc(e.descriptor.id,t)?ko(n,t.displacedBy.point):n},o_e=(e,t)=>{const n=e.page.borderBox;return cc(e.descriptor.id,t)?sy(n,Ah(t.displacedBy.point)):n};var i_e=({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:r,afterCritical:o})=>r.filter(s=>MU({target:o_e(s,o),destination:n,viewport:t.frame,withDroppableDisplacement:!0})).sort((s,a)=>{const c=ag(e,EC(n,FP(s,o))),u=ag(e,EC(n,FP(a,o)));return c{const r=e.axis;if(e.descriptor.mode==="virtual")return ku(r.line,t[r.line]);const o=e.subject.page.contentBox[r.size],c=Th(e.descriptor.id,n).reduce((u,f)=>u+f.client.marginBox[r.size],0)+t[r.line]-o;return c<=0?null:ku(r.line,c)},LU=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),FU=(e,t,n)=>{const r=e.frame;$h(t,e)&&De(),e.subject.withPlaceholder&&De();const o=ay(e.axis,t.displaceBy).point,i=s_e(e,o,n),s={placeholderSize:o,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const f=Uf({page:e.subject.page,withPlaceholder:s,axis:e.axis,frame:e.frame});return{...e,subject:f}}const a=i?fr(r.scroll.max,i):r.scroll.max,c=LU(r,a),u=Uf({page:e.subject.page,withPlaceholder:s,axis:e.axis,frame:c});return{...e,subject:u,frame:c}},a_e=e=>{const t=e.subject.withPlaceholder;t||De();const n=e.frame;if(!n){const s=Uf({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:s}}const r=t.oldFrameMaxScroll;r||De();const o=LU(n,r),i=Uf({page:e.subject.page,axis:e.axis,frame:o,withPlaceholder:null});return{...e,subject:i,frame:o}};var l_e=({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:n,draggable:r,draggables:o,destination:i,viewport:s,afterCritical:a})=>{if(!t){if(n.length)return null;const p={displaced:lg,displacedBy:$U,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},g=e1({impact:p,draggable:r,droppable:i,draggables:o,afterCritical:a}),y=$h(r,i)?i:FU(i,r,o);return IU({draggable:r,destination:y,newPageBorderBoxCenter:g,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?p:null}const c=e[i.axis.line]<=t.page.borderBox.center[i.axis.line],u=(()=>{const p=t.descriptor.index;return t.descriptor.id===r.descriptor.id||c?p:p+1})(),f=ay(i.axis,r.displaceBy);return Jv({draggable:r,insideDestination:n,destination:i,viewport:s,displacedBy:f,last:lg,index:u})},c_e=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:n,isOver:r,draggables:o,droppables:i,viewport:s,afterCritical:a})=>{const c=r_e({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:i,viewport:s});if(!c)return null;const u=Th(c.descriptor.id,o),f=i_e({pageBorderBoxCenter:t,viewport:s,destination:c,insideDestination:u,afterCritical:a}),p=l_e({previousPageBorderBoxCenter:t,destination:c,draggable:n,draggables:o,moveRelativeTo:f,insideDestination:u,viewport:s,afterCritical:a});if(!p)return null;const g=e1({impact:p,draggable:n,droppable:c,draggables:o,afterCritical:a});return{clientSelection:yT({pageBorderBoxCenter:g,draggable:n,viewport:s}),impact:p,scrollJumpRequest:null}},Mo=e=>{const t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null};const u_e=(e,t)=>{const n=Mo(e);return n?t[n]:null};var d_e=({state:e,type:t})=>{const n=u_e(e.impact,e.dimensions.droppables),r=!!n,o=e.dimensions.droppables[e.critical.droppable.id],i=n||o,s=i.axis.direction,a=s==="vertical"&&(t==="MOVE_UP"||t==="MOVE_DOWN")||s==="horizontal"&&(t==="MOVE_LEFT"||t==="MOVE_RIGHT");if(a&&!r)return null;const c=t==="MOVE_DOWN"||t==="MOVE_RIGHT",u=e.dimensions.draggables[e.critical.draggable.id],f=e.current.page.borderBoxCenter,{draggables:p,droppables:g}=e.dimensions;return a?n_e({isMovingForward:c,previousPageBorderBoxCenter:f,draggable:u,destination:i,draggables:p,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):c_e({isMovingForward:c,previousPageBorderBoxCenter:f,draggable:u,isOver:i,draggables:p,droppables:g,viewport:e.viewport,afterCritical:e.afterCritical})};function tu(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function zU(e){const t=di(e.top,e.bottom),n=di(e.left,e.right);return function(o){return t(o.y)&&n(o.x)}}function f_e(e,t){return e.leftt.left&&e.topt.top}function h_e({pageBorderBox:e,draggable:t,candidates:n}){const r=t.page.borderBox.center,o=n.map(i=>{const s=i.axis,a=ku(i.axis.line,e.center[s.line],i.page.borderBox.center[s.crossAxisLine]);return{id:i.descriptor.id,distance:ag(r,a)}}).sort((i,s)=>s.distance-i.distance);return o[0]?o[0].id:null}function p_e({pageBorderBox:e,draggable:t,droppables:n}){const r=Xw(n).filter(o=>{if(!o.isEnabled)return!1;const i=o.subject.active;if(!i||!f_e(e,i))return!1;if(zU(i)(e.center))return!0;const s=o.axis,a=i.center[s.crossAxisLine],c=e[s.crossAxisStart],u=e[s.crossAxisEnd],f=di(i[s.crossAxisStart],i[s.crossAxisEnd]),p=f(c),g=f(u);return!p&&!g?!0:p?ca});return r.length?r.length===1?r[0].descriptor.id:h_e({pageBorderBox:e,draggable:t,candidates:r}):null}const BU=(e,t)=>Hi(sy(e,t));var m_e=(e,t)=>{const n=e.frame;return n?BU(t,n.scroll.diff.value):t};function VU({displaced:e,id:t}){return!!(e.visible[t]||e.invisible[t])}function g_e({draggable:e,closest:t,inHomeList:n}){return t?n&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}var y_e=({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:n,insideDestination:r,last:o,viewport:i,afterCritical:s})=>{const a=n.axis,c=ay(n.axis,t.displaceBy),u=c.value,f=e[a.start],p=e[a.end],y=Zw(t,r).find(x=>{const S=x.descriptor.id,E=x.page.borderBox.center[a.line],C=cc(S,s),_=VU({displaced:o,id:S});return C?_?p<=E:f{if(!r.isCombineEnabled)return null;const s=r.axis,a=ay(r.axis,e.displaceBy),c=a.value,u=t[s.start],f=t[s.end],g=Zw(e,o).find(v=>{const x=v.descriptor.id,S=v.page.borderBox,C=S[s.size]/b_e,_=cc(x,i),j=VU({displaced:n.displaced,id:x});return _?j?f>S[s.start]+C&&fS[s.start]-c+C&&uS[s.start]+c+C&&fS[s.start]+C&&u{const a=BU(t.page.borderBox,e),c=p_e({pageBorderBox:a,draggable:t,droppables:r});if(!c)return kNe;const u=r[c],f=Th(u.descriptor.id,n),p=m_e(u,a);return v_e({pageBorderBoxWithDroppableScroll:p,draggable:t,previousImpact:o,destination:u,insideDestination:f,afterCritical:s})||y_e({pageBorderBoxWithDroppableScroll:p,draggable:t,destination:u,insideDestination:f,last:o.displaced,viewport:i,afterCritical:s})},bT=(e,t)=>({...e,[t.descriptor.id]:t});const x_e=({previousImpact:e,impact:t,droppables:n})=>{const r=Mo(e),o=Mo(t);if(!r||r===o)return n;const i=n[r];if(!i.subject.withPlaceholder)return n;const s=a_e(i);return bT(n,s)};var w_e=({draggable:e,draggables:t,droppables:n,previousImpact:r,impact:o})=>{const i=x_e({previousImpact:r,impact:o,droppables:n}),s=Mo(o);if(!s)return i;const a=n[s];if($h(e,a)||a.subject.withPlaceholder)return i;const c=FU(a,e,t);return bT(i,c)},xm=({state:e,clientSelection:t,dimensions:n,viewport:r,impact:o,scrollJumpRequest:i})=>{const s=r||e.viewport,a=n||e.dimensions,c=t||e.current.client.selection,u=ko(c,e.initial.client.selection),f={offset:u,selection:c,borderBoxCenter:fr(e.initial.client.borderBoxCenter,u)},p={selection:fr(f.selection,s.scroll.current),borderBoxCenter:fr(f.borderBoxCenter,s.scroll.current),offset:fr(f.offset,s.scroll.diff.value)},g={client:f,page:p};if(e.phase==="COLLECTING")return{...e,dimensions:a,viewport:s,current:g};const y=a.draggables[e.critical.draggable.id],v=o||UU({pageOffset:p.offset,draggable:y,draggables:a.draggables,droppables:a.droppables,previousImpact:e.impact,viewport:s,afterCritical:e.afterCritical}),x=w_e({draggable:y,impact:v,previousImpact:e.impact,draggables:a.draggables,droppables:a.droppables});return{...e,current:g,dimensions:{draggables:a.draggables,droppables:x},impact:v,viewport:s,scrollJumpRequest:i||null,forceShouldAnimate:i?!1:null}};function S_e(e,t){return e.map(n=>t[n])}var HU=({impact:e,viewport:t,draggables:n,destination:r,forceShouldAnimate:o})=>{const i=e.displaced,s=S_e(i.all,n),a=cg({afterDragging:s,destination:r,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:o,last:i});return{...e,displaced:a}},qU=({impact:e,draggable:t,droppable:n,draggables:r,viewport:o,afterCritical:i})=>{const s=e1({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:i});return yT({pageBorderBoxCenter:s,draggable:t,viewport:o})},WU=({state:e,dimensions:t,viewport:n})=>{e.movementMode!=="SNAP"&&De();const r=e.impact,o=n||e.viewport,i=t||e.dimensions,{draggables:s,droppables:a}=i,c=s[e.critical.draggable.id],u=Mo(r);u||De();const f=a[u],p=HU({impact:r,viewport:o,destination:f,draggables:s}),g=qU({impact:p,draggable:c,droppable:f,draggables:s,viewport:o,afterCritical:e.afterCritical});return xm({impact:p,clientSelection:g,state:e,dimensions:i,viewport:o})},E_e=e=>({index:e.index,droppableId:e.droppableId}),GU=({draggable:e,home:t,draggables:n,viewport:r})=>{const o=ay(t.axis,e.displaceBy),i=Th(t.descriptor.id,n),s=i.indexOf(e);s===-1&&De();const a=i.slice(s+1),c=a.reduce((g,y)=>(g[y.descriptor.id]=!0,g),{}),u={inVirtualList:t.descriptor.mode==="virtual",displacedBy:o,effected:c};return{impact:{displaced:cg({afterDragging:a,destination:t,displacedBy:o,last:null,viewport:r.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:E_e(e.descriptor)}},afterCritical:u}},N_e=(e,t)=>({draggables:e.draggables,droppables:bT(e.droppables,t)}),__e=({draggable:e,offset:t,initialWindowScroll:n})=>{const r=Hv(e.client,t),o=qv(r,n);return{...e,placeholder:{...e.placeholder,client:r},client:r,page:o}},C_e=e=>{const t=e.frame;return t||De(),t},O_e=({additions:e,updatedDroppables:t,viewport:n})=>{const r=n.scroll.diff.value;return e.map(o=>{const i=o.descriptor.droppableId,s=t[i],c=C_e(s).scroll.diff.value,u=fr(r,c);return __e({draggable:o,offset:u,initialWindowScroll:n.scroll.initial})})},j_e=({state:e,published:t})=>{const n=t.modified.map(E=>{const C=e.dimensions.droppables[E.droppableId];return fT(C,E.scroll)}),r={...e.dimensions.droppables,...AU(n)},o=TU(O_e({additions:t.additions,updatedDroppables:r,viewport:e.viewport})),i={...e.dimensions.draggables,...o};t.removals.forEach(E=>{delete i[E]});const s={droppables:r,draggables:i},a=Mo(e.impact),c=a?s.droppables[a]:null,u=s.draggables[e.critical.draggable.id],f=s.droppables[e.critical.droppable.id],{impact:p,afterCritical:g}=GU({draggable:u,home:f,draggables:i,viewport:e.viewport}),y=c&&c.isCombineEnabled?e.impact:p,v=UU({pageOffset:e.current.page.offset,draggable:s.draggables[e.critical.draggable.id],draggables:s.draggables,droppables:s.droppables,previousImpact:y,viewport:e.viewport,afterCritical:g}),x={...e,phase:"DRAGGING",impact:v,onLiftImpact:p,dimensions:s,afterCritical:g,forceShouldAnimate:!1};return e.phase==="COLLECTING"?x:{...x,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}};const NC=e=>e.movementMode==="SNAP",pN=(e,t,n)=>{const r=N_e(e.dimensions,t);return!NC(e)||n?xm({state:e,dimensions:r}):WU({state:e,dimensions:r})};function mN(e){return e.isDragging&&e.movementMode==="SNAP"?{...e,scrollJumpRequest:null}:e}const zP={phase:"IDLE",completed:null,shouldFlush:!1};var A_e=(e=zP,t)=>{if(t.type==="FLUSH")return{...zP,shouldFlush:!0};if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&De();const{critical:n,clientSelection:r,viewport:o,dimensions:i,movementMode:s}=t.payload,a=i.draggables[n.draggable.id],c=i.droppables[n.droppable.id],u={selection:r,borderBoxCenter:a.client.borderBox.center,offset:sr},f={client:u,page:{selection:fr(u.selection,o.scroll.initial),borderBoxCenter:fr(u.selection,o.scroll.initial),offset:fr(u.selection,o.scroll.diff.value)}},p=Xw(i.droppables).every(x=>!x.isFixedOnPage),{impact:g,afterCritical:y}=GU({draggable:a,home:c,draggables:i.draggables,viewport:o});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:s,dimensions:i,initial:f,current:f,isWindowScrollAllowed:p,impact:g,afterCritical:y,onLiftImpact:g,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null}}if(t.type==="COLLECTION_STARTING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"?e:(e.phase!=="DRAGGING"&&De(),{...e,phase:"COLLECTING"});if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||De(),j_e({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;tu(e)||De();const{client:n}=t.payload;return ec(n,e.current.client.selection)?e:xm({state:e,clientSelection:n,impact:NC(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return mN(e);tu(e)||De();const{id:n,newScroll:r}=t.payload,o=e.dimensions.droppables[n];if(!o)return e;const i=fT(o,r);return pN(e,i,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;tu(e)||De();const{id:n,isEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||De(),o.isEnabled===r&&De();const i={...o,isEnabled:r};return pN(e,i,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;tu(e)||De();const{id:n,isCombineEnabled:r}=t.payload,o=e.dimensions.droppables[n];o||De(),o.isCombineEnabled===r&&De();const i={...o,isCombineEnabled:r};return pN(e,i,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;tu(e)||De(),e.isWindowScrollAllowed||De();const n=t.payload.newScroll;if(ec(e.viewport.scroll.current,n))return mN(e);const r=DU(e.viewport,n);return NC(e)?WU({state:e,viewport:r}):xm({state:e,viewport:r})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!tu(e))return e;const n=t.payload.maxScroll;if(ec(n,e.viewport.scroll.max))return e;const r={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:r}}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&De();const n=d_e({state:e,type:t.type});return n?xm({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){const n=t.payload.reason;return e.phase!=="COLLECTING"&&De(),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if(t.type==="DROP_ANIMATE"){const{completed:n,dropDuration:r,newHomeClientOffset:o}=t.payload;return e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||De(),{phase:"DROP_ANIMATING",completed:n,dropDuration:r,newHomeClientOffset:o,dimensions:e.dimensions}}if(t.type==="DROP_COMPLETE"){const{completed:n}=t.payload;return{phase:"IDLE",completed:n,shouldFlush:!1}}return e};function Bt(e,t){return e instanceof Object&&"type"in e&&e.type===t}const T_e=e=>({type:"BEFORE_INITIAL_CAPTURE",payload:e}),$_e=e=>({type:"LIFT",payload:e}),R_e=e=>({type:"INITIAL_PUBLISH",payload:e}),k_e=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),M_e=()=>({type:"COLLECTION_STARTING",payload:null}),P_e=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),D_e=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),I_e=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),JU=e=>({type:"MOVE",payload:e}),L_e=e=>({type:"MOVE_BY_WINDOW_SCROLL",payload:e}),F_e=e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}),z_e=()=>({type:"MOVE_UP",payload:null}),B_e=()=>({type:"MOVE_DOWN",payload:null}),V_e=()=>({type:"MOVE_RIGHT",payload:null}),U_e=()=>({type:"MOVE_LEFT",payload:null}),vT=()=>({type:"FLUSH",payload:null}),H_e=e=>({type:"DROP_ANIMATE",payload:e}),xT=e=>({type:"DROP_COMPLETE",payload:e}),YU=e=>({type:"DROP",payload:e}),q_e=e=>({type:"DROP_PENDING",payload:e}),KU=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});var W_e=e=>({getState:t,dispatch:n})=>r=>o=>{if(!Bt(o,"LIFT")){r(o);return}const{id:i,clientSelection:s,movementMode:a}=o.payload,c=t();c.phase==="DROP_ANIMATING"&&n(xT({completed:c.completed})),t().phase!=="IDLE"&&De(),n(vT()),n(T_e({draggableId:i,movementMode:a}));const f={draggableId:i,scrollOptions:{shouldPublishImmediately:a==="SNAP"}},{critical:p,dimensions:g,viewport:y}=e.startPublishing(f);n(R_e({critical:p,dimensions:g,clientSelection:s,movementMode:a,viewport:y}))},G_e=e=>()=>t=>n=>{Bt(n,"INITIAL_PUBLISH")&&e.dragging(),Bt(n,"DROP_ANIMATE")&&e.dropping(n.payload.completed.result.reason),(Bt(n,"FLUSH")||Bt(n,"DROP_COMPLETE"))&&e.resting(),t(n)};const wT={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},ug={opacity:{drop:0,combining:.7},scale:{drop:.75}},XU={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Kc=`${XU.outOfTheWay}s ${wT.outOfTheWay}`,wm={fluid:`opacity ${Kc}`,snap:`transform ${Kc}, opacity ${Kc}`,drop:e=>{const t=`${e}s ${wT.drop}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${Kc}`,placeholder:`height ${Kc}, width ${Kc}, margin ${Kc}`},BP=e=>ec(e,sr)?void 0:`translate(${e.x}px, ${e.y}px)`,_C={moveTo:BP,drop:(e,t)=>{const n=BP(e);if(n)return t?`${n} scale(${ug.scale.drop})`:n}},{minDropTime:CC,maxDropTime:QU}=XU,J_e=QU-CC,VP=1500,Y_e=.6;var K_e=({current:e,destination:t,reason:n})=>{const r=ag(e,t);if(r<=0)return CC;if(r>=VP)return QU;const o=r/VP,i=CC+J_e*o,s=n==="CANCEL"?i*Y_e:i;return Number(s.toFixed(2))},X_e=({impact:e,draggable:t,dimensions:n,viewport:r,afterCritical:o})=>{const{draggables:i,droppables:s}=n,a=Mo(e),c=a?s[a]:null,u=s[t.descriptor.droppableId],f=qU({impact:e,draggable:t,draggables:i,afterCritical:o,droppable:c||u,viewport:r});return ko(f,t.client.borderBox.center)},Q_e=({draggables:e,reason:t,lastImpact:n,home:r,viewport:o,onLiftImpact:i})=>!n.at||t!=="DROP"?{impact:HU({draggables:e,impact:i,destination:r,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1}:n.at.type==="REORDER"?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:lg},didDropInsideDroppable:!0};const Z_e=({getState:e,dispatch:t})=>n=>r=>{if(!Bt(r,"DROP")){n(r);return}const o=e(),i=r.payload.reason;if(o.phase==="COLLECTING"){t(q_e({reason:i}));return}if(o.phase==="IDLE")return;o.phase==="DROP_PENDING"&&o.isWaiting&&De(),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||De();const a=o.critical,c=o.dimensions,u=c.draggables[o.critical.draggable.id],{impact:f,didDropInsideDroppable:p}=Q_e({reason:i,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),g=p?hT(f):null,y=p?Qw(f):null,v={index:a.draggable.index,droppableId:a.droppable.id},x={draggableId:u.descriptor.id,type:u.descriptor.type,source:v,reason:i,mode:o.movementMode,destination:g,combine:y},S=X_e({impact:f,draggable:u,dimensions:c,viewport:o.viewport,afterCritical:o.afterCritical}),E={critical:o.critical,afterCritical:o.afterCritical,result:x,impact:f};if(!(!ec(o.current.client.offset,S)||!!x.combine)){t(xT({completed:E}));return}const _=K_e({current:o.current.client.offset,destination:S,reason:i});t(H_e({newHomeClientOffset:S,dropDuration:_,completed:E}))};var ZU=()=>({x:window.pageXOffset,y:window.pageYOffset});function eCe(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}function tCe({onWindowScroll:e}){function t(){e(ZU())}const n=sg(t),r=eCe(n);let o=Zl;function i(){return o!==Zl}function s(){i()&&De(),o=li(window,[r])}function a(){i()||De(),n.cancel(),o(),o=Zl}return{start:s,stop:a,isActive:i}}const nCe=e=>Bt(e,"DROP_COMPLETE")||Bt(e,"DROP_ANIMATE")||Bt(e,"FLUSH"),rCe=e=>{const t=tCe({onWindowScroll:n=>{e.dispatch(L_e({newScroll:n}))}});return n=>r=>{!t.isActive()&&Bt(r,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&nCe(r)&&t.stop(),n(r)}};var oCe=e=>{let t=!1,n=!1;const r=setTimeout(()=>{n=!0}),o=i=>{t||n||(t=!0,e(i),clearTimeout(r))};return o.wasCalled=()=>t,o},iCe=()=>{const e=[],t=o=>{const i=e.findIndex(a=>a.timerId===o);i===-1&&De();const[s]=e.splice(i,1);s.callback()};return{add:o=>{const i=setTimeout(()=>t(i)),s={timerId:i,callback:o};e.push(s)},flush:()=>{if(!e.length)return;const o=[...e];e.length=0,o.forEach(i=>{clearTimeout(i.timerId),i.callback()})}}};const sCe=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.droppableId===t.droppableId&&e.index===t.index,aCe=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.draggableId===t.draggableId&&e.droppableId===t.droppableId,lCe=(e,t)=>{if(e===t)return!0;const n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r},Hp=(e,t)=>{t()},cb=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function gN(e,t,n,r){if(!e){n(r(t));return}const o=oCe(n);e(t,{announce:o}),o.wasCalled()||n(r(t))}var cCe=(e,t)=>{const n=iCe();let r=null;const o=(p,g)=>{r&&De(),Hp("onBeforeCapture",()=>{const y=e().onBeforeCapture;y&&y({draggableId:p,mode:g})})},i=(p,g)=>{r&&De(),Hp("onBeforeDragStart",()=>{const y=e().onBeforeDragStart;y&&y(cb(p,g))})},s=(p,g)=>{r&&De();const y=cb(p,g);r={mode:g,lastCritical:p,lastLocation:y.source,lastCombine:null},n.add(()=>{Hp("onDragStart",()=>gN(e().onDragStart,y,t,Vb.onDragStart))})},a=(p,g)=>{const y=hT(g),v=Qw(g);r||De();const x=!lCe(p,r.lastCritical);x&&(r.lastCritical=p);const S=!sCe(r.lastLocation,y);S&&(r.lastLocation=y);const E=!aCe(r.lastCombine,v);if(E&&(r.lastCombine=v),!x&&!S&&!E)return;const C={...cb(p,r.mode),combine:v,destination:y};n.add(()=>{Hp("onDragUpdate",()=>gN(e().onDragUpdate,C,t,Vb.onDragUpdate))})},c=()=>{r||De(),n.flush()},u=p=>{r||De(),r=null,Hp("onDragEnd",()=>gN(e().onDragEnd,p,t,Vb.onDragEnd))};return{beforeCapture:o,beforeStart:i,start:s,update:a,flush:c,drop:u,abort:()=>{if(!r)return;const p={...cb(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};u(p)}}},uCe=(e,t)=>{const n=cCe(e,t);return r=>o=>i=>{if(Bt(i,"BEFORE_INITIAL_CAPTURE")){n.beforeCapture(i.payload.draggableId,i.payload.movementMode);return}if(Bt(i,"INITIAL_PUBLISH")){const a=i.payload.critical;n.beforeStart(a,i.payload.movementMode),o(i),n.start(a,i.payload.movementMode);return}if(Bt(i,"DROP_COMPLETE")){const a=i.payload.completed.result;n.flush(),o(i),n.drop(a);return}if(o(i),Bt(i,"FLUSH")){n.abort();return}const s=r.getState();s.phase==="DRAGGING"&&n.update(s.critical,s.impact)}};const dCe=e=>t=>n=>{if(!Bt(n,"DROP_ANIMATION_FINISHED")){t(n);return}const r=e.getState();r.phase!=="DROP_ANIMATING"&&De(),e.dispatch(xT({completed:r.completed}))},fCe=e=>{let t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return o=>i=>{if((Bt(i,"FLUSH")||Bt(i,"DROP_COMPLETE")||Bt(i,"DROP_ANIMATION_FINISHED"))&&r(),o(i),!Bt(i,"DROP_ANIMATE"))return;const s={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){e.getState().phase==="DROP_ANIMATING"&&e.dispatch(KU())}};n=requestAnimationFrame(()=>{n=null,t=li(window,[s])})}};var hCe=e=>()=>t=>n=>{(Bt(n,"DROP_COMPLETE")||Bt(n,"FLUSH")||Bt(n,"DROP_ANIMATE"))&&e.stopPublishing(),t(n)},pCe=e=>{let t=!1;return()=>n=>r=>{if(Bt(r,"INITIAL_PUBLISH")){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(Bt(r,"FLUSH")){t=!1,e.tryRestoreFocusRecorded();return}if(Bt(r,"DROP_COMPLETE")){t=!1;const o=r.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}};const mCe=e=>Bt(e,"DROP_COMPLETE")||Bt(e,"DROP_ANIMATE")||Bt(e,"FLUSH");var gCe=e=>t=>n=>r=>{if(mCe(r)){e.stop(),n(r);return}if(Bt(r,"INITIAL_PUBLISH")){n(r);const o=t.getState();o.phase!=="DRAGGING"&&De(),e.start(o);return}n(r),e.scroll(t.getState())};const yCe=e=>t=>n=>{if(t(n),!Bt(n,"PUBLISH_WHILE_DRAGGING"))return;const r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(YU({reason:r.reason})))},bCe=mU;var vCe=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:r,announce:o,autoScroller:i})=>pU(A_e,bCe(g2e(G_e(n),hCe(e),W_e(e),Z_e,dCe,fCe,yCe,gCe(i),rCe,pCe(t),uCe(r,o))));const yN=()=>({additions:{},removals:{},modified:{}});function xCe({registry:e,callbacks:t}){let n=yN(),r=null;const o=()=>{r||(t.collectionStarting(),r=requestAnimationFrame(()=>{r=null;const{additions:c,removals:u,modified:f}=n,p=Object.keys(c).map(v=>e.draggable.getById(v).getDimension(sr)).sort((v,x)=>v.descriptor.index-x.descriptor.index),g=Object.keys(f).map(v=>{const S=e.droppable.getById(v).callbacks.getScrollWhileDragging();return{droppableId:v,scroll:S}}),y={additions:p,removals:Object.keys(u),modified:g};n=yN(),t.publish(y)}))};return{add:c=>{const u=c.descriptor.id;n.additions[u]=c,n.modified[c.descriptor.droppableId]=!0,n.removals[u]&&delete n.removals[u],o()},remove:c=>{const u=c.descriptor;n.removals[u.id]=!0,n.modified[u.droppableId]=!0,n.additions[u.id]&&delete n.additions[u.id],o()},stop:()=>{r&&(cancelAnimationFrame(r),r=null,n=yN())}}}var eH=({scrollHeight:e,scrollWidth:t,height:n,width:r})=>{const o=ko({x:t,y:e},{x:r,y:n});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},tH=()=>{const e=document.documentElement;return e||De(),e},nH=()=>{const e=tH();return eH({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},wCe=()=>{const e=ZU(),t=nH(),n=e.y,r=e.x,o=tH(),i=o.clientWidth,s=o.clientHeight,a=r+i,c=n+s;return{frame:Hi({top:n,left:r,right:a,bottom:c}),scroll:{initial:e,current:e,max:t,diff:{value:sr,displacement:sr}}}},SCe=({critical:e,scrollOptions:t,registry:n})=>{const r=wCe(),o=r.scroll.current,i=e.droppable,s=n.droppable.getAllByType(i.type).map(f=>f.callbacks.getDimensionAndWatchScroll(o,t)),a=n.draggable.getAllByType(e.draggable.type).map(f=>f.getDimension(o));return{dimensions:{draggables:TU(a),droppables:AU(s)},critical:e,viewport:r}};function UP(e,t,n){return!(n.descriptor.id===t.id||n.descriptor.type!==t.type||e.droppable.getById(n.descriptor.droppableId).descriptor.mode!=="virtual")}var ECe=(e,t)=>{let n=null;const r=xCe({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=(g,y)=>{e.droppable.exists(g)||De(),n&&t.updateDroppableIsEnabled({id:g,isEnabled:y})},i=(g,y)=>{n&&(e.droppable.exists(g)||De(),t.updateDroppableIsCombineEnabled({id:g,isCombineEnabled:y}))},s=(g,y)=>{n&&(e.droppable.exists(g)||De(),t.updateDroppableScroll({id:g,newScroll:y}))},a=(g,y)=>{n&&e.droppable.getById(g).callbacks.scroll(y)},c=()=>{if(!n)return;r.stop();const g=n.critical.droppable;e.droppable.getAllByType(g.type).forEach(y=>y.callbacks.dragStopped()),n.unsubscribe(),n=null},u=g=>{n||De();const y=n.critical.draggable;g.type==="ADDITION"&&UP(e,y,g.value)&&r.add(g.value),g.type==="REMOVAL"&&UP(e,y,g.value)&&r.remove(g.value)};return{updateDroppableIsEnabled:o,updateDroppableIsCombineEnabled:i,scrollDroppable:a,updateDroppableScroll:s,startPublishing:g=>{n&&De();const y=e.draggable.getById(g.draggableId),v=e.droppable.getById(y.descriptor.droppableId),x={draggable:y.descriptor,droppable:v.descriptor},S=e.subscribe(u);return n={critical:x,unsubscribe:S},SCe({critical:x,registry:e,scrollOptions:g.scrollOptions})},stopPublishing:c}},rH=(e,t)=>e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP",NCe=e=>{window.scrollBy(e.x,e.y)};const _Ce=or(e=>Xw(e).filter(t=>!(!t.isEnabled||!t.frame))),CCe=(e,t)=>_Ce(t).find(r=>(r.frame||De(),zU(r.frame.pageMarginBox)(e)))||null;var OCe=({center:e,destination:t,droppables:n})=>{if(t){const o=n[t];return o.frame?o:null}return CCe(e,n)};const dg={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var jCe=(e,t,n=()=>dg)=>{const r=n(),o=e[t.size]*r.startFromPercentage,i=e[t.size]*r.maxScrollAtPercentage;return{startScrollingFrom:o,maxScrollValueAt:i}},oH=({startOfRange:e,endOfRange:t,current:n})=>{const r=t-e;return r===0?0:(n-e)/r},ST=1,ACe=(e,t,n=()=>dg)=>{const r=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return r.maxPixelScroll;if(e===t.startScrollingFrom)return ST;const i=1-oH({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),s=r.maxPixelScroll*r.ease(i);return Math.ceil(s)},TCe=(e,t,n)=>{const r=n(),o=r.durationDampening.accelerateAt,i=r.durationDampening.stopDampeningAt,s=t,a=i,u=Date.now()-s;if(u>=i)return e;if(u{const i=ACe(e,t,o);return i===0?0:r?Math.max(TCe(i,n,o),ST):i},qP=({container:e,distanceToEdges:t,dragStartTime:n,axis:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const s=jCe(e,r,i);return t[r.end]{const r=t.height>e.height,o=t.width>e.width;return!o&&!r?n:o&&r?null:{x:o?0:n.x,y:r?0:n.y}};const RCe=jU(e=>e===0?0:e);var iH=({dragStartTime:e,container:t,subject:n,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const s={top:r.y-t.top,right:t.right-r.x,bottom:t.bottom-r.y,left:r.x-t.left},a=qP({container:t,distanceToEdges:s,dragStartTime:e,axis:pT,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),c=qP({container:t,distanceToEdges:s,dragStartTime:e,axis:kU,shouldUseTimeDampening:o,getAutoScrollerOptions:i}),u=RCe({x:c,y:a});if(ec(u,sr))return null;const f=$Ce({container:t,subject:n,proposedScroll:u});return f?ec(f,sr)?null:f:null};const kCe=jU(e=>e===0?0:e>0?1:-1),ET=(()=>{const e=(t,n)=>t<0?t:t>n?t-n:0;return({current:t,max:n,change:r})=>{const o=fr(t,r),i={x:e(o.x,n.x),y:e(o.y,n.y)};return ec(i,sr)?null:i}})(),sH=({max:e,current:t,change:n})=>{const r={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},o=kCe(n),i=ET({max:r,current:t,change:o});return!i||o.x!==0&&i.x===0||o.y!==0&&i.y===0},NT=(e,t)=>sH({current:e.scroll.current,max:e.scroll.max,change:t}),MCe=(e,t)=>{if(!NT(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return ET({current:r,max:n,change:t})},_T=(e,t)=>{const n=e.frame;return n?sH({current:n.scroll.current,max:n.scroll.max,change:t}):!1},PCe=(e,t)=>{const n=e.frame;return!n||!_T(e,t)?null:ET({current:n.scroll.current,max:n.scroll.max,change:t})};var DCe=({viewport:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const s=iH({dragStartTime:r,container:e.frame,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return s&&NT(e,s)?s:null},ICe=({droppable:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:i})=>{const s=e.frame;if(!s)return null;const a=iH({dragStartTime:r,container:s.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:o,getAutoScrollerOptions:i});return a&&_T(e,a)?a:null},WP=({state:e,dragStartTime:t,shouldUseTimeDampening:n,scrollWindow:r,scrollDroppable:o,getAutoScrollerOptions:i})=>{const s=e.current.page.borderBoxCenter,c=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const p=e.viewport,g=DCe({dragStartTime:t,viewport:p,subject:c,center:s,shouldUseTimeDampening:n,getAutoScrollerOptions:i});if(g){r(g);return}}const u=OCe({center:s,destination:Mo(e.impact),droppables:e.dimensions.droppables});if(!u)return;const f=ICe({dragStartTime:t,droppable:u,subject:c,center:s,shouldUseTimeDampening:n,getAutoScrollerOptions:i});f&&o(u.descriptor.id,f)},LCe=({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>dg})=>{const r=sg(e),o=sg(t);let i=null;const s=u=>{i||De();const{shouldUseTimeDampening:f,dragStartTime:p}=i;WP({state:u,scrollWindow:r,scrollDroppable:o,dragStartTime:p,shouldUseTimeDampening:f,getAutoScrollerOptions:n})};return{start:u=>{i&&De();const f=Date.now();let p=!1;const g=()=>{p=!0};WP({state:u,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:g,scrollDroppable:g,getAutoScrollerOptions:n}),i={dragStartTime:f,shouldUseTimeDampening:p},p&&s(u)},stop:()=>{i&&(r.cancel(),o.cancel(),i=null)},scroll:s}},FCe=({move:e,scrollDroppable:t,scrollWindow:n})=>{const r=(a,c)=>{const u=fr(a.current.client.selection,c);e({client:u})},o=(a,c)=>{if(!_T(a,c))return c;const u=PCe(a,c);if(!u)return t(a.descriptor.id,c),null;const f=ko(c,u);return t(a.descriptor.id,f),ko(c,f)},i=(a,c,u)=>{if(!a||!NT(c,u))return u;const f=MCe(c,u);if(!f)return n(u),null;const p=ko(u,f);return n(p),ko(u,p)};return a=>{const c=a.scrollJumpRequest;if(!c)return;const u=Mo(a.impact);u||De();const f=o(a.dimensions.droppables[u],c);if(!f)return;const p=a.viewport,g=i(a.isWindowScrollAllowed,p,f);g&&r(a,g)}},zCe=({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:r})=>{const o=LCe({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:r}),i=FCe({move:n,scrollWindow:t,scrollDroppable:e});return{scroll:c=>{if(!(r().disabled||c.phase!=="DRAGGING")){if(c.movementMode==="FLUID"){o.scroll(c);return}c.scrollJumpRequest&&i(c)}},start:o.start,stop:o.stop}};const Hf="data-rfd",qf=(()=>{const e=`${Hf}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),OC=(()=>{const e=`${Hf}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),BCe=(()=>{const e=`${Hf}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),GP={contextId:`${Hf}-scroll-container-context-id`},VCe=e=>t=>`[${t}="${e}"]`,qp=(e,t)=>e.map(n=>{const r=n.styles[t];return r?`${n.selector} { ${r} }`:""}).join(" "),UCe="pointer-events: none;";var HCe=e=>{const t=VCe(e),n=(()=>{const a=` + cursor: -webkit-grab; + cursor: grab; + `;return{selector:t(qf.contextId),styles:{always:` + -webkit-touch-callout: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); + touch-action: manipulation; + `,resting:a,dragging:UCe,dropAnimating:a}}})(),r=(()=>{const a=` + transition: ${wm.outOfTheWay}; + `;return{selector:t(OC.contextId),styles:{dragging:a,dropAnimating:a,userCancel:a}}})(),o={selector:t(BCe.contextId),styles:{always:"overflow-anchor: none;"}},s=[r,n,o,{selector:"body",styles:{dragging:` + cursor: grabbing; + cursor: -webkit-grabbing; + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + overflow-anchor: none; + `}}];return{always:qp(s,"always"),resting:qp(s,"resting"),dragging:qp(s,"dragging"),dropAnimating:qp(s,"dropAnimating"),userCancel:qp(s,"userCancel")}};const Po=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?w.useLayoutEffect:w.useEffect,bN=()=>{const e=document.querySelector("head");return e||De(),e},JP=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function qCe(e,t){const n=_t(()=>HCe(e),[e]),r=w.useRef(null),o=w.useRef(null),i=Ze(or(p=>{const g=o.current;g||De(),g.textContent=p}),[]),s=Ze(p=>{const g=r.current;g||De(),g.textContent=p},[]);Po(()=>{!r.current&&!o.current||De();const p=JP(t),g=JP(t);return r.current=p,o.current=g,p.setAttribute(`${Hf}-always`,e),g.setAttribute(`${Hf}-dynamic`,e),bN().appendChild(p),bN().appendChild(g),s(n.always),i(n.resting),()=>{const y=v=>{const x=v.current;x||De(),bN().removeChild(x),v.current=null};y(r),y(o)}},[t,s,i,n.always,n.resting,e]);const a=Ze(()=>i(n.dragging),[i,n.dragging]),c=Ze(p=>{if(p==="DROP"){i(n.dropAnimating);return}i(n.userCancel)},[i,n.dropAnimating,n.userCancel]),u=Ze(()=>{o.current&&i(n.resting)},[i,n.resting]);return _t(()=>({dragging:a,dropping:c,resting:u}),[a,c,u])}function aH(e,t){return Array.from(e.querySelectorAll(t))}var lH=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function t1(e){return e instanceof lH(e).HTMLElement}function WCe(e,t){const n=`[${qf.contextId}="${e}"]`,r=aH(document,n);if(!r.length)return null;const o=r.find(i=>i.getAttribute(qf.draggableId)===t);return!o||!t1(o)?null:o}function GCe(e){const t=w.useRef({}),n=w.useRef(null),r=w.useRef(null),o=w.useRef(!1),i=Ze(function(g,y){const v={id:g,focus:y};return t.current[g]=v,function(){const S=t.current;S[g]!==v&&delete S[g]}},[]),s=Ze(function(g){const y=WCe(e,g);y&&y!==document.activeElement&&y.focus()},[e]),a=Ze(function(g,y){n.current===g&&(n.current=y)},[]),c=Ze(function(){r.current||o.current&&(r.current=requestAnimationFrame(()=>{r.current=null;const g=n.current;g&&s(g)}))},[s]),u=Ze(function(g){n.current=null;const y=document.activeElement;y&&y.getAttribute(qf.draggableId)===g&&(n.current=g)},[]);return Po(()=>(o.current=!0,function(){o.current=!1;const g=r.current;g&&cancelAnimationFrame(g)}),[]),_t(()=>({register:i,tryRecordFocus:u,tryRestoreFocusRecorded:c,tryShiftRecord:a}),[i,u,c,a])}function JCe(){const e={draggables:{},droppables:{}},t=[];function n(p){return t.push(p),function(){const y=t.indexOf(p);y!==-1&&t.splice(y,1)}}function r(p){t.length&&t.forEach(g=>g(p))}function o(p){return e.draggables[p]||null}function i(p){const g=o(p);return g||De(),g}const s={register:p=>{e.draggables[p.descriptor.id]=p,r({type:"ADDITION",value:p})},update:(p,g)=>{const y=e.draggables[g.descriptor.id];y&&y.uniqueId===p.uniqueId&&(delete e.draggables[g.descriptor.id],e.draggables[p.descriptor.id]=p)},unregister:p=>{const g=p.descriptor.id,y=o(g);y&&p.uniqueId===y.uniqueId&&(delete e.draggables[g],e.droppables[p.descriptor.droppableId]&&r({type:"REMOVAL",value:p}))},getById:i,findById:o,exists:p=>!!o(p),getAllByType:p=>Object.values(e.draggables).filter(g=>g.descriptor.type===p)};function a(p){return e.droppables[p]||null}function c(p){const g=a(p);return g||De(),g}const u={register:p=>{e.droppables[p.descriptor.id]=p},unregister:p=>{const g=a(p.descriptor.id);g&&p.uniqueId===g.uniqueId&&delete e.droppables[p.descriptor.id]},getById:c,findById:a,exists:p=>!!a(p),getAllByType:p=>Object.values(e.droppables).filter(g=>g.descriptor.type===p)};function f(){e.draggables={},e.droppables={},t.length=0}return{draggable:s,droppable:u,subscribe:n,clean:f}}function YCe(){const e=_t(JCe,[]);return w.useEffect(()=>function(){e.clean()},[e]),e}var CT=Ne.createContext(null),Yv=()=>{const e=document.body;return e||De(),e};const KCe={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},XCe=e=>`rfd-announcement-${e}`;function QCe(e){const t=_t(()=>XCe(e),[e]),n=w.useRef(null);return w.useEffect(function(){const i=document.createElement("div");return n.current=i,i.id=t,i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),Tf(i.style,KCe),Yv().appendChild(i),function(){setTimeout(function(){const c=Yv();c.contains(i)&&c.removeChild(i),i===n.current&&(n.current=null)})}},[t]),Ze(o=>{const i=n.current;if(i){i.textContent=o;return}},[])}const ZCe={separator:"::"};function OT(e,t=ZCe){const n=Ne.useId();return _t(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}function eOe({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}function tOe({contextId:e,text:t}){const n=OT("hidden-text",{separator:"-"}),r=_t(()=>eOe({contextId:e,uniqueId:n}),[n,e]);return w.useEffect(function(){const i=document.createElement("div");return i.id=r,i.textContent=t,i.style.display="none",Yv().appendChild(i),function(){const a=Yv();a.contains(i)&&a.removeChild(i)}},[r,t]),r}var n1=Ne.createContext(null);function cH(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),t}function nOe(){let e=null;function t(){return!!e}function n(s){return s===e}function r(s){e&&De();const a={abandon:s};return e=a,a}function o(){e||De(),e=null}function i(){e&&(e.abandon(),o())}return{isClaimed:t,isActive:n,claim:r,release:o,tryAbandon:i}}function fg(e){return e.phase==="IDLE"||e.phase==="DROP_ANIMATING"?!1:e.isDragging}const rOe=9,oOe=13,jT=27,uH=32,iOe=33,sOe=34,aOe=35,lOe=36,cOe=37,uOe=38,dOe=39,fOe=40,hOe={[oOe]:!0,[rOe]:!0};var dH=e=>{hOe[e.keyCode]&&e.preventDefault()};const r1=(()=>{const e="visibilitychange";return typeof document>"u"?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(r=>`on${r}`in document)||e})(),fH=0,YP=5;function pOe(e,t){return Math.abs(t.x-e.x)>=YP||Math.abs(t.y-e.y)>=YP}const KP={type:"IDLE"};function mOe({cancel:e,completed:t,getPhase:n,setPhase:r}){return[{eventName:"mousemove",fn:o=>{const{button:i,clientX:s,clientY:a}=o;if(i!==fH)return;const c={x:s,y:a},u=n();if(u.type==="DRAGGING"){o.preventDefault(),u.actions.move(c);return}u.type!=="PENDING"&&De();const f=u.point;if(!pOe(f,c))return;o.preventDefault();const p=u.actions.fluidLift(c);r({type:"DRAGGING",actions:p})}},{eventName:"mouseup",fn:o=>{const i=n();if(i.type!=="DRAGGING"){e();return}o.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"mousedown",fn:o=>{n().type==="DRAGGING"&&o.preventDefault(),e()}},{eventName:"keydown",fn:o=>{if(n().type==="PENDING"){e();return}if(o.keyCode===jT){o.preventDefault(),e();return}dH(o)}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{n().type==="PENDING"&&e()}},{eventName:"webkitmouseforcedown",fn:o=>{const i=n();if(i.type==="IDLE"&&De(),i.actions.shouldRespectForcePress()){e();return}o.preventDefault()}},{eventName:r1,fn:e}]}function gOe(e){const t=w.useRef(KP),n=w.useRef(Zl),r=_t(()=>({eventName:"mousedown",fn:function(p){if(p.defaultPrevented||p.button!==fH||p.ctrlKey||p.metaKey||p.shiftKey||p.altKey)return;const g=e.findClosestDraggableId(p);if(!g)return;const y=e.tryGetLock(g,s,{sourceEvent:p});if(!y)return;p.preventDefault();const v={x:p.clientX,y:p.clientY};n.current(),u(y,v)}}),[e]),o=_t(()=>({eventName:"webkitmouseforcewillbegin",fn:f=>{if(f.defaultPrevented)return;const p=e.findClosestDraggableId(f);if(!p)return;const g=e.findOptionsForDraggable(p);g&&(g.shouldRespectForcePress||e.canGetLock(p)&&f.preventDefault())}}),[e]),i=Ze(function(){const p={passive:!1,capture:!0};n.current=li(window,[o,r],p)},[o,r]),s=Ze(()=>{t.current.type!=="IDLE"&&(t.current=KP,n.current(),i())},[i]),a=Ze(()=>{const f=t.current;s(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[s]),c=Ze(function(){const p={capture:!0,passive:!1},g=mOe({cancel:a,completed:s,getPhase:()=>t.current,setPhase:y=>{t.current=y}});n.current=li(window,g,p)},[a,s]),u=Ze(function(p,g){t.current.type!=="IDLE"&&De(),t.current={type:"PENDING",point:g,actions:p},c()},[c]);Po(function(){return i(),function(){n.current()}},[i])}function yOe(){}const bOe={[sOe]:!0,[iOe]:!0,[lOe]:!0,[aOe]:!0};function vOe(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:o=>{if(o.keyCode===jT){o.preventDefault(),n();return}if(o.keyCode===uH){o.preventDefault(),r();return}if(o.keyCode===fOe){o.preventDefault(),e.moveDown();return}if(o.keyCode===uOe){o.preventDefault(),e.moveUp();return}if(o.keyCode===dOe){o.preventDefault(),e.moveRight();return}if(o.keyCode===cOe){o.preventDefault(),e.moveLeft();return}if(bOe[o.keyCode]){o.preventDefault();return}dH(o)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:r1,fn:n}]}function xOe(e){const t=w.useRef(yOe),n=_t(()=>({eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==uH)return;const s=e.findClosestDraggableId(i);if(!s)return;const a=e.tryGetLock(s,f,{sourceEvent:i});if(!a)return;i.preventDefault();let c=!0;const u=a.snapLift();t.current();function f(){c||De(),c=!1,t.current(),r()}t.current=li(window,vOe(u,f),{capture:!0,passive:!1})}}),[e]),r=Ze(function(){const i={passive:!1,capture:!0};t.current=li(window,[n],i)},[n]);Po(function(){return r(),function(){t.current()}},[r])}const vN={type:"IDLE"},wOe=120,SOe=.15;function EOe({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:n=>{n.preventDefault()}},{eventName:"keydown",fn:n=>{if(t().type!=="DRAGGING"){e();return}n.keyCode===jT&&n.preventDefault(),e()}},{eventName:r1,fn:e}]}function NOe({cancel:e,completed:t,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:r=>{const o=n();if(o.type!=="DRAGGING"){e();return}o.hasMoved=!0;const{clientX:i,clientY:s}=r.touches[0],a={x:i,y:s};r.preventDefault(),o.actions.move(a)}},{eventName:"touchend",fn:r=>{const o=n();if(o.type!=="DRAGGING"){e();return}r.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"touchcancel",fn:r=>{if(n().type!=="DRAGGING"){e();return}r.preventDefault(),e()}},{eventName:"touchforcechange",fn:r=>{const o=n();o.type==="IDLE"&&De();const i=r.touches[0];if(!i||!(i.force>=SOe))return;const a=o.actions.shouldRespectForcePress();if(o.type==="PENDING"){a&&e();return}if(a){if(o.hasMoved){r.preventDefault();return}e();return}r.preventDefault()}},{eventName:r1,fn:e}]}function _Oe(e){const t=w.useRef(vN),n=w.useRef(Zl),r=Ze(function(){return t.current},[]),o=Ze(function(y){t.current=y},[]),i=_t(()=>({eventName:"touchstart",fn:function(y){if(y.defaultPrevented)return;const v=e.findClosestDraggableId(y);if(!v)return;const x=e.tryGetLock(v,a,{sourceEvent:y});if(!x)return;const S=y.touches[0],{clientX:E,clientY:C}=S,_={x:E,y:C};n.current(),p(x,_)}}),[e]),s=Ze(function(){const y={capture:!0,passive:!1};n.current=li(window,[i],y)},[i]),a=Ze(()=>{const g=t.current;g.type!=="IDLE"&&(g.type==="PENDING"&&clearTimeout(g.longPressTimerId),o(vN),n.current(),s())},[s,o]),c=Ze(()=>{const g=t.current;a(),g.type==="DRAGGING"&&g.actions.cancel({shouldBlockNextClick:!0}),g.type==="PENDING"&&g.actions.abort()},[a]),u=Ze(function(){const y={capture:!0,passive:!1},v={cancel:c,completed:a,getPhase:r},x=li(window,NOe(v),y),S=li(window,EOe(v),y);n.current=function(){x(),S()}},[c,r,a]),f=Ze(function(){const y=r();y.type!=="PENDING"&&De();const v=y.actions.fluidLift(y.point);o({type:"DRAGGING",actions:v,hasMoved:!1})},[r,o]),p=Ze(function(y,v){r().type!=="IDLE"&&De();const x=setTimeout(f,wOe);o({type:"PENDING",point:v,actions:y,longPressTimerId:x}),u()},[u,r,o,f]);Po(function(){return s(),function(){n.current();const v=r();v.type==="PENDING"&&(clearTimeout(v.longPressTimerId),o(vN))}},[r,s,o]),Po(function(){return li(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const COe=["input","button","textarea","select","option","optgroup","video","audio"];function hH(e,t){if(t==null)return!1;if(COe.includes(t.tagName.toLowerCase()))return!0;const r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:hH(e,t.parentElement)}function OOe(e,t){const n=t.target;return t1(n)?hH(e,n):!1}var jOe=e=>Hi(e.getBoundingClientRect()).center;function AOe(e){return e instanceof lH(e).Element}const TOe=(()=>{const e="matches";return typeof document>"u"?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(r=>r in Element.prototype)||e})();function pH(e,t){return e==null?null:e[TOe](t)?e:pH(e.parentElement,t)}function $Oe(e,t){return e.closest?e.closest(t):pH(e,t)}function ROe(e){return`[${qf.contextId}="${e}"]`}function kOe(e,t){const n=t.target;if(!AOe(n))return null;const r=ROe(e),o=$Oe(n,r);return!o||!t1(o)?null:o}function MOe(e,t){const n=kOe(e,t);return n?n.getAttribute(qf.draggableId):null}function POe(e,t){const n=`[${OC.contextId}="${e}"]`,o=aH(document,n).find(i=>i.getAttribute(OC.id)===t);return!o||!t1(o)?null:o}function DOe(e){e.preventDefault()}function ub({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return!(!n()||e!==t)}function mH({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const o=n.draggable.findById(r);return!(!o||!o.options.isEnabled||!rH(t.getState(),r))}function IOe({lockAPI:e,contextId:t,store:n,registry:r,draggableId:o,forceSensorStop:i,sourceEvent:s}){if(!mH({lockAPI:e,store:n,registry:r,draggableId:o}))return null;const c=r.draggable.getById(o),u=POe(t,c.descriptor.id);if(!u||s&&!c.options.canDragInteractiveElements&&OOe(u,s))return null;const f=e.claim(i||Zl);let p="PRE_DRAG";function g(){return c.options.shouldRespectForcePress}function y(){return e.isActive(f)}function v(A,T){ub({expected:A,phase:p,isLockActive:y,shouldWarn:!0})&&n.dispatch(T())}const x=v.bind(null,"DRAGGING");function S(A){function T(){e.release(),p="COMPLETED"}p!=="PRE_DRAG"&&(T(),De()),n.dispatch($_e(A.liftActionArgs)),p="DRAGGING";function k(R,V={shouldBlockNextClick:!1}){if(A.cleanup(),V.shouldBlockNextClick){const H=li(window,[{eventName:"click",fn:DOe,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(H)}T(),n.dispatch(YU({reason:R}))}return{isActive:()=>ub({expected:"DRAGGING",phase:p,isLockActive:y,shouldWarn:!1}),shouldRespectForcePress:g,drop:R=>k("DROP",R),cancel:R=>k("CANCEL",R),...A.actions}}function E(A){const T=sg(R=>{x(()=>JU({client:R}))});return{...S({liftActionArgs:{id:o,clientSelection:A,movementMode:"FLUID"},cleanup:()=>T.cancel(),actions:{move:T}}),move:T}}function C(){const A={moveUp:()=>x(z_e),moveRight:()=>x(V_e),moveDown:()=>x(B_e),moveLeft:()=>x(U_e)};return S({liftActionArgs:{id:o,clientSelection:jOe(u),movementMode:"SNAP"},cleanup:Zl,actions:A})}function _(){ub({expected:"PRE_DRAG",phase:p,isLockActive:y,shouldWarn:!0})&&e.release()}return{isActive:()=>ub({expected:"PRE_DRAG",phase:p,isLockActive:y,shouldWarn:!1}),shouldRespectForcePress:g,fluidLift:E,snapLift:C,abort:_}}const LOe=[gOe,xOe,_Oe];function FOe({contextId:e,store:t,registry:n,customSensors:r,enableDefaultSensors:o}){const i=[...o?LOe:[],...r||[]],s=w.useState(()=>nOe())[0],a=Ze(function(S,E){fg(S)&&!fg(E)&&s.tryAbandon()},[s]);Po(function(){let S=t.getState();return t.subscribe(()=>{const C=t.getState();a(S,C),S=C})},[s,t,a]),Po(()=>s.tryAbandon,[s.tryAbandon]);const c=Ze(x=>mH({lockAPI:s,registry:n,store:t,draggableId:x}),[s,n,t]),u=Ze((x,S,E)=>IOe({lockAPI:s,registry:n,contextId:e,store:t,draggableId:x,forceSensorStop:S||null,sourceEvent:E&&E.sourceEvent?E.sourceEvent:null}),[e,s,n,t]),f=Ze(x=>MOe(e,x),[e]),p=Ze(x=>{const S=n.draggable.findById(x);return S?S.options:null},[n.draggable]),g=Ze(function(){s.isClaimed()&&(s.tryAbandon(),t.getState().phase!=="IDLE"&&t.dispatch(vT()))},[s,t]),y=Ze(()=>s.isClaimed(),[s]),v=_t(()=>({canGetLock:c,tryGetLock:u,findClosestDraggableId:f,findOptionsForDraggable:p,tryReleaseLock:g,isLockClaimed:y}),[c,u,f,p,g,y]);for(let x=0;x({onBeforeCapture:t=>{const n=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};Tg.flushSync(n)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),BOe=e=>({...dg,...e.autoScrollerOptions,durationDampening:{...dg.durationDampening,...e.autoScrollerOptions}});function Wp(e){return e.current||De(),e.current}function VOe(e){const{contextId:t,setCallbacks:n,sensors:r,nonce:o,dragHandleUsageInstructions:i}=e,s=w.useRef(null),a=cH(e),c=Ze(()=>zOe(a.current),[a]),u=Ze(()=>BOe(a.current),[a]),f=QCe(t),p=tOe({contextId:t,text:i}),g=qCe(t,o),y=Ze(H=>{Wp(s).dispatch(H)},[]),v=_t(()=>SP({publishWhileDragging:k_e,updateDroppableScroll:P_e,updateDroppableIsEnabled:D_e,updateDroppableIsCombineEnabled:I_e,collectionStarting:M_e},y),[y]),x=YCe(),S=_t(()=>ECe(x,v),[x,v]),E=_t(()=>zCe({scrollWindow:NCe,scrollDroppable:S.scrollDroppable,getAutoScrollerOptions:u,...SP({move:JU},y)}),[S.scrollDroppable,y,u]),C=GCe(t),_=_t(()=>vCe({announce:f,autoScroller:E,dimensionMarshal:S,focusMarshal:C,getResponders:c,styleMarshal:g}),[f,E,S,C,c,g]);s.current=_;const j=Ze(()=>{const H=Wp(s);H.getState().phase!=="IDLE"&&H.dispatch(vT())},[]),A=Ze(()=>{const H=Wp(s).getState();return H.phase==="DROP_ANIMATING"?!0:H.phase==="IDLE"?!1:H.isDragging},[]),T=_t(()=>({isDragging:A,tryAbort:j}),[A,j]);n(T);const k=Ze(H=>rH(Wp(s).getState(),H),[]),R=Ze(()=>tu(Wp(s).getState()),[]),V=_t(()=>({marshal:S,focus:C,contextId:t,canLift:k,isMovementAllowed:R,dragHandleUsageInstructionsId:p,registry:x}),[t,S,p,C,k,R,x]);return FOe({contextId:t,store:_,registry:x,customSensors:r||null,enableDefaultSensors:e.enableDefaultSensors!==!1}),w.useEffect(()=>j,[j]),Ne.createElement(n1.Provider,{value:V},Ne.createElement(hNe,{context:CT,store:_},e.children))}function UOe(){return Ne.useId()}function HOe(e){const t=UOe(),n=e.dragHandleUsageInstructions||Vb.dragHandleUsageInstructions;return Ne.createElement(xNe,null,r=>Ne.createElement(VOe,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const XP={dragging:5e3,dropAnimating:4500},qOe=(e,t)=>t?wm.drop(t.duration):e?wm.snap:wm.fluid,WOe=(e,t)=>{if(e)return t?ug.opacity.drop:ug.opacity.combining},GOe=e=>e.forceShouldAnimate!=null?e.forceShouldAnimate:e.mode==="SNAP";function JOe(e){const n=e.dimension.client,{offset:r,combineWith:o,dropping:i}=e,s=!!o,a=GOe(e),c=!!i,u=c?_C.drop(r,s):_C.moveTo(r);return{position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:qOe(a,i),transform:u,opacity:WOe(s,c),zIndex:c?XP.dropAnimating:XP.dragging,pointerEvents:"none"}}function YOe(e){return{transform:_C.moveTo(e.offset),transition:e.shouldAnimateDisplacement?void 0:"none"}}function KOe(e){return e.type==="DRAGGING"?JOe(e):YOe(e)}function XOe(e,t,n=sr){const r=window.getComputedStyle(t),o=t.getBoundingClientRect(),i=SU(o,r),s=qv(i,n),a={client:i,tagName:t.tagName.toLowerCase(),display:r.display},c={x:i.marginBox.width,y:i.marginBox.height};return{descriptor:e,placeholder:a,displaceBy:c,client:i,page:s}}function QOe(e){const t=OT("draggable"),{descriptor:n,registry:r,getDraggableRef:o,canDragInteractiveElements:i,shouldRespectForcePress:s,isEnabled:a}=e,c=_t(()=>({canDragInteractiveElements:i,shouldRespectForcePress:s,isEnabled:a}),[i,a,s]),u=Ze(y=>{const v=o();return v||De(),XOe(n,v,y)},[n,o]),f=_t(()=>({uniqueId:t,descriptor:n,options:c,getDimension:u}),[n,u,c,t]),p=w.useRef(f),g=w.useRef(!0);Po(()=>(r.draggable.register(p.current),()=>r.draggable.unregister(p.current)),[r.draggable]),Po(()=>{if(g.current){g.current=!1;return}const y=p.current;p.current=f,r.draggable.update(f,y)},[f,r.draggable])}var AT=Ne.createContext(null);function Kv(e){const t=w.useContext(e);return t||De(),t}function ZOe(e){e.preventDefault()}const eje=e=>{const t=w.useRef(null),n=Ze((T=null)=>{t.current=T},[]),r=Ze(()=>t.current,[]),{contextId:o,dragHandleUsageInstructionsId:i,registry:s}=Kv(n1),{type:a,droppableId:c}=Kv(AT),u=_t(()=>({id:e.draggableId,index:e.index,type:a,droppableId:c}),[e.draggableId,e.index,a,c]),{children:f,draggableId:p,isEnabled:g,shouldRespectForcePress:y,canDragInteractiveElements:v,isClone:x,mapped:S,dropAnimationFinished:E}=e;if(!x){const T=_t(()=>({descriptor:u,registry:s,getDraggableRef:r,canDragInteractiveElements:v,shouldRespectForcePress:y,isEnabled:g}),[u,s,r,v,y,g]);QOe(T)}const C=_t(()=>g?{tabIndex:0,role:"button","aria-describedby":i,"data-rfd-drag-handle-draggable-id":p,"data-rfd-drag-handle-context-id":o,draggable:!1,onDragStart:ZOe}:null,[o,i,p,g]),_=Ze(T=>{S.type==="DRAGGING"&&S.dropping&&T.propertyName==="transform"&&Tg.flushSync(E)},[E,S]),j=_t(()=>{const T=KOe(S),k=S.type==="DRAGGING"&&S.dropping?_:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":o,"data-rfd-draggable-id":p,style:T,onTransitionEnd:k},dragHandleProps:C}},[o,C,p,S,_,n]),A=_t(()=>({draggableId:u.id,type:u.type,source:{index:u.index,droppableId:u.droppableId}}),[u.droppableId,u.id,u.index,u.type]);return Ne.createElement(Ne.Fragment,null,f(j,S.snapshot,A))};var gH=(e,t)=>e===t,yH=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};const tje=e=>e.combine?e.combine.draggableId:null,nje=e=>e.at&&e.at.type==="COMBINE"?e.at.combine.draggableId:null;function rje(){const e=or((o,i)=>({x:o,y:i})),t=or((o,i,s=null,a=null,c=null)=>({isDragging:!0,isClone:i,isDropAnimating:!!c,dropAnimation:c,mode:o,draggingOver:s,combineWith:a,combineTargetFor:null})),n=or((o,i,s,a,c=null,u=null,f=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:c,combineWith:u,mode:i,offset:o,dimension:s,forceShouldAnimate:f,snapshot:t(i,a,c,u,null)}}));return(o,i)=>{if(fg(o)){if(o.critical.draggable.id!==i.draggableId)return null;const s=o.current.client.offset,a=o.dimensions.draggables[i.draggableId],c=Mo(o.impact),u=nje(o.impact),f=o.forceShouldAnimate;return n(e(s.x,s.y),o.movementMode,a,i.isClone,c,u,f)}if(o.phase==="DROP_ANIMATING"){const s=o.completed;if(s.result.draggableId!==i.draggableId)return null;const a=i.isClone,c=o.dimensions.draggables[i.draggableId],u=s.result,f=u.mode,p=yH(u),g=tje(u),v={duration:o.dropDuration,curve:wT.drop,moveTo:o.newHomeClientOffset,opacity:g?ug.opacity.drop:null,scale:g?ug.scale.drop:null};return{mapped:{type:"DRAGGING",offset:o.newHomeClientOffset,dimension:c,dropping:v,draggingOver:p,combineWith:g,mode:f,forceShouldAnimate:null,snapshot:t(f,a,p,g,v)}}}return null}}function bH(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const oje={mapped:{type:"SECONDARY",offset:sr,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:bH(null)}};function ije(){const e=or((s,a)=>({x:s,y:a})),t=or(bH),n=or((s,a=null,c)=>({mapped:{type:"SECONDARY",offset:s,combineTargetFor:a,shouldAnimateDisplacement:c,snapshot:t(a)}})),r=s=>s?n(sr,s,!0):null,o=(s,a,c,u)=>{const f=c.displaced.visible[s],p=!!(u.inVirtualList&&u.effected[s]),g=Qw(c),y=g&&g.draggableId===s?a:null;if(!f){if(!p)return r(y);if(c.displaced.invisible[s])return null;const S=Ah(u.displacedBy.point),E=e(S.x,S.y);return n(E,y,!0)}if(p)return r(y);const v=c.displacedBy.point,x=e(v.x,v.y);return n(x,y,f.shouldAnimate)};return(s,a)=>{if(fg(s))return s.critical.draggable.id===a.draggableId?null:o(a.draggableId,s.critical.draggable.id,s.impact,s.afterCritical);if(s.phase==="DROP_ANIMATING"){const c=s.completed;return c.result.draggableId===a.draggableId?null:o(a.draggableId,c.result.draggableId,c.impact,c.afterCritical)}return null}}const sje=()=>{const e=rje(),t=ije();return(r,o)=>e(r,o)||t(r,o)||oje},aje={dropAnimationFinished:KU},lje=wU(sje,aje,null,{context:CT,areStatePropsEqual:gH})(eje);function vH(e){return Kv(AT).isUsingCloneFor===e.draggableId&&!e.isClone?null:Ne.createElement(lje,e)}function cje(e){const t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return Ne.createElement(vH,Tf({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const xH=e=>t=>e===t,uje=xH("scroll"),dje=xH("auto"),QP=(e,t)=>t(e.overflowX)||t(e.overflowY),fje=e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return QP(n,uje)||QP(n,dje)},hje=()=>!1,wH=e=>e==null?null:e===document.body?hje()?e:null:e===document.documentElement?null:fje(e)?e:wH(e.parentElement);var jC=e=>({x:e.scrollLeft,y:e.scrollTop});const SH=e=>e?window.getComputedStyle(e).position==="fixed"?!0:SH(e.parentElement):!1;var pje=e=>{const t=wH(e),n=SH(e);return{closestScrollable:t,isFixedOnPage:n}},mje=({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:r,direction:o,client:i,page:s,closest:a})=>{const c=(()=>{if(!a)return null;const{scrollSize:g,client:y}=a,v=eH({scrollHeight:g.scrollHeight,scrollWidth:g.scrollWidth,height:y.paddingBox.height,width:y.paddingBox.width});return{pageMarginBox:a.page.marginBox,frameClient:y,scrollSize:g,shouldClipSubject:a.shouldClipSubject,scroll:{initial:a.scroll,current:a.scroll,max:v,diff:{value:sr,displacement:sr}}}})(),u=o==="vertical"?pT:kU,f=Uf({page:s,withPlaceholder:null,axis:u,frame:c});return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:u,isEnabled:t,client:i,page:s,frame:c,subject:f}};const gje=(e,t)=>{const n=EU(e);if(!t||e!==t)return n;const r=n.paddingBox.top-t.scrollTop,o=n.paddingBox.left-t.scrollLeft,i=r+t.scrollHeight,s=o+t.scrollWidth,c=uT({top:r,right:s,bottom:i,left:o},n.border);return dT({borderBox:c,margin:n.margin,border:n.border,padding:n.padding})};var yje=({ref:e,descriptor:t,env:n,windowScroll:r,direction:o,isDropDisabled:i,isCombineEnabled:s,shouldClipSubject:a})=>{const c=n.closestScrollable,u=gje(e,c),f=qv(u,r),p=(()=>{if(!c)return null;const y=EU(c),v={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth};return{client:y,page:qv(y,r),scroll:jC(c),scrollSize:v,shouldClipSubject:a}})();return mje({descriptor:t,isEnabled:!i,isCombineEnabled:s,isFixedOnPage:n.isFixedOnPage,direction:o,client:u,page:f,closest:p})};const bje={passive:!1},vje={passive:!0};var ZP=e=>e.shouldPublishImmediately?bje:vje;const db=e=>e&&e.env.closestScrollable||null;function xje(e){const t=w.useRef(null),n=Kv(n1),r=OT("droppable"),{registry:o,marshal:i}=n,s=cH(e),a=_t(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),c=w.useRef(a),u=_t(()=>or((j,A)=>{t.current||De();const T={x:j,y:A};i.updateDroppableScroll(a.id,T)}),[a.id,i]),f=Ze(()=>{const j=t.current;return!j||!j.env.closestScrollable?sr:jC(j.env.closestScrollable)},[]),p=Ze(()=>{const j=f();u(j.x,j.y)},[f,u]),g=_t(()=>sg(p),[p]),y=Ze(()=>{const j=t.current,A=db(j);if(j&&A||De(),j.scrollOptions.shouldPublishImmediately){p();return}g()},[g,p]),v=Ze((j,A)=>{t.current&&De();const T=s.current,k=T.getDroppableRef();k||De();const R=pje(k),V={ref:k,descriptor:a,env:R,scrollOptions:A};t.current=V;const H=yje({ref:k,descriptor:a,env:R,windowScroll:j,direction:T.direction,isDropDisabled:T.isDropDisabled,isCombineEnabled:T.isCombineEnabled,shouldClipSubject:!T.ignoreContainerClipping}),F=R.closestScrollable;return F&&(F.setAttribute(GP.contextId,n.contextId),F.addEventListener("scroll",y,ZP(V.scrollOptions))),H},[n.contextId,a,y,s]),x=Ze(()=>{const j=t.current,A=db(j);return j&&A||De(),jC(A)},[]),S=Ze(()=>{const j=t.current;j||De();const A=db(j);t.current=null,A&&(g.cancel(),A.removeAttribute(GP.contextId),A.removeEventListener("scroll",y,ZP(j.scrollOptions)))},[y,g]),E=Ze(j=>{const A=t.current;A||De();const T=db(A);T||De(),T.scrollTop+=j.y,T.scrollLeft+=j.x},[]),C=_t(()=>({getDimensionAndWatchScroll:v,getScrollWhileDragging:x,dragStopped:S,scroll:E}),[S,v,x,E]),_=_t(()=>({uniqueId:r,descriptor:a,callbacks:C}),[C,a,r]);Po(()=>(c.current=_.descriptor,o.droppable.register(_),()=>{t.current&&S(),o.droppable.unregister(_)}),[C,a,S,_,i,o.droppable]),Po(()=>{t.current&&i.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),Po(()=>{t.current&&i.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function xN(){}const eD={width:0,height:0,margin:ONe},wje=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||n==="close"?eD:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin},Sje=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const r=wje({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:r.width,height:r.height,marginTop:r.margin.top,marginRight:r.margin.right,marginBottom:r.margin.bottom,marginLeft:r.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:n!=="none"?wm.placeholder:null}},Eje=e=>{const t=w.useRef(null),n=Ze(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:r,onTransitionEnd:o,onClose:i,contextId:s}=e,[a,c]=w.useState(e.animate==="open");w.useEffect(()=>a?r!=="open"?(n(),c(!1),xN):t.current?xN:(t.current=setTimeout(()=>{t.current=null,c(!1)}),n):xN,[r,a,n]);const u=Ze(p=>{p.propertyName==="height"&&(o(),r==="close"&&i())},[r,i,o]),f=Sje({isAnimatingOpenOnMount:a,animate:e.animate,placeholder:e.placeholder});return Ne.createElement(e.placeholder.tagName,{style:f,"data-rfd-placeholder-context-id":s,onTransitionEnd:u,ref:e.innerRef})};var Nje=Ne.memo(Eje);class _je extends Ne.PureComponent{constructor(...t){super(...t),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,n){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:n.isVisible?{isVisible:!0,data:n.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}}const Cje=e=>{const t=w.useContext(n1);t||De();const{contextId:n,isMovementAllowed:r}=t,o=w.useRef(null),i=w.useRef(null),{children:s,droppableId:a,type:c,mode:u,direction:f,ignoreContainerClipping:p,isDropDisabled:g,isCombineEnabled:y,snapshot:v,useClone:x,updateViewportMaxScroll:S,getContainerForClone:E}=e,C=Ze(()=>o.current,[]),_=Ze((F=null)=>{o.current=F},[]);Ze(()=>i.current,[]);const j=Ze((F=null)=>{i.current=F},[]),A=Ze(()=>{r()&&S({maxScroll:nH()})},[r,S]);xje({droppableId:a,type:c,mode:u,direction:f,isDropDisabled:g,isCombineEnabled:y,ignoreContainerClipping:p,getDroppableRef:C});const T=_t(()=>Ne.createElement(_je,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:F,data:B,animate:U})=>Ne.createElement(Nje,{placeholder:B,onClose:F,innerRef:j,animate:U,contextId:n,onTransitionEnd:A})),[n,A,e.placeholder,e.shouldAnimatePlaceholder,j]),k=_t(()=>({innerRef:_,placeholder:T,droppableProps:{"data-rfd-droppable-id":a,"data-rfd-droppable-context-id":n}}),[n,a,T,_]),R=x?x.dragging.draggableId:null,V=_t(()=>({droppableId:a,type:c,isUsingCloneFor:R}),[a,R,c]);function H(){if(!x)return null;const{dragging:F,render:B}=x,U=Ne.createElement(vH,{draggableId:F.draggableId,index:F.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(M,z)=>B(M,z,F));return sf.createPortal(U,E())}return Ne.createElement(AT.Provider,{value:V},s(k,v),H())};function Oje(){return document.body||De(),document.body}const tD={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:Oje},EH=e=>{let t={...e},n;for(n in tD)e[n]===void 0&&(t={...t,[n]:tD[n]});return t},wN=(e,t)=>e===t.droppable.type,nD=(e,t)=>t.draggables[e.draggable.id],jje=()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=or(i=>({draggableId:i.id,type:i.type,source:{index:i.index,droppableId:i.droppableId}})),r=or((i,s,a,c,u,f)=>{const p=u.descriptor.id;if(u.descriptor.droppableId===i){const v=f?{render:f,dragging:n(u.descriptor)}:null,x={isDraggingOver:a,draggingOverWith:a?p:null,draggingFromThisWith:p,isUsingPlaceholder:!0};return{placeholder:u.placeholder,shouldAnimatePlaceholder:!1,snapshot:x,useClone:v}}if(!s)return t;if(!c)return e;const y={isDraggingOver:a,draggingOverWith:p,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:u.placeholder,shouldAnimatePlaceholder:!0,snapshot:y,useClone:null}});return(i,s)=>{const a=EH(s),c=a.droppableId,u=a.type,f=!a.isDropDisabled,p=a.renderClone;if(fg(i)){const g=i.critical;if(!wN(u,g))return t;const y=nD(g,i.dimensions),v=Mo(i.impact)===c;return r(c,f,v,v,y,p)}if(i.phase==="DROP_ANIMATING"){const g=i.completed;if(!wN(u,g.critical))return t;const y=nD(g.critical,i.dimensions);return r(c,f,yH(g.result)===c,Mo(g.impact)===c,y,p)}if(i.phase==="IDLE"&&i.completed&&!i.shouldFlush){const g=i.completed;if(!wN(u,g.critical))return t;const y=Mo(g.impact)===c,v=!!(g.impact.at&&g.impact.at.type==="COMBINE"),x=g.critical.droppable.id===c;return y?v?e:t:x?e:t}return t}},Aje={updateViewportMaxScroll:F_e},Tje=wU(jje,Aje,(e,t,n)=>({...EH(n),...e,...t}),{context:CT,areStatePropsEqual:gH})(Cje);function $je({data:e=[],extractId:t,renderItem:n,dndProps:r={droppableId:"sortable-list",direction:"vertical"},onReordered:o,onChange:i,disableIndices:s=[],...a}){function c({destination:f,source:p}){if(s.includes(p.index)||s.includes(f.index))return;const g={from:p.index,to:f?.index||0};o?.(g.from,g.to)}const u=e.map((f,p)=>{const g=t?t(f):w.useId();return h.jsx(cje,{index:p,draggableId:g,isDragDisabled:s.includes(p),children:(y,v,x)=>n?n({...f,dnd:{provided:y,snapshot:v,rubic:x}},p):h.jsxs("div",{className:"flex flex-row gap-2 p-2 border border-gray-200 rounded-md mb-3 bg-white items-center",ref:y.innerRef,...y.draggableProps,children:[h.jsx("div",{...y.dragHandleProps,children:h.jsx(Hve,{className:"size-5",stroke:1.5})}),h.jsx("p",{children:JSON.stringify(f)})]})},g)});return h.jsx(HOe,{onDragEnd:c,children:h.jsx(Tje,{...r,children:f=>h.jsxs("div",{...a,...f.droppableProps,ref:f.innerRef,children:[u,f.placeholder]})})})}function o1({children:e,target:t,defaultOpen:n=!1,backdrop:r=!1,position:o="bottom-start",overlayProps:i,className:s}){const[a,c]=w.useState(n),u=jg(()=>c(!1)),f=It((g=50)=>setTimeout(()=>c(y=>!y),typeof g=="number"?g:0)),p={"bottom-start":"mt-1 top-[100%]","bottom-end":"right-0 top-[100%] mt-1","top-start":"bottom-[100%] mb-1","top-end":"bottom-[100%] right-0 mb-1"}[o];return h.jsxs(h.Fragment,{children:[a&&r&&h.jsx("div",{className:"animate-fade-in w-full h-full absolute top-0 bottom-0 right-0 left-0 bg-background/60"}),h.jsxs("div",{role:"dropdown",className:Be("relative flex",s),ref:u,children:[w.cloneElement(e,{onClick:f}),a&&h.jsx("div",{...i,className:Be("animate-fade-in absolute z-20 flex flex-col bg-background border border-muted px-1 py-1 rounded-lg shadow-lg backdrop-blur-sm min-w-full max-w-20",p,i?.className),children:t({toggle:f})})]})]})}const i1=[{type:"primary",label:"Primary",icon:tP,addable:!1,disabled:["name"],hidden:["virtual"]},{type:"text",label:"Text",icon:tP},{type:"number",label:"Number",icon:ISe},{type:"boolean",label:"Boolean",icon:FSe},{type:"date",label:"Date",icon:DV},{type:"enum",label:"Enum",icon:KA},{type:"json",label:"JSON",icon:rSe},{type:"jsonschema",label:"JSON Schema",icon:mSe},{type:"relation",label:"Relation",icon:YA,addable:!1,hidden:["virtual"]},{type:"media",label:"Media",icon:ny,addable:!1,hidden:["virtual"]}],rD=()=>{const[e,t]=w9([!1,!0]),n=e?K1e:LSe;return h.jsx("button",{role:"checkbox",type:"button",className:"flex px-3 py-3",onClick:()=>t(),children:h.jsx(n,{size:18})})};function s1({data:e=[],columns:t,checkable:n,onClickRow:r,onClickPage:o,onClickSort:i,total:s,sort:a,page:c=1,perPage:u=10,perPageOptions:f,onClickPerPage:p,classNames:g,renderHeader:y,rowActions:v,renderValue:x,onClickNew:S}){const E=!!s,C=Array.isArray(e)?e.slice(0,u):e;s=s||C?.length||0,c=c||1;const _=t&&t.length>0?t:Object.keys(C?.[0]||{}),j=Math.max(Math.ceil(s/u),1),A=E?j>c:(e?.length||0)>u,T=x||a1;return h.jsxs("div",{className:"flex flex-col gap-3",children:[S&&h.jsx("div",{className:"flex flex-row space-between",children:S&&h.jsx(Xe,{onClick:S,children:"Create new"})}),h.jsx("div",{className:"border-muted border rounded-md shadow-sm w-full max-w-full overflow-x-scroll overflow-y-hidden",children:h.jsxs("table",{className:"w-full text-md",children:[_.length>0?h.jsx("thead",{className:"sticky top-0 bg-muted/10",children:h.jsxs("tr",{children:[n&&h.jsx("th",{align:"center",className:"w-[40px]",children:h.jsx(rD,{})}),_.map((k,R)=>{const V=y?.(k)??Io(k);return h.jsx("th",{children:h.jsx("div",{className:"flex flex-row py-1 px-1 font-normal text-primary/55",children:h.jsxs("button",{type:"button",className:Be("py-1.5 rounded-md inline-flex flex-row justify-start items-center gap-1",i?"link hover:bg-primary/5 pl-2.5 pr-1":"px-2.5"),onClick:()=>i?.(k),children:[h.jsx("span",{className:"text-left text-nowrap whitespace-nowrap",children:V}),(i||a&&a.by===k)&&h.jsx(Rje,{sort:a,field:k})]})})},R)}),v&&v.length>0&&h.jsx("th",{className:"w-10"})]})}):null,h.jsx("tbody",{children:!C||!Array.isArray(C)||C.length===0?h.jsx("tr",{children:h.jsx("td",{colSpan:_.length+(n?1:0),children:h.jsx("div",{className:"flex flex-col gap-2 p-8 justify-center items-center border-t border-muted",children:h.jsx("i",{className:"opacity-50",children:Array.isArray(C)?"No data to show":C?h.jsx("pre",{children:JSON.stringify(C,null,2)}):"Loading..."})})})}):C.map((k,R)=>{const V=()=>r?.(k);return h.jsxs("tr",{"data-border":R>0,className:"hover:bg-primary/5 active:bg-muted border-muted data-[border]:border-t cursor-pointer transition-colors",children:[n&&h.jsx("td",{align:"center",children:h.jsx(rD,{})}),Object.entries(k).map(([H,F],B)=>h.jsx("td",{onClick:V,children:h.jsx("div",{className:"flex flex-row items-start py-3 px-3.5 font-normal ",children:h.jsx(T,{property:H,value:F})})},B)),v&&v.length>0&&h.jsx("td",{children:h.jsx("div",{className:"flex flex-row justify-end pr-2",children:h.jsxs(Lr,{position:"bottom-end",children:[h.jsx(Lr.Target,{children:h.jsx(ft,{Icon:ySe})}),h.jsx(Lr.Dropdown,{children:v.map(H=>h.jsx(Lr.Item,{onClick:()=>H.onClick(k,R),leftSection:H.icon&&h.jsx(H.icon,{}),children:H.label},H.label))})]})})})]},R)})})]})}),h.jsxs("div",{className:"flex flex-row items-center justify-between",children:[h.jsx("div",{className:"hidden md:flex text-primary/40",children:h.jsx(kje,{perPage:u,page:c,items:C?.length||0,total:E?s:void 0})}),h.jsxs("div",{className:"flex flex-row gap-2 md:gap-10 items-center",children:[f&&h.jsxs("div",{className:"hidden md:flex flex-row items-center gap-2 text-primary/40",children:["Per Page"," ",h.jsx(Nr,{items:f.map(k=>({label:String(k),perPage:k})),position:"top-end",onClickItem:k=>p?.(k.perPage),children:h.jsx(Xe,{children:u})})]}),h.jsxs("div",{className:"text-primary/40",children:["Page ",c,E?h.jsxs(h.Fragment,{children:[" of ",j]}):""]}),o&&h.jsx("div",{className:"flex flex-row gap-1.5",children:h.jsx(Mje,{current:c,total:E?j:c+(A?1:0),onClick:o,hasLast:E})})]})]})]})}const a1=({value:e,property:t})=>{let n=!1;return e!==null&&typeof e=="object"&&(e=JSON.stringify(e),n=!0),e!==null&&typeof e<"u"?h.jsx("span",{className:Be("line-clamp-2",n&&"font-mono break-all"),children:e}):h.jsx("span",{className:"opacity-10 font-mono",children:"null"})},Rje=({sort:e,field:t})=>!e||e.by!==t?h.jsx(KA,{size:18,className:"mt-[1px]"}):e.dir==="asc"?h.jsx(eSe,{size:18,className:"mt-[1px]"}):h.jsx(Q1e,{size:18,className:"mt-[1px]"}),kje=({perPage:e,page:t,items:n,total:r})=>{if(n===0&&t===1)return h.jsx(h.Fragment,{children:"No rows to show"});const o=Math.max(e*(t-1),1);return r?h.jsxs(h.Fragment,{children:["Showing ",o,"-",e*(t-1)+n," of ",r," rows"]}):h.jsxs(h.Fragment,{children:["Showing ",o,"-",e*(t-1)+n]})},Mje=({current:e,total:t,onClick:n,hasLast:r=!0})=>[{enabled:!0,value:1,Icon:dSe,disabled:e===1},{enabled:!0,value:e-1,Icon:lSe,disabled:e===1},{enabled:!0,value:e+1,Icon:cSe,disabled:e===t},{enabled:r,value:t,Icon:fSe,disabled:e===t}].map((i,s)=>i.enabled&&h.jsx("button",{role:"button",type:"button",disabled:i.disabled,className:"px-2 py-2 border-muted border rounded-md enabled:link text-lg enabled:hover:bg-primary/5 text-primary/90 disabled:opacity-50 cursor-pointer disabled:cursor-not-allowed",onClick:()=>{const a=i.value,c=a<1?1:a>t?t:a;n?.(c)},children:h.jsx(i.Icon,{})},s)),Pje=({path:e,backTo:t,onBack:n})=>{const[r,o]=Uo(),i=window.location.pathname,s=Array.isArray(e)?e:[e],a=i.split("/").filter(p=>p!==""),c=s.length>1,u=n||It(()=>{if(t){o(t,{replace:!0});return}const p=a.slice(0,s.length+1).join("/");o(`~/${p}`,{replace:!0})}),f=w.useMemo(()=>s.map((p,g)=>{const y=g===s.length-1,v=a.indexOf(p),x=a.slice(0,v+1).join("/"),S=Dg(p);return{last:y,href:x,string:S}}),[s,a]);return h.jsxs("div",{className:"flex flex-row flex-grow items-center gap-2 text-lg",children:[c&&h.jsx(ft,{onClick:u,Icon:JA,variant:"default",size:"lg",className:"mr-1"}),h.jsx("div",{className:"hidden md:flex gap-2",children:h.jsx(NH,{crumbs:f})}),h.jsx("div",{className:"flex md:hidden gap-2",children:h.jsx(Dje,{crumbs:f})})]})},NH=({crumbs:e})=>e.map((t,n)=>t.last?h.jsx(_H,{...t},n):h.jsx(CH,{...t},n)),Dje=({crumbs:e})=>{const[,t]=Uo();if(e.length<=2)return h.jsx(NH,{crumbs:e});const n=e[0],r=e[e.length-1],o=w.useMemo(()=>e.slice(1,-1).map(s=>({label:s.string,href:s.href})),[e]),i=It(s=>t(`~/${s.href}`));return h.jsxs(h.Fragment,{children:[h.jsx(CH,{...n}),h.jsx(Nr,{onClickItem:i,items:o,children:h.jsx(ft,{Icon:Ha,variant:"ghost"})}),h.jsx("span",{className:"opacity-25 dark:font-bold font-semibold",children:"/"}),h.jsx(_H,{...r})]})},_H=({string:e})=>h.jsx("span",{className:"text-nowrap dark:font-bold font-semibold",children:e}),CH=({href:e,string:t})=>h.jsxs("div",{className:"opacity-50 flex flex-row gap-2 dark:font-bold font-semibold",children:[h.jsx(Dw,{to:`~/${e}`,className:"text-nowrap",children:t}),h.jsx("span",{className:"opacity-50",children:"/"})]});function OH(e,t,n){if(!e.properties)return[{...e.toJSON()},t,{}];const r=JSON.parse(JSON.stringify(e)),o={...r,properties:mo(r.properties,n)};o.required&&(o.required=o.required.filter(a=>!n.includes(a)));const i={};for(const a of n)i[a]={config:t[a],schema:r.properties[a]};const s=mo(t,n);return[o,s,i]}const Ije=w.forwardRef((e,t)=>{const[n,r]=w.useState(!!(e.value??e.defaultValue));w.useEffect(()=>{console.log("value change",e.value),r(!!e.value)},[e.value]);function o(i){r(i.target.checked),e.onChange?.(i.target.checked)}return h.jsx("div",{className:"flex flex-row",children:h.jsx(vc,{ref:t,checked:n,onChange:o,disabled:e.disabled,id:e.id})})}),mi=({error:e,as:t,...n})=>{const r=t||"div";return h.jsx(r,{...n,"data-role":"group",className:Be("flex flex-col gap-1.5 w-full",t==="fieldset"&&"border border-primary/10 p-3 rounded-md",t==="fieldset"&&e&&"border-red-500",e&&"text-red-500",n.className)})},uc=({as:e,...t})=>{const n=e||"label";return h.jsx(n,{...t})},Lje=({className:e,...t})=>h.jsx("div",{...t,className:Be("text-sm text-primary/50",e)}),jH=({className:e,...t})=>h.jsx("div",{...t,className:Be("text-sm text-red-500",e)}),Rh=({field:e,label:t,...n})=>{const r=e.getDescription(),o=r?i=>h.jsx(ns,{position:"right",label:r,...i}):i=>h.jsx(w.Fragment,{...i});return h.jsx(o,{children:h.jsxs(uc,{...n,className:"flex flex-row gap-1 items-center self-start",children:[t??e.getLabel(),e.isRequired()&&h.jsx("span",{className:"font-medium opacity-30",children:"*"}),r&&h.jsx(VV,{className:"opacity-50"})]})})},qa=w.forwardRef((e,t)=>{const n=e.disabled||e.readOnly;return h.jsx("input",{type:"text",...e,ref:t,className:Be("bg-muted/40 h-11 rounded-md py-2.5 px-4 outline-none w-full disabled:cursor-not-allowed",n&&"bg-muted/50 text-primary/50",!n&&"focus:bg-muted focus:outline-none focus:ring-2 focus:ring-zinc-500 focus:border-transparent transition-all",e.className)})}),Fje=w.forwardRef((e,t)=>e.type==="password"?h.jsx(AH,{...e,ref:t}):"data-type"in e&&e["data-type"]==="textarea"?h.jsx(TH,{...e,ref:t}):h.jsx(qa,{...e,ref:t})),AH=w.forwardRef((e,t)=>{const[n,r]=w.useState(!1);function o(){r(i=>!i)}return h.jsxs("div",{className:"relative w-full",children:[h.jsx(qa,{...e,type:n?"text":"password",className:"w-full",ref:t}),h.jsx("div",{className:"absolute right-3 top-0 bottom-0 flex items-center",children:h.jsx(ft,{Icon:n?vSe:zV,onClick:o,variant:"ghost",className:"opacity-70"})})]})}),TH=w.forwardRef((e,t)=>h.jsx("textarea",{rows:3,...e,ref:t,className:Be("bg-muted/40 min-h-11 rounded-md py-2.5 px-4 focus:bg-muted outline-none focus:outline-none focus:ring-2 focus:ring-zinc-500 focus:border-transparent transition-all disabled:bg-muted/50 disabled:text-primary/50",e.className)})),AC=w.forwardRef((e,t)=>{const n=w.useRef(null),r=Qoe();w.useImperativeHandle(t,()=>n.current);const o=It(()=>{n?.current&&(n.current.focus(),["Safari"].includes(r)?n.current.click():n.current.showPicker())});return h.jsxs("div",{className:"relative w-full",children:[h.jsx("div",{className:"absolute h-full right-3 top-0 bottom-0 flex items-center",children:h.jsx(ft,{Icon:DV,onClick:o})}),h.jsx(qa,{...e,type:e.type??"date",ref:n,className:"w-full appearance-none"})]})});w.forwardRef((e,t)=>{const[n,r]=w.useState(!!e.value);w.useEffect(()=>{r(!!e.value)},[e.value]);function o(i){r(i.target.checked),e.onChange?.(i.target.checked)}return h.jsx("div",{className:"h-11 flex items-center",children:h.jsx("input",{...e,type:"checkbox",ref:t,className:"outline-none focus:outline-none focus:ring-2 focus:ring-zinc-500 transition-all disabled:opacity-70 scale-150 ml-1",checked:n,onChange:o,disabled:e.disabled})})});const oD={xs:{root:"h-5 w-8",thumb:"data-[state=checked]:left-[calc(100%-1rem)]"},sm:{root:"h-6 w-10",thumb:"data-[state=checked]:left-[calc(100%-1.25rem)]"},md:{root:"h-7 w-12",thumb:"data-[state=checked]:left-[calc(100%-1.5rem)]"}},$H=w.forwardRef(({type:e,required:t,...n},r)=>h.jsx(T1e,{className:pn("relative cursor-pointer rounded-full bg-muted border-2 border-transparent outline-none ring-1 dark:ring-primary/10 ring-primary/20 data-[state=checked]:ring-primary/60 data-[state=checked]:bg-primary/60 appearance-none transition-colors hover:bg-muted/80",oD[n.size??"md"].root,n.disabled&&"opacity-50 !cursor-not-allowed"),onCheckedChange:o=>{console.log("setting",o),n.onChange?.({target:{value:o}})},...n,checked:typeof n.checked<"u"?n.checked:typeof n.value<"u"?!!n.value:void 0,ref:r,children:h.jsx($1e,{className:pn("absolute top-0 left-0 h-full aspect-square rounded-full bg-primary/30 data-[state=checked]:bg-background transition-[left,right] duration-100 border border-muted",oD[n.size??"md"].thumb)})})),RH=w.forwardRef(({children:e,options:t,...n},r)=>h.jsxs("div",{className:"flex w-full relative",children:[h.jsx("select",{...n,ref:r,className:Be("bg-muted/40 focus:bg-muted rounded-md py-2.5 px-4 outline-none focus:outline-none focus:ring-2 focus:ring-zinc-500 focus:border-transparent transition-all disabled:bg-muted/50 disabled:text-primary/50","appearance-none h-11 w-full",!n.multiple&&"border-r-8 border-r-transparent",n.className),children:t?h.jsxs(h.Fragment,{children:[!n.required&&h.jsx("option",{value:""}),t.map(o=>typeof o!="object"?{value:o,label:String(o)}:o).map(o=>h.jsx("option",{value:o.value,children:o.label},o.value))]}):e}),!n.multiple&&h.jsx(IV,{className:"absolute right-3 top-0 bottom-0 h-full opacity-70 pointer-events-none",size:18})]})),zje=(e,t)=>{switch(e){case"date":return AC;case"boolean":return Ije;case"textarea":return TH;default:return qa}};function kH({open:e=!1,children:t,onClose:n=()=>null,allowBackdropClose:r=!0,className:o,stickToTop:i}){const s=jg(()=>{r&&n()});return h.jsx(h.Fragment,{children:e&&h.jsx("div",{className:Be("w-full h-full fixed bottom-0 top-0 right-0 left-0 bg-background/60 flex justify-center backdrop-blur-sm z-10",i?"items-start":"items-center"),children:h.jsx("div",{className:Be("z-20 flex flex-col bg-background rounded-lg shadow-lg",o),ref:s,children:t})})})}const Bje=({schema:e,uiSchema:t={},anyOfValues:n,path:r,prefixPath:o,generateKey:i})=>{const[s,a]=Uo(),[c,u]=w.useState(e),[f,p]=w.useState(!1),{actions:g,readonly:y}=ot(),[v,{open:x,close:S}]=oh(!1),E=i!==void 0,C=typeof i=="string",[_,j]=w.useState(C?i:""),A=_x(!E),T=w.useRef(null),k="anyOf"in e;function R(B){i&&typeof i=="function"&&V({target:{value:i(B)}}),console.log("form change",B)}function V(B){const U=String(B.target.value);if(U.length>0&&!/^[a-zA-Z_][a-zA-Z0-9_ ]*$/.test(U)){console.log("no match",U);return}j(U.toLowerCase().replace(/ /g,"_").replace(/__+/g,"_"))}async function H(){if(T.current?.validateForm()){p(!0);const B=T.current?.formData(),[U,...M]=r,z=[...M,_].join(".");await g.add(U,z,B)?setTimeout(()=>{a(o+_,{replace:!0})},500):p(!1)}console.log("valid?",T.current?.validateForm()),console.log("data",_,T.current?.formData())}const F=k?e.anyOf.map(B=>{const U=B.title,M=n?.[U]?.label||U,z=n?.[U]?.icon;return{label:M,icon:z,onClick:()=>{u(B),x()}}}):[];return h.jsxs(h.Fragment,{children:[!y&&h.jsx("div",{className:"flex flex-row",children:k?h.jsx(Nr,{position:"top-start",items:F,itemsClassName:"gap-3",children:h.jsx(Xe,{children:"Add new"})}):h.jsx(Xe,{onClick:x,children:"Add new"})}),h.jsx(kH,{open:v,allowBackdropClose:!1,onClose:S,className:"min-w-96 w-6/12 mt-[30px] mb-[20px]",stickToTop:!0,children:h.jsxs("div",{className:"border border-muted rounded-lg flex flex-col overflow-y-scroll font-normal",style:{maxHeight:"calc(100dvh - 100px)"},children:[h.jsx("div",{className:"bg-muted py-2 px-4 text-primary/70 font-mono flex flex-row gap-2 items-center",children:[...r,_].join(".")}),h.jsxs("div",{className:"flex flex-row gap-10 sticky top-0 bg-background z-10 p-4 border-b border-muted",children:[h.jsxs("div",{className:"flex flex-row flex-grow items-center relative",children:[h.jsx(qa,{ref:A,className:"w-full",placeholder:"New unique key...",onChange:V,value:_,disabled:E}),E&&h.jsx("div",{className:"absolute h-full flex items-center z-10 right-3.5 top-0 bottom-0 font-mono font-sm opacity-50",children:"generated"})]}),h.jsxs("div",{className:"flex flex-row gap-2",children:[h.jsx(Xe,{onClick:S,disabled:f,children:"Cancel"}),h.jsx(Xe,{variant:"primary",onClick:H,disabled:f||_.length===0,children:"Create"})]})]}),h.jsx("div",{className:"flex flex-col p-4",children:h.jsx(jh,{ref:T,schema:Cv(c,["title"]),uiSchema:t,onChange:R,className:"legacy hide-required-mark fieldset-alternative mute-root"})})]})})]})},iD=w.forwardRef(({tabs:e,title:t},n)=>{const[r,{open:o,close:i}]=oh(!1),[s,a]=w.useState(0),c=e[s];return w.useImperativeHandle(n,()=>({open:o,close:i,isOpen:r})),c?h.jsx(kH,{open:r,onClose:i,className:"min-w-96 w-9/12 mt-[80px] mb-[20px]",stickToTop:!0,children:h.jsxs("div",{className:"border border-primary rounded-lg flex flex-col overflow-scroll font-normal",style:{maxHeight:"calc(100dvh - 100px)"},children:[t&&h.jsxs("div",{className:"bg-primary py-2 px-4 text-background font-mono flex flex-row gap-2 items-center",children:[h.jsx(VSe,{size:20,className:"opacity-50"}),t]}),h.jsxs("div",{className:"flex flex-row justify-between sticky top-0 bg-background z-10 py-4 px-5",children:[h.jsx("div",{className:"flex flex-row gap-3",children:e.map((u,f)=>h.jsx("button",{onClick:()=>a(f),"data-active":f===s?1:void 0,className:"font-mono data-[active]:font-bold",children:u.title},f))}),h.jsx(ft,{Icon:QA,onClick:i})]}),h.jsx("div",{className:"",children:h.jsx(Vr,{json:c.json,expand:6,showSize:!0,showCopy:!0})})]})}):null});function io({schema:e,uiSchema:t,config:n,prefix:r="/",options:o,path:i=[],properties:s}){const[a,c]=w.useState(!1),{actions:u,readonly:f}=ot(),p=w.useRef(null),g=w.useRef(null),y=w.useRef(null),[v,x]=w.useState(!1);bO([["mod+s",U=>(U.preventDefault(),F(),!1)],["e",()=>{v||H()}],["Escape",()=>{v&&H()}]]);const S=w.useMemo(()=>s?Object.entries(s).filter(([,U])=>U.hide||U.extract).map(([U])=>U):[],[s]),E=It(U=>{const M=window.location.href.split("/").slice(0,-1).join("/");U?window.location.replace(M):window.history.back()}),C=(o?.allowDelete?.(n)??!0)&&!f,_=(o?.allowEdit?.(n)??!0)&&!f,j=o?.showAlert?.(n)??void 0;console.log("--setting",{schema:e,config:n,prefix:r,path:i,exclude:S});const[A,T,k]=OH(e,n,S);console.log({reducedSchema:A,reducedConfig:T,extracted:k});const R=Object.keys(k),V=R.find(U=>window.location.pathname.endsWith(U))??R[0],H=It(()=>{_&&x(U=>!U)}),F=It(async()=>{if(!(!_||!v)&&p.current?.validateForm()){c(!0);const U=p.current?.formData(),[M,...z]=i;let $;console.log("save:data",{module:M,restOfPath:z},U),z.length>0?(console.log("-> patch",{module:M,path:z.join(".")},U),$=await u.patch(M,z.join("."),U)):(console.log("-> set",{module:M},U),$=await u.set(M,U,!0)),console.log("save:success",$),$?o?.reloadOnSave&&(await u.reload(),c(!1)):c(!1)}}),B=It(async()=>{if(!C)return;const[U,...M]=i;window.confirm(`Are you sure you want to delete ${i.join(".")}`)&&await u.remove(U,M.join("."))&&E(!0)});return n?h.jsxs(h.Fragment,{children:[h.jsx(An,{className:i.length>1?"pl-3":"",scrollable:!0,right:h.jsxs(h.Fragment,{children:[h.jsx(Nr,{items:[{label:"Inspect local schema",onClick:()=>{g.current?.open()}},{label:"Inspect schema",onClick:()=>{y.current?.open()}},C&&{label:"Delete",destructive:!0,onClick:B}],position:"bottom-end",children:h.jsx(ft,{Icon:_h})}),h.jsx(Xe,{onClick:H,disabled:!_,children:v?"Cancel":"Edit"}),v&&h.jsx(Xe,{variant:"primary",onClick:F,disabled:a||!_,children:a?"Save...":"Save"})]}),children:h.jsx(Pje,{path:i})}),h.jsxs(Zn,{children:[typeof j<"u"&&h.jsx(ai.Warning,{message:j}),h.jsx("div",{className:"flex flex-col flex-grow p-3 gap-3",children:h.jsx(jh,{ref:p,readonly:!v,schema:Cv(A,["title"]),formData:T,uiSchema:t,onChange:console.log,className:"legacy hide-required-mark fieldset-alternative mute-root"})}),R.length>0&&h.jsxs("div",{className:"flex flex-col max-w-full",children:[h.jsx(GV,{items:R.map(U=>({as:Dw,label:Io(U),href:`${r}/${U}`.replace(/\/+/g,"/"),active:V===U,badge:Object.keys(k[U]?.config??{}).length}))}),h.jsx("div",{className:"flex flex-grow flex-col gap-3 p-3",children:h.jsx(tt,{path:"/:prop?",component:({params:U})=>{const[,M]=Uo(),z=U.prop??V,$=k[z]?.config??{},L=s?.[z]?.tableValues?s?.[z]?.tableValues($):Object.entries($).map(([q,Y])=>{if(!Y||typeof Y!="object")return{key:q,value:Y};const D=Object.keys(Y)[0],W=Y[D],K=Cv(Y,[D]);return{key:q,[D]:W,value:K}}),P=s?.[z]?.new;return z?h.jsxs(h.Fragment,{children:[P&&h.jsx(Bje,{schema:P.schema,uiSchema:P.uiSchema,anyOfValues:P.anyOfValues,prefixPath:`/${z}/`,path:[...i,z],generateKey:P.generateKey}),h.jsx(s1,{data:L,onClickRow:q=>{const Y=Object.values(q)[0];M(`/${z}/${Y}`)}})]}):h.jsx("div",{className:"h-80 flex justify-center align-center",children:h.jsx(Hn,{title:"No sub-setting selected",description:"Select one from the tab bar"})})}})})]})]},i.join("-")),h.jsx(iD,{ref:g,title:i.join("."),tabs:[{title:"Schema",json:A},{title:"Config",json:T}]}),h.jsx(iD,{ref:y,title:i.join("."),tabs:[{title:"Schema",json:e},{title:"Config",json:n}]})]}):h.jsx(Hn,{title:"Not found",description:`Configuration at path ${i.join(".")} doesn't exist.`,primary:{children:"Go back",onClick:()=>E()}})}const TC={config:{fillable:{"ui:options":{wrap:!0},anyOf:[{},{"ui:widget":"checkboxes"}]},hidden:{"ui:options":{wrap:!0},anyOf:[{},{"ui:widget":"checkboxes"}]},schema:{"ui:field":"JsonField"},ui_schema:{"ui:field":"JsonField"}}},Vje=i1.filter(e=>e.type!=="primary").reduce((e,t)=>(e[t.type]={label:t.label,icon:t.icon},e),{}),Uje={"1:1":{label:"One-to-One"},"n:1":{label:"Many-to-One"},"m:n":{label:"Many-to-Many"},poly:{label:"Polymorphic"}},Hje=({schema:e,config:t})=>{const{app:n,readonly:r}=ot(),o=n.getAbsolutePath("settings"),i=Object.keys(t.entities??{});function s(a,c="entity"){i.length!==0&&(a.properties&&c in a.properties&&(a.properties[c].enum=i),"anyOf"in a&&a.anyOf.forEach(u=>s(u,c)))}return h.jsx(tt,{path:"/data",nest:!0,children:h.jsxs(As,{children:[h.jsx(tt,{path:"/entities/:entity/fields/:field",component:({params:{entity:a,field:c}})=>{const u=t.entities?.[a]?.fields?.[c],f=e.properties.entities.additionalProperties?.properties?.fields.additionalProperties,p=f.anyOf.find(g=>g.properties.type.const===u?.type);return h.jsx(io,{schema:p??f,config:u,prefix:`${o}/data/entities/${a}/fields/${c}`,path:["data","entities",a,"fields",c],options:{showAlert:g=>{if(g?.type==="primary"&&!r)return"Modifying the primary field may result in strange behaviors."}},uiSchema:TC})},nest:!0}),h.jsx(tt,{path:"/entities/:entity",component:({params:{entity:a}})=>{const c=e.properties.entities.additionalProperties,u=Nw(c);u.properties.type.readOnly=!0;const f={anyOf:u.properties.fields.additionalProperties.anyOf.filter(p=>p.properties.type.const!=="primary")};return h.jsx(io,{schema:u,config:t.entities?.[a],options:{showAlert:p=>{if(p.type==="system"&&!r)return"Modifying the system entities may result in strange behaviors."}},properties:{fields:{extract:!0,tableValues:p=>Vi(p,(g,y,v)=>{g.push({property:v,type:y.type,required:y.config?.required?"Yes":"No"})},[]),new:{schema:f,uiSchema:TC,anyOfValues:Vje}}},path:["data","entities",a],prefix:`${o}/data/entities/${a}`})},nest:!0}),h.jsx(tt,{path:"/indices/:index",component:({params:{index:a}})=>{const c=e.properties.indices.additionalProperties;return i.length>0&&s(c,"entity"),h.jsx(io,{schema:e.properties.indices.additionalProperties,config:t.indices?.[a],path:["data","indices",a],prefix:`${o}/data/indices/${a}`})},nest:!0}),h.jsx(tt,{path:"/relations/:relation",component:({params:{relation:a}})=>{const c=t.relations?.[a],f=e.properties.relations.additionalProperties.anyOf.find(p=>p.properties.type.const===c?.type);return i.length>0&&(s(f,"source"),s(f,"target")),h.jsx(io,{schema:f,config:c,path:["data","relations",a],prefix:`${o}/data/relations/${a}`})},nest:!0}),h.jsx(tt,{path:"/",component:()=>{const a=e.properties.indices.additionalProperties,c=e.properties.relations.additionalProperties;return s(a,"entity"),s(c,"source"),s(c,"target"),h.jsx(io,{schema:e,config:t,properties:{entities:{extract:!0,tableValues:u=>Vi(u,(f,p,g)=>{f.push({name:g,type:p.type,fields:Object.keys(p.fields??{}).length})},[]),new:{schema:e.properties.entities.additionalProperties,uiSchema:{fields:{"ui:widget":"hidden"},type:{"ui:widget":"hidden"}}}},relations:{extract:!0,new:{schema:e.properties.relations.additionalProperties,generateKey:u=>{const f=[u.type.replace(":",""),u.source,u.target,u.config?.mappedBy,u.config?.inversedBy,u.config?.connectionTable,u.config?.connectionTableMappedName].filter(Boolean);return[...new Set(f)].join("_")},anyOfValues:Uje},tableValues:u=>Vi(u,(f,p,g)=>{f.push({name:g,type:p.type,source:p.source,target:p.target})},[])},indices:{extract:!0,tableValues:u=>Vi(u,(f,p,g)=>{f.push({name:g,entity:p.entity,fields:p.fields.join(", "),unique:p.unique?"Yes":"No"})},[]),new:{schema:a,uiSchema:{fields:{"ui:options":{orderable:!1}}},generateKey:u=>["idx",u.entity,u.unique&&"unique",...u.fields.filter(Boolean)].filter(Boolean).join("_")}}},prefix:`${o}/data`,path:["data"]})},nest:!0})]})})},l1=Jz,qje=Rt(Object.values(l1)),Wje=Ve({name:ju,new:at({const:!0}).optional(),field:qje}),Gje=Ve({fields:un(Wje)}),Jje=Object.keys(l1);Jje[0];const TT=["label","description","required","fillable","hidden","virtual"];function Yje(e){return ke(mo(l1[e]?.properties.config.properties,TT))}const MH=w.forwardRef(function({fields:t,sortable:n,additionalFieldTypes:r,routePattern:o,isNew:i,readonly:s,...a},c){const u=Object.entries(t).map(([H,F])=>({name:H,field:F})),{control:f,formState:{isValid:p,errors:g},getValues:y,watch:v,register:x,setValue:S,setError:E,reset:C}=Cc({mode:"all",resolver:Oc(Gje),defaultValues:{fields:u}}),{fields:_,append:j,remove:A,move:T}=n2e({control:f,name:"fields"});function k(H){return Object.fromEntries(H.fields.map(F=>[F.name,km(F.field)]))}w.useEffect(()=>{a?.onChange&&v(H=>{a?.onChange?.(k(H))})},[]),w.useImperativeHandle(c,()=>({reset:C,getValues:()=>y(),getData:()=>k(y()),isValid:()=>p,getErrors:()=>g}));function R(H){j({name:"",new:!0,field:{type:H,config:l1[H]?.properties.config.template()}})}const V={watch:v,register:x,setValue:S,getValues:y,control:f,setError:E};return h.jsx(h.Fragment,{children:h.jsx("div",{className:"flex flex-col gap-6",children:h.jsx("div",{className:"flex flex-col gap-3",children:h.jsxs("div",{className:"flex flex-col gap-4",children:[n?h.jsx($je,{data:_,onReordered:T,extractId:H=>H.id,disableIndices:[0],renderItem:({dnd:H,...F},B)=>h.jsx(Xje,{readonly:s,field:F,index:B,form:V,errors:g,remove:A,dnd:H,routePattern:o,primary:{defaultFormat:F.defaultPrimaryFormat,editable:i}},F.id)},_.length):h.jsx("div",{children:_.map((H,F)=>h.jsx(PH,{readonly:s,field:H,index:F,form:V,errors:g,remove:A,routePattern:o,primary:{defaultFormat:a.defaultPrimaryFormat,editable:i}},H.id))}),h.jsx(Iw,{children:h.jsx(o1,{className:"flex flex-col w-full",target:({toggle:H})=>h.jsx(Kje,{additionalFieldTypes:r,onSelected:H,onSelect:F=>{R(F)}}),children:h.jsx(Xe,{className:"justify-center",children:"Add Field"})})})]})})})})}),Kje=({onSelect:e,additionalFieldTypes:t=[],onSelected:n})=>{const r=i1.filter(o=>o.addable!==!1);return t&&r.push(...t),h.jsx("div",{className:"flex flex-row gap-2 justify-center flex-wrap",children:r.map(o=>h.jsx(Xe,{IconLeft:o.icon,variant:"ghost",onClick:()=>{o.addable!==!1?e(o.type):o.onClick?.(),n?.()},children:o.label},o.type))})},Xje=w.memo(PH,(e,t)=>e.field.id!==t.field.id);function PH({field:e,index:t,form:{watch:n,register:r,setValue:o,getValues:i,control:s,setError:a},remove:c,errors:u,dnd:f,routePattern:p,primary:g,readonly:y}){const v=`fields.${t}.field`,x=e.field.type,S=n(`fields.${t}.name`),{active:E,toggle:C}=GA(p??"",S),_=i1.find(F=>F.type===x),j=_.disabled||[],A=_.hidden||[],T=t===0,k=!!u?.fields?.[t],R=x==="primary";function V(F){return()=>{(S.length===0||window.confirm(`Sure to delete "${S}"?`))&&(c(F),C())}}const H=f?{...f.provided.draggableProps,ref:f.provided.innerRef}:{};return h.jsxs("div",{className:Be("flex flex-col border border-muted rounded bg-background mb-2",E&&"mb-6",k&&"border-red-500 "),...H,children:[h.jsxs("div",{className:"flex flex-row gap-2 px-2 py-2",children:[f?h.jsx("div",{className:"flex items-center",...f.provided.dragHandleProps,children:h.jsx(ft,{Icon:OSe,className:"mt-1",disabled:T})}):null,h.jsxs("div",{className:"flex flex-row flex-grow gap-4 items-center md:mr-6",children:[h.jsx(ns,{label:_.label,children:h.jsx("div",{className:"flex flex-row items-center p-2 bg-primary/5 rounded",children:h.jsx(_.icon,{className:"size-5"})})}),e.new?h.jsx(_n,{error:!!u?.fields?.[t]?.name.message,placeholder:"Enter a property name...",classNames:{root:"w-full h-full",wrapper:"font-mono h-full",input:"pt-px !h-full"},...r(`fields.${t}.name`),disabled:!e.new}):h.jsxs("div",{className:"font-mono flex-grow flex flex-row gap-3",children:[h.jsx("span",{children:S}),e.field.config?.label&&h.jsx("span",{className:"opacity-50",children:e.field.config?.label})]}),h.jsx("div",{className:"flex-col gap-1 hidden md:flex",children:R?h.jsx(h.Fragment,{children:h.jsx(Sa,{data:["integer","uuid"],defaultValue:g?.defaultFormat,disabled:!g?.editable,placeholder:"Select format",name:`${v}.config.format`,allowDeselect:!1,control:s,size:"xs",className:"w-22"})}):h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-xs text-primary/50 leading-none",children:"Required"}),h.jsx(cN,{size:"sm",disabled:y,name:`${v}.config.required`,control:s})]})})]}),h.jsx("div",{className:"flex items-end",children:h.jsx("div",{className:"flex flex-row gap-4",children:h.jsx(ft,{size:"lg",Icon:_h,disabled:R,iconProps:{strokeWidth:1.5},onClick:()=>C(),variant:E?"primary":"ghost"})})})]}),E&&h.jsx("div",{className:"flex flex-col border-t border-t-muted px-3 py-2 bg-lightest/50",children:h.jsxs(xn,{defaultValue:"general",children:[h.jsxs(xn.List,{className:"flex flex-row",children:[h.jsx(xn.Tab,{value:"general",children:"General"}),h.jsx(xn.Tab,{value:"specific",children:Dg(x)}),h.jsx(xn.Tab,{value:"visibility",disabled:!0,children:"Visiblity"}),h.jsx("div",{className:"flex flex-grow"}),h.jsx(xn.Tab,{value:"code",className:"!self-end",children:"Code"})]}),h.jsx(xn.Panel,{value:"general",children:h.jsxs("div",{className:"flex flex-col gap-2 pt-3 pb-1",children:[h.jsx("div",{className:"flex flex-row",children:h.jsx(cN,{label:"Required",disabled:y,name:`${v}.config.required`,control:s})}),h.jsx(_n,{label:"Label",placeholder:"Label",disabled:y,...r(`${v}.config.label`)}),h.jsx(kg,{label:"Description",placeholder:"Description",disabled:y,...r(`${v}.config.description`)}),!A.includes("virtual")&&h.jsx(cN,{label:"Virtual",name:`${v}.config.virtual`,control:s,disabled:j.includes("virtual")||y})]},`${v}_${x}`)}),h.jsx(xn.Panel,{value:"specific",children:h.jsx("div",{className:"flex flex-col gap-2 pt-3 pb-1",children:h.jsx(Ch,{fallback:`Error rendering JSON Schema for ${x}`,children:h.jsx(Qje,{field:e,onChange:F=>{o(`${v}.config`,{...Rm(i([`${v}.config`])[0],TT),...F})},readonly:y})})})}),h.jsx(xn.Panel,{value:"code",children:(()=>{const{id:F,...B}=e;return h.jsx(Vr,{json:B,expand:4})})()}),!y&&h.jsx("div",{className:"flex flex-row justify-end",children:h.jsx(Xe,{IconLeft:XA,onClick:V(t),size:"small",variant:"subtlered",children:"Delete"})})]})})]},e.id)}const Qje=({field:e,onChange:t,readonly:n})=>{const r=e.field.type,o=mo(e.field.config??{},TT);return h.jsx(jh,{schema:Yje(r)?.toJSON(),formData:o,uiSchema:TC.config,className:"legacy hide-required-mark fieldset-alternative mute-root",onChange:t,readonly:n},r)},Zje=aT;function eAe(){const{nextStep:e,stepBack:t,state:n,setState:r}=Yu(),{config:o}=Ho(),i=n.entities?.create?.[0],s={id:{type:"primary",name:"id"}},a=w.useRef(null),c=km(Ame(i,{fields:s,config:{sort_field:"id",sort_dir:"asc"}})),{control:u,formState:{isValid:f,errors:p},getValues:g,handleSubmit:y,watch:v,setValue:x}=Cc({mode:"onTouched",resolver:Oc(Zje),defaultValues:c}),S=v(),E=It(_=>{x("fields",_)});function C(){f&&a.current?.isValid()?(r(_=>_.entities?.create?.[0]?{..._,entities:{create:[g()]}}:_),console.log("valid"),e("create")()):console.warn("not valid",a.current?.getErrors())}return h.jsxs("form",{onSubmit:y(C),children:[h.jsx(Gu,{children:h.jsxs("div",{className:"flex flex-col gap-6",children:[h.jsxs("div",{className:"flex flex-col gap-3",children:[h.jsxs("p",{children:["Add fields to ",h.jsx("strong",{children:i.name}),":"]}),h.jsx("div",{className:"flex flex-col gap-1",children:h.jsx(MH,{ref:a,fields:c.fields,onChange:E,defaultPrimaryFormat:o?.default_primary_format,isNew:!0})})]}),h.jsxs("div",{className:"flex flex-col gap-3",children:[h.jsx("p",{children:"How should it be sorted by default?"}),h.jsxs("div",{className:"flex flex-row gap-2",children:[h.jsx(Sa,{label:"Field",data:Object.keys(S.fields??{}).filter(_=>_.length>0),placeholder:"Select field",name:"config.sort_field",allowDeselect:!1,control:u}),h.jsx(Sa,{label:"Direction",data:["asc","desc"],defaultValue:"asc",placeholder:"Select direction",name:"config.sort_dir",allowDeselect:!1,control:u})]})]}),h.jsx("div",{children:Object.entries(p).map(([_,j])=>h.jsxs("p",{children:[_,": ",j.message]},_))})]})}),h.jsx(Ju,{next:{disabled:!f,type:"submit"},prev:{onClick:t},debug:{state:n,values:S}})]})}function Xv({name:e,control:t,defaultValue:n,rules:r,shouldUnregister:o,onChange:i,...s}){const{field:{value:a,onChange:c,...u},fieldState:f}=Oh({name:e,control:t,defaultValue:n,rules:r,shouldUnregister:o});return h.jsx(Jx,{value:a,onChange:p=>{c(p),i?.(p)},error:f.error?.message,...u,...s})}const $C=[{type:Fr.ManyToOne,label:"Many to One",component:rAe},{type:Fr.OneToOne,label:"One to One",component:oAe},{type:Fr.ManyToMany,label:"Many to Many",component:iAe},{type:Fr.Polymorphic,label:"Polymorphic",component:sAe}],tAe=Ve({type:le({enum:$C.map(e=>e.type)}),source:ju,target:ju,config:ke({})});function nAe(){const{config:e}=ot(),t=e.data.entities,n=Object.keys(t??{}).length,{nextStep:r,stepBack:o,state:i,path:s,setState:a}=Yu(),{register:c,handleSubmit:u,formState:{isValid:f},setValue:p,watch:g,control:y}=Cc({resolver:Oc(tAe),defaultValues:i.relations?.create?.[0]??{}}),v=g();function x(){f&&(a(E=>({...E,relations:{create:[v]}})),console.log("data",v),r("create")())}const S=It(()=>{const{source:E,target:C}=v;E&&C?(p("source",C),p("target",E)):E?(p("target",E),p("source",null)):(p("source",C),p("target",null))});return h.jsxs(h.Fragment,{children:[n<2&&h.jsx("div",{className:"px-5 py-4 bg-red-100 text-red-900",children:"Not enough entities to create a relation."}),h.jsxs("form",{onSubmit:u(x),children:[h.jsxs(Gu,{children:[h.jsxs("div",{className:"grid grid-cols-3 gap-8",children:[h.jsx(Sa,{control:y,name:"source",label:"Source",allowDeselect:!1,data:Object.entries(t??{}).map(([E,C])=>({value:E,label:C.config?.name??E,disabled:v.target===E}))}),h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx(Sa,{control:y,name:"type",onChange:()=>p("config",{}),label:"Relation Type",data:$C.map(E=>({value:E.type,label:E.label})),allowDeselect:!1}),v.type&&h.jsx("div",{className:"flex justify-center mt-1",children:h.jsx(Xe,{size:"small",IconLeft:HV,onClick:S,children:"Flip entities"})})]}),h.jsx(Sa,{control:y,allowDeselect:!1,name:"target",label:"Target",data:Object.entries(t??{}).map(([E,C])=>({value:E,label:C.config?.name??E,disabled:v.source===E}))})]}),h.jsx("div",{children:v.type&&$C.find(E=>E.type===v.type)?.component({register:c,control:y,data:v})})]}),h.jsx(Ju,{next:{type:"submit",disabled:!f,onClick:x},prev:{onClick:o},debug:{state:i,path:s,data:v}})]})]})}const Kt=({children:e})=>h.jsx("b",{className:"font-mono select-text",children:e}),c1=({children:e})=>h.jsx("div",{className:"bg-primary/5 py-4 px-5 rounded-lg mt-10",children:e});function rAe({register:e,control:t,data:{source:n,target:r,config:o}}){return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"grid grid-cols-3 gap-8",children:[h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsx(_n,{label:"Target mapping",...e("config.mappedBy"),placeholder:r}),h.jsx(Xv,{label:"Cardinality",name:"config.sourceCardinality",control:t,placeholder:"n"}),h.jsx(Xv,{label:"WITH limit",name:"config.with_limit",control:t,placeholder:String(ac.DEFAULTS.with_limit)})]}),h.jsx("div",{}),h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsx(_n,{label:"Source mapping",...e("config.inversedBy"),placeholder:n}),h.jsx(vc,{label:"Required",...e("config.required")})]})]}),n&&r&&o&&h.jsx(c1,{children:h.jsxs(h.Fragment,{children:[h.jsxs("pre",{className:"mb-2 opacity-70 flex flex-row items-center gap-2",children:[h.jsx(Ru,{className:"size-4"}),n,".",o.mappedBy||r,"_id ","→"," ",r]}),h.jsxs("p",{children:["Many ",h.jsx(Kt,{children:n})," will each have one reference to ",h.jsx(Kt,{children:r}),"."]}),h.jsxs("p",{children:["A property ",h.jsxs(Kt,{children:[o.mappedBy||r,"_id"]})," will be added to"," ",h.jsx(Kt,{children:n})," (which references ",h.jsx(Kt,{children:r}),")."]}),h.jsxs("p",{children:["When creating ",h.jsx(Kt,{children:n}),", a reference to ",h.jsx(Kt,{children:r})," is"," ",h.jsx("i",{children:o.required?"required":"optional"}),"."]}),o.sourceCardinality?h.jsxs("p",{children:[h.jsx(Kt,{children:r})," should not have more than"," ",h.jsx(Kt,{children:o.sourceCardinality})," referencing entr",o.sourceCardinality===1?"y":"ies"," to ",h.jsx(Kt,{children:n}),"."]}):null]})})]})}function oAe({register:e,control:t,data:{source:n,target:r,config:{mappedBy:o,required:i}}}){return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"grid grid-cols-3 gap-8",children:[h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsx(_n,{label:"Target mapping",...e("config.mappedBy"),placeholder:r}),h.jsx(vc,{label:"Required",...e("config.required")})]}),h.jsx("div",{}),h.jsx("div",{className:"flex flex-col gap-4",children:h.jsx(_n,{label:"Source mapping",...e("config.inversedBy"),placeholder:n})})]}),n&&r&&h.jsx(c1,{children:h.jsxs(h.Fragment,{children:[h.jsxs("pre",{className:"mb-2 opacity-70 flex flex-row items-center gap-2",children:[h.jsx(Ru,{className:"size-4"}),n,".",o||r,"_id ","↔"," ",r]}),h.jsxs("p",{children:["A single entry of ",h.jsx(Kt,{children:n})," will have a reference to"," ",h.jsx(Kt,{children:r}),"."]}),h.jsxs("p",{children:["A property ",h.jsxs(Kt,{children:[o||r,"_id"]})," will be added to"," ",h.jsx(Kt,{children:n})," (which references ",h.jsx(Kt,{children:r}),")."]}),h.jsxs("p",{children:["When creating ",h.jsx(Kt,{children:n}),", a reference to ",h.jsx(Kt,{children:r})," is"," ",h.jsx("i",{children:i?"required":"optional"}),"."]})]})})]})}function iAe({register:e,control:t,data:{source:n,target:r,config:o}}){const i=o.connectionTable?o.connectionTable:n&&r?`${n}_${r}`:"";return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"grid grid-cols-3 gap-8",children:[h.jsx("div",{className:"flex flex-col gap-4"}),h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsx(_n,{label:"Connection Table",...e("config.connectionTable"),placeholder:i}),h.jsx(_n,{label:"Connection Mapping",...e("config.connectionTableMappedName"),placeholder:i})]}),h.jsx("div",{className:"flex flex-col gap-4"})]}),n&&r&&h.jsx(c1,{children:h.jsxs(h.Fragment,{children:[h.jsxs("pre",{className:"mb-2 opacity-70 flex flex-row items-center gap-2",children:[h.jsx(Ru,{className:"size-4"}),n," ","→"," ",i," ","←"," ",r]}),h.jsxs("p",{children:["Many ",h.jsx(Kt,{children:n})," will have many ",h.jsx(Kt,{children:r}),"."]}),h.jsxs("p",{children:["A connection table ",h.jsx(Kt,{children:i})," will be created to store the relations."]})]})})]})}function sAe({register:e,control:t,data:{type:n,source:r,target:o,config:i}}){return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"grid grid-cols-3 gap-8",children:[h.jsx("div",{className:"flex flex-col gap-4",children:h.jsx(_n,{label:"Target mapping",...e("config.mappedBy"),placeholder:o})}),h.jsx("div",{}),h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsx(_n,{label:"Source mapping",...e("config.inversedBy"),placeholder:r}),h.jsx(Xv,{label:"Cardinality",name:"config.targetCardinality",control:t,placeholder:"n"})]})]},n),r&&o&&h.jsx(c1,{children:h.jsxs(h.Fragment,{children:[h.jsxs("pre",{className:"mb-2 opacity-70 flex flex-row items-center gap-2",children:[h.jsx(Ru,{className:"size-4"}),r," ","←"," ",o]}),h.jsxs("p",{children:[h.jsx(Kt,{children:r})," will have many ",h.jsx(Kt,{children:o}),"."]}),h.jsxs("p",{children:[h.jsx(Kt,{children:o})," will get additional properties ",h.jsx(Kt,{children:"reference"})," and"," ",h.jsx(Kt,{children:"entity_id"})," to make the (polymorphic) reference."]}),i.targetCardinality?h.jsxs("p",{children:[h.jsx(Kt,{children:r})," should not have more than"," ",h.jsx(Kt,{children:i.targetCardinality})," reference",i.targetCardinality===1?"":"s"," to ",h.jsx(Kt,{children:o}),"."]}):null]})})]})}function $T({name:e,control:t,defaultValue:n,rules:r,shouldUnregister:o,onChange:i,...s}){const{field:{value:a,onChange:c,...u}}=Oh({name:e,control:t,defaultValue:n,rules:r,shouldUnregister:o});return h.jsx(Os,{value:a,onChange:f=>{c(f),i?.(f)},...u,...s})}function aAe({name:e,control:t,defaultValue:n,rules:r,shouldUnregister:o,onChange:i,...s}){const{field:{value:a,onChange:c,...u},fieldState:f}=Oh({name:e,control:t,defaultValue:n,rules:r,shouldUnregister:o});return h.jsx(Yx,{value:a,onChange:p=>{c(p),i?.(p)},error:f.error?.message,...u,...s})}$T.Group=aAe;$T.Item=Os;const sD=ke({entity:ju,cardinality_type:le({enum:["single","multiple"],default:"multiple"}),cardinality:bt({minimum:1}).optional(),name:ju});function lAe(){const{stepBack:e,setState:t,state:n,path:r,nextStep:o}=Yu(),{register:i,handleSubmit:s,formState:{isValid:a,errors:c},watch:u,control:f}=Cc({mode:"onChange",resolver:Oc(sD),defaultValues:sD.template(n.initial??{})}),[p,g]=w.useState(!1),{config:y}=ot(),v=y.media.enabled??!1,x=y.media.entity_name??"media",S=Vt(y.data.entities??{},(j,A)=>A!==x?j:void 0),E=u(),C=Object.keys(y.data.entities?.[E.entity]?.fields??{});w.useEffect(()=>{g(C.includes(E.name))},[C,E.name]);async function _(){if(a&&!p){const{field:j,relation:A}=cAe(x,E);t(T=>({...T,fields:{create:[j]},relations:{create:[A]}})),o("create")()}}return h.jsxs(h.Fragment,{children:[!v&&h.jsx("div",{className:"px-5 py-4 bg-red-100 text-red-900",children:"Media is not enabled in the configuration. Please enable it to use this template."}),h.jsxs("form",{onSubmit:s(_),children:[h.jsx(Gu,{children:h.jsxs("div",{className:"flex flex-col gap-6",children:[h.jsx(Sa,{name:"entity",allowDeselect:!1,control:f,size:"md",label:"Choose which entity to add media to",required:!0,data:Object.entries(S).map(([j,A])=>({value:j,label:A.config?.name??j}))}),h.jsx($T.Group,{name:"cardinality_type",control:f,label:"How many items can be attached?",size:"md",children:h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx(Os,{label:"Multiple items",value:"multiple"}),h.jsx(Os,{label:"Single item",value:"single"})]})}),E.cardinality_type==="multiple"&&h.jsx(Xv,{name:"cardinality",control:f,size:"md",label:"How many exactly?",placeholder:"n",description:"Leave empty for unlimited",inputWrapperOrder:["label","input","description","error"]}),h.jsx(_n,{size:"md",label:"Set a name for the property",required:!0,description:`A virtual property will be added to ${E.entity?E.entity:"the entity"}.`,...i("name"),error:c.name?.message?c.name?.message:p?`Property "${E.name}" already exists on entity ${E.entity}`:void 0})]})}),h.jsx(Ju,{next:{type:"submit",disabled:!a||!v||p},prev:{onClick:e},debug:{state:n,path:r,data:E}})]})]})}function cAe(e,t){const n={name:t.name,entity:t.entity,field:{type:"media",config:{required:!1,fillable:["update"],hidden:!1,mime_types:[],virtual:!0,entity:t.entity}}},r={type:"poly",source:t.entity,target:e,config:{mappedBy:t.name,targetCardinality:t.cardinality_type==="single"?1:void 0}};return t.cardinality_type==="multiple"?t.cardinality&&t.cardinality>1&&(n.field.config.max_items=t.cardinality,r.config.targetCardinality=t.cardinality):(n.field.config.max_items=1,r.config.targetCardinality=1),{field:n,relation:r}}const uAe={id:"template-media",title:"Attach Media",description:"Attach media to an entity",Icon:ny},DH=[[lAe,uAe]];function dAe(){const{nextStep:e,stepBack:t,state:n,path:r,setState:o}=Yu(),i=n.action??null;function s(a){if(i===a){e(a)();return}o({action:a})}return h.jsxs(h.Fragment,{children:[h.jsxs(Gu,{children:[h.jsx("p",{children:"Choose what type to add."}),h.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[h.jsx(SN,{Icon:nSe,title:"Entity",description:"Create a new entity with fields",onClick:()=>s("entity"),selected:i==="entity"}),h.jsx(SN,{Icon:YA,title:"Relation",description:"Create a new relation between entities",onClick:()=>s("relation"),selected:i==="relation"})]}),h.jsxs("div",{className:"flex flex-col gap-2 mt-3",children:[h.jsx("h3",{className:"font-bold",children:"Quick templates"}),h.jsx("div",{className:"grid grid-cols-2 gap-3",children:DH.map(([,a])=>h.jsx(SN,{compact:!0,Icon:ny,title:a.title,description:a.description,onClick:()=>s(a.id),selected:i===a.id},a.id))})]})]}),h.jsx(Ju,{next:{onClick:i&&e(i),disabled:!i},prev:{onClick:t},prevLabel:"Cancel",debug:{state:n,path:r}})]})}const SN=({Icon:e,title:t,description:n,onClick:r,selected:o,compact:i=!1,disabled:s=!1})=>h.jsxs("div",{onClick:s!==!0?r:void 0,className:Be("flex gap-3 border border-primary/10 rounded cursor-pointer",i?"flex-row p-4 items-center":"flex-col p-5",o?"bg-primary/10 border-primary/50":"hover:bg-primary/5",s&&"opacity-50"),children:[h.jsx(e,{className:"size-10"}),h.jsxs("div",{className:"flex flex-col leading-tight",children:[h.jsx("p",{className:"text-lg font-bold",children:t}),h.jsx("p",{children:n})]})]});function RT({context:e,id:t,innerProps:{initialPath:n=[],initialState:r}}){const[o,i]=w.useState(n);function s(){e.closeModal(t)}return h.jsxs(eU,{path:o,lastBack:s,initialPath:n,initialState:r,children:[h.jsxs(eu,{id:"select",children:[h.jsx(Zc,{path:["Create New"],onClose:s}),h.jsx(dAe,{})]}),h.jsxs(eu,{id:"entity",path:["action"],children:[h.jsx(Zc,{path:["Create New","Entity"],onClose:s}),h.jsx(c2e,{})]}),h.jsxs(eu,{id:"entity-fields",path:["action","entity"],children:[h.jsx(Zc,{path:["Create New","Entity","Fields"],onClose:s}),h.jsx(eAe,{})]}),h.jsxs(eu,{id:"relation",path:["action"],children:[h.jsx(Zc,{path:["Create New","Relation"],onClose:s}),h.jsx(nAe,{})]}),h.jsxs(eu,{id:"create",path:["action"],children:[h.jsx(Zc,{path:["Create New","Creation"],onClose:s}),h.jsx(PEe,{})]}),DH.map(([a,c])=>h.jsxs(eu,{id:c.id,path:["action"],children:[h.jsx(Zc,{path:["Create New","Template",c.title],onClose:s}),h.jsx(a,{})]},c.id))]})}RT.defaultTitle=void 0;RT.modalProps={withCloseButton:!1,size:"xl",padding:0};function kT({innerProps:e}){const{data:t,...n}=e,r=Vt(t,(s,a)=>typeof s=="object"&&"label"in s?s:{label:h.jsx("span",{className:"font-mono",children:a}),value:s,expand:10,showCopy:!0,...n}),o=Object.keys(r).length;function i({value:s,label:a,className:c,...u}){return h.jsx(Vr,{json:s,className:pn("text-sm",c),...u})}return h.jsx("div",{className:"bg-background",children:o>1?h.jsxs(xn,{defaultValue:Object.keys(r)[0],children:[h.jsx("div",{className:"sticky top-0 bg-background z-10",children:h.jsx(xn.List,{children:Object.entries(r).map(([s,a])=>h.jsx(xn.Tab,{value:s,children:a.label},s))})}),Object.entries(r).map(([s,a])=>h.jsx(xn.Panel,{value:s,children:i(a)},s))]}):i({...r[Object.keys(r)[0]],title:r[Object.keys(r)[0]].label})})}kT.defaultTitle=!1;kT.modalProps={withCloseButton:!1,size:"lg",classNames:{body:"!p-0"}};function MT({context:e,id:t,innerProps:{schema:n,uiSchema:r,onSubmit:o,autoCloseAfterSubmit:i}}){const[s,a]=w.useState(!1),c=w.useRef(null),[u,f]=w.useState(!1),p=w.useRef(!1),[g,y]=w.useState();function v(E,C){const _=C();console.log("Data changed",E,_),a(_)}function x(){e.closeModal(t)}async function S(){p.current=!0,c.current?.validateForm()&&(f(!0),await o?.(c.current?.formData(),{close:x,setError:y}),f(!1),i!==!1&&x())}return h.jsxs(h.Fragment,{children:[g&&h.jsx(ai.Exception,{message:g}),h.jsxs("div",{className:"pt-3 pb-3 px-4 gap-4 flex flex-col",children:[h.jsx(jh,{tagName:"form",ref:c,schema:JSON.parse(JSON.stringify(n)),uiSchema:r,className:"legacy hide-required-mark fieldset-alternative mute-root",onChange:v,onSubmit:S}),h.jsxs("div",{className:"flex flex-row justify-end gap-2",children:[h.jsx(Xe,{onClick:x,children:"Cancel"}),h.jsx(Xe,{variant:"primary",onClick:S,disabled:!s||u,children:"Create"})]})]})]})}MT.defaultTitle="JSON Schema Form Modal";MT.modalProps={size:"md",classNames:{root:"bknd-admin",header:"!bg-lightest !py-3 px-5 !h-auto !min-h-px",content:"rounded-lg select-none",title:"!font-bold !text-md",body:"!p-0"}};function PT({context:e,id:t,innerProps:n}){return h.jsxs(h.Fragment,{children:[h.jsx("span",{children:n.modalBody}),h.jsx("button",{onClick:()=>e.closeModal(t),children:"Close modal"})]})}PT.defaultTitle="Test Modal";PT.modalProps={classNames:{size:"md",root:"bknd-admin",header:"!bg-primary/5 border-b border-b-muted !py-3 px-5 !h-auto !min-h-px",content:"rounded-lg select-none",title:"font-bold !text-md",body:"py-3 px-5 gap-4 flex flex-col"}};const fAe={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0.9)"},transitionProperty:"transform, opacity"},hAe=e=>{const[t,n]=w.useState(),r=ss(e?.baseUrl);return w.useEffect(()=>{(async()=>{const o=await r.auth.strategies();o.res.ok&&n(o.body)})()},[e?.baseUrl]),{strategies:t?.strategies,basepath:t?.basepath,loading:!t}};function IH(e,t){const n=e?.tagName.toLowerCase()??"",r=["input","select","textarea"];return!e||!t?.contains(e)||!r.includes(n)||!("name"in e)||e.hasAttribute("data-ignore")||e.closest("[data-ignore]")}function pAe(e){const t=e.currentTarget,n=e.target;return IH(n,t)?null:n}function mAe(e,t){const n=e.querySelectorAll(`[name="${t}"]`);return Array.from(n).filter(r=>IH(r))}function gAe(e,t){if(!e)return t;const n=e.required;if(!(!t&&!n))if(e.type==="number"){const r=Number(t);if(Number.isNaN(r)&&!n)return;const o="min"in e&&e.min.length>0?Number(e.min):void 0,i="max"in e&&e.max.length>0?Number(e.max):void 0,s="step"in e&&e.step.length>0?Number(e.step):void 0;return o&&ri?i:s&&s!==1?Math.round(r/s)*s:r}else if(e.type==="text"){const r="maxLength"in e&&e.maxLength>-1?Number(e.maxLength):void 0,o="pattern"in e?new RegExp(e.pattern):void 0;return r&&t.length>r?t.slice(0,r):o&&!o.test(t)?"":t}else return e.type==="checkbox"?"checked"in e?!!e.checked:["on","1","true",1,!0].includes(t):t}function RC(e,t){if(!e)return e;const n=[null,void 0,""],r={empty:t?.empty??n,emptyInArray:t?.emptyInArray??n,keepEmptyArray:t?.keepEmptyArray??!1};return Object.entries(e).reduce((o,[i,s])=>{if(s&&Array.isArray(s)&&s.some(a=>typeof a=="object")){const a=s.map(c=>RC(c,r));(a.length>0||r?.keepEmptyArray)&&(o[i]=a)}else if(s&&typeof s=="object"&&!Array.isArray(s)){const a=RC(s,r);Object.keys(a).length>0&&(o[i]=a)}else if(Array.isArray(s)){const a=s.filter(c=>!r.emptyInArray.includes(c));(a.length>0||r?.keepEmptyArray)&&(o[i]=a)}else r.empty.includes(s)||(o[i]=s);return o},{})}function LH(e,t,n){let r=t;if(typeof r=="string"){const s=a=>a[0]==='"'&&a.at(-1)==='"';r=r.split(/[.\[\]]+/).filter(a=>a).map(a=>Number.isNaN(Number(a))?a:Number(a)).map(a=>typeof a=="string"&&s(a)?a.slice(1,-1):a)}if(r.length===0)throw new Error("The path must have at least one entry in it");const[o,...i]=r;return i.length===0?(e[o]=n,e):(o in e||(e[o]=typeof i[0]=="number"?[]:{}),LH(e[o],i,n),e)}function yAe({children:e,validateOn:t="submit",hiddenSubmit:n=!1,errorFieldSelector:r,reportValidity:o,onSubmit:i,onSubmitInvalid:s,onError:a,clean:c,disableSubmitOnError:u=!0,...f}){const p=w.useRef(null),[g,y]=w.useState([]);w.useEffect(()=>{!p.current||f.noValidate||x()},[]),w.useEffect(()=>{if(!p.current||f.noValidate)return;const j=g.length>0;p.current.querySelectorAll("[type=submit]").forEach(A=>{!A||!("type"in A)||A.type!=="submit"||(A.disabled=j)}),a?.(g)},[g]);const v=(j,A)=>{if(f.noValidate||!j||!("name"in j))return;const T=p.current?.querySelector(r?.(j.name)??`[data-role="input-error"][data-name="${j.name}"]`);if(j.checkValidity())y(k=>k.filter(R=>R.name!==j.name)),T&&(T.textContent="");else{const k={name:j.name,message:j.validationMessage};return y(R=>[...R.filter(V=>V.name!==j.name),k]),A?.report&&(T?T.textContent=k.message:o&&j.reportValidity()),k}},x=j=>{if(!p.current||f.noValidate)return[];const A=[];return p.current.querySelectorAll("input, select, textarea").forEach(T=>{const R=v(T,j);R&&A.push(R)}),u&&p.current.querySelectorAll("[type=submit]").forEach(T=>{A.length>0?T.setAttribute("disabled","disabled"):T.removeAttribute("disabled")}),A},S=()=>{if(!p.current)return{};const j=new FormData(p.current),A={};return j.forEach((T,k)=>{const R=mAe(p.current,k);if(R.length===0){console.warn(`No target found for key: ${k}`);return}const H=R.length>1;R.forEach((F,B)=>{let U=k;H&&(U=`${k}[${B}]`),LH(A,U,gAe(F,F.value))})}),typeof c>"u"?A:RC(A,c===!0?void 0:c)},E=async j=>{if(!p.current)return;const T=pAe(j);T&&((t==="change"||g.length>0)&&v(T,{report:!0}),f.onChange&&await f.onChange(S(),{event:j,key:T.name,value:T.value,errors:g}))},C=async j=>{j.preventDefault();const A=p.current;if(!A)return;const T=x({report:!0});if(T.length>0){s?.(T,{event:j,form:A});return}i?await i(S(),{event:j,form:A}):A.submit()},_=j=>{p.current&&j.keyCode===13&&g.length>0&&!f.noValidate&&o&&p.current.reportValidity()};return h.jsxs("form",{...f,onChange:E,onSubmit:C,ref:p,onKeyDown:_,children:[e,n&&h.jsx("input",{type:"submit",style:{visibility:"hidden"}})]})}function bAe({label:e,provider:t,icon:n,action:r,method:o="POST",basepath:i="/api/auth",children:s}){const a=[i,t,r].join("/");return h.jsxs("form",{method:o,action:a,className:"w-full",children:[h.jsxs(Xe,{type:"submit",size:"large",variant:"outline",className:"justify-center w-full",IconLeft:n,children:["Continue with ",e??Dg(t)]}),s]})}function vAe({formData:e,className:t,method:n="POST",action:r,auth:o,buttonLabel:i=r==="login"?"Sign in":"Sign up",onSubmit:s,...a}){const c=DA(),u=o?.basepath??"/api/auth",[f,p]=w.useState(),[,g]=Uo(),y={action:`${u}/password/${r}`,strategy:o?.strategies?.password??{}},v=Vt(o?.strategies??{},E=>E.type!=="password"?E.config:void 0),x=Object.keys(v).length>0;async function S(E,C){if(c?.local){C.event.preventDefault();const _=await c.login(E);if("token"in _)g("/");else{p(_.error);return}}await s?.(C.event),C.form.submit()}return w.useEffect(()=>{c.user&&g("/")},[c.user]),h.jsxs("div",{className:"flex flex-col gap-4 w-full",children:[x&&h.jsxs(h.Fragment,{children:[h.jsx("div",{children:Object.entries(v)?.map(([E,C],_)=>h.jsx(bAe,{provider:E,method:n,basepath:u,action:r},_))}),h.jsx(xAe,{})]}),h.jsxs(yAe,{method:n,action:y.action,onSubmit:S,...a,validateOn:"change",className:pn("flex flex-col gap-3 w-full",t),children:[f&&h.jsx(ai.Exception,{message:f,className:"justify-center"}),h.jsxs(mi,{children:[h.jsx(uc,{htmlFor:"email",children:"Email address"}),h.jsx(qa,{type:"email",name:"email",required:!0})]}),h.jsxs(mi,{children:[h.jsx(uc,{htmlFor:"password",children:"Password"}),h.jsx(AH,{name:"password",required:!0,minLength:1})]}),h.jsx(Xe,{type:"submit",variant:"primary",size:"large",className:"w-full mt-2 justify-center",children:i})]})]})}const xAe=()=>h.jsxs("div",{className:"w-full flex flex-row items-center",children:[h.jsx("div",{className:"relative flex grow",children:h.jsx("div",{className:"h-px bg-primary/10 w-full absolute top-[50%] z-0"})}),h.jsx("div",{className:"mx-5",children:"or"}),h.jsx("div",{className:"relative flex grow",children:h.jsx("div",{className:"h-px bg-primary/10 w-full absolute top-[50%] z-0"})})]});function wAe({method:e="POST",action:t="login",logo:n,intro:r,formOnly:o}){const{strategies:i,basepath:s,loading:a}=hAe(),c=h.jsx(vAe,{auth:{basepath:s,strategies:i},method:e,action:t});return o?a?null:c:h.jsx("div",{className:"flex flex-1 flex-col select-none h-dvh w-dvw justify-center items-center bknd-admin",children:!a&&h.jsxs("div",{className:"flex flex-col gap-4 items-center w-96 px-6 py-7",children:[n||null,w.isValidElement(r)?r:h.jsxs("div",{className:"flex flex-col items-center",children:[h.jsxs("h1",{className:"text-xl font-bold",children:["Sign ",t==="login"?"in":"up"," to your admin panel"]}),h.jsx("p",{className:"text-primary/50",children:"Enter your credentials below to get access."})]}),c]})})}const FH={Screen:wAe};function SAe(){const e=w.useRef(0);return e.current++,e.current}const EAe=[".DS_Store","Thumbs.db"];function ly(e,t){const n=NAe(e);if(typeof n.path!="string"){const{webkitRelativePath:r}=e;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function NAe(e){const{name:t}=e,n=t&&t.lastIndexOf(".")!==-1;if(console.log("withMimeType",t,n),n&&!e.type){const r=LL(t);console.log("guessed",r),r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}async function fb(e){return Qv(e)&&_Ae(e.dataTransfer)?AAe(e.dataTransfer,e.type):CAe(e)?OAe(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?jAe(e):[]}function _Ae(e){return Qv(e)}function CAe(e){return Qv(e)&&Qv(e.target)}function Qv(e){return typeof e=="object"&&e!==null}function OAe(e){return kC(e.target.files).map(t=>ly(t))}async function jAe(e){return(await Promise.all(e.map(n=>n.getFile()))).map(n=>ly(n))}async function AAe(e,t){if(e.items){const n=kC(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=await Promise.all(n.map(TAe));return aD(zH(r))}return aD(kC(e.files).map(n=>ly(n)))}function aD(e){return e.filter(t=>EAe.indexOf(t.name)===-1)}function kC(e){if(e===null)return[];const t=[];for(let n=0;n[...t,...Array.isArray(n)?zH(n):[n]],[])}function lD(e){const t=e.getAsFile();if(!t)return Promise.reject(`${e} is not a File`);const n=ly(t);return Promise.resolve(n)}async function $Ae(e){return e.isDirectory?BH(e):RAe(e)}function BH(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(async s=>{if(s.length){const a=Promise.all(s.map($Ae));o.push(a),i()}else try{const a=await Promise.all(o);n(a)}catch(a){r(a)}},s=>{r(s)})}i()})}async function RAe(e){return new Promise((t,n)=>{e.file(r=>{const o=ly(r,e.fullPath);t(o)},r=>{n(r)})})}const MC={enter:["dragenter","dragover","dragstart"],leave:["dragleave","drop"]},cD=[...MC.enter,...MC.leave];function kAe({onDropped:e,onOver:t,onLeave:n}){const[r,o]=w.useState(!1),i=w.useRef(null),s=w.useRef(!1),a=w.useCallback(p=>{p.preventDefault(),p.stopPropagation()},[]),c=w.useCallback(async p=>{const g=MC.enter.includes(p.type);t&&g!==r&&!s.current&&(t(await fb(p),p),s.current=!0),o(g),g===!1&&s.current&&(s.current=!1,n?.())},[]),u=w.useCallback(async p=>{const g=await fb(p);e?.(g),s.current=!1},[e]),f=w.useCallback(async p=>{const g=await fb(p);e?.(g)},[e]);return w.useEffect(()=>{const p=i.current;return cD.forEach(g=>{p.addEventListener(g,a),p.addEventListener(g,c)}),p.addEventListener("drop",u),()=>{cD.forEach(g=>{p.removeEventListener(g,a),p.removeEventListener(g,c)}),p.removeEventListener("drop",u)}},[]),{ref:i,isOver:r,fromEvent:fb,onDropped:e,handleFileInputChange:f}}function MAe(e,t={overrides:{},baseUrl:""}){return{body:`${t.baseUrl}/api/media/file/${e.path}`,path:e.path,name:e.path,size:e.size??0,type:e.mime_type??"",state:"uploaded",progress:0,...t.overrides}}function PAe(e,t={overrides:{},baseUrl:""}){return e.map(n=>MAe(n,t))}function uD({maxItems:e,current:t=0,overwrite:n,added:r}){if(!e)return{reject:!1,to_drop:0};const o=e-t,i=r>o?r:r-o>0?r-o:0;return{reject:n?r>e:o-r<0,to_drop:i}}const DAe=()=>UA(ey({files:[],isOver:!1,isOverAccepted:!1,uploading:!1},(e,t)=>({setFiles:n=>e(({files:r})=>({files:n(r)})),getFilesLength:()=>t().files.length,setIsOver:(n,r)=>e({isOver:n,isOverAccepted:r}),setUploading:n=>e({uploading:n}),setIsOverAccepted:n=>e({isOverAccepted:n}),reset:()=>e({files:[],isOver:!1,isOverAccepted:!1}),addFile:n=>e(r=>({files:[...r.files,n]})),removeFile:n=>e(r=>({files:r.files.filter(o=>o.path!==n)})),removeAllFiles:()=>e({files:[]}),setFileProgress:(n,r)=>e(o=>({files:o.files.map(i=>i.path===n?{...i,progress:r}:i)})),setFileState:(n,r,o)=>e(i=>({files:i.files.map(s=>s.path===n?{...s,state:r,progress:o??s.progress}:s)})),overrideFile:(n,r)=>e(o=>({files:o.files.map(i=>i.path===n?{...i,...r}:i)}))})));function IAe(e){if(e&&e instanceof XMLHttpRequest){const t=JSON.parse(e.responseText);alert(`Upload failed with code ${e.status}: ${t.error}`)}else alert("Upload failed")}function LAe({getUploadInfo:e,handleDelete:t,initialItems:n=[],flow:r="start",allowedMimeTypes:o,maxItems:i,overwrite:s,autoUpload:a,placeholder:c,onRejected:u,onDeleted:f,onUploadedAll:p,onUploaded:g,children:y,onClick:v,footer:x}){const S=w.useRef(DAe()).current,E=Pr(S,D=>D.files),C=Pr(S,D=>D.setFiles),_=Pr(S,D=>D.getFilesLength),j=Pr(S,D=>D.setUploading),A=Pr(S,D=>D.setIsOver),T=Pr(S,D=>D.uploading),k=Pr(S,D=>D.setFileState),R=Pr(S,D=>D.overrideFile),V=Pr(S,D=>D.removeFile),H=w.useRef(null);w.useEffect(()=>{C(()=>n)},[n.length]);function F(D){return(Array.isArray(D)?D:[D]).map(Q=>({kind:"kind"in Q?Q.kind:"file",type:Q.type,size:"size"in Q?Q.size:0})).every(Q=>Q.kind!=="file"?(console.warn("file not accepted: not a file",Q.kind),!1):o&&o.length>0&&!vie(D,o)?(console.warn("file not accepted: not allowed mimetype",Q.type),!1):!0)}const B=w.useCallback(D=>{if(console.log("onDropped",D),!F(D))return;const W=D.length;C(K=>{let Q=0;if(i){const me=uD({maxItems:i,overwrite:s,added:W,current:K.length});if(me.reject)return u?u(D):console.warn("maxItems reached"),K;Q=me.to_drop}const ie=K.slice(Q),pe=ie.map(me=>me.path),ue=D.filter(me=>!("path"in me)||me.path&&!pe.includes(me.path)).map(me=>({body:me,path:"path"in me?me.path:me.name,name:me.name,size:me.size,type:me.type,state:"pending",progress:0})),se=r==="start"?[...ue,...ie]:[...ie,...ue];return a&&ue.length>0&&setTimeout(()=>j(!0),0),se})},[a,r,i,s]),{handleFileInputChange:U,ref:M}=kAe({onDropped:D=>{console.log("onDropped",D),B(D)},onOver:D=>{if(!F(D)){A(!0,!1);return}const W=_(),K=uD({maxItems:i,overwrite:s,added:D.length,current:W});console.log("--files in onOver",W,K),A(!0,!K.reject)},onLeave:()=>{A(!1,!1)}});w.useEffect(()=>{console.log("files updated")},[E]),w.useEffect(()=>{T&&(async()=>{const D=E.filter(W=>W.state==="pending");if(D.length===0){j(!1);return}else{const W=[];for(const K of D)try{const Q=await z(K);W.push(Q),g?.(Q)}catch(Q){IAe(Q)}j(!1),p?.(W)}})()},[T]);function z(D){return new Promise((W,K)=>{if(D.body){if(D.state!=="pending"){console.error("File is not pending"),K();return}else if(!(D.body instanceof File)){console.error("File body is not a File instance"),K();return}}else{console.error("File has no body"),K();return}const Q=e({path:D.body.path});console.log("dropzone:uploadInfo",Q);const{url:ie,headers:pe,method:ue="POST"}=Q,se=new XMLHttpRequest;console.log("xhr:url",ie);const me=new URLSearchParams;s&&me.append("overwrite","1"),se.open(ue,String(ie)+"?"+String(me),!0),pe&&pe.forEach((je,_e)=>{se.setRequestHeader(_e,je)}),se.upload.addEventListener("progress",je=>{if(console.log("progress",je.loaded,je.total),je.lengthComputable){k(D.path,"uploading",je.loaded/je.total);const _e=je.loaded/je.total*100;console.log(`Progress: ${_e.toFixed(2)}%`)}else console.log("Unable to compute progress information since the total size is unknown")}),se.onload=()=>{if(console.log("onload",D.path,se.status),se.status>=200&&se.status<300){console.log("Upload complete");try{const je=JSON.parse(se.responseText);console.log("Response:",D,je);const _e={...je.state,progress:1,state:"uploaded"};R(D.path,_e),W({...je,...D,..._e})}catch(je){k(D.path,"uploaded",1),console.error("Error parsing response",je),K(je)}}else k(D.path,"failed",1),console.error("Upload failed with status: ",se.status,se.statusText),K(se)},se.onerror=()=>{console.error("Error during the upload process.")},se.onloadstart=()=>{k(D.path,"uploading",0),console.log("loadstart")},se.setRequestHeader("Accept","application/json");const xe=new FormData;xe.append("file",D.body),se.send(xe)})}const $=w.useCallback(async D=>{switch(console.log("deleteFile",D),D.state){case"uploaded":case"initial":window.confirm("Are you sure you want to delete this file?")&&(console.log('setting state to "deleting"',D),k(D.path,"deleting"),await t(D),V(D.path),f?.(D));break}},[]),L=w.useCallback(async D=>{const W=await z(D);p?.([W]),g?.(W)},[]),P=w.useCallback(()=>H.current?.click(),[H]),q=w.useMemo(()=>!!(c?.show!==!1&&(!i||i&&E.length({store:S,wrapperRef:M,inputProps:{ref:H,type:"file",multiple:!i||i>1,onChange:U,accept:o?.join(",")},showPlaceholder:q,actions:{uploadFile:L,deleteFile:$,openFileInput:P,addFiles:B},dropzoneProps:{maxItems:i,placeholder:c,autoUpload:a,flow:r,allowedMimeTypes:o},onClick:v,footer:x}),[i,E.length,r,c,a,x,o]);return h.jsx(VH.Provider,{value:Y,children:y?typeof y=="function"?y(Y):y:h.jsx(BAe,{...Y})})}const VH=w.createContext(void 0);function UH(){return w.useContext(VH)}const FAe=()=>{const{store:e}=UH(),t=Pr(e,i=>i.files),n=Pr(e,i=>i.isOver),r=Pr(e,i=>i.isOverAccepted),o=Pr(e,i=>i.uploading);return{files:t,isOver:n,isOverAccepted:r,uploading:o}},u1=(e,t)=>{const{store:n}=UH();return Pr(n,r=>{const o=typeof e=="string"?r.files.find(i=>i.path===e):r.files.find(i=>i.path===e.path);return o?t(o):void 0})};function zAe(e){if(e&&e instanceof XMLHttpRequest){const t=JSON.parse(e.responseText);alert(`Upload failed with code ${e.status}: ${t.error}`)}else alert("Upload failed")}const BAe=({wrapperRef:e,inputProps:t,showPlaceholder:n,actions:{uploadFile:r,deleteFile:o,openFileInput:i},dropzoneProps:{placeholder:s,flow:a,maxItems:c,allowedMimeTypes:u},onClick:f,footer:p})=>{const{files:g,isOver:y,isOverAccepted:v}=FAe(),x=n&&h.jsx(VAe,{onClick:i,text:s?.text}),S=w.useCallback(async E=>{try{return await r(E)}catch(C){zAe(C)}},[r]);return h.jsxs("div",{ref:e,className:Be("dropzone w-full h-full align-start flex flex-col select-none",y&&v&&"bg-green-200/10",y&&!v&&"bg-red-200/40 cursor-not-allowed"),children:[h.jsx("div",{className:"hidden",children:h.jsx("input",{...t})}),h.jsx("div",{className:"flex flex-1 flex-col",children:h.jsxs("div",{className:"flex flex-row flex-wrap gap-2 md:gap-3",children:[a==="start"&&x,g.map(E=>h.jsx(HAe,{file:E,handleUpload:S,handleDelete:o,onClick:f},E.path)),a==="end"&&x,p]})})]})},VAe=({onClick:e,text:t="Upload files"})=>h.jsx("div",{className:"w-[49%] aspect-square md:w-60 flex flex-col border-2 border-dashed border-muted relative justify-center items-center text-primary/30 hover:border-primary/30 hover:text-primary/50 hover:cursor-pointer hover:bg-muted/20 transition-colors duration-200",onClick:e,children:h.jsx("span",{className:"",children:t})}),UAe=({file:e,fallback:t,...n})=>e.type.startsWith("image/")?h.jsx(JAe,{...n,file:e}):e.type.startsWith("video/")?h.jsx(YAe,{...n,file:e}):t?t({file:e}):null,HH=w.memo(UAe,(e,t)=>e.file.path===t.file.path),HAe=w.memo(({file:e,handleUpload:t,handleDelete:n,onClick:r})=>{SAe();const o=u1(e,s=>{const{progress:a,...c}=s;return c});if(!o)return null;const i=w.useCallback(()=>{r&&r(o)},[r,o.path]);return h.jsxs("div",{className:Be("w-[49%] md:w-60 aspect-square flex flex-col border border-muted relative hover:bg-primary/5 cursor-pointer transition-colors",o.state==="failed"&&"border-red-500 bg-red-200/20",o.state==="deleting"&&"opacity-70"),onClick:i,children:[h.jsx("div",{className:"absolute top-2 right-2",children:h.jsx(WAe,{file:o,handleDelete:n,handleUpload:t})}),h.jsx(qAe,{file:o}),h.jsx("div",{className:"flex bg-primary/5 aspect-[1/0.78] overflow-hidden items-center justify-center",children:h.jsx(HH,{file:o,fallback:XAe,className:"max-w-full max-h-full"})}),h.jsxs("div",{className:"flex flex-col px-1.5 py-1",children:[h.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[h.jsx("p",{className:"truncate select-text w-[calc(100%-10px)]",children:o.name}),h.jsx(GAe,{file:o})]}),h.jsxs("div",{className:"flex flex-row justify-between text-xs md:text-sm font-mono opacity-50 text-nowrap gap-2",children:[h.jsx("span",{className:"truncate select-text",children:o.type}),h.jsx("span",{className:"whitespace-nowrap",children:rw.fileSize(o.size)})]})]})]})},(e,t)=>e.file.path===t.file.path&&e.file.state===t.file.state),qAe=({file:e})=>{const t=u1(e.path,n=>({state:n.state,progress:n.progress}));return!t||t.state!=="uploading"?null:h.jsx("div",{className:"absolute w-full top-0 left-0 right-0 h-1",children:h.jsx("div",{className:"bg-blue-600 h-1 transition-all duration-75",style:{width:(t.progress*100).toFixed(0)+"%"}})})},WAe=w.memo(({file:e,handleDelete:t,handleUpload:n})=>{const r=u1(e.path,i=>{const{progress:s,...a}=i;return a});if(!r)return null;const o=w.useMemo(()=>[r.state==="uploaded"&&typeof r.body=="string"&&{label:"Open",icon:bSe,onClick:()=>{window.open(r.body,"_blank")}},["initial","uploaded"].includes(r.state)&&{label:"Delete",destructive:!0,icon:XA,onClick:()=>t(r)},["initial","pending"].includes(r.state)&&{label:"Upload",icon:zSe,onClick:()=>n(r)}],[r,t,n]);return h.jsx(Nr,{items:o,position:"bottom-end",children:h.jsx(ft,{Icon:Ha})})},(e,t)=>e.file.path===t.file.path),GAe=({file:e})=>{const t=u1(e.path,r=>r.state);if(!t||t==="uploaded")return null;const n={failed:"bg-red-500",deleting:"bg-orange-500 animate-pulse",uploading:"bg-blue-500 animate-pulse"}[t]??"bg-primary/50";return h.jsx("div",{className:"w-2 h-2 rounded-full mt-px "+n,title:t})},JAe=({file:e,...t})=>{const n=typeof e.body=="string"?e.body:URL.createObjectURL(e.body);return h.jsx("img",{...t,src:n})},YAe=({file:e,...t})=>{const n=typeof e.body=="string"?e.body:URL.createObjectURL(e.body);return h.jsx("video",{...t,src:n})},KAe=[{mime:"text/plain",Icon:NSe},{mime:"text/csv",Icon:wSe},{mime:/(text|application)\/xml/,Icon:_Se},{mime:"text/markdown",Icon:RSe},{mime:/^text\/.*$/,Icon:xSe},{mime:"application/json",Icon:$Se},{mime:"application/pdf",Icon:SSe},{mime:/^audio\/.*$/,Icon:DSe},{mime:"application/zip",Icon:HSe},{mime:"application/sql",Icon:ESe}],XAe=({file:e})=>{const t=KAe.find(n=>n.mime instanceof RegExp?n.mime.test(e.type):n.mime===e.type);return t?h.jsx(t.Icon,{className:"size-10 text-gray-400"}):h.jsx("div",{className:"text-xs text-primary/50 text-center font-mono leading-none max-w-[90%] truncate",children:e.type})};function qH({initialItems:e,media:t,entity:n,query:r,randomFilename:o,infinite:i=!1,...s}){const a=w.useId(),c=ss(),u=PA(),f=c.baseUrl,p=r?.limit??s.maxItems??50,g=k=>({limit:p,offset:k*p}),y=t?.entity_name??"media",v=(k,R=0)=>n?k.data.readManyByReference(n.name,n.id,n.field,{...g(R),...r}):k.data.readMany(y,{...g(R),...r}),x=i?dve(v,{pageSize:p}):Zg(v,{enabled:e!==!1&&!e,revalidateOnFocus:!1}),S=It(k=>({url:n?c.media.getEntityUploadUrl(n.name,n.id,n.field):c.media.getFileUploadUrl(o?void 0:k),headers:c.media.getUploadHeaders(),method:"POST"}));It(async()=>{await u(x.promise.key({search:!1}))});const E=It(async k=>c.media.deleteFile(k.path)),C=e??(Array.isArray(x.data)?x.data:[])??[],_=PAe(C,{baseUrl:f}),j=a+JSON.stringify(e),A="_data"in x?x._data?.[0]?.body.meta.count:void 0;let T=0;return i&&"setSize"in x&&(T=typeof A=="number"?A:x.endReached?_.length:_.length+p,!A&&!x.isValidating&&p*x.size>=T&&(T=_.length)),h.jsx(LAe,{getUploadInfo:S,handleDelete:E,autoUpload:!0,initialItems:_,footer:i&&"setSize"in x&&h.jsx(QAe,{items:_.length,length:T,onFirstVisible:()=>x.setSize(x.size+1)}),...s},j)}const QAe=({items:e=0,length:t=0,onFirstVisible:n})=>{const{ref:r,inViewport:o}=OX(),[i,s]=w.useState(0),a=w.useRef(-1);return w.useEffect(()=>{o&&e>a.current&&(a.current=e,s(u=>u+1),n())},[o]),t-e<=0?null:new Array(Math.max(t-e,0)).fill(0).map((u,f)=>h.jsx("div",{ref:f===0?r:void 0,className:"w-[49%] md:w-60 bg-muted aspect-square"},f))},WH={Dropzone:qH,Preview:HH};function GH(){const{config:e,schema:t,actions:n}=ot(),r={config:{patch:async i=>await n.set("media",i,!0)?(await n.reload(),!0):!1}};return{$media:{},config:e.media,schema:t.media,actions:r}}const Wf={};function JH(e){return"init"in e}function PC(e){return!!e.write}function dD(e){return"v"in e||"e"in e}function Zv(e){if("e"in e)throw e.e;if((Wf?"production":void 0)!=="production"&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v}const ex=new WeakMap;function YH(e){var t;return tx(e)&&!!((t=ex.get(e))!=null&&t[0])}function ZAe(e){const t=ex.get(e);t?.[0]&&(t[0]=!1,t[1].forEach(n=>n()))}function DC(e,t){let n=ex.get(e);if(!n){n=[!0,new Set],ex.set(e,n);const r=()=>{n[0]=!1};e.then(r,r)}n[1].add(t)}function tx(e){return typeof e?.then=="function"}function KH(e,t,n){if(!n.p.has(e)){n.p.add(e);const r=()=>n.p.delete(e);t.then(r,r)}}function XH(e,t,n){var r;const o=new Set;for(const i of((r=n.get(e))==null?void 0:r.t)||[])n.has(i)&&o.add(i);for(const i of t.p)o.add(i);return o}const eTe=(e,t,...n)=>t.read(...n),tTe=(e,t,...n)=>t.write(...n),nTe=(e,t)=>{var n;return(n=t.unstable_onInit)==null?void 0:n.call(t,e)},rTe=(e,t,n)=>{var r;return(r=t.onMount)==null?void 0:r.call(t,n)},oTe=(e,t)=>{const n=wr(e),r=n[0],o=n[9];if((Wf?"production":void 0)!=="production"&&!t)throw new Error("Atom is undefined or null");let i=r.get(t);return i||(i={d:new Map,p:new Set,n:0},r.set(t,i),o?.(e,t)),i},iTe=e=>{const t=wr(e),n=t[1],r=t[3],o=t[4],i=t[5],s=t[6],a=t[13],c=[],u=f=>{try{f()}catch(p){c.push(p)}};do{s.f&&u(s.f);const f=new Set,p=f.add.bind(f);r.forEach(g=>{var y;return(y=n.get(g))==null?void 0:y.l.forEach(p)}),r.clear(),i.forEach(p),i.clear(),o.forEach(p),o.clear(),f.forEach(u),r.size&&a(e)}while(r.size||i.size||o.size);if(c.length)throw new AggregateError(c)},sTe=e=>{const t=wr(e),n=t[1],r=t[2],o=t[3],i=t[11],s=t[14],a=t[17],c=[],u=new WeakSet,f=new WeakSet,p=Array.from(o);for(;p.length;){const g=p[p.length-1],y=i(e,g);if(f.has(g)){p.pop();continue}if(u.has(g)){if(r.get(g)===y.n)c.push([g,y]);else if((Wf?"production":void 0)!=="production"&&r.has(g))throw new Error("[Bug] invalidated atom exists");f.add(g),p.pop();continue}u.add(g);for(const v of XH(g,y,n))u.has(v)||p.push(v)}for(let g=c.length-1;g>=0;--g){const[y,v]=c[g];let x=!1;for(const S of v.d.keys())if(S!==y&&o.has(S)){x=!0;break}x&&(s(e,y),a(e,y)),r.delete(y)}},aTe=(e,t)=>{var n,r;const o=wr(e),i=o[1],s=o[2],a=o[3],c=o[6],u=o[7],f=o[11],p=o[12],g=o[13],y=o[14],v=o[16],x=o[17],S=f(e,t);if(dD(S)&&(i.has(t)&&s.get(t)!==S.n||Array.from(S.d).every(([R,V])=>y(e,R).n===V)))return S;S.d.clear();let E=!0;function C(){i.has(t)&&(x(e,t),g(e),p(e))}function _(R){var V;if(R===t){const F=f(e,R);if(!dD(F))if(JH(R))nx(e,R,R.init);else throw new Error("no atom init");return Zv(F)}const H=y(e,R);try{return Zv(H)}finally{S.d.set(R,H.n),YH(S.v)&&KH(t,S.v,H),(V=i.get(R))==null||V.t.add(t),E||C()}}let j,A;const T={get signal(){return j||(j=new AbortController),j.signal},get setSelf(){return(Wf?"production":void 0)!=="production"&&!PC(t)&&console.warn("setSelf function cannot be used with read-only atom"),!A&&PC(t)&&(A=(...R)=>{if((Wf?"production":void 0)!=="production"&&E&&console.warn("setSelf function cannot be called in sync"),!E)try{return v(e,t,...R)}finally{g(e),p(e)}}),A}},k=S.n;try{const R=u(e,t,_,T);return nx(e,t,R),tx(R)&&(DC(R,()=>j?.abort()),R.then(C,C)),(n=c.r)==null||n.call(c,t),S}catch(R){return delete S.v,S.e=R,++S.n,S}finally{E=!1,k!==S.n&&s.get(t)===k&&(s.set(t,S.n),a.add(t),(r=c.c)==null||r.call(c,t))}},lTe=(e,t)=>{const n=wr(e),r=n[1],o=n[2],i=n[11],s=[t];for(;s.length;){const a=s.pop(),c=i(e,a);for(const u of XH(a,c,r)){const f=i(e,u);o.set(u,f.n),s.push(u)}}},QH=(e,t,...n)=>{const r=wr(e),o=r[3],i=r[6],s=r[8],a=r[11],c=r[12],u=r[13],f=r[14],p=r[15],g=r[17];let y=!0;const v=S=>Zv(f(e,S)),x=(S,...E)=>{var C;const _=a(e,S);try{if(S===t){if(!JH(S))throw new Error("atom not writable");const j=_.n,A=E[0];nx(e,S,A),g(e,S),j!==_.n&&(o.add(S),(C=i.c)==null||C.call(i,S),p(e,S));return}else return QH(e,S,...E)}finally{y||(u(e),c(e))}};try{return s(e,t,v,x,...n)}finally{y=!1}},cTe=(e,t)=>{var n;const r=wr(e),o=r[1],i=r[3],s=r[6],a=r[11],c=r[15],u=r[18],f=r[19],p=a(e,t),g=o.get(t);if(g&&!YH(p.v)){for(const[y,v]of p.d)if(!g.d.has(y)){const x=a(e,y);u(e,y).t.add(t),g.d.add(y),v!==x.n&&(i.add(y),(n=s.c)==null||n.call(s,y),c(e,y))}for(const y of g.d||[])if(!p.d.has(y)){g.d.delete(y);const v=f(e,y);v?.t.delete(t)}}},ZH=(e,t)=>{var n;const r=wr(e),o=r[1],i=r[4],s=r[6],a=r[10],c=r[11],u=r[12],f=r[13],p=r[14],g=r[16],y=c(e,t);let v=o.get(t);if(!v){p(e,t);for(const x of y.d.keys())ZH(e,x).t.add(t);if(v={l:new Set,d:new Set(y.d.keys()),t:new Set},o.set(t,v),(n=s.m)==null||n.call(s,t),PC(t)){const x=()=>{let S=!0;const E=(...C)=>{try{return g(e,t,...C)}finally{S||(f(e),u(e))}};try{const C=a(e,t,E);C&&(v.u=()=>{S=!0;try{C()}finally{S=!1}})}finally{S=!1}};i.add(x)}}return v},uTe=(e,t)=>{var n;const r=wr(e),o=r[1],i=r[5],s=r[6],a=r[11],c=r[19],u=a(e,t);let f=o.get(t);if(f&&!f.l.size&&!Array.from(f.t).some(p=>{var g;return(g=o.get(p))==null?void 0:g.d.has(t)})){f.u&&i.add(f.u),f=void 0,o.delete(t),(n=s.u)==null||n.call(s,t);for(const p of u.d.keys()){const g=c(e,p);g?.t.delete(t)}return}return f},nx=(e,t,n)=>{const r=wr(e)[11],o=r(e,t),i="v"in o,s=o.v;if(tx(n))for(const a of o.d.keys())KH(t,n,r(e,a));o.v=n,delete o.e,(!i||!Object.is(s,o.v))&&(++o.n,tx(s)&&ZAe(s))},dTe=(e,t)=>{const n=wr(e)[14];return Zv(n(e,t))},fTe=(e,t,...n)=>{const r=wr(e),o=r[12],i=r[13],s=r[16];try{return s(e,t,...n)}finally{i(e),o(e)}},hTe=(e,t,n)=>{const r=wr(e),o=r[12],i=r[18],s=r[19],c=i(e,t).l;return c.add(n),o(e),()=>{c.delete(n),s(e,t),o(e)}},eq=new WeakMap,wr=e=>{const t=eq.get(e);if((Wf?"production":void 0)!=="production"&&!t)throw new Error("Store must be created by buildStore to read its building blocks");return t};function pTe(...e){const t={get(r){const o=wr(t)[21];return o(t,r)},set(r,...o){const i=wr(t)[22];return i(t,r,...o)},sub(r,o){const i=wr(t)[23];return i(t,r,o)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},eTe,tTe,nTe,rTe,oTe,iTe,sTe,aTe,lTe,QH,cTe,ZH,uTe,nx,dTe,fTe,hTe,void 0].map((r,o)=>e[o]||r);return eq.set(t,Object.freeze(n)),t}const tq={};let mTe=0;function Gf(e,t){const n=`atom${++mTe}`,r={toString(){return(tq?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof e=="function"?r.read=e:(r.init=e,r.read=gTe,r.write=yTe),t&&(r.write=t),r}function gTe(e){return e(this)}function yTe(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}function bTe(){return pTe()}let Gp;function nq(){return Gp||(Gp=bTe(),(tq?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=Gp),globalThis.__JOTAI_DEFAULT_STORE__!==Gp&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),Gp}const vTe={},xTe=w.createContext(void 0);function rq(e){return w.useContext(xTe)||nq()}const IC=e=>typeof e?.then=="function",LC=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},wTe=Ne.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(LC(e),e)}),EN=new WeakMap,fD=(e,t)=>{let n=EN.get(e);return n||(n=new Promise((r,o)=>{let i=e;const s=u=>f=>{i===u&&r(f)},a=u=>f=>{i===u&&o(f)},c=()=>{try{const u=t();IC(u)?(EN.set(u,n),i=u,u.then(s(u),a(u)),DC(u,c)):r(u)}catch(u){o(u)}};e.then(s(e),a(e)),DC(e,c)}),EN.set(e,n)),n};function DT(e,t){const{delay:n,unstable_promiseStatus:r=!Ne.use}={},o=rq(),[[i,s,a],c]=w.useReducer(f=>{const p=o.get(e);return Object.is(f[0],p)&&f[1]===o&&f[2]===e?f:[p,o,e]},void 0,()=>[o.get(e),o,e]);let u=i;if((s!==o||a!==e)&&(c(),u=o.get(e)),w.useEffect(()=>{const f=o.sub(e,()=>{if(r)try{const p=o.get(e);IC(p)&&LC(fD(p,()=>o.get(e)))}catch{}if(typeof n=="number"){setTimeout(c,n);return}c()});return c(),f},[o,e,n,r]),w.useDebugValue(u),IC(u)){const f=fD(u,()=>o.get(e));return r&&LC(f),wTe(f)}return u}function IT(e,t){const n=rq();return w.useCallback((...o)=>{if((vTe?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return n.set(e,...o)},[n,e])}function kh(e,t){return[DT(e),IT(e)]}const LT={},STe=Symbol((LT?"production":void 0)!=="production"?"RESET":""),NN=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),ETe=new WeakMap,NTe=(e,t,n,r)=>{const o=NN(()=>new WeakMap,ETe,t),i=NN(()=>new WeakMap,o,n);return NN(e,i,r)};function cy(e,t,n=Object.is){return NTe(()=>{const r=Symbol(),o=([s,a])=>{if(a===r)return t(s);const c=t(s,a);return n(a,c)?a:c},i=Gf(s=>{const a=s(i),c=s(e);return o([c,a])});return i.init=r,i},e,t,n)}const oq=e=>typeof e?.then=="function";function _Te(e=()=>{try{return window.localStorage}catch(n){(LT?"production":void 0)!=="production"&&typeof window<"u"&&console.warn(n);return}},t){var n;let r,o;const i={getItem:(c,u)=>{var f,p;const g=v=>{if(v=v||"",r!==v){try{o=JSON.parse(v,t?.reviver)}catch{return u}r=v}return o},y=(p=(f=e())==null?void 0:f.getItem(c))!=null?p:null;return oq(y)?y.then(g):g(y)},setItem:(c,u)=>{var f;return(f=e())==null?void 0:f.setItem(c,JSON.stringify(u,void 0))},removeItem:c=>{var u;return(u=e())==null?void 0:u.removeItem(c)}},s=c=>(u,f,p)=>c(u,g=>{let y;try{y=JSON.parse(g||"")}catch{y=p}f(y)});let a;try{a=(n=e())==null?void 0:n.subscribe}catch{}return!a&&typeof window<"u"&&typeof window.addEventListener=="function"&&window.Storage&&(a=(c,u)=>{if(!(e()instanceof window.Storage))return()=>{};const f=p=>{p.storageArea===e()&&p.key===c&&u(p.newValue)};return window.addEventListener("storage",f),()=>{window.removeEventListener("storage",f)}}),a&&(i.subscribe=s(a)),i}const CTe=_Te();function OTe(e,t,n=CTe,r){const o=Gf(t);return(LT?"production":void 0)!=="production"&&(o.debugPrivate=!0),o.onMount=s=>{s(n.getItem(e,t));let a;return n.subscribe&&(a=n.subscribe(e,s,t)),a},Gf(s=>s(o),(s,a,c)=>{const u=typeof c=="function"?c(s(o)):c;return u===STe?(a(o,t),n.removeItem(e)):oq(u)?u.then(f=>(a(o,f),n.setItem(e,f))):(a(o,u),n.setItem(e,u))})}const jTe={AdditionalItemsError:"Array at `{{pointer}}` may not have an additional item `{{key}}`",AdditionalPropertiesError:"Additional property `{{property}}` on `{{pointer}}` does not match schema `{{schema}}`",AllOfError:"Value `{{value}}` at `{{pointer}}` does not match schema of `{{allOf}}`",AnyOfError:"Value `{{value}}` at `{{pointer}}` does not match any schema of `{{anyOf}}`",ConstError:"Expected value at `{{pointer}}` to be `{{expected}}`, but value given is `{{value}}`",containsAnyError:"The array at `{{pointer}}` must contain at least one item",ContainsArrayError:"The property at `{{pointer}}` must not be an array",ContainsError:"The array at `{{pointer}}` must contain an element that matches `{{schema}}`",ContainsMinError:"The array at `{{pointer}}` contains {{delta}} too few items matching `{{schema}}`",ContainsMaxError:"The array at `{{pointer}}` contains {{delta}} too many items matching `{{schema}}`",EnumError:"Expected given value `{{value}}` in `{{pointer}}` to be one of `{{values}}`",ForbiddenPropertyError:"Property name `{{property}}` at `{{pointer}}` is not allowed",FormatDateError:"Value `{{value}}` at `{{pointer}}` is not a valid date",FormatDateTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid date-time",FormatDurationError:"Value `{{value}}` at `{{pointer}}` is not a valid duration",FormatEmailError:"Value `{{value}}` at `{{pointer}}` is not a valid email",FormatHostnameError:"Value `{{value}}` at `{{pointer}}` is not a valid hostname",FormatIPV4Error:"Value `{{value}}` at `{{pointer}}` is not a valid IPv4 address",FormatIPV4LeadingZeroError:"IPv4 addresses starting with zero are invalid, since they are interpreted as octals",FormatIPV6Error:"Value `{{value}}` at `{{pointer}}` is not a valid IPv6 address",FormatIPV6LeadingZeroError:"IPv6 addresses starting with zero are invalid, since they are interpreted as octals",FormatJsonPointerError:"Value `{{value}}` at `{{pointer}}` is not a valid json-pointer",FormatRegExError:"Value `{{value}}` at `{{pointer}}` is not a valid regular expression",FormatTimeError:"Value `{{value}}` at `{{pointer}}` is not a valid time",FormatURIError:"Value `{{value}}` at `{{pointer}}` is not a valid uri",FormatURIReferenceError:"Value `{{value}}` at `{{pointer}}` is not a valid uri-reference",FormatURITemplateError:"Value `{{value}}` at `{{pointer}}` is not a valid uri-template",FormatURLError:"Value `{{value}}` at `{{pointer}}` is not a valid url",FormatUUIDError:"Value `{{value}}` at `{{pointer}}` is not a valid uuid",InvalidDataError:"No value may be specified in `{{pointer}}`",InvalidPropertyNameError:"Invalid property name `{{property}}` at `{{pointer}}`",MaximumError:"Value in `{{pointer}}` is `{{length}}`, but should be `{{maximum}}` at maximum",MaxItemsError:"Too many items in `{{pointer}}`, should be `{{maximum}}` at most, but got `{{length}}`",MaxLengthError:"Value `{{pointer}}` should have a maximum length of `{{maxLength}}`, but got `{{length}}`.",MaxPropertiesError:"Too many properties in `{{pointer}}`, should be `{{maxProperties}}` at most, but got `{{length}}`",MinimumError:"Value in `{{pointer}}` is `{{length}}`, but should be `{{minimum}}` at minimum",MinItemsError:"Too few items in `{{pointer}}`, should be at least `{{minItems}}`, but got `{{length}}`",MinItemsOneError:"At least one item is required in `{{pointer}}`",MinLengthError:"Value `{{pointer}}` should have a minimum length of `{{minLength}}`, but got `{{length}}`.",MinLengthOneError:"A value is required in `{{pointer}}`",MinPropertiesError:"Too few properties in `{{pointer}}`, should be at least `{{minProperties}}`, but got `{{length}}`",MissingDependencyError:"The required propery '{{missingProperty}}' in `{{pointer}}` is missing",MissingOneOfPropertyError:"Value at `{{pointer}}` property: `{{property}}`",MultipleOfError:"Expected `{{value}}` in `{{pointer}}` to be multiple of `{{multipleOf}}`",MultipleOneOfError:"Value `{{value}}` should not match multiple schemas in oneOf `{{matches}}`",NoAdditionalPropertiesError:"Additional property `{{property}}` in `{{pointer}}` is not allowed",NotError:"Value `{{value}}` at pointer should not match schema `{{not}}`",OneOfError:"Value `{{value}}` in `{{pointer}}` does not match any given oneof schema",OneOfPropertyError:"Failed finding a matching oneOfProperty schema in `{{pointer}}` where `{{property}}` matches `{{value}}`",PatternError:"Value in `{{pointer}}` should match `{{description}}`, but received `{{received}}`",PatternPropertiesError:"Property `{{key}}` does not match any patterns in `{{pointer}}`. Valid patterns are: {{patterns}}",RequiredPropertyError:"The required property `{{key}}` is missing at `{{pointer}}`",SchemaWarning:"Failed retrieving a schema from '{{pointer}}' to key '{{key}}'",TypeError:"Expected `{{value}}` ({{received}}) in `{{pointer}}` to be of type `{{expected}}`",UndefinedValueError:"Value must not be undefined in `{{pointer}}`",UnevaluatedPropertyError:"Invalid unevaluated property `{{pointer}}`",UnevaluatedItemsError:"Invalid unevaluated item `{{pointer}}`",UniqueItemsError:"Items in array must be unique. Value `{{value}}` in `{{pointer}}` is a duplicate of {{duplicatePointer}}.",UnknownPropertyError:"Could not find a valid schema for property `{{pointer}}` within object",ValueNotEmptyError:"A value for `{{property}}` is required at `{{pointer}}`"},ATe=Object.prototype.toString;function Ot(e){const t=ATe.call(e).match(/\s([^\]]+)\]/).pop().toLowerCase();return t==="file"?"object":t}const TTe="object",$Te="array";function RTe(e,t={}){return e.replace(/\{\{\w+\}\}/g,n=>{const r=n.replace(/[{}]/g,""),o=t[r],i=Ot(o);return i===TTe||i===$Te?JSON.stringify(o):o})}function kTe(e,t,n=e){var r;const o=(r=jTe[e])!==null&&r!==void 0?r:n;return RTe(o,t)}function MTe(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function PTe(e,t){return{type:"error",name:e,code:MTe(e),message:kTe(e,t),data:t}}function Je(e){return PTe.bind(null,e)}function hg(e,t=[]){for(let n=0;n0)a.push(...y);else return Sm(p.schema,f),g.next(p.schema)}return r.errors.oneOfPropertyError({property:c,value:u,pointer:o,schema:n,errors:a})}const i=[],s=[];for(let a=0;a0?s.push(...u):i.push({index:a,schema:c.schema})}return i.length===1?(Sm(i[0].schema,i[0].index),e.next(i[0].schema)):i.length>1?r.errors.multipleOneOfError({value:t,pointer:o,schema:n,matches:i}):r.errors.oneOfError({value:JSON.stringify(t),pointer:o,schema:n,oneOf:n.oneOf,errors:s})}function LTe(e,t){const{draft:n,schema:r,pointer:o}=e;if(t==null||r.properties==null)return-1;let i=0;const s=Object.keys(r.properties);for(let a=0;a0)s.push(...g);else return Sm(f.schema,u),p.next(f.schema)}return o.errors.oneOfPropertyError({property:a,value:c,pointer:r,schema:n,errors:s})}const i=[];for(let s=0;s1?o.errors.multipleOneOfError({matches:i,pointer:r,schema:n,value:t}):o.errors.oneOfError({value:JSON.stringify(t),pointer:r,schema:n,oneOf:n.oneOf})}const FTe=(e,t)=>{if(Array.isArray(e.schema.oneOf)){const n=e.draft.resolveOneOf(e,t);if(Un(n))return n}};function ro(e,t,...n){if(t?.type==="error")return t;if(e?.type==="error")return e;const r=Ot(e),o=Ot(t);if(r!==o)return e;const i=Ub(e,t);for(let s=0;sa.indexOf(i)===s).forEach(i=>o[i]=Ub(e[i],t[i],i)),o}if(Array.isArray(e)&&Array.isArray(t)){if(n==="required")return e.concat(t).filter((s,a,c)=>c.indexOf(s)===a);if(n==="items"){const s=[];for(let a=0;ac.indexOf(s)===a)}return Array.isArray(t)?t:Array.isArray(e)?e:t!==void 0?t:e}function FC(e,...t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function d1(e,t){if(e.schema.if!=null){if(e.schema.if===!1)return e.next(e.schema.else);if(e.schema.if&&(e.schema.then||e.schema.else)){const n=e.draft.resolveRef(e.next(e.schema.if)),r=e.draft.validate(n,t);if(r.length===0&&e.schema.then){const o=e.next(e.schema.then);return e.draft.resolveRef(o)}if(r.length!==0&&e.schema.else){const o=e.next(e.schema.else);return e.draft.resolveRef(o)}}}}const zTe=(e,t)=>{const n=d1(e,t);if(n)return e.draft.validate(n,t)};function iq(e){return{...e}}function sq(e,t){const n=d1(e,t);if(n)return n;const r=iq(e.schema);return e.next(FC(r,"if","then","else"))}function BTe(e,t){const{schema:n}=e;let r=iq(n);for(let o=0;o{if(o==null)return;const i=e.createNode(o).resolveRef();r=ro(r,i.schema)}),r}const VTe=(e,t)=>{const{draft:n,schema:r}=e,{allOf:o}=r;if(!Array.isArray(o)||o.length===0)return;const i=[];return r.allOf.forEach(s=>{i.push(...n.validate(e.next(s),t))}),i};function UTe(e,...t){if(e==null)throw new Error("undefined schema");const n=this,r=ro(n.schema,e,...t);return{...n,schema:r,path:[...n.path,[n.pointer,n.schema]]}}function HTe(){const e=this;return e.draft.resolveRef(e)}function qTe(e,t){if(Un(e))return e;if(e==null)throw new Error("undefined schema");if(!Dt(e)&&Ot(e)!=="boolean")throw new Error(`bad schema type ${Ot(e)}`);const n=this;return{...n,pointer:t?`${n.pointer}/${t}`:n.pointer,schema:e,path:[...n.path,[n.pointer,n.schema]]}}function Ji(e){return Dt(e)&&e.next&&e.path&&e.draft}function WTe(e,t,n="#"){return{draft:e,pointer:n,schema:t,path:[],next:qTe,merge:UTe,resolveRef:HTe}}function GTe(e){const t=e.path;let n=0;for(let o=t.length-1;o>=0;o--){const i=t[o][1];if(i.$id&&/^https?:\/\//.test(i.$id)&&i.$recursiveAnchor!==!0){n=o;break}}const r=t.find((o,i)=>i>=n&&o[1].$recursiveAnchor===!0);if(r)return e.next(r[1]);for(let o=t.length-1;o>=0;o--){const i=t[o][1];if(i.$id)return e.next(i)}return e.next(e.draft.rootSchema)}function lq(e){if(!Ji(e))throw new Error("expected node");if(e.schema==null)return e;if(e.schema.$recursiveRef)return lq(GTe(e));if(e.schema.$ref==null)return e;const t=e.draft.rootSchema.getRef(e.schema);return t===!1?e.next(t):e.merge(t,"$ref")}function JTe(e){return e.filter((t,n)=>e.indexOf(t)===n)}function cq(e,t){var n;const{schema:r}=e,o=(n=r.dependencies)!==null&&n!==void 0?n:r.dependentSchemas;if(!Dt(o)||!Dt(t))return;let i=!1,s={required:[]};if(Object.keys(o).forEach(a=>{var c,u;if(t[a]==null&&!(!((c=r.required)===null||c===void 0)&&c.includes(a)||!((u=s.required)===null||u===void 0)&&u.includes(a)))return;const f=o[a];if(Array.isArray(f)){i=!0,s.required.push(...f);return}if(Dt(f)){i=!0;const p=e.next(f).resolveRef();s=ro(s,p.schema);return}}),i)return s.required=JTe(s.required),s}const YTe=(e,t)=>{const{draft:n,schema:r,pointer:o}=e,i=r.dependentRequired;if(!Dt(i))return;const s=[];return Object.keys(t).forEach(a=>{const c=i[a];if(c!==!0){if(c===!1){s.push(n.errors.missingDependencyError({pointer:o,schema:r,value:t}));return}if(Array.isArray(c))for(let u=0,f=c.length;u{const{draft:n,schema:r,pointer:o}=e,i=r.dependentSchemas;if(!Dt(i))return;const s=[];return Object.keys(t).forEach(a=>{const c=i[a];if(c!==!0){if(c===!1){s.push(n.errors.missingDependencyError({pointer:o,schema:r,value:t}));return}Dt(c)&&n.validate(e.next(c),t).map(u=>s.push(u))}}),s},XTe=(e,t)=>{const{draft:n,schema:r,pointer:o}=e,i=r.dependencies;if(!Dt(i))return;const s=[];return Object.keys(t).forEach(a=>{if(i[a]===void 0||i[a]===!0)return;if(i[a]===!1){s.push(n.errors.missingDependencyError({pointer:o,schema:r,value:t}));return}let c;const u=Ot(i[a]),f=i[a];if(Array.isArray(f))c=f.filter(p=>t[p]===void 0).map(p=>n.errors.missingDependencyError({missingProperty:p,pointer:o,schema:r,value:t}));else if(u==="object")c=n.validate(e.next(i[a]),t);else throw new Error(`Invalid dependency definition for ${o}/${a}. Must be string[] or schema`);s.push(...c)}),s.length>0?s:void 0};function uq(e,t){const{draft:n,schema:r}=e;if(!Array.isArray(r.anyOf)||r.anyOf.length===0)return;let o;if(r.anyOf.forEach(i=>{const s=n.resolveRef(e.next(i));n.validate(s,t).length===0&&(o=o?ro(o,s.schema):s.schema)}),o)return e.next(o)}function QTe(e,t){const{anyOf:n}=e.schema;if(!Array.isArray(n)||n.length===0)return e;const r=uq(e,t);if(r){const{pointer:o,schema:i}=e;return e.draft.errors.anyOfError({pointer:o,schema:i,value:t,anyOf:JSON.stringify(n)})}return e.merge(r.schema,"anyOf")}const ZTe=(e,t)=>{const{draft:n,schema:r,pointer:o}=e;if(!(!Array.isArray(r.anyOf)||r.anyOf.length===0)){for(let i=0;it.includes(n))!==-1}function zC(e,t){let n,r;const o=e.draft.resolveRef(e),{draft:i}=o,s=Ji(o)?o.schema:o;if(s.oneOf){const g=FT(o,t);Un(g)?r=g:g&&(n=ro(n??{},g.schema))}if(Array.isArray(s.allOf)){const g=s.allOf.map(y=>{if(t$e(y)){const v=zC(o.next(y),t);if(v==null||Un(v))return v;const x=ro(y,v.schema);return FC(x,...hD)}return y});if(g.length>0){const y=aq(i,{allOf:g});n=ro(n??{},y)}}const a=uq(o,t);a&&a.schema&&(n=ro(n??{},a.schema));const c=cq(o,t);c&&(n=ro(n??{},c));const u=d1(o,t);if(Ji(u)&&(n=ro(n??{},u.schema)),n==null)return r;if(Un(n))return n;const f=zC(o.next(n),t);Ji(f)&&(n=ro(n,f.schema));const p=FC(n,...hD);return o.next(p)}const n$e=["allOf","anyOf","oneOf","dependencies","if","then","else"];function ox(e,t){const n=zC(e,t);return Ji(n)?e.merge(n.schema,...n$e):n||e}var r$e=Function.prototype.toString,_N=Object.create,o$e=Object.prototype.toString,i$e=function(){function e(){this._keys=[],this._values=[]}return e.prototype.has=function(t){return!!~this._keys.indexOf(t)},e.prototype.get=function(t){return this._values[this._keys.indexOf(t)]},e.prototype.set=function(t,n){this._keys.push(t),this._values.push(n)},e}();function s$e(){return new i$e}function a$e(){return new WeakMap}var l$e=typeof WeakMap<"u"?a$e:s$e;function zT(e){if(!e)return _N(null);var t=e.constructor;if(t===Object)return e===Object.prototype?{}:_N(e);if(t&&~r$e.call(t).indexOf("[native code]"))try{return new t}catch{}return _N(e)}function c$e(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}function u$e(e){return e.flags}var d$e=/test/g.flags==="g"?u$e:c$e;function dq(e){var t=o$e.call(e);return t.substring(8,t.length-1)}function f$e(e){return e[Symbol.toStringTag]||dq(e)}var h$e=typeof Symbol<"u"?f$e:dq,p$e=Object.defineProperty,m$e=Object.getOwnPropertyDescriptor,fq=Object.getOwnPropertyNames,BT=Object.getOwnPropertySymbols,hq=Object.prototype,pq=hq.hasOwnProperty,g$e=hq.propertyIsEnumerable,mq=typeof BT=="function";function y$e(e){return fq(e).concat(BT(e))}var b$e=mq?y$e:fq;function f1(e,t,n){for(var r=b$e(e),o=0,i=r.length,s=void 0,a=void 0;o{Array.isArray(o[i])||(i==="$defs"?rf("$defs",o[i],n,`${r}/${e}/$defs`):Ri(o[i],n,`${r}/${e}/${i}`))})}function hb(e,t,n,r){const o=t[e];Array.isArray(o)&&o.forEach((i,s)=>Ri(i,n,`${r}/${e}/${s}`))}function Ri(e,t,n=""){e!==void 0&&t(e,n)!==!0&&Dt(e)&&(rf("properties",e,t,n),rf("patternProperties",e,t,n),Ri(e.not,t,`${n}/not`),Ri(e.additionalProperties,t,`${n}/additionalProperties`),rf("dependencies",e,t,n),Dt(e.items)&&Ri(e.items,t,`${n}/items`),hb("items",e,t,n),Ri(e.additionalItems,t,`${n}/additionalItems`),hb("allOf",e,t,n),hb("anyOf",e,t,n),hb("oneOf",e,t,n),Ri(e.if,t,`${n}/if`),Ri(e.then,t,`${n}/then`),Ri(e.else,t,`${n}/else`),rf("definitions",e,t,n),rf("$defs",e,t,n))}const I$e=/(#)+$/,ON=/#$/,pD=/^[#/]+/,mD=/^[^:]+:\/\/[^/]+\//,L$e=/\/[^/]*$/,F$e=/#.*$/,z$e=/^urn:uuid:[0-9A-Fa-f]/;function gD(e,t){return e==null&&t==null?"#":t==null?e.replace(ON,""):z$e.test(t)?t:e==null||e===""||e==="#"?t.replace(ON,""):t[0]==="#"?`${e.replace(F$e,"")}${t.replace(I$e,"")}`:mD.test(t)?t.replace(ON,""):mD.test(e)&&t.startsWith("/")?`${e.replace(/(^[^:]+:\/\/[^/]+)(.*)/,"$1")}/${t.replace(pD,"")}`:`${e.replace(L$e,"")}/${t.replace(pD,"")}`}var qb={exports:{}},B$e=qb.exports,yD;function V$e(){return yD||(yD=1,function(e,t){(function(n,r){e.exports=r()})(typeof self<"u"?self:B$e,()=>(()=>{var n={d:(F,B)=>{for(var U in B)n.o(B,U)&&!n.o(F,U)&&Object.defineProperty(F,U,{enumerable:!0,get:B[U]})},o:(F,B)=>Object.prototype.hasOwnProperty.call(F,B),r:F=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(F,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(F,"__esModule",{value:!0})}},r={};function o(F){return F==="#"||F===""||Array.isArray(F)&&F.length===0||!1}n.r(r),n.d(r,{default:()=>H,get:()=>p,isRoot:()=>o,join:()=>R,remove:()=>j,removeUndefinedItems:()=>_,set:()=>S,split:()=>f,splitLast:()=>V});const i=/~1/g,s=/~0/g,a=/(^#?\/?)/g;function c(F){return F.replace(i,"/").replace(s,"~")}function u(F){return c(decodeURIComponent(F))}function f(F){if(F==null||typeof F!="string"||o(F))return Array.isArray(F)?F:[];const B=F.indexOf("#")>=0?u:c,U=(F=F.replace(a,"")).split("/");for(let M=0,z=U.length;M0&&B[0]=="prototype"}function S(F,B,U){if(B==null)return F;const M=f(B);if(M.length===0)return F;F==null&&(F=y.test(M[0])?[]:{});let z,$,L=F;for(;M.length>1;)z=M.shift(),$=y.test(M[0]),x(z,M)||(L=C(L,z,$));return z=M.pop(),E(L,z,U),F}function E(F,B,U){let M;const z=B.match(v);B==="[]"&&Array.isArray(F)?F.push(U):z?(M=z.pop(),F[M]=U):F[B]=U}function C(F,B,U){var M,z;const $=(z=(M=B.match(v))===null||M===void 0?void 0:M.pop())!==null&&z!==void 0?z:B;if(F[$]!=null)return F[$];const L=U?[]:{};return E(F,B,L),L}function _(F){let B=0,U=0;for(;B+UOt(e)==="object";function ca(e,t,n){var r,o,i,s,a;let c;if(G$e(n)?c=n.__ref||n.$ref:c=n,c==null)return t;let u;const f=c.replace(W$e,"");if(e.remotes[f]!=null)return u=e.remotes[f],u&&u.$ref?ca(e,u,u):u;const p=(r=e.anchors)===null||r===void 0?void 0:r[c];if(p)return cu.get(t,p);if(e.ids[c]!=null)return u=cu.get(t,e.ids[c]),u&&u.$ref?ca(e,t,u):u;const g=c,y=q$e(c);if(y.length===0)return t;if(y.length===1){if(c=y[0],e.remotes[c]&&(u=e.remotes[c],u&&u.$ref))return ca(e,t,u);if(e.ids[c])return u=cu.get(t,e.ids[c]),u&&u.$ref?ca(e,t,u):u;const v=(o=t.getContext)===null||o===void 0?void 0:o.call(t).ids[c];if(v)return ca(e,t,v)}if(y.length===2){const v=y[0];c=y[1];const x=(i=e.remotes[v])!==null&&i!==void 0?i:e.remotes[`${v}/`];if(x)return x.getContext&&x.getContext().anchors[g]!=null?x.getRef(g):x.getRef?x.getRef(c):ca(e,x,c);const S=(s=e.ids[v])!==null&&s!==void 0?s:e.ids[`${v}/`];if(S)return ca(e,cu.get(t,S),c)}return u=cu.get(t,(a=e.ids[c])!==null&&a!==void 0?a:c),u&&u.$ref?ca(e,t,u):u}function ha(e){if(e===void 0)return;const t={type:Ot(e)};return t.type==="object"&&Dt(e)&&(t.properties={},Object.keys(e).forEach(n=>t.properties[n]=ha(e[n]))),t.type==="array"&&Array.isArray(e)&&(e.length===1?t.items=ha(e[0]):t.items=e.map(ha)),t}const J$e={additionalItemsError:Je("AdditionalItemsError"),additionalPropertiesError:Je("AdditionalPropertiesError"),allOfError:Je("AllOfError"),anyOfError:Je("AnyOfError"),constError:Je("ConstError"),containsAnyError:Je("ContainsAnyError"),containsArrayError:Je("ContainsArrayError"),containsError:Je("ContainsError"),containsMaxError:Je("ContainsMaxError"),containsMinError:Je("ContainsMinError"),enumError:Je("EnumError"),forbiddenPropertyError:Je("ForbiddenPropertyError"),formatDateError:Je("FormatDateError"),formatDateTimeError:Je("FormatDateTimeError"),formatDurationError:Je("FormatDurationError"),formatEmailError:Je("FormatEmailError"),formatHostnameError:Je("FormatHostnameError"),formatIPV4Error:Je("FormatIPV4Error"),formatIPV4LeadingZeroError:Je("FormatIPV4LeadingZeroError"),formatIPV6Error:Je("FormatIPV6Error"),formatIPV6LeadingZeroError:Je("FormatIPV6LeadingZeroError"),formatJsonPointerError:Je("FormatJsonPointerError"),formatRegExError:Je("FormatRegExError"),formatTimeError:Je("FormatTimeError"),formatURIError:Je("FormatURIError"),formatURIReferenceError:Je("FormatURIReferenceError"),formatURITemplateError:Je("FormatURITemplateError"),formatURLError:Je("FormatURLError"),formatUUIDError:Je("FormatUUIDError"),invalidDataError:Je("InvalidDataError"),invalidPropertyNameError:Je("InvalidPropertyNameError"),invalidSchemaError:Je("InvalidSchemaError"),invalidTypeError:Je("InvalidTypeError"),maximumError:Je("MaximumError"),maxItemsError:Je("MaxItemsError"),maxLengthError:Je("MaxLengthError"),maxPropertiesError:Je("MaxPropertiesError"),minimumError:Je("MinimumError"),minItemsError:Je("MinItemsError"),minItemsOneError:Je("MinItemsOneError"),minLengthError:Je("MinLengthError"),minLengthOneError:Je("MinLengthOneError"),minPropertiesError:Je("MinPropertiesError"),missingDependencyError:Je("MissingDependencyError"),missingOneOfPropertyError:Je("MissingOneOfPropertyError"),multipleOfError:Je("MultipleOfError"),multipleOneOfError:Je("MultipleOneOfError"),noAdditionalPropertiesError:Je("NoAdditionalPropertiesError"),notError:Je("NotError"),oneOfError:Je("OneOfError"),oneOfPropertyError:Je("OneOfPropertyError"),patternError:Je("PatternError"),patternPropertiesError:Je("PatternPropertiesError"),requiredPropertyError:Je("RequiredPropertyError"),schemaWarning:Je("SchemaWarning"),typeError:Je("TypeError"),undefinedValueError:Je("UndefinedValueError"),unevaluatedItemsError:Je("UnevaluatedItemsError"),unevaluatedPropertyError:Je("UnevaluatedPropertyError"),uniqueItemsError:Je("UniqueItemsError"),unknownPropertyError:Je("UnknownPropertyError"),valueNotEmptyError:Je("ValueNotEmptyError")};var AN={exports:{}},bD;function Y$e(){return bD||(bD=1,function(e){(function(t){t.exports.is_uri=r,t.exports.is_http_uri=o,t.exports.is_https_uri=i,t.exports.is_web_uri=s,t.exports.isUri=r,t.exports.isHttpUri=o,t.exports.isHttpsUri=i,t.exports.isWebUri=s;var n=function(a){var c=a.match(/(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/);return c};function r(a){if(a&&!/[^a-z0-9\:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=\.\-\_\~\%]/i.test(a)&&!/%[^0-9a-f]/i.test(a)&&!/%[0-9a-f](:?[^0-9a-f]|$)/i.test(a)){var c=[],u="",f="",p="",g="",y="",v="";if(c=n(a),u=c[1],f=c[2],p=c[3],g=c[4],y=c[5],!!(u&&u.length&&p.length>=0)){if(f&&f.length){if(!(p.length===0||/^\//.test(p)))return}else if(/^\/\//.test(p))return;if(/^[a-z][a-z0-9\+\-\.]*$/.test(u.toLowerCase()))return v+=u+":",f&&f.length&&(v+="//"+f),v+=p,g&&g.length&&(v+="?"+g),y&&y.length&&(v+="#"+y),v}}}function o(a,c){if(r(a)){var u=[],f="",p="",g="",y="",v="",x="",S="";if(u=n(a),f=u[1],p=u[2],g=u[3],v=u[4],x=u[5],!!f){if(c){if(f.toLowerCase()!="https")return}else if(f.toLowerCase()!="http")return;if(p)return/:(\d+)$/.test(p)&&(y=p.match(/:(\d+)$/)[0],p=p.replace(/:\d+$/,"")),S+=f+":",S+="//"+p,y&&(S+=y),S+=g,v&&v.length&&(S+="?"+v),x&&x.length&&(S+="#"+x),S}}}function i(a){return o(a,!0)}function s(a){return o(a)||i(a)}})(e)}(AN)),AN.exports}var K$e=Y$e();const vD=es(K$e);var $r={},Wb={exports:{}},X$e=Wb.exports,xD;function Q$e(){return xD||(xD=1,function(e){(function(t,n){e.exports?e.exports=n():t.nearley=n()})(X$e,function(){function t(u,f,p){return this.id=++t.highestId,this.name=u,this.symbols=f,this.postprocess=p,this}t.highestId=0,t.prototype.toString=function(u){var f=typeof u>"u"?this.symbols.map(c).join(" "):this.symbols.slice(0,u).map(c).join(" ")+" ● "+this.symbols.slice(u).map(c).join(" ");return this.name+" → "+f};function n(u,f,p,g){this.rule=u,this.dot=f,this.reference=p,this.data=[],this.wantedBy=g,this.isComplete=this.dot===u.symbols.length}n.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},n.prototype.nextState=function(u){var f=new n(this.rule,this.dot+1,this.reference,this.wantedBy);return f.left=this,f.right=u,f.isComplete&&(f.data=f.build(),f.right=void 0),f},n.prototype.build=function(){var u=[],f=this;do u.push(f.right.data),f=f.left;while(f.left);return u.reverse(),u},n.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,s.fail))};function r(u,f){this.grammar=u,this.index=f,this.states=[],this.wants={},this.scannable=[],this.completed={}}r.prototype.process=function(u){for(var f=this.states,p=this.wants,g=this.completed,y=0;y0&&f.push(" ^ "+g+" more lines identical to this"),g=0,f.push(" "+x)),p=x}},s.prototype.getSymbolDisplay=function(u){return a(u)},s.prototype.buildFirstStateStack=function(u,f){if(f.indexOf(u)!==-1)return null;if(u.wantedBy.length===0)return[u];var p=u.wantedBy[0],g=[u].concat(f),y=this.buildFirstStateStack(p,g);return y===null?null:[u].concat(y)},s.prototype.save=function(){var u=this.table[this.current];return u.lexerState=this.lexerState,u},s.prototype.restore=function(u){var f=u.index;this.current=f,this.table[f]=u,this.table.splice(f+1),this.lexerState=u.lexerState,this.results=this.finish()},s.prototype.rewind=function(u){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[u])},s.prototype.finish=function(){var u=[],f=this.grammar.start,p=this.table[this.table.length-1];return p.states.forEach(function(g){g.rule.name===f&&g.dot===g.rule.symbols.length&&g.reference===0&&g.data!==s.fail&&u.push(g)}),u.map(function(g){return g.data})};function a(u){var f=typeof u;if(f==="string")return u;if(f==="object"){if(u.literal)return JSON.stringify(u.literal);if(u instanceof RegExp)return"character matching "+u;if(u.type)return u.type+" token";if(u.test)return"token matching "+String(u.test);throw new Error("Unknown symbol type: "+u)}}function c(u){var f=typeof u;if(f==="string")return u;if(f==="object"){if(u.literal)return JSON.stringify(u.literal);if(u instanceof RegExp)return u.toString();if(u.type)return"%"+u.type;if(u.test)return"<"+String(u.test)+">";throw new Error("Unknown symbol type: "+u)}}return{Parser:s,Grammar:o,Rule:t}})}(Wb)),Wb.exports}var pb={},wD;function Z$e(){if(wD)return pb;wD=1,Object.defineProperty(pb,"__esModule",{value:!0});function e(o){return o[0]}const t=o=>[].concat(...o.map(i=>Array.isArray(i)?t(i):i));function n(o){return o?Array.isArray(o)?t(o).join(""):o:""}const r={Lexer:void 0,ParserRules:[{name:"Reverse_path",symbols:["Path"]},{name:"Reverse_path$string$1",symbols:[{literal:"<"},{literal:">"}],postprocess:o=>o.join("")},{name:"Reverse_path",symbols:["Reverse_path$string$1"]},{name:"Forward_path$subexpression$1$subexpression$1",symbols:[{literal:"<"},/[pP]/,/[oO]/,/[sS]/,/[tT]/,/[mM]/,/[aA]/,/[sS]/,/[tT]/,/[eE]/,/[rR]/,{literal:"@"}],postprocess:function(o){return o.join("")}},{name:"Forward_path$subexpression$1",symbols:["Forward_path$subexpression$1$subexpression$1","Domain",{literal:">"}]},{name:"Forward_path",symbols:["Forward_path$subexpression$1"]},{name:"Forward_path$subexpression$2",symbols:[{literal:"<"},/[pP]/,/[oO]/,/[sS]/,/[tT]/,/[mM]/,/[aA]/,/[sS]/,/[tT]/,/[eE]/,/[rR]/,{literal:">"}],postprocess:function(o){return o.join("")}},{name:"Forward_path",symbols:["Forward_path$subexpression$2"]},{name:"Forward_path",symbols:["Path"]},{name:"Path$ebnf$1$subexpression$1",symbols:["A_d_l",{literal:":"}]},{name:"Path$ebnf$1",symbols:["Path$ebnf$1$subexpression$1"],postprocess:e},{name:"Path$ebnf$1",symbols:[],postprocess:()=>null},{name:"Path",symbols:[{literal:"<"},"Path$ebnf$1","Mailbox",{literal:">"}]},{name:"A_d_l$ebnf$1",symbols:[]},{name:"A_d_l$ebnf$1$subexpression$1",symbols:[{literal:","},"At_domain"]},{name:"A_d_l$ebnf$1",symbols:["A_d_l$ebnf$1","A_d_l$ebnf$1$subexpression$1"],postprocess:o=>o[0].concat([o[1]])},{name:"A_d_l",symbols:["At_domain","A_d_l$ebnf$1"]},{name:"At_domain",symbols:[{literal:"@"},"Domain"]},{name:"Domain$ebnf$1",symbols:[]},{name:"Domain$ebnf$1$subexpression$1",symbols:[{literal:"."},"sub_domain"]},{name:"Domain$ebnf$1",symbols:["Domain$ebnf$1","Domain$ebnf$1$subexpression$1"],postprocess:o=>o[0].concat([o[1]])},{name:"Domain",symbols:["sub_domain","Domain$ebnf$1"]},{name:"sub_domain",symbols:["U_label"]},{name:"Let_dig",symbols:["ALPHA_DIGIT"],postprocess:e},{name:"Ldh_str$ebnf$1",symbols:[]},{name:"Ldh_str$ebnf$1",symbols:["Ldh_str$ebnf$1","ALPHA_DIG_DASH"],postprocess:o=>o[0].concat([o[1]])},{name:"Ldh_str",symbols:["Ldh_str$ebnf$1","Let_dig"]},{name:"U_Let_dig",symbols:["ALPHA_DIGIT_U"],postprocess:e},{name:"U_Ldh_str$ebnf$1",symbols:[]},{name:"U_Ldh_str$ebnf$1",symbols:["U_Ldh_str$ebnf$1","ALPHA_DIG_DASH_U"],postprocess:o=>o[0].concat([o[1]])},{name:"U_Ldh_str",symbols:["U_Ldh_str$ebnf$1","U_Let_dig"]},{name:"U_label$ebnf$1$subexpression$1",symbols:["U_Ldh_str"]},{name:"U_label$ebnf$1",symbols:["U_label$ebnf$1$subexpression$1"],postprocess:e},{name:"U_label$ebnf$1",symbols:[],postprocess:()=>null},{name:"U_label",symbols:["U_Let_dig","U_label$ebnf$1"]},{name:"address_literal$subexpression$1",symbols:["IPv4_address_literal"]},{name:"address_literal$subexpression$1",symbols:["IPv6_address_literal"]},{name:"address_literal$subexpression$1",symbols:["General_address_literal"]},{name:"address_literal",symbols:[{literal:"["},"address_literal$subexpression$1",{literal:"]"}]},{name:"non_local_part",symbols:["Domain"],postprocess:function(o){return{DomainName:n(o[0])}}},{name:"non_local_part",symbols:["address_literal"],postprocess:function(o){return{AddressLiteral:n(o[0])}}},{name:"Mailbox",symbols:["Local_part",{literal:"@"},"non_local_part"],postprocess:function(o){return{localPart:n(o[0]),domainPart:n(o[2])}}},{name:"Local_part",symbols:["Dot_string"],postprocess:function(o){return{DotString:n(o[0])}}},{name:"Local_part",symbols:["Quoted_string"],postprocess:function(o){return{QuotedString:n(o[0])}}},{name:"Dot_string$ebnf$1",symbols:[]},{name:"Dot_string$ebnf$1$subexpression$1",symbols:[{literal:"."},"Atom"]},{name:"Dot_string$ebnf$1",symbols:["Dot_string$ebnf$1","Dot_string$ebnf$1$subexpression$1"],postprocess:o=>o[0].concat([o[1]])},{name:"Dot_string",symbols:["Atom","Dot_string$ebnf$1"]},{name:"Atom$ebnf$1",symbols:[/[0-9A-Za-z!#$%&'*+\-/=?^_`{|}~\u0080-\uFFFF/]/]},{name:"Atom$ebnf$1",symbols:["Atom$ebnf$1",/[0-9A-Za-z!#$%&'*+\-/=?^_`{|}~\u0080-\uFFFF/]/],postprocess:o=>o[0].concat([o[1]])},{name:"Atom",symbols:["Atom$ebnf$1"]},{name:"Quoted_string$ebnf$1",symbols:[]},{name:"Quoted_string$ebnf$1",symbols:["Quoted_string$ebnf$1","QcontentSMTP"],postprocess:o=>o[0].concat([o[1]])},{name:"Quoted_string",symbols:["DQUOTE","Quoted_string$ebnf$1","DQUOTE"]},{name:"QcontentSMTP",symbols:["qtextSMTP"]},{name:"QcontentSMTP",symbols:["quoted_pairSMTP"]},{name:"quoted_pairSMTP",symbols:[{literal:"\\"},/[\x20-\x7e]/]},{name:"qtextSMTP",symbols:[/[\x20-\x21\x23-\x5b\x5d-\x7e\u0080-\uFFFF]/],postprocess:e},{name:"IPv4_address_literal$macrocall$2",symbols:[{literal:"."},"Snum"]},{name:"IPv4_address_literal$macrocall$1",symbols:["IPv4_address_literal$macrocall$2","IPv4_address_literal$macrocall$2","IPv4_address_literal$macrocall$2"]},{name:"IPv4_address_literal",symbols:["Snum","IPv4_address_literal$macrocall$1"]},{name:"IPv6_address_literal$subexpression$1",symbols:[/[iI]/,/[pP]/,/[vV]/,{literal:"6"},{literal:":"}],postprocess:function(o){return o.join("")}},{name:"IPv6_address_literal",symbols:["IPv6_address_literal$subexpression$1","IPv6_addr"]},{name:"General_address_literal$ebnf$1",symbols:["dcontent"]},{name:"General_address_literal$ebnf$1",symbols:["General_address_literal$ebnf$1","dcontent"],postprocess:o=>o[0].concat([o[1]])},{name:"General_address_literal",symbols:["Standardized_tag",{literal:":"},"General_address_literal$ebnf$1"]},{name:"Standardized_tag",symbols:["Ldh_str"]},{name:"dcontent",symbols:[/[\x21-\x5a\x5e-\x7e]/],postprocess:e},{name:"Snum",symbols:["DIGIT"]},{name:"Snum$subexpression$1",symbols:[/[1-9]/,"DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$1"]},{name:"Snum$subexpression$2",symbols:[{literal:"1"},"DIGIT","DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$2"]},{name:"Snum$subexpression$3",symbols:[{literal:"2"},/[0-4]/,"DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$3"]},{name:"Snum$subexpression$4",symbols:[{literal:"2"},{literal:"5"},/[0-5]/]},{name:"Snum",symbols:["Snum$subexpression$4"]},{name:"IPv6_addr",symbols:["IPv6_full"]},{name:"IPv6_addr",symbols:["IPv6_comp"]},{name:"IPv6_addr",symbols:["IPv6v4_full"]},{name:"IPv6_addr",symbols:["IPv6v4_comp"]},{name:"IPv6_hex",symbols:["HEXDIG"]},{name:"IPv6_hex$subexpression$1",symbols:["HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$1"]},{name:"IPv6_hex$subexpression$2",symbols:["HEXDIG","HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$2"]},{name:"IPv6_hex$subexpression$3",symbols:["HEXDIG","HEXDIG","HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$3"]},{name:"IPv6_full$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_full$macrocall$1",symbols:["IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2"]},{name:"IPv6_full",symbols:["IPv6_hex","IPv6_full$macrocall$1"]},{name:"IPv6_comp$ebnf$1$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_comp$ebnf$1$subexpression$1$macrocall$1",symbols:["IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2"]},{name:"IPv6_comp$ebnf$1$subexpression$1",symbols:["IPv6_hex","IPv6_comp$ebnf$1$subexpression$1$macrocall$1"]},{name:"IPv6_comp$ebnf$1",symbols:["IPv6_comp$ebnf$1$subexpression$1"],postprocess:e},{name:"IPv6_comp$ebnf$1",symbols:[],postprocess:()=>null},{name:"IPv6_comp$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:o=>o.join("")},{name:"IPv6_comp$ebnf$2$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_comp$ebnf$2$subexpression$1$macrocall$1",symbols:["IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2"]},{name:"IPv6_comp$ebnf$2$subexpression$1",symbols:["IPv6_hex","IPv6_comp$ebnf$2$subexpression$1$macrocall$1"]},{name:"IPv6_comp$ebnf$2",symbols:["IPv6_comp$ebnf$2$subexpression$1"],postprocess:e},{name:"IPv6_comp$ebnf$2",symbols:[],postprocess:()=>null},{name:"IPv6_comp",symbols:["IPv6_comp$ebnf$1","IPv6_comp$string$1","IPv6_comp$ebnf$2"]},{name:"IPv6v4_full$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_full$macrocall$1",symbols:["IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2"]},{name:"IPv6v4_full",symbols:["IPv6_hex","IPv6v4_full$macrocall$1",{literal:":"},"IPv4_address_literal"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1$macrocall$1",symbols:["IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1",symbols:["IPv6_hex","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$1"]},{name:"IPv6v4_comp$ebnf$1",symbols:["IPv6v4_comp$ebnf$1$subexpression$1"],postprocess:e},{name:"IPv6v4_comp$ebnf$1",symbols:[],postprocess:()=>null},{name:"IPv6v4_comp$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:o=>o.join("")},{name:"IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_comp$ebnf$2$subexpression$1$macrocall$1",symbols:["IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2"]},{name:"IPv6v4_comp$ebnf$2$subexpression$1",symbols:["IPv6_hex","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$1",{literal:":"}]},{name:"IPv6v4_comp$ebnf$2",symbols:["IPv6v4_comp$ebnf$2$subexpression$1"],postprocess:e},{name:"IPv6v4_comp$ebnf$2",symbols:[],postprocess:()=>null},{name:"IPv6v4_comp",symbols:["IPv6v4_comp$ebnf$1","IPv6v4_comp$string$1","IPv6v4_comp$ebnf$2","IPv4_address_literal"]},{name:"DIGIT",symbols:[/[0-9]/],postprocess:e},{name:"ALPHA_DIGIT_U",symbols:[/[0-9A-Za-z\u0080-\uFFFF]/],postprocess:e},{name:"ALPHA_DIGIT",symbols:[/[0-9A-Za-z]/],postprocess:e},{name:"ALPHA_DIG_DASH",symbols:[/[-0-9A-Za-z]/],postprocess:e},{name:"ALPHA_DIG_DASH_U",symbols:[/[-0-9A-Za-z\u0080-\uFFFF]/],postprocess:e},{name:"HEXDIG",symbols:[/[0-9A-Fa-f]/],postprocess:e},{name:"DQUOTE",symbols:[{literal:'"'}],postprocess:e}],ParserStart:"Reverse_path"};return pb.default=r,pb}var SD;function e3e(){if(SD)return $r;SD=1;var e=$r&&$r.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty($r,"__esModule",{value:!0}),$r.canonicalize=$r.canonicalize_quoted_string=$r.normalize=$r.normalize_dot_string=$r.parse=void 0;const t=Q$e(),n=e(Z$e());n.default.ParserStart="Mailbox";const r=t.Grammar.fromCompiled(n.default);function o(u){const f=new t.Parser(r);if(f.feed(u),f.results.length!==1)throw new Error("address parsing failed: ambiguous grammar");return f.results[0]}$r.parse=o;function i(u){return function(){const g=u.indexOf("+");return g===-1?u:u.substr(0,g)}().replace(/\./g,"").toLowerCase()}$r.normalize_dot_string=i;function s(u){var f,p;const g=o(u),y=(f=g.domainPart.AddressLiteral)!==null&&f!==void 0?f:g.domainPart.DomainName.toLowerCase();return`${(p=g.localPart.QuotedString)!==null&&p!==void 0?p:i(g.localPart.DotString)}@${y}`}$r.normalize=s;function a(u){return`"${u.substr(1).substr(0,u.length-2).replace(/(?:\\(.))/g,"$1").replace(/(?:(["\\]))/g,"\\$1")}"`}$r.canonicalize_quoted_string=a;function c(u){var f;const p=o(u),g=(f=p.domainPart.AddressLiteral)!==null&&f!==void 0?f:p.domainPart.DomainName.toLowerCase();return`${p.localPart.QuotedString?a(p.localPart.QuotedString):p.localPart.DotString}@${g}`}return $r.canonicalize=c,$r}var t3e=e3e();const n3e=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,r3e=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,o3e=/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,i3e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s3e=/^(?