@chorus-aidlc/chorus 0.16.1 → 0.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-build-manifest.json +373 -372
- package/.next/standalone/.next/app-path-routes-manifest.json +41 -41
- package/.next/standalone/.next/build-manifest.json +5 -5
- package/.next/standalone/.next/prerender-manifest.json +42 -42
- package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/project-groups/[uuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/activity/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/[ideaUuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/dashboard/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/documents/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/graph/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/proposals/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[uuid]/tasks/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/page.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/settings/page.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +2 -2
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/companies/[uuid]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/admin/companies/new/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/admin/companies/new.html +2 -2
- package/.next/standalone/.next/server/app/admin/companies/new.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/companies/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/admin/companies.html +2 -2
- package/.next/standalone/.next/server/app/admin/companies.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/admin.html +2 -2
- package/.next/standalone/.next/server/app/admin.rsc +2 -2
- package/.next/standalone/.next/server/app/api/admin/companies/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/companies/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/login/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/session/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agent-connections/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agent-connections/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/agents/[uuid]/sessions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/api-keys/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/api-keys/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/check-default/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/company-oidc/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/default-login/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/identify/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/me/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/sync-token/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/comments/route.js +1 -1
- package/.next/standalone/.next/server/app/api/comments/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/comments/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/connection-heartbeat/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon/connection-heartbeat/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/control/route.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/control/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/directory-request/report/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon/directory-request/report/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/execution-state/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon/execution-state/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/executions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon/executions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/pending-turns/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon/pending-turns/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon/report-interrupt/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/resume/route.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/resume/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon/resume/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/transcript/route.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/transcript/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon/transcript/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon/turn-advance/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon/turn-advance/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-directory-requests/[uuid]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon-directory-requests/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-directory-requests/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon-directory-requests/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/instruction/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/repoint/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/[sessionUuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/ad-hoc/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/route.js +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/daemon-sessions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/documents/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js +1 -1
- package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/entities/[type]/[uuid]/root-idea/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/events/notifications/route.js +1 -1
- package/.next/standalone/.next/server/app/api/events/notifications/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/events/notifications/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/events/route.js +1 -1
- package/.next/standalone/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/events/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/claim/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/preview/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/move/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/parent/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/release/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/wake-preview/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/[uuid]/wake-preview/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/conversational/route.js +1 -1
- package/.next/standalone/.next/server/app/api/ideas/conversational/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/ideas/conversational/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mcp/route.js +2 -2
- package/.next/standalone/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/me/assignments/route.js +1 -1
- package/.next/standalone/.next/server/app/api/me/assignments/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/me/assignments/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mentionables/route.js +1 -1
- package/.next/standalone/.next/server/app/api/mentionables/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/mentionables/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/notifications/[uuid]/archive/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/notifications/[uuid]/read/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/preferences/route.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/preferences/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/notifications/preferences/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/read-all/route.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/read-all/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/notifications/read-all/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/route.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js +1 -1
- package/.next/standalone/.next/server/app/api/notifications/unread-count/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/notifications/unread-count/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-groups/[uuid]/dashboard/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-groups/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-groups/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-visits/pin/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-visits/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/project-visits/visit/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/activity/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/agent-cwds/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/agent-cwds/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/available/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/documents/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/group/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/ideas/tracker/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/[proposalUuid]/validate/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/proposals/summary/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/resource-graph/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/stats/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/dependencies/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/projects/[uuid]/tasks/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/agent-cwd-options/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/projects/agent-cwd-options/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/proposals/[uuid]/approve/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/proposals/[uuid]/close/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/proposals/[uuid]/reject/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/proposals/[uuid]/revoke/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/proposals/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/references/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/references/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/session/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[uuid]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/claim/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/[dependsOnUuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/dependencies/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/release/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tasks/[uuid]/sessions/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +2 -2
- package/.next/standalone/.next/server/app/index.rsc +2 -2
- package/.next/standalone/.next/server/app/login/admin/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login/admin.html +2 -2
- package/.next/standalone/.next/server/app/login/admin.rsc +2 -2
- package/.next/standalone/.next/server/app/login/callback/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login/callback.html +2 -2
- package/.next/standalone/.next/server/app/login/callback.rsc +2 -2
- package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login/pick-workspace/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login/pick-workspace.html +2 -2
- package/.next/standalone/.next/server/app/login/pick-workspace.rsc +2 -2
- package/.next/standalone/.next/server/app/login.html +2 -2
- package/.next/standalone/.next/server/app/login.rsc +2 -2
- package/.next/standalone/.next/server/app/onboarding/page.js +1 -1
- package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +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 +3 -3
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects.html +2 -2
- package/.next/standalone/.next/server/app/projects.rsc +3 -3
- package/.next/standalone/.next/server/app/settings.html +2 -2
- package/.next/standalone/.next/server/app/settings.rsc +4 -4
- package/.next/standalone/.next/server/app-paths-manifest.json +41 -41
- package/.next/standalone/.next/server/chunks/2572.js +1 -1
- package/.next/standalone/.next/server/chunks/2618.js +1 -1
- package/.next/standalone/.next/server/chunks/2961.js +1 -1
- package/.next/standalone/.next/server/chunks/3594.js +1 -1
- package/.next/standalone/.next/server/chunks/{2547.js → 4011.js} +3 -3
- package/.next/standalone/.next/server/chunks/4827.js +1 -1
- package/.next/standalone/.next/server/chunks/5205.js +1 -0
- package/.next/standalone/.next/server/chunks/5245.js +1 -1
- package/.next/standalone/.next/server/chunks/6113.js +1 -1
- package/.next/standalone/.next/server/chunks/6506.js +3 -3
- package/.next/standalone/.next/server/chunks/6515.js +2 -2
- package/.next/standalone/.next/server/chunks/6995.js +1 -1
- package/.next/standalone/.next/server/chunks/7364.js +1 -1
- package/.next/standalone/.next/server/chunks/7368.js +1 -1
- package/.next/standalone/.next/server/chunks/7530.js +1 -1
- package/.next/standalone/.next/server/chunks/8454.js +1 -1
- package/.next/standalone/.next/server/chunks/920.js +1 -1
- package/.next/standalone/.next/server/chunks/9213.js +1 -1
- package/.next/standalone/.next/server/chunks/9378.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/.next/standalone/.next/server/middleware-manifest.json +1 -1
- package/.next/standalone/.next/server/pages/404.html +2 -2
- 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/{11595.1bcd2b65089007ae.js → 11595.b6f8ad33572b32fe.js} +1 -1
- package/.next/standalone/.next/static/chunks/19887-9f459ee9e8d0855f.js +1 -0
- package/.next/standalone/.next/static/chunks/{29108-e171d8b8c680cbb5.js → 29108-b9b232255811ffa8.js} +1 -1
- package/.next/standalone/.next/static/chunks/{31308-bb4a97b3f39c22dd.js → 31308-fda6febfb2882a28.js} +1 -1
- package/.next/standalone/.next/static/chunks/{33456.c98d3e21528b61d8.js → 33456.e8550ad410031e29.js} +1 -1
- package/.next/standalone/.next/static/chunks/35432-ee83da56c49ef6f8.js +1 -0
- package/.next/standalone/.next/static/chunks/{4860.9122a86d33dc6b62.js → 4860.b405fc235b36271b.js} +1 -1
- package/.next/standalone/.next/static/chunks/66980-652990fcf3212c94.js +10 -0
- package/.next/standalone/.next/static/chunks/{94643-90a9ec7b9a9abaf0.js → 94643-6d31df78aa3074b5.js} +1 -1
- package/.next/standalone/.next/static/chunks/96170-75da13decdb6f73f.js +1 -0
- package/.next/standalone/.next/static/chunks/{99373.585230dcb315a068.js → 99373.9dce8f30802824fc.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/{layout-3d3b3b9e16c03cda.js → layout-cea0bb3e3a295bea.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/dashboard/{page-69d746c98079024d.js → page-007278623926490f.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/documents/[documentUuid]/{page-2af705f6c3789131.js → page-b6ecaf52f6b81ec7.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/graph/{page-8119df915138a9c3.js → page-f5a351c544ed23d7.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-3cd46bec9383b191.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/[taskUuid]/{page-0789c6589363154c.js → page-7f87113e5d8bcf6e.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/tasks/{page-a612f6fc5be0239d.js → page-30ab1573c4bd466f.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/settings/{page-5fb9fd3db155d5ca.js → page-b21d4184d9ca0b25.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/onboarding/page-3b6c54f887108635.js +1 -0
- package/.next/standalone/.next/static/chunks/{webpack-dec1f54ebb9bf963.js → webpack-b54e0c78eded76be.js} +1 -1
- package/.next/standalone/.next/static/css/893d99a21153c9b0.css +1 -0
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/public/chorus-plugin/.claude-plugin/plugin.json +1 -1
- package/.next/standalone/public/chorus-plugin/agents/code-reviewer.md +1 -1
- package/.next/standalone/public/chorus-plugin/agents/proposal-reviewer.md +1 -0
- package/.next/standalone/public/chorus-plugin/agents/task-reviewer.md +2 -0
- package/.next/standalone/public/chorus-plugin/skills/brainstorm/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/chorus/SKILL.md +3 -3
- package/.next/standalone/public/chorus-plugin/skills/develop/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/docs/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/idea/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/openspec-aware/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/proposal/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/quick-dev/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/review/SKILL.md +1 -1
- package/.next/standalone/public/chorus-plugin/skills/yolo/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/agents/chorus-code-reviewer.json +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/agents/chorus-proposal-reviewer.json +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/agents/chorus-task-reviewer.json +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-brainstorm/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-develop/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-docs/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-idea/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-openspec-aware/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-proposal/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-quick-dev/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-review/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/skills/chorus-yolo/SKILL.md +1 -1
- package/.next/standalone/public/kiro-plugin/.kiro/steering/chorus.md +2 -2
- package/.next/standalone/public/kiro-plugin/bin/chorus-api.sh +1 -1
- package/.next/standalone/public/skill/chorus/SKILL.md +2 -2
- package/.next/standalone/public/skill/code-reviewer-chorus/SKILL.md +2 -2
- package/.next/standalone/public/skill/proposal-reviewer-chorus/SKILL.md +2 -1
- package/.next/standalone/public/skill/task-reviewer-chorus/SKILL.md +2 -1
- package/README.ja.md +26 -346
- package/README.ko.md +28 -347
- package/README.md +33 -353
- package/README.zh.md +31 -328
- package/cli/control-handler.mjs +13 -3
- package/cli/daemon-rest-client.mjs +11 -3
- package/cli/daemon.mjs +52 -10
- package/cli/event-router.mjs +17 -5
- package/cli/prompts.mjs +116 -1
- package/cli/turn-reporter.mjs +5 -1
- package/cli/wake-queue.mjs +57 -35
- package/cli/waker.mjs +125 -36
- package/package.json +1 -1
- package/prisma/migrations/20260814101500_add_typed_assignment_provenance/migration.sql +2 -0
- package/prisma/schema.prisma +4 -2
- package/.next/standalone/.next/server/chunks/1114.js +0 -1
- package/.next/standalone/.next/static/chunks/19887-4d76db57a7ce4437.js +0 -1
- package/.next/standalone/.next/static/chunks/4340-a33120fb742af57e.js +0 -1
- package/.next/standalone/.next/static/chunks/94426-39b6da238425f9b7.js +0 -10
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[uuid]/proposals/[proposalUuid]/page-f619bd65e1eed8c9.js +0 -1
- package/.next/standalone/.next/static/chunks/app/onboarding/page-e85315278aafc300.js +0 -1
- package/.next/standalone/.next/static/css/67fba0943f494f0e.css +0 -1
- /package/.next/standalone/.next/static/{H92ZuhpmDWcL3WOfYRc-- → YTZwWTfE0BsJnjCDYCEHi}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{H92ZuhpmDWcL3WOfYRc-- → YTZwWTfE0BsJnjCDYCEHi}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[66980,86155],{4459:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},5329:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("message-circle-plus",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]])},6748:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("messages-square",[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]])},10263:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]])},13142:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("octagon-x",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},14507:(e,t,n)=>{n.d(t,{$f:()=>L,G2:()=>v,I$:()=>M,Im:()=>R,Qv:()=>a,Sd:()=>y,Z1:()=>C,_G:()=>c,_e:()=>u,bh:()=>w,eB:()=>h,eT:()=>g,ec:()=>I,hy:()=>T,ic:()=>o,iz:()=>A,pC:()=>x,yY:()=>b,y_:()=>N});var r=n(28155),i=n(65282),s=n(32603);let o=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function l(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("backward",e):!(n.parentOffset>0))?n:null}let a=(e,t,n)=>{let o=l(e,n);if(!o)return!1;let a=f(o);if(!a){let n=o.blockRange(),i=n&&(0,r.jP)(n);return null!=i&&(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let h=a.nodeBefore;if(E(e,a,t,-1))return!0;if(0==o.parent.content.size&&(p(h,"end")||s.nh.isSelectable(h)))for(let n=o.depth;;n--){let l=(0,r.$L)(e.doc,o.before(n),o.after(n),i.Ji.empty);if(l&&l.slice.size<l.to-l.from){if(t){let n=e.tr.step(l);n.setSelection(p(h,"end")?s.LN.findFrom(n.doc.resolve(n.mapping.map(a.pos,-1)),-1):s.nh.create(n.doc,a.pos-h.nodeSize)),t(n.scrollIntoView())}return!0}if(1==n||o.node(n-1).childCount>1)break}return!!h.isAtom&&a.depth==o.depth-1&&(t&&t(e.tr.delete(a.pos-h.nodeSize,a.pos).scrollIntoView()),!0)},h=(e,t,n)=>{let r=l(e,n);if(!r)return!1;let i=f(r);return!!i&&d(e,i,t)},c=(e,t,n)=>{let r=m(e,n);if(!r)return!1;let i=k(r);return!!i&&d(e,i,t)};function d(e,t,n){let o=t.nodeBefore,l=t.pos-1;for(;!o.isTextblock;l--){if(o.type.spec.isolating)return!1;let e=o.lastChild;if(!e)return!1;o=e}let a=t.nodeAfter,h=t.pos+1;for(;!a.isTextblock;h++){if(a.type.spec.isolating)return!1;let e=a.firstChild;if(!e)return!1;a=e}let c=(0,r.$L)(e.doc,l,h,i.Ji.empty);if(!c||c.from!=l||c instanceof r.Ln&&c.slice.size>=h-l)return!1;if(n){let t=e.tr.step(c);t.setSelection(s.U3.create(t.doc,l)),n(t.scrollIntoView())}return!0}function p(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)break}return!1}let u=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=f(r)}let l=o&&o.nodeBefore;return!!l&&!!s.nh.isSelectable(l)&&(t&&t(e.tr.setSelection(s.nh.create(e.doc,o.pos-l.nodeSize)).scrollIntoView()),!0)};function f(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function m(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("forward",e):!(n.parentOffset<n.parent.content.size))?n:null}let g=(e,t,n)=>{let o=m(e,n);if(!o)return!1;let l=k(o);if(!l)return!1;let a=l.nodeAfter;if(E(e,l,t,1))return!0;if(0==o.parent.content.size&&(p(a,"start")||s.nh.isSelectable(a))){let n=(0,r.$L)(e.doc,o.before(),o.after(),i.Ji.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(p(a,"start")?s.LN.findFrom(r.doc.resolve(r.mapping.map(l.pos)),1):s.nh.create(r.doc,r.mapping.map(l.pos))),t(r.scrollIntoView())}return!0}}return!!a.isAtom&&l.depth==o.depth-1&&(t&&t(e.tr.delete(l.pos,l.pos+a.nodeSize).scrollIntoView()),!0)},y=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;o=k(r)}let l=o&&o.nodeAfter;return!!l&&!!s.nh.isSelectable(l)&&(t&&t(e.tr.setSelection(s.nh.create(e.doc,o.pos)).scrollIntoView()),!0)};function k(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}let v=(e,t)=>{let n=e.selection,i=n instanceof s.nh,o;if(i){if(n.node.isTextblock||!(0,r.n9)(e.doc,n.from))return!1;o=n.from}else if(null==(o=(0,r.N0)(e.doc,n.from,-1)))return!1;if(t){let n=e.tr.join(o);i&&n.setSelection(s.nh.create(n.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(n.scrollIntoView())}return!0},w=(e,t)=>{let n=e.selection,i;if(n instanceof s.nh){if(n.node.isTextblock||!(0,r.n9)(e.doc,n.to))return!1;i=n.to}else if(null==(i=(0,r.N0)(e.doc,n.to,1)))return!1;return t&&t(e.tr.join(i).scrollIntoView()),!0},b=(e,t)=>{let{$from:n,$to:i}=e.selection,s=n.blockRange(i),o=s&&(0,r.jP)(s);return null!=o&&(t&&t(e.tr.lift(s,o).scrollIntoView()),!0)},x=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!!n.parent.type.spec.code&&!!n.sameParent(r)&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function S(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}let M=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),l=S(i.contentMatchAt(o));if(!l||!i.canReplaceWith(o,o,l))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,l.createAndFill());i.setSelection(s.LN.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0},C=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof s.i5||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=S(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,l=e.tr.insert(n,o.createAndFill());l.setSelection(s.U3.create(l.doc,n+1)),t(l.scrollIntoView())}return!0},A=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if((0,r.zy)(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let i=n.blockRange(),s=i&&(0,r.jP)(i);return null!=s&&(t&&t(e.tr.lift(i,s).scrollIntoView()),!0)},T=(e,t)=>{let{$from:n,to:r}=e.selection,i,o=n.sharedDepth(r);return 0!=o&&(i=n.before(o),t&&t(e.tr.setSelection(s.nh.create(e.doc,i))),!0)};function E(e,t,n,o){let l,a,h,c=t.nodeBefore,d=t.nodeAfter,u,f,m=c.type.spec.isolating||d.type.spec.isolating;if(!m&&(l=t.nodeBefore,a=t.nodeAfter,h=t.index(),l&&a&&l.type.compatibleContent(a.type)&&(!l.content.size&&t.parent.canReplace(h-1,h)?(n&&n(e.tr.delete(t.pos-l.nodeSize,t.pos).scrollIntoView()),!0):!!t.parent.canReplace(h,h+1)&&!!(a.isTextblock||(0,r.n9)(e.doc,t.pos))&&(n&&n(e.tr.join(t.pos).scrollIntoView()),!0))))return!0;let g=!m&&t.parent.canReplace(t.index(),t.index()+1);if(g&&(u=(f=c.contentMatchAt(c.childCount)).findWrapping(d.type))&&f.matchType(u[0]||d.type).validEnd){if(n){let s=t.pos+d.nodeSize,o=i.FK.empty;for(let e=u.length-1;e>=0;e--)o=i.FK.from(u[e].create(null,o));o=i.FK.from(c.copy(o));let l=e.tr.step(new r.Wg(t.pos-1,s,t.pos,s,new i.Ji(o,1,0),u.length,!0)),a=l.doc.resolve(s+2*u.length);a.nodeAfter&&a.nodeAfter.type==c.type&&(0,r.n9)(l.doc,a.pos)&&l.join(a.pos),n(l.scrollIntoView())}return!0}let y=d.type.spec.isolating||o>0&&m?null:s.LN.findFrom(t,1),k=y&&y.$from.blockRange(y.$to),v=k&&(0,r.jP)(k);if(null!=v&&v>=t.depth)return n&&n(e.tr.lift(k,v).scrollIntoView()),!0;if(g&&p(d,"start",!0)&&p(c,"end")){let s=c,o=[];for(;o.push(s),!s.isTextblock;)s=s.lastChild;let l=d,a=1;for(;!l.isTextblock;l=l.firstChild)a++;if(s.canReplace(s.childCount,s.childCount,l.content)){if(n){let s=i.FK.empty;for(let e=o.length-1;e>=0;e--)s=i.FK.from(o[e].copy(s));n(e.tr.step(new r.Wg(t.pos-o.length,t.pos+d.nodeSize,t.pos+a,t.pos+d.nodeSize-a,new i.Ji(s,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function O(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(t.tr.setSelection(s.U3.create(t.doc,e<0?i.start(o):i.end(o)))),!0)}}let L=O(-1),I=O(1);function R(e,t=null){return function(n,i){let{$from:s,$to:o}=n.selection,l=s.blockRange(o),a=l&&(0,r.oM)(l,e,t);return!!a&&(i&&i(n.tr.wrap(l,a).scrollIntoView()),!0)}}function N(e,t=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:s},$to:{pos:o}}=n.selection.ranges[r];n.doc.nodesBetween(s,o,(r,s)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t)))if(r.type==e)i=!0;else{let t=n.doc.resolve(s),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:s},$to:{pos:o}}=n.selection.ranges[r];i.setBlockType(s,o,e,t)}r(i.scrollIntoView())}return!0}}function z(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let j=z(o,a,u),P=z(o,g,y),$={Enter:z(x,C,A,(e,t)=>{let{$from:n,$to:i}=e.selection;if(e.selection instanceof s.nh&&e.selection.node.isBlock)return!!n.parentOffset&&!!(0,r.zy)(e.doc,n.pos)&&(t&&t(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let o=[],l,a,h=!1,c=!1;for(let e=n.depth;;e--){if(n.node(e).isBlock){let t;h=n.end(e)==n.pos+(n.depth-e),c=n.start(e)==n.pos-(n.depth-e),a=S(n.node(e-1).contentMatchAt(n.indexAfter(e-1)));o.unshift(t||(h&&a?{type:a}:null)),l=e;break}if(1==e)return!1;o.unshift(null)}let d=e.tr;(e.selection instanceof s.U3||e.selection instanceof s.i5)&&d.deleteSelection();let p=d.mapping.map(n.pos),u=(0,r.zy)(d.doc,p,o.length,o);if(u||(o[0]=a?{type:a}:null,u=(0,r.zy)(d.doc,p,o.length,o)),!u)return!1;if(d.split(p,o.length,o),!h&&c&&n.node(l).type!=a){let e=d.mapping.map(n.before(l)),t=d.doc.resolve(e);a&&n.node(l-1).canReplaceWith(t.index(),t.index()+1,a)&&d.setNodeMarkup(d.mapping.map(n.before(l)),a)}return t&&t(d.scrollIntoView()),!0}),"Mod-Enter":M,Backspace:j,"Mod-Backspace":j,"Shift-Backspace":j,Delete:P,"Mod-Delete":P,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new s.i5(e.doc))),!0)},D={"Ctrl-h":$.Backspace,"Alt-Backspace":$["Mod-Backspace"],"Ctrl-d":$.Delete,"Ctrl-Alt-Backspace":$["Mod-Delete"],"Alt-Delete":$["Mod-Delete"],"Alt-d":$["Mod-Delete"],"Ctrl-a":L,"Ctrl-e":I};for(let e in $)D[e]=$[e];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform()},16045:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]])},17475:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},20578:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},23380:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("pen-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]])},25373:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},26260:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("folder-lock",[["rect",{width:"8",height:"5",x:"14",y:"17",rx:"1",key:"19aais"}],["path",{d:"M10 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v2.5",key:"1w6v7t"}],["path",{d:"M20 17v-2a2 2 0 1 0-4 0v2",key:"pwaxnr"}]])},28155:(e,t,n)=>{n.d(t,{$L:()=>O,Ln:()=>m,N0:()=>T,Um:()=>E,Wg:()=>g,X9:()=>o,Ys:()=>p,dL:()=>B,jP:()=>v,n9:()=>C,oM:()=>w,zy:()=>M});var r=n(65282);class i{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class s{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&s.empty)return s.empty}recover(e){let t=0,n=65535&e;if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*n]+t+(e-(65535&e))/65536}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let h=this.ranges[l+s],c=this.ranges[l+o],d=a+h;if(e<=d){let s=h?e==a?-1:e==d?1:t:t,o=a+r+(s<0?0:c);if(n)return o;let p=e==(t<0?a:d)?null:l/3+(e-a)*65536,u=e==a?2:e==d?1:4;return(t<0?e!=a:e!=d)&&(u|=8),new i(o,u,p)}r+=c-h}return n?e+r:new i(e+r,0,null)}touches(e,t){let n=0,r=65535&t,i=this.inverted?2:1,s=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let o=this.ranges[t]-(this.inverted?n:0);if(o>e)break;let l=this.ranges[t+i];if(e<=o+l&&t==3*r)return!0;n+=this.ranges[t+s]-l}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let s=this.ranges[r],o=s-(this.inverted?i:0),l=s+(this.inverted?0:i),a=this.ranges[r+t],h=this.ranges[r+n];e(o,o+a,l,l+h),i+=h-a}}invert(){return new s(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?s.empty:new s(e<0?[0,-e,0]:[0,0,e])}}s.empty=new s([]);class o{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new o(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),null!=t&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new o;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(e,t);if(null!=i.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this._maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new i(e,r,null)}}let l=Object.create(null);class a{getMap(){return s.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=l[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in l)throw RangeError("Duplicate use of step JSON ID "+e);return l[e]=t,t.prototype.jsonID=e,t}}class h{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new h(e,null)}static fail(e){return new h(null,e)}static fromReplace(e,t,n,i){try{return h.ok(e.replace(t,n,i))}catch(e){if(e instanceof r.vI)return h.fail(e.message);throw e}}}function c(e,t,n){let i=[];for(let r=0;r<e.childCount;r++){let s=e.child(r);s.content.size&&(s=s.copy(c(s.content,t,s))),s.isInline&&(s=t(s,n,r)),i.push(s)}return r.FK.fromArray(i)}class d extends a{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),i=n.node(n.sharedDepth(this.to)),s=new r.Ji(c(t.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,i),t.openStart,t.openEnd);return h.fromReplace(e,this.from,this.to,s)}invert(){return new p(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new d(t.pos,n.pos,this.mark)}merge(e){return e instanceof d&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new d(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new d(t.from,t.to,e.markFromJSON(t.mark))}}a.jsonID("addMark",d);class p extends a{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new r.Ji(c(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return h.fromReplace(e,this.from,this.to,n)}invert(){return new d(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new p(t.pos,n.pos,this.mark)}merge(e){return e instanceof p&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new p(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new p(t.from,t.to,e.markFromJSON(t.mark))}}a.jsonID("removeMark",p);class u extends a{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return h.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return h.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);if(t){let e=this.mark.addToSet(t.marks);if(e.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(e))return new u(this.pos,t.marks[n]);return new u(this.pos,this.mark)}}return new f(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new u(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new u(t.pos,e.markFromJSON(t.mark))}}a.jsonID("addNodeMark",u);class f extends a{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return h.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return h.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new u(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new f(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new f(t.pos,e.markFromJSON(t.mark))}}a.jsonID("removeNodeMark",f);class m extends a{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&y(e,this.from,this.to)?h.fail("Structure replace would overwrite content"):h.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new s([this.from,this.to-this.from,this.slice.size])}invert(e){return new m(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new m(t.pos,Math.max(t.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof m)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart)if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;else{let t=this.slice.size+e.slice.size==0?r.Ji.empty:new r.Ji(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new m(e.from,this.to,t,this.structure)}{let t=this.slice.size+e.slice.size==0?r.Ji.empty:new r.Ji(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new m(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new m(t.from,t.to,r.Ji.fromJSON(e,t.slice),!!t.structure)}}a.jsonID("replace",m);class g extends a{constructor(e,t,n,r,i,s,o=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=s,this.structure=o}apply(e){if(this.structure&&(y(e,this.from,this.gapFrom)||y(e,this.gapTo,this.to)))return h.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return h.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?h.fromReplace(e,this.from,this.to,n):h.fail("Content does not fit in gap")}getMap(){return new s([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new g(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||i>n.pos?null:new g(t.pos,n.pos,r,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new g(t.from,t.to,t.gapFrom,t.gapTo,r.Ji.fromJSON(e,t.slice),t.insert,!!t.structure)}}function y(e,t,n){let r=e.resolve(t),i=n-t,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let e=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function k(e,t,n,i=n.contentMatch,s=!0){let o=e.doc.nodeAt(t),l=[],a=t+1;for(let t=0;t<o.childCount;t++){let h=o.child(t),c=a+h.nodeSize,d=i.matchType(h.type);if(d){i=d;for(let t=0;t<h.marks.length;t++)n.allowsMarkType(h.marks[t].type)||e.step(new p(a,c,h.marks[t]));if(s&&h.isText&&"pre"!=n.whitespace){let e,t=/\r?\n|\r/g,i;for(;e=t.exec(h.text);)i||(i=new r.Ji(r.FK.from(n.schema.text(" ",n.allowedMarks(h.marks))),0,0)),l.push(new m(a+e.index,a+e.index+e[0].length,i))}}else l.push(new m(a,c,r.Ji.empty));a=c}if(!i.validEnd){let t=i.fillBefore(r.FK.empty,!0);e.replace(a,a,new r.Ji(t,0,0))}for(let t=l.length-1;t>=0;t--)e.step(l[t])}function v(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let s=e.$from.node(n),o=e.$from.index(n)+r,l=e.$to.indexAfter(n)-i;if(n<e.depth&&s.canReplace(o,l,t))return n;if(0==n||s.type.spec.isolating||!((0==o||s.canReplace(o,s.childCount))&&(l==s.childCount||s.canReplace(0,l))))break;o&&(r=1),l<s.childCount&&(i=1)}return null}function w(e,t,n=null,r=e){let i=function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,s=n.contentMatchAt(r).findWrapping(t);if(!s)return null;let o=s.length?s[0]:t;return n.canReplaceWith(r,i,o)?s:null}(e,t),s=i&&function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,s=n.child(r),o=t.contentMatch.findWrapping(s.type);if(!o)return null;let l=(o.length?o[o.length-1]:t).contentMatch;for(let e=r;l&&e<i;e++)l=l.matchType(n.child(e).type);return l&&l.validEnd?o:null}(r,t);return s?i.map(b).concat({type:t,attrs:n}).concat(s.map(b)):null}function b(e){return{type:e,attrs:null}}function x(e,t,n,r){t.forEach((i,s)=>{if(i.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(i.text);){let i=e.mapping.slice(r).map(n+1+s+o.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function S(e,t,n,r){t.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+s);e.replaceWith(i,i+1,t.type.schema.text("\n"))}})}function M(e,t,n=1,r){let i=e.resolve(t),s=i.depth-n,o=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>s;e--,t--){let n=i.node(e),s=i.index(e);if(n.type.spec.isolating)return!1;let o=n.content.cutByIndex(s,n.childCount),l=r&&r[t+1];l&&(o=o.replaceChild(0,l.type.create(l.attrs)));let a=r&&r[t]||n;if(!n.canReplace(s+1,n.childCount)||!a.type.validContent(o))return!1}let l=i.indexAfter(s),a=r&&r[0];return i.node(s).canReplaceWith(l,l,a?a.type:i.node(s+1).type)}function C(e,t){let n=e.resolve(t),r=n.index();return A(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function A(e,t){return!!(e&&t&&!e.isLeaf&&function(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let s=t.child(i),o=s.type==r?e.type.schema.nodes.text:s.type;if(!(n=n.matchType(o))||!e.type.allowsMarks(s.marks))return!1}return n.validEnd}(e,t))}function T(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let i,s,o=r.index(e);if(e==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(e+1),o++,s=r.node(e).maybeChild(o)):(i=r.node(e).maybeChild(o-1),s=r.node(e+1)),i&&!i.isTextblock&&A(i,s)&&r.node(e).canReplace(o,o+1))return t;if(0==e)break;t=n<0?r.before(e):r.after(e)}}function E(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(0==n.openStart&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,s=r.index(t)+ +(n>0),o=r.node(t),l=!1;if(1==e)l=o.canReplace(s,s,i);else{let e=o.contentMatchAt(s).findWrapping(i.firstChild.type);l=e&&o.canReplaceWith(s,s,e[0])}if(l)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function O(e,t,n=t,i=r.Ji.empty){if(t==n&&!i.size)return null;let s=e.resolve(t),o=e.resolve(n);return L(s,o,i)?new m(t,n,i):new I(s,o,i).fit()}function L(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}a.jsonID("replaceAround",g);class I{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=r.FK.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=r.FK.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(e<0?this.$to:n.doc.resolve(e));if(!i)return null;let s=this.placed,o=n.depth,l=i.depth;for(;o&&l&&1==s.childCount;)s=s.firstChild.content,o--,l--;let a=new r.Ji(s,o,l);return e>-1?new g(n.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||n.pos!=this.$to.pos?new m(n.pos,i.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=1==t?e:this.unplaced.openStart;n>=0;n--){let e=null,i=(n?(e=z(this.unplaced.content,n-1).firstChild).content:this.unplaced.content).firstChild;for(let s=this.depth;s>=0;s--){let{type:o,match:l}=this.frontier[s],a,h=null;if(1==t&&(i?l.matchType(i.type)||(h=l.fillBefore(r.FK.from(i),!1)):e&&o.compatibleContent(e.type)))return{sliceDepth:n,frontierDepth:s,parent:e,inject:h};if(2==t&&i&&(a=l.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:s,parent:e,wrap:a};if(e&&l.matchType(e.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=z(e,t);return!!i.childCount&&!i.firstChild.isLeaf&&(this.unplaced=new r.Ji(e,t+1,Math.max(n,i.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=z(e,t);if(i.childCount<=1&&t>0){let s=e.size-t<=t+i.size;this.unplaced=new r.Ji(R(e,t-1,1),t-1,s?t-1:n)}else this.unplaced=new r.Ji(R(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:i,wrap:s}){for(;this.depth>t;)this.closeFrontierNode();if(s)for(let e=0;e<s.length;e++)this.openFrontierNode(s[e]);let o=this.unplaced,l=n?n.content:o.content,a=o.openStart-e,h=0,c=[],{match:d,type:p}=this.frontier[t];if(i){for(let e=0;e<i.childCount;e++)c.push(i.child(e));d=d.matchFragment(i)}let u=l.size+e-(o.content.size-o.openEnd);for(;h<l.childCount;){let e=l.child(h),t=d.matchType(e.type);if(!t)break;(++h>1||0==a||e.content.size)&&(d=t,c.push(function e(t,n,i){if(n<=0)return t;let s=t.content;return n>1&&(s=s.replaceChild(0,e(s.firstChild,n-1,1==s.childCount?i-1:0))),n>0&&(s=t.type.contentMatch.fillBefore(s).append(s),i<=0&&(s=s.append(t.type.contentMatch.matchFragment(s).fillBefore(r.FK.empty,!0)))),t.copy(s)}(e.mark(p.allowedMarks(e.marks)),1==h?a:0,h==l.childCount?u:-1)))}let f=h==l.childCount;f||(u=-1),this.placed=N(this.placed,t,r.FK.from(c)),this.frontier[t].match=d,f&&u<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=l;e<u;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=f?0==e?r.Ji.empty:new r.Ji(R(o.content,e-1,1),e-1,u<0?o.openEnd:e-1):new r.Ji(R(o.content,e,h),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!j(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return -1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),s=j(e,t,r,n,i);if(s){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=j(e,n,r,t,!0);if(!i||i.childCount)continue e}return{depth:t,fit:s,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=N(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=N(this.placed,this.depth,r.FK.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(r.FK.empty,!0);e.childCount&&(this.placed=N(this.placed,this.frontier.length,e))}}function R(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(R(e.firstChild.content,t-1,n)))}function N(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(N(e.lastChild.content,t-1,n)))}function z(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function j(e,t,n,r,i){let s=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==s.childCount&&!n.compatibleContent(s.type))return null;let l=r.fillBefore(s.content,!0,o);return l&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,s.content,o)?l:null}function P(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(r<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}class $ extends a{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return h.fail("No node at attribute step's position");let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let i=t.type.create(n,null,t.marks);return h.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(i),0,+!t.isLeaf))}getMap(){return s.empty}invert(e){return new $(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new $(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new $(t.pos,t.attr,t.value)}}a.jsonID("attr",$);class D extends a{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return h.ok(n)}getMap(){return s.empty}invert(e){return new D(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if("string"!=typeof t.attr)throw RangeError("Invalid input for DocAttrStep.fromJSON");return new D(t.attr,t.value)}}a.jsonID("docAttr",D);let F=class extends Error{};(F=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype),F.prototype.constructor=F,F.prototype.name="TransformError";class B{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new o}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new F(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let r=this.mapping.maps[n];n&&(e=r.map(e,1),t=r.map(t,-1)),r.forEach((n,r,i,s)=>{e=Math.min(e,i),t=Math.max(t,s)})}return 1e9==e?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=r.Ji.empty){let i=O(this.doc,e,t,n);return i&&this.step(i),this}replaceWith(e,t,n){return this.replace(e,t,new r.Ji(r.FK.from(n),0,0))}delete(e,t){return this.replace(e,t,r.Ji.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return!function(e,t,n,i){if(!i.size)return e.deleteRange(t,n);let s=e.doc.resolve(t),o=e.doc.resolve(n);if(L(s,o,i))return e.step(new m(t,n,i));let l=P(s,o);0==l[l.length-1]&&l.pop();let a=-(s.depth+1);l.unshift(a);for(let e=s.depth,t=s.pos-1;e>0;e--,t--){let n=s.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;l.indexOf(e)>-1?a=e:s.before(e)==t&&l.splice(1,0,-e)}let h=l.indexOf(a),c=[],d=i.openStart;for(let e=i.content,t=0;;t++){let n=e.firstChild;if(c.push(n),t==i.openStart)break;e=n.content}for(let e=d-1;e>=0;e--){var p;let t=c[e],n=(p=t.type).spec.defining||p.spec.definingForContent;if(n&&!t.sameMarkup(s.node(Math.abs(a)-1)))d=e;else if(n||!t.type.isTextblock)break}for(let t=i.openStart;t>=0;t--){let a=(t+d+1)%(i.openStart+1),p=c[a];if(p)for(let t=0;t<l.length;t++){let c=l[(t+h)%l.length],d=!0;c<0&&(d=!1,c=-c);let u=s.node(c-1),f=s.index(c-1);if(u.canReplaceWith(f,f,p.type,p.marks))return e.replace(s.before(c),d?o.after(c):n,new r.Ji(function e(t,n,i,s,o){if(n<i){let r=t.firstChild;t=t.replaceChild(0,r.copy(e(r.content,n+1,i,s,r)))}if(n>s){let e=o.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(r.FK.empty,!0))}return t}(i.content,0,i.openStart,a),a,i.openEnd))}}let u=e.steps.length;for(let r=l.length-1;r>=0&&(e.replace(t,n,i),!(e.steps.length>u));r--){let e=l[r];e<0||(t=s.before(e),n=o.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){var i=e,s=t;if(!n.isInline&&i==s&&this.doc.resolve(i).parent.content.size){let e=function(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)break}return null}(this.doc,i,n.type);null!=e&&(i=s=e)}return this.replaceRange(i,s,new r.Ji(r.FK.from(n),0,0)),this}deleteRange(e,t){return!function(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n),s=P(r,i);for(let t=0;t<s.length;t++){let n=s[t],o=t==s.length-1;if(o&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(o||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s&&r.start(s-1)==i.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),i.index(s-1)))return e.delete(r.before(s),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return!function(e,t,n){let{$from:i,$to:s,depth:o}=t,l=i.before(o+1),a=s.after(o+1),h=l,c=a,d=r.FK.empty,p=0;for(let e=o,t=!1;e>n;e--)t||i.index(e)>0?(t=!0,d=r.FK.from(i.node(e).copy(d)),p++):h--;let u=r.FK.empty,f=0;for(let e=o,t=!1;e>n;e--)t||s.after(e+1)<s.end(e)?(t=!0,u=r.FK.from(s.node(e).copy(u)),f++):c++;e.step(new g(h,c,l,a,new r.Ji(d.append(u),p,f),d.size-p,!0))}(this,e,t),this}join(e,t=1){return!function(e,t,n){let i=null,{linebreakReplacement:s}=e.doc.type.schema,o=e.doc.resolve(t-n),l=o.node().type;if(s&&l.inlineContent){let e="pre"==l.whitespace,t=!!l.contentMatch.matchType(s);e&&!t?i=!1:!e&&t&&(i=!0)}let a=e.steps.length;if(!1===i){let r=e.doc.resolve(t+n);S(e,r.node(),r.before(),a)}l.inlineContent&&k(e,t+n-1,l,o.node().contentMatchAt(o.index()),null==i);let h=e.mapping.slice(a),c=h.map(t-n);if(e.step(new m(c,h.map(t+n,-1),r.Ji.empty,!0)),!0===i){let t=e.doc.resolve(c);x(e,t.node(),t.before(),e.steps.length)}}(this,e,t),this}wrap(e,t){return!function(e,t,n){let i=r.FK.empty;for(let e=n.length-1;e>=0;e--){if(i.size){let t=n[e].type.contentMatch.matchFragment(i);if(!t||!t.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=r.FK.from(n[e].type.create(n[e].attrs,i))}let s=t.start,o=t.end;e.step(new g(s,o,s,o,new r.Ji(i,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,i=null){var s=this;if(!n.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let o=s.steps.length;return s.doc.nodesBetween(e,t,(e,t)=>{var l,a,h;let c,d,p="function"==typeof i?i(e):i;if(e.isTextblock&&!e.hasMarkup(n,p)&&(l=s.doc,a=s.mapping.slice(o).map(t),h=n,d=(c=l.resolve(a)).index(),c.parent.canReplaceWith(d,d+1,h))){let i=null;if(n.schema.linebreakReplacement){let e="pre"==n.whitespace,t=!!n.contentMatch.matchType(n.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}!1===i&&S(s,e,t,o),k(s,s.mapping.slice(o).map(t,1),n,void 0,null===i);let l=s.mapping.slice(o),a=l.map(t,1),h=l.map(t+e.nodeSize,1);return s.step(new g(a,h,a+1,h-1,new r.Ji(r.FK.from(n.create(p,null,e.marks)),0,0),1,!0)),!0===i&&x(s,e,t,o),!1}}),this}setNodeMarkup(e,t,n=null,i){return!function(e,t,n,i,s){let o=e.doc.nodeAt(t);if(!o)throw RangeError("No node at given position");n||(n=o.type);let l=n.create(i,null,s||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,l);if(!n.validContent(o.content))throw RangeError("Invalid content for node type "+n.name);e.step(new g(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new r.Ji(r.FK.from(l),0,0),1,!0))}(this,e,t,n,i),this}setNodeAttribute(e,t,n){return this.step(new $(e,t,n)),this}setDocAttribute(e,t){return this.step(new D(e,t)),this}addNodeMark(e,t){return this.step(new u(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError("No node at position "+e);if(t instanceof r.CU)t.isInSet(n.marks)&&this.step(new f(e,t));else{let r=n.marks,i,s=[];for(;i=t.isInSet(r);)s.push(new f(e,i)),r=i.removeFromSet(r);for(let e=s.length-1;e>=0;e--)this.step(s[e])}return this}split(e,t=1,n){return!function(e,t,n=1,i){let s=e.doc.resolve(t),o=r.FK.empty,l=r.FK.empty;for(let e=s.depth,t=s.depth-n,a=n-1;e>t;e--,a--){o=r.FK.from(s.node(e).copy(o));let t=i&&i[a];l=r.FK.from(t?t.type.create(t.attrs,l):s.node(e).copy(l))}e.step(new m(t,t,new r.Ji(o.append(l),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){var r;let i,s,o,l;return r=this,o=[],l=[],r.doc.nodesBetween(e,t,(r,a,h)=>{if(!r.isInline)return;let c=r.marks;if(!n.isInSet(c)&&h.type.allowsMarkType(n.type)){let h=Math.max(a,e),u=Math.min(a+r.nodeSize,t),f=n.addToSet(c);for(let e=0;e<c.length;e++)c[e].isInSet(f)||(i&&i.to==h&&i.mark.eq(c[e])?i.to=u:o.push(i=new p(h,u,c[e])));s&&s.to==h?s.to=u:l.push(s=new d(h,u,n))}}),o.forEach(e=>r.step(e)),l.forEach(e=>r.step(e)),this}removeMark(e,t,n){var i;let s,o;return i=this,s=[],o=0,i.doc.nodesBetween(e,t,(i,l)=>{if(!i.isInline)return;o++;let a=null;if(n instanceof r.sX){let e=i.marks,t;for(;t=n.isInSet(e);)(a||(a=[])).push(t),e=t.removeFromSet(e)}else n?n.isInSet(i.marks)&&(a=[n]):a=i.marks;if(a&&a.length){let n=Math.min(l+i.nodeSize,t);for(let t=0;t<a.length;t++){let r=a[t],i;for(let e=0;e<s.length;e++){let t=s[e];t.step==o-1&&r.eq(s[e].style)&&(i=t)}i?(i.to=n,i.step=o):s.push({style:r,from:Math.max(l,e),to:n,step:o})}}}),s.forEach(e=>i.step(new p(e.from,e.to,e.style))),this}clearIncompatible(e,t,n){return k(this,e,t,n),this}}},30028:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},32470:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]])},32603:(e,t,n)=>{n.d(t,{$t:()=>S,LN:()=>o,U3:()=>c,hs:()=>T,i5:()=>f,k_:()=>M,nh:()=>p});var r=n(65282),i=n(28155);let s=Object.create(null);class o{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new l(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=r.Ji.empty){let n=t.content.lastChild,i=null;for(let e=0;e<t.openEnd;e++)i=n,n=n.lastChild;let s=e.steps.length,o=this.ranges;for(let l=0;l<o.length;l++){let{$from:a,$to:h}=o[l],c=e.mapping.slice(s);e.replaceRange(c.map(a.pos),c.map(h.pos),l?r.Ji.empty:t),0==l&&y(e,s,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:s,$to:o}=r[i],l=e.mapping.slice(n),a=l.map(s.pos),h=l.map(o.pos);i?e.deleteRange(a,h):(e.replaceRangeWith(a,h,t),y(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new c(e):g(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?g(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):g(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new f(e.node(0))}static atStart(e){return g(e,e,0,0,1)||new f(e)}static atEnd(e){return g(e,e,e.content.size,e.childCount,-1)||new f(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let n=s[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in s)throw RangeError("Duplicate use of selection JSON ID "+e);return s[e]=t,t.prototype.jsonID=e,t}getBookmark(){return c.between(this.$anchor,this.$head).getBookmark()}}o.prototype.visible=!0;class l{constructor(e,t){this.$from=e,this.$to=t}}let a=!1;function h(e){a||e.parent.inlineContent||(a=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class c extends o{constructor(e,t=e){h(e),h(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return o.near(n);let r=e.resolve(t.map(this.anchor));return new c(r.parent.inlineContent?r:n,n)}replace(e,t=r.Ji.empty){if(super.replace(e,t),t==r.Ji.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof c&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new d(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new c(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if((!n||r)&&(n=r>=0?1:-1),!t.parent.inlineContent){let e=o.findFrom(t,n,!0)||o.findFrom(t,-n,!0);if(!e)return o.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r?e=t:(e=(o.findFrom(e,-n,!0)||o.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0&&(e=t)),new c(e,t)}}o.jsonID("text",c);class d{constructor(e,t){this.anchor=e,this.head=t}map(e){return new d(e.map(this.anchor),e.map(this.head))}resolve(e){return c.between(e.resolve(this.anchor),e.resolve(this.head))}}class p extends o{constructor(e){let t=e.nodeAfter;super(e,e.node(0).resolve(e.pos+t.nodeSize)),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),i=e.resolve(r);return n?o.near(i):new p(i)}content(){return new r.Ji(r.FK.from(this.node),0,0)}eq(e){return e instanceof p&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new u(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new p(e.resolve(t.anchor))}static create(e,t){return new p(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}p.prototype.visible=!1,o.jsonID("node",p);class u{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new d(n,n):new u(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&p.isSelectable(n)?new p(t):o.near(t)}}class f extends o{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=r.Ji.empty){if(t==r.Ji.empty){e.delete(0,e.doc.content.size);let t=o.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new f(e)}map(e){return new f(e)}eq(e){return e instanceof f}getBookmark(){return m}}o.jsonID("all",f);let m={map(){return this},resolve:e=>new f(e)};function g(e,t,n,r,i,s=!1){if(t.inlineContent)return c.create(e,n);for(let o=r-(i>0?0:1);i>0?o<t.childCount:o>=0;o+=i){let r=t.child(o);if(r.isAtom){if(!s&&p.isSelectable(r))return p.create(e,n-(i<0?r.nodeSize:0))}else{let t=g(e,r,n+i,i<0?r.childCount:0,i,s);if(t)return t}n+=r.nodeSize*i}return null}function y(e,t,n){let r,s=e.steps.length-1;if(s<t)return;let l=e.steps[s];(l instanceof i.Ln||l instanceof i.Wg)&&(e.mapping.maps[s].forEach((e,t,n,i)=>{null==r&&(r=i)}),e.setSelection(o.near(e.doc.resolve(r),n)))}class k extends i.dL{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(1|this.updated)&-3,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return r.CU.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.CU.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.selection.to!=t+e.length||this.setSelection(o.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function v(e,t){return t&&e?e.bind(t):e}class w{constructor(e,t,n){this.name=e,this.init=v(t.init,n),this.apply=v(t.apply,n)}}let b=[new w("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new w("selection",{init:(e,t)=>e.selection||o.atStart(t.doc),apply:e=>e.selection}),new w("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new w("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class x{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=b.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new w(e.key,e.spec.state,e))})}}class S{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let s=0;s<this.config.plugins.length;s++){let o=this.config.plugins[s];if(o.spec.appendTransaction){let l=r?r[s].n:0,a=r?r[s].state:this,h=l<t.length&&o.spec.appendTransaction.call(o,l?t.slice(l):t,a,n);if(h&&n.filterTransaction(h,s)){if(h.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<s?{state:n,n:t.length}:{state:this,n:0})}t.push(h),n=n.applyInner(h),i=!0}r&&(r[s]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let t=new S(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let i=n[r];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new k(this)}static create(e){let t=new x(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new S(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new x(this.schema,e.plugins),n=t.fields,r=new S(t);for(let t=0;t<n.length;t++){let i=n[t].name;r[i]=this.hasOwnProperty(i)?this[i]:n[t].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw RangeError("Required config field 'schema' missing");let i=new x(e.schema,e.plugins),s=new S(i);return i.fields.forEach(i=>{if("doc"==i.name)s.doc=r.bP.fromJSON(e.schema,t.doc);else if("selection"==i.name)s.selection=o.fromJSON(s.doc,t.selection);else if("storedMarks"==i.name)t.storedMarks&&(s.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let r in n){let o=n[r],l=o.spec.state;if(o.key==i.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(t,r)){s[i.name]=l.fromJSON.call(o,e,t[r],s);return}}s[i.name]=i.init(e,s)}}),s}}class M{constructor(e){this.spec=e,this.props={},e.props&&function e(t,n,r){for(let i in t){let s=t[i];s instanceof Function?s=s.bind(n):"handleDOMEvents"==i&&(s=e(s,n,{})),r[i]=s}return r}(e.props,this,this.props),this.key=e.key?e.key.key:A("plugin")}getState(e){return e[this.key]}}let C=Object.create(null);function A(e){return e in C?e+"$"+ ++C[e]:(C[e]=0,e+"$")}class T{constructor(e="key"){this.key=A(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},36755:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},36955:(e,t,n)=>{e.exports=n(50515)},37915:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},39180:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]])},42242:(e,t,n)=>{n.d(t,{$Z:()=>H,hG:()=>V});var r=n(1856),i=n(38129),s=n(87161),o=n(90508),l=n(17749);let{getOwnPropertyNames:a,getOwnPropertySymbols:h}=Object,{hasOwnProperty:c}=Object.prototype;function d(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function p(e){return function(t,n,r){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r);let{cache:i}=r,s=i.get(t),o=i.get(n);if(s&&o)return s===n&&o===t;i.set(t,n),i.set(n,t);let l=e(t,n,r);return i.delete(t),i.delete(n),l}}function u(e){return a(e).concat(h(e))}let f=Object.hasOwn||((e,t)=>c.call(e,t));function m(e,t){return e===t||!e&&!t&&e!=e&&t!=t}let{getOwnPropertyDescriptor:g,keys:y}=Object;function k(e,t){return e.byteLength===t.byteLength&&L(new Uint8Array(e),new Uint8Array(t))}function v(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function w(e,t){return e.byteLength===t.byteLength&&L(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function b(e,t){return m(e.getTime(),t.getTime())}function x(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function S(e,t){return e===t}function M(e,t,n){let r,i,s=e.size;if(s!==t.size)return!1;if(!s)return!0;let o=Array(s),l=e.entries(),a=0;for(;(r=l.next())&&!r.done;){let s=t.entries(),l=!1,h=0;for(;(i=s.next())&&!i.done;){if(o[h]){h++;continue}let s=r.value,c=i.value;if(n.equals(s[0],c[0],a,h,e,t,n)&&n.equals(s[1],c[1],s[0],c[0],e,t,n)){l=o[h]=!0;break}h++}if(!l)return!1;a++}return!0}function C(e,t,n){let r=y(e),i=r.length;if(y(t).length!==i)return!1;for(;i-- >0;)if(!R(e,t,n,r[i]))return!1;return!0}function A(e,t,n){let r,i,s,o=u(e),l=o.length;if(u(t).length!==l)return!1;for(;l-- >0;)if(!R(e,t,n,r=o[l])||(i=g(e,r),s=g(t,r),(i||s)&&(!i||!s||i.configurable!==s.configurable||i.enumerable!==s.enumerable||i.writable!==s.writable)))return!1;return!0}function T(e,t){return m(e.valueOf(),t.valueOf())}function E(e,t){return e.source===t.source&&e.flags===t.flags}function O(e,t,n){let r,i,s=e.size;if(s!==t.size)return!1;if(!s)return!0;let o=Array(s),l=e.values();for(;(r=l.next())&&!r.done;){let s=t.values(),l=!1,a=0;for(;(i=s.next())&&!i.done;){if(!o[a]&&n.equals(r.value,i.value,r.value,i.value,e,t,n)){l=o[a]=!0;break}a++}if(!l)return!1}return!0}function L(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function I(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function R(e,t,n,r){return("_owner"===r||"__o"===r||"__v"===r)&&(!!e.$$typeof||!!t.$$typeof)||f(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}let N={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},z=Object.prototype.toString,j=P();function P(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,s=function({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:a,arePrimitiveWrappersEqual:h,areRegExpsEqual:c,areSetsEqual:d,areTypedArraysEqual:p,areUrlsEqual:u,unknownTagComparators:f}){return function(m,g,y){if(m===g)return!0;if(null==m||null==g)return!1;let k=typeof m;if(k!==typeof g)return!1;if("object"!==k)return"number"===k?l(m,g,y):"function"===k&&s(m,g,y);let v=m.constructor;if(v!==g.constructor)return!1;if(v===Object)return a(m,g,y);if(Array.isArray(m))return t(m,g,y);if(v===Date)return r(m,g,y);if(v===RegExp)return c(m,g,y);if(v===Map)return o(m,g,y);if(v===Set)return d(m,g,y);let w=z.call(m);if("[object Date]"===w)return r(m,g,y);if("[object RegExp]"===w)return c(m,g,y);if("[object Map]"===w)return o(m,g,y);if("[object Set]"===w)return d(m,g,y);if("[object Object]"===w)return"function"!=typeof m.then&&"function"!=typeof g.then&&a(m,g,y);if("[object URL]"===w)return u(m,g,y);if("[object Error]"===w)return i(m,g,y);if("[object Arguments]"===w)return a(m,g,y);if(N[w])return p(m,g,y);if("[object ArrayBuffer]"===w)return e(m,g,y);if("[object DataView]"===w)return n(m,g,y);if("[object Boolean]"===w||"[object Number]"===w||"[object String]"===w)return h(m,g,y);if(f){let e=f[w];if(!e){let t=null!=m?m[Symbol.toStringTag]:void 0;t&&(e=f[t])}if(e)return e(m,g,y)}return!1}}(function({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:k,areArraysEqual:n?A:v,areDataViewsEqual:w,areDatesEqual:b,areErrorsEqual:x,areFunctionsEqual:S,areMapsEqual:n?d(M,A):M,areNumbersEqual:m,areObjectsEqual:n?A:C,arePrimitiveWrappersEqual:T,areRegExpsEqual:E,areSetsEqual:n?d(O,A):O,areTypedArraysEqual:n?d(L,A):L,areUrlsEqual:I,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=p(r.areArraysEqual),t=p(r.areMapsEqual),n=p(r.areObjectsEqual),i=p(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}(e)),o=n?n(s):function(e,t,n,r,i,o,l){return s(e,t,l)};return function({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(s,o){let{cache:l=e?new WeakMap:void 0,meta:a}=n();return t(s,o,{cache:l,equals:r,meta:a,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let s={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,s)}}({circular:t,comparator:s,createState:r,equals:o,strict:i})}P({strict:!0}),P({circular:!0}),P({circular:!0,strict:!0}),P({createInternalComparator:()=>m}),P({strict:!0,createInternalComparator:()=>m}),P({circular:!0,createInternalComparator:()=>m}),P({circular:!0,createInternalComparator:()=>m,strict:!0});var $=n(36955),D=({contentComponent:e})=>{let t=(0,s.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,o.jsx)(o.Fragment,{children:Object.values(t)})},F=class extends r.Component{constructor(e){var t;super(e),this.editorContentRef=r.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(null==(t=e.editor)?void 0:t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;let t=this.props.editor;if(t&&!t.isDestroyed&&(null==(e=t.view.dom)?void 0:e.parentNode)){if(t.contentComponent)return;let e=this.editorContentRef.current;e.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:e}),t.contentComponent=function(){let e=new Set,t={};return{subscribe:t=>(e.add(t),()=>{e.delete(t)}),getSnapshot:()=>t,getServerSnapshot:()=>t,setRenderer(n,r){t={...t,[n]:i.createPortal(r.reactElement,r.element,n)},e.forEach(e=>e())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(e=>e())}}}(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(e=>e.hasContentComponentInitialized?e:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;let t=this.props.editor;if(t){this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null;try{if(!(null==(e=t.view.dom)?void 0:e.parentNode))return;let n=document.createElement("div");n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{ref:((...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})})(t,this.editorContentRef),...n}),(null==e?void 0:e.contentComponent)&&(0,o.jsx)(D,{contentComponent:e.contentComponent})]})}},B=(0,r.forwardRef)((e,t)=>{let n=r.useMemo(()=>Math.floor(0xffffffff*Math.random()).toString(),[e.editor]);return r.createElement(F,{key:n,innerRef:t,...e})}),H=r.memo(B),J="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,K=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber||(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber}),this.lastSnapshot}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let e=()=>{this.transactionNumber+=1,this.subscribers.forEach(e=>e())},t=this.editor;return t.on("transaction",e),()=>{t.off("transaction",e)}}}},q="undefined"==typeof window,_=q||!!("undefined"!=typeof window&&window.next),U=class e{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(e=>e())}getInitialEditor(){if(void 0===this.options.current.immediatelyRender)return q||_?null:this.createEditor();return this.options.current.immediatelyRender,this.options.current.immediatelyRender?this.createEditor():null}createEditor(){let e={...this.options.current,onBeforeCreate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onBeforeCreate)?void 0:n.call(t,...e)},onBlur:(...e)=>{var t,n;return null==(n=(t=this.options.current).onBlur)?void 0:n.call(t,...e)},onCreate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onCreate)?void 0:n.call(t,...e)},onDestroy:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDestroy)?void 0:n.call(t,...e)},onFocus:(...e)=>{var t,n;return null==(n=(t=this.options.current).onFocus)?void 0:n.call(t,...e)},onSelectionUpdate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onSelectionUpdate)?void 0:n.call(t,...e)},onTransaction:(...e)=>{var t,n;return null==(n=(t=this.options.current).onTransaction)?void 0:n.call(t,...e)},onUpdate:(...e)=>{var t,n;return null==(n=(t=this.options.current).onUpdate)?void 0:n.call(t,...e)},onContentError:(...e)=>{var t,n;return null==(n=(t=this.options.current).onContentError)?void 0:n.call(t,...e)},onDrop:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDrop)?void 0:n.call(t,...e)},onPaste:(...e)=>{var t,n;return null==(n=(t=this.options.current).onPaste)?void 0:n.call(t,...e)},onDelete:(...e)=>{var t,n;return null==(n=(t=this.options.current).onDelete)?void 0:n.call(t,...e)}};return new l.KE(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(n=>!!["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(n)||("extensions"===n&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length&&e.extensions.every((e,n)=>{var r;return e===(null==(r=t.extensions)?void 0:r[n])}):e[n]===t[n]))}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&0===t.length?e.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(null===this.previousDeps){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((t,n)=>t===e[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){let e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){t&&t.setOptions(this.options.current);return}t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function V(e={},t=[]){let n=(0,r.useRef)(e);n.current=e;let[i]=(0,r.useState)(()=>new U(n)),o=(0,s.useSyncExternalStore)(i.subscribe,i.getEditor,i.getServerSnapshot);return(0,r.useDebugValue)(o),(0,r.useEffect)(i.onRender(t)),!function(e){var t;let[n]=(0,r.useState)(()=>new K(e.editor)),i=(0,$.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,null!=(t=e.equalityFn)?t:j);J(()=>n.watch(e.editor),[e.editor,n]),(0,r.useDebugValue)(i)}({editor:o,selector:({transactionNumber:t})=>!1===e.shouldRerenderOnTransaction||void 0===e.shouldRerenderOnTransaction?null:e.immediatelyRender&&0===t?0:t+1}),o}var W=(0,r.createContext)({editor:null});W.Consumer;var G=(0,r.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});r.forwardRef((e,t)=>{let{onDragStart:n}=(0,r.useContext)(G),i=e.as||"div";return(0,o.jsx)(i,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})}),r.createContext({markViewContentRef:()=>{}}),l.Db,l.Yv;var Y=(0,r.createContext)({get editor(){throw Error("useTiptap must be used within a <Tiptap> provider")}});function X({editor:e,instance:t,children:n}){let i=null!=e?e:t;if(!i)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let s=(0,r.useMemo)(()=>({editor:i}),[i]),l=(0,r.useMemo)(()=>({editor:i}),[i]);return(0,o.jsx)(W.Provider,{value:l,children:(0,o.jsx)(Y.Provider,{value:s,children:n})})}function Z({...e}){let{editor:t}=(0,r.useContext)(Y);return(0,o.jsx)(H,{editor:t,...e})}Y.displayName="TiptapContext",X.displayName="Tiptap",Z.displayName="Tiptap.Content",Object.assign(X,{Content:Z})},43057:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]])},44575:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},45477:(e,t,n)=>{n.d(t,{z:()=>i});var r=n(87161);function i(){return(0,r.useSyncExternalStore)(s,()=>!0,()=>!1)}function s(){return()=>{}}},45841:(e,t,n)=>{n.r(t),n.d(t,{Arrow:()=>G,Content:()=>W,Portal:()=>V,Provider:()=>q,Root:()=>_,Tooltip:()=>E,TooltipArrow:()=>K,TooltipContent:()=>P,TooltipPortal:()=>z,TooltipProvider:()=>M,TooltipTrigger:()=>L,Trigger:()=>U,createTooltipScope:()=>k});var r=n(1856),i=n(33328),s=n(34124),o=n(21032),l=n(63569),a=n(40577),h=n(67221),c=n(17533),d=n(19900),p=n(93367),u=n(54154),f=n(66249),m=n(78134),g=n(90508),[y,k]=(0,o.A)("Tooltip",[h.Bk]),v=(0,h.Bk)(),w="TooltipProvider",b="tooltip.open",[x,S]=y(w),M=e=>{let{__scopeTooltip:t,delayDuration:n=700,skipDelayDuration:i=300,disableHoverableContent:s=!1,children:o}=e,l=r.useRef(!0),a=r.useRef(!1),h=r.useRef(0);return r.useEffect(()=>{let e=h.current;return()=>window.clearTimeout(e)},[]),(0,g.jsx)(x,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:r.useCallback(()=>{window.clearTimeout(h.current),l.current=!1},[]),onClose:r.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>l.current=!0,i)},[i]),isPointerInTransitRef:a,onPointerInTransitChange:r.useCallback(e=>{a.current=e},[]),disableHoverableContent:s,children:o})};M.displayName=w;var C="Tooltip",[A,T]=y(C),E=e=>{let{__scopeTooltip:t,children:n,open:i,defaultOpen:s,onOpenChange:o,disableHoverableContent:l,delayDuration:c}=e,d=S(C,e.__scopeTooltip),p=v(t),[u,m]=r.useState(null),y=(0,a.B)(),k=r.useRef(0),w=null!=l?l:d.disableHoverableContent,x=null!=c?c:d.delayDuration,M=r.useRef(!1),[T,E]=(0,f.i)({prop:i,defaultProp:null!=s&&s,onChange:e=>{e?(d.onOpen(),document.dispatchEvent(new CustomEvent(b))):d.onClose(),null==o||o(e)},caller:C}),O=r.useMemo(()=>T?M.current?"delayed-open":"instant-open":"closed",[T]),L=r.useCallback(()=>{window.clearTimeout(k.current),k.current=0,M.current=!1,E(!0)},[E]),I=r.useCallback(()=>{window.clearTimeout(k.current),k.current=0,E(!1)},[E]),R=r.useCallback(()=>{window.clearTimeout(k.current),k.current=window.setTimeout(()=>{M.current=!0,E(!0),k.current=0},x)},[x,E]);return r.useEffect(()=>()=>{k.current&&(window.clearTimeout(k.current),k.current=0)},[]),(0,g.jsx)(h.bL,{...p,children:(0,g.jsx)(A,{scope:t,contentId:y,open:T,stateAttribute:O,trigger:u,onTriggerChange:m,onTriggerEnter:r.useCallback(()=>{d.isOpenDelayedRef.current?R():L()},[d.isOpenDelayedRef,R,L]),onTriggerLeave:r.useCallback(()=>{w?I():(window.clearTimeout(k.current),k.current=0)},[I,w]),onOpen:L,onClose:I,disableHoverableContent:w,children:n})})};E.displayName=C;var O="TooltipTrigger",L=r.forwardRef((e,t)=>{let{__scopeTooltip:n,...o}=e,l=T(O,n),a=S(O,n),c=v(n),d=r.useRef(null),u=(0,s.s)(t,d,l.onTriggerChange),f=r.useRef(!1),m=r.useRef(!1),y=r.useCallback(()=>f.current=!1,[]);return r.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),(0,g.jsx)(h.Mz,{asChild:!0,...c,children:(0,g.jsx)(p.sG.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...o,ref:u,onPointerMove:(0,i.mK)(e.onPointerMove,e=>{"touch"!==e.pointerType&&(m.current||a.isPointerInTransitRef.current||(l.onTriggerEnter(),m.current=!0))}),onPointerLeave:(0,i.mK)(e.onPointerLeave,()=>{l.onTriggerLeave(),m.current=!1}),onPointerDown:(0,i.mK)(e.onPointerDown,()=>{l.open&&l.onClose(),f.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:(0,i.mK)(e.onFocus,()=>{f.current||l.onOpen()}),onBlur:(0,i.mK)(e.onBlur,l.onClose),onClick:(0,i.mK)(e.onClick,l.onClose)})})});L.displayName=O;var I="TooltipPortal",[R,N]=y(I,{forceMount:void 0}),z=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,s=T(I,t);return(0,g.jsx)(R,{scope:t,forceMount:n,children:(0,g.jsx)(d.C,{present:n||s.open,children:(0,g.jsx)(c.Portal,{asChild:!0,container:i,children:r})})})};z.displayName=I;var j="TooltipContent",P=r.forwardRef((e,t)=>{let n=N(j,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...s}=e,o=T(j,e.__scopeTooltip);return(0,g.jsx)(d.C,{present:r||o.open,children:o.disableHoverableContent?(0,g.jsx)(H,{side:i,...s,ref:t}):(0,g.jsx)($,{side:i,...s,ref:t})})}),$=r.forwardRef((e,t)=>{let n=T(j,e.__scopeTooltip),i=S(j,e.__scopeTooltip),o=r.useRef(null),l=(0,s.s)(t,o),[a,h]=r.useState(null),{trigger:c,onClose:d}=n,p=o.current,{onPointerInTransitChange:u}=i,f=r.useCallback(()=>{h(null),u(!1)},[u]),m=r.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=function(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw Error("unreachable")}}(r,n.getBoundingClientRect());h(function(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:1*!!(e.y>t.y)),function(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return(n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y)?t:t.concat(n)}(t)}([...function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,i),...function(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}(t.getBoundingClientRect())])),u(!0)},[u]);return r.useEffect(()=>()=>f(),[f]),r.useEffect(()=>{if(c&&p){let e=e=>m(e,p),t=e=>m(e,c);return c.addEventListener("pointerleave",e),p.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),p.removeEventListener("pointerleave",t)}}},[c,p,m,f]),r.useEffect(()=>{if(a){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=(null==c?void 0:c.contains(t))||(null==p?void 0:p.contains(t)),i=!function(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,s=t.length-1;e<t.length;s=e++){let o=t[e],l=t[s],a=o.x,h=o.y,c=l.x,d=l.y;h>r!=d>r&&n<(c-a)*(r-h)/(d-h)+a&&(i=!i)}return i}(n,a);r?f():i&&(f(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[c,p,a,d,f]),(0,g.jsx)(H,{...e,ref:l})}),[D,F]=y(C,{isInside:!1}),B=(0,u.Dc)("TooltipContent"),H=r.forwardRef((e,t)=>{let{__scopeTooltip:n,children:i,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:a,...c}=e,d=T(j,n),p=v(n),{onClose:u}=d;return r.useEffect(()=>(document.addEventListener(b,u),()=>document.removeEventListener(b,u)),[u]),r.useEffect(()=>{if(d.trigger){let e=e=>{let t=e.target;(null==t?void 0:t.contains(d.trigger))&&u()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[d.trigger,u]),(0,g.jsx)(l.qW,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,g.jsxs)(h.UC,{"data-state":d.stateAttribute,...p,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,g.jsx)(B,{children:i}),(0,g.jsx)(D,{scope:n,isInside:!0,children:(0,g.jsx)(m.bL,{id:d.contentId,role:"tooltip",children:s||i})})]})})});P.displayName=j;var J="TooltipArrow",K=r.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=v(n);return F(J,n).isInside?null:(0,g.jsx)(h.i3,{...i,...r,ref:t})});K.displayName=J;var q=M,_=E,U=L,V=z,W=P,G=K},48016:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("hard-drive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},48717:(e,t,n)=>{n.d(t,{$B:()=>l,Sd:()=>s,T2:()=>o});var r=n(28155),i=n(65282);function s(e,t=null){return function(n,s){let{$from:o,$to:l}=n.selection,a=o.blockRange(l);if(!a)return!1;let h=s?n.tr:null;return!!function(e,t,n,s=null){let o=!1,l=t,a=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&0==t.startIndex){if(0==t.$from.index(t.depth-1))return!1;let e=a.resolve(t.start-2);l=new i.u$(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new i.u$(t.$from,a.resolve(t.$to.end(t.depth)),t.depth)),o=!0}let h=(0,r.oM)(l,n,s,t);return!!h&&(e&&function(e,t,n,s,o){let l=i.FK.empty;for(let e=n.length-1;e>=0;e--)l=i.FK.from(n[e].type.create(n[e].attrs,l));e.step(new r.Wg(t.start-2*!!s,t.end,t.start,t.end,new i.Ji(l,0,0),n.length,!0));let a=0;for(let e=0;e<n.length;e++)n[e].type==o&&(a=e+1);let h=n.length-a,c=t.start+n.length-2*!!s,d=t.parent;for(let n=t.startIndex,i=t.endIndex,s=!0;n<i;n++,s=!1)!s&&(0,r.zy)(e.doc,c,h)&&(e.split(c,h),c+=2*h),c+=d.child(n).nodeSize}(e,t,h,o,n),!0)}(h,a,e,t)&&(s&&s(h.scrollIntoView()),!0)}}function o(e){return function(t,n){let{$from:s,$to:o}=t.selection,l=s.blockRange(o,t=>t.childCount>0&&t.firstChild.type==e);return!!l&&(!n||(s.node(l.depth-1).type==e?function(e,t,n,s){let o=e.tr,l=s.end,a=s.$to.end(s.depth);l<a&&(o.step(new r.Wg(l-1,a,l,a,new i.Ji(i.FK.from(n.create(null,s.parent.copy())),1,0),1,!0)),s=new i.u$(o.doc.resolve(s.$from.pos),o.doc.resolve(a),s.depth));let h=(0,r.jP)(s);if(null==h)return!1;o.lift(s,h);let c=o.doc.resolve(o.mapping.map(l,-1)-1);return(0,r.n9)(o.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&o.join(c.pos),t(o.scrollIntoView()),!0}(t,n,e,l):function(e,t,n){let s=e.tr,o=n.parent;for(let e=n.end,t=n.endIndex-1,r=n.startIndex;t>r;t--)e-=o.child(t).nodeSize,s.delete(e-1,e+1);let l=s.doc.resolve(n.start),a=l.nodeAfter;if(s.mapping.map(n.end)!=n.start+l.nodeAfter.nodeSize)return!1;let h=0==n.startIndex,c=n.endIndex==o.childCount,d=l.node(-1),p=l.index(-1);if(!d.canReplace(p+ +!h,p+1,a.content.append(c?i.FK.empty:i.FK.from(o))))return!1;let u=l.pos,f=u+a.nodeSize;return s.step(new r.Wg(u-!!h,f+ +!!c,u+1,f-1,new i.Ji((h?i.FK.empty:i.FK.from(o.copy(i.FK.empty))).append(c?i.FK.empty:i.FK.from(o.copy(i.FK.empty))),+!h,+!c),+!h)),t(s.scrollIntoView()),!0}(t,n,l)))}}function l(e){return function(t,n){let{$from:s,$to:o}=t.selection,l=s.blockRange(o,t=>t.childCount>0&&t.firstChild.type==e);if(!l)return!1;let a=l.startIndex;if(0==a)return!1;let h=l.parent,c=h.child(a-1);if(c.type!=e)return!1;if(n){let s=c.lastChild&&c.lastChild.type==h.type,o=i.FK.from(s?e.create():null),a=new i.Ji(i.FK.from(e.create(null,i.FK.from(h.type.create(null,o)))),s?3:1,0),d=l.start,p=l.end;n(t.tr.step(new r.Wg(d-(s?3:1),p,d,p,a,1,!0)).scrollIntoView())}return!0}}},50153:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("wifi-off",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},50515:(e,t,n)=>{var r=n(1856),i=n(87161),s="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=i.useSyncExternalStore,l=r.useRef,a=r.useEffect,h=r.useMemo,c=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=l(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;var u=o(e,(d=h(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),void 0!==i&&p.hasValue){var t=p.value;if(i(t,e))return l=t}return l=e}if(t=l,s(o,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(o=e,t):(o=e,l=n)}var o,l,a=!1,h=void 0===n?null:n;return[function(){return e(t())},null===h?void 0:function(){return e(h())}]},[t,n,r,i]))[0],d[1]);return a(function(){p.hasValue=!0,p.value=u},[u]),c(u),u}},51509:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("folder-x",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9.5 10.5 5 5",key:"ra9qjz"}],["path",{d:"m14.5 10.5-5 5",key:"l2rkpq"}]])},52309:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},58057:(e,t,n)=>{n.r(t),n.d(t,{Label:()=>o,Root:()=>l});var r=n(1856),i=n(93367),s=n(90508),o=r.forwardRef((e,t)=>(0,s.jsx)(i.sG.label,{...e,ref:t,onMouseDown:t=>{var n;t.target.closest("button, input, select, textarea")||(null==(n=e.onMouseDown)||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));o.displayName="Label";var l=o},59133:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},59547:(e,t,n)=>{n.d(t,{K:()=>f,w:()=>u});for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},i={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},s="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),o="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),l=0;l<10;l++)r[48+l]=r[96+l]=String(l);for(var l=1;l<=24;l++)r[l+111]="F"+l;for(var l=65;l<=90;l++)r[l]=String.fromCharCode(l+32),i[l]=String.fromCharCode(l);for(var a in r)i.hasOwnProperty(a)||(i[a]=r[a]);var h=n(32603);let c="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),d="undefined"!=typeof navigator&&/Win/.test(navigator.platform);function p(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function u(e){return new h.k_({props:{handleKeyDown:f(e)}})}function f(e){let t=function(e){let t=Object.create(null);for(let n in e)t[function(e){let t,n,r,i,s=e.split(/-(?!$)/),o=s[s.length-1];"Space"==o&&(o=" ");for(let e=0;e<s.length-1;e++){let o=s[e];if(/^(cmd|meta|m)$/i.test(o))i=!0;else if(/^a(lt)?$/i.test(o))t=!0;else if(/^(c|ctrl|control)$/i.test(o))n=!0;else if(/^s(hift)?$/i.test(o))r=!0;else if(/^mod$/i.test(o))c?i=!0:n=!0;else throw Error("Unrecognized modifier name: "+o)}return t&&(o="Alt-"+o),n&&(o="Ctrl-"+o),i&&(o="Meta-"+o),r&&(o="Shift-"+o),o}(n)]=e[n];return t}(e);return function(e,n){var l;let a=("Esc"==(l=!(s&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||o&&n.shiftKey&&n.key&&1==n.key.length||"Unidentified"==n.key)&&n.key||(n.shiftKey?i:r)[n.keyCode]||n.key||"Unidentified")&&(l="Escape"),"Del"==l&&(l="Delete"),"Left"==l&&(l="ArrowLeft"),"Up"==l&&(l="ArrowUp"),"Right"==l&&(l="ArrowRight"),"Down"==l&&(l="ArrowDown"),l),h,c=t[p(a,n)];if(c&&c(e.state,e.dispatch,e))return!0;if(1==a.length&&" "!=a){if(n.shiftKey){let r=t[p(a,n,!1)];if(r&&r(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(d&&n.ctrlKey&&n.altKey)&&(h=r[n.keyCode])&&h!=a){let r=t[p(h,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}},60322:(e,t,n)=>{n.r(t),n.d(t,{Root:()=>x,Switch:()=>y,SwitchThumb:()=>v,Thumb:()=>S,createSwitchScope:()=>f});var r=n(1856),i=n(33328),s=n(34124),o=n(21032),l=n(66249),a=n(72009),h=n(3705),c=n(93367),d=n(90508),p="Switch",[u,f]=(0,o.A)(p),[m,g]=u(p),y=r.forwardRef((e,t)=>{let{__scopeSwitch:n,name:o,checked:a,defaultChecked:h,required:u,disabled:f,value:g="on",onCheckedChange:y,form:k,...v}=e,[x,S]=r.useState(null),M=(0,s.s)(t,e=>S(e)),C=r.useRef(!1),A=!x||k||!!x.closest("form"),[T,E]=(0,l.i)({prop:a,defaultProp:null!=h&&h,onChange:y,caller:p});return(0,d.jsxs)(m,{scope:n,checked:T,disabled:f,children:[(0,d.jsx)(c.sG.button,{type:"button",role:"switch","aria-checked":T,"aria-required":u,"data-state":b(T),"data-disabled":f?"":void 0,disabled:f,value:g,...v,ref:M,onClick:(0,i.mK)(e.onClick,e=>{E(e=>!e),A&&(C.current=e.isPropagationStopped(),C.current||e.stopPropagation())})}),A&&(0,d.jsx)(w,{control:x,bubbles:!C.current,name:o,value:g,checked:T,required:u,disabled:f,form:k,style:{transform:"translateX(-100%)"}})]})});y.displayName=p;var k="SwitchThumb",v=r.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=g(k,n);return(0,d.jsx)(c.sG.span,{"data-state":b(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});v.displayName=k;var w=r.forwardRef((e,t)=>{let{__scopeSwitch:n,control:i,checked:o,bubbles:l=!0,...c}=e,p=r.useRef(null),u=(0,s.s)(p,t),f=(0,a.Z)(o),m=(0,h.X)(i);return r.useEffect(()=>{let e=p.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(f!==o&&t){let n=new Event("click",{bubbles:l});t.call(e,o),e.dispatchEvent(n)}},[f,o,l]),(0,d.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...c,tabIndex:-1,ref:u,style:{...c.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function b(e){return e?"checked":"unchecked"}w.displayName="SwitchBubbleInput";var x=y,S=v},62482:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]])},65282:(e,t,n)=>{function r(e){this.content=e}n.d(t,{S4:()=>B,ZF:()=>G,FK:()=>i,CU:()=>a,sX:()=>$,bP:()=>S,u$:()=>b,vI:()=>h,Sj:()=>D,Ji:()=>c}),r.prototype={constructor:r,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return -1},get:function(e){var t=this.find(e);return -1==t?void 0:this.content[t+1]},update:function(e,t,n){var i=n&&n!=e?this.remove(n):this,s=i.find(e),o=i.content.slice();return -1==s?o.push(n||e,t):(o[s+1]=t,n&&(o[s]=n)),new r(o)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new r(n)},addToStart:function(e,t){return new r([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new r(n)},addBefore:function(e,t,n){var i=this.remove(t),s=i.content.slice(),o=i.find(e);return s.splice(-1==o?s.length:o,0,t,n),new r(s)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=r.from(e)).size?new r(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=r.from(e)).size?new r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=r.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};class i{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let s=0,o=0;o<t;s++){let l=this.content[s],a=o+l.nodeSize;if(a>e&&!1!==n(l,r+o,i||null,s)&&l.content.size){let i=o+1;l.nodesBetween(Math.max(0,e-i),Math.min(l.content.size,t-i),n,r+i)}o=a}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i="",s=!0;return this.nodesBetween(e,t,(o,l)=>{let a=o.isText?o.text.slice(Math.max(e,l)-l,t-l):o.isLeaf?r?"function"==typeof r?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):"":"";o.isBlock&&(o.isLeaf&&a||o.isTextblock)&&n&&(s?s=!1:i+=n),i+=a},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),s=1);s<e.content.length;s++)r.push(e.content[s]);return new i(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let i=0,s=0;s<t;i++){let o=this.content[i],l=s+o.nodeSize;l>e&&((s<e||l>t)&&(o=o.isText?o.cut(Math.max(0,e-s),Math.min(o.text.length,t-s)):o.cut(Math.max(0,e-s-1),Math.min(o.content.size,t-s-1))),n.push(o),r+=o.nodeSize),s=l}return new i(n,r)}cutByIndex(e,t){return e==t?i.empty:0==e&&t==this.content.length?this:new i(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),s=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new i(r,s)}addToStart(e){return new i([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new i(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return function e(t,n,r){for(let i=0;;i++){if(i==t.childCount||i==n.childCount)return t.childCount==n.childCount?null:r;let s=t.child(i),o=n.child(i);if(s==o){r+=s.nodeSize;continue}if(!s.sameMarkup(o))return r;if(s.isText&&s.text!=o.text){for(let e=0;s.text[e]==o.text[e];e++)r++;return r}if(s.content.size||o.content.size){let t=e(s.content,o.content,r+1);if(null!=t)return t}r+=s.nodeSize}}(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return function e(t,n,r,i){for(let s=t.childCount,o=n.childCount;;){if(0==s||0==o)return s==o?null:{a:r,b:i};let l=t.child(--s),a=n.child(--o),h=l.nodeSize;if(l==a){r-=h,i-=h;continue}if(!l.sameMarkup(a))return{a:r,b:i};if(l.isText&&l.text!=a.text){let e=0,t=Math.min(l.text.length,a.text.length);for(;e<t&&l.text[l.text.length-e-1]==a.text[a.text.length-e-1];)e++,r--,i--;return{a:r,b:i}}if(l.content.size||a.content.size){let t=e(l.content,a.content,r-1,i-1);if(t)return t}r-=h,i-=h}}(this,e,t,n)}findIndex(e){if(0==e)return o(0,e);if(e==this.size)return o(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=n+this.child(t).nodeSize;if(r>=e){if(r==e)return o(t+1,r);return o(t,n)}n=r}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return i.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return new i(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return i.empty;let t,n=0;for(let r=0;r<e.length;r++){let i=e[r];n+=i.nodeSize,r&&i.isText&&e[r-1].sameMarkup(i)?(t||(t=e.slice(0,r)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new i(t||e,n)}static from(e){if(!e)return i.empty;if(e instanceof i)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new i([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}i.empty=new i([],0);let s={index:0,offset:0};function o(e,t){return s.index=e,s.offset=t,s}function l(e,t){if(e===t)return!0;if(!(e&&"object"==typeof e)||!(t&&"object"==typeof t))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!l(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!l(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class a{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,r));else{if(i.type.excludes(this.type))return e;!n&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&l(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return a.none;if(e instanceof a)return[e];let t=e.slice();return t.sort((e,t)=>e.type.rank-t.type.rank),t}}a.none=[];class h extends Error{}class c{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=function e(t,n,r,i){let{index:s,offset:o}=t.findIndex(n),l=t.maybeChild(s);if(o==n||l.isText)return i&&!i.canReplace(s,s,r)?null:t.cut(0,n).append(r).append(t.cut(n));let a=e(l.content,n-o-1,r,l);return a&&t.replaceChild(s,l.copy(a))}(this.content,e+this.openStart,t);return n&&new c(n,this.openStart,this.openEnd)}removeBetween(e,t){return new c(function e(t,n,r){let{index:i,offset:s}=t.findIndex(n),o=t.maybeChild(i),{index:l,offset:a}=t.findIndex(r);if(s==n||o.isText){if(a!=r&&!t.child(l).isText)throw RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=l)throw RangeError("Removing non-flat range");return t.replaceChild(i,o.copy(e(o.content,n-s-1,r-s-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return c.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw RangeError("Invalid input for Slice.fromJSON");return new c(i.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let r=e.firstChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=e.lastChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.lastChild)r++;return new c(e,n,r)}}function d(e,t){if(!t.type.compatibleContent(e.type))throw new h("Cannot join "+t.type.name+" onto "+e.type.name)}function p(e,t,n){let r=e.node(n);return d(r,t.node(n)),r}function u(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function f(e,t,n,r){let i=(t||e).node(n),s=0,o=t?t.index(n):i.childCount;e&&(s=e.index(n),e.depth>n?s++:e.textOffset&&(u(e.nodeAfter,r),s++));for(let e=s;e<o;e++)u(i.child(e),r);t&&t.depth==n&&t.textOffset&&u(t.nodeBefore,r)}function m(e,t){return e.type.checkContent(t),e.copy(t)}function g(e,t,n){let r=[];return f(null,e,n,r),e.depth>n&&u(m(p(e,t,n+1),g(e,t,n+1)),r),f(t,null,n,r),new i(r)}c.empty=new c(i.empty,0,0);class y{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return a.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var s=0;s<i.length;s++)!1!==i[s].type.spec.inclusive||r&&i[s].isInSet(r.marks)||(i=i[s--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new b(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw RangeError("Position "+t+" out of range");let n=[],r=0,i=t;for(let t=e;;){let{index:e,offset:s}=t.content.findIndex(i),o=i-s;if(n.push(t,e,r+s),!o||(t=t.child(e)).isText)break;i=o-1,r+=s+1}return new y(t,n,i)}static resolveCached(e,t){let n=w.get(e);if(n)for(let e=0;e<n.elts.length;e++){let r=n.elts[e];if(r.pos==t)return r}else w.set(e,n=new k);let r=n.elts[n.i]=y.resolve(e,t);return n.i=(n.i+1)%v,r}}class k{constructor(){this.elts=[],this.i=0}}let v=12,w=new WeakMap;class b{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}let x=Object.create(null);class S{constructor(e,t,n,r=a.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||i.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&l(this.attrs,t||e.defaultAttrs||x)&&a.sameSet(this.marks,n||a.none)}copy(e=null){return e==this.content?this:new S(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new S(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return c.empty;let r=this.resolve(e),i=this.resolve(t),s=n?0:r.sharedDepth(t),o=r.start(s);return new c(r.node(s).content.cut(r.pos-o,i.pos-o),r.depth-s,i.depth-s)}replace(e,t,n){var r=this.resolve(e),s=this.resolve(t);if(n.openStart>r.depth)throw new h("Inserted content deeper than insertion position");if(r.depth-n.openStart!=s.depth-n.openEnd)throw new h("Inconsistent open depths");return function e(t,n,r,s){let o=t.index(s),l=t.node(s);if(o==n.index(s)&&s<t.depth-r.openStart){let i=e(t,n,r,s+1);return l.copy(l.content.replaceChild(o,i))}if(!r.content.size)return m(l,g(t,n,s));if(r.openStart||r.openEnd||t.depth!=s||n.depth!=s){let{start:e,end:o}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(i.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t);return m(l,function e(t,n,r,s,o){let l=t.depth>o&&p(t,n,o+1),a=s.depth>o&&p(r,s,o+1),h=[];return f(null,t,o,h),l&&a&&n.index(o)==r.index(o)?(d(l,a),u(m(l,e(t,n,r,s,o+1)),h)):(l&&u(m(l,g(t,n,o+1)),h),f(n,r,o,h),a&&u(m(a,g(r,s,o+1)),h)),f(s,null,o,h),new i(h)}(t,e,o,n,s))}{let e=t.parent,i=e.content;return m(e,i.cut(0,t.parentOffset).append(r.content).append(i.cut(n.parentOffset)))}}(r,s,n,0)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(!(t=t.maybeChild(n)))return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return y.resolveCached(this,e)}resolveNoCache(e){return y.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),C(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=i.empty,r=0,s=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,r,s),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let e=r;e<s;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),s=i&&i.matchFragment(this.content,t);return!!s&&s.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=a.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!a.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){let n;if(!t)throw RangeError("Invalid input for Node.fromJSON");if(t.marks){if(!Array.isArray(t.marks))throw RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=i.fromJSON(e,t.content),s=e.nodeType(t.type).create(t.attrs,r,n);return s.type.checkAttrs(s.attrs),s}}S.prototype.text=void 0;class M extends S{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):C(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new M(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new M(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function C(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class A{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){var n;let r,i=new T(e,t);if(null==i.next)return A.empty;let s=function e(t){let n=[];do n.push(function(t){let n=[];do n.push(function(t){let n=function(t){if(t.eat("(")){let n=e(t);return t.eat(")")||t.err("Missing closing paren"),n}if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=(function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i})(t,t.next).map(e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}}(t);for(;;)if(t.eat("+"))n={type:"plus",expr:n};else if(t.eat("*"))n={type:"star",expr:n};else if(t.eat("?"))n={type:"opt",expr:n};else if(t.eat("{"))n=function(e,t){let n=E(e),r=n;return e.eat(",")&&(r="}"!=e.next?E(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}(t,n);else break;return n}(t));while(t.next&&")"!=t.next&&"|"!=t.next);return 1==n.length?n[0]:{type:"seq",exprs:n}}(t));while(t.eat("|"));return 1==n.length?n[0]:{type:"choice",exprs:n}}(i);i.next&&i.err("Unexpected trailing text");let o=(n=function(e){let t=[[]];return i(function e(t,s){if("choice"==t.type)return t.exprs.reduce((t,n)=>t.concat(e(n,s)),[]);if("seq"==t.type)for(let r=0;;r++){let o=e(t.exprs[r],s);if(r==t.exprs.length-1)return o;i(o,s=n())}else if("star"==t.type){let o=n();return r(s,o),i(e(t.expr,o),o),[r(o)]}else if("plus"==t.type){let o=n();return i(e(t.expr,s),o),i(e(t.expr,o),o),[r(o)]}else if("opt"==t.type)return[r(s)].concat(e(t.expr,s));else if("range"==t.type){let o=s;for(let r=0;r<t.min;r++){let r=n();i(e(t.expr,o),r),o=r}if(-1==t.max)i(e(t.expr,o),o);else for(let s=t.min;s<t.max;s++){let s=n();r(o,s),i(e(t.expr,o),s),o=s}return[r(o)]}else if("name"==t.type)return[r(s,void 0,t.value)];else throw Error("Unknown expr type")}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}}(s),r=Object.create(null),function e(t){let i=[];t.forEach(e=>{n[e].forEach(({term:e,to:t})=>{let r;if(e){for(let t=0;t<i.length;t++)i[t][0]==e&&(r=i[t][1]);L(n,t).forEach(t=>{r||i.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)})}})});let s=r[t.join(",")]=new A(t.indexOf(n.length-1)>-1);for(let t=0;t<i.length;t++){let n=i[t][1].sort(O);s.next.push({type:i[t][0],next:r[n.join(",")]||e(n)})}return s}(L(n,0)));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,s=[];for(let t=0;t<e.next.length;t++){let{type:n,next:o}=e.next[t];s.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),-1==r.indexOf(o)&&r.push(o)}i&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,i),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function s(o,l){let a=o.matchFragment(e,n);if(a&&(!t||a.validEnd))return i.from(l.map(e=>e.createAndFill()));for(let e=0;e<o.next.length;e++){let{type:t,next:n}=o.next[e];if(!(t.isText||t.hasRequiredAttrs())&&-1==r.indexOf(n)){r.push(n);let e=s(n,l.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:s,next:o}=i.next[e];s.isLeaf||s.hasRequiredAttrs()||s.name in t||r.type&&!o.validEnd||(n.push({match:s.contentMatch,type:s,via:r}),t[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return!function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let n=0;n<t.next.length;n++)r+=(n?", ":"")+t.next[n].type.name+"->"+e.indexOf(t.next[n].next);return r}).join("\n")}}A.empty=new A(!0);class T{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+" (in content expression '"+this.string+"')")}}function E(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function O(e,t){return t-e}function L(e,t){let n=[];return function t(r){let i=e[r];if(1==i.length&&!i[0].term)return t(i[0].to);n.push(r);for(let e=0;e<i.length;e++){let{term:r,to:s}=i[e];r||-1!=n.indexOf(s)||t(s)}}(t),n.sort(O)}function I(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function R(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(void 0===i){let t=e[r];if(t.hasDefault)i=t.default;else throw RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function N(e,t,n,r){for(let r in t)if(!(r in e))throw RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let n in e){let r=e[n];r.validate&&r.validate(t[n])}}function z(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new P(e,r,t[r]);return n}class j{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=z(e,n.attrs),this.defaultAttrs=I(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==A.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:R(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new S(this,this.computeAttrs(e),i.from(t),a.setFrom(n))}createChecked(e=null,t,n){return t=i.from(t),this.checkContent(t),new S(this,this.computeAttrs(e),t,a.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=i.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),s=r&&r.fillBefore(i.empty,!0);return s?new S(this,e,t.append(s),a.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){N(this.attrs,e,"node",this.name)}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){let t;if(null==this.markSet)return e;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:a.none:e}static compile(e,t){let n=Object.create(null);e.forEach((e,r)=>n[e]=new j(e,t,r));let r=t.spec.topNode||"doc";if(!n[r])throw RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw RangeError("Every schema needs a 'text' type");for(let e in n.text.attrs)throw RangeError("The text node type should not have attributes");return n}}class P{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?function(e,t,n){let r=n.split("|");return n=>{let i=null===n?"null":typeof n;if(0>r.indexOf(i))throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class ${constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=z(e,r.attrs),this.excluded=null;let i=I(this.attrs);this.instance=i?new a(this,i):null}create(e=null){return!e&&this.instance?this.instance:new a(this,R(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach((e,i)=>n[e]=new $(e,r++,t,i)),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){N(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class D{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=r.from(e.nodes),t.marks=r.from(e.marks||{}),this.nodes=j.compile(this.spec.nodes,this),this.marks=$.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+" can not be both a node and a mark");let t=this.nodes[e],r=t.spec.content||"",i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=A.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError("Multiple linebreak nodes defined");if(!t.isInline||!t.isLeaf)throw RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=t}t.markSet="_"==i?null:i?F(this,i.split(" ")):""!=i&&t.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:F(this,n.split(" "))}this.nodeFromJSON=e=>S.fromJSON(this,e),this.markFromJSON=e=>a.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else if(e instanceof j){if(e.schema!=this)throw RangeError("Node type from different schema used ("+e.name+")")}else throw RangeError("Invalid node type: "+e);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new M(n,n.defaultAttrs,e,a.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError("Unknown node type: "+e);return t}}function F(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],s=e.marks[i],o=s;if(s)n.push(s);else for(let t in e.marks){let r=e.marks[t];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(o=r)}if(!o)throw SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class B{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(e=>{if(null!=e.tag)this.tags.push(e);else if(null!=e.style){let t=/[^=]*/.exec(e.style)[0];0>n.indexOf(t)&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new U(this,t,!1);return n.addAll(e,a.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new U(this,t,!0);return n.addAll(e,a.none,t.from,t.to),c.maxOpen(n.finish())}matchTag(e,t,n){for(let s=n?this.tags.indexOf(n)+1:0;s<this.tags.length;s++){var r,i;let n=this.tags[s];if(r=e,i=n.tag,(r.matches||r.msMatchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector).call(r,i)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],s=r.style;if(0==s.indexOf(e)&&(!r.context||n.matchesContext(r.context))&&(!(s.length>e.length)||61==s.charCodeAt(e.length)&&s.slice(e.length+1)==t)){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=V(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=V(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new B(e,B.schemaRules(e)))}}let H={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},J={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},K={ol:!0,ul:!0};function q(e,t,n){return null!=t?!!t|2*("full"===t):e&&"pre"==e.whitespace?3:-5&n}class _{constructor(e,t,n,r,i,s){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=s,this.content=[],this.activeMarks=a.none,this.match=i||(4&s?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(i.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e=this.content[this.content.length-1],t;e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))&&(e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=e.withText(e.text.slice(0,e.text.length-t[0].length)))}let t=i.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(i.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!H.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class U{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,s=q(null,t.preserveWhitespace,0)|4*!!n;i=r?new _(r.type,r.attrs,a.none,!0,t.topMatch||r.type.contentMatch,s):n?new _(null,null,a.none,!0,null,s):new _(e.schema.topNodeType,null,a.none,!0,null,s),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){3==e.nodeType?this.addTextNode(e,t):1==e.nodeType&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=2&r.options?"full":this.localPreserveWS||(1&r.options)>0,{schema:s}=this.parser;if("full"===i||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(i)if("full"===i)n=n.replace(/\r\n?/g,"\n");else if(s.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(s.linebreakReplacement.create())){let e=n.split(/\r?\n|\r/);for(let n=0;n<e.length;n++)n&&this.insertNode(s.linebreakReplacement.create(),t,!0),e[n]&&this.insertNode(s.text(e[n]),t,!/\S/.test(e[n]));n=""}else n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&"BR"==i.nodeName||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}n&&this.insertNode(s.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;("PRE"==e.tagName||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),o;K.hasOwnProperty(s)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&K.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,n));t:if(l?l.ignore:J.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,t);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let n,r=this.needsBlock;if(H.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break t}let o=l&&l.skip?t:this.readStyles(e,t);o&&this.addAll(e,o),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,l,n,!1===l.consuming?o:void 0)}this.localPreserveWS=r}leafFallback(e,t){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"),t)}ignoreFallback(e,t){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],i=n.getPropertyValue(r);if(i)for(let e;;){let n=this.parser.matchStyle(r,i,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),!1===n.consuming)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,s;if(t.node)if((s=this.parser.schema.nodes[t.node]).isLeaf)this.insertNode(s.create(t.attrs),n,"BR"==e.nodeName)||this.leafFallback(e,n);else{let e=this.enter(s,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let o=this.top;if(s&&s.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;"string"==typeof t.contentElement?r=e.querySelector(t.contentElement):"function"==typeof t.contentElement?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(o)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let s=n?e.childNodes[n]:e.firstChild,o=null==r?null:e.childNodes[r];s!=o;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,s=0;t>=0;t--){let o=this.nodes[t],l=o.findWrapping(e);if(l&&(!r||r.length>l.length+s)&&(r=l,i=o,!l.length))break;if(o.solid){if(n)break;s+=2}}if(!r)return null;this.sync(i);for(let e=0;e<r.length;e++)t=this.enterInner(r[e],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&(t.match=t.match.matchType(e.type));let n=a.none;for(let i of r.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):W(i.type,e.type))&&(n=i.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let i=this.findPlace(e.create(t),n,!1);return i&&(i=this.enterInner(e,t,n,!0,r)),i}enterInner(e,t,n,r=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let o=q(e,i,s.options);4&s.options&&0==s.content.length&&(o|=4);let l=a.none;return n=n.filter(t=>(s.type?!s.type.allowsMarkType(t.type):!W(t.type,e))||(l=t.addToSet(l),!1)),this.nodes.push(new _(e,t,l,r,null,o)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else this.localPreserveWS&&(this.nodes[t].options|=1);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+ +!r,s=(e,o)=>{for(;e>=0;e--){let l=t[e];if(""==l){if(e==t.length-1||0==e)continue;for(;o>=i;o--)if(s(e-1,o))return!0;return!1}{let e=o>0||0==o&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!e||e.name!=l&&!e.isInGroup(l))return!1;o--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}}function V(e){let t={};for(let n in e)t[n]=e[n];return t}function W(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let s=[],o=e=>{s.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||0>s.indexOf(i)&&o(i))return!0}};if(o(i.contentMatch))return!0}}class G{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=X(t).createDocumentFragment());let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,s=0;for(;n<i.length&&s<e.marks.length;){let t=e.marks[s];if(!this.marks[t.type.name]){s++;continue}if(!t.eq(i[n][0])||!1===t.type.spec.spanning)break;n++,s++}for(;n<i.length;)r=i.pop()[1];for(;s<e.marks.length;){let n=e.marks[s++],o=this.serializeMark(n,e.isInline,t);o&&(i.push([n,r]),r.appendChild(o.dom),r=o.contentDOM||o.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=Q(X(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&Q(X(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return Q(e,t,n,r)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new G(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Y(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return Y(e.marks)}}function Y(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function X(e){return e.document||window.document}let Z=new WeakMap;function Q(e,t,n,r){let i,s,o;if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let l=t[0],a;if("string"!=typeof l)throw RangeError("Invalid array passed to renderSpec");if(r&&(void 0===(s=Z.get(r))&&Z.set(r,(o=null,!function e(t){if(t&&"object"==typeof t)if(Array.isArray(t))if("string"==typeof t[0])o||(o=[]),o.push(t);else for(let n=0;n<t.length;n++)e(t[n]);else for(let n in t)e(t[n])}(r),s=o)),a=s)&&a.indexOf(t)>-1)throw RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let h=l.indexOf(" ");h>0&&(n=l.slice(0,h),l=l.slice(h+1));let c=n?e.createElementNS(n,l):e.createElement(l),d=t[1],p=1;if(d&&"object"==typeof d&&null==d.nodeType&&!Array.isArray(d)){for(let e in p=2,d)if(null!=d[e]){let t=e.indexOf(" ");t>0?c.setAttributeNS(e.slice(0,t),e.slice(t+1),d[e]):"style"==e&&c.style?c.style.cssText=d[e]:c.setAttribute(e,d[e])}}for(let s=p;s<t.length;s++){let o=t[s];if(0===o){if(s<t.length-1||s>p)throw RangeError("Content hole must be the only child of its parent node");return{dom:c,contentDOM:c}}{let{dom:t,contentDOM:s}=Q(e,o,n,r);if(c.appendChild(t),s){if(i)throw RangeError("Multiple content holes");i=s}}}return{dom:c,contentDOM:i}}},65514:(e,t,n)=>{n.r(t),n.d(t,{Avatar:()=>m,AvatarFallback:()=>v,AvatarImage:()=>y,Fallback:()=>S,Image:()=>x,Root:()=>b,createAvatarScope:()=>p});var r=n(1856),i=n(21032),s=n(32313),o=n(99457),l=n(93367),a=n(45477),h=n(90508),c="Avatar",[d,p]=(0,i.A)(c),[u,f]=d(c),m=r.forwardRef((e,t)=>{let{__scopeAvatar:n,...i}=e,[s,o]=r.useState("idle");return(0,h.jsx)(u,{scope:n,imageLoadingStatus:s,onImageLoadingStatusChange:o,children:(0,h.jsx)(l.sG.span,{...i,ref:t})})});m.displayName=c;var g="AvatarImage",y=r.forwardRef((e,t)=>{let{__scopeAvatar:n,src:i,onLoadingStatusChange:c=()=>{},...d}=e,p=f(g,n),u=function(e,t){let{referrerPolicy:n,crossOrigin:i}=t,s=(0,a.z)(),l=r.useRef(null),h=s?(l.current||(l.current=new window.Image),l.current):null,[c,d]=r.useState(()=>w(h,e));return(0,o.N)(()=>{d(w(h,e))},[h,e]),(0,o.N)(()=>{let e=e=>()=>{d(e)};if(!h)return;let t=e("loaded"),r=e("error");return h.addEventListener("load",t),h.addEventListener("error",r),n&&(h.referrerPolicy=n),"string"==typeof i&&(h.crossOrigin=i),()=>{h.removeEventListener("load",t),h.removeEventListener("error",r)}},[h,i,n]),c}(i,d),m=(0,s.c)(e=>{c(e),p.onImageLoadingStatusChange(e)});return(0,o.N)(()=>{"idle"!==u&&m(u)},[u,m]),"loaded"===u?(0,h.jsx)(l.sG.img,{...d,ref:t,src:i}):null});y.displayName=g;var k="AvatarFallback",v=r.forwardRef((e,t)=>{let{__scopeAvatar:n,delayMs:i,...s}=e,o=f(k,n),[a,c]=r.useState(void 0===i);return r.useEffect(()=>{if(void 0!==i){let e=window.setTimeout(()=>c(!0),i);return()=>window.clearTimeout(e)}},[i]),a&&"loaded"!==o.imageLoadingStatus?(0,h.jsx)(l.sG.span,{...s,ref:t}):null});function w(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}v.displayName=k;var b=m,x=y,S=v},68842:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]])},69011:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},71388:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]])},72256:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},74957:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("text-cursor-input",[["path",{d:"M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6",key:"1528k5"}],["path",{d:"M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7",key:"13ksps"}],["path",{d:"M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1",key:"1n9rhb"}],["path",{d:"M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1",key:"1mj8rg"}],["path",{d:"M9 6v12",key:"velyjx"}]])},77770:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("badge-check",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},83553:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("at-sign",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]])},84052:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]])},85783:(e,t,n)=>{n.d(t,{A:()=>na});var r=n(17749),i=(e,t)=>{if("slot"===e)return 0;if(e instanceof Function)return e(t);let{children:n,...r}=null!=t?t:{};if("svg"===e)throw Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,r,n]},s=/^\s*>\s$/,o=r.bP.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return i("blockquote",{...(0,r.KV)(this.options.HTMLAttributes,e),children:i("slot",{})})},parseMarkdown:(e,t)=>t.createNode("blockquote",void 0,t.parseChildren(e.tokens||[])),renderMarkdown:(e,t)=>{if(!e.content)return"";let n=[];return e.content.forEach(e=>{let r=t.renderChildren([e]).split("\n").map(e=>""===e.trim()?">":`> ${e}`);n.push(r.join("\n"))}),n.join(`
|
|
2
|
+
>
|
|
3
|
+
`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[(0,r.tG)({find:s,type:this.type})]}}),l=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,a=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,h=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,c=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,d=r.CU.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return i("strong",{...(0,r.KV)(this.options.HTMLAttributes,e),children:i("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[(0,r.OX)({find:l,type:this.type}),(0,r.OX)({find:h,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:a,type:this.type}),(0,r.Zc)({find:c,type:this.type})]}}),p=/(^|[^`])`([^`]+)`(?!`)$/,u=/(^|[^`])`([^`]+)`(?!`)/g,f=r.CU.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[(0,r.OX)({find:p,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:u,type:this.type})]}}),m=n(32603),g=/^```([a-z]+)?[\s\n]$/,y=/^~~~([a-z]+)?[\s\n]$/,k=r.bP.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;let{languageClassPrefix:n}=this.options;if(!n)return null;let r=[...(null==(t=e.firstElementChild)?void 0:t.classList)||[]].filter(e=>e.startsWith(n)).map(e=>e.replace(n,""))[0];return r||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",(0,r.KV)(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n;return(null==(n=e.raw)?void 0:n.startsWith("```"))===!1&&"indented"!==e.codeBlockStyle?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let r=(null==(n=e.attrs)?void 0:n.language)||"";return e.content?[`\`\`\`${r}`,t.renderChildren(e.content),"```"].join("\n"):`\`\`\`${r}
|
|
4
|
+
|
|
5
|
+
\`\`\``},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=1===t.pos;return!!e&&t.parent.type.name===this.name&&(!!n||!t.parent.textContent.length)&&this.editor.commands.clearNodes()},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=null!=(t=this.options.tabSize)?t:4,{state:r}=e,{selection:i}=r,{$from:s,empty:o}=i;if(s.parent.type!==this.type)return!1;let l=" ".repeat(n);return o?e.commands.insertContent(l):e.commands.command(({tr:e})=>{let{from:t,to:n}=i,s=r.doc.textBetween(t,n,"\n","\n").split("\n").map(e=>l+e).join("\n");return e.replaceWith(t,n,r.schema.text(s)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;let n=null!=(t=this.options.tabSize)?t:4,{state:r}=e,{selection:i}=r,{$from:s,empty:o}=i;return s.parent.type===this.type&&(o?e.commands.command(({tr:e})=>{var t;let{pos:i}=s,o=s.start(),l=s.end(),a=r.doc.textBetween(o,l,"\n","\n").split("\n"),h=0,c=0,d=i-o;for(let e=0;e<a.length;e+=1){if(c+a[e].length>=d){h=e;break}c+=a[e].length+1}let p=Math.min(((null==(t=a[h].match(/^ */))?void 0:t[0])||"").length,n);if(0===p)return!0;let u=o;for(let e=0;e<h;e+=1)u+=a[e].length+1;return e.delete(u,u+p),i-u<=p&&e.setSelection(m.U3.create(e.doc,u)),!0}):e.commands.command(({tr:e})=>{let{from:t,to:s}=i,o=r.doc.textBetween(t,s,"\n","\n").split("\n").map(e=>{var t;let r=Math.min(((null==(t=e.match(/^ */))?void 0:t[0])||"").length,n);return e.slice(r)}).join("\n");return e.replaceWith(t,s,r.schema.text(o)),!0}))},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;let s=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith("\n\n");return!!s&&!!o&&e.chain().command(({tr:e})=>(e.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:s}=n;if(!s||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;let o=i.after();return void 0!==o&&(r.nodeAt(o)?e.commands.command(({tr:e})=>(e.setSelection(m.LN.near(r.resolve(o))),!0)):e.commands.exitCode())}}},addInputRules(){return[(0,r.JJ)({find:g,type:this.type,getAttributes:e=>({language:e[1]})}),(0,r.JJ)({find:y,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new m.k_({key:new m.hs("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,s=null==i?void 0:i.mode;if(!n||!s)return!1;let{tr:o,schema:l}=e.state,a=l.text(n.replace(/\r\n?/g,"\n"));return o.replaceSelectionWith(this.type.create({language:s},a)),o.selection.$from.parent.type!==this.type&&o.setSelection(m.U3.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),e.dispatch(o),!0}}})]}}),v=r.bP.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n\n"):""}),w=r.bP.create({name:"hardBreak",markdownTokenName:"br",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",(0,r.KV)(this.options.HTMLAttributes,e)]},renderText:()=>"\n",renderMarkdown:()=>`
|
|
6
|
+
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:o}=r.extensionManager,l=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{if(t&&l&&s){let t=l.filter(e=>o.includes(e.type.name));e.ensureMarks(t)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),b=r.bP.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){let n=this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0];return[`h${n}`,(0,r.KV)(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;let r=(null==(n=e.attrs)?void 0:n.level)?parseInt(e.attrs.level,10):1,i="#".repeat(r);return e.content?`${i} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,...{[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}}),{})},addInputRules(){return this.options.levels.map(e=>(0,r.JJ)({find:RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}}),x=r.bP.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{},nextNodeType:"paragraph"}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",(0,r.KV)(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!(0,r.AB)(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:i}=n,s=e();return(0,r.BQ)(n)?s.insertContentAt(i.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({state:e,tr:t,dispatch:n})=>{if(n){let{$to:n}=t.selection,r=n.end();if(n.nodeAfter)n.nodeAfter.isTextblock?t.setSelection(m.U3.create(t.doc,n.pos+1)):n.nodeAfter.isBlock?t.setSelection(m.nh.create(t.doc,n.pos)):t.setSelection(m.U3.create(t.doc,n.pos));else{let i=e.schema.nodes[this.options.nextNodeType]||n.parent.type.contentMatch.defaultType,s=null==i?void 0:i.create();s&&(t.insert(r,s),t.setSelection(m.U3.create(t.doc,r+1)))}t.scrollIntoView()}return!0}).run()}}},addInputRules(){return[(0,r.jT)({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),S=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,M=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,C=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,A=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,T=r.CU.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",(0,r.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[(0,r.OX)({find:S,type:this.type}),(0,r.OX)({find:C,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:M,type:this.type}),(0,r.Zc)({find:A,type:this.type})]}});let E="numeric",O="ascii",L="alpha",I="asciinumeric",R="alphanumeric",N="domain",z="emoji",j="whitespace";function P(e,t,n){for(let r in t[E]&&(t[I]=!0,t[R]=!0),t[O]&&(t[I]=!0,t[L]=!0),t[I]&&(t[R]=!0),t[L]&&(t[R]=!0),t[R]&&(t[N]=!0),t[z]&&(t[N]=!0),t){let t=(r in n||(n[r]=[]),n[r]);0>t.indexOf(e)&&t.push(e)}}function $(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}$.groups={},$.prototype={accepts(){return!!this.t},go(e){let t=this.j[e];if(t)return t;for(let t=0;t<this.jr.length;t++){let n=this.jr[t][0],r=this.jr[t][1];if(r&&n.test(e))return r}return this.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){let i;return r=r||$.groups,t&&t.j?i=t:(i=new $(t),n&&r&&P(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this,s=e.length;if(!s)return i;for(let t=0;t<s-1;t++)i=i.tt(e[t]);return i.tt(e[s-1],t,n,r)},tt(e,t,n,r){if(r=r||$.groups,t&&t.j)return this.j[e]=t,t;let i,s=this.go(e);return s?(Object.assign((i=new $).j,s.j),i.jr.push.apply(i.jr,s.jr),i.jd=s.jd,i.t=s.t):i=new $,t&&(r&&(i.t&&"string"==typeof i.t?P(t,Object.assign(function(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}(i.t,r),n),r):n&&P(t,n,r)),i.t=t),this.j[e]=i,i}};let D=(e,t,n,r,i)=>e.ta(t,n,r,i),F=(e,t,n,r,i)=>e.tr(t,n,r,i),B=(e,t,n,r,i)=>e.ts(t,n,r,i),H=(e,t,n,r,i)=>e.tt(t,n,r,i),J="WORD",K="UWORD",q="ASCIINUMERICAL",_="ALPHANUMERICAL",U="LOCALHOST",V="UTLD",W="SCHEME",G="SLASH_SCHEME",Y="OPENBRACE",X="CLOSEBRACE",Z="OPENBRACKET",Q="CLOSEBRACKET",ee="OPENPAREN",et="CLOSEPAREN",en="OPENANGLEBRACKET",er="CLOSEANGLEBRACKET",ei="FULLWIDTHLEFTPAREN",es="FULLWIDTHRIGHTPAREN",eo="LEFTCORNERBRACKET",el="RIGHTCORNERBRACKET",ea="LEFTWHITECORNERBRACKET",eh="RIGHTWHITECORNERBRACKET",ec="FULLWIDTHLESSTHAN",ed="FULLWIDTHGREATERTHAN",ep="AMPERSAND",eu="APOSTROPHE",ef="ASTERISK",em="BACKSLASH",eg="BACKTICK",ey="CARET",ek="COLON",ev="COMMA",ew="DOLLAR",eb="EQUALS",ex="EXCLAMATION",eS="HYPHEN",eM="PERCENT",eC="PIPE",eA="PLUS",eT="POUND",eE="QUERY",eO="QUOTE",eL="FULLWIDTHMIDDLEDOT",eI="SEMI",eR="SLASH",eN="TILDE",ez="UNDERSCORE",ej="EMOJI";var eP=Object.freeze({__proto__:null,ALPHANUMERICAL:_,AMPERSAND:ep,APOSTROPHE:eu,ASCIINUMERICAL:q,ASTERISK:ef,AT:"AT",BACKSLASH:em,BACKTICK:eg,CARET:ey,CLOSEANGLEBRACKET:er,CLOSEBRACE:X,CLOSEBRACKET:Q,CLOSEPAREN:et,COLON:ek,COMMA:ev,DOLLAR:ew,DOT:"DOT",EMOJI:ej,EQUALS:eb,EXCLAMATION:ex,FULLWIDTHGREATERTHAN:ed,FULLWIDTHLEFTPAREN:ei,FULLWIDTHLESSTHAN:ec,FULLWIDTHMIDDLEDOT:eL,FULLWIDTHRIGHTPAREN:es,HYPHEN:eS,LEFTCORNERBRACKET:eo,LEFTWHITECORNERBRACKET:ea,LOCALHOST:U,NL:"NL",NUM:"NUM",OPENANGLEBRACKET:en,OPENBRACE:Y,OPENBRACKET:Z,OPENPAREN:ee,PERCENT:eM,PIPE:eC,PLUS:eA,POUND:eT,QUERY:eE,QUOTE:eO,RIGHTCORNERBRACKET:el,RIGHTWHITECORNERBRACKET:eh,SCHEME:W,SEMI:eI,SLASH:eR,SLASH_SCHEME:G,SYM:"SYM",TILDE:eN,TLD:"TLD",UNDERSCORE:ez,UTLD:V,UWORD:K,WORD:J,WS:"WS"});let e$=/[a-z]/,eD=/\p{L}/u,eF=/\p{Emoji}/u,eB=/\d/,eH=/\s/,eJ=null,eK=null;function eq(e,t){let n=function(e){let t=[],n=e.length,r=0;for(;r<n;){let i,s=e.charCodeAt(r),o=s<55296||s>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(o),r+=o.length}return t}(t.replace(/[A-Z]/g,e=>e.toLowerCase())),r=n.length,i=[],s=0,o=0;for(;o<r;){let l=e,a=null,h=0,c=null,d=-1,p=-1;for(;o<r&&(a=l.go(n[o]));)(l=a).accepts()?(d=0,p=0,c=l):d>=0&&(d+=n[o].length,p++),h+=n[o].length,s+=n[o].length,o++;s-=d,o-=p,h-=d,i.push({t:c.t,v:t.slice(s-h,s),s:s-h,e:s})}return i}function e_(e,t,n,r,i){let s,o=t.length;for(let n=0;n<o-1;n++){let o=t[n];e.j[o]?s=e.j[o]:((s=new $(r)).jr=i.slice(),e.j[o]=s),e=s}return(s=new $(n)).jr=i.slice(),e.j[t[o-1]]=s,s}function eU(e){let t=[],n=[],r=0;for(;r<e.length;){let i=0;for(;"0123456789".indexOf(e[r+i])>=0;)i++;if(i>0){t.push(n.join(""));for(let t=parseInt(e.substring(r,r+i),10);t>0;t--)n.pop();r+=i}else n.push(e[r]),r++}return t}let eV={defaultProtocol:"http",events:null,format:eG,formatHref:eG,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function eW(e,t=null){let n=Object.assign({},eV);e&&(n=Object.assign(n,e instanceof eW?e.o:e));let r=n.ignoreTags,i=[];for(let e=0;e<r.length;e++)i.push(r[e].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}function eG(e){return e}function eY(e,t){this.t="token",this.v=e,this.tk=t}function eX(e,t){class n extends eY{constructor(t,n){super(t,n),this.t=e}}for(let e in t)n.prototype[e]=t[e];return n.t=e,n}eW.prototype={o:eV,ignoreTags:[],defaultRender:e=>e,check(e){return this.get("validate",e.toString(),e)},get(e,t,n){let r=null!=t,i=this.o[e];return i&&("object"==typeof i?"function"==typeof(i=n.t in i?i[n.t]:eV[e])&&r&&(i=i(t,n)):"function"==typeof i&&r&&(i=i(t,n.t,n))),i},getObj(e,t,n){let r=this.o[e];return"function"==typeof r&&null!=t&&(r=r(t,n.t,n)),r},render(e){let t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}},eY.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=eV.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this.toHref(e.get("defaultProtocol")),n=e.get("formatHref",t,this),r=e.get("tagName",t,this),i=this.toFormattedString(e),s={},o=e.get("className",t,this),l=e.get("target",t,this),a=e.get("rel",t,this),h=e.getObj("attributes",t,this),c=e.getObj("events",t,this);return s.href=n,o&&(s.class=o),l&&(s.target=l),a&&(s.rel=a),h&&Object.assign(s,h),{tagName:r,attributes:s,content:i,eventListeners:c}}};let eZ=eX("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),eQ=eX("text"),e0=eX("nl"),e1=eX("url",{isLink:!0,toHref(e=eV.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==U&&e[1].t===ek}}),e2=e=>new $(e);function e3(e,t,n){let r=n[0].s,i=n[n.length-1].e;return new e(t.slice(r,i),n)}let e6="undefined"!=typeof console&&console&&console.warn||(()=>{}),e4={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function e5(e,t=!1){if(e4.initialized&&e6(`linkifyjs: already initialized - will not register custom scheme "${e}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw Error(`linkifyjs: incorrect scheme format.
|
|
7
|
+
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
8
|
+
2. Cannot start or end with "-"
|
|
9
|
+
3. "-" cannot repeat`);e4.customSchemes.push([e,t])}function e8(e){return e4.initialized||function(){e4.scanner=function(e=[]){let t={};$.groups=t;let n=new $;null==eJ&&(eJ=eU("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==eK&&(eK=eU("ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2")),H(n,"'",eu),H(n,"{",Y),H(n,"}",X),H(n,"[",Z),H(n,"]",Q),H(n,"(",ee),H(n,")",et),H(n,"<",en),H(n,">",er),H(n,"(",ei),H(n,")",es),H(n,"「",eo),H(n,"」",el),H(n,"『",ea),H(n,"』",eh),H(n,"<",ec),H(n,">",ed),H(n,"&",ep),H(n,"*",ef),H(n,"@","AT"),H(n,"`",eg),H(n,"^",ey),H(n,":",ek),H(n,",",ev),H(n,"$",ew),H(n,".","DOT"),H(n,"=",eb),H(n,"!",ex),H(n,"-",eS),H(n,"%",eM),H(n,"|",eC),H(n,"+",eA),H(n,"#",eT),H(n,"?",eE),H(n,'"',eO),H(n,"/",eR),H(n,";",eI),H(n,"~",eN),H(n,"_",ez),H(n,"\\",em),H(n,"・",eL);let r=F(n,eB,"NUM",{[E]:!0});F(r,eB,r);let i=F(r,e$,q,{[I]:!0}),s=F(r,eD,_,{[R]:!0}),o=F(n,e$,J,{[O]:!0});F(o,eB,i),F(o,e$,o),F(i,eB,i),F(i,e$,i);let l=F(n,eD,K,{[L]:!0});F(l,e$),F(l,eB,s),F(l,eD,l),F(s,eB,s),F(s,e$),F(s,eD,s);let a=H(n,"\n","NL",{[j]:!0}),h=H(n,"\r","WS",{[j]:!0}),c=F(n,eH,"WS",{[j]:!0});H(n,"",c),H(h,"\n",a),H(h,"",c),F(h,eH,c),H(c,"\r"),H(c,"\n"),F(c,eH,c),H(c,"",c);let d=F(n,eF,ej,{[z]:!0});H(d,"#"),F(d,eF,d),H(d,"️",d);let p=H(d,"");H(p,"#"),F(p,eF,d);let u=[[e$,o],[eB,i]],f=[[e$,null],[eD,l],[eB,s]];for(let e=0;e<eJ.length;e++)e_(n,eJ[e],"TLD",J,u);for(let e=0;e<eK.length;e++)e_(n,eK[e],V,K,f);P("TLD",{tld:!0,ascii:!0},t),P(V,{utld:!0,alpha:!0},t),e_(n,"file",W,J,u),e_(n,"mailto",W,J,u),e_(n,"http",G,J,u),e_(n,"https",G,J,u),e_(n,"ftp",G,J,u),e_(n,"ftps",G,J,u),P(W,{scheme:!0,ascii:!0},t),P(G,{slashscheme:!0,ascii:!0},t),e=e.sort((e,t)=>e[0]>t[0]?1:-1);for(let t=0;t<e.length;t++){let r=e[t][0],i=e[t][1]?{scheme:!0}:{slashscheme:!0};r.indexOf("-")>=0?i[N]=!0:e$.test(r)?eB.test(r)?i[I]=!0:i[O]=!0:i[E]=!0,B(n,r,r,i)}return B(n,"localhost",U,{ascii:!0}),n.jd=new $("SYM"),{start:n,tokens:Object.assign({groups:t},eP)}}(e4.customSchemes);for(let e=0;e<e4.tokenQueue.length;e++)e4.tokenQueue[e][1]({scanner:e4.scanner});e4.parser=function({groups:e}){let t=e.domain.concat([ep,ef,"AT",em,eg,ey,ew,eb,eS,"NUM",eM,eC,eA,eT,eR,"SYM",eN,ez]),n=[eu,ek,ev,"DOT",ex,eM,eE,eO,eI,en,er,Y,X,Q,Z,ee,et,ei,es,eo,el,ea,eh,ec,ed],r=[ep,eu,ef,em,eg,ey,ew,eb,eS,Y,X,eM,eC,eA,eT,eE,eR,"SYM",eN,ez],i=e2(),s=H(i,eN);D(s,r,s),D(s,e.domain,s);let o=e2(),l=e2(),a=e2();D(i,e.domain,o),D(i,e.scheme,l),D(i,e.slashscheme,a),D(o,r,s),D(o,e.domain,o);let h=H(o,"AT");H(s,"AT",h),H(l,"AT",h),H(a,"AT",h);let c=H(s,"DOT");D(c,r,s),D(c,e.domain,s);let d=e2();D(h,e.domain,d),D(d,e.domain,d);let p=H(d,"DOT");D(p,e.domain,d);let u=e2(eZ);D(p,e.tld,u),D(p,e.utld,u),H(h,U,u);let f=H(d,eS);H(f,eS,f),D(f,e.domain,d),D(u,e.domain,d),H(u,"DOT",p),H(u,eS,f),D(H(u,ek),e.numeric,eZ);let m=H(o,eS),g=H(o,"DOT");H(m,eS,m),D(m,e.domain,o),D(g,r,s),D(g,e.domain,o);let y=e2(e1);D(g,e.tld,y),D(g,e.utld,y),D(y,e.domain,o),D(y,r,s),H(y,"DOT",g),H(y,eS,m),H(y,"AT",h);let k=H(y,ek),v=e2(e1);D(k,e.numeric,v);let w=e2(e1),b=e2();D(w,t,w),D(w,n,b),D(b,t,w),D(b,n,b),H(y,eR,w),H(v,eR,w);let x=H(l,ek),S=H(a,ek),M=H(S,eR),C=H(M,eR);D(l,e.domain,o),H(l,"DOT",g),H(l,eS,m),D(a,e.domain,o),H(a,"DOT",g),H(a,eS,m),D(x,e.domain,w),H(x,eR,w),H(x,eE,w),D(C,e.domain,w),D(C,t,w),H(C,eR,w);let A=[[Y,X],[Z,Q],[ee,et],[en,er],[ei,es],[eo,el],[ea,eh],[ec,ed]];for(let e=0;e<A.length;e++){let[r,i]=A[e],s=H(w,r);H(b,r,s),H(s,i,w);let o=e2(e1);D(s,t,o);let l=e2();D(s,n),D(o,t,o),D(o,n,l),D(l,t,o),D(l,n,l),H(o,i,w),H(l,i,w)}return H(i,U,y),H(i,"NL",e0),{start:i,tokens:eP}}(e4.scanner.tokens);for(let e=0;e<e4.pluginQueue.length;e++)e4.pluginQueue[e][1]({scanner:e4.scanner,parser:e4.parser});e4.initialized=!0}(),function(e,t,n){let r=n.length,i=0,s=[],o=[];for(;i<r;){let l=e,a=null,h=null,c=0,d=null,p=-1;for(;i<r&&!(a=l.go(n[i].t));)o.push(n[i++]);for(;i<r&&(h=a||l.go(n[i].t));)a=null,(l=h).accepts()?(p=0,d=l):p>=0&&p++,i++,c++;if(p<0)(i-=c)<r&&(o.push(n[i]),i++);else{o.length>0&&(s.push(e3(eQ,t,o)),o=[]),i-=p,c-=p;let e=d.t,r=n.slice(i-c,i);s.push(e3(e,t,r))}}return o.length>0&&s.push(e3(eQ,t,o)),s}(e4.parser.start,e,eq(e4.scanner.start,e))}function e9(e,t=null,n=null){if(t&&"object"==typeof t){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let r=new eW(n),i=e8(e),s=[];for(let e=0;e<i.length;e++){let n=i[e];n.isLink&&(!t||n.t===t)&&r.check(n)&&s.push(n.toFormattedObject(r))}return s}e8.scan=eq;var e7="[\0- \xa0 -\u2029 ]",te=new RegExp(e7),tt=RegExp(`${e7}$`),tn=RegExp(e7,"g");function tr(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(e=>{let t="string"==typeof e?e:e.scheme;t&&n.push(t)}),!e||e.replace(tn,"").match(RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var ti=r.CU.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if("string"==typeof e)return void e5(e);e5(e.scheme,e.optionalSlashes)})},onDestroy(){$.groups={},e4.scanner=null,e4.parser=null,e4.tokenQueue=[],e4.pluginQueue=[],e4.customSchemes=[],e4.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!tr(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes("@"))return!0;let r=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];return!/^\d{1,3}(\.\d{1,3}){3}$/.test(r)&&!!/\./.test(r)}}),addAttributes(){return{href:{default:null,parseHTML:e=>e.getAttribute("href")},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!!t&&!!this.options.isAllowedUri(t,{defaultValidate:e=>!!tr(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:e=>!!tr(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",(0,r.KV)(this.options.HTMLAttributes,e),0]:["a",(0,r.KV)(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n,r,i,s;let o=null!=(r=null==(n=e.attrs)?void 0:n.href)?r:"",l=null!=(s=null==(i=e.attrs)?void 0:i.title)?s:"",a=t.renderChildren(e);return l?`[${a}](${o} "${l}")`:`[${a}](${o})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return!!this.options.isAllowedUri(n,{defaultValidate:e=>!!tr(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&t().setMark(this.name,e).setMeta("preventAutolink",!0).run()},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return(!n||!!this.options.isAllowedUri(n,{defaultValidate:e=>!!tr(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(0,r.Zc)({find:e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options,i=e9(e).filter(e=>e.isLink&&this.options.isAllowedUri(e.value,{defaultValidate:e=>!!tr(e,n),protocols:n,defaultProtocol:r}));i.length&&i.forEach(e=>{this.options.shouldAutoLink(e.value)&&t.push({text:e.value,data:{href:e.href},index:e.start})})}return t},type:this.type,getAttributes:e=>{var t;return{href:null==(t=e.data)?void 0:t.href}}})]},addProseMirrorPlugins(){var e,t,n;let i=[],{protocols:s,defaultProtocol:o}=this.options;return this.options.autolink&&i.push((e={type:this.type,defaultProtocol:this.options.defaultProtocol,validate:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!tr(e,s),protocols:s,defaultProtocol:o}),shouldAutoLink:this.options.shouldAutoLink},new m.k_({key:new m.hs("autolink"),appendTransaction:(t,n,i)=>{let s=t.some(e=>e.docChanged)&&!n.doc.eq(i.doc),o=t.some(e=>e.getMeta("preventAutolink"));if(!s||o)return;let{tr:l}=i,a=(0,r.T7)(n.doc,[...t]);if((0,r.FF)(a).forEach(({newRange:t})=>{let n,s,o=(0,r.Nx)(i.doc,t,e=>e.isTextblock);if(o.length>1)n=o[0],s=i.doc.textBetween(n.pos,n.pos+n.node.nodeSize,void 0," ");else if(o.length){let e=i.doc.textBetween(t.from,t.to," "," ");if(!tt.test(e))return;n=o[0],s=i.doc.textBetween(n.pos,t.to,void 0," ")}if(n&&s){let t=s.split(te).filter(Boolean);if(t.length<=0)return!1;let o=t[t.length-1],a=n.pos+s.lastIndexOf(o);if(!o)return!1;let h=e8(o).map(t=>t.toObject(e.defaultProtocol));if(!(1===h.length?h[0].isLink:3===h.length&&!!h[1].isLink&&["()","[]"].includes(h[0].value+h[2].value)))return!1;h.filter(e=>e.isLink).map(e=>({...e,from:a+e.start+1,to:a+e.end+1})).filter(e=>!i.schema.marks.code||!i.doc.rangeHasMark(e.from,e.to,i.schema.marks.code)).filter(t=>e.validate(t.value)).filter(t=>e.shouldAutoLink(t.value)).forEach(t=>{(0,r.hO)(t.from,t.to,i.doc).some(t=>t.mark.type===e.type)||l.addMark(t.from,t.to,e.type.create({href:t.href}))})}}),l.steps.length)return l}}))),i.push((t={type:this.type,editor:this.editor,openOnClick:"whenNotEditable"===this.options.openOnClick||this.options.openOnClick,enableClickSelection:this.options.enableClickSelection},new m.k_({key:new m.hs("handleClickLink"),props:{handleClick:(e,n,i)=>{var s,o;if(0!==i.button||!e.editable)return!1;let l=null;if(i.target instanceof HTMLAnchorElement)l=i.target;else{let e=i.target;if(!e)return!1;let n=t.editor.view.dom;(l=e.closest("a"))&&!n.contains(l)&&(l=null)}if(!l)return!1;let a=!1;if(t.enableClickSelection&&(a=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){let n=(0,r.gu)(e.state,t.type.name),i=null!=(s=l.href)?s:n.href,h=null!=(o=l.target)?o:n.target;i&&(window.open(i,h),a=!0)}return a}}}))),this.options.linkOnPaste&&i.push((n={editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink},new m.k_({key:new m.hs("handlePasteLink"),props:{handlePaste:(e,t,r)=>{let{shouldAutoLink:i}=n,{state:s}=e,{selection:o}=s,{empty:l}=o;if(l)return!1;let a="";r.content.forEach(e=>{a+=e.textContent});let h=e9(a,{defaultProtocol:n.defaultProtocol}).find(e=>e.isLink&&e.value===a);return!!a&&!!h&&(void 0===i||!!i(h.value))&&n.editor.commands.setMark(n.type,{href:h.href})}}}))),i}}),ts=Object.defineProperty,to="textStyle",tl=/^\s*([-+*])\s$/,ta=r.bP.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>"list"!==e.type||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(to)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=(0,r.tG)({find:tl,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=(0,r.tG)({find:tl,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(to),editor:this.editor})),[e]}}),th=r.bP.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{if("list_item"!==e.type)return[];let n=[];if(e.tokens&&e.tokens.length>0)if(e.tokens.some(e=>"paragraph"===e.type))n=t.parseChildren(e.tokens);else{let r=e.tokens[0];if(r&&"text"===r.type&&r.tokens&&r.tokens.length>0){if(n=[{type:"paragraph",content:t.parseInline(r.tokens)}],e.tokens.length>1){let r=e.tokens.slice(1),i=t.parseChildren(r);n.push(...i)}}else n=t.parseChildren(e.tokens)}return 0===n.length&&(n=[{type:"paragraph",content:[]}]),{type:"listItem",content:n}},renderMarkdown:(e,t,n)=>(0,r.kj)(e,t,e=>{var t,n;if("bulletList"===e.parentType)return"- ";if("orderedList"===e.parentType){let r=(null==(n=null==(t=e.meta)?void 0:t.parentAttrs)?void 0:n.start)||1;return`${r+e.index}. `}return"- "},n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});((e,t)=>{for(var n in t)ts(e,n,{get:t[n],enumerable:!0})})({},{findListItemPos:()=>tc,getNextListDepth:()=>td,handleBackspace:()=>tm,handleDelete:()=>tk,hasListBefore:()=>tp,hasListItemAfter:()=>tv,hasListItemBefore:()=>tu,listItemHasSubList:()=>tf,nextListIsDeeper:()=>tg,nextListIsHigher:()=>ty});var tc=(e,t)=>{let{$from:n}=t.selection,i=(0,r.Pg)(e,t.schema),s=n.depth,o=n.pos,l=null;for(;s>0&&null===l;)n.node(s).type===i?l=s:(s-=1,o-=1);return null===l?null:{$pos:t.doc.resolve(o),depth:l}},td=(e,t)=>{let n=tc(e,t);if(!n)return!1;let[,i]=(0,r.fl)(t,e,n.$pos.pos+4);return i},tp=(e,t,n)=>{let{$anchor:r}=e.selection,i=Math.max(0,r.pos-2),s=e.doc.resolve(i).node();return!!s&&!!n.includes(s.type.name)},tu=(e,t)=>{var n;let{$anchor:r}=t.selection,i=t.doc.resolve(r.pos-2);return 0!==i.index()&&(null==(n=i.nodeBefore)?void 0:n.type.name)===e},tf=(e,t,n)=>{if(!n)return!1;let i=(0,r.Pg)(e,t.schema),s=!1;return n.descendants(e=>{e.type===i&&(s=!0)}),s},tm=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!(0,r.rU)(e.state,t)&&tp(e.state,t,n)){let{$anchor:n}=e.state.selection,r=e.state.doc.resolve(n.before()-1),i=[];r.node().descendants((e,n)=>{e.type.name===t&&i.push({node:e,pos:n})});let s=i.at(-1);if(!s)return!1;let o=e.state.doc.resolve(r.start()+s.pos+1);return e.chain().cut({from:n.start()-1,to:n.end()+1},o.end()).joinForward().run()}if(!(0,r.rU)(e.state,t)||!(0,r.J_)(e.state))return!1;let i=tc(t,e.state);if(!i)return!1;let s=e.state.doc.resolve(i.$pos.pos-2).node(i.depth),o=tf(t,e.state,s);return tu(t,e.state)&&!o?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},tg=(e,t)=>{let n=td(e,t),r=tc(e,t);return!!r&&!!n&&n>r.depth},ty=(e,t)=>{let n=td(e,t),r=tc(e,t);return!!r&&!!n&&n<r.depth},tk=(e,t)=>{if(!(0,r.rU)(e.state,t)||!(0,r.QN)(e.state,t))return!1;let{selection:n}=e.state,{$from:i,$to:s}=n;return!(!n.empty&&i.sameParent(s))&&(tg(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():ty(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward())},tv=(e,t)=>{var n;let{$anchor:r}=t.selection,i=t.doc.resolve(r.pos-r.parentOffset-2);return i.index()!==i.parent.childCount-1&&(null==(n=i.nodeAfter)?void 0:n.type.name)===e},tw=r.YY.create({name:"listKeymap",addOptions:()=>({listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}),addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{void 0!==e.state.schema.nodes[n]&&tk(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{void 0!==e.state.schema.nodes[n]&&tk(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{void 0!==e.state.schema.nodes[n]&&tm(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{void 0!==e.state.schema.nodes[n]&&tm(e,n,r)&&(t=!0)}),t}}}}),tb=/^(\s*)(\d+)\.\s+(.*)$/,tx=/^\s/,tS="textStyle",tM=/^(\d+)\.\s$/,tC=r.bP.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return 1===t?["ol",(0,r.KV)(this.options.HTMLAttributes,n),0]:["ol",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if("list"!==e.type||!e.ordered)return[];let n=e.start||1,r=e.items?function(e,t){return e.map(e=>{if("list_item"!==e.type)return t.parseChildren([e])[0];let n=[];return e.tokens&&e.tokens.length>0&&e.tokens.forEach(e=>{if("paragraph"===e.type||"list"===e.type||"blockquote"===e.type||"code"===e.type)n.push(...t.parseChildren([e]));else if("text"===e.type&&e.tokens){let r=t.parseChildren([e]);n.push({type:"paragraph",content:r})}else{let r=t.parseChildren([e]);r.length>0&&n.push(...r)}}),{type:"listItem",content:n}})}(e.items,t):[];return 1!==n?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownTokenizer:{name:"orderedList",level:"block",start:e=>{let t=e.match(/^(\s*)(\d+)\.\s+/),n=null==t?void 0:t.index;return void 0!==n?n:-1},tokenize:(e,t,n)=>{var r;let i=e.split("\n"),[s,o]=function(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n],s=i.match(tb);if(!s)break;let[,o,l,a]=s,h=o.length,c=a,d=n+1,p=[i];for(;d<e.length;){let t=e[d];if(t.match(tb))break;if(""===t.trim())p.push(t),c+="\n",d+=1;else if(t.match(tx))p.push(t),c+=`
|
|
10
|
+
${t.slice(h+2)}`,d+=1;else break}t.push({indent:h,number:parseInt(l,10),content:c.trim(),raw:p.join("\n")}),r=d,n=d}return[t,r]}(i);if(0===s.length)return;let l=function e(t,n,r){var i;let s=[],o=0;for(;o<t.length;){let l=t[o];if(l.indent===n){let a=l.content.split("\n"),h=(null==(i=a[0])?void 0:i.trim())||"",c=[];h&&c.push({type:"paragraph",raw:h,tokens:r.inlineTokens(h)});let d=a.slice(1).join("\n").trim();if(d){let e=r.blockTokens(d);c.push(...e)}let p=o+1,u=[];for(;p<t.length&&t[p].indent>n;)u.push(t[p]),p+=1;if(u.length>0){let t=Math.min(...u.map(e=>e.indent)),n=e(u,t,r);c.push({type:"list",ordered:!0,start:u[0].number,items:n,raw:u.map(e=>e.raw).join("\n")})}s.push({type:"list_item",raw:l.raw,tokens:c}),o=p}else o+=1}return s}(s,0,n);if(0!==l.length)return{type:"list",ordered:!0,start:(null==(r=s[0])?void 0:r.number)||1,items:l,raw:i.slice(0,o).join("\n")}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(tS)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=(0,r.tG)({find:tM,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=(0,r.tG)({find:tM,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(tS)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),tA=/^\s*(\[([( |x])?\])\s$/,tT=r.bP.create({name:"taskItem",addOptions:()=>({nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}),content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return""===t||"true"===t},renderHTML:e=>({"data-checked":e.checked})}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",(0,r.KV)(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let i=(null==(n=e.attrs)?void 0:n.checked)?"x":" ",s=`- [${i}] `;return(0,r.kj)(e,t,s)},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:i})=>{let s=document.createElement("li"),o=document.createElement("label"),l=document.createElement("span"),a=document.createElement("input"),h=document.createElement("div"),c=e=>{var t,n;a.ariaLabel=(null==(n=null==(t=this.options.a11y)?void 0:t.checkboxLabel)?void 0:n.call(t,e,a.checked))||`Task item checkbox for ${e.textContent||"empty task item"}`};c(e),o.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",e=>e.preventDefault()),a.addEventListener("change",t=>{if(!i.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}let{checked:r}=t.target;i.isEditable&&"function"==typeof n&&i.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:e})=>{let t=n();if("number"!=typeof t)return!1;let i=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...null==i?void 0:i.attrs,checked:r}),!0}).run(),i.isEditable||!this.options.onReadOnlyChecked||this.options.onReadOnlyChecked(e,r)||(a.checked=!a.checked)}),Object.entries(this.options.HTMLAttributes).forEach(([e,t])=>{s.setAttribute(e,t)}),s.dataset.checked=e.attrs.checked,a.checked=e.attrs.checked,o.append(a,l),s.append(o,h),Object.entries(t).forEach(([e,t])=>{s.setAttribute(e,t)});let d=new Set(Object.keys(t));return{dom:s,contentDOM:h,update:e=>{if(e.type!==this.type)return!1;s.dataset.checked=e.attrs.checked,a.checked=e.attrs.checked,c(e);let t=i.extensionManager.attributes,n=(0,r.zU)(e,t),o=new Set(Object.keys(n)),l=this.options.HTMLAttributes;return d.forEach(e=>{o.has(e)||(e in l?s.setAttribute(e,l[e]):s.removeAttribute(e))}),Object.entries(n).forEach(([e,t])=>{null==t?e in l?s.setAttribute(e,l[e]):s.removeAttribute(e):s.setAttribute(e,t)}),d=o,!0}}}},addInputRules(){return[(0,r.tG)({find:tA,type:this.type,getAttributes:e=>({checked:"x"===e[e.length-1]})})]}}),tE=r.bP.create({name:"taskList",addOptions:()=>({itemTypeName:"taskItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",(0,r.KV)(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=null==(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))?void 0:t.index;return void 0!==n?n:-1},tokenize(e,t,n){let i=e=>{let t=(0,r.Dd)(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:"x"===e[3].toLowerCase()}),createToken:(e,t)=>({type:"taskItem",raw:"",mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:i},n);return t?[{type:"taskList",raw:t.raw,items:t.items}]:n.blockTokens(e)},s=(0,r.Dd)(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:"x"===e[3].toLowerCase()}),createToken:(e,t)=>({type:"taskItem",raw:"",mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:i},n);if(s)return{type:"taskList",raw:s.raw,items:s.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});r.YY.create({name:"listKit",addExtensions(){let e=[];return!1!==this.options.bulletList&&e.push(ta.configure(this.options.bulletList)),!1!==this.options.listItem&&e.push(th.configure(this.options.listItem)),!1!==this.options.listKeymap&&e.push(tw.configure(this.options.listKeymap)),!1!==this.options.orderedList&&e.push(tC.configure(this.options.orderedList)),!1!==this.options.taskItem&&e.push(tT.configure(this.options.taskItem)),!1!==this.options.taskList&&e.push(tE.configure(this.options.taskList)),e}});var tO=" ",tL=r.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,r.KV)(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(1===n.length&&"image"===n[0].type)return t.parseChildren([n[0]]);let r=t.parseInline(n);return 1===r.length&&"text"===r[0].type&&(r[0].text===tO||"\xa0"===r[0].text)?t.createNode("paragraph",void 0,[]):t.createNode("paragraph",void 0,r)},renderMarkdown:(e,t)=>{if(!e)return"";let n=Array.isArray(e.content)?e.content:[];return 0===n.length?tO:t.renderChildren(n)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),tI=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,tR=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,tN=r.CU.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML({HTMLAttributes:e}){return["s",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[(0,r.OX)({find:tI,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:tR,type:this.type})]}}),tz=r.bP.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""}),tj=r.CU.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",(0,r.KV)(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown:(e,t)=>`++${t.renderChildren(e)}++`,markdownTokenizer:{name:"underline",level:"inline",start:e=>e.indexOf("++"),tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:"underline",raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),tP=n(28155);class t${constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!=(n=t.width)?n:1,this.color=!1===t.color?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t,n=this.editorView.state.doc.resolve(this.cursorPos),r=!n.parent.inlineContent,i,s=this.editorView.dom,o=s.getBoundingClientRect(),l=o.width/s.offsetWidth,a=o.height/s.offsetHeight;if(r){let e=n.nodeBefore,t=n.nodeAfter;if(e||t){let n=this.editorView.nodeDOM(this.cursorPos-(e?e.nodeSize:0));if(n){let r=n.getBoundingClientRect(),s=e?r.bottom:r.top;e&&t&&(s=(s+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let o=this.width/2*a;i={left:r.left,right:r.right,top:s-o,bottom:s+o}}}}if(!i){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*l;i={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let h=this.editorView.dom.offsetParent;if(!this.element&&(this.element=h.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r),h&&(h!=document.body||"static"!=getComputedStyle(h).position)){let n=h.getBoundingClientRect(),r=n.width/h.offsetWidth,i=n.height/h.offsetHeight;e=n.left-h.scrollLeft*r,t=n.top-h.scrollTop*i}else e=-pageXOffset,t=-pageYOffset;this.element.style.left=(i.left-e)/l+"px",this.element.style.top=(i.top-t)/a+"px",this.element.style.width=(i.right-i.left)/l+"px",this.element.style.height=(i.bottom-i.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i="function"==typeof r?r(this.editorView,t,e):r;if(t&&!i){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=(0,tP.Um)(this.editorView.state.doc,e,this.editorView.dragging.slice);null!=t&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}var tD=n(18096),tF=n(59547),tB=n(65282);class tH extends m.LN{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return tH.valid(n)?new tH(n):m.LN.near(n)}content(){return tB.Ji.empty}eq(e){return e instanceof tH&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for GapCursor.fromJSON");return new tH(e.resolve(t.pos))}getBookmark(){return new tJ(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0==n){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||tK(e.type))return!0;if(e.inlineContent)return!1}}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||tK(e.type))return!0;if(e.inlineContent)return!1}}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){n:for(;;){if(!n&&tH.valid(e))return e;let r=e.pos,i=null;for(let n=e.depth;;n--){let s=e.node(n);if(t>0?e.indexAfter(n)<s.childCount:e.index(n)>0){i=s.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let o=e.doc.resolve(r);if(tH.valid(o))return o}for(;;){let s=t>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!m.nh.isSelectable(i)){e=e.doc.resolve(r+i.nodeSize*t),n=!1;continue n}break}i=s,r+=t;let o=e.doc.resolve(r);if(tH.valid(o))return o}return null}}}tH.prototype.visible=!1,tH.findFrom=tH.findGapCursorFrom,m.LN.jsonID("gapcursor",tH);class tJ{constructor(e){this.pos=e}map(e){return new tJ(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return tH.valid(t)?new tH(t):m.LN.near(t)}}function tK(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}let tq=(0,tF.K)({ArrowLeft:t_("horiz",-1),ArrowRight:t_("horiz",1),ArrowUp:t_("vert",-1),ArrowDown:t_("vert",1)});function t_(e,t){let n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,i){let s=e.selection,o=t>0?s.$to:s.$from,l=s.empty;if(s instanceof m.U3){if(!i.endOfTextblock(n)||0==o.depth)return!1;l=!1,o=e.doc.resolve(t>0?o.after():o.before())}let a=tH.findGapCursorFrom(o,t,l);return!!a&&(r&&r(e.tr.setSelection(new tH(a))),!0)}}function tU(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!tH.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return!(i&&i.inside>-1&&m.nh.isSelectable(e.state.doc.nodeAt(i.inside)))&&(e.dispatch(e.state.tr.setSelection(new tH(r))),!0)}function tV(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof tH))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=tB.FK.empty;for(let e=r.length-1;e>=0;e--)i=tB.FK.from(r[e].createAndFill(null,i));let s=e.state.tr.replace(n.pos,n.pos,new tB.Ji(i,0,0));return s.setSelection(m.U3.near(s.doc.resolve(n.pos+1))),e.dispatch(s),!1}function tW(e){if(!(e.selection instanceof tH))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",tD.zF.create(e.doc,[tD.NZ.widget(e.selection.head,t,{key:"gapcursor"})])}var tG=function(){};tG.prototype.append=function(e){return e.length?(e=tG.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},tG.prototype.prepend=function(e){return e.length?tG.from(e).append(this):this},tG.prototype.appendInner=function(e){return new tX(this,e)},tG.prototype.slice=function(e,t){return(void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t)?tG.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},tG.prototype.get=function(e){if(!(e<0)&&!(e>=this.length))return this.getInner(e)},tG.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},tG.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},tG.from=function(e){return e instanceof tG?e:e&&e.length?new tY(e):tG.empty};var tY=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(!1===e(this.values[i],r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(!1===e(this.values[i],r+i))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=200)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=200)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(tG);tG.empty=new tY([]);var tX=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&!1===this.left.forEachInner(e,t,Math.min(n,i),r)||n>i&&!1===this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&!1===this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)||n<i&&!1===this.left.forEachInvertedInner(e,Math.min(t,i),n,r))return!1},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(tG);class tZ{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){let n,r,i,s;if(0==this.eventCount)return null;let o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}t&&(r=(n=this.remapping(o,this.items.length)).maps.length);let l=e.tr,a=[],h=[];return this.items.forEach((e,t)=>{if(!e.step){n||(r=(n=this.remapping(o,t+1)).maps.length),r--,h.push(e);return}if(n){h.push(new tQ(e.map));let t=e.step.map(n.slice(r)),i;t&&l.maybeStep(t).doc&&(i=l.mapping.maps[l.mapping.maps.length-1],a.push(new tQ(i,void 0,void 0,a.length+h.length))),r--,i&&n.appendMap(i,r)}else l.maybeStep(e.step);if(e.selection)return i=n?e.selection.map(n.slice(r)):e.selection,s=new tZ(this.items.slice(0,o).append(h.reverse().concat(a)),this.eventCount-1),!1},this.items.length,0),{remaining:s,transform:l,selection:i}}addTransform(e,t,n,r){var i,s;let o,l=[],a=this.eventCount,h=this.items,c=!r&&h.length?h.get(h.length-1):null;for(let n=0;n<e.steps.length;n++){let i=e.steps[n].invert(e.docs[n]),s=new tQ(e.mapping.maps[n],i,t),o;(o=c&&c.merge(s))&&(s=o,n?l.pop():h=h.slice(0,h.length-1)),l.push(s),t&&(a++,t=void 0),r||(c=s)}let d=a-n.depth;return d>t1&&(i=h,s=d,i.forEach((e,t)=>{if(e.selection&&0==s--)return o=t,!1}),h=i.slice(o),a-=d),new tZ(h.append(l),a)}remapping(e,t){let n=new tP.X9;return this.items.forEach((t,r)=>{let i=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(e){return 0==this.eventCount?this:new tZ(this.items.append(e.map(e=>new tQ(e))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),i=e.mapping,s=e.steps.length,o=this.eventCount;this.items.forEach(e=>{e.selection&&o--},r);let l=t;this.items.forEach(t=>{let r=i.getMirror(--l);if(null==r)return;s=Math.min(s,r);let a=i.maps[r];if(t.step){let s=e.steps[r].invert(e.docs[r]),h=t.selection&&t.selection.map(i.slice(l+1,r));h&&o++,n.push(new tQ(a,s,h))}else n.push(new tQ(a))},r);let a=[];for(let e=t;e<s;e++)a.push(new tQ(i.maps[e]));let h=new tZ(this.items.slice(0,r).append(a).append(n),o);return h.emptyItemCount()>500&&(h=h.compress(this.items.length-n.length)),h}emptyItemCount(){let e=0;return this.items.forEach(t=>{!t.step&&e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],i=0;return this.items.forEach((s,o)=>{if(o>=e)r.push(s),s.selection&&i++;else if(s.step){let e=s.step.map(t.slice(n)),o=e&&e.getMap();if(n--,o&&t.appendMap(o,n),e){let l=s.selection&&s.selection.map(t.slice(n));l&&i++;let a=new tQ(o.invert(),e,l),h,c=r.length-1;(h=r.length&&r[c].merge(a))?r[c]=h:r.push(a)}}else s.map&&n--},this.items.length,0),new tZ(tG.from(r.reverse()),i)}}tZ.empty=new tZ(tG.empty,0);class tQ{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new tQ(t.getMap().invert(),t,this.selection)}}}class t0{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}}let t1=20;function t2(e){let t=[];for(let n=e.length-1;n>=0&&0==t.length;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function t3(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),s=t.map(e[r+1],-1);i<=s&&n.push(i,s)}return n}let t6=!1,t4=null;function t5(e){let t=e.plugins;if(t4!=t){t6=!1,t4=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){t6=!0;break}}return t6}let t8=new m.hs("history"),t9=new m.hs("closeHistory");function t7(e,t){return(n,r)=>{let i=t8.getState(n);if(!i||0==(e?i.undone:i.done).eventCount)return!1;if(r){let s=function(e,t,n){let r=t5(t),i=t8.get(t).spec.config,s=(n?e.undone:e.done).popEvent(t,r);if(!s)return null;let o=s.selection.resolve(s.transform.doc),l=(n?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),i,r),a=new t0(n?l:s.remaining,n?s.remaining:l,null,0,-1);return s.transform.setSelection(o).setMeta(t8,{redo:n,historyState:a})}(i,n,e);s&&r(t?s.scrollIntoView():s)}return!0}}let ne=t7(!1,!0),nt=t7(!0,!0);t7(!1,!1),t7(!0,!1),r.YY.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(e=>""!==e).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){let e=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new m.k_({key:new m.hs("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;let i=this.options.limit;if(null==i||0===i){e=!0;return}let s=this.storage.characters({node:r.doc});if(s>i){console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let t=r.tr.deleteRange(0,s-i);return e=!0,t}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||0===n||null==n)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r||!e.getMeta("paste"))return!1;let s=e.selection.$head.pos;return e.deleteRange(s-(i-n),s),!(this.storage.characters({node:e.doc})>n)}})]}});var nn=r.YY.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[function(e={}){return new m.k_({view:t=>new t$(t,e)})}(this.options)]}});r.YY.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new m.k_({key:new m.hs("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,s=[];if(!n||!r)return tD.zF.create(e,[]);let o=0;"deepest"===this.options.mode&&e.descendants((e,t)=>{if(!e.isText){if(!(i>=t&&i<=t+e.nodeSize-1))return!1;o+=1}});let l=0;return e.descendants((e,t)=>!e.isText&&!!(i>=t&&i<=t+e.nodeSize-1)&&((l+=1,"deepest"===this.options.mode&&o-l>0||"shallowest"===this.options.mode&&l>1)?"deepest"===this.options.mode:void s.push(tD.NZ.node(t,t+e.nodeSize,{class:this.options.className})))),tD.zF.create(e,s)}}})]}});var nr=r.YY.create({name:"gapCursor",addProseMirrorPlugins:()=>[new m.k_({props:{decorations:tW,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&tH.valid(n)?new tH(n):null,handleClick:tU,handleKeyDown:tq,handleDOMEvents:{beforeinput:tV}}})],extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!=(t=(0,r.gk)((0,r.iI)(e,"allowGapCursor",n)))?t:null}}}),ni="placeholder";function ns({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(null==t?void 0:t.type)===e}r.YY.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:ni,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){let e=this.options.dataAttribute?`data-${this.options.dataAttribute.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}`:`data-${ni}`;return[new m.k_({key:new m.hs("placeholder"),props:{decorations:({doc:t,selection:n})=>{let i=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:s}=n,o=[];if(!i)return null;let l=this.editor.isEmpty;return t.descendants((t,n)=>{let i=s>=n&&s<=n+t.nodeSize,a=!t.isLeaf&&(0,r.Op)(t);if((i||!this.options.showOnlyCurrent)&&a){let r=[this.options.emptyNodeClass];l&&r.push(this.options.emptyEditorClass);let s=tD.NZ.node(n,n+t.nodeSize,{class:r.join(" "),[e]:"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:t,pos:n,hasAnchor:i}):this.options.placeholder});o.push(s)}return this.options.includeChildren}),tD.zF.create(t,o)}}})]}}),r.YY.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new m.k_({key:new m.hs("selection"),props:{decorations:n=>n.selection.empty||e.isFocused||!e.isEditable||(0,r.BQ)(n.selection)||e.view.dragging?null:tD.zF.create(n.doc,[tD.NZ.inline(n.selection.from,n.selection.to,{class:t.className})])}})]}});var no=r.YY.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var e;let t=new m.hs(this.name),n=this.options.node||(null==(e=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(n).includes(e.name));return[new m.k_({key:t,appendTransaction:(e,r,i)=>{let{doc:s,tr:o,schema:l}=i,a=t.getState(i),h=s.content.size,c=l.nodes[n];if(a)return o.insert(h,c.create())},state:{init:(e,t)=>!ns({node:t.tr.doc.lastChild,types:r}),apply:(e,t)=>!e.docChanged||e.getMeta("__uniqueIDTransaction")?t:!ns({node:e.doc.lastChild,types:r})}})]}}),nl=r.YY.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>ne(e,t),redo:()=>({state:e,dispatch:t})=>nt(e,t)}),addProseMirrorPlugins(){return[function(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new m.k_({key:t8,state:{init:()=>new t0(tZ.empty,tZ.empty,null,0,-1),apply:(t,n,r)=>(function(e,t,n,r){let i=n.getMeta(t8),s;if(i)return i.historyState;n.getMeta(t9)&&(e=new t0(e.done,e.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(o&&o.getMeta(t8))if(o.getMeta(t8).redo)return new t0(e.done.addTransform(n,void 0,r,t5(t)),e.undone,t2(n.mapping.maps),e.prevTime,e.prevComposition);else return new t0(e.done,e.undone.addTransform(n,void 0,r,t5(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||o&&!1===o.getMeta("addToHistory"))if(s=n.getMeta("rebased"))return new t0(e.done.rebased(n,s),e.undone.rebased(n,s),t3(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new t0(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),t3(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let i=n.getMeta("composition"),s=0==e.prevTime||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}(n,e.prevRanges)),l=o?t3(e.prevRanges,n.mapping):t2(n.mapping.maps);return new t0(e.done.addTransform(n,s?t.selection.getBookmark():void 0,r,t5(t)),tZ.empty,l,n.time,null==i?e.prevComposition:i)}})(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?ne:"historyRedo"==n?nt:null;return!!r&&!!e.editable&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),na=r.YY.create({name:"starterKit",addExtensions(){var e,t,n,r;let i=[];return!1!==this.options.bold&&i.push(d.configure(this.options.bold)),!1!==this.options.blockquote&&i.push(o.configure(this.options.blockquote)),!1!==this.options.bulletList&&i.push(ta.configure(this.options.bulletList)),!1!==this.options.code&&i.push(f.configure(this.options.code)),!1!==this.options.codeBlock&&i.push(k.configure(this.options.codeBlock)),!1!==this.options.document&&i.push(v.configure(this.options.document)),!1!==this.options.dropcursor&&i.push(nn.configure(this.options.dropcursor)),!1!==this.options.gapcursor&&i.push(nr.configure(this.options.gapcursor)),!1!==this.options.hardBreak&&i.push(w.configure(this.options.hardBreak)),!1!==this.options.heading&&i.push(b.configure(this.options.heading)),!1!==this.options.undoRedo&&i.push(nl.configure(this.options.undoRedo)),!1!==this.options.horizontalRule&&i.push(x.configure(this.options.horizontalRule)),!1!==this.options.italic&&i.push(T.configure(this.options.italic)),!1!==this.options.listItem&&i.push(th.configure(this.options.listItem)),!1!==this.options.listKeymap&&i.push(tw.configure(null==(e=this.options)?void 0:e.listKeymap)),!1!==this.options.link&&i.push(ti.configure(null==(t=this.options)?void 0:t.link)),!1!==this.options.orderedList&&i.push(tC.configure(this.options.orderedList)),!1!==this.options.paragraph&&i.push(tL.configure(this.options.paragraph)),!1!==this.options.strike&&i.push(tN.configure(this.options.strike)),!1!==this.options.text&&i.push(tz.configure(this.options.text)),!1!==this.options.underline&&i.push(tj.configure(null==(n=this.options)?void 0:n.underline)),!1!==this.options.trailingNode&&i.push(no.configure(null==(r=this.options)?void 0:r.trailingNode)),i}})},86196:(e,t,n)=>{var r=n(1856),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=r.useState,o=r.useEffect,l=r.useLayoutEffect,a=r.useDebugValue;function h(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=s({inst:{value:n,getSnapshot:t}}),i=r[0].inst,c=r[1];return l(function(){i.value=n,i.getSnapshot=t,h(i)&&c({inst:i})},[e,n,t]),o(function(){return h(i)&&c({inst:i}),e(function(){h(i)&&c({inst:i})})},[e]),a(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},87161:(e,t,n)=>{e.exports=n(86196)},88591:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("circle-pause",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]])},88853:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("send-horizontal",[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]])},93134:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("clock-3",[["path",{d:"M12 6v6h4",key:"135r8i"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},94310:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]])},94599:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},94903:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},95886:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},97413:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(66206).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},99783:(e,t,n)=>{n.d(t,{A:()=>p});var r=n(17749),i=n(65282),s=n(32603),o=n(18096);function l(e){var t;let{char:n,allowSpaces:i,allowToIncludeChar:s,allowedPrefixes:o,startOfLine:l,$position:a}=e,h=i&&!s,c=(0,r.GG)(n),d=RegExp(`\\s${c}$`),p=l?"^":"",u=s?"":c,f=h?RegExp(`${p}${c}.*?(?=\\s${u}|$)`,"gm"):RegExp(`${p}(?:^)?${c}[^\\s${u}]*`,"gm"),m=(null==(t=a.nodeBefore)?void 0:t.isText)&&a.nodeBefore.text;if(!m)return null;let g=a.pos-m.length,y=Array.from(m.matchAll(f)).pop();if(!y||void 0===y.input||void 0===y.index)return null;let k=y.input.slice(Math.max(0,y.index-1),y.index),v=RegExp(`^[${null==o?void 0:o.join("")}\0]?$`).test(k);if(null!==o&&!v)return null;let w=g+y.index,b=w+y[0].length;return(h&&d.test(m.slice(b-1,b+1))&&(y[0]+=" ",b+=1),w<a.pos&&b>=a.pos)?{range:{from:w,to:b},query:y[0].slice(n.length),text:y[0]}:null}var a=new s.hs("suggestion");function h({pluginKey:e=a,editor:t,char:n="@",allowSpaces:r=!1,allowToIncludeChar:i=!1,allowedPrefixes:h=[" "],startOfLine:c=!1,decorationTag:d="span",decorationClass:p="suggestion",decorationContent:u="",decorationEmptyClass:f="is-empty",command:m=()=>null,items:g=()=>[],render:y=()=>({}),allow:k=()=>!0,findSuggestionMatch:v=l,shouldShow:w}){let b,x=null==y?void 0:y(),S=()=>{let e=t.state.selection.$anchor.pos,{top:n,right:r,bottom:i,left:s}=t.view.coordsAtPos(e);try{return new DOMRect(s,n,r-s,i-n)}catch{return null}},M=(n,r)=>r?()=>{let r=e.getState(t.state),i=null==r?void 0:r.decorationId,s=n.dom.querySelector(`[data-decoration-id="${i}"]`);return(null==s?void 0:s.getBoundingClientRect())||null}:S,C=new s.k_({key:e,view(){return{update:async(e,n)=>{var r,i,s,o,l,a,h;let c=null==(r=this.key)?void 0:r.getState(n),d=null==(i=this.key)?void 0:i.getState(e.state),p=c.active&&d.active&&c.range.from!==d.range.from,u=!c.active&&d.active,f=c.active&&!d.active,y=!u&&!f&&c.query!==d.query,k=u||p&&y,v=y||p,w=f||p&&y;if(!k&&!v&&!w)return;let S=w&&!k?c:d,C=e.dom.querySelector(`[data-decoration-id="${S.decorationId}"]`);b={editor:t,range:S.range,query:S.query,text:S.text,items:[],command:e=>m({editor:t,range:S.range,props:e}),decorationNode:C,clientRect:M(e,C)},k&&(null==(s=null==x?void 0:x.onBeforeStart)||s.call(x,b)),v&&(null==(o=null==x?void 0:x.onBeforeUpdate)||o.call(x,b)),(v||k)&&(b.items=await g({editor:t,query:S.query})),w&&(null==(l=null==x?void 0:x.onExit)||l.call(x,b)),v&&(null==(a=null==x?void 0:x.onUpdate)||a.call(x,b)),k&&(null==(h=null==x?void 0:x.onStart)||h.call(x,b))},destroy:()=>{var e;b&&(null==(e=null==x?void 0:x.onExit)||e.call(x,b))}}},state:{init:()=>({active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}),apply(s,o,l,a){let{isEditable:d}=t,{composing:p}=t.view,{selection:u}=s,{empty:f,from:m}=u,g={...o},y=s.getMeta(e);if(y&&y.exit)return g.active=!1,g.decorationId=null,g.range={from:0,to:0},g.query=null,g.text=null,g;if(g.composing=p,d&&(f||t.view.composing)){(m<o.range.from||m>o.range.to)&&!p&&!o.composing&&(g.active=!1);let e=v({char:n,allowSpaces:r,allowToIncludeChar:i,allowedPrefixes:h,startOfLine:c,$position:u.$from}),l=`id_${Math.floor(0xffffffff*Math.random())}`;e&&k({editor:t,state:a,range:e.range,isActive:o.active})&&(!w||w({editor:t,range:e.range,query:e.query,text:e.text,transaction:s}))?(g.active=!0,g.decorationId=o.decorationId?o.decorationId:l,g.range=e.range,g.query=e.query,g.text=e.text):g.active=!1}else g.active=!1;return g.active||(g.decorationId=null,g.range={from:0,to:0},g.query=null,g.text=null),g}},props:{handleKeyDown(n,r){var i,s,o,l;let{active:a,range:h}=C.getState(n.state);if(!a)return!1;if("Escape"===r.key||"Esc"===r.key){let l=C.getState(n.state),a=null!=(i=null==b?void 0:b.decorationNode)?i:null,h=null!=a?a:(null==l?void 0:l.decorationId)?n.dom.querySelector(`[data-decoration-id="${l.decorationId}"]`):null;if(null==(s=null==x?void 0:x.onKeyDown)?void 0:s.call(x,{view:n,event:r,range:l.range}))return!0;let c={editor:t,range:l.range,query:l.query,text:l.text,items:[],command:e=>m({editor:t,range:l.range,props:e}),decorationNode:h,clientRect:h?()=>h.getBoundingClientRect()||null:null};return null==(o=null==x?void 0:x.onExit)||o.call(x,c),!function(n,r){var i;try{let r=e.getState(n.state),s=(null==r?void 0:r.decorationId)?n.dom.querySelector(`[data-decoration-id="${r.decorationId}"]`):null,o={editor:t,range:(null==r?void 0:r.range)||{from:0,to:0},query:(null==r?void 0:r.query)||null,text:(null==r?void 0:r.text)||null,items:[],command:e=>m({editor:t,range:(null==r?void 0:r.range)||{from:0,to:0},props:e}),decorationNode:s,clientRect:M(n,s)};null==(i=null==x?void 0:x.onExit)||i.call(x,o)}catch{}let s=n.state.tr.setMeta(r,{exit:!0});n.dispatch(s)}(n,e),!0}return(null==(l=null==x?void 0:x.onKeyDown)?void 0:l.call(x,{view:n,event:r,range:h}))||!1},decorations(e){let{active:t,range:n,decorationId:r,query:i}=C.getState(e);if(!t)return null;let s=!(null==i?void 0:i.length),l=[p];return s&&l.push(f),o.zF.create(e.doc,[o.NZ.inline(n.from,n.to,{nodeName:d,class:l.join(" "),"data-decoration-id":r,"data-decoration-content":u})])}}});return C}function c(e){return(e.options.suggestions.length?e.options.suggestions:[e.options.suggestion]).map(t=>(function({editor:e,overrideSuggestionOptions:t,extensionName:n,char:r="@"}){return{editor:e,char:r,pluginKey:new s.hs,command:({editor:e,range:t,props:i})=>{var s,o,l;let a=e.view.state.selection.$to.nodeAfter;(null==(s=null==a?void 0:a.text)?void 0:s.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:n,attrs:{...i,mentionSuggestionChar:r}},{type:"text",text:" "}]).run(),null==(l=null==(o=e.view.dom.ownerDocument.defaultView)?void 0:o.getSelection())||l.collapseToEnd()},allow:({state:e,range:t})=>{let r=e.doc.resolve(t.from),i=e.schema.nodes[n];return!!r.parent.type.contentMatch.matchType(i)},...t}})({editor:e.editor,overrideSuggestionOptions:t,extensionName:e.name,char:t.char}))}function d(e,t){let n=c(e),r=n.find(e=>e.char===t);return r||(n.length?n[0]:null)}var p=r.bP.create({name:"mention",priority:101,addOptions:()=>({HTMLAttributes:{},renderText({node:e,suggestion:t}){var n,r;return`${null!=(n=null==t?void 0:t.char)?n:"@"}${null!=(r=e.attrs.label)?r:e.attrs.id}`},deleteTriggerWithBackspace:!1,renderHTML({options:e,node:t,suggestion:n}){var i,s;return["span",(0,r.KV)(this.HTMLAttributes,e.HTMLAttributes),`${null!=(i=null==n?void 0:n.char)?i:"@"}${null!=(s=t.attrs.label)?s:t.attrs.id}`]},suggestions:[],suggestion:{}}),group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes:()=>({id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}},mentionSuggestionChar:{default:"@",parseHTML:e=>e.getAttribute("data-mention-suggestion-char"),renderHTML:e=>({"data-mention-suggestion-char":e.mentionSuggestionChar})}}),parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:e,HTMLAttributes:t}){let n=d(this,e.attrs.mentionSuggestionChar);if(void 0!==this.options.renderLabel)return console.warn("renderLabel is deprecated use renderText and renderHTML instead"),["span",(0,r.KV)({"data-type":this.name},this.options.HTMLAttributes,t),this.options.renderLabel({options:this.options,node:e,suggestion:n})];let i={...this.options};i.HTMLAttributes=(0,r.KV)({"data-type":this.name},this.options.HTMLAttributes,t);let s=this.options.renderHTML({options:i,node:e,suggestion:n});return"string"==typeof s?["span",(0,r.KV)({"data-type":this.name},this.options.HTMLAttributes,t),s]:s},...(0,r.ur)({nodeName:"mention",name:"@",selfClosing:!0,allowedAttributes:["id","label",{name:"mentionSuggestionChar",skipIfDefault:"@"}],parseAttributes:e=>{let t={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g,r=n.exec(e);for(;null!==r;){let[,i,s,o]=r,l=null!=s?s:o;t["char"===i?"mentionSuggestionChar":i]=l,r=n.exec(e)}return t},serializeAttributes:e=>Object.entries(e).filter(([,e])=>null!=e).map(([e,t])=>`${"mentionSuggestionChar"===e?"char":e}="${t}"`).join(" ")}),renderText({node:e}){let t={options:this.options,node:e,suggestion:d(this,e.attrs.mentionSuggestionChar)};return void 0!==this.options.renderLabel?(console.warn("renderLabel is deprecated use renderText and renderHTML instead"),this.options.renderLabel(t)):this.options.renderText(t)},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:e,state:t})=>{let n=!1,{selection:r}=t,{empty:s,anchor:o}=r;if(!s)return!1;let l=new i.bP,a=0;return t.doc.nodesBetween(o-1,o,(e,t)=>{if(e.type.name===this.name)return n=!0,l=e,a=t,!1}),n&&e.insertText(this.options.deleteTriggerWithBackspace?"":l.attrs.mentionSuggestionChar,a,a+l.nodeSize),n})}},addProseMirrorPlugins(){return c(this).map(h)}})}}]);
|