madarx 2.9.2 → 2.9.4
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-build-manifest.json +283 -283
- package/.next/standalone/.next/app-path-routes-manifest.json +79 -79
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/.next/server/app/activity/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/admin/page.js +2 -2
- package/.next/standalone/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/agents/[id]/page.js +3 -3
- package/.next/standalone/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/agents/page.js +1 -1
- package/.next/standalone/.next/server/app/agents/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/activity/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/audit-export/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/share-links/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent-memory/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent-runs/[id]/cancel/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent-runs/[id]/events/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent-runs/[id]/log/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent-runs/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent-runs/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[id]/chain/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[id]/memory/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[id]/reports/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[id]/run/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[id]/skills/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/create/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/ops/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/approvals/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/approvals/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/artifacts/[id]/acl/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/artifacts/[id]/protect/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/artifacts/[id]/raw/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/artifacts/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/artifacts/[id]/share-link/[linkId]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/artifacts/[id]/share-link/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/artifacts/upload/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/audit/list/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/audit/search/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/callback/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/config/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/join-bootstrap/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/session/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/brand/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/chat/sessions/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/chat/sessions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/config/env/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/config/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/connections/[service]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/connections/[service]/verify/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/connections/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/cron/tick/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/dashboard/spaces/[id]/move/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/dashboard/spaces/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/dashboard/spaces/[id]/share-link/[linkId]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/dashboard/spaces/[id]/share-link/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/dashboard/spaces/import/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/dashboard/spaces/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/disk/files/[id]/blob/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/disk/files/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/disk/files/[id]/transcribe/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/disk/files/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/disk/folders/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/events/since/[cursor]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/events/stream/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/fs/create-folder/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/fs/pick-folder/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/engagements/[id]/blueprint/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/engagements/[id]/diagnostic/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/engagements/[id]/governance/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/engagements/[id]/interview/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/engagements/[id]/pilot/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/engagements/[id]/quarterly/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/engagements/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/engagements/[id]/setup-package/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/engagements/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/interviews/[id]/responses/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/interviews/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/setup-packages/[id]/apply/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hail/setup-packages/validate/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/heartbeat/tick/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/heartbeat/worker/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/help/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hermes/jobs/[id]/events/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hermes/jobs/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/hermes/jobs/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/integrations/google/callback/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/integrations/google/oauth/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/marketplace/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/marketplace/open-design/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/marketplace/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mines/import-roots/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mines/portfolio/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mines/projects/[id]/chunks/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mines/projects/[id]/diligence/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mines/projects/[id]/import/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mines/projects/[id]/publish/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mines/projects/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/missions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/onboarding/blueprint/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/onboarding/launch/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orchestrator/command/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orchestrator/stream/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/org/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orgs/[id]/invites/[inviteId]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orgs/[id]/invites/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orgs/[id]/members/[userId]/role/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orgs/[id]/members/[userId]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orgs/[id]/members/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orgs/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orgs/invites/pending/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orgs/join/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/orgs/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/printing-press/clis/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/printing-press/install/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/printing-press/security-mode/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/privacy/config/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/privacy/verify/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/[id]/share-link/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/[id]/stages/[stageId]/override/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/[id]/stages/[stageId]/retry/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/[id]/stages/[stageId]/submit/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/definitions/[slug]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/definitions/[slug]/settings/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/definitions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/definitions/validate/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/processes/start-and-route/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[slug]/library/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[slug]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/runs/approve-claude-run/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/runs/claude-code-dry-run/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/runs/competitor-report/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/runs/engine-ping/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/runs/marketing-plan/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/schedules/upsert/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/secrets/[name]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/secrets/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/settings/trust-mode/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/otp/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/share/[token]/verify/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/share/space/[token]/otp/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/share/space/[token]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/share/space/[token]/verify/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/shared/spaces/[id]/acl/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/shared/spaces/publish/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/shared/spaces/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/shared/spaces/status/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/shared/spaces/unpublish/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/state/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/system/update/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/active-run/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/attachments/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/checklist/[itemId]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/checklist/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/checkout/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/children/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/comments/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/events/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/live-runs/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/release/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tool-allowlists/[id]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tool-allowlists/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tool-egress/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tools/[name]/approve/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tools/[name]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tools/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/transcripts/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/voice/providers/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/voice/realtime/context/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/voice/realtime/session/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/voice/realtime/tool-result/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/voice/realtime/tools/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/voice/tts/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/whatsapp/allowlist/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/whatsapp/messages/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/whatsapp/qr/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/whatsapp/send/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/whatsapp/status/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/approvals/page.js +2 -2
- package/.next/standalone/.next/server/app/approvals/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/architecture/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/architecture.html +2 -2
- package/.next/standalone/.next/server/app/architecture.rsc +1 -1
- package/.next/standalone/.next/server/app/audit/live/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/brand/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/brand.html +1 -1
- package/.next/standalone/.next/server/app/brand.rsc +1 -1
- package/.next/standalone/.next/server/app/disk/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/federated-ai/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/federated-ai.html +2 -2
- package/.next/standalone/.next/server/app/federated-ai.rsc +1 -1
- package/.next/standalone/.next/server/app/hail/[id]/governance/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/hail/[id]/interview/page.js +1 -1
- package/.next/standalone/.next/server/app/hail/[id]/interview/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/hail/[id]/page.js +2 -2
- package/.next/standalone/.next/server/app/hail/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/hail/[id]/setup/page.js +2 -2
- package/.next/standalone/.next/server/app/hail/[id]/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/hail/page.js +2 -2
- package/.next/standalone/.next/server/app/hail/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/help/[slug]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/help/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +2 -2
- package/.next/standalone/.next/server/app/index.rsc +1 -1
- package/.next/standalone/.next/server/app/join/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/join.html +1 -1
- package/.next/standalone/.next/server/app/join.rsc +1 -1
- package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/marketplace/page.js +2 -2
- package/.next/standalone/.next/server/app/marketplace/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/mines/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/mines/[projectId]/results/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/mines/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/missions/page.js +2 -2
- package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/onboarding/org/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/onboarding.html +2 -2
- package/.next/standalone/.next/server/app/onboarding.rsc +1 -1
- package/.next/standalone/.next/server/app/org/page.js +1 -1
- package/.next/standalone/.next/server/app/org/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/org/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/[slug]/log/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/new/page.js +1 -1
- package/.next/standalone/.next/server/app/projects/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/new.html +1 -1
- package/.next/standalone/.next/server/app/projects/new.rsc +2 -2
- package/.next/standalone/.next/server/app/projects/page.js +11 -11
- package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/reports/[file]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/reports/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/runtime/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/schedules/page.js +2 -2
- package/.next/standalone/.next/server/app/schedules/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/account/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/advanced/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/appearance/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/brand/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/brand.html +2 -2
- package/.next/standalone/.next/server/app/settings/brand.rsc +1 -1
- package/.next/standalone/.next/server/app/settings/connectors/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/engines/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/onboarding.html +2 -2
- package/.next/standalone/.next/server/app/settings/onboarding.rsc +1 -1
- package/.next/standalone/.next/server/app/settings/organization/page.js +1 -1
- package/.next/standalone/.next/server/app/settings/organization/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/organization/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/runtime/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/tools/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings.html +2 -2
- package/.next/standalone/.next/server/app/settings.rsc +1 -1
- package/.next/standalone/.next/server/app/share/[token]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/share/space/[token]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/tasks/[id]/page.js +1 -1
- package/.next/standalone/.next/server/app/tasks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/tasks/page.js +1 -1
- package/.next/standalone/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/team/[agentId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/team/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/whatsapp/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/whatsapp.html +1 -1
- package/.next/standalone/.next/server/app/whatsapp.rsc +1 -1
- package/.next/standalone/.next/server/app/workflows/[caseId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workflows/new/[caseId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workflows/new/definition/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workflows/new/page.js +2 -2
- package/.next/standalone/.next/server/app/workflows/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workflows/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/workflows/share/[caseId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +79 -79
- package/.next/standalone/.next/server/chunks/1699.js +2 -2
- package/.next/standalone/.next/server/chunks/4676.js +1 -0
- package/.next/standalone/.next/server/functions-config-manifest.json +43 -43
- package/.next/standalone/.next/server/middleware-manifest.json +5 -5
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/1231-4acb93ac3f653de1.js +1 -0
- package/.next/standalone/.next/static/chunks/1255-b28ea36bf0cdbd65.js +1 -0
- package/.next/standalone/.next/static/chunks/1517.be5e2c446b38c681.js +1 -0
- package/.next/standalone/.next/static/chunks/2309-722fe8d8b26c21c6.js +1 -0
- package/.next/standalone/.next/static/chunks/2619-3c9e02e22d10480a.js +1 -0
- package/.next/standalone/.next/static/chunks/2713.4f4ae8af4e5bf2ee.js +1 -0
- package/.next/standalone/.next/static/chunks/2769-5ea87fab731b4c4d.js +1 -0
- package/.next/standalone/.next/static/chunks/3168.3b5e35036a18bdd3.js +1 -0
- package/.next/standalone/.next/static/chunks/4119-5297b212ff79d264.js +1 -0
- package/.next/standalone/.next/static/chunks/44530001.ef2edd53e6cfdfa8.js +1 -0
- package/.next/standalone/.next/static/chunks/4797.5d0d513a724ca684.js +1 -0
- package/.next/standalone/.next/static/chunks/4bd1b696-f785427dddbba9fb.js +1 -0
- package/.next/standalone/.next/static/chunks/566-df7d5a84a12252cd.js +1 -0
- package/.next/standalone/.next/static/chunks/5938.238480f58c343b6b.js +1 -0
- package/.next/standalone/.next/static/chunks/7130.5de172d005b1e866.js +1 -0
- package/.next/standalone/.next/static/chunks/8-49f6c91cb13e65ac.js +1 -0
- package/.next/standalone/.next/static/chunks/8217.93f3920e3c35c748.js +1 -0
- package/.next/standalone/.next/static/chunks/840.c27c21f4787aea90.js +59 -0
- package/.next/standalone/.next/static/chunks/9077-7f938e8517cad35e.js +1 -0
- package/.next/standalone/.next/static/chunks/930-de78056b2dc197a2.js +1 -0
- package/.next/standalone/.next/static/chunks/9863.8c29a80e7d210e46.js +1 -0
- package/.next/standalone/.next/static/chunks/9867.fc6d7dc10dd6c262.js +1 -0
- package/.next/standalone/.next/static/chunks/app/_not-found/page-1a04e2ed7713f80a.js +1 -0
- package/.next/standalone/.next/static/chunks/app/activity/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/activity/page-c12b94ea10818d65.js +1 -0
- package/.next/standalone/.next/static/chunks/app/admin/page-e59c7cc86dec4052.js +1 -0
- package/.next/standalone/.next/static/chunks/app/agents/[id]/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/agents/[id]/page-ba45b5f563f12313.js +1 -0
- package/.next/standalone/.next/static/chunks/app/agents/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/agents/page-c251f7df2db0348b.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/activity/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/admin/audit-export/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/admin/share-links/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agent-memory/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agent-runs/[id]/cancel/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agent-runs/[id]/events/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agent-runs/[id]/log/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agent-runs/[id]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agent-runs/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/[id]/chain/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/[id]/memory/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/[id]/reports/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/[id]/run/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/[id]/skills/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/create/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/agents/ops/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/approvals/[id]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/approvals/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/acl/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/protect/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/raw/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/share-link/[linkId]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/artifacts/[id]/share-link/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/artifacts/upload/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/audit/list/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/audit/search/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/callback/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/config/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/join-bootstrap/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/auth/session/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/brand/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/chat/sessions/[id]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/chat/sessions/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/config/env/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/config/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/connections/[service]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/connections/[service]/verify/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/connections/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/cron/tick/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/[id]/move/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/[id]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/[id]/share-link/[linkId]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/[id]/share-link/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/import/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/dashboard/spaces/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/disk/files/[id]/blob/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/disk/files/[id]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/disk/files/[id]/transcribe/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/disk/files/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/disk/folders/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/events/since/[cursor]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/events/stream/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/fs/create-folder/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/fs/pick-folder/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/blueprint/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/diagnostic/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/governance/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/interview/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/pilot/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/quarterly/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/[id]/setup-package/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/engagements/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/interviews/[id]/responses/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/interviews/[id]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/setup-packages/[id]/apply/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hail/setup-packages/validate/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/heartbeat/tick/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/heartbeat/worker/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/help/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hermes/jobs/[id]/events/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hermes/jobs/[id]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/hermes/jobs/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/integrations/google/callback/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/integrations/google/oauth/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/marketplace/[id]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/marketplace/open-design/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/marketplace/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/mines/import-roots/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/mines/portfolio/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/mines/projects/[id]/chunks/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/mines/projects/[id]/diligence/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/mines/projects/[id]/import/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/mines/projects/[id]/publish/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/mines/projects/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/missions/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/models/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/onboarding/blueprint/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/onboarding/launch/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orchestrator/command/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orchestrator/stream/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/org/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/invites/[inviteId]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/invites/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/members/[userId]/role/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/members/[userId]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/members/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orgs/[id]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orgs/invites/pending/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orgs/join/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/orgs/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/printing-press/clis/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/printing-press/install/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/printing-press/security-mode/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/privacy/config/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/privacy/verify/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/[id]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/[id]/share-link/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/[id]/stages/[stageId]/override/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/[id]/stages/[stageId]/retry/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/[id]/stages/[stageId]/submit/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/definitions/[slug]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/definitions/[slug]/settings/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/definitions/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/definitions/validate/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/processes/start-and-route/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[slug]/library/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/[slug]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/projects/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/runs/approve-claude-run/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/runs/claude-code-dry-run/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/runs/competitor-report/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/runs/engine-ping/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/runs/marketing-plan/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/schedules/upsert/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/secrets/[name]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/secrets/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/settings/trust-mode/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/share/[token]/otp/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/share/[token]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/share/[token]/verify/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/share/space/[token]/otp/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/share/space/[token]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/share/space/[token]/verify/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/shared/spaces/[id]/acl/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/shared/spaces/publish/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/shared/spaces/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/shared/spaces/status/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/shared/spaces/unpublish/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/state/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/system/update/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/active-run/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/attachments/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/checklist/[itemId]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/checklist/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/checkout/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/children/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/comments/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/events/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/live-runs/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/release/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/[id]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tasks/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tool-allowlists/[id]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tool-allowlists/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tool-egress/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tools/[name]/approve/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tools/[name]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/tools/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/transcripts/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/voice/providers/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/voice/realtime/context/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/voice/realtime/session/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/voice/realtime/tool-result/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/voice/realtime/tools/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/voice/tts/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/whatsapp/allowlist/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/whatsapp/messages/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/whatsapp/qr/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/whatsapp/send/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/whatsapp/status/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/approvals/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/approvals/page-c12b94ea10818d65.js +1 -0
- package/.next/standalone/.next/static/chunks/app/architecture/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/architecture/page-2dfc72f2a2d88f9d.js +1 -0
- package/.next/standalone/.next/static/chunks/app/audit/live/page-1e0efbfb119569b0.js +1 -0
- package/.next/standalone/.next/static/chunks/app/audit/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/audit/page-c12b94ea10818d65.js +1 -0
- package/.next/standalone/.next/static/chunks/app/brand/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/brand/page-8bb3754e7c32b642.js +1 -0
- package/.next/standalone/.next/static/chunks/app/disk/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/disk/page-830a69b2f0aa3d19.js +1 -0
- package/.next/standalone/.next/static/chunks/app/federated-ai/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/federated-ai/page-d2bee8a9d6cb2158.js +1 -0
- package/.next/standalone/.next/static/chunks/app/hail/[id]/governance/page-e2ba96c9d0d9b834.js +1 -0
- package/.next/standalone/.next/static/chunks/app/hail/[id]/interview/page-d1ca3290361630df.js +1 -0
- package/.next/standalone/.next/static/chunks/app/hail/[id]/page-51b4e30f9ffd4b73.js +1 -0
- package/.next/standalone/.next/static/chunks/app/hail/[id]/setup/page-51b4e30f9ffd4b73.js +1 -0
- package/.next/standalone/.next/static/chunks/app/hail/page-51b4e30f9ffd4b73.js +1 -0
- package/.next/standalone/.next/static/chunks/app/help/[slug]/page-c3195d2b23b0ac1b.js +1 -0
- package/.next/standalone/.next/static/chunks/app/help/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/help/page-bc1c746d72f7e90c.js +1 -0
- package/.next/standalone/.next/static/chunks/app/join/page-ce560c39fdc1cb5a.js +1 -0
- package/.next/standalone/.next/static/chunks/app/layout-6728a045f5352a96.js +1 -0
- package/.next/standalone/.next/static/chunks/app/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/login/page-df655887dbc38067.js +1 -0
- package/.next/standalone/.next/static/chunks/app/marketplace/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/marketplace/page-edb895159388f32e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/mines/[projectId]/page-260fec1b92312925.js +1 -0
- package/.next/standalone/.next/static/chunks/app/mines/[projectId]/results/page-9fe66fe1590c64f9.js +1 -0
- package/.next/standalone/.next/static/chunks/app/mines/page-fb7d1c7bafe73571.js +1 -0
- package/.next/standalone/.next/static/chunks/app/missions/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/missions/page-c12b94ea10818d65.js +1 -0
- package/.next/standalone/.next/static/chunks/app/onboarding/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/onboarding/org/page-c26d5063bbdcb192.js +1 -0
- package/.next/standalone/.next/static/chunks/app/onboarding/page-b4c57b0f70cae794.js +1 -0
- package/.next/standalone/.next/static/chunks/app/org/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/org/page-c12b94ea10818d65.js +1 -0
- package/.next/standalone/.next/static/chunks/app/page-12446920b9aef7b5.js +1 -0
- package/.next/standalone/.next/static/chunks/app/projects/[slug]/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/projects/[slug]/log/page-a29845d3def72e1d.js +1 -0
- package/.next/standalone/.next/static/chunks/app/projects/[slug]/page-bc5359a5168e8ce3.js +1 -0
- package/.next/standalone/.next/static/chunks/app/projects/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/projects/new/page-c12b94ea10818d65.js +1 -0
- package/.next/standalone/.next/static/chunks/app/projects/page-8f09f3fcf7fd0e3a.js +1 -0
- package/.next/standalone/.next/static/chunks/app/reports/[file]/route-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/reports/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/reports/page-c12b94ea10818d65.js +1 -0
- package/.next/standalone/.next/static/chunks/app/runtime/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/runtime/page-c12b94ea10818d65.js +1 -0
- package/.next/standalone/.next/static/chunks/app/schedules/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/schedules/page-2a68ab0e10595bcd.js +1 -0
- package/.next/standalone/.next/static/chunks/app/settings/account/page-3423feef4e4bfd8d.js +1 -0
- package/.next/standalone/.next/static/chunks/app/settings/advanced/page-8269e27543b8bdd5.js +1 -0
- package/.next/standalone/.next/static/chunks/app/settings/appearance/page-c12b94ea10818d65.js +1 -0
- package/.next/standalone/.next/static/chunks/app/settings/brand/page-f54af497deea88ab.js +1 -0
- package/.next/standalone/.next/static/chunks/app/settings/connectors/page-8269e27543b8bdd5.js +1 -0
- package/.next/standalone/.next/static/chunks/app/settings/engines/page-439cc5bb0193bfb7.js +1 -0
- package/.next/standalone/.next/static/chunks/app/settings/layout-78a57111f867ba6c.js +1 -0
- package/.next/standalone/.next/static/chunks/app/settings/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/settings/onboarding/page-2c557f68cc8971d8.js +1 -0
- package/.next/standalone/.next/static/chunks/app/settings/organization/page-c12b94ea10818d65.js +1 -0
- package/.next/standalone/.next/static/chunks/app/settings/page-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/settings/runtime/page-c12b94ea10818d65.js +1 -0
- package/.next/standalone/.next/static/chunks/app/settings/tools/page-8269e27543b8bdd5.js +1 -0
- package/.next/standalone/.next/static/chunks/app/share/[token]/page-9afe594e2b42ee98.js +1 -0
- package/.next/standalone/.next/static/chunks/app/share/space/[token]/page-d941c8b538680771.js +1 -0
- package/.next/standalone/.next/static/chunks/app/tasks/[id]/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/tasks/[id]/page-10b8f571ac331814.js +1 -0
- package/.next/standalone/.next/static/chunks/app/tasks/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/tasks/page-e53905ca0f216834.js +1 -0
- package/.next/standalone/.next/static/chunks/app/team/[agentId]/page-c12b94ea10818d65.js +1 -0
- package/.next/standalone/.next/static/chunks/app/team/page-51b4e30f9ffd4b73.js +1 -0
- package/.next/standalone/.next/static/chunks/app/tools/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/tools/page-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/whatsapp/loading-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/app/whatsapp/page-ab228cb0cbf3e16d.js +1 -0
- package/.next/standalone/.next/static/chunks/app/workflows/[caseId]/page-44cbcfc3ad541629.js +1 -0
- package/.next/standalone/.next/static/chunks/app/workflows/new/[caseId]/page-51b4e30f9ffd4b73.js +1 -0
- package/.next/standalone/.next/static/chunks/app/workflows/new/definition/page-57285f28a2156daa.js +1 -0
- package/.next/standalone/.next/static/chunks/app/workflows/new/page-e99f34660ca383e5.js +1 -0
- package/.next/standalone/.next/static/chunks/app/workflows/page-11778031fa890a8c.js +1 -0
- package/.next/standalone/.next/static/chunks/app/workflows/share/[caseId]/page-abb4b18098f1d93e.js +1 -0
- package/.next/standalone/.next/static/chunks/framework-4731550a751206fc.js +1 -0
- package/.next/standalone/.next/static/chunks/main-app-646d86f6b65133fa.js +1 -0
- package/.next/standalone/.next/static/chunks/main-f0e8527d594b1755.js +1 -0
- package/.next/standalone/.next/static/chunks/pages/_app-6c8c2371b16a04b8.js +1 -0
- package/.next/standalone/.next/static/chunks/pages/_error-94812ad32cad7365.js +1 -0
- package/.next/standalone/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/.next/standalone/.next/static/chunks/webpack-ce537f60727acb61.js +1 -0
- package/.next/standalone/.next/static/css/10f53a9c6accc597.css +1 -0
- package/.next/standalone/.next/static/css/67735f13057a6651.css +1 -0
- package/.next/standalone/.next/static/css/acf226d91614a52a.css +1 -0
- package/.next/standalone/.next/static/css/c3ec1669cae95a9a.css +1 -0
- package/.next/standalone/.next/static/media/98e207f02528a563-s.p.woff2 +0 -0
- package/.next/standalone/.next/static/media/99dcf268bda04fe5-s.woff2 +0 -0
- package/.next/standalone/.next/static/media/d29838c109ef09b4-s.woff2 +0 -0
- package/.next/standalone/.next/static/media/e40af3453d7c920a-s.woff2 +0 -0
- package/.next/standalone/.next/static/media/ef4d5661765d0e49-s.woff2 +0 -0
- package/.next/standalone/data/.artifacts-migrated-v1 +1 -1
- package/.next/standalone/data/.default-project-seeded +1 -1
- package/.next/standalone/data/madarx.sqlite +0 -0
- package/.next/standalone/data/madarx.sqlite-shm +0 -0
- package/.next/standalone/data/madarx.sqlite-wal +0 -0
- package/.next/standalone/package.json +2 -1
- package/.next/standalone/public/federated-ai-teams.html +10 -0
- package/.next/standalone/public/madarx-feasibility-use-cases.html +1 -0
- package/.next/standalone/public/madarx-mark.svg +9 -0
- package/.next/standalone/public/privacy.worker.js +117 -0
- package/.next/static/6oh6zIyYdQuxVczCDWeak/_buildManifest.js +1 -0
- package/.next/static/6oh6zIyYdQuxVczCDWeak/_ssgManifest.js +1 -0
- package/.next/static/chunks/app/projects/page-8f09f3fcf7fd0e3a.js +1 -0
- package/README.md +3 -1
- package/lib/seeds.js +32 -13
- package/package.json +2 -1
- package/scripts/postbuild-standalone.mjs +41 -0
- package/.next/standalone/.next/server/chunks/664.js +0 -1
- package/.next/static/chunks/app/projects/page-a1a581ac76f7a4bb.js +0 -1
- /package/.next/{static/0tzU0vkYYYJiZ7OPljvJo → standalone/.next/static/6oh6zIyYdQuxVczCDWeak}/_buildManifest.js +0 -0
- /package/.next/{static/0tzU0vkYYYJiZ7OPljvJo → standalone/.next/static/6oh6zIyYdQuxVczCDWeak}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4119],{4119:(e,s,a)=>{a.d(s,{A:()=>c});var t=a(5155),n=a(2115),i=a(2769);let l=[["pairing","Pairing","Bridge status + QR"],["allowlist","Allowlist","Permitted senders"],["messages","Messages","Inbound + outbound"],["send","Send","Manual message"]];async function r(e,s){let a=await fetch(e,s),t=await a.text();try{return{ok:a.ok,status:a.status,json:t?JSON.parse(t):null}}catch(e){return{ok:a.ok,status:a.status,json:null,text:t}}}function c(){var e;let[s,a]=(0,n.useState)("pairing"),[c,d]=(0,n.useState)(null),[o,h]=(0,n.useState)(null),[p,m]=(0,n.useState)(""),[u,x]=(0,n.useState)([]),[j,g]=(0,n.useState)(null),[v,f]=(0,n.useState)(""),[N,w]=(0,n.useState)(""),[b,y]=(0,n.useState)(!1),[S,_]=(0,n.useState)(""),[k,C]=(0,n.useState)(null),[A,q]=(0,n.useState)(""),[T,D]=(0,n.useState)(""),[L,W]=(0,n.useState)(!1),[R,P]=(0,n.useState)(""),[X,O]=(0,n.useState)(!1),E=(0,n.useCallback)(async()=>{try{var e;let[s,a,t]=await Promise.all([r("/api/whatsapp/status"),r("/api/whatsapp/qr"),r("/api/whatsapp/messages?limit=50")]);d(s.json),h(a.json),x((null==(e=t.json)?void 0:e.messages)||[]),g(null)}catch(e){g(e.message)}},[]);(0,n.useEffect)(()=>{E();let e=setInterval(E,3500);return()=>clearInterval(e)},[E]),(0,n.useEffect)(()=>{let e=!1;return async function(){if((null==o?void 0:o.paired)||!(null==o?void 0:o.qr))return m("");try{let s=await i.toDataURL(o.qr,{margin:1,width:220,errorCorrectionLevel:"M"});e||m(s)}catch(s){e||m("")}}(),()=>{e=!0}},[o]);let I=(null==c?void 0:c.health)||{},z=(null==c?void 0:c.allowlist)||[],M=I.pairing_state||(!1===I.ok?"offline":"unknown"),B=I.last_connected_at?new Date(I.last_connected_at).toLocaleTimeString():"—",F=(0,n.useMemo)(()=>(0,t.jsx)("p",{className:"whatsapp-warn-copy",children:"Pair only a dedicated WhatsApp number, not your personal account. Baileys is an unofficial WhatsApp Web client and the paired account can be banned."}),[]);async function J(e){if(e.preventDefault(),!v.trim())return;y(!0),_("");let s=await r("/api/whatsapp/allowlist",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({chat_id:v.trim(),label:N.trim()||null})});if(y(!1),!s.ok){var a;_((null==(a=s.json)?void 0:a.error)||"Failed to add");return}f(""),w(""),E()}async function Q(e){var s;C(e);let a=await r("/api/whatsapp/allowlist?chat_id=".concat(encodeURIComponent(e)),{method:"DELETE"});C(null),a.ok?E():g((null==(s=a.json)?void 0:s.error)||"Failed to remove")}async function U(e){if(e.preventDefault(),!A.trim()||!T.trim())return;W(!0),P(""),O(!1);let s=await r("/api/whatsapp/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({chat_id:A.trim(),text:T.trim()})});if(W(!1),!s.ok){var a;P((null==(a=s.json)?void 0:a.error)||"Failed to send");return}D(""),O(!0),E()}return(0,t.jsxs)("div",{className:"wa-section",children:[(0,t.jsxs)("div",{className:"wa-status-row",children:[(0,t.jsx)("span",{className:"admin-pill ".concat("paired"===M?"ready":"qr_required"===M||"reconnecting"===M||"starting"===M?"warn":"danger"),children:"paired"===M?"Connected":"qr_required"===M?"Awaiting QR scan":"reconnecting"===M?"Reconnecting":"logged_out"===M?"Logged out — reset session":"starting"===M?"Starting":"Bridge offline"}),I.user&&(0,t.jsx)("span",{className:"wa-status-user",children:I.user})]}),j&&(0,t.jsx)("div",{className:"wa-error-banner",children:j}),(0,t.jsx)("nav",{className:"tools-subnav",role:"tablist","aria-label":"WhatsApp sections",children:l.map(e=>{let[n,i,l]=e;return(0,t.jsxs)("button",{type:"button",role:"tab","aria-selected":s===n,className:"tools-subnav-pill"+(s===n?" on":""),onClick:()=>a(n),children:[(0,t.jsx)("b",{children:i}),(0,t.jsx)("small",{children:l})]},n)})}),"pairing"===s&&(0,t.jsxs)("div",{className:"tools-pane",children:[(0,t.jsxs)("div",{className:"wa-stats-row",children:[(0,t.jsxs)("div",{className:"wa-stat",children:[(0,t.jsx)("span",{className:"wa-stat-label",children:"Paired account"}),(0,t.jsx)("span",{className:"wa-stat-value",children:I.user||"—"})]}),(0,t.jsxs)("div",{className:"wa-stat",children:[(0,t.jsx)("span",{className:"wa-stat-label",children:"Bridge queue"}),(0,t.jsx)("span",{className:"wa-stat-value",children:null!=(e=I.queue_size)?e:0})]}),(0,t.jsxs)("div",{className:"wa-stat",children:[(0,t.jsx)("span",{className:"wa-stat-label",children:"Last connected"}),(0,t.jsx)("span",{className:"wa-stat-value",children:B})]})]}),I.last_error&&(0,t.jsx)("div",{className:"wa-error-banner",children:I.last_error}),"paired"!==M?(0,t.jsxs)("div",{className:"config-secrets-panel",style:{marginTop:0},children:[(0,t.jsx)("div",{className:"config-secrets-head",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"config-section-title",children:"Pair device"}),(0,t.jsx)("p",{children:"Open WhatsApp → Settings → Linked Devices → Link a Device, then scan the code."})]})}),(0,t.jsxs)("div",{className:"whatsapp-pair-row",children:[p?(0,t.jsx)("div",{className:"whatsapp-qr-box",children:(0,t.jsx)("img",{src:p,alt:"WhatsApp pairing QR code",width:220,height:220})}):(0,t.jsx)("div",{className:"whatsapp-qr-pending",children:"Waiting for QR — make sure the daemon is running."}),(0,t.jsxs)("div",{className:"whatsapp-pair-copy",children:[(0,t.jsxs)("p",{children:["Code rotates roughly every 20 seconds. The dashboard re-fetches automatically. The session is saved at ",(0,t.jsx)("code",{children:"data/whatsapp/session/"}),"."]}),F]})]})]}):(0,t.jsxs)("div",{className:"config-secrets-panel",style:{marginTop:0},children:[(0,t.jsx)("div",{className:"config-secrets-head",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"config-section-title",children:"Bridge is paired"}),(0,t.jsx)("p",{children:"The WhatsApp session is active. Allowlisted senders can message this agent directly."})]})}),F]})]}),"allowlist"===s&&(0,t.jsx)("div",{className:"tools-pane",children:(0,t.jsxs)("div",{className:"config-secrets-panel",children:[(0,t.jsx)("div",{className:"config-secrets-head",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"config-section-title",children:"Allowed senders"}),(0,t.jsx)("p",{children:"Only chats on this list can message the agent. Add new entries below."})]})}),(0,t.jsxs)("form",{className:"secrets-add-form",onSubmit:J,children:[(0,t.jsxs)("div",{className:"secrets-add-fields",children:[(0,t.jsxs)("label",{className:"config-env-field",children:[(0,t.jsx)("span",{className:"config-env-field-top",children:(0,t.jsx)("b",{children:"Chat id"})}),(0,t.jsx)("input",{type:"text",autoComplete:"off",placeholder:"9715XXXXXXXX or full JID",value:v,onChange:e=>f(e.target.value),required:!0})]}),(0,t.jsxs)("label",{className:"config-env-field",children:[(0,t.jsxs)("span",{className:"config-env-field-top",children:[(0,t.jsx)("b",{children:"Label"}),(0,t.jsx)("em",{style:{fontStyle:"normal",fontSize:"10px",color:"#68707b",background:"transparent",padding:0},children:"optional"})]}),(0,t.jsx)("input",{type:"text",autoComplete:"off",placeholder:"e.g. Founder phone",value:N,onChange:e=>w(e.target.value)})]})]}),(0,t.jsxs)("div",{className:"secrets-add-footer",children:[S&&(0,t.jsx)("span",{className:"secrets-error",children:S}),(0,t.jsx)("button",{type:"submit",className:"config-save-btn",disabled:b||!v.trim(),children:b?"Adding...":"Add to allowlist"})]})]}),0===z.length?(0,t.jsx)("div",{className:"allowlists-entries-empty",children:"No senders allowlisted — all inbound messages are dropped. Add at least one chat id above."}):(0,t.jsx)("div",{className:"config-tools-list",children:z.map(e=>(0,t.jsx)("div",{className:"config-tool-row on",children:(0,t.jsxs)("div",{className:"secrets-row-inner",children:[(0,t.jsxs)("div",{className:"secrets-row-meta",children:[(0,t.jsxs)("div",{className:"config-tool-titleline",children:[(0,t.jsx)("span",{className:"config-tool-name",style:{textTransform:"none"},children:(0,t.jsx)("code",{className:"whatsapp-mono",children:e.chat_id})}),e.kind&&(0,t.jsx)("span",{className:"config-tool-risk",children:e.kind})]}),(e.label||e.created_at)&&(0,t.jsxs)("div",{className:"config-tool-status",children:[e.label&&(0,t.jsx)("span",{children:e.label}),e.created_at&&(0,t.jsx)("span",{children:new Date(e.created_at).toLocaleString()})]})]}),(0,t.jsx)("div",{className:"secrets-row-actions",children:(0,t.jsx)("button",{type:"button",className:"secrets-action-btn danger",disabled:k===e.chat_id,onClick:()=>Q(e.chat_id),children:k===e.chat_id?"...":"Remove"})})]})},e.chat_id))})]})}),"messages"===s&&(0,t.jsx)("div",{className:"tools-pane",children:(0,t.jsxs)("div",{className:"config-secrets-panel",children:[(0,t.jsx)("div",{className:"config-secrets-head",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"config-section-title",children:"Recent messages"}),(0,t.jsxs)("p",{children:[u.length," of last 50 inbound + outbound."]})]})}),0===u.length?(0,t.jsx)("div",{className:"secrets-empty",children:"No messages yet. Inbound and outbound traffic from the bridge will appear here."}):(0,t.jsx)("div",{style:{overflowX:"auto"},children:(0,t.jsxs)("table",{className:"admin-table",style:{minWidth:520},children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:"When"}),(0,t.jsx)("th",{children:"Dir"}),(0,t.jsx)("th",{children:"Chat"}),(0,t.jsx)("th",{children:"Sender"}),(0,t.jsx)("th",{children:"Text"})]})}),(0,t.jsx)("tbody",{children:u.map(e=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{style:{whiteSpace:"nowrap"},children:new Date(e.created_at).toLocaleTimeString()}),(0,t.jsx)("td",{children:(0,t.jsx)("span",{className:"admin-pill ".concat("inbound"===e.direction?"warn":"ready"),children:e.direction})}),(0,t.jsx)("td",{children:(0,t.jsx)("code",{className:"whatsapp-mono",children:e.chat_id})}),(0,t.jsx)("td",{children:(0,t.jsx)("code",{className:"whatsapp-mono",children:e.sender||"—"})}),(0,t.jsx)("td",{style:{maxWidth:260,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.text})]},e.id))})]})})]})}),"send"===s&&(0,t.jsx)("div",{className:"tools-pane",children:(0,t.jsxs)("div",{className:"config-secrets-panel",children:[(0,t.jsx)("div",{className:"config-secrets-head",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"config-section-title",children:"Send a message"}),(0,t.jsx)("p",{children:"Manual outbound send. Logs to whatsapp_messages with an audit row."})]})}),(0,t.jsxs)("form",{className:"secrets-add-form",onSubmit:U,children:[(0,t.jsxs)("div",{className:"secrets-add-fields",children:[(0,t.jsxs)("label",{className:"config-env-field",children:[(0,t.jsx)("span",{className:"config-env-field-top",children:(0,t.jsx)("b",{children:"Chat id"})}),(0,t.jsx)("input",{type:"text",autoComplete:"off",placeholder:"Digits or full JID",value:A,onChange:e=>{q(e.target.value),O(!1)},required:!0})]}),(0,t.jsxs)("label",{className:"config-env-field",children:[(0,t.jsx)("span",{className:"config-env-field-top",children:(0,t.jsx)("b",{children:"Message"})}),(0,t.jsx)("textarea",{rows:4,placeholder:"Plain text only",value:T,onChange:e=>{D(e.target.value),O(!1)},required:!0,style:{resize:"vertical",fontFamily:"inherit",fontSize:"13px",padding:"8px 10px",borderRadius:8,border:"1px solid rgba(17,19,24,.12)",outline:"none",width:"100%",boxSizing:"border-box"}})]})]}),(0,t.jsxs)("div",{className:"secrets-add-footer",children:[R&&(0,t.jsx)("span",{className:"secrets-error",children:R}),X&&(0,t.jsx)("span",{style:{fontSize:12,color:"#2d7044",fontWeight:650},children:"Sent"}),(0,t.jsx)("button",{type:"submit",className:"config-save-btn",disabled:L||!A.trim()||!T.trim(),children:L?"Sending...":"Send message"})]})]})]})})]})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5730],{3995:(e,t,s)=>{s.d(t,{A:()=>b});var r=s(6417),i=s(2647),a=s(1837),n=s(1702),o=s(6707),l=s(725),u=s(7378),h=s(9678),c=s(8914),d=s(4174),_=s(9915),w=s(9242);(0,h.V)();let g={url:i.nf,storageKey:i.AQ,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:i.Rn,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function f(e,t,s){return await s()}let y={};class p{get jwks(){var e,t;return null!=(t=null==(e=y[this.storageKey])?void 0:e.jwks)?t:{keys:[]}}set jwks(e){y[this.storageKey]=Object.assign(Object.assign({},y[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,t;return null!=(t=null==(e=y[this.storageKey])?void 0:e.cachedAt)?t:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){y[this.storageKey]=Object.assign(Object.assign({},y[this.storageKey]),{cachedAt:e})}constructor(e){var t,s,i,a;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;let n=Object.assign(Object.assign({},g),e);if(this.storageKey=n.storageKey,this.instanceID=null!=(t=p.nextInstanceID[this.storageKey])?t:0,p.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!n.debug,"function"==typeof n.debug&&(this.logger=n.debug),this.instanceID>0&&(0,o.Bd)()){let e=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(e),this.logDebugMessages&&console.trace(e)}if(this.persistSession=n.persistSession,this.autoRefreshToken=n.autoRefreshToken,this.experimental=null!=(s=n.experimental)?s:{},this.admin=new r.A({url:n.url,headers:n.headers,fetch:n.fetch,experimental:this.experimental}),this.url=n.url,this.headers=n.headers,this.fetch=(0,o.lA)(n.fetch),this.lock=n.lock||f,this.detectSessionInUrl=n.detectSessionInUrl,this.flowType=n.flowType,this.hasCustomAuthorizationHeader=n.hasCustomAuthorizationHeader,this.throwOnError=n.throwOnError,this.lockAcquireTimeout=n.lockAcquireTimeout,n.lock?this.lock=n.lock:this.persistSession&&(0,o.Bd)()&&(null==(i=null==globalThis?void 0:globalThis.navigator)?void 0:i.locks)?this.lock=u.JS:this.lock=f,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new w.H1(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(n.storage?this.storage=n.storage:(0,o.LJ)()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=(0,l.r)(this.memoryStorage)),n.userStorage&&(this.userStorage=n.userStorage)):(this.memoryStorage={},this.storage=(0,l.r)(this.memoryStorage)),(0,o.Bd)()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(e){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",e)}null==(a=this.broadcastChannel)||a.addEventListener("message",async e=>{this._debug("received broadcast notification from other tab or client",e);try{await this._notifyAllSubscribers(e.data.event,e.data.session,!1)}catch(e){this._debug("#broadcastChannel","error",e)}})}n.skipAutoInitialize||this.initialize().catch(e=>{this._debug("#initialize()","error",e)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${c.r}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise||(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))()),await this.initializePromise}async _initialize(){var e;try{let t={},s="none";if((0,o.Bd)()&&(t=(0,o.XR)(window.location.href),this._isImplicitGrantCallback(t)?s="implicit":await this._isPKCECallback(t)&&(s="pkce")),(0,o.Bd)()&&this.detectSessionInUrl&&"none"!==s){let{data:r,error:i}=await this._getSessionFromURL(t,s);if(i){(this._debug("#_initialize()","error detecting session from URL",i),(0,a.MJ)(i))&&(null==(e=i.details)||e.code);return{error:i}}let{session:n,redirectType:o}=r;return this._debug("#_initialize()","detected session in URL",n,"redirect type",o),await this._saveSession(n),setTimeout(async()=>{"recovery"===o?await this._notifyAllSubscribers("PASSWORD_RECOVERY",n):await this._notifyAllSubscribers("SIGNED_IN",n)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(e){if((0,a.HY)(e))return this._returnResult({error:e});return this._returnResult({error:new a.HU("Unexpected error during initialization",e)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var t,s,r;try{let{data:i,error:a}=await (0,n.vE)(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:null!=(s=null==(t=null==e?void 0:e.options)?void 0:t.data)?s:{},gotrue_meta_security:{captcha_token:null==(r=null==e?void 0:e.options)?void 0:r.captchaToken}},xform:n.R_});if(a||!i)return this._returnResult({data:{user:null,session:null},error:a});let o=i.session,l=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",o)),this._returnResult({data:{user:l,session:o},error:null})}catch(e){if((0,a.HY)(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signUp(e){var t,s,r;try{let i;if("email"in e){let{email:s,password:r,options:a}=e,l=null,u=null;"pkce"===this.flowType&&([l,u]=await (0,o.dS)(this.storage,this.storageKey)),i=await (0,n.vE)(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:null==a?void 0:a.emailRedirectTo,body:{email:s,password:r,data:null!=(t=null==a?void 0:a.data)?t:{},gotrue_meta_security:{captcha_token:null==a?void 0:a.captchaToken},code_challenge:l,code_challenge_method:u},xform:n.R_})}else if("phone"in e){let{phone:t,password:a,options:o}=e;i=await (0,n.vE)(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:t,password:a,data:null!=(s=null==o?void 0:o.data)?s:{},channel:null!=(r=null==o?void 0:o.channel)?r:"sms",gotrue_meta_security:{captcha_token:null==o?void 0:o.captchaToken}},xform:n.R_})}else throw new a.U_("You must provide either an email or phone number and a password");let{data:l,error:u}=i;if(u||!l)return await (0,o.Gb)(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:u});let h=l.session,c=l.user;return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",h)),this._returnResult({data:{user:c,session:h},error:null})}catch(e){if(await (0,o.Gb)(this.storage,`${this.storageKey}-code-verifier`),(0,a.HY)(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithPassword(e){try{let t;if("email"in e){let{email:s,password:r,options:i}=e;t=await (0,n.vE)(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:s,password:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},xform:n.GC})}else if("phone"in e){let{phone:s,password:r,options:i}=e;t=await (0,n.vE)(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:s,password:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},xform:n.GC})}else throw new a.U_("You must provide either an email or phone number and a password");let{data:s,error:r}=t;if(r)return this._returnResult({data:{user:null,session:null},error:r});if(!s||!s.session||!s.user){let e=new a.Ox;return this._returnResult({data:{user:null,session:null},error:e})}return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:Object.assign({user:s.user,session:s.session},s.weak_password?{weakPassword:s.weak_password}:null),error:r})}catch(e){if((0,a.HY)(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithOAuth(e){var t,s,r,i;return await this._handleProviderSignIn(e.provider,{redirectTo:null==(t=e.options)?void 0:t.redirectTo,scopes:null==(s=e.options)?void 0:s.scopes,queryParams:null==(r=e.options)?void 0:r.queryParams,skipBrowserRedirect:null==(i=e.options)?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){let{chain:t}=e;switch(t){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw Error(`@supabase/auth-js: Unsupported chain "${t}"`)}}async signInWithEthereum(e){var t,s,r,i,l,u,h,c,d,w,g;let f,y;if("message"in e)f=e.message,y=e.signature;else{let a,{chain:n,wallet:w,statement:g,options:p}=e;if((0,o.Bd)())if("object"==typeof w)a=w;else{let e=window;if("ethereum"in e&&"object"==typeof e.ethereum&&"request"in e.ethereum&&"function"==typeof e.ethereum.request)a=e.ethereum;else throw Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if("object"!=typeof w||!(null==p?void 0:p.url))throw Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");a=w}let b=new URL(null!=(t=null==p?void 0:p.url)?t:window.location.href),v=await a.request({method:"eth_requestAccounts"}).then(e=>e).catch(()=>{throw Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!v||0===v.length)throw Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");let k=(0,_.bv)(v[0]),m=null==(s=null==p?void 0:p.signInWithEthereum)?void 0:s.chainId;if(!m){let e=await a.request({method:"eth_chainId"});m=(0,_.aD)(e)}let S={domain:b.host,address:k,statement:g,uri:b.href,version:"1",chainId:m,nonce:null==(r=null==p?void 0:p.signInWithEthereum)?void 0:r.nonce,issuedAt:null!=(l=null==(i=null==p?void 0:p.signInWithEthereum)?void 0:i.issuedAt)?l:new Date,expirationTime:null==(u=null==p?void 0:p.signInWithEthereum)?void 0:u.expirationTime,notBefore:null==(h=null==p?void 0:p.signInWithEthereum)?void 0:h.notBefore,requestId:null==(c=null==p?void 0:p.signInWithEthereum)?void 0:c.requestId,resources:null==(d=null==p?void 0:p.signInWithEthereum)?void 0:d.resources};f=(0,_.ob)(S),y=await a.request({method:"personal_sign",params:[(0,_.nj)(f),k]})}try{let{data:t,error:s}=await (0,n.vE)(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:y},(null==(w=e.options)?void 0:w.captchaToken)?{gotrue_meta_security:{captcha_token:null==(g=e.options)?void 0:g.captchaToken}}:null),xform:n.R_});if(s)throw s;if(!t||!t.session||!t.user){let e=new a.Ox;return this._returnResult({data:{user:null,session:null},error:e})}return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers("SIGNED_IN",t.session)),this._returnResult({data:Object.assign({},t),error:s})}catch(e){if((0,a.HY)(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithSolana(e){var t,s,r,i,l,u,h,c,_,w,g,f;let y,p;if("message"in e)y=e.message,p=e.signature;else{let a,{chain:n,wallet:d,statement:g,options:f}=e;if((0,o.Bd)())if("object"==typeof d)a=d;else{let e=window;if("solana"in e&&"object"==typeof e.solana&&("signIn"in e.solana&&"function"==typeof e.solana.signIn||"signMessage"in e.solana&&"function"==typeof e.solana.signMessage))a=e.solana;else throw Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if("object"!=typeof d||!(null==f?void 0:f.url))throw Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");a=d}let b=new URL(null!=(t=null==f?void 0:f.url)?t:window.location.href);if("signIn"in a&&a.signIn){let e,t=await a.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},null==f?void 0:f.signInWithSolana),{version:"1",domain:b.host,uri:b.href}),g?{statement:g}:null));if(Array.isArray(t)&&t[0]&&"object"==typeof t[0])e=t[0];else if(t&&"object"==typeof t&&"signedMessage"in t&&"signature"in t)e=t;else throw Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in e&&"signature"in e&&("string"==typeof e.signedMessage||e.signedMessage instanceof Uint8Array)&&e.signature instanceof Uint8Array)y="string"==typeof e.signedMessage?e.signedMessage:new TextDecoder().decode(e.signedMessage),p=e.signature;else throw Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in a)||"function"!=typeof a.signMessage||!("publicKey"in a)||"object"!=typeof a||!a.publicKey||!("toBase58"in a.publicKey)||"function"!=typeof a.publicKey.toBase58)throw Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");y=[`${b.host} wants you to sign in with your Solana account:`,a.publicKey.toBase58(),...g?["",g,""]:[""],"Version: 1",`URI: ${b.href}`,`Issued At: ${null!=(r=null==(s=null==f?void 0:f.signInWithSolana)?void 0:s.issuedAt)?r:new Date().toISOString()}`,...(null==(i=null==f?void 0:f.signInWithSolana)?void 0:i.notBefore)?[`Not Before: ${f.signInWithSolana.notBefore}`]:[],...(null==(l=null==f?void 0:f.signInWithSolana)?void 0:l.expirationTime)?[`Expiration Time: ${f.signInWithSolana.expirationTime}`]:[],...(null==(u=null==f?void 0:f.signInWithSolana)?void 0:u.chainId)?[`Chain ID: ${f.signInWithSolana.chainId}`]:[],...(null==(h=null==f?void 0:f.signInWithSolana)?void 0:h.nonce)?[`Nonce: ${f.signInWithSolana.nonce}`]:[],...(null==(c=null==f?void 0:f.signInWithSolana)?void 0:c.requestId)?[`Request ID: ${f.signInWithSolana.requestId}`]:[],...(null==(w=null==(_=null==f?void 0:f.signInWithSolana)?void 0:_.resources)?void 0:w.length)?["Resources",...f.signInWithSolana.resources.map(e=>`- ${e}`)]:[]].join("\n");let e=await a.signMessage(new TextEncoder().encode(y),"utf8");if(!e||!(e instanceof Uint8Array))throw Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");p=e}}try{let{data:t,error:s}=await (0,n.vE)(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:(0,d.no)(p)},(null==(g=e.options)?void 0:g.captchaToken)?{gotrue_meta_security:{captcha_token:null==(f=e.options)?void 0:f.captchaToken}}:null),xform:n.R_});if(s)throw s;if(!t||!t.session||!t.user){let e=new a.Ox;return this._returnResult({data:{user:null,session:null},error:e})}return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers("SIGNED_IN",t.session)),this._returnResult({data:Object.assign({},t),error:s})}catch(e){if((0,a.HY)(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _exchangeCodeForSession(e){let t=await (0,o.U9)(this.storage,`${this.storageKey}-code-verifier`),[s,r]=(null!=t?t:"").split("/");try{if(!s&&"pkce"===this.flowType)throw new a.lh;let{data:t,error:i}=await (0,n.vE)(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:s},xform:n.R_});if(await (0,o.Gb)(this.storage,`${this.storageKey}-code-verifier`),i)throw i;if(!t||!t.session||!t.user){let e=new a.Ox;return this._returnResult({data:{user:null,session:null,redirectType:null},error:e})}return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers("recovery"===r?"PASSWORD_RECOVERY":"SIGNED_IN",t.session)),this._returnResult({data:Object.assign(Object.assign({},t),{redirectType:null!=r?r:null}),error:i})}catch(e){if(await (0,o.Gb)(this.storage,`${this.storageKey}-code-verifier`),(0,a.HY)(e))return this._returnResult({data:{user:null,session:null,redirectType:null},error:e});throw e}}async signInWithIdToken(e){try{let{options:t,provider:s,token:r,access_token:i,nonce:o}=e,{data:l,error:u}=await (0,n.vE)(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:s,id_token:r,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:null==t?void 0:t.captchaToken}},xform:n.R_});if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){let e=new a.Ox;return this._returnResult({data:{user:null,session:null},error:e})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(e){if((0,a.HY)(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithOtp(e){var t,s,r,i,l;try{if("email"in e){let{email:r,options:i}=e,a=null,l=null;"pkce"===this.flowType&&([a,l]=await (0,o.dS)(this.storage,this.storageKey));let{error:u}=await (0,n.vE)(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:r,data:null!=(t=null==i?void 0:i.data)?t:{},create_user:null==(s=null==i?void 0:i.shouldCreateUser)||s,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken},code_challenge:a,code_challenge_method:l},redirectTo:null==i?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:u})}if("phone"in e){let{phone:t,options:s}=e,{data:a,error:o}=await (0,n.vE)(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:t,data:null!=(r=null==s?void 0:s.data)?r:{},create_user:null==(i=null==s?void 0:s.shouldCreateUser)||i,gotrue_meta_security:{captcha_token:null==s?void 0:s.captchaToken},channel:null!=(l=null==s?void 0:s.channel)?l:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:null==a?void 0:a.message_id},error:o})}throw new a.U_("You must provide either an email or phone number.")}catch(e){if(await (0,o.Gb)(this.storage,`${this.storageKey}-code-verifier`),(0,a.HY)(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async verifyOtp(e){var t,s;try{let r,i;"options"in e&&(r=null==(t=e.options)?void 0:t.redirectTo,i=null==(s=e.options)?void 0:s.captchaToken);let{data:a,error:o}=await (0,n.vE)(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:r,xform:n.R_});if(o)throw o;if(!a)throw Error("An error occurred on token verification.");let l=a.session,u=a.user;return(null==l?void 0:l.access_token)&&(await this._saveSession(l),await this._notifyAllSubscribers("recovery"==e.type?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(e){if((0,a.HY)(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithSSO(e){var t,s,r,i,l;try{let a=null,u=null;"pkce"===this.flowType&&([a,u]=await (0,o.dS)(this.storage,this.storageKey));let h=await (0,n.vE)(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:null!=(s=null==(t=e.options)?void 0:t.redirectTo)?s:void 0}),(null==(r=null==e?void 0:e.options)?void 0:r.captchaToken)?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:u}),headers:this.headers,xform:n.c2});return(null==(i=h.data)?void 0:i.url)&&(0,o.Bd)()&&!(null==(l=e.options)?void 0:l.skipBrowserRedirect)&&window.location.assign(h.data.url),this._returnResult(h)}catch(e){if(await (0,o.Gb)(this.storage,`${this.storageKey}-code-verifier`),(0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{let{data:{session:t},error:s}=e;if(s)throw s;if(!t)throw new a.jG;let{error:r}=await (0,n.vE)(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return this._returnResult({data:{user:null,session:null},error:r})})}catch(e){if((0,a.HY)(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{let t=`${this.url}/resend`;if("email"in e){let{email:s,type:r,options:i}=e,{error:a}=await (0,n.vE)(this.fetch,"POST",t,{headers:this.headers,body:{email:s,type:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},redirectTo:null==i?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:a})}if("phone"in e){let{phone:s,type:r,options:i}=e,{data:a,error:o}=await (0,n.vE)(this.fetch,"POST",t,{headers:this.headers,body:{phone:s,type:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:null==a?void 0:a.message_id},error:o})}throw new a.U_("You must provide either an email or phone number and a type")}catch(e){if((0,a.HY)(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e))}async _acquireLock(e,t){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){let e=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await e,await t()))();return this.pendingInLock.push((async()=>{try{await s}catch(e){}})()),s}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;let e=t();for(this.pendingInLock.push((async()=>{try{await e}catch(e){}})()),await e;this.pendingInLock.length;){let e=[...this.pendingInLock];await Promise.all(e),this.pendingInLock.splice(0,e.length)}return await e}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{let t=await this.__loadSession();return await e(t)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",Error().stack);try{let e=null,t=await (0,o.U9)(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",t),null!==t&&(this._isValidSession(t)?e=t:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};let s=!!e.expires_at&&1e3*e.expires_at-Date.now()<i.CT;if(this._debug("#__loadSession()",`session has${s?"":" not"} expired`,"expires_at",e.expires_at),!s){if(this.userStorage){let t=await (0,o.U9)(this.userStorage,this.storageKey+"-user");(null==t?void 0:t.user)?e.user=t.user:e.user=(0,o.QE)()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){let t={value:this.suppressGetSessionWarning};e.user=(0,o.uO)(e.user,t),t.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}let{data:r,error:a}=await this._callRefreshToken(e.refresh_token);if(a)return this._returnResult({data:{session:null},error:a});return this._returnResult({data:{session:r},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;let t=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return t.data.user&&(this.suppressGetSessionWarning=!0),t}async _getUser(e){try{if(e)return await (0,n.vE)(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:n.Cl});return await this._useSession(async e=>{var t,s,r;let{data:i,error:o}=e;if(o)throw o;return(null==(t=i.session)?void 0:t.access_token)||this.hasCustomAuthorizationHeader?await (0,n.vE)(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:null!=(r=null==(s=i.session)?void 0:s.access_token)?r:void 0,xform:n.Cl}):{data:{user:null},error:new a.jG}})}catch(e){if((0,a.HY)(e))return(0,a.zq)(e)&&(await this._removeSession(),await (0,o.Gb)(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:e});throw e}}async updateUser(e,t={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,t))}async _updateUser(e,t={}){try{return await this._useSession(async s=>{let{data:r,error:i}=s;if(i)throw i;if(!r.session)throw new a.jG;let l=r.session,u=null,h=null;"pkce"===this.flowType&&null!=e.email&&([u,h]=await (0,o.dS)(this.storage,this.storageKey));let{data:c,error:d}=await (0,n.vE)(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:null==t?void 0:t.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:u,code_challenge_method:h}),jwt:l.access_token,xform:n.Cl});if(d)throw d;return l.user=c.user,await this._saveSession(l),await this._notifyAllSubscribers("USER_UPDATED",l),this._returnResult({data:{user:l.user},error:null})})}catch(e){if(await (0,o.Gb)(this.storage,`${this.storageKey}-code-verifier`),(0,a.HY)(e))return this._returnResult({data:{user:null},error:e});throw e}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new a.jG;let t=Date.now()/1e3,s=t,r=!0,i=null,{payload:n}=(0,o.Cq)(e.access_token);if(n.exp&&(r=(s=n.exp)<=t),r){let{data:t,error:s}=await this._callRefreshToken(e.refresh_token);if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!t)return{data:{user:null,session:null},error:null};i=t}else{let{data:r,error:a}=await this._getUser(e.access_token);if(a)return this._returnResult({data:{user:null,session:null},error:a});i={access_token:e.access_token,refresh_token:e.refresh_token,user:r.user,token_type:"bearer",expires_in:s-t,expires_at:s},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(e){if((0,a.HY)(e))return this._returnResult({data:{session:null,user:null},error:e});throw e}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async t=>{var s;if(!e){let{data:r,error:i}=t;if(i)throw i;e=null!=(s=r.session)?s:void 0}if(!(null==e?void 0:e.refresh_token))throw new a.jG;let{data:r,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):r?this._returnResult({data:{user:r.user,session:r},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(e){if((0,a.HY)(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _getSessionFromURL(e,t){var s;try{if(!(0,o.Bd)())throw new a.MR("No browser detected.");if(e.error||e.error_description||e.error_code)throw new a.MR(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(t){case"implicit":if("pkce"===this.flowType)throw new a.Uw("Not a valid PKCE flow url.");break;case"pkce":if("implicit"===this.flowType)throw new a.MR("Not a valid implicit grant flow url.")}if("pkce"===t){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new a.Uw("No code detected.");let{data:t,error:r}=await this._exchangeCodeForSession(e.code);if(r)throw r;let i=new URL(window.location.href);return i.searchParams.delete("code"),window.history.replaceState(window.history.state,"",i.toString()),{data:{session:t.session,redirectType:null!=(s=t.redirectType)?s:null},error:null}}let{provider_token:r,provider_refresh_token:n,access_token:l,refresh_token:u,expires_in:h,expires_at:c,token_type:d}=e;if(!l||!h||!u||!d)throw new a.MR("No session defined in URL");let _=Math.round(Date.now()/1e3),w=parseInt(h),g=_+w;c&&(g=parseInt(c));let f=g-_;1e3*f<=i.a4&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${w}s`);let y=g-w;_-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,g,_):_-y<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",y,g,_);let{data:p,error:b}=await this._getUser(l);if(b)throw b;let v={provider_token:r,provider_refresh_token:n,access_token:l,expires_in:w,expires_at:g,refresh_token:u,token_type:d,user:p.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:v,redirectType:e.type},error:null})}catch(e){if((0,a.HY)(e))return this._returnResult({data:{session:null,redirectType:null},error:e});throw e}}_isImplicitGrantCallback(e){return"function"==typeof this.detectSessionInUrl?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){let t=await (0,o.U9)(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&t)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async t=>{var s;let{data:r,error:i}=t;if(i&&!(0,a.zq)(i))return this._returnResult({error:i});let n=null==(s=r.session)?void 0:s.access_token;if(n){let{error:t}=await this.admin.signOut(n,e);if(t&&!((0,a.NA)(t)&&(404===t.status||401===t.status||403===t.status)||(0,a.zq)(t)))return this._returnResult({error:t})}return"others"!==e&&(await this._removeSession(),await (0,o.Gb)(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){let t=(0,o.KY)(),s={id:t,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",t),this.stateChangeEmitters.delete(t)}};return this._debug("#onAuthStateChange()","registered callback with id",t),this.stateChangeEmitters.set(t,s),(async()=>{await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(t)})})(),{data:{subscription:s}}}async _emitInitialSession(e){return await this._useSession(async t=>{var s,r;try{let{data:{session:r},error:i}=t;if(i)throw i;await (null==(s=this.stateChangeEmitters.get(e))?void 0:s.callback("INITIAL_SESSION",r)),this._debug("INITIAL_SESSION","callback id",e,"session",r)}catch(t){await (null==(r=this.stateChangeEmitters.get(e))?void 0:r.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",t),(0,a.zq)(t)?console.warn(t):console.error(t)}})}async resetPasswordForEmail(e,t={}){let s=null,r=null;"pkce"===this.flowType&&([s,r]=await (0,o.dS)(this.storage,this.storageKey,!0));try{return await (0,n.vE)(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:s,code_challenge_method:r,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(e){if(await (0,o.Gb)(this.storage,`${this.storageKey}-code-verifier`),(0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}async getUserIdentities(){var e;try{let{data:t,error:s}=await this.getUser();if(s)throw s;return this._returnResult({data:{identities:null!=(e=t.user.identities)?e:[]},error:null})}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var t;try{let{data:s,error:r}=await this._useSession(async t=>{var s,r,i,a,o;let{data:l,error:u}=t;if(u)throw u;let h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:null==(s=e.options)?void 0:s.redirectTo,scopes:null==(r=e.options)?void 0:r.scopes,queryParams:null==(i=e.options)?void 0:i.queryParams,skipBrowserRedirect:!0});return await (0,n.vE)(this.fetch,"GET",h,{headers:this.headers,jwt:null!=(o=null==(a=l.session)?void 0:a.access_token)?o:void 0})});if(r)throw r;return!(0,o.Bd)()||(null==(t=e.options)?void 0:t.skipBrowserRedirect)||window.location.assign(null==s?void 0:s.url),this._returnResult({data:{provider:e.provider,url:null==s?void 0:s.url},error:null})}catch(t){if((0,a.HY)(t))return this._returnResult({data:{provider:e.provider,url:null},error:t});throw t}}async linkIdentityIdToken(e){return await this._useSession(async t=>{var s;try{let{error:r,data:{session:i}}=t;if(r)throw r;let{options:o,provider:l,token:u,access_token:h,nonce:c}=e,{data:d,error:_}=await (0,n.vE)(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:null!=(s=null==i?void 0:i.access_token)?s:void 0,body:{provider:l,id_token:u,access_token:h,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:null==o?void 0:o.captchaToken}},xform:n.R_});if(_)return this._returnResult({data:{user:null,session:null},error:_});if(!d||!d.session||!d.user)return this._returnResult({data:{user:null,session:null},error:new a.Ox});return d.session&&(await this._saveSession(d.session),await this._notifyAllSubscribers("USER_UPDATED",d.session)),this._returnResult({data:d,error:_})}catch(e){if(await (0,o.Gb)(this.storage,`${this.storageKey}-code-verifier`),(0,a.HY)(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}})}async unlinkIdentity(e){try{return await this._useSession(async t=>{var s,r;let{data:i,error:a}=t;if(a)throw a;return await (0,n.vE)(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:null!=(r=null==(s=i.session)?void 0:s.access_token)?r:void 0})})}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}async _refreshAccessToken(e){let t=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(t,"begin");try{let s=Date.now();return await (0,o.PB)(async s=>(s>0&&await (0,o.yy)(200*Math.pow(2,s-1)),this._debug(t,"refreshing attempt",s),await (0,n.vE)(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:n.R_})),(e,t)=>{let r=200*Math.pow(2,e);return t&&(0,a.Fw)(t)&&Date.now()+r-s<i.a4})}catch(e){if(this._debug(t,"error",e),(0,a.HY)(e))return this._returnResult({data:{session:null,user:null},error:e});throw e}finally{this._debug(t,"end")}}_isValidSession(e){return"object"==typeof e&&null!==e&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,t){let s=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:t.redirectTo,scopes:t.scopes,queryParams:t.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",t,"url",s),(0,o.Bd)()&&!t.skipBrowserRedirect&&window.location.assign(s),{data:{provider:e,url:s},error:null}}async _recoverAndRefresh(){var e,t;let s="#_recoverAndRefresh()";this._debug(s,"begin");try{let r=await (0,o.U9)(this.storage,this.storageKey);if(r&&this.userStorage){let t=await (0,o.U9)(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!t&&(t={user:r.user},await (0,o.Oi)(this.userStorage,this.storageKey+"-user",t)),r.user=null!=(e=null==t?void 0:t.user)?e:(0,o.QE)()}else if(r&&!r.user&&!r.user){let e=await (0,o.U9)(this.storage,this.storageKey+"-user");e&&(null==e?void 0:e.user)?(r.user=e.user,await (0,o.Gb)(this.storage,this.storageKey+"-user"),await (0,o.Oi)(this.storage,this.storageKey,r)):r.user=(0,o.QE)()}if(this._debug(s,"session from storage",r),!this._isValidSession(r)){this._debug(s,"session is not valid"),null!==r&&await this._removeSession();return}let n=(null!=(t=r.expires_at)?t:1/0)*1e3-Date.now()<i.CT;if(this._debug(s,`session has${n?"":" not"} expired with margin of ${i.CT}s`),n){if(this.autoRefreshToken&&r.refresh_token){let{error:e}=await this._callRefreshToken(r.refresh_token);e&&(console.error(e),(0,a.Fw)(e)||(this._debug(s,"refresh failed with a non-retryable error, removing the session",e),await this._removeSession()))}}else if(r.user&&!0===r.user.__isUserNotAvailableProxy)try{let{data:e,error:t}=await this._getUser(r.access_token);!t&&(null==e?void 0:e.user)?(r.user=e.user,await this._saveSession(r),await this._notifyAllSubscribers("SIGNED_IN",r)):this._debug(s,"could not get user data, skipping SIGNED_IN notification")}catch(e){console.error("Error getting user data:",e),this._debug(s,"error getting user data, skipping SIGNED_IN notification",e)}else await this._notifyAllSubscribers("SIGNED_IN",r)}catch(e){this._debug(s,"error",e),console.error(e);return}finally{this._debug(s,"end")}}async _callRefreshToken(e){var t,s;if(!e)throw new a.jG;if(this.refreshingDeferred)return this.refreshingDeferred.promise;let r=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{this.refreshingDeferred=new o.cY;let{data:t,error:s}=await this._refreshAccessToken(e);if(s)throw s;if(!t.session)throw new a.jG;await this._saveSession(t.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",t.session);let r={data:t.session,error:null};return this.refreshingDeferred.resolve(r),r}catch(e){if(this._debug(r,"error",e),(0,a.HY)(e)){let s={data:null,error:e};return(0,a.Fw)(e)||await this._removeSession(),null==(t=this.refreshingDeferred)||t.resolve(s),s}throw null==(s=this.refreshingDeferred)||s.reject(e),e}finally{this.refreshingDeferred=null,this._debug(r,"end")}}async _notifyAllSubscribers(e,t,s=!0){let r=`#_notifyAllSubscribers(${e})`;this._debug(r,"begin",t,`broadcast = ${s}`);try{this.broadcastChannel&&s&&this.broadcastChannel.postMessage({event:e,session:t});let r=[],i=Array.from(this.stateChangeEmitters.values()).map(async s=>{try{await s.callback(e,t)}catch(e){r.push(e)}});if(await Promise.all(i),r.length>0){for(let e=0;e<r.length;e+=1)console.error(r[e]);throw r[0]}}finally{this._debug(r,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await (0,o.Gb)(this.storage,`${this.storageKey}-code-verifier`);let t=Object.assign({},e),s=t.user&&!0===t.user.__isUserNotAvailableProxy;if(this.userStorage){!s&&t.user&&await (0,o.Oi)(this.userStorage,this.storageKey+"-user",{user:t.user});let e=Object.assign({},t);delete e.user;let r=(0,o.Go)(e);await (0,o.Oi)(this.storage,this.storageKey,r)}else{let e=(0,o.Go)(t);await (0,o.Oi)(this.storage,this.storageKey,e)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await (0,o.Gb)(this.storage,this.storageKey),await (0,o.Gb)(this.storage,this.storageKey+"-code-verifier"),await (0,o.Gb)(this.storage,this.storageKey+"-user"),this.userStorage&&await (0,o.Gb)(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");let e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&(0,o.Bd)()&&(null==window?void 0:window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(e){console.error("removing visibilitychange callback failed",e)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");let e=setInterval(()=>this._autoRefreshTokenTick(),i.a4);this.autoRefreshTicker=e,e&&"object"==typeof e&&"function"==typeof e.unref?e.unref():"undefined"!=typeof Deno&&"function"==typeof Deno.unrefTimer&&Deno.unrefTimer(e);let t=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=t,t&&"object"==typeof t&&"function"==typeof t.unref?t.unref():"undefined"!=typeof Deno&&"function"==typeof Deno.unrefTimer&&Deno.unrefTimer(t)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");let e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);let t=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,t&&clearTimeout(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{let e=Date.now();try{return await this._useSession(async t=>{let{data:{session:s}}=t;if(!s||!s.refresh_token||!s.expires_at)return void this._debug("#_autoRefreshTokenTick()","no session");let r=Math.floor((1e3*s.expires_at-e)/i.a4);this._debug("#_autoRefreshTokenTick()",`access token expires in ${r} ticks, a tick lasts ${i.a4}ms, refresh threshold is ${i.YI} ticks`),r<=i.YI&&await this._callRefreshToken(s.refresh_token)})}catch(e){console.error("Auto refresh tick failed with error. This is likely a transient error.",e)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e instanceof u.nb)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!(0,o.Bd)()||!(null==window?void 0:window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},null==window||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){let t=`#_onVisibilityChanged(${e})`;this._debug(t,"visibilityState",document.visibilityState),"visible"===document.visibilityState?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if("visible"!==document.visibilityState)return void this._debug(t,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");await this._recoverAndRefresh()}))):"hidden"===document.visibilityState&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,t,s){let r=[`provider=${encodeURIComponent(t)}`];if((null==s?void 0:s.redirectTo)&&r.push(`redirect_to=${encodeURIComponent(s.redirectTo)}`),(null==s?void 0:s.scopes)&&r.push(`scopes=${encodeURIComponent(s.scopes)}`),"pkce"===this.flowType){let[e,t]=await (0,o.dS)(this.storage,this.storageKey),s=new URLSearchParams({code_challenge:`${encodeURIComponent(e)}`,code_challenge_method:`${encodeURIComponent(t)}`});r.push(s.toString())}if(null==s?void 0:s.queryParams){let e=new URLSearchParams(s.queryParams);r.push(e.toString())}return(null==s?void 0:s.skipBrowserRedirect)&&r.push(`skip_http_redirect=${s.skipBrowserRedirect}`),`${e}?${r.join("&")}`}async _unenroll(e){try{return await this._useSession(async t=>{var s;let{data:r,error:i}=t;return i?this._returnResult({data:null,error:i}):await (0,n.vE)(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:null==(s=null==r?void 0:r.session)?void 0:s.access_token})})}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}async _enroll(e){try{return await this._useSession(async t=>{var s,r;let{data:i,error:a}=t;if(a)return this._returnResult({data:null,error:a});let o=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},"phone"===e.factorType?{phone:e.phone}:"totp"===e.factorType?{issuer:e.issuer}:{}),{data:l,error:u}=await (0,n.vE)(this.fetch,"POST",`${this.url}/factors`,{body:o,headers:this.headers,jwt:null==(s=null==i?void 0:i.session)?void 0:s.access_token});return u?this._returnResult({data:null,error:u}):("totp"===e.factorType&&"totp"===l.type&&(null==(r=null==l?void 0:l.totp)?void 0:r.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}async _verify(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async t=>{var s;let{data:r,error:i}=t;if(i)return this._returnResult({data:null,error:i});let a=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:"create"===e.webauthn.type?(0,w.sy)(e.webauthn.credential_response):(0,w.CP)(e.webauthn.credential_response)})}:{code:e.code}),{data:o,error:l}=await (0,n.vE)(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:a,headers:this.headers,jwt:null==(s=null==r?void 0:r.session)?void 0:s.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),this._returnResult({data:o,error:l}))})}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}})}async _challenge(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async t=>{var s;let{data:r,error:i}=t;if(i)return this._returnResult({data:null,error:i});let a=await (0,n.vE)(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:null==(s=null==r?void 0:r.session)?void 0:s.access_token});if(a.error)return a;let{data:o}=a;if("webauthn"!==o.type)return{data:o,error:null};switch(o.webauthn.type){case"create":return{data:Object.assign(Object.assign({},o),{webauthn:Object.assign(Object.assign({},o.webauthn),{credential_options:Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:(0,w.sC)(o.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},o),{webauthn:Object.assign(Object.assign({},o.webauthn),{credential_options:Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:(0,w.KE)(o.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}})}async _challengeAndVerify(e){let{data:t,error:s}=await this._challenge({factorId:e.factorId});return s?this._returnResult({data:null,error:s}):await this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})}async _listFactors(){var e;let{data:{user:t},error:s}=await this.getUser();if(s)return{data:null,error:s};let r={all:[],phone:[],totp:[],webauthn:[]};for(let s of null!=(e=null==t?void 0:t.factors)?e:[])r.all.push(s),"verified"===s.status&&r[s.factor_type].push(s);return{data:r,error:null}}async _getAuthenticatorAssuranceLevel(e){var t,s,r,i;if(e)try{let{payload:r}=(0,o.Cq)(e),i=null;r.aal&&(i=r.aal);let a=i,{data:{user:n},error:l}=await this.getUser(e);if(l)return this._returnResult({data:null,error:l});(null!=(s=null==(t=null==n?void 0:n.factors)?void 0:t.filter(e=>"verified"===e.status))?s:[]).length>0&&(a="aal2");let u=r.amr||[];return{data:{currentLevel:i,nextLevel:a,currentAuthenticationMethods:u},error:null}}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}let{data:{session:n},error:l}=await this.getSession();if(l)return this._returnResult({data:null,error:l});if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};let{payload:u}=(0,o.Cq)(n.access_token),h=null;u.aal&&(h=u.aal);let c=h;return(null!=(i=null==(r=n.user.factors)?void 0:r.filter(e=>"verified"===e.status))?i:[]).length>0&&(c="aal2"),{data:{currentLevel:h,nextLevel:c,currentAuthenticationMethods:u.amr||[]},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async t=>{let{data:{session:s},error:r}=t;return r?this._returnResult({data:null,error:r}):s?await (0,n.vE)(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:s.access_token,xform:e=>({data:e,error:null})}):this._returnResult({data:null,error:new a.jG})})}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}async _approveAuthorization(e,t){try{return await this._useSession(async s=>{let{data:{session:r},error:i}=s;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new a.jG});let l=await (0,n.vE)(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:r.access_token,body:{action:"approve"},xform:e=>({data:e,error:null})});return l.data&&l.data.redirect_url&&(0,o.Bd)()&&!(null==t?void 0:t.skipBrowserRedirect)&&window.location.assign(l.data.redirect_url),l})}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}async _denyAuthorization(e,t){try{return await this._useSession(async s=>{let{data:{session:r},error:i}=s;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new a.jG});let l=await (0,n.vE)(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:r.access_token,body:{action:"deny"},xform:e=>({data:e,error:null})});return l.data&&l.data.redirect_url&&(0,o.Bd)()&&!(null==t?void 0:t.skipBrowserRedirect)&&window.location.assign(l.data.redirect_url),l})}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}async _listOAuthGrants(){try{return await this._useSession(async e=>{let{data:{session:t},error:s}=e;return s?this._returnResult({data:null,error:s}):t?await (0,n.vE)(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:t.access_token,xform:e=>({data:e,error:null})}):this._returnResult({data:null,error:new a.jG})})}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async t=>{let{data:{session:s},error:r}=t;return r?this._returnResult({data:null,error:r}):s?(await (0,n.vE)(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new a.jG})})}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}async fetchJwk(e,t={keys:[]}){let s=t.keys.find(t=>t.kid===e);if(s)return s;let r=Date.now();if((s=this.jwks.keys.find(t=>t.kid===e))&&this.jwks_cached_at+i.$W>r)return s;let{data:a,error:o}=await (0,n.vE)(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return a.keys&&0!==a.keys.length&&(this.jwks=a,this.jwks_cached_at=r,s=a.keys.find(t=>t.kid===e))?s:null}async getClaims(e,t={}){try{let s=e;if(!s){let{data:e,error:t}=await this.getSession();if(t||!e.session)return this._returnResult({data:null,error:t});s=e.session.access_token}let{header:r,payload:i,signature:n,raw:{header:l,payload:u}}=(0,o.Cq)(s);(null==t?void 0:t.allowExpired)||(0,o.c2)(i.exp);let h=!r.alg||r.alg.startsWith("HS")||!r.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(r.kid,(null==t?void 0:t.keys)?{keys:t.keys}:null==t?void 0:t.jwks);if(!h){let{error:e}=await this.getUser(s);if(e)throw e;return{data:{claims:i,header:r,signature:n},error:null}}let c=(0,o.K8)(r.alg),_=await crypto.subtle.importKey("jwk",h,c,!0,["verify"]);if(!await crypto.subtle.verify(c,_,n,(0,d.Al)(`${l}.${u}`)))throw new a.xL("Invalid JWT signature");return{data:{claims:i,header:r,signature:n},error:null}}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}async signInWithPasskey(e){var t,s,r;(0,o.aA)(this.experimental);try{if(!(0,w.zZ)())return this._returnResult({data:null,error:new a.HU("Browser does not support WebAuthn",null)});let{data:i,error:n}=await this._startPasskeyAuthentication({options:{captchaToken:null==(t=null==e?void 0:e.options)?void 0:t.captchaToken}});if(n||!i)return this._returnResult({data:null,error:n});let o=(0,w.KE)(i.options),l=null!=(r=null==(s=null==e?void 0:e.options)?void 0:s.signal)?r:w.uL.createNewAbortSignal(),{data:u,error:h}=await (0,w.w_)({publicKey:o,signal:l});if(h||!u)return this._returnResult({data:null,error:null!=h?h:new a.HU("WebAuthn ceremony failed",null)});let c=(0,w.CP)(u);return this._verifyPasskeyAuthentication({challengeId:i.challenge_id,credential:c})}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}async registerPasskey(e){var t,s;(0,o.aA)(this.experimental);try{if(!(0,w.zZ)())return this._returnResult({data:null,error:new a.HU("Browser does not support WebAuthn",null)});let{data:r,error:i}=await this._startPasskeyRegistration();if(i||!r)return this._returnResult({data:null,error:i});let n=(0,w.sC)(r.options),o=null!=(s=null==(t=null==e?void 0:e.options)?void 0:t.signal)?s:w.uL.createNewAbortSignal(),{data:l,error:u}=await (0,w.GO)({publicKey:n,signal:o});if(u||!l)return this._returnResult({data:null,error:null!=u?u:new a.HU("WebAuthn ceremony failed",null)});let h=(0,w.sy)(l);return this._verifyPasskeyRegistration({challengeId:r.challenge_id,credential:h})}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}async _startPasskeyRegistration(){(0,o.aA)(this.experimental);try{return await this._useSession(async e=>{let{data:{session:t},error:s}=e;if(s)return this._returnResult({data:null,error:s});if(!t)return this._returnResult({data:null,error:new a.jG});let{data:r,error:i}=await (0,n.vE)(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:t.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){(0,o.aA)(this.experimental);try{return await this._useSession(async t=>{let{data:{session:s},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!s)return this._returnResult({data:null,error:new a.jG});let{data:i,error:o}=await (0,n.vE)(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:s.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}async _startPasskeyAuthentication(e){var t;(0,o.aA)(this.experimental);try{let{data:s,error:r}=await (0,n.vE)(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:null==(t=null==e?void 0:e.options)?void 0:t.captchaToken}}});if(r)return this._returnResult({data:null,error:r});return this._returnResult({data:s,error:null})}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyAuthentication(e){(0,o.aA)(this.experimental);try{let{data:t,error:s}=await (0,n.vE)(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:n.R_});if(s)return this._returnResult({data:null,error:s});return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers("SIGNED_IN",t.session)),this._returnResult({data:t,error:null})}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}async _listPasskeys(){(0,o.aA)(this.experimental);try{return await this._useSession(async e=>{let{data:{session:t},error:s}=e;if(s)return this._returnResult({data:null,error:s});if(!t)return this._returnResult({data:null,error:new a.jG});let{data:r,error:i}=await (0,n.vE)(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:t.access_token,xform:e=>({data:e,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){(0,o.aA)(this.experimental);try{return await this._useSession(async t=>{let{data:{session:s},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!s)return this._returnResult({data:null,error:new a.jG});let{data:i,error:o}=await (0,n.vE)(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:s.access_token,body:{friendly_name:e.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}async _deletePasskey(e){(0,o.aA)(this.experimental);try{return await this._useSession(async t=>{let{data:{session:s},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!s)return this._returnResult({data:null,error:new a.jG});let{error:i}=await (0,n.vE)(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:s.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(e){if((0,a.HY)(e))return this._returnResult({data:null,error:e});throw e}}}p.nextInstanceID={};let b=p}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4797],{4797:(e,r,t)=>{t.r(r),t.d(r,{PrivacyUnlockModal:()=>o});var s=t(5155),a=t(2115);function o(e){let{open:r,onClose:t,privacy:o}=e,{unlock:n,resetPassphrase:l,busy:i,failCount:c,lockoutUntil:d}=o,[u,p]=(0,a.useState)(""),[h,m]=(0,a.useState)(""),[x,f]=(0,a.useState)(!1),[j,v]=(0,a.useState)(!1),[y,k]=(0,a.useState)(""),[b,w]=(0,a.useState)(!1),[g,N]=(0,a.useState)(0),C=(0,a.useRef)(null),E=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=C.current;e&&(r&&!e.open?(e.showModal(),p(""),m(""),f(!1),v(!1),k("")):!r&&e.open&&e.close())},[r]),(0,a.useEffect)(()=>{r&&requestAnimationFrame(()=>{var e;return null==(e=E.current)?void 0:e.focus()})},[r]),(0,a.useEffect)(()=>{let e=C.current;if(!e)return;let r=e=>{e.preventDefault(),i||b||t()};return e.addEventListener("cancel",r),()=>e.removeEventListener("cancel",r)},[i,b,t]),(0,a.useEffect)(()=>{if(!d||d<=Date.now())return void N(0);N(d-Date.now());let e=setInterval(()=>{let r=d-Date.now();r<=0?(N(0),clearInterval(e)):N(r)},1e3);return()=>clearInterval(e)},[d]);let S=async e=>{if(e.preventDefault(),m(""),!u)return;let r=await n(u);if(r.ok){window.dispatchEvent(new CustomEvent("privacy:unlocked")),t();return}if(f(!0),setTimeout(()=>f(!1),400),p(""),"lockout"===r.error)return void m("Too many failed attempts. See countdown above.");if("wrong_passphrase"===r.error){let e=Math.max(0,5-(r.failCount||c));m(e>0?"Incorrect passphrase. ".concat(e," attempt").concat(1===e?"":"s"," remaining."):"Incorrect passphrase.");return}m(r.error||"Could not unlock. Please try again.")},L=async e=>{if(e.preventDefault(),"RESET"===y){w(!0);try{await l(),v(!1),t()}finally{w(!1)}}},R=g>0;return(0,s.jsx)("dialog",{ref:C,className:"privacy-modal-dialog","aria-labelledby":"unlock-modal-title","aria-modal":"true",children:(0,s.jsxs)("div",{className:"privacy-modal-content",children:[(0,s.jsxs)("header",{className:"privacy-modal-header",children:[(0,s.jsx)("div",{className:"privacy-modal-icon","aria-hidden":"true",children:(0,s.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,s.jsx)("rect",{x:"3",y:"7",width:"10",height:"7",rx:"1.5"}),(0,s.jsx)("path",{d:"M5 7V5a3 3 0 0 1 6 0v2"})]})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("b",{id:"unlock-modal-title",children:"Unlock protected artifacts"}),(0,s.jsx)("small",{children:"Enter your passphrase to reveal protected content for this session."})]}),(0,s.jsx)("button",{type:"button",className:"privacy-modal-close",onClick:()=>{i||b||t()},"aria-label":"Close",disabled:i||b,children:(0,s.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",children:[(0,s.jsx)("line",{x1:"2",y1:"2",x2:"14",y2:"14"}),(0,s.jsx)("line",{x1:"14",y1:"2",x2:"2",y2:"14"})]})})]}),j?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("form",{className:"privacy-modal-body",onSubmit:L,id:"reset-form",children:[(0,s.jsxs)("div",{className:"privacy-reset-warning",children:[(0,s.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,s.jsx)("path",{d:"M8 2L14.5 13H1.5L8 2z"}),(0,s.jsx)("line",{x1:"8",y1:"6.5",x2:"8",y2:"9.5"}),(0,s.jsx)("circle",{cx:"8",cy:"11.5",r:".4",fill:"currentColor"})]}),(0,s.jsx)("p",{children:"Resetting removes passphrase protection from all artifacts. This cannot be undone."})]}),(0,s.jsxs)("label",{className:"project-password-field",children:[(0,s.jsxs)("span",{children:["Type ",(0,s.jsx)("strong",{children:"RESET"})," to confirm"]}),(0,s.jsx)("input",{type:"text",value:y,onChange:e=>k(e.target.value),autoComplete:"off",placeholder:"RESET",disabled:b,spellCheck:!1})]})]}),(0,s.jsxs)("footer",{className:"privacy-modal-footer",children:[(0,s.jsx)("button",{type:"button",className:"project-password-cancel",onClick:()=>{v(!1),k("")},disabled:b,children:"Back"}),(0,s.jsx)("button",{type:"submit",form:"reset-form",className:"project-password-submit privacy-reset-submit",disabled:b||"RESET"!==y,children:b?"Resetting…":"Reset passphrase"})]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("form",{className:"privacy-modal-body",onSubmit:S,id:"unlock-form",children:[R?(0,s.jsxs)("div",{className:"privacy-lockout-notice",role:"status","aria-live":"polite",children:[(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,s.jsx)("circle",{cx:"8",cy:"8",r:"6.5"}),(0,s.jsx)("line",{x1:"8",y1:"5",x2:"8",y2:"8.5"}),(0,s.jsx)("circle",{cx:"8",cy:"11",r:".5",fill:"currentColor"})]}),(0,s.jsxs)("span",{children:["Too many failed attempts. Try again in"," ",(0,s.jsx)("strong",{className:"privacy-lockout-countdown",children:function(e){let r=Math.max(0,Math.ceil(e/1e3)),t=Math.floor(r/60);return"".concat(t,":").concat((r%60).toString().padStart(2,"0"))}(g)}),"."]})]}):null,(0,s.jsxs)("label",{className:"project-password-field",children:[(0,s.jsx)("span",{children:"Passphrase"}),(0,s.jsx)("input",{ref:E,type:"password",value:u,onChange:e=>{p(e.target.value),m("")},autoComplete:"current-password",required:!0,disabled:i||R,placeholder:"Enter passphrase",className:x?"privacy-input-shake":"","aria-describedby":h?"unlock-error":void 0})]}),h?(0,s.jsx)("p",{id:"unlock-error",className:"project-password-error",role:"alert",children:h}):null,(0,s.jsx)("button",{type:"button",className:"privacy-forgot-link",onClick:()=>{v(!0),m("")},children:"Forgot passphrase? Reset..."})]}),(0,s.jsxs)("footer",{className:"privacy-modal-footer",children:[(0,s.jsx)("button",{type:"button",className:"project-password-cancel",onClick:()=>{i||t()},disabled:i,children:"Cancel"}),(0,s.jsx)("button",{type:"submit",form:"unlock-form",className:"project-password-submit",disabled:i||R||!u,children:i?"Unlocking…":"Unlock"})]})]})]})})}}}]);
|