kennel 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -5
- package/dist/cli/dispatch.js +9 -0
- package/dist/cli/src/automations/notifications.d.ts +40 -0
- package/dist/cli/src/automations/notifications.js +220 -0
- package/dist/cli/src/cli/dispatch.d.ts +1 -0
- package/dist/cli/src/cli/dispatch.js +125 -0
- package/dist/cli/src/cli/usage.d.ts +1 -0
- package/dist/cli/src/cli/usage.js +25 -0
- package/dist/cli/src/core/api-client.d.ts +13 -0
- package/dist/cli/src/core/api-client.js +1 -0
- package/dist/cli/src/core/command.d.ts +1 -0
- package/dist/cli/src/core/command.js +69 -0
- package/dist/cli/src/core/core-folders.d.ts +1 -0
- package/dist/cli/src/core/core-folders.js +42 -0
- package/dist/cli/src/core/init.d.ts +1 -0
- package/dist/cli/src/core/init.js +141 -0
- package/dist/cli/src/core/runtime.d.ts +14 -0
- package/dist/cli/src/core/runtime.js +1 -0
- package/dist/cli/src/deploy/cloudflare.d.ts +6 -0
- package/dist/cli/src/deploy/cloudflare.js +100 -0
- package/dist/cli/src/deploy/environment.d.ts +2 -0
- package/dist/cli/src/deploy/environment.js +47 -0
- package/dist/cli/src/deploy/smoke-tests.d.ts +4 -0
- package/dist/cli/src/deploy/smoke-tests.js +92 -0
- package/dist/cli/src/deploy/trigger-dev.d.ts +2 -0
- package/dist/cli/src/deploy/trigger-dev.js +255 -0
- package/dist/cli/src/deploy/vercel.d.ts +3 -0
- package/dist/cli/src/deploy/vercel.js +67 -0
- package/dist/cli/src/main.d.ts +1 -0
- package/dist/cli/src/main.js +9 -0
- package/dist/cli/src/mcp/agent-tools.d.ts +8 -0
- package/dist/cli/src/mcp/agent-tools.js +247 -0
- package/dist/cli/src/mcp/config.d.ts +25 -0
- package/dist/cli/src/mcp/config.js +185 -0
- package/dist/cli/src/mcp/function-source.d.ts +7 -0
- package/dist/cli/src/mcp/function-source.js +42 -0
- package/dist/cli/src/mcp/generate.d.ts +1 -0
- package/dist/cli/src/mcp/generate.js +47 -0
- package/dist/cli/src/mcp/install-page.d.ts +12 -0
- package/dist/cli/src/mcp/install-page.js +5 -0
- package/dist/cli/src/notifications/email-worker.d.ts +8 -0
- package/dist/cli/src/notifications/email-worker.js +137 -0
- package/dist/cli/src/package/mcp-data.d.ts +1 -0
- package/dist/cli/src/package/mcp-data.js +1 -0
- package/dist/cli/src/package/mcp-email-worker.d.ts +1 -0
- package/dist/cli/src/package/mcp-email-worker.js +1 -0
- package/dist/cli/src/package/mcp-http.d.ts +1 -0
- package/dist/cli/src/package/mcp-http.js +1 -0
- package/dist/cli/src/package/mcp-stdio.d.ts +1 -0
- package/dist/cli/src/package/mcp-stdio.js +1 -0
- package/dist/cli/src/package/mcp.d.ts +1 -0
- package/dist/cli/src/package/mcp.js +1 -0
- package/dist/cli/src/package/preview.d.ts +9 -0
- package/dist/cli/src/package/preview.js +1 -0
- package/dist/cli/src/plugins/external.d.ts +36 -0
- package/dist/cli/src/plugins/external.js +503 -0
- package/dist/cli/src/publish/cloudflare-init.d.ts +12 -0
- package/dist/cli/src/publish/cloudflare-init.js +101 -0
- package/dist/cli/src/publish/config.d.ts +28 -0
- package/dist/cli/src/publish/config.js +178 -0
- package/dist/cli/src/publish/options.d.ts +13 -0
- package/dist/cli/src/publish/options.js +78 -0
- package/dist/cli/src/publish/vercel-init.d.ts +9 -0
- package/dist/cli/src/publish/vercel-init.js +52 -0
- package/dist/cli/src/shared/json.d.ts +4 -0
- package/dist/cli/src/shared/json.js +56 -0
- package/dist/cli/src/shared/object.d.ts +2 -0
- package/dist/cli/src/shared/object.js +3 -0
- package/dist/cli/src/shared/package-manager.d.ts +11 -0
- package/dist/cli/src/shared/package-manager.js +39 -0
- package/dist/cli/src/shared/path.d.ts +4 -0
- package/dist/cli/src/shared/path.js +40 -0
- package/dist/cli/src/shared/process.d.ts +7 -0
- package/dist/cli/src/shared/process.js +12 -0
- package/dist/cli/src/shared/project-config.d.ts +2 -0
- package/dist/cli/src/shared/project-config.js +26 -0
- package/dist/cli/src/site/dev.d.ts +10 -0
- package/dist/cli/src/site/dev.js +126 -0
- package/dist/cli/src/site/extension.d.ts +8 -0
- package/dist/cli/src/site/extension.js +113 -0
- package/dist/cli/src/site/folder-icons.d.ts +46 -0
- package/dist/cli/src/site/folder-icons.js +86 -0
- package/dist/cli/src/site/hot-viewer.d.ts +2 -0
- package/dist/cli/src/site/hot-viewer.js +231 -0
- package/dist/cli/src/site/kinds.d.ts +1 -0
- package/dist/cli/src/site/kinds.js +1 -0
- package/dist/cli/src/site/mail.d.ts +1 -0
- package/dist/cli/src/site/mail.js +10 -0
- package/dist/cli/src/site/renderers.d.ts +61 -0
- package/dist/cli/src/site/renderers.js +219 -0
- package/dist/cli/src/site/server-plugins.d.ts +54 -0
- package/dist/cli/src/site/server-plugins.js +1 -0
- package/dist/cli/src/site/viewer.d.ts +36 -0
- package/dist/cli/src/site/viewer.js +352 -0
- package/dist/cli/src/site/vitepress.d.ts +1 -0
- package/dist/cli/src/site/vitepress.js +1 -0
- package/dist/cli/usage.js +1 -0
- package/dist/core/api-client.js +75 -44
- package/dist/core/command.js +6 -3
- package/dist/core/core-folders.js +38280 -33
- package/dist/core/init.js +59 -4
- package/dist/core/runtime.js +57163 -41853
- package/dist/package/preview.js +40589 -17894
- package/dist/plugins/external.d.ts +36 -0
- package/dist/plugins/external.js +503 -0
- package/dist/site/server-plugins.js +394 -59
- package/dist/site/viewer.js +18 -5
- package/kernel/apps/web/.env.example +11 -0
- package/kernel/apps/web/components.json +20 -0
- package/kernel/apps/web/eslint.config.mjs +60 -0
- package/kernel/apps/web/index.html +17 -0
- package/kernel/apps/web/package.json +79 -0
- package/kernel/apps/web/public/favicon.svg +6 -0
- package/kernel/apps/web/public/providers/claude.svg +1 -0
- package/kernel/apps/web/public/providers/codex.svg +1 -0
- package/kernel/apps/web/public/providers/cursor.svg +1 -0
- package/kernel/apps/web/public/providers/opencode.svg +1 -0
- package/kernel/apps/web/public/providers/pi.svg +1 -0
- package/kernel/apps/web/server/acp/index.ts +1 -0
- package/kernel/apps/web/server/acp/live-agent-connection.ts +1 -0
- package/kernel/apps/web/server/acp/process-manager.ts +1 -0
- package/kernel/apps/web/server/acp/registry.ts +1 -0
- package/kernel/apps/web/server/acp/sdk.ts +1 -0
- package/kernel/apps/web/server/acp/transport.ts +1 -0
- package/kernel/apps/web/server/acp/types.ts +1 -0
- package/kernel/apps/web/server/acp-live-plugin.ts +30 -0
- package/kernel/apps/web/server/api/document-edit.ts +1 -0
- package/kernel/apps/web/server/api/open-path.ts +1 -0
- package/kernel/apps/web/server/core-plugin.ts +49 -0
- package/kernel/apps/web/server/folder-favicon.ts +1 -0
- package/kernel/apps/web/server/folder-icons.ts +1 -0
- package/kernel/apps/web/server/folder-metadata-plugin.ts +31 -0
- package/kernel/apps/web/server/plugins.ts +1 -0
- package/kernel/apps/web/server/preview-kinds.ts +1 -0
- package/kernel/apps/web/src/ai-input.tsx +62 -0
- package/kernel/apps/web/src/annotations.tsx +430 -0
- package/kernel/apps/web/src/api/client.ts +3 -0
- package/kernel/apps/web/src/api/errors.ts +1 -0
- package/kernel/apps/web/src/api/events.ts +42 -0
- package/kernel/apps/web/src/app.css +332 -0
- package/kernel/apps/web/src/app.tsx +667 -0
- package/kernel/apps/web/src/ask-draft.ts +164 -0
- package/kernel/apps/web/src/ask-tray.tsx +256 -0
- package/kernel/apps/web/src/comment-editor.tsx +93 -0
- package/kernel/apps/web/src/comment-form.tsx +162 -0
- package/kernel/apps/web/src/copy-path.ts +18 -0
- package/kernel/apps/web/src/deferred-ask-tray.tsx +20 -0
- package/kernel/apps/web/src/document-url.ts +46 -0
- package/kernel/apps/web/src/documents-url.ts +23 -0
- package/kernel/apps/web/src/dropped-folder.ts +64 -0
- package/kernel/apps/web/src/external-plugins.ts +3 -0
- package/kernel/apps/web/src/file-viewer.tsx +171 -0
- package/kernel/apps/web/src/folder-filter-icons.tsx +39 -0
- package/kernel/apps/web/src/folder-metadata.ts +76 -0
- package/kernel/apps/web/src/folder-plugin-view.tsx +87 -0
- package/kernel/apps/web/src/folder-query-cache.ts +66 -0
- package/kernel/apps/web/src/host-adapters.ts +209 -0
- package/kernel/apps/web/src/host-bridge.ts +214 -0
- package/kernel/apps/web/src/lib/entity-folder.ts +2 -0
- package/kernel/apps/web/src/linked-session-header.tsx +43 -0
- package/kernel/apps/web/src/live-session-controls.tsx +326 -0
- package/kernel/apps/web/src/local-source.ts +32 -0
- package/kernel/apps/web/src/main.tsx +24 -0
- package/kernel/apps/web/src/markdown-page.tsx +444 -0
- package/kernel/apps/web/src/notes-page.tsx +103 -0
- package/kernel/apps/web/src/plugins.ts +53 -0
- package/kernel/apps/web/src/project-search-dialog.tsx +257 -0
- package/kernel/apps/web/src/project-search.ts +18 -0
- package/kernel/apps/web/src/query-client.ts +4 -0
- package/kernel/apps/web/src/rehype-source-lines.ts +22 -0
- package/kernel/apps/web/src/routes/document.tsx +1 -0
- package/kernel/apps/web/src/routes/entities.tsx +277 -0
- package/kernel/apps/web/src/routes/search.tsx +60 -0
- package/kernel/apps/web/src/selection-context.ts +68 -0
- package/kernel/apps/web/src/selection-input.tsx +58 -0
- package/kernel/apps/web/src/selection-popup.tsx +155 -0
- package/kernel/apps/web/src/session-transcript-page.tsx +152 -0
- package/kernel/apps/web/src/use-annotations.ts +162 -0
- package/kernel/apps/web/src/use-ask-ai.ts +26 -0
- package/kernel/apps/web/src/use-ask-draft.ts +27 -0
- package/kernel/apps/web/src/use-document.ts +37 -0
- package/kernel/apps/web/src/use-folder-notes.ts +49 -0
- package/kernel/apps/web/src/use-linked-session.ts +33 -0
- package/kernel/apps/web/src/view-context.tsx +69 -0
- package/kernel/apps/web/src/view-header.tsx +66 -0
- package/kernel/apps/web/src/viewer-capabilities.ts +33 -0
- package/kernel/apps/web/src/viewer-route.ts +1 -0
- package/kernel/apps/web/src/viewport-height.ts +33 -0
- package/kernel/apps/web/tsconfig.json +24 -0
- package/kernel/apps/web/vite.config.ts +252 -0
- package/kernel/packages/agents/eslint.config.js +10 -0
- package/kernel/packages/agents/package.json +75 -0
- package/kernel/packages/agents/src/agent-card.tsx +334 -0
- package/kernel/packages/agents/src/client.tsx +13 -0
- package/kernel/packages/agents/src/index.ts +18 -0
- package/kernel/packages/agents/src/manifest.ts +7 -0
- package/kernel/packages/agents/src/node.ts +447 -0
- package/kernel/packages/agents/src/profiles.ts +137 -0
- package/kernel/packages/agents/src/resolve.ts +69 -0
- package/kernel/packages/agents/src/server.ts +60 -0
- package/kernel/packages/agents/src/types.ts +82 -0
- package/kernel/packages/agents/src/viewer.tsx +370 -0
- package/kernel/packages/agents/test/profiles.test.mjs +88 -0
- package/kernel/packages/agents/test/resolve.test.mjs +729 -0
- package/kernel/packages/agents/tsconfig.json +17 -0
- package/kernel/packages/api/README.md +73 -0
- package/kernel/packages/api/openapi.json +3368 -0
- package/kernel/packages/api/package.json +41 -0
- package/kernel/packages/api/src/client/errors.ts +1 -0
- package/kernel/packages/api/src/client/index.ts +2 -0
- package/kernel/packages/api/src/contracts/schemas.ts +277 -0
- package/kernel/packages/api/src/contracts.ts +20 -0
- package/kernel/packages/api/src/index.ts +34 -0
- package/kernel/packages/api/src/server/acp/index.ts +35 -0
- package/kernel/packages/api/src/server/acp/live-agent-connection.ts +44 -0
- package/kernel/packages/api/src/server/acp/process-manager.ts +291 -0
- package/kernel/packages/api/src/server/acp/registry.ts +140 -0
- package/kernel/packages/api/src/server/acp/sdk.ts +15 -0
- package/kernel/packages/api/src/server/acp/transport.ts +115 -0
- package/kernel/packages/api/src/server/acp/types.ts +89 -0
- package/kernel/packages/api/src/server/acp-live-plugin.ts +423 -0
- package/kernel/packages/api/src/server/api/create-agent-file.ts +46 -0
- package/kernel/packages/api/src/server/api/document-edit.ts +125 -0
- package/kernel/packages/api/src/server/api/open-path.ts +40 -0
- package/kernel/packages/api/src/server/contracts.ts +85 -0
- package/kernel/packages/api/src/server/entity-folder.ts +353 -0
- package/kernel/packages/api/src/server/folder-favicon.ts +17 -0
- package/kernel/packages/api/src/server/folder-icons.ts +113 -0
- package/kernel/packages/api/src/server/folder-metadata-plugin.ts +1758 -0
- package/kernel/packages/api/src/server/host.ts +21 -0
- package/kernel/packages/api/src/server/index.ts +197 -0
- package/kernel/packages/api/src/server/linked-folder-discovery.ts +158 -0
- package/kernel/packages/api/src/server/plugins.ts +205 -0
- package/kernel/packages/api/src/server/project-discovery.ts +69 -0
- package/kernel/packages/api/src/server/watcher.ts +46 -0
- package/kernel/packages/api/src/shared/selection.ts +16 -0
- package/kernel/packages/api/src/shared/viewer-route.ts +200 -0
- package/kernel/packages/api/test/agents-loading.test.ts +94 -0
- package/kernel/packages/api/test/core.test.ts +364 -0
- package/kernel/packages/api/test/entity-folder.test.ts +131 -0
- package/kernel/packages/api/test/linked-folder-discovery.test.ts +78 -0
- package/kernel/packages/api/test/media-endpoint.test.ts +83 -0
- package/kernel/packages/api/test/partial-loading.test.ts +43 -0
- package/kernel/packages/api/test/project-discovery.test.ts +44 -0
- package/kernel/packages/api/tsconfig.json +11 -0
- package/kernel/packages/api-client/README.md +72 -0
- package/kernel/packages/api-client/package.json +26 -0
- package/kernel/packages/api-client/scripts/generate.ts +68 -0
- package/kernel/packages/api-client/src/errors.ts +59 -0
- package/kernel/packages/api-client/src/generated.d.ts +1248 -0
- package/kernel/packages/api-client/src/index.ts +206 -0
- package/kernel/packages/api-client/src/responses.ts +19 -0
- package/kernel/packages/api-client/test/client.test.ts +143 -0
- package/kernel/packages/api-client/tsconfig.json +12 -0
- package/kernel/packages/folder-plugin/eslint.config.js +10 -0
- package/kernel/packages/folder-plugin/package.json +50 -0
- package/kernel/packages/folder-plugin/src/client.ts +73 -0
- package/kernel/packages/folder-plugin/src/endpoint.ts +273 -0
- package/kernel/packages/folder-plugin/src/index.ts +15 -0
- package/kernel/packages/folder-plugin/src/server.ts +78 -0
- package/kernel/packages/folder-plugin/src/subpath.ts +34 -0
- package/kernel/packages/folder-plugin/src/types.ts +86 -0
- package/kernel/packages/folder-plugin/src/validation.ts +56 -0
- package/kernel/packages/folder-plugin/test/contract.test.mjs +133 -0
- package/kernel/packages/folder-plugin/tsconfig.json +17 -0
- package/kernel/packages/kinds/package.json +24 -0
- package/kernel/packages/kinds/src/kinds.ts +172 -0
- package/kernel/packages/markdown/README.md +40 -0
- package/kernel/packages/markdown/explorer.css +1 -0
- package/kernel/packages/markdown/package.json +30 -0
- package/kernel/packages/markdown/src/documents.ts +1 -0
- package/kernel/packages/markdown/src/explorer.ts +1 -0
- package/kernel/packages/markdown/src/index.ts +2 -0
- package/kernel/packages/markdown/src/metadata.ts +63 -0
- package/kernel/packages/markdown/src/node.ts +1 -0
- package/kernel/packages/markdown/styles.css +1 -0
- package/kernel/packages/notes/SKILL.md +19 -0
- package/kernel/packages/notes/eslint.config.js +10 -0
- package/kernel/packages/notes/package.json +72 -0
- package/kernel/packages/notes/src/client.tsx +12 -0
- package/kernel/packages/notes/src/data/ai-input.ts +58 -0
- package/kernel/packages/notes/src/data/api.ts +40 -0
- package/kernel/packages/notes/src/data/parse.ts +15 -0
- package/kernel/packages/notes/src/data/routing.ts +33 -0
- package/kernel/packages/notes/src/data/use-folder-notes.ts +49 -0
- package/kernel/packages/notes/src/index.ts +2 -0
- package/kernel/packages/notes/src/manifest.ts +6 -0
- package/kernel/packages/notes/src/pages/notes-page.tsx +79 -0
- package/kernel/packages/notes/src/pages/single-note-page.tsx +57 -0
- package/kernel/packages/notes/src/server.ts +88 -0
- package/kernel/packages/notes/src/ui/ai-composer-controls.tsx +70 -0
- package/kernel/packages/notes/src/ui/folder-notes-list.tsx +140 -0
- package/kernel/packages/notes/tsconfig.json +16 -0
- package/kernel/packages/schemas/ICON-POLICY.md +43 -0
- package/kernel/packages/schemas/SKILL.md +185 -0
- package/kernel/packages/schemas/eslint.config.js +10 -0
- package/kernel/packages/schemas/package.json +81 -0
- package/kernel/packages/schemas/src/client.tsx +137 -0
- package/kernel/packages/schemas/src/data/config-file.ts +37 -0
- package/kernel/packages/schemas/src/data/contract.ts +174 -0
- package/kernel/packages/schemas/src/data/favicon.ts +218 -0
- package/kernel/packages/schemas/src/data/fields.ts +96 -0
- package/kernel/packages/schemas/src/data/icon-image.ts +53 -0
- package/kernel/packages/schemas/src/data/icon.ts +97 -0
- package/kernel/packages/schemas/src/data/load.ts +161 -0
- package/kernel/packages/schemas/src/data/params.ts +103 -0
- package/kernel/packages/schemas/src/data/query.ts +33 -0
- package/kernel/packages/schemas/src/data/sort.ts +50 -0
- package/kernel/packages/schemas/src/data/workspace.ts +101 -0
- package/kernel/packages/schemas/src/index.ts +22 -0
- package/kernel/packages/schemas/src/manifest.ts +4 -0
- package/kernel/packages/schemas/src/node.ts +384 -0
- package/kernel/packages/schemas/src/pages/collection.tsx +252 -0
- package/kernel/packages/schemas/src/server.ts +208 -0
- package/kernel/packages/schemas/src/ui/schema-entity-list.tsx +124 -0
- package/kernel/packages/schemas/src/ui/schema-filters.tsx +186 -0
- package/kernel/packages/schemas/src/ui/schema-search.tsx +35 -0
- package/kernel/packages/schemas/src/ui/use-query-param-filter-setting.tsx +15 -0
- package/kernel/packages/schemas/test/contract.test.mjs +26 -0
- package/kernel/packages/schemas/test/fields.test.mjs +187 -0
- package/kernel/packages/schemas/test/load.test.mjs +12 -0
- package/kernel/packages/schemas/test/node.test.mjs +412 -0
- package/kernel/packages/schemas/test/query.test.mjs +134 -0
- package/kernel/packages/schemas/test/workspace.test.mjs +86 -0
- package/kernel/packages/schemas/tsconfig.json +17 -0
- package/kernel/packages/session-finding/package.json +33 -0
- package/kernel/packages/session-finding/src/index.ts +120 -0
- package/kernel/packages/session-finding/test/list-sessions.test.mjs +139 -0
- package/kernel/packages/session-finding/tsconfig.json +12 -0
- package/kernel/packages/ui/LICENSE +21 -0
- package/kernel/packages/ui/components.json +20 -0
- package/kernel/packages/ui/eslint.config.js +8 -0
- package/kernel/packages/ui/package.json +106 -0
- package/kernel/packages/ui/src/chat/file-link.ts +178 -0
- package/kernel/packages/ui/src/chat/index.ts +18 -0
- package/kernel/packages/ui/src/chat/transcript.tsx +348 -0
- package/kernel/packages/ui/src/chat/turns.ts +76 -0
- package/kernel/packages/ui/src/chat/types.ts +23 -0
- package/kernel/packages/ui/src/chat/use-overflowing.ts +56 -0
- package/kernel/packages/ui/src/components/accordion.tsx +74 -0
- package/kernel/packages/ui/src/components/alert-dialog.tsx +164 -0
- package/kernel/packages/ui/src/components/alert.tsx +68 -0
- package/kernel/packages/ui/src/components/app-breadcrumbs.tsx +170 -0
- package/kernel/packages/ui/src/components/app-header.tsx +125 -0
- package/kernel/packages/ui/src/components/app-options.tsx +87 -0
- package/kernel/packages/ui/src/components/app-view-header.tsx +34 -0
- package/kernel/packages/ui/src/components/aspect-ratio.tsx +11 -0
- package/kernel/packages/ui/src/components/avatar.tsx +53 -0
- package/kernel/packages/ui/src/components/badge.tsx +47 -0
- package/kernel/packages/ui/src/components/base-dialog.tsx +3 -0
- package/kernel/packages/ui/src/components/base-tabs.tsx +63 -0
- package/kernel/packages/ui/src/components/breadcrumb.tsx +110 -0
- package/kernel/packages/ui/src/components/button-group.tsx +86 -0
- package/kernel/packages/ui/src/components/button.tsx +65 -0
- package/kernel/packages/ui/src/components/calendar.tsx +240 -0
- package/kernel/packages/ui/src/components/card.tsx +95 -0
- package/kernel/packages/ui/src/components/carousel.tsx +240 -0
- package/kernel/packages/ui/src/components/chart.tsx +375 -0
- package/kernel/packages/ui/src/components/checkbox.tsx +39 -0
- package/kernel/packages/ui/src/components/collapsible.tsx +33 -0
- package/kernel/packages/ui/src/components/collection-icon.tsx +28 -0
- package/kernel/packages/ui/src/components/command.tsx +205 -0
- package/kernel/packages/ui/src/components/content-issues.tsx +63 -0
- package/kernel/packages/ui/src/components/context-menu.tsx +298 -0
- package/kernel/packages/ui/src/components/copy-context.tsx +134 -0
- package/kernel/packages/ui/src/components/dialog.tsx +157 -0
- package/kernel/packages/ui/src/components/drawer.tsx +162 -0
- package/kernel/packages/ui/src/components/dropdown-menu.tsx +303 -0
- package/kernel/packages/ui/src/components/empty.tsx +108 -0
- package/kernel/packages/ui/src/components/field.tsx +260 -0
- package/kernel/packages/ui/src/components/file-preview.tsx +152 -0
- package/kernel/packages/ui/src/components/file-renderer.tsx +466 -0
- package/kernel/packages/ui/src/components/filter-chip-panel.tsx +157 -0
- package/kernel/packages/ui/src/components/filter-select.tsx +127 -0
- package/kernel/packages/ui/src/components/folder-activity.tsx +646 -0
- package/kernel/packages/ui/src/components/folder-file-list.tsx +58 -0
- package/kernel/packages/ui/src/components/folder-filter-bar.tsx +191 -0
- package/kernel/packages/ui/src/components/folder-image.tsx +18 -0
- package/kernel/packages/ui/src/components/folder-landing.tsx +70 -0
- package/kernel/packages/ui/src/components/folder-list.tsx +140 -0
- package/kernel/packages/ui/src/components/folder-metadata.tsx +107 -0
- package/kernel/packages/ui/src/components/folder-mobile-bar.tsx +60 -0
- package/kernel/packages/ui/src/components/folder-project-list.tsx +133 -0
- package/kernel/packages/ui/src/components/folder-session-list.tsx +113 -0
- package/kernel/packages/ui/src/components/folder-session-page.tsx +126 -0
- package/kernel/packages/ui/src/components/folder-sidebar.tsx +52 -0
- package/kernel/packages/ui/src/components/folder-skill-list.tsx +62 -0
- package/kernel/packages/ui/src/components/folder-tabs.tsx +156 -0
- package/kernel/packages/ui/src/components/form.tsx +167 -0
- package/kernel/packages/ui/src/components/hover-card.tsx +52 -0
- package/kernel/packages/ui/src/components/icons.tsx +34 -0
- package/kernel/packages/ui/src/components/input-group.tsx +184 -0
- package/kernel/packages/ui/src/components/input-otp.tsx +90 -0
- package/kernel/packages/ui/src/components/input.tsx +29 -0
- package/kernel/packages/ui/src/components/item.tsx +195 -0
- package/kernel/packages/ui/src/components/kbd.tsx +32 -0
- package/kernel/packages/ui/src/components/label.tsx +27 -0
- package/kernel/packages/ui/src/components/link.tsx +45 -0
- package/kernel/packages/ui/src/components/live-tool-call.tsx +193 -0
- package/kernel/packages/ui/src/components/menubar.tsx +323 -0
- package/kernel/packages/ui/src/components/navigation-menu.tsx +210 -0
- package/kernel/packages/ui/src/components/note-card.tsx +149 -0
- package/kernel/packages/ui/src/components/pagination.tsx +128 -0
- package/kernel/packages/ui/src/components/popover.tsx +56 -0
- package/kernel/packages/ui/src/components/progress.tsx +31 -0
- package/kernel/packages/ui/src/components/radio-group.tsx +54 -0
- package/kernel/packages/ui/src/components/scroll-area.tsx +61 -0
- package/kernel/packages/ui/src/components/select.tsx +219 -0
- package/kernel/packages/ui/src/components/separator.tsx +30 -0
- package/kernel/packages/ui/src/components/session-icon.tsx +124 -0
- package/kernel/packages/ui/src/components/sheet.tsx +157 -0
- package/kernel/packages/ui/src/components/sidebar.tsx +789 -0
- package/kernel/packages/ui/src/components/skeleton.tsx +13 -0
- package/kernel/packages/ui/src/components/slider.tsx +73 -0
- package/kernel/packages/ui/src/components/sonner.tsx +41 -0
- package/kernel/packages/ui/src/components/spinner.tsx +16 -0
- package/kernel/packages/ui/src/components/switch.tsx +40 -0
- package/kernel/packages/ui/src/components/table.tsx +120 -0
- package/kernel/packages/ui/src/components/tabs.tsx +78 -0
- package/kernel/packages/ui/src/components/textarea.tsx +25 -0
- package/kernel/packages/ui/src/components/toggle-group.tsx +87 -0
- package/kernel/packages/ui/src/components/toggle.tsx +48 -0
- package/kernel/packages/ui/src/components/tooltip.tsx +71 -0
- package/kernel/packages/ui/src/components/viewer-options.tsx +166 -0
- package/kernel/packages/ui/src/hooks/use-folder-filter.ts +103 -0
- package/kernel/packages/ui/src/hooks/use-mobile.ts +19 -0
- package/kernel/packages/ui/src/index.ts +13 -0
- package/kernel/packages/ui/src/lib/document-extensions.ts +83 -0
- package/kernel/packages/ui/src/lib/folder-activity.ts +143 -0
- package/kernel/packages/ui/src/lib/folder-filter.ts +284 -0
- package/kernel/packages/ui/src/lib/live-tool-call.tsx +109 -0
- package/kernel/packages/ui/src/lib/media-urls.ts +176 -0
- package/kernel/packages/ui/src/lib/obsidian-links.ts +120 -0
- package/kernel/packages/ui/src/lib/source-components.tsx +65 -0
- package/kernel/packages/ui/src/lib/utils.tsx +7 -0
- package/kernel/packages/ui/src/pages/entity-detail-page.tsx +82 -0
- package/kernel/packages/ui/src/pages/entity-list-page.tsx +50 -0
- package/kernel/packages/ui/src/pages/entity-page.tsx +69 -0
- package/kernel/packages/ui/src/styles/folder-activity.css +2151 -0
- package/kernel/packages/ui/test/copy-context.test.mjs +48 -0
- package/kernel/packages/ui/test/folder-filter.test.mjs +484 -0
- package/kernel/packages/ui/tsconfig.json +15 -0
- package/kernel/plugins/calendar/SKILL.md +173 -0
- package/kernel/plugins/calendar/eslint.config.js +10 -0
- package/kernel/plugins/calendar/package.json +73 -0
- package/kernel/plugins/calendar/schema.json +137 -0
- package/kernel/plugins/calendar/src/calendar.tsx +328 -0
- package/kernel/plugins/calendar/src/client.tsx +139 -0
- package/kernel/plugins/calendar/src/context.ts +48 -0
- package/kernel/plugins/calendar/src/copy-button.tsx +66 -0
- package/kernel/plugins/calendar/src/event-dialog.tsx +270 -0
- package/kernel/plugins/calendar/src/index.ts +4 -0
- package/kernel/plugins/calendar/src/manifest.ts +7 -0
- package/kernel/plugins/calendar/src/parse.ts +610 -0
- package/kernel/plugins/calendar/src/server.ts +160 -0
- package/kernel/plugins/calendar/src/utils.ts +80 -0
- package/kernel/plugins/calendar/src/views.tsx +418 -0
- package/kernel/plugins/calendar/test/context.test.mjs +60 -0
- package/kernel/plugins/calendar/test/package.test.mjs +43 -0
- package/kernel/plugins/calendar/test/parse.test.mjs +392 -0
- package/kernel/plugins/calendar/test/server.test.mjs +126 -0
- package/kernel/plugins/calendar/tsconfig.json +17 -0
- package/kernel/plugins/mail/SKILL.md +97 -0
- package/kernel/plugins/mail/eslint.config.js +10 -0
- package/kernel/plugins/mail/package.json +79 -0
- package/kernel/plugins/mail/src/api.ts +359 -0
- package/kernel/plugins/mail/src/bun-ffi.d.ts +14 -0
- package/kernel/plugins/mail/src/client.tsx +14 -0
- package/kernel/plugins/mail/src/flock.ts +137 -0
- package/kernel/plugins/mail/src/folders.ts +37 -0
- package/kernel/plugins/mail/src/history.ts +485 -0
- package/kernel/plugins/mail/src/index.ts +3 -0
- package/kernel/plugins/mail/src/mail-card.tsx +123 -0
- package/kernel/plugins/mail/src/mail-conversation.tsx +153 -0
- package/kernel/plugins/mail/src/mail-detail-page.tsx +467 -0
- package/kernel/plugins/mail/src/mail-hooks.ts +252 -0
- package/kernel/plugins/mail/src/mail-page.tsx +109 -0
- package/kernel/plugins/mail/src/mail-request.ts +78 -0
- package/kernel/plugins/mail/src/mail-send-box.tsx +175 -0
- package/kernel/plugins/mail/src/mailos.ts +723 -0
- package/kernel/plugins/mail/src/manifest.ts +7 -0
- package/kernel/plugins/mail/src/node.ts +171 -0
- package/kernel/plugins/mail/src/parse.ts +139 -0
- package/kernel/plugins/mail/src/server.ts +125 -0
- package/kernel/plugins/mail/src/types.ts +10 -0
- package/kernel/plugins/mail/src/viewer.tsx +147 -0
- package/kernel/plugins/mail/test/flock.test.mjs +156 -0
- package/kernel/plugins/mail/test/folders.test.mjs +138 -0
- package/kernel/plugins/mail/test/history.test.mjs +460 -0
- package/kernel/plugins/mail/test/mailos.test.mjs +752 -0
- package/kernel/plugins/mail/test/node.test.mjs +207 -0
- package/kernel/plugins/mail/test/package.test.mjs +54 -0
- package/kernel/plugins/mail/test/parse.test.mjs +32 -0
- package/kernel/plugins/mail/test/server.test.mjs +116 -0
- package/kernel/plugins/mail/test/viewer.test.mjs +192 -0
- package/kernel/plugins/mail/tsconfig.json +17 -0
- package/kernel/plugins/projects/SKILL.md +73 -0
- package/kernel/plugins/projects/eslint.config.js +10 -0
- package/kernel/plugins/projects/package.json +70 -0
- package/kernel/plugins/projects/src/client.tsx +17 -0
- package/kernel/plugins/projects/src/data/model.ts +129 -0
- package/kernel/plugins/projects/src/index.ts +17 -0
- package/kernel/plugins/projects/src/manifest.ts +7 -0
- package/kernel/plugins/projects/src/project-context.ts +41 -0
- package/kernel/plugins/projects/src/server.ts +276 -0
- package/kernel/plugins/projects/src/ui/project-card.tsx +61 -0
- package/kernel/plugins/projects/src/ui/projects-page.tsx +102 -0
- package/kernel/plugins/projects/test/package.test.mjs +51 -0
- package/kernel/plugins/projects/tsconfig.json +17 -0
- package/kernel/plugins/tasks/SKILL.md +341 -0
- package/kernel/plugins/tasks/eslint.config.js +10 -0
- package/kernel/plugins/tasks/package.json +74 -0
- package/kernel/plugins/tasks/schema.json +939 -0
- package/kernel/plugins/tasks/src/api.ts +212 -0
- package/kernel/plugins/tasks/src/client.tsx +23 -0
- package/kernel/plugins/tasks/src/data/parse.ts +544 -0
- package/kernel/plugins/tasks/src/data/task-id.ts +56 -0
- package/kernel/plugins/tasks/src/data/todo-model.ts +795 -0
- package/kernel/plugins/tasks/src/index.ts +34 -0
- package/kernel/plugins/tasks/src/manifest.ts +7 -0
- package/kernel/plugins/tasks/src/pages/task-detail.tsx +48 -0
- package/kernel/plugins/tasks/src/pages/task-list.tsx +88 -0
- package/kernel/plugins/tasks/src/server.ts +447 -0
- package/kernel/plugins/tasks/src/styles.css +9 -0
- package/kernel/plugins/tasks/src/ui/compact-todo-list.tsx +372 -0
- package/kernel/plugins/tasks/src/ui/error-details.tsx +78 -0
- package/kernel/plugins/tasks/src/ui/task-page.tsx +392 -0
- package/kernel/plugins/tasks/src/ui/todo-agent-filter.tsx +36 -0
- package/kernel/plugins/tasks/src/ui/todo-filter-bar.tsx +66 -0
- package/kernel/plugins/tasks/src/ui/todo-item.tsx +494 -0
- package/kernel/plugins/tasks/src/ui/todo-status-filter.tsx +60 -0
- package/kernel/plugins/tasks/src/ui/todo-tag-filter.tsx +48 -0
- package/kernel/plugins/tasks/src/ui/todo-warnings.tsx +106 -0
- package/kernel/plugins/tasks/test/api.test.mjs +99 -0
- package/kernel/plugins/tasks/test/folder-sources.test.mjs +46 -0
- package/kernel/plugins/tasks/test/package.test.mjs +54 -0
- package/kernel/plugins/tasks/test/parse.test.mjs +225 -0
- package/kernel/plugins/tasks/test/server.test.mjs +386 -0
- package/kernel/plugins/tasks/tsconfig.json +17 -0
- package/node_modules/@agentclientprotocol/sdk/LICENSE +191 -0
- package/node_modules/@agentclientprotocol/sdk/README.md +70 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.d.ts +1835 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.js +1885 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.test.js +5036 -0
- package/node_modules/@agentclientprotocol/sdk/dist/acp.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/connection.d.ts +82 -0
- package/node_modules/@agentclientprotocol/sdk/dist/connection.js +428 -0
- package/node_modules/@agentclientprotocol/sdk/dist/connection.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/connection.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/connection.test.js +470 -0
- package/node_modules/@agentclientprotocol/sdk/dist/connection.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.d.ts +26 -0
- package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.js +96 -0
- package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.test.js +77 -0
- package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/agent.d.ts +2 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/agent.js +232 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/agent.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/client.d.ts +2 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/client.js +132 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/client.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/dual-version-agent.d.ts +9 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/dual-version-agent.js +221 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/dual-version-agent.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/http-client.d.ts +2 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/http-client.js +86 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/http-client.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/http-server.d.ts +2 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/http-server.js +112 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/http-server.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/ws-client.d.ts +2 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/ws-client.js +88 -0
- package/node_modules/@agentclientprotocol/sdk/dist/examples/ws-client.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/http-stream.d.ts +33 -0
- package/node_modules/@agentclientprotocol/sdk/dist/http-stream.js +435 -0
- package/node_modules/@agentclientprotocol/sdk/dist/http-stream.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/http-stream.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/http-stream.test.js +1380 -0
- package/node_modules/@agentclientprotocol/sdk/dist/http-stream.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.d.ts +603 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.js +1064 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.test.js +851 -0
- package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.d.ts +22 -0
- package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.js +64 -0
- package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.test.js +45 -0
- package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.d.ts +17 -0
- package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.js +426 -0
- package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.test.js +499 -0
- package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.d.ts +37 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.js +474 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.test.js +535 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.d.ts +11 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.js +57 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.test.js +73 -0
- package/node_modules/@agentclientprotocol/sdk/dist/protocol.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.d.ts +199 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.js +211 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/index.d.ts +51 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/index.js +52 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/index.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts +6118 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.js +3 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.d.ts +14160 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js +3066 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.d.ts +30 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.js +98 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.test.js +93 -0
- package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-permission.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-permission.test.js +261 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-permission.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-session-sse.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-session-sse.test.js +490 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-session-sse.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-sse.d.ts +2 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-sse.js +104 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-sse.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-sse.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-sse.test.js +52 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-sse.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-websocket-upgrade.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-websocket-upgrade.test.js +946 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server-websocket-upgrade.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.d.ts +81 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.js +380 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.test.js +1082 -0
- package/node_modules/@agentclientprotocol/sdk/dist/server.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/sse.d.ts +4 -0
- package/node_modules/@agentclientprotocol/sdk/dist/sse.js +91 -0
- package/node_modules/@agentclientprotocol/sdk/dist/sse.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/sse.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/sse.test.js +126 -0
- package/node_modules/@agentclientprotocol/sdk/dist/sse.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream.d.ts +35 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream.js +106 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream.test.js +206 -0
- package/node_modules/@agentclientprotocol/sdk/dist/stream.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/streams.d.ts +8 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/streams.js +51 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/streams.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-agent.d.ts +24 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-agent.js +163 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-agent.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-http-server.d.ts +9 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-http-server.js +74 -0
- package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-http-server.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.d.ts +806 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.js +1183 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.test.js +512 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.d.ts +954 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.js +1035 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.d.ts +42 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.js +43 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/types.gen.d.ts +6146 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/types.gen.js +3 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/types.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.d.ts +30552 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.js +3204 -0
- package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-server.d.ts +14 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-server.js +358 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-server.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.d.ts +54 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.js +246 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.test.js +833 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.d.ts +13 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.js +78 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.test.d.ts +1 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.test.js +42 -0
- package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.test.js.map +1 -0
- package/node_modules/@agentclientprotocol/sdk/package.json +105 -0
- package/node_modules/@agentclientprotocol/sdk/schema/schema.json +8819 -0
- package/node_modules/@agentclientprotocol/sdk/schema/v2/schema.unstable.json +10098 -0
- package/package.json +52 -6
- package/web/assets/{abnfDiagram-VRR7QNED-Nfq-O04D.js → abnfDiagram-VRR7QNED-Bgfb1nEB.js} +1 -1
- package/web/assets/app-DoGr2Zi7.js +2 -0
- package/web/assets/app-options-D-RJiQ-X.js +25 -0
- package/web/assets/app-view-header-BLvLq02T.js +1 -0
- package/web/assets/arc-Dk_KI36B.js +1 -0
- package/web/assets/{architectureDiagram-ZJ3FMSHR-qhRwPNcQ.js → architectureDiagram-ZJ3FMSHR-NR_KhRCf.js} +1 -1
- package/web/assets/ask-tray-TzeTcO6-.js +14 -0
- package/web/assets/{blockDiagram-677ZJIJ3-C56P3bGu.js → blockDiagram-677ZJIJ3-CkLkwx9C.js} +1 -1
- package/web/assets/button-C6arH7zt.js +1 -0
- package/web/assets/{c4Diagram-LMCZKHZV-Ey1M72zD.js → c4Diagram-LMCZKHZV-CFCUH8e_.js} +1 -1
- package/web/assets/channel-uMEjV8qc.js +1 -0
- package/web/assets/{chunk-2Q5K7J3B-a6isk9VU.js → chunk-2Q5K7J3B-B_BPLWsW.js} +1 -1
- package/web/assets/{chunk-32BRIVSS-uy4kdSLL.js → chunk-32BRIVSS-B1VB1hOy.js} +1 -1
- package/web/assets/{chunk-5VM5RSS4-oj2sBFd7.js → chunk-5VM5RSS4-KFcYr8Co.js} +1 -1
- package/web/assets/{chunk-EX3LRPZG-Bzl1ukAi.js → chunk-EX3LRPZG-CpBX3kuK.js} +3 -3
- package/web/assets/{chunk-JWPE2WC7-sUph7I_t.js → chunk-JWPE2WC7-BPSl40wG.js} +1 -1
- package/web/assets/{chunk-MOJQB5TN-C0ERSuVK.js → chunk-MOJQB5TN-D2RcYmoU.js} +1 -1
- package/web/assets/{chunk-RYQCIY6F-Dyw1Hfwp.js → chunk-RYQCIY6F-m7Gyn-t3.js} +1 -1
- package/web/assets/{chunk-V7JOEXUC-DnSz22rb.js → chunk-V7JOEXUC-TDvdopxS.js} +1 -1
- package/web/assets/{chunk-VR4S4FIN-Bp2SNel7.js → chunk-VR4S4FIN-DZTsG51a.js} +1 -1
- package/web/assets/{chunk-XXDRQBXY-Dqtar746.js → chunk-XXDRQBXY-Dp0--RE2.js} +1 -1
- package/web/assets/classDiagram-OUVF2IWQ-fbZocVor.js +1 -0
- package/web/assets/classDiagram-v2-EOCWNBFH-fbZocVor.js +1 -0
- package/web/assets/client-C6Nxdfif.js +2 -0
- package/web/assets/client-CXYfBko5.js +17 -0
- package/web/assets/client-CoKtOq-X.js +7 -0
- package/web/assets/client-DyRQz5RU.js +53 -0
- package/web/assets/client-OY6HUzuD.js +98 -0
- package/web/assets/client-YOYWZIFi.js +34 -0
- package/web/assets/client-j2kQmxsO.js +22 -0
- package/web/assets/command-BugZBGXE.js +38 -0
- package/web/assets/copy-context-C0Uqsp-3.js +1 -0
- package/web/assets/{cose-bilkent-JH36ORCC-Dx1VqMjj.js → cose-bilkent-JH36ORCC-CPu3PI8h.js} +1 -1
- package/web/assets/{cynefin-VYW2F7L2-SjhCWmIV.js → cynefin-VYW2F7L2-DWxftYAm.js} +1 -1
- package/web/assets/{cynefinDiagram-TSTJHNR4-Dvqz2594.js → cynefinDiagram-TSTJHNR4-DsmN2V-p.js} +1 -1
- package/web/assets/{dagre-VKFMJZFB-Ju2m2qXt.js → dagre-VKFMJZFB-COEbApyY.js} +1 -1
- package/web/assets/{diagram-FQU43EPY-DsHKTt0k.js → diagram-FQU43EPY-0O9WGWKB.js} +1 -1
- package/web/assets/{diagram-G47NLZAW-DWHAcLkJ.js → diagram-G47NLZAW-CutEdMVh.js} +1 -1
- package/web/assets/{diagram-NH7WQ7WH-uUMz46ZD.js → diagram-NH7WQ7WH-C9KZc3B2.js} +1 -1
- package/web/assets/{diagram-OA4YK3LP-BRjVzjdp.js → diagram-OA4YK3LP-D8kkPXbY.js} +1 -1
- package/web/assets/{diagram-WEI45ONY-Cb-FhBpQ.js → diagram-WEI45ONY-_YqiTaGP.js} +1 -1
- package/web/assets/document-Dgt5eZFj.js +19 -0
- package/web/assets/{ebnfDiagram-CCIWWBDH-IhhxX3IB.js → ebnfDiagram-CCIWWBDH-JO-zQh6g.js} +1 -1
- package/web/assets/{entities-DUnx74kH.js → entities-C3wz7FCx.js} +12 -12
- package/web/assets/{erDiagram-Q63AITRT-D1frgeWf.js → erDiagram-Q63AITRT-9UjQwJ4P.js} +1 -1
- package/web/assets/file-viewer-DZJ8nYnl.js +1 -0
- package/web/assets/{flowDiagram-23GEKE2U-BiPPM-FY.js → flowDiagram-23GEKE2U-Ca08tnYM.js} +5 -5
- package/web/assets/folder-image-BfGgxo7i.js +1 -0
- package/web/assets/folder-landing-qUKBCnG-.js +54 -0
- package/web/assets/folder-list-BfFjv7rR.js +1 -0
- package/web/assets/folder-metadata-DCw8xzHk.js +2 -0
- package/web/assets/folder-mobile-bar-Ubz4babf.js +1 -0
- package/web/assets/folder-plugin-view-DsWR1zmQ.js +6 -0
- package/web/assets/{ganttDiagram-NO4QXBWP-CmEOlHD7.js → ganttDiagram-NO4QXBWP-KnHzX5W3.js} +1 -1
- package/web/assets/{gitGraphDiagram-IHSO6WYX-tTjcpZpU.js → gitGraphDiagram-IHSO6WYX-Cm8woNtK.js} +1 -1
- package/web/assets/index-BaRnbYRw.js +1 -0
- package/web/assets/index-BexmLxIP.css +1 -0
- package/web/assets/index-Bp9DidgD.js +1 -0
- package/web/assets/{index-eL1k96k8.js → index-CCXE8zc9.js} +1 -1
- package/web/assets/index-CNyy98F8.js +2 -0
- package/web/assets/{index-DmrKjrlM.js → index-CXhBn-ar.js} +1 -1
- package/web/assets/index-DDirZMgx.js +1 -0
- package/web/assets/{infoDiagram-FWYZ7A6U-Ok2sdbc1.js → infoDiagram-FWYZ7A6U-yyqmUtIb.js} +1 -1
- package/web/assets/{ishikawaDiagram-FXEZZL3T-kPnM5psX.js → ishikawaDiagram-FXEZZL3T-BfvR_Zy4.js} +4 -4
- package/web/assets/{journeyDiagram-5HDEW3XC-BkoT0-45.js → journeyDiagram-5HDEW3XC-BKuw06HM.js} +1 -1
- package/web/assets/{kanban-definition-HUTT4EX6-xnm_eFoU.js → kanban-definition-HUTT4EX6-n0010rmQ.js} +8 -8
- package/web/assets/{linear-CLZpgLH-.js → linear-C0d0lT8O.js} +1 -1
- package/web/assets/linked-session-header-BkEweU0Z.js +3 -0
- package/web/assets/{markdown-njUwQKsR.js → markdown-Bw9RgUGR.js} +9 -9
- package/web/assets/{mermaid.core-Bvxj3RoN.js → mermaid.core-BDVbShyO.js} +6 -6
- package/web/assets/metadata-KV0dpp4G.js +1 -0
- package/web/assets/{mindmap-definition-LN4V7U3C-42Uoox79.js → mindmap-definition-LN4V7U3C--_0ks3GF.js} +1 -1
- package/web/assets/note-card-DBfX6gW1.js +6 -0
- package/web/assets/{pegDiagram-2B236MQR-B-GZCw3w.js → pegDiagram-2B236MQR-CBoNIpKR.js} +1 -1
- package/web/assets/{pieDiagram-ENE6RG2P-DRmmssIB.js → pieDiagram-ENE6RG2P-MA5tkYh5.js} +3 -3
- package/web/assets/popover-DBD7FF-W.js +9 -0
- package/web/assets/{project-search-dialog-B730oZ1S.js → project-search-dialog-DM1IkSZu.js} +6 -6
- package/web/assets/{quadrantDiagram-ABIIQ3AL-BfhVQ7V9.js → quadrantDiagram-ABIIQ3AL-CWT1ryqF.js} +1 -1
- package/web/assets/{railroadDiagram-RFXS5EU6-DxKx7XRp.js → railroadDiagram-RFXS5EU6-ZiLB5FGi.js} +1 -1
- package/web/assets/{react-DZzLHL-l.js → react-B9jn2M18.js} +2 -2
- package/web/assets/{requirementDiagram-TGXJPOKE-NUzj9fw1.js → requirementDiagram-TGXJPOKE-CQq9uneq.js} +1 -1
- package/web/assets/{sankeyDiagram-HTMAVEWB-Cy9OMnl-.js → sankeyDiagram-HTMAVEWB-qDG-0JqI.js} +1 -1
- package/web/assets/search-DNrQA5fF.js +2 -0
- package/web/assets/select-D8cqNgcp.js +30 -0
- package/web/assets/selection-popup-DmtTeRs2.js +7 -0
- package/web/assets/{sequenceDiagram-DBY2YBRQ-CBNE9mzn.js → sequenceDiagram-DBY2YBRQ-CiApurLO.js} +1 -1
- package/web/assets/{sizeCapture-X5ZJPWSS-S4HhfX0n.js → sizeCapture-X5ZJPWSS-DZSR5QXm.js} +1 -1
- package/web/assets/stateDiagram-2N3HPSRC-CjJJR9_z.js +1 -0
- package/web/assets/stateDiagram-v2-6OUMAXLB-BpeGSCu9.js +1 -0
- package/web/assets/{swimlanes-5IMT3BWC-DJ2aLWal.js → swimlanes-5IMT3BWC-CKmo1sg6.js} +2 -2
- package/web/assets/swimlanesDiagram-G3AALYLV-D9RjLKb9.js +8 -0
- package/web/assets/tanstack-YzX_Mi37.js +3 -0
- package/web/assets/{timeline-definition-FHXFAJF6-vFDUVPCX.js → timeline-definition-FHXFAJF6-D-NMwS3y.js} +1 -1
- package/web/assets/{use-folder-filter-BbTUlXgG.js → use-folder-filter-LQyXns5Q.js} +1 -1
- package/web/assets/{utils-CwHGE3BB.js → utils-DCaHk0Gm.js} +1 -1
- package/web/assets/{vennDiagram-L72KCM5P-AsnhK2zW.js → vennDiagram-L72KCM5P-CfL6LBWw.js} +1 -1
- package/web/assets/view-context-gyDl_p2V.js +229 -0
- package/web/assets/viewer-capabilities-Bpp8Uvcg.js +1 -0
- package/web/assets/{wardleyDiagram-EHGQE667-Cj1wFbNV.js → wardleyDiagram-EHGQE667-DgldMxaj.js} +1 -1
- package/web/assets/{xychartDiagram-FW5EYKEG-Bbvnutsm.js → xychartDiagram-FW5EYKEG-CIoAIFX8.js} +1 -1
- package/web/favicon.svg +6 -0
- package/web/index.html +5 -4
- package/web/assets/app-CPSmsokP.js +0 -2
- package/web/assets/app-options-XEWvevsz.js +0 -25
- package/web/assets/app-view-header-BKZ90ToF.js +0 -1
- package/web/assets/arc-DbpbZvCt.js +0 -1
- package/web/assets/arrow-left-CFeHb-Z1.js +0 -1
- package/web/assets/ask-tray-D2YHtbPj.js +0 -14
- package/web/assets/button-BJ7z-ZA7.js +0 -1
- package/web/assets/calendar-days-DWh2XMO2.js +0 -1
- package/web/assets/channel-dSRp_qTo.js +0 -1
- package/web/assets/chevron-down-C5oRtqbX.js +0 -1
- package/web/assets/chevron-right-CsPtvh8C.js +0 -1
- package/web/assets/chevron-up-DjpU6Pyv.js +0 -1
- package/web/assets/classDiagram-OUVF2IWQ-B7B2zLzM.js +0 -1
- package/web/assets/classDiagram-v2-EOCWNBFH-B7B2zLzM.js +0 -1
- package/web/assets/client-CAudjYV9.js +0 -34
- package/web/assets/client-Dn9-_Gm_.js +0 -14
- package/web/assets/client-Dxrf2tyq.js +0 -102
- package/web/assets/client-aFI2M4pE.js +0 -53
- package/web/assets/collection-icon-TbOVyORG.js +0 -1
- package/web/assets/collection-page-Du6FKkuU.js +0 -10
- package/web/assets/command-C_g5E1Wx.js +0 -38
- package/web/assets/copy-Ikmr6Iq2.js +0 -1
- package/web/assets/copy-context-Cl1TE2PJ.js +0 -1
- package/web/assets/document-DcjNSJCk.js +0 -2
- package/web/assets/external-link-BXmSXqqF.js +0 -1
- package/web/assets/file-renderer-BRZTrYx8.js +0 -19
- package/web/assets/file-text-CiiSsCDq.js +0 -1
- package/web/assets/file-viewer-C1wAeVDK.js +0 -1
- package/web/assets/folder-image-AXBrHUcU.js +0 -1
- package/web/assets/folder-landing-BhRg7hwn.js +0 -54
- package/web/assets/folder-list-rIdszVde.js +0 -1
- package/web/assets/folder-metadata-puTC5QqJ.js +0 -2
- package/web/assets/folder-mobile-bar-DjjRQo3T.js +0 -1
- package/web/assets/folder-plugin-view-BU_kzR8j.js +0 -6
- package/web/assets/index-DS2Wmd9I.css +0 -1
- package/web/assets/index-DgqzSeIR.js +0 -1
- package/web/assets/index-DnlTDqaa.js +0 -1
- package/web/assets/index-DztTMDFz.js +0 -2
- package/web/assets/index-kY75qc96.js +0 -1
- package/web/assets/index-p38i_yyY.js +0 -1
- package/web/assets/link-2-BWKA6t--.js +0 -1
- package/web/assets/link-DC_1Z6Yy.js +0 -11
- package/web/assets/linked-session-header-DJYWZ_-q.js +0 -3
- package/web/assets/mail-2rCdIFul.js +0 -1
- package/web/assets/markdown-title-dncAYYiP.js +0 -131
- package/web/assets/notes-page-DIW6rgJp.js +0 -10
- package/web/assets/pencil-8cobiSSq.js +0 -1
- package/web/assets/plus-BHV2wJr7.js +0 -1
- package/web/assets/popover-Cmmgj-MJ.js +0 -9
- package/web/assets/search-CvlYUkN6.js +0 -2
- package/web/assets/select-1SvaKQsS.js +0 -30
- package/web/assets/selection-popup-ntjycEVh.js +0 -7
- package/web/assets/sparkles-CBhGREdc.js +0 -1
- package/web/assets/stateDiagram-2N3HPSRC-BEw1Mheu.js +0 -1
- package/web/assets/stateDiagram-v2-6OUMAXLB-BHtjl1iD.js +0 -1
- package/web/assets/swimlanesDiagram-G3AALYLV-Z362aroZ.js +0 -8
- package/web/assets/tanstack-CD46mJkU.js +0 -1
- package/web/assets/view-context-D-fh9AbH.js +0 -81
- package/web/assets/viewer-capabilities-CROIaoqh.js +0 -1
- package/web/assets/x-BUeE--I4.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as x,j as O,R as Zt,a as Bn,b as Un}from"./react-DZzLHL-l.js";var bt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Nn=class extends bt{#t;#e;#s;constructor(){super(),this.#s=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#s=t,this.#e?.(),this.#e=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},ke=new Nn,Qn={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Kn=class{#t=Qn;#e=!1;setTimeoutProvider(t){this.#t=t}setTimeout(t,e){return this.#t.setTimeout(t,e)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,e){return this.#t.setInterval(t,e)}clearInterval(t){this.#t.clearInterval(t)}},st=new Kn;function qn(t){setTimeout(t,0)}var Wn=typeof window>"u"||"Deno"in globalThis;function M(){}function Hn(t,e){return typeof t=="function"?t(e):t}function ge(t){return typeof t=="number"&&t>=0&&t!==1/0}function Ds(t,e){return Math.max(t+(e||0)-Date.now(),0)}function V(t,e){return typeof t=="function"?t(e):t}function j(t,e){return typeof t=="function"?t(e):t}function Ye(t,e){const{type:s="all",exact:n,fetchStatus:i,predicate:r,queryKey:a,stale:o}=t;if(a){if(n){if(e.queryHash!==Ee(a,e.options))return!1}else if(!yt(e.queryKey,a))return!1}if(s!=="all"){const c=e.isActive();if(s==="active"&&!c||s==="inactive"&&c)return!1}return!(typeof o=="boolean"&&e.isStale()!==o||i&&i!==e.state.fetchStatus||r&&!r(e))}function Xe(t,e){const{exact:s,status:n,predicate:i,mutationKey:r}=t;if(r){if(!e.options.mutationKey)return!1;if(s){if(it(e.options.mutationKey)!==it(r))return!1}else if(!yt(e.options.mutationKey,r))return!1}return!(n&&e.state.status!==n||i&&!i(e))}function Ee(t,e){return(e?.queryKeyHashFn||it)(t)}function it(t){return JSON.stringify(t,(e,s)=>ye(s)?Object.keys(s).sort().reduce((n,i)=>(n[i]=s[i],n),{}):s)}function yt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(Array.isArray(t)&&Array.isArray(e)){for(let n=0;n<e.length;n++)if(!yt(t[n],e[n]))return!1;return!0}const s=Object.keys(e);for(const n of s)if(!yt(t[n],e[n]))return!1;return!0}return!1}var zn=Object.prototype.hasOwnProperty;function As(t,e,s=0){if(t===e)return t;if(s>500)return e;const n=Ze(t)&&Ze(e);if(!n&&!(ye(t)&&ye(e)))return e;const r=(n?t:Object.keys(t)).length,a=n?e:Object.keys(e),o=a.length,c=n?new Array(o):{};let u=0;for(let l=0;l<o;l++){const h=n?l:a[l],f=t[h],p=e[h];if(f===p){c[h]=f,(n?l<r:zn.call(t,h))&&u++;continue}if(f===null||p===null||typeof f!="object"||typeof p!="object"){c[h]=p;continue}const m=As(f,p,s+1);c[h]=m,m===f&&u++}return r===o&&u===r?t:c}function Wt(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function Ze(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function ye(t){if(!ts(t))return!1;const e=t.constructor;if(e===void 0)return!0;const s=e.prototype;return!(!ts(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function ts(t){return Object.prototype.toString.call(t)==="[object Object]"}function $n(t){return new Promise(e=>{st.setTimeout(e,t)})}function ve(t,e,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,e):s.structuralSharing!==!1?As(t,e):e}function Vn(t,e,s=0){const n=[...t,e];return s&&n.length>s?n.slice(1):n}function Gn(t,e,s=0){const n=[e,...t];return s&&n.length>s?n.slice(0,-1):n}var Te=Symbol();function js(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===Te?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Fe(t,e){return typeof t=="function"?t(...e):!!t}function Jn(t,e,s){let n=!1,i;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??=e(),n||(n=!0,i.aborted?s():i.addEventListener("abort",s,{once:!0})),i)}),t}var Ct=(()=>{let t=()=>Wn;return{isServer(){return t()},setIsServer(e){t=e}}})();function be(){let t,e;const s=new Promise((i,r)=>{t=i,e=r});s.status="pending",s.catch(()=>{});function n(i){Object.assign(s,i),delete s.resolve,delete s.reject}return s.resolve=i=>{n({status:"fulfilled",value:i}),t(i)},s.reject=i=>{n({status:"rejected",reason:i}),e(i)},s}var Yn=qn;function Xn(){let t=[],e=0,s=o=>{o()},n=o=>{o()},i=Yn;const r=o=>{e?t.push(o):i(()=>{s(o)})},a=()=>{const o=t;t=[],o.length&&i(()=>{n(()=>{o.forEach(c=>{s(c)})})})};return{batch:o=>{let c;e++;try{c=o()}finally{e--,e||a()}return c},batchCalls:o=>(...c)=>{r(()=>{o(...c)})},schedule:r,setNotifyFunction:o=>{s=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var F=Xn(),Zn=class extends bt{#t=!0;#e;#s;constructor(){super(),this.#s=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#s=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#t!==t&&(this.#t=t,this.listeners.forEach(s=>{s(t)}))}isOnline(){return this.#t}},Ht=new Zn;function ti(t){return Math.min(1e3*2**t,3e4)}function Bs(t){return(t??"online")==="online"?Ht.isOnline():!0}var Se=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Us(t){let e=!1,s=0,n;const i=be(),r=()=>i.status!=="pending",a=d=>{if(!r()){const g=new Se(d);f(g),t.onCancel?.(g)}},o=()=>{e=!0},c=()=>{e=!1},u=()=>ke.isFocused()&&(t.networkMode==="always"||Ht.isOnline())&&t.canRun(),l=()=>Bs(t.networkMode)&&t.canRun(),h=d=>{r()||(n?.(),i.resolve(d))},f=d=>{r()||(n?.(),i.reject(d))},p=()=>new Promise(d=>{n=g=>{(r()||u())&&d(g)},t.onPause?.()}).then(()=>{n=void 0,r()||t.onContinue?.()}),m=()=>{if(r())return;let d;const g=s===0?t.initialPromise:void 0;try{d=g??t.fn()}catch(y){d=Promise.reject(y)}Promise.resolve(d).then(h).catch(y=>{if(r())return;const b=t.retry??(Ct.isServer()?0:3),P=t.retryDelay??ti,_=typeof P=="function"?P(s,y):P,C=b===!0||typeof b=="number"&&s<b||typeof b=="function"&&b(s,y);if(e||!C){f(y);return}s++,t.onFail?.(s,y),$n(_).then(()=>u()?void 0:p()).then(()=>{e?f(y):m()})})};return{promise:i,status:()=>i.status,cancel:a,continue:()=>(n?.(),i),cancelRetry:o,continueRetry:c,canStart:l,start:()=>(l()?m():p().then(m),i)}}var Ns=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ge(this.gcTime)&&(this.#t=st.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Ct.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#t!==void 0&&(st.clearTimeout(this.#t),this.#t=void 0)}};function ei(t){return{onFetch:(e,s)=>{const n=e.options,i=e.fetchOptions?.meta?.fetchMore?.direction,r=e.state.data?.pages||[],a=e.state.data?.pageParams||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let l=!1;const h=m=>{Jn(m,()=>e.signal,()=>l=!0)},f=js(e.options,e.fetchOptions),p=async(m,d,g)=>{if(l)return Promise.reject(e.signal.reason);if(d==null&&m.pages.length)return Promise.resolve(m);const b=(()=>{const S={client:e.client,queryKey:e.queryKey,pageParam:d,direction:g?"backward":"forward",meta:e.options.meta};return h(S),S})(),P=await f(b),{maxPages:_}=e.options,C=g?Gn:Vn;return{pages:C(m.pages,P,_),pageParams:C(m.pageParams,d,_)}};if(i&&r.length){const m=i==="backward",d=m?si:es,g={pages:r,pageParams:a},y=d(n,g);o=await p(g,y,m)}else{const m=t??r.length;do{const d=c===0?a[0]??n.initialPageParam:es(n,o);if(c>0&&d==null)break;o=await p(o,d),c++}while(c<m)}return o};e.options.persister?e.fetchFn=()=>e.options.persister?.(u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s):e.fetchFn=u}}}function es(t,{pages:e,pageParams:s}){const n=e.length-1;return e.length>0?t.getNextPageParam(e[n],e,s[n],s):void 0}function si(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}var ni=class extends Ns{#t;#e;#s;#n;#r;#i;#a;#o;constructor(t){super(),this.#o=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#r=t.client,this.#n=this.#r.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=ns(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#t}get promise(){return this.#i?.promise}setOptions(t){if(this.options={...this.#a,...t},t?._type&&(this.#t=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=ns(this.options);e.data!==void 0&&(this.setState(ss(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,e){const s=ve(this.state.data,t,this.options);return this.#c({data:s,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),s}setState(t){this.#c({type:"setState",state:t})}cancel(t){const e=this.#i?.promise;return this.#i?.cancel(t),e?e.then(M).catch(M):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>j(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Te||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>V(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Ds(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#i&&(this.#o||this.#l()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#l(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#c({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(u=>u.options.queryFn);c&&this.setOptions(c.options)}const s=new AbortController,n=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#o=!0,s.signal)})},i=()=>{const c=js(this.options,e),l=(()=>{const h={client:this.#r,queryKey:this.queryKey,meta:this.meta};return n(h),h})();return this.#o=!1,this.options.persister?this.options.persister(c,l,this):c(l)},a=(()=>{const c={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return n(c),c})();(this.#t==="infinite"?ei(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#s=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:"fetch",meta:a.fetchOptions?.meta}),this.#i=Us({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:c=>{c instanceof Se&&c.revert&&this.setState({...this.#s,fetchStatus:"idle"}),s.abort()},onFail:(c,u)=>{this.#c({type:"failed",failureCount:c,error:u})},onPause:()=>{this.#c({type:"pause"})},onContinue:()=>{this.#c({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const c=await this.#i.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),this.#n.config.onSuccess?.(c,this),this.#n.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof Se){if(c.silent)return this.#i.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#c({type:"error",error:c}),this.#n.config.onError?.(c,this),this.#n.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#c(t){const e=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Qs(s.data,this.options),fetchMeta:t.meta??null};case"success":const n={...s,...ss(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#s=t.manual?n:void 0,n;case"error":const i=t.error;return{...s,error:i,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=e(this.state),F.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:t})})}};function Qs(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Bs(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function ss(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ns(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,n=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var ii=class extends bt{constructor(t,e){super(),this.options=e,this.#t=t,this.#o=null,this.#a=be(),this.bindMethods(),this.setOptions(e)}#t;#e=void 0;#s=void 0;#n=void 0;#r;#i;#a;#o;#l;#c;#p;#h;#f;#u;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),is(this.#e,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return we(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return we(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#w(),this.#e.removeObserver(this)}setOptions(t){const e=this.options,s=this.#e;if(this.options=this.#t.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof j(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#e.setOptions(this.options),e._defaulted&&!Wt(this.options,e)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const n=this.hasListeners();n&&rs(this.#e,s,this.options,e)&&this.#d(),this.updateResult(),n&&(this.#e!==s||j(this.options.enabled,this.#e)!==j(e.enabled,this.#e)||V(this.options.staleTime,this.#e)!==V(e.staleTime,this.#e))&&this.#g();const i=this.#y();n&&(this.#e!==s||j(this.options.enabled,this.#e)!==j(e.enabled,this.#e)||i!==this.#u)&&this.#v(i)}getOptimisticResult(t){const e=this.#t.getQueryCache().build(this.#t,t),s=this.createResult(e,t);return oi(this,s)&&(this.#n=s,this.#i=this.options,this.#r=this.#e.state),s}getCurrentResult(){return this.#n}trackResult(t,e){return new Proxy(t,{get:(s,n)=>(this.trackProp(n),e?.(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,n))})}trackProp(t){this.#m.add(t)}getCurrentQuery(){return this.#e}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#t.defaultQueryOptions(t),s=this.#t.getQueryCache().build(this.#t,e);return s.fetch().then(()=>this.createResult(s,e))}fetch(t){return this.#d({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#d(t){this.#_();let e=this.#e.fetch(this.options,t);return t?.throwOnError||(e=e.catch(M)),e}#g(){this.#S();const t=V(this.options.staleTime,this.#e);if(Ct.isServer()||this.#n.isStale||!ge(t))return;const s=Ds(this.#n.dataUpdatedAt,t)+1;this.#h=st.setTimeout(()=>{this.#n.isStale||this.updateResult()},s)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#v(t){this.#w(),this.#u=t,!(Ct.isServer()||j(this.options.enabled,this.#e)===!1||!ge(this.#u)||this.#u===0)&&(this.#f=st.setInterval(()=>{(this.options.refetchIntervalInBackground||ke.isFocused())&&this.#d()},this.#u))}#b(){this.#g(),this.#v(this.#y())}#S(){this.#h!==void 0&&(st.clearTimeout(this.#h),this.#h=void 0)}#w(){this.#f!==void 0&&(st.clearInterval(this.#f),this.#f=void 0)}createResult(t,e){const s=this.#e,n=this.options,i=this.#n,r=this.#r,a=this.#i,c=t!==s?t.state:this.#s,{state:u}=t;let l={...u},h=!1,f;if(e._optimisticResults){const w=this.hasListeners(),R=!w&&is(t,e),I=w&&rs(t,s,e,n);(R||I)&&(l={...l,...Qs(u.data,t.options)}),e._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:d}=l;f=l.data;let g=!1;if(e.placeholderData!==void 0&&f===void 0&&d==="pending"){let w;i?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(w=i.data,g=!0):w=typeof e.placeholderData=="function"?e.placeholderData(this.#p?.state.data,this.#p):e.placeholderData,w!==void 0&&(d="success",f=ve(i?.data,w,e),h=!0)}if(e.select&&f!==void 0&&!g)if(i&&f===r?.data&&e.select===this.#l)f=this.#c;else try{this.#l=e.select,f=e.select(f),f=ve(i?.data,f,e),this.#c=f,this.#o=null}catch(w){this.#o=w}this.#o&&(p=this.#o,f=this.#c,m=Date.now(),d="error");const y=l.fetchStatus==="fetching",b=d==="pending",P=d==="error",_=b&&y,C=f!==void 0,v={status:d,fetchStatus:l.fetchStatus,isPending:b,isSuccess:d==="success",isError:P,isInitialLoading:_,isLoading:_,data:f,dataUpdatedAt:l.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:l.dataUpdateCount>c.dataUpdateCount||l.errorUpdateCount>c.errorUpdateCount,isFetching:y,isRefetching:y&&!b,isLoadingError:P&&!C,isPaused:l.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:P&&C,isStale:Me(t,e),refetch:this.refetch,promise:this.#a,isEnabled:j(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const w=v.data!==void 0,R=v.status==="error"&&!w,I=E=>{R?E.reject(v.error):w&&E.resolve(v.data)},L=()=>{const E=this.#a=v.promise=be();I(E)},k=this.#a;switch(k.status){case"pending":t.queryHash===s.queryHash&&I(k);break;case"fulfilled":(R||v.data!==k.value)&&L();break;case"rejected":(!R||v.error!==k.reason)&&L();break}}return v}updateResult(){const t=this.#n,e=this.createResult(this.#e,this.options);if(this.#r=this.#e.state,this.#i=this.options,this.#r.data!==void 0&&(this.#p=this.#e),Wt(e,t))return;this.#n=e;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:n}=this.options,i=typeof n=="function"?n():n;if(i==="all"||!i&&!this.#m.size)return!0;const r=new Set(i??this.#m);return this.options.throwOnError&&r.add("error"),Object.keys(this.#n).some(a=>{const o=a;return this.#n[o]!==t[o]&&r.has(o)})};this.#P({listeners:s()})}#_(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#e)return;const e=this.#e;this.#e=t,this.#s=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#P(t){F.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#n)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function ri(t,e){return j(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&j(e.retryOnMount,t)===!1)}function is(t,e){return ri(t,e)||t.state.data!==void 0&&we(t,e,e.refetchOnMount)}function we(t,e,s){if(j(e.enabled,t)!==!1&&V(e.staleTime,t)!=="static"){const n=typeof s=="function"?s(t):s;return n==="always"||n!==!1&&Me(t,e)}return!1}function rs(t,e,s,n){return(t!==e||j(n.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&Me(t,s)}function Me(t,e){return j(e.enabled,t)!==!1&&t.isStaleByTime(V(e.staleTime,t))}function oi(t,e){return!Wt(t.getCurrentResult(),e)}var ai=class extends Ns{#t;#e;#s;#n;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||Ks(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#s.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#r({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=Us({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(r,a)=>{this.#r({type:"failed",failureCount:r,error:a})},onPause:()=>{this.#r({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const n=this.state.status==="pending",i=!this.#n.canStart();try{if(n)e();else{this.#r({type:"pending",variables:t,isPaused:i}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);const a=await this.options.onMutate?.(t,s);a!==this.state.context&&this.#r({type:"pending",context:a,variables:t,isPaused:i})}const r=await this.#n.start();return await this.#s.config.onSuccess?.(r,t,this.state.context,this,s),await this.options.onSuccess?.(r,t,this.state.context,s),await this.#s.config.onSettled?.(r,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(r,null,t,this.state.context,s),this.#r({type:"success",data:r}),r}catch(r){try{await this.#s.config.onError?.(r,t,this.state.context,this,s)}catch(a){Promise.reject(a)}try{await this.options.onError?.(r,t,this.state.context,s)}catch(a){Promise.reject(a)}try{await this.#s.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,s)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,r,t,this.state.context,s)}catch(a){Promise.reject(a)}throw this.#r({type:"error",error:r}),r}finally{this.#s.runNext(this)}}#r(t){const e=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),F.batch(()=>{this.#e.forEach(s=>{s.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function Ks(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ci=class extends bt{constructor(t={}){super(),this.config=t,this.#t=new Set,this.#e=new Map,this.#s=0}#t;#e;#s;build(t,e,s){const n=new ai({client:t,mutationCache:this,mutationId:++this.#s,options:t.defaultMutationOptions(e),state:s});return this.add(n),n}add(t){this.#t.add(t);const e=Mt(t);if(typeof e=="string"){const s=this.#e.get(e);s?s.push(t):this.#e.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#t.delete(t)){const e=Mt(t);if(typeof e=="string"){const s=this.#e.get(e);if(s)if(s.length>1){const n=s.indexOf(t);n!==-1&&s.splice(n,1)}else s[0]===t&&this.#e.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=Mt(t);if(typeof e=="string"){const n=this.#e.get(e)?.find(i=>i.state.status==="pending");return!n||n===t}else return!0}runNext(t){const e=Mt(t);return typeof e=="string"?this.#e.get(e)?.find(n=>n!==t&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){F.batch(()=>{this.#t.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(t){const e={exact:!0,...t};return this.getAll().find(s=>Xe(e,s))}findAll(t={}){return this.getAll().filter(e=>Xe(t,e))}notify(t){F.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return F.batch(()=>Promise.all(t.map(e=>e.continue().catch(M))))}};function Mt(t){return t.options.scope?.id}var ui=class extends bt{#t;#e=void 0;#s;#n;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#t.defaultMutationOptions(t),Wt(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),e?.mutationKey&&this.options.mutationKey&&it(e.mutationKey)!==it(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#i(t)}getCurrentResult(){return this.#e}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#r(),this.#i()}mutate(t,e){return this.#n=e,this.#s?.removeObserver(this),this.#s=this.#t.getMutationCache().build(this.#t,this.options),this.#s.addObserver(this),this.#s.execute(t)}#r(){const t=this.#s?.state??Ks();this.#e={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#i(t){F.batch(()=>{if(this.#n&&this.hasListeners()){const e=this.#e.variables,s=this.#e.context,n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#n.onSuccess?.(t.data,e,s,n)}catch(i){Promise.reject(i)}try{this.#n.onSettled?.(t.data,null,e,s,n)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#n.onError?.(t.error,e,s,n)}catch(i){Promise.reject(i)}try{this.#n.onSettled?.(void 0,t.error,e,s,n)}catch(i){Promise.reject(i)}}}this.listeners.forEach(e=>{e(this.#e)})})}},li=class extends bt{constructor(t={}){super(),this.config=t,this.#t=new Map}#t;build(t,e,s){const n=e.queryKey,i=e.queryHash??Ee(n,e);let r=this.get(i);return r||(r=new ni({client:t,queryKey:n,queryHash:i,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(n)}),this.add(r)),r}add(t){this.#t.has(t.queryHash)||(this.#t.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#t.get(t.queryHash);e&&(t.destroy(),e===t&&this.#t.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){F.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#t.get(t)}getAll(){return[...this.#t.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(s=>Ye(e,s))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(s=>Ye(t,s)):e}notify(t){F.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){F.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){F.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},bo=class{#t;#e;#s;#n;#r;#i;#a;#o;constructor(t={}){this.#t=t.queryCache||new li,this.#e=t.mutationCache||new ci,this.#s=t.defaultOptions||{},this.#n=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=ke.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#o=Ht.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=void 0)}isFetching(t){return this.#t.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#e.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#t.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=this.#t.build(this,e),n=s.state.data;return n===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(V(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(t){return this.#t.findAll(t).map(({queryKey:e,state:s})=>{const n=s.data;return[e,n]})}setQueryData(t,e,s){const n=this.defaultQueryOptions({queryKey:t}),r=this.#t.get(n.queryHash)?.state.data,a=Hn(e,r);if(a!==void 0)return this.#t.build(this,n).setData(a,{...s,manual:!0})}setQueriesData(t,e,s){return F.batch(()=>this.#t.findAll(t).map(({queryKey:n})=>[n,this.setQueryData(n,e,s)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#t.get(e.queryHash)?.state}removeQueries(t){const e=this.#t;F.batch(()=>{e.findAll(t).forEach(s=>{e.remove(s)})})}resetQueries(t,e){const s=this.#t;return F.batch(()=>(s.findAll(t).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const s={revert:!0,...e},n=F.batch(()=>this.#t.findAll(t).map(i=>i.cancel(s)));return Promise.all(n).then(M).catch(M)}invalidateQueries(t,e={}){return F.batch(()=>(this.#t.findAll(t).forEach(s=>{s.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const s={...e,cancelRefetch:e.cancelRefetch??!0},n=F.batch(()=>this.#t.findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let r=i.fetch(void 0,s);return s.throwOnError||(r=r.catch(M)),i.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(n).then(M)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=this.#t.build(this,e);return s.isStaleByTime(V(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(M).catch(M)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(M).catch(M)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return Ht.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#s}setDefaultOptions(t){this.#s=t}setQueryDefaults(t,e){this.#n.set(it(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#n.values()],s={};return e.forEach(n=>{yt(t,n.queryKey)&&Object.assign(s,n.defaultOptions)}),s}setMutationDefaults(t,e){this.#r.set(it(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#r.values()],s={};return e.forEach(n=>{yt(t,n.mutationKey)&&Object.assign(s,n.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#s.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Ee(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Te&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#s.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},qs=x.createContext(void 0),Ws=t=>{const e=x.useContext(qs);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},So=({client:t,children:e})=>(x.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),O.jsx(qs.Provider,{value:t,children:e})),Hs=x.createContext(!1),hi=()=>x.useContext(Hs);Hs.Provider;function fi(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var di=x.createContext(fi()),pi=()=>x.useContext(di),mi=(t,e,s)=>{const n=s?.state.error&&typeof t.throwOnError=="function"?Fe(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||n)&&(e.isReset()||(t.retryOnMount=!1))},gi=t=>{x.useEffect(()=>{t.clearReset()},[t])},yi=({result:t,errorResetBoundary:e,throwOnError:s,query:n,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&n&&(i&&t.data===void 0||Fe(s,[t.error,n])),vi=t=>{if(t.suspense){const s=i=>i==="static"?i:Math.max(i??1e3,1e3),n=t.staleTime;t.staleTime=typeof n=="function"?(...i)=>s(n(...i)):s(n),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},bi=(t,e)=>t.isLoading&&t.isFetching&&!e,Si=(t,e)=>t?.suspense&&e.isPending,os=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function wi(t,e,s){const n=hi(),i=pi(),r=Ws(),a=r.defaultQueryOptions(t);r.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const o=r.getQueryCache().get(a.queryHash),c=t.subscribed!==!1;a._optimisticResults=n?"isRestoring":c?"optimistic":void 0,vi(a),mi(a,i,o),gi(i);const u=!r.getQueryCache().get(a.queryHash),[l]=x.useState(()=>new e(r,a)),h=l.getOptimisticResult(a),f=!n&&c;if(x.useSyncExternalStore(x.useCallback(p=>{const m=f?l.subscribe(F.batchCalls(p)):M;return l.updateResult(),m},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),x.useEffect(()=>{l.setOptions(a)},[a,l]),Si(a,h))throw os(a,l,i);if(yi({result:h,errorResetBoundary:i,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw h.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(a,h),a.experimental_prefetchInRender&&!Ct.isServer()&&bi(h,n)&&(u?os(a,l,i):o?.promise)?.catch(M).finally(()=>{l.updateResult()}),a.notifyOnChangeProps?h:l.trackResult(h)}function wo(t,e){return wi(t,ii)}function _o(t,e){const s=Ws(),[n]=x.useState(()=>new ui(s,t));x.useEffect(()=>{n.setOptions(t)},[n,t]);const i=x.useSyncExternalStore(x.useCallback(a=>n.subscribe(F.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),r=x.useCallback((a,o)=>{n.mutate(a,o).catch(M)},[n]);if(i.error&&Fe(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:r,mutateAsync:i.mutate}}const _i=!1;var zs=x.useLayoutEffect;function Pi(t,e,s){x.useEffect(()=>{if(!t.current||s||typeof IntersectionObserver!="function")return()=>e();const n=new IntersectionObserver(i=>{e(i.pop())},{rootMargin:"100px"});return n.observe(t.current),()=>{n.disconnect(),e()}},[e,s,t])}function Ri(t){const e=x.useRef(null);return x.useImperativeHandle(t,()=>e.current,[]),e}function Lt(t){return t[t.length-1]}function xi(t){return typeof t=="function"}function vt(t,e){return xi(t)?t(e):t}const $s=Object.prototype.hasOwnProperty,Ci=Object.prototype.propertyIsEnumerable;function Vs(t){for(const e in t)if($s.call(t,e))return!0;return!1}const Li=()=>Object.create(null),tt=(t,e)=>nt(t,e,Li);function nt(t,e,s=()=>({}),n=0){if(t===e)return t;if(n>500)return e;const i=e,r=us(t)&&us(i);if(!r&&!(zt(t)&&zt(i)))return i;const a=r?t:as(t);if(!a)return i;const o=r?i:as(i);if(!o)return i;const c=a.length,u=o.length,l=r?new Array(u):s();let h=0;for(let f=0;f<u;f++){const p=r?f:o[f],m=t[p],d=i[p];if(m===d){l[p]=m,(r?f<c:$s.call(t,p))&&h++;continue}if(m===null||d===null||typeof m!="object"||typeof d!="object"){l[p]=d;continue}const g=nt(m,d,s,n+1);l[p]=g,g===m&&h++}return c===u&&h===c?t:l}function as(t){const e=Object.keys(t);if(e.length!==Object.getOwnPropertyNames(t).length)return!1;const s=Object.getOwnPropertySymbols(t);if(s.length===0)return e;for(const n of s){if(!Ci.call(t,n))return!1;e.push(n)}return e}function zt(t){if(!cs(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const s=e.prototype;return!(!cs(s)||!s.hasOwnProperty("isPrototypeOf"))}function cs(t){return Object.prototype.toString.call(t)==="[object Object]"}function us(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function G(t,e,s){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let n=0,i=t.length;n<i;n++)if(!G(t[n],e[n],s))return!1;return!0}if(zt(t)&&zt(e)){const n=s?.ignoreUndefined??!0;if(s?.partial){for(const a in e)if((!n||e[a]!==void 0)&&!G(t[a],e[a],s))return!1;return!0}let i=0;if(!n)i=Object.keys(t).length;else for(const a in t)t[a]!==void 0&&i++;let r=0;for(const a in e)if((!n||e[a]!==void 0)&&(r++,r>i||!G(t[a],e[a],s)))return!1;return i===r}return!1}const Oi=/[\x00-\x1f\x7f"<>`{}]/g;function Ii(t){return t.replace(Oi,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function ls(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return Ii(e)}const ki=["http:","https:","mailto:","tel:"];function $t(t,e){if(!t)return!1;try{const s=new URL(t);return!e.has(s.protocol)}catch{return!1}}function Pt(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};const e=/%25|%5C/gi;let s=0,n="",i;for(;(i=e.exec(t))!==null;)n+=ls(t.slice(s,i.index))+i[0],s=e.lastIndex;n=n+ls(s?t.slice(s):t);let r=!1;return n.startsWith("//")&&(r=!0,n="/"+n.replace(/^\/+/,"")),{path:n,handledProtocolRelativeURL:r}}function Ei(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function Ti(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++)if(t[s]!==e[s])return!1;return!0}function De(){throw new Error("Invariant failed")}function Vt(t){const e=new Map;let s,n;const i=r=>{r.next&&(r.prev?(r.prev.next=r.next,r.next.prev=r.prev,r.next=void 0,n&&(n.next=r,r.prev=n)):(r.next.prev=void 0,s=r.next,r.next=void 0,n&&(r.prev=n,n.next=r)),n=r)};return{get(r){const a=e.get(r);if(a)return i(a),a.value},set(r,a){if(e.size>=t&&s){const c=s;e.delete(c.key),c.next&&(s=c.next,c.next.prev=void 0),c===n&&(n=void 0)}const o=e.get(r);if(o)o.value=a,i(o);else{const c={key:r,value:a,prev:n};n&&(n.next=c),n=c,s||(s=c),e.set(r,c)}},clear(){e.clear(),s=void 0,n=void 0}}}const $=4,Gs=5;function Fi(t){const e=t.indexOf("{");if(e===-1)return null;const s=t.indexOf("}",e);return s===-1||e+1>=t.length?null:[e,s]}function Js(t,e,s=new Uint16Array(6)){const n=t.indexOf("/",e),i=n===-1?t.length:n,r=t.substring(e,i);if(!r||!r.includes("$"))return s[0]=0,s[1]=e,s[2]=e,s[3]=i,s[4]=i,s[5]=i,s;if(r==="$"){const o=t.length;return s[0]=2,s[1]=e,s[2]=e,s[3]=o,s[4]=o,s[5]=o,s}if(r.charCodeAt(0)===36)return s[0]=1,s[1]=e,s[2]=e+1,s[3]=i,s[4]=i,s[5]=i,s;const a=Fi(r);if(a){const[o,c]=a,u=r.charCodeAt(o+1);if(u===45){if(o+2<r.length&&r.charCodeAt(o+2)===36){const l=o+3,h=c;if(l<h)return s[0]=3,s[1]=e+o,s[2]=e+l,s[3]=e+h,s[4]=e+c+1,s[5]=i,s}}else if(u===36){const l=o+1,h=o+2;return h===c?(s[0]=2,s[1]=e+o,s[2]=e+l,s[3]=e+h,s[4]=e+c+1,s[5]=t.length,s):(s[0]=1,s[1]=e+o,s[2]=e+h,s[3]=e+c,s[4]=e+c+1,s[5]=i,s)}}return s[0]=0,s[1]=e,s[2]=e,s[3]=i,s[4]=i,s[5]=i,s}function te(t,e,s,n,i,r,a,o){o?.(s);let c=n;{const u=s.fullPath??s.from,l=s.options,h=u.length,f=l?.caseSensitive??t,p=l?.params?.parse??l?.parseParams;for(;c<h;){const d=Js(u,c,e);let g;const y=c,b=d[5];c=b+1,r++;const P=d[0];switch(P){case 0:{const _=u.substring(d[2],d[3]);let C=_,S;f?S=i.static??=new Map:(C=_.toLowerCase(),S=i.staticInsensitive??=new Map);const v=S.get(C);if(v)g=v;else{const w=dt(u);w.parent=i,w.depth=r,g=w,S.set(C,w)}break}case 1:case 3:case 2:{const _=u.substring(y,d[1]),C=u.substring(d[4],b),S=f&&!!(_||C),v=_?S?_:_.toLowerCase():void 0,w=C?S?C:C.toLowerCase():void 0,R=P===1?i.dynamic:P===3?i.optional:i.wildcard,I=P!==2&&!p&&R?.find(L=>!L.parse&&L.caseSensitive===S&&L.prefix===v&&L.suffix===w);if(I)g=I;else{const L=Mi(P,u,S,v,w);g=L,L.parent=i,L.depth=r;let k;P===1?k=i.dynamic??=[]:P===3?k=i.optional??=[]:k=i.wildcard??=[],k.push(L),k.length===2&&a?.push(k)}break}}i=g}if(p&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const d=dt(u);d.kind=Gs,d.parent=i,r++,d.depth=r,i.pathless??=[],i.pathless.push(d),i=d}const m=(s.path||!s.children)&&!s.isRoot;if(m&&u.endsWith("/")){const d=dt(u);d.kind=$,d.parent=i,r++,d.depth=r,i.index=d,i=d}i.parse=p??null,i.priority=l?.params?.priority??0,m&&!i.route&&(i.route=s,i.fullPath=u)}if(s.children)for(const u of s.children)te(t,e,u,c,i,r,a,o)}function Ys(t,e){if(t.parse&&!e.parse)return-1;if(!t.parse&&e.parse)return 1;if(t.parse&&e.parse&&(t.priority||e.priority))return e.priority-t.priority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}function dt(t){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0}}function Mi(t,e,s,n,i){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0,caseSensitive:s,prefix:n,suffix:i}}function Di(t,e){const s=dt("/"),n=new Uint16Array(6),i=[];for(const r of t)te(!1,n,r,1,s,0,i);for(const r of i)r.sort(Ys);e.masksTree=s,e.flatCache=Vt(1e3)}function Ai(t,e){t||="/";const s=e.flatCache.get(t);if(s)return s;const n=Ae(t,e.masksTree);return e.flatCache.set(t,n),n}function ji(t,e,s,n,i){t||="/",n||="/";const r=e?`case\0${t}`:t;let a=i.singleCache.get(r);return a||(a=dt("/"),te(e,new Uint16Array(6),{from:t},1,a,0),i.singleCache.set(r,a)),Ae(n,a,s)}function Bi(t,e,s=!1){const n=s?t:`nofuzz\0${t}`,i=e.matchCache.get(n);if(i!==void 0)return i;t||="/";let r;try{r=Ae(t,e.segmentTree,s)}catch(a){if(a instanceof URIError)r=null;else throw a}return r&&(r.branch=Zs(r.route)),e.matchCache.set(n,r),r}function Ui(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function Ni(t,e=!1,s){const n=dt(t.fullPath),i=new Uint16Array(6),r=[],a={},o={};let c=0;te(e,i,t,1,n,0,r,u=>{if(s?.(u,c),u.id in a&&De(),a[u.id]=u,c!==0&&u.path){const l=Ui(u.fullPath);(!o[l]||u.fullPath.endsWith("/"))&&(o[l]=u)}c++});for(const u of r)u.sort(Ys);return{processedTree:{segmentTree:n,singleCache:Vt(1e3),matchCache:Vt(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function Ae(t,e,s=!1){const n=t.split("/"),i=Ki(t,n,e,s);if(!i)return null;const[r]=Xs(t,n,i);return{route:i.node.route,rawParams:r}}function Xs(t,e,s){const n=Qi(s.node);let i=null;const r=Object.create(null);let a=s.extract?.part??0,o=s.extract?.node??0,c=s.extract?.path??0,u=s.extract?.segment??0;for(;o<n.length;a++,o++,c++,u++){const l=n[o];if(l.kind===$)break;if(l.kind===Gs){u--,a--,c--;continue}const h=e[a],f=c;if(h&&(c+=h.length),l.kind===1){i??=s.node.fullPath.split("/");const p=i[u],m=l.prefix?.length??0;if(p.charCodeAt(m)===123){const d=l.suffix?.length??0,g=p.substring(m+2,p.length-d-1),y=h.substring(m,h.length-d);r[g]=decodeURIComponent(y)}else{const d=p.substring(1);r[d]=decodeURIComponent(h)}}else if(l.kind===3){if(s.skipped&1<<o){a--,c=f-1;continue}i??=s.node.fullPath.split("/");const p=i[u],m=l.prefix?.length??0,d=l.suffix?.length??0,g=p.substring(m+3,p.length-d-1),y=l.suffix||l.prefix?h.substring(m,h.length-d):h;y&&(r[g]=decodeURIComponent(y))}else if(l.kind===2){const p=l,m=t.substring(f+(p.prefix?.length??0),t.length-(p.suffix?.length??0)),d=decodeURIComponent(m);r["*"]=d,r._splat=d;break}}return s.rawParams&&Object.assign(r,s.rawParams),[r,{part:a,node:o,path:c,segment:u}]}function Zs(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function Qi(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function Ki(t,e,s,n){if(t==="/"&&s.index)return{node:s.index,skipped:0};const i=!Lt(e),r=i&&t!=="/",a=e.length-(i?1:0),o=[{node:s,index:1,skipped:0,statics:0,dynamics:0,optionals:0}];let c=null,u=null;for(;o.length;){const l=o.pop(),{node:h,index:f,skipped:p,statics:m,dynamics:d,optionals:g}=l;let{extract:y,rawParams:b}=l;if(h.kind===2&&h.route&&!At(u,l))continue;if(h.parse){if(!hs(t,e,l))continue;b=l.rawParams,y=l.extract}n&&h.route&&h.kind!==$&&At(c,l)&&(c=l);const P=f===a;if(P&&(h.route&&(!r||h.kind===$||h.kind===2)&&At(u,l)&&(u=l),!h.optional&&!h.wildcard&&!h.index&&!h.pathless))continue;const _=P?void 0:e[f];let C;if(P&&h.index){const S={node:h.index,index:f,skipped:p,statics:m,dynamics:d,optionals:g,extract:y,rawParams:b};let v=!0;if(h.index.parse&&(hs(t,e,S)||(v=!1)),v){if(!d&&!g&&!p&&qi(m,a))return S;At(u,S)&&(u=S)}}if(h.wildcard)for(let S=h.wildcard.length-1;S>=0;S--){const v=h.wildcard[S],{prefix:w,suffix:R}=v;if(!(w&&(P||!(v.caseSensitive?_:C??=_.toLowerCase()).startsWith(w)))){if(R){if(P)continue;const I=e.slice(f).join("/").slice(-R.length);if((v.caseSensitive?I:I.toLowerCase())!==R)continue}o.push({node:v,index:a,skipped:p,statics:m,dynamics:d,optionals:g,extract:y,rawParams:b})}}if(h.optional){const S=p|1<<h.depth+1;for(let v=h.optional.length-1;v>=0;v--){const w=h.optional[v];o.push({node:w,index:f,skipped:S,statics:m,dynamics:d,optionals:g,extract:y,rawParams:b})}if(!P)for(let v=h.optional.length-1;v>=0;v--){const w=h.optional[v],{prefix:R,suffix:I}=w;if(R||I){const L=w.caseSensitive?_:C??=_.toLowerCase();if(R&&!L.startsWith(R)||I&&!L.endsWith(I))continue}o.push({node:w,index:f+1,skipped:p,statics:m,dynamics:d,optionals:g+Dt(a,f),extract:y,rawParams:b})}}if(!P&&h.dynamic&&_)for(let S=h.dynamic.length-1;S>=0;S--){const v=h.dynamic[S],{prefix:w,suffix:R}=v;if(w||R){const I=v.caseSensitive?_:C??=_.toLowerCase();if(w&&!I.startsWith(w)||R&&!I.endsWith(R))continue}o.push({node:v,index:f+1,skipped:p,statics:m,dynamics:d+Dt(a,f),optionals:g,extract:y,rawParams:b})}if(!P&&h.staticInsensitive){const S=h.staticInsensitive.get(C??=_.toLowerCase());S&&o.push({node:S,index:f+1,skipped:p,statics:m+Dt(a,f),dynamics:d,optionals:g,extract:y,rawParams:b})}if(!P&&h.static){const S=h.static.get(_);S&&o.push({node:S,index:f+1,skipped:p,statics:m+Dt(a,f),dynamics:d,optionals:g,extract:y,rawParams:b})}if(h.pathless)for(let S=h.pathless.length-1;S>=0;S--){const v=h.pathless[S];o.push({node:v,index:f,skipped:p,statics:m,dynamics:d,optionals:g,extract:y,rawParams:b})}}if(u)return u;if(n&&c){let l=c.index;for(let f=0;f<c.index;f++)l+=e[f].length;const h=l===t.length?"/":t.slice(l);return c.rawParams??=Object.create(null),c.rawParams["**"]=decodeURIComponent(h),c}return null}function Dt(t,e){return 2**(t-e-1)}function qi(t,e){return t===2**(e-1)-1}function hs(t,e,s){let n,i;try{[n,i]=Xs(t,e,s)}catch{return null}if(s.rawParams=n,s.extract=i,!s.node.parse)return!0;try{if(s.node.parse(n)===!1)return null}catch{}return!0}function At(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===$)>(t.node.kind===$)||e.node.kind===$==(t.node.kind===$)&&e.node.depth>t.node.depth))):!0}function Ut(t){return je(t.filter(e=>e!==void 0).join("/"))}function je(t){return t.replace(/\/{2,}/g,"/")}function tn(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function W(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}function en(t){return W(tn(t))}function Gt(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function Wi(t,e,s){return Gt(t,s)===Gt(e,s)}function Hi({base:t,to:e,trailingSlash:s="never",cache:n}){const i=e===".",r=e.startsWith("/");let a;if(n){a=r?e:i?t:t+"\0"+e;const u=n.get(a);if(u)return u}let o;if(i)o=t.split("/");else if(r)o=e.split("/");else{for(o=t.split("/");o.length>1&&Lt(o)==="";)o.pop();const u=e.split("/");for(let l=0,h=u.length;l<h;l++){const f=u[l];f===""?l?l===h-1&&o.push(f):o=[f]:f===".."?o.length>1?o.pop():o=[""]:f==="."||o.push(f)}}o.length>1&&(Lt(o)===""?s==="never"&&o.pop():s==="always"&&o.push(""));const c=je(o.join("/"))||"/";return a&&n&&n.set(a,c),c}function zi(t){const e=new Map(t.map(i=>[encodeURIComponent(i),i])),s=Array.from(e.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),n=new RegExp(s,"g");return i=>i.replace(n,r=>e.get(r)??r)}function ue(t,e,s){const n=e[t];return typeof n!="string"?n:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(n)?n:n.split("/").map(i=>ds(i,s)).join("/"):ds(n,s)}function fs({path:t,params:e,decoder:s,...n}){let i=!1;const r=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:r,isMissingParams:i};if(!t.includes("$"))return{interpolatedPath:t,usedParams:r,isMissingParams:i};const a=t.length;let o=0,c,u="";for(;o<a;){const l=o;c=Js(t,l,c);const h=c[5];if(o=h+1,l===h)continue;const f=c[0];if(f===0){u+="/"+t.substring(l,h);continue}if(f===2){const p=e._splat;r._splat=p,r["*"]=p;const m=t.substring(l,c[1]),d=t.substring(c[4],h);if(!p){i=!0,(m||d)&&(u+="/"+m+d);continue}const g=ue("_splat",e,s);u+="/"+m+g+d;continue}if(f===1){const p=t.substring(c[2],c[3]);!i&&!(p in e)&&(i=!0),r[p]=e[p];const m=t.substring(l,c[1]),d=t.substring(c[4],h),g=ue(p,e,s)??"undefined";u+="/"+m+g+d;continue}if(f===3){const p=t.substring(c[2],c[3]),m=e[p];if(m==null)continue;r[p]=m;const d=t.substring(l,c[1]),g=t.substring(c[4],h),y=ue(p,e,s)??"";u+="/"+d+y+g;continue}}return t.endsWith("/")&&(u+="/"),{usedParams:r,interpolatedPath:u||"/",isMissingParams:i}}function ds(t,e){const s=encodeURIComponent(t);return e?.(s)??s}function rt(t){return t?.isNotFound===!0}function $i(){try{return sessionStorage}catch{return}}const Vi="tsr-scroll-restoration-v1_3",sn=$i();function Gi(){try{return JSON.parse(sn?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function Ji(){try{sn?.setItem(Vi,JSON.stringify(ht))}catch{}}const ht=Gi(),ps="data-scroll-restoration-id",Yi=t=>t.state.__TSR_key||t.href;function Xi(t){const e=t.getAttribute(ps);if(e)return`[${ps}="${e}"]`;let s="",n=t,i;for(;i=n.parentNode;){let r=1,a=n;for(;a=a.previousElementSibling;)r++;const o=`${n.localName}:nth-child(${r})`;s=s?`${o} > ${s}`:o,n=i}return s}let jt=!1;const Nt="window";function _e(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function ms(t){const e=new Set;for(const s of t){if(s===Nt)continue;const n=_e(s);n&&e.add(n)}return e}function Zi(t,e){const s=t.options.scrollRestoration,n=t._scroll;s&&(n.restoring=!0);const i=t.options.getScrollRestorationKey||Yi,r=new Set,a=o=>{const c=ht[o]||={};for(const u of r)u===document?c[Nt]={scrollX,scrollY}:u.isConnected&&(c[Xi(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};s&&!n.restoration&&(n.restoration=!0,jt=!1,history.scrollRestoration="manual",document.addEventListener("scroll",o=>{jt||r.add(o.target)},!0),t.subscribe("onBeforeLoad",o=>{o.fromLocation&&a(i(o.fromLocation)),r.clear()}),addEventListener("pagehide",()=>{a(i(t.stores.resolvedLocation.get()??t.stores.location.get())),Ji()})),!n.reset&&(n.reset=!0,t.subscribe("onRendered",o=>{const c=t.options.scrollRestorationBehavior,u=t.options.scrollToTopSelectors,l=n.next,h=n.hash;let f;if(r.clear(),n.next=!0,n.hash=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;const p=i(o.toLocation),m=o.fromLocation&&i(o.fromLocation);if(n.restoring&&m&&m!==p){const d=ht[m];if(d){let g=ht[p];for(const y in d){if(y===Nt){if(l)continue}else{const b=_e(y);if(!b||l&&u&&(f??=ms(u),f.has(b)))continue}g||(g=ht[p]={}),g[y]??=d[y]}}}jt=!0;try{const d=o.toLocation.hash,g=o.toLocation.state.__hashScrollIntoViewOptions??!0;let y=!1;if(l){!d&&u&&(f??=ms(u));const b=d&&g&&h,P=n.restoring?ht[p]:void 0;if(P)for(const _ in P){const{scrollX:C,scrollY:S}=P[_];if(_===Nt){if(b)continue;scrollTo({top:S,left:C,behavior:c}),y=!0}else{const v=_e(_);v&&(v.scrollLeft=C,v.scrollTop=S,f?.delete(v))}}if(!d){const _={top:0,left:0,behavior:c};if(y||scrollTo(_),f)for(const C of f)C.scrollTo(_)}}!y&&d&&g&&document.getElementById(d)?.scrollIntoView(g)}finally{jt=!1}}))}function tr(t,e=String){const s=new URLSearchParams;for(const n in t){const i=t[n];i!==void 0&&s.set(n,e(i))}return s.toString()}function le(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function er(t){const e=new URLSearchParams(t),s=Object.create(null);for(const[n,i]of e.entries()){const r=s[n];r==null?s[n]=le(i):Array.isArray(r)?r.push(le(i)):s[n]=[r,le(i)]}return s}const sr=/^(?:\s|["[{\d-]|fa|nu|tr)/,nr=rr(JSON.parse),ir=or(JSON.stringify,JSON.parse);function rr(t){return e=>{e[0]==="?"&&(e=e.substring(1));const s=er(e);for(const n in s){const i=s[n];if(typeof i=="string")try{s[n]=t(i)}catch{}}return s}}function or(t,e){const s=e===JSON.parse;function n(i){if(i&&typeof i=="object")try{return t(i)}catch{}else if(e&&typeof i=="string"){if(s&&!sr.test(i))return i;try{return e(i),t(i)}catch{}}return i}return i=>{const r=tr(i,n);return r?`?${r}`:""}}const pt="__root__";function ar(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}const e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);const s=new Response(null,{status:t.statusCode,headers:e});if(s.options=t,t.throw)throw s;return s}function Be(t){return t instanceof Response&&!!t.options}function cr(t){return{input:({url:e})=>{for(const s of t)e=Pe(s,e);return e},output:({url:e})=>{for(let s=t.length-1;s>=0;s--)e=nn(t[s],e);return e}}}function ur(t){const e=en(t.basepath),s=`/${e}`,n=t.caseSensitive?s:s.toLowerCase(),i=`${n}/`;return{input:({url:r})=>{const a=t.caseSensitive?r.pathname:r.pathname.toLowerCase();return a===n?r.pathname="/":a.startsWith(i)&&(r.pathname=r.pathname.slice(s.length)),r},output:({url:r})=>(r.pathname=Ut(["/",e,r.pathname]),r)}}function Pe(t,e){const s=t?.input?.({url:e});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return e}function nn(t,e){const s=t?.output?.({url:e});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return e}function lr(t,e){const{createMutableStore:s,createReadonlyStore:n,batch:i}=e,r=new Map,a=s("idle"),o=s(t),c=s(void 0),u=s([]),l=n(()=>u.get().map(d=>r.get(d).get())),h=n(()=>({status:a.get(),isLoading:a.get()==="pending",matches:l.get(),location:o.get(),resolvedLocation:c.get()}));function f(d){let g=r.get(d);return g||(g=s(void 0),r.set(d,g)),g}const p={status:a,location:o,resolvedLocation:c,ids:u,matches:l,byRoute:r,__store:h,getMatchStore:f,setMatches:m};function m(d){const g=u.get(),y=d.map(b=>b.routeId);i(()=>{Ti(g,y)||u.set(y);for(const b of g)y.includes(b)||r.get(b).set(()=>{});for(const b of d){const P=f(b.routeId);P.get()!==b&&P.set(b)}})}return p}var J="__TSR_index",gs="popstate",ys="beforeunload";function hr(t){let e=t.getLocation();const s=new Set,n=a=>{e=t.getLocation(),s.forEach(o=>o({location:e,action:a}))},i=a=>{t.notifyOnIndexChange??!0?n(a):e=t.getLocation()},r=async({task:a,navigateOpts:o,...c})=>{if(o?.ignoreBlocker??!1){a();return}const u=t.getBlockers?.()??[],l=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&u.length&&l)for(const h of u){const f=Jt(c.path,c.state);if(await h.blockerFn({currentLocation:e,nextLocation:f,action:c.type})){t.onBlocked?.();return}}a()};return{get location(){return e},get length(){return t.getLength()},subscribers:s,subscribe:a=>(s.add(a),()=>{s.delete(a)}),push:(a,o,c)=>{const u=e.state[J];o=vs(u+1,o),r({task:()=>{t.pushState(a,o),n({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:o})},replace:(a,o,c)=>{const u=e.state[J];o=vs(u,o),r({task:()=>{t.replaceState(a,o),n({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:o})},go:(a,o)=>{r({task:()=>{t.go(a),i({type:"GO",index:a})},navigateOpts:o,type:"GO"})},back:a=>{r({task:()=>{t.back(a?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{r({task:()=>{t.forward(a?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>e.state[J]!==0,createHref:a=>t.createHref(a),block:a=>{if(!t.setBlockers)return()=>{};const o=t.getBlockers?.()??[];return t.setBlockers([...o,a]),()=>{const c=t.getBlockers?.()??[];t.setBlockers?.(c.filter(u=>u!==a))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:n}}function vs(t,e){e||(e={});const s=Ue();return{...e,key:s,__TSR_key:s,[J]:t}}function fr(t){const e=typeof document<"u"?window:void 0,s=e.history.pushState,n=e.history.replaceState;let i=[];const r=()=>i,a=v=>i=v,o=(v=>v),c=(()=>Jt(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const v=Ue();e.history.replaceState({[J]:0,key:v,__TSR_key:v},"")}let u=c(),l,h=!1,f=!1,p=!1,m=!1;const d=()=>u;let g;const y=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?e.history.pushState:e.history.replaceState)(g[1],"",g[0]),S._ignoreSubscribers=!1,g=void 0,l=void 0)},b=(v,w,R)=>{const I=o(w),L=!!g;L||(l=u),u=Jt(w,R),g=[I,R,g?.[2]||v],L||queueMicrotask(()=>y())},P=v=>{u=c(),S.notify({type:v})},_=async()=>{if(f){f=!1;return}const v=c(),w=v.state[J]-u.state[J],R=w===1,I=w===-1,L=!R&&!I||h;h=!1;const k=L?"GO":I?"BACK":"FORWARD",E=L?{type:"GO",index:w}:{type:I?"BACK":"FORWARD"};if(p)p=!1;else{const St=r();if(typeof document<"u"&&St.length){for(const N of St)if(await N.blockerFn({currentLocation:u,nextLocation:v,action:k})){f=!0,e.history.go(1),S.notify(E);return}}}u=c(),S.notify(E)},C=v=>{if(m){m=!1;return}let w=!1;const R=r();if(typeof document<"u"&&R.length)for(const I of R){const L=I.enableBeforeUnload??!0;if(L===!0){w=!0;break}if(typeof L=="function"&&L()===!0){w=!0;break}}if(w)return v.preventDefault(),v.returnValue=""},S=hr({getLocation:d,getLength:()=>e.history.length,pushState:(v,w)=>b(!0,v,w),replaceState:(v,w)=>b(!1,v,w),back:v=>(v&&(p=!0),m=!0,e.history.back()),forward:v=>{v&&(p=!0),m=!0,e.history.forward()},go:v=>{h=!0,e.history.go(v)},createHref:v=>o(v),flush:y,destroy:()=>{e.history.pushState=s,e.history.replaceState=n,e.removeEventListener(ys,C,{capture:!0}),e.removeEventListener(gs,_)},onBlocked:()=>{l&&u!==l&&(u=l)},getBlockers:r,setBlockers:a,notifyOnIndexChange:!1});return e.addEventListener(ys,C,{capture:!0}),e.addEventListener(gs,_),e.history.pushState=function(...v){const w=s.apply(e.history,v);return S._ignoreSubscribers||P("PUSH"),w},e.history.replaceState=function(...v){const w=n.apply(e.history,v);return S._ignoreSubscribers||P("REPLACE"),w},S}function dr(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function Jt(t,e){const s=dr(t),n=s.indexOf("#"),i=s.indexOf("?"),r=Ue();return{href:s,pathname:s.substring(0,n>0?i>0?Math.min(n,i):n:i>0?i:s.length),hash:n>-1?s.substring(n):"",search:i>-1?s.slice(i,n===-1?void 0:n):"",state:e||{[J]:0,key:r,__TSR_key:r}}}function Ue(){return(Math.random()+1).toString(36).substring(7)}function bs(t){return t.options.loader||t.options.beforeLoad||t.lazyFn||t.options.component?.preload||t.options.pendingComponent?.preload}function ee(t,e){return{fromLocation:e,toLocation:t,pathChanged:e?.pathname!==t.pathname,hrefChanged:e?.href!==t.href,hashChanged:e?.hash!==t.hash}}function Ss({key:t,__TSR_key:e,__TSR_index:s,__hashScrollIntoViewOptions:n,...i}){return i}function pr(t,e,s,n){for(const i of e){if(n?.()===!1)return;s.some(r=>r.routeId===i.routeId)||t.routesById[i.routeId].options.onLeave?.(i)}for(const i of s){if(n?.()===!1)return;t.routesById[i.routeId].options[e.some(r=>r.routeId===i.routeId)?"onStay":"onEnter"]?.(i)}}var mr=class{constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async s=>(s(),!1),this.update=s=>{const n=this.options,i=this.basepath??n?.basepath??"/",r=this.basepath===void 0,a=n?.rewrite;if(this.options={...n,...s},this.isServer=this.options.isServer??_i??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=zi(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=fr()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let u;this.resolvePathCache=Vt(1e3),u=this.buildRouteTree(),this.setRoutes(u)}if(!this.stores&&this.latestLocation){const u=this.getStoreConfig(this);this.batch=u.batch,this.stores=lr(this.latestLocation,u),Zi(this)}const o=this.options.basepath??"/",c=this.options.rewrite;if(r||i!==o||a!==c){this.basepath=o;const u=[],l=en(o);l&&l!=="/"&&u.push(ur({basepath:o})),c&&u.push(c),this.rewrite=u.length===0?void 0:u.length===1?u[0]:cr(u),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const s=Ni(this.routeTree,this.options.caseSensitive,(n,i)=>{n.init({originalIndex:i})});return this.options.routeMasks&&Di(this.options.routeMasks,s.processedTree),s},this.subscribe=(s,n)=>{const i={eventType:s,fn:n};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=s=>{for(const n of this.subscribers)if(n.eventType===s.type)try{n.fn(s)}catch(i){console.error(i)}},this.parseLocation=(s,n)=>{const i=({pathname:c,search:u,hash:l,href:h,state:f})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const y=this.options.parseSearch(u),b=this.options.stringifySearch(y);return{href:c+b+l,publicHref:c+b+l,pathname:Pt(c).path,external:!1,searchStr:b,search:tt(n?.search,y),hash:Pt(l.slice(1)).path,state:nt(n?.state,f)}}const p=new URL(h,this.origin),m=Pe(this.rewrite,p),d=this.options.parseSearch(m.search),g=this.options.stringifySearch(d);return m.search=g,{href:m.href.replace(m.origin,""),publicHref:h,pathname:Pt(m.pathname).path,external:!!this.rewrite&&m.origin!==this.origin,searchStr:g,search:tt(n?.search,d),hash:Pt(m.hash.slice(1)).path,state:nt(n?.state,f)}},r=i(s),{__tempLocation:a,__tempKey:o}=r.state;if(a&&(!o||o===this.tempLocationKey)){const c=i(a);return c.state.key=r.state.key,c.state.__TSR_key=r.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:r}}return r},this.resolvePathWithBase=(s,n)=>Hi({base:s,to:n.includes("//")?je(n):n,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(s,n,i)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:n},i):this.matchRoutesInternal(s,n),this.getMatchedRoutes=s=>{const n=Object.create(null),i=Bi(W(s),this.processedTree,!0);return i&&Object.assign(n,i.rawParams),[i?.branch||[this.routesById.__root__],n,i?.route]},this.buildLocation=s=>{const n=(r={})=>{const a=r._fromLocation||this._pendingLocation||this.latestLocation,o=this.matchRoutesLightweight(a);r.from;const c=r.unsafeRelative==="path"?a.pathname:r.from??o[1],u=r.to?`${r.to}`:void 0,l=o[2],h=Object.assign(Object.create(null),o[3]),f=u?.charCodeAt(0)===47?"/":this.resolvePathWithBase(c,"."),p=u?this.resolvePathWithBase(f,u):f,m=ws(r.params,h),d=this.routesByPath[W(p)];let g;if(d)g=this.getRouteBranch(d);else if(p.includes("$"))g=[];else{const[L,k,E]=this.getMatchedRoutes(p);g=L,this.options.notFoundRoute&&(!E||E.path!=="/"&&k["**"])&&(g=[...g,this.options.notFoundRoute])}if(g.length&&Vs(m))for(const L of g){const k=L.options.params?.stringify??L.options.stringifyParams;if(k)try{Object.assign(m,k(m))}catch{}}const y=s.leaveParams?p:Pt(fs({path:p,params:m,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let b=l;if(s._includeValidateSearch&&this.options.search?.strict){const L={};g.forEach(k=>{if(k.options.validateSearch)try{Object.assign(L,Qt(k.options.validateSearch,{...L,...b}))}catch{}}),b=L}b=yr(b,r,g,s._includeValidateSearch),b=tt(l,b);const P=this.options.stringifySearch(b),_=r.hash===!0?a.hash:r.hash?vt(r.hash,a.hash):void 0,C=_?`#${_}`:"";let S=r.state===!0?a.state:r.state?vt(r.state,a.state):{};S=nt(a.state,S);const v=`${y}${P}${C}`;let w,R,I=!1;if(this.rewrite){const L=new URL(v,this.origin),k=nn(this.rewrite,L);w=L.href.replace(L.origin,""),k.origin!==this.origin?(R=k.href,I=!0):R=k.pathname+k.search+k.hash}else w=Ei(v),R=w;return{publicHref:R,href:w,pathname:y,search:b,searchStr:P,state:S,hash:_??"",external:I,unmaskOnReload:r.unmaskOnReload}},i=(r={},a)=>{const o=n(r);let c=a?n(a):void 0;if(!c){const u=Object.create(null);if(this.options.routeMasks){const l=Ai(o.pathname,this.processedTree);if(l){Object.assign(u,l.rawParams);const{from:h,params:f,...p}=l.route,m=ws(f,u);a={from:s.from,...p,params:m},c=n(a)}}}return c&&(o.maskedLocation=c),o};return s.mask?i(s,{from:s.from,...s.mask}):i(s)},this.commitLocation=async({viewTransition:s,ignoreBlocker:n,...i})=>{let r;const a=W(this.latestLocation.href)===W(i.href)&&G(Ss(i.state),Ss(this.latestLocation.state)),o=this._commitPromise;let c;const u=new Promise(l=>{c=l});if(u.resolve=()=>{c(),o?.resolve()},this._commitPromise=u,a)this.load();else{let{maskedLocation:l,hashScrollIntoView:h,...f}=i;l&&(f={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...f,search:f.searchStr,state:{...f.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(f.unmaskOnReload??this.options.unmaskOnReload??!1)&&(f.state.__tempKey=this.tempLocationKey)),f.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,r=i.replace?"REPLACE":"PUSH",this.history[r==="REPLACE"?"replace":"push"](f.publicHref,f.state,{ignoreBlocker:n}),this.history.subscribers.size||this.load({action:{type:r}})}return this._scroll.next=i.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:s,resetScroll:n,hashScrollIntoView:i,viewTransition:r,ignoreBlocker:a,_redirects:o,href:c,...u}={})=>{if(c){const f=this.history.location.state.__TSR_index,p=Jt(c,{__TSR_index:s?f:f+1}),m=new URL(p.pathname,this.origin);u.to=Pe(this.rewrite,m).pathname,u.search=this.options.parseSearch(p.search),u.hash=p.hash.slice(1)}const l=this.buildLocation({...u,_includeValidateSearch:!0});o&&(l._redirects=o),this._pendingLocation=l;const h=this.commitLocation({...l,viewTransition:r,replace:s,resetScroll:n,hashScrollIntoView:i,ignoreBlocker:a});return queueMicrotask(()=>{this._pendingLocation===l&&(this._pendingLocation=void 0)}),h},this.navigate=async({to:s,reloadDocument:n,href:i,publicHref:r,...a})=>{let o=!1;if(i)try{new URL(`${i}`),o=!0}catch{}if(o&&!n&&(n=!0),n){if(s!==void 0||!i){const u=this.buildLocation({to:s,...a});i=i??u.publicHref,r=r??u.publicHref}const c=!o&&r?r:i;if($t(c,this.protocolAllowlist))return;if(!a.ignoreBlocker){const u=this.history.getBlockers?.()??[];for(const l of u)if(l?.blockerFn&&await l.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(c):window.location.href=c;return}return this.buildAndCommitLocation({...a,href:i,to:s,_isNavigate:!0})},this.load=async s=>{this.updateLatestLocation(),s?.action&&(this._scroll.hash=s.action.type==="PUSH"||s.action.type==="REPLACE"),await Cr(this,s)},this.startViewTransition=s=>{const n=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,n&&typeof document.startViewTransition=="function"){let i;if(typeof n=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){const r=this.latestLocation,a=this.stores.resolvedLocation.get(),o=typeof n.types=="function"?n.types(ee(r,a)):n.types;if(o===!1)return s();i={update:s,types:o}}else i=s;return document.startViewTransition(i).updateCallbackDone}return s()},this.invalidate=s=>{const n=this._committed,i=s?.filter,r=this._preloads,a=new Set([...n,...this._cache.values(),...[...r?.values()??[]].flat(),...this._tx?.[3]??[]].filter(u=>!i||i(u)).map(u=>u.id)),o=[];for(const[u,l]of r??[])l.some(h=>a.has(h.id))&&(r.delete(u),o.push(u));const c=u=>{if(a.has(u.id)){const l=this.routesById[u.routeId],h={...u,invalid:!0,...(s?.forcePending||u.status==="error"||u.status==="notFound")&&bs(l)?{status:"pending",error:void 0}:void 0};return u._flight=void 0,h}return u};this._committed=n.map(c);for(const[u,l]of this._cache)a.has(u)&&(l.invalid=!0,s?.forcePending&&(l.status="pending"));for(const u of a)this._flights?.delete(u);for(const u of o)u.abort();return this.shouldViewTransition=!1,this.load({sync:s?.sync})},this.resolveRedirect=s=>{const n=s.headers.get("Location");if(!s.options.href||s.options._builtLocation){const i=(s.options._builtLocation??this.buildLocation(s.options)).publicHref||"/";s.options.href=i,s.headers.set("Location",i)}else if(n)try{const i=new URL(n);if(this.origin&&i.origin===this.origin){const r=i.pathname+i.search+i.hash;s.options.href=r,s.headers.set("Location",r)}}catch{}if(s.options.href&&!s.options._builtLocation&&$t(s.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return s.headers.get("Location")||s.headers.set("Location",s.options.href),s},this.clearCache=s=>{const n=this._cache,i=this._preloads,r=s?.filter,a=[],o=[];for(const[u,l]of n)(!r||r(l))&&(o.push(u),a.push(l));const c=[];for(const[u,l]of i??[])(!r||l.some(r))&&(c.push(u),a.push(...l));for(const u of o)n.delete(u);for(const u of c)i.delete(u);for(const u of a){const l=u._flight;u._flight=void 0,l&&!--l[2]&&(this._flights?.get(u.id)===l&&this._flights.delete(u.id),c.push(l[1]))}for(const u of c)u.abort()},this.loadRouteChunk=mt,this.preloadRoute=s=>mn(this,s),this.matchRoute=(s,n)=>{const i={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},r=this.buildLocation(i),a=this.stores.status.get()==="pending";if(n?.pending&&!a)return!1;const o=n?.pending??!a?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=ji(r.pathname,n?.caseSensitive??!1,n?.fuzzy??!1,o.pathname,this.processedTree);return!c||s.params&&!G(c.rawParams,s.params,{partial:!0})?!1:n?.includeSearch??!0?G(o.search,r.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.getStoreConfig=e,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??ir,parseSearch:t.parseSearch??nr,protocolAllowlist:t.protocolAllowlist??ki}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:t,routesByPath:e,processedTree:s}){this.routesById=t,this.routesByPath=e,this.processedTree=s;const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999}),this.routesById[n.id]=n)}getRouteBranch(t){let e=this.routeBranchCache.get(t);return e||(e=Zs(t),this.routeBranchCache.set(t,e)),e}matchRoutesInternal(t,e){const[s,n,i]=this.getMatchedRoutes(t.pathname);let r=s,a=!1;(i?i.path!=="/"&&n["**"]:W(t.pathname))&&(this.options.notFoundRoute?r=[...r,this.options.notFoundRoute]:a=!0);const o=a?vr(this.options.notFoundMode,r):void 0,c=new Array(r.length),u=this._committed,l=(f,p)=>{const m=u[p];return m?.routeId===f.id?m:f===this.options.notFoundRoute?u.find(d=>d.routeId===f.id):void 0};let h;for(let f=0;f<r.length;f++){const p=r[f],m=c[f-1];let d,g,y;{const E=m?.search??t.search,St=m?._strictSearch??void 0;try{const N=Qt(p.options.validateSearch,{...E})??void 0;d={...E,...N},g={...St,...N}}catch(N){let Et=N;if(N instanceof Yt||(Et=new Yt(N.message,{cause:N})),e?.throwOnError)throw Et;d=E,g={},y=Et}}let b="",P="";try{b=p.options.loaderDeps?.({search:d})??"",P=b&&JSON.stringify(b)||""}catch(E){if(e?.throwOnError)throw E;y??=E}const{interpolatedPath:_,usedParams:C}=fs({path:p.fullPath,params:n,decoder:this.pathParamsDecoder,server:this.isServer}),S=p.id+_+P,v=l(p,f),w=this._cache.get(S)??(v?.id===S?v:void 0);h=w?._strictParams??Object.assign(C,h);let R;if(!w)try{_s(p,h)}catch(E){if(rt(E)||Be(E)?R=E:R=new gr(E.message,{cause:E}),e?.throwOnError)throw R}const I=v?"stay":"enter";let L;if(w)L={...w,cause:I,search:tt(v?v.search:w.search,d),_strictSearch:g,searchError:y};else{const E=bs(p)?"pending":"success";L={id:S,ssr:p.options.ssr,index:f,routeId:p.id,params:v?.params??h,_strictParams:h,pathname:_,updatedAt:Date.now(),search:v?tt(v.search,d):d,_strictSearch:g,searchError:y,status:E,isFetching:!1,error:void 0,paramsError:R,context:{},abortController:e?._controller??new AbortController,cause:I,loaderDeps:v?nt(v.loaderDeps,b):b,invalid:!1,preload:!1,staticData:p.options.staticData||{},fullPath:p.fullPath}}const k=o===p.id;L._notFound&&!k&&(L.error=void 0),L._notFound=k,c[f]=L}for(let f=0;f<c.length;f++){const p=c[f];p.params=p.cause==="stay"?tt(p.params,h):h,e?._controller&&(p.context={})}return c}matchRoutesLightweight(t){const e=Lt(this.stores.ids.get()),s=e?this.stores.byRoute.get(e).get():void 0,n=s?.id,i=this.lightweightCache.get(t);if(i&&i[0]===n)return i[1];const[r,a]=this.getMatchedRoutes(t.pathname),o=Lt(r),c={...t.search};for(const f of r)try{Object.assign(c,Qt(f.options.validateSearch,c))}catch{}const u=s&&s.routeId===o.id&&s.pathname===t.pathname;let l;if(u)l=s.params;else{const f=Object.assign(Object.create(null),a);for(const p of r)try{_s(p,f)}catch{}l=f}const h=[r,o.fullPath,c,l];return this.lightweightCache.set(t,[n,h]),h}},Yt=class extends Error{},gr=class extends Error{};function Qt(t,e){if(t==null)return{};if("~standard"in t){const s=t["~standard"].validate(e);if(s instanceof Promise)throw new Yt("Async validation not supported");if(s.issues)throw new Yt(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}function yr(t,e,s,n){const i=[];for(const a of s){const o=a.options;if("search"in o)o.search?.middlewares&&i.push(...o.search.middlewares);else if(o.preSearchFilters||o.postSearchFilters){const u=({search:l,next:h})=>{const f=h(o.preSearchFilters?o.preSearchFilters.reduce((p,m)=>m(p),l):l);return o.postSearchFilters?o.postSearchFilters.reduce((p,m)=>m(p),f):f};i.push(u)}const c=o.validateSearch;if(c){const u=({search:l,next:h,meta:f})=>{const p=h(l);if(n)try{const m=Qt(c,p);if(f&&m)for(const d in m)d in p||(f.defaulted||=new Map).set(d,m[d]);return{...p,...m}}catch{}return p};i.push(u)}}const r=(a,o,c)=>{if(a>=i.length){if(!e.search)return{};if(e.search===!0)return o;const l=vt(e.search,o);return c&&(c.explicit=l),l}const u=(l,h)=>{if(h){const f=c||{};return{search:r(a+1,l,f),meta:f}}return r(a+1,l,c)};return i[a]({search:o,next:u,meta:c})};return r(0,t)}function vr(t,e){if(t!=="root"){let s;for(let n=e.length-1;n>=0;n--){const i=e[n];if(i.options.notFoundComponent)return i.id;s||=i.children&&i.id}if(s)return s}return pt}function ws(t,e){return t===!1||t===null?Object.create(null):(t??!0)===!0?e:Object.assign(e,vt(t,e))}function _s(t,e){const s=t.options.params?.parse??t.options.parseParams;s&&Object.assign(e,s(e))}function Re(t,e){return t.options[e]?.preload?.()}function br(t,e){const s=Re(t,"component"),n=Re(t,"pendingComponent"),i=e&&n?n.then(e):n;return e&&!n&&e(),s&&i?Promise.all([s,i]).then(()=>{}):s??i}function mt(t,e,s){const n=()=>e===!1?void 0:e?Re(t,e):br(t,s),i=t._lazy;if(i)return i===!0?n():i.then(n);if(!t.lazyFn)return n();const r=t.lazyFn().then(a=>{{const{id:o,...c}=a.options;Object.assign(t.options,c),t._lazy=!0}},a=>{throw t._lazy=void 0,a});return t._lazy=r,r.then(n)}function rn(t){const e=t.findIndex(s=>s.status!=="success"||s._notFound)+1;return e&&e<t.length?t.slice(0,e):t}const K=0,Y=1,se=2,B=3,ot=4;function Ot(t){return typeof t[0]=="number"}function X(t,e){return e.aborted?Promise.race([Promise.reject(e),t]):new Promise((s,n)=>{const i=()=>n(e);e.addEventListener("abort",i,{once:!0}),Promise.resolve(t).then(s,n).finally(()=>e.removeEventListener("abort",i))})}function at(t,e){return t.routesById[e.routeId]}function It(t,e,s){return Be(t)?[B,t]:rt(t)?(t.routeId||=s,[se,t]):(e&&typeof t?.then=="function"&&(t=new Error("A Promise was thrown",{cause:t})),e?[Y,t]:[K,t])}function on(t,e){let s=It(e,!0,t.id);if(s[0]!==Y)return s;try{t.options.onError?.(s[1])}catch(n){s=It(n,!0,t.id)}return s}function Rt(t,e,s){return s[0].signal.aborted||!s[2]()?(s[0].abort(),[ot]):on(t,e)}function an(t,e){return s=>t.navigate({...s,_fromLocation:e})}async function Sr(t,e,s,n,i,r){const[a,o]=e,c=s[0].signal,u=!!s[4];for(let l=s[7]??0;l<n;l++){const h=o[l],f=at(t,h);h.abortController=s[0];const p=o[l-1]?.context??t.options.context??{},m={params:h.params,location:a,navigate:an(t,a),buildLocation:t.buildLocation,cause:u?"preload":h.cause,abortController:s[0],preload:u,matches:o,routeId:f.id};let d=p;try{let _=h._ctx;!_&&f.options.context&&(_=h._ctx=f.options.context({...m,deps:h.loaderDeps,context:p})||{}),d={...p,..._},h.context=d}catch(_){return H(t,h),[l,Rt(f,_,s)]}if(c.aborted||!s[2]())return s[0].abort(),[l,[ot]];const g=h.paramsError??h.searchError;if(g!==void 0)return H(t,h),[l,Rt(f,g,s)];const y=f.options.beforeLoad;if(!y)continue;const b={...m,search:h.search,context:d,...t.options.additionalContext},P=h.status;P==="success"&&l>=r&&(h.status="pending"),s[8]?.();try{kt(t,h,"beforeLoad",s[0]);const _=await X(y(b),c);if(!s[2]())return s[0].abort(),[l,[ot]];const C=It(_,!1,f.id);if(C[0]!==K)return H(t,h),[l,C];h.context={...d,..._}}catch(_){return H(t,h),[l,Rt(f,_,s)]}finally{P==="success"&&h.status==="pending"&&(h.status="success"),kt(t,h,!1,s[0])}}i()}function Ne(t,e,s){if(!(!s||--s[2])){if(t._flights?.get(e.id)===s){const n=t._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(e)&&n[3].some(i=>i.id===e.id)&&n[3].some(i=>i.isFetching==="beforeLoad"))return;t._flights.delete(e.id)}return s[1]}}function H(t,e){const s=e._flight;e._flight=void 0,Ne(t,e,s)?.abort()}function A(t,e,s,n){const i=[];for(const r of e)if(!s?.includes(r)){const a=r._flight;if(r._flight=void 0,n&&a?.[2]===1&&t._flights?.get(r.id)===a&&s?.some(o=>o.id===r.id))a[2]=0;else{const o=Ne(t,r,a);o&&i.push(o)}}for(const r of i)r.abort()}function Qe(t){for(const e of t){const s=e._flight;s&&s[2]++}}function kt(t,e,s,n){if(e.isFetching=s,n&&t._tx?.[0]!==n)return;const i=t.stores.byRoute.get(e.routeId),r=i?.get();r?.id===e.id&&i.set({...r,isFetching:s})}function cn(t,e,s,n,i,r,a){const o=e[0];return{params:s.params,location:o,navigate:an(t,o),cause:a?"preload":s.cause,abortController:i,preload:a,deps:s.loaderDeps,parentMatchPromise:r,context:s.context,route:n,...t.options.additionalContext}}async function Ps(t,e,s,n,i,r,a,o){const c=o.signal;if(c.aborted)return[ot];if(!i)return[K,void 0];let u=s._flight;kt(t,s,"loader",o);try{if(!u){const l=new AbortController;u=[Promise.resolve().then(()=>i(cn(t,e,s,n,l,r,a))).then(h=>It(h,!1,n.id),h=>It(h,!0,n.id)).then(h=>(h[0]!==K&&t._flights?.get(s.id)===u&&(t._flights.delete(s.id),u[2]||l.abort()),h[0]===Y&&u[2]?on(n,h[1]):h)),l,1],(t._flights??=new Map).set(s.id,u)}return s._flight=u,s.abortController=u[1],await X(u[0],c)}catch(l){if(l!==c)throw l;return H(t,s),[ot]}finally{kt(t,s,!1,o)}}function Rs(t,e,s){e[0]===K?(t.loaderData=e[1],t.error=void 0,t.status="success",t.invalid=!1,t.updatedAt=Date.now(),t.preload=s):e[0]!==B&&(t.status="success",t.error=void 0,t.invalid=!0)}function wr(t,e,s){const n=t._cache.get(e.id);if(n!==s||t._committed.some(r=>r.id===e.id&&r._flight===e._flight))return;const i={...e,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,t._cache.set(e.id,i),n&&H(t,n)}function xs(t,e){return e[0]===Y||e[0]===se?{...t,status:e[0]===Y?"error":"notFound",error:e[1],_flight:void 0}:t}function _r(t,e,s,n,i,r,a){const o=e[1][s],c=at(t,o),u=!!r[4],l=t._cache.get(o.id);let h,f=!1,p;try{if(o.status==="success"&&(h=c.options.shouldReload,typeof h=="function"&&(h=h(cn(t,e,o,c,r[0],i,u))),r[2]()||(r[0].abort(),p=[ot])),!p)if(o.status!=="success")f=!0;else{const R=r[4]||o.preload?c.options.preloadStaleTime??t.options.defaultPreloadStaleTime??3e4:c.options.staleTime??t.options.defaultStaleTime??0;f=!!(o.invalid||h||h===void 0&&Date.now()-o.updatedAt>=R&&(r[6]||o.cause==="enter"||r[3].some(I=>I.routeId===o.routeId&&I.id!==o.id)))}}catch(R){o.invalid=!0,H(t,o),p=Rt(c,R,r)}const m=c.options.loader,d=typeof m=="function"?m:m?.handler;let g=(!u||c.options.preload!==!1)&&m?t._flights?.get(o.id):void 0;g===o._flight||p?g=void 0:g&&!f&&!u&&h===void 0?f=!0:f||(g=void 0);const y=!!(m&&f&&o.status==="success"&&!u&&!r[5]&&((typeof m=="function"?void 0:m?.staleReloadMode)??t.options.defaultStaleReloadMode)!=="blocking"),b=f&&(!u||c.options.preload!==!1),P=b&&!y&&(o.status!=="success"||!!m),_=c.lazyFn&&c._lazy!==!0?r[8]:void 0;if(b&&!m&&(o.invalid=!1,o.updatedAt=Date.now()),g&&g[2]++,P){const R=o._flight;o._flight=g,Ne(t,o,R)?.abort(),o.status==="success"&&s>=a&&(o.status="pending"),r[8]?.()}b||(o.isFetching=!1);const C=(p?Promise.resolve(p):P?Ps(t,e,o,c,d,i,u,r[0]):Promise.resolve([K,o.loaderData])).then(R=>(P&&(Rs(o,R,u),R[0]===K&&(m&&!r[0].signal.aborted&&wr(t,o,l),o.status="pending")),R)),S=X(Promise.resolve().then(()=>mt(c,void 0,_)),r[0].signal).then(()=>{},R=>[s,Rt(c,R,r)]).then(R=>C.then(I=>(P&&!R&&I[0]===K&&o.status==="pending"&&r[2]()&&(o.status="success",r[8]?.()),R)));if(n.push([s,C,S]),!y)return C.then(R=>xs(o,R));const v={...o,status:"pending",preload:!1,_flight:g};o.invalid=!1,o.isFetching="loader";const w=Ps(t,e,v,c,d,i,!1,r[0]).then(R=>(o.isFetching=!1,Rs(v,R,!1),R));return(e[2]??=[]).push([s,w,S,v]),w.then(R=>xs(v,R))}async function xe(t,e,s,n,i=0){const r=s?.[1][1];let a=r?.routeId?e.findIndex(o=>o.routeId===r.routeId):s?.[0]??e.length-1;a<0&&(a=0);for(let o=a;o>=0;o--){const c=at(t,e[o]),u=mt(c,!1);if(u)try{await X(u,n)}catch(l){if(l===n)throw l}if(c.options.notFoundComponent)return o}return r?.routeId?a:i}function gt(t,e){e[2]&&(A(t,e[2].map(s=>s[3])),e[2]=void 0)}async function Cs(t,e,s,n){let i;try{await Promise.all(t.map(r=>r[1].then(async a=>{const o=r[0];if(!(n&&o>=await n)){if(a[0]>=B)throw[o,a];!i&&a[0]!==K&&(i=[o,a],await Promise.all((s??[]).map(c=>{if(!(c[0]<=o))return c[1].then(u=>{if(u[0]===B)throw[c[0],u]})})))}})))}catch(r){return r}return e??i}async function un(t,e,s,n,i,r,a){const o=e[1];let c=await r,u=!1;const l=o.findIndex(m=>m._notFound),h=m=>m[1][0]===se?xe(t,o,m,n.signal):m[0];let f=l<0?o.length:l;if((c?.[1][0]??0)>=B)f=0;else if(c){f=c[2]??=await h(c);for(const m of s){if(m[0]>=f)break;const d=await m[1];if(d[0]!==K&&d[0]<B&&!("loaderData"in o[m[0]])){c=[m[0],d],f=c[2]=await h(c);break}}}for(const m of s){if(m[0]>=f)break;const d=await m[2];if(d){c=d;break}}if((c?.[1][0]??0)>=B){const m=c[1];if(m[0]!==B||m[1].options.reloadDocument||i<20)return gt(t,e),m;u=!0,c=[0,[Y,new Error("Too many redirects")]]}const p=c?c[2]??await h(c):l;if(p>=0){const m=c?.[1],d=m?.[0],g=o[p],y=m?.[1],b=()=>{m&&(g._notFound=void 0,d===Y?g.status="error":(y.routeId=g.routeId,g.routeId===t.routeTree.id?(g.status="success",g._notFound=!0):g.status="notFound"),g.error=y,g.isFetching=!1)};b();const P=at(t,g);try{await X(m?Promise.resolve().then(()=>mt(P,d===Y?"errorComponent":"notFoundComponent")):Promise.all([mt(P),mt(P,"notFoundComponent")]),n.signal)}catch(_){if(_===n.signal)return gt(t,e),[ot]}m?u&&(n.abort(),await Promise.all([...s.map(_=>_[1]),...s.map(_=>_[2]),...(e[2]??[]).map(_=>_[1])]),gt(t,e),A(t,o),b()):(g.status="success",a?.())}return e}async function ln(t,e,s,n=0,i=e[1].length){const r=e[1];for(let a=n;a<i;a++){const o=r[a],c=at(t,o).options;if(c.head||c.scripts)try{const u={ssr:t.options.ssr,matches:r,match:o,params:o.params,loaderData:o.loaderData},[l,h]=await X(Promise.all([c.head?.(u),c.scripts?.(u)]),s);o.meta=l?.meta,o.links=l?.links,o.headScripts=l?.scripts,o.styles=l?.styles,o.scripts=h}catch(u){if(u===s)break;console.error(u)}if(o.status!=="success"||o._notFound)break}return e}async function hn(t,e,s,n){const i=[e,s],r=t.stores.matches.get();let a=s.findIndex(d=>d._notFound);if(t.options.notFoundMode!=="root"&&a>=0){const d=await xe(t,i[1],void 0,n[0].signal,a);d!==a&&(s[a]._notFound=void 0,s[d]._notFound=!0),a=d}let o=a<0?s.length:a+1,c=0;for(;c<o&&c!==a;){const d=s[c],g=n[3][c],y=r[c];if(g?.id!==d.id||g.status!=="success"||g._notFound||d.preload||y?.id!==d.id||y.status!=="success"||y._notFound)break;c++}const u=[],l=n[7]??0;let h=l?Promise.resolve(i[1][l-1]):void 0;const f=()=>{for(let d=l;d<o&&!n[0].signal.aborted;d++)h=_r(t,i,d,u,h,n,c)},p=await Sr(t,i,n,o,f,c);if(p&&(n[5]=!0,o=p[0],p[1][0]===se?(p[2]=await xe(t,i[1],p,n[0].signal),o=Math.min(o,p[2]+1)):p[1][0]>=B&&(o=0),f()),n[2]()&&!n[4]){const d=[];for(const[g,y]of t._flights??[])y[2]||(t._flights.delete(g),d.push(y[1]));for(const g of d)g.abort()}let m;try{const d=un(t,i,u,n[0],n[1],Cs(u,p,i[2]),n[8]);i[2]?.length&&(i[3]=Cs(i[2],void 0,void 0,d.then(g=>Ot(g)?0:rn(g[1]).length,()=>0))),m=await d}catch(d){throw gt(t,i),d}return Ot(m)?m:ln(t,m,n[0].signal,n[7]===m[1].length?n[7]:0)}function Ce(t,e){if(t._tx!==e)return;let s=t._pending,n=!1;const i=s?.[0][3][s[1]]?.id;s?.[0]!==e&&(s&&e[3][s[1]]?.id===i?(s[0]=e,n=!0):(clearTimeout(s?.[3]),t._pending=s=void 0));const r=e[3],a=t.stores.matches.get();let o=-1,c,u,l,h=!1;for(let d=0;d<r.length;d++){const g=r[d],y=g.status==="success";if(h=a[d]?.id===g.id&&a[d]?.status==="pending",y&&!h)continue;const b=at(t,g);if(c=y&&h||g.invalid?0:b.options.pendingMs??t.options.defaultPendingMs,l=b.options.pendingComponent??t.options.defaultPendingComponent,!l||typeof c!="number"||c===1/0)return;o=d,u=b.options.pendingMinMs??t.options.defaultPendingMinMs??0;break}if(o<0)return;const f=r[o].id;if((!s||s[1]!==o||i!==f)&&(clearTimeout(s?.[3]),t._pending=s=[e,o,h?Date.now()+u:e[4]+c,void 0,h?Promise.resolve(!0):void 0,l]),s[4]&&!n&&s[5]===l)return;if(s[5]=l,!s[4]){clearTimeout(s[3]);const d=s[2]-Date.now();if(d>0){s[3]=setTimeout(()=>Ce(t,e),d);return}s[2]=0}const p=r.map(d=>({...d,_flight:void 0}));p[o].status="pending";const m=t.startTransition(()=>t.stores.setMatches(p),p).then(d=>(d&&t._pending===s&&s[4]===m&&!s[2]&&(s[2]=Date.now()+u),d));s[4]=m}function Kt(t,e){const s=t._pending;s?.[0]===e&&(clearTimeout(s[3]),t._pending=void 0)}function fn(t,e){t._committed=e,t.stores.setMatches(e)}function Ls(t,e){A(t,e[1]),gt(t,e)}function Pr(t,e,s,n){const i=t._committed,r=t._cache;for(const u of s)u.preload=!1,n&&(u._assetEnd=void 0);const a=rn(s).length,o=new Map,c=Date.now();for(const u of[...i,...r.values()]){if(u.status!=="success"||s.some((h,f)=>h.id===u.id&&(f<a||h.status==="success")))continue;const l=at(t,u);!l.options.loader||c-u.updatedAt>=(u.preload?l.options.preloadGcTime??t.options.defaultPreloadGcTime??3e5:l.options.gcTime??t.options.defaultGcTime??3e5)||o.set(u.id,r.get(u.id)===u?u:{...u,_flight:void 0,isFetching:!1,context:{}})}e[3]=[],t._cache=o,fn(t,s),A(t,[...r.values(),...i],[...s,...o.values()]),pr(t,i,s,()=>t._tx===e)}async function et(t,e){let s=t._tx;for(;s&&s!==e;){if(await s[5],t._tx===s)return;s=t._tx}}async function dn(t,e,s){await t.navigate({...s.options,replace:!0,ignoreBlocker:!0,_redirects:e[1]+1})}function pn(t,e){Kt(t,e),e[0].abort(),A(t,e[3]),e[3]=[],t._tx===e&&(t.batch(()=>{t.stores.status.set("idle"),t.stores.setMatches(t._committed)}),t._tx===e&&(t._commitPromise?.resolve(),t._commitPromise=void 0))}async function Rr(t,e,s,n,i){const r=s.map(u=>({...u}));Qe(r);for(const u of n)H(t,r[u[0]]),r[u[0]]=u[3];const a=[e[2],r];let o;try{o=await un(t,a,n,e[0],e[1],i)}catch(u){throw A(t,r),u}if(Ot(o)){A(t,r),o[0]===B&&t._tx===e&&t._committed===s&&await dn(t,e,o[1]);return}const c=await ln(t,o,e[0].signal);if(t._tx!==e||t._committed!==s){A(t,c[1]);return}for(const u of c[1]){const l=t._cache.get(u.id);l?._flight&&l._flight===u._flight&&(t._cache.delete(u.id),H(t,l))}fn(t,c[1]),A(t,s,c[1])}async function xr(t,e,s,n,i,r){const a=[e[0],e[1],()=>t._tx===e&&!!e[3].length,t._committed,void 0,i,s,r,n],o=await hn(t,e[2],e[3],a);if(Ot(o)){o[0]===B&&t._tx===e?(Kt(t,e),A(t,e[3]),e[3]=[],t._tx===e&&await dn(t,e,o[1])):pn(t,e);return}const c=t._pending;if(c?.[0]===e&&(clearTimeout(c[3]),c[4])){const f=e[0].signal;let p=!1;try{p=await X(c[4],f)}catch(m){if(m!==f)throw m}if(p&&t._pending===c&&c[0]===e){const m=c[2]-Date.now();if(m>0){try{await X(new Promise(d=>{c[3]=setTimeout(d,m)}),f)}catch{}clearTimeout(c[3])}}}if(t._tx!==e){Kt(t,e),Ls(t,o);return}const u=e[2],l=ee(u,t.stores.resolvedLocation.get()),h=o[2];await t.startViewTransition(async()=>{if(t._tx!==e){Ls(t,o);return}const f=()=>{Kt(t,e),Pr(t,e,o[1],r),t._tx===e&&(t.emit({type:"onLoad",...l}),t._tx===e&&t.emit({type:"onBeforeRouteMount",...l}))},p=await t.startTransition(f,o[1]);if(t._tx!==e){gt(t,o);return}h?.length&&Rr(t,e,o[1],h,o[3]).catch(console.error),t.batch(()=>{t.stores.resolvedLocation.set(u),t.stores.status.set("idle"),t._tx===e&&t.emit({type:"onResolved",...l}),p&&t._tx===e&&t.emit({type:"onRendered",...l})}),t._tx===e&&(t._commitPromise?.resolve(),t._commitPromise=void 0)})}async function Cr(t,e){const s=t._tx,n=t.stores.resolvedLocation.get(),i=n??t.stores.location.get(),r=t.latestLocation,a=t._pendingLocation,o=a?.href===r.href?a._redirects??0:0,c=t._handoff,u=c?.[0](),l=new AbortController,h=t._preflight;if(t._preflight=l,u||c?.[1](),h?.abort(),l.signal.aborted){await et(t,s);return}const f=ee(r,n);if(t.emit({type:"onBeforeNavigate",...f}),l.signal.aborted||t.emit({type:"onBeforeLoad",...f}),l.signal.aborted){await et(t,s);return}const p=i.href===r.href;let m,d=l;try{m=t.matchRoutes(r,{_controller:l}),Qe(m)}catch(b){if(l.abort(),!Be(b)){await et(t),t._commitPromise?.resolve(),t._commitPromise=void 0;return}await t.navigate({...b.options,replace:!0,ignoreBlocker:!0}),await et(t,s);return}const g=u?c[1](m):void 0;if(g?d=u:u?.abort(),l.signal.aborted){A(t,m),await et(t,s);return}t._preflight=void 0;const y=[d,o,r,m,Date.now(),Promise.resolve().then(()=>xr(t,y,p,()=>Ce(t,y),e?.sync,g)).catch(()=>{t._tx===y&&pn(t,y)})];if(t._tx=y,s){for(const b of t.stores.matches.get()){if(t._tx!==y)break;b.isFetching&&kt(t,b,!1)}s[0].abort(),A(t,s[3],y[3],!0)}if(t._tx!==y){A(t,y[3]),y[3]=[],await et(t,y);return}t.batch(()=>{t.stores.status.set("pending"),t.stores.location.set(r)}),!n&&!m.some(b=>b._notFound)&&Ce(t,y);try{await y[5]}finally{await et(t,y)}}async function mn(t,e,s=0){if(s>20)return;const n=e._builtLocation??t.buildLocation(e),i=t._committed,r=new AbortController;let a;try{a=t.matchRoutes(n,{_controller:r}),Qe(a)}catch(c){r.abort(),rt(c)||console.error(c);return}(t._preloads??=new Map).set(r,a);let o;try{let c;try{c=await hn(t,n,a,[r,s,()=>!0,i,!0])}finally{o=t._preloads.delete(r),A(t,a),r.abort()}if(!Ot(c))return c[1];if(o&&c[0]===B&&!c[1].options.reloadDocument)return mn(t,{...c[1].options,_fromLocation:n},s+1)}catch(c){rt(c)||console.error(c)}}const Lr="Error preloading route! ☝️";var gn=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e.originalIndex;const s=this.options,n=!s?.path&&!s?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=pt:this.parentRoute||De();let i=n?pt:s?.path;i&&i!=="/"&&(i=tn(i));const r=s?.id||i;let a=n?pt:Ut([this.parentRoute.id==="__root__"?"":this.parentRoute.id,r]);i==="__root__"&&(i="/"),a!=="__root__"&&(a=Ut(["/",a]));const o=a==="__root__"?"/":Ut([this.parentRoute.fullPath,i]);this._path=i,this._id=a,this._fullPath=o,this._to=W(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>ar({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},Or=class extends gn{constructor(t){super(t)}};function Ke(t){return O.jsx(Ir,{...t})}var Ir=class extends x.Component{constructor(...t){super(...t),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(t,e){const s=t.getResetKey();return e.error&&e.resetKey!==s?{resetKey:s,error:null}:{resetKey:s}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,e){this.props.onCatch?.(t,e)}render(){const t=this.state.error;return t?x.createElement(this.props.errorComponent??kr,{error:t,reset:this.reset}):this.props.children}};function kr({error:t}){const[e,s]=x.useState(!1);return O.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[O.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[O.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),O.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(n=>!n),children:e?"Hide Error":"Show Error"})]}),O.jsx("div",{style:{height:".25rem"}}),e?O.jsx("div",{children:O.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?O.jsx("code",{children:t.message}):null})}):null]})}function Er({children:t,fallback:e=null}){return O.jsx(Zt.Fragment,{children:yn()?t:e})}function yn(){return Zt.useSyncExternalStore(Tr,()=>!0,()=>!1)}function Tr(){return()=>{}}var vn=x.createContext(null);function U(t){return x.useContext(vn)}var ne=x.createContext(void 0),Fr=x.createContext(void 0),T=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(T||{});function Mr({update:t,notify:e,unwatched:s}){return{link:n,unlink:i,propagate:r,checkDirty:a,shallowPropagate:o};function n(u,l,h){const f=l.depsTail;if(f!==void 0&&f.dep===u)return;const p=f!==void 0?f.nextDep:l.deps;if(p!==void 0&&p.dep===u){p.version=h,l.depsTail=p;return}const m=u.subsTail;if(m!==void 0&&m.version===h&&m.sub===l)return;const d=l.depsTail=u.subsTail={version:h,dep:u,sub:l,prevDep:f,nextDep:p,prevSub:m,nextSub:void 0};p!==void 0&&(p.prevDep=d),f!==void 0?f.nextDep=d:l.deps=d,m!==void 0?m.nextSub=d:u.subs=d}function i(u,l=u.sub){const h=u.dep,f=u.prevDep,p=u.nextDep,m=u.nextSub,d=u.prevSub;return p!==void 0?p.prevDep=f:l.depsTail=f,f!==void 0?f.nextDep=p:l.deps=p,m!==void 0?m.prevSub=d:h.subsTail=d,d!==void 0?d.nextSub=m:(h.subs=m)===void 0&&s(h),p}function r(u){let l=u.nextSub,h;t:do{const f=u.sub;let p=f.flags;if(p&60?p&12?p&4?!(p&48)&&c(u,f)?(f.flags=p|40,p&=1):p=0:f.flags=p&-9|32:p=0:f.flags=p|32,p&2&&e(f),p&1){const m=f.subs;if(m!==void 0){const d=(u=m).nextSub;d!==void 0&&(h={value:l,prev:h},l=d);continue}}if((u=l)!==void 0){l=u.nextSub;continue}for(;h!==void 0;)if(u=h.value,h=h.prev,u!==void 0){l=u.nextSub;continue t}break}while(!0)}function a(u,l){let h,f=0,p=!1;t:do{const m=u.dep,d=m.flags;if(l.flags&16)p=!0;else if((d&17)===17){if(t(m)){const g=m.subs;g.nextSub!==void 0&&o(g),p=!0}}else if((d&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(h={value:u,prev:h}),u=m.deps,l=m,++f;continue}if(!p){const g=u.nextDep;if(g!==void 0){u=g;continue}}for(;f--;){const g=l.subs,y=g.nextSub!==void 0;if(y?(u=h.value,h=h.prev):u=g,p){if(t(l)){y&&o(g),l=u.sub;continue}p=!1}else l.flags&=-33;l=u.sub;const b=u.nextDep;if(b!==void 0){u=b;continue t}}return p}while(!0)}function o(u){do{const l=u.sub,h=l.flags;(h&48)===32&&(l.flags=h|16,(h&6)===2&&e(l))}while((u=u.nextSub)!==void 0)}function c(u,l){let h=l.depsTail;for(;h!==void 0;){if(h===u)return!0;h=h.prevDep}return!1}}function Dr(t,e,s){const n=typeof t=="object",i=n?t:void 0;return{next:(n?t.next:t)?.bind(i),error:(n?t.error:e)?.bind(i),complete:(n?t.complete:s)?.bind(i)}}const Le=[];let qt=0;const{link:Os,unlink:Ar,propagate:jr,checkDirty:bn,shallowPropagate:Is}=Mr({update(t){return t._update()},notify(t){Le[Oe++]=t,t.flags&=~T.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=T.Mutable|T.Dirty,Xt(t))}});let Bt=0,Oe=0,Q,Ie=0;function Br(t){try{++Ie,t()}finally{--Ie||Sn()}}function Xt(t){const e=t.depsTail;let s=e!==void 0?e.nextDep:t.deps;for(;s!==void 0;)s=Ar(s,t)}function Sn(){if(!(Ie>0)){for(;Bt<Oe;){const t=Le[Bt];Le[Bt++]=void 0,t.notify()}Bt=0,Oe=0}}function ks(t,e){const s=typeof t=="function",n=t,i={_snapshot:s?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:s?T.None:T.Mutable,get(){return Q!==void 0&&Os(i,Q,qt),i._snapshot},subscribe(r){const a=Dr(r),o={current:!1},c=Ur(()=>{i.get(),o.current?a.next?.(i._snapshot):o.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(r){const a=Q,o=e?.compare??Object.is;if(s)Q=i,++qt,i.depsTail=void 0;else if(r===void 0)return!1;s&&(i.flags=T.Mutable|T.RecursedCheck);try{const c=i._snapshot,u=typeof r=="function"?r(c):r===void 0&&s?n(c):r;return c===void 0||!o(c,u)?(i._snapshot=u,!0):!1}finally{Q=a,s&&(i.flags&=~T.RecursedCheck),Xt(i)}}};return s?(i.flags=T.Mutable|T.Dirty,i.get=function(){const r=i.flags;if(r&T.Dirty||r&T.Pending&&bn(i.deps,i)){if(i._update()){const a=i.subs;a!==void 0&&Is(a)}}else r&T.Pending&&(i.flags=r&~T.Pending);return Q!==void 0&&Os(i,Q,qt),i._snapshot}):i.set=function(r){if(i._update(r)){const a=i.subs;a!==void 0&&(jr(a),Is(a),Sn())}},i}function Ur(t){const e=()=>{const n=Q;Q=s,++qt,s.depsTail=void 0,s.flags=T.Watching|T.RecursedCheck;try{return t()}finally{Q=n,s.flags&=~T.RecursedCheck,Xt(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:T.Watching|T.RecursedCheck,notify(){const n=this.flags;n&T.Dirty||n&T.Pending&&bn(this.deps,this)?e():this.flags=T.Watching},stop(){this.flags=T.None,this.depsTail=void 0,Xt(this)}};return e(),s}var he={exports:{}},fe={};var Es;function Nr(){if(Es)return fe;Es=1;var t=Bn(),e=Un();function s(u,l){return u===l&&(u!==0||1/u===1/l)||u!==u&&l!==l}var n=typeof Object.is=="function"?Object.is:s,i=e.useSyncExternalStore,r=t.useRef,a=t.useEffect,o=t.useMemo,c=t.useDebugValue;return fe.useSyncExternalStoreWithSelector=function(u,l,h,f,p){var m=r(null);if(m.current===null){var d={hasValue:!1,value:null};m.current=d}else d=m.current;m=o(function(){function y(S){if(!b){if(b=!0,P=S,S=f(S),p!==void 0&&d.hasValue){var v=d.value;if(p(v,S))return _=v}return _=S}if(v=_,n(P,S))return v;var w=f(S);return p!==void 0&&p(v,w)?(P=S,v):(P=S,_=w)}var b=!1,P,_,C=h===void 0?null:h;return[function(){return y(l())},C===null?void 0:function(){return y(C())}]},[l,h,f,p]);var g=i(u,m[0],m[1]);return a(function(){d.hasValue=!0,d.value=g},[g]),c(g),g},fe}var Ts;function Qr(){return Ts||(Ts=1,he.exports=Nr()),he.exports}var Kr=Qr();function qr(t,e){return t===e}function z(t,e,s=qr){const n=x.useCallback(a=>{if(!t)return()=>{};const{unsubscribe:o}=t.subscribe(a);return o},[t]),i=x.useCallback(()=>t?.get(),[t]);return Kr.useSyncExternalStoreWithSelector(n,i,i,e,s)}var Fs={};function wn(t,e){const s=x.useRef();return n=>{const i=t?.select?t.select(n):n;return t?.structuralSharing??e.options.defaultStructuralSharing?s.current=nt(s.current,i):i}}function ct(t){const e=U(),s=x.useContext(t.from?Fr:ne),n=t.from??s,i=e.stores.getMatchStore(n),r=wn(t,e),a=z(i,o=>o?r(o):Fs);if(a!==Fs)return a;(t.shouldThrow??!0)&&De()}function _n(t){return ct({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function Pn(t){const{select:e,...s}=t;return ct({...s,select:n=>e?e(n.loaderDeps):n.loaderDeps})}function Rn(t){return ct({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:e=>{const s=t.strict===!1?e.params:e._strictParams;return t.select?t.select(s):s}})}function xn(t){return ct({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function Cn(t){const e=U();return x.useCallback(s=>e.navigate({...s,from:s.from??t?.from}),[t?.from,e])}function Ln(t){return ct({...t,select:e=>t.select?t.select(e.context):e.context})}function de(t){const e=x.useRef(t);return G(e.current,t,{ignoreUndefined:!1})||(e.current=t),e.current}function Wr(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function Hr(t,e,s){if(t?.external)return $t(t.href,s)?void 0:t.href;if(!Xr(e)&&!(typeof e!="string"||e.indexOf(":")===-1))try{return new URL(e),$t(e,s)?void 0:e}catch{}}function zr(t,e,s,n,i,r){if(r)return!1;if(s?.exact){if(!Wi(t.pathname,e.pathname,n))return!1}else{const a=Gt(t.pathname,n),o=Gt(e.pathname,n);if(!(a.startsWith(o)&&(a.length===o.length||a[o.length]==="/")))return!1}return(s?.includeSearch??!0)&&!G(t.search,e.search,{partial:!s?.exact,ignoreUndefined:!s?.explicitUndefined})?!1:s?.includeHash?i&&t.hash===e.hash:!0}function $r(t,e){const s=U(),n=Ri(e),{activeProps:i,inactiveProps:r,activeOptions:a,to:o,preload:c,preloadDelay:u,preloadIntentProximity:l,hashScrollIntoView:h,replace:f,startTransition:p,resetScroll:m,viewTransition:d,children:g,target:y,disabled:b,style:P,className:_,onClick:C,onBlur:S,onFocus:v,onMouseEnter:w,onMouseLeave:R,onTouchStart:I,ignoreBlocker:L,params:k,search:E,hash:St,state:N,mask:Et,reloadDocument:po,unsafeRelative:mo,from:go,_fromLocation:yo,...qe}=t,We=yn(),Tn=de(t.search),Fn=de(t.params),He=de(a),wt=x.useMemo(()=>t,[s,t.from,t._fromLocation,t.hash,t.to,Tn,Fn,t.state,t.mask,t.unsafeRelative]),Mn=x.useCallback(D=>{const q=s.buildLocation({_fromLocation:D,...wt}),_t=Yr(q.maskedLocation?q.maskedLocation.publicHref:q.publicHref,q.maskedLocation?q.maskedLocation.external:q.external,s.history,b),Je=Hr(_t,o,s.protocolAllowlist);return[_t?.href,Je,zr(D,q,He,s.basepath,We,Je!==void 0)]},[He,b,We,wt,s,o]),[Dn,re,oe]=z(s.stores.location,Mn,Wr),Tt=oe?vt(i,{})??Vr:pe,Ft=oe?pe:vt(r,{})??pe,ze=[_,Tt.className,Ft.className].filter(Boolean).join(" "),$e=(P||Tt.style||Ft.style)&&{...P,...Tt.style,...Ft.style},Ve=x.useRef(!1),Z=t.reloadDocument||re||b?!1:c??s.options.defaultPreload,ae=u??s.options.defaultPreloadDelay??0,ut=x.useCallback(()=>{s.preloadRoute(wt).catch(D=>{console.warn(D),console.warn(Lr)})},[s,wt]),ce=x.useCallback(D=>{if(!D){me(n);return}if(!(D.isIntersecting??Z==="intent")){D.isIntersecting===!1&&me(n);return}if(!ae){ut();return}xt.has(n)||xt.set(n,setTimeout(()=>{xt.delete(n),ut()},ae))},[ut,n,Z,ae]);Pi(n,ce,Z!=="viewport"),x.useEffect(()=>{Ve.current||Z==="render"&&(ut(),Ve.current=!0)},[ut,Z]);const An=D=>{const q=D.currentTarget.getAttribute("target"),_t=y!==void 0?y:q;!b&&!Zr(D)&&!D.defaultPrevented&&(!_t||_t==="_self")&&D.button===0&&(D.preventDefault(),s.navigate({...wt,replace:f,resetScroll:m,hashScrollIntoView:h,startTransition:p,viewTransition:d,ignoreBlocker:L}))};if(re)return{...qe,ref:n,href:re,...g&&{children:g},...y&&{target:y},...b&&{disabled:b},...P&&{style:P},..._&&{className:_},...C&&{onClick:C},...S&&{onBlur:S},...v&&{onFocus:v},...w&&{onMouseEnter:w},...R&&{onMouseLeave:R},...I&&{onTouchStart:I}};const jn=()=>{Z==="intent"&&ut()},Ge=()=>{Z==="intent"&&me(n)};return{...qe,...Tt,...Ft,href:Dn,ref:n,onClick:lt([C,An]),onBlur:lt([S,Ge]),onFocus:lt([v,ce]),onMouseEnter:lt([w,ce]),onMouseLeave:lt([R,Ge]),onTouchStart:lt([I,jn]),disabled:!!b,target:y,...$e&&{style:$e},...ze&&{className:ze},...b&&Gr,...oe&&Jr}}var pe={},Vr={className:"active"},Gr={role:"link","aria-disabled":!0},Jr={"data-status":"active","aria-current":"page"},xt=new WeakMap,me=t=>{clearTimeout(xt.get(t)),xt.delete(t)},lt=t=>e=>{for(const s of t)if(s){if(e.defaultPrevented)return;s(e)}};function Yr(t,e,s,n){if(!n)return e?{href:t,external:!0}:{href:s.createHref(t)||"/",external:!1}}function Xr(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}var On=x.forwardRef((t,e)=>{const{_asChild:s,...n}=t,{type:i,...r}=$r(n,e),a=typeof n.children=="function"?n.children({isActive:r["data-status"]==="active"}):n.children;if(!s){const{disabled:o,...c}=r;return x.createElement("a",c,a)}return x.createElement(s,r,a)});function Zr(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var to=class extends gn{constructor(t){super(t),this.useMatch=e=>ct({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Ln({...e,from:this.id}),this.useSearch=e=>xn({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Rn({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Pn({...e,from:this.id}),this.useLoaderData=e=>_n({...e,from:this.id}),this.useNavigate=()=>Cn({from:this.fullPath}),this.Link=Zt.forwardRef((e,s)=>O.jsx(On,{ref:s,from:this.fullPath,...e}))}};function Po(t){return new to(t)}var eo=class extends Or{constructor(t){super(t),this.useMatch=e=>ct({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Ln({...e,from:this.id}),this.useSearch=e=>xn({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Rn({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Pn({...e,from:this.id}),this.useLoaderData=e=>_n({...e,from:this.id}),this.useNavigate=()=>Cn({from:this.fullPath}),this.Link=Zt.forwardRef((e,s)=>O.jsx(On,{ref:s,from:this.fullPath,...e}))}};function Ro(t){return new eo(t)}function so(t){const e=U(),s=`not-found-${z(e.stores.location,n=>n.pathname)}-${z(e.stores.status,n=>n)}`;return O.jsx(Ke,{getResetKey:()=>s,onCatch:(n,i)=>{if(rt(n))t.onCatch?.(n,i);else throw n},errorComponent:({error:n})=>{if(rt(n))return t.fallback?.(n);throw n},children:t.children})}function no(){return O.jsx("p",{children:"Not Found"})}function ft(t){return O.jsx(O.Fragment,{children:t.children})}function In(t,e,s){return e.options.notFoundComponent?O.jsx(e.options.notFoundComponent,{...s}):t.options.defaultNotFoundComponent?O.jsx(t.options.defaultNotFoundComponent,{...s}):O.jsx(no,{})}function ie(t,e){const s=e?.options.pendingComponent??t.options.defaultPendingComponent;return s?O.jsx(s,{}):null}var io=(t,e)=>t[0]===e[0]&&t[1]===e[1],kn=x.memo(function({routeId:e}){const s=U();return O.jsx(ro,{router:s,match:z(s.stores.getMatchStore(e),n=>n)})});function ro({router:t,match:e}){const s=t.routesById[e.routeId],n=ie(t,s),i=s.options.errorComponent??t.options.defaultErrorComponent,r=s.options.onCatch??t.options.defaultOnCatch,a=s.isRoot?s.options.notFoundComponent??t.options.notFoundRoute?.options.component:s.options.notFoundComponent,o=e.ssr===!1||e.ssr==="data-only",c=s.options.wrapInSuspense??n??(s.options.errorComponent?.preload||o)?x.Suspense:ft,u=i?Ke:ft,l=a?so:ft;return O.jsxs(s.isRoot?s.options.shellComponent??ft:ft,{children:[O.jsx(ne.Provider,{value:e.routeId,children:O.jsx(c,{fallback:n,children:O.jsx(u,{getResetKey:()=>e,errorComponent:i,onCatch:(h,f)=>{if(rt(h))throw h.routeId??=e.routeId,h;r?.(h,f)},children:O.jsx(l,{fallback:h=>{if(h.routeId??=e.routeId,h.routeId!==e.routeId)throw h;return x.createElement(a,h)},children:o?O.jsx(Er,{fallback:n,children:O.jsx(Ms,{match:e})}):O.jsx(Ms,{match:e})})})})}),null]})}var Ms=x.memo(function({match:e}){const s=U(),n=e.routeId,i=s.routesById[n],r=x.useMemo(()=>{const o=(i.options.remountDeps??s.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return o?JSON.stringify(o):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,i.options.remountDeps,s.options.defaultRemountDeps]),a=x.useMemo(()=>{const o=i.options.component??s.options.defaultComponent;return o?O.jsx(o,{},r):O.jsx(oo,{})},[r,i.options.component,s.options.defaultComponent]);if(e.status==="pending"){if(s._tx)throw s._tx[5];return ie(s,i)}if(e.status==="notFound")return In(s,i,e.error);if(e.status==="error")throw e.error;return a}),oo=x.memo(function(){const e=U(),s=x.useContext(ne);let n,i,r;{const o=e.stores.getMatchStore(s);[n,i]=z(o,c=>[!!c._notFound,c.error],io),r=z(e.stores.ids,c=>c[c.indexOf(s)+1])}if(n)return In(e,e.routesById[s],i);if(!r)return null;const a=O.jsx(kn,{routeId:r});return s===pt?O.jsx(x.Suspense,{fallback:ie(e),children:a}):a});function En(t,e){const s=t[1];t.length=0,s?.(e)}function ao({t}){const e=U(),s=e._rendered??=[];return e.startTransition=(n,i)=>new Promise((r,a)=>{En(s,!1),s.push(i,r),t(e),x.startTransition(()=>{try{n()}catch(o){s[1]===r&&(s.length=0),a(o)}})}),zs(()=>{const n=e.history.subscribe(e.load);e.updateLatestLocation();const i=e.latestLocation,r=e.buildLocation({to:i.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(W(i.publicHref)!==W(r.publicHref))return e.commitLocation({...r,replace:!0,ignoreBlocker:!0}),n;const a=e.stores.resolvedLocation.get();return a?.href===i.href&&a.state.__TSR_key===i.state.__TSR_key?s.push(e.stores.matches.get(),o=>{o&&e.emit({type:"onRendered",...ee(a,a)})}):e._tx||e.load().catch(console.error),n},[e,e.history]),null}function co(){const t=U(),e=t.routesById[pt],s=ie(t,e),n=t.ssr?ft:x.Suspense,i=O.jsxs(O.Fragment,{children:[O.jsx(ao,{t:x.useState()[1]}),O.jsx(n,{fallback:s,children:O.jsx(uo,{})})]});return t.options.InnerWrap?O.jsx(t.options.InnerWrap,{children:i}):i}function uo(){const t=U(),e=t._rendered,s=z(t.stores.matches,a=>e[0]??a),n=s[0],i=n?.routeId;zs(()=>{e[0]===s&&En(e,!0)},[e,s]);const r=i?O.jsx(kn,{routeId:i}):null;return O.jsx(ne.Provider,{value:i,children:t.options.disableGlobalCatchBoundary?r:O.jsx(Ke,{getResetKey:()=>n,onCatch:void 0,children:r})})}var lo=t=>({createMutableStore:ks,createReadonlyStore:ks,batch:Br}),xo=t=>new ho(t),ho=class extends mr{constructor(t){super(t,lo)}};function fo({router:t,children:e,...s}){Vs(s)&&t.update({...t.options,...s,context:{...t.options.context,...s.context}});const n=O.jsx(vn.Provider,{value:t,children:e});return t.options.Wrap?O.jsx(t.options.Wrap,{children:n}):n}function Co({router:t,...e}){return O.jsx(fo,{router:t,...e,children:O.jsx(co,{})})}function Lo(t){const e=U();return z(e.stores.location,wn(t,e))}export{On as L,oo as O,So as Q,Co as R,Lo as a,Cn as b,Ws as c,xo as d,Ro as e,Po as f,Rn as g,_o as h,bo as i,wo as u};
|