From a3aff5309fd5103ccc8cbc296add74c94cdb3b89 Mon Sep 17 00:00:00 2001 From: Alan Alickovic Date: Sat, 27 Apr 2024 08:47:43 +0200 Subject: [PATCH 01/34] show author for discussion and comment --- cypress/integration/smoke.ts | 8 ++- .../comments/components/CommentsList.tsx | 18 +++++-- src/features/comments/types/index.ts | 3 +- .../discussions/routes/Discussion.tsx | 13 +++-- src/features/discussions/types/index.ts | 2 + src/lib/authorization.tsx | 2 +- src/test/server/db.ts | 1 + src/test/server/handlers/comments.ts | 30 ++++++++--- src/test/server/handlers/discussions.ts | 50 ++++++++++++++++--- src/test/server/handlers/users.ts | 16 +++--- 10 files changed, 107 insertions(+), 36 deletions(-) diff --git a/cypress/integration/smoke.ts b/cypress/integration/smoke.ts index 5e97b4f0..2927d43c 100644 --- a/cypress/integration/smoke.ts +++ b/cypress/integration/smoke.ts @@ -8,7 +8,9 @@ describe('smoke', () => { it('should handle normal app flow', () => { const user = userGenerator(); - const discussion = discussionGenerator(); + const discussion = discussionGenerator({ + authorId: user.id, + }); // registration: cy.visit('http://localhost:3000/auth/register'); @@ -127,7 +129,9 @@ describe('smoke', () => { }).should('exist'); // create comment: - const comment = commentGenerator(); + const comment = commentGenerator({ + authorId: user.id, + }); cy.findByRole('button', { name: /create comment/i, diff --git a/src/features/comments/components/CommentsList.tsx b/src/features/comments/components/CommentsList.tsx index 7c4d16fc..a2334a40 100644 --- a/src/features/comments/components/CommentsList.tsx +++ b/src/features/comments/components/CommentsList.tsx @@ -20,7 +20,7 @@ export const CommentsList = ({ discussionId }: CommentsListProps) => { if (commentsQuery.isLoading) { return ( -
+
); @@ -31,9 +31,9 @@ export const CommentsList = ({ discussionId }: CommentsListProps) => {
- +

No Comments Found

); @@ -44,11 +44,19 @@ export const CommentsList = ({ discussionId }: CommentsListProps) => {
  • - {formatDate(comment.createdAt)} +
    + {formatDate(comment.createdAt)} + {comment.author && ( + + {' '} + by {comment.author.firstName} {comment.author.lastName} + + )} +
    diff --git a/src/features/comments/types/index.ts b/src/features/comments/types/index.ts index ea37ba01..911a7804 100644 --- a/src/features/comments/types/index.ts +++ b/src/features/comments/types/index.ts @@ -1,7 +1,8 @@ +import { User } from '@/features/users'; import { BaseEntity } from '@/types'; export type Comment = { body: string; - authorId: string; discussionId: string; + author: User; } & BaseEntity; diff --git a/src/features/discussions/routes/Discussion.tsx b/src/features/discussions/routes/Discussion.tsx index 9355154b..303434ec 100644 --- a/src/features/discussions/routes/Discussion.tsx +++ b/src/features/discussions/routes/Discussion.tsx @@ -15,7 +15,7 @@ export const Discussion = () => { if (discussionQuery.isLoading) { return ( -
    +
    ); @@ -28,14 +28,19 @@ export const Discussion = () => { {formatDate(discussionQuery.data.createdAt)} -
    + {discussionQuery.data.author && ( + + by {discussionQuery.data.author.firstName} {discussionQuery.data.author.lastName} + + )} +
    -
    +
    -
    +
    diff --git a/src/features/discussions/types/index.ts b/src/features/discussions/types/index.ts index f6b539e0..868cd9e0 100644 --- a/src/features/discussions/types/index.ts +++ b/src/features/discussions/types/index.ts @@ -1,7 +1,9 @@ +import { User } from '@/features/users'; import { BaseEntity } from '@/types'; export type Discussion = { title: string; body: string; teamId: string; + author: User; } & BaseEntity; diff --git a/src/lib/authorization.tsx b/src/lib/authorization.tsx index 03560231..088dff9b 100644 --- a/src/lib/authorization.tsx +++ b/src/lib/authorization.tsx @@ -18,7 +18,7 @@ export const POLICIES = { return true; } - if (user.role === 'USER' && comment.authorId === user.id) { + if (user.role === 'USER' && comment.author?.id === user.id) { return true; } diff --git a/src/test/server/db.ts b/src/test/server/db.ts index 95644681..da76a8b1 100644 --- a/src/test/server/db.ts +++ b/src/test/server/db.ts @@ -22,6 +22,7 @@ const models = { id: primaryKey(String), title: String, body: String, + authorId: String, teamId: String, createdAt: Number, }, diff --git a/src/test/server/handlers/comments.ts b/src/test/server/handlers/comments.ts index 111b3a60..1f2b3d90 100644 --- a/src/test/server/handlers/comments.ts +++ b/src/test/server/handlers/comments.ts @@ -4,7 +4,7 @@ import { nanoid } from 'nanoid'; import { API_URL } from '@/config'; import { db, persistDb } from '../db'; -import { requireAuth, delayedResponse } from '../utils'; +import { requireAuth, delayedResponse, sanitizeUser } from '../utils'; type CreateCommentBody = { body: string; @@ -16,14 +16,28 @@ export const commentsHandlers = [ try { requireAuth(req); const discussionId = req.url.searchParams.get('discussionId') || ''; - const result = db.comment.findMany({ - where: { - discussionId: { - equals: discussionId, + const comments = db.comment + .findMany({ + where: { + discussionId: { + equals: discussionId, + }, }, - }, - }); - return delayedResponse(ctx.json(result)); + }) + .map(({ authorId, ...comment }) => { + const author = db.user.findFirst({ + where: { + id: { + equals: authorId, + }, + }, + }); + return { + ...comment, + author: sanitizeUser(author), + }; + }); + return delayedResponse(ctx.json(comments)); } catch (error: any) { return delayedResponse( ctx.status(400), diff --git a/src/test/server/handlers/discussions.ts b/src/test/server/handlers/discussions.ts index 22c14587..db9f2dfe 100644 --- a/src/test/server/handlers/discussions.ts +++ b/src/test/server/handlers/discussions.ts @@ -4,7 +4,7 @@ import { nanoid } from 'nanoid'; import { API_URL } from '@/config'; import { db, persistDb } from '../db'; -import { requireAuth, requireAdmin, delayedResponse } from '../utils'; +import { requireAuth, requireAdmin, delayedResponse, sanitizeUser } from '../utils'; type DiscussionBody = { title: string; @@ -15,13 +15,27 @@ export const discussionsHandlers = [ rest.get(`${API_URL}/discussions`, (req, res, ctx) => { try { const user = requireAuth(req); - const result = db.discussion.findMany({ - where: { - teamId: { - equals: user.teamId, + const result = db.discussion + .findMany({ + where: { + teamId: { + equals: user.teamId, + }, }, - }, - }); + }) + .map(({ authorId, ...discussion }) => { + const author = db.user.findFirst({ + where: { + id: { + equals: authorId, + }, + }, + }); + return { + ...discussion, + author: sanitizeUser(author), + }; + }); return delayedResponse(ctx.json(result)); } catch (error: any) { return delayedResponse( @@ -35,7 +49,7 @@ export const discussionsHandlers = [ try { const user = requireAuth(req); const { discussionId } = req.params; - const result = db.discussion.findFirst({ + const discussion = db.discussion.findFirst({ where: { id: { equals: discussionId, @@ -45,6 +59,25 @@ export const discussionsHandlers = [ }, }, }); + + if (!discussion) { + return delayedResponse(ctx.status(404), ctx.json({ message: 'Discussion not found' })); + } + + const author = db.user.findFirst({ + where: { + id: { + equals: discussion.authorId, + }, + }, + }); + + // delete discussion.authorId; + + const result = { + ...discussion, + author: sanitizeUser(author), + }; return delayedResponse(ctx.json(result)); } catch (error: any) { return delayedResponse( @@ -63,6 +96,7 @@ export const discussionsHandlers = [ teamId: user.teamId, id: nanoid(), createdAt: Date.now(), + authorId: user.id, ...data, }); persistDb('discussion'); diff --git a/src/test/server/handlers/users.ts b/src/test/server/handlers/users.ts index 3399d6a6..e19dd088 100644 --- a/src/test/server/handlers/users.ts +++ b/src/test/server/handlers/users.ts @@ -3,7 +3,7 @@ import { rest } from 'msw'; import { API_URL } from '@/config'; import { db, persistDb } from '../db'; -import { requireAuth, requireAdmin, delayedResponse } from '../utils'; +import { requireAuth, requireAdmin, delayedResponse, sanitizeUser } from '../utils'; type ProfileBody = { email: string; @@ -16,13 +16,15 @@ export const usersHandlers = [ rest.get(`${API_URL}/users`, (req, res, ctx) => { try { const user = requireAuth(req); - const result = db.user.findMany({ - where: { - teamId: { - equals: user.teamId, + const result = db.user + .findMany({ + where: { + teamId: { + equals: user.teamId, + }, }, - }, - }); + }) + .map(sanitizeUser); return delayedResponse(ctx.json(result)); } catch (error: any) { From 45fba585a14d6019f8cdee74e1f81d73b8e58f2a Mon Sep 17 00:00:00 2001 From: Alan Alickovic Date: Sun, 28 Apr 2024 07:35:59 +0200 Subject: [PATCH 02/34] migrate to modern stack - almost fully working --- .env.example | 7 +- .eslintrc.js => .eslintrc.cjs | 6 - .github/workflows/ci.yml | 12 - .github/workflows/playwright.yml | 27 + .gitignore | 13 +- .storybook/main.js | 41 - .storybook/main.ts | 18 + .storybook/{preview.js => preview.tsx} | 0 .vscode/settings.json | 2 +- craco.config.js | 13 - cypress/fixtures/example.json | 5 - cypress/global.d.ts | 10 - cypress/integration/smoke.ts | 215 - cypress/plugins/index.ts | 22 - cypress/support/commands.ts | 35 - cypress/support/index.ts | 20 - cypress/tsconfig.json | 9 - dist/_redirects | 1 + dist/assets/ContentLayout-BPYlf98W.js | 1 + dist/assets/Link-mjLZ8lwk.js | 1 + dist/assets/browser-CVzmke2g.js | 325 + dist/assets/format-D9jVc0G6.js | 1 + dist/assets/index-Bxt2ec0A.css | 1 + dist/assets/index-D0mVz3ol.js | 129 + dist/assets/index-DBwRqsuw.js | 1 + dist/assets/index-FSShKPpV.js | 1 + dist/assets/index-gTGY_0fC.js | 1 + dist/assets/index-wp4G9RRc.js | 1 + dist/favicon.ico | Bin 0 -> 3870 bytes dist/index.html | 22 + dist/logo192.png | Bin 0 -> 5347 bytes dist/logo512.png | Bin 0 -> 9664 bytes dist/manifest.json | 25 + dist/mockServiceWorker.js | 322 + dist/robots.txt | 3 + cypress/.eslintrc.js => e2e/.eslintrc.cjs | 3 +- e2e/smoke.spec.ts | 105 + index.html | 21 + package.json | 198 +- playwright.config.ts | 47 + postcss.config.cjs | 6 + public/index.html | 42 - public/mockServiceWorker.js | 5 +- .../Elements/Button/Button.stories.tsx | 4 +- .../ConfirmationDialog.stories.tsx | 4 +- .../__tests__/ConfirmationDialog.test.tsx | 6 +- .../Elements/Dialog/Dialog.stories.tsx | 4 +- .../Elements/Dialog/__tests__/Dialog.test.tsx | 8 +- .../Elements/Drawer/Drawer.stories.tsx | 4 +- .../Elements/Drawer/__tests__/Drawer.test.tsx | 6 +- src/components/Elements/Link/Link.stories.tsx | 4 +- .../Elements/MDPreview/MDPreview.stories.tsx | 4 +- .../Elements/Spinner/Spinner.stories.tsx | 4 +- .../Elements/Table/Table.stories.tsx | 4 +- src/components/Elements/Table/Table.tsx | 2 +- src/components/Form/Form.stories.tsx | 8 +- src/components/Form/Form.tsx | 6 +- src/components/Form/SelectField.tsx | 4 +- src/components/Form/__tests__/Form.test.tsx | 12 +- src/components/Head/Head.tsx | 5 +- src/components/Layout/MainLayout.tsx | 68 +- .../Notifications/Notification.stories.tsx | 4 +- src/config/index.ts | 2 +- src/features/auth/components/LoginForm.tsx | 10 +- src/features/auth/components/RegisterForm.tsx | 10 +- .../components/__tests__/LoginForm.test.tsx | 12 +- .../__tests__/RegisterForm.test.tsx | 18 +- src/features/comments/api/createComment.ts | 5 +- src/features/comments/api/deleteComment.ts | 6 +- src/features/comments/api/getComments.ts | 6 +- .../comments/components/CommentsList.tsx | 6 +- .../discussions/api/createDiscussion.ts | 19 +- .../discussions/api/deleteDiscussion.ts | 15 +- src/features/discussions/api/getDiscussion.ts | 6 +- .../discussions/api/getDiscussions.ts | 6 +- .../discussions/api/updateDiscussion.ts | 5 +- .../discussions/routes/Discussion.tsx | 3 +- .../routes/__tests__/Discussion.test.tsx | 46 +- .../routes/__tests__/Discussions.test.tsx | 26 +- src/features/misc/routes/Dashboard.tsx | 18 +- src/features/misc/routes/Landing.tsx | 16 +- src/features/teams/api/getTeams.ts | 6 +- src/features/users/api/deleteUser.ts | 15 +- src/features/users/api/getUsers.ts | 6 +- src/features/users/api/updateProfile.ts | 6 +- src/features/users/components/DeleteUser.tsx | 6 +- .../users/components/UpdateProfile.tsx | 14 +- src/features/users/routes/Profile.tsx | 24 +- src/hooks/__tests__/useDisclosure.test.ts | 2 +- src/index.css | 8 +- src/index.tsx | 23 +- src/lib/__tests__/authorization.test.tsx | 10 +- src/lib/auth.tsx | 22 +- src/lib/authorization.tsx | 14 +- src/lib/react-query.ts | 25 +- src/providers/app.tsx | 28 +- src/react-app-env.d.ts | 1 - src/reportWebVitals.ts | 15 - src/routes/index.tsx | 6 +- src/routes/protected.tsx | 10 +- src/setupTests.ts | 21 +- src/stores/__tests__/notifications.test.ts | 2 +- src/test/data-generators.ts | 43 +- src/test/server/browser.ts | 2 +- src/test/server/handlers/auth.ts | 40 +- src/test/server/handlers/comments.ts | 46 +- src/test/server/handlers/discussions.ts | 76 +- src/test/server/handlers/teams.ts | 12 +- src/test/server/handlers/users.ts | 41 +- src/test/server/index.ts | 16 +- src/test/server/utils.ts | 31 +- src/test/test-utils.ts | 7 +- src/utils/lazyImport.ts | 2 +- tailwind.config.js => tailwind.config.cjs | 9 +- tsconfig.json | 28 +- tsconfig.paths.json | 8 - vite-env.d.ts | 1 + vite.config.ts | 21 + yarn.lock | 18699 +++++----------- 119 files changed, 7865 insertions(+), 13594 deletions(-) rename .eslintrc.js => .eslintrc.cjs (99%) create mode 100644 .github/workflows/playwright.yml delete mode 100644 .storybook/main.js create mode 100644 .storybook/main.ts rename .storybook/{preview.js => preview.tsx} (100%) delete mode 100644 craco.config.js delete mode 100644 cypress/fixtures/example.json delete mode 100644 cypress/global.d.ts delete mode 100644 cypress/integration/smoke.ts delete mode 100644 cypress/plugins/index.ts delete mode 100644 cypress/support/commands.ts delete mode 100644 cypress/support/index.ts delete mode 100644 cypress/tsconfig.json create mode 100644 dist/_redirects create mode 100644 dist/assets/ContentLayout-BPYlf98W.js create mode 100644 dist/assets/Link-mjLZ8lwk.js create mode 100644 dist/assets/browser-CVzmke2g.js create mode 100644 dist/assets/format-D9jVc0G6.js create mode 100644 dist/assets/index-Bxt2ec0A.css create mode 100644 dist/assets/index-D0mVz3ol.js create mode 100644 dist/assets/index-DBwRqsuw.js create mode 100644 dist/assets/index-FSShKPpV.js create mode 100644 dist/assets/index-gTGY_0fC.js create mode 100644 dist/assets/index-wp4G9RRc.js create mode 100644 dist/favicon.ico create mode 100644 dist/index.html create mode 100644 dist/logo192.png create mode 100644 dist/logo512.png create mode 100644 dist/manifest.json create mode 100644 dist/mockServiceWorker.js create mode 100644 dist/robots.txt rename cypress/.eslintrc.js => e2e/.eslintrc.cjs (50%) create mode 100644 e2e/smoke.spec.ts create mode 100644 index.html create mode 100644 playwright.config.ts create mode 100644 postcss.config.cjs delete mode 100644 public/index.html delete mode 100644 src/react-app-env.d.ts delete mode 100644 src/reportWebVitals.ts rename tailwind.config.js => tailwind.config.cjs (62%) delete mode 100644 tsconfig.paths.json create mode 100644 vite-env.d.ts create mode 100644 vite.config.ts diff --git a/.env.example b/.env.example index 8a8e4cfb..d6c84ead 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,2 @@ -REACT_APP_API_URL=https://api.bulletproofapp.com -REACT_APP_API_MOCKING=true -TSC_COMPILE_ON_ERROR=true -ESLINT_NO_DEV_ERRORS=true -CHOKIDAR_USEPOLLING=true +VITE_APP_API_URL=https://api.bulletproofapp.com +VITE_APP_API_MOCKING=true diff --git a/.eslintrc.js b/.eslintrc.cjs similarity index 99% rename from .eslintrc.js rename to .eslintrc.cjs index f802a175..275bec00 100644 --- a/.eslintrc.js +++ b/.eslintrc.cjs @@ -44,7 +44,6 @@ module.exports = { ], 'linebreak-style': ['error', 'unix'], 'react/prop-types': 'off', - 'import/order': [ 'error', { @@ -56,18 +55,13 @@ module.exports = { 'import/default': 'off', 'import/no-named-as-default-member': 'off', 'import/no-named-as-default': 'off', - 'react/react-in-jsx-scope': 'off', - 'jsx-a11y/anchor-is-valid': 'off', - '@typescript-eslint/no-unused-vars': ['error'], - '@typescript-eslint/explicit-function-return-type': ['off'], '@typescript-eslint/explicit-module-boundary-types': ['off'], '@typescript-eslint/no-empty-function': ['off'], '@typescript-eslint/no-explicit-any': ['off'], - 'prettier/prettier': ['error', {}, { usePrettierrc: true }], }, }, diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65cbb5cf..1568b400 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,15 +21,3 @@ jobs: - run: yarn lint - run: yarn check-format - run: yarn check-types - cypress-run: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2-beta - with: - node-version: '14.16' - - run: mv .env.example .env - - uses: cypress-io/github-action@v2 - with: - build: yarn build - start: yarn serve diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml new file mode 100644 index 00000000..f7f7c1c4 --- /dev/null +++ b/.github/workflows/playwright.yml @@ -0,0 +1,27 @@ +name: Playwright Tests +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] +jobs: + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Install dependencies + run: npm install -g yarn && yarn + - name: Install Playwright Browsers + run: yarn playwright install --with-deps + - name: Run Playwright tests + run: yarn playwright test + - uses: actions/upload-artifact@v4 + if: always() + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 diff --git a/.gitignore b/.gitignore index 78a7e4d4..d60faffa 100644 --- a/.gitignore +++ b/.gitignore @@ -7,8 +7,16 @@ # testing /coverage -/cypress/videos -/cypress/screenshots +/test-results/ +/playwright-report/ +/blob-report/ +/playwright/.cache/ + +# storybook +migration-storybook.log +storybook.log +storybook-static + # production /build @@ -24,3 +32,4 @@ npm-debug.log* yarn-debug.log* yarn-error.log* + diff --git a/.storybook/main.js b/.storybook/main.js deleted file mode 100644 index 2e9d4c89..00000000 --- a/.storybook/main.js +++ /dev/null @@ -1,41 +0,0 @@ -const path = require('path'); -const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); - -module.exports = { - stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], - addons: [ - '@storybook/addon-links', - '@storybook/addon-essentials', - '@storybook/preset-create-react-app', - ], - webpackFinal: async (config) => { - config.module.rules.push({ - test: /\.css$/, - use: [ - { - loader: 'postcss-loader', - options: { - ident: 'postcss', - plugins: [require('tailwindcss'), require('autoprefixer')], - }, - }, - ], - include: path.resolve(__dirname, '../'), - }); - config.resolve.plugins = config.resolve.plugins || []; - config.resolve.plugins.push( - new TsconfigPathsPlugin({ - configFile: path.resolve(__dirname, '../tsconfig.json'), - }) - ); - return { - ...config, - plugins: config.plugins.filter((plugin) => { - if (plugin.constructor.name === 'ESLintWebpackPlugin') { - return false; - } - return true; - }), - }; - }, -}; diff --git a/.storybook/main.ts b/.storybook/main.ts new file mode 100644 index 00000000..f776d97b --- /dev/null +++ b/.storybook/main.ts @@ -0,0 +1,18 @@ +module.exports = { + stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], + + addons: [ + '@storybook/addon-actions', + '@storybook/addon-links', + '@storybook/node-logger', + '@storybook/addon-essentials', + '@storybook/addon-interactions', + ], + framework: { + name: '@storybook/react-vite', + options: {}, + }, + docs: { + autodocs: 'tag', + }, +}; diff --git a/.storybook/preview.js b/.storybook/preview.tsx similarity index 100% rename from .storybook/preview.js rename to .storybook/preview.tsx diff --git a/.vscode/settings.json b/.vscode/settings.json index 124dc6d4..1947a0d0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { "editor.formatOnSave": true, "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "explicit" } } diff --git a/craco.config.js b/craco.config.js deleted file mode 100644 index e218130b..00000000 --- a/craco.config.js +++ /dev/null @@ -1,13 +0,0 @@ -const path = require('path'); -module.exports = { - webpack: { - alias: { - '@': path.resolve(__dirname, 'src'), - }, - }, - style: { - postcss: { - plugins: [require('tailwindcss'), require('autoprefixer')], - }, - }, -}; diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json deleted file mode 100644 index 02e42543..00000000 --- a/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} diff --git a/cypress/global.d.ts b/cypress/global.d.ts deleted file mode 100644 index e99cbb7c..00000000 --- a/cypress/global.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -// add new command to the existing Cypress interface -declare global { - namespace Cypress { - interface Chainable { - checkAndDismissNotification: (matcher: RegExp | string) => void; - } - } -} - -export {}; diff --git a/cypress/integration/smoke.ts b/cypress/integration/smoke.ts deleted file mode 100644 index 2927d43c..00000000 --- a/cypress/integration/smoke.ts +++ /dev/null @@ -1,215 +0,0 @@ -import { - userGenerator, - discussionGenerator, - commentGenerator, -} from '../../src/test/data-generators'; - -describe('smoke', () => { - it('should handle normal app flow', () => { - const user = userGenerator(); - - const discussion = discussionGenerator({ - authorId: user.id, - }); - - // registration: - cy.visit('http://localhost:3000/auth/register'); - - cy.findByRole('textbox', { - name: /first name/i, - }).type(user.firstName); - cy.findByRole('textbox', { - name: /last name/i, - }).type(user.lastName); - cy.findByRole('textbox', { - name: /email address/i, - }).type(user.email); - cy.findByLabelText(/password/i).type(user.password); - - cy.findByRole('textbox', { - name: /team name/i, - }).type(user.teamName); - - cy.findByRole('button', { - name: /register/i, - }).click(); - - cy.findByRole('heading', { - name: `Welcome ${user.firstName} ${user.lastName}`, - }).should('exist'); - - // log out: - cy.findByRole('button', { - name: /open user menu/i, - }).click(); - - cy.findByRole('menuitem', { - name: /sign out/i, - }).click(); - - // log in: - cy.visit('http://localhost:3000/auth/login'); - - cy.findByRole('textbox', { - name: /email address/i, - }).type(user.email); - cy.findByLabelText(/password/i).type(user.password); - - cy.findByRole('button', { - name: /log in/i, - }).click(); - - cy.findByRole('heading', { - name: `Welcome ${user.firstName} ${user.lastName}`, - }).should('exist'); - - cy.findByRole('link', { - name: /discussions/i, - }).click(); - - // create discussion: - cy.findByRole('button', { - name: /create discussion/i, - }).click(); - - cy.findByRole('dialog').within(() => { - cy.findByRole('textbox', { - name: /title/i, - }).type(discussion.title); - cy.findByRole('textbox', { - name: /body/i, - }).type(discussion.body); - cy.findByRole('button', { - name: /submit/i, - }).click(); - }); - - cy.checkAndDismissNotification(/discussion created/i); - - cy.findByRole('dialog').should('not.exist'); - - cy.wait(200); - - // visit discussion page: - cy.findByRole('link', { - name: /view/i, - }).click(); - - cy.findByRole('heading', { - name: discussion.title, - }).should('exist'); - - // update discussion: - cy.findByRole('button', { - name: /update discussion/i, - }).click(); - - const updatedDiscussion = discussionGenerator(); - - cy.findByRole('dialog').within(() => { - cy.findByRole('textbox', { - name: /title/i, - }) - .clear() - .type(updatedDiscussion.title); - cy.findByRole('textbox', { - name: /body/i, - }) - .clear() - .type(updatedDiscussion.body); - cy.findByRole('button', { - name: /submit/i, - }).click(); - }); - - cy.checkAndDismissNotification(/discussion updated/i); - - cy.findByRole('heading', { - name: updatedDiscussion.title, - }).should('exist'); - - // create comment: - const comment = commentGenerator({ - authorId: user.id, - }); - - cy.findByRole('button', { - name: /create comment/i, - }).click(); - - cy.findByRole('dialog').within(() => { - cy.findByRole('textbox', { - name: /body/i, - }).type(comment.body, { force: true }); // for some reason it requires force to be set to true - - cy.findByRole('button', { - name: /submit/i, - }).click(); - }); - - cy.checkAndDismissNotification(/comment created/i); - - cy.findByRole('list', { - name: 'comments', - }).within(() => { - cy.findByText(comment.body).should('exist'); - }); - - cy.wait(200); - - // delete comment: - cy.findByRole('list', { - name: 'comments', - }).within(() => { - cy.findByRole('listitem', { - name: `comment-${comment.body}-0`, - }).within(() => { - cy.findByRole('button', { - name: /delete comment/i, - }).click(); - }); - }); - - cy.findByRole('dialog').within(() => { - cy.findByRole('button', { - name: /delete comment/i, - }).click(); - }); - - cy.wait(200); - - cy.checkAndDismissNotification(/comment deleted/i); - - cy.findByRole('list', { - name: 'comments', - }).within(() => { - cy.findByText(comment.body).should('not.exist'); - }); - - // go back to discussions list: - cy.findByRole('link', { - name: /discussions/i, - }).click(); - - cy.wait(200); - - // delete discussion: - cy.findByRole('button', { - name: /delete discussion/i, - }).click(); - - cy.findByRole('dialog').within(() => { - cy.findByRole('button', { - name: /delete discussion/i, - }).click(); - }); - - cy.checkAndDismissNotification(/discussion deleted/i); - - cy.wait(200); - - cy.findByRole('cell', { - name: updatedDiscussion.title, - }).should('not.exist'); - }); -}); diff --git a/cypress/plugins/index.ts b/cypress/plugins/index.ts deleted file mode 100644 index 8229063a..00000000 --- a/cypress/plugins/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -/// -// *********************************************************** -// This example plugins/index.js can be used to load plugins -// -// You can change the location of this file or turn off loading -// the plugins file with the 'pluginsFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/plugins-guide -// *********************************************************** - -// This function is called when a project is opened or re-opened (e.g. due to -// the project's config changing) - -/** - * @type {Cypress.PluginConfig} - */ -// eslint-disable-next-line no-unused-vars -module.exports = (on, config) => { - // `on` is used to hook into various events Cypress emits - // `config` is the resolved Cypress config -}; diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts deleted file mode 100644 index 8bb17164..00000000 --- a/cypress/support/commands.ts +++ /dev/null @@ -1,35 +0,0 @@ -// *********************************************** -// This example commands.js shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** -// -// -// -- This is a parent command -- -// Cypress.Commands.add('login', (email, password) => { ... }) -// -// -// -- This is a child command -- -// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) -// -// -// -- This is a dual command -- -// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) -// -// -// -- This will overwrite an existing command -- -// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) -import '@testing-library/cypress/add-commands'; - -Cypress.Commands.add('checkAndDismissNotification', (matcher) => { - cy.findByRole('alert', { - name: matcher, - }).within(() => { - cy.findByText(matcher).should('exist'); - cy.findByRole('button').click(); - }); -}); diff --git a/cypress/support/index.ts b/cypress/support/index.ts deleted file mode 100644 index 37a498fb..00000000 --- a/cypress/support/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -// *********************************************************** -// This example support/index.js is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import './commands'; - -// Alternatively you can use CommonJS syntax: -// require('./commands') diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json deleted file mode 100644 index 71d9a9fb..00000000 --- a/cypress/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "compilerOptions": { - "esModuleInterop": true, - "target": "es5", - "lib": ["es5", "dom"], - "types": ["node", "cypress", "@testing-library/cypress"] - }, - "include": ["**/*.ts"] -} diff --git a/dist/_redirects b/dist/_redirects new file mode 100644 index 00000000..f8243379 --- /dev/null +++ b/dist/_redirects @@ -0,0 +1 @@ +/* /index.html 200 \ No newline at end of file diff --git a/dist/assets/ContentLayout-BPYlf98W.js b/dist/assets/ContentLayout-BPYlf98W.js new file mode 100644 index 00000000..db12a338 --- /dev/null +++ b/dist/assets/ContentLayout-BPYlf98W.js @@ -0,0 +1 @@ +import{j as s,H as m}from"./index-D0mVz3ol.js";const t=({children:a,title:x})=>s.jsxs(s.Fragment,{children:[s.jsx(m,{title:x}),s.jsxs("div",{className:"py-6",children:[s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 md:px-8",children:s.jsx("h1",{className:"text-2xl font-semibold text-gray-900",children:x})}),s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 md:px-8",children:a})]})]});export{t as C}; diff --git a/dist/assets/Link-mjLZ8lwk.js b/dist/assets/Link-mjLZ8lwk.js new file mode 100644 index 00000000..b5f4d05e --- /dev/null +++ b/dist/assets/Link-mjLZ8lwk.js @@ -0,0 +1 @@ +import{j as o,Q as e,v as n}from"./index-D0mVz3ol.js";const x=({className:s,children:t,...i})=>o.jsx(e,{className:n("text-indigo-600 hover:text-indigo-900",s),...i,children:t});export{x as L}; diff --git a/dist/assets/browser-CVzmke2g.js b/dist/assets/browser-CVzmke2g.js new file mode 100644 index 00000000..9cb8c3f1 --- /dev/null +++ b/dist/assets/browser-CVzmke2g.js @@ -0,0 +1,325 @@ +var Hh=Object.defineProperty;var Yh=(e,t,r)=>t in e?Hh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Le=(e,t,r)=>(Yh(e,typeof t!="symbol"?t+"":t,r),r),ko=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var An=(e,t,r)=>(ko(e,t,"read from private field"),r?r.call(e):t.get(e)),Ro=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},fc=(e,t,r,n)=>(ko(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var Na=(e,t,r)=>(ko(e,t,"access private method"),r);import{_ as Wh,g as Ms,c as Y,A as rt,n as ri}from"./index-D0mVz3ol.js";var Gh=/(%?)(%([sdijo]))/g;function Qh(e,t){switch(t){case"s":return e;case"d":case"i":return Number(e);case"j":return JSON.stringify(e);case"o":{if(typeof e=="string")return e;const r=JSON.stringify(e);return r==="{}"||r==="[]"||/^\[object .+?\]$/.test(r)?e:r}}}function xs(e,...t){if(t.length===0)return e;let r=0,n=e.replace(Gh,(a,i,o,s)=>{const u=t[r],c=Qh(u,s);return i?a:(r++,c)});return r{if(!e)throw new zh(t,...r)};Jn.as=(e,t,r,...n)=>{if(!t){const a=n.length===0?r:xs(r,n);let i;try{i=Reflect.construct(e,[a])}catch{i=e(a)}throw i}};const Xh="[MSW]";function Ps(e,...t){const r=xs(e,...t);return`${Xh} ${r}`}function Zh(e,...t){console.warn(Ps(e,...t))}function em(e,...t){console.error(Ps(e,...t))}const $e={formatMessage:Ps,warn:Zh,error:em},tm=/[\/\\]msw[\/\\]src[\/\\](.+)/,rm=/(node_modules)?[\/\\]lib[\/\\](core|browser|node|native|iife)[\/\\]|^[^\/\\]*$/;function nm(e){const t=e.stack;if(!t)return;const n=t.split(` +`).slice(1).find(i=>!(tm.test(i)||rm.test(i)));return n?n.replace(/\s*at [^()]*\(([^)]+)\)/,"$1").replace(/^@/,""):void 0}function am(e){return e?typeof e[Symbol.iterator]=="function":!1}var kr;let nf=(kr=class{constructor(t){Le(this,"info");Le(this,"isUsed");Le(this,"resolver");Le(this,"resolverGenerator");Le(this,"resolverGeneratorResult");Le(this,"options");this.resolver=t.resolver,this.options=t.options;const r=nm(new Error);this.info={...t.info,callFrame:r},this.isUsed=!1}async parse(t){return{}}async test(t){const r=await this.parse({request:t.request,resolutionContext:t.resolutionContext});return this.predicate({request:t.request,parsedResult:r,resolutionContext:t.resolutionContext})}extendResolverArgs(t){return{}}cloneRequestOrGetFromCache(t){const r=kr.cache.get(t);if(typeof r<"u")return r;const n=t.clone();return kr.cache.set(t,n),n}async run(t){var l,f;if(this.isUsed&&((l=this.options)!=null&&l.once))return null;const r=this.cloneRequestOrGetFromCache(t.request),n=await this.parse({request:t.request,resolutionContext:t.resolutionContext});if(!this.predicate({request:t.request,parsedResult:n,resolutionContext:t.resolutionContext})||this.isUsed&&((f=this.options)!=null&&f.once))return null;this.isUsed=!0;const i=this.wrapResolver(this.resolver),o=this.extendResolverArgs({request:t.request,parsedResult:n}),u=await i({...o,requestId:t.requestId,request:t.request}).catch(d=>{if(d instanceof Response)return d;throw d});return this.createExecutionResult({request:r,requestId:t.requestId,response:u,parsedResult:n})}wrapResolver(t){return async r=>{const n=this.resolverGenerator||await t(r);if(am(n)){this.isUsed=!1;const{value:a,done:i}=n[Symbol.iterator]().next(),o=await a;return i&&(this.isUsed=!0),!o&&i?(Jn(this.resolverGeneratorResult,"Failed to returned a previously stored generator response: the value is not a valid Response."),this.resolverGeneratorResult.clone()):(this.resolverGenerator||(this.resolverGenerator=n),o&&(this.resolverGeneratorResult=o==null?void 0:o.clone()),o)}return n}}createExecutionResult(t){return{handler:this,request:t.request,requestId:t.requestId,response:t.response,parsedResult:t.parsedResult}}},Le(kr,"cache",new WeakMap),kr);var im=async e=>{try{return{error:null,data:await e().catch(r=>{throw r})}}catch(t){return{error:t,data:null}}};const om=async({request:e,requestId:t,handlers:r,resolutionContext:n})=>{let a=null,i=null;for(const o of r)if(i=await o.run({request:e,requestId:t,resolutionContext:n}),i!==null&&(a=o),i!=null&&i.response)break;return a?{handler:a,parsedResult:i==null?void 0:i.parsedResult,response:i==null?void 0:i.response}:null};function af(e){if(typeof location>"u")return e.toString();const t=e instanceof URL?e:new URL(e);return t.origin===location.origin?t.pathname:t.origin+t.pathname}async function sm(e,t="warn"){const r=new URL(e.url),n=af(r)+r.search,a=`intercepted a request without a matching request handler: + + • ${e.method} ${n} + +If you still wish to intercept this unhandled request, please create a request handler for it. +Read more: https://mswjs.io/docs/getting-started/mocks`;function i(o){switch(o){case"error":throw $e.error("Error: %s",a),new Error($e.formatMessage('Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'));case"warn":{$e.warn("Warning: %s",a);break}case"bypass":break;default:throw new Error($e.formatMessage('Failed to react to an unhandled request: unknown strategy "%s". Please provide one of the supported strategies ("bypass", "warn", "error") or a custom callback function as the value of the "onUnhandledRequest" option.',o))}}if(typeof t=="function"){t(e,{warning:i.bind(null,"warn"),error:i.bind(null,"error")});return}r.protocol!=="file:"&&i(t)}var um=Object.create,of=Object.defineProperty,cm=Object.getOwnPropertyDescriptor,sf=Object.getOwnPropertyNames,lm=Object.getPrototypeOf,fm=Object.prototype.hasOwnProperty,dm=(e,t)=>function(){return t||(0,e[sf(e)[0]])((t={exports:{}}).exports,t),t.exports},pm=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of sf(t))!fm.call(e,a)&&a!==r&&of(e,a,{get:()=>t[a],enumerable:!(n=cm(t,a))||n.enumerable});return e},vm=(e,t,r)=>(r=e!=null?um(lm(e)):{},pm(!e||!e.__esModule?of(r,"default",{value:e,enumerable:!0}):r,e)),hm=dm({"node_modules/set-cookie-parser/lib/set-cookie.js"(e,t){var r={decodeValues:!0,map:!1,silent:!1};function n(u){return typeof u=="string"&&!!u.trim()}function a(u,c){var l=u.split(";").filter(n),f=l.shift(),d=i(f),p=d.name,v=d.value;c=c?Object.assign({},r,c):r;try{v=c.decodeValues?decodeURIComponent(v):v}catch(m){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+v+"'. Set options.decodeValues to false to disable this feature.",m)}var h={name:p,value:v};return l.forEach(function(m){var w=m.split("="),g=w.shift().trimLeft().toLowerCase(),b=w.join("=");g==="expires"?h.expires=new Date(b):g==="max-age"?h.maxAge=parseInt(b,10):g==="secure"?h.secure=!0:g==="httponly"?h.httpOnly=!0:g==="samesite"?h.sameSite=b:h[g]=b}),h}function i(u){var c="",l="",f=u.split("=");return f.length>1?(c=f.shift(),l=f.join("=")):l=u,{name:c,value:l}}function o(u,c){if(c=c?Object.assign({},r,c):r,!u)return c.map?{}:[];if(u.headers)if(typeof u.headers.getSetCookie=="function")u=u.headers.getSetCookie();else if(u.headers["set-cookie"])u=u.headers["set-cookie"];else{var l=u.headers[Object.keys(u.headers).find(function(d){return d.toLowerCase()==="set-cookie"})];!l&&u.headers.cookie&&!c.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),u=l}if(Array.isArray(u)||(u=[u]),c=c?Object.assign({},r,c):r,c.map){var f={};return u.filter(n).reduce(function(d,p){var v=a(p,c);return d[v.name]=v,d},f)}else return u.filter(n).map(function(d){return a(d,c)})}function s(u){if(Array.isArray(u))return u;if(typeof u!="string")return[];var c=[],l=0,f,d,p,v,h;function m(){for(;l=u.length)&&c.push(u.substring(f,u.length))}return c}t.exports=o,t.exports.parse=o,t.exports.parseString=a,t.exports.splitCookiesString=s}}),dc=vm(hm()),Jr="MSW_COOKIE_STORE";function pc(){try{if(localStorage==null)return!1;const e=Jr+"_test";return localStorage.setItem(e,"test"),localStorage.getItem(e),localStorage.removeItem(e),!0}catch{return!1}}function vc(e,t){try{return e[t],!0}catch{return!1}}var mm=class{constructor(){this.store=new Map}add(e,t){if(vc(e,"credentials")&&e.credentials==="omit")return;const r=new URL(e.url),n=t.headers.get("set-cookie");if(!n)return;const a=Date.now(),i=(0,dc.parse)(n).map(({maxAge:s,...u})=>({...u,expires:s===void 0?u.expires:new Date(a+s*1e3),maxAge:s})),o=this.store.get(r.origin)||new Map;i.forEach(s=>{this.store.set(r.origin,o.set(s.name,s))})}get(e){this.deleteExpiredCookies();const t=new URL(e.url),r=this.store.get(t.origin)||new Map;if(!vc(e,"credentials"))return r;switch(e.credentials){case"include":return typeof document>"u"||(0,dc.parse)(document.cookie).forEach(a=>{r.set(a.name,a)}),r;case"same-origin":return r;default:return new Map}}getAll(){return this.deleteExpiredCookies(),this.store}deleteAll(e){const t=new URL(e.url);this.store.delete(t.origin)}clear(){this.store.clear()}hydrate(){if(!pc())return;const e=localStorage.getItem(Jr);if(e)try{JSON.parse(e).forEach(([r,n])=>{this.store.set(r,new Map(n.map(([a,{expires:i,...o}])=>[a,i===void 0?o:{...o,expires:new Date(i)}])))})}catch(t){console.warn(` +[virtual-cookie] Failed to parse a stored cookie from the localStorage (key "${Jr}"). + +Stored value: +${localStorage.getItem(Jr)} + +Thrown exception: +${t} + +Invalid value has been removed from localStorage to prevent subsequent failed parsing attempts.`),localStorage.removeItem(Jr)}}persist(){if(!pc())return;const e=Array.from(this.store.entries()).map(([t,r])=>[t,Array.from(r.entries())]);localStorage.setItem(Jr,JSON.stringify(e))}deleteExpiredCookies(){const e=Date.now();this.store.forEach((t,r)=>{t.forEach(({expires:n,name:a})=>{n!==void 0&&n.getTime()<=e&&t.delete(a)}),t.size===0&&this.store.delete(r)})}},ni=new mm;function ym(e,t){ni.add({...e,url:e.url.toString()},t),ni.persist()}async function uf(e,t,r,n,a,i){var l,f,d,p,v,h;if(a.emit("request:start",{request:e,requestId:t}),e.headers.get("x-msw-intention")==="bypass"){a.emit("request:end",{request:e,requestId:t}),(l=i==null?void 0:i.onPassthroughResponse)==null||l.call(i,e);return}const o=await im(()=>om({request:e,requestId:t,handlers:r,resolutionContext:i==null?void 0:i.resolutionContext}));if(o.error)throw a.emit("unhandledException",{error:o.error,request:e,requestId:t}),o.error;if(!o.data){await sm(e,n.onUnhandledRequest),a.emit("request:unhandled",{request:e,requestId:t}),a.emit("request:end",{request:e,requestId:t}),(f=i==null?void 0:i.onPassthroughResponse)==null||f.call(i,e);return}const{response:s}=o.data;if(!s){a.emit("request:end",{request:e,requestId:t}),(d=i==null?void 0:i.onPassthroughResponse)==null||d.call(i,e);return}if(s.status===302&&s.headers.get("x-msw-intention")==="passthrough"){a.emit("request:end",{request:e,requestId:t}),(p=i==null?void 0:i.onPassthroughResponse)==null||p.call(i,e);return}ym(e,s),a.emit("request:match",{request:e,requestId:t});const u=o.data,c=((v=i==null?void 0:i.transformResponse)==null?void 0:v.call(i,s))||s;return(h=i==null?void 0:i.onMockedResponse)==null||h.call(i,c,u),a.emit("request:end",{request:e,requestId:t}),c}function gm(e){return{status:e.status,statusText:e.statusText,headers:Object.fromEntries(e.headers.entries())}}function hc(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function cf(e,t){return Object.entries(t).reduce((r,[n,a])=>{const i=r[n];return Array.isArray(i)&&Array.isArray(a)?(r[n]=i.concat(a),r):hc(i)&&hc(a)?(r[n]=cf(i,a),r):(r[n]=a,r)},Object.assign({},e))}var Em=class extends Error{constructor(t,r,n){super(`Possible EventEmitter memory leak detected. ${n} ${r.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`),this.emitter=t,this.type=r,this.count=n,this.name="MaxListenersExceededWarning"}},lf=class{static listenerCount(t,r){return t.listenerCount(r)}constructor(){this.events=new Map,this.maxListeners=lf.defaultMaxListeners,this.hasWarnedAboutPotentialMemoryLeak=!1}_emitInternalEvent(t,r,n){this.emit(t,r,n)}_getListeners(t){return Array.prototype.concat.apply([],this.events.get(t))||[]}_removeListener(t,r){const n=t.indexOf(r);return n>-1&&t.splice(n,1),[]}_wrapOnceListener(t,r){const n=(...a)=>(this.removeListener(t,n),r.apply(this,a));return Object.defineProperty(n,"name",{value:r.name}),n}setMaxListeners(t){return this.maxListeners=t,this}getMaxListeners(){return this.maxListeners}eventNames(){return Array.from(this.events.keys())}emit(t,...r){const n=this._getListeners(t);return n.forEach(a=>{a.apply(this,r)}),n.length>0}addListener(t,r){this._emitInternalEvent("newListener",t,r);const n=this._getListeners(t).concat(r);if(this.events.set(t,n),this.maxListeners>0&&this.listenerCount(t)>this.maxListeners&&!this.hasWarnedAboutPotentialMemoryLeak){this.hasWarnedAboutPotentialMemoryLeak=!0;const a=new Em(this,t,this.listenerCount(t));console.warn(a)}return this}on(t,r){return this.addListener(t,r)}once(t,r){return this.addListener(t,this._wrapOnceListener(t,r))}prependListener(t,r){const n=this._getListeners(t);if(n.length>0){const a=[r].concat(n);this.events.set(t,a)}else this.events.set(t,n.concat(r));return this}prependOnceListener(t,r){return this.prependListener(t,this._wrapOnceListener(t,r))}removeListener(t,r){const n=this._getListeners(t);return n.length>0&&(this._removeListener(n,r),this.events.set(t,n),this._emitInternalEvent("removeListener",t,r)),this}off(t,r){return this.removeListener(t,r)}removeAllListeners(t){return t?this.events.delete(t):this.events.clear(),this}listeners(t){return Array.from(this._getListeners(t))}listenerCount(t){return this._getListeners(t).length}rawListeners(t){return this.listeners(t)}},es=lf;es.defaultMaxListeners=10;function wm(e,t){const r=e.emit;if(r._isPiped)return;const n=function(i,...o){return t.emit(i,...o),r.call(this,i,...o)};n._isPiped=!0,e.emit=n}function Tm(e){const t=[...e];return Object.freeze(t),t}class bm{constructor(){Le(this,"subscriptions",[])}async dispose(){await Promise.all(this.subscriptions.map(t=>t()))}}class Om{constructor(t){Le(this,"handlers");this.initialHandlers=t,this.handlers=[...t]}prepend(t){this.handlers.unshift(...t)}reset(t){this.handlers=t.length>0?[...t]:[...this.initialHandlers]}currentHandlers(){return this.handlers}}class Im extends bm{constructor(...r){super();Le(this,"handlersController");Le(this,"emitter");Le(this,"publicEmitter");Le(this,"events");Jn(this.validateHandlers(r),$e.formatMessage("Failed to apply given request handlers: invalid input. Did you forget to spread the request handlers Array?")),this.handlersController=new Om(r),this.emitter=new es,this.publicEmitter=new es,wm(this.emitter,this.publicEmitter),this.events=this.createLifeCycleEvents(),this.subscriptions.push(()=>{this.emitter.removeAllListeners(),this.publicEmitter.removeAllListeners()})}validateHandlers(r){return r.every(n=>!Array.isArray(n))}use(...r){Jn(this.validateHandlers(r),$e.formatMessage('Failed to call "use()" with the given request handlers: invalid input. Did you forget to spread the array of request handlers?')),this.handlersController.prepend(r)}restoreHandlers(){this.handlersController.currentHandlers().forEach(r=>{r.isUsed=!1})}resetHandlers(...r){this.handlersController.reset(r)}listHandlers(){return Tm(this.handlersController.currentHandlers())}createLifeCycleEvents(){return{on:(...r)=>this.publicEmitter.on(...r),removeListener:(...r)=>this.publicEmitter.removeListener(...r),removeAllListeners:(...r)=>this.publicEmitter.removeAllListeners(...r)}}}var Dm={},_m=/(%?)(%([sdijo]))/g;function Nm(e,t){switch(t){case"s":return e;case"d":case"i":return Number(e);case"j":return JSON.stringify(e);case"o":{if(typeof e=="string")return e;const r=JSON.stringify(e);return r==="{}"||r==="[]"||/^\[object .+?\]$/.test(r)?e:r}}}function ca(e,...t){if(t.length===0)return e;let r=0,n=e.replace(_m,(a,i,o,s)=>{const u=t[r],c=Nm(u,s);return i?a:(r++,c)});return r{if(!e)throw new Rm(t,...r)};Rr.as=(e,t,r,...n)=>{if(!t){const a=n.length===0?r:ca(r,n);let i;try{i=Reflect.construct(e,[a])}catch{i=e(a)}throw i}};function Fs(){if(typeof navigator<"u"&&navigator.product==="ReactNative")return!0;if(typeof process<"u"){const e=process.type;return e==="renderer"||e==="worker"?!1:!!(process.versions&&process.versions.node)}return!1}var js=async e=>{try{return{error:null,data:await e().catch(r=>{throw r})}}catch(t){return{error:t,data:null}}};function Am(e){return new URL(e,location.href).href}function Ao(e,t,r){return[e.active,e.installing,e.waiting].filter(o=>o!=null).find(o=>r(o.scriptURL,t))||null}var Cm=async(e,t={},r)=>{const n=Am(e),a=await navigator.serviceWorker.getRegistrations().then(s=>s.filter(u=>Ao(u,n,r)));!navigator.serviceWorker.controller&&a.length>0&&location.reload();const[i]=a;if(i)return i.update().then(()=>[Ao(i,n,r),i]);const o=await js(async()=>{const s=await navigator.serviceWorker.register(e,t);return[Ao(s,n,r),s]});if(o.error){if(o.error.message.includes("(404)")){const u=new URL((t==null?void 0:t.scope)||"/",location.href);throw new Error($e.formatMessage(`Failed to register a Service Worker for scope ('${u.href}') with script ('${n}'): Service Worker script does not exist at the given path. + +Did you forget to run "npx msw init "? + +Learn more about creating the Service Worker script: https://mswjs.io/docs/cli/init`))}throw new Error($e.formatMessage(`Failed to register the Service Worker: + +%s`,o.error.message))}return o.data};function ff(e={}){if(e.quiet)return;const t=e.message||"Mocking enabled.";console.groupCollapsed(`%c${$e.formatMessage(t)}`,"color:orangered;font-weight:bold;"),console.log("%cDocumentation: %chttps://mswjs.io/docs","font-weight:bold","font-weight:normal"),console.log("Found an issue? https://github.com/mswjs/msw/issues"),e.workerUrl&&console.log("Worker script URL:",e.workerUrl),e.workerScope&&console.log("Worker scope:",e.workerScope),console.groupEnd()}async function Lm(e,t){var r,n;if(e.workerChannel.send("MOCK_ACTIVATE"),await e.events.once("MOCKING_ENABLED"),e.isMockingEnabled){$e.warn('Found a redundant "worker.start()" call. Note that starting the worker while mocking is already enabled will have no effect. Consider removing this "worker.start()" call.');return}e.isMockingEnabled=!0,ff({quiet:t.quiet,workerScope:(r=e.registration)==null?void 0:r.scope,workerUrl:(n=e.worker)==null?void 0:n.scriptURL})}var Mm=class{constructor(e){this.port=e}postMessage(e,...t){const[r,n]=t;this.port.postMessage({type:e,data:r},{transfer:n})}};function xm(e){if(!["HEAD","GET"].includes(e.method))return e.body}function Pm(e){return new Request(e.url,{...e,body:xm(e)})}var Fm=(e,t)=>async(r,n)=>{const a=new Mm(r.ports[0]),i=n.payload.id,o=Pm(n.payload),s=o.clone(),u=o.clone();nf.cache.set(o,u),e.requests.set(i,u);try{await uf(o,i,e.getRequestHandlers(),t,e.emitter,{onPassthroughResponse(){a.postMessage("PASSTHROUGH")},async onMockedResponse(c,{handler:l,parsedResult:f}){const d=c.clone(),p=c.clone(),v=gm(c);if(e.supports.readableStreamTransfer){const h=c.body;a.postMessage("MOCK_RESPONSE",{...v,body:h},h?[h]:void 0)}else{const h=c.body===null?null:await d.arrayBuffer();a.postMessage("MOCK_RESPONSE",{...v,body:h})}t.quiet||e.emitter.once("response:mocked",()=>{l.log({request:s,response:p,parsedResult:f})})}})}catch(c){c instanceof Error&&($e.error(`Uncaught exception in the request handler for "%s %s": + +%s + +This exception has been gracefully handled as a 500 response, however, it's strongly recommended to resolve this error, as it indicates a mistake in your code. If you wish to mock an error response, please see this guide: https://mswjs.io/docs/recipes/mocking-error-responses`,o.method,o.url,c.stack??c),a.postMessage("MOCK_RESPONSE",{status:500,statusText:"Request Handler Error",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:c.name,message:c.message,stack:c.stack})}))}};async function jm(e){e.workerChannel.send("INTEGRITY_CHECK_REQUEST");const{payload:t}=await e.events.once("INTEGRITY_CHECK_RESPONSE");t.checksum!=="26357c79639bfa20d64c0efca2a87423"&&$e.warn(`The currently registered Service Worker has been generated by a different version of MSW (${t.packageVersion}) and may not be fully compatible with the installed version. + +It's recommended you update your worker script by running this command: + + • npx msw init + +You can also automate this process and make the worker script update automatically upon the library installations. Read more: https://mswjs.io/docs/cli/init.`)}var Um=new TextEncoder;function $m(e){return Um.encode(e)}function Vm(e,t){return new TextDecoder(t).decode(e)}function qm(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}var Bm=new Set([101,103,204,205,304]);function df(e){return Bm.has(e)}var nn=Symbol("isPatchedModule"),Hm=Object.defineProperty,Ym=(e,t)=>{for(var r in t)Hm(e,r,{get:t[r],enumerable:!0})},ts={};Ym(ts,{blue:()=>Gm,gray:()=>rs,green:()=>Km,red:()=>Qm,yellow:()=>Wm});function Wm(e){return`\x1B[33m${e}\x1B[0m`}function Gm(e){return`\x1B[34m${e}\x1B[0m`}function rs(e){return`\x1B[90m${e}\x1B[0m`}function Qm(e){return`\x1B[31m${e}\x1B[0m`}function Km(e){return`\x1B[32m${e}\x1B[0m`}var Di=Fs(),pf=class{constructor(e){Le(this,"prefix");this.name=e,this.prefix=`[${this.name}]`;const t=mc("DEBUG"),r=mc("LOG_LEVEL");t==="1"||t==="true"||typeof t<"u"&&this.name.startsWith(t)?(this.debug=Cn(r,"debug")?Ft:this.debug,this.info=Cn(r,"info")?Ft:this.info,this.success=Cn(r,"success")?Ft:this.success,this.warning=Cn(r,"warning")?Ft:this.warning,this.error=Cn(r,"error")?Ft:this.error):(this.info=Ft,this.success=Ft,this.warning=Ft,this.error=Ft,this.only=Ft)}extend(e){return new pf(`${this.name}:${e}`)}debug(e,...t){this.logEntry({level:"debug",message:rs(e),positionals:t,prefix:this.prefix,colors:{prefix:"gray"}})}info(e,...t){this.logEntry({level:"info",message:e,positionals:t,prefix:this.prefix,colors:{prefix:"blue"}});const r=new Jm;return(n,...a)=>{r.measure(),this.logEntry({level:"info",message:`${n} ${rs(`${r.deltaTime}ms`)}`,positionals:a,prefix:this.prefix,colors:{prefix:"blue"}})}}success(e,...t){this.logEntry({level:"info",message:e,positionals:t,prefix:`✔ ${this.prefix}`,colors:{timestamp:"green",prefix:"green"}})}warning(e,...t){this.logEntry({level:"warning",message:e,positionals:t,prefix:`⚠ ${this.prefix}`,colors:{timestamp:"yellow",prefix:"yellow"}})}error(e,...t){this.logEntry({level:"error",message:e,positionals:t,prefix:`✖ ${this.prefix}`,colors:{timestamp:"red",prefix:"red"}})}only(e){e()}createEntry(e,t){return{timestamp:new Date,level:e,message:t}}logEntry(e){const{level:t,message:r,prefix:n,colors:a,positionals:i=[]}=e,o=this.createEntry(t,r),s=(a==null?void 0:a.timestamp)||"gray",u=(a==null?void 0:a.prefix)||"gray",c={timestamp:ts[s],prefix:ts[u]};this.getWriter(t)([c.timestamp(this.formatTimestamp(o.timestamp))].concat(n!=null?c.prefix(n):[]).concat(yc(r)).join(" "),...i.map(yc))}formatTimestamp(e){return`${e.toLocaleTimeString("en-GB")}:${e.getMilliseconds()}`}getWriter(e){switch(e){case"debug":case"success":case"info":return zm;case"warning":return Xm;case"error":return Zm}}},Jm=class{constructor(){Le(this,"startTime");Le(this,"endTime");Le(this,"deltaTime");this.startTime=performance.now()}measure(){this.endTime=performance.now();const e=this.endTime-this.startTime;this.deltaTime=e.toFixed(2)}},Ft=()=>{};function zm(e,...t){if(Di){process.stdout.write(ca(e,...t)+` +`);return}console.log(e,...t)}function Xm(e,...t){if(Di){process.stderr.write(ca(e,...t)+` +`);return}console.warn(e,...t)}function Zm(e,...t){if(Di){process.stderr.write(ca(e,...t)+` +`);return}console.error(e,...t)}function mc(e){var t;return Di?Dm[e]:(t=globalThis[e])==null?void 0:t.toString()}function Cn(e,t){return e!==void 0&&e!==t}function yc(e){return typeof e>"u"?"undefined":e===null?"null":typeof e=="string"?e:typeof e=="object"?JSON.stringify(e):e.toString()}var ey=class extends Error{constructor(e,t,r){super(`Possible EventEmitter memory leak detected. ${r} ${t.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`),this.emitter=e,this.type=t,this.count=r,this.name="MaxListenersExceededWarning"}},vf=class{static listenerCount(e,t){return e.listenerCount(t)}constructor(){this.events=new Map,this.maxListeners=vf.defaultMaxListeners,this.hasWarnedAboutPotentialMemoryLeak=!1}_emitInternalEvent(e,t,r){this.emit(e,t,r)}_getListeners(e){return Array.prototype.concat.apply([],this.events.get(e))||[]}_removeListener(e,t){const r=e.indexOf(t);return r>-1&&e.splice(r,1),[]}_wrapOnceListener(e,t){const r=(...n)=>(this.removeListener(e,r),t.apply(this,n));return Object.defineProperty(r,"name",{value:t.name}),r}setMaxListeners(e){return this.maxListeners=e,this}getMaxListeners(){return this.maxListeners}eventNames(){return Array.from(this.events.keys())}emit(e,...t){const r=this._getListeners(e);return r.forEach(n=>{n.apply(this,t)}),r.length>0}addListener(e,t){this._emitInternalEvent("newListener",e,t);const r=this._getListeners(e).concat(t);if(this.events.set(e,r),this.maxListeners>0&&this.listenerCount(e)>this.maxListeners&&!this.hasWarnedAboutPotentialMemoryLeak){this.hasWarnedAboutPotentialMemoryLeak=!0;const n=new ey(this,e,this.listenerCount(e));console.warn(n)}return this}on(e,t){return this.addListener(e,t)}once(e,t){return this.addListener(e,this._wrapOnceListener(e,t))}prependListener(e,t){const r=this._getListeners(e);if(r.length>0){const n=[t].concat(r);this.events.set(e,n)}else this.events.set(e,r.concat(t));return this}prependOnceListener(e,t){return this.prependListener(e,this._wrapOnceListener(e,t))}removeListener(e,t){const r=this._getListeners(e);return r.length>0&&(this._removeListener(r,t),this.events.set(e,r),this._emitInternalEvent("removeListener",e,t)),this}off(e,t){return this.removeListener(e,t)}removeAllListeners(e){return e?this.events.delete(e):this.events.clear(),this}listeners(e){return Array.from(this._getListeners(e))}listenerCount(e){return this._getListeners(e).length}rawListeners(e){return this.listeners(e)}},hf=vf;hf.defaultMaxListeners=10;var ty="x-interceptors-internal-request-id";function gc(e){return globalThis[e]||void 0}function ry(e,t){globalThis[e]=t}function ny(e){delete globalThis[e]}var Us=class{constructor(e){this.symbol=e,this.readyState="INACTIVE",this.emitter=new hf,this.subscriptions=[],this.logger=new pf(e.description),this.emitter.setMaxListeners(0),this.logger.info("constructing the interceptor...")}checkEnvironment(){return!0}apply(){const e=this.logger.extend("apply");if(e.info("applying the interceptor..."),this.readyState==="APPLIED"){e.info("intercepted already applied!");return}if(!this.checkEnvironment()){e.info("the interceptor cannot be applied in this environment!");return}this.readyState="APPLYING";const r=this.getInstance();if(r){e.info("found a running instance, reusing..."),this.on=(n,a)=>(e.info('proxying the "%s" listener',n),r.emitter.addListener(n,a),this.subscriptions.push(()=>{r.emitter.removeListener(n,a),e.info('removed proxied "%s" listener!',n)}),this),this.readyState="APPLIED";return}e.info("no running instance found, setting up a new instance..."),this.setup(),this.setInstance(),this.readyState="APPLIED"}setup(){}on(e,t){const r=this.logger.extend("on");return this.readyState==="DISPOSING"||this.readyState==="DISPOSED"?(r.info("cannot listen to events, already disposed!"),this):(r.info('adding "%s" event listener:',e,t),this.emitter.on(e,t),this)}once(e,t){return this.emitter.once(e,t),this}off(e,t){return this.emitter.off(e,t),this}removeAllListeners(e){return this.emitter.removeAllListeners(e),this}dispose(){const e=this.logger.extend("dispose");if(this.readyState==="DISPOSED"){e.info("cannot dispose, already disposed!");return}if(e.info("disposing the interceptor..."),this.readyState="DISPOSING",!this.getInstance()){e.info("no interceptors running, skipping dispose...");return}if(this.clearInstance(),e.info("global symbol deleted:",gc(this.symbol)),this.subscriptions.length>0){e.info("disposing of %d subscriptions...",this.subscriptions.length);for(const t of this.subscriptions)t();this.subscriptions=[],e.info("disposed of all subscriptions!",this.subscriptions.length)}this.emitter.removeAllListeners(),e.info("destroyed the listener!"),this.readyState="DISPOSED"}getInstance(){var e;const t=gc(this.symbol);return this.logger.info("retrieved global instance:",(e=t==null?void 0:t.constructor)==null?void 0:e.name),t}setInstance(){ry(this.symbol,this),this.logger.info("set global instance!",this.symbol.description)}clearInstance(){ny(this.symbol),this.logger.info("cleared global instance!",this.symbol.description)}};function mf(){return Math.random().toString(16).slice(2)}var ns=class extends Us{constructor(e){ns.symbol=Symbol(e.name),super(ns.symbol),this.interceptors=e.interceptors}setup(){const e=this.logger.extend("setup");e.info("applying all %d interceptors...",this.interceptors.length);for(const t of this.interceptors)e.info('applying "%s" interceptor...',t.constructor.name),t.apply(),e.info("adding interceptor dispose subscription"),this.subscriptions.push(()=>t.dispose())}on(e,t){for(const r of this.interceptors)r.on(e,t);return this}once(e,t){for(const r of this.interceptors)r.once(e,t);return this}off(e,t){for(const r of this.interceptors)r.off(e,t);return this}removeAllListeners(e){for(const t of this.interceptors)t.removeAllListeners(e);return this}};function ay(e){return(t,r)=>{var s;const{payload:n}=r,{requestId:a}=n,i=e.requests.get(a);if(e.requests.delete(a),(s=n.type)!=null&&s.includes("opaque"))return;const o=n.status===0?Response.error():new Response(df(n.status)?null:n.body,n);o.url||Object.defineProperty(o,"url",{value:i.url,enumerable:!0,writable:!1}),e.emitter.emit(n.isMockedResponse?"response:mocked":"response:bypass",{response:o,request:i,requestId:n.requestId})}}function iy(e,t){!(t!=null&&t.quiet)&&!location.href.startsWith(e.scope)&&$e.warn(`Cannot intercept requests on this page because it's outside of the worker's scope ("${e.scope}"). If you wish to mock API requests on this page, you must resolve this scope issue. + +- (Recommended) Register the worker at the root level ("/") of your application. +- Set the "Service-Worker-Allowed" response header to allow out-of-scope workers.`)}var oy=e=>function(r,n){return(async()=>{e.events.removeAllListeners(),e.workerChannel.on("REQUEST",Fm(e,r)),e.workerChannel.on("RESPONSE",ay(e));const o=await Cm(r.serviceWorker.url,r.serviceWorker.options,r.findWorker),[s,u]=o;if(!s){const c=n!=null&&n.findWorker?$e.formatMessage(`Failed to locate the Service Worker registration using a custom "findWorker" predicate. + +Please ensure that the custom predicate properly locates the Service Worker registration at "%s". +More details: https://mswjs.io/docs/api/setup-worker/start#findworker +`,r.serviceWorker.url):$e.formatMessage(`Failed to locate the Service Worker registration. + +This most likely means that the worker script URL "%s" cannot resolve against the actual public hostname (%s). This may happen if your application runs behind a proxy, or has a dynamic hostname. + +Please consider using a custom "serviceWorker.url" option to point to the actual worker script location, or a custom "findWorker" option to resolve the Service Worker registration manually. More details: https://mswjs.io/docs/api/setup-worker/start`,r.serviceWorker.url,location.host);throw new Error(c)}return e.worker=s,e.registration=u,e.events.addListener(window,"beforeunload",()=>{s.state!=="redundant"&&e.workerChannel.send("CLIENT_CLOSED"),window.clearInterval(e.keepAliveInterval)}),await jm(e).catch(c=>{$e.error("Error while checking the worker script integrity. Please report this on GitHub (https://github.com/mswjs/msw/issues), including the original error below."),console.error(c)}),e.keepAliveInterval=window.setInterval(()=>e.workerChannel.send("KEEPALIVE_REQUEST"),5e3),iy(u,e.startOptions),u})().then(async o=>{const s=o.installing||o.waiting;return s&&await new Promise(u=>{s.addEventListener("statechange",()=>{if(s.state==="activated")return u()})}),await Lm(e,r).catch(u=>{throw new Error(`Failed to enable mocking: ${u==null?void 0:u.message}`)}),o})};function yf(e={}){e.quiet||console.log(`%c${$e.formatMessage("Mocking disabled.")}`,"color:orangered;font-weight:bold;")}var sy=e=>function(){var r;if(!e.isMockingEnabled){$e.warn('Found a redundant "worker.stop()" call. Note that stopping the worker while mocking already stopped has no effect. Consider removing this "worker.stop()" call.');return}e.workerChannel.send("MOCK_DEACTIVATE"),e.isMockingEnabled=!1,window.clearInterval(e.keepAliveInterval),yf({quiet:(r=e.startOptions)==null?void 0:r.quiet})},uy={serviceWorker:{url:"/mockServiceWorker.js",options:null},quiet:!1,waitUntilReady:!0,onUnhandledRequest:"warn",findWorker(e,t){return e===t}};function cy(){const e=(t,r)=>{e.state="pending",e.resolve=n=>{if(e.state!=="pending")return;e.result=n;const a=i=>(e.state="fulfilled",i);return t(n instanceof Promise?n:Promise.resolve(n).then(a))},e.reject=n=>{if(e.state==="pending")return queueMicrotask(()=>{e.state="rejected"}),r(e.rejectionReason=n)}};return e}var dr,fn,Ua,rf,gf=(rf=class extends Promise{constructor(t=null){const r=cy();super((n,a)=>{r(n,a),t==null||t(r.resolve,r.reject)});Ro(this,fn);Ro(this,dr,void 0);Le(this,"resolve");Le(this,"reject");fc(this,dr,r),this.resolve=An(this,dr).resolve,this.reject=An(this,dr).reject}get state(){return An(this,dr).state}get rejectionReason(){return An(this,dr).rejectionReason}then(t,r){return Na(this,fn,Ua).call(this,super.then(t,r))}catch(t){return Na(this,fn,Ua).call(this,super.catch(t))}finally(t){return Na(this,fn,Ua).call(this,super.finally(t))}},dr=new WeakMap,fn=new WeakSet,Ua=function(t){return Object.defineProperties(t,{resolve:{configurable:!0,value:this.resolve},reject:{configurable:!0,value:this.reject}})},rf),ly=class{constructor(e){this.request=e,this.responsePromise=new gf}respondWith(e){Rr(this.responsePromise.state==="pending",'Failed to respond to "%s %s" request: the "request" event has already been responded to.',this.request.method,this.request.url),this.responsePromise.resolve(e)}};function Ef(e){const t=new ly(e);return Reflect.set(e,"respondWith",t.respondWith.bind(t)),{interactiveRequest:e,requestController:t}}async function wf(e,t,...r){const n=e.listeners(t);if(n.length!==0)for(const a of n)await a.apply(e,r)}function fy(e,t){try{return e[t],!0}catch{return!1}}function dy(e){try{return new URL(e),!0}catch{return!1}}var Tf=class extends Us{constructor(){super(Tf.symbol)}checkEnvironment(){return typeof globalThis<"u"&&typeof globalThis.fetch<"u"}async setup(){const e=globalThis.fetch;Rr(!e[nn],'Failed to patch the "fetch" module: already patched.'),globalThis.fetch=async(t,r)=>{var n;const a=mf(),i=typeof t=="string"&&typeof location<"u"&&!dy(t)?new URL(t,location.origin):t,o=new Request(i,r);this.logger.info("[%s] %s",o.method,o.url);const{interactiveRequest:s,requestController:u}=Ef(o);this.logger.info('emitting the "request" event for %d listener(s)...',this.emitter.listenerCount("request")),this.emitter.once("request",({requestId:p})=>{p===a&&u.responsePromise.state==="pending"&&u.responsePromise.resolve(void 0)}),this.logger.info("awaiting for the mocked response...");const c=s.signal,l=new gf;c&&c.addEventListener("abort",()=>{l.reject(c.reason)},{once:!0});const f=await js(async()=>{const p=wf(this.emitter,"request",{request:s,requestId:a});await Promise.race([l,p,u.responsePromise]),this.logger.info("all request listeners have been resolved!");const v=await u.responsePromise;return this.logger.info("event.respondWith called with:",v),v});if(l.state==="rejected")return Promise.reject(l.rejectionReason);if(f.error)return Promise.reject(Ec(f.error));const d=f.data;if(d&&!((n=o.signal)!=null&&n.aborted)){if(this.logger.info("received mocked response:",d),fy(d,"type")&&d.type==="error")return this.logger.info("received a network error response, rejecting the request promise..."),Promise.reject(Ec(d));const p=d.clone();return this.emitter.emit("response",{response:p,isMockedResponse:!0,request:s,requestId:a}),Object.defineProperty(d,"url",{writable:!1,enumerable:!0,configurable:!1,value:o.url}),d}return this.logger.info("no mocked response received!"),e(o).then(p=>{const v=p.clone();return this.logger.info("original fetch performed",v),this.emitter.emit("response",{response:v,isMockedResponse:!1,request:s,requestId:a}),p})},Object.defineProperty(globalThis.fetch,nn,{enumerable:!0,configurable:!0,value:!0}),this.subscriptions.push(()=>{Object.defineProperty(globalThis.fetch,nn,{value:void 0}),globalThis.fetch=e,this.logger.info('restored native "globalThis.fetch"!',globalThis.fetch.name)})}},bf=Tf;bf.symbol=Symbol("fetch");function Ec(e){return Object.assign(new TypeError("Failed to fetch"),{cause:e})}function py(e,t){const r=new Uint8Array(e.byteLength+t.byteLength);return r.set(e,0),r.set(t,e.byteLength),r}var Of=class{constructor(e,t){this.AT_TARGET=0,this.BUBBLING_PHASE=0,this.CAPTURING_PHASE=0,this.NONE=0,this.type="",this.srcElement=null,this.currentTarget=null,this.eventPhase=0,this.isTrusted=!0,this.composed=!1,this.cancelable=!0,this.defaultPrevented=!1,this.bubbles=!0,this.lengthComputable=!0,this.loaded=0,this.total=0,this.cancelBubble=!1,this.returnValue=!0,this.type=e,this.target=(t==null?void 0:t.target)||null,this.currentTarget=(t==null?void 0:t.currentTarget)||null,this.timeStamp=Date.now()}composedPath(){return[]}initEvent(e,t,r){this.type=e,this.bubbles=!!t,this.cancelable=!!r}preventDefault(){this.defaultPrevented=!0}stopPropagation(){}stopImmediatePropagation(){}},vy=class extends Of{constructor(e,t){super(e),this.lengthComputable=(t==null?void 0:t.lengthComputable)||!1,this.composed=(t==null?void 0:t.composed)||!1,this.loaded=(t==null?void 0:t.loaded)||0,this.total=(t==null?void 0:t.total)||0}},hy=typeof ProgressEvent<"u";function my(e,t,r){const n=["error","progress","loadstart","loadend","load","timeout","abort"],a=hy?ProgressEvent:vy;return n.includes(t)?new a(t,{lengthComputable:!0,loaded:(r==null?void 0:r.loaded)||0,total:(r==null?void 0:r.total)||0}):new Of(t,{target:e,currentTarget:e})}function If(e,t){if(!(t in e))return null;if(Object.prototype.hasOwnProperty.call(e,t))return e;const n=Reflect.getPrototypeOf(e);return n?If(n,t):null}function wc(e,t){return new Proxy(e,yy(t))}function yy(e){const{constructorCall:t,methodCall:r,getProperty:n,setProperty:a}=e,i={};return typeof t<"u"&&(i.construct=function(o,s,u){const c=Reflect.construct.bind(null,o,s,u);return t.call(u,s,c)}),i.set=function(o,s,u){const c=()=>{const l=If(o,s)||o,f=Reflect.getOwnPropertyDescriptor(l,s);return typeof(f==null?void 0:f.set)<"u"?(f.set.apply(o,[u]),!0):Reflect.defineProperty(l,s,{writable:!0,enumerable:!0,configurable:!0,value:u})};return typeof a<"u"?a.call(o,[s,u],c):c()},i.get=function(o,s,u){const c=()=>o[s],l=typeof n<"u"?n.call(o,[s,u],c):c();return typeof l=="function"?(...f)=>{const d=l.bind(o,...f);return typeof r<"u"?r.call(o,[s,f],d):d()}:l},i}function gy(e){return["application/xhtml+xml","application/xml","image/svg+xml","text/html","text/xml"].some(r=>e.startsWith(r))}function Ey(e){try{return JSON.parse(e)}catch{return null}}function wy(e,t){const r=df(e.status)?null:t;return new Response(r,{status:e.status,statusText:e.statusText,headers:Ty(e.getAllResponseHeaders())})}function Ty(e){const t=new Headers,r=e.split(/[\r\n]+/);for(const n of r){if(n.trim()==="")continue;const[a,...i]=n.split(": "),o=i.join(": ");t.append(a,o)}return t}var Tc=Symbol("isMockedResponse"),by=Fs(),Oy=class{constructor(e,t){this.initialRequest=e,this.logger=t,this.method="GET",this.url=null,this.events=new Map,this.requestId=mf(),this.requestHeaders=new Headers,this.responseBuffer=new Uint8Array,this.request=wc(e,{setProperty:([r,n],a)=>{switch(r){case"ontimeout":{const i=r.slice(2);return this.request.addEventListener(i,n),a()}default:return a()}},methodCall:([r,n],a)=>{var i;switch(r){case"open":{const[o,s]=n;return typeof s>"u"?(this.method="GET",this.url=bc(o)):(this.method=o,this.url=bc(s)),this.logger=this.logger.extend(`${this.method} ${this.url.href}`),this.logger.info("open",this.method,this.url.href),a()}case"addEventListener":{const[o,s]=n;return this.registerEvent(o,s),this.logger.info("addEventListener",o,s),a()}case"setRequestHeader":{const[o,s]=n;return this.requestHeaders.set(o,s),this.logger.info("setRequestHeader",o,s),a()}case"send":{const[o]=n;o!=null&&(this.requestBody=typeof o=="string"?$m(o):o),this.request.addEventListener("load",()=>{if(typeof this.onResponse<"u"){const c=wy(this.request,this.request.response);this.onResponse.call(this,{response:c,isMockedResponse:Tc in this.request,request:s,requestId:this.requestId})}});const s=this.toFetchApiRequest();(((i=this.onRequest)==null?void 0:i.call(this,{request:s,requestId:this.requestId}))||Promise.resolve()).finally(()=>{if(this.request.readyState{if(this.logger.info("getResponseHeader",i[0]),this.request.readyState{if(this.logger.info("getAllResponseHeaders"),this.request.readyState`${i}: ${o}`).join(`\r +`);return this.logger.info("resolved all response headers to",a),a}}),Object.defineProperties(this.request,{response:{enumerable:!0,configurable:!1,get:()=>this.response},responseText:{enumerable:!0,configurable:!1,get:()=>this.responseText},responseXML:{enumerable:!0,configurable:!1,get:()=>this.responseXML}});const t=e.headers.has("Content-Length")?Number(e.headers.get("Content-Length")):void 0;this.logger.info("calculated response body length",t),this.trigger("loadstart",{loaded:0,total:t}),this.setReadyState(this.request.HEADERS_RECEIVED),this.setReadyState(this.request.LOADING);const r=()=>{this.logger.info("finalizing the mocked response..."),this.setReadyState(this.request.DONE),this.trigger("load",{loaded:this.responseBuffer.byteLength,total:t}),this.trigger("loadend",{loaded:this.responseBuffer.byteLength,total:t})};if(e.body){this.logger.info("mocked response has body, streaming...");const n=e.body.getReader(),a=async()=>{const{value:i,done:o}=await n.read();if(o){this.logger.info("response body stream done!"),r();return}i&&(this.logger.info("read response body chunk:",i),this.responseBuffer=py(this.responseBuffer,i),this.trigger("progress",{loaded:this.responseBuffer.byteLength,total:t})),a()};a()}else r()}responseBufferToText(){return Vm(this.responseBuffer)}get response(){if(this.logger.info("getResponse (responseType: %s)",this.request.responseType),this.request.readyState!==this.request.DONE)return null;switch(this.request.responseType){case"json":{const e=Ey(this.responseBufferToText());return this.logger.info("resolved response JSON",e),e}case"arraybuffer":{const e=qm(this.responseBuffer);return this.logger.info("resolved response ArrayBuffer",e),e}case"blob":{const e=this.request.getResponseHeader("Content-Type")||"text/plain",t=new Blob([this.responseBufferToText()],{type:e});return this.logger.info("resolved response Blob (mime type: %s)",t,e),t}default:{const e=this.responseBufferToText();return this.logger.info('resolving "%s" response type as text',this.request.responseType,e),e}}}get responseText(){if(Rr(this.request.responseType===""||this.request.responseType==="text","InvalidStateError: The object is in invalid state."),this.request.readyState!==this.request.LOADING&&this.request.readyState!==this.request.DONE)return"";const e=this.responseBufferToText();return this.logger.info('getResponseText: "%s"',e),e}get responseXML(){if(Rr(this.request.responseType===""||this.request.responseType==="document","InvalidStateError: The object is in invalid state."),this.request.readyState!==this.request.DONE)return null;const e=this.request.getResponseHeader("Content-Type")||"";return typeof DOMParser>"u"?(console.warn("Cannot retrieve XMLHttpRequest response body as XML: DOMParser is not defined. You are likely using an environment that is not browser or does not polyfill browser globals correctly."),null):gy(e)?new DOMParser().parseFromString(this.responseBufferToText(),e):null}errorWith(e){this.logger.info("responding with an error"),this.setReadyState(this.request.DONE),this.trigger("error"),this.trigger("loadend")}setReadyState(e){if(this.logger.info("setReadyState: %d -> %d",this.request.readyState,e),this.request.readyState===e){this.logger.info("ready state identical, skipping transition...");return}Hr(this.request,"readyState",e),this.logger.info("set readyState to: %d",e),e!==this.request.UNSENT&&(this.logger.info('triggerring "readystatechange" event...'),this.trigger("readystatechange"))}trigger(e,t){const r=this.request[`on${e}`],n=my(this.request,e,t);this.logger.info('trigger "%s"',e,t||""),typeof r=="function"&&(this.logger.info('found a direct "%s" callback, calling...',e),r.call(this.request,n));for(const[a,i]of this.events)a===e&&(this.logger.info('found %d listener(s) for "%s" event, calling...',i.length,e),i.forEach(o=>o.call(this.request,n)))}toFetchApiRequest(){this.logger.info("converting request to a Fetch API Request...");const e=new Request(this.url.href,{method:this.method,headers:this.requestHeaders,credentials:this.request.withCredentials?"include":"same-origin",body:["GET","HEAD"].includes(this.method)?null:this.requestBody}),t=wc(e.headers,{methodCall:([r,n],a)=>{switch(r){case"append":case"set":{const[i,o]=n;this.request.setRequestHeader(i,o);break}case"delete":{const[i]=n;console.warn(`XMLHttpRequest: Cannot remove a "${i}" header from the Fetch API representation of the "${e.method} ${e.url}" request. XMLHttpRequest headers cannot be removed.`);break}}return a()}});return Hr(e,"headers",t),this.logger.info("converted request to a Fetch API Request!",e),e}};function bc(e){return typeof location>"u"?new URL(e):new URL(e.toString(),location.href)}function Hr(e,t,r){Reflect.defineProperty(e,t,{writable:!0,enumerable:!0,value:r})}function Iy({emitter:e,logger:t}){return new Proxy(globalThis.XMLHttpRequest,{construct(n,a,i){t.info("constructed new XMLHttpRequest");const o=Reflect.construct(n,a,i),s=Object.getOwnPropertyDescriptors(n.prototype);for(const c in s)Reflect.defineProperty(o,c,s[c]);const u=new Oy(o,t);return u.onRequest=async function({request:c,requestId:l}){const{interactiveRequest:f,requestController:d}=Ef(c);this.logger.info("awaiting mocked response..."),e.once("request",({requestId:h})=>{h===l&&d.responsePromise.state==="pending"&&d.respondWith(void 0)});const p=await js(async()=>{this.logger.info('emitting the "request" event for %s listener(s)...',e.listenerCount("request")),await wf(e,"request",{request:f,requestId:l}),this.logger.info('all "request" listeners settled!');const h=await d.responsePromise;return this.logger.info("event.respondWith called with:",h),h});if(p.error){this.logger.info("request listener threw an exception, aborting request...",p.error),u.errorWith(p.error);return}const v=p.data;if(typeof v<"u"){if(this.logger.info("received mocked response: %d %s",v.status,v.statusText),v.type==="error"){this.logger.info("received a network error response, rejecting the request promise..."),u.errorWith(new TypeError("Network error"));return}return u.respondWith(v)}this.logger.info("no mocked response received, performing request as-is...")},u.onResponse=async function({response:c,isMockedResponse:l,request:f,requestId:d}){this.logger.info('emitting the "response" event for %s listener(s)...',e.listenerCount("response")),e.emit("response",{response:c,isMockedResponse:l,request:f,requestId:d})},u.request}})}var Df=class extends Us{constructor(){super(Df.interceptorSymbol)}checkEnvironment(){return typeof globalThis.XMLHttpRequest<"u"}setup(){const e=this.logger.extend("setup");e.info('patching "XMLHttpRequest" module...');const t=globalThis.XMLHttpRequest;Rr(!t[nn],'Failed to patch the "XMLHttpRequest" module: already patched.'),globalThis.XMLHttpRequest=Iy({emitter:this.emitter,logger:this.logger}),e.info('native "XMLHttpRequest" module patched!',globalThis.XMLHttpRequest.name),Object.defineProperty(globalThis.XMLHttpRequest,nn,{enumerable:!0,configurable:!0,value:!0}),this.subscriptions.push(()=>{Object.defineProperty(globalThis.XMLHttpRequest,nn,{value:void 0}),globalThis.XMLHttpRequest=t,e.info('native "XMLHttpRequest" module restored!',globalThis.XMLHttpRequest.name)})}},_f=Df;_f.interceptorSymbol=Symbol("xhr");function Dy(e,t){const r=new ns({name:"fallback",interceptors:[new bf,new _f]});return r.on("request",async({request:n,requestId:a})=>{const i=n.clone(),o=await uf(n,a,e.getRequestHandlers(),t,e.emitter,{onMockedResponse(s,{handler:u,parsedResult:c}){t.quiet||e.emitter.once("response:mocked",({response:l})=>{u.log({request:i,response:l,parsedResult:c})})}});o&&n.respondWith(o)}),r.on("response",({response:n,isMockedResponse:a,request:i,requestId:o})=>{e.emitter.emit(a?"response:mocked":"response:bypass",{response:n,request:i,requestId:o})}),r.apply(),r}function _y(e){return async function(r){e.fallbackInterceptor=Dy(e,r),ff({message:"Mocking enabled (fallback mode).",quiet:r.quiet})}}function Ny(e){return function(){var r,n;(r=e.fallbackInterceptor)==null||r.dispose(),yf({quiet:(n=e.startOptions)==null?void 0:n.quiet})}}function Sy(){try{const e=new ReadableStream({start:r=>r.close()});return new MessageChannel().port1.postMessage(e,[e]),!0}catch{return!1}}var ky=class extends Im{constructor(...t){super(...t);Le(this,"context");Le(this,"startHandler",null);Le(this,"stopHandler",null);Le(this,"listeners");Rr(!Fs(),$e.formatMessage("Failed to execute `setupWorker` in a non-browser environment. Consider using `setupServer` for Node.js environment instead.")),this.listeners=[],this.context=this.createWorkerContext()}createWorkerContext(){const t={isMockingEnabled:!1,startOptions:null,worker:null,getRequestHandlers:()=>this.handlersController.currentHandlers(),registration:null,requests:new Map,emitter:this.emitter,workerChannel:{on:(r,n)=>{this.context.events.addListener(navigator.serviceWorker,"message",a=>{if(a.source!==this.context.worker)return;const i=a.data;i&&i.type===r&&n(a,i)})},send:r=>{var n;(n=this.context.worker)==null||n.postMessage(r)}},events:{addListener:(r,n,a)=>(r.addEventListener(n,a),this.listeners.push({eventType:n,target:r,callback:a}),()=>{r.removeEventListener(n,a)}),removeAllListeners:()=>{for(const{target:r,eventType:n,callback:a}of this.listeners)r.removeEventListener(n,a);this.listeners=[]},once:r=>{const n=[];return new Promise((a,i)=>{const o=s=>{try{const u=s.data;u.type===r&&a(u)}catch(u){i(u)}};n.push(this.context.events.addListener(navigator.serviceWorker,"message",o),this.context.events.addListener(navigator.serviceWorker,"messageerror",i))}).finally(()=>{n.forEach(a=>a())})}},supports:{serviceWorkerApi:!("serviceWorker"in navigator)||location.protocol==="file:",readableStreamTransfer:Sy()}};return this.startHandler=t.supports.serviceWorkerApi?_y(t):oy(t),this.stopHandler=t.supports.serviceWorkerApi?Ny(t):sy(t),t}async start(t={}){return t.waitUntilReady===!0&&$e.warn('The "waitUntilReady" option has been deprecated. Please remove it from this "worker.start()" call. Follow the recommended Browser integration (https://mswjs.io/docs/integrations/browser) to eliminate any race conditions between the Service Worker registration and any requests made by your application on initial render.'),this.context.startOptions=cf(uy,t),await this.startHandler(this.context.startOptions,t)}stop(){super.dispose(),this.context.events.removeAllListeners(),this.context.emitter.removeAllListeners(),this.stopHandler()}};function Ry(...e){return new ky(...e)}function Ay(){Jn(typeof URL<"u",$e.formatMessage(`Global "URL" class is not defined. This likely means that you're running MSW in an environment that doesn't support all Node.js standard API (e.g. React Native). If that's the case, please use an appropriate polyfill for the "URL" class, like "react-native-url-polyfill".`))}function Cy(e,t){return e.toLowerCase()===t.toLowerCase()}function Ly(e){return e<300?"#69AB32":e<400?"#F0BB4B":"#E95F5D"}function My(){const e=new Date;return[e.getHours(),e.getMinutes(),e.getSeconds()].map(String).map(t=>t.slice(0,2)).map(t=>t.padStart(2,"0")).join(":")}async function xy(e){const r=await e.clone().text();return{url:new URL(e.url),method:e.method,headers:Object.fromEntries(e.headers.entries()),body:r}}var Py=Object.create,Nf=Object.defineProperty,Fy=Object.getOwnPropertyDescriptor,Sf=Object.getOwnPropertyNames,jy=Object.getPrototypeOf,Uy=Object.prototype.hasOwnProperty,kf=(e,t)=>function(){return t||(0,e[Sf(e)[0]])((t={exports:{}}).exports,t),t.exports},$y=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Sf(t))!Uy.call(e,a)&&a!==r&&Nf(e,a,{get:()=>t[a],enumerable:!(n=Fy(t,a))||n.enumerable});return e},Vy=(e,t,r)=>(r=e!=null?Py(jy(e)):{},$y(Nf(r,"default",{value:e,enumerable:!0}),e)),qy=kf({"node_modules/statuses/codes.json"(e,t){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a Teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}}}),By=kf({"node_modules/statuses/index.js"(e,t){var r=qy();t.exports=s,s.message=r,s.code=n(r),s.codes=a(r),s.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},s.empty={204:!0,205:!0,304:!0},s.retry={502:!0,503:!0,504:!0};function n(u){var c={};return Object.keys(u).forEach(function(f){var d=u[f],p=Number(f);c[d.toLowerCase()]=p}),c}function a(u){return Object.keys(u).map(function(l){return Number(l)})}function i(u){var c=u.toLowerCase();if(!Object.prototype.hasOwnProperty.call(s.code,c))throw new Error('invalid status message: "'+u+'"');return s.code[c]}function o(u){if(!Object.prototype.hasOwnProperty.call(s.message,u))throw new Error("invalid status code: "+u);return s.message[u]}function s(u){if(typeof u=="number")return o(u);if(typeof u!="string")throw new TypeError("code must be a number or string");var c=parseInt(u,10);return isNaN(c)?i(u):o(c)}}}),Hy=Vy(By()),Rf=Hy.default;/*! Bundled license information: + +statuses/index.js: + (*! + * statuses + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + *) +*/const{message:Yy}=Rf;async function Wy(e){const t=e.clone(),r=await t.text(),n=t.status||200,a=t.statusText||Yy[n]||"OK";return{status:n,statusText:a,headers:Object.fromEntries(t.headers.entries()),body:r}}function Gy(e){for(var t=[],r=0;r=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122||o===95){a+=e[i++];continue}break}if(!a)throw new TypeError("Missing parameter name at ".concat(r));t.push({type:"NAME",index:r,value:a}),r=i;continue}if(n==="("){var s=1,u="",i=r+1;if(e[i]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(i));for(;i)?(?!\?)/g,n=0,a=r.exec(e.source);a;)t.push({name:a[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),a=r.exec(e.source);return e}function Xy(e,t,r){var n=e.map(function(a){return Cf(a,t,r).source});return new RegExp("(?:".concat(n.join("|"),")"),Af(r))}function Zy(e,t,r){return eg(Qy(e,r),t,r)}function eg(e,t,r){r===void 0&&(r={});for(var n=r.strict,a=n===void 0?!1:n,i=r.start,o=i===void 0?!0:i,s=r.end,u=s===void 0?!0:s,c=r.encode,l=c===void 0?function(z){return z}:c,f=r.delimiter,d=f===void 0?"/#?":f,p=r.endsWith,v=p===void 0?"":p,h="[".concat(zr(v),"]|$"),m="[".concat(zr(d),"]"),w=o?"^":"",g=0,b=e;g-1:L===void 0;a||(w+="(?:".concat(m,"(?=").concat(h,"))?")),B||(w+="(?=".concat(m,"|").concat(h,")"))}return new RegExp(w,Af(r))}function Cf(e,t,r){return e instanceof RegExp?zy(e,t):Array.isArray(e)?Xy(e,t,r):Zy(e,t,r)}new TextEncoder;function tg(){if(typeof navigator<"u"&&navigator.product==="ReactNative")return!0;if(typeof process<"u"){const e=process.type;return e==="renderer"||e==="worker"?!1:!!(process.versions&&process.versions.node)}return!1}var rg=Object.defineProperty,ng=(e,t)=>{for(var r in t)rg(e,r,{get:t[r],enumerable:!0})},ag={};ng(ag,{blue:()=>og,gray:()=>sg,green:()=>cg,red:()=>ug,yellow:()=>ig});function ig(e){return`\x1B[33m${e}\x1B[0m`}function og(e){return`\x1B[34m${e}\x1B[0m`}function sg(e){return`\x1B[90m${e}\x1B[0m`}function ug(e){return`\x1B[31m${e}\x1B[0m`}function cg(e){return`\x1B[32m${e}\x1B[0m`}tg();function lg(e,t=!0){return[t&&e.origin,e.pathname].filter(Boolean).join("")}const fg=/[\?|#].*$/g;function dg(e){return new URL(`/${e}`,"http://localhost").searchParams}function Lf(e){return e.replace(fg,"")}function pg(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}function vg(e,t){if(pg(e)||e.startsWith("*"))return e;const r=t||typeof document<"u"&&document.baseURI;return r?decodeURI(new URL(encodeURI(e),r).href):e}function hg(e,t){if(e instanceof RegExp)return e;const r=vg(e,t);return Lf(r)}function mg(e){return e.replace(/([:a-zA-Z_-]*)(\*{1,2})+/g,(t,r,n)=>{const a="(.*)";return r?r.startsWith(":")?`${r}${n}`:`${r}${a}`:a}).replace(/([^\/])(:)(?=\d+)/,"$1\\$2").replace(/^([^\/]+)(:)(?=\/\/)/,"$1\\$2")}function yg(e,t,r){const n=hg(t,r),a=typeof n=="string"?mg(n):n,i=lg(e),o=Ky(a,{decode:decodeURIComponent})(i),s=o&&o.params||{};return{matches:o!==!1,params:s}}var gg=Object.create,Mf=Object.defineProperty,Eg=Object.getOwnPropertyDescriptor,xf=Object.getOwnPropertyNames,wg=Object.getPrototypeOf,Tg=Object.prototype.hasOwnProperty,bg=(e,t)=>function(){return t||(0,e[xf(e)[0]])((t={exports:{}}).exports,t),t.exports},Og=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of xf(t))!Tg.call(e,a)&&a!==r&&Mf(e,a,{get:()=>t[a],enumerable:!(n=Eg(t,a))||n.enumerable});return e},Ig=(e,t,r)=>(r=e!=null?gg(wg(e)):{},Og(Mf(r,"default",{value:e,enumerable:!0}),e)),Dg=bg({"node_modules/cookie/index.js"(e){e.parse=n,e.serialize=a;var t=Object.prototype.toString,r=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function n(c,l){if(typeof c!="string")throw new TypeError("argument str must be a string");for(var f={},d=l||{},p=d.decode||i,v=0;v"u"||typeof location>"u")return{};switch(e.credentials){case"same-origin":{const t=new URL(e.url);return location.origin===t.origin?Oc():{}}case"include":return Oc();default:return{}}}function Sg(e){var o;const t=e.headers.get("cookie"),r=t?as.parse(t):{};ni.hydrate();const n=Array.from((o=ni.get(e))==null?void 0:o.entries()).reduce((s,[u,{value:c}])=>Object.assign(s,{[u.trim()]:c}),{}),i={...Ng(e),...n};for(const[s,u]of Object.entries(i))e.headers.append("cookie",as.serialize(s,u));return{...i,...r}}var fr=(e=>(e.HEAD="HEAD",e.GET="GET",e.POST="POST",e.PUT="PUT",e.PATCH="PATCH",e.OPTIONS="OPTIONS",e.DELETE="DELETE",e))(fr||{});class kg extends nf{constructor(t,r,n,a){super({info:{header:`${t} ${r}`,path:r,method:t},resolver:n,options:a}),this.checkRedundantQueryParameters()}checkRedundantQueryParameters(){const{method:t,path:r}=this.info;if(r instanceof RegExp||Lf(r)===r)return;dg(r).forEach((i,o)=>{}),$e.warn(`Found a redundant usage of query parameters in the request handler URL for "${t} ${r}". Please match against a path instead and access query parameters using "new URL(request.url).searchParams" instead. Learn more: https://mswjs.io/docs/recipes/query-parameters`)}async parse(t){var i;const r=new URL(t.request.url),n=yg(r,this.info.path,(i=t.resolutionContext)==null?void 0:i.baseUrl),a=Sg(t.request);return{match:n,cookies:a}}predicate(t){const r=this.matchMethod(t.request.method),n=t.parsedResult.match.matches;return r&&n}matchMethod(t){return this.info.method instanceof RegExp?this.info.method.test(t):Cy(this.info.method,t)}extendResolverArgs(t){var r;return{params:((r=t.parsedResult.match)==null?void 0:r.params)||{},cookies:t.parsedResult.cookies}}async log(t){const r=af(t.request.url),n=await xy(t.request),a=await Wy(t.response),i=Ly(a.status);console.groupCollapsed($e.formatMessage(`${My()} ${t.request.method} ${r} (%c${a.status} ${a.statusText}%c)`),`color:${i}`,"color:inherit"),console.log("Request",n),console.log("Handler:",this),console.log("Response",a),console.groupEnd()}}function ur(e){return(t,r,n={})=>new kg(e,t,r,n)}const nt={all:ur(/.+/),head:ur(fr.HEAD),get:ur(fr.GET),post:ur(fr.POST),put:ur(fr.PUT),delete:ur(fr.DELETE),patch:ur(fr.PATCH),options:ur(fr.OPTIONS)};var Rg=Object.create,Pf=Object.defineProperty,Ag=Object.getOwnPropertyDescriptor,Ff=Object.getOwnPropertyNames,Cg=Object.getPrototypeOf,Lg=Object.prototype.hasOwnProperty,Mg=(e,t)=>function(){return t||(0,e[Ff(e)[0]])((t={exports:{}}).exports,t),t.exports},xg=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ff(t))!Lg.call(e,a)&&a!==r&&Pf(e,a,{get:()=>t[a],enumerable:!(n=Ag(t,a))||n.enumerable});return e},Pg=(e,t,r)=>(r=e!=null?Rg(Cg(e)):{},xg(!e||!e.__esModule?Pf(r,"default",{value:e,enumerable:!0}):r,e)),Fg=Mg({"node_modules/set-cookie-parser/lib/set-cookie.js"(e,t){var r={decodeValues:!0,map:!1,silent:!1};function n(u){return typeof u=="string"&&!!u.trim()}function a(u,c){var l=u.split(";").filter(n),f=l.shift(),d=i(f),p=d.name,v=d.value;c=c?Object.assign({},r,c):r;try{v=c.decodeValues?decodeURIComponent(v):v}catch(m){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+v+"'. Set options.decodeValues to false to disable this feature.",m)}var h={name:p,value:v};return l.forEach(function(m){var w=m.split("="),g=w.shift().trimLeft().toLowerCase(),b=w.join("=");g==="expires"?h.expires=new Date(b):g==="max-age"?h.maxAge=parseInt(b,10):g==="secure"?h.secure=!0:g==="httponly"?h.httpOnly=!0:g==="samesite"?h.sameSite=b:h[g]=b}),h}function i(u){var c="",l="",f=u.split("=");return f.length>1?(c=f.shift(),l=f.join("=")):l=u,{name:c,value:l}}function o(u,c){if(c=c?Object.assign({},r,c):r,!u)return c.map?{}:[];if(u.headers)if(typeof u.headers.getSetCookie=="function")u=u.headers.getSetCookie();else if(u.headers["set-cookie"])u=u.headers["set-cookie"];else{var l=u.headers[Object.keys(u.headers).find(function(d){return d.toLowerCase()==="set-cookie"})];!l&&u.headers.cookie&&!c.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),u=l}if(Array.isArray(u)||(u=[u]),c=c?Object.assign({},r,c):r,c.map){var f={};return u.filter(n).reduce(function(d,p){var v=a(p,c);return d[v.name]=v,d},f)}else return u.filter(n).map(function(d){return a(d,c)})}function s(u){if(Array.isArray(u))return u;if(typeof u!="string")return[];var c=[],l=0,f,d,p,v,h;function m(){for(;l=u.length)&&c.push(u.substring(f,u.length))}return c}t.exports=o,t.exports.parse=o,t.exports.parseString=a,t.exports.splitCookiesString=s}}),jg=Pg(Fg()),Ug=/[^a-z0-9\-#$%&'*+.^_`|~]/i;function Ln(e){if(Ug.test(e)||e.trim()==="")throw new TypeError("Invalid character in header field name");return e.trim().toLowerCase()}var Ic=[` +`,"\r"," "," "],$g=new RegExp(`(^[${Ic.join("")}]|$[${Ic.join("")}])`,"g");function Co(e){return e.replace($g,"")}function Mn(e){if(typeof e!="string"||e.length===0)return!1;for(let t=0;t127||!Vg(r))return!1}return!0}function Vg(e){return![127,32,"(",")","<",">","@",",",";",":","\\",'"',"/","[","]","?","=","{","}"].includes(e)}function Dc(e){if(typeof e!="string"||e.trim()!==e)return!1;for(let t=0;t{this.append(a,n)},this):Array.isArray(t)?t.forEach(([r,n])=>{this.append(r,Array.isArray(n)?n.join(_c):n)}):t&&Object.getOwnPropertyNames(t).forEach(r=>{const n=t[r];this.append(r,Array.isArray(n)?n.join(_c):n)})}[(Nc=Yr,Sc=Lo,kc=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}*keys(){for(const[t]of this.entries())yield t}*values(){for(const[,t]of this.entries())yield t}*entries(){let t=Object.keys(this[Yr]).sort((r,n)=>r.localeCompare(n));for(const r of t)if(r==="set-cookie")for(const n of this.getSetCookie())yield[r,n];else yield[r,this.get(r)]}has(t){if(!Mn(t))throw new TypeError(`Invalid header name "${t}"`);return this[Yr].hasOwnProperty(Ln(t))}get(t){if(!Mn(t))throw TypeError(`Invalid header name "${t}"`);return this[Yr][Ln(t)]??null}set(t,r){if(!Mn(t)||!Dc(r))return;const n=Ln(t),a=Co(r);this[Yr][n]=Co(a),this[Lo].set(n,t)}append(t,r){if(!Mn(t)||!Dc(r))return;const n=Ln(t),a=Co(r);let i=this.has(n)?`${this.get(n)}, ${a}`:a;this.set(t,i)}delete(t){if(!Mn(t)||!this.has(t))return;const r=Ln(t);delete this[Yr][r],this[Lo].delete(r)}forEach(t,r){for(const[n,a]of this.entries())t.call(r,a,n,this)}getSetCookie(){const t=this.get("set-cookie");return t===null?[]:t===""?[""]:(0,jg.splitCookiesString)(t)}};const{message:Bg}=Rf;function Wr(e={}){const t=(e==null?void 0:e.status)||200,r=(e==null?void 0:e.statusText)||Bg[t]||"",n=new Headers(e==null?void 0:e.headers);return{...e,headers:n,status:t,statusText:r}}function Hg(e,t){if(t.type&&Object.defineProperty(e,"type",{value:t.type,enumerable:!0,writable:!1}),typeof document<"u"){const r=qg.prototype.getSetCookie.call(t.headers);for(const n of r)document.cookie=n}return e}class re extends Response{constructor(t,r){const n=Wr(r);super(t,n),Hg(this,n)}static text(t,r){const n=Wr(r);return n.headers.has("Content-Type")||n.headers.set("Content-Type","text/plain"),n.headers.has("Content-Length")||n.headers.set("Content-Length",t?new Blob([t]).size.toString():"0"),new re(t,n)}static json(t,r){const n=Wr(r);n.headers.has("Content-Type")||n.headers.set("Content-Type","application/json");const a=JSON.stringify(t);return n.headers.has("Content-Length")||n.headers.set("Content-Length",a?new Blob([a]).size.toString():"0"),new re(a,n)}static xml(t,r){const n=Wr(r);return n.headers.has("Content-Type")||n.headers.set("Content-Type","text/xml"),new re(t,n)}static arrayBuffer(t,r){const n=Wr(r);return t&&n.headers.set("Content-Length",t.byteLength.toString()),new re(t,n)}static formData(t,r){return new re(t,Wr(r))}}Ay();var en={},_i={},Ot={};(function(e){e.__esModule=!0,e.RelationKind=e.InternalEntityProperty=void 0,function(t){t.type="__type",t.nodeId="__nodeId",t.primaryKey="__primaryKey"}(e.InternalEntityProperty||(e.InternalEntityProperty={})),function(t){t.OneOf="oneOf",t.ManyOf="manyOf"}(e.RelationKind||(e.RelationKind={}))})(Ot);var la={};la.__esModule=!0;la.first=void 0;function Yg(e){return e!=null&&e.length>0?e[0]:null}la.first=Yg;var fa={},is={exports:{}},Mo,Rc;function Wg(){if(Rc)return Mo;Rc=1;var e=1e3,t=e*60,r=t*60,n=r*24,a=n*7,i=n*365.25;Mo=function(l,f){f=f||{};var d=typeof l;if(d==="string"&&l.length>0)return o(l);if(d==="number"&&isFinite(l))return f.long?u(l):s(l);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(l))};function o(l){if(l=String(l),!(l.length>100)){var f=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(f){var d=parseFloat(f[1]),p=(f[2]||"ms").toLowerCase();switch(p){case"years":case"year":case"yrs":case"yr":case"y":return d*i;case"weeks":case"week":case"w":return d*a;case"days":case"day":case"d":return d*n;case"hours":case"hour":case"hrs":case"hr":case"h":return d*r;case"minutes":case"minute":case"mins":case"min":case"m":return d*t;case"seconds":case"second":case"secs":case"sec":case"s":return d*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return d;default:return}}}}function s(l){var f=Math.abs(l);return f>=n?Math.round(l/n)+"d":f>=r?Math.round(l/r)+"h":f>=t?Math.round(l/t)+"m":f>=e?Math.round(l/e)+"s":l+"ms"}function u(l){var f=Math.abs(l);return f>=n?c(l,f,n,"day"):f>=r?c(l,f,r,"hour"):f>=t?c(l,f,t,"minute"):f>=e?c(l,f,e,"second"):l+" ms"}function c(l,f,d,p){var v=f>=d*1.5;return Math.round(l/d)+" "+p+(v?"s":"")}return Mo}function Gg(e){r.debug=r,r.default=r,r.coerce=u,r.disable=i,r.enable=a,r.enabled=o,r.humanize=Wg(),r.destroy=c,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let f=0;for(let d=0;d{if(D==="%%")return"%";O++;const L=r.formatters[A];if(typeof L=="function"){const B=m[O];D=L.call(w,B),m.splice(O,1),O--}return D}),r.formatArgs.call(w,m),(w.log||r.log).apply(w,m)}return h.namespace=l,h.useColors=r.useColors(),h.color=r.selectColor(l),h.extend=n,h.destroy=r.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(p!==r.namespaces&&(p=r.namespaces,v=r.enabled(l)),v),set:m=>{d=m}}),typeof r.init=="function"&&r.init(h),h}function n(l,f){const d=r(this.namespace+(typeof f>"u"?":":f)+l);return d.log=this.log,d}function a(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let f;const d=(typeof l=="string"?l:"").split(/[\s,]+/),p=d.length;for(f=0;f"-"+f)].join(",");return r.enable(""),l}function o(l){if(l[l.length-1]==="*")return!0;let f,d;for(f=0,d=r.skips.length;f{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function a(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;c.splice(1,0,l,"color: inherit");let f=0,d=0;c[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(f++,p==="%c"&&(d=f))}),c.splice(d,0,l)}t.log=console.debug||console.log||(()=>{});function i(c){try{c?t.storage.setItem("debug",c):t.storage.removeItem("debug")}catch{}}function o(){let c;try{c=t.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=r.DEBUG),c}function s(){try{return localStorage}catch{}}e.exports=Qg(t);const{formatters:u}=e.exports;u.j=function(c){try{return JSON.stringify(c)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(is,is.exports);var da=is.exports,Ni={},Si={},pa={};pa.__esModule=!0;pa.booleanComparators=void 0;pa.booleanComparators={equals:function(e,t){return t===e},notEquals:function(e,t){return e!==t}};var ki={};function it(e){"@babel/helpers - typeof";return it=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},it(e)}function M(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function y(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function T(e){y(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||it(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Qt(e,t){y(2,arguments);var r=T(e),n=M(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function va(e,t){y(2,arguments);var r=T(e),n=M(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var a=r.getDate(),i=new Date(r.getTime());i.setMonth(r.getMonth()+n+1,0);var o=i.getDate();return a>=o?i:(r.setFullYear(i.getFullYear(),i.getMonth(),a),r)}function Xr(e,t){if(y(2,arguments),!t||it(t)!=="object")return new Date(NaN);var r=t.years?M(t.years):0,n=t.months?M(t.months):0,a=t.weeks?M(t.weeks):0,i=t.days?M(t.days):0,o=t.hours?M(t.hours):0,s=t.minutes?M(t.minutes):0,u=t.seconds?M(t.seconds):0,c=T(e),l=n||r?va(c,n+r*12):c,f=i||a?Qt(l,i+a*7):l,d=s+o*60,p=u+d*60,v=p*1e3,h=new Date(f.getTime()+v);return h}function an(e){y(1,arguments);var t=T(e),r=t.getDay();return r===0||r===6}function $s(e){return y(1,arguments),T(e).getDay()===0}function Uf(e){return y(1,arguments),T(e).getDay()===6}function $f(e,t){y(2,arguments);var r=T(e),n=an(r),a=M(t);if(isNaN(a))return new Date(NaN);var i=r.getHours(),o=a<0?-1:1,s=M(a/5);r.setDate(r.getDate()+s*7);for(var u=Math.abs(a%5);u>0;)r.setDate(r.getDate()+o),an(r)||(u-=1);return n&&an(r)&&a!==0&&(Uf(r)&&r.setDate(r.getDate()+(o<0?2:-1)),$s(r)&&r.setDate(r.getDate()+(o<0?1:-2))),r.setHours(i),r}function ha(e,t){y(2,arguments);var r=T(e).getTime(),n=M(t);return new Date(r+n)}var Kg=36e5;function Vs(e,t){y(2,arguments);var r=M(t);return ha(e,r*Kg)}var Vf={};function ze(){return Vf}function Jg(e){Vf=e}function Tt(e,t){var r,n,a,i,o,s,u,c;y(1,arguments);var l=ze(),f=M((r=(n=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:l.weekStartsOn)!==null&&n!==void 0?n:(u=l.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=T(e),p=d.getDay(),v=(p=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function hr(e){y(1,arguments);var t=Ar(e),r=new Date(0);r.setFullYear(t,0,4),r.setHours(0,0,0,0);var n=tr(r);return n}function ot(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function dn(e){y(1,arguments);var t=T(e);return t.setHours(0,0,0,0),t}var zg=864e5;function Wt(e,t){y(2,arguments);var r=dn(e),n=dn(t),a=r.getTime()-ot(r),i=n.getTime()-ot(n);return Math.round((a-i)/zg)}function qf(e,t){y(2,arguments);var r=T(e),n=M(t),a=Wt(r,hr(r)),i=new Date(0);return i.setFullYear(n,0,4),i.setHours(0,0,0,0),r=hr(i),r.setDate(r.getDate()+a),r}function Bf(e,t){y(2,arguments);var r=M(t);return qf(e,Ar(e)+r)}var Xg=6e4;function qs(e,t){y(2,arguments);var r=M(t);return ha(e,r*Xg)}function Bs(e,t){y(2,arguments);var r=M(t),n=r*3;return va(e,n)}function Hf(e,t){y(2,arguments);var r=M(t);return ha(e,r*1e3)}function Ri(e,t){y(2,arguments);var r=M(t),n=r*7;return Qt(e,n)}function Yf(e,t){y(2,arguments);var r=M(t);return va(e,r*12)}function Zg(e,t,r){y(2,arguments);var n=T(e==null?void 0:e.start).getTime(),a=T(e==null?void 0:e.end).getTime(),i=T(t==null?void 0:t.start).getTime(),o=T(t==null?void 0:t.end).getTime();if(!(n<=a&&i<=o))throw new RangeError("Invalid interval");return r!=null&&r.inclusive?n<=o&&i<=a:na||isNaN(a.getDate()))&&(r=a)}),r||new Date(NaN)}function e0(e,t){var r=t.start,n=t.end;return y(2,arguments),Gf([Wf([e,r]),n])}function t0(e,t){y(2,arguments);var r=T(e);if(isNaN(Number(r)))return NaN;var n=r.getTime(),a;t==null?a=[]:typeof t.forEach=="function"?a=t:a=Array.prototype.slice.call(t);var i,o;return a.forEach(function(s,u){var c=T(s);if(isNaN(Number(c))){i=NaN,o=NaN;return}var l=Math.abs(n-c.getTime());(i==null||l0?1:a}function n0(e,t){y(2,arguments);var r=T(e),n=T(t),a=r.getTime()-n.getTime();return a>0?-1:a<0?1:a}var Hs=7,Qf=365.2425,Kf=Math.pow(10,8)*24*60*60*1e3,Ur=6e4,$r=36e5,Ai=1e3,a0=-Kf,Ys=60,Ws=3,Gs=12,Qs=4,ma=3600,Ci=60,Li=ma*24,Jf=Li*7,Ks=Li*Qf,Js=Ks/12,zf=Js*3;function i0(e){y(1,arguments);var t=e/Hs;return Math.floor(t)}function ya(e,t){y(2,arguments);var r=dn(e),n=dn(t);return r.getTime()===n.getTime()}function Xf(e){return y(1,arguments),e instanceof Date||it(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function rr(e){if(y(1,arguments),!Xf(e)&&typeof e!="number")return!1;var t=T(e);return!isNaN(Number(t))}function o0(e,t){y(2,arguments);var r=T(e),n=T(t);if(!rr(r)||!rr(n))return NaN;var a=Wt(r,n),i=a<0?-1:1,o=M(a/7),s=o*5;for(n=Qt(n,o*7);!ya(r,n);)s+=an(n)?0:i,n=Qt(n,i);return s===0?0:s}function Zf(e,t){return y(2,arguments),Ar(e)-Ar(t)}var s0=6048e5;function u0(e,t){y(2,arguments);var r=tr(e),n=tr(t),a=r.getTime()-ot(r),i=n.getTime()-ot(n);return Math.round((a-i)/s0)}function ai(e,t){y(2,arguments);var r=T(e),n=T(t),a=r.getFullYear()-n.getFullYear(),i=r.getMonth()-n.getMonth();return a*12+i}function os(e){y(1,arguments);var t=T(e),r=Math.floor(t.getMonth()/3)+1;return r}function $a(e,t){y(2,arguments);var r=T(e),n=T(t),a=r.getFullYear()-n.getFullYear(),i=os(r)-os(n);return a*4+i}var c0=6048e5;function ii(e,t,r){y(2,arguments);var n=Tt(e,r),a=Tt(t,r),i=n.getTime()-ot(n),o=a.getTime()-ot(a);return Math.round((i-o)/c0)}function Gn(e,t){y(2,arguments);var r=T(e),n=T(t);return r.getFullYear()-n.getFullYear()}function Ac(e,t){var r=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return r<0?-1:r>0?1:r}function zs(e,t){y(2,arguments);var r=T(e),n=T(t),a=Ac(r,n),i=Math.abs(Wt(r,n));r.setDate(r.getDate()-a*i);var o=+(Ac(r,n)===-a),s=a*(i-o);return s===0?0:s}function Mi(e,t){return y(2,arguments),T(e).getTime()-T(t).getTime()}var Cc={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},l0="trunc";function wn(e){return e?Cc[e]:Cc[l0]}function oi(e,t,r){y(2,arguments);var n=Mi(e,t)/$r;return wn(r==null?void 0:r.roundingMethod)(n)}function ed(e,t){y(2,arguments);var r=M(t);return Bf(e,-r)}function f0(e,t){y(2,arguments);var r=T(e),n=T(t),a=kt(r,n),i=Math.abs(Zf(r,n));r=ed(r,a*i);var o=+(kt(r,n)===-a),s=a*(i-o);return s===0?0:s}function si(e,t,r){y(2,arguments);var n=Mi(e,t)/Ur;return wn(r==null?void 0:r.roundingMethod)(n)}function Xs(e){y(1,arguments);var t=T(e);return t.setHours(23,59,59,999),t}function Zs(e){y(1,arguments);var t=T(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function td(e){y(1,arguments);var t=T(e);return Xs(t).getTime()===Zs(t).getTime()}function xi(e,t){y(2,arguments);var r=T(e),n=T(t),a=kt(r,n),i=Math.abs(ai(r,n)),o;if(i<1)o=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-a*i);var s=kt(r,n)===-a;td(T(e))&&i===1&&kt(e,n)===1&&(s=!1),o=a*(i-Number(s))}return o===0?0:o}function d0(e,t,r){y(2,arguments);var n=xi(e,t)/3;return wn(r==null?void 0:r.roundingMethod)(n)}function on(e,t,r){y(2,arguments);var n=Mi(e,t)/1e3;return wn(r==null?void 0:r.roundingMethod)(n)}function p0(e,t,r){y(2,arguments);var n=zs(e,t)/7;return wn(r==null?void 0:r.roundingMethod)(n)}function rd(e,t){y(2,arguments);var r=T(e),n=T(t),a=kt(r,n),i=Math.abs(Gn(r,n));r.setFullYear(1584),n.setFullYear(1584);var o=kt(r,n)===-a,s=a*(i-Number(o));return s===0?0:s}function nd(e,t){var r;y(1,arguments);var n=e||{},a=T(n.start),i=T(n.end),o=i.getTime();if(!(a.getTime()<=o))throw new RangeError("Invalid interval");var s=[],u=a;u.setHours(0,0,0,0);var c=Number((r=t==null?void 0:t.step)!==null&&r!==void 0?r:1);if(c<1||isNaN(c))throw new RangeError("`options.step` must be a number greater than 1");for(;u.getTime()<=o;)s.push(T(u)),u.setDate(u.getDate()+c),u.setHours(0,0,0,0);return s}function v0(e,t){var r;y(1,arguments);var n=e||{},a=T(n.start),i=T(n.end),o=a.getTime(),s=i.getTime();if(!(o<=s))throw new RangeError("Invalid interval");var u=[],c=a;c.setMinutes(0,0,0);var l=Number((r=t==null?void 0:t.step)!==null&&r!==void 0?r:1);if(l<1||isNaN(l))throw new RangeError("`options.step` must be a number greater than 1");for(;c.getTime()<=s;)u.push(T(c)),c=Vs(c,l);return u}function ui(e){y(1,arguments);var t=T(e);return t.setSeconds(0,0),t}function h0(e,t){var r;y(1,arguments);var n=ui(T(e.start)),a=T(e.end),i=n.getTime(),o=a.getTime();if(i>=o)throw new RangeError("Invalid interval");var s=[],u=n,c=Number((r=t==null?void 0:t.step)!==null&&r!==void 0?r:1);if(c<1||isNaN(c))throw new RangeError("`options.step` must be a number equal to or greater than 1");for(;u.getTime()<=o;)s.push(T(u)),u=qs(u,c);return s}function m0(e){y(1,arguments);var t=e||{},r=T(t.start),n=T(t.end),a=n.getTime(),i=[];if(!(r.getTime()<=a))throw new RangeError("Invalid interval");var o=r;for(o.setHours(0,0,0,0),o.setDate(1);o.getTime()<=a;)i.push(T(o)),o.setMonth(o.getMonth()+1);return i}function zn(e){y(1,arguments);var t=T(e),r=t.getMonth(),n=r-r%3;return t.setMonth(n,1),t.setHours(0,0,0,0),t}function y0(e){y(1,arguments);var t=e||{},r=T(t.start),n=T(t.end),a=n.getTime();if(!(r.getTime()<=a))throw new RangeError("Invalid interval");var i=zn(r),o=zn(n);a=o.getTime();for(var s=[],u=i;u.getTime()<=a;)s.push(T(u)),u=Bs(u,1);return s}function g0(e,t){y(1,arguments);var r=e||{},n=T(r.start),a=T(r.end),i=a.getTime();if(!(n.getTime()<=i))throw new RangeError("Invalid interval");var o=Tt(n,t),s=Tt(a,t);o.setHours(15),s.setHours(15),i=s.getTime();for(var u=[],c=o;c.getTime()<=i;)c.setHours(0),u.push(T(c)),c=Ri(c,1),c.setHours(15);return u}function eu(e){y(1,arguments);for(var t=nd(e),r=[],n=0;n=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=T(e),p=d.getDay(),v=(p=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function M0(e){y(1,arguments);var t=od(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=vn(r);return n}var x0=6048e5;function sd(e){y(1,arguments);var t=T(e),r=vn(t).getTime()-M0(t).getTime();return Math.round(r/x0)+1}function Cr(e,t){var r,n,a,i,o,s,u,c;y(1,arguments);var l=ze(),f=M((r=(n=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:l.weekStartsOn)!==null&&n!==void 0?n:(u=l.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=T(e),p=d.getUTCDay(),v=(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(f+1,0,p),v.setUTCHours(0,0,0,0);var h=Cr(v,t),m=new Date(0);m.setUTCFullYear(f,0,p),m.setUTCHours(0,0,0,0);var w=Cr(m,t);return l.getTime()>=h.getTime()?f+1:l.getTime()>=w.getTime()?f:f-1}function P0(e,t){var r,n,a,i,o,s,u,c;y(1,arguments);var l=ze(),f=M((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:l.firstWeekContainsDate)!==null&&n!==void 0?n:(u=l.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=ru(e,t),p=new Date(0);p.setUTCFullYear(d,0,f),p.setUTCHours(0,0,0,0);var v=Cr(p,t);return v}var F0=6048e5;function ud(e,t){y(1,arguments);var r=T(e),n=Cr(r,t).getTime()-P0(r,t).getTime();return Math.round(n/F0)+1}function Q(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length0?n:1-n;return Q(r==="yy"?a%100:a,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):Q(n+1,2)},d:function(t,r){return Q(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return Q(t.getUTCHours()%12||12,r.length)},H:function(t,r){return Q(t.getUTCHours(),r.length)},m:function(t,r){return Q(t.getUTCMinutes(),r.length)},s:function(t,r){return Q(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,a=t.getUTCMilliseconds(),i=Math.floor(a*Math.pow(10,n-3));return Q(i,r.length)}},Gr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},j0={G:function(t,r,n){var a=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var a=t.getUTCFullYear(),i=a>0?a:1-a;return n.ordinalNumber(i,{unit:"year"})}return zt.y(t,r)},Y:function(t,r,n,a){var i=ru(t,a),o=i>0?i:1-i;if(r==="YY"){var s=o%100;return Q(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):Q(o,r.length)},R:function(t,r){var n=od(t);return Q(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return Q(n,r.length)},Q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(a);case"QQ":return Q(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(a);case"qq":return Q(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,r,n){var a=t.getUTCMonth();switch(r){case"M":case"MM":return zt.M(t,r);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(t,r,n){var a=t.getUTCMonth();switch(r){case"L":return String(a+1);case"LL":return Q(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(t,r,n,a){var i=ud(t,a);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):Q(i,r.length)},I:function(t,r,n){var a=sd(t);return r==="Io"?n.ordinalNumber(a,{unit:"week"}):Q(a,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):zt.d(t,r)},D:function(t,r,n){var a=L0(t);return r==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):Q(a,r.length)},E:function(t,r,n){var a=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return Q(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return Q(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,r,n){var a=t.getUTCDay(),i=a===0?7:a;switch(r){case"i":return String(i);case"ii":return Q(i,r.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(t,r,n){var a=t.getUTCHours(),i=a/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,r,n){var a=t.getUTCHours(),i;switch(a===12?i=Gr.noon:a===0?i=Gr.midnight:i=a/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,r,n){var a=t.getUTCHours(),i;switch(a>=17?i=Gr.evening:a>=12?i=Gr.afternoon:a>=4?i=Gr.morning:i=Gr.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var a=t.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return zt.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):zt.H(t,r)},K:function(t,r,n){var a=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(a,{unit:"hour"}):Q(a,r.length)},k:function(t,r,n){var a=t.getUTCHours();return a===0&&(a=24),r==="ko"?n.ordinalNumber(a,{unit:"hour"}):Q(a,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):zt.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):zt.s(t,r)},S:function(t,r){return zt.S(t,r)},X:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return Mc(o);case"XXXX":case"XX":return Dr(o);case"XXXXX":case"XXX":default:return Dr(o,":")}},x:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"x":return Mc(o);case"xxxx":case"xx":return Dr(o);case"xxxxx":case"xxx":default:return Dr(o,":")}},O:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Lc(o,":");case"OOOO":default:return"GMT"+Dr(o,":")}},z:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Lc(o,":");case"zzzz":default:return"GMT"+Dr(o,":")}},t:function(t,r,n,a){var i=a._originalDate||t,o=Math.floor(i.getTime()/1e3);return Q(o,r.length)},T:function(t,r,n,a){var i=a._originalDate||t,o=i.getTime();return Q(o,r.length)}};function Lc(e,t){var r=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),i=n%60;if(i===0)return r+String(a);var o=t;return r+String(a)+o+Q(i,2)}function Mc(e,t){if(e%60===0){var r=e>0?"-":"+";return r+Q(Math.abs(e)/60,2)}return Dr(e,t)}function Dr(e,t){var r=t||"",n=e>0?"-":"+",a=Math.abs(e),i=Q(Math.floor(a/60),2),o=Q(a%60,2);return n+i+r+o}var xc=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},cd=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},U0=function(t,r){var n=t.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return xc(t,r);var o;switch(a){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",xc(a,r)).replace("{{time}}",cd(i,r))},ss={p:cd,P:U0},$0=["D","DD"],V0=["YY","YYYY"];function ld(e){return $0.indexOf(e)!==-1}function fd(e){return V0.indexOf(e)!==-1}function ci(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var q0={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},B0=function(t,r,n){var a,i=q0[t];return typeof i=="string"?a=i:r===1?a=i.one:a=i.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function xo(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var H0={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Y0={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},W0={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},G0={date:xo({formats:H0,defaultWidth:"full"}),time:xo({formats:Y0,defaultWidth:"full"}),dateTime:xo({formats:W0,defaultWidth:"full"})},Q0={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},K0=function(t,r,n,a){return Q0[t]};function xn(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):i;a=e.formattingValues[o]||e.formattingValues[i]}else{var s=e.defaultWidth,u=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[u]||e.values[s]}var c=e.argumentCallback?e.argumentCallback(t):t;return a[c]}}var J0={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},z0={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},X0={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Z0={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eE={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},tE={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},rE=function(t,r){var n=Number(t),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},nE={ordinalNumber:rE,era:xn({values:J0,defaultWidth:"wide"}),quarter:xn({values:z0,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:xn({values:X0,defaultWidth:"wide"}),day:xn({values:Z0,defaultWidth:"wide"}),dayPeriod:xn({values:eE,defaultWidth:"wide",formattingValues:tE,defaultFormattingWidth:"wide"})};function Pn(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;var o=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(s)?iE(s,function(f){return f.test(o)}):aE(s,function(f){return f.test(o)}),c;c=e.valueCallback?e.valueCallback(u):u,c=r.valueCallback?r.valueCallback(c):c;var l=t.slice(o.length);return{value:c,rest:l}}}function aE(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function iE(e,t){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var a=n[0],i=t.match(e.parsePattern);if(!i)return null;var o=e.valueCallback?e.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(a.length);return{value:o,rest:s}}}var sE=/^(\d+)(th|st|nd|rd)?/i,uE=/\d+/i,cE={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},lE={any:[/^b/i,/^(a|c)/i]},fE={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},dE={any:[/1/i,/2/i,/3/i,/4/i]},pE={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},vE={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},hE={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},mE={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},yE={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},gE={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},EE={ordinalNumber:oE({matchPattern:sE,parsePattern:uE,valueCallback:function(t){return parseInt(t,10)}}),era:Pn({matchPatterns:cE,defaultMatchWidth:"wide",parsePatterns:lE,defaultParseWidth:"any"}),quarter:Pn({matchPatterns:fE,defaultMatchWidth:"wide",parsePatterns:dE,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Pn({matchPatterns:pE,defaultMatchWidth:"wide",parsePatterns:vE,defaultParseWidth:"any"}),day:Pn({matchPatterns:hE,defaultMatchWidth:"wide",parsePatterns:mE,defaultParseWidth:"any"}),dayPeriod:Pn({matchPatterns:yE,defaultMatchWidth:"any",parsePatterns:gE,defaultParseWidth:"any"})},Tn={code:"en-US",formatDistance:B0,formatLong:G0,formatRelative:K0,localize:nE,match:EE,options:{weekStartsOn:0,firstWeekContainsDate:1}},wE=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,TE=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,bE=/^'([^]*?)'?$/,OE=/''/g,IE=/[a-zA-Z]/;function dd(e,t,r){var n,a,i,o,s,u,c,l,f,d,p,v,h,m,w,g,b,O;y(2,arguments);var I=String(t),D=ze(),A=(n=(a=r==null?void 0:r.locale)!==null&&a!==void 0?a:D.locale)!==null&&n!==void 0?n:Tn,L=M((i=(o=(s=(u=r==null?void 0:r.firstWeekContainsDate)!==null&&u!==void 0?u:r==null||(c=r.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&s!==void 0?s:D.firstWeekContainsDate)!==null&&o!==void 0?o:(f=D.locale)===null||f===void 0||(d=f.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(L>=1&&L<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var B=M((p=(v=(h=(m=r==null?void 0:r.weekStartsOn)!==null&&m!==void 0?m:r==null||(w=r.locale)===null||w===void 0||(g=w.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&h!==void 0?h:D.weekStartsOn)!==null&&v!==void 0?v:(b=D.locale)===null||b===void 0||(O=b.options)===null||O===void 0?void 0:O.weekStartsOn)!==null&&p!==void 0?p:0);if(!(B>=0&&B<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!A.localize)throw new RangeError("locale must contain localize property");if(!A.formatLong)throw new RangeError("locale must contain formatLong property");var z=T(e);if(!rr(z))throw new RangeError("Invalid time value");var V=ot(z),_=pn(z,V),G={firstWeekContainsDate:L,weekStartsOn:B,locale:A,_originalDate:z},ce=I.match(TE).map(function(ue){var he=ue[0];if(he==="p"||he==="P"){var et=ss[he];return et(ue,A.formatLong)}return ue}).join("").match(wE).map(function(ue){if(ue==="''")return"'";var he=ue[0];if(he==="'")return DE(ue);var et=j0[he];if(et)return!(r!=null&&r.useAdditionalWeekYearTokens)&&fd(ue)&&ci(ue,t,String(e)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&ld(ue)&&ci(ue,t,String(e)),et(_,ue,A.localize,G);if(he.match(IE))throw new RangeError("Format string contains an unescaped latin alphabet character `"+he+"`");return ue}).join("");return ce}function DE(e){var t=e.match(bE);return t?t[1].replace(OE,"'"):e}function ga(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function pd(e){return ga({},e)}var Pc=1440,_E=2520,Po=43200,NE=86400;function vd(e,t,r){var n,a;y(2,arguments);var i=ze(),o=(n=(a=r==null?void 0:r.locale)!==null&&a!==void 0?a:i.locale)!==null&&n!==void 0?n:Tn;if(!o.formatDistance)throw new RangeError("locale must contain formatDistance property");var s=kt(e,t);if(isNaN(s))throw new RangeError("Invalid time value");var u=ga(pd(r),{addSuffix:!!(r!=null&&r.addSuffix),comparison:s}),c,l;s>0?(c=T(t),l=T(e)):(c=T(e),l=T(t));var f=on(l,c),d=(ot(l)-ot(c))/1e3,p=Math.round((f-d)/60),v;if(p<2)return r!=null&&r.includeSeconds?f<5?o.formatDistance("lessThanXSeconds",5,u):f<10?o.formatDistance("lessThanXSeconds",10,u):f<20?o.formatDistance("lessThanXSeconds",20,u):f<40?o.formatDistance("halfAMinute",0,u):f<60?o.formatDistance("lessThanXMinutes",1,u):o.formatDistance("xMinutes",1,u):p===0?o.formatDistance("lessThanXMinutes",1,u):o.formatDistance("xMinutes",p,u);if(p<45)return o.formatDistance("xMinutes",p,u);if(p<90)return o.formatDistance("aboutXHours",1,u);if(p0?(l=T(t),f=T(e)):(l=T(e),f=T(t));var d=String((i=r==null?void 0:r.roundingMethod)!==null&&i!==void 0?i:"round"),p;if(d==="floor")p=Math.floor;else if(d==="ceil")p=Math.ceil;else if(d==="round")p=Math.round;else throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");var v=f.getTime()-l.getTime(),h=v/Fc,m=ot(f)-ot(l),w=(v-m)/Fc,g=r==null?void 0:r.unit,b;if(g?b=String(g):h<1?b="second":h<60?b="minute":h=0&&a<=3))throw new RangeError("fractionDigits must be between 0 and 3 inclusively");var i=Q(n.getDate(),2),o=Q(n.getMonth()+1,2),s=n.getFullYear(),u=Q(n.getHours(),2),c=Q(n.getMinutes(),2),l=Q(n.getSeconds(),2),f="";if(a>0){var d=n.getMilliseconds(),p=Math.floor(d*Math.pow(10,a-3));f="."+Q(p,a)}var v="",h=n.getTimezoneOffset();if(h!==0){var m=Math.abs(h),w=Q(M(m/60),2),g=Q(m%60,2),b=h<0?"+":"-";v="".concat(b).concat(w,":").concat(g)}else v="Z";return"".concat(s,"-").concat(o,"-").concat(i,"T").concat(u,":").concat(c,":").concat(l).concat(f).concat(v)}var PE=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],FE=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function jE(e){if(arguments.length<1)throw new TypeError("1 arguments required, but only ".concat(arguments.length," present"));var t=T(e);if(!rr(t))throw new RangeError("Invalid time value");var r=PE[t.getUTCDay()],n=Q(t.getUTCDate(),2),a=FE[t.getUTCMonth()],i=t.getUTCFullYear(),o=Q(t.getUTCHours(),2),s=Q(t.getUTCMinutes(),2),u=Q(t.getUTCSeconds(),2);return"".concat(r,", ").concat(n," ").concat(a," ").concat(i," ").concat(o,":").concat(s,":").concat(u," GMT")}function UE(e,t,r){var n,a,i,o,s,u,c,l,f,d;y(2,arguments);var p=T(e),v=T(t),h=ze(),m=(n=(a=r==null?void 0:r.locale)!==null&&a!==void 0?a:h.locale)!==null&&n!==void 0?n:Tn,w=M((i=(o=(s=(u=r==null?void 0:r.weekStartsOn)!==null&&u!==void 0?u:r==null||(c=r.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&s!==void 0?s:h.weekStartsOn)!==null&&o!==void 0?o:(f=h.locale)===null||f===void 0||(d=f.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&i!==void 0?i:0);if(!m.localize)throw new RangeError("locale must contain localize property");if(!m.formatLong)throw new RangeError("locale must contain formatLong property");if(!m.formatRelative)throw new RangeError("locale must contain formatRelative property");var g=Wt(p,v);if(isNaN(g))throw new RangeError("Invalid time value");var b;g<-6?b="other":g<-1?b="lastWeek":g<0?b="yesterday":g<1?b="today":g<2?b="tomorrow":g<7?b="nextWeek":b="other";var O=pn(p,ot(p)),I=pn(v,ot(v)),D=m.formatRelative(b,O,I,{locale:m,weekStartsOn:w});return dd(p,D,{locale:m,weekStartsOn:w})}function $E(e){y(1,arguments);var t=M(e);return T(t*1e3)}function md(e){y(1,arguments);var t=T(e),r=t.getDate();return r}function Fi(e){y(1,arguments);var t=T(e),r=t.getDay();return r}function VE(e){y(1,arguments);var t=T(e),r=Wt(t,tu(t)),n=r+1;return n}function yd(e){y(1,arguments);var t=T(e),r=t.getFullYear(),n=t.getMonth(),a=new Date(0);return a.setFullYear(r,n+1,0),a.setHours(0,0,0,0),a.getDate()}function gd(e){y(1,arguments);var t=T(e),r=t.getFullYear();return r%400===0||r%4===0&&r%100!==0}function qE(e){y(1,arguments);var t=T(e);return String(new Date(t))==="Invalid Date"?NaN:gd(t)?366:365}function BE(e){y(1,arguments);var t=T(e),r=t.getFullYear(),n=Math.floor(r/10)*10;return n}function HE(){return ga({},ze())}function YE(e){y(1,arguments);var t=T(e),r=t.getHours();return r}function Ed(e){y(1,arguments);var t=T(e),r=t.getDay();return r===0&&(r=7),r}var WE=6048e5;function wd(e){y(1,arguments);var t=T(e),r=tr(t).getTime()-hr(t).getTime();return Math.round(r/WE)+1}var GE=6048e5;function QE(e){y(1,arguments);var t=hr(e),r=hr(Ri(t,60)),n=r.valueOf()-t.valueOf();return Math.round(n/GE)}function KE(e){y(1,arguments);var t=T(e),r=t.getMilliseconds();return r}function JE(e){y(1,arguments);var t=T(e),r=t.getMinutes();return r}function zE(e){y(1,arguments);var t=T(e),r=t.getMonth();return r}var XE=24*60*60*1e3;function ZE(e,t){y(2,arguments);var r=e||{},n=t||{},a=T(r.start).getTime(),i=T(r.end).getTime(),o=T(n.start).getTime(),s=T(n.end).getTime();if(!(a<=i&&o<=s))throw new RangeError("Invalid interval");var u=ai?i:s,f=l-c;return Math.ceil(f/XE)}function ew(e){y(1,arguments);var t=T(e),r=t.getSeconds();return r}function Td(e){y(1,arguments);var t=T(e),r=t.getTime();return r}function tw(e){return y(1,arguments),Math.floor(Td(e)/1e3)}function bd(e,t){var r,n,a,i,o,s,u,c;y(1,arguments);var l=T(e),f=l.getFullYear(),d=ze(),p=M((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:d.firstWeekContainsDate)!==null&&n!==void 0?n:(u=d.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setFullYear(f+1,0,p),v.setHours(0,0,0,0);var h=Tt(v,t),m=new Date(0);m.setFullYear(f,0,p),m.setHours(0,0,0,0);var w=Tt(m,t);return l.getTime()>=h.getTime()?f+1:l.getTime()>=w.getTime()?f:f-1}function fi(e,t){var r,n,a,i,o,s,u,c;y(1,arguments);var l=ze(),f=M((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:l.firstWeekContainsDate)!==null&&n!==void 0?n:(u=l.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=bd(e,t),p=new Date(0);p.setFullYear(d,0,f),p.setHours(0,0,0,0);var v=Tt(p,t);return v}var rw=6048e5;function Od(e,t){y(1,arguments);var r=T(e),n=Tt(r,t).getTime()-fi(r,t).getTime();return Math.round(n/rw)+1}function nw(e,t){var r,n,a,i,o,s,u,c;y(1,arguments);var l=ze(),f=M((r=(n=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:l.weekStartsOn)!==null&&n!==void 0?n:(u=l.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=md(e);if(isNaN(d))return NaN;var p=Fi(Pi(e)),v=f-p;v<=0&&(v+=7);var h=d-v;return Math.ceil(h/7)+1}function Id(e){y(1,arguments);var t=T(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function aw(e,t){return y(1,arguments),ii(Id(e),Pi(e),t)+1}function iw(e){return y(1,arguments),T(e).getFullYear()}function ow(e){return y(1,arguments),Math.floor(e*$r)}function sw(e){return y(1,arguments),Math.floor(e*Ys)}function uw(e){return y(1,arguments),Math.floor(e*ma)}function cw(e){y(1,arguments);var t=T(e.start),r=T(e.end);if(isNaN(t.getTime()))throw new RangeError("Start Date is invalid");if(isNaN(r.getTime()))throw new RangeError("End Date is invalid");var n={};n.years=Math.abs(rd(r,t));var a=kt(r,t),i=Xr(t,{years:a*n.years});n.months=Math.abs(xi(r,i));var o=Xr(i,{months:a*n.months});n.days=Math.abs(zs(r,o));var s=Xr(o,{days:a*n.days});n.hours=Math.abs(oi(r,s));var u=Xr(s,{hours:a*n.hours});n.minutes=Math.abs(si(r,u));var c=Xr(u,{minutes:a*n.minutes});return n.seconds=Math.abs(on(r,c)),n}function lw(e,t,r){var n;y(1,arguments);var a;return fw(t)?a=t:r=t,new Intl.DateTimeFormat((n=r)===null||n===void 0?void 0:n.locale,a).format(e)}function fw(e){return e!==void 0&&!("locale"in e)}function dw(e,t,r){y(2,arguments);var n=0,a,i=T(e),o=T(t);if(r!=null&&r.unit)a=r==null?void 0:r.unit,a==="second"?n=on(i,o):a==="minute"?n=si(i,o):a==="hour"?n=oi(i,o):a==="day"?n=Wt(i,o):a==="week"?n=ii(i,o):a==="month"?n=ai(i,o):a==="quarter"?n=$a(i,o):a==="year"&&(n=Gn(i,o));else{var s=on(i,o);Math.abs(s)n.getTime()}function vw(e,t){y(2,arguments);var r=T(e),n=T(t);return r.getTime()Date.now()}function $c(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,s;return{s:function(){r=r.call(e)},n:function(){var c=r.next();return i=c.done,c},e:function(c){o=!0,s=c},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(o)throw s}}}}function j(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function de(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wh(e,t)}function di(e){return di=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},di(e)}function Dd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Dd=function(){return!!e})()}function Tw(e,t){if(t&&(it(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return j(e)}function pe(e){var t=Dd();return function(){var n=di(e),a;if(t){var i=di(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return Tw(this,a)}}function oe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bw(e,t){if(it(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(it(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _d(e){var t=bw(e,"string");return it(t)=="symbol"?t:t+""}function Ow(e,t){for(var r=0;r0,n=r?t:1-t,a;if(n<=50)a=e||100;else{var i=n+50,o=Math.floor(i/100)*100,s=e>=i%100;a=e+o-(s?100:0)}return r?a:1-a}function Rd(e){return e%400===0||e%4===0&&e%100!==0}var Sw=function(e){de(r,e);var t=pe(r);function r(){var n;oe(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0}},{key:"set",value:function(a,i,o){var s=a.getUTCFullYear();if(o.isTwoDigitYear){var u=kd(o.year,s);return a.setUTCFullYear(u,0,1),a.setUTCHours(0,0,0,0),a}var c=!("era"in i)||i.era===1?o.year:1-o.year;return a.setUTCFullYear(c,0,1),a.setUTCHours(0,0,0,0),a}}]),r}(me),kw=function(e){de(r,e);var t=pe(r);function r(){var n;oe(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0}},{key:"set",value:function(a,i,o,s){var u=ru(a,s);if(o.isTwoDigitYear){var c=kd(o.year,u);return a.setUTCFullYear(c,0,s.firstWeekContainsDate),a.setUTCHours(0,0,0,0),Cr(a,s)}var l=!("era"in i)||i.era===1?o.year:1-o.year;return a.setUTCFullYear(l,0,s.firstWeekContainsDate),a.setUTCHours(0,0,0,0),Cr(a,s)}}]),r}(me),Rw=function(e){de(r,e);var t=pe(r);function r(){var n;oe(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=4}},{key:"set",value:function(a,i,o){return a.setUTCMonth((o-1)*3,1),a.setUTCHours(0,0,0,0),a}}]),r}(me),Lw=function(e){de(r,e);var t=pe(r);function r(){var n;oe(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=4}},{key:"set",value:function(a,i,o){return a.setUTCMonth((o-1)*3,1),a.setUTCHours(0,0,0,0),a}}]),r}(me),Mw=function(e){de(r,e);var t=pe(r);function r(){var n;oe(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=11}},{key:"set",value:function(a,i,o){return a.setUTCMonth(o,1),a.setUTCHours(0,0,0,0),a}}]),r}(me),xw=function(e){de(r,e);var t=pe(r);function r(){var n;oe(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=11}},{key:"set",value:function(a,i,o){return a.setUTCMonth(o,1),a.setUTCHours(0,0,0,0),a}}]),r}(me);function Pw(e,t,r){y(2,arguments);var n=T(e),a=M(t),i=ud(n,r)-a;return n.setUTCDate(n.getUTCDate()-i*7),n}var Fw=function(e){de(r,e);var t=pe(r);function r(){var n;oe(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=53}},{key:"set",value:function(a,i,o,s){return Cr(Pw(a,o,s),s)}}]),r}(me);function jw(e,t){y(2,arguments);var r=T(e),n=M(t),a=sd(r)-n;return r.setUTCDate(r.getUTCDate()-a*7),r}var Uw=function(e){de(r,e);var t=pe(r);function r(){var n;oe(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=53}},{key:"set",value:function(a,i,o){return vn(jw(a,o))}}]),r}(me),$w=[31,28,31,30,31,30,31,31,30,31,30,31],Vw=[31,29,31,30,31,30,31,31,30,31,30,31],qw=function(e){de(r,e);var t=pe(r);function r(){var n;oe(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=Vw[u]:i>=1&&i<=$w[u]}},{key:"set",value:function(a,i,o){return a.setUTCDate(o),a.setUTCHours(0,0,0,0),a}}]),r}(me),Bw=function(e){de(r,e);var t=pe(r);function r(){var n;oe(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=366:i>=1&&i<=365}},{key:"set",value:function(a,i,o){return a.setUTCMonth(0,o),a.setUTCHours(0,0,0,0),a}}]),r}(me);function au(e,t,r){var n,a,i,o,s,u,c,l;y(2,arguments);var f=ze(),d=M((n=(a=(i=(o=r==null?void 0:r.weekStartsOn)!==null&&o!==void 0?o:r==null||(s=r.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&a!==void 0?a:(c=f.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=T(e),v=M(t),h=p.getUTCDay(),m=v%7,w=(m+7)%7,g=(w=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=au(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(me),Yw=function(e){de(r,e);var t=pe(r);function r(){var n;oe(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=au(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(me),Ww=function(e){de(r,e);var t=pe(r);function r(){var n;oe(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=au(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(me);function Gw(e,t){y(2,arguments);var r=M(t);r%7===0&&(r=r-7);var n=1,a=T(e),i=a.getUTCDay(),o=r%7,s=(o+7)%7,u=(s=1&&i<=7}},{key:"set",value:function(a,i,o){return a=Gw(a,o),a.setUTCHours(0,0,0,0),a}}]),r}(me),Kw=function(e){de(r,e);var t=pe(r);function r(){var n;oe(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=12}},{key:"set",value:function(a,i,o){var s=a.getUTCHours()>=12;return s&&o<12?a.setUTCHours(o+12,0,0,0):!s&&o===12?a.setUTCHours(0,0,0,0):a.setUTCHours(o,0,0,0),a}}]),r}(me),Zw=function(e){de(r,e);var t=pe(r);function r(){var n;oe(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=23}},{key:"set",value:function(a,i,o){return a.setUTCHours(o,0,0,0),a}}]),r}(me),eT=function(e){de(r,e);var t=pe(r);function r(){var n;oe(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=11}},{key:"set",value:function(a,i,o){var s=a.getUTCHours()>=12;return s&&o<12?a.setUTCHours(o+12,0,0,0):a.setUTCHours(o,0,0,0),a}}]),r}(me),tT=function(e){de(r,e);var t=pe(r);function r(){var n;oe(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=24}},{key:"set",value:function(a,i,o){var s=o<=24?o%24:o;return a.setUTCHours(s,0,0,0),a}}]),r}(me),rT=function(e){de(r,e);var t=pe(r);function r(){var n;oe(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=59}},{key:"set",value:function(a,i,o){return a.setUTCMinutes(o,0,0),a}}]),r}(me),nT=function(e){de(r,e);var t=pe(r);function r(){var n;oe(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=59}},{key:"set",value:function(a,i,o){return a.setUTCSeconds(o,0),a}}]),r}(me),aT=function(e){de(r,e);var t=pe(r);function r(){var n;oe(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&z<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var V=M((v=(h=(m=(w=n==null?void 0:n.weekStartsOn)!==null&&w!==void 0?w:n==null||(g=n.locale)===null||g===void 0||(b=g.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&m!==void 0?m:L.weekStartsOn)!==null&&h!==void 0?h:(O=L.locale)===null||O===void 0||(I=O.options)===null||I===void 0?void 0:I.weekStartsOn)!==null&&v!==void 0?v:0);if(!(V>=0&&V<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(A==="")return D===""?T(r):new Date(NaN);var _={firstWeekContainsDate:z,weekStartsOn:V,locale:B},G=[new _w],ce=A.match(fT).map(function(le){var te=le[0];if(te in ss){var Ie=ss[te];return Ie(le,B.formatLong)}return le}).join("").match(lT),ue=[],he=Vc(ce),et;try{var gt=function(){var te=et.value;!(n!=null&&n.useAdditionalWeekYearTokens)&&fd(te)&&ci(te,A,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&ld(te)&&ci(te,A,e);var Ie=te[0],Ce=cT[Ie];if(Ce){var tt=Ce.incompatibleTokens;if(Array.isArray(tt)){var R=ue.find(function(x){return tt.includes(x.token)||x.token===Ie});if(R)throw new RangeError("The format string mustn't contain `".concat(R.fullToken,"` and `").concat(te,"` at the same time"))}else if(Ce.incompatibleTokens==="*"&&ue.length>0)throw new RangeError("The format string mustn't contain `".concat(te,"` and any other token at the same time"));ue.push({token:Ie,fullToken:te});var F=Ce.run(D,te,B.match,_);if(!F)return{v:new Date(NaN)};G.push(F.setter),D=F.rest}else{if(Ie.match(hT))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Ie+"`");if(te==="''"?te="'":Ie==="'"&&(te=mT(te)),D.indexOf(te)===0)D=D.slice(te.length);else return{v:new Date(NaN)}}};for(he.s();!(et=he.n()).done;){var sr=gt();if(it(sr)==="object")return sr.v}}catch(le){he.e(le)}finally{he.f()}if(D.length>0&&vT.test(D))return new Date(NaN);var H=G.map(function(le){return le.priority}).sort(function(le,te){return te-le}).filter(function(le,te,Ie){return Ie.indexOf(le)===te}).map(function(le){return G.filter(function(te){return te.priority===le}).sort(function(te,Ie){return Ie.subPriority-te.subPriority})}).map(function(le){return le[0]}),W=T(r);if(isNaN(W.getTime()))return new Date(NaN);var q=pn(W,ot(W)),ne={},ae=Vc(H),Ae;try{for(ae.s();!(Ae=ae.n()).done;){var Te=Ae.value;if(!Te.validate(q,_))return new Date(NaN);var Ye=Te.set(q,ne,_);Array.isArray(Ye)?(q=Ye[0],ga(ne,Ye[1])):q=Ye}}catch(le){ae.e(le)}finally{ae.f()}return q}function mT(e){return e.match(dT)[1].replace(pT,"'")}function yT(e,t,r){return y(2,arguments),rr(Ad(e,t,new Date,r))}function gT(e){return y(1,arguments),T(e).getDay()===1}function ET(e){return y(1,arguments),T(e).getTime()=n&&r<=a}function ji(e,t){y(2,arguments);var r=M(t);return Qt(e,-r)}function xT(e){return y(1,arguments),ya(e,ji(Date.now(),1))}function PT(e){y(1,arguments);var t=T(e),r=t.getFullYear(),n=9+Math.floor(r/10)*10;return t.setFullYear(n+1,0,0),t.setHours(0,0,0,0),t}function Ud(e,t){var r,n,a,i,o,s,u,c;y(1,arguments);var l=ze(),f=M((r=(n=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:l.weekStartsOn)!==null&&n!==void 0?n:(u=l.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6");var d=T(e),p=d.getDay(),v=(p2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],Sa.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Sa.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){var a=Sa.timezone.exec(n);a?(t.time=n.replace(a[1],""),t.timezone=a[1]):t.time=n}return t}function vb(e,t){var r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};var a=n[1]?parseInt(n[1]):null,i=n[2]?parseInt(n[2]):null;return{year:i===null?a:i*100,restDateString:e.slice((n[1]||n[2]).length)}}function hb(e,t){if(t===null)return new Date(NaN);var r=e.match(lb);if(!r)return new Date(NaN);var n=!!r[4],a=Fn(r[1]),i=Fn(r[2])-1,o=Fn(r[3]),s=Fn(r[4]),u=Fn(r[5])-1;if(n)return bb(t,s,u)?gb(t,s,u):new Date(NaN);var c=new Date(0);return!wb(t,i,o)||!Tb(t,a)?new Date(NaN):(c.setUTCFullYear(t,i,Math.max(a,o)),c)}function Fn(e){return e?parseInt(e):1}function mb(e){var t=e.match(fb);if(!t)return NaN;var r=Fo(t[1]),n=Fo(t[2]),a=Fo(t[3]);return Ob(r,n,a)?r*$r+n*Ur+a*1e3:NaN}function Fo(e){return e&&parseFloat(e.replace(",","."))||0}function yb(e){if(e==="Z")return 0;var t=e.match(db);if(!t)return 0;var r=t[1]==="+"?-1:1,n=parseInt(t[2]),a=t[3]&&parseInt(t[3])||0;return Ib(n,a)?r*(n*$r+a*Ur):NaN}function gb(e,t,r){var n=new Date(0);n.setUTCFullYear(e,0,4);var a=n.getUTCDay()||7,i=(t-1)*7+r+1-a;return n.setUTCDate(n.getUTCDate()+i),n}var Eb=[31,null,31,30,31,30,31,31,30,31,30,31];function $d(e){return e%400===0||e%4===0&&e%100!==0}function wb(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(Eb[t]||($d(e)?29:28))}function Tb(e,t){return t>=1&&t<=($d(e)?366:365)}function bb(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function Ob(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function Ib(e,t){return t>=0&&t<=59}function Db(e){if(y(1,arguments),typeof e=="string"){var t=e.match(/(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d{0,7}))?(?:Z|(.)(\d{2}):?(\d{2})?)?/);return t?new Date(Date.UTC(+t[1],+t[2]-1,+t[3],+t[4]-(+t[9]||0)*(t[8]=="-"?-1:1),+t[5]-(+t[10]||0)*(t[8]=="-"?-1:1),+t[6],+((t[7]||"0")+"00").substring(0,3))):new Date(NaN)}return T(e)}function gr(e,t){y(2,arguments);var r=Fi(e)-t;return r<=0&&(r+=7),ji(e,r)}function _b(e){return y(1,arguments),gr(e,5)}function Nb(e){return y(1,arguments),gr(e,1)}function Sb(e){return y(1,arguments),gr(e,6)}function kb(e){return y(1,arguments),gr(e,0)}function Rb(e){return y(1,arguments),gr(e,4)}function Ab(e){return y(1,arguments),gr(e,2)}function Cb(e){return y(1,arguments),gr(e,3)}function Lb(e){return y(1,arguments),Math.floor(e*Ws)}function Mb(e){y(1,arguments);var t=e/Qs;return Math.floor(t)}function xb(e,t){var r;if(arguments.length<1)throw new TypeError("1 argument required, but only none provided present");var n=M((r=t==null?void 0:t.nearestTo)!==null&&r!==void 0?r:1);if(n<1||n>30)throw new RangeError("`options.nearestTo` must be between 1 and 30");var a=T(e),i=a.getSeconds(),o=a.getMinutes()+i/60,s=wn(t==null?void 0:t.roundingMethod),u=s(o/n)*n,c=o%n,l=Math.round(c/n)*n;return new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),u+l)}function Pb(e){y(1,arguments);var t=e/ma;return Math.floor(t)}function Fb(e){return y(1,arguments),e*Ai}function jb(e){y(1,arguments);var t=e/Ci;return Math.floor(t)}function ou(e,t){y(2,arguments);var r=T(e),n=M(t),a=r.getFullYear(),i=r.getDate(),o=new Date(0);o.setFullYear(a,n,15),o.setHours(0,0,0,0);var s=yd(o);return r.setMonth(n,Math.min(i,s)),r}function Ub(e,t){if(y(2,arguments),it(t)!=="object"||t===null)throw new RangeError("values parameter must be an object");var r=T(e);return isNaN(r.getTime())?new Date(NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=ou(r,t.month)),t.date!=null&&r.setDate(M(t.date)),t.hours!=null&&r.setHours(M(t.hours)),t.minutes!=null&&r.setMinutes(M(t.minutes)),t.seconds!=null&&r.setSeconds(M(t.seconds)),t.milliseconds!=null&&r.setMilliseconds(M(t.milliseconds)),r)}function $b(e,t){y(2,arguments);var r=T(e),n=M(t);return r.setDate(n),r}function Vb(e,t,r){var n,a,i,o,s,u,c,l;y(2,arguments);var f=ze(),d=M((n=(a=(i=(o=r==null?void 0:r.weekStartsOn)!==null&&o!==void 0?o:r==null||(s=r.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&a!==void 0?a:(c=f.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=T(e),v=M(t),h=p.getDay(),m=v%7,w=(m+7)%7,g=7-d,b=v<0||v>6?v-(h+g)%7:(w+g)%7-(h+g)%7;return Qt(p,b)}function qb(e,t){y(2,arguments);var r=T(e),n=M(t);return r.setMonth(0),r.setDate(n),r}function Bb(e){y(1,arguments);var t={},r=ze();for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n]);for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(e[a]===void 0?delete t[a]:t[a]=e[a]);Jg(t)}function Hb(e,t){y(2,arguments);var r=T(e),n=M(t);return r.setHours(n),r}function Yb(e,t){y(2,arguments);var r=T(e),n=M(t),a=Ed(r),i=n-a;return Qt(r,i)}function Wb(e,t){y(2,arguments);var r=T(e),n=M(t),a=wd(r)-n;return r.setDate(r.getDate()-a*7),r}function Gb(e,t){y(2,arguments);var r=T(e),n=M(t);return r.setMilliseconds(n),r}function Qb(e,t){y(2,arguments);var r=T(e),n=M(t);return r.setMinutes(n),r}function Kb(e,t){y(2,arguments);var r=T(e),n=M(t),a=Math.floor(r.getMonth()/3)+1,i=n-a;return ou(r,r.getMonth()+i*3)}function Jb(e,t){y(2,arguments);var r=T(e),n=M(t);return r.setSeconds(n),r}function zb(e,t,r){y(2,arguments);var n=T(e),a=M(t),i=Od(n,r)-a;return n.setDate(n.getDate()-i*7),n}function Xb(e,t,r){var n,a,i,o,s,u,c,l;y(2,arguments);var f=ze(),d=M((n=(a=(i=(o=r==null?void 0:r.firstWeekContainsDate)!==null&&o!==void 0?o:r==null||(s=r.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&a!==void 0?a:(c=f.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&n!==void 0?n:1),p=T(e),v=M(t),h=Wt(p,fi(p,r)),m=new Date(0);return m.setFullYear(v,0,d),m.setHours(0,0,0,0),p=fi(m,r),p.setDate(p.getDate()+h),p}function Zb(e,t){y(2,arguments);var r=T(e),n=M(t);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(n),r)}function eO(e){y(1,arguments);var t=T(e),r=t.getFullYear(),n=Math.floor(r/10)*10;return t.setFullYear(n,0,1),t.setHours(0,0,0,0),t}function tO(){return dn(Date.now())}function rO(){var e=new Date,t=e.getFullYear(),r=e.getMonth(),n=e.getDate(),a=new Date(0);return a.setFullYear(t,r,n+1),a.setHours(0,0,0,0),a}function nO(){var e=new Date,t=e.getFullYear(),r=e.getMonth(),n=e.getDate(),a=new Date(0);return a.setFullYear(t,r,n-1),a.setHours(0,0,0,0),a}function Vd(e,t){y(2,arguments);var r=M(t);return va(e,-r)}function aO(e,t){if(y(2,arguments),!t||it(t)!=="object")return new Date(NaN);var r=t.years?M(t.years):0,n=t.months?M(t.months):0,a=t.weeks?M(t.weeks):0,i=t.days?M(t.days):0,o=t.hours?M(t.hours):0,s=t.minutes?M(t.minutes):0,u=t.seconds?M(t.seconds):0,c=Vd(e,n+r*12),l=ji(c,i+a*7),f=s+o*60,d=u+f*60,p=d*1e3,v=new Date(l.getTime()-p);return v}function iO(e,t){y(2,arguments);var r=M(t);return $f(e,-r)}function oO(e,t){y(2,arguments);var r=M(t);return Vs(e,-r)}function sO(e,t){y(2,arguments);var r=M(t);return qs(e,-r)}function uO(e,t){y(2,arguments);var r=M(t);return Bs(e,-r)}function cO(e,t){y(2,arguments);var r=M(t);return Hf(e,-r)}function lO(e,t){y(2,arguments);var r=M(t);return Ri(e,-r)}function fO(e,t){y(2,arguments);var r=M(t);return Yf(e,-r)}function dO(e){return y(1,arguments),Math.floor(e*Hs)}function pO(e){return y(1,arguments),Math.floor(e*Gs)}function vO(e){return y(1,arguments),Math.floor(e*Qs)}const hO=Object.freeze(Object.defineProperty({__proto__:null,add:Xr,addBusinessDays:$f,addDays:Qt,addHours:Vs,addISOWeekYears:Bf,addMilliseconds:ha,addMinutes:qs,addMonths:va,addQuarters:Bs,addSeconds:Hf,addWeeks:Ri,addYears:Yf,areIntervalsOverlapping:Zg,clamp:e0,closestIndexTo:t0,closestTo:r0,compareAsc:kt,compareDesc:n0,daysInWeek:Hs,daysInYear:Qf,daysToWeeks:i0,differenceInBusinessDays:o0,differenceInCalendarDays:Wt,differenceInCalendarISOWeekYears:Zf,differenceInCalendarISOWeeks:u0,differenceInCalendarMonths:ai,differenceInCalendarQuarters:$a,differenceInCalendarWeeks:ii,differenceInCalendarYears:Gn,differenceInDays:zs,differenceInHours:oi,differenceInISOWeekYears:f0,differenceInMilliseconds:Mi,differenceInMinutes:si,differenceInMonths:xi,differenceInQuarters:d0,differenceInSeconds:on,differenceInWeeks:p0,differenceInYears:rd,eachDayOfInterval:nd,eachHourOfInterval:v0,eachMinuteOfInterval:h0,eachMonthOfInterval:m0,eachQuarterOfInterval:y0,eachWeekOfInterval:g0,eachWeekendOfInterval:eu,eachWeekendOfMonth:E0,eachWeekendOfYear:w0,eachYearOfInterval:T0,endOfDay:Xs,endOfDecade:b0,endOfHour:O0,endOfISOWeek:I0,endOfISOWeekYear:D0,endOfMinute:_0,endOfMonth:Zs,endOfQuarter:N0,endOfSecond:S0,endOfToday:k0,endOfTomorrow:R0,endOfWeek:id,endOfYear:ad,endOfYesterday:A0,format:dd,formatDistance:vd,formatDistanceStrict:hd,formatDistanceToNow:SE,formatDistanceToNowStrict:kE,formatDuration:AE,formatISO:CE,formatISO9075:LE,formatISODuration:ME,formatRFC3339:xE,formatRFC7231:jE,formatRelative:UE,fromUnixTime:$E,getDate:md,getDay:Fi,getDayOfYear:VE,getDaysInMonth:yd,getDaysInYear:qE,getDecade:BE,getDefaultOptions:HE,getHours:YE,getISODay:Ed,getISOWeek:wd,getISOWeekYear:Ar,getISOWeeksInYear:QE,getMilliseconds:KE,getMinutes:JE,getMonth:zE,getOverlappingDaysInIntervals:ZE,getQuarter:os,getSeconds:ew,getTime:Td,getUnixTime:tw,getWeek:Od,getWeekOfMonth:nw,getWeekYear:bd,getWeeksInMonth:aw,getYear:iw,hoursToMilliseconds:ow,hoursToMinutes:sw,hoursToSeconds:uw,intervalToDuration:cw,intlFormat:lw,intlFormatDistance:dw,isAfter:pw,isBefore:vw,isDate:Xf,isEqual:hw,isExists:mw,isFirstDayOfMonth:yw,isFriday:gw,isFuture:Ew,isLastDayOfMonth:td,isLeapYear:gd,isMatch:yT,isMonday:gT,isPast:ET,isSameDay:ya,isSameHour:Cd,isSameISOWeek:Ld,isSameISOWeekYear:wT,isSameMinute:Md,isSameMonth:xd,isSameQuarter:Pd,isSameSecond:Fd,isSameWeek:iu,isSameYear:jd,isSaturday:Uf,isSunday:$s,isThisHour:TT,isThisISOWeek:bT,isThisMinute:OT,isThisMonth:IT,isThisQuarter:DT,isThisSecond:_T,isThisWeek:NT,isThisYear:ST,isThursday:kT,isToday:RT,isTomorrow:AT,isTuesday:CT,isValid:rr,isWednesday:LT,isWeekend:an,isWithinInterval:MT,isYesterday:xT,lastDayOfDecade:PT,lastDayOfISOWeek:FT,lastDayOfISOWeekYear:jT,lastDayOfMonth:Id,lastDayOfQuarter:UT,lastDayOfWeek:Ud,lastDayOfYear:$T,lightFormat:YT,max:Wf,maxTime:Kf,milliseconds:GT,millisecondsInHour:$r,millisecondsInMinute:Ur,millisecondsInSecond:Ai,millisecondsToHours:QT,millisecondsToMinutes:KT,millisecondsToSeconds:JT,min:Gf,minTime:a0,minutesInHour:Ys,minutesToHours:zT,minutesToMilliseconds:XT,minutesToSeconds:ZT,monthsInQuarter:Ws,monthsInYear:Gs,monthsToQuarters:eb,monthsToYears:tb,nextDay:yr,nextFriday:rb,nextMonday:nb,nextSaturday:ab,nextSunday:ib,nextThursday:ob,nextTuesday:sb,nextWednesday:ub,parse:Ad,parseISO:cb,parseJSON:Db,previousDay:gr,previousFriday:_b,previousMonday:Nb,previousSaturday:Sb,previousSunday:kb,previousThursday:Rb,previousTuesday:Ab,previousWednesday:Cb,quartersInYear:Qs,quartersToMonths:Lb,quartersToYears:Mb,roundToNearestMinutes:xb,secondsInDay:Li,secondsInHour:ma,secondsInMinute:Ci,secondsInMonth:Js,secondsInQuarter:zf,secondsInWeek:Jf,secondsInYear:Ks,secondsToHours:Pb,secondsToMilliseconds:Fb,secondsToMinutes:jb,set:Ub,setDate:$b,setDay:Vb,setDayOfYear:qb,setDefaultOptions:Bb,setHours:Hb,setISODay:Yb,setISOWeek:Wb,setISOWeekYear:qf,setMilliseconds:Gb,setMinutes:Qb,setMonth:ou,setQuarter:Kb,setSeconds:Jb,setWeek:zb,setWeekYear:Xb,setYear:Zb,startOfDay:dn,startOfDecade:eO,startOfHour:us,startOfISOWeek:tr,startOfISOWeekYear:hr,startOfMinute:ui,startOfMonth:Pi,startOfQuarter:zn,startOfSecond:cs,startOfToday:tO,startOfTomorrow:rO,startOfWeek:Tt,startOfWeekYear:fi,startOfYear:tu,startOfYesterday:nO,sub:aO,subBusinessDays:iO,subDays:ji,subHours:oO,subISOWeekYears:ed,subMilliseconds:pn,subMinutes:sO,subMonths:Vd,subQuarters:uO,subSeconds:cO,subWeeks:lO,subYears:fO,toDate:T,weeksToDays:dO,yearsToMonths:pO,yearsToQuarters:vO},Symbol.toStringTag,{value:"Module"})),mO=Ms(hO);ki.__esModule=!0;ki.dateComparators=void 0;var Qr=mO;ki.dateComparators={equals:function(e,t){return Qr.compareAsc(e,t)===0},notEquals:function(e,t){return Qr.compareAsc(e,t)!==0},gt:function(e,t){return Qr.compareAsc(t,e)===1},gte:function(e,t){return[0,1].includes(Qr.compareAsc(t,e))},lt:function(e,t){return Qr.compareAsc(t,e)===-1},lte:function(e,t){return[-1,0].includes(Qr.compareAsc(t,e))}};var su={},Ui={};Ui.__esModule=!0;Ui.numberInRange=void 0;function yO(e,t,r){return r>=e&&r<=t}Ui.numberInRange=yO;(function(e){e.__esModule=!0,e.numberComparators=void 0;var t=Ui;e.numberComparators={equals:function(r,n){return n===r},notEquals:function(r,n){return!e.numberComparators.equals(r,n)},between:function(r,n){return t.numberInRange(r[0],r[1],n)},notBetween:function(r,n){return!e.numberComparators.between(r,n)},gt:function(r,n){return n>r},gte:function(r,n){return n>=r},lt:function(r,n){return n0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i};Ni.__esModule=!0;Ni.compileQuery=void 0;var OO=da,IO=Si,jn=OO.debug("compileQuery");function ls(e){return jn(JSON.stringify(e)),function(t){return Object.entries(e.where).map(function(r){var n=Bc(r,2),a=n[0],i=n[1],o=t[a];return jn("executing query chunk",i,t),jn('actual value for "'+a+'"',o),i?Object.entries(i).reduce(function(s,u){var c=Bc(u,2),l=c[0],f=c[1];if(!s)return s;if(Array.isArray(o))return jn("actual value is array, checking if at least one item matches...",{comparatorName:l,expectedValue:f}),o.some(function(v){return ls({where:i})(v)});if(o.__type)return ls({where:i})(o);var d=IO.getComparatorsForValue(o);jn("comparators",d);var p=d[l];return p(f,o)},!0):!0}).every(Boolean)}}Ni.compileQuery=ls;var hn={},DO=Y&&Y.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},_O=Y&&Y.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),a,i=[],o;try{for(;(t===void 0||t-- >0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i};hn.__esModule=!0;hn.filter=hn.forEach=void 0;function qd(e,t){var r,n;try{for(var a=DO(t.entries()),i=a.next();!i.done;i=a.next()){var o=_O(i.value,2),s=o[0],u=o[1];e(s,u)}}catch(c){r={error:c}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}hn.forEach=qd;function NO(e,t){var r=new Map;return qd(function(n,a){e(n,a)&&r.set(n,a)},t),r}hn.filter=NO;var $i={};$i.__esModule=!0;$i.paginateResults=void 0;var SO=Ot;function Hc(e,t){return t?e+t:void 0}function kO(e,t){if(e.cursor){var r=t.findIndex(function(a){return a[a[SO.InternalEntityProperty.primaryKey]]===e.cursor});return r===-1?[]:t.slice(r+1,Hc(r+1,e.take))}var n=e.skip||0;return t.slice(n,Hc(n,e.take))}$i.paginateResults=kO;var RO=Y&&Y.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),AO=Y&&Y.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),CO=Y&&Y.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&RO(t,e,r);return AO(t,e),t},LO=Y&&Y.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i};Vi.__esModule=!0;Vi.parseModelDefinition=void 0;var qO=da,Yc=Ot,BO=Ea,HO=qi,YO=qO.debug("parseModelDefinition");function WO(e,t,r){YO('parsing model definition for "'+t+'" entity',r);var n=Object.entries(r).reduce(function(a,i){var o=VO(i,2),s=o[0],u=o[1];if("isPrimaryKey"in u)return BO.invariant(a.primaryKey,'Failed to parse a model definition for "'+t+'": cannot have both properties "'+a.primaryKey+'" and "'+s+'" as a primary key.'),a.primaryKey=s,a.properties.push(s),a;if("kind"in u&&[Yc.RelationKind.OneOf,Yc.RelationKind.ManyOf].includes(u.kind)){var c=HO.findPrimaryKey(e[u.modelName]);return a.relations[s]={kind:u.kind,modelName:u.modelName,unique:u.unique,primaryKey:c},a}return a.properties.push(s),a},{primaryKey:void 0,properties:[],relations:{}});if(!n.primaryKey)throw new Error('Failed to parse a model definition for "'+t+'": no provided properties are marked as a primary key ('+n.properties.join(", ")+").");return n}Vi.parseModelDefinition=WO;var Bi={},Hi={},GO=Y&&Y.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),a,i=[],o;try{for(;(t===void 0||t-- >0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i};Hi.__esModule=!0;Hi.defineRelationalProperties=void 0;var QO=da,Un=Ot,Wc=fa,KO=la,Tr=QO.debug("defineRelationalProperties");function JO(e,t,r,n){Tr("setting relations",r,e);var a=Object.entries(r).reduce(function(i,o){var s,u,c=GO(o,2),l=c[0],f=c[1];if(Tr('defining relational property "'+e.__type+"."+l+'"',f),!(l in t))return i;var d=[].concat(t[l]);if(f.unique){Tr('verifying that the "'+l+'" relation is unique...');var p=Wc.executeQuery(e[Un.InternalEntityProperty.type],e[Un.InternalEntityProperty.primaryKey],{where:(s={},s[l]=(u={},u[f.primaryKey]={in:d.map(function(v){return v[e[Un.InternalEntityProperty.primaryKey]]})},u),s)},n);if(Tr('existing entities that reference the same "'+l+'"',p),p.length>0)throw Tr("found a non-unique relational entity!"),new Error('Failed to create a unique "'+f.modelName+'" relation for "'+e.__type+"."+l+'" ('+e[e[Un.InternalEntityProperty.primaryKey]]+"): the provided entity is already used.")}return i[l]={enumerable:!0,get:function(){Tr('get "'+l+'"',f);var v=d.reduce(function(h,m){var w;return h.concat(Wc.executeQuery(f.modelName,f.primaryKey,{where:(w={},w[f.primaryKey]={equals:m[f.primaryKey]},w)},n))},[]);return Tr('resolved "'+f.kind+'" "'+l+'" to',v),f.kind===Un.RelationKind.OneOf?KO.first(v):v}},i},{});Object.defineProperties(e,a)}Hi.defineRelationalProperties=JO;Bi.__esModule=!0;Bi.createModel=void 0;var zO=da,Gc=Ot,XO=Hi,ka=zO.debug("createModel");function ZO(e,t,r,n,a){var i,o=r.primaryKey,s=r.properties,u=r.relations;ka('creating a "'+e+'" entity (primary key: "'+o+'")',t,r,u,n);var c=(i={},i[Gc.InternalEntityProperty.type]=e,i[Gc.InternalEntityProperty.primaryKey]=o,i),l=s.reduce(function(d,p){var v=n[p],h=t[p];return ka('property definition for "'+e+"."+p+'"',h),"kind"in h?d:"isPrimaryKey"in h?(d[p]=v||h.getValue(),d):typeof v=="string"||typeof v=="number"||typeof v=="boolean"||(v==null?void 0:v.constructor.name)==="Date"?(ka('"'+e+"."+p+'" has a plain initial value:',v),d[p]=v,d):(d[p]=h(),d)},{}),f=Object.assign({},l,c);return XO.defineRelationalProperties(f,n,u,a),ka('created "'+e+'" entity',f),f}Bi.createModel=ZO;var Yi={},fs=Y&&Y.__assign||function(){return fs=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i};Yi.__esModule=!0;Yi.updateEntity=void 0;function tI(e,t){return Object.entries(t).reduce(function(r,n){var a=eI(n,2),i=a[0],o=a[1];return e.hasOwnProperty(i)&&(r[i]=typeof o=="function"?o(e[i],e):o),r},fs({},e))}Yi.updateEntity=tI;var cu={};(function(e){var t=Y&&Y.__extends||function(){var n=function(a,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(o[u]=s[u])},n(a,i)};return function(a,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");n(a,i);function o(){this.constructor=a}a.prototype=i===null?Object.create(i):(o.prototype=i.prototype,new o)}}();e.__esModule=!0,e.OperationError=e.OperationErrorType=void 0,function(n){n.MissingPrimaryKey="MissingPrimaryKey",n.DuplicatePrimaryKey="DuplicatePrimaryKey",n.EntityNotFound="EntityNotFound"}(e.OperationErrorType||(e.OperationErrorType={}));var r=function(n){t(a,n);function a(i,o){var s=n.call(this,o)||this;return s.name="OperationError",s.type=i,s}return a}(Error);e.OperationError=r})(cu);var Wi={},Yd={exports:{}},Wd={exports:{}};(function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t={rotl:function(r,n){return r<>>32-n},rotr:function(r,n){return r<<32-n|r>>>n},endian:function(r){if(r.constructor==Number)return t.rotl(r,8)&16711935|t.rotl(r,24)&4278255360;for(var n=0;n0;r--)n.push(Math.floor(Math.random()*256));return n},bytesToWords:function(r){for(var n=[],a=0,i=0;a>>5]|=r[a]<<24-i%32;return n},wordsToBytes:function(r){for(var n=[],a=0;a>>5]>>>24-a%32&255);return n},bytesToHex:function(r){for(var n=[],a=0;a>>4).toString(16)),n.push((r[a]&15).toString(16));return n.join("")},hexToBytes:function(r){for(var n=[],a=0;a>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(r){r=r.replace(/[^A-Z0-9+\/]/ig,"");for(var n=[],a=0,i=0;a>>6-i*2);return n}};Wd.exports=t})();var rI=Wd.exports,ds={utf8:{stringToBytes:function(e){return ds.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(ds.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r + * @license MIT + */var nI=function(e){return e!=null&&(Gd(e)||aI(e)||!!e._isBuffer)};function Gd(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function aI(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&Gd(e.slice(0,0))}(function(){var e=rI,t=Qc.utf8,r=nI,n=Qc.bin,a=function(i,o){i.constructor==String?o&&o.encoding==="binary"?i=n.stringToBytes(i):i=t.stringToBytes(i):r(i)?i=Array.prototype.slice.call(i,0):!Array.isArray(i)&&i.constructor!==Uint8Array&&(i=i.toString());for(var s=e.bytesToWords(i),u=i.length*8,c=1732584193,l=-271733879,f=-1732584194,d=271733878,p=0;p>>24)&16711935|(s[p]<<24|s[p]>>>8)&4278255360;s[u>>>5]|=128<>>9<<4)+14]=u;for(var v=a._ff,h=a._gg,m=a._hh,w=a._ii,p=0;p>>0,l=l+b>>>0,f=f+O>>>0,d=d+I>>>0}return e.endian([c,l,f,d])};a._ff=function(i,o,s,u,c,l,f){var d=i+(o&s|~o&u)+(c>>>0)+f;return(d<>>32-l)+o},a._gg=function(i,o,s,u,c,l,f){var d=i+(o&u|s&~u)+(c>>>0)+f;return(d<>>32-l)+o},a._hh=function(i,o,s,u,c,l,f){var d=i+(o^s^u)+(c>>>0)+f;return(d<>>32-l)+o},a._ii=function(i,o,s,u,c,l,f){var d=i+(s^(o|~u))+(c>>>0)+f;return(d<>>32-l)+o},a._blocksize=16,a._digestsize=16,Yd.exports=function(i,o){if(i==null)throw new Error("Illegal argument "+i);var s=e.wordsToBytes(a(i,o));return o&&o.asBytes?s:o&&o.asString?n.bytesToString(s):e.bytesToHex(s)}})();var iI=Yd.exports,Qd={},Gi={},lu={exports:{}},sn=typeof Reflect=="object"?Reflect:null,Kc=sn&&typeof sn.apply=="function"?sn.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},Va;sn&&typeof sn.ownKeys=="function"?Va=sn.ownKeys:Object.getOwnPropertySymbols?Va=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Va=function(t){return Object.getOwnPropertyNames(t)};function oI(e){console&&console.warn&&console.warn(e)}var Kd=Number.isNaN||function(t){return t!==t};function be(){be.init.call(this)}lu.exports=be;lu.exports.once=lI;be.EventEmitter=be;be.prototype._events=void 0;be.prototype._eventsCount=0;be.prototype._maxListeners=void 0;var Jc=10;function Qi(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(be,"defaultMaxListeners",{enumerable:!0,get:function(){return Jc},set:function(e){if(typeof e!="number"||e<0||Kd(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Jc=e}});be.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};be.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Kd(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Jd(e){return e._maxListeners===void 0?be.defaultMaxListeners:e._maxListeners}be.prototype.getMaxListeners=function(){return Jd(this)};be.prototype.emit=function(t){for(var r=[],n=1;n0&&(o=r[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var u=i[t];if(u===void 0)return!1;if(typeof u=="function")Kc(u,this,r);else for(var c=u.length,l=tp(u,c),n=0;n0&&o.length>a&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,oI(s)}return e}be.prototype.addListener=function(t,r){return zd(this,t,r,!1)};be.prototype.on=be.prototype.addListener;be.prototype.prependListener=function(t,r){return zd(this,t,r,!0)};function sI(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Xd(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=sI.bind(n);return a.listener=r,n.wrapFn=a,a}be.prototype.once=function(t,r){return Qi(r),this.on(t,Xd(this,t,r)),this};be.prototype.prependOnceListener=function(t,r){return Qi(r),this.prependListener(t,Xd(this,t,r)),this};be.prototype.removeListener=function(t,r){var n,a,i,o,s;if(Qi(r),a=this._events,a===void 0)return this;if(n=a[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete a[t],a.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){s=n[o].listener,i=o;break}if(i<0)return this;i===0?n.shift():uI(n,i),n.length===1&&(a[t]=n[0]),a.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};be.prototype.off=be.prototype.removeListener;be.prototype.removeAllListeners=function(t){var r,n,a;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i=Object.keys(n),o;for(a=0;a=0;a--)this.removeListener(t,r[a]);return this};function Zd(e,t,r){var n=e._events;if(n===void 0)return[];var a=n[t];return a===void 0?[]:typeof a=="function"?r?[a.listener||a]:[a]:r?cI(a):tp(a,a.length)}be.prototype.listeners=function(t){return Zd(this,t,!0)};be.prototype.rawListeners=function(t){return Zd(this,t,!1)};be.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):ep.call(e,t)};be.prototype.listenerCount=ep;function ep(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}be.prototype.eventNames=function(){return this._eventsCount>0?Va(this._events):[]};function tp(e,t){for(var r=new Array(t),n=0;nr=>(r.status=e,r.statusText=t||bI[String(e)],r);var Ne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ze(e){var t={exports:{}};return e(t,t.exports),t.exports}var Ra=Ze(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeHeaderName=void 0;var r=/[^a-z0-9\-#$%&'*+.^_`|~]/i;function n(a){if(typeof a!="string"&&(a=String(a)),r.test(a)||a.trim()==="")throw new TypeError("Invalid character in header field name");return a.toLowerCase()}t.normalizeHeaderName=n}),OI=Ze(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeHeaderValue=void 0;function r(n){return typeof n!="string"&&(n=String(n)),n}t.normalizeHeaderValue=r}),Uo=Ne&&Ne.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(l){return u([c,l])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,a&&(i=c[0]&2?a.return:c[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,c[1])).done)return i;switch(a=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,a=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},$o=Ne&&Ne.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},II=function(){function e(t){var r=this;if(this._headers={},this._names=new Map,["Headers","HeadersPolyfill"].includes(t==null?void 0:t.constructor.name)||t instanceof e){var n=t;n.forEach(function(a,i){r.append(i,a)},this)}else Array.isArray(t)?t.forEach(function(a){var i=Xc(a,2),o=i[0],s=i[1];r.append(o,Array.isArray(s)?s.join(", "):s)}):t&&Object.getOwnPropertyNames(t).forEach(function(a){var i=t[a];r.append(a,Array.isArray(i)?i.join(", "):i)})}return e.prototype[Symbol.iterator]=function(){return this.entries()},e.prototype.keys=function(){var t,r,n,a,i,o;return Uo(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,7]),t=$o(Object.keys(this._headers)),r=t.next(),s.label=1;case 1:return r.done?[3,4]:(n=r.value,[4,n]);case 2:s.sent(),s.label=3;case 3:return r=t.next(),[3,1];case 4:return[3,7];case 5:return a=s.sent(),i={error:a},[3,7];case 6:try{r&&!r.done&&(o=t.return)&&o.call(t)}finally{if(i)throw i.error}return[7];case 7:return[2]}})},e.prototype.values=function(){var t,r,n,a,i,o;return Uo(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,7]),t=$o(Object.values(this._headers)),r=t.next(),s.label=1;case 1:return r.done?[3,4]:(n=r.value,[4,n]);case 2:s.sent(),s.label=3;case 3:return r=t.next(),[3,1];case 4:return[3,7];case 5:return a=s.sent(),i={error:a},[3,7];case 6:try{r&&!r.done&&(o=t.return)&&o.call(t)}finally{if(i)throw i.error}return[7];case 7:return[2]}})},e.prototype.entries=function(){var t,r,n,a,i,o;return Uo(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,7]),t=$o(Object.keys(this._headers)),r=t.next(),s.label=1;case 1:return r.done?[3,4]:(n=r.value,[4,[n,this.get(n)]]);case 2:s.sent(),s.label=3;case 3:return r=t.next(),[3,1];case 4:return[3,7];case 5:return a=s.sent(),i={error:a},[3,7];case 6:try{r&&!r.done&&(o=t.return)&&o.call(t)}finally{if(i)throw i.error}return[7];case 7:return[2]}})},e.prototype.get=function(t){return this._headers[Ra.normalizeHeaderName(t)]||null},e.prototype.set=function(t,r){var n=Ra.normalizeHeaderName(t);this._headers[n]=OI.normalizeHeaderValue(r),this._names.set(n,t)},e.prototype.append=function(t,r){var n=this.has(t)?this.get(t)+", "+r:r;this.set(t,n)},e.prototype.delete=function(t){if(!this.has(t))return this;var r=Ra.normalizeHeaderName(t);return delete this._headers[r],this._names.delete(r),this},e.prototype.all=function(){return this._headers},e.prototype.raw=function(){var t=this;return Object.entries(this._headers).reduce(function(r,n){var a=Xc(n,2),i=a[0],o=a[1];return r[t._names.get(i)]=o,r},{})},e.prototype.has=function(t){return this._headers.hasOwnProperty(Ra.normalizeHeaderName(t))},e.prototype.forEach=function(t,r){for(var n in this._headers)this._headers.hasOwnProperty(n)&&t.call(r,this._headers[n],n,this)},e}(),DI=II,Ji=Object.defineProperty({default:DI},"__esModule",{value:!0}),ip=Ze(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.headersToList=void 0;function r(n){var a=[];return n.forEach(function(i,o){var s=i.includes(",")?i.split(",").map(function(u){return u.trim()}):i;a.push([o,s])}),a}t.headersToList=r}),_I=Ze(function(e,t){var r=Ne&&Ne.__read||function(a,i){var o=typeof Symbol=="function"&&a[Symbol.iterator];if(!o)return a;var s=o.call(a),u,c=[],l;try{for(;(i===void 0||i-- >0)&&!(u=s.next()).done;)c.push(u.value)}catch(f){l={error:f}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(l)throw l.error}}return c};Object.defineProperty(t,"__esModule",{value:!0}),t.headersToString=void 0;function n(a){var i=ip.headersToList(a),o=i.map(function(s){var u=r(s,2),c=u[0],l=u[1],f=[].concat(l);return c+": "+f.join(", ")});return o.join(`\r +`)}t.headersToString=n}),NI=Ze(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.headersToObject=void 0;var r=["user-agent"];function n(a){var i={};return a.forEach(function(o,s){var u=!r.includes(s.toLowerCase())&&o.includes(",");i[s]=u?o.split(",").map(function(c){return c.trim()}):o}),i}t.headersToObject=n}),SI=Ze(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.stringToHeaders=void 0;function r(n){var a=n.trim().split(/[\r\n]+/);return a.reduce(function(i,o){var s=o.split(": "),u=s.shift(),c=s.join(": ");return i.append(u,c),i},new Ji.default)}t.stringToHeaders=r}),kI=Ze(function(e,t){var r=Ne&&Ne.__read||function(a,i){var o=typeof Symbol=="function"&&a[Symbol.iterator];if(!o)return a;var s=o.call(a),u,c=[],l;try{for(;(i===void 0||i-- >0)&&!(u=s.next()).done;)c.push(u.value)}catch(f){l={error:f}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(l)throw l.error}}return c};Object.defineProperty(t,"__esModule",{value:!0}),t.listToHeaders=void 0;function n(a){var i=new Ji.default;return a.forEach(function(o){var s=r(o,2),u=s[0],c=s[1],l=[].concat(c);l.forEach(function(f){i.append(u,f)})}),i}t.listToHeaders=n}),fu=Ze(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.reduceHeadersObject=void 0;function r(n,a,i){return Object.keys(n).reduce(function(o,s){return a(o,s,n[s])},i)}t.reduceHeadersObject=r}),RI=Ze(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.objectToHeaders=void 0;function r(n){return fu.reduceHeadersObject(n,function(a,i,o){var s=[].concat(o).filter(Boolean);return s.forEach(function(u){a.append(i,u)}),a},new Ji.default)}t.objectToHeaders=r}),AI=Ze(function(e,t){var r=Ne&&Ne.__read||function(a,i){var o=typeof Symbol=="function"&&a[Symbol.iterator];if(!o)return a;var s=o.call(a),u,c=[],l;try{for(;(i===void 0||i-- >0)&&!(u=s.next()).done;)c.push(u.value)}catch(f){l={error:f}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(l)throw l.error}}return c};Object.defineProperty(t,"__esModule",{value:!0}),t.flattenHeadersList=void 0;function n(a){return a.map(function(i){var o=r(i,2),s=o[0],u=o[1];return[s,[].concat(u).join("; ")]})}t.flattenHeadersList=n}),CI=Ze(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.flattenHeadersObject=void 0;function r(n){return fu.reduceHeadersObject(n,function(a,i,o){return a[i]=[].concat(o).join("; "),a},{})}t.flattenHeadersObject=r}),Vr=Ze(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.flattenHeadersObject=t.flattenHeadersList=t.reduceHeadersObject=t.objectToHeaders=t.listToHeaders=t.stringToHeaders=t.headersToObject=t.headersToList=t.headersToString=t.Headers=void 0,Object.defineProperty(t,"Headers",{enumerable:!0,get:function(){return Ji.default}}),Object.defineProperty(t,"headersToString",{enumerable:!0,get:function(){return _I.headersToString}}),Object.defineProperty(t,"headersToList",{enumerable:!0,get:function(){return ip.headersToList}}),Object.defineProperty(t,"headersToObject",{enumerable:!0,get:function(){return NI.headersToObject}}),Object.defineProperty(t,"stringToHeaders",{enumerable:!0,get:function(){return SI.stringToHeaders}}),Object.defineProperty(t,"listToHeaders",{enumerable:!0,get:function(){return kI.listToHeaders}}),Object.defineProperty(t,"objectToHeaders",{enumerable:!0,get:function(){return RI.objectToHeaders}}),Object.defineProperty(t,"reduceHeadersObject",{enumerable:!0,get:function(){return fu.reduceHeadersObject}}),Object.defineProperty(t,"flattenHeadersList",{enumerable:!0,get:function(){return AI.flattenHeadersList}}),Object.defineProperty(t,"flattenHeadersObject",{enumerable:!0,get:function(){return CI.flattenHeadersObject}})});function zi(...e){return t=>{const[r,n]=e;return typeof r=="string"?t.headers.append(r,n):Vr.objectToHeaders(r).forEach((i,o)=>{t.headers.append(o,i)}),t}}function Nr(e){try{return JSON.parse(e)}catch{return}}const Xi=e=>t=>(t.headers.set("Content-Type","application/json"),t.body=JSON.stringify(e),t);function du(){if(typeof global!="object")return!1;if(Object.prototype.toString.call(global.process)==="[object process]"||navigator.product==="ReactNative")return!0}const Vo=2147483647,Zc=100,LI=400,MI=5,el=()=>du()?MI:Math.floor(Math.random()*(LI-Zc)+Zc),Zi=e=>t=>{let r;if(typeof e=="string")switch(e){case"infinite":{r=Vo;break}case"real":{r=el();break}default:throw new Error(`Failed to delay a response: unknown delay mode "${e}". Please make sure you provide one of the supported modes ("real", "infinite") or a number to "ctx.delay".`)}else if(typeof e>"u")r=el();else{if(e>Vo)throw new Error(`Failed to delay a response: provided delay duration (${e}) exceeds the maximum allowed duration for "setTimeout" (${Vo}). This will cause the response to be returned immediately. Please use a number within the allowed range to delay the response by exact duration, or consider the "infinite" delay mode to delay the response indefinitely.`);r=e}return t.delay=r,t},tl=du()?require("node-fetch"):window.fetch,rl=e=>{const t=new Vr.Headers(e.headers);return t.set("x-msw-bypass","true"),Object.assign(Object.assign({},e),{headers:t.all()})},xI=e=>{const{body:t,method:r}=e,n=Object.assign(Object.assign({},e),{body:void 0});return["GET","HEAD"].includes(r)||(n.body=typeof t=="object"?JSON.stringify(t):t),n},eo=(e,t={})=>{if(typeof e=="string")return tl(e,rl(t));const r=xI(e),n=rl(r);return tl(e.url.href,n)};/*! + * cookie + * Copyright(c) 2012-2014 Roman Shtylman + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */var PI=VI,FI=qI,jI=decodeURIComponent,UI=encodeURIComponent,$I=/; */,Aa=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function VI(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");for(var r={},n=t||{},a=e.split($I),i=n.decode||jI,o=0;on=>{const a=FI(e,t,r);return n.headers.set("Set-Cookie",a),typeof document<"u"&&(document.cookie=a),n},sp=e=>t=>(t.body=e,t),up=e=>t=>(t.headers.set("Content-Type","text/plain"),t.body=e,t),cp=e=>t=>(t.headers.set("Content-Type","text/xml"),t.body=e,t);function nl(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function to(e,t){return Object.entries(t).reduce((r,[n,a])=>{const i=r[n];return Array.isArray(i)&&Array.isArray(a)?(r[n]=i.concat(a),r):nl(i)&&nl(a)?(r[n]=to(i,a),r):(r[n]=a,r)},Object.assign({},e))}const lp=e=>t=>{const r=Nr(t.body)||{},n=to(r,{data:e});return Xi(n)(t)},fp=e=>t=>{if(e==null)return t;const r=Nr(t.body)||{},n=to(r,{errors:e});return Xi(n)(t)};var HI=Object.freeze({__proto__:null,status:Ki,set:zi,cookie:op,body:sp,data:lp,delay:Zi,errors:fp,fetch:eo,json:Xi,text:up,xml:cp});/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */function YI(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a= 0x80 (not a basic code point)","invalid-input":"Invalid input"},O=u-c,I=Math.floor,D=String.fromCharCode,A;function L(H){throw RangeError(b[H])}function B(H,W){for(var q=H.length,ne=[];q--;)ne[q]=W(H[q]);return ne}function z(H,W){var q=H.split("@"),ne="";q.length>1&&(ne=q[0]+"@",H=q[1]),H=H.replace(g,".");var ae=H.split("."),Ae=B(ae,W).join(".");return ne+Ae}function V(H){for(var W=[],q=0,ne=H.length,ae,Ae;q=55296&&ae<=56319&&q65535&&(W-=65536,q+=D(W>>>10&1023|55296),W=56320|W&1023),q+=D(W),q}).join("")}function G(H){return H-48<10?H-22:H-65<26?H-65:H-97<26?H-97:u}function ce(H,W){return H+22+75*(H<26)-((W!=0)<<5)}function ue(H,W,q){var ne=0;for(H=q?I(H/d):H>>1,H+=I(H/W);H>O*l>>1;ne+=u)H=I(H/O);return I(ne+(O+1)*H/(H+f))}function he(H){var W=[],q=H.length,ne,ae=0,Ae=v,Te=p,Ye,le,te,Ie,Ce,tt,R,F,x;for(Ye=H.lastIndexOf(h),Ye<0&&(Ye=0),le=0;le=128&&L("not-basic"),W.push(H.charCodeAt(le));for(te=Ye>0?Ye+1:0;te=q&&L("invalid-input"),R=G(H.charCodeAt(te++)),(R>=u||R>I((s-ae)/Ce))&&L("overflow"),ae+=R*Ce,F=tt<=Te?c:tt>=Te+l?l:tt-Te,!(RI(s/x)&&L("overflow"),Ce*=x;ne=W.length+1,Te=ue(ae-Ie,ne,Ie==0),I(ae/ne)>s-Ae&&L("overflow"),Ae+=I(ae/ne),ae%=ne,W.splice(ae++,0,Ae)}return _(W)}function et(H){var W,q,ne,ae,Ae,Te,Ye,le,te,Ie,Ce,tt=[],R,F,x,U;for(H=V(H),R=H.length,W=v,q=0,Ae=p,Te=0;Te=W&&CeI((s-q)/F)&&L("overflow"),q+=(Ye-W)*F,W=Ye,Te=0;Tes&&L("overflow"),Ce==W){for(le=q,te=u;Ie=te<=Ae?c:te>=Ae+l?l:te-Ae,!(le0&&s>o&&(s=o);for(var u=0;u=0?(f=c.substr(0,l),d=c.substr(l+1)):(f=c,d=""),p=decodeURIComponent(f),v=decodeURIComponent(d),GI(a,p)?Array.isArray(a[p])?a[p].push(v):a[p]=[a[p],v]:a[p]=v}return a},$n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},KI=function(e,t,r,n){return t=t||"&",r=r||"=",e===null&&(e=void 0),typeof e=="object"?Object.keys(e).map(function(a){var i=encodeURIComponent($n(a))+r;return Array.isArray(e[a])?e[a].map(function(o){return i+encodeURIComponent($n(o))}).join(t):i+encodeURIComponent($n(e[a]))}).join(t):n?encodeURIComponent($n(n))+r+encodeURIComponent($n(e)):""},ps=Ze(function(e,t){t.decode=t.parse=QI,t.encode=t.stringify=KI}),JI=iD;function Rt(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var zI=/^([a-z0-9.+-]+:)/i,XI=/:[0-9]*$/,ZI=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,eD=["<",">",'"',"`"," ","\r",` +`," "],tD=["{","}","|","\\","^","`"].concat(eD),vs=["'"].concat(tD),al=["%","/","?",";","#"].concat(vs),il=["/","?","#"],rD=255,ol=/^[+a-z0-9A-Z_-]{0,63}$/,nD=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,aD={javascript:!0,"javascript:":!0},hs={javascript:!0,"javascript:":!0},un={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function dp(e,t,r){if(e&&$t.isObject(e)&&e instanceof Rt)return e;var n=new Rt;return n.parse(e,t,r),n}Rt.prototype.parse=function(e,t,r){if(!$t.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),a=n!==-1&&n127?I+="x":I+=O[D];if(!I.match(ol)){var L=g.slice(0,p),B=g.slice(p+1),z=O.match(nD);z&&(L.push(z[1]),B.unshift(z[2])),B.length&&(s="/"+B.join(".")+s),this.hostname=L.join(".");break}}}this.hostname.length>rD?this.hostname="":this.hostname=this.hostname.toLowerCase(),w||(this.hostname=WI.toASCII(this.hostname));var V=this.port?":"+this.port:"",_=this.hostname||"";this.host=_+V,this.href+=this.host,w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),s[0]!=="/"&&(s="/"+s))}if(!aD[l])for(var p=0,b=vs.length;p0?r.host.split("@"):!1;I&&(r.auth=I.shift(),r.host=r.hostname=I.shift())}return r.search=e.search,r.query=e.query,(!$t.isNull(r.pathname)||!$t.isNull(r.search))&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!g.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var D=g.slice(-1)[0],A=(r.host||e.host||g.length>1)&&(D==="."||D==="..")||D==="",L=0,B=g.length;B>=0;B--)D=g[B],D==="."?g.splice(B,1):D===".."?(g.splice(B,1),L++):L&&(g.splice(B,1),L--);if(!m&&!w)for(;L--;L)g.unshift("..");m&&g[0]!==""&&(!g[0]||g[0].charAt(0)!=="/")&&g.unshift(""),A&&g.join("/").substr(-1)!=="/"&&g.push("");var z=g[0]===""||g[0]&&g[0].charAt(0)==="/";if(O){r.hostname=r.host=z?"":g.length?g.shift():"";var I=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;I&&(r.auth=I.shift(),r.host=r.hostname=I.shift())}return m=m||r.host&&g.length,m&&!z&&g.unshift(""),g.length?r.pathname=g.join("/"):(r.pathname=null,r.path=null),(!$t.isNull(r.pathname)||!$t.isNull(r.search))&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r};Rt.prototype.parseHost=function(){var e=this.host,t=XI.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const wa=e=>e.referrer.startsWith(e.url.origin)?e.url.pathname:JI({protocol:e.url.protocol,host:e.url.host,pathname:e.url.pathname});function pp(e){return e<300?"#69AB32":e<400?"#F0BB4B":"#E95F5D"}function vp(){const e=new Date;return[e.getHours(),e.getMinutes(),e.getSeconds()].map(String).map(t=>t.slice(0,2)).map(t=>t.padStart(2,"0")).join(":")}function hp(e){return Object.assign(Object.assign({},e),{headers:e.headers.all()})}function oD(e){var t,r;const n=Vr.stringToHeaders(e),a=n.get("content-type")||"text/plain",i=n.get("content-disposition");if(!i)throw new Error('"Content-Disposition" header is required.');const o=i.split(";").reduce((c,l)=>{const[f,...d]=l.trim().split("=");return c[f]=d.join("="),c},{}),s=(t=o.name)===null||t===void 0?void 0:t.slice(1,-1),u=(r=o.filename)===null||r===void 0?void 0:r.slice(1,-1);return{name:s,filename:u,contentType:a}}function sD(e,t){const r=t==null?void 0:t.get("content-type");if(!r)return;const[,...n]=r.split(/; */),a=n.filter(u=>u.startsWith("boundary=")).map(u=>u.replace(/^boundary=/,""))[0];if(!a)return;const i=new RegExp(`--+${a}`),o=e.split(i).filter(u=>u.startsWith(`\r +`)&&u.endsWith(`\r +`)).map(u=>u.trimStart().replace(/\r\n$/,""));if(!o.length)return;const s={};try{for(const u of o){const[c,...l]=u.split(`\r +\r +`),f=l.join(`\r +\r +`),{contentType:d,filename:p,name:v}=oD(c),h=p===void 0?f:new File([f],p,{type:d}),m=s[v];m===void 0?s[v]=h:Array.isArray(m)?s[v]=[...m,h]:s[v]=[m,h]}return s}catch{return}}function mp(e,t){if(e){const r=t==null?void 0:t.get("content-type");return(r==null?void 0:r.startsWith("multipart/form-data"))&&typeof e!="object"?sD(e,t)||e:(r==null?void 0:r.includes("json"))&&typeof e!="object"&&Nr(e)||e}return e}function yp(e){const t=Vr.listToHeaders(e.headers);return Object.assign(Object.assign({},e),{body:mp(e.body,t)})}const uD=e=>{const t=e.replace(/\./g,"\\.").replace(/\//g,"/").replace(/\?/g,"\\?").replace(/\/+$/,"").replace(/\*+/g,".*").replace(/:([^\d|^\/][a-zA-Z0-9_]*(?=(?:\/|\\.)|$))/g,(r,n)=>`(?<${n}>[^/]+?)`).concat("(\\/|$)");return new RegExp(t,"gi")},cD=(e,t)=>{const n=(e instanceof RegExp?e:uD(e)).exec(t)||!1,a=e instanceof RegExp?!!n:!!n&&n[0]===n.input;return{matches:a,params:n&&a&&n.groups||null}};var gp=Ze(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getCleanUrl=void 0;function r(n,a){return a===void 0&&(a=!0),[a&&n.origin,n.pathname].filter(Boolean).join("")}t.getCleanUrl=r});const Ep=e=>{const t=typeof location<"u";return typeof e=="string"&&e.startsWith("/")?`${t?location.origin:""}${e}`:e};function wp(e){if(e instanceof RegExp||e.includes("*"))return e;try{return new URL(Ep(e))}catch{return e}}function lD(e){return e instanceof URL?gp.getCleanUrl(e):e instanceof RegExp?e:Ep(e)}function pu(e,t){const r=wp(t),n=lD(r),a=gp.getCleanUrl(e);return cD(n,a)}function Tp(...e){return(...t)=>e.reduceRight((r,n)=>r instanceof Promise?Promise.resolve(r).then(n):n(r),t[0])}class bp extends Error{constructor(t){super(t),this.name="NetworkError"}}const Op={status:200,statusText:"OK",body:null,delay:0,once:!1},fD=[];function ms(e,t=fD){return(...r)=>Ct(this,void 0,void 0,function*(){const n=Object.assign({},Op,{headers:new Vr.Headers({"x-powered-by":"msw"})},e),a=[...t,...r].filter(Boolean);return a.length>0?Tp(...a)(n):n})}const Ip=Object.assign(ms(),{once:ms({once:!0}),networkError(e){throw new bp(e)}});function dD(){const t=(new Error().stack||"").split(` +`),r=/(node_modules)?[\/\\]lib[\/\\](umd|esm|iief|cjs)[\/\\]|^[^\/\\]*$/,n=t.slice(1).find(i=>!r.test(i));return n?n.replace(/\s*at [^()]*\(([^)]+)\)/,"$1").replace(/^@/,""):void 0}const Dp={status:Ki,set:zi,delay:Zi,fetch:eo};class vu{constructor(t){this.shouldSkip=!1,this.ctx=t.ctx||Dp,this.resolver=t.resolver;const r=dD();this.info=Object.assign(Object.assign({},t.info),{callFrame:r})}parse(t){return null}test(t){return this.predicate(t,this.parse(t))}getPublicRequest(t,r){return t}markAsSkipped(t=!0){this.shouldSkip=t}run(t){return Ct(this,void 0,void 0,function*(){if(this.shouldSkip)return null;const r=this.parse(t);if(!this.predicate(t,r))return null;const a=this.getPublicRequest(t,r),i=yield this.resolver(a,Ip,this.ctx);return this.createExecutionResult(r,a,i)})}createExecutionResult(t,r,n){return{handler:this,parsedResult:t||null,request:r,response:n||null}}}function qa(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qa=function(r){return typeof r}:qa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},qa(e)}function pD(e){return qa(e)=="object"&&e!==null}var _p=typeof Symbol=="function"&&Symbol.toStringTag!=null?Symbol.toStringTag:"@@toStringTag";function ys(e,t){for(var r=/\r\n|[\n\r]/g,n=1,a=t+1,i;(i=r.exec(e.body))&&i.index120){for(var d=Math.floor(u/80),p=u%80,v=[],h=0;h"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function TD(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Xn(e,t){return Xn=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},Xn(e,t)}function Zn(e){return Zn=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Zn(e)}var bD=function(e){ED(r,e);var t=wD(r);function r(n,a,i,o,s,u,c){var l,f,d,p,v;mD(this,r),v=t.call(this,n);var h=Array.isArray(a)?a.length!==0?a:void 0:a?[a]:void 0,m=i;if(!m&&h){var w;m=(w=h[0].loc)===null||w===void 0?void 0:w.source}var g=o;!g&&h&&(g=h.reduce(function(D,A){return A.loc&&D.push(A.loc.start),D},[])),g&&g.length===0&&(g=void 0);var b;o&&i?b=o.map(function(D){return ys(i,D)}):h&&(b=h.reduce(function(D,A){return A.loc&&D.push(ys(A.loc.source,A.loc.start)),D},[]));var O=c;if(O==null&&u!=null){var I=u.extensions;pD(I)&&(O=I)}return Object.defineProperties(Bn(v),{name:{value:"GraphQLError"},message:{value:n,enumerable:!0,writable:!0},locations:{value:(l=b)!==null&&l!==void 0?l:void 0,enumerable:b!=null},path:{value:s??void 0,enumerable:s!=null},nodes:{value:h??void 0},source:{value:(f=m)!==null&&f!==void 0?f:void 0},positions:{value:(d=g)!==null&&d!==void 0?d:void 0},originalError:{value:u},extensions:{value:(p=O)!==null&&p!==void 0?p:void 0,enumerable:O!=null}}),u!=null&&u.stack?(Object.defineProperty(Bn(v),"stack",{value:u.stack,writable:!0,configurable:!0}),Sp(v)):(Error.captureStackTrace?Error.captureStackTrace(Bn(v),r):Object.defineProperty(Bn(v),"stack",{value:Error().stack,writable:!0,configurable:!0}),v)}return gD(r,[{key:"toString",value:function(){return OD(this)}},{key:_p,get:function(){return"Object"}}]),r}(gs(Error));function OD(e){var t=e.message;if(e.nodes)for(var r=0,n=e.nodes;r",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function Wa(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Wa=function(r){return typeof r}:Wa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Wa(e)}var DD=10,Cp=2;function _D(e){return ro(e,[])}function ro(e,t){switch(Wa(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return e===null?"null":ND(e,t);default:return String(e)}}function ND(e,t){if(t.indexOf(e)!==-1)return"[Circular]";var r=[].concat(t,[e]),n=RD(e);if(n!==void 0){var a=n.call(e);if(a!==e)return typeof a=="string"?a:ro(a,r)}else if(Array.isArray(e))return kD(e,r);return SD(e,r)}function SD(e,t){var r=Object.keys(e);if(r.length===0)return"{}";if(t.length>Cp)return"["+AD(e)+"]";var n=r.map(function(a){var i=ro(e[a],t);return a+": "+i});return"{ "+n.join(", ")+" }"}function kD(e,t){if(e.length===0)return"[]";if(t.length>Cp)return"[Array]";for(var r=Math.min(DD,e.length),n=e.length-r,a=[],i=0;i1&&a.push("... ".concat(n," more items")),"["+a.join(", ")+"]"}function RD(e){var t=e[String(Es)];if(typeof t=="function")return t;if(typeof e.inspect=="function")return e.inspect}function AD(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){var r=e.constructor.name;if(typeof r=="string"&&r!=="")return r}return t}function qo(e,t){var r=!!e;if(!r)throw new Error(t)}var CD=function(t,r){if(t instanceof r)return!0;if(t){var n=t.constructor,a=r.name;if(a&&n&&n.name===a)throw new Error("Cannot use ".concat(a,' "').concat(t,`" from another module or realm. + +Ensure that there is only one instance of "graphql" in the node_modules +directory. If different versions of "graphql" are the dependencies of other +relied on modules, use "resolutions" to ensure only one version is installed. + +https://yarnpkg.com/en/docs/selective-version-resolutions + +Duplicate "graphql" modules cannot be used at the same time since different +versions may have different capabilities and behavior. The data from one +version used in the function from another could produce confusing and +spurious results.`))}return!1};function LD(e,t){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:"GraphQL request",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{line:1,column:1};typeof t=="string"||qo(0,"Body must be a string. Received: ".concat(_D(t),".")),this.body=t,this.name=r,this.locationOffset=n,this.locationOffset.line>0||qo(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||qo(0,"column in locationOffset is 1-indexed and must be positive.")}return MD(e,[{key:_p,get:function(){return"Source"}}]),e}();function xD(e){return CD(e,Lp)}var PD=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function FD(e){var t=e.split(/\r\n|[\n\r]/g),r=jD(e);if(r!==0)for(var n=1;na&&ul(t[i-1]);)--i;return t.slice(a,i).join(` +`)}function ul(e){for(var t=0;t31||o===9));return new Be(C.COMMENT,t,s,r,n,a,i.slice(t+1,s))}function HD(e,t,r,n,a,i){var o=e.body,s=r,u=t,c=!1;if(s===45&&(s=o.charCodeAt(++u)),s===48){if(s=o.charCodeAt(++u),s>=48&&s<=57)throw dt(e,u,"Invalid number, unexpected digit after 0: ".concat(Lr(s),"."))}else u=Bo(e,u,s),s=o.charCodeAt(u);if(s===46&&(c=!0,s=o.charCodeAt(++u),u=Bo(e,u,s),s=o.charCodeAt(u)),(s===69||s===101)&&(c=!0,s=o.charCodeAt(++u),(s===43||s===45)&&(s=o.charCodeAt(++u)),u=Bo(e,u,s),s=o.charCodeAt(u)),s===46||KD(s))throw dt(e,u,"Invalid number, expected digit but got: ".concat(Lr(s),"."));return new Be(c?C.FLOAT:C.INT,t,u,n,a,i,o.slice(t,u))}function Bo(e,t,r){var n=e.body,a=t,i=r;if(i>=48&&i<=57){do i=n.charCodeAt(++a);while(i>=48&&i<=57);return a}throw dt(e,a,"Invalid number, expected digit but got: ".concat(Lr(i),"."))}function YD(e,t,r,n,a){for(var i=e.body,o=t+1,s=o,u=0,c="";o=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function QD(e,t,r,n,a){for(var i=e.body,o=i.length,s=t+1,u=0;s!==o&&!isNaN(u=i.charCodeAt(s))&&(u===95||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++s;return new Be(C.NAME,t,s,r,n,a,i.slice(t,s))}function KD(e){return e===95||e>=65&&e<=90||e>=97&&e<=122}function JD(e,t){var r=new zD(e,t);return r.parseDocument()}var zD=function(){function e(r,n){var a=xD(r)?r:new Lp(r);this._lexer=new UD(a),this._options=n}var t=e.prototype;return t.parseName=function(){var n=this.expectToken(C.NAME);return{kind:J.NAME,value:n.value,loc:this.loc(n)}},t.parseDocument=function(){var n=this._lexer.token;return{kind:J.DOCUMENT,definitions:this.many(C.SOF,this.parseDefinition,C.EOF),loc:this.loc(n)}},t.parseDefinition=function(){if(this.peek(C.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(C.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var n=this._lexer.token;if(this.peek(C.BRACE_L))return{kind:J.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(n)};var a=this.parseOperationType(),i;return this.peek(C.NAME)&&(i=this.parseName()),{kind:J.OPERATION_DEFINITION,operation:a,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}},t.parseOperationType=function(){var n=this.expectToken(C.NAME);switch(n.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(n)},t.parseVariableDefinitions=function(){return this.optionalMany(C.PAREN_L,this.parseVariableDefinition,C.PAREN_R)},t.parseVariableDefinition=function(){var n=this._lexer.token;return{kind:J.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(C.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(C.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(n)}},t.parseVariable=function(){var n=this._lexer.token;return this.expectToken(C.DOLLAR),{kind:J.VARIABLE,name:this.parseName(),loc:this.loc(n)}},t.parseSelectionSet=function(){var n=this._lexer.token;return{kind:J.SELECTION_SET,selections:this.many(C.BRACE_L,this.parseSelection,C.BRACE_R),loc:this.loc(n)}},t.parseSelection=function(){return this.peek(C.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var n=this._lexer.token,a=this.parseName(),i,o;return this.expectOptionalToken(C.COLON)?(i=a,o=this.parseName()):o=a,{kind:J.FIELD,alias:i,name:o,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(C.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},t.parseArguments=function(n){var a=n?this.parseConstArgument:this.parseArgument;return this.optionalMany(C.PAREN_L,a,C.PAREN_R)},t.parseArgument=function(){var n=this._lexer.token,a=this.parseName();return this.expectToken(C.COLON),{kind:J.ARGUMENT,name:a,value:this.parseValueLiteral(!1),loc:this.loc(n)}},t.parseConstArgument=function(){var n=this._lexer.token;return{kind:J.ARGUMENT,name:this.parseName(),value:(this.expectToken(C.COLON),this.parseValueLiteral(!0)),loc:this.loc(n)}},t.parseFragment=function(){var n=this._lexer.token;this.expectToken(C.SPREAD);var a=this.expectOptionalKeyword("on");return!a&&this.peek(C.NAME)?{kind:J.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(n)}:{kind:J.INLINE_FRAGMENT,typeCondition:a?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}},t.parseFragmentDefinition=function(){var n,a=this._lexer.token;return this.expectKeyword("fragment"),((n=this._options)===null||n===void 0?void 0:n.experimentalFragmentVariables)===!0?{kind:J.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(a)}:{kind:J.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(a)}},t.parseFragmentName=function(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(n){var a=this._lexer.token;switch(a.kind){case C.BRACKET_L:return this.parseList(n);case C.BRACE_L:return this.parseObject(n);case C.INT:return this._lexer.advance(),{kind:J.INT,value:a.value,loc:this.loc(a)};case C.FLOAT:return this._lexer.advance(),{kind:J.FLOAT,value:a.value,loc:this.loc(a)};case C.STRING:case C.BLOCK_STRING:return this.parseStringLiteral();case C.NAME:switch(this._lexer.advance(),a.value){case"true":return{kind:J.BOOLEAN,value:!0,loc:this.loc(a)};case"false":return{kind:J.BOOLEAN,value:!1,loc:this.loc(a)};case"null":return{kind:J.NULL,loc:this.loc(a)};default:return{kind:J.ENUM,value:a.value,loc:this.loc(a)}}case C.DOLLAR:if(!n)return this.parseVariable();break}throw this.unexpected()},t.parseStringLiteral=function(){var n=this._lexer.token;return this._lexer.advance(),{kind:J.STRING,value:n.value,block:n.kind===C.BLOCK_STRING,loc:this.loc(n)}},t.parseList=function(n){var a=this,i=this._lexer.token,o=function(){return a.parseValueLiteral(n)};return{kind:J.LIST,values:this.any(C.BRACKET_L,o,C.BRACKET_R),loc:this.loc(i)}},t.parseObject=function(n){var a=this,i=this._lexer.token,o=function(){return a.parseObjectField(n)};return{kind:J.OBJECT,fields:this.any(C.BRACE_L,o,C.BRACE_R),loc:this.loc(i)}},t.parseObjectField=function(n){var a=this._lexer.token,i=this.parseName();return this.expectToken(C.COLON),{kind:J.OBJECT_FIELD,name:i,value:this.parseValueLiteral(n),loc:this.loc(a)}},t.parseDirectives=function(n){for(var a=[];this.peek(C.AT);)a.push(this.parseDirective(n));return a},t.parseDirective=function(n){var a=this._lexer.token;return this.expectToken(C.AT),{kind:J.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(n),loc:this.loc(a)}},t.parseTypeReference=function(){var n=this._lexer.token,a;return this.expectOptionalToken(C.BRACKET_L)?(a=this.parseTypeReference(),this.expectToken(C.BRACKET_R),a={kind:J.LIST_TYPE,type:a,loc:this.loc(n)}):a=this.parseNamedType(),this.expectOptionalToken(C.BANG)?{kind:J.NON_NULL_TYPE,type:a,loc:this.loc(n)}:a},t.parseNamedType=function(){var n=this._lexer.token;return{kind:J.NAMED_TYPE,name:this.parseName(),loc:this.loc(n)}},t.parseTypeSystemDefinition=function(){var n=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(n.kind===C.NAME)switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(n)},t.peekDescription=function(){return this.peek(C.STRING)||this.peek(C.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("schema");var i=this.parseDirectives(!0),o=this.many(C.BRACE_L,this.parseOperationTypeDefinition,C.BRACE_R);return{kind:J.SCHEMA_DEFINITION,description:a,directives:i,operationTypes:o,loc:this.loc(n)}},t.parseOperationTypeDefinition=function(){var n=this._lexer.token,a=this.parseOperationType();this.expectToken(C.COLON);var i=this.parseNamedType();return{kind:J.OPERATION_TYPE_DEFINITION,operation:a,type:i,loc:this.loc(n)}},t.parseScalarTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("scalar");var i=this.parseName(),o=this.parseDirectives(!0);return{kind:J.SCALAR_TYPE_DEFINITION,description:a,name:i,directives:o,loc:this.loc(n)}},t.parseObjectTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("type");var i=this.parseName(),o=this.parseImplementsInterfaces(),s=this.parseDirectives(!0),u=this.parseFieldsDefinition();return{kind:J.OBJECT_TYPE_DEFINITION,description:a,name:i,interfaces:o,directives:s,fields:u,loc:this.loc(n)}},t.parseImplementsInterfaces=function(){var n;if(!this.expectOptionalKeyword("implements"))return[];if(((n=this._options)===null||n===void 0?void 0:n.allowLegacySDLImplementsInterfaces)===!0){var a=[];this.expectOptionalToken(C.AMP);do a.push(this.parseNamedType());while(this.expectOptionalToken(C.AMP)||this.peek(C.NAME));return a}return this.delimitedMany(C.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var n;return((n=this._options)===null||n===void 0?void 0:n.allowLegacySDLEmptyFields)===!0&&this.peek(C.BRACE_L)&&this._lexer.lookahead().kind===C.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(C.BRACE_L,this.parseFieldDefinition,C.BRACE_R)},t.parseFieldDefinition=function(){var n=this._lexer.token,a=this.parseDescription(),i=this.parseName(),o=this.parseArgumentDefs();this.expectToken(C.COLON);var s=this.parseTypeReference(),u=this.parseDirectives(!0);return{kind:J.FIELD_DEFINITION,description:a,name:i,arguments:o,type:s,directives:u,loc:this.loc(n)}},t.parseArgumentDefs=function(){return this.optionalMany(C.PAREN_L,this.parseInputValueDef,C.PAREN_R)},t.parseInputValueDef=function(){var n=this._lexer.token,a=this.parseDescription(),i=this.parseName();this.expectToken(C.COLON);var o=this.parseTypeReference(),s;this.expectOptionalToken(C.EQUALS)&&(s=this.parseValueLiteral(!0));var u=this.parseDirectives(!0);return{kind:J.INPUT_VALUE_DEFINITION,description:a,name:i,type:o,defaultValue:s,directives:u,loc:this.loc(n)}},t.parseInterfaceTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("interface");var i=this.parseName(),o=this.parseImplementsInterfaces(),s=this.parseDirectives(!0),u=this.parseFieldsDefinition();return{kind:J.INTERFACE_TYPE_DEFINITION,description:a,name:i,interfaces:o,directives:s,fields:u,loc:this.loc(n)}},t.parseUnionTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("union");var i=this.parseName(),o=this.parseDirectives(!0),s=this.parseUnionMemberTypes();return{kind:J.UNION_TYPE_DEFINITION,description:a,name:i,directives:o,types:s,loc:this.loc(n)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(C.EQUALS)?this.delimitedMany(C.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("enum");var i=this.parseName(),o=this.parseDirectives(!0),s=this.parseEnumValuesDefinition();return{kind:J.ENUM_TYPE_DEFINITION,description:a,name:i,directives:o,values:s,loc:this.loc(n)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(C.BRACE_L,this.parseEnumValueDefinition,C.BRACE_R)},t.parseEnumValueDefinition=function(){var n=this._lexer.token,a=this.parseDescription(),i=this.parseName(),o=this.parseDirectives(!0);return{kind:J.ENUM_VALUE_DEFINITION,description:a,name:i,directives:o,loc:this.loc(n)}},t.parseInputObjectTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("input");var i=this.parseName(),o=this.parseDirectives(!0),s=this.parseInputFieldsDefinition();return{kind:J.INPUT_OBJECT_TYPE_DEFINITION,description:a,name:i,directives:o,fields:s,loc:this.loc(n)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(C.BRACE_L,this.parseInputValueDef,C.BRACE_R)},t.parseTypeSystemExtension=function(){var n=this._lexer.lookahead();if(n.kind===C.NAME)switch(n.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(n)},t.parseSchemaExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var a=this.parseDirectives(!0),i=this.optionalMany(C.BRACE_L,this.parseOperationTypeDefinition,C.BRACE_R);if(a.length===0&&i.length===0)throw this.unexpected();return{kind:J.SCHEMA_EXTENSION,directives:a,operationTypes:i,loc:this.loc(n)}},t.parseScalarTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var a=this.parseName(),i=this.parseDirectives(!0);if(i.length===0)throw this.unexpected();return{kind:J.SCALAR_TYPE_EXTENSION,name:a,directives:i,loc:this.loc(n)}},t.parseObjectTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var a=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),s=this.parseFieldsDefinition();if(i.length===0&&o.length===0&&s.length===0)throw this.unexpected();return{kind:J.OBJECT_TYPE_EXTENSION,name:a,interfaces:i,directives:o,fields:s,loc:this.loc(n)}},t.parseInterfaceTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var a=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),s=this.parseFieldsDefinition();if(i.length===0&&o.length===0&&s.length===0)throw this.unexpected();return{kind:J.INTERFACE_TYPE_EXTENSION,name:a,interfaces:i,directives:o,fields:s,loc:this.loc(n)}},t.parseUnionTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var a=this.parseName(),i=this.parseDirectives(!0),o=this.parseUnionMemberTypes();if(i.length===0&&o.length===0)throw this.unexpected();return{kind:J.UNION_TYPE_EXTENSION,name:a,directives:i,types:o,loc:this.loc(n)}},t.parseEnumTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var a=this.parseName(),i=this.parseDirectives(!0),o=this.parseEnumValuesDefinition();if(i.length===0&&o.length===0)throw this.unexpected();return{kind:J.ENUM_TYPE_EXTENSION,name:a,directives:i,values:o,loc:this.loc(n)}},t.parseInputObjectTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var a=this.parseName(),i=this.parseDirectives(!0),o=this.parseInputFieldsDefinition();if(i.length===0&&o.length===0)throw this.unexpected();return{kind:J.INPUT_OBJECT_TYPE_EXTENSION,name:a,directives:i,fields:o,loc:this.loc(n)}},t.parseDirectiveDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("directive"),this.expectToken(C.AT);var i=this.parseName(),o=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var u=this.parseDirectiveLocations();return{kind:J.DIRECTIVE_DEFINITION,description:a,name:i,arguments:o,repeatable:s,locations:u,loc:this.loc(n)}},t.parseDirectiveLocations=function(){return this.delimitedMany(C.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var n=this._lexer.token,a=this.parseName();if(PD[a.value]!==void 0)return a;throw this.unexpected(n)},t.loc=function(n){var a;if(((a=this._options)===null||a===void 0?void 0:a.noLocation)!==!0)return new Ap(n,this._lexer.lastToken,this._lexer.source)},t.peek=function(n){return this._lexer.token.kind===n},t.expectToken=function(n){var a=this._lexer.token;if(a.kind===n)return this._lexer.advance(),a;throw dt(this._lexer.source,a.start,"Expected ".concat(Mp(n),", found ").concat(Ho(a),"."))},t.expectOptionalToken=function(n){var a=this._lexer.token;if(a.kind===n)return this._lexer.advance(),a},t.expectKeyword=function(n){var a=this._lexer.token;if(a.kind===C.NAME&&a.value===n)this._lexer.advance();else throw dt(this._lexer.source,a.start,'Expected "'.concat(n,'", found ').concat(Ho(a),"."))},t.expectOptionalKeyword=function(n){var a=this._lexer.token;return a.kind===C.NAME&&a.value===n?(this._lexer.advance(),!0):!1},t.unexpected=function(n){var a=n??this._lexer.token;return dt(this._lexer.source,a.start,"Unexpected ".concat(Ho(a),"."))},t.any=function(n,a,i){this.expectToken(n);for(var o=[];!this.expectOptionalToken(i);)o.push(a.call(this));return o},t.optionalMany=function(n,a,i){if(this.expectOptionalToken(n)){var o=[];do o.push(a.call(this));while(!this.expectOptionalToken(i));return o}return[]},t.many=function(n,a,i){this.expectToken(n);var o=[];do o.push(a.call(this));while(!this.expectOptionalToken(i));return o},t.delimitedMany=function(n,a){this.expectOptionalToken(n);var i=[];do i.push(a.call(this));while(this.expectOptionalToken(n));return i},e}();function Ho(e){var t=e.value;return Mp(e.kind)+(t!=null?' "'.concat(t,'"'):"")}function Mp(e){return $D(e)?'"'.concat(e,'"'):e}function XD(e){var t;try{const n=JD(e).definitions.find(a=>a.kind==="OperationDefinition");return{operationType:n==null?void 0:n.operation,operationName:(t=n==null?void 0:n.name)===null||t===void 0?void 0:t.value}}catch(r){return r}}function ZD(e,t,r){const n={variables:e};for(const[a,i]of Object.entries(t)){if(!(a in r))throw new Error(`Given files do not have a key '${a}' .`);for(const o of i){const[s,...u]=o.split(".").reverse(),c=u.reverse();let l=n;for(const f of c){if(!(f in l))throw new Error(`Property '${c}' is not in operations.`);l=l[f]}l[s]=r[a]}}return n.variables}function e_(e){var t,r;switch(e.method){case"GET":{const n=e.url.searchParams.get("query"),a=e.url.searchParams.get("variables")||"";return{query:n,variables:Nr(a)}}case"POST":{if(!((t=e.body)===null||t===void 0)&&t.query){const{query:n,variables:a}=e.body;return{query:n,variables:a}}if(!((r=e.body)===null||r===void 0)&&r.operations){const n=e.body,{operations:a,map:i}=n,o=YI(n,["operations","map"]),s=Nr(a)||{};if(!s.query)return null;const u=Nr(i||"")||{},c=s.variables?ZD(s.variables,u,o):{};return{query:s.query,variables:c}}}default:return null}}function xp(e){const t=e_(e);if(!t||!t.query)return;const{query:r,variables:n}=t,a=XD(r);if(a instanceof Error){const i=wa(e);console.error(`[MSW] Failed to intercept a GraphQL request to "${e.method} ${i}": cannot parse query. See the error message from the parser below.`),console.error(a);return}return{operationType:a.operationType,operationName:a.operationName,variables:n}}const Pp={set:zi,status:Ki,delay:Zi,fetch:eo,data:lp,errors:fp};class no extends vu{constructor(t,r,n,a){const i=t==="all"?`${t} (origin: ${n.toString()})`:`${t} ${r} (origin: ${n.toString()})`;super({info:{header:i,operationType:t,operationName:r},ctx:Pp,resolver:a}),this.endpoint=n}parse(t){return xp(t)}getPublicRequest(t,r){return Object.assign(Object.assign({},t),{variables:(r==null?void 0:r.variables)||{}})}predicate(t,r){if(!r)return!1;if(!r.operationName){const o=wa(t);return console.warn(`[MSW] Failed to intercept a GraphQL request at "${t.method} ${o}": unnamed GraphQL operations are not supported. + +Consider naming this operation or using "graphql.operation" request handler to intercept GraphQL requests regardless of their operation name/type. Read more: https://mswjs.io/docs/api/graphql/operation `),!1}const n=pu(t.url,this.endpoint),a=this.info.operationType==="all"||r.operationType===this.info.operationType,i=this.info.operationName instanceof RegExp?this.info.operationName.test(r.operationName):r.operationName===this.info.operationName;return n.matches&&a&&i}log(t,r){const n=hp(t),a=yp(r);console.groupCollapsed("[MSW] %s %s (%c%s%c)",vp(),this.info.operationName,`color:${pp(r.status)}`,r.status,"color:inherit"),console.log("Request:",n),console.log("Handler:",this),console.log("Response:",a),console.groupEnd()}}function vi(e,t){return(r,n)=>new no(e,r,t,n)}function Fp(e){return t=>new no("all",new RegExp(".*"),e,t)}const t_={operation:Fp("*"),query:vi("query","*"),mutation:vi("mutation","*")};function r_(e){return{operation:Fp(e),query:vi("query",e),mutation:vi("mutation",e)}}const n_=Object.assign(Object.assign({},t_),{link:r_});function hu(e,t){return e.toLowerCase()===t.toLowerCase()}var Ut;(function(e){e.HEAD="HEAD",e.GET="GET",e.POST="POST",e.PUT="PUT",e.PATCH="PATCH",e.OPTIONS="OPTIONS",e.DELETE="DELETE"})(Ut||(Ut={}));const jp={set:zi,status:Ki,cookie:op,body:sp,text:up,json:Xi,xml:cp,delay:Zi,fetch:eo};class ao extends vu{constructor(t,r,n){super({info:{header:`${t} ${r}`,mask:r,method:t},ctx:jp,resolver:n}),this.checkRedundantQueryParameters()}checkRedundantQueryParameters(){const{method:t,mask:r}=this.info,n=wp(r);if(n instanceof URL&&n.search!==""){const a=[];n.searchParams.forEach((i,o)=>{a.push(o)}),console.warn(`[MSW] Found a redundant usage of query parameters in the request handler URL for "${t} ${r}". Please match against a path instead, and access query parameters in the response resolver function: + +rest.${t.toLowerCase()}("${n.pathname}", (req, res, ctx) => { + const query = req.url.searchParams +${a.map(i=>` const ${i} = query.get("${i}")`).join(` +`)} +}) `)}}parse(t){return pu(t.url,this.info.mask)}getPublicRequest(t,r){return Object.assign(Object.assign({},t),{params:r.params||{}})}predicate(t,r){return hu(this.info.method,t.method)&&r.matches}log(t,r){const n=wa(t),a=hp(t),i=yp(r);console.groupCollapsed("[MSW] %s %s %s (%c%s%c)",vp(),t.method,n,`color:${pp(r.status)}`,r.status,"color:inherit"),console.log("Request",a),console.log("Handler:",{mask:this.info.mask,resolver:this.resolver}),console.log("Response",i),console.groupEnd()}}function br(e){return(t,r)=>new ao(e,t,r)}const a_={head:br(Ut.HEAD),get:br(Ut.GET),post:br(Ut.POST),put:br(Ut.PUT),delete:br(Ut.DELETE),patch:br(Ut.PATCH),options:br(Ut.OPTIONS)};var cn=typeof Reflect=="object"?Reflect:null,cl=cn&&typeof cn.apply=="function"?cn.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},Ga;cn&&typeof cn.ownKeys=="function"?Ga=cn.ownKeys:Object.getOwnPropertySymbols?Ga=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Ga=function(t){return Object.getOwnPropertyNames(t)};function i_(e){console&&console.warn&&console.warn(e)}var Up=Number.isNaN||function(t){return t!==t};function Oe(){Oe.init.call(this)}var $p=Oe,o_=l_;Oe.EventEmitter=Oe;Oe.prototype._events=void 0;Oe.prototype._eventsCount=0;Oe.prototype._maxListeners=void 0;var ll=10;function io(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Oe,"defaultMaxListeners",{enumerable:!0,get:function(){return ll},set:function(e){if(typeof e!="number"||e<0||Up(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");ll=e}});Oe.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Oe.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Up(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Vp(e){return e._maxListeners===void 0?Oe.defaultMaxListeners:e._maxListeners}Oe.prototype.getMaxListeners=function(){return Vp(this)};Oe.prototype.emit=function(t){for(var r=[],n=1;n0&&(o=r[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var u=i[t];if(u===void 0)return!1;if(typeof u=="function")cl(u,this,r);else for(var c=u.length,l=Wp(u,c),n=0;n0&&o.length>a&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,i_(s)}return e}Oe.prototype.addListener=function(t,r){return qp(this,t,r,!1)};Oe.prototype.on=Oe.prototype.addListener;Oe.prototype.prependListener=function(t,r){return qp(this,t,r,!0)};function s_(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Bp(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=s_.bind(n);return a.listener=r,n.wrapFn=a,a}Oe.prototype.once=function(t,r){return io(r),this.on(t,Bp(this,t,r)),this};Oe.prototype.prependOnceListener=function(t,r){return io(r),this.prependListener(t,Bp(this,t,r)),this};Oe.prototype.removeListener=function(t,r){var n,a,i,o,s;if(io(r),a=this._events,a===void 0)return this;if(n=a[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete a[t],a.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){s=n[o].listener,i=o;break}if(i<0)return this;i===0?n.shift():u_(n,i),n.length===1&&(a[t]=n[0]),a.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};Oe.prototype.off=Oe.prototype.removeListener;Oe.prototype.removeAllListeners=function(t){var r,n,a;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i=Object.keys(n),o;for(a=0;a=0;a--)this.removeListener(t,r[a]);return this};function Hp(e,t,r){var n=e._events;if(n===void 0)return[];var a=n[t];return a===void 0?[]:typeof a=="function"?r?[a.listener||a]:[a]:r?c_(a):Wp(a,a.length)}Oe.prototype.listeners=function(t){return Hp(this,t,!0)};Oe.prototype.rawListeners=function(t){return Hp(this,t,!1)};Oe.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):Yp.call(e,t)};Oe.prototype.listenerCount=Yp;function Yp(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Oe.prototype.eventNames=function(){return this._eventsCount>0?Ga(this._events):[]};function Wp(e,t){for(var r=new Array(t),n=0;n{try{return[null,await e().catch(r=>{throw r})]}catch(t){return[t,null]}},h_=Object.defineProperty({until:v_},"__esModule",{value:!0}),hi=h_.until;const Yo=(e,t,r)=>[e.active,e.installing,e.waiting].filter(Boolean).find(o=>r(o.scriptURL,t))||null;function m_(e){return new URL(e,location.origin).href}const y_=(e,t={},r)=>Ct(void 0,void 0,void 0,function*(){const n=m_(e),a=yield navigator.serviceWorker.getRegistrations().then(u=>u.filter(c=>Yo(c,n,r)));!navigator.serviceWorker.controller&&a.length>0&&location.reload();const[i]=a;if(i)return i.update().then(()=>[Yo(i,n,r),i]);const[o,s]=yield hi(()=>Ct(void 0,void 0,void 0,function*(){const u=yield navigator.serviceWorker.register(e,t);return[Yo(u,n,r),u]}));if(o){if(o.message.includes("(404)")){const c=new URL((t==null?void 0:t.scope)||"/",location.href);throw new Error(`[MSW] Failed to register a Service Worker for scope ('${c.href}') with script ('${n}'): Service Worker script does not exist at the given path. + +Did you forget to run "npx msw init "? + +Learn more about creating the Service Worker script: https://mswjs.io/docs/cli/init`)}throw new Error(`[MSW] Failed to register a Service Worker: + +${o.message}`)}return s}),g_=(e,t)=>Ct(void 0,void 0,void 0,function*(){return e.workerChannel.send("MOCK_ACTIVATE"),e.events.once("MOCKING_ENABLED").then(()=>{t!=null&&t.quiet||(console.groupCollapsed("%c[MSW] Mocking enabled.","color:orangered;font-weight:bold;"),console.log("%cDocumentation: %chttps://mswjs.io/docs","font-weight:bold","font-weight:normal"),console.log("Found an issue? https://github.com/mswjs/msw/issues"),console.groupEnd())})}),E_=e=>{const t=e.ports[0];return{send(r){t&&t.postMessage(r)}}},w_=(e,t)=>Ct(void 0,void 0,void 0,function*(){const r=t.filter(a=>a.test(e));if(r.length===0)return{handler:void 0,response:void 0};const n=yield r.reduce((a,i)=>Ct(void 0,void 0,void 0,function*(){const o=yield a;if(o!=null&&o.response)return a;const s=yield i.run(e);return s===null||s.handler.shouldSkip?null:s.response?(s.response.once&&i.markAsSkipped(!0),s):{request:s.request,handler:s.handler,response:void 0,parsedResult:s.parsedResult}}),Promise.resolve(null));return n?{handler:n.handler,publicRequest:n.request,parsedRequest:n.parsedResult,response:n.response}:{handler:void 0,response:void 0}});var Qp=function(){function e(t,r,n,a,i){return tn?n+1:t+1:a===i?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var a=t.length,i=r.length;a>0&&t.charCodeAt(a-1)===r.charCodeAt(i-1);)a--,i--;for(var o=0;o(r instanceof ao&&t.rest.push(r),r instanceof no&&t.graphql.push(r),t),{rest:[],graphql:[]})}function I_(){return(e,t)=>{const{mask:r,method:n}=t.info;if(r instanceof RegExp)return 1/0;const i=hu(e.method,n)?Kp:0,o=wa(e);return Qp(o,r)-i}}function D_(e){return(t,r)=>{if(typeof e.operationName>"u")return 1/0;const{operationType:n,operationName:a}=r.info,o=e.operationType===n?Kp:0;return Qp(e.operationName,a)-o}}function __(e,t,r){return t.reduce((a,i)=>{const o=r(e,i);return a.concat([[o,i]])},[]).sort(([a],[i])=>a-i).filter(([a])=>a<=T_).slice(0,b_).map(([,a])=>a)}function N_(e){return e.length>1?`Did you mean to request one of the following resources instead? + +${e.map(t=>` • ${t.info.header}`).join(` +`)}`:`Did you mean to request "${e[0].info.header}" instead?`}function S_(e,t,r="bypass"){if(typeof r=="function"){r(e);return}const n=xp(e),a=O_(t),i=n?a.graphql:a.rest,o=__(e,i,n?D_(n):I_()),s=o.length>0?N_(o):"",u=wa(e),f=["captured a request without a matching request handler:",` • ${n?`${n.operationType} ${n.operationName} (${e.method} ${u})`:`${e.method} ${u}`}`,s,`If you still wish to intercept this unhandled request, please create a request handler for it. +Read more: https://mswjs.io/docs/getting-started/mocks`].filter(Boolean).join(` + +`);switch(r){case"error":{console.error(`[MSW] Error: ${f}`);break}case"warn":{console.warn(`[MSW] Warning: ${f}`);break}default:return}}var tn={decodeValues:!0,map:!1,silent:!1};function ws(e){return typeof e=="string"&&!!e.trim()}function Ts(e,t){var r=e.split(";").filter(ws),n=r.shift().split("="),a=n.shift(),i=n.join("=");t=t?Object.assign({},tn,t):tn;try{i=t.decodeValues?decodeURIComponent(i):i}catch(s){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+i+"'. Set options.decodeValues to false to disable this feature.",s)}var o={name:a,value:i};return r.forEach(function(s){var u=s.split("="),c=u.shift().trimLeft().toLowerCase(),l=u.join("=");c==="expires"?o.expires=new Date(l):c==="max-age"?o.maxAge=parseInt(l,10):c==="secure"?o.secure=!0:c==="httponly"?o.httpOnly=!0:c==="samesite"?o.sameSite=l:o[c]=l}),o}function Jp(e,t){if(t=t?Object.assign({},tn,t):tn,!e)return t.map?{}:[];if(e.headers&&e.headers["set-cookie"])e=e.headers["set-cookie"];else if(e.headers){var r=e.headers[Object.keys(e.headers).find(function(a){return a.toLowerCase()==="set-cookie"})];!r&&e.headers.cookie&&!t.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=r}if(Array.isArray(e)||(e=[e]),t=t?Object.assign({},tn,t):tn,t.map){var n={};return e.filter(ws).reduce(function(a,i){var o=Ts(i,t);return a[o.name]=o,a},n)}else return e.filter(ws).map(function(a){return Ts(a,t)})}function k_(e){if(Array.isArray(e))return e;if(typeof e!="string")return[];var t=[],r=0,n,a,i,o,s;function u(){for(;r=e.length)&&t.push(e.substring(n,e.length))}return t}var ea=Jp,R_=Jp,A_=Ts,C_=k_;ea.parse=R_;ea.parseString=A_;ea.splitCookiesString=C_;var fl=Ze(function(e,t){var r=Ne&&Ne.__rest||function(a,i){var o={};for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&i.indexOf(s)<0&&(o[s]=a[s]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,s=Object.getOwnPropertySymbols(a);u{var{maxAge:p}=d,v=r(d,["maxAge"]);return Object.assign(Object.assign({},v),{expires:p===void 0?v.expires:new Date(c+p*1e3),maxAge:p})}).filter(({expires:d})=>d===void 0||d.getTime()>c),f=this.store.get(s.origin)||new Map;l.forEach(d=>{this.store.set(s.origin,f.set(d.name,d))})}get(i){this.deleteExpiredCookies();const o=new URL(i.url),s=this.store.get(o.origin)||new Map;switch(i.credentials){case"include":return ea.parse(document.cookie).forEach(c=>{s.set(c.name,c)}),s;case"same-origin":return s;default:return new Map}}getAll(){return this.deleteExpiredCookies(),this.store}deleteAll(i){const o=new URL(i.url);this.store.delete(o.origin)}clear(){this.store.clear()}hydrate(){if(!this.supportsPersistency)return;const i=localStorage.getItem(t.PERSISTENCY_KEY);if(i)try{JSON.parse(i).forEach(([s,u])=>{this.store.set(s,new Map(u.map(c=>{var[l,f]=c,{expires:d}=f,p=r(f,["expires"]);return[l,d===void 0?p:Object.assign(Object.assign({},p),{expires:new Date(d)})]})))})}catch(o){console.warn(` +[virtual-cookie] Failed to parse a stored cookie from the localStorage (key "${t.PERSISTENCY_KEY}"). + +Stored value: +${localStorage.getItem(t.PERSISTENCY_KEY)} + +Thrown exception: +${o} + +Invalid value has been removed from localStorage to prevent subsequent failed parsing attempts.`),localStorage.removeItem(t.PERSISTENCY_KEY)}}persist(){if(!this.supportsPersistency)return;const i=Array.from(this.store.entries()).map(([o,s])=>[o,Array.from(s.entries())]);localStorage.setItem(t.PERSISTENCY_KEY,JSON.stringify(i))}deleteExpiredCookies(){const i=Date.now();this.store.forEach((o,s)=>{o.forEach(({expires:u,name:c})=>{u!==void 0&&u.getTime()<=i&&o.delete(c)}),o.size===0&&this.store.delete(s)})}}t.default=new n}),mi=Ze(function(e,t){var r=Ne&&Ne.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0}),t.PERSISTENCY_KEY=t.store=void 0,Object.defineProperty(t,"store",{enumerable:!0,get:function(){return r(fl).default}}),Object.defineProperty(t,"PERSISTENCY_KEY",{enumerable:!0,get:function(){return fl.PERSISTENCY_KEY}})});function dl(){return PI(document.cookie)}function L_(e){if(typeof location>"u")return{};switch(e.credentials){case"same-origin":return location.origin===e.url.origin?dl():{};case"include":return dl();default:return{}}}function zp(e){var t;mi.store.hydrate(),e.cookies=Object.assign(Object.assign({},L_(e)),Array.from((t=mi.store.get(Object.assign(Object.assign({},e),{url:e.url.toString()})))===null||t===void 0?void 0:t.entries()).reduce((r,[n,{value:a}])=>Object.assign(r,{[n]:a}),{})),e.headers.set("cookie",Object.entries(e.cookies).map(([r,n])=>`${r}=${n}`).join("; "))}function M_(e){if(!(e.method&&hu(e.method,"GET")&&e.body===""))return e.body}function x_(e){const t={id:e.id,cache:e.cache,credentials:e.credentials,method:e.method,url:new URL(e.url),referrer:e.referrer,referrerPolicy:e.referrerPolicy,redirect:e.redirect,mode:e.mode,params:{},cookies:{},integrity:e.integrity,keepalive:e.keepalive,destination:e.destination,body:M_(e),bodyUsed:e.bodyUsed,headers:new Vr.Headers(e.headers)};return zp(t),t.body=mp(t.body,t.headers),t}function P_(e,t){mi.store.add(Object.assign(Object.assign({},e),{url:e.url.toString()}),t),mi.store.persist()}const F_=(e,t)=>(r,n)=>Ct(void 0,void 0,void 0,function*(){const a=E_(r);try{const i=x_(n.payload);e.emitter.emit("request:start",i),zp(i);const{response:o,handler:s,publicRequest:u,parsedRequest:c}=yield w_(i,e.requestHandlers);if(!s)return S_(i,e.requestHandlers,t.onUnhandledRequest),e.emitter.emit("request:unhandled",i),e.emitter.emit("request:end",i),a.send({type:"MOCK_NOT_FOUND"});if(e.emitter.emit("request:match",i),!o)return console.warn("[MSW] Expected a mocking resolver function to return a mocked response Object, but got: %s. Original response is going to be used instead.",o),e.emitter.emit("request:end",i),a.send({type:"MOCK_NOT_FOUND"});P_(i,o);const l=Object.assign(Object.assign({},o),{headers:Vr.headersToList(o.headers)});t.quiet||setTimeout(()=>{s.log(u,l,s,c)},o.delay),e.emitter.emit("request:end",i),a.send({type:"MOCK_SUCCESS",payload:l})}catch(i){if(i instanceof bp)return a.send({type:"NETWORK_ERROR",payload:{name:i.name,message:i.message}});a.send({type:"INTERNAL_ERROR",payload:{status:500,body:JSON.stringify({errorType:i.constructor.name,message:i.message,location:i.stack})}})}});function j_(e,t){return Ct(this,void 0,void 0,function*(){e.workerChannel.send("INTEGRITY_CHECK_REQUEST");const{payload:r}=yield e.events.once("INTEGRITY_CHECK_RESPONSE");if(r!=="82ef9b96d8393b6da34527d1d6e19187")throw new Error(`Currently active Service Worker (${r}) is behind the latest published one (82ef9b96d8393b6da34527d1d6e19187).`);return t})}function U_(e){const t=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.send=function(...n){hi(()=>e).then(()=>{window.XMLHttpRequest.prototype.send=t,this.send(...n)})};const r=window.fetch;window.fetch=(...n)=>Ct(this,void 0,void 0,function*(){return yield hi(()=>e),window.fetch=r,window.fetch(...n)})}function $_(e){return(t,r)=>{var n;const{payload:a}=r;if(!((n=a.type)===null||n===void 0)&&n.includes("opaque"))return;const i=new Response(a.body||null,a);i.headers.get("x-powered-by")==="msw"?e.emitter.emit("response:mocked",i,a.requestId):e.emitter.emit("response:bypass",i,a.requestId)}}const V_={serviceWorker:{url:"/mockServiceWorker.js",options:null},quiet:!1,waitUntilReady:!0,onUnhandledRequest:"bypass",findWorker:(e,t)=>e===t},q_=e=>function(r){const n=to(V_,r||{});e.startOptions=n;const i=Ct(this,void 0,void 0,function*(){if(!("serviceWorker"in navigator))throw new Error("[MSW] Failed to register a Service Worker: this browser does not support Service Workers (see https://caniuse.com/serviceworkers), or your application is running on an insecure host (consider using HTTPS for custom hostnames).");e.events.removeAllListeners(),e.workerChannel.on("REQUEST",F_(e,n)),e.workerChannel.on("RESPONSE",$_(e));const o=yield y_(n.serviceWorker.url,n.serviceWorker.options,n.findWorker),[s,u]=o;if(!s){const l=r!=null&&r.findWorker?`[MSW] Failed to locate the Service Worker registration using a custom "findWorker" predicate. + +Please ensure that the custom predicate properly locates the Service Worker registration at "${n.serviceWorker.url}". +More details: https://mswjs.io/docs/api/setup-worker/start#findworker +`:`[MSW] Failed to locate the Service Worker registration. + +This most likely means that the worker script URL "${n.serviceWorker.url}" cannot resolve against the actual public hostname (${location.host}). This may happen if your application runs behind a proxy, or has a dynamic hostname. + +Please consider using a custom "serviceWorker.url" option to point to the actual worker script location, or a custom "findWorker" option to resolve the Service Worker registration manually. More details: https://mswjs.io/docs/api/setup-worker/start`;throw new Error(l)}e.worker=s,e.registration=u,e.events.addListener(window,"beforeunload",()=>{s.state!=="redundant"&&e.workerChannel.send("CLIENT_CLOSED"),window.clearInterval(e.keepAliveInterval)});const[c]=yield hi(()=>j_(e,s));return c&&console.error(`[MSW] Detected outdated Service Worker: ${c.message} + +The mocking is still enabled, but it's highly recommended that you update your Service Worker by running: + +$ npx msw init + +This is necessary to ensure that the Service Worker is in sync with the library to guarantee its stability. +If this message still persists after updating, please report an issue: https://github.com/open-draft/msw/issues `),yield g_(e,r).catch(l=>{throw new Error(`Failed to enable mocking: ${l==null?void 0:l.message}`)}),e.keepAliveInterval=window.setInterval(()=>e.workerChannel.send("KEEPALIVE_REQUEST"),5e3),u});return n.waitUntilReady&&U_(i),i},B_=e=>function(){var r;e.workerChannel.send("MOCK_DEACTIVATE"),e.events.removeAllListeners(),e.emitter.removeAllListeners(),window.clearInterval(e.keepAliveInterval),!((r=e.startOptions)===null||r===void 0)&&r.quiet||console.log("%c[MSW] Mocking disabled.","color:orangered;font-weight:bold;")};function H_(e,...t){e.unshift(...t)}function Y_(e){e.forEach(t=>{t.markAsSkipped(!1)})}function W_(e,...t){return t.length>0?[...t]:[...e]}let Wo=[];function G_(...e){e.forEach(r=>{if(Array.isArray(r))throw new Error('[MSW] Failed to call "setupWorker" given an Array of request handlers (setupWorker([a, b])), expected to receive each handler individually: setupWorker(a, b).')});const t={startOptions:void 0,worker:null,registration:null,requestHandlers:[...e],emitter:new p_.StrictEventEmitter,workerChannel:{on(r,n){t.events.addListener(navigator.serviceWorker,"message",a=>{if(a.source!==t.worker)return;const i=Nr(a.data);i&&i.type===r&&n(a,i)})},send(r){var n;(n=t.worker)===null||n===void 0||n.postMessage(r)}},events:{addListener(r,n,a){return r.addEventListener(n,a),Wo.push({eventType:n,target:r,callback:a}),()=>{r.removeEventListener(n,a)}},removeAllListeners(){for(const{target:r,eventType:n,callback:a}of Wo)r.removeEventListener(n,a);Wo=[]},once(r){const n=[];return new Promise((a,i)=>{const o=s=>{try{const u=JSON.parse(s.data);u.type===r&&a(u)}catch(u){i(u)}};n.push(t.events.addListener(navigator.serviceWorker,"message",o),t.events.addListener(navigator.serviceWorker,"messageerror",i))}).finally(()=>{n.forEach(a=>a())})}}};if(du())throw new Error("[MSW] Failed to execute `setupWorker` in a non-browser environment. Consider using `setupServer` for Node.js environment instead.");return{start:q_(t),stop:B_(t),use(...r){console.log("adding new handlers",r),H_(t.requestHandlers,...r)},restoreHandlers(){Y_(t.requestHandlers)},resetHandlers(...r){t.requestHandlers=W_(e,...r)},printHandlers(){t.requestHandlers.forEach(r=>{const{header:n,callFrame:a}=r.info,i=r.info.hasOwnProperty("operationType")?"[graphql]":"[rest]";console.groupCollapsed(`${i} ${n}`),a&&console.log(`Declaration: ${a}`),console.log("Handler:",r),r instanceof ao&&console.log("Match:",`https://mswjs.io/repl?path=${r.info.mask}`),console.groupEnd()})},on(r,n){t.emitter.addListener(r,n)}}}const Q_=Object.freeze(Object.defineProperty({__proto__:null,GraphQLHandler:no,get RESTMethods(){return Ut},RequestHandler:vu,RestHandler:ao,compose:Tp,context:HI,createResponseComposition:ms,defaultContext:Dp,defaultResponse:Op,graphql:n_,graphqlContext:Pp,matchRequestUrl:pu,response:Ip,rest:a_,restContext:jp,setupWorker:G_},Symbol.toStringTag,{value:"Module"})),Xp=Ms(Q_);var K_=Y&&Y.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Bt.__esModule=!0;Bt.generateRestHandlers=Bt.withErrors=Bt.getResponseStatusByErrorType=Bt.createUrlBuilder=void 0;var J_=K_(ap),Vn=Xp,pl=cu;function Zp(e){return function(t){var r=new URL(t,e||"http://localhost");return e?r.toString():r.pathname}}Bt.createUrlBuilder=Zp;function ev(e){switch(e.type){case pl.OperationErrorType.EntityNotFound:return 404;case pl.OperationErrorType.DuplicatePrimaryKey:return 409;default:return 500}}Bt.getResponseStatusByErrorType=ev;function Zr(e){return function(t,r,n){try{return e(t,r,n)}catch(a){return r(n.status(ev(a)),n.json({message:a.message}))}}}Bt.withErrors=Zr;function z_(e,t,r,n){n===void 0&&(n="");var a=J_.default(e),i=Zp(n);return[Vn.rest.get(i(a),Zr(function(o,s,u){var c=o.url.searchParams.get("cursor"),l=o.url.searchParams.get("skip"),f=o.url.searchParams.get("take"),d=parseInt(l??"0",10),p=f==null?f:parseInt(f,10),v={where:{}};p&&!isNaN(p)&&!isNaN(d)&&(v=Object.assign(v,{take:p,skip:d})),p&&!isNaN(p)&&c&&(v=Object.assign(v,{take:p,cursor:c}));var h=r.findMany(v);return s(u.json(h))})),Vn.rest.get(i(a+"/:"+t),Zr(function(o,s,u){var c,l=o.params[t],f=(c={},c[t]={equals:l},c),d=r.findFirst({strict:!0,where:f});return s(u.json(d))})),Vn.rest.post(i(a),Zr(function(o,s,u){var c=r.create(o.body);return s(u.status(201),u.json(c))})),Vn.rest.put(i(a+"/:"+t),Zr(function(o,s,u){var c,l=o.params[t],f=(c={},c[t]={equals:l},c),d=r.update({strict:!0,where:f,data:o.body});return s(u.json(d))})),Vn.rest.delete(i(a+"/:"+t),Zr(function(o,s,u){var c,l=o.params[t],f=(c={},c[t]={equals:l},c),d=r.delete({strict:!0,where:f});return s(u.json(d))}))]}Bt.generateRestHandlers=z_;var tv={},X_="15.8.0",Z_=Object.freeze({major:15,minor:8,patch:0,preReleaseTag:null});function lt(e){return typeof(e==null?void 0:e.then)=="function"}function Qa(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Qa=function(r){return typeof r}:Qa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Qa(e)}function vt(e){return Qa(e)=="object"&&e!==null}var rv=typeof Symbol=="function"&&Symbol.iterator!=null?Symbol.iterator:"@@iterator",bs=typeof Symbol=="function"&&Symbol.asyncIterator!=null?Symbol.asyncIterator:"@@asyncIterator",It=typeof Symbol=="function"&&Symbol.toStringTag!=null?Symbol.toStringTag:"@@toStringTag";function yi(e,t){for(var r=/\r\n|[\n\r]/g,n=1,a=t+1,i;(i=r.exec(e.body))&&i.index120){for(var d=Math.floor(u/80),p=u%80,v=[],h=0;h"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function uN(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function ta(e,t){return ta=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},ta(e,t)}function ra(e){return ra=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ra(e)}var k=function(e){oN(r,e);var t=sN(r);function r(n,a,i,o,s,u,c){var l,f,d,p;nN(this,r),p=t.call(this,n),p.name="GraphQLError",p.originalError=u??void 0,p.nodes=ml(Array.isArray(a)?a:a?[a]:void 0);for(var v=[],h=0,m=(w=p.nodes)!==null&&w!==void 0?w:[];h0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),u!=null&&u.stack?(Object.defineProperty(Hn(p),"stack",{value:u.stack,writable:!0,configurable:!0}),av(p)):(Error.captureStackTrace?Error.captureStackTrace(Hn(p),r):Object.defineProperty(Hn(p),"stack",{value:Error().stack,writable:!0,configurable:!0}),p)}return iN(r,[{key:"toString",value:function(){return ov(this)}},{key:It,get:function(){return"Object"}}]),r}(Os(Error));function ml(e){return e===void 0||e.length===0?void 0:e}function ov(e){var t=e.message;if(e.nodes)for(var r=0,n=e.nodes;r",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function Xa(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Xa=function(r){return typeof r}:Xa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Xa(e)}var cN=10,sv=2;function S(e){return oo(e,[])}function oo(e,t){switch(Xa(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return e===null?"null":lN(e,t);default:return String(e)}}function lN(e,t){if(t.indexOf(e)!==-1)return"[Circular]";var r=[].concat(t,[e]),n=pN(e);if(n!==void 0){var a=n.call(e);if(a!==e)return typeof a=="string"?a:oo(a,r)}else if(Array.isArray(e))return dN(e,r);return fN(e,r)}function fN(e,t){var r=Object.keys(e);if(r.length===0)return"{}";if(t.length>sv)return"["+vN(e)+"]";var n=r.map(function(a){var i=oo(e[a],t);return a+": "+i});return"{ "+n.join(", ")+" }"}function dN(e,t){if(e.length===0)return"[]";if(t.length>sv)return"[Array]";for(var r=Math.min(cN,e.length),n=e.length-r,a=[],i=0;i1&&a.push("... ".concat(n," more items")),"["+a.join(", ")+"]"}function pN(e){var t=e[String(Is)];if(typeof t=="function")return t;if(typeof e.inspect=="function")return e.inspect}function vN(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){var r=e.constructor.name;if(typeof r=="string"&&r!=="")return r}return t}function ee(e,t){var r=!!e;if(!r)throw new Error(t)}const Pt=function(t,r){return t instanceof r};function hN(e,t){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:"GraphQL request",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{line:1,column:1};typeof t=="string"||ee(0,"Body must be a string. Received: ".concat(S(t),".")),this.body=t,this.name=r,this.locationOffset=n,this.locationOffset.line>0||ee(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||ee(0,"column in locationOffset is 1-indexed and must be positive.")}return mN(e,[{key:It,get:function(){return"Source"}}]),e}();function uv(e){return Pt(e,so)}var K=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function gu(e){var t=e.split(/\r\n|[\n\r]/g),r=cv(e);if(r!==0)for(var n=1;na&&yl(t[i-1]);)--i;return t.slice(a,i).join(` +`)}function yl(e){for(var t=0;t1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=e.indexOf(` +`)===-1,a=e[0]===" "||e[0]===" ",i=e[e.length-1]==='"',o=e[e.length-1]==="\\",s=!n||i||o||r,u="";return s&&!(n&&a)&&(u+=` +`+t),u+=t?e.replace(/\n/g,` +`+t):e,s&&(u+=` +`),'"""'+u.replace(/"""/g,'\\"""')+'"""'}var Eu=function(){function e(r){var n=new Pe(N.SOF,0,0,0,0,null);this.source=r,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){this.lastToken=this.token;var n=this.token=this.lookahead();return n},t.lookahead=function(){var n=this.token;if(n.kind!==N.EOF)do{var a;n=(a=n.next)!==null&&a!==void 0?a:n.next=yN(this,n)}while(n.kind===N.COMMENT);return n},e}();function fv(e){return e===N.BANG||e===N.DOLLAR||e===N.AMP||e===N.PAREN_L||e===N.PAREN_R||e===N.SPREAD||e===N.COLON||e===N.EQUALS||e===N.AT||e===N.BRACKET_L||e===N.BRACKET_R||e===N.BRACE_L||e===N.PIPE||e===N.BRACE_R}function Mr(e){return isNaN(e)?N.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function yN(e,t){for(var r=e.source,n=r.body,a=n.length,i=t.end;i31||o===9));return new Pe(N.COMMENT,t,s,r,n,a,i.slice(t+1,s))}function wN(e,t,r,n,a,i){var o=e.body,s=r,u=t,c=!1;if(s===45&&(s=o.charCodeAt(++u)),s===48){if(s=o.charCodeAt(++u),s>=48&&s<=57)throw ct(e,u,"Invalid number, unexpected digit after 0: ".concat(Mr(s),"."))}else u=Go(e,u,s),s=o.charCodeAt(u);if(s===46&&(c=!0,s=o.charCodeAt(++u),u=Go(e,u,s),s=o.charCodeAt(u)),(s===69||s===101)&&(c=!0,s=o.charCodeAt(++u),(s===43||s===45)&&(s=o.charCodeAt(++u)),u=Go(e,u,s),s=o.charCodeAt(u)),s===46||DN(s))throw ct(e,u,"Invalid number, expected digit but got: ".concat(Mr(s),"."));return new Pe(c?N.FLOAT:N.INT,t,u,n,a,i,o.slice(t,u))}function Go(e,t,r){var n=e.body,a=t,i=r;if(i>=48&&i<=57){do i=n.charCodeAt(++a);while(i>=48&&i<=57);return a}throw ct(e,a,"Invalid number, expected digit but got: ".concat(Mr(i),"."))}function TN(e,t,r,n,a){for(var i=e.body,o=t+1,s=o,u=0,c="";o=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function IN(e,t,r,n,a){for(var i=e.body,o=i.length,s=t+1,u=0;s!==o&&!isNaN(u=i.charCodeAt(s))&&(u===95||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++s;return new Pe(N.NAME,t,s,r,n,a,i.slice(t,s))}function DN(e){return e===95||e>=65&&e<=90||e>=97&&e<=122}function uo(e,t){var r=new wu(e,t);return r.parseDocument()}function dv(e,t){var r=new wu(e,t);r.expectToken(N.SOF);var n=r.parseValueLiteral(!1);return r.expectToken(N.EOF),n}function _N(e,t){var r=new wu(e,t);r.expectToken(N.SOF);var n=r.parseTypeReference();return r.expectToken(N.EOF),n}var wu=function(){function e(r,n){var a=uv(r)?r:new so(r);this._lexer=new Eu(a),this._options=n}var t=e.prototype;return t.parseName=function(){var n=this.expectToken(N.NAME);return{kind:E.NAME,value:n.value,loc:this.loc(n)}},t.parseDocument=function(){var n=this._lexer.token;return{kind:E.DOCUMENT,definitions:this.many(N.SOF,this.parseDefinition,N.EOF),loc:this.loc(n)}},t.parseDefinition=function(){if(this.peek(N.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(N.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var n=this._lexer.token;if(this.peek(N.BRACE_L))return{kind:E.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(n)};var a=this.parseOperationType(),i;return this.peek(N.NAME)&&(i=this.parseName()),{kind:E.OPERATION_DEFINITION,operation:a,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}},t.parseOperationType=function(){var n=this.expectToken(N.NAME);switch(n.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(n)},t.parseVariableDefinitions=function(){return this.optionalMany(N.PAREN_L,this.parseVariableDefinition,N.PAREN_R)},t.parseVariableDefinition=function(){var n=this._lexer.token;return{kind:E.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(N.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(N.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(n)}},t.parseVariable=function(){var n=this._lexer.token;return this.expectToken(N.DOLLAR),{kind:E.VARIABLE,name:this.parseName(),loc:this.loc(n)}},t.parseSelectionSet=function(){var n=this._lexer.token;return{kind:E.SELECTION_SET,selections:this.many(N.BRACE_L,this.parseSelection,N.BRACE_R),loc:this.loc(n)}},t.parseSelection=function(){return this.peek(N.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var n=this._lexer.token,a=this.parseName(),i,o;return this.expectOptionalToken(N.COLON)?(i=a,o=this.parseName()):o=a,{kind:E.FIELD,alias:i,name:o,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(N.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},t.parseArguments=function(n){var a=n?this.parseConstArgument:this.parseArgument;return this.optionalMany(N.PAREN_L,a,N.PAREN_R)},t.parseArgument=function(){var n=this._lexer.token,a=this.parseName();return this.expectToken(N.COLON),{kind:E.ARGUMENT,name:a,value:this.parseValueLiteral(!1),loc:this.loc(n)}},t.parseConstArgument=function(){var n=this._lexer.token;return{kind:E.ARGUMENT,name:this.parseName(),value:(this.expectToken(N.COLON),this.parseValueLiteral(!0)),loc:this.loc(n)}},t.parseFragment=function(){var n=this._lexer.token;this.expectToken(N.SPREAD);var a=this.expectOptionalKeyword("on");return!a&&this.peek(N.NAME)?{kind:E.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(n)}:{kind:E.INLINE_FRAGMENT,typeCondition:a?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}},t.parseFragmentDefinition=function(){var n,a=this._lexer.token;return this.expectKeyword("fragment"),((n=this._options)===null||n===void 0?void 0:n.experimentalFragmentVariables)===!0?{kind:E.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(a)}:{kind:E.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(a)}},t.parseFragmentName=function(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(n){var a=this._lexer.token;switch(a.kind){case N.BRACKET_L:return this.parseList(n);case N.BRACE_L:return this.parseObject(n);case N.INT:return this._lexer.advance(),{kind:E.INT,value:a.value,loc:this.loc(a)};case N.FLOAT:return this._lexer.advance(),{kind:E.FLOAT,value:a.value,loc:this.loc(a)};case N.STRING:case N.BLOCK_STRING:return this.parseStringLiteral();case N.NAME:switch(this._lexer.advance(),a.value){case"true":return{kind:E.BOOLEAN,value:!0,loc:this.loc(a)};case"false":return{kind:E.BOOLEAN,value:!1,loc:this.loc(a)};case"null":return{kind:E.NULL,loc:this.loc(a)};default:return{kind:E.ENUM,value:a.value,loc:this.loc(a)}}case N.DOLLAR:if(!n)return this.parseVariable();break}throw this.unexpected()},t.parseStringLiteral=function(){var n=this._lexer.token;return this._lexer.advance(),{kind:E.STRING,value:n.value,block:n.kind===N.BLOCK_STRING,loc:this.loc(n)}},t.parseList=function(n){var a=this,i=this._lexer.token,o=function(){return a.parseValueLiteral(n)};return{kind:E.LIST,values:this.any(N.BRACKET_L,o,N.BRACKET_R),loc:this.loc(i)}},t.parseObject=function(n){var a=this,i=this._lexer.token,o=function(){return a.parseObjectField(n)};return{kind:E.OBJECT,fields:this.any(N.BRACE_L,o,N.BRACE_R),loc:this.loc(i)}},t.parseObjectField=function(n){var a=this._lexer.token,i=this.parseName();return this.expectToken(N.COLON),{kind:E.OBJECT_FIELD,name:i,value:this.parseValueLiteral(n),loc:this.loc(a)}},t.parseDirectives=function(n){for(var a=[];this.peek(N.AT);)a.push(this.parseDirective(n));return a},t.parseDirective=function(n){var a=this._lexer.token;return this.expectToken(N.AT),{kind:E.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(n),loc:this.loc(a)}},t.parseTypeReference=function(){var n=this._lexer.token,a;return this.expectOptionalToken(N.BRACKET_L)?(a=this.parseTypeReference(),this.expectToken(N.BRACKET_R),a={kind:E.LIST_TYPE,type:a,loc:this.loc(n)}):a=this.parseNamedType(),this.expectOptionalToken(N.BANG)?{kind:E.NON_NULL_TYPE,type:a,loc:this.loc(n)}:a},t.parseNamedType=function(){var n=this._lexer.token;return{kind:E.NAMED_TYPE,name:this.parseName(),loc:this.loc(n)}},t.parseTypeSystemDefinition=function(){var n=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(n.kind===N.NAME)switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(n)},t.peekDescription=function(){return this.peek(N.STRING)||this.peek(N.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("schema");var i=this.parseDirectives(!0),o=this.many(N.BRACE_L,this.parseOperationTypeDefinition,N.BRACE_R);return{kind:E.SCHEMA_DEFINITION,description:a,directives:i,operationTypes:o,loc:this.loc(n)}},t.parseOperationTypeDefinition=function(){var n=this._lexer.token,a=this.parseOperationType();this.expectToken(N.COLON);var i=this.parseNamedType();return{kind:E.OPERATION_TYPE_DEFINITION,operation:a,type:i,loc:this.loc(n)}},t.parseScalarTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("scalar");var i=this.parseName(),o=this.parseDirectives(!0);return{kind:E.SCALAR_TYPE_DEFINITION,description:a,name:i,directives:o,loc:this.loc(n)}},t.parseObjectTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("type");var i=this.parseName(),o=this.parseImplementsInterfaces(),s=this.parseDirectives(!0),u=this.parseFieldsDefinition();return{kind:E.OBJECT_TYPE_DEFINITION,description:a,name:i,interfaces:o,directives:s,fields:u,loc:this.loc(n)}},t.parseImplementsInterfaces=function(){var n;if(!this.expectOptionalKeyword("implements"))return[];if(((n=this._options)===null||n===void 0?void 0:n.allowLegacySDLImplementsInterfaces)===!0){var a=[];this.expectOptionalToken(N.AMP);do a.push(this.parseNamedType());while(this.expectOptionalToken(N.AMP)||this.peek(N.NAME));return a}return this.delimitedMany(N.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var n;return((n=this._options)===null||n===void 0?void 0:n.allowLegacySDLEmptyFields)===!0&&this.peek(N.BRACE_L)&&this._lexer.lookahead().kind===N.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(N.BRACE_L,this.parseFieldDefinition,N.BRACE_R)},t.parseFieldDefinition=function(){var n=this._lexer.token,a=this.parseDescription(),i=this.parseName(),o=this.parseArgumentDefs();this.expectToken(N.COLON);var s=this.parseTypeReference(),u=this.parseDirectives(!0);return{kind:E.FIELD_DEFINITION,description:a,name:i,arguments:o,type:s,directives:u,loc:this.loc(n)}},t.parseArgumentDefs=function(){return this.optionalMany(N.PAREN_L,this.parseInputValueDef,N.PAREN_R)},t.parseInputValueDef=function(){var n=this._lexer.token,a=this.parseDescription(),i=this.parseName();this.expectToken(N.COLON);var o=this.parseTypeReference(),s;this.expectOptionalToken(N.EQUALS)&&(s=this.parseValueLiteral(!0));var u=this.parseDirectives(!0);return{kind:E.INPUT_VALUE_DEFINITION,description:a,name:i,type:o,defaultValue:s,directives:u,loc:this.loc(n)}},t.parseInterfaceTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("interface");var i=this.parseName(),o=this.parseImplementsInterfaces(),s=this.parseDirectives(!0),u=this.parseFieldsDefinition();return{kind:E.INTERFACE_TYPE_DEFINITION,description:a,name:i,interfaces:o,directives:s,fields:u,loc:this.loc(n)}},t.parseUnionTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("union");var i=this.parseName(),o=this.parseDirectives(!0),s=this.parseUnionMemberTypes();return{kind:E.UNION_TYPE_DEFINITION,description:a,name:i,directives:o,types:s,loc:this.loc(n)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(N.EQUALS)?this.delimitedMany(N.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("enum");var i=this.parseName(),o=this.parseDirectives(!0),s=this.parseEnumValuesDefinition();return{kind:E.ENUM_TYPE_DEFINITION,description:a,name:i,directives:o,values:s,loc:this.loc(n)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(N.BRACE_L,this.parseEnumValueDefinition,N.BRACE_R)},t.parseEnumValueDefinition=function(){var n=this._lexer.token,a=this.parseDescription(),i=this.parseName(),o=this.parseDirectives(!0);return{kind:E.ENUM_VALUE_DEFINITION,description:a,name:i,directives:o,loc:this.loc(n)}},t.parseInputObjectTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("input");var i=this.parseName(),o=this.parseDirectives(!0),s=this.parseInputFieldsDefinition();return{kind:E.INPUT_OBJECT_TYPE_DEFINITION,description:a,name:i,directives:o,fields:s,loc:this.loc(n)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(N.BRACE_L,this.parseInputValueDef,N.BRACE_R)},t.parseTypeSystemExtension=function(){var n=this._lexer.lookahead();if(n.kind===N.NAME)switch(n.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(n)},t.parseSchemaExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var a=this.parseDirectives(!0),i=this.optionalMany(N.BRACE_L,this.parseOperationTypeDefinition,N.BRACE_R);if(a.length===0&&i.length===0)throw this.unexpected();return{kind:E.SCHEMA_EXTENSION,directives:a,operationTypes:i,loc:this.loc(n)}},t.parseScalarTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var a=this.parseName(),i=this.parseDirectives(!0);if(i.length===0)throw this.unexpected();return{kind:E.SCALAR_TYPE_EXTENSION,name:a,directives:i,loc:this.loc(n)}},t.parseObjectTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var a=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),s=this.parseFieldsDefinition();if(i.length===0&&o.length===0&&s.length===0)throw this.unexpected();return{kind:E.OBJECT_TYPE_EXTENSION,name:a,interfaces:i,directives:o,fields:s,loc:this.loc(n)}},t.parseInterfaceTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var a=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),s=this.parseFieldsDefinition();if(i.length===0&&o.length===0&&s.length===0)throw this.unexpected();return{kind:E.INTERFACE_TYPE_EXTENSION,name:a,interfaces:i,directives:o,fields:s,loc:this.loc(n)}},t.parseUnionTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var a=this.parseName(),i=this.parseDirectives(!0),o=this.parseUnionMemberTypes();if(i.length===0&&o.length===0)throw this.unexpected();return{kind:E.UNION_TYPE_EXTENSION,name:a,directives:i,types:o,loc:this.loc(n)}},t.parseEnumTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var a=this.parseName(),i=this.parseDirectives(!0),o=this.parseEnumValuesDefinition();if(i.length===0&&o.length===0)throw this.unexpected();return{kind:E.ENUM_TYPE_EXTENSION,name:a,directives:i,values:o,loc:this.loc(n)}},t.parseInputObjectTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var a=this.parseName(),i=this.parseDirectives(!0),o=this.parseInputFieldsDefinition();if(i.length===0&&o.length===0)throw this.unexpected();return{kind:E.INPUT_OBJECT_TYPE_EXTENSION,name:a,directives:i,fields:o,loc:this.loc(n)}},t.parseDirectiveDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("directive"),this.expectToken(N.AT);var i=this.parseName(),o=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var u=this.parseDirectiveLocations();return{kind:E.DIRECTIVE_DEFINITION,description:a,name:i,arguments:o,repeatable:s,locations:u,loc:this.loc(n)}},t.parseDirectiveLocations=function(){return this.delimitedMany(N.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var n=this._lexer.token,a=this.parseName();if(K[a.value]!==void 0)return a;throw this.unexpected(n)},t.loc=function(n){var a;if(((a=this._options)===null||a===void 0?void 0:a.noLocation)!==!0)return new yu(n,this._lexer.lastToken,this._lexer.source)},t.peek=function(n){return this._lexer.token.kind===n},t.expectToken=function(n){var a=this._lexer.token;if(a.kind===n)return this._lexer.advance(),a;throw ct(this._lexer.source,a.start,"Expected ".concat(pv(n),", found ").concat(Qo(a),"."))},t.expectOptionalToken=function(n){var a=this._lexer.token;if(a.kind===n)return this._lexer.advance(),a},t.expectKeyword=function(n){var a=this._lexer.token;if(a.kind===N.NAME&&a.value===n)this._lexer.advance();else throw ct(this._lexer.source,a.start,'Expected "'.concat(n,'", found ').concat(Qo(a),"."))},t.expectOptionalKeyword=function(n){var a=this._lexer.token;return a.kind===N.NAME&&a.value===n?(this._lexer.advance(),!0):!1},t.unexpected=function(n){var a=n??this._lexer.token;return ct(this._lexer.source,a.start,"Unexpected ".concat(Qo(a),"."))},t.any=function(n,a,i){this.expectToken(n);for(var o=[];!this.expectOptionalToken(i);)o.push(a.call(this));return o},t.optionalMany=function(n,a,i){if(this.expectOptionalToken(n)){var o=[];do o.push(a.call(this));while(!this.expectOptionalToken(i));return o}return[]},t.many=function(n,a,i){this.expectToken(n);var o=[];do o.push(a.call(this));while(!this.expectOptionalToken(i));return o},t.delimitedMany=function(n,a){this.expectOptionalToken(n);var i=[];do i.push(a.call(this));while(this.expectOptionalToken(n));return i},e}();function Qo(e){var t=e.value;return pv(e.kind)+(t!=null?' "'.concat(t,'"'):"")}function pv(e){return fv(e)?'"'.concat(e,'"'):e}var NN={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},rn=Object.freeze({});function qr(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NN,n=void 0,a=Array.isArray(e),i=[e],o=-1,s=[],u=void 0,c=void 0,l=void 0,f=[],d=[],p=e;do{o++;var v=o===i.length,h=v&&s.length!==0;if(v){if(c=d.length===0?void 0:f[f.length-1],u=l,l=d.pop(),h){if(a)u=u.slice();else{for(var m={},w=0,g=Object.keys(u);w1&&e[0]==="_"&&e[1]==="_")return new k('Name "'.concat(e,'" must not begin with "__", which is reserved by GraphQL introspection.'));if(!SN.test(e))return new k('Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "'.concat(e,'" does not.'))}var bn=Object.entries||function(e){return Object.keys(e).map(function(t){return[t,e[t]]})};function At(e,t){return e.reduce(function(r,n){return r[t(n)]=n,r},Object.create(null))}function Xt(e,t){for(var r=Object.create(null),n=0,a=bn(e);n0);var s=0;do++n,s=s*10+i-_s,i=t.charCodeAt(n);while(Ma(i)&&s>0);if(os)return 1}else{if(ai)return 1;++r,++n}}return e.length-t.length}var _s=48,AN=57;function Ma(e){return!isNaN(e)&&_s<=e&&e<=AN}function Er(e,t){for(var r=Object.create(null),n=new CN(e),a=Math.floor(e.length*.4)+1,i=0;ia)){for(var f=this._rows,d=0;d<=l;d++)f[0][d]=d;for(var p=1;p<=c;p++){for(var v=f[(p-1)%3],h=f[p%3],m=h[0]=p,w=1;w<=l;w++){var g=o[p-1]===s[w-1]?0:1,b=Math.min(v[w]+1,h[w-1]+1,v[w-1]+g);if(p>1&&w>1&&o[p-1]===s[w-2]&&o[p-2]===s[w-1]){var O=f[(p-2)%3][w-2];b=Math.min(b,O+1)}ba)return}var I=f[c%3][l];return I<=a?I:void 0}},e}();function El(e){for(var t=e.length,r=new Array(t),n=0;nLN&&(u=s+xe(`( +`,Za($(a,` +`)),` +)`)),$([u,$(i," "),o]," ")},Argument:function(t){var r=t.name,n=t.value;return r+": "+n},FragmentSpread:function(t){var r=t.name,n=t.directives;return"..."+r+xe(" ",$(n," "))},InlineFragment:function(t){var r=t.typeCondition,n=t.directives,a=t.selectionSet;return $(["...",xe("on ",r),$(n," "),a]," ")},FragmentDefinition:function(t){var r=t.name,n=t.typeCondition,a=t.variableDefinitions,i=t.directives,o=t.selectionSet;return"fragment ".concat(r).concat(xe("(",$(a,", "),")")," ")+"on ".concat(n," ").concat(xe("",$(i," ")," "))+o},IntValue:function(t){var r=t.value;return r},FloatValue:function(t){var r=t.value;return r},StringValue:function(t,r){var n=t.value,a=t.block;return a?lv(n,r==="description"?"":" "):JSON.stringify(n)},BooleanValue:function(t){var r=t.value;return r?"true":"false"},NullValue:function(){return"null"},EnumValue:function(t){var r=t.value;return r},ListValue:function(t){var r=t.values;return"["+$(r,", ")+"]"},ObjectValue:function(t){var r=t.fields;return"{"+$(r,", ")+"}"},ObjectField:function(t){var r=t.name,n=t.value;return r+": "+n},Directive:function(t){var r=t.name,n=t.arguments;return"@"+r+xe("(",$(n,", "),")")},NamedType:function(t){var r=t.name;return r},ListType:function(t){var r=t.type;return"["+r+"]"},NonNullType:function(t){var r=t.type;return r+"!"},SchemaDefinition:Dt(function(e){var t=e.directives,r=e.operationTypes;return $(["schema",$(t," "),_t(r)]," ")}),OperationTypeDefinition:function(t){var r=t.operation,n=t.type;return r+": "+n},ScalarTypeDefinition:Dt(function(e){var t=e.name,r=e.directives;return $(["scalar",t,$(r," ")]," ")}),ObjectTypeDefinition:Dt(function(e){var t=e.name,r=e.interfaces,n=e.directives,a=e.fields;return $(["type",t,xe("implements ",$(r," & ")),$(n," "),_t(a)]," ")}),FieldDefinition:Dt(function(e){var t=e.name,r=e.arguments,n=e.type,a=e.directives;return t+(wl(r)?xe(`( +`,Za($(r,` +`)),` +)`):xe("(",$(r,", "),")"))+": "+n+xe(" ",$(a," "))}),InputValueDefinition:Dt(function(e){var t=e.name,r=e.type,n=e.defaultValue,a=e.directives;return $([t+": "+r,xe("= ",n),$(a," ")]," ")}),InterfaceTypeDefinition:Dt(function(e){var t=e.name,r=e.interfaces,n=e.directives,a=e.fields;return $(["interface",t,xe("implements ",$(r," & ")),$(n," "),_t(a)]," ")}),UnionTypeDefinition:Dt(function(e){var t=e.name,r=e.directives,n=e.types;return $(["union",t,$(r," "),n&&n.length!==0?"= "+$(n," | "):""]," ")}),EnumTypeDefinition:Dt(function(e){var t=e.name,r=e.directives,n=e.values;return $(["enum",t,$(r," "),_t(n)]," ")}),EnumValueDefinition:Dt(function(e){var t=e.name,r=e.directives;return $([t,$(r," ")]," ")}),InputObjectTypeDefinition:Dt(function(e){var t=e.name,r=e.directives,n=e.fields;return $(["input",t,$(r," "),_t(n)]," ")}),DirectiveDefinition:Dt(function(e){var t=e.name,r=e.arguments,n=e.repeatable,a=e.locations;return"directive @"+t+(wl(r)?xe(`( +`,Za($(r,` +`)),` +)`):xe("(",$(r,", "),")"))+(n?" repeatable":"")+" on "+$(a," | ")}),SchemaExtension:function(t){var r=t.directives,n=t.operationTypes;return $(["extend schema",$(r," "),_t(n)]," ")},ScalarTypeExtension:function(t){var r=t.name,n=t.directives;return $(["extend scalar",r,$(n," ")]," ")},ObjectTypeExtension:function(t){var r=t.name,n=t.interfaces,a=t.directives,i=t.fields;return $(["extend type",r,xe("implements ",$(n," & ")),$(a," "),_t(i)]," ")},InterfaceTypeExtension:function(t){var r=t.name,n=t.interfaces,a=t.directives,i=t.fields;return $(["extend interface",r,xe("implements ",$(n," & ")),$(a," "),_t(i)]," ")},UnionTypeExtension:function(t){var r=t.name,n=t.directives,a=t.types;return $(["extend union",r,$(n," "),a&&a.length!==0?"= "+$(a," | "):""]," ")},EnumTypeExtension:function(t){var r=t.name,n=t.directives,a=t.values;return $(["extend enum",r,$(n," "),_t(a)]," ")},InputObjectTypeExtension:function(t){var r=t.name,n=t.directives,a=t.fields;return $(["extend input",r,$(n," "),_t(a)]," ")}};function Dt(e){return function(t){return $([t.description,e(t)],` +`)}}function $(e){var t,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(t=e==null?void 0:e.filter(function(n){return n}).join(r))!==null&&t!==void 0?t:""}function _t(e){return xe(`{ +`,Za($(e,` +`)),` +}`)}function xe(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";return t!=null&&t!==""?e+t+r:""}function Za(e){return xe(" ",e.replace(/\n/g,` + `))}function xN(e){return e.indexOf(` +`)!==-1}function wl(e){return e!=null&&e.some(xN)}function gi(e,t){switch(e.kind){case E.NULL:return null;case E.INT:return parseInt(e.value,10);case E.FLOAT:return parseFloat(e.value);case E.STRING:case E.ENUM:case E.BOOLEAN:return e.value;case E.LIST:return e.values.map(function(r){return gi(r,t)});case E.OBJECT:return pr(e.fields,function(r){return r.name.value},function(r){return gi(r.value,t)});case E.VARIABLE:return t==null?void 0:t[e.name.value]}Ve(0,"Unexpected value node: "+S(e))}function PN(e,t){for(var r=0;r0?e:void 0}var Lt=function(){function e(r){var n,a,i,o=(n=r.parseValue)!==null&&n!==void 0?n:gl;this.name=r.name,this.description=r.description,this.specifiedByUrl=r.specifiedByUrl,this.serialize=(a=r.serialize)!==null&&a!==void 0?a:gl,this.parseValue=o,this.parseLiteral=(i=r.parseLiteral)!==null&&i!==void 0?i:function(s,u){return o(gi(s,u))},this.extensions=r.extensions&&ht(r.extensions),this.astNode=r.astNode,this.extensionASTNodes=Dn(r.extensionASTNodes),typeof r.name=="string"||ee(0,"Must provide name."),r.specifiedByUrl==null||typeof r.specifiedByUrl=="string"||ee(0,"".concat(this.name,' must provide "specifiedByUrl" as a string, ')+"but got: ".concat(S(r.specifiedByUrl),".")),r.serialize==null||typeof r.serialize=="function"||ee(0,"".concat(this.name,' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.')),r.parseLiteral&&(typeof r.parseValue=="function"&&typeof r.parseLiteral=="function"||ee(0,"".concat(this.name,' must provide both "parseValue" and "parseLiteral" functions.')))}var t=e.prototype;return t.toConfig=function(){var n;return{name:this.name,description:this.description,specifiedByUrl:this.specifiedByUrl,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(n=this.extensionASTNodes)!==null&&n!==void 0?n:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},On(e,[{key:It,get:function(){return"GraphQLScalarType"}}]),e}();xt(Lt);var mt=function(){function e(r){this.name=r.name,this.description=r.description,this.isTypeOf=r.isTypeOf,this.extensions=r.extensions&&ht(r.extensions),this.astNode=r.astNode,this.extensionASTNodes=Dn(r.extensionASTNodes),this._fields=Ev.bind(void 0,r),this._interfaces=gv.bind(void 0,r),typeof r.name=="string"||ee(0,"Must provide name."),r.isTypeOf==null||typeof r.isTypeOf=="function"||ee(0,"".concat(this.name,' must provide "isTypeOf" as a function, ')+"but got: ".concat(S(r.isTypeOf),"."))}var t=e.prototype;return t.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:wv(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},On(e,[{key:It,get:function(){return"GraphQLObjectType"}}]),e}();xt(mt);function gv(e){var t,r=(t=fo(e.interfaces))!==null&&t!==void 0?t:[];return Array.isArray(r)||ee(0,"".concat(e.name," interfaces must be an Array or a function which returns an Array.")),r}function Ev(e){var t=fo(e.fields);return ln(t)||ee(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),Xt(t,function(r,n){var a;ln(r)||ee(0,"".concat(e.name,".").concat(n," field config must be an object.")),!("isDeprecated"in r)||ee(0,"".concat(e.name,".").concat(n,' should provide "deprecationReason" instead of "isDeprecated".')),r.resolve==null||typeof r.resolve=="function"||ee(0,"".concat(e.name,".").concat(n," field resolver must be a function if ")+"provided, but got: ".concat(S(r.resolve),"."));var i=(a=r.args)!==null&&a!==void 0?a:{};ln(i)||ee(0,"".concat(e.name,".").concat(n," args must be an object with argument names as keys."));var o=bn(i).map(function(s){var u=s[0],c=s[1];return{name:u,description:c.description,type:c.type,defaultValue:c.defaultValue,deprecationReason:c.deprecationReason,extensions:c.extensions&&ht(c.extensions),astNode:c.astNode}});return{name:n,description:r.description,type:r.type,args:o,resolve:r.resolve,subscribe:r.subscribe,isDeprecated:r.deprecationReason!=null,deprecationReason:r.deprecationReason,extensions:r.extensions&&ht(r.extensions),astNode:r.astNode}})}function ln(e){return vt(e)&&!Array.isArray(e)}function wv(e){return Xt(e,function(t){return{description:t.description,type:t.type,args:Tv(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}})}function Tv(e){return pr(e,function(t){return t.name},function(t){return{description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}})}function wr(e){return Z(e.type)&&e.defaultValue===void 0}var xr=function(){function e(r){this.name=r.name,this.description=r.description,this.resolveType=r.resolveType,this.extensions=r.extensions&&ht(r.extensions),this.astNode=r.astNode,this.extensionASTNodes=Dn(r.extensionASTNodes),this._fields=Ev.bind(void 0,r),this._interfaces=gv.bind(void 0,r),typeof r.name=="string"||ee(0,"Must provide name."),r.resolveType==null||typeof r.resolveType=="function"||ee(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(S(r.resolveType),"."))}var t=e.prototype;return t.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){var n;return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:wv(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(n=this.extensionASTNodes)!==null&&n!==void 0?n:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},On(e,[{key:It,get:function(){return"GraphQLInterfaceType"}}]),e}();xt(xr);var Pr=function(){function e(r){this.name=r.name,this.description=r.description,this.resolveType=r.resolveType,this.extensions=r.extensions&&ht(r.extensions),this.astNode=r.astNode,this.extensionASTNodes=Dn(r.extensionASTNodes),this._types=JN.bind(void 0,r),typeof r.name=="string"||ee(0,"Must provide name."),r.resolveType==null||typeof r.resolveType=="function"||ee(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(S(r.resolveType),"."))}var t=e.prototype;return t.getTypes=function(){return typeof this._types=="function"&&(this._types=this._types()),this._types},t.toConfig=function(){var n;return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(n=this.extensionASTNodes)!==null&&n!==void 0?n:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},On(e,[{key:It,get:function(){return"GraphQLUnionType"}}]),e}();xt(Pr);function JN(e){var t=fo(e.types);return Array.isArray(t)||ee(0,"Must provide Array of types or a function which returns such an array for Union ".concat(e.name,".")),t}var ar=function(){function e(r){this.name=r.name,this.description=r.description,this.extensions=r.extensions&&ht(r.extensions),this.astNode=r.astNode,this.extensionASTNodes=Dn(r.extensionASTNodes),this._values=zN(this.name,r.values),this._valueLookup=new Map(this._values.map(function(n){return[n.value,n]})),this._nameLookup=At(this._values,function(n){return n.name}),typeof r.name=="string"||ee(0,"Must provide name.")}var t=e.prototype;return t.getValues=function(){return this._values},t.getValue=function(n){return this._nameLookup[n]},t.serialize=function(n){var a=this._valueLookup.get(n);if(a===void 0)throw new k('Enum "'.concat(this.name,'" cannot represent value: ').concat(S(n)));return a.name},t.parseValue=function(n){if(typeof n!="string"){var a=S(n);throw new k('Enum "'.concat(this.name,'" cannot represent non-string value: ').concat(a,".")+xa(this,a))}var i=this.getValue(n);if(i==null)throw new k('Value "'.concat(n,'" does not exist in "').concat(this.name,'" enum.')+xa(this,n));return i.value},t.parseLiteral=function(n,a){if(n.kind!==E.ENUM){var i=Se(n);throw new k('Enum "'.concat(this.name,'" cannot represent non-enum value: ').concat(i,".")+xa(this,i),n)}var o=this.getValue(n.value);if(o==null){var s=Se(n);throw new k('Value "'.concat(s,'" does not exist in "').concat(this.name,'" enum.')+xa(this,s),n)}return o.value},t.toConfig=function(){var n,a=pr(this.getValues(),function(i){return i.name},function(i){return{description:i.description,value:i.value,deprecationReason:i.deprecationReason,extensions:i.extensions,astNode:i.astNode}});return{name:this.name,description:this.description,values:a,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(n=this.extensionASTNodes)!==null&&n!==void 0?n:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},On(e,[{key:It,get:function(){return"GraphQLEnumType"}}]),e}();xt(ar);function xa(e,t){var r=e.getValues().map(function(a){return a.name}),n=Er(t,r);return nr("the enum value",n)}function zN(e,t){return ln(t)||ee(0,"".concat(e," values must be an object with value names as keys.")),bn(t).map(function(r){var n=r[0],a=r[1];return ln(a)||ee(0,"".concat(e,".").concat(n,' must refer to an object with a "value" key ')+"representing an internal value but got: ".concat(S(a),".")),!("isDeprecated"in a)||ee(0,"".concat(e,".").concat(n,' should provide "deprecationReason" instead of "isDeprecated".')),{name:n,description:a.description,value:a.value!==void 0?a.value:n,isDeprecated:a.deprecationReason!=null,deprecationReason:a.deprecationReason,extensions:a.extensions&&ht(a.extensions),astNode:a.astNode}})}var Fr=function(){function e(r){this.name=r.name,this.description=r.description,this.extensions=r.extensions&&ht(r.extensions),this.astNode=r.astNode,this.extensionASTNodes=Dn(r.extensionASTNodes),this._fields=XN.bind(void 0,r),typeof r.name=="string"||ee(0,"Must provide name.")}var t=e.prototype;return t.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},t.toConfig=function(){var n,a=Xt(this.getFields(),function(i){return{description:i.description,type:i.type,defaultValue:i.defaultValue,deprecationReason:i.deprecationReason,extensions:i.extensions,astNode:i.astNode}});return{name:this.name,description:this.description,fields:a,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(n=this.extensionASTNodes)!==null&&n!==void 0?n:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},On(e,[{key:It,get:function(){return"GraphQLInputObjectType"}}]),e}();xt(Fr);function XN(e){var t=fo(e.fields);return ln(t)||ee(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),Xt(t,function(r,n){return!("resolve"in r)||ee(0,"".concat(e.name,".").concat(n," field has a resolve property, but Input Types cannot define resolvers.")),{name:n,description:r.description,type:r.type,defaultValue:r.defaultValue,deprecationReason:r.deprecationReason,extensions:r.extensions&&ht(r.extensions),astNode:r.astNode}})}function po(e){return Z(e.type)&&e.defaultValue===void 0}function Ei(e,t){return e===t?!0:Z(e)&&Z(t)||ke(e)&&ke(t)?Ei(e.ofType,t.ofType):!1}function Sr(e,t,r){return t===r?!0:Z(r)?Z(t)?Sr(e,t.ofType,r.ofType):!1:Z(t)?Sr(e,t.ofType,r):ke(r)?ke(t)?Sr(e,t.ofType,r.ofType):!1:ke(t)?!1:Gt(r)&&(we(t)||fe(t))&&e.isSubType(r,t)}function Ns(e,t,r){return t===r?!0:Gt(t)?Gt(r)?e.getPossibleTypes(t).some(function(n){return e.isSubType(r,n)}):e.isSubType(t,r):Gt(r)?e.isSubType(r,t):!1}var bv=Array.from||function(e,t,r){if(e==null)throw new TypeError("Array.from requires an array-like object - not null or undefined");var n=e[rv];if(typeof n=="function"){for(var a=n.call(e),i=[],o,s=0;!(o=a.next()).done;++s)if(i.push(t.call(r,o.value,s)),s>9999999)throw new TypeError("Near-infinite iteration.");return i}var u=e.length;if(typeof u=="number"&&u>=0&&u%1===0){for(var c=[],l=0;l1&&arguments[1]!==void 0?arguments[1]:function(l){return l};if(e==null||ei(e)!=="object")return null;if(Array.isArray(e))return e.map(t);var r=e[rv];if(typeof r=="function"){for(var n=r.call(e),a=[],i,o=0;!(i=n.next()).done;++o)a.push(t(i.value,o));return a}var s=e.length;if(typeof s=="number"&&s>=0&&s%1===0){for(var u=[],c=0;c_u||r_u||e_u||r0)return this._typeStack[this._typeStack.length-1]},t.getParentType=function(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]},t.getInputType=function(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]},t.getParentInputType=function(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]},t.getFieldDef=function(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]},t.getDefaultValue=function(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]},t.getDirective=function(){return this._directive},t.getArgument=function(){return this._argument},t.getEnumValue=function(){return this._enumValue},t.enter=function(n){var a=this._schema;switch(n.kind){case E.SELECTION_SET:{var i=at(this.getType());this._parentTypeStack.push(Jt(i)?i:void 0);break}case E.FIELD:{var o=this.getParentType(),s,u;o&&(s=this._getFieldDef(a,o,n),s&&(u=s.type)),this._fieldDefStack.push(s),this._typeStack.push(vr(u)?u:void 0);break}case E.DIRECTIVE:this._directive=a.getDirective(n.name.value);break;case E.OPERATION_DEFINITION:{var c;switch(n.operation){case"query":c=a.getQueryType();break;case"mutation":c=a.getMutationType();break;case"subscription":c=a.getSubscriptionType();break}this._typeStack.push(fe(c)?c:void 0);break}case E.INLINE_FRAGMENT:case E.FRAGMENT_DEFINITION:{var l=n.typeCondition,f=l?ft(a,l):at(this.getType());this._typeStack.push(vr(f)?f:void 0);break}case E.VARIABLE_DEFINITION:{var d=ft(a,n.type);this._inputTypeStack.push(ut(d)?d:void 0);break}case E.ARGUMENT:{var p,v,h,m=(p=this.getDirective())!==null&&p!==void 0?p:this.getFieldDef();m&&(v=yn(m.args,function(L){return L.name===n.name.value}),v&&(h=v.type)),this._argument=v,this._defaultValueStack.push(v?v.defaultValue:void 0),this._inputTypeStack.push(ut(h)?h:void 0);break}case E.LIST:{var w=Iu(this.getInputType()),g=ke(w)?w.ofType:w;this._defaultValueStack.push(void 0),this._inputTypeStack.push(ut(g)?g:void 0);break}case E.OBJECT_FIELD:{var b=at(this.getInputType()),O,I;Re(b)&&(I=b.getFields()[n.name.value],I&&(O=I.type)),this._defaultValueStack.push(I?I.defaultValue:void 0),this._inputTypeStack.push(ut(O)?O:void 0);break}case E.ENUM:{var D=at(this.getInputType()),A;Je(D)&&(A=D.getValue(n.value)),this._enumValue=A;break}}},t.leave=function(n){switch(n.kind){case E.SELECTION_SET:this._parentTypeStack.pop();break;case E.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case E.DIRECTIVE:this._directive=null;break;case E.OPERATION_DEFINITION:case E.INLINE_FRAGMENT:case E.FRAGMENT_DEFINITION:this._typeStack.pop();break;case E.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case E.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case E.LIST:case E.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case E.ENUM:this._enumValue=null;break}},e}();function IS(e,t,r){var n=r.name.value;if(n===na.name&&e.getQueryType()===t)return na;if(n===aa.name&&e.getQueryType()===t)return aa;if(n===ia.name&&Jt(t))return ia;if(fe(t)||we(t))return t.getFields()[n]}function Yu(e,t){return{enter:function(n){e.enter(n);var a=mn(t,n.kind,!1);if(a){var i=a.apply(t,arguments);return i!==void 0&&(e.leave(n),Ds(i)&&e.enter(i)),i}},leave:function(n){var a=mn(t,n.kind,!0),i;return a&&(i=a.apply(t,arguments)),e.leave(n),i}}}function DS(e){return Wu(e)||Gu(e)||Qu(e)}function Wu(e){return e.kind===E.OPERATION_DEFINITION||e.kind===E.FRAGMENT_DEFINITION}function _S(e){return e.kind===E.FIELD||e.kind===E.FRAGMENT_SPREAD||e.kind===E.INLINE_FRAGMENT}function NS(e){return e.kind===E.VARIABLE||e.kind===E.INT||e.kind===E.FLOAT||e.kind===E.STRING||e.kind===E.BOOLEAN||e.kind===E.NULL||e.kind===E.ENUM||e.kind===E.LIST||e.kind===E.OBJECT}function SS(e){return e.kind===E.NAMED_TYPE||e.kind===E.LIST_TYPE||e.kind===E.NON_NULL_TYPE}function Gu(e){return e.kind===E.SCHEMA_DEFINITION||Sn(e)||e.kind===E.DIRECTIVE_DEFINITION}function Sn(e){return e.kind===E.SCALAR_TYPE_DEFINITION||e.kind===E.OBJECT_TYPE_DEFINITION||e.kind===E.INTERFACE_TYPE_DEFINITION||e.kind===E.UNION_TYPE_DEFINITION||e.kind===E.ENUM_TYPE_DEFINITION||e.kind===E.INPUT_OBJECT_TYPE_DEFINITION}function Qu(e){return e.kind===E.SCHEMA_EXTENSION||Eo(e)}function Eo(e){return e.kind===E.SCALAR_TYPE_EXTENSION||e.kind===E.OBJECT_TYPE_EXTENSION||e.kind===E.INTERFACE_TYPE_EXTENSION||e.kind===E.UNION_TYPE_EXTENSION||e.kind===E.ENUM_TYPE_EXTENSION||e.kind===E.INPUT_OBJECT_TYPE_EXTENSION}function _v(e){return{Document:function(r){for(var n=0,a=r.definitions;n1&&e.reportError(new k("This anonymous operation must be the only defined operation.",n))}}}function kv(e){return{OperationDefinition:function(r){r.operation==="subscription"&&r.selectionSet.selections.length!==1&&e.reportError(new k(r.name?'Subscription "'.concat(r.name.value,'" must select only one top level field.'):"Anonymous Subscription must select only one top level field.",r.selectionSet.selections.slice(1)))}}}function Ku(e){for(var t=e.getSchema(),r=t?t.getTypeMap():Object.create(null),n=Object.create(null),a=0,i=e.getDocument().definitions;a1)for(var l=0;l0)return[[t,e.map(function(a){var i=a[0];return i})],e.reduce(function(a,i){var o=i[1];return a.concat(o)},[r]),e.reduce(function(a,i){var o=i[2];return a.concat(o)},[n])]}var WS=function(){function e(){this._data=Object.create(null)}var t=e.prototype;return t.has=function(n,a,i){var o=this._data[n],s=o&&o[a];return s===void 0?!1:i===!1?s===!1:!0},t.add=function(n,a,i){this._pairSetAdd(n,a,i),this._pairSetAdd(a,n,i)},t._pairSetAdd=function(n,a,i){var o=this._data[n];o||(o=Object.create(null),this._data[n]=o),o[a]=i},e}();function ec(e){var t=[],r=Object.create(null);return{ObjectValue:{enter:function(){t.push(r),r=Object.create(null)},leave:function(){r=t.pop()}},ObjectField:function(a){var i=a.name.value;r[i]?e.reportError(new k('There can be only one input field named "'.concat(i,'".'),[r[i],a.name])):r[i]=a.name}}}function Zv(e){var t,r,n,a=e.getSchema(),i=(t=(r=(n=a==null?void 0:a.astNode)!==null&&n!==void 0?n:a==null?void 0:a.getQueryType())!==null&&r!==void 0?r:a==null?void 0:a.getMutationType())!==null&&t!==void 0?t:a==null?void 0:a.getSubscriptionType(),o=0;return{SchemaDefinition:function(u){if(i){e.reportError(new k("Cannot define a new schema within a schema extension.",u));return}o>0&&e.reportError(new k("Must provide only one schema definition.",u)),++o}}}function eh(e){var t=e.getSchema(),r=Object.create(null),n=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:a,SchemaExtension:a};function a(i){for(var o,s=(o=i.operationTypes)!==null&&o!==void 0?o:[],u=0;u2&&arguments[2]!==void 0?arguments[2]:oh,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:new Hu(e),a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{maxErrors:void 0};t||ee(0,"Must provide document."),Vu(e);var i=Object.freeze({}),o=[],s=new ch(e,t,n,function(c){if(a.maxErrors!=null&&o.length>=a.maxErrors)throw o.push(new k("Too many validation errors, error limit reached. Validation aborted.")),i;o.push(c)}),u=Tu(r.map(function(c){return c(s)}));try{qr(t,Yu(n,u))}catch(c){if(c!==i)throw c}return o}function lh(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zS,n=[],a=new XS(e,t,function(o){n.push(o)}),i=r.map(function(o){return o(a)});return qr(e,Tu(i)),n}function ZS(e){var t=lh(e);if(t.length!==0)throw new Error(t.map(function(r){return r.message}).join(` + +`))}function e1(e,t){var r=lh(e,t);if(r.length!==0)throw new Error(r.map(function(n){return n.message}).join(` + +`))}function t1(e){var t;return function(n,a,i){t||(t=new WeakMap);var o=t.get(n),s;if(o){if(s=o.get(a),s){var u=s.get(i);if(u!==void 0)return u}}else o=new WeakMap,t.set(n,o);s||(s=new WeakMap,o.set(a,s));var c=e(n,a,i);return s.set(i,c),c}}function r1(e,t,r){return e.reduce(function(n,a){return lt(n)?n.then(function(i){return t(i,a)}):t(n,a)},r)}function n1(e){var t=Object.keys(e),r=t.map(function(n){return e[n]});return Promise.all(r).then(function(n){return n.reduce(function(a,i,o){return a[t[o]]=i,a},Object.create(null))})}function gn(e,t,r){return{prev:e,key:t,typename:r}}function st(e){for(var t=[],r=e;r;)t.push(r.key),r=r.prev;return t.reverse()}function rc(e,t){if(t.operation==="query"){var r=e.getQueryType();if(!r)throw new k("Schema does not define the required query root type.",t);return r}if(t.operation==="mutation"){var n=e.getMutationType();if(!n)throw new k("Schema is not configured for mutations.",t);return n}if(t.operation==="subscription"){var a=e.getSubscriptionType();if(!a)throw new k("Schema is not configured for subscriptions.",t);return a}throw new k("Can only have query, mutation and subscription operations.",t)}function fh(e){return e.map(function(t){return typeof t=="number"?"["+t.toString()+"]":"."+t}).join("")}function Yt(e,t,r){if(e){if(e.kind===E.VARIABLE){var n=e.name.value;if(r==null||r[n]===void 0)return;var a=r[n];return a===null&&Z(t)?void 0:a}if(Z(t))return e.kind===E.NULL?void 0:Yt(e,t.ofType,r);if(e.kind===E.NULL)return null;if(ke(t)){var i=t.ofType;if(e.kind===E.LIST){for(var o=[],s=0,u=e.values;s2&&arguments[2]!==void 0?arguments[2]:a1;return Yn(e,t,r)}function a1(e,t,r){var n="Invalid value "+S(t);throw e.length>0&&(n+=' at "value'.concat(fh(e),'"')),r.message=n+": "+r.message,r}function Yn(e,t,r,n){if(Z(t)){if(e!=null)return Yn(e,t.ofType,r,n);r(st(n),e,new k('Expected non-nullable type "'.concat(S(t),'" not to be null.')));return}if(e==null)return null;if(ke(t)){var a=t.ofType,i=Du(e,function(g,b){var O=gn(n,b,void 0);return Yn(g,a,r,O)});return i??[Yn(e,a,r,n)]}if(Re(t)){if(!vt(e)){r(st(n),e,new k('Expected type "'.concat(t.name,'" to be an object.')));return}for(var o={},s=t.getFields(),u=0,c=De(s);u=i)throw new k("Too many errors processing variables, error limit reached. Execution aborted.");a.push(s)});if(a.length===0)return{coerced:o}}catch(s){a.push(s)}return{errors:a}}function o1(e,t,r,n){for(var a={},i=function(c){var l=t[c],f=l.variable.name.value,d=ft(e,l.type);if(!ut(d)){var p=Se(l.type);return n(new k('Variable "$'.concat(f,'" expected value of type "').concat(p,'" which cannot be used as an input type.'),l.type)),"continue"}if(!ph(r,f)){if(l.defaultValue)a[f]=Yt(l.defaultValue,d);else if(Z(d)){var v=S(d);n(new k('Variable "$'.concat(f,'" of required type "').concat(v,'" was not provided.'),l))}return"continue"}var h=r[f];if(h===null&&Z(d)){var m=S(d);return n(new k('Variable "$'.concat(f,'" of non-null type "').concat(m,'" must not be null.'),l)),"continue"}a[f]=dh(h,d,function(w,g,b){var O='Variable "$'.concat(f,'" got invalid value ')+S(g);w.length>0&&(O+=' at "'.concat(f).concat(fh(w),'"')),n(new k(O+"; "+b.message,l,void 0,void 0,void 0,b.originalError))})},o=0;o0)return{errors:c};var l;try{l=uo(r)}catch(d){return{errors:[d]}}var f=tc(t,l);return f.length>0?{errors:f}:ac({schema:t,document:l,rootValue:n,contextValue:a,variableValues:i,operationName:o,fieldResolver:s,typeResolver:u})}function Ih(e){return typeof(e==null?void 0:e[bs])=="function"}function y1(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g1(e,t,r){var n=e[bs],a=n.call(e),i,o;typeof a.return=="function"&&(i=a.return,o=function(f){var d=function(){return Promise.reject(f)};return i.call(a).then(d,d)});function s(l){return l.done?l:Ml(l.value,t).then(xl,o)}var u;if(r){var c=r;u=function(f){return Ml(f,c).then(xl,o)}}return y1({next:function(){return a.next().then(s,u)},return:function(){return i?i.call(a).then(s,u):Promise.resolve({value:void 0,done:!0})},throw:function(f){return typeof a.throw=="function"?a.throw(f).then(s,u):Promise.reject(f).catch(o)}},bs,function(){return this})}function Ml(e,t){return new Promise(function(r){return r(t(e))})}function xl(e){return{value:e,done:!1}}function E1(e,t,r,n,a,i,o,s){return arguments.length===1?Pl(e):Pl({schema:e,document:t,rootValue:r,contextValue:n,variableValues:a,operationName:i,fieldResolver:o,subscribeFieldResolver:s})}function Dh(e){if(e instanceof k)return{errors:[e]};throw e}function Pl(e){var t=e.schema,r=e.document,n=e.rootValue,a=e.contextValue,i=e.variableValues,o=e.operationName,s=e.fieldResolver,u=e.subscribeFieldResolver,c=_h(t,r,n,a,i,o,u),l=function(d){return ac({schema:t,document:r,rootValue:d,contextValue:a,variableValues:i,operationName:o,fieldResolver:s})};return c.then(function(f){return Ih(f)?g1(f,l,Dh):f})}function _h(e,t,r,n,a,i,o){return mh(e,t,a),new Promise(function(s){var u=yh(e,t,r,n,a,i,o);s(Array.isArray(u)?{errors:u}:w1(u))}).catch(Dh)}function w1(e){var t=e.schema,r=e.operation,n=e.variableValues,a=e.rootValue,i=rc(t,r),o=sa(e,i,r.selectionSet,Object.create(null),Object.create(null)),s=Object.keys(o),u=s[0],c=o[u],l=c[0],f=l.name.value,d=Oh(t,i,f);if(!d)throw new k('The subscription field "'.concat(f,'" is not defined.'),c);var p=gn(void 0,u,i.name),v=wh(e,d,c,i,p);return new Promise(function(h){var m,w=nc(d,c[0],n),g=e.contextValue,b=(m=d.subscribe)!==null&&m!==void 0?m:e.fieldResolver;h(b(a,w,g,v))}).then(function(h){if(h instanceof Error)throw mr(h,c,st(p));if(!Ih(h))throw new Error("Subscription field must return Async Iterable. "+"Received: ".concat(S(h),"."));return h},function(h){throw mr(h,c,st(p))})}function Nh(e){return{Field:function(r){var n=e.getFieldDef(),a=n==null?void 0:n.deprecationReason;if(n&&a!=null){var i=e.getParentType();i!=null||Ve(0),e.reportError(new k("The field ".concat(i.name,".").concat(n.name," is deprecated. ").concat(a),r))}},Argument:function(r){var n=e.getArgument(),a=n==null?void 0:n.deprecationReason;if(n&&a!=null){var i=e.getDirective();if(i!=null)e.reportError(new k('Directive "@'.concat(i.name,'" argument "').concat(n.name,'" is deprecated. ').concat(a),r));else{var o=e.getParentType(),s=e.getFieldDef();o!=null&&s!=null||Ve(0),e.reportError(new k('Field "'.concat(o.name,".").concat(s.name,'" argument "').concat(n.name,'" is deprecated. ').concat(a),r))}}},ObjectField:function(r){var n=at(e.getParentInputType());if(Re(n)){var a=n.getFields()[r.name.value],i=a==null?void 0:a.deprecationReason;i!=null&&e.reportError(new k("The input field ".concat(n.name,".").concat(a.name," is deprecated. ").concat(i),r))}},EnumValue:function(r){var n=e.getEnumValue(),a=n==null?void 0:n.deprecationReason;if(n&&a!=null){var i=at(e.getInputType());i!=null||Ve(0),e.reportError(new k('The enum value "'.concat(i.name,".").concat(n.name,'" is deprecated. ').concat(a),r))}}}}function T1(e){return{Field:function(r){var n=at(e.getType());n&&Br(n)&&e.reportError(new k('GraphQL introspection has been disabled, but the requested query contained the field "'.concat(r.name.value,'".'),r))}}}function b1(e){var t;e||ee(0,"Received null or undefined error.");var r=(t=e.message)!==null&&t!==void 0?t:"An unknown error occurred.",n=e.locations,a=e.path,i=e.extensions;return i&&Object.keys(i).length>0?{message:r,locations:n,path:a,extensions:i}:{message:r,locations:n,path:a}}function Fl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function O1(e){for(var t=1;t0?r.reverse().join(` +`):void 0}}function Rh(e,t){e!=null&&e.kind===E.DOCUMENT||ee(0,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&ZS(e);var r={description:void 0,types:[],directives:[],extensions:void 0,extensionASTNodes:[],assumeValid:!1},n=kh(r,e,t);if(n.astNode==null)for(var a=0,i=n.types;a2&&arguments[2]!==void 0?arguments[2]:"";return t.length===0?"":t.every(function(n){return!n.description})?"("+t.map(Cs).join(", ")+")":`( +`+t.map(function(n,a){return bt(e,n," "+r,!a)+" "+r+Cs(n)}).join(` +`)+` +`+r+")"}function Cs(e){var t=Ht(e.defaultValue,e.type),r=e.name+": "+String(e.type);return t&&(r+=" = ".concat(Se(t))),r+sc(e.deprecationReason)}function G1(e,t){return bt(t,e)+"directive @"+e.name+xh(t,e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function sc(e){if(e==null)return"";var t=Ht(e,Me);return t&&e!==Pu?" @deprecated(reason: "+Se(t)+")":" @deprecated"}function Q1(e){if(e.specifiedByUrl==null)return"";var t=e.specifiedByUrl,r=Ht(t,Me);return r||Ve(0,"Unexpected null value returned from `astFromValue` for specifiedByUrl")," @specifiedBy(url: "+Se(r)+")"}function bt(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=t.description;if(a==null)return"";if((e==null?void 0:e.commentDescriptions)===!0)return K1(a,r,n);var i=a.length>70,o=lv(a,"",i),s=r&&!n?` +`+r:r;return s+o.replace(/\n/g,` +`+r)+` +`}function K1(e,t,r){var n=t&&!r?` +`:"",a=e.split(` +`).map(function(i){return t+(i!==""?"# "+i:"#")}).join(` +`);return n+a+` +`}function J1(e){for(var t=[],r=0;r0&&(r=` +`+r);var n=r[r.length-1],a=n==='"'&&r.slice(-4)!=='\\"""';return(a||n==="\\")&&(r+=` +`),'"""'+r+'"""'}function Hl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Yl(e){for(var t=1;t0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i};wo.__esModule=!0;wo.capitalize=void 0;function pk(e){var t=dk(e),r=t[0],n=t.slice(1);return r.toUpperCase()+n.join("")}wo.capitalize=pk;(function(e){var t=Y&&Y.__assign||function(){return t=Object.assign||function(g){for(var b,O=1,I=arguments.length;O0&&A[A.length-1])&&(V[0]===6||V[0]===2)){O=0;continue}if(V[0]===3&&(!A||V[1]>A[0]&&V[1]0)&&!(D=I.next()).done;)A.push(D.value)}catch(B){L={error:B}}finally{try{D&&!D.done&&(O=I.return)&&O.call(I)}finally{if(L)throw L.error}}return A},i=Y&&Y.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};e.__esModule=!0,e.generateGraphQLHandlers=e.definitionToFields=e.getQueryTypeByValueType=e.comparatorTypes=e.getGraphQLType=void 0;var o=i(ap),s=fk,u=Xp,c=wo,l=pa,f=uu,d=su;function p(g){var b=typeof g=="function"?g():g;switch(b.constructor.name){case"Number":return s.GraphQLInt;case"Boolean":return s.GraphQLBoolean;default:return s.GraphQLString}}e.getGraphQLType=p;function v(g,b,O){return new s.GraphQLInputObjectType({name:g,fields:Object.keys(b).reduce(function(I,D){return I[D]={type:O},I},{})})}e.comparatorTypes={IdQueryType:v("IdQueryType",f.stringComparators,s.GraphQLID),StringQueryType:v("StringQueryType",f.stringComparators,s.GraphQLString),IntQueryType:v("IntQueryType",d.numberComparators,s.GraphQLInt),BooleanQueryType:v("BooleanQueryType",l.booleanComparators,s.GraphQLBoolean)};function h(g){switch(g.name){case"ID":return e.comparatorTypes.IdQueryType;case"Int":return e.comparatorTypes.IntQueryType;case"Boolean":return e.comparatorTypes.BooleanQueryType;default:return e.comparatorTypes.StringQueryType}}e.getQueryTypeByValueType=h;function m(g){return Object.entries(g).reduce(function(b,O){var I=a(O,2),D=I[0],A=I[1],L="isPrimaryKey"in A,B=L?s.GraphQLID:p(A),z=h(B);return b.fields[D]={type:B},b.inputFields[D]={type:B},b.queryInputFields[D]={type:z},b},{fields:{},inputFields:{},queryInputFields:{}})}e.definitionToFields=m;function w(g,b,O,I){var D,A,L=this;I===void 0&&(I="");var B=I?u.graphql.link(I):u.graphql,z=o.default(g),V=c.capitalize(g),_=m(b),G=_.fields,ce=_.inputFields,ue=_.queryInputFields,he=new s.GraphQLObjectType({name:V,fields:G}),et=new s.GraphQLInputObjectType({name:V+"Input",fields:ce}),gt=new s.GraphQLInputObjectType({name:V+"QueryInput",fields:ue}),sr={take:{type:s.GraphQLInt},skip:{type:s.GraphQLInt},cursor:{type:s.GraphQLID}},H=new s.GraphQLSchema({query:new s.GraphQLObjectType({name:"Query",fields:(D={},D[g]={type:he,args:{where:{type:gt}},resolve:function(W,q){return O.findFirst({where:q.where})}},D[z]={type:new s.GraphQLList(he),args:t(t({},sr),{where:{type:gt}}),resolve:function(W,q){var ne=Object.keys(q).length>0;return ne?O.findMany({where:q.where,skip:q.skip,take:q.take,cursor:q.cursor}):O.getAll()}},D)}),mutation:new s.GraphQLObjectType({name:"Mutation",fields:(A={},A["create"+V]={type:he,args:{data:{type:et}},resolve:function(W,q){return O.create(q.data)}},A["update"+V]={type:he,args:{where:{type:gt},data:{type:et}},resolve:function(W,q){return O.update({where:q.where,data:q.data})}},A["update"+c.capitalize(z)]={type:new s.GraphQLList(he),args:{where:{type:gt},data:{type:et}},resolve:function(W,q){return O.updateMany({where:q.where,data:q.data})}},A["delete"+V]={type:he,args:{where:{type:gt}},resolve:function(W,q){return O.delete({where:q.where})}},A["delete"+c.capitalize(z)]={type:new s.GraphQLList(he),args:{where:{type:gt}},resolve:function(W,q){return O.deleteMany({where:q.where})}},A)})});return[B.operation(function(W,q,ne){return r(L,void 0,void 0,function(){var ae,Ae;return n(this,function(Te){switch(Te.label){case 0:return W.body?[4,s.graphql({schema:H,source:(Ae=W.body)===null||Ae===void 0?void 0:Ae.query,variableValues:W.variables})]:[2];case 1:return ae=Te.sent(),[2,q(ne.data(ae.data),ne.errors(ae.errors))]}})})})]}e.generateGraphQLHandlers=w})(tv);var To={},Jl=Y&&Y.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),a,i=[],o;try{for(;(t===void 0||t-- >0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},vk=Y&&Y.__spreadArray||function(e,t){for(var r=0,n=t.length,a=e.length;r0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i};bo.__esModule=!0;bo.removeInternalProperties=void 0;var Xl=Ot,Zl=Oo;function Ls(e){return Object.entries(e).filter(function(t){var r=Xo(t,2),n=r[0],a=r[1];if(n!==Xl.InternalEntityProperty.type&&n!==Xl.InternalEntityProperty.primaryKey)return[n,a]}).map(function(t){var r=Xo(t,2),n=r[0],a=r[1];if(typeof a=="object"&&Zl.isInternalEntity(a))return[n,Ls(a)];if(Array.isArray(a)){var i=a.map(function(o){return Zl.isInternalEntity(o)?Ls(o):o});return[n,i]}return[n,a]}).reduce(function(t,r){var n=Xo(r,2),a=n[0],i=n[1];return t[a]=i,t},{})}bo.removeInternalProperties=Ls;var ja=Y&&Y.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i};_i.__esModule=!0;_i.factory=void 0;var Nt=Ot,Zo=la,Ir=fa,Ek=Vi,wk=Bi,jt=Ea,ef=Yi,qe=cu,Tk=Wi,bk=Bt,Ok=tv,Ik=To,lr=bo;function Dk(e){var t=new Tk.Database(e);return Object.entries(e).reduce(function(r,n){var a=gk(n,2),i=a[0],o=a[1];return r[i]=_k(e,i,o,t),r},{})}_i.factory=Dk;function _k(e,t,r,n){var a=Ek.parseModelDefinition(e,t,r),i=a.primaryKey;if(Ik.sync(n),typeof i>"u")throw new qe.OperationError(qe.OperationErrorType.MissingPrimaryKey,'Failed to create a "'+t+'" model: none of the listed properties is marked as a primary key ('+Object.keys(r).join()+").");var o={create:function(s){s===void 0&&(s={});var u=wk.createModel(t,r,a,s,n),c=u[u[Nt.InternalEntityProperty.primaryKey]];return jt.invariant(!c,'Failed to create a "'+t+'" entity: expected the primary key "'+i+'" to have a value, but got: '+c,new qe.OperationError(qe.OperationErrorType.MissingPrimaryKey)),jt.invariant(n.has(t,c),'Failed to create a "'+t+'" entity: an entity with the same primary key "'+c+'" ("'+u[Nt.InternalEntityProperty.primaryKey]+'") already exists.',new qe.OperationError(qe.OperationErrorType.DuplicatePrimaryKey)),n.create(t,u),lr.removeInternalProperties(u)},count:function(s){if(!s)return n.count(t);var u=Ir.executeQuery(t,i,s,n);return u.length},findFirst:function(s){var u=Ir.executeQuery(t,i,s,n),c=Zo.first(u);return jt.invariant(s.strict&&!c,'Failed to execute "findFirst" on the "'+t+'" model: no entity found matching the query "'+JSON.stringify(s.where)+'".',new qe.OperationError(qe.OperationErrorType.EntityNotFound)),c?lr.removeInternalProperties(c):null},findMany:function(s){var u=Ir.executeQuery(t,i,s,n);return jt.invariant(s.strict&&u.length===0,'Failed to execute "findMany" on the "'+t+'" model: no entities found matching the query "'+JSON.stringify(s.where)+'".',new qe.OperationError(qe.OperationErrorType.EntityNotFound)),u.map(lr.removeInternalProperties)},getAll:function(){return n.listEntities(t).map(lr.removeInternalProperties)},update:function(s){var u=s.strict,c=ja(s,["strict"]),l=Ir.executeQuery(t,i,c,n),f=Zo.first(l);if(!f)return jt.invariant(u,'Failed to execute "update" on the "'+t+'" model: no entity found matching the query "'+JSON.stringify(c.where)+'".',new qe.OperationError(qe.OperationErrorType.EntityNotFound)),null;var d=ef.updateEntity(f,c.data);return d[f[Nt.InternalEntityProperty.primaryKey]]!==f[f[Nt.InternalEntityProperty.primaryKey]]&&jt.invariant(n.has(t,d[f[Nt.InternalEntityProperty.primaryKey]]),'Failed to execute "update" on the "'+t+'" model: the entity with a primary key "'+d[f[Nt.InternalEntityProperty.primaryKey]]+'" ("'+i+'") already exists.',new qe.OperationError(qe.OperationErrorType.DuplicatePrimaryKey)),n.update(t,f,d),lr.removeInternalProperties(d)},updateMany:function(s){var u=s.strict,c=ja(s,["strict"]),l=Ir.executeQuery(t,i,c,n),f=[];return l.length===0?(jt.invariant(u,'Failed to execute "updateMany" on the "'+t+'" model: no entities found matching the query "'+JSON.stringify(c.where)+'".',new qe.OperationError(qe.OperationErrorType.EntityNotFound)),null):(l.forEach(function(d){var p=ef.updateEntity(d,c.data);p[d[Nt.InternalEntityProperty.primaryKey]]!==d[d[Nt.InternalEntityProperty.primaryKey]]&&jt.invariant(n.has(t,p[d[Nt.InternalEntityProperty.primaryKey]]),'Failed to execute "updateMany" on the "'+t+'" model: no entities found matching the query "'+JSON.stringify(c.where)+'".',new qe.OperationError(qe.OperationErrorType.EntityNotFound)),n.update(t,d,p),f.push(p)}),f.map(lr.removeInternalProperties))},delete:function(s){var u=s.strict,c=ja(s,["strict"]),l=Ir.executeQuery(t,i,c,n),f=Zo.first(l);return f?(n.delete(t,f[f[Nt.InternalEntityProperty.primaryKey]]),lr.removeInternalProperties(f)):(jt.invariant(u,'Failed to execute "delete" on the "'+t+'" model: no entity found matching the query "'+JSON.stringify(c.where)+'".',new qe.OperationError(qe.OperationErrorType.EntityNotFound)),null)},deleteMany:function(s){var u=s.strict,c=ja(s,["strict"]),l=Ir.executeQuery(t,i,c,n);return l.length===0?(jt.invariant(u,'Failed to execute "deleteMany" on the "'+t+'" model: no entities found matching the query "'+JSON.stringify(c.where)+'".',new qe.OperationError(qe.OperationErrorType.EntityNotFound)),null):(l.forEach(function(f){n.delete(t,f[f[Nt.InternalEntityProperty.primaryKey]])}),l.map(lr.removeInternalProperties))},toHandlers:function(s,u){return s==="graphql"?Ok.generateGraphQLHandlers(t,r,o,u):bk.generateRestHandlers(t,i,o,u)}};return o}var Io={};Io.__esModule=!0;Io.primaryKey=void 0;function Nk(e){return{isPrimaryKey:!0,getValue:e}}Io.primaryKey=Nk;var Do={};Do.__esModule=!0;Do.oneOf=void 0;var Sk=Ot;function kk(e,t){return{kind:Sk.RelationKind.OneOf,modelName:e,unique:!!(t!=null&&t.unique)}}Do.oneOf=kk;var _o={};_o.__esModule=!0;_o.manyOf=void 0;var Rk=Ot;function Ak(e,t){return{kind:Rk.RelationKind.ManyOf,modelName:e,unique:!!(t!=null&&t.unique)}}_o.manyOf=Ak;var No={};No.__esModule=!0;No.drop=void 0;function Ck(e){Object.values(e).forEach(function(t){t.deleteMany({where:{}})})}No.drop=Ck;var So={};So.__esModule=!0;So.identity=void 0;function Lk(e){return function(){return e}}So.identity=Lk;(function(e){var t=Y&&Y.__createBinding||(Object.create?function(u,c,l,f){f===void 0&&(f=l),Object.defineProperty(u,f,{enumerable:!0,get:function(){return c[l]}})}:function(u,c,l,f){f===void 0&&(f=l),u[f]=c[l]});e.__esModule=!0,e.identity=e.drop=e.manyOf=e.oneOf=e.primaryKey=e.factory=void 0;var r=_i;t(e,r,"factory");var n=Io;t(e,n,"primaryKey");var a=Do;t(e,a,"oneOf");var i=_o;t(e,i,"manyOf");var o=No;t(e,o,"drop");var s=So;t(e,s,"identity")})(en);const Mk={user:{id:en.primaryKey(String),firstName:String,lastName:String,email:String,password:String,teamId:String,role:String,bio:String,createdAt:Number},team:{id:en.primaryKey(String),name:String,description:String,createdAt:Number},discussion:{id:en.primaryKey(String),title:String,body:String,authorId:String,teamId:String,createdAt:Number},comment:{id:en.primaryKey(String),body:String,authorId:String,discussionId:String,createdAt:Number}},Fe=en.factory(Mk),jh=()=>Object.assign(JSON.parse(window.localStorage.getItem("msw-db")||"{}")),er=e=>{const t=jh();t[e]=Fe[e].getAll(),window.localStorage.setItem("msw-db",JSON.stringify(t))},xk=()=>{const e=jh();Object.entries(Fe).forEach(([t,r])=>{const n=e[t];n&&(n==null||n.forEach(a=>{r.create(a)}))})};xk();const Pk=e=>window.btoa(JSON.stringify(e)),Fk=e=>JSON.parse(window.atob(e)),Uh=e=>{let t=5381,r=e.length;for(;r;)t=t*33^e.charCodeAt(--r);return String(t>>>0)},jk=(e,t)=>{const r={};for(const n in e)t.includes(n)||(r[n]=e[n]);return r},En=e=>jk(e,["password","iat"]);function tf({email:e,password:t}){const r=Fe.user.findFirst({where:{email:{equals:e}}});if((r==null?void 0:r.password)===Uh(t)){const a=En(r),i=Pk(a);return{user:a,jwt:i}}throw new Error("Invalid username or password")}function Et(e){try{const t=e.headers.get("authorization");if(!t)throw new Error("No authorization token provided!");const r=Fk(t),n=Fe.user.findFirst({where:{id:{equals:r.id}}});if(!n)throw Error("Unauthorized");return En(n)}catch(t){throw new Error(t)}}function ti(e){if(e.role!=="ADMIN")throw Error("Unauthorized")}const Uk=[nt.post(`${rt}/auth/register`,async({request:e})=>{try{const t=await e.json();if(Fe.user.findFirst({where:{email:{equals:t.email}}}))return re.json({message:"The user already exists"},{status:400});let n,a;if(t.teamId){if(!Fe.team.findFirst({where:{id:{equals:t.teamId}}}))throw new Error("The team you are trying to join does not exist!");n=t.teamId,a="USER"}else{const o=Fe.team.create({id:ri(),name:t.teamName??`${t.firstName} Team`,createdAt:Date.now()});er("team"),n=o.id,a="ADMIN"}Fe.user.create({...t,id:ri(),createdAt:Date.now(),role:a,password:Uh(t.password),teamId:n}),er("user");const i=tf({email:t.email,password:t.password});return re.json(i)}catch(t){return re.json({message:(t==null?void 0:t.message)||"Server Error"},{status:500})}}),nt.post(`${rt}/auth/login`,async({request:e})=>{try{const t=await e.json(),r=tf(t);return re.json(r)}catch(t){return re.json({message:(t==null?void 0:t.message)||"Server Error"},{status:500})}}),nt.get(`${rt}/auth/me`,({request:e})=>{try{const t=Et(e);return re.json(t)}catch(t){return re.json({message:(t==null?void 0:t.message)||"Server Error"},{status:500})}})],$k=[nt.get(`${rt}/comments`,({request:e})=>{try{Et(e);const r=new URL(e.url).searchParams.get("discussionId")||"",n=Fe.comment.findMany({where:{discussionId:{equals:r}}}).map(({authorId:a,...i})=>{const o=Fe.user.findFirst({where:{id:{equals:a}}});return{...i,author:o?En(o):{}}});return re.json(n)}catch(t){return re.json({message:(t==null?void 0:t.message)||"Server Error"},{status:500})}}),nt.post(`${rt}/comments`,async({request:e})=>{try{const t=Et(e),r=await e.json(),n=Fe.comment.create({authorId:t.id,id:ri(),createdAt:Date.now(),...r});return er("comment"),re.json(n)}catch(t){return re.json({message:(t==null?void 0:t.message)||"Server Error"},{status:500})}}),nt.delete(`${rt}/comments/:commentId`,({request:e,params:t})=>{try{const r=Et(e),n=t.commentId,a=Fe.comment.delete({where:{id:{equals:n},...r.role==="USER"&&{authorId:{equals:r.id}}}});return er("comment"),re.json(a)}catch(r){return re.json({message:(r==null?void 0:r.message)||"Server Error"},{status:500})}})],Vk=[nt.get(`${rt}/discussions`,async({request:e})=>{try{const t=Et(e),r=Fe.discussion.findMany({where:{teamId:{equals:t.teamId}}}).map(({authorId:n,...a})=>{const i=Fe.user.findFirst({where:{id:{equals:n}}});return{...a,author:i?En(i):{}}});return re.json(r)}catch(t){return re.json({message:(t==null?void 0:t.message)||"Server Error"},{status:500})}}),nt.get(`${rt}/discussions/:discussionId`,async({request:e,params:t})=>{try{const r=Et(e),n=t.discussionId,a=Fe.discussion.findFirst({where:{id:{equals:n},teamId:{equals:r.teamId}}});if(!a)return re.json({message:"Discussion not found"},{status:404});const i=Fe.user.findFirst({where:{id:{equals:a.authorId}}}),o={...a,author:i?En(i):{}};return re.json(o)}catch(r){return re.json({message:(r==null?void 0:r.message)||"Server Error"},{status:500})}}),nt.post(`${rt}/discussions`,async({request:e})=>{try{const t=Et(e),r=await e.json();ti(t);const n=Fe.discussion.create({teamId:t.teamId,id:ri(),createdAt:Date.now(),authorId:t.id,...r});return er("discussion"),re.json(n)}catch(t){return re.json({message:(t==null?void 0:t.message)||"Server Error"},{status:500})}}),nt.patch(`${rt}/discussions/:discussionId`,async({request:e,params:t})=>{try{const r=Et(e),n=await e.json(),a=t.discussionId;ti(r);const i=Fe.discussion.update({where:{teamId:{equals:r.teamId},id:{equals:a}},data:n});return er("discussion"),re.json(i)}catch(r){return re.json({message:(r==null?void 0:r.message)||"Server Error"},{status:500})}}),nt.delete(`${rt}/discussions/:discussionId`,async({request:e,params:t})=>{try{const r=Et(e),n=t.discussionId;ti(r);const a=Fe.discussion.delete({where:{id:{equals:n}}});return er("discussion"),re.json(a)}catch(r){return re.json({message:(r==null?void 0:r.message)||"Server Error"},{status:500})}})],qk=[nt.get(`${rt}/teams`,async({request:e})=>{try{const t=Fe.team.getAll();return re.json(t)}catch(t){return re.json({message:(t==null?void 0:t.message)||"Server Error"},{status:500})}})],Bk=[nt.get(`${rt}/users`,async({request:e})=>{try{const t=Et(e),r=Fe.user.findMany({where:{teamId:{equals:t.teamId}}}).map(En);return re.json(r)}catch(t){return re.json({message:(t==null?void 0:t.message)||"Server Error"},{status:500})}}),nt.patch(`${rt}/users/profile`,async({request:e})=>{try{const t=Et(e),r=await e.json(),n=Fe.user.update({where:{id:{equals:t.id}},data:r});return er("user"),re.json(n)}catch(t){return re.json({message:(t==null?void 0:t.message)||"Server Error"},{status:500})}}),nt.delete(`${rt}/users/:userId`,async({request:e,params:t})=>{try{const r=Et(e),n=t.userId;ti(r);const a=Fe.user.delete({where:{id:{equals:n},teamId:{equals:r.teamId}}});return er("user"),re.json(a)}catch(r){return re.json({message:(r==null?void 0:r.message)||"Server Error"},{status:500})}})],Hk=[...Uk,...$k,...Vk,...qk,...Bk],Jk=Ry(...Hk);export{Jk as worker}; diff --git a/dist/assets/format-D9jVc0G6.js b/dist/assets/format-D9jVc0G6.js new file mode 100644 index 00000000..9957590c --- /dev/null +++ b/dist/assets/format-D9jVc0G6.js @@ -0,0 +1 @@ +import{r as m,j as r,D as ne,m as ae,p as ie,B as G,q as P,t as U,v as Q,w as oe,x as le,c as ce,y as ue}from"./index-D0mVz3ol.js";function de(d,x){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:x},d),m.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4"}))}const fe=m.forwardRef(de);function he(d,x){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:x},d),m.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))}const me=m.forwardRef(he),K=(d=!1)=>{const[x,c]=m.useState(d),f=m.useCallback(()=>c(!0),[]),$=m.useCallback(()=>c(!1),[]),y=m.useCallback(()=>c(g=>!g),[]);return{isOpen:x,open:f,close:$,toggle:y}},je=({triggerButton:d,confirmButton:x,title:c,body:f="",cancelButtonText:$="Cancel",icon:y="danger",isDone:g=!1})=>{const{close:j,open:N,isOpen:k}=K(),C=m.useRef(null);m.useEffect(()=>{g&&j()},[g,j]);const M=m.cloneElement(d,{onClick:N});return r.jsxs(r.Fragment,{children:[M,r.jsx(ne,{isOpen:k,onClose:j,initialFocus:C,children:r.jsxs("div",{className:"inline-block align-bottom bg-white rounded-lg px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full sm:p-6",children:[r.jsxs("div",{className:"sm:flex sm:items-start",children:[y==="danger"&&r.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10",children:r.jsx(me,{className:"h-6 w-6 text-red-600","aria-hidden":"true"})}),y==="info"&&r.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-blue-100 sm:mx-0 sm:h-10 sm:w-10",children:r.jsx(ae,{className:"h-6 w-6 text-blue-600","aria-hidden":"true"})}),r.jsxs("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[r.jsx(ie,{as:"h3",className:"text-lg leading-6 font-medium text-gray-900",children:c}),f&&r.jsx("div",{className:"mt-2",children:r.jsx("p",{className:"text-sm text-gray-500",children:f})})]})]}),r.jsxs("div",{className:"mt-4 flex space-x-2 justify-end",children:[r.jsx(G,{type:"button",variant:"inverse",className:"w-full inline-flex justify-center rounded-md border focus:ring-1 focus:ring-offset-1 focus:ring-indigo-500 sm:mt-0 sm:w-auto sm:text-sm",onClick:j,ref:C,children:$}),x]})]})})]})},xe={sm:"max-w-md",md:"max-w-xl",lg:"max-w-3xl",xl:"max-w-7xl",full:"max-w-full"},ge=({title:d,children:x,isOpen:c,onClose:f,renderFooter:$,size:y="md"})=>r.jsx(P.Root,{show:c,as:m.Fragment,children:r.jsx(U,{as:"div",static:!0,className:"fixed inset-0 overflow-hidden z-40",open:c,onClose:f,children:r.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[r.jsx(U.Overlay,{className:"absolute inset-0"}),r.jsx("div",{className:"fixed inset-y-0 right-0 pl-10 max-w-full flex",children:r.jsx(P.Child,{as:m.Fragment,enter:"transform transition ease-in-out duration-300 sm:duration-300",enterFrom:"translate-x-full",enterTo:"translate-x-0",leave:"transform transition ease-in-out duration-300 sm:duration-300",leaveFrom:"translate-x-0",leaveTo:"translate-x-full",children:r.jsx("div",{className:Q("w-screen",xe[y]),children:r.jsxs("div",{className:"h-full divide-y divide-gray-200 flex flex-col bg-white shadow-xl",children:[r.jsxs("div",{className:"min-h-0 flex-1 flex flex-col py-6 overflow-y-scroll",children:[r.jsx("div",{className:"px-4 sm:px-6",children:r.jsxs("div",{className:"flex items-start justify-between",children:[r.jsx(U.Title,{className:"text-lg font-medium text-gray-900",children:d}),r.jsx("div",{className:"ml-3 h-7 flex items-center",children:r.jsxs("button",{className:"bg-white rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500",onClick:f,children:[r.jsx("span",{className:"sr-only",children:"Close panel"}),r.jsx(oe,{className:"h-6 w-6","aria-hidden":"true"})]})})]})}),r.jsx("div",{className:"mt-6 relative flex-1 px-4 sm:px-6",children:x})]}),r.jsx("div",{className:"flex-shrink-0 px-4 py-4 flex justify-end space-x-2",children:$()})]})})})})]})})}),ye=({data:d,columns:x})=>d!=null&&d.length?r.jsx("div",{className:"flex flex-col",children:r.jsx("div",{className:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:r.jsx("div",{className:"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8",children:r.jsx("div",{className:"overflow-hidden border-b border-gray-200 shadow sm:rounded-lg",children:r.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[r.jsx("thead",{className:"bg-gray-50",children:r.jsx("tr",{children:x.map((c,f)=>r.jsx("th",{scope:"col",className:"px-6 py-3 text-xs font-medium tracking-wider text-left text-gray-500 uppercase",children:c.title},c.title+f))})}),r.jsx("tbody",{children:d.map((c,f)=>r.jsx("tr",{className:"odd:bg-white even:bg-gray-100",children:x.map(({Cell:$,field:y,title:g},j)=>r.jsx("td",{className:"px-6 py-4 text-sm font-medium text-gray-900 whitespace-nowrap",children:$?r.jsx($,{entry:c}):`${c[y]}`},g+j))},(c==null?void 0:c.id)||f))})]})})})})}):r.jsxs("div",{className:"flex flex-col items-center justify-center text-gray-500 bg-white h-80",children:[r.jsx(fe,{className:"w-16 h-16"}),r.jsx("h4",{children:"No Entries Found"})]});function ve(d,x){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:x},d),m.createElement("path",{d:"M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"}))}const be=m.forwardRef(ve),Me=({title:d,children:x,isDone:c,triggerButton:f,submitButton:$,size:y="md"})=>{const{close:g,open:j,isOpen:N}=K();return m.useEffect(()=>{c&&g()},[c,g]),r.jsxs(r.Fragment,{children:[m.cloneElement(f,{onClick:j}),r.jsx(ge,{isOpen:N,onClose:g,title:d,size:y,renderFooter:()=>r.jsxs(r.Fragment,{children:[r.jsx(G,{variant:"inverse",size:"sm",onClick:g,children:"Cancel"}),$]}),children:x})]})},De=d=>{const{label:x,className:c,registration:f,error:$}=d;return r.jsx(le,{label:x,error:$,children:r.jsx("textarea",{className:Q("appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",c),...f})})};var X={exports:{}};(function(d,x){(function(c,f){d.exports=f()})(ce,function(){var c=1e3,f=6e4,$=36e5,y="millisecond",g="second",j="minute",N="hour",k="day",C="week",M="month",V="quarter",S="year",E="date",J="Invalid Date",ee=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,te=/\[([^\]]+)]|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,se={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(a){var s=["th","st","nd","rd"],e=a%100;return"["+a+(s[(e-20)%10]||s[e]||s[0])+"]"}},z=function(a,s,e){var n=String(a);return!n||n.length>=s?a:""+Array(s+1-n.length).join(e)+a},re={s:z,z:function(a){var s=-a.utcOffset(),e=Math.abs(s),n=Math.floor(e/60),t=e%60;return(s<=0?"+":"-")+z(n,2,"0")+":"+z(t,2,"0")},m:function a(s,e){if(s.date()1)return a(o[0])}else{var u=s.name;F[u]=s,t=u}return!n&&t&&(L=t),t||!n&&L},v=function(a,s){if(B(a))return a.clone();var e=typeof s=="object"?s:{};return e.date=a,e.args=arguments,new A(e)},l=re;l.l=W,l.i=B,l.w=function(a,s){return v(a,{locale:s.$L,utc:s.$u,x:s.$x,$offset:s.$offset})};var A=function(){function a(e){this.$L=W(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[Z]=!0}var s=a.prototype;return s.parse=function(e){this.$d=function(n){var t=n.date,i=n.utc;if(t===null)return new Date(NaN);if(l.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t=="string"&&!/Z$/i.test(t)){var o=t.match(ee);if(o){var u=o[2]-1||0,h=(o[7]||"0").substring(0,3);return i?new Date(Date.UTC(o[1],u,o[3]||1,o[4]||0,o[5]||0,o[6]||0,h)):new Date(o[1],u,o[3]||1,o[4]||0,o[5]||0,o[6]||0,h)}}return new Date(t)}(e),this.init()},s.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},s.$utils=function(){return l},s.isValid=function(){return this.$d.toString()!==J},s.isSame=function(e,n){var t=v(e);return this.startOf(n)<=t&&t<=this.endOf(n)},s.isAfter=function(e,n){return v(e)pe(d).format("MMMM D, YYYY h:mm A");export{je as C,fe as F,De as T,Me as a,be as b,ye as c,Ne as f}; diff --git a/dist/assets/index-Bxt2ec0A.css b/dist/assets/index-Bxt2ec0A.css new file mode 100644 index 00000000..655eaab5 --- /dev/null +++ b/dist/assets/index-Bxt2ec0A.css @@ -0,0 +1 @@ +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:Inter var,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;padding-inline-start:.375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding-top:.8571429em;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-inline-start:1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;text-align:start;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.5714286em;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-indigo{--tw-prose-links: #4f46e5;--tw-prose-invert-links: #6366f1}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.-my-2{margin-top:-.5rem;margin-bottom:-.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.-mr-12{margin-right:-3rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.mr-4{margin-right:1rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.contents{display:contents}.hidden{display:none}.h-0{height:0px}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-24{height:6rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-80{height:20rem}.h-\[100vh\]{height:100vh}.h-full{height:100%}.h-screen{height:100vh}.min-h-0{min-height:0px}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-24{width:6rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-auto{width:auto}.w-full{width:100%}.w-screen{width:100vw}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-7xl{max-width:80rem}.max-w-full{max-width:100%}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.origin-top-right{transform-origin:top right}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-2{--tw-translate-y: .5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-4{--tw-translate-y: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-16>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(4rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(4rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-y-scroll{overflow-y:scroll}.whitespace-nowrap{white-space:nowrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-75{--tw-bg-opacity: .75}.p-2{padding:.5rem}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-20{padding-bottom:5rem}.pb-4{padding-bottom:1rem}.pl-10{padding-left:2.5rem}.pl-3{padding-left:.75rem}.pr-10{padding-right:2.5rem}.pt-0{padding-top:0}.pt-0\.5{padding-top:.125rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-6{line-height:1.5rem}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-current{color:currentColor}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity: .05}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.odd\:bg-white:nth-child(odd){--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.even\:bg-gray-100:nth-child(2n){--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-gray-700:hover{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.hover\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.hover\:text-gray-500:hover{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\:text-indigo-900:hover{--tw-text-opacity: 1;color:rgb(49 46 129 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:opacity-80:hover{opacity:.8}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-inset:focus{--tw-ring-inset: inset}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:ring-white:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.focus\:ring-offset-1:focus{--tw-ring-offset-width: 1px}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-70:disabled{opacity:.7}.group:hover .group-hover\:text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\:mx-0{margin-left:0;margin-right:0}.sm\:mx-auto{margin-left:auto;margin-right:auto}.sm\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\:ml-4{margin-left:1rem}.sm\:mt-0{margin-top:0}.sm\:mt-4{margin-top:1rem}.sm\:block{display:block}.sm\:inline-block{display:inline-block}.sm\:flex{display:flex}.sm\:grid{display:grid}.sm\:h-10{height:2.5rem}.sm\:h-screen{height:100vh}.sm\:w-10{width:2.5rem}.sm\:w-auto{width:auto}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:32rem}.sm\:max-w-md{max-width:28rem}.sm\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:translate-x-2{--tw-translate-x: .5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row-reverse{flex-direction:row-reverse}.sm\:items-start{align-items:flex-start}.sm\:items-end{align-items:flex-end}.sm\:gap-4{gap:1rem}.sm\:divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.sm\:divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.sm\:rounded-lg{border-radius:.5rem}.sm\:p-0{padding:0}.sm\:p-6{padding:1.5rem}.sm\:px-10{padding-left:2.5rem;padding-right:2.5rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-5{padding-top:1.25rem;padding-bottom:1.25rem}.sm\:text-left{text-align:left}.sm\:align-middle{vertical-align:middle}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:duration-300{transition-duration:.3s}}@media (min-width: 768px){.md\:ml-6{margin-left:1.5rem}.md\:flex{display:flex}.md\:hidden{display:none}.md\:flex-shrink-0{flex-shrink:0}.md\:px-8{padding-left:2rem;padding-right:2rem}}@media (min-width: 1024px){.lg\:-mx-8{margin-left:-2rem;margin-right:-2rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-16{padding-top:4rem;padding-bottom:4rem}} diff --git a/dist/assets/index-D0mVz3ol.js b/dist/assets/index-D0mVz3ol.js new file mode 100644 index 00000000..5337a0bf --- /dev/null +++ b/dist/assets/index-D0mVz3ol.js @@ -0,0 +1,129 @@ +const __vite__fileDeps=["assets/index-wp4G9RRc.js","assets/ContentLayout-BPYlf98W.js","assets/format-D9jVc0G6.js","assets/Link-mjLZ8lwk.js","assets/index-FSShKPpV.js","assets/index-gTGY_0fC.js","assets/index-DBwRqsuw.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +var S1=Object.defineProperty;var T1=(e,t,n)=>t in e?S1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Xn=(e,t,n)=>(T1(e,typeof t!="symbol"?t+"":t,n),n);function A1(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var b1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ds(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function rb(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var gv={exports:{}},Xu={},yv={exports:{}},Re={};/** + * @license React + * react.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 Ho=Symbol.for("react.element"),F1=Symbol.for("react.portal"),R1=Symbol.for("react.fragment"),O1=Symbol.for("react.strict_mode"),N1=Symbol.for("react.profiler"),P1=Symbol.for("react.provider"),I1=Symbol.for("react.context"),L1=Symbol.for("react.forward_ref"),M1=Symbol.for("react.suspense"),$1=Symbol.for("react.memo"),j1=Symbol.for("react.lazy"),Uh=Symbol.iterator;function B1(e){return e===null||typeof e!="object"?null:(e=Uh&&e[Uh]||e["@@iterator"],typeof e=="function"?e:null)}var wv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xv=Object.assign,Ev={};function _s(e,t,n){this.props=e,this.context=t,this.refs=Ev,this.updater=n||wv}_s.prototype.isReactComponent={};_s.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};_s.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Dv(){}Dv.prototype=_s.prototype;function xd(e,t,n){this.props=e,this.context=t,this.refs=Ev,this.updater=n||wv}var Ed=xd.prototype=new Dv;Ed.constructor=xd;xv(Ed,_s.prototype);Ed.isPureReactComponent=!0;var zh=Array.isArray,_v=Object.prototype.hasOwnProperty,Dd={current:null},Cv={key:!0,ref:!0,__self:!0,__source:!0};function kv(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)_v.call(t,r)&&!Cv.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,ke=Z[Oe];if(0>>1;Oei(He,re))fti(Ie,He)?(Z[Oe]=Ie,Z[ft]=re,Oe=ft):(Z[Oe]=He,Z[Ae]=re,Oe=Ae);else if(fti(Ie,re))Z[Oe]=Ie,Z[ft]=re,Oe=ft;else break e}}return de}function i(Z,de){var re=Z.sortIndex-de.sortIndex;return re!==0?re:Z.id-de.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var u=[],l=[],c=1,f=null,v=3,w=!1,_=!1,S=!1,D=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(Z){for(var de=n(l);de!==null;){if(de.callback===null)r(l);else if(de.startTime<=Z)r(l),de.sortIndex=de.expirationTime,t(u,de);else break;de=n(l)}}function y(Z){if(S=!1,d(Z),!_)if(n(u)!==null)_=!0,We(C);else{var de=n(l);de!==null&&ze(y,de.startTime-Z)}}function C(Z,de){_=!1,S&&(S=!1,x(L),L=-1),w=!0;var re=v;try{for(d(de),f=n(u);f!==null&&(!(f.expirationTime>de)||Z&&!ye());){var Oe=f.callback;if(typeof Oe=="function"){f.callback=null,v=f.priorityLevel;var ke=Oe(f.expirationTime<=de);de=e.unstable_now(),typeof ke=="function"?f.callback=ke:f===n(u)&&r(u),d(de)}else r(u);f=n(u)}if(f!==null)var Pe=!0;else{var Ae=n(l);Ae!==null&&ze(y,Ae.startTime-de),Pe=!1}return Pe}finally{f=null,v=re,w=!1}}var F=!1,O=null,L=-1,z=5,H=-1;function ye(){return!(e.unstable_now()-HZ||125Oe?(Z.sortIndex=re,t(l,Z),n(u)===null&&Z===n(l)&&(S?(x(L),L=-1):S=!0,ze(y,re-Oe))):(Z.sortIndex=ke,t(u,Z),_||w||(_=!0,We(C))),Z},e.unstable_shouldYield=ye,e.unstable_wrapCallback=function(Z){var de=v;return function(){var re=v;v=de;try{return Z.apply(this,arguments)}finally{v=re}}}})(Fv);bv.exports=Fv;var Y1=bv.exports;/** + * @license React + * react-dom.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 X1=m,un=Y1;function V(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qc=Object.prototype.hasOwnProperty,J1=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Hh={},qh={};function ew(e){return Qc.call(qh,e)?!0:Qc.call(Hh,e)?!1:J1.test(e)?qh[e]=!0:(Hh[e]=!0,!1)}function tw(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function nw(e,t,n,r){if(t===null||typeof t>"u"||tw(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Zt(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var Rt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Rt[e]=new Zt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Rt[t]=new Zt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Rt[e]=new Zt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Rt[e]=new Zt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Rt[e]=new Zt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Rt[e]=new Zt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Rt[e]=new Zt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Rt[e]=new Zt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Rt[e]=new Zt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Cd=/[\-:]([a-z])/g;function kd(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Cd,kd);Rt[t]=new Zt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Cd,kd);Rt[t]=new Zt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Cd,kd);Rt[t]=new Zt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Rt[e]=new Zt(e,1,!1,e.toLowerCase(),null,!1,!1)});Rt.xlinkHref=new Zt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Rt[e]=new Zt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Sd(e,t,n,r){var i=Rt.hasOwnProperty(t)?Rt[t]:null;(i!==null?i.type!==0:r||!(2a||i[o]!==s[a]){var u=` +`+i[o].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=o&&0<=a);break}}}finally{Pl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ys(e):""}function rw(e){switch(e.tag){case 5:return Ys(e.type);case 16:return Ys("Lazy");case 13:return Ys("Suspense");case 19:return Ys("SuspenseList");case 0:case 2:case 15:return e=Il(e.type,!1),e;case 11:return e=Il(e.type.render,!1),e;case 1:return e=Il(e.type,!0),e;default:return""}}function Yc(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case $i:return"Fragment";case Mi:return"Portal";case Zc:return"Profiler";case Td:return"StrictMode";case Kc:return"Suspense";case Gc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Nv:return(e.displayName||"Context")+".Consumer";case Ov:return(e._context.displayName||"Context")+".Provider";case Ad:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case bd:return t=e.displayName||null,t!==null?t:Yc(e.type)||"Memo";case Ar:t=e._payload,e=e._init;try{return Yc(e(t))}catch{}}return null}function iw(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Yc(t);case 8:return t===Td?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Yr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Iv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sw(e){var t=Iv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function la(e){e._valueTracker||(e._valueTracker=sw(e))}function Lv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Iv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Xa(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Xc(e,t){var n=t.checked;return tt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Qh(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Yr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Mv(e,t){t=t.checked,t!=null&&Sd(e,"checked",t,!1)}function Jc(e,t){Mv(e,t);var n=Yr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ef(e,t.type,n):t.hasOwnProperty("defaultValue")&&ef(e,t.type,Yr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Zh(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ef(e,t,n){(t!=="number"||Xa(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Xs=Array.isArray;function Gi(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ca.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Eo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var oo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ow=["Webkit","ms","Moz","O"];Object.keys(oo).forEach(function(e){ow.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),oo[t]=oo[e]})});function Uv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||oo.hasOwnProperty(e)&&oo[e]?(""+t).trim():t+"px"}function zv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Uv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var aw=tt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function rf(e,t){if(t){if(aw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(V(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(V(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(V(61))}if(t.style!=null&&typeof t.style!="object")throw Error(V(62))}}function sf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var of=null;function Fd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var af=null,Yi=null,Xi=null;function Yh(e){if(e=Qo(e)){if(typeof af!="function")throw Error(V(280));var t=e.stateNode;t&&(t=rl(t),af(e.stateNode,e.type,t))}}function Vv(e){Yi?Xi?Xi.push(e):Xi=[e]:Yi=e}function Hv(){if(Yi){var e=Yi,t=Xi;if(Xi=Yi=null,Yh(e),t)for(e=0;e>>=0,e===0?32:31-(yw(e)/ww|0)|0}var fa=64,da=4194304;function Js(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function nu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=Js(a):(s&=o,s!==0&&(r=Js(s)))}else o=n&~i,o!==0?r=Js(o):s!==0&&(r=Js(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function qo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Pn(t),e[t]=n}function _w(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=uo),op=" ",ap=!1;function c0(e,t){switch(e){case"keyup":return Yw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function f0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ji=!1;function Jw(e,t){switch(e){case"compositionend":return f0(t);case"keypress":return t.which!==32?null:(ap=!0,op);case"textInput":return e=t.data,e===op&&ap?null:e;default:return null}}function ex(e,t){if(ji)return e==="compositionend"||!$d&&c0(e,t)?(e=u0(),Pa=Id=Lr=null,ji=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=fp(n)}}function m0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?m0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function v0(){for(var e=window,t=Xa();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Xa(e.document)}return t}function jd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function lx(e){var t=v0(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&m0(n.ownerDocument.documentElement,n)){if(r!==null&&jd(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=dp(n,s);var o=dp(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Bi=null,hf=null,co=null,pf=!1;function hp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;pf||Bi==null||Bi!==Xa(r)||(r=Bi,"selectionStart"in r&&jd(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),co&&To(co,r)||(co=r,r=su(hf,"onSelect"),0Vi||(e.current=xf[Vi],xf[Vi]=null,Vi--)}function Qe(e,t){Vi++,xf[Vi]=e.current,e.current=t}var Xr={},jt=ti(Xr),Xt=ti(!1),wi=Xr;function us(e,t){var n=e.type.contextTypes;if(!n)return Xr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Jt(e){return e=e.childContextTypes,e!=null}function au(){Ke(Xt),Ke(jt)}function xp(e,t,n){if(jt.current!==Xr)throw Error(V(168));Qe(jt,t),Qe(Xt,n)}function k0(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(V(108,iw(e)||"Unknown",i));return tt({},n,r)}function uu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Xr,wi=jt.current,Qe(jt,e),Qe(Xt,Xt.current),!0}function Ep(e,t,n){var r=e.stateNode;if(!r)throw Error(V(169));n?(e=k0(e,t,wi),r.__reactInternalMemoizedMergedChildContext=e,Ke(Xt),Ke(jt),Qe(jt,e)):Ke(Xt),Qe(Xt,n)}var nr=null,il=!1,Kl=!1;function S0(e){nr===null?nr=[e]:nr.push(e)}function Ex(e){il=!0,S0(e)}function ni(){if(!Kl&&nr!==null){Kl=!0;var e=0,t=Ue;try{var n=nr;for(Ue=1;e>=o,i-=o,sr=1<<32-Pn(t)+i|n<L?(z=O,O=null):z=O.sibling;var H=v(x,O,d[L],y);if(H===null){O===null&&(O=z);break}e&&O&&H.alternate===null&&t(x,O),h=s(H,h,L),F===null?C=H:F.sibling=H,F=H,O=z}if(L===d.length)return n(x,O),Ge&&ai(x,L),C;if(O===null){for(;LL?(z=O,O=null):z=O.sibling;var ye=v(x,O,H.value,y);if(ye===null){O===null&&(O=z);break}e&&O&&ye.alternate===null&&t(x,O),h=s(ye,h,L),F===null?C=ye:F.sibling=ye,F=ye,O=z}if(H.done)return n(x,O),Ge&&ai(x,L),C;if(O===null){for(;!H.done;L++,H=d.next())H=f(x,H.value,y),H!==null&&(h=s(H,h,L),F===null?C=H:F.sibling=H,F=H);return Ge&&ai(x,L),C}for(O=r(x,O);!H.done;L++,H=d.next())H=w(O,x,L,H.value,y),H!==null&&(e&&H.alternate!==null&&O.delete(H.key===null?L:H.key),h=s(H,h,L),F===null?C=H:F.sibling=H,F=H);return e&&O.forEach(function(oe){return t(x,oe)}),Ge&&ai(x,L),C}function D(x,h,d,y){if(typeof d=="object"&&d!==null&&d.type===$i&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case ua:e:{for(var C=d.key,F=h;F!==null;){if(F.key===C){if(C=d.type,C===$i){if(F.tag===7){n(x,F.sibling),h=i(F,d.props.children),h.return=x,x=h;break e}}else if(F.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ar&&Cp(C)===F.type){n(x,F.sibling),h=i(F,d.props),h.ref=zs(x,F,d),h.return=x,x=h;break e}n(x,F);break}else t(x,F);F=F.sibling}d.type===$i?(h=yi(d.props.children,x.mode,y,d.key),h.return=x,x=h):(y=za(d.type,d.key,d.props,null,x.mode,y),y.ref=zs(x,h,d),y.return=x,x=y)}return o(x);case Mi:e:{for(F=d.key;h!==null;){if(h.key===F)if(h.tag===4&&h.stateNode.containerInfo===d.containerInfo&&h.stateNode.implementation===d.implementation){n(x,h.sibling),h=i(h,d.children||[]),h.return=x,x=h;break e}else{n(x,h);break}else t(x,h);h=h.sibling}h=rc(d,x.mode,y),h.return=x,x=h}return o(x);case Ar:return F=d._init,D(x,h,F(d._payload),y)}if(Xs(d))return _(x,h,d,y);if(Ms(d))return S(x,h,d,y);wa(x,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,h!==null&&h.tag===6?(n(x,h.sibling),h=i(h,d),h.return=x,x=h):(n(x,h),h=nc(d,x.mode,y),h.return=x,x=h),o(x)):n(x,h)}return D}var cs=F0(!0),R0=F0(!1),fu=ti(null),du=null,Wi=null,Vd=null;function Hd(){Vd=Wi=du=null}function qd(e){var t=fu.current;Ke(fu),e._currentValue=t}function _f(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function es(e,t){du=e,Vd=Wi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Yt=!0),e.firstContext=null)}function En(e){var t=e._currentValue;if(Vd!==e)if(e={context:e,memoizedValue:t,next:null},Wi===null){if(du===null)throw Error(V(308));Wi=e,du.dependencies={lanes:0,firstContext:e}}else Wi=Wi.next=e;return t}var di=null;function Wd(e){di===null?di=[e]:di.push(e)}function O0(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Wd(t)):(n.next=i.next,i.next=n),t.interleaved=n,mr(e,r)}function mr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var br=!1;function Qd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function N0(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function lr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function qr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Me&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,mr(e,n)}return i=r.interleaved,i===null?(t.next=t,Wd(r)):(t.next=i.next,i.next=t),r.interleaved=t,mr(e,n)}function La(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Od(e,n)}}function kp(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function hu(e,t,n,r){var i=e.updateQueue;br=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var u=a,l=u.next;u.next=null,o===null?s=l:o.next=l,o=u;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=l:a.next=l,c.lastBaseUpdate=u))}if(s!==null){var f=i.baseState;o=0,c=l=u=null,a=s;do{var v=a.lane,w=a.eventTime;if((r&v)===v){c!==null&&(c=c.next={eventTime:w,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var _=e,S=a;switch(v=t,w=n,S.tag){case 1:if(_=S.payload,typeof _=="function"){f=_.call(w,f,v);break e}f=_;break e;case 3:_.flags=_.flags&-65537|128;case 0:if(_=S.payload,v=typeof _=="function"?_.call(w,f,v):_,v==null)break e;f=tt({},f,v);break e;case 2:br=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,v=i.effects,v===null?i.effects=[a]:v.push(a))}else w={eventTime:w,lane:v,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(l=c=w,u=f):c=c.next=w,o|=v;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;v=a,a=v.next,v.next=null,i.lastBaseUpdate=v,i.shared.pending=null}}while(!0);if(c===null&&(u=f),i.baseState=u,i.firstBaseUpdate=l,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Di|=o,e.lanes=o,e.memoizedState=f}}function Sp(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Yl.transition;Yl.transition={};try{e(!1),t()}finally{Ue=n,Yl.transition=r}}function G0(){return Dn().memoizedState}function kx(e,t,n){var r=Qr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Y0(e))X0(t,n);else if(n=O0(e,t,n,r),n!==null){var i=Ht();In(n,e,r,i),J0(n,t,r)}}function Sx(e,t,n){var r=Qr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Y0(e))X0(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Ln(a,o)){var u=t.interleaved;u===null?(i.next=i,Wd(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=O0(e,t,i,r),n!==null&&(i=Ht(),In(n,e,r,i),J0(n,t,r))}}function Y0(e){var t=e.alternate;return e===Je||t!==null&&t===Je}function X0(e,t){fo=mu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function J0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Od(e,n)}}var vu={readContext:En,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useInsertionEffect:Pt,useLayoutEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useMutableSource:Pt,useSyncExternalStore:Pt,useId:Pt,unstable_isNewReconciler:!1},Tx={readContext:En,useCallback:function(e,t){return zn().memoizedState=[e,t===void 0?null:t],e},useContext:En,useEffect:Ap,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,$a(4194308,4,q0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $a(4194308,4,e,t)},useInsertionEffect:function(e,t){return $a(4,2,e,t)},useMemo:function(e,t){var n=zn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=zn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=kx.bind(null,Je,e),[r.memoizedState,e]},useRef:function(e){var t=zn();return e={current:e},t.memoizedState=e},useState:Tp,useDebugValue:th,useDeferredValue:function(e){return zn().memoizedState=e},useTransition:function(){var e=Tp(!1),t=e[0];return e=Cx.bind(null,e[1]),zn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Je,i=zn();if(Ge){if(n===void 0)throw Error(V(407));n=n()}else{if(n=t(),kt===null)throw Error(V(349));Ei&30||M0(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Ap(j0.bind(null,r,s,e),[e]),r.flags|=2048,Io(9,$0.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=zn(),t=kt.identifierPrefix;if(Ge){var n=or,r=sr;n=(r&~(1<<32-Pn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=No++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Vn]=t,e[Fo]=r,lg(e,t,!1,!1),t.stateNode=e;e:{switch(o=sf(n,r),n){case"dialog":Ze("cancel",e),Ze("close",e),i=r;break;case"iframe":case"object":case"embed":Ze("load",e),i=r;break;case"video":case"audio":for(i=0;ihs&&(t.flags|=128,r=!0,Vs(s,!1),t.lanes=4194304)}else{if(!r)if(e=pu(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Vs(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Ge)return It(t),null}else 2*ot()-s.renderingStartTime>hs&&n!==1073741824&&(t.flags|=128,r=!0,Vs(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ot(),t.sibling=null,n=Xe.current,Qe(Xe,r?n&1|2:n&1),t):(It(t),null);case 22:case 23:return ah(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?sn&1073741824&&(It(t),t.subtreeFlags&6&&(t.flags|=8192)):It(t),null;case 24:return null;case 25:return null}throw Error(V(156,t.tag))}function Ix(e,t){switch(Ud(t),t.tag){case 1:return Jt(t.type)&&au(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fs(),Ke(Xt),Ke(jt),Gd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Kd(t),null;case 13:if(Ke(Xe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(V(340));ls()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ke(Xe),null;case 4:return fs(),null;case 10:return qd(t.type._context),null;case 22:case 23:return ah(),null;case 24:return null;default:return null}}var Ea=!1,$t=!1,Lx=typeof WeakSet=="function"?WeakSet:Set,se=null;function Qi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){rt(e,t,r)}else n.current=null}function Of(e,t,n){try{n()}catch(r){rt(e,t,r)}}var jp=!1;function Mx(e,t){if(mf=ru,e=v0(),jd(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,u=-1,l=0,c=0,f=e,v=null;t:for(;;){for(var w;f!==n||i!==0&&f.nodeType!==3||(a=o+i),f!==s||r!==0&&f.nodeType!==3||(u=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(w=f.firstChild)!==null;)v=f,f=w;for(;;){if(f===e)break t;if(v===n&&++l===i&&(a=o),v===s&&++c===r&&(u=o),(w=f.nextSibling)!==null)break;f=v,v=f.parentNode}f=w}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(vf={focusedElem:e,selectionRange:n},ru=!1,se=t;se!==null;)if(t=se,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,se=e;else for(;se!==null;){t=se;try{var _=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(_!==null){var S=_.memoizedProps,D=_.memoizedState,x=t.stateNode,h=x.getSnapshotBeforeUpdate(t.elementType===t.type?S:An(t.type,S),D);x.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var d=t.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(V(163))}}catch(y){rt(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,se=e;break}se=t.return}return _=jp,jp=!1,_}function ho(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Of(t,n,s)}i=i.next}while(i!==r)}}function al(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Nf(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function dg(e){var t=e.alternate;t!==null&&(e.alternate=null,dg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vn],delete t[Fo],delete t[wf],delete t[wx],delete t[xx])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function hg(e){return e.tag===5||e.tag===3||e.tag===4}function Bp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Pf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ou));else if(r!==4&&(e=e.child,e!==null))for(Pf(e,t,n),e=e.sibling;e!==null;)Pf(e,t,n),e=e.sibling}function If(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(If(e,t,n),e=e.sibling;e!==null;)If(e,t,n),e=e.sibling}var Tt=null,bn=!1;function Sr(e,t,n){for(n=n.child;n!==null;)pg(e,t,n),n=n.sibling}function pg(e,t,n){if(qn&&typeof qn.onCommitFiberUnmount=="function")try{qn.onCommitFiberUnmount(Ju,n)}catch{}switch(n.tag){case 5:$t||Qi(n,t);case 6:var r=Tt,i=bn;Tt=null,Sr(e,t,n),Tt=r,bn=i,Tt!==null&&(bn?(e=Tt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Tt.removeChild(n.stateNode));break;case 18:Tt!==null&&(bn?(e=Tt,n=n.stateNode,e.nodeType===8?Zl(e.parentNode,n):e.nodeType===1&&Zl(e,n),ko(e)):Zl(Tt,n.stateNode));break;case 4:r=Tt,i=bn,Tt=n.stateNode.containerInfo,bn=!0,Sr(e,t,n),Tt=r,bn=i;break;case 0:case 11:case 14:case 15:if(!$t&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Of(n,t,o),i=i.next}while(i!==r)}Sr(e,t,n);break;case 1:if(!$t&&(Qi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){rt(n,t,a)}Sr(e,t,n);break;case 21:Sr(e,t,n);break;case 22:n.mode&1?($t=(r=$t)||n.memoizedState!==null,Sr(e,t,n),$t=r):Sr(e,t,n);break;default:Sr(e,t,n)}}function Up(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Lx),t.forEach(function(r){var i=Wx.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function kn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~s}if(r=i,r=ot()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*jx(r/1960))-r,10e?16:e,Mr===null)var r=!1;else{if(e=Mr,Mr=null,wu=0,Me&6)throw Error(V(331));var i=Me;for(Me|=4,se=e.current;se!==null;){var s=se,o=s.child;if(se.flags&16){var a=s.deletions;if(a!==null){for(var u=0;uot()-sh?gi(e,0):ih|=n),en(e,t)}function Dg(e,t){t===0&&(e.mode&1?(t=da,da<<=1,!(da&130023424)&&(da=4194304)):t=1);var n=Ht();e=mr(e,t),e!==null&&(qo(e,t,n),en(e,n))}function qx(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Dg(e,n)}function Wx(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(V(314))}r!==null&&r.delete(t),Dg(e,n)}var _g;_g=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Xt.current)Yt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Yt=!1,Nx(e,t,n);Yt=!!(e.flags&131072)}else Yt=!1,Ge&&t.flags&1048576&&T0(t,cu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ja(e,t),e=t.pendingProps;var i=us(t,jt.current);es(t,n),i=Xd(null,t,r,e,i,n);var s=Jd();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Jt(r)?(s=!0,uu(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Qd(t),i.updater=ol,t.stateNode=i,i._reactInternals=t,kf(t,r,e,n),t=Af(null,t,r,!0,s,n)):(t.tag=0,Ge&&s&&Bd(t),zt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ja(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Zx(r),e=An(r,e),i){case 0:t=Tf(null,t,r,e,n);break e;case 1:t=Lp(null,t,r,e,n);break e;case 11:t=Pp(null,t,r,e,n);break e;case 14:t=Ip(null,t,r,An(r.type,e),n);break e}throw Error(V(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:An(r,i),Tf(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:An(r,i),Lp(e,t,r,i,n);case 3:e:{if(og(t),e===null)throw Error(V(387));r=t.pendingProps,s=t.memoizedState,i=s.element,N0(e,t),hu(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=ds(Error(V(423)),t),t=Mp(e,t,r,n,i);break e}else if(r!==i){i=ds(Error(V(424)),t),t=Mp(e,t,r,n,i);break e}else for(on=Hr(t.stateNode.containerInfo.firstChild),an=t,Ge=!0,Fn=null,n=R0(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ls(),r===i){t=vr(e,t,n);break e}zt(e,t,r,n)}t=t.child}return t;case 5:return P0(t),e===null&&Df(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,gf(r,i)?o=null:s!==null&&gf(r,s)&&(t.flags|=32),sg(e,t),zt(e,t,o,n),t.child;case 6:return e===null&&Df(t),null;case 13:return ag(e,t,n);case 4:return Zd(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=cs(t,null,r,n):zt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:An(r,i),Pp(e,t,r,i,n);case 7:return zt(e,t,t.pendingProps,n),t.child;case 8:return zt(e,t,t.pendingProps.children,n),t.child;case 12:return zt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,Qe(fu,r._currentValue),r._currentValue=o,s!==null)if(Ln(s.value,o)){if(s.children===i.children&&!Xt.current){t=vr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(s.tag===1){u=lr(-1,n&-n),u.tag=2;var l=s.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?u.next=u:(u.next=c.next,c.next=u),l.pending=u}}s.lanes|=n,u=s.alternate,u!==null&&(u.lanes|=n),_f(s.return,n,t),a.lanes|=n;break}u=u.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(V(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),_f(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}zt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,es(t,n),i=En(i),r=r(i),t.flags|=1,zt(e,t,r,n),t.child;case 14:return r=t.type,i=An(r,t.pendingProps),i=An(r.type,i),Ip(e,t,r,i,n);case 15:return rg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:An(r,i),ja(e,t),t.tag=1,Jt(r)?(e=!0,uu(t)):e=!1,es(t,n),eg(t,r,i),kf(t,r,i,n),Af(null,t,r,!0,e,n);case 19:return ug(e,t,n);case 22:return ig(e,t,n)}throw Error(V(156,t.tag))};function Cg(e,t){return Yv(e,t)}function Qx(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yn(e,t,n,r){return new Qx(e,t,n,r)}function lh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zx(e){if(typeof e=="function")return lh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ad)return 11;if(e===bd)return 14}return 2}function Zr(e,t){var n=e.alternate;return n===null?(n=yn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function za(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")lh(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case $i:return yi(n.children,i,s,t);case Td:o=8,i|=8;break;case Zc:return e=yn(12,n,t,i|2),e.elementType=Zc,e.lanes=s,e;case Kc:return e=yn(13,n,t,i),e.elementType=Kc,e.lanes=s,e;case Gc:return e=yn(19,n,t,i),e.elementType=Gc,e.lanes=s,e;case Pv:return ll(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ov:o=10;break e;case Nv:o=9;break e;case Ad:o=11;break e;case bd:o=14;break e;case Ar:o=16,r=null;break e}throw Error(V(130,e==null?e:typeof e,""))}return t=yn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function yi(e,t,n,r){return e=yn(7,e,r,t),e.lanes=n,e}function ll(e,t,n,r){return e=yn(22,e,r,t),e.elementType=Pv,e.lanes=n,e.stateNode={isHidden:!1},e}function nc(e,t,n){return e=yn(6,e,null,t),e.lanes=n,e}function rc(e,t,n){return t=yn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Kx(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ml(0),this.expirationTimes=Ml(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ml(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ch(e,t,n,r,i,s,o,a,u){return e=new Kx(e,t,n,a,u),t===1?(t=1,s===!0&&(t|=8)):t=0,s=yn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qd(s),e}function Gx(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ag)}catch(e){console.error(e)}}Ag(),Av.exports=ln;var bg=Av.exports,Fg,Kp=bg;Fg=Kp.createRoot,Kp.hydrateRoot;function Bf(e,t){return Bf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Bf(e,t)}function tE(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Bf(e,t)}var nE=function(t,n){return t===void 0&&(t=[]),n===void 0&&(n=[]),t.length!==n.length||t.some(function(r,i){return!Object.is(r,n[i])})},Gp={error:null},rE=function(e){tE(t,e);function t(){for(var r,i=arguments.length,s=new Array(i),o=0;o(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(Rg||{}),ic={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},Xp=Object.values(Rg),ph={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},pE=Object.entries(ph).reduce((e,[t,n])=>(e[n]=t,e),{}),On="data-rh",ns={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},rs=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},mE=e=>{let t=rs(e,"title");const n=rs(e,ns.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=rs(e,ns.DEFAULT_TITLE);return t||r||void 0},vE=e=>rs(e,ns.ON_CHANGE_CLIENT_STATE)||(()=>{}),sc=(e,t)=>t.filter(n=>typeof n[e]<"u").map(n=>n[e]).reduce((n,r)=>({...n,...r}),{}),gE=(e,t)=>t.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,r)=>{if(!n.length){const i=Object.keys(r);for(let s=0;sconsole&&typeof console.warn=="function"&&console.warn(e),qs=(e,t,n)=>{const r={};return n.filter(i=>Array.isArray(i[e])?!0:(typeof i[e]<"u"&&yE(`Helmet: ${e} should be of type "Array". Instead found type "${typeof i[e]}"`),!1)).map(i=>i[e]).reverse().reduce((i,s)=>{const o={};s.filter(u=>{let l;const c=Object.keys(u);for(let v=0;vi.push(u));const a=Object.keys(o);for(let u=0;u{if(Array.isArray(e)&&e.length){for(let n=0;n({baseTag:gE(["href"],e),bodyAttributes:sc("bodyAttributes",e),defer:rs(e,ns.DEFER),encode:rs(e,ns.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:sc("htmlAttributes",e),linkTags:qs("link",["rel","href"],e),metaTags:qs("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:qs("noscript",["innerHTML"],e),onChangeClientState:vE(e),scriptTags:qs("script",["src","innerHTML"],e),styleTags:qs("style",["cssText"],e),title:mE(e),titleAttributes:sc("titleAttributes",e),prioritizeSeoTags:wE(e,ns.PRIORITIZE_SEO_TAGS)}),Og=e=>Array.isArray(e)?e.join(""):e,EE=(e,t)=>{const n=Object.keys(e);for(let r=0;rArray.isArray(e)?e.reduce((n,r)=>(EE(r,t)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:e,priority:[]},Jp=(e,t)=>({...e,[t]:void 0}),DE=["noscript","script","style"],Uf=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),Ng=e=>Object.keys(e).reduce((t,n)=>{const r=typeof e[n]<"u"?`${n}="${e[n]}"`:`${n}`;return t?`${t} ${r}`:r},""),_E=(e,t,n,r)=>{const i=Ng(n),s=Og(t);return i?`<${e} ${On}="true" ${i}>${Uf(s,r)}`:`<${e} ${On}="true">${Uf(s,r)}`},CE=(e,t,n=!0)=>t.reduce((r,i)=>{const s=i,o=Object.keys(s).filter(l=>!(l==="innerHTML"||l==="cssText")).reduce((l,c)=>{const f=typeof s[c]>"u"?c:`${c}="${Uf(s[c],n)}"`;return l?`${l} ${f}`:f},""),a=s.innerHTML||s.cssText||"",u=DE.indexOf(e)===-1;return`${r}<${e} ${On}="true" ${o}${u?"/>":`>${a}`}`},""),Pg=(e,t={})=>Object.keys(e).reduce((n,r)=>{const i=ph[r];return n[i||r]=e[r],n},t),kE=(e,t,n)=>{const r={key:t,[On]:!0},i=Pg(n,r);return[te.createElement("title",i,t)]},Ha=(e,t)=>t.map((n,r)=>{const i={key:r,[On]:!0};return Object.keys(n).forEach(s=>{const a=ph[s]||s;if(a==="innerHTML"||a==="cssText"){const u=n.innerHTML||n.cssText;i.dangerouslySetInnerHTML={__html:u}}else i[a]=n[s]}),te.createElement(e,i)}),pn=(e,t,n=!0)=>{switch(e){case"title":return{toComponent:()=>kE(e,t.title,t.titleAttributes),toString:()=>_E(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>Pg(t),toString:()=>Ng(t)};default:return{toComponent:()=>Ha(e,t),toString:()=>CE(e,t,n)}}},SE=({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{const i=oc(e,ic.meta),s=oc(t,ic.link),o=oc(n,ic.script);return{priorityMethods:{toComponent:()=>[...Ha("meta",i.priority),...Ha("link",s.priority),...Ha("script",o.priority)],toString:()=>`${pn("meta",i.priority,r)} ${pn("link",s.priority,r)} ${pn("script",o.priority,r)}`},metaTags:i.default,linkTags:s.default,scriptTags:o.default}},TE=e=>{const{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:i,noscriptTags:s,styleTags:o,title:a="",titleAttributes:u,prioritizeSeoTags:l}=e;let{linkTags:c,metaTags:f,scriptTags:v}=e,w={toComponent:()=>{},toString:()=>""};return l&&({priorityMethods:w,linkTags:c,metaTags:f,scriptTags:v}=SE(e)),{priority:w,base:pn("base",t,r),bodyAttributes:pn("bodyAttributes",n,r),htmlAttributes:pn("htmlAttributes",i,r),link:pn("link",c,r),meta:pn("meta",f,r),noscript:pn("noscript",s,r),script:pn("script",v,r),style:pn("style",o,r),title:pn("title",{title:a,titleAttributes:u},r)}},zf=TE,Ca=[],Ig=!!(typeof window<"u"&&window.document&&window.document.createElement),Du=class{constructor(e,t){Xn(this,"instances",[]);Xn(this,"canUseDOM",Ig);Xn(this,"context");Xn(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Ca:this.instances,add:e=>{(this.canUseDOM?Ca:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Ca:this.instances).indexOf(e);(this.canUseDOM?Ca:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=zf({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},AE={},Lg=te.createContext(AE),ss,Mg=(ss=class extends m.Component{constructor(n){super(n);Xn(this,"helmetData");this.helmetData=new Du(this.props.context||{},ss.canUseDOM)}render(){return te.createElement(Lg.Provider,{value:this.helmetData.value},this.props.children)}},Xn(ss,"canUseDOM",Ig),ss),Oi=(e,t)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${e}[${On}]`),i=[].slice.call(r),s=[];let o;return t&&t.length&&t.forEach(a=>{const u=document.createElement(e);for(const l in a)if(Object.prototype.hasOwnProperty.call(a,l))if(l==="innerHTML")u.innerHTML=a.innerHTML;else if(l==="cssText")u.styleSheet?u.styleSheet.cssText=a.cssText:u.appendChild(document.createTextNode(a.cssText));else{const c=l,f=typeof a[c]>"u"?"":a[c];u.setAttribute(l,f)}u.setAttribute(On,"true"),i.some((l,c)=>(o=c,u.isEqualNode(l)))?i.splice(o,1):s.push(u)}),i.forEach(a=>{var u;return(u=a.parentNode)==null?void 0:u.removeChild(a)}),s.forEach(a=>n.appendChild(a)),{oldTags:i,newTags:s}},Vf=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const r=n.getAttribute(On),i=r?r.split(","):[],s=[...i],o=Object.keys(t);for(const a of o){const u=t[a]||"";n.getAttribute(a)!==u&&n.setAttribute(a,u),i.indexOf(a)===-1&&i.push(a);const l=s.indexOf(a);l!==-1&&s.splice(l,1)}for(let a=s.length-1;a>=0;a-=1)n.removeAttribute(s[a]);i.length===s.length?n.removeAttribute(On):n.getAttribute(On)!==o.join(",")&&n.setAttribute(On,o.join(","))},bE=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=Og(e)),Vf("title",t)},em=(e,t)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:i,linkTags:s,metaTags:o,noscriptTags:a,onChangeClientState:u,scriptTags:l,styleTags:c,title:f,titleAttributes:v}=e;Vf("body",r),Vf("html",i),bE(f,v);const w={baseTag:Oi("base",n),linkTags:Oi("link",s),metaTags:Oi("meta",o),noscriptTags:Oi("noscript",a),scriptTags:Oi("script",l),styleTags:Oi("style",c)},_={},S={};Object.keys(w).forEach(D=>{const{newTags:x,oldTags:h}=w[D];x.length&&(_[D]=x),h.length&&(S[D]=w[D].oldTags)}),t&&t(),u(e,_,S)},Ws=null,FE=e=>{Ws&&cancelAnimationFrame(Ws),e.defer?Ws=requestAnimationFrame(()=>{em(e,()=>{Ws=null})}):(em(e),Ws=null)},RE=FE,tm=class extends m.Component{constructor(){super(...arguments);Xn(this,"rendered",!1)}shouldComponentUpdate(t){return!hE(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:n}=this.props.context;let r=null;const i=xE(t.get().map(s=>{const o={...s.props};return delete o.context,o}));Mg.canUseDOM?RE(i):zf&&(r=zf(i)),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},Wc,OE=(Wc=class extends m.Component{shouldComponentUpdate(e){return!lE(Jp(this.props,"helmetData"),Jp(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case"title":return{...t,[e.type]:r,titleAttributes:{...n}};case"body":return{...t,bodyAttributes:{...n}};case"html":return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(r=>{n={...n,[r]:e[r]}}),n}warnOnInvalidChildren(e,t){return Yp(Xp.some(n=>e.type===n),typeof e.type=="function"?"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${Xp.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),Yp(!t||typeof t=="string"||Array.isArray(t)&&!t.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`} ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return te.Children.forEach(e,r=>{if(!r||!r.props)return;const{children:i,...s}=r.props,o=Object.keys(s).reduce((u,l)=>(u[pE[l]||l]=s[l],u),{});let{type:a}=r;switch(typeof a=="symbol"?a=a.toString():this.warnOnInvalidChildren(r,i),a){case"Symbol(react.fragment)":t=this.mapChildrenToProps(i,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,o,i);break;default:t=this.mapObjectTypeChildren(r,t,o,i);break}}),this.mapArrayTypeChildrenToProps(n,t)}render(){const{children:e,...t}=this.props;let n={...t},{helmetData:r}=t;if(e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof Du)){const i=r;r=new Du(i.context,!0),delete n.helmetData}return r?te.createElement(tm,{...n,context:r.value}):te.createElement(Lg.Consumer,null,i=>te.createElement(tm,{...n,context:i}))}},Xn(Wc,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Wc);class Ss{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){const n={listener:t};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const Mo=typeof window>"u"||"Deno"in window;function mn(){}function NE(e,t){return typeof e=="function"?e(t):e}function Hf(e){return typeof e=="number"&&e>=0&&e!==1/0}function $g(e,t){return Math.max(e+(t||0)-Date.now(),0)}function to(e,t,n){return Ko(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function PE(e,t,n){return Ko(e)?{...t,mutationKey:e}:typeof e=="function"?{...t,mutationFn:e}:{...e}}function Fr(e,t,n){return Ko(e)?[{...t,queryKey:e},n]:[e||{},t]}function nm(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(Ko(o)){if(r){if(t.queryHash!==mh(o,t.options))return!1}else if(!_u(t.queryKey,o))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||typeof i<"u"&&i!==t.state.fetchStatus||s&&!s(t))}function rm(e,t){const{exact:n,fetching:r,predicate:i,mutationKey:s}=e;if(Ko(s)){if(!t.options.mutationKey)return!1;if(n){if(pi(t.options.mutationKey)!==pi(s))return!1}else if(!_u(t.options.mutationKey,s))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||i&&!i(t))}function mh(e,t){return((t==null?void 0:t.queryKeyHashFn)||pi)(e)}function pi(e){return JSON.stringify(e,(t,n)=>qf(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function _u(e,t){return jg(e,t)}function jg(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!jg(e[n],t[n])):!1}function Bg(e,t){if(e===t)return e;const n=im(e)&&im(t);if(n||qf(e)&&qf(t)){const r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),s=i.length,o=n?[]:{};let a=0;for(let u=0;u"u")return!0;const n=t.prototype;return!(!sm(n)||!n.hasOwnProperty("isPrototypeOf"))}function sm(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ko(e){return Array.isArray(e)}function Ug(e){return new Promise(t=>{setTimeout(t,e)})}function om(e){Ug(0).then(e)}function IE(){if(typeof AbortController=="function")return new AbortController}function Wf(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Bg(e,t):t}class LE extends Ss{constructor(){super(),this.setup=t=>{if(!Mo&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const ku=new LE,am=["online","offline"];class ME extends Ss{constructor(){super(),this.setup=t=>{if(!Mo&&window.addEventListener){const n=()=>t();return am.forEach(r=>{window.addEventListener(r,n,!1)}),()=>{am.forEach(r=>{window.removeEventListener(r,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Su=new ME;function $E(e){return Math.min(1e3*2**e,3e4)}function pl(e){return(e??"online")==="online"?Su.isOnline():!0}class zg{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function qa(e){return e instanceof zg}function Vg(e){let t=!1,n=0,r=!1,i,s,o;const a=new Promise((D,x)=>{s=D,o=x}),u=D=>{r||(w(new zg(D)),e.abort==null||e.abort())},l=()=>{t=!0},c=()=>{t=!1},f=()=>!ku.isFocused()||e.networkMode!=="always"&&!Su.isOnline(),v=D=>{r||(r=!0,e.onSuccess==null||e.onSuccess(D),i==null||i(),s(D))},w=D=>{r||(r=!0,e.onError==null||e.onError(D),i==null||i(),o(D))},_=()=>new Promise(D=>{i=x=>{const h=r||!f();return h&&D(x),h},e.onPause==null||e.onPause()}).then(()=>{i=void 0,r||e.onContinue==null||e.onContinue()}),S=()=>{if(r)return;let D;try{D=e.fn()}catch(x){D=Promise.reject(x)}Promise.resolve(D).then(v).catch(x=>{var h,d;if(r)return;const y=(h=e.retry)!=null?h:3,C=(d=e.retryDelay)!=null?d:$E,F=typeof C=="function"?C(n,x):C,O=y===!0||typeof y=="number"&&n{if(f())return _()}).then(()=>{t?w(x):S()})})};return pl(e.networkMode)?S():_().then(S),{promise:a,cancel:u,continue:()=>(i==null?void 0:i())?a:Promise.resolve(),cancelRetry:l,continueRetry:c}}const vh=console;function jE(){let e=[],t=0,n=c=>{c()},r=c=>{c()};const i=c=>{let f;t++;try{f=c()}finally{t--,t||a()}return f},s=c=>{t?e.push(c):om(()=>{n(c)})},o=c=>(...f)=>{s(()=>{c(...f)})},a=()=>{const c=e;e=[],c.length&&om(()=>{r(()=>{c.forEach(f=>{n(f)})})})};return{batch:i,batchCalls:o,schedule:s,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c}}}const it=jE();class Hg{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Hf(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(Mo?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class BE extends Hg{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||vh,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||UE(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=Wf(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(mn).catch(mn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!$g(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var s;return(s=this.retryer)==null||s.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(_=>_.options.queryFn);w&&this.setOptions(w.options)}const o=IE(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},u=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};u(a);const l=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),c={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:l};if(u(c),(r=this.options.behavior)==null||r.onFetch(c),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=c.fetchOptions)==null?void 0:i.meta)){var f;this.dispatch({type:"fetch",meta:(f=c.fetchOptions)==null?void 0:f.meta})}const v=w=>{if(qa(w)&&w.silent||this.dispatch({type:"error",error:w}),!qa(w)){var _,S,D,x;(_=(S=this.cache.config).onError)==null||_.call(S,w,this),(D=(x=this.cache.config).onSettled)==null||D.call(x,this.state.data,w,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=Vg({fn:c.fetchFn,abort:o==null?void 0:o.abort.bind(o),onSuccess:w=>{var _,S,D,x;if(typeof w>"u"){v(new Error(this.queryHash+" data is undefined"));return}this.setData(w),(_=(S=this.cache.config).onSuccess)==null||_.call(S,w,this),(D=(x=this.cache.config).onSettled)==null||D.call(x,w,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:v,onFail:(w,_)=>{this.dispatch({type:"failed",failureCount:w,error:_})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var i,s;switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=t.meta)!=null?i:null,fetchStatus:pl(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(s=t.dataUpdatedAt)!=null?s:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return qa(o)&&o.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),it.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function UE(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class zE extends Ss{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var i;const s=n.queryKey,o=(i=n.queryHash)!=null?i:mh(s,n);let a=this.get(o);return a||(a=new BE({cache:this,logger:t.getLogger(),queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(a)),a}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){it.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=Fr(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(i=>nm(r,i))}findAll(t,n){const[r]=Fr(t,n);return Object.keys(r).length>0?this.queries.filter(i=>nm(r,i)):this.queries}notify(t){it.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){it.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){it.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class VE extends Hg{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||vh,this.observers=[],this.state=t.state||qg(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}async execute(){const t=()=>{var O;return this.retryer=Vg({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(L,z)=>{this.dispatch({type:"failed",failureCount:L,error:z})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(O=this.options.retry)!=null?O:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,i,s,o,a,u,l,c;if(!n){var f,v,w,_;this.dispatch({type:"loading",variables:this.options.variables}),await((f=(v=this.mutationCache.config).onMutate)==null?void 0:f.call(v,this.state.variables,this));const L=await((w=(_=this.options).onMutate)==null?void 0:w.call(_,this.state.variables));L!==this.state.context&&this.dispatch({type:"loading",context:L,variables:this.state.variables})}const O=await t();return await((r=(i=this.mutationCache.config).onSuccess)==null?void 0:r.call(i,O,this.state.variables,this.state.context,this)),await((s=(o=this.options).onSuccess)==null?void 0:s.call(o,O,this.state.variables,this.state.context)),await((a=(u=this.mutationCache.config).onSettled)==null?void 0:a.call(u,O,null,this.state.variables,this.state.context,this)),await((l=(c=this.options).onSettled)==null?void 0:l.call(c,O,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:O}),O}catch(O){try{var S,D,x,h,d,y,C,F;throw await((S=(D=this.mutationCache.config).onError)==null?void 0:S.call(D,O,this.state.variables,this.state.context,this)),await((x=(h=this.options).onError)==null?void 0:x.call(h,O,this.state.variables,this.state.context)),await((d=(y=this.mutationCache.config).onSettled)==null?void 0:d.call(y,void 0,O,this.state.variables,this.state.context,this)),await((C=(F=this.options).onSettled)==null?void 0:C.call(F,void 0,O,this.state.variables,this.state.context)),O}finally{this.dispatch({type:"error",error:O})}}}dispatch(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!pl(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...r,...t.state}}};this.state=n(this.state),it.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function qg(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class HE extends Ss{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const i=new VE({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(i),i}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){it.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>rm(t,n))}findAll(t){return this.mutations.filter(n=>rm(t,n))}notify(t){it.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return it.batch(()=>n.reduce((r,i)=>r.then(()=>i.continue().catch(mn)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function qE(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,i,s,o;const a=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,u=(r=e.fetchOptions)==null||(i=r.meta)==null?void 0:i.fetchMore,l=u==null?void 0:u.pageParam,c=(u==null?void 0:u.direction)==="forward",f=(u==null?void 0:u.direction)==="backward",v=((s=e.state.data)==null?void 0:s.pages)||[],w=((o=e.state.data)==null?void 0:o.pageParams)||[];let _=w,S=!1;const D=F=>{Object.defineProperty(F,"signal",{enumerable:!0,get:()=>{var O;if((O=e.signal)!=null&&O.aborted)S=!0;else{var L;(L=e.signal)==null||L.addEventListener("abort",()=>{S=!0})}return e.signal}})},x=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),h=(F,O,L,z)=>(_=z?[O,..._]:[..._,O],z?[L,...F]:[...F,L]),d=(F,O,L,z)=>{if(S)return Promise.reject("Cancelled");if(typeof L>"u"&&!O&&F.length)return Promise.resolve(F);const H={queryKey:e.queryKey,pageParam:L,meta:e.options.meta};D(H);const ye=x(H);return Promise.resolve(ye).then(le=>h(F,L,le,z))};let y;if(!v.length)y=d([]);else if(c){const F=typeof l<"u",O=F?l:um(e.options,v);y=d(v,F,O)}else if(f){const F=typeof l<"u",O=F?l:WE(e.options,v);y=d(v,F,O,!0)}else{_=[];const F=typeof e.options.getNextPageParam>"u";y=(a&&v[0]?a(v[0],0,v):!0)?d([],F,w[0]):Promise.resolve(h([],w[0],v[0]));for(let L=1;L{if(a&&v[L]?a(v[L],L,v):!0){const ye=F?w[L]:um(e.options,z);return d(z,F,ye)}return Promise.resolve(h(z,w[L],v[L]))})}return y.then(F=>({pages:F,pageParams:_}))}}}}function um(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function WE(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class QE{constructor(t={}){this.queryCache=t.queryCache||new zE,this.mutationCache=t.mutationCache||new HE,this.logger=t.logger||vh,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=ku.subscribe(()=>{ku.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Su.subscribe(()=>{Su.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=Fr(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const i=to(t,n,r),s=this.getQueryData(i.queryKey);return s?Promise.resolve(s):this.fetchQuery(i)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const i=r.data;return[n,i]})}setQueryData(t,n,r){const i=this.queryCache.find(t),s=i==null?void 0:i.state.data,o=NE(n,s);if(typeof o>"u")return;const a=to(t),u=this.defaultQueryOptions(a);return this.queryCache.build(this,u).setData(o,{...r,manual:!0})}setQueriesData(t,n,r){return it.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=Fr(t,n),i=this.queryCache;it.batch(()=>{i.findAll(r).forEach(s=>{i.remove(s)})})}resetQueries(t,n,r){const[i,s]=Fr(t,n,r),o=this.queryCache,a={type:"active",...i};return it.batch(()=>(o.findAll(i).forEach(u=>{u.reset()}),this.refetchQueries(a,s)))}cancelQueries(t,n,r){const[i,s={}]=Fr(t,n,r);typeof s.revert>"u"&&(s.revert=!0);const o=it.batch(()=>this.queryCache.findAll(i).map(a=>a.cancel(s)));return Promise.all(o).then(mn).catch(mn)}invalidateQueries(t,n,r){const[i,s]=Fr(t,n,r);return it.batch(()=>{var o,a;if(this.queryCache.findAll(i).forEach(l=>{l.invalidate()}),i.refetchType==="none")return Promise.resolve();const u={...i,type:(o=(a=i.refetchType)!=null?a:i.type)!=null?o:"active"};return this.refetchQueries(u,s)})}refetchQueries(t,n,r){const[i,s]=Fr(t,n,r),o=it.batch(()=>this.queryCache.findAll(i).filter(u=>!u.isDisabled()).map(u=>{var l;return u.fetch(void 0,{...s,cancelRefetch:(l=s==null?void 0:s.cancelRefetch)!=null?l:!0,meta:{refetchPage:i.refetchPage}})}));let a=Promise.all(o).then(mn);return s!=null&&s.throwOnError||(a=a.catch(mn)),a}fetchQuery(t,n,r){const i=to(t,n,r),s=this.defaultQueryOptions(i);typeof s.retry>"u"&&(s.retry=!1);const o=this.queryCache.build(this,s);return o.isStaleByTime(s.staleTime)?o.fetch(s):Promise.resolve(o.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(mn).catch(mn)}fetchInfiniteQuery(t,n,r){const i=to(t,n,r);return i.behavior=qE(),this.fetchQuery(i)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(mn).catch(mn)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(i=>pi(t)===pi(i.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>_u(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(i=>pi(t)===pi(i.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>_u(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=mh(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class ZE extends Ss{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),lm(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qf(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qf(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),Cu(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const s=this.hasListeners();s&&cm(this.currentQuery,i,this.options,r)&&this.executeFetch(),this.updateResult(n),s&&(this.currentQuery!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const o=this.computeRefetchInterval();s&&(this.currentQuery!==i||this.options.enabled!==r.enabled||o!==this.currentRefetchInterval)&&this.updateRefetchInterval(o)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t),r=this.createResult(n,t);return GE(this,r,t)&&(this.currentResult=r,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),r}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...n}={}){return this.fetch({...n,meta:{refetchPage:t}})}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch({...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(mn)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),Mo||this.currentResult.isStale||!Hf(this.options.staleTime))return;const n=$g(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(Mo||this.options.enabled===!1||!Hf(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||ku.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,i=this.options,s=this.currentResult,o=this.currentResultState,a=this.currentResultOptions,u=t!==r,l=u?t.state:this.currentQueryInitialState,c=u?this.currentResult:this.previousQueryResult,{state:f}=t;let{dataUpdatedAt:v,error:w,errorUpdatedAt:_,fetchStatus:S,status:D}=f,x=!1,h=!1,d;if(n._optimisticResults){const L=this.hasListeners(),z=!L&&lm(t,n),H=L&&cm(t,r,n,i);(z||H)&&(S=pl(t.options.networkMode)?"fetching":"paused",v||(D="loading")),n._optimisticResults==="isRestoring"&&(S="idle")}if(n.keepPreviousData&&!f.dataUpdatedAt&&c!=null&&c.isSuccess&&D!=="error")d=c.data,v=c.dataUpdatedAt,D=c.status,x=!0;else if(n.select&&typeof f.data<"u")if(s&&f.data===(o==null?void 0:o.data)&&n.select===this.selectFn)d=this.selectResult;else try{this.selectFn=n.select,d=n.select(f.data),d=Wf(s==null?void 0:s.data,d,n),this.selectResult=d,this.selectError=null}catch(L){this.selectError=L}else d=f.data;if(typeof n.placeholderData<"u"&&typeof d>"u"&&D==="loading"){let L;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))L=s.data;else if(L=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof L<"u")try{L=n.select(L),this.selectError=null}catch(z){this.selectError=z}typeof L<"u"&&(D="success",d=Wf(s==null?void 0:s.data,L,n),h=!0)}this.selectError&&(w=this.selectError,d=this.selectResult,_=Date.now(),D="error");const y=S==="fetching",C=D==="loading",F=D==="error";return{status:D,fetchStatus:S,isLoading:C,isSuccess:D==="success",isError:F,isInitialLoading:C&&y,data:d,dataUpdatedAt:v,error:w,errorUpdatedAt:_,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>l.dataUpdateCount||f.errorUpdateCount>l.errorUpdateCount,isFetching:y,isRefetching:y&&!C,isLoadingError:F&&f.dataUpdatedAt===0,isPaused:S==="paused",isPlaceholderData:h,isPreviousData:x,isRefetchError:F&&f.dataUpdatedAt!==0,isStale:gh(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Cu(r,n))return;this.currentResult=r;const i={cache:!0},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!this.trackedProps.size)return!0;const u=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&u.add("error"),Object.keys(this.currentResult).some(l=>{const c=l;return this.currentResult[c]!==n[c]&&u.has(c)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),this.notify({...i,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!qa(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){it.batch(()=>{if(t.onSuccess){var n,r,i,s;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(i=(s=this.options).onSettled)==null||i.call(s,this.currentResult.data,null)}else if(t.onError){var o,a,u,l;(o=(a=this.options).onError)==null||o.call(a,this.currentResult.error),(u=(l=this.options).onSettled)==null||u.call(l,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:c})=>{c(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function KE(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function lm(e,t){return KE(e,t)||e.state.dataUpdatedAt>0&&Qf(e,t,t.refetchOnMount)}function Qf(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&gh(e,t)}return!1}function cm(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&gh(e,n)}function gh(e,t){return e.isStaleByTime(t.staleTime)}function GE(e,t,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?t.isPlaceholderData:!Cu(e.getCurrentResult(),t)}let YE=class extends Ss{constructor(t,n){super(),this.client=t,this.setOptions(n),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const r=this.options;this.options=this.client.defaultMutationOptions(t),Cu(r,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(n=this.currentMutation)==null||n.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.currentMutation)==null||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();const n={listeners:!0};t.type==="success"?n.onSuccess=!0:t.type==="error"&&(n.onError=!0),this.notify(n)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,n){return this.mutateOptions=n,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof t<"u"?t:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const t=this.currentMutation?this.currentMutation.state:qg(),n={...t,isLoading:t.status==="loading",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=n}notify(t){it.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(t.onSuccess){var n,r,i,s;(n=(r=this.mutateOptions).onSuccess)==null||n.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(i=(s=this.mutateOptions).onSettled)==null||i.call(s,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(t.onError){var o,a,u,l;(o=(a=this.mutateOptions).onError)==null||o.call(a,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(u=(l=this.mutateOptions).onSettled)==null||u.call(l,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}t.listeners&&this.listeners.forEach(({listener:c})=>{c(this.currentResult)})})}};var Wg={exports:{}},Qg={};/** + * @license React + * use-sync-external-store-shim.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 ps=m;function XE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var JE=typeof Object.is=="function"?Object.is:XE,eD=ps.useState,tD=ps.useEffect,nD=ps.useLayoutEffect,rD=ps.useDebugValue;function iD(e,t){var n=t(),r=eD({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return nD(function(){i.value=n,i.getSnapshot=t,ac(i)&&s({inst:i})},[e,n,t]),tD(function(){return ac(i)&&s({inst:i}),e(function(){ac(i)&&s({inst:i})})},[e]),rD(n),n}function ac(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!JE(e,n)}catch{return!0}}function sD(e,t){return t()}var oD=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?sD:iD;Qg.useSyncExternalStore=ps.useSyncExternalStore!==void 0?ps.useSyncExternalStore:oD;Wg.exports=Qg;var aD=Wg.exports;const Zg=aD.useSyncExternalStore,fm=m.createContext(void 0),Kg=m.createContext(!1);function Gg(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=fm),window.ReactQueryClientContext):fm)}const vo=({context:e}={})=>{const t=m.useContext(Gg(e,m.useContext(Kg)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},uD=({client:e,children:t,context:n,contextSharing:r=!1})=>{m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const i=Gg(n,r);return m.createElement(Kg.Provider,{value:!n&&r},m.createElement(i.Provider,{value:e},t))},Yg=m.createContext(!1),lD=()=>m.useContext(Yg);Yg.Provider;function cD(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const fD=m.createContext(cD()),dD=()=>m.useContext(fD);function Xg(e,t){return typeof e=="function"?e(...t):!!e}const hD=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},pD=e=>{m.useEffect(()=>{e.clearReset()},[e])},mD=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&Xg(n,[e.error,r]),vD=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},gD=(e,t)=>e.isLoading&&e.isFetching&&!t,yD=(e,t,n)=>(e==null?void 0:e.suspense)&&gD(t,n),wD=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function xD(e,t){const n=vo({context:e.context}),r=lD(),i=dD(),s=n.defaultQueryOptions(e);s._optimisticResults=r?"isRestoring":"optimistic",s.onError&&(s.onError=it.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=it.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=it.batchCalls(s.onSettled)),vD(s),hD(s,i),pD(i);const[o]=m.useState(()=>new t(n,s)),a=o.getOptimisticResult(s);if(Zg(m.useCallback(u=>{const l=r?()=>{}:o.subscribe(it.batchCalls(u));return o.updateResult(),l},[o,r]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),m.useEffect(()=>{o.setOptions(s,{listeners:!1})},[s,o]),yD(s,a,r))throw wD(s,o,i);if(mD({result:a,errorResetBoundary:i,useErrorBoundary:s.useErrorBoundary,query:o.getCurrentQuery()}))throw a.error;return s.notifyOnChangeProps?a:o.trackResult(a)}function Jg(e,t,n){const r=to(e,t,n);return xD(r,ZE)}function uc(e,t,n){const r=PE(e,t),i=vo({context:r.context}),[s]=m.useState(()=>new YE(i,r));m.useEffect(()=>{s.setOptions(r)},[s,r]);const o=Zg(m.useCallback(u=>s.subscribe(it.batchCalls(u)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),a=m.useCallback((u,l)=>{s.mutate(u,l).catch(ED)},[s]);if(o.error&&Xg(s.options.useErrorBoundary,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}function ED(){}const DD=function(){return null};/** + * @remix-run/router v1.16.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function $o(){return $o=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function ey(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function CD(){return Math.random().toString(36).substr(2,8)}function hm(e,t){return{usr:e.state,key:e.key,idx:t}}function Zf(e,t,n,r){return n===void 0&&(n=null),$o({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ts(t):t,{state:n,key:t&&t.key||r||CD()})}function Tu(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ts(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function kD(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a=$r.Pop,u=null,l=c();l==null&&(l=0,o.replaceState($o({},o.state,{idx:l}),""));function c(){return(o.state||{idx:null}).idx}function f(){a=$r.Pop;let D=c(),x=D==null?null:D-l;l=D,u&&u({action:a,location:S.location,delta:x})}function v(D,x){a=$r.Push;let h=Zf(S.location,D,x);l=c()+1;let d=hm(h,l),y=S.createHref(h);try{o.pushState(d,"",y)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(y)}s&&u&&u({action:a,location:S.location,delta:1})}function w(D,x){a=$r.Replace;let h=Zf(S.location,D,x);l=c();let d=hm(h,l),y=S.createHref(h);o.replaceState(d,"",y),s&&u&&u({action:a,location:S.location,delta:0})}function _(D){let x=i.location.origin!=="null"?i.location.origin:i.location.href,h=typeof D=="string"?D:Tu(D);return h=h.replace(/ $/,"%20"),et(x,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,x)}let S={get action(){return a},get location(){return e(i,o)},listen(D){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(dm,f),u=D,()=>{i.removeEventListener(dm,f),u=null}},createHref(D){return t(i,D)},createURL:_,encodeLocation(D){let x=_(D);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:v,replace:w,go(D){return o.go(D)}};return S}var pm;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(pm||(pm={}));function SD(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Ts(t):t,i=ms(r.pathname||"/",n);if(i==null)return null;let s=ty(e);TD(s);let o=null;for(let a=0;o==null&&a{let u={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};u.relativePath.startsWith("/")&&(et(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let l=Kr([r,u.relativePath]),c=n.concat(u);s.children&&s.children.length>0&&(et(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),ty(s.children,t,c,l)),!(s.path==null&&!s.index)&&t.push({path:l,score:PD(l,s.index),routesMeta:c})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let u of ny(s.path))i(s,o,u)}),t}function ny(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=ny(r.join("/")),a=[];return a.push(...o.map(u=>u===""?s:[s,u].join("/"))),i&&a.push(...o),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function TD(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:ID(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const AD=/^:[\w-]+$/,bD=3,FD=2,RD=1,OD=10,ND=-2,mm=e=>e==="*";function PD(e,t){let n=e.split("/"),r=n.length;return n.some(mm)&&(r+=ND),t&&(r+=FD),n.filter(i=>!mm(i)).reduce((i,s)=>i+(AD.test(s)?bD:s===""?RD:OD),r)}function ID(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function LD(e,t){let{routesMeta:n}=e,r={},i="/",s=[];for(let o=0;o{let{paramName:v,isOptional:w}=c;if(v==="*"){let S=a[f]||"";o=s.slice(0,s.length-S.length).replace(/(.)\/+$/,"$1")}const _=a[f];return w&&!_?l[v]=void 0:l[v]=(_||"").replace(/%2F/g,"/"),l},{}),pathname:s,pathnameBase:o,pattern:e}}function MD(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ey(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,u)=>(r.push({paramName:a,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function $D(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ey(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function ms(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function jD(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Ts(e):e;return{pathname:n?n.startsWith("/")?n:BD(n,t):t,search:VD(r),hash:HD(i)}}function BD(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function lc(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function UD(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function yh(e,t){let n=UD(e);return t?n.map((r,i)=>i===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function wh(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Ts(e):(i=$o({},e),et(!i.pathname||!i.pathname.includes("?"),lc("?","pathname","search",i)),et(!i.pathname||!i.pathname.includes("#"),lc("#","pathname","hash",i)),et(!i.search||!i.search.includes("#"),lc("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let v=o.split("/");for(;v[0]==="..";)v.shift(),f-=1;i.pathname=v.join("/")}a=f>=0?t[f]:"/"}let u=jD(i,a),l=o&&o!=="/"&&o.endsWith("/"),c=(s||o===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(l||c)&&(u.pathname+="/"),u}const Kr=e=>e.join("/").replace(/\/\/+/g,"/"),zD=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),VD=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,HD=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function qD(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const ry=["post","put","patch","delete"];new Set(ry);const WD=["get",...ry];new Set(WD);/** + * React Router v6.23.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function jo(){return jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),m.useCallback(function(l,c){if(c===void 0&&(c={}),!a.current)return;if(typeof l=="number"){r.go(l);return}let f=wh(l,JSON.parse(o),s,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Kr([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,o,s,e])}const KD=m.createContext(null);function GD(e){let t=m.useContext(Kn).outlet;return t&&m.createElement(KD.Provider,{value:e},t)}function sb(){let{matches:e}=m.useContext(Kn),t=e[e.length-1];return t?t.params:{}}function gl(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=m.useContext(Er),{matches:i}=m.useContext(Kn),{pathname:s}=bs(),o=JSON.stringify(yh(i,r.v7_relativeSplatPath));return m.useMemo(()=>wh(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function ay(e,t){return YD(e,t)}function YD(e,t,n,r){As()||et(!1);let{navigator:i}=m.useContext(Er),{matches:s}=m.useContext(Kn),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:"/";o&&o.route;let l=bs(),c;if(t){var f;let D=typeof t=="string"?Ts(t):t;u==="/"||(f=D.pathname)!=null&&f.startsWith(u)||et(!1),c=D}else c=l;let v=c.pathname||"/",w=v;if(u!=="/"){let D=u.replace(/^\//,"").split("/");w="/"+v.replace(/^\//,"").split("/").slice(D.length).join("/")}let _=SD(e,{pathname:w}),S=n_(_&&_.map(D=>Object.assign({},D,{params:Object.assign({},a,D.params),pathname:Kr([u,i.encodeLocation?i.encodeLocation(D.pathname).pathname:D.pathname]),pathnameBase:D.pathnameBase==="/"?u:Kr([u,i.encodeLocation?i.encodeLocation(D.pathnameBase).pathname:D.pathnameBase])})),s,n,r);return t&&S?m.createElement(vl.Provider,{value:{location:jo({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:$r.Pop}},S):S}function XD(){let e=o_(),t=qD(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),n?m.createElement("pre",{style:i},n):null,null)}const JD=m.createElement(XD,null);class e_ extends m.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?m.createElement(Kn.Provider,{value:this.props.routeContext},m.createElement(sy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function t_(e){let{routeContext:t,match:n,children:r}=e,i=m.useContext(ml);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),m.createElement(Kn.Provider,{value:t},r)}function n_(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if((s=n)!=null&&s.errors)e=n.matches;else return null}let o=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let c=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);c>=0||et(!1),o=o.slice(0,Math.min(o.length,c+1))}let u=!1,l=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,l+1):o=[o[0]];break}}}return o.reduceRight((c,f,v)=>{let w,_=!1,S=null,D=null;n&&(w=a&&f.route.id?a[f.route.id]:void 0,S=f.route.errorElement||JD,u&&(l<0&&v===0?(_=!0,D=null):l===v&&(_=!0,D=f.route.hydrateFallbackElement||null)));let x=t.concat(o.slice(0,v+1)),h=()=>{let d;return w?d=S:_?d=D:f.route.Component?d=m.createElement(f.route.Component,null):f.route.element?d=f.route.element:d=c,m.createElement(t_,{match:f,routeContext:{outlet:c,matches:x,isDataRoute:n!=null},children:d})};return n&&(f.route.ErrorBoundary||f.route.errorElement||v===0)?m.createElement(e_,{location:n.location,revalidation:n.revalidation,component:S,error:w,children:h(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):h()},null)}var uy=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(uy||{}),Au=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Au||{});function r_(e){let t=m.useContext(ml);return t||et(!1),t}function i_(e){let t=m.useContext(iy);return t||et(!1),t}function s_(e){let t=m.useContext(Kn);return t||et(!1),t}function ly(e){let t=s_(),n=t.matches[t.matches.length-1];return n.route.id||et(!1),n.route.id}function o_(){var e;let t=m.useContext(sy),n=i_(Au.UseRouteError),r=ly(Au.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function a_(){let{router:e}=r_(uy.UseNavigateStable),t=ly(Au.UseNavigateStable),n=m.useRef(!1);return oy(()=>{n.current=!0}),m.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,jo({fromRouteId:t},s)))},[e,t])}function u_(e){let{to:t,replace:n,state:r,relative:i}=e;As()||et(!1);let{future:s,static:o}=m.useContext(Er),{matches:a}=m.useContext(Kn),{pathname:u}=bs(),l=xh(),c=wh(t,yh(a,s.v7_relativeSplatPath),u,i==="path"),f=JSON.stringify(c);return m.useEffect(()=>l(JSON.parse(f),{replace:n,state:r,relative:i}),[l,f,i,n,r]),null}function l_(e){return GD(e.context)}function c_(e){et(!1)}function f_(e){let{basename:t="/",children:n=null,location:r,navigationType:i=$r.Pop,navigator:s,static:o=!1,future:a}=e;As()&&et(!1);let u=t.replace(/^\/*/,"/"),l=m.useMemo(()=>({basename:u,navigator:s,static:o,future:jo({v7_relativeSplatPath:!1},a)}),[u,a,s,o]);typeof r=="string"&&(r=Ts(r));let{pathname:c="/",search:f="",hash:v="",state:w=null,key:_="default"}=r,S=m.useMemo(()=>{let D=ms(c,u);return D==null?null:{location:{pathname:D,search:f,hash:v,state:w,key:_},navigationType:i}},[u,c,f,v,w,_,i]);return S==null?null:m.createElement(Er.Provider,{value:l},m.createElement(vl.Provider,{children:n,value:S}))}function ob(e){let{children:t,location:n}=e;return ay(Gf(t),n)}new Promise(()=>{});function Gf(e,t){t===void 0&&(t=[]);let n=[];return m.Children.forEach(e,(r,i)=>{if(!m.isValidElement(r))return;let s=[...t,i];if(r.type===m.Fragment){n.push.apply(n,Gf(r.props.children,s));return}r.type!==c_&&et(!1),!r.props.index||!r.props.children||et(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Gf(r.props.children,s)),n.push(o)}),n}/** + * React Router DOM v6.23.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function bu(){return bu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function d_(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function h_(e,t){return e.button===0&&(!t||t==="_self")&&!d_(e)}const p_=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],m_=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],v_="6";try{window.__reactRouterVersion=v_}catch{}const g_=m.createContext({isTransitioning:!1}),y_="startTransition",vm=os[y_];function w_(e){let{basename:t,children:n,future:r,window:i}=e,s=m.useRef();s.current==null&&(s.current=_D({window:i,v5Compat:!0}));let o=s.current,[a,u]=m.useState({action:o.action,location:o.location}),{v7_startTransition:l}=r||{},c=m.useCallback(f=>{l&&vm?vm(()=>u(f)):u(f)},[u,l]);return m.useLayoutEffect(()=>o.listen(c),[o,c]),m.createElement(f_,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const x_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",E_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Go=m.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:u,to:l,preventScrollReset:c,unstable_viewTransition:f}=t,v=cy(t,p_),{basename:w}=m.useContext(Er),_,S=!1;if(typeof l=="string"&&E_.test(l)&&(_=l,x_))try{let d=new URL(window.location.href),y=l.startsWith("//")?new URL(d.protocol+l):new URL(l),C=ms(y.pathname,w);y.origin===d.origin&&C!=null?l=C+y.search+y.hash:S=!0}catch{}let D=QD(l,{relative:i}),x=C_(l,{replace:o,state:a,target:u,preventScrollReset:c,relative:i,unstable_viewTransition:f});function h(d){r&&r(d),d.defaultPrevented||x(d)}return m.createElement("a",bu({},v,{href:_||D,onClick:S||s?r:h,ref:n,target:u}))}),D_=m.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:s="",end:o=!1,style:a,to:u,unstable_viewTransition:l,children:c}=t,f=cy(t,m_),v=gl(u,{relative:f.relative}),w=bs(),_=m.useContext(iy),{navigator:S,basename:D}=m.useContext(Er),x=_!=null&&k_(v)&&l===!0,h=S.encodeLocation?S.encodeLocation(v).pathname:v.pathname,d=w.pathname,y=_&&_.navigation&&_.navigation.location?_.navigation.location.pathname:null;i||(d=d.toLowerCase(),y=y?y.toLowerCase():null,h=h.toLowerCase()),y&&D&&(y=ms(y,D)||y);const C=h!=="/"&&h.endsWith("/")?h.length-1:h.length;let F=d===h||!o&&d.startsWith(h)&&d.charAt(C)==="/",O=y!=null&&(y===h||!o&&y.startsWith(h)&&y.charAt(h.length)==="/"),L={isActive:F,isPending:O,isTransitioning:x},z=F?r:void 0,H;typeof s=="function"?H=s(L):H=[s,F?"active":null,O?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let ye=typeof a=="function"?a(L):a;return m.createElement(Go,bu({},f,{"aria-current":z,className:H,ref:n,style:ye,to:u,unstable_viewTransition:l}),typeof c=="function"?c(L):c)});var Yf;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Yf||(Yf={}));var gm;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(gm||(gm={}));function __(e){let t=m.useContext(ml);return t||et(!1),t}function C_(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:a}=t===void 0?{}:t,u=xh(),l=bs(),c=gl(e,{relative:o});return m.useCallback(f=>{if(h_(f,n)){f.preventDefault();let v=r!==void 0?r:Tu(l)===Tu(c);u(e,{replace:v,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:a})}},[l,u,c,r,i,n,e,s,o,a])}function k_(e,t){t===void 0&&(t={});let n=m.useContext(g_);n==null&&et(!1);let{basename:r}=__(Yf.useViewTransitionState),i=gl(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=ms(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=ms(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Kf(i.pathname,o)!=null||Kf(i.pathname,s)!=null}function fy(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;tb.jsxs(b.Fragment,{children:[b.jsxs("svg",{className:gr("animate-spin",S_[e],T_[t],n),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","data-testid":"loading",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),b.jsx("span",{className:"sr-only",children:"Loading"})]}),A_={primary:"bg-blue-600 text-white",inverse:"bg-white text-blue-600",danger:"bg-red-600 text-white"},b_={sm:"py-2 px-4 text-sm",md:"py-2 px-6 text-md",lg:"py-3 px-8 text-lg"},vs=m.forwardRef(({type:e="button",className:t="",variant:n="primary",size:r="md",isLoading:i=!1,startIcon:s,endIcon:o,...a},u)=>b.jsxs("button",{ref:u,type:e,className:gr("flex justify-center items-center border border-gray-300 disabled:opacity-70 disabled:cursor-not-allowed rounded-md shadow-sm font-medium focus:outline-none hover:opacity-80",A_[n],b_[r],t),...a,children:[i&&b.jsx(Fu,{size:"sm",className:"text-current"}),!i&&s,b.jsx("span",{className:"mx-2",children:a.children})," ",!i&&o]}));vs.displayName="Button";function F_(e,t){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),m.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))}const R_=m.forwardRef(F_);function O_(e,t){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),m.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))}const N_=m.forwardRef(O_);function P_(e,t){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),m.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"}))}const I_=m.forwardRef(P_);function L_(e,t){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),m.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"}))}const M_=m.forwardRef(L_);function $_(e,t){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),m.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))}const j_=m.forwardRef($_);function B_(e,t){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),m.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h7"}))}const U_=m.forwardRef(B_);function z_(e,t){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),m.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"}))}const V_=m.forwardRef(z_);function H_(e,t){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),m.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"}))}const q_=m.forwardRef(H_);function W_(e,t){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),m.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"}))}const Q_=m.forwardRef(W_);function Z_(e,t){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),m.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const K_=m.forwardRef(Z_);var G_=Object.defineProperty,Y_=(e,t,n)=>t in e?G_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cc=(e,t,n)=>(Y_(e,typeof t!="symbol"?t+"":t,n),n);let X_=class{constructor(){cc(this,"current",this.detect()),cc(this,"handoffState","pending"),cc(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},cr=new X_,gt=(e,t)=>{cr.isServer?m.useEffect(e,t):m.useLayoutEffect(e,t)};function fr(e){let t=m.useRef(e);return gt(()=>{t.current=e},[e]),t}let De=function(e){let t=fr(e);return te.useCallback((...n)=>t.current(...n),[t])};function J_(e,t,n){let[r,i]=m.useState(n),s=e!==void 0,o=m.useRef(s),a=m.useRef(!1),u=m.useRef(!1);return s&&!o.current&&!a.current?(a.current=!0,o.current=s,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!s&&o.current&&!u.current&&(u.current=!0,o.current=s,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[s?e:r,De(l=>(s||i(l),t==null?void 0:t(l)))]}function yl(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Mn(){let e=[],t={addEventListener(n,r,i,s){return n.addEventListener(r,i,s),t.add(()=>n.removeEventListener(r,i,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return yl(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=Mn();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function Fs(){let[e]=m.useState(Mn);return m.useEffect(()=>()=>e.dispose(),[e]),e}function e2(){let e=typeof document>"u";return"useSyncExternalStore"in os?(t=>t.useSyncExternalStore)(os)(()=>()=>{},()=>!1,()=>!e):!1}function Rs(){let e=e2(),[t,n]=m.useState(cr.isHandoffComplete);return t&&cr.isHandoffComplete===!1&&n(!1),m.useEffect(()=>{t!==!0&&n(!0)},[t]),m.useEffect(()=>cr.handoff(),[]),e?!1:t}var ym;let jn=(ym=te.useId)!=null?ym:function(){let e=Rs(),[t,n]=te.useState(e?()=>cr.nextId():null);return gt(()=>{t===null&&n(cr.nextId())},[t]),t!=null?""+t:void 0};function Ct(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ct),r}function wl(e){return cr.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let Xf=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var ir=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(ir||{}),dy=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(dy||{}),t2=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(t2||{});function hy(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Xf)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Eh=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Eh||{});function Dh(e,t=0){var n;return e===((n=wl(e))==null?void 0:n.body)?!1:Ct(t,{0(){return e.matches(Xf)},1(){let r=e;for(;r!==null;){if(r.matches(Xf))return!0;r=r.parentElement}return!1}})}function py(e){let t=wl(e);Mn().nextFrame(()=>{t&&!Dh(t.activeElement,0)&&Gr(e)})}var n2=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(n2||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Gr(e){e==null||e.focus({preventScroll:!0})}let r2=["textarea","input"].join(",");function i2(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,r2))!=null?n:!1}function my(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),s=t(r);if(i===null||s===null)return 0;let o=i.compareDocumentPosition(s);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function s2(e,t){return go(hy(),t,{relativeTo:e})}function go(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let s=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,o=Array.isArray(e)?n?my(e):e:hy(e);i.length>0&&o.length>1&&(o=o.filter(w=>!i.includes(w))),r=r??s.activeElement;let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(r))-1;if(t&4)return Math.max(0,o.indexOf(r))+1;if(t&8)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=t&32?{preventScroll:!0}:{},c=0,f=o.length,v;do{if(c>=f||c+f<=0)return 0;let w=u+c;if(t&16)w=(w+f)%f;else{if(w<0)return 3;if(w>=f)return 1}v=o[w],v==null||v.focus(l),c+=a}while(v!==s.activeElement);return t&6&&i2(v)&&v.select(),2}function vy(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function o2(){return/Android/gi.test(window.navigator.userAgent)}function a2(){return vy()||o2()}function ka(e,t,n){let r=fr(t);m.useEffect(()=>{function i(s){r.current(s)}return document.addEventListener(e,i,n),()=>document.removeEventListener(e,i,n)},[e,n])}function gy(e,t,n){let r=fr(t);m.useEffect(()=>{function i(s){r.current(s)}return window.addEventListener(e,i,n),()=>window.removeEventListener(e,i,n)},[e,n])}function yy(e,t,n=!0){let r=m.useRef(!1);m.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function i(o,a){if(!r.current||o.defaultPrevented)return;let u=a(o);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let l=function c(f){return typeof f=="function"?c(f()):Array.isArray(f)||f instanceof Set?f:[f]}(e);for(let c of l){if(c===null)continue;let f=c instanceof HTMLElement?c:c.current;if(f!=null&&f.contains(u)||o.composed&&o.composedPath().includes(f))return}return!Dh(u,Eh.Loose)&&u.tabIndex!==-1&&o.preventDefault(),t(o,u)}let s=m.useRef(null);ka("pointerdown",o=>{var a,u;r.current&&(s.current=((u=(a=o.composedPath)==null?void 0:a.call(o))==null?void 0:u[0])||o.target)},!0),ka("mousedown",o=>{var a,u;r.current&&(s.current=((u=(a=o.composedPath)==null?void 0:a.call(o))==null?void 0:u[0])||o.target)},!0),ka("click",o=>{a2()||s.current&&(i(o,()=>s.current),s.current=null)},!0),ka("touchend",o=>i(o,()=>o.target instanceof HTMLElement?o.target:null),!0),gy("blur",o=>i(o,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Os(...e){return m.useMemo(()=>wl(...e),[...e])}function wm(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function wy(e,t){let[n,r]=m.useState(()=>wm(e));return gt(()=>{r(wm(e))},[e.type,e.as]),gt(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let xy=Symbol();function u2(e,t=!0){return Object.assign(e,{[xy]:t})}function Ot(...e){let t=m.useRef(e);m.useEffect(()=>{t.current=e},[e]);let n=De(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[xy]))?void 0:n}function xm(e){return[e.screenX,e.screenY]}function l2(){let e=m.useRef([-1,-1]);return{wasMoved(t){let n=xm(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=xm(t)}}}function c2({container:e,accept:t,walk:n,enabled:r=!0}){let i=m.useRef(t),s=m.useRef(n);m.useEffect(()=>{i.current=t,s.current=n},[t,n]),gt(()=>{if(!e||!r)return;let o=wl(e);if(!o)return;let a=i.current,u=s.current,l=Object.assign(f=>a(f),{acceptNode:a}),c=o.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,l,!1);for(;c.nextNode();)u(c.currentNode)},[e,r,i,s])}function _h(e,t){let n=m.useRef([]),r=De(e);m.useEffect(()=>{let i=[...n.current];for(let[s,o]of t.entries())if(n.current[s]!==o){let a=r(t,i);return n.current=t,a}},[r,...t])}function Ru(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var gs=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(gs||{}),jr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(jr||{});function wt({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:s=!0,name:o,mergeRefs:a}){a=a??f2;let u=Ey(t,e);if(s)return Sa(u,n,r,o,a);let l=i??0;if(l&2){let{static:c=!1,...f}=u;if(c)return Sa(f,n,r,o,a)}if(l&1){let{unmount:c=!0,...f}=u;return Ct(c?0:1,{0(){return null},1(){return Sa({...f,hidden:!0,style:{display:"none"}},n,r,o,a)}})}return Sa(u,n,r,o,a)}function Sa(e,t={},n,r,i){let{as:s=n,children:o,refName:a="ref",...u}=fc(e,["unmount","static"]),l=e.ref!==void 0?{[a]:e.ref}:{},c=typeof o=="function"?o(t):o;"className"in u&&u.className&&typeof u.className=="function"&&(u.className=u.className(t));let f={};if(t){let v=!1,w=[];for(let[_,S]of Object.entries(t))typeof S=="boolean"&&(v=!0),S===!0&&w.push(_);v&&(f["data-headlessui-state"]=w.join(" "))}if(s===m.Fragment&&Object.keys(Jf(u)).length>0){if(!m.isValidElement(c)||Array.isArray(c)&&c.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(u).map(S=>` - ${S}`).join(` +`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(S=>` - ${S}`).join(` +`)].join(` +`));let v=c.props,w=typeof(v==null?void 0:v.className)=="function"?(...S)=>Ru(v==null?void 0:v.className(...S),u.className):Ru(v==null?void 0:v.className,u.className),_=w?{className:w}:{};return m.cloneElement(c,Object.assign({},Ey(c.props,Jf(fc(u,["ref"]))),f,l,{ref:i(c.ref,l.ref)},_))}return m.createElement(s,Object.assign({},fc(u,["ref"]),s!==m.Fragment&&l,s!==m.Fragment&&f),c)}function f2(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function Ey(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](i,...s){let o=n[r];for(let a of o){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;a(i,...s)}}});return t}function xt(e){var t;return Object.assign(m.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Jf(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function fc(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let d2="div";var Bo=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Bo||{});function h2(e,t){var n;let{features:r=1,...i}=e,s={ref:t,"aria-hidden":(r&2)===2?!0:(n=i["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return wt({ourProps:s,theirProps:i,slot:{},defaultTag:d2,name:"Hidden"})}let Ou=xt(h2),Ch=m.createContext(null);Ch.displayName="OpenClosedContext";var bt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(bt||{});function xl(){return m.useContext(Ch)}function Dy({value:e,children:t}){return te.createElement(Ch.Provider,{value:e},t)}function p2(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Pr=[];p2(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Pr[0]!==t.target&&(Pr.unshift(t.target),Pr=Pr.filter(n=>n!=null&&n.isConnected),Pr.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function kh(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&m2(n)?!1:r}function m2(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function v2(e){throw new Error("Unexpected object: "+e)}var Nn=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Nn||{});function g2(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1;switch(e.focus){case 0:{for(let s=0;s=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 2:{for(let s=i+1;s=0;--s)if(!t.resolveDisabled(n[s],s,n))return s;return r}case 4:{for(let s=0;s(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(lt||{});function _y(e,t,n,r){let i=fr(n);m.useEffect(()=>{e=e??window;function s(o){i.current(o)}return e.addEventListener(t,s,r),()=>e.removeEventListener(t,s,r)},[e,t,r])}function Yo(){let e=m.useRef(!1);return gt(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Cy(e){let t=De(e),n=m.useRef(!1);m.useEffect(()=>(n.current=!1,()=>{n.current=!0,yl(()=>{n.current&&t()})}),[t])}var no=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(no||{});function w2(){let e=m.useRef(0);return gy("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function ky(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let x2="div";var Sy=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Sy||{});function E2(e,t){let n=m.useRef(null),r=Ot(n,t),{initialFocus:i,containers:s,features:o=30,...a}=e;Rs()||(o=1);let u=Os(n);C2({ownerDocument:u},!!(o&16));let l=k2({ownerDocument:u,container:n,initialFocus:i},!!(o&2));S2({ownerDocument:u,container:n,containers:s,previousActiveElement:l},!!(o&8));let c=w2(),f=De(S=>{let D=n.current;D&&(x=>x())(()=>{Ct(c.current,{[no.Forwards]:()=>{go(D,ir.First,{skipElements:[S.relatedTarget]})},[no.Backwards]:()=>{go(D,ir.Last,{skipElements:[S.relatedTarget]})}})})}),v=Fs(),w=m.useRef(!1),_={ref:r,onKeyDown(S){S.key=="Tab"&&(w.current=!0,v.requestAnimationFrame(()=>{w.current=!1}))},onBlur(S){let D=ky(s);n.current instanceof HTMLElement&&D.add(n.current);let x=S.relatedTarget;x instanceof HTMLElement&&x.dataset.headlessuiFocusGuard!=="true"&&(Ty(D,x)||(w.current?go(n.current,Ct(c.current,{[no.Forwards]:()=>ir.Next,[no.Backwards]:()=>ir.Previous})|ir.WrapAround,{relativeTo:S.target}):S.target instanceof HTMLElement&&Gr(S.target)))}};return te.createElement(te.Fragment,null,!!(o&4)&&te.createElement(Ou,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:f,features:Bo.Focusable}),wt({ourProps:_,theirProps:a,defaultTag:x2,name:"FocusTrap"}),!!(o&4)&&te.createElement(Ou,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:f,features:Bo.Focusable}))}let D2=xt(E2),Qs=Object.assign(D2,{features:Sy});function _2(e=!0){let t=m.useRef(Pr.slice());return _h(([n],[r])=>{r===!0&&n===!1&&yl(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Pr.slice())},[e,Pr,t]),De(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function C2({ownerDocument:e},t){let n=_2(t);_h(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Gr(n())},[t]),Cy(()=>{t&&Gr(n())})}function k2({ownerDocument:e,container:t,initialFocus:n},r){let i=m.useRef(null),s=Yo();return _h(()=>{if(!r)return;let o=t.current;o&&yl(()=>{if(!s.current)return;let a=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===a){i.current=a;return}}else if(o.contains(a)){i.current=a;return}n!=null&&n.current?Gr(n.current):go(o,ir.First)===dy.Error&&console.warn("There are no focusable elements inside the "),i.current=e==null?void 0:e.activeElement})},[r]),i}function S2({ownerDocument:e,container:t,containers:n,previousActiveElement:r},i){let s=Yo();_y(e==null?void 0:e.defaultView,"focus",o=>{if(!i||!s.current)return;let a=ky(n);t.current instanceof HTMLElement&&a.add(t.current);let u=r.current;if(!u)return;let l=o.target;l&&l instanceof HTMLElement?Ty(a,l)?(r.current=l,Gr(l)):(o.preventDefault(),o.stopPropagation(),Gr(u)):Gr(r.current)},!0)}function Ty(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let Ay=m.createContext(!1);function T2(){return m.useContext(Ay)}function ed(e){return te.createElement(Ay.Provider,{value:e.force},e.children)}function A2(e){let t=T2(),n=m.useContext(by),r=Os(e),[i,s]=m.useState(()=>{if(!t&&n!==null||cr.isServer)return null;let o=r==null?void 0:r.getElementById("headlessui-portal-root");if(o)return o;if(r===null)return null;let a=r.createElement("div");return a.setAttribute("id","headlessui-portal-root"),r.body.appendChild(a)});return m.useEffect(()=>{i!==null&&(r!=null&&r.body.contains(i)||r==null||r.body.appendChild(i))},[i,r]),m.useEffect(()=>{t||n!==null&&s(n.current)},[n,s,t]),i}let b2=m.Fragment;function F2(e,t){let n=e,r=m.useRef(null),i=Ot(u2(c=>{r.current=c}),t),s=Os(r),o=A2(r),[a]=m.useState(()=>{var c;return cr.isServer?null:(c=s==null?void 0:s.createElement("div"))!=null?c:null}),u=m.useContext(td),l=Rs();return gt(()=>{!o||!a||o.contains(a)||(a.setAttribute("data-headlessui-portal",""),o.appendChild(a))},[o,a]),gt(()=>{if(a&&u)return u.register(a)},[u,a]),Cy(()=>{var c;!o||!a||(a instanceof Node&&o.contains(a)&&o.removeChild(a),o.childNodes.length<=0&&((c=o.parentElement)==null||c.removeChild(o)))}),l?!o||!a?null:bg.createPortal(wt({ourProps:{ref:i},theirProps:n,defaultTag:b2,name:"Portal"}),a):null}let R2=m.Fragment,by=m.createContext(null);function O2(e,t){let{target:n,...r}=e,i={ref:Ot(t)};return te.createElement(by.Provider,{value:n},wt({ourProps:i,theirProps:r,defaultTag:R2,name:"Popover.Group"}))}let td=m.createContext(null);function N2(){let e=m.useContext(td),t=m.useRef([]),n=De(s=>(t.current.push(s),e&&e.register(s),()=>r(s))),r=De(s=>{let o=t.current.indexOf(s);o!==-1&&t.current.splice(o,1),e&&e.unregister(s)}),i=m.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,m.useMemo(()=>function({children:s}){return te.createElement(td.Provider,{value:i},s)},[i])]}let P2=xt(F2),I2=xt(O2),nd=Object.assign(P2,{Group:I2});function L2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const M2=typeof Object.is=="function"?Object.is:L2,{useState:$2,useEffect:j2,useLayoutEffect:B2,useDebugValue:U2}=os;function z2(e,t,n){const r=t(),[{inst:i},s]=$2({inst:{value:r,getSnapshot:t}});return B2(()=>{i.value=r,i.getSnapshot=t,dc(i)&&s({inst:i})},[e,r,t]),j2(()=>(dc(i)&&s({inst:i}),e(()=>{dc(i)&&s({inst:i})})),[e]),U2(r),r}function dc(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!M2(n,r)}catch{return!0}}function V2(e,t,n){return t()}const H2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",q2=!H2,W2=q2?V2:z2,Q2="useSyncExternalStore"in os?(e=>e.useSyncExternalStore)(os):W2;function Z2(e){return Q2(e.subscribe,e.getSnapshot,e.getSnapshot)}function K2(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(i){return r.add(i),()=>r.delete(i)},dispatch(i,...s){let o=t[i].call(n,...s);o&&(n=o,r.forEach(a=>a()))}}}function G2(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,i=r.clientWidth-r.offsetWidth,s=e-i;n.style(r,"paddingRight",`${s}px`)}}}function Y2(){return vy()?{before({doc:e,d:t,meta:n}){function r(i){return n.containers.flatMap(s=>s()).some(s=>s.contains(i))}t.microTask(()=>{var i;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=Mn();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let s=(i=window.scrollY)!=null?i:window.pageYOffset,o=null;t.addEventListener(e,"click",a=>{if(a.target instanceof HTMLElement)try{let u=a.target.closest("a");if(!u)return;let{hash:l}=new URL(u.href),c=e.querySelector(l);c&&!r(c)&&(o=c)}catch{}},!0),t.addEventListener(e,"touchstart",a=>{if(a.target instanceof HTMLElement)if(r(a.target)){let u=a.target;for(;u.parentElement&&r(u.parentElement);)u=u.parentElement;t.style(u,"overscrollBehavior","contain")}else t.style(a.target,"touchAction","none")}),t.addEventListener(e,"touchmove",a=>{if(a.target instanceof HTMLElement)if(r(a.target)){let u=a.target;for(;u.parentElement&&u.dataset.headlessuiPortal!==""&&!(u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth);)u=u.parentElement;u.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()},{passive:!1}),t.add(()=>{var a;let u=(a=window.scrollY)!=null?a:window.pageYOffset;s!==u&&window.scrollTo(0,s),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)})})}}:{}}function X2(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function J2(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let mi=K2(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Mn(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:J2(n)},i=[Y2(),G2(),X2()];i.forEach(({before:s})=>s==null?void 0:s(r)),i.forEach(({after:s})=>s==null?void 0:s(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});mi.subscribe(()=>{let e=mi.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",i=n.count!==0;(i&&!r||!i&&r)&&mi.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&mi.dispatch("TEARDOWN",n)}});function eC(e,t,n){let r=Z2(mi),i=e?r.get(e):void 0,s=i?i.count>0:!1;return gt(()=>{if(!(!e||!t))return mi.dispatch("PUSH",e,n),()=>mi.dispatch("POP",e,n)},[t,e]),s}let hc=new Map,Zs=new Map;function Em(e,t=!0){gt(()=>{var n;if(!t)return;let r=typeof e=="function"?e():e.current;if(!r)return;function i(){var o;if(!r)return;let a=(o=Zs.get(r))!=null?o:1;if(a===1?Zs.delete(r):Zs.set(r,a-1),a!==1)return;let u=hc.get(r);u&&(u["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",u["aria-hidden"]),r.inert=u.inert,hc.delete(r))}let s=(n=Zs.get(r))!=null?n:0;return Zs.set(r,s+1),s!==0||(hc.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),i},[e,t])}function tC({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let i=m.useRef((r=n==null?void 0:n.current)!=null?r:null),s=Os(i),o=De(()=>{var a,u,l;let c=[];for(let f of e)f!==null&&(f instanceof HTMLElement?c.push(f):"current"in f&&f.current instanceof HTMLElement&&c.push(f.current));if(t!=null&&t.current)for(let f of t.current)c.push(f);for(let f of(a=s==null?void 0:s.querySelectorAll("html > *, body > *"))!=null?a:[])f!==document.body&&f!==document.head&&f instanceof HTMLElement&&f.id!=="headlessui-portal-root"&&(f.contains(i.current)||f.contains((l=(u=i.current)==null?void 0:u.getRootNode())==null?void 0:l.host)||c.some(v=>f.contains(v))||c.push(f));return c});return{resolveContainers:o,contains:De(a=>o().some(u=>u.contains(a))),mainTreeNodeRef:i,MainTreeNode:m.useMemo(()=>function(){return n!=null?null:te.createElement(Ou,{features:Bo.Hidden,ref:i})},[i,n])}}let Sh=m.createContext(()=>{});Sh.displayName="StackContext";var rd=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(rd||{});function nC(){return m.useContext(Sh)}function rC({children:e,onUpdate:t,type:n,element:r,enabled:i}){let s=nC(),o=De((...a)=>{t==null||t(...a),s(...a)});return gt(()=>{let a=i===void 0||i===!0;return a&&o(0,n,r),()=>{a&&o(1,n,r)}},[o,n,r,i]),te.createElement(Sh.Provider,{value:o},e)}let Fy=m.createContext(null);function Ry(){let e=m.useContext(Fy);if(e===null){let t=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Ry),t}return e}function Oy(){let[e,t]=m.useState([]);return[e.length>0?e.join(" "):void 0,m.useMemo(()=>function(n){let r=De(s=>(t(o=>[...o,s]),()=>t(o=>{let a=o.slice(),u=a.indexOf(s);return u!==-1&&a.splice(u,1),a}))),i=m.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props}),[r,n.slot,n.name,n.props]);return te.createElement(Fy.Provider,{value:i},n.children)},[t])]}let iC="p";function sC(e,t){let n=jn(),{id:r=`headlessui-description-${n}`,...i}=e,s=Ry(),o=Ot(t);gt(()=>s.register(r),[r,s.register]);let a={ref:o,...s.props,id:r};return wt({ourProps:a,theirProps:i,slot:s.slot||{},defaultTag:iC,name:s.name||"Description"})}let oC=xt(sC),Ny=Object.assign(oC,{});var aC=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(aC||{}),uC=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(uC||{});let lC={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Nu=m.createContext(null);Nu.displayName="DialogContext";function Xo(e){let t=m.useContext(Nu);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Xo),n}return t}function cC(e,t,n=()=>[document.body]){eC(e,t,r=>{var i;return{containers:[...(i=r.containers)!=null?i:[],n]}})}function fC(e,t){return Ct(t.type,lC,e,t)}let dC="div",hC=gs.RenderStrategy|gs.Static;function pC(e,t){let n=jn(),{id:r=`headlessui-dialog-${n}`,open:i,onClose:s,initialFocus:o,role:a="dialog",__demoMode:u=!1,...l}=e,[c,f]=m.useState(0),v=m.useRef(!1);a=function(){return a==="dialog"||a==="alertdialog"?a:(v.current||(v.current=!0,console.warn(`Invalid role [${a}] passed to . Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let w=xl();i===void 0&&w!==null&&(i=(w&bt.Open)===bt.Open);let _=m.useRef(null),S=Ot(_,t),D=Os(_),x=e.hasOwnProperty("open")||w!==null,h=e.hasOwnProperty("onClose");if(!x&&!h)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!x)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!h)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof i!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${i}`);if(typeof s!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${s}`);let d=i?0:1,[y,C]=m.useReducer(fC,{titleId:null,descriptionId:null,panelRef:m.createRef()}),F=De(()=>s(!1)),O=De(be=>C({type:0,id:be})),L=Rs()?u?!1:d===0:!1,z=c>1,H=m.useContext(Nu)!==null,[ye,oe]=N2(),le={get current(){var be;return(be=y.panelRef.current)!=null?be:_.current}},{resolveContainers:Te,mainTreeNodeRef:$e,MainTreeNode:We}=tC({portals:ye,defaultContainers:[le]}),ze=z?"parent":"leaf",Z=w!==null?(w&bt.Closing)===bt.Closing:!1,de=H||Z?!1:L,re=m.useCallback(()=>{var be,ae;return(ae=Array.from((be=D==null?void 0:D.querySelectorAll("body > *"))!=null?be:[]).find(K=>K.id==="headlessui-portal-root"?!1:K.contains($e.current)&&K instanceof HTMLElement))!=null?ae:null},[$e]);Em(re,de);let Oe=z?!0:L,ke=m.useCallback(()=>{var be,ae;return(ae=Array.from((be=D==null?void 0:D.querySelectorAll("[data-headlessui-portal]"))!=null?be:[]).find(K=>K.contains($e.current)&&K instanceof HTMLElement))!=null?ae:null},[$e]);Em(ke,Oe),yy(Te,be=>{be.preventDefault(),F()},!(!L||z));let Ae=!(z||d!==0);_y(D==null?void 0:D.defaultView,"keydown",be=>{Ae&&(be.defaultPrevented||be.key===lt.Escape&&(be.preventDefault(),be.stopPropagation(),F()))}),cC(D,!(Z||d!==0||H),Te),m.useEffect(()=>{if(d!==0||!_.current)return;let be=new ResizeObserver(ae=>{for(let K of ae){let St=K.target.getBoundingClientRect();St.x===0&&St.y===0&&St.width===0&&St.height===0&&F()}});return be.observe(_.current),()=>be.disconnect()},[d,_,F]);let[ft,Ie]=Oy(),Kt=m.useMemo(()=>[{dialogState:d,close:F,setTitleId:O},y],[d,y,F,O]),Bt=m.useMemo(()=>({open:d===0}),[d]),Ne={ref:S,id:r,role:a,"aria-modal":d===0?!0:void 0,"aria-labelledby":y.titleId,"aria-describedby":ft};return te.createElement(rC,{type:"Dialog",enabled:d===0,element:_,onUpdate:De((be,ae)=>{ae==="Dialog"&&Ct(be,{[rd.Add]:()=>f(K=>K+1),[rd.Remove]:()=>f(K=>K-1)})})},te.createElement(ed,{force:!0},te.createElement(nd,null,te.createElement(Nu.Provider,{value:Kt},te.createElement(nd.Group,{target:_},te.createElement(ed,{force:!1},te.createElement(Ie,{slot:Bt,name:"Dialog.Description"},te.createElement(Qs,{initialFocus:o,containers:Te,features:L?Ct(ze,{parent:Qs.features.RestoreFocus,leaf:Qs.features.All&~Qs.features.FocusLock}):Qs.features.None},te.createElement(oe,null,wt({ourProps:Ne,theirProps:l,slot:Bt,defaultTag:dC,features:hC,visible:d===0,name:"Dialog"}))))))))),te.createElement(We,null))}let mC="div";function vC(e,t){let n=jn(),{id:r=`headlessui-dialog-overlay-${n}`,...i}=e,[{dialogState:s,close:o}]=Xo("Dialog.Overlay"),a=Ot(t),u=De(c=>{if(c.target===c.currentTarget){if(kh(c.currentTarget))return c.preventDefault();c.preventDefault(),c.stopPropagation(),o()}}),l=m.useMemo(()=>({open:s===0}),[s]);return wt({ourProps:{ref:a,id:r,"aria-hidden":!0,onClick:u},theirProps:i,slot:l,defaultTag:mC,name:"Dialog.Overlay"})}let gC="div";function yC(e,t){let n=jn(),{id:r=`headlessui-dialog-backdrop-${n}`,...i}=e,[{dialogState:s},o]=Xo("Dialog.Backdrop"),a=Ot(t);m.useEffect(()=>{if(o.panelRef.current===null)throw new Error("A component is being used, but a component is missing.")},[o.panelRef]);let u=m.useMemo(()=>({open:s===0}),[s]);return te.createElement(ed,{force:!0},te.createElement(nd,null,wt({ourProps:{ref:a,id:r,"aria-hidden":!0},theirProps:i,slot:u,defaultTag:gC,name:"Dialog.Backdrop"})))}let wC="div";function xC(e,t){let n=jn(),{id:r=`headlessui-dialog-panel-${n}`,...i}=e,[{dialogState:s},o]=Xo("Dialog.Panel"),a=Ot(t,o.panelRef),u=m.useMemo(()=>({open:s===0}),[s]),l=De(c=>{c.stopPropagation()});return wt({ourProps:{ref:a,id:r,onClick:l},theirProps:i,slot:u,defaultTag:wC,name:"Dialog.Panel"})}let EC="h2";function DC(e,t){let n=jn(),{id:r=`headlessui-dialog-title-${n}`,...i}=e,[{dialogState:s,setTitleId:o}]=Xo("Dialog.Title"),a=Ot(t);m.useEffect(()=>(o(r),()=>o(null)),[r,o]);let u=m.useMemo(()=>({open:s===0}),[s]);return wt({ourProps:{ref:a,id:r},theirProps:i,slot:u,defaultTag:EC,name:"Dialog.Title"})}let _C=xt(pC),CC=xt(yC),kC=xt(xC),SC=xt(vC),TC=xt(DC),ys=Object.assign(_C,{Backdrop:CC,Panel:kC,Overlay:SC,Title:TC,Description:Ny}),Dm=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function _m(e){var t,n;let r=(t=e.innerText)!=null?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return r;let s=!1;for(let a of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),s=!0;let o=s?(n=i.innerText)!=null?n:"":r;return Dm.test(o)&&(o=o.replace(Dm,"")),o}function AC(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(i=>{let s=document.getElementById(i);if(s){let o=s.getAttribute("aria-label");return typeof o=="string"?o.trim():_m(s).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return _m(e).trim()}function bC(e){let t=m.useRef(""),n=m.useRef("");return De(()=>{let r=e.current;if(!r)return"";let i=r.innerText;if(t.current===i)return n.current;let s=AC(r).trim().toLowerCase();return t.current=i,n.current=s,s})}var FC=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(FC||{}),RC=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(RC||{}),OC=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(OC||{});function pc(e,t=n=>n){let n=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=my(t(e.items.slice()),s=>s.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return i===-1&&(i=null),{items:r,activeItemIndex:i}}let NC={1(e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},0(e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},2:(e,t)=>{var n;let r=pc(e),i=g2(t,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:s=>s.id,resolveDisabled:s=>s.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:i,activationTrigger:(n=t.trigger)!=null?n:1}},3:(e,t)=>{let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find(o=>{var a;return((a=o.dataRef.current.textValue)==null?void 0:a.startsWith(r))&&!o.dataRef.current.disabled}),s=i?e.items.indexOf(i):-1;return s===-1||s===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:s,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,t)=>{let n=pc(e,r=>[...r,{id:t.id,dataRef:t.dataRef}]);return{...e,...n}},6:(e,t)=>{let n=pc(e,r=>{let i=r.findIndex(s=>s.id===t.id);return i!==-1&&r.splice(i,1),r});return{...e,...n,activationTrigger:1}}},Th=m.createContext(null);Th.displayName="MenuContext";function El(e){let t=m.useContext(Th);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,El),n}return t}function PC(e,t){return Ct(t.type,NC,e,t)}let IC=m.Fragment;function LC(e,t){let{__demoMode:n=!1,...r}=e,i=m.useReducer(PC,{__demoMode:n,menuState:n?0:1,buttonRef:m.createRef(),itemsRef:m.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:s,itemsRef:o,buttonRef:a},u]=i,l=Ot(t);yy([a,o],(w,_)=>{var S;u({type:1}),Dh(_,Eh.Loose)||(w.preventDefault(),(S=a.current)==null||S.focus())},s===0);let c=De(()=>{u({type:1})}),f=m.useMemo(()=>({open:s===0,close:c}),[s,c]),v={ref:l};return te.createElement(Th.Provider,{value:i},te.createElement(Dy,{value:Ct(s,{0:bt.Open,1:bt.Closed})},wt({ourProps:v,theirProps:r,slot:f,defaultTag:IC,name:"Menu"})))}let MC="button";function $C(e,t){var n;let r=jn(),{id:i=`headlessui-menu-button-${r}`,...s}=e,[o,a]=El("Menu.Button"),u=Ot(o.buttonRef,t),l=Fs(),c=De(S=>{switch(S.key){case lt.Space:case lt.Enter:case lt.ArrowDown:S.preventDefault(),S.stopPropagation(),a({type:0}),l.nextFrame(()=>a({type:2,focus:Nn.First}));break;case lt.ArrowUp:S.preventDefault(),S.stopPropagation(),a({type:0}),l.nextFrame(()=>a({type:2,focus:Nn.Last}));break}}),f=De(S=>{switch(S.key){case lt.Space:S.preventDefault();break}}),v=De(S=>{if(kh(S.currentTarget))return S.preventDefault();e.disabled||(o.menuState===0?(a({type:1}),l.nextFrame(()=>{var D;return(D=o.buttonRef.current)==null?void 0:D.focus({preventScroll:!0})})):(S.preventDefault(),a({type:0})))}),w=m.useMemo(()=>({open:o.menuState===0}),[o]),_={ref:u,id:i,type:wy(e,o.buttonRef),"aria-haspopup":"menu","aria-controls":(n=o.itemsRef.current)==null?void 0:n.id,"aria-expanded":o.menuState===0,onKeyDown:c,onKeyUp:f,onClick:v};return wt({ourProps:_,theirProps:s,slot:w,defaultTag:MC,name:"Menu.Button"})}let jC="div",BC=gs.RenderStrategy|gs.Static;function UC(e,t){var n,r;let i=jn(),{id:s=`headlessui-menu-items-${i}`,...o}=e,[a,u]=El("Menu.Items"),l=Ot(a.itemsRef,t),c=Os(a.itemsRef),f=Fs(),v=xl(),w=v!==null?(v&bt.Open)===bt.Open:a.menuState===0;m.useEffect(()=>{let h=a.itemsRef.current;h&&a.menuState===0&&h!==(c==null?void 0:c.activeElement)&&h.focus({preventScroll:!0})},[a.menuState,a.itemsRef,c]),c2({container:a.itemsRef.current,enabled:a.menuState===0,accept(h){return h.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:h.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(h){h.setAttribute("role","none")}});let _=De(h=>{var d,y;switch(f.dispose(),h.key){case lt.Space:if(a.searchQuery!=="")return h.preventDefault(),h.stopPropagation(),u({type:3,value:h.key});case lt.Enter:if(h.preventDefault(),h.stopPropagation(),u({type:1}),a.activeItemIndex!==null){let{dataRef:C}=a.items[a.activeItemIndex];(y=(d=C.current)==null?void 0:d.domRef.current)==null||y.click()}py(a.buttonRef.current);break;case lt.ArrowDown:return h.preventDefault(),h.stopPropagation(),u({type:2,focus:Nn.Next});case lt.ArrowUp:return h.preventDefault(),h.stopPropagation(),u({type:2,focus:Nn.Previous});case lt.Home:case lt.PageUp:return h.preventDefault(),h.stopPropagation(),u({type:2,focus:Nn.First});case lt.End:case lt.PageDown:return h.preventDefault(),h.stopPropagation(),u({type:2,focus:Nn.Last});case lt.Escape:h.preventDefault(),h.stopPropagation(),u({type:1}),Mn().nextFrame(()=>{var C;return(C=a.buttonRef.current)==null?void 0:C.focus({preventScroll:!0})});break;case lt.Tab:h.preventDefault(),h.stopPropagation(),u({type:1}),Mn().nextFrame(()=>{s2(a.buttonRef.current,h.shiftKey?ir.Previous:ir.Next)});break;default:h.key.length===1&&(u({type:3,value:h.key}),f.setTimeout(()=>u({type:4}),350));break}}),S=De(h=>{switch(h.key){case lt.Space:h.preventDefault();break}}),D=m.useMemo(()=>({open:a.menuState===0}),[a]),x={"aria-activedescendant":a.activeItemIndex===null||(n=a.items[a.activeItemIndex])==null?void 0:n.id,"aria-labelledby":(r=a.buttonRef.current)==null?void 0:r.id,id:s,onKeyDown:_,onKeyUp:S,role:"menu",tabIndex:0,ref:l};return wt({ourProps:x,theirProps:o,slot:D,defaultTag:jC,features:BC,visible:w,name:"Menu.Items"})}let zC=m.Fragment;function VC(e,t){let n=jn(),{id:r=`headlessui-menu-item-${n}`,disabled:i=!1,...s}=e,[o,a]=El("Menu.Item"),u=o.activeItemIndex!==null?o.items[o.activeItemIndex].id===r:!1,l=m.useRef(null),c=Ot(t,l);gt(()=>{if(o.__demoMode||o.menuState!==0||!u||o.activationTrigger===0)return;let C=Mn();return C.requestAnimationFrame(()=>{var F,O;(O=(F=l.current)==null?void 0:F.scrollIntoView)==null||O.call(F,{block:"nearest"})}),C.dispose},[o.__demoMode,l,u,o.menuState,o.activationTrigger,o.activeItemIndex]);let f=bC(l),v=m.useRef({disabled:i,domRef:l,get textValue(){return f()}});gt(()=>{v.current.disabled=i},[v,i]),gt(()=>(a({type:5,id:r,dataRef:v}),()=>a({type:6,id:r})),[v,r]);let w=De(()=>{a({type:1})}),_=De(C=>{if(i)return C.preventDefault();a({type:1}),py(o.buttonRef.current)}),S=De(()=>{if(i)return a({type:2,focus:Nn.Nothing});a({type:2,focus:Nn.Specific,id:r})}),D=l2(),x=De(C=>D.update(C)),h=De(C=>{D.wasMoved(C)&&(i||u||a({type:2,focus:Nn.Specific,id:r,trigger:0}))}),d=De(C=>{D.wasMoved(C)&&(i||u&&a({type:2,focus:Nn.Nothing}))}),y=m.useMemo(()=>({active:u,disabled:i,close:w}),[u,i,w]);return wt({ourProps:{id:r,ref:c,role:"menuitem",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,disabled:void 0,onClick:_,onFocus:S,onPointerEnter:x,onMouseEnter:x,onPointerMove:h,onMouseMove:h,onPointerLeave:d,onMouseLeave:d},theirProps:s,slot:y,defaultTag:zC,name:"Menu.Item"})}let HC=xt(LC),qC=xt($C),WC=xt(UC),QC=xt(VC),Ta=Object.assign(HC,{Button:qC,Items:WC,Item:QC}),Py=m.createContext(null);function Iy(){let e=m.useContext(Py);if(e===null){let t=new Error("You used a