@surething/cockpit 1.0.286 → 1.0.287
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-prod/BUILD_ID +1 -1
- package/.next-prod/app-path-routes-manifest.json +3 -3
- package/.next-prod/build-manifest.json +2 -2
- package/.next-prod/cockpit-build.json +1 -1
- package/.next-prod/prerender-manifest.json +3 -3
- package/.next-prod/server/app/_global-error/page.js.nft.json +1 -1
- package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_global-error.html +1 -1
- package/.next-prod/server/app/_global-error.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found/page.js.nft.json +1 -1
- package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_not-found.html +2 -2
- package/.next-prod/server/app/_not-found.rsc +3 -3
- package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next-prod/server/app/api/agent/test/route.js +1 -1
- package/.next-prod/server/app/api/agent/test/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/bash/route.js +1 -1
- package/.next-prod/server/app/api/bash/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/bots/[id]/route.js +1 -1
- package/.next-prod/server/app/api/bots/[id]/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/bots/route.js +1 -1
- package/.next-prod/server/app/api/bots/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/codex/route.js +1 -1
- package/.next-prod/server/app/api/chat/codex/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/deepseek/route.js +1 -1
- package/.next-prod/server/app/api/chat/deepseek/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/glm/route.js +1 -1
- package/.next-prod/server/app/api/chat/glm/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/kimi/route.js +1 -1
- package/.next-prod/server/app/api/chat/kimi/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/ollama/route.js +1 -1
- package/.next-prod/server/app/api/chat/ollama/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/route.js +1 -1
- package/.next-prod/server/app/api/chat/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/stop/route.js +1 -1
- package/.next-prod/server/app/api/chat/stop/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/claude-stats/route.js +1 -1
- package/.next-prod/server/app/api/claude-stats/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/commands/route.js +1 -1
- package/.next-prod/server/app/api/commands/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/comments/route.js +1 -1
- package/.next-prod/server/app/api/comments/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/columns/route.js +1 -1
- package/.next-prod/server/app/api/db/columns/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/connect/route.js +1 -1
- package/.next-prod/server/app/api/db/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/db/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/export/route.js +1 -1
- package/.next-prod/server/app/api/db/export/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/query/route.js +1 -1
- package/.next-prod/server/app/api/db/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/schemas/route.js +1 -1
- package/.next-prod/server/app/api/db/schemas/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/deepseek/balance/route.js +1 -1
- package/.next-prod/server/app/api/deepseek/balance/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/deepseek/credentials/route.js +1 -1
- package/.next-prod/server/app/api/deepseek/credentials/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/deepseek/models/route.js +1 -1
- package/.next-prod/server/app/api/deepseek/models/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/dev/spans/route.js +1 -1
- package/.next-prod/server/app/api/dev/spans/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/extension/version/route.js +1 -1
- package/.next-prod/server/app/api/extension/version/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/file/route.js +1 -1
- package/.next-prod/server/app/api/file/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/blame/route.js +1 -1
- package/.next-prod/server/app/api/files/blame/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/clipboard/route.js +1 -1
- package/.next-prod/server/app/api/files/clipboard/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/copy/route.js +1 -1
- package/.next-prod/server/app/api/files/copy/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/delete/route.js +1 -1
- package/.next-prod/server/app/api/files/delete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/expanded/route.js +1 -1
- package/.next-prod/server/app/api/files/expanded/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/index/route.js +1 -1
- package/.next-prod/server/app/api/files/index/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/init/route.js +1 -1
- package/.next-prod/server/app/api/files/init/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/paste/route.js +1 -1
- package/.next-prod/server/app/api/files/paste/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/read/route.js +1 -1
- package/.next-prod/server/app/api/files/read/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/readdir/route.js +1 -1
- package/.next-prod/server/app/api/files/readdir/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/recent/route.js +1 -1
- package/.next-prod/server/app/api/files/recent/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/save/route.js +1 -1
- package/.next-prod/server/app/api/files/save/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/search/route.js +1 -1
- package/.next-prod/server/app/api/files/search/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/stat/route.js +1 -1
- package/.next-prod/server/app/api/files/stat/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/text/route.js +1 -1
- package/.next-prod/server/app/api/files/text/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/fs/dirs/route.js +1 -1
- package/.next-prod/server/app/api/fs/dirs/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/blob/route.js +1 -1
- package/.next-prod/server/app/api/git/blob/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/branch-diff/route.js +1 -1
- package/.next-prod/server/app/api/git/branch-diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/branches/route.js +1 -1
- package/.next-prod/server/app/api/git/branches/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/commit-diff/route.js +1 -1
- package/.next-prod/server/app/api/git/commit-diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/commits/route.js +1 -1
- package/.next-prod/server/app/api/git/commits/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/current-branch/route.js +1 -1
- package/.next-prod/server/app/api/git/current-branch/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/diff/route.js +1 -1
- package/.next-prod/server/app/api/git/diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/discard/route.js +1 -1
- package/.next-prod/server/app/api/git/discard/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/stage/route.js +1 -1
- package/.next-prod/server/app/api/git/stage/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/status/route.js +1 -1
- package/.next-prod/server/app/api/git/status/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/unstage/route.js +1 -1
- package/.next-prod/server/app/api/git/unstage/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/worktree/route.js +1 -1
- package/.next-prod/server/app/api/git/worktree/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/glm/credentials/route.js +1 -1
- package/.next-prod/server/app/api/glm/credentials/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/glm/models/route.js +1 -1
- package/.next-prod/server/app/api/glm/models/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/glm/usage/route.js +1 -1
- package/.next-prod/server/app/api/glm/usage/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/global-state/route.js +1 -1
- package/.next-prod/server/app/api/global-state/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/health/route.js +1 -1
- package/.next-prod/server/app/api/health/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/html-apps/[id]/route.js +1 -1
- package/.next-prod/server/app/api/html-apps/[id]/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/html-apps/route.js +1 -1
- package/.next-prod/server/app/api/html-apps/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/instructions/config/route.js +1 -1
- package/.next-prod/server/app/api/instructions/config/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/kimi/credentials/route.js +1 -1
- package/.next-prod/server/app/api/kimi/credentials/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/kimi/models/route.js +1 -1
- package/.next-prod/server/app/api/kimi/models/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/kimi/usage/route.js +1 -1
- package/.next-prod/server/app/api/kimi/usage/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/definition/route.js +1 -1
- package/.next-prod/server/app/api/lsp/definition/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/hover/route.js +1 -1
- package/.next-prod/server/app/api/lsp/hover/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/references/route.js +1 -1
- package/.next-prod/server/app/api/lsp/references/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/status/route.js +1 -1
- package/.next-prod/server/app/api/lsp/status/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/warmup/route.js +1 -1
- package/.next-prod/server/app/api/lsp/warmup/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/columns/route.js +1 -1
- package/.next-prod/server/app/api/mysql/columns/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/connect/route.js +1 -1
- package/.next-prod/server/app/api/mysql/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/mysql/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/export/route.js +1 -1
- package/.next-prod/server/app/api/mysql/export/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/query/route.js +1 -1
- package/.next-prod/server/app/api/mysql/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/schemas/route.js +1 -1
- package/.next-prod/server/app/api/mysql/schemas/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/connect/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/query/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/schema/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/schema/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/note/route.js +1 -1
- package/.next-prod/server/app/api/note/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/ollama/config/route.js +1 -1
- package/.next-prod/server/app/api/ollama/config/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/ollama/default-model/route.js +1 -1
- package/.next-prod/server/app/api/ollama/default-model/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/ollama/models/route.js +1 -1
- package/.next-prod/server/app/api/ollama/models/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/ollama/start/route.js +1 -1
- package/.next-prod/server/app/api/ollama/start/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/open-cursor/route.js +1 -1
- package/.next-prod/server/app/api/open-cursor/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/open-vscode/route.js +1 -1
- package/.next-prod/server/app/api/open-vscode/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/output-styles/config/route.js +1 -1
- package/.next-prod/server/app/api/output-styles/config/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/pinned-sessions/route.js +1 -1
- package/.next-prod/server/app/api/pinned-sessions/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/project-settings/route.js +1 -1
- package/.next-prod/server/app/api/project-settings/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/project-state/route.js +1 -1
- package/.next-prod/server/app/api/project-state/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/affected/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/affected/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/callees/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/callees/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/callers/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/callers/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/coedit/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/coedit/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/context/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/context/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/file/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/file/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/file-functions/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/file-functions/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/impact/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/impact/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/related/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/related/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/risk/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/risk/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/search/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/search/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projects/route.js +1 -1
- package/.next-prod/server/app/api/projects/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/push/public-key/route.js +1 -1
- package/.next-prod/server/app/api/push/public-key/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/push/subscribe/route.js +1 -1
- package/.next-prod/server/app/api/push/subscribe/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/push/unsubscribe/route.js +1 -1
- package/.next-prod/server/app/api/push/unsubscribe/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/command/route.js +1 -1
- package/.next-prod/server/app/api/redis/command/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/connect/route.js +1 -1
- package/.next-prod/server/app/api/redis/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/delete/route.js +1 -1
- package/.next-prod/server/app/api/redis/delete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/redis/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/get/route.js +1 -1
- package/.next-prod/server/app/api/redis/get/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/keys/route.js +1 -1
- package/.next-prod/server/app/api/redis/keys/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/set/route.js +1 -1
- package/.next-prod/server/app/api/redis/set/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/restart/route.js +1 -1
- package/.next-prod/server/app/api/restart/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/scheduled-tasks/route.js +2 -2
- package/.next-prod/server/app/api/scheduled-tasks/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/services/config/route.js +1 -1
- package/.next-prod/server/app/api/services/config/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/services/scripts/route.js +1 -1
- package/.next-prod/server/app/api/services/scripts/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/fork/route.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/fork/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/history/route.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/history/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/turn/route.js +2 -2
- package/.next-prod/server/app/api/session/[sessionId]/turn/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/session/user-messages/route.js +1 -1
- package/.next-prod/server/app/api/session/user-messages/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/session-by-path/route.js +1 -1
- package/.next-prod/server/app/api/session-by-path/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/sessions/delegate/route.js +1 -1
- package/.next-prod/server/app/api/sessions/delegate/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/sessions/projects/route.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/sessions/search/route.js +1 -1
- package/.next-prod/server/app/api/sessions/search/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/sessions/status/route.js +1 -1
- package/.next-prod/server/app/api/sessions/status/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/settings/route.js +1 -1
- package/.next-prod/server/app/api/settings/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/shutdown/route.js +1 -1
- package/.next-prod/server/app/api/shutdown/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/skills/[id]/route.js +1 -1
- package/.next-prod/server/app/api/skills/[id]/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/skills/content/route.js +1 -1
- package/.next-prod/server/app/api/skills/content/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/skills/route.js +1 -1
- package/.next-prod/server/app/api/skills/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/snapshots/blob/route.js +1 -1
- package/.next-prod/server/app/api/snapshots/blob/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/snapshots/diff/route.js +1 -1
- package/.next-prod/server/app/api/snapshots/diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/snapshots/range-diff/route.js +1 -1
- package/.next-prod/server/app/api/snapshots/range-diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/snapshots/route.js +1 -1
- package/.next-prod/server/app/api/snapshots/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/aliases/route.js +1 -1
- package/.next-prod/server/app/api/terminal/aliases/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/autocomplete/route.js +1 -1
- package/.next-prod/server/app/api/terminal/autocomplete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/bubble-order/route.js +1 -1
- package/.next-prod/server/app/api/terminal/bubble-order/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/env/route.js +1 -1
- package/.next-prod/server/app/api/terminal/env/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/history/route.js +1 -1
- package/.next-prod/server/app/api/terminal/history/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/running/route.js +1 -1
- package/.next-prod/server/app/api/terminal/running/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/update/route.js +1 -1
- package/.next-prod/server/app/api/update/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/update-state/route.js +1 -1
- package/.next-prod/server/app/api/update-state/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/version/route.js +1 -1
- package/.next-prod/server/app/api/version/route.js.nft.json +1 -1
- package/.next-prod/server/app/apps/[...path]/route.js +1 -1
- package/.next-prod/server/app/apps/[...path]/route.js.nft.json +1 -1
- package/.next-prod/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next-prod/server/app/m/page.js +1 -1
- package/.next-prod/server/app/m/page.js.nft.json +1 -1
- package/.next-prod/server/app/m/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/.next-prod/server/app/page.js.nft.json +1 -1
- package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/project/page.js.nft.json +1 -1
- package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app-paths-manifest.json +3 -3
- package/.next-prod/server/chunks/2493.js +11 -11
- package/.next-prod/server/chunks/4983.js +13 -0
- package/.next-prod/server/chunks/6495.js +1 -1
- package/.next-prod/server/chunks/7438.js +8 -8
- package/.next-prod/server/chunks/8490.js +232 -0
- package/.next-prod/server/chunks/9830.js +1 -1
- package/.next-prod/server/middleware-build-manifest.js +1 -1
- package/.next-prod/server/pages/404.html +2 -2
- package/.next-prod/server/pages/500.html +1 -1
- package/.next-prod/server/server-reference-manifest.json +1 -1
- package/.next-prod/static/chunks/{2550-d42d8fc88c0cec98.js → 2550-5ec6ad72e7b4c089.js} +4 -4
- package/.next-prod/static/chunks/{9471-8c53bd74ad056e69.js → 4210-b0cf2aaa0f2affb2.js} +2 -2
- package/.next-prod/static/chunks/{5313-d734a6541498a6db.js → 5313-21ec8e33f8e39afb.js} +4 -4
- package/.next-prod/static/chunks/{4731-3b3290b5ec84f6bd.js → 7109-9c529ec1ed2c5549.js} +2 -2
- package/.next-prod/static/chunks/app/{layout-26d284da8922060a.js → layout-984393154fd12d10.js} +1 -1
- package/.next-prod/static/chunks/app/m/{page-6a86aa4f5ebeebfd.js → page-7d2452671b0a743a.js} +1 -1
- package/.next-prod/static/chunks/app/{page-88b01c311b11942a.js → page-178d75863d53265c.js} +1 -1
- package/.next-prod/static/chunks/app/project/{page-88b01c311b11942a.js → page-178d75863d53265c.js} +1 -1
- package/.next-prod/static/css/{82bfae948a79a037.css → 59110be5a0eddfe8.css} +1 -1
- package/.next-prod/trace +14 -14
- package/.next-prod/trace-build +1 -1
- package/dist/{chunk-2UCBL4S6.mjs → chunk-7W3MYHMA.mjs} +1 -1
- package/dist/{chunk-G6BCSLZX.mjs → chunk-UAWBPZHS.mjs} +6519 -6193
- package/dist/httpApi.mjs +4 -2
- package/dist/scheduledTasks.mjs +5 -5
- package/dist/wsServer.mjs +2 -2
- package/package.json +3 -3
- package/public/html-lib/markdown.css +49 -0
- package/public/html-lib/markdown.js +64 -63
- package/server.mjs +4 -4
- package/.next-prod/server/chunks/8022.js +0 -244
- /package/.next-prod/static/{cwGvPiCgQI4epB2d3stR2 → aNiGFZjpiAOq6qca-1rRz}/_buildManifest.js +0 -0
- /package/.next-prod/static/{cwGvPiCgQI4epB2d3stR2 → aNiGFZjpiAOq6qca-1rRz}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9471],{5989:(r,n,i)=>{"use strict";let s,o;i.d(n,{XI:()=>ts,nA:()=>e0,A0:()=>e1,Hj:()=>e2});var l=i(82159),a=i(76865),u=i(27050),c=i(63197),h=i(12894),d=i(8242);if("u">typeof WeakMap){let r=new WeakMap;s=n=>r.get(n),o=(n,i)=>(r.set(n,i),i)}else{let r=[],n=10,i=0;s=n=>{for(let i=0;i<r.length;i+=2)if(r[i]==n)return r[i+1]},o=(s,o)=>(i==n&&(i=0),r[i++]=s,r[i++]=o)}var p=class{constructor(r,n,i,s){this.width=r,this.height=n,this.map=i,this.problems=s}findCell(r){for(let n=0;n<this.map.length;n++){let i=this.map[n];if(i!=r)continue;let s=n%this.width,o=n/this.width|0,l=s+1,a=o+1;for(let r=1;l<this.width&&this.map[n+r]==i;r++)l++;for(let r=1;a<this.height&&this.map[n+this.width*r]==i;r++)a++;return{left:s,top:o,right:l,bottom:a}}throw RangeError(`No cell with offset ${r} found`)}colCount(r){for(let n=0;n<this.map.length;n++)if(this.map[n]==r)return n%this.width;throw RangeError(`No cell with offset ${r} found`)}nextCell(r,n,i){let{left:s,right:o,top:l,bottom:a}=this.findCell(r);return"horiz"==n?(i<0?0==s:o==this.width)?null:this.map[l*this.width+(i<0?s-1:o)]:(i<0?0==l:a==this.height)?null:this.map[s+this.width*(i<0?l-1:a)]}rectBetween(r,n){let{left:i,right:s,top:o,bottom:l}=this.findCell(r),{left:a,right:u,top:c,bottom:h}=this.findCell(n);return{left:Math.min(i,a),top:Math.min(o,c),right:Math.max(s,u),bottom:Math.max(l,h)}}cellsInRect(r){let n=[],i={};for(let s=r.top;s<r.bottom;s++)for(let o=r.left;o<r.right;o++){let l=s*this.width+o,a=this.map[l];!i[a]&&(i[a]=!0,o==r.left&&o&&this.map[l-1]==a||s==r.top&&s&&this.map[l-this.width]==a||n.push(a))}return n}positionAt(r,n,i){for(let s=0,o=0;;s++){let l=o+i.child(s).nodeSize;if(s==r){let i=n+r*this.width,s=(r+1)*this.width;for(;i<s&&this.map[i]<o;)i++;return i==s?l-1:this.map[i]}o=l}}static get(r){return s(r)||o(r,f(r))}};function f(r){if("table"!=r.type.spec.tableRole)throw RangeError("Not a table node: "+r.type.name);let n=m(r),i=r.childCount,s=[],o=0,l=null,a=[];for(let r=0,o=n*i;r<o;r++)s[r]=0;for(let u=0,c=0;u<i;u++){let h=r.child(u);c++;for(let r=0;;r++){for(;o<s.length&&0!=s[o];)o++;if(r==h.childCount)break;let d=h.child(r),{colspan:p,rowspan:f,colwidth:m}=d.attrs;for(let r=0;r<f;r++){if(r+u>=i){(l||(l=[])).push({type:"overlong_rowspan",pos:c,n:f-r});break}let h=o+r*n;for(let r=0;r<p;r++){0==s[h+r]?s[h+r]=c:(l||(l=[])).push({type:"collision",row:u,pos:c,n:p-r});let i=m&&m[r];if(i){let s=(h+r)%n*2,o=a[s];null==o||o!=i&&1==a[s+1]?(a[s]=i,a[s+1]=1):o==i&&a[s+1]++}}}o+=p,c+=d.nodeSize}let d=(u+1)*n,p=0;for(;o<d;)0==s[o++]&&p++;p&&(l||(l=[])).push({type:"missing",row:u,n:p}),c++}(0===n||0===i)&&(l||(l=[])).push({type:"zero_sized"});let u=new p(n,i,s,l),c=!1;for(let r=0;!c&&r<a.length;r+=2)null!=a[r]&&a[r+1]<i&&(c=!0);return c&&g(u,a,r),u}function m(r){let n=-1,i=!1;for(let s=0;s<r.childCount;s++){let o=r.child(s),l=0;if(i)for(let n=0;n<s;n++){let i=r.child(n);for(let r=0;r<i.childCount;r++){let o=i.child(r);n+o.attrs.rowspan>s&&(l+=o.attrs.colspan)}}for(let r=0;r<o.childCount;r++){let n=o.child(r);l+=n.attrs.colspan,n.attrs.rowspan>1&&(i=!0)}-1==n?n=l:n!=l&&(n=Math.max(n,l))}return n}function g(r,n,i){r.problems||(r.problems=[]);let s={};for(let o=0;o<r.map.length;o++){let l=r.map[o];if(s[l])continue;s[l]=!0;let a=i.nodeAt(l);if(!a)throw RangeError(`No cell with offset ${l} found`);let u=null,c=a.attrs;for(let i=0;i<c.colspan;i++){let s=n[(o+i)%r.width*2];null==s||c.colwidth&&c.colwidth[i]==s||((u||(u=_(c)))[i]=s)}u&&r.problems.unshift({type:"colwidth mismatch",pos:l,colwidth:u})}}function _(r){if(r.colwidth)return r.colwidth.slice();let n=[];for(let i=0;i<r.colspan;i++)n.push(0);return n}function y(r){let n=r.cached.tableNodeTypes;if(!n)for(let i in n=r.cached.tableNodeTypes={},r.nodes){let s=r.nodes[i],o=s.spec.tableRole;o&&(n[o]=s)}return n}let k=new a.hs("selectingCells");function b(r){for(let n=r.depth-1;n>0;n--)if("row"==r.node(n).type.spec.tableRole)return r.node(0).resolve(r.before(n+1));return null}function w(r){for(let n=r.depth;n>0;n--){let i=r.node(n).type.spec.tableRole;if("cell"===i||"header_cell"===i)return r.node(n)}return null}function x(r){let n=r.selection.$head;for(let r=n.depth;r>0;r--)if("row"==n.node(r).type.spec.tableRole)return!0;return!1}function v(r){let n=r.selection;if("$anchorCell"in n&&n.$anchorCell)return n.$anchorCell.pos>n.$headCell.pos?n.$anchorCell:n.$headCell;if("node"in n&&n.node&&"cell"==n.node.type.spec.tableRole)return n.$anchor;let i=b(n.$head)||C(n.$head);if(i)return i;throw RangeError(`No cell found around position ${n.head}`)}function C(r){for(let n=r.nodeAfter,i=r.pos;n;n=n.firstChild,i++){let s=n.type.spec.tableRole;if("cell"==s||"header_cell"==s)return r.doc.resolve(i)}for(let n=r.nodeBefore,i=r.pos;n;n=n.lastChild,i--){let s=n.type.spec.tableRole;if("cell"==s||"header_cell"==s)return r.doc.resolve(i-n.nodeSize)}}function A(r){return"row"==r.parent.type.spec.tableRole&&!!r.nodeAfter}function E(r){return r.node(0).resolve(r.pos+r.nodeAfter.nodeSize)}function S(r,n){return r.depth==n.depth&&r.pos>=n.start(-1)&&r.pos<=n.end(-1)}function M(r,n,i){let s=r.node(-1),o=p.get(s),l=r.start(-1),a=o.nextCell(r.pos-l,n,i);return null==a?null:r.node(0).resolve(l+a)}function T(r,n,i=1){let s={...r,colspan:r.colspan-i};return s.colwidth&&(s.colwidth=s.colwidth.slice(),s.colwidth.splice(n,i),s.colwidth.some(r=>r>0)||(s.colwidth=null)),s}function D(r,n,i=1){let s={...r,colspan:r.colspan+i};if(s.colwidth){s.colwidth=s.colwidth.slice();for(let r=0;r<i;r++)s.colwidth.splice(n,0,0)}return s}function F(r,n,i){let s=y(n.type.schema).header_cell;for(let o=0;o<r.height;o++)if(n.nodeAt(r.map[i+o*r.width]).type!=s)return!1;return!0}var I=class r extends a.LN{constructor(r,n=r){const i=r.node(-1),s=p.get(i),o=r.start(-1),l=s.rectBetween(r.pos-o,n.pos-o),u=r.node(0),c=s.cellsInRect(l).filter(r=>r!=n.pos-o);c.unshift(n.pos-o);const h=c.map(r=>{let n=i.nodeAt(r);if(!n)throw RangeError(`No cell with offset ${r} found`);let s=o+r+1;return new a.yn(u.resolve(s),u.resolve(s+n.content.size))});super(h[0].$from,h[0].$to,h),this.$anchorCell=r,this.$headCell=n}map(n,i){let s=n.resolve(i.map(this.$anchorCell.pos)),o=n.resolve(i.map(this.$headCell.pos));if(A(s)&&A(o)&&S(s,o)){let n=this.$anchorCell.node(-1)!=s.node(-1);return n&&this.isRowSelection()?r.rowSelection(s,o):n&&this.isColSelection()?r.colSelection(s,o):new r(s,o)}return a.U3.between(s,o)}content(){let r=this.$anchorCell.node(-1),n=p.get(r),i=this.$anchorCell.start(-1),s=n.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i),o={},l=[];for(let i=s.top;i<s.bottom;i++){let a=[];for(let l=i*n.width+s.left,u=s.left;u<s.right;u++,l++){let i=n.map[l];if(o[i])continue;o[i]=!0;let u=n.findCell(i),c=r.nodeAt(i);if(!c)throw RangeError(`No cell with offset ${i} found`);let h=s.left-u.left,d=u.right-s.right;if(h>0||d>0){let r=c.attrs;if(h>0&&(r=T(r,0,h)),d>0&&(r=T(r,r.colspan-d,d)),u.left<s.left){if(!(c=c.type.createAndFill(r)))throw RangeError(`Could not create cell with attrs ${JSON.stringify(r)}`)}else c=c.type.create(r,c.content)}if(u.top<s.top||u.bottom>s.bottom){let r={...c.attrs,rowspan:Math.min(u.bottom,s.bottom)-Math.max(u.top,s.top)};c=u.top<s.top?c.type.createAndFill(r):c.type.create(r,c.content)}a.push(c)}l.push(r.child(i).copy(u.FK.from(a)))}let a=this.isColSelection()&&this.isRowSelection()?r:l;return new u.Ji(u.FK.from(a),1,1)}replace(r,n=u.Ji.empty){let i=r.steps.length,s=this.ranges;for(let o=0;o<s.length;o++){let{$from:l,$to:a}=s[o],c=r.mapping.slice(i);r.replace(c.map(l.pos),c.map(a.pos),o?u.Ji.empty:n)}let o=a.LN.findFrom(r.doc.resolve(r.mapping.slice(i).map(this.to)),-1);o&&r.setSelection(o)}replaceWith(r,n){this.replace(r,new u.Ji(u.FK.from(n),0,0))}forEachCell(r){let n=this.$anchorCell.node(-1),i=p.get(n),s=this.$anchorCell.start(-1),o=i.cellsInRect(i.rectBetween(this.$anchorCell.pos-s,this.$headCell.pos-s));for(let i=0;i<o.length;i++)r(n.nodeAt(o[i]),s+o[i])}isColSelection(){let r=this.$anchorCell.index(-1),n=this.$headCell.index(-1);return!(Math.min(r,n)>0)&&Math.max(r+this.$anchorCell.nodeAfter.attrs.rowspan,n+this.$headCell.nodeAfter.attrs.rowspan)==this.$headCell.node(-1).childCount}static colSelection(n,i=n){let s=n.node(-1),o=p.get(s),l=n.start(-1),a=o.findCell(n.pos-l),u=o.findCell(i.pos-l),c=n.node(0);return a.top<=u.top?(a.top>0&&(n=c.resolve(l+o.map[a.left])),u.bottom<o.height&&(i=c.resolve(l+o.map[o.width*(o.height-1)+u.right-1]))):(u.top>0&&(i=c.resolve(l+o.map[u.left])),a.bottom<o.height&&(n=c.resolve(l+o.map[o.width*(o.height-1)+a.right-1]))),new r(n,i)}isRowSelection(){let r=this.$anchorCell.node(-1),n=p.get(r),i=this.$anchorCell.start(-1),s=n.colCount(this.$anchorCell.pos-i),o=n.colCount(this.$headCell.pos-i);return!(Math.min(s,o)>0)&&Math.max(s+this.$anchorCell.nodeAfter.attrs.colspan,o+this.$headCell.nodeAfter.attrs.colspan)==n.width}eq(n){return n instanceof r&&n.$anchorCell.pos==this.$anchorCell.pos&&n.$headCell.pos==this.$headCell.pos}static rowSelection(n,i=n){let s=n.node(-1),o=p.get(s),l=n.start(-1),a=o.findCell(n.pos-l),u=o.findCell(i.pos-l),c=n.node(0);return a.left<=u.left?(a.left>0&&(n=c.resolve(l+o.map[a.top*o.width])),u.right<o.width&&(i=c.resolve(l+o.map[o.width*(u.top+1)-1]))):(u.left>0&&(i=c.resolve(l+o.map[u.top*o.width])),a.right<o.width&&(n=c.resolve(l+o.map[o.width*(a.top+1)-1]))),new r(n,i)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(n,i){return new r(n.resolve(i.anchor),n.resolve(i.head))}static create(n,i,s=i){return new r(n.resolve(i),n.resolve(s))}getBookmark(){return new L(this.$anchorCell.pos,this.$headCell.pos)}};I.prototype.visible=!1,a.LN.jsonID("cell",I);var L=class r{constructor(r,n){this.anchor=r,this.head=n}map(n){return new r(n.map(this.anchor),n.map(this.head))}resolve(r){let n=r.resolve(this.anchor),i=r.resolve(this.head);return"row"==n.parent.type.spec.tableRole&&"row"==i.parent.type.spec.tableRole&&n.index()<n.parent.childCount&&i.index()<i.parent.childCount&&S(n,i)?new I(n,i):a.LN.near(i,1)}};function R(r){if(!(r.selection instanceof I))return null;let n=[];return r.selection.forEachCell((r,i)=>{n.push(c.NZ.node(i,i+r.nodeSize,{class:"selectedCell"}))}),c.zF.create(r.doc,n)}function N({$from:r,$to:n}){if(r.pos==n.pos||r.pos<n.pos-6)return!1;let i=r.pos,s=n.pos,o=r.depth;for(;o>=0&&!(r.after(o+1)<r.end(o));o--,i++);for(let r=n.depth;r>=0&&!(n.before(r+1)>n.start(r));r--,s--);return i==s&&/row|table/.test(r.node(o).type.spec.tableRole)}function O({$from:r,$to:n}){let i,s;for(let n=r.depth;n>0;n--){let s=r.node(n);if("cell"===s.type.spec.tableRole||"header_cell"===s.type.spec.tableRole){i=s;break}}for(let r=n.depth;r>0;r--){let i=n.node(r);if("cell"===i.type.spec.tableRole||"header_cell"===i.type.spec.tableRole){s=i;break}}return i!==s&&0===n.parentOffset}function z(r,n,i){let s,o,l=(n||r).selection,u=(n||r).doc;if(l instanceof a.nh&&(o=l.node.type.spec.tableRole)){if("cell"==o||"header_cell"==o)s=I.create(u,l.from);else if("row"==o){let r=u.resolve(l.from+1);s=I.rowSelection(r,r)}else if(!i){let r=p.get(l.node),n=l.from+1,i=n+r.map[r.width*r.height-1];s=I.create(u,n+1,i)}}else l instanceof a.U3&&N(l)?s=a.U3.create(u,l.from):l instanceof a.U3&&O(l)&&(s=a.U3.create(u,l.$from.start(),l.$from.end()));return s&&(n||(n=r.tr)).setSelection(s),n}let P=new a.hs("fix-tables");function $(r,n,i,s){let o=r.childCount,l=n.childCount;e:for(let a=0,u=0;a<l;a++){let l=n.child(a);for(let n=u,s=Math.min(o,a+3);n<s;n++)if(r.child(n)==l){u=n+1,i+=l.nodeSize;continue e}s(l,i),u<o&&r.child(u).sameMarkup(l)?$(r.child(u),l,i+1,s):l.nodesBetween(0,l.content.size,s,i+1),i+=l.nodeSize}}function B(r,n){let i,s=(n,s)=>{"table"==n.type.spec.tableRole&&(i=q(r,n,s,i))};return n?n.doc!=r.doc&&$(n.doc,r.doc,0,s):r.doc.descendants(s),i}function q(r,n,i,s){let o,l,a=p.get(n);if(!a.problems)return s;s||(s=r.tr);let u=[];for(let r=0;r<a.height;r++)u.push(0);for(let r=0;r<a.problems.length;r++){let o=a.problems[r];if("collision"==o.type){let r=n.nodeAt(o.pos);if(!r)continue;let l=r.attrs;for(let r=0;r<l.rowspan;r++)u[o.row+r]+=o.n;s.setNodeMarkup(s.mapping.map(i+1+o.pos),null,T(l,l.colspan-o.n,o.n))}else if("missing"==o.type)u[o.row]+=o.n;else if("overlong_rowspan"==o.type){let r=n.nodeAt(o.pos);if(!r)continue;s.setNodeMarkup(s.mapping.map(i+1+o.pos),null,{...r.attrs,rowspan:r.attrs.rowspan-o.n})}else if("colwidth mismatch"==o.type){let r=n.nodeAt(o.pos);if(!r)continue;s.setNodeMarkup(s.mapping.map(i+1+o.pos),null,{...r.attrs,colwidth:o.colwidth})}else if("zero_sized"==o.type){let r=s.mapping.map(i);s.delete(r,r+n.nodeSize)}}for(let r=0;r<u.length;r++)u[r]&&(null==o&&(o=r),l=r);for(let c=0,h=i+1;c<a.height;c++){let i=n.child(c),a=h+i.nodeSize,d=u[c];if(d>0){let n="cell";i.firstChild&&(n=i.firstChild.type.spec.tableRole);let u=[];for(let i=0;i<d;i++){let i=y(r.schema)[n].createAndFill();i&&u.push(i)}let p=(0==c||o==c-1)&&l==c?h+1:a-1;s.insert(s.mapping.map(p),u)}h=a}return s.setMeta(P,{fixTables:!0})}function j(r){let n=r.selection,i=v(r),s=i.node(-1),o=i.start(-1),l=p.get(s);return{...n instanceof I?l.rectBetween(n.$anchorCell.pos-o,n.$headCell.pos-o):l.findCell(i.pos-o),tableStart:o,map:l,table:s}}function H(r,{map:n,tableStart:i,table:s},o){let l=o>0?-1:0;F(n,s,o+l)&&(l=0==o||o==n.width?null:0);for(let a=0;a<n.height;a++){let u=a*n.width+o;if(o>0&&o<n.width&&n.map[u-1]==n.map[u]){let l=n.map[u],c=s.nodeAt(l);r.setNodeMarkup(r.mapping.map(i+l),null,D(c.attrs,o-n.colCount(l))),a+=c.attrs.rowspan-1}else{let c=null==l?y(s.type.schema).cell:s.nodeAt(n.map[u+l]).type,h=n.positionAt(a,o,s);r.insert(r.mapping.map(i+h),c.createAndFill())}}return r}function V(r,n){if(!x(r))return!1;if(n){let i=j(r);n(H(r.tr,i,i.left))}return!0}function U(r,n){if(!x(r))return!1;if(n){let i=j(r);n(H(r.tr,i,i.right))}return!0}function W(r,{map:n,table:i,tableStart:s},o){let l=r.mapping.maps.length;for(let a=0;a<n.height;){let u=a*n.width+o,c=n.map[u],h=i.nodeAt(c),d=h.attrs;if(o>0&&n.map[u-1]==c||o<n.width-1&&n.map[u+1]==c)r.setNodeMarkup(r.mapping.slice(l).map(s+c),null,T(d,o-n.colCount(c)));else{let n=r.mapping.slice(l).map(s+c);r.delete(n,n+h.nodeSize)}a+=d.rowspan}}function J(r,n){if(!x(r))return!1;if(n){let i=j(r),s=r.tr;if(0==i.left&&i.right==i.map.width)return!1;for(let r=i.right-1;W(s,i,r),r!=i.left;r--){let r=i.tableStart?s.doc.nodeAt(i.tableStart-1):s.doc;if(!r)throw RangeError("No table found");i.table=r,i.map=p.get(r)}n(s)}return!0}function K(r,n,i){var s;let o=y(n.type.schema).header_cell;for(let l=0;l<r.width;l++)if((null==(s=n.nodeAt(r.map[l+i*r.width]))?void 0:s.type)!=o)return!1;return!0}function G(r,{map:n,tableStart:i,table:s},o){let l=i;for(let r=0;r<o;r++)l+=s.child(r).nodeSize;let a=[],u=o>0?-1:0;K(n,s,o+u)&&(u=0==o||o==n.height?null:0);for(let l=0,h=n.width*o;l<n.width;l++,h++)if(o>0&&o<n.height&&n.map[h]==n.map[h-n.width]){let o=n.map[h],a=s.nodeAt(o).attrs;r.setNodeMarkup(i+o,null,{...a,rowspan:a.rowspan+1}),l+=a.colspan-1}else{var c;let r=null==u?y(s.type.schema).cell:null==(c=s.nodeAt(n.map[h+u*n.width]))?void 0:c.type,i=null==r?void 0:r.createAndFill();i&&a.push(i)}return r.insert(l,y(s.type.schema).row.create(null,a)),r}function Z(r,n){if(!x(r))return!1;if(n){let i=j(r);n(G(r.tr,i,i.top))}return!0}function X(r,n){if(!x(r))return!1;if(n){let i=j(r);n(G(r.tr,i,i.bottom))}return!0}function Y(r,{map:n,table:i,tableStart:s},o){let l=0;for(let r=0;r<o;r++)l+=i.child(r).nodeSize;let a=l+i.child(o).nodeSize,u=r.mapping.maps.length;r.delete(l+s,a+s);let c=new Set;for(let l=0,a=o*n.width;l<n.width;l++,a++){let h=n.map[a];if(!c.has(h)){if(c.add(h),o>0&&h==n.map[a-n.width]){let n=i.nodeAt(h).attrs;r.setNodeMarkup(r.mapping.slice(u).map(h+s),null,{...n,rowspan:n.rowspan-1}),l+=n.colspan-1}else if(o<n.height&&h==n.map[a+n.width]){let a=i.nodeAt(h),c=a.attrs,d=a.type.create({...c,rowspan:a.attrs.rowspan-1},a.content),p=n.positionAt(o+1,l,i);r.insert(r.mapping.slice(u).map(s+p),d),l+=c.colspan-1}}}}function Q(r,n){if(!x(r))return!1;if(n){let i=j(r),s=r.tr;if(0==i.top&&i.bottom==i.map.height)return!1;for(let r=i.bottom-1;Y(s,i,r),r!=i.top;r--){let r=i.tableStart?s.doc.nodeAt(i.tableStart-1):s.doc;if(!r)throw RangeError("No table found");i.table=r,i.map=p.get(i.table)}n(s)}return!0}function ee(r){let n=r.content;return 1==n.childCount&&n.child(0).isTextblock&&0==n.child(0).childCount}function et({width:r,height:n,map:i},s){let o=s.top*r+s.left,l=o,a=(s.bottom-1)*r+s.left,u=o+(s.right-s.left-1);for(let n=s.top;n<s.bottom;n++){if(s.left>0&&i[l]==i[l-1]||s.right<r&&i[u]==i[u+1])return!0;l+=r,u+=r}for(let l=s.left;l<s.right;l++){if(s.top>0&&i[o]==i[o-r]||s.bottom<n&&i[a]==i[a+r])return!0;o++,a++}return!1}function er(r,n){let i=r.selection;if(!(i instanceof I)||i.$anchorCell.pos==i.$headCell.pos)return!1;let s=j(r),{map:o}=s;if(et(o,s))return!1;if(n){let i,l,a=r.tr,c={},h=u.FK.empty;for(let r=s.top;r<s.bottom;r++)for(let n=s.left;n<s.right;n++){let u=o.map[r*o.width+n],d=s.table.nodeAt(u);if(!c[u]&&d)if(c[u]=!0,null==i)i=u,l=d;else{ee(d)||(h=h.append(d.content));let r=a.mapping.map(u+s.tableStart);a.delete(r,r+d.nodeSize)}}if(null==i||null==l)return!0;if(a.setNodeMarkup(i+s.tableStart,null,{...D(l.attrs,l.attrs.colspan,s.right-s.left-l.attrs.colspan),rowspan:s.bottom-s.top}),h.size>0){let r=i+1+l.content.size,n=ee(l)?i+1:r;a.replaceWith(n+s.tableStart,r+s.tableStart,h)}a.setSelection(new I(a.doc.resolve(i+s.tableStart))),n(a)}return!0}function en(r,n){let i=y(r.schema);return ei(({node:r})=>i[r.type.spec.tableRole])(r,n)}function ei(r){return(n,i)=>{let s,o,l=n.selection;if(l instanceof I){if(l.$anchorCell.pos!=l.$headCell.pos)return!1;s=l.$anchorCell.nodeAfter,o=l.$anchorCell.pos}else{var a;if(!(s=w(l.$from)))return!1;o=null==(a=b(l.$from))?void 0:a.pos}if(null==s||null==o||1==s.attrs.colspan&&1==s.attrs.rowspan)return!1;if(i){let a,u=s.attrs,c=[],h=u.colwidth;u.rowspan>1&&(u={...u,rowspan:1}),u.colspan>1&&(u={...u,colspan:1});let d=j(n),p=n.tr;for(let r=0;r<d.right-d.left;r++)c.push(h?{...u,colwidth:h&&h[r]?[h[r]]:null}:u);for(let n=d.top;n<d.bottom;n++){let i=d.map.positionAt(n,d.left,d.table);n==d.top&&(i+=s.nodeSize);for(let o=d.left,l=0;o<d.right;o++,l++)(o!=d.left||n!=d.top)&&p.insert(a=p.mapping.map(i+d.tableStart,1),r({node:s,row:n,col:o}).createAndFill(c[l]))}p.setNodeMarkup(o,r({node:s,row:d.top,col:d.left}),c[0]),l instanceof I&&p.setSelection(new I(p.doc.resolve(l.$anchorCell.pos),a?p.doc.resolve(a):void 0)),i(p)}return!0}}function es(r,n){return function(i,s){if(!x(i))return!1;let o=v(i);if(o.nodeAfter.attrs[r]===n)return!1;if(s){let l=i.tr;i.selection instanceof I?i.selection.forEachCell((i,s)=>{i.attrs[r]!==n&&l.setNodeMarkup(s,null,{...i.attrs,[r]:n})}):l.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[r]:n}),s(l)}return!0}}function eo(r){return function(n,i){if(!x(n))return!1;if(i){let s=y(n.schema),o=j(n),l=n.tr,a=o.map.cellsInRect("column"==r?{left:o.left,top:0,right:o.right,bottom:o.map.height}:"row"==r?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),u=a.map(r=>o.table.nodeAt(r));for(let r=0;r<a.length;r++)u[r].type==s.header_cell&&l.setNodeMarkup(o.tableStart+a[r],s.cell,u[r].attrs);if(0===l.steps.length)for(let r=0;r<a.length;r++)l.setNodeMarkup(o.tableStart+a[r],s.header_cell,u[r].attrs);i(l)}return!0}}function el(r,n,i){let s=n.map.cellsInRect({left:0,top:0,right:"row"==r?n.map.width:1,bottom:"column"==r?n.map.height:1});for(let r=0;r<s.length;r++){let o=n.table.nodeAt(s[r]);if(o&&o.type!==i.header_cell)return!1}return!0}function ea(r,n){return(n=n||{useDeprecatedLogic:!1}).useDeprecatedLogic?eo(r):function(n,i){if(!x(n))return!1;if(i){let s=y(n.schema),o=j(n),l=n.tr,a=el("row",o,s),u=el("column",o,s),c=+("column"===r?!!a:"row"===r&&!!u),h="column"==r?{left:0,top:c,right:1,bottom:o.map.height}:"row"==r?{left:c,top:0,right:o.map.width,bottom:1}:o,d="column"==r?u?s.cell:s.header_cell:"row"==r?a?s.cell:s.header_cell:s.cell;o.map.cellsInRect(h).forEach(r=>{let n=r+o.tableStart,i=l.doc.nodeAt(n);i&&l.setNodeMarkup(n,d,i.attrs)}),i(l)}return!0}}ea("row",{useDeprecatedLogic:!0}),ea("column",{useDeprecatedLogic:!0});let eu=ea("cell",{useDeprecatedLogic:!0});function ec(r,n){if(n<0){let n=r.nodeBefore;if(n)return r.pos-n.nodeSize;for(let n=r.index(-1)-1,i=r.before();n>=0;n--){let s=r.node(-1).child(n),o=s.lastChild;if(o)return i-1-o.nodeSize;i-=s.nodeSize}}else{if(r.index()<r.parent.childCount-1)return r.pos+r.nodeAfter.nodeSize;let n=r.node(-1);for(let i=r.indexAfter(-1),s=r.after();i<n.childCount;i++){let r=n.child(i);if(r.childCount)return s+1;s+=r.nodeSize}}return null}function eh(r){return function(n,i){if(!x(n))return!1;let s=ec(v(n),r);if(null==s)return!1;if(i){let r=n.doc.resolve(s);i(n.tr.setSelection(a.U3.between(r,E(r))).scrollIntoView())}return!0}}function ed(r,n){let i=r.selection.$anchor;for(let s=i.depth;s>0;s--)if("table"==i.node(s).type.spec.tableRole)return n&&n(r.tr.delete(i.before(s),i.after(s)).scrollIntoView()),!0;return!1}function ep(r,n){let i=r.selection;if(!(i instanceof I))return!1;if(n){let s=r.tr,o=y(r.schema).cell.createAndFill().content;i.forEachCell((r,n)=>{r.content.eq(o)||s.replace(s.mapping.map(n+1),s.mapping.map(n+r.nodeSize-1),new u.Ji(o,0,0))}),s.docChanged&&n(s)}return!0}function ef(r){if(0===r.size)return null;let{content:n,openStart:i,openEnd:s}=r;for(;1==n.childCount&&(i>0&&s>0||"table"==n.child(0).type.spec.tableRole);)i--,s--,n=n.child(0).content;let o=n.child(0),l=o.type.spec.tableRole,a=o.type.schema,c=[];if("row"==l)for(let r=0;r<n.childCount;r++){let o=n.child(r).content,l=r?0:Math.max(0,i-1),h=r<n.childCount-1?0:Math.max(0,s-1);(l||h)&&(o=eg(y(a).row,new u.Ji(o,l,h)).content),c.push(o)}else{if("cell"!=l&&"header_cell"!=l)return null;c.push(i||s?eg(y(a).row,new u.Ji(n,i,s)).content:n)}return em(a,c)}function em(r,n){let i=[];for(let r=0;r<n.length;r++){let s=n[r];for(let n=s.childCount-1;n>=0;n--){let{rowspan:o,colspan:l}=s.child(n).attrs;for(let n=r;n<r+o;n++)i[n]=(i[n]||0)+l}}let s=0;for(let r=0;r<i.length;r++)s=Math.max(s,i[r]);for(let o=0;o<i.length;o++)if(o>=n.length&&n.push(u.FK.empty),i[o]<s){let l=y(r).cell.createAndFill(),a=[];for(let r=i[o];r<s;r++)a.push(l);n[o]=n[o].append(u.FK.from(a))}return{height:n.length,width:s,rows:n}}function eg(r,n){let i=r.createAndFill();return new d.dL(i).replace(0,i.content.size,n).doc}function e_({width:r,height:n,rows:i},s,o){if(r!=s){let n=[],o=[];for(let r=0;r<i.length;r++){let l=i[r],a=[];for(let i=n[r]||0,o=0;i<s;o++){let u=l.child(o%l.childCount);i+u.attrs.colspan>s&&(u=u.type.createChecked(T(u.attrs,u.attrs.colspan,i+u.attrs.colspan-s),u.content)),a.push(u),i+=u.attrs.colspan;for(let i=1;i<u.attrs.rowspan;i++)n[r+i]=(n[r+i]||0)+u.attrs.colspan}o.push(u.FK.from(a))}i=o,r=s}if(n!=o){let r=[];for(let s=0,l=0;s<o;s++,l++){let a=[],c=i[l%n];for(let r=0;r<c.childCount;r++){let n=c.child(r);s+n.attrs.rowspan>o&&(n=n.type.create({...n.attrs,rowspan:Math.max(1,o-n.attrs.rowspan)},n.content)),a.push(n)}r.push(u.FK.from(a))}i=r,n=o}return{width:r,height:n,rows:i}}function ey(r,n,i,s,o,l,a){let c,h,d=y(r.doc.type.schema);if(o>n.width)for(let l=0,u=0;l<n.height;l++){let p,f=i.child(l);u+=f.nodeSize;let m=[];p=null==f.lastChild||f.lastChild.type==d.cell?c||(c=d.cell.createAndFill()):h||(h=d.header_cell.createAndFill());for(let r=n.width;r<o;r++)m.push(p);r.insert(r.mapping.slice(a).map(u-1+s),m)}if(l>n.height){let p=[];for(let r=0,s=(n.height-1)*n.width;r<Math.max(n.width,o);r++){let o=!(r>=n.width)&&i.nodeAt(n.map[s+r]).type==d.header_cell;p.push(o?h||(h=d.header_cell.createAndFill()):c||(c=d.cell.createAndFill()))}let f=d.row.create(null,u.FK.from(p)),m=[];for(let r=n.height;r<l;r++)m.push(f);r.insert(r.mapping.slice(a).map(s+i.nodeSize-2),m)}return!!(c||h)}function ek(r,n,i,s,o,l,a,u){if(0==a||a==n.height)return!1;let c=!1;for(let h=o;h<l;h++){let o=a*n.width+h,l=n.map[o];if(n.map[o-n.width]==l){c=!0;let o=i.nodeAt(l),{top:d,left:p}=n.findCell(l);r.setNodeMarkup(r.mapping.slice(u).map(l+s),null,{...o.attrs,rowspan:a-d}),r.insert(r.mapping.slice(u).map(n.positionAt(a,p,i)),o.type.createAndFill({...o.attrs,rowspan:d+o.attrs.rowspan-a})),h+=o.attrs.colspan-1}}return c}function eb(r,n,i,s,o,l,a,u){if(0==a||a==n.width)return!1;let c=!1;for(let h=o;h<l;h++){let o=h*n.width+a,l=n.map[o];if(n.map[o-1]==l){c=!0;let o=i.nodeAt(l),d=n.colCount(l),p=r.mapping.slice(u).map(l+s);r.setNodeMarkup(p,null,T(o.attrs,a-d,o.attrs.colspan-(a-d))),r.insert(p+o.nodeSize,o.type.createAndFill(T(o.attrs,0,a-d))),h+=o.attrs.rowspan-1}}return c}function ew(r,n,i,s,o){let l=i?r.doc.nodeAt(i-1):r.doc;if(!l)throw Error("No table found");let a=p.get(l),{top:c,left:h}=s,d=h+o.width,f=c+o.height,m=r.tr,g=0;function _(){if(!(l=i?m.doc.nodeAt(i-1):m.doc))throw Error("No table found");a=p.get(l),g=m.mapping.maps.length}ey(m,a,l,i,d,f,0)&&_(),ek(m,a,l,i,h,d,c,g)&&_(),ek(m,a,l,i,h,d,f,g)&&_(),eb(m,a,l,i,c,f,h,g)&&_(),eb(m,a,l,i,c,f,d,g)&&_();for(let r=c;r<f;r++){let n=a.positionAt(r,h,l),s=a.positionAt(r,d,l);m.replace(m.mapping.slice(g).map(n+i),m.mapping.slice(g).map(s+i),new u.Ji(o.rows[r-c],0,0))}_(),m.setSelection(new I(m.doc.resolve(i+a.positionAt(c,h,l)),m.doc.resolve(i+a.positionAt(f-1,d-1,l)))),n(m)}let ex=(0,h.K)({ArrowLeft:eC("horiz",-1),ArrowRight:eC("horiz",1),ArrowUp:eC("vert",-1),ArrowDown:eC("vert",1),"Shift-ArrowLeft":eA("horiz",-1),"Shift-ArrowRight":eA("horiz",1),"Shift-ArrowUp":eA("vert",-1),"Shift-ArrowDown":eA("vert",1),Backspace:ep,"Mod-Backspace":ep,Delete:ep,"Mod-Delete":ep});function ev(r,n,i){return!i.eq(r.selection)&&(n&&n(r.tr.setSelection(i).scrollIntoView()),!0)}function eC(r,n){return(i,s,o)=>{if(!o)return!1;let l=i.selection;if(l instanceof I)return ev(i,s,a.LN.near(l.$headCell,n));if("horiz"!=r&&!l.empty)return!1;let u=eT(o,r,n);if(null==u)return!1;if("horiz"==r)return ev(i,s,a.LN.near(i.doc.resolve(l.head+n),n));{let o,l=i.doc.resolve(u),c=M(l,r,n);return o=c?a.LN.near(c,1):n<0?a.LN.near(i.doc.resolve(l.before(-1)),-1):a.LN.near(i.doc.resolve(l.after(-1)),1),ev(i,s,o)}}}function eA(r,n){return(i,s,o)=>{let l;if(!o)return!1;let a=i.selection;if(a instanceof I)l=a;else{let s=eT(o,r,n);if(null==s)return!1;l=new I(i.doc.resolve(s))}let u=M(l.$headCell,r,n);return!!u&&ev(i,s,new I(l.$anchorCell,u))}}function eE(r,n){let i=b(r.state.doc.resolve(n));return!!i&&(r.dispatch(r.state.tr.setSelection(new I(i))),!0)}function eS(r,n,i){if(!x(r.state))return!1;let s=ef(i),o=r.state.selection;if(o instanceof I){s||(s={width:1,height:1,rows:[u.FK.from(eg(y(r.state.schema).cell,i))]});let n=o.$anchorCell.node(-1),l=o.$anchorCell.start(-1),a=p.get(n).rectBetween(o.$anchorCell.pos-l,o.$headCell.pos-l);return s=e_(s,a.right-a.left,a.bottom-a.top),ew(r.state,r.dispatch,l,a,s),!0}if(!s)return!1;{let n=v(r.state),i=n.start(-1);return ew(r.state,r.dispatch,i,p.get(n.node(-1)).findCell(n.pos-i),s),!0}}function eM(r,n){var i;let s;if(0!=n.button||n.ctrlKey||n.metaKey)return;let o=eD(r,n.target);if(n.shiftKey&&r.state.selection instanceof I)l(r.state.selection.$anchorCell,n),n.preventDefault();else if(n.shiftKey&&o&&null!=(s=b(r.state.selection.$anchor))&&(null==(i=eF(r,n))?void 0:i.pos)!=s.pos)l(s,n),n.preventDefault();else if(!o)return;function l(n,i){let s=eF(r,i),o=null==k.getState(r.state);if(!s||!S(n,s))if(!o)return;else s=n;let l=new I(n,s);if(o||!r.state.selection.eq(l)){let i=r.state.tr.setSelection(l);o&&i.setMeta(k,n.pos),r.dispatch(i)}}function a(){r.root.removeEventListener("mouseup",a),r.root.removeEventListener("dragstart",a),r.root.removeEventListener("mousemove",u),null!=k.getState(r.state)&&r.dispatch(r.state.tr.setMeta(k,-1))}function u(i){let s,u=i,c=k.getState(r.state);if(null!=c)s=r.state.doc.resolve(c);else if(eD(r,u.target)!=o&&!(s=eF(r,n)))return a();s&&l(s,u)}r.root.addEventListener("mouseup",a),r.root.addEventListener("dragstart",a),r.root.addEventListener("mousemove",u)}function eT(r,n,i){if(!(r.state.selection instanceof a.U3))return null;let{$head:s}=r.state.selection;for(let o=s.depth-1;o>=0;o--){let l=s.node(o);if((i<0?s.index(o):s.indexAfter(o))!=(i<0?0:l.childCount))break;if("cell"==l.type.spec.tableRole||"header_cell"==l.type.spec.tableRole){let l=s.before(o),a="vert"==n?i>0?"down":"up":i>0?"right":"left";return r.endOfTextblock(a)?l:null}}return null}function eD(r,n){for(;n&&n!=r.dom;n=n.parentNode)if("TD"==n.nodeName||"TH"==n.nodeName)return n;return null}function eF(r,n){let i=r.posAtCoords({left:n.clientX,top:n.clientY});if(!i)return null;let{inside:s,pos:o}=i;return s>=0&&b(r.state.doc.resolve(s))||b(r.state.doc.resolve(o))}var eI=class{constructor(r,n){this.node=r,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),eL(r,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(r){return r.type==this.node.type&&(this.node=r,eL(r,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(r){return"attributes"==r.type&&(r.target==this.table||this.colgroup.contains(r.target))}};function eL(r,n,i,s,o,l){let a=0,u=!0,c=n.firstChild,h=r.firstChild;if(h){for(let r=0,i=0;r<h.childCount;r++){let{colspan:d,colwidth:p}=h.child(r).attrs;for(let r=0;r<d;r++,i++){let h=o==i?l:p&&p[r],d=h?h+"px":"";if(a+=h||s,h||(u=!1),c)c.style.width!=d&&(c.style.width=d),c=c.nextSibling;else{let r=document.createElement("col");r.style.width=d,n.appendChild(r)}}}for(;c;){var d;let r=c.nextSibling;null==(d=c.parentNode)||d.removeChild(c),c=r}u?(i.style.width=a+"px",i.style.minWidth=""):(i.style.width="",i.style.minWidth=a+"px")}}let eR=new a.hs("tableColumnResizing");function eN({handleWidth:r=5,cellMinWidth:n=25,defaultCellMinWidth:i=100,View:s=eI,lastColumnResizable:o=!0}={}){let l=new a.k_({key:eR,state:{init(r,n){var o;let a=null==(o=l.spec)||null==(o=o.props)?void 0:o.nodeViews,u=y(n.schema).table.name;return s&&a&&(a[u]=(r,n)=>new s(r,i,n)),new eO(-1,!1)},apply:(r,n)=>n.apply(r)},props:{attributes:r=>{let n=eR.getState(r);return n&&n.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(n,i)=>{ez(n,i,r,o)},mouseleave:r=>{eP(r)},mousedown:(r,s)=>{e$(r,s,n,i)}},decorations:r=>{let n=eR.getState(r);if(n&&n.activeHandle>-1)return eK(r,n.activeHandle)},nodeViews:{}}});return l}var eO=class r{constructor(r,n){this.activeHandle=r,this.dragging=n}apply(n){let i=this,s=n.getMeta(eR);if(s&&null!=s.setHandle)return new r(s.setHandle,!1);if(s&&void 0!==s.setDragging)return new r(i.activeHandle,s.setDragging);if(i.activeHandle>-1&&n.docChanged){let s=n.mapping.map(i.activeHandle,-1);return A(n.doc.resolve(s))||(s=-1),new r(s,i.dragging)}return i}};function ez(r,n,i,s){if(!r.editable)return;let o=eR.getState(r.state);if(o&&!o.dragging){let l=eq(n.target),a=-1;if(l){let{left:s,right:o}=l.getBoundingClientRect();n.clientX-s<=i?a=ej(r,n,"left",i):o-n.clientX<=i&&(a=ej(r,n,"right",i))}if(a!=o.activeHandle){if(!s&&-1!==a){let n=r.state.doc.resolve(a),i=n.node(-1),s=p.get(i),o=n.start(-1);if(s.colCount(n.pos-o)+n.nodeAfter.attrs.colspan-1==s.width-1)return}eV(r,a)}}}function eP(r){if(!r.editable)return;let n=eR.getState(r.state);n&&n.activeHandle>-1&&!n.dragging&&eV(r,-1)}function e$(r,n,i,s){var o;if(!r.editable)return!1;let l=null!=(o=r.dom.ownerDocument.defaultView)?o:window,a=eR.getState(r.state);if(!a||-1==a.activeHandle||a.dragging)return!1;let u=r.state.doc.nodeAt(a.activeHandle),c=eB(r,a.activeHandle,u.attrs);function h(n){l.removeEventListener("mouseup",h),l.removeEventListener("mousemove",d);let s=eR.getState(r.state);(null==s?void 0:s.dragging)&&(eU(r,s.activeHandle,eH(s.dragging,n,i)),r.dispatch(r.state.tr.setMeta(eR,{setDragging:null})))}function d(n){if(!n.which)return h(n);let o=eR.getState(r.state);if(o&&o.dragging){let l=eH(o.dragging,n,i);eW(r,o.activeHandle,l,s)}}return r.dispatch(r.state.tr.setMeta(eR,{setDragging:{startX:n.clientX,startWidth:c}})),eW(r,a.activeHandle,c,s),l.addEventListener("mouseup",h),l.addEventListener("mousemove",d),n.preventDefault(),!0}function eB(r,n,{colspan:i,colwidth:s}){let o=s&&s[s.length-1];if(o)return o;let l=r.domAtPos(n),a=l.node.childNodes[l.offset].offsetWidth,u=i;if(s)for(let r=0;r<i;r++)s[r]&&(a-=s[r],u--);return a/u}function eq(r){for(;r&&"TD"!=r.nodeName&&"TH"!=r.nodeName;)r=r.classList&&r.classList.contains("ProseMirror")?null:r.parentNode;return r}function ej(r,n,i,s){let o="right"==i?-s:s,l=r.posAtCoords({left:n.clientX+o,top:n.clientY});if(!l)return -1;let{pos:a}=l,u=b(r.state.doc.resolve(a));if(!u)return -1;if("right"==i)return u.pos;let c=p.get(u.node(-1)),h=u.start(-1),d=c.map.indexOf(u.pos-h);return d%c.width==0?-1:h+c.map[d-1]}function eH(r,n,i){let s=n.clientX-r.startX;return Math.max(i,r.startWidth+s)}function eV(r,n){r.dispatch(r.state.tr.setMeta(eR,{setHandle:n}))}function eU(r,n,i){let s=r.state.doc.resolve(n),o=s.node(-1),l=p.get(o),a=s.start(-1),u=l.colCount(s.pos-a)+s.nodeAfter.attrs.colspan-1,c=r.state.tr;for(let r=0;r<l.height;r++){let n=r*l.width+u;if(r&&l.map[n]==l.map[n-l.width])continue;let s=l.map[n],h=o.nodeAt(s).attrs,d=1==h.colspan?0:u-l.colCount(s);if(h.colwidth&&h.colwidth[d]==i)continue;let p=h.colwidth?h.colwidth.slice():eJ(h.colspan);p[d]=i,c.setNodeMarkup(a+s,null,{...h,colwidth:p})}c.docChanged&&r.dispatch(c)}function eW(r,n,i,s){let o=r.state.doc.resolve(n),l=o.node(-1),a=o.start(-1),u=p.get(l).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1,c=r.domAtPos(o.start(-1)).node;for(;c&&"TABLE"!=c.nodeName;)c=c.parentNode;c&&eL(l,c.firstChild,c,s,u,i)}function eJ(r){return Array(r).fill(0)}function eK(r,n){let i=[],s=r.doc.resolve(n),o=s.node(-1);if(!o)return c.zF.empty;let l=p.get(o),a=s.start(-1),u=l.colCount(s.pos-a)+s.nodeAfter.attrs.colspan-1;for(let n=0;n<l.height;n++){let s=u+n*l.width;if((u==l.width-1||l.map[s]!=l.map[s+1])&&(0==n||l.map[s]!=l.map[s-l.width])){var h;let n=l.map[s],u=a+n+o.nodeAt(n).nodeSize-1,d=document.createElement("div");d.className="column-resize-handle",(null==(h=eR.getState(r))?void 0:h.dragging)&&i.push(c.NZ.node(a+n,a+n+o.nodeAt(n).nodeSize,{class:"column-resize-dragging"})),i.push(c.NZ.widget(u,d))}}return c.zF.create(r.doc,i)}function eG({allowTableNodeSelection:r=!1}={}){return new a.k_({key:k,state:{init:()=>null,apply(r,n){let i=r.getMeta(k);if(null!=i)return -1==i?null:i;if(null==n||!r.docChanged)return n;let{deleted:s,pos:o}=r.mapping.mapResult(n);return s?null:o}},props:{decorations:R,handleDOMEvents:{mousedown:eM},createSelectionBetween:r=>null!=k.getState(r.state)?r.state.selection:null,handleTripleClick:eE,handleKeyDown:ex,handlePaste:eS},appendTransaction:(n,i,s)=>z(s,B(s,i),r)})}function eZ(r){return"left"===r||"right"===r||"center"===r?r:null}function eX(r){let n=(r.style.textAlign||"").trim().toLowerCase(),i=(r.getAttribute("align")||"").trim().toLowerCase();return eZ(n||i)}function eY(r){return eZ(null==r?void 0:r.align)}function eQ(){return{default:null,parseHTML:r=>eX(r),renderHTML:r=>r.align?{style:`text-align: ${r.align}`}:{}}}var e0=l.bP.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:r=>{var n,i;let s=r.getAttribute("colwidth"),o=s?s.split(",").map(r=>parseInt(r,10)):null;if(!o){let s=null==(n=r.closest("table"))?void 0:n.querySelectorAll("colgroup > col"),o=Array.from((null==(i=r.parentElement)?void 0:i.children)||[]).indexOf(r);if(o&&o>-1&&s&&s[o]){let r=s[o].getAttribute("width");return r?[parseInt(r,10)]:null}}return o}},align:eQ()}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:r}){return["td",(0,l.KV)(this.options.HTMLAttributes,r),0]}}),e1=l.bP.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:r=>{let n=r.getAttribute("colwidth");return n?n.split(",").map(r=>parseInt(r,10)):null}},align:eQ()}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:r}){return["th",(0,l.KV)(this.options.HTMLAttributes,r),0]}}),e2=l.bP.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:r}){return["tr",(0,l.KV)(this.options.HTMLAttributes,r),0]}});function e3(r,n){return n?["width",`${Math.max(n,r)}px`]:["min-width",`${r}px`]}function e5(r,n,i,s,o,l){var a;let u=0,c=!0,h=n.firstChild,d=r.firstChild;if(null!==d)for(let r=0,i=0;r<d.childCount;r+=1){let{colspan:a,colwidth:p}=d.child(r).attrs;for(let r=0;r<a;r+=1,i+=1){let a=o===i?l:p&&p[r],d=a?`${a}px`:"";if(u+=a||s,a||(c=!1),h){if(h.style.width!==d){let[r,n]=e3(s,a);h.style.setProperty(r,n)}h=h.nextSibling}else{let r=document.createElement("col"),[i,o]=e3(s,a);r.style.setProperty(i,o),n.appendChild(r)}}}for(;h;){let r=h.nextSibling;null==(a=h.parentNode)||a.removeChild(h),h=r}let p=r.attrs.style&&"string"==typeof r.attrs.style&&/\bwidth\s*:/i.test(r.attrs.style);c&&!p?(i.style.width=`${u}px`,i.style.minWidth=""):(i.style.width="",i.style.minWidth=`${u}px`)}var e4=class{constructor(r,n){this.node=r,this.cellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),r.attrs.style&&(this.table.style.cssText=r.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),e5(r,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(r){return r.type===this.node.type&&(this.node=r,e5(r,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(r){let n=r.target,i=this.dom.contains(n),s=this.contentDOM.contains(n);return!!i&&!s&&("attributes"===r.type||"childList"===r.type||"characterData"===r.type)}};function e6(r,n,i,s){let o=0,l=!0,a=[],u=r.firstChild;if(!u)return{};for(let r=0,c=0;r<u.childCount;r+=1){let{colspan:h,colwidth:d}=u.child(r).attrs;for(let r=0;r<h;r+=1,c+=1){let u=i===c?s:d&&d[r];o+=u||n,u||(l=!1);let[h,p]=e3(n,u);a.push(["col",{style:`${h}: ${p}`}])}}return{colgroup:["colgroup",{},...a],tableWidth:l?`${o}px`:"",tableMinWidth:l?"":`${o}px`}}function e8(r,n){return n?r.createChecked(null,n):r.createAndFill()}function e9(r){if(r.cached.tableNodeTypes)return r.cached.tableNodeTypes;let n={};return Object.keys(r.nodes).forEach(i=>{let s=r.nodes[i];s.spec.tableRole&&(n[s.spec.tableRole]=s)}),r.cached.tableNodeTypes=n,n}function e7(r,n,i,s,o){let l=e9(r),a=[],u=[];for(let r=0;r<i;r+=1){let r=e8(l.cell,o);if(r&&u.push(r),s){let r=e8(l.header_cell,o);r&&a.push(r)}}let c=[];for(let r=0;r<n;r+=1)c.push(l.row.createChecked(null,s&&0===r?a:u));return l.table.createChecked(null,c)}function te(r){return r instanceof I}var tt=({editor:r})=>{let{selection:n}=r.state;if(!te(n))return!1;let i=0,s=(0,l.eL)(n.ranges[0].$from,r=>"table"===r.type.name);return null==s||s.node.descendants(r=>{if("table"===r.type.name)return!1;["tableCell","tableHeader"].includes(r.type.name)&&(i+=1)}),i===n.ranges.length&&(r.commands.deleteTable(),!0)},tr="\x1f";function tn(r){return(r||"").replace(/\s+/g," ").trim()}var ti=function(r,n,i={}){var s;let o=null!=(s=i.cellLineSeparator)?s:tr;if(!r||!r.content||0===r.content.length)return"";let l=[];r.content.forEach(r=>{let i=[];r.content&&r.content.forEach(r=>{let s="",l=tn(s=r.content&&Array.isArray(r.content)&&r.content.length>1?r.content.map(r=>n.renderChildren(r)).join(o):r.content?n.renderChildren(r.content):""),a="tableHeader"===r.type,u=eY(r.attrs);i.push({text:l,isHeader:a,align:u})}),l.push(i)});let a=l.reduce((r,n)=>Math.max(r,n.length),0);if(0===a)return"";let u=Array(a).fill(0);l.forEach(r=>{var n;for(let i=0;i<a;i+=1){let s=((null==(n=r[i])?void 0:n.text)||"").length;s>u[i]&&(u[i]=s),u[i]<3&&(u[i]=3)}});let c=(r,n)=>r+" ".repeat(Math.max(0,n-r.length)),h=l[0],d=h.some(r=>r.isHeader),p=Array(a).fill(null);l.forEach(r=>{var n;for(let i=0;i<a;i+=1)!p[i]&&(null==(n=r[i])?void 0:n.align)&&(p[i]=r[i].align)});let f="\n",m=Array(a).fill(0).map((r,n)=>d&&h[n]&&h[n].text||"");return f+=`| ${m.map((r,n)=>c(r,u[n])).join(" | ")} |
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4210],{5989:(r,n,i)=>{"use strict";let s,o;i.d(n,{XI:()=>ts,nA:()=>e0,A0:()=>e1,Hj:()=>e2});var l=i(82159),a=i(76865),u=i(27050),c=i(63197),h=i(12894),d=i(8242);if("u">typeof WeakMap){let r=new WeakMap;s=n=>r.get(n),o=(n,i)=>(r.set(n,i),i)}else{let r=[],n=10,i=0;s=n=>{for(let i=0;i<r.length;i+=2)if(r[i]==n)return r[i+1]},o=(s,o)=>(i==n&&(i=0),r[i++]=s,r[i++]=o)}var p=class{constructor(r,n,i,s){this.width=r,this.height=n,this.map=i,this.problems=s}findCell(r){for(let n=0;n<this.map.length;n++){let i=this.map[n];if(i!=r)continue;let s=n%this.width,o=n/this.width|0,l=s+1,a=o+1;for(let r=1;l<this.width&&this.map[n+r]==i;r++)l++;for(let r=1;a<this.height&&this.map[n+this.width*r]==i;r++)a++;return{left:s,top:o,right:l,bottom:a}}throw RangeError(`No cell with offset ${r} found`)}colCount(r){for(let n=0;n<this.map.length;n++)if(this.map[n]==r)return n%this.width;throw RangeError(`No cell with offset ${r} found`)}nextCell(r,n,i){let{left:s,right:o,top:l,bottom:a}=this.findCell(r);return"horiz"==n?(i<0?0==s:o==this.width)?null:this.map[l*this.width+(i<0?s-1:o)]:(i<0?0==l:a==this.height)?null:this.map[s+this.width*(i<0?l-1:a)]}rectBetween(r,n){let{left:i,right:s,top:o,bottom:l}=this.findCell(r),{left:a,right:u,top:c,bottom:h}=this.findCell(n);return{left:Math.min(i,a),top:Math.min(o,c),right:Math.max(s,u),bottom:Math.max(l,h)}}cellsInRect(r){let n=[],i={};for(let s=r.top;s<r.bottom;s++)for(let o=r.left;o<r.right;o++){let l=s*this.width+o,a=this.map[l];!i[a]&&(i[a]=!0,o==r.left&&o&&this.map[l-1]==a||s==r.top&&s&&this.map[l-this.width]==a||n.push(a))}return n}positionAt(r,n,i){for(let s=0,o=0;;s++){let l=o+i.child(s).nodeSize;if(s==r){let i=n+r*this.width,s=(r+1)*this.width;for(;i<s&&this.map[i]<o;)i++;return i==s?l-1:this.map[i]}o=l}}static get(r){return s(r)||o(r,f(r))}};function f(r){if("table"!=r.type.spec.tableRole)throw RangeError("Not a table node: "+r.type.name);let n=m(r),i=r.childCount,s=[],o=0,l=null,a=[];for(let r=0,o=n*i;r<o;r++)s[r]=0;for(let u=0,c=0;u<i;u++){let h=r.child(u);c++;for(let r=0;;r++){for(;o<s.length&&0!=s[o];)o++;if(r==h.childCount)break;let d=h.child(r),{colspan:p,rowspan:f,colwidth:m}=d.attrs;for(let r=0;r<f;r++){if(r+u>=i){(l||(l=[])).push({type:"overlong_rowspan",pos:c,n:f-r});break}let h=o+r*n;for(let r=0;r<p;r++){0==s[h+r]?s[h+r]=c:(l||(l=[])).push({type:"collision",row:u,pos:c,n:p-r});let i=m&&m[r];if(i){let s=(h+r)%n*2,o=a[s];null==o||o!=i&&1==a[s+1]?(a[s]=i,a[s+1]=1):o==i&&a[s+1]++}}}o+=p,c+=d.nodeSize}let d=(u+1)*n,p=0;for(;o<d;)0==s[o++]&&p++;p&&(l||(l=[])).push({type:"missing",row:u,n:p}),c++}(0===n||0===i)&&(l||(l=[])).push({type:"zero_sized"});let u=new p(n,i,s,l),c=!1;for(let r=0;!c&&r<a.length;r+=2)null!=a[r]&&a[r+1]<i&&(c=!0);return c&&g(u,a,r),u}function m(r){let n=-1,i=!1;for(let s=0;s<r.childCount;s++){let o=r.child(s),l=0;if(i)for(let n=0;n<s;n++){let i=r.child(n);for(let r=0;r<i.childCount;r++){let o=i.child(r);n+o.attrs.rowspan>s&&(l+=o.attrs.colspan)}}for(let r=0;r<o.childCount;r++){let n=o.child(r);l+=n.attrs.colspan,n.attrs.rowspan>1&&(i=!0)}-1==n?n=l:n!=l&&(n=Math.max(n,l))}return n}function g(r,n,i){r.problems||(r.problems=[]);let s={};for(let o=0;o<r.map.length;o++){let l=r.map[o];if(s[l])continue;s[l]=!0;let a=i.nodeAt(l);if(!a)throw RangeError(`No cell with offset ${l} found`);let u=null,c=a.attrs;for(let i=0;i<c.colspan;i++){let s=n[(o+i)%r.width*2];null==s||c.colwidth&&c.colwidth[i]==s||((u||(u=_(c)))[i]=s)}u&&r.problems.unshift({type:"colwidth mismatch",pos:l,colwidth:u})}}function _(r){if(r.colwidth)return r.colwidth.slice();let n=[];for(let i=0;i<r.colspan;i++)n.push(0);return n}function y(r){let n=r.cached.tableNodeTypes;if(!n)for(let i in n=r.cached.tableNodeTypes={},r.nodes){let s=r.nodes[i],o=s.spec.tableRole;o&&(n[o]=s)}return n}let k=new a.hs("selectingCells");function b(r){for(let n=r.depth-1;n>0;n--)if("row"==r.node(n).type.spec.tableRole)return r.node(0).resolve(r.before(n+1));return null}function w(r){for(let n=r.depth;n>0;n--){let i=r.node(n).type.spec.tableRole;if("cell"===i||"header_cell"===i)return r.node(n)}return null}function x(r){let n=r.selection.$head;for(let r=n.depth;r>0;r--)if("row"==n.node(r).type.spec.tableRole)return!0;return!1}function v(r){let n=r.selection;if("$anchorCell"in n&&n.$anchorCell)return n.$anchorCell.pos>n.$headCell.pos?n.$anchorCell:n.$headCell;if("node"in n&&n.node&&"cell"==n.node.type.spec.tableRole)return n.$anchor;let i=b(n.$head)||C(n.$head);if(i)return i;throw RangeError(`No cell found around position ${n.head}`)}function C(r){for(let n=r.nodeAfter,i=r.pos;n;n=n.firstChild,i++){let s=n.type.spec.tableRole;if("cell"==s||"header_cell"==s)return r.doc.resolve(i)}for(let n=r.nodeBefore,i=r.pos;n;n=n.lastChild,i--){let s=n.type.spec.tableRole;if("cell"==s||"header_cell"==s)return r.doc.resolve(i-n.nodeSize)}}function A(r){return"row"==r.parent.type.spec.tableRole&&!!r.nodeAfter}function E(r){return r.node(0).resolve(r.pos+r.nodeAfter.nodeSize)}function S(r,n){return r.depth==n.depth&&r.pos>=n.start(-1)&&r.pos<=n.end(-1)}function M(r,n,i){let s=r.node(-1),o=p.get(s),l=r.start(-1),a=o.nextCell(r.pos-l,n,i);return null==a?null:r.node(0).resolve(l+a)}function T(r,n,i=1){let s={...r,colspan:r.colspan-i};return s.colwidth&&(s.colwidth=s.colwidth.slice(),s.colwidth.splice(n,i),s.colwidth.some(r=>r>0)||(s.colwidth=null)),s}function D(r,n,i=1){let s={...r,colspan:r.colspan+i};if(s.colwidth){s.colwidth=s.colwidth.slice();for(let r=0;r<i;r++)s.colwidth.splice(n,0,0)}return s}function F(r,n,i){let s=y(n.type.schema).header_cell;for(let o=0;o<r.height;o++)if(n.nodeAt(r.map[i+o*r.width]).type!=s)return!1;return!0}var I=class r extends a.LN{constructor(r,n=r){const i=r.node(-1),s=p.get(i),o=r.start(-1),l=s.rectBetween(r.pos-o,n.pos-o),u=r.node(0),c=s.cellsInRect(l).filter(r=>r!=n.pos-o);c.unshift(n.pos-o);const h=c.map(r=>{let n=i.nodeAt(r);if(!n)throw RangeError(`No cell with offset ${r} found`);let s=o+r+1;return new a.yn(u.resolve(s),u.resolve(s+n.content.size))});super(h[0].$from,h[0].$to,h),this.$anchorCell=r,this.$headCell=n}map(n,i){let s=n.resolve(i.map(this.$anchorCell.pos)),o=n.resolve(i.map(this.$headCell.pos));if(A(s)&&A(o)&&S(s,o)){let n=this.$anchorCell.node(-1)!=s.node(-1);return n&&this.isRowSelection()?r.rowSelection(s,o):n&&this.isColSelection()?r.colSelection(s,o):new r(s,o)}return a.U3.between(s,o)}content(){let r=this.$anchorCell.node(-1),n=p.get(r),i=this.$anchorCell.start(-1),s=n.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i),o={},l=[];for(let i=s.top;i<s.bottom;i++){let a=[];for(let l=i*n.width+s.left,u=s.left;u<s.right;u++,l++){let i=n.map[l];if(o[i])continue;o[i]=!0;let u=n.findCell(i),c=r.nodeAt(i);if(!c)throw RangeError(`No cell with offset ${i} found`);let h=s.left-u.left,d=u.right-s.right;if(h>0||d>0){let r=c.attrs;if(h>0&&(r=T(r,0,h)),d>0&&(r=T(r,r.colspan-d,d)),u.left<s.left){if(!(c=c.type.createAndFill(r)))throw RangeError(`Could not create cell with attrs ${JSON.stringify(r)}`)}else c=c.type.create(r,c.content)}if(u.top<s.top||u.bottom>s.bottom){let r={...c.attrs,rowspan:Math.min(u.bottom,s.bottom)-Math.max(u.top,s.top)};c=u.top<s.top?c.type.createAndFill(r):c.type.create(r,c.content)}a.push(c)}l.push(r.child(i).copy(u.FK.from(a)))}let a=this.isColSelection()&&this.isRowSelection()?r:l;return new u.Ji(u.FK.from(a),1,1)}replace(r,n=u.Ji.empty){let i=r.steps.length,s=this.ranges;for(let o=0;o<s.length;o++){let{$from:l,$to:a}=s[o],c=r.mapping.slice(i);r.replace(c.map(l.pos),c.map(a.pos),o?u.Ji.empty:n)}let o=a.LN.findFrom(r.doc.resolve(r.mapping.slice(i).map(this.to)),-1);o&&r.setSelection(o)}replaceWith(r,n){this.replace(r,new u.Ji(u.FK.from(n),0,0))}forEachCell(r){let n=this.$anchorCell.node(-1),i=p.get(n),s=this.$anchorCell.start(-1),o=i.cellsInRect(i.rectBetween(this.$anchorCell.pos-s,this.$headCell.pos-s));for(let i=0;i<o.length;i++)r(n.nodeAt(o[i]),s+o[i])}isColSelection(){let r=this.$anchorCell.index(-1),n=this.$headCell.index(-1);return!(Math.min(r,n)>0)&&Math.max(r+this.$anchorCell.nodeAfter.attrs.rowspan,n+this.$headCell.nodeAfter.attrs.rowspan)==this.$headCell.node(-1).childCount}static colSelection(n,i=n){let s=n.node(-1),o=p.get(s),l=n.start(-1),a=o.findCell(n.pos-l),u=o.findCell(i.pos-l),c=n.node(0);return a.top<=u.top?(a.top>0&&(n=c.resolve(l+o.map[a.left])),u.bottom<o.height&&(i=c.resolve(l+o.map[o.width*(o.height-1)+u.right-1]))):(u.top>0&&(i=c.resolve(l+o.map[u.left])),a.bottom<o.height&&(n=c.resolve(l+o.map[o.width*(o.height-1)+a.right-1]))),new r(n,i)}isRowSelection(){let r=this.$anchorCell.node(-1),n=p.get(r),i=this.$anchorCell.start(-1),s=n.colCount(this.$anchorCell.pos-i),o=n.colCount(this.$headCell.pos-i);return!(Math.min(s,o)>0)&&Math.max(s+this.$anchorCell.nodeAfter.attrs.colspan,o+this.$headCell.nodeAfter.attrs.colspan)==n.width}eq(n){return n instanceof r&&n.$anchorCell.pos==this.$anchorCell.pos&&n.$headCell.pos==this.$headCell.pos}static rowSelection(n,i=n){let s=n.node(-1),o=p.get(s),l=n.start(-1),a=o.findCell(n.pos-l),u=o.findCell(i.pos-l),c=n.node(0);return a.left<=u.left?(a.left>0&&(n=c.resolve(l+o.map[a.top*o.width])),u.right<o.width&&(i=c.resolve(l+o.map[o.width*(u.top+1)-1]))):(u.left>0&&(i=c.resolve(l+o.map[u.top*o.width])),a.right<o.width&&(n=c.resolve(l+o.map[o.width*(a.top+1)-1]))),new r(n,i)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(n,i){return new r(n.resolve(i.anchor),n.resolve(i.head))}static create(n,i,s=i){return new r(n.resolve(i),n.resolve(s))}getBookmark(){return new L(this.$anchorCell.pos,this.$headCell.pos)}};I.prototype.visible=!1,a.LN.jsonID("cell",I);var L=class r{constructor(r,n){this.anchor=r,this.head=n}map(n){return new r(n.map(this.anchor),n.map(this.head))}resolve(r){let n=r.resolve(this.anchor),i=r.resolve(this.head);return"row"==n.parent.type.spec.tableRole&&"row"==i.parent.type.spec.tableRole&&n.index()<n.parent.childCount&&i.index()<i.parent.childCount&&S(n,i)?new I(n,i):a.LN.near(i,1)}};function R(r){if(!(r.selection instanceof I))return null;let n=[];return r.selection.forEachCell((r,i)=>{n.push(c.NZ.node(i,i+r.nodeSize,{class:"selectedCell"}))}),c.zF.create(r.doc,n)}function N({$from:r,$to:n}){if(r.pos==n.pos||r.pos<n.pos-6)return!1;let i=r.pos,s=n.pos,o=r.depth;for(;o>=0&&!(r.after(o+1)<r.end(o));o--,i++);for(let r=n.depth;r>=0&&!(n.before(r+1)>n.start(r));r--,s--);return i==s&&/row|table/.test(r.node(o).type.spec.tableRole)}function O({$from:r,$to:n}){let i,s;for(let n=r.depth;n>0;n--){let s=r.node(n);if("cell"===s.type.spec.tableRole||"header_cell"===s.type.spec.tableRole){i=s;break}}for(let r=n.depth;r>0;r--){let i=n.node(r);if("cell"===i.type.spec.tableRole||"header_cell"===i.type.spec.tableRole){s=i;break}}return i!==s&&0===n.parentOffset}function z(r,n,i){let s,o,l=(n||r).selection,u=(n||r).doc;if(l instanceof a.nh&&(o=l.node.type.spec.tableRole)){if("cell"==o||"header_cell"==o)s=I.create(u,l.from);else if("row"==o){let r=u.resolve(l.from+1);s=I.rowSelection(r,r)}else if(!i){let r=p.get(l.node),n=l.from+1,i=n+r.map[r.width*r.height-1];s=I.create(u,n+1,i)}}else l instanceof a.U3&&N(l)?s=a.U3.create(u,l.from):l instanceof a.U3&&O(l)&&(s=a.U3.create(u,l.$from.start(),l.$from.end()));return s&&(n||(n=r.tr)).setSelection(s),n}let P=new a.hs("fix-tables");function $(r,n,i,s){let o=r.childCount,l=n.childCount;e:for(let a=0,u=0;a<l;a++){let l=n.child(a);for(let n=u,s=Math.min(o,a+3);n<s;n++)if(r.child(n)==l){u=n+1,i+=l.nodeSize;continue e}s(l,i),u<o&&r.child(u).sameMarkup(l)?$(r.child(u),l,i+1,s):l.nodesBetween(0,l.content.size,s,i+1),i+=l.nodeSize}}function B(r,n){let i,s=(n,s)=>{"table"==n.type.spec.tableRole&&(i=q(r,n,s,i))};return n?n.doc!=r.doc&&$(n.doc,r.doc,0,s):r.doc.descendants(s),i}function q(r,n,i,s){let o,l,a=p.get(n);if(!a.problems)return s;s||(s=r.tr);let u=[];for(let r=0;r<a.height;r++)u.push(0);for(let r=0;r<a.problems.length;r++){let o=a.problems[r];if("collision"==o.type){let r=n.nodeAt(o.pos);if(!r)continue;let l=r.attrs;for(let r=0;r<l.rowspan;r++)u[o.row+r]+=o.n;s.setNodeMarkup(s.mapping.map(i+1+o.pos),null,T(l,l.colspan-o.n,o.n))}else if("missing"==o.type)u[o.row]+=o.n;else if("overlong_rowspan"==o.type){let r=n.nodeAt(o.pos);if(!r)continue;s.setNodeMarkup(s.mapping.map(i+1+o.pos),null,{...r.attrs,rowspan:r.attrs.rowspan-o.n})}else if("colwidth mismatch"==o.type){let r=n.nodeAt(o.pos);if(!r)continue;s.setNodeMarkup(s.mapping.map(i+1+o.pos),null,{...r.attrs,colwidth:o.colwidth})}else if("zero_sized"==o.type){let r=s.mapping.map(i);s.delete(r,r+n.nodeSize)}}for(let r=0;r<u.length;r++)u[r]&&(null==o&&(o=r),l=r);for(let c=0,h=i+1;c<a.height;c++){let i=n.child(c),a=h+i.nodeSize,d=u[c];if(d>0){let n="cell";i.firstChild&&(n=i.firstChild.type.spec.tableRole);let u=[];for(let i=0;i<d;i++){let i=y(r.schema)[n].createAndFill();i&&u.push(i)}let p=(0==c||o==c-1)&&l==c?h+1:a-1;s.insert(s.mapping.map(p),u)}h=a}return s.setMeta(P,{fixTables:!0})}function j(r){let n=r.selection,i=v(r),s=i.node(-1),o=i.start(-1),l=p.get(s);return{...n instanceof I?l.rectBetween(n.$anchorCell.pos-o,n.$headCell.pos-o):l.findCell(i.pos-o),tableStart:o,map:l,table:s}}function H(r,{map:n,tableStart:i,table:s},o){let l=o>0?-1:0;F(n,s,o+l)&&(l=0==o||o==n.width?null:0);for(let a=0;a<n.height;a++){let u=a*n.width+o;if(o>0&&o<n.width&&n.map[u-1]==n.map[u]){let l=n.map[u],c=s.nodeAt(l);r.setNodeMarkup(r.mapping.map(i+l),null,D(c.attrs,o-n.colCount(l))),a+=c.attrs.rowspan-1}else{let c=null==l?y(s.type.schema).cell:s.nodeAt(n.map[u+l]).type,h=n.positionAt(a,o,s);r.insert(r.mapping.map(i+h),c.createAndFill())}}return r}function V(r,n){if(!x(r))return!1;if(n){let i=j(r);n(H(r.tr,i,i.left))}return!0}function U(r,n){if(!x(r))return!1;if(n){let i=j(r);n(H(r.tr,i,i.right))}return!0}function W(r,{map:n,table:i,tableStart:s},o){let l=r.mapping.maps.length;for(let a=0;a<n.height;){let u=a*n.width+o,c=n.map[u],h=i.nodeAt(c),d=h.attrs;if(o>0&&n.map[u-1]==c||o<n.width-1&&n.map[u+1]==c)r.setNodeMarkup(r.mapping.slice(l).map(s+c),null,T(d,o-n.colCount(c)));else{let n=r.mapping.slice(l).map(s+c);r.delete(n,n+h.nodeSize)}a+=d.rowspan}}function J(r,n){if(!x(r))return!1;if(n){let i=j(r),s=r.tr;if(0==i.left&&i.right==i.map.width)return!1;for(let r=i.right-1;W(s,i,r),r!=i.left;r--){let r=i.tableStart?s.doc.nodeAt(i.tableStart-1):s.doc;if(!r)throw RangeError("No table found");i.table=r,i.map=p.get(r)}n(s)}return!0}function K(r,n,i){var s;let o=y(n.type.schema).header_cell;for(let l=0;l<r.width;l++)if((null==(s=n.nodeAt(r.map[l+i*r.width]))?void 0:s.type)!=o)return!1;return!0}function G(r,{map:n,tableStart:i,table:s},o){let l=i;for(let r=0;r<o;r++)l+=s.child(r).nodeSize;let a=[],u=o>0?-1:0;K(n,s,o+u)&&(u=0==o||o==n.height?null:0);for(let l=0,h=n.width*o;l<n.width;l++,h++)if(o>0&&o<n.height&&n.map[h]==n.map[h-n.width]){let o=n.map[h],a=s.nodeAt(o).attrs;r.setNodeMarkup(i+o,null,{...a,rowspan:a.rowspan+1}),l+=a.colspan-1}else{var c;let r=null==u?y(s.type.schema).cell:null==(c=s.nodeAt(n.map[h+u*n.width]))?void 0:c.type,i=null==r?void 0:r.createAndFill();i&&a.push(i)}return r.insert(l,y(s.type.schema).row.create(null,a)),r}function Z(r,n){if(!x(r))return!1;if(n){let i=j(r);n(G(r.tr,i,i.top))}return!0}function X(r,n){if(!x(r))return!1;if(n){let i=j(r);n(G(r.tr,i,i.bottom))}return!0}function Y(r,{map:n,table:i,tableStart:s},o){let l=0;for(let r=0;r<o;r++)l+=i.child(r).nodeSize;let a=l+i.child(o).nodeSize,u=r.mapping.maps.length;r.delete(l+s,a+s);let c=new Set;for(let l=0,a=o*n.width;l<n.width;l++,a++){let h=n.map[a];if(!c.has(h)){if(c.add(h),o>0&&h==n.map[a-n.width]){let n=i.nodeAt(h).attrs;r.setNodeMarkup(r.mapping.slice(u).map(h+s),null,{...n,rowspan:n.rowspan-1}),l+=n.colspan-1}else if(o<n.height&&h==n.map[a+n.width]){let a=i.nodeAt(h),c=a.attrs,d=a.type.create({...c,rowspan:a.attrs.rowspan-1},a.content),p=n.positionAt(o+1,l,i);r.insert(r.mapping.slice(u).map(s+p),d),l+=c.colspan-1}}}}function Q(r,n){if(!x(r))return!1;if(n){let i=j(r),s=r.tr;if(0==i.top&&i.bottom==i.map.height)return!1;for(let r=i.bottom-1;Y(s,i,r),r!=i.top;r--){let r=i.tableStart?s.doc.nodeAt(i.tableStart-1):s.doc;if(!r)throw RangeError("No table found");i.table=r,i.map=p.get(i.table)}n(s)}return!0}function ee(r){let n=r.content;return 1==n.childCount&&n.child(0).isTextblock&&0==n.child(0).childCount}function et({width:r,height:n,map:i},s){let o=s.top*r+s.left,l=o,a=(s.bottom-1)*r+s.left,u=o+(s.right-s.left-1);for(let n=s.top;n<s.bottom;n++){if(s.left>0&&i[l]==i[l-1]||s.right<r&&i[u]==i[u+1])return!0;l+=r,u+=r}for(let l=s.left;l<s.right;l++){if(s.top>0&&i[o]==i[o-r]||s.bottom<n&&i[a]==i[a+r])return!0;o++,a++}return!1}function er(r,n){let i=r.selection;if(!(i instanceof I)||i.$anchorCell.pos==i.$headCell.pos)return!1;let s=j(r),{map:o}=s;if(et(o,s))return!1;if(n){let i,l,a=r.tr,c={},h=u.FK.empty;for(let r=s.top;r<s.bottom;r++)for(let n=s.left;n<s.right;n++){let u=o.map[r*o.width+n],d=s.table.nodeAt(u);if(!c[u]&&d)if(c[u]=!0,null==i)i=u,l=d;else{ee(d)||(h=h.append(d.content));let r=a.mapping.map(u+s.tableStart);a.delete(r,r+d.nodeSize)}}if(null==i||null==l)return!0;if(a.setNodeMarkup(i+s.tableStart,null,{...D(l.attrs,l.attrs.colspan,s.right-s.left-l.attrs.colspan),rowspan:s.bottom-s.top}),h.size>0){let r=i+1+l.content.size,n=ee(l)?i+1:r;a.replaceWith(n+s.tableStart,r+s.tableStart,h)}a.setSelection(new I(a.doc.resolve(i+s.tableStart))),n(a)}return!0}function en(r,n){let i=y(r.schema);return ei(({node:r})=>i[r.type.spec.tableRole])(r,n)}function ei(r){return(n,i)=>{let s,o,l=n.selection;if(l instanceof I){if(l.$anchorCell.pos!=l.$headCell.pos)return!1;s=l.$anchorCell.nodeAfter,o=l.$anchorCell.pos}else{var a;if(!(s=w(l.$from)))return!1;o=null==(a=b(l.$from))?void 0:a.pos}if(null==s||null==o||1==s.attrs.colspan&&1==s.attrs.rowspan)return!1;if(i){let a,u=s.attrs,c=[],h=u.colwidth;u.rowspan>1&&(u={...u,rowspan:1}),u.colspan>1&&(u={...u,colspan:1});let d=j(n),p=n.tr;for(let r=0;r<d.right-d.left;r++)c.push(h?{...u,colwidth:h&&h[r]?[h[r]]:null}:u);for(let n=d.top;n<d.bottom;n++){let i=d.map.positionAt(n,d.left,d.table);n==d.top&&(i+=s.nodeSize);for(let o=d.left,l=0;o<d.right;o++,l++)(o!=d.left||n!=d.top)&&p.insert(a=p.mapping.map(i+d.tableStart,1),r({node:s,row:n,col:o}).createAndFill(c[l]))}p.setNodeMarkup(o,r({node:s,row:d.top,col:d.left}),c[0]),l instanceof I&&p.setSelection(new I(p.doc.resolve(l.$anchorCell.pos),a?p.doc.resolve(a):void 0)),i(p)}return!0}}function es(r,n){return function(i,s){if(!x(i))return!1;let o=v(i);if(o.nodeAfter.attrs[r]===n)return!1;if(s){let l=i.tr;i.selection instanceof I?i.selection.forEachCell((i,s)=>{i.attrs[r]!==n&&l.setNodeMarkup(s,null,{...i.attrs,[r]:n})}):l.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[r]:n}),s(l)}return!0}}function eo(r){return function(n,i){if(!x(n))return!1;if(i){let s=y(n.schema),o=j(n),l=n.tr,a=o.map.cellsInRect("column"==r?{left:o.left,top:0,right:o.right,bottom:o.map.height}:"row"==r?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),u=a.map(r=>o.table.nodeAt(r));for(let r=0;r<a.length;r++)u[r].type==s.header_cell&&l.setNodeMarkup(o.tableStart+a[r],s.cell,u[r].attrs);if(0===l.steps.length)for(let r=0;r<a.length;r++)l.setNodeMarkup(o.tableStart+a[r],s.header_cell,u[r].attrs);i(l)}return!0}}function el(r,n,i){let s=n.map.cellsInRect({left:0,top:0,right:"row"==r?n.map.width:1,bottom:"column"==r?n.map.height:1});for(let r=0;r<s.length;r++){let o=n.table.nodeAt(s[r]);if(o&&o.type!==i.header_cell)return!1}return!0}function ea(r,n){return(n=n||{useDeprecatedLogic:!1}).useDeprecatedLogic?eo(r):function(n,i){if(!x(n))return!1;if(i){let s=y(n.schema),o=j(n),l=n.tr,a=el("row",o,s),u=el("column",o,s),c=+("column"===r?!!a:"row"===r&&!!u),h="column"==r?{left:0,top:c,right:1,bottom:o.map.height}:"row"==r?{left:c,top:0,right:o.map.width,bottom:1}:o,d="column"==r?u?s.cell:s.header_cell:"row"==r?a?s.cell:s.header_cell:s.cell;o.map.cellsInRect(h).forEach(r=>{let n=r+o.tableStart,i=l.doc.nodeAt(n);i&&l.setNodeMarkup(n,d,i.attrs)}),i(l)}return!0}}ea("row",{useDeprecatedLogic:!0}),ea("column",{useDeprecatedLogic:!0});let eu=ea("cell",{useDeprecatedLogic:!0});function ec(r,n){if(n<0){let n=r.nodeBefore;if(n)return r.pos-n.nodeSize;for(let n=r.index(-1)-1,i=r.before();n>=0;n--){let s=r.node(-1).child(n),o=s.lastChild;if(o)return i-1-o.nodeSize;i-=s.nodeSize}}else{if(r.index()<r.parent.childCount-1)return r.pos+r.nodeAfter.nodeSize;let n=r.node(-1);for(let i=r.indexAfter(-1),s=r.after();i<n.childCount;i++){let r=n.child(i);if(r.childCount)return s+1;s+=r.nodeSize}}return null}function eh(r){return function(n,i){if(!x(n))return!1;let s=ec(v(n),r);if(null==s)return!1;if(i){let r=n.doc.resolve(s);i(n.tr.setSelection(a.U3.between(r,E(r))).scrollIntoView())}return!0}}function ed(r,n){let i=r.selection.$anchor;for(let s=i.depth;s>0;s--)if("table"==i.node(s).type.spec.tableRole)return n&&n(r.tr.delete(i.before(s),i.after(s)).scrollIntoView()),!0;return!1}function ep(r,n){let i=r.selection;if(!(i instanceof I))return!1;if(n){let s=r.tr,o=y(r.schema).cell.createAndFill().content;i.forEachCell((r,n)=>{r.content.eq(o)||s.replace(s.mapping.map(n+1),s.mapping.map(n+r.nodeSize-1),new u.Ji(o,0,0))}),s.docChanged&&n(s)}return!0}function ef(r){if(0===r.size)return null;let{content:n,openStart:i,openEnd:s}=r;for(;1==n.childCount&&(i>0&&s>0||"table"==n.child(0).type.spec.tableRole);)i--,s--,n=n.child(0).content;let o=n.child(0),l=o.type.spec.tableRole,a=o.type.schema,c=[];if("row"==l)for(let r=0;r<n.childCount;r++){let o=n.child(r).content,l=r?0:Math.max(0,i-1),h=r<n.childCount-1?0:Math.max(0,s-1);(l||h)&&(o=eg(y(a).row,new u.Ji(o,l,h)).content),c.push(o)}else{if("cell"!=l&&"header_cell"!=l)return null;c.push(i||s?eg(y(a).row,new u.Ji(n,i,s)).content:n)}return em(a,c)}function em(r,n){let i=[];for(let r=0;r<n.length;r++){let s=n[r];for(let n=s.childCount-1;n>=0;n--){let{rowspan:o,colspan:l}=s.child(n).attrs;for(let n=r;n<r+o;n++)i[n]=(i[n]||0)+l}}let s=0;for(let r=0;r<i.length;r++)s=Math.max(s,i[r]);for(let o=0;o<i.length;o++)if(o>=n.length&&n.push(u.FK.empty),i[o]<s){let l=y(r).cell.createAndFill(),a=[];for(let r=i[o];r<s;r++)a.push(l);n[o]=n[o].append(u.FK.from(a))}return{height:n.length,width:s,rows:n}}function eg(r,n){let i=r.createAndFill();return new d.dL(i).replace(0,i.content.size,n).doc}function e_({width:r,height:n,rows:i},s,o){if(r!=s){let n=[],o=[];for(let r=0;r<i.length;r++){let l=i[r],a=[];for(let i=n[r]||0,o=0;i<s;o++){let u=l.child(o%l.childCount);i+u.attrs.colspan>s&&(u=u.type.createChecked(T(u.attrs,u.attrs.colspan,i+u.attrs.colspan-s),u.content)),a.push(u),i+=u.attrs.colspan;for(let i=1;i<u.attrs.rowspan;i++)n[r+i]=(n[r+i]||0)+u.attrs.colspan}o.push(u.FK.from(a))}i=o,r=s}if(n!=o){let r=[];for(let s=0,l=0;s<o;s++,l++){let a=[],c=i[l%n];for(let r=0;r<c.childCount;r++){let n=c.child(r);s+n.attrs.rowspan>o&&(n=n.type.create({...n.attrs,rowspan:Math.max(1,o-n.attrs.rowspan)},n.content)),a.push(n)}r.push(u.FK.from(a))}i=r,n=o}return{width:r,height:n,rows:i}}function ey(r,n,i,s,o,l,a){let c,h,d=y(r.doc.type.schema);if(o>n.width)for(let l=0,u=0;l<n.height;l++){let p,f=i.child(l);u+=f.nodeSize;let m=[];p=null==f.lastChild||f.lastChild.type==d.cell?c||(c=d.cell.createAndFill()):h||(h=d.header_cell.createAndFill());for(let r=n.width;r<o;r++)m.push(p);r.insert(r.mapping.slice(a).map(u-1+s),m)}if(l>n.height){let p=[];for(let r=0,s=(n.height-1)*n.width;r<Math.max(n.width,o);r++){let o=!(r>=n.width)&&i.nodeAt(n.map[s+r]).type==d.header_cell;p.push(o?h||(h=d.header_cell.createAndFill()):c||(c=d.cell.createAndFill()))}let f=d.row.create(null,u.FK.from(p)),m=[];for(let r=n.height;r<l;r++)m.push(f);r.insert(r.mapping.slice(a).map(s+i.nodeSize-2),m)}return!!(c||h)}function ek(r,n,i,s,o,l,a,u){if(0==a||a==n.height)return!1;let c=!1;for(let h=o;h<l;h++){let o=a*n.width+h,l=n.map[o];if(n.map[o-n.width]==l){c=!0;let o=i.nodeAt(l),{top:d,left:p}=n.findCell(l);r.setNodeMarkup(r.mapping.slice(u).map(l+s),null,{...o.attrs,rowspan:a-d}),r.insert(r.mapping.slice(u).map(n.positionAt(a,p,i)),o.type.createAndFill({...o.attrs,rowspan:d+o.attrs.rowspan-a})),h+=o.attrs.colspan-1}}return c}function eb(r,n,i,s,o,l,a,u){if(0==a||a==n.width)return!1;let c=!1;for(let h=o;h<l;h++){let o=h*n.width+a,l=n.map[o];if(n.map[o-1]==l){c=!0;let o=i.nodeAt(l),d=n.colCount(l),p=r.mapping.slice(u).map(l+s);r.setNodeMarkup(p,null,T(o.attrs,a-d,o.attrs.colspan-(a-d))),r.insert(p+o.nodeSize,o.type.createAndFill(T(o.attrs,0,a-d))),h+=o.attrs.rowspan-1}}return c}function ew(r,n,i,s,o){let l=i?r.doc.nodeAt(i-1):r.doc;if(!l)throw Error("No table found");let a=p.get(l),{top:c,left:h}=s,d=h+o.width,f=c+o.height,m=r.tr,g=0;function _(){if(!(l=i?m.doc.nodeAt(i-1):m.doc))throw Error("No table found");a=p.get(l),g=m.mapping.maps.length}ey(m,a,l,i,d,f,0)&&_(),ek(m,a,l,i,h,d,c,g)&&_(),ek(m,a,l,i,h,d,f,g)&&_(),eb(m,a,l,i,c,f,h,g)&&_(),eb(m,a,l,i,c,f,d,g)&&_();for(let r=c;r<f;r++){let n=a.positionAt(r,h,l),s=a.positionAt(r,d,l);m.replace(m.mapping.slice(g).map(n+i),m.mapping.slice(g).map(s+i),new u.Ji(o.rows[r-c],0,0))}_(),m.setSelection(new I(m.doc.resolve(i+a.positionAt(c,h,l)),m.doc.resolve(i+a.positionAt(f-1,d-1,l)))),n(m)}let ex=(0,h.K)({ArrowLeft:eC("horiz",-1),ArrowRight:eC("horiz",1),ArrowUp:eC("vert",-1),ArrowDown:eC("vert",1),"Shift-ArrowLeft":eA("horiz",-1),"Shift-ArrowRight":eA("horiz",1),"Shift-ArrowUp":eA("vert",-1),"Shift-ArrowDown":eA("vert",1),Backspace:ep,"Mod-Backspace":ep,Delete:ep,"Mod-Delete":ep});function ev(r,n,i){return!i.eq(r.selection)&&(n&&n(r.tr.setSelection(i).scrollIntoView()),!0)}function eC(r,n){return(i,s,o)=>{if(!o)return!1;let l=i.selection;if(l instanceof I)return ev(i,s,a.LN.near(l.$headCell,n));if("horiz"!=r&&!l.empty)return!1;let u=eT(o,r,n);if(null==u)return!1;if("horiz"==r)return ev(i,s,a.LN.near(i.doc.resolve(l.head+n),n));{let o,l=i.doc.resolve(u),c=M(l,r,n);return o=c?a.LN.near(c,1):n<0?a.LN.near(i.doc.resolve(l.before(-1)),-1):a.LN.near(i.doc.resolve(l.after(-1)),1),ev(i,s,o)}}}function eA(r,n){return(i,s,o)=>{let l;if(!o)return!1;let a=i.selection;if(a instanceof I)l=a;else{let s=eT(o,r,n);if(null==s)return!1;l=new I(i.doc.resolve(s))}let u=M(l.$headCell,r,n);return!!u&&ev(i,s,new I(l.$anchorCell,u))}}function eE(r,n){let i=b(r.state.doc.resolve(n));return!!i&&(r.dispatch(r.state.tr.setSelection(new I(i))),!0)}function eS(r,n,i){if(!x(r.state))return!1;let s=ef(i),o=r.state.selection;if(o instanceof I){s||(s={width:1,height:1,rows:[u.FK.from(eg(y(r.state.schema).cell,i))]});let n=o.$anchorCell.node(-1),l=o.$anchorCell.start(-1),a=p.get(n).rectBetween(o.$anchorCell.pos-l,o.$headCell.pos-l);return s=e_(s,a.right-a.left,a.bottom-a.top),ew(r.state,r.dispatch,l,a,s),!0}if(!s)return!1;{let n=v(r.state),i=n.start(-1);return ew(r.state,r.dispatch,i,p.get(n.node(-1)).findCell(n.pos-i),s),!0}}function eM(r,n){var i;let s;if(0!=n.button||n.ctrlKey||n.metaKey)return;let o=eD(r,n.target);if(n.shiftKey&&r.state.selection instanceof I)l(r.state.selection.$anchorCell,n),n.preventDefault();else if(n.shiftKey&&o&&null!=(s=b(r.state.selection.$anchor))&&(null==(i=eF(r,n))?void 0:i.pos)!=s.pos)l(s,n),n.preventDefault();else if(!o)return;function l(n,i){let s=eF(r,i),o=null==k.getState(r.state);if(!s||!S(n,s))if(!o)return;else s=n;let l=new I(n,s);if(o||!r.state.selection.eq(l)){let i=r.state.tr.setSelection(l);o&&i.setMeta(k,n.pos),r.dispatch(i)}}function a(){r.root.removeEventListener("mouseup",a),r.root.removeEventListener("dragstart",a),r.root.removeEventListener("mousemove",u),null!=k.getState(r.state)&&r.dispatch(r.state.tr.setMeta(k,-1))}function u(i){let s,u=i,c=k.getState(r.state);if(null!=c)s=r.state.doc.resolve(c);else if(eD(r,u.target)!=o&&!(s=eF(r,n)))return a();s&&l(s,u)}r.root.addEventListener("mouseup",a),r.root.addEventListener("dragstart",a),r.root.addEventListener("mousemove",u)}function eT(r,n,i){if(!(r.state.selection instanceof a.U3))return null;let{$head:s}=r.state.selection;for(let o=s.depth-1;o>=0;o--){let l=s.node(o);if((i<0?s.index(o):s.indexAfter(o))!=(i<0?0:l.childCount))break;if("cell"==l.type.spec.tableRole||"header_cell"==l.type.spec.tableRole){let l=s.before(o),a="vert"==n?i>0?"down":"up":i>0?"right":"left";return r.endOfTextblock(a)?l:null}}return null}function eD(r,n){for(;n&&n!=r.dom;n=n.parentNode)if("TD"==n.nodeName||"TH"==n.nodeName)return n;return null}function eF(r,n){let i=r.posAtCoords({left:n.clientX,top:n.clientY});if(!i)return null;let{inside:s,pos:o}=i;return s>=0&&b(r.state.doc.resolve(s))||b(r.state.doc.resolve(o))}var eI=class{constructor(r,n){this.node=r,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),eL(r,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(r){return r.type==this.node.type&&(this.node=r,eL(r,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(r){return"attributes"==r.type&&(r.target==this.table||this.colgroup.contains(r.target))}};function eL(r,n,i,s,o,l){let a=0,u=!0,c=n.firstChild,h=r.firstChild;if(h){for(let r=0,i=0;r<h.childCount;r++){let{colspan:d,colwidth:p}=h.child(r).attrs;for(let r=0;r<d;r++,i++){let h=o==i?l:p&&p[r],d=h?h+"px":"";if(a+=h||s,h||(u=!1),c)c.style.width!=d&&(c.style.width=d),c=c.nextSibling;else{let r=document.createElement("col");r.style.width=d,n.appendChild(r)}}}for(;c;){var d;let r=c.nextSibling;null==(d=c.parentNode)||d.removeChild(c),c=r}u?(i.style.width=a+"px",i.style.minWidth=""):(i.style.width="",i.style.minWidth=a+"px")}}let eR=new a.hs("tableColumnResizing");function eN({handleWidth:r=5,cellMinWidth:n=25,defaultCellMinWidth:i=100,View:s=eI,lastColumnResizable:o=!0}={}){let l=new a.k_({key:eR,state:{init(r,n){var o;let a=null==(o=l.spec)||null==(o=o.props)?void 0:o.nodeViews,u=y(n.schema).table.name;return s&&a&&(a[u]=(r,n)=>new s(r,i,n)),new eO(-1,!1)},apply:(r,n)=>n.apply(r)},props:{attributes:r=>{let n=eR.getState(r);return n&&n.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(n,i)=>{ez(n,i,r,o)},mouseleave:r=>{eP(r)},mousedown:(r,s)=>{e$(r,s,n,i)}},decorations:r=>{let n=eR.getState(r);if(n&&n.activeHandle>-1)return eK(r,n.activeHandle)},nodeViews:{}}});return l}var eO=class r{constructor(r,n){this.activeHandle=r,this.dragging=n}apply(n){let i=this,s=n.getMeta(eR);if(s&&null!=s.setHandle)return new r(s.setHandle,!1);if(s&&void 0!==s.setDragging)return new r(i.activeHandle,s.setDragging);if(i.activeHandle>-1&&n.docChanged){let s=n.mapping.map(i.activeHandle,-1);return A(n.doc.resolve(s))||(s=-1),new r(s,i.dragging)}return i}};function ez(r,n,i,s){if(!r.editable)return;let o=eR.getState(r.state);if(o&&!o.dragging){let l=eq(n.target),a=-1;if(l){let{left:s,right:o}=l.getBoundingClientRect();n.clientX-s<=i?a=ej(r,n,"left",i):o-n.clientX<=i&&(a=ej(r,n,"right",i))}if(a!=o.activeHandle){if(!s&&-1!==a){let n=r.state.doc.resolve(a),i=n.node(-1),s=p.get(i),o=n.start(-1);if(s.colCount(n.pos-o)+n.nodeAfter.attrs.colspan-1==s.width-1)return}eV(r,a)}}}function eP(r){if(!r.editable)return;let n=eR.getState(r.state);n&&n.activeHandle>-1&&!n.dragging&&eV(r,-1)}function e$(r,n,i,s){var o;if(!r.editable)return!1;let l=null!=(o=r.dom.ownerDocument.defaultView)?o:window,a=eR.getState(r.state);if(!a||-1==a.activeHandle||a.dragging)return!1;let u=r.state.doc.nodeAt(a.activeHandle),c=eB(r,a.activeHandle,u.attrs);function h(n){l.removeEventListener("mouseup",h),l.removeEventListener("mousemove",d);let s=eR.getState(r.state);(null==s?void 0:s.dragging)&&(eU(r,s.activeHandle,eH(s.dragging,n,i)),r.dispatch(r.state.tr.setMeta(eR,{setDragging:null})))}function d(n){if(!n.which)return h(n);let o=eR.getState(r.state);if(o&&o.dragging){let l=eH(o.dragging,n,i);eW(r,o.activeHandle,l,s)}}return r.dispatch(r.state.tr.setMeta(eR,{setDragging:{startX:n.clientX,startWidth:c}})),eW(r,a.activeHandle,c,s),l.addEventListener("mouseup",h),l.addEventListener("mousemove",d),n.preventDefault(),!0}function eB(r,n,{colspan:i,colwidth:s}){let o=s&&s[s.length-1];if(o)return o;let l=r.domAtPos(n),a=l.node.childNodes[l.offset].offsetWidth,u=i;if(s)for(let r=0;r<i;r++)s[r]&&(a-=s[r],u--);return a/u}function eq(r){for(;r&&"TD"!=r.nodeName&&"TH"!=r.nodeName;)r=r.classList&&r.classList.contains("ProseMirror")?null:r.parentNode;return r}function ej(r,n,i,s){let o="right"==i?-s:s,l=r.posAtCoords({left:n.clientX+o,top:n.clientY});if(!l)return -1;let{pos:a}=l,u=b(r.state.doc.resolve(a));if(!u)return -1;if("right"==i)return u.pos;let c=p.get(u.node(-1)),h=u.start(-1),d=c.map.indexOf(u.pos-h);return d%c.width==0?-1:h+c.map[d-1]}function eH(r,n,i){let s=n.clientX-r.startX;return Math.max(i,r.startWidth+s)}function eV(r,n){r.dispatch(r.state.tr.setMeta(eR,{setHandle:n}))}function eU(r,n,i){let s=r.state.doc.resolve(n),o=s.node(-1),l=p.get(o),a=s.start(-1),u=l.colCount(s.pos-a)+s.nodeAfter.attrs.colspan-1,c=r.state.tr;for(let r=0;r<l.height;r++){let n=r*l.width+u;if(r&&l.map[n]==l.map[n-l.width])continue;let s=l.map[n],h=o.nodeAt(s).attrs,d=1==h.colspan?0:u-l.colCount(s);if(h.colwidth&&h.colwidth[d]==i)continue;let p=h.colwidth?h.colwidth.slice():eJ(h.colspan);p[d]=i,c.setNodeMarkup(a+s,null,{...h,colwidth:p})}c.docChanged&&r.dispatch(c)}function eW(r,n,i,s){let o=r.state.doc.resolve(n),l=o.node(-1),a=o.start(-1),u=p.get(l).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1,c=r.domAtPos(o.start(-1)).node;for(;c&&"TABLE"!=c.nodeName;)c=c.parentNode;c&&eL(l,c.firstChild,c,s,u,i)}function eJ(r){return Array(r).fill(0)}function eK(r,n){let i=[],s=r.doc.resolve(n),o=s.node(-1);if(!o)return c.zF.empty;let l=p.get(o),a=s.start(-1),u=l.colCount(s.pos-a)+s.nodeAfter.attrs.colspan-1;for(let n=0;n<l.height;n++){let s=u+n*l.width;if((u==l.width-1||l.map[s]!=l.map[s+1])&&(0==n||l.map[s]!=l.map[s-l.width])){var h;let n=l.map[s],u=a+n+o.nodeAt(n).nodeSize-1,d=document.createElement("div");d.className="column-resize-handle",(null==(h=eR.getState(r))?void 0:h.dragging)&&i.push(c.NZ.node(a+n,a+n+o.nodeAt(n).nodeSize,{class:"column-resize-dragging"})),i.push(c.NZ.widget(u,d))}}return c.zF.create(r.doc,i)}function eG({allowTableNodeSelection:r=!1}={}){return new a.k_({key:k,state:{init:()=>null,apply(r,n){let i=r.getMeta(k);if(null!=i)return -1==i?null:i;if(null==n||!r.docChanged)return n;let{deleted:s,pos:o}=r.mapping.mapResult(n);return s?null:o}},props:{decorations:R,handleDOMEvents:{mousedown:eM},createSelectionBetween:r=>null!=k.getState(r.state)?r.state.selection:null,handleTripleClick:eE,handleKeyDown:ex,handlePaste:eS},appendTransaction:(n,i,s)=>z(s,B(s,i),r)})}function eZ(r){return"left"===r||"right"===r||"center"===r?r:null}function eX(r){let n=(r.style.textAlign||"").trim().toLowerCase(),i=(r.getAttribute("align")||"").trim().toLowerCase();return eZ(n||i)}function eY(r){return eZ(null==r?void 0:r.align)}function eQ(){return{default:null,parseHTML:r=>eX(r),renderHTML:r=>r.align?{style:`text-align: ${r.align}`}:{}}}var e0=l.bP.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:r=>{var n,i;let s=r.getAttribute("colwidth"),o=s?s.split(",").map(r=>parseInt(r,10)):null;if(!o){let s=null==(n=r.closest("table"))?void 0:n.querySelectorAll("colgroup > col"),o=Array.from((null==(i=r.parentElement)?void 0:i.children)||[]).indexOf(r);if(o&&o>-1&&s&&s[o]){let r=s[o].getAttribute("width");return r?[parseInt(r,10)]:null}}return o}},align:eQ()}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:r}){return["td",(0,l.KV)(this.options.HTMLAttributes,r),0]}}),e1=l.bP.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:r=>{let n=r.getAttribute("colwidth");return n?n.split(",").map(r=>parseInt(r,10)):null}},align:eQ()}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:r}){return["th",(0,l.KV)(this.options.HTMLAttributes,r),0]}}),e2=l.bP.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:r}){return["tr",(0,l.KV)(this.options.HTMLAttributes,r),0]}});function e3(r,n){return n?["width",`${Math.max(n,r)}px`]:["min-width",`${r}px`]}function e5(r,n,i,s,o,l){var a;let u=0,c=!0,h=n.firstChild,d=r.firstChild;if(null!==d)for(let r=0,i=0;r<d.childCount;r+=1){let{colspan:a,colwidth:p}=d.child(r).attrs;for(let r=0;r<a;r+=1,i+=1){let a=o===i?l:p&&p[r],d=a?`${a}px`:"";if(u+=a||s,a||(c=!1),h){if(h.style.width!==d){let[r,n]=e3(s,a);h.style.setProperty(r,n)}h=h.nextSibling}else{let r=document.createElement("col"),[i,o]=e3(s,a);r.style.setProperty(i,o),n.appendChild(r)}}}for(;h;){let r=h.nextSibling;null==(a=h.parentNode)||a.removeChild(h),h=r}let p=r.attrs.style&&"string"==typeof r.attrs.style&&/\bwidth\s*:/i.test(r.attrs.style);c&&!p?(i.style.width=`${u}px`,i.style.minWidth=""):(i.style.width="",i.style.minWidth=`${u}px`)}var e4=class{constructor(r,n){this.node=r,this.cellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),r.attrs.style&&(this.table.style.cssText=r.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),e5(r,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(r){return r.type===this.node.type&&(this.node=r,e5(r,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(r){let n=r.target,i=this.dom.contains(n),s=this.contentDOM.contains(n);return!!i&&!s&&("attributes"===r.type||"childList"===r.type||"characterData"===r.type)}};function e6(r,n,i,s){let o=0,l=!0,a=[],u=r.firstChild;if(!u)return{};for(let r=0,c=0;r<u.childCount;r+=1){let{colspan:h,colwidth:d}=u.child(r).attrs;for(let r=0;r<h;r+=1,c+=1){let u=i===c?s:d&&d[r];o+=u||n,u||(l=!1);let[h,p]=e3(n,u);a.push(["col",{style:`${h}: ${p}`}])}}return{colgroup:["colgroup",{},...a],tableWidth:l?`${o}px`:"",tableMinWidth:l?"":`${o}px`}}function e8(r,n){return n?r.createChecked(null,n):r.createAndFill()}function e9(r){if(r.cached.tableNodeTypes)return r.cached.tableNodeTypes;let n={};return Object.keys(r.nodes).forEach(i=>{let s=r.nodes[i];s.spec.tableRole&&(n[s.spec.tableRole]=s)}),r.cached.tableNodeTypes=n,n}function e7(r,n,i,s,o){let l=e9(r),a=[],u=[];for(let r=0;r<i;r+=1){let r=e8(l.cell,o);if(r&&u.push(r),s){let r=e8(l.header_cell,o);r&&a.push(r)}}let c=[];for(let r=0;r<n;r+=1)c.push(l.row.createChecked(null,s&&0===r?a:u));return l.table.createChecked(null,c)}function te(r){return r instanceof I}var tt=({editor:r})=>{let{selection:n}=r.state;if(!te(n))return!1;let i=0,s=(0,l.eL)(n.ranges[0].$from,r=>"table"===r.type.name);return null==s||s.node.descendants(r=>{if("table"===r.type.name)return!1;["tableCell","tableHeader"].includes(r.type.name)&&(i+=1)}),i===n.ranges.length&&(r.commands.deleteTable(),!0)},tr="\x1f";function tn(r){return(r||"").replace(/\s+/g," ").trim()}var ti=function(r,n,i={}){var s;let o=null!=(s=i.cellLineSeparator)?s:tr;if(!r||!r.content||0===r.content.length)return"";let l=[];r.content.forEach(r=>{let i=[];r.content&&r.content.forEach(r=>{let s="",l=tn(s=r.content&&Array.isArray(r.content)&&r.content.length>1?r.content.map(r=>n.renderChildren(r)).join(o):r.content?n.renderChildren(r.content):""),a="tableHeader"===r.type,u=eY(r.attrs);i.push({text:l,isHeader:a,align:u})}),l.push(i)});let a=l.reduce((r,n)=>Math.max(r,n.length),0);if(0===a)return"";let u=Array(a).fill(0);l.forEach(r=>{var n;for(let i=0;i<a;i+=1){let s=((null==(n=r[i])?void 0:n.text)||"").length;s>u[i]&&(u[i]=s),u[i]<3&&(u[i]=3)}});let c=(r,n)=>r+" ".repeat(Math.max(0,n-r.length)),h=l[0],d=h.some(r=>r.isHeader),p=Array(a).fill(null);l.forEach(r=>{var n;for(let i=0;i<a;i+=1)!p[i]&&(null==(n=r[i])?void 0:n.align)&&(p[i]=r[i].align)});let f="\n",m=Array(a).fill(0).map((r,n)=>d&&h[n]&&h[n].text||"");return f+=`| ${m.map((r,n)=>c(r,u[n])).join(" | ")} |
|
|
2
2
|
| ${u.map((r,n)=>{let i=Math.max(3,r),s=p[n];return"left"===s?`:${"-".repeat(i)}`:"right"===s?`${"-".repeat(i)}:`:"center"===s?`:${"-".repeat(i)}:`:"-".repeat(i)}).join(" | ")} |
|
|
3
3
|
`,(d?l.slice(1):l).forEach(r=>{f+=`| ${Array(a).fill(0).map((n,i)=>c(r[i]&&r[i].text||"",u[i])).join(" | ")} |
|
|
4
4
|
`}),f},ts=l.bP.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:e4,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({node:r,HTMLAttributes:n}){let{colgroup:i,tableWidth:s,tableMinWidth:o}=e6(r,this.options.cellMinWidth),a=n.style;function u(){return a||(s?`width: ${s}`:`min-width: ${o}`)}let c=["table",(0,l.KV)(this.options.HTMLAttributes,n,{style:u()}),i,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},c]:c},parseMarkdown:(r,n)=>{let i=[],s=Array.isArray(r.align)?r.align:[];if(r.header){let o=[];r.header.forEach((r,i)=>{var l;let a=eZ(null!=(l=s[i])?l:r.align),u=a?{align:a}:{};o.push(n.createNode("tableHeader",u,[{type:"paragraph",content:n.parseInline(r.tokens)}]))}),i.push(n.createNode("tableRow",{},o))}return r.rows&&r.rows.forEach(r=>{let o=[];r.forEach((r,i)=>{var l;let a=eZ(null!=(l=s[i])?l:r.align),u=a?{align:a}:{};o.push(n.createNode("tableCell",u,[{type:"paragraph",content:n.parseInline(r.tokens)}]))}),i.push(n.createNode("tableRow",{},o))}),n.createNode("table",void 0,i)},renderMarkdown:(r,n)=>ti(r,n),addCommands:()=>({insertTable:({rows:r=3,cols:n=3,withHeaderRow:i=!0}={})=>({tr:s,dispatch:o,editor:l})=>{let u=e7(l.schema,r,n,i);if(o){let r=s.selection.from+1;s.replaceSelectionWith(u).scrollIntoView().setSelection(a.U3.near(s.doc.resolve(r)))}return!0},addColumnBefore:()=>({state:r,dispatch:n})=>V(r,n),addColumnAfter:()=>({state:r,dispatch:n})=>U(r,n),deleteColumn:()=>({state:r,dispatch:n})=>J(r,n),addRowBefore:()=>({state:r,dispatch:n})=>Z(r,n),addRowAfter:()=>({state:r,dispatch:n})=>X(r,n),deleteRow:()=>({state:r,dispatch:n})=>Q(r,n),deleteTable:()=>({state:r,dispatch:n})=>ed(r,n),mergeCells:()=>({state:r,dispatch:n})=>er(r,n),splitCell:()=>({state:r,dispatch:n})=>en(r,n),toggleHeaderColumn:()=>({state:r,dispatch:n})=>ea("column")(r,n),toggleHeaderRow:()=>({state:r,dispatch:n})=>ea("row")(r,n),toggleHeaderCell:()=>({state:r,dispatch:n})=>eu(r,n),mergeOrSplit:()=>({state:r,dispatch:n})=>!!er(r,n)||en(r,n),setCellAttribute:(r,n)=>({state:i,dispatch:s})=>es(r,n)(i,s),goToNextCell:()=>({state:r,dispatch:n})=>eh(1)(r,n),goToPreviousCell:()=>({state:r,dispatch:n})=>eh(-1)(r,n),fixTables:()=>({state:r,dispatch:n})=>(n&&B(r),!0),setCellSelection:r=>({tr:n,dispatch:i})=>{if(i){let i=I.create(n.doc,r.anchorCell,r.headCell);n.setSelection(i)}return!0}}),addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:tt,"Mod-Backspace":tt,Delete:tt,"Mod-Delete":tt}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[eN({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],eG({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(r){let n={name:r.name,options:r.options,storage:r.storage};return{tableRole:(0,l.gk)((0,l.iI)(r,"tableRole",n))}}});l.YY.create({name:"tableKit",addExtensions(){let r=[];return!1!==this.options.table&&r.push(ts.configure(this.options.table)),!1!==this.options.tableCell&&r.push(e0.configure(this.options.tableCell)),!1!==this.options.tableHeader&&r.push(e1.configure(this.options.tableHeader)),!1!==this.options.tableRow&&r.push(e2.configure(this.options.tableRow)),r}})},6268:(r,n,i)=>{"use strict";i.d(n,{A:()=>s.A0});var s=i(5989)},6489:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],l=(0,s.A)("palette",o)},8242:(r,n,i)=>{"use strict";i.d(n,{$L:()=>ee,Ln:()=>E,N0:()=>Z,Um:()=>Q,Wg:()=>S,X9:()=>_,Ys:()=>v,dL:()=>ey,jP:()=>L,n9:()=>J,oM:()=>N,zy:()=>U});var s=i(27050);let o=65535,l=65536;function a(r,n){return r+n*l}function u(r){return r&o}function c(r){return(r-(r&o))/l}let h=1,d=2,p=4,f=8;class m{constructor(r,n,i){this.pos=r,this.delInfo=n,this.recover=i}get deleted(){return(this.delInfo&f)>0}get deletedBefore(){return(this.delInfo&(h|p))>0}get deletedAfter(){return(this.delInfo&(d|p))>0}get deletedAcross(){return(this.delInfo&p)>0}}class g{constructor(r,n=!1){if(this.ranges=r,this.inverted=n,!r.length&&g.empty)return g.empty}recover(r){let n=0,i=u(r);if(!this.inverted)for(let r=0;r<i;r++)n+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*i]+n+c(r)}mapResult(r,n=1){return this._map(r,n,!1)}map(r,n=1){return this._map(r,n,!0)}_map(r,n,i){let s=0,o=this.inverted?2:1,l=this.inverted?1:2;for(let u=0;u<this.ranges.length;u+=3){let c=this.ranges[u]-(this.inverted?s:0);if(c>r)break;let g=this.ranges[u+o],_=this.ranges[u+l],y=c+g;if(r<=y){let o=g?r==c?-1:r==y?1:n:n,l=c+s+(o<0?0:_);if(i)return l;let k=r==(n<0?c:y)?null:a(u/3,r-c),b=r==c?d:r==y?h:p;return(n<0?r!=c:r!=y)&&(b|=f),new m(l,b,k)}s+=_-g}return i?r+s:new m(r+s,0,null)}touches(r,n){let i=0,s=u(n),o=this.inverted?2:1,l=this.inverted?1:2;for(let n=0;n<this.ranges.length;n+=3){let a=this.ranges[n]-(this.inverted?i:0);if(a>r)break;let u=this.ranges[n+o];if(r<=a+u&&n==3*s)return!0;i+=this.ranges[n+l]-u}return!1}forEach(r){let n=this.inverted?2:1,i=this.inverted?1:2;for(let s=0,o=0;s<this.ranges.length;s+=3){let l=this.ranges[s],a=l-(this.inverted?o:0),u=l+(this.inverted?0:o),c=this.ranges[s+n],h=this.ranges[s+i];r(a,a+c,u,u+h),o+=h-c}}invert(){return new g(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(r){return 0==r?g.empty:new g(r<0?[0,-r,0]:[0,0,r])}}g.empty=new g([]);class _{constructor(r,n,i=0,s=r?r.length:0){this.mirror=n,this.from=i,this.to=s,this._maps=r||[],this.ownData=!(r||n)}get maps(){return this._maps}slice(r=0,n=this.maps.length){return new _(this._maps,this.mirror,r,n)}appendMap(r,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(r),null!=n&&this.setMirror(this._maps.length-1,n)}appendMapping(r){for(let n=0,i=this._maps.length;n<r._maps.length;n++){let s=r.getMirror(n);this.appendMap(r._maps[n],null!=s&&s<n?i+s:void 0)}}getMirror(r){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==r)return this.mirror[n+(n%2?-1:1)]}}setMirror(r,n){this.mirror||(this.mirror=[]),this.mirror.push(r,n)}appendMappingInverted(r){for(let n=r.maps.length-1,i=this._maps.length+r._maps.length;n>=0;n--){let s=r.getMirror(n);this.appendMap(r._maps[n].invert(),null!=s&&s>n?i-s-1:void 0)}}invert(){let r=new _;return r.appendMappingInverted(this),r}map(r,n=1){if(this.mirror)return this._map(r,n,!0);for(let i=this.from;i<this.to;i++)r=this._maps[i].map(r,n);return r}mapResult(r,n=1){return this._map(r,n,!1)}_map(r,n,i){let s=0;for(let i=this.from;i<this.to;i++){let o=this._maps[i].mapResult(r,n);if(null!=o.recover){let n=this.getMirror(i);if(null!=n&&n>i&&n<this.to){i=n,r=this._maps[n].recover(o.recover);continue}}s|=o.delInfo,r=o.pos}return i?r:new m(r,s,null)}}let y=Object.create(null);class k{getMap(){return g.empty}merge(r){return null}static fromJSON(r,n){if(!n||!n.stepType)throw RangeError("Invalid input for Step.fromJSON");let i=y[n.stepType];if(!i)throw RangeError(`No step type ${n.stepType} defined`);return i.fromJSON(r,n)}static jsonID(r,n){if(r in y)throw RangeError("Duplicate use of step JSON ID "+r);return y[r]=n,n.prototype.jsonID=r,n}}class b{constructor(r,n){this.doc=r,this.failed=n}static ok(r){return new b(r,null)}static fail(r){return new b(null,r)}static fromReplace(r,n,i,o){try{return b.ok(r.replace(n,i,o))}catch(r){if(r instanceof s.vI)return b.fail(r.message);throw r}}}function w(r,n,i){let o=[];for(let s=0;s<r.childCount;s++){let l=r.child(s);l.content.size&&(l=l.copy(w(l.content,n,l))),l.isInline&&(l=n(l,i,s)),o.push(l)}return s.FK.fromArray(o)}class x extends k{constructor(r,n,i){super(),this.from=r,this.to=n,this.mark=i}apply(r){let n=r.slice(this.from,this.to),i=r.resolve(this.from),o=i.node(i.sharedDepth(this.to)),l=new s.Ji(w(n.content,(r,n)=>r.isAtom&&n.type.allowsMarkType(this.mark.type)?r.mark(this.mark.addToSet(r.marks)):r,o),n.openStart,n.openEnd);return b.fromReplace(r,this.from,this.to,l)}invert(){return new v(this.from,this.to,this.mark)}map(r){let n=r.mapResult(this.from,1),i=r.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new x(n.pos,i.pos,this.mark)}merge(r){return r instanceof x&&r.mark.eq(this.mark)&&this.from<=r.to&&this.to>=r.from?new x(Math.min(this.from,r.from),Math.max(this.to,r.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(r,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new x(n.from,n.to,r.markFromJSON(n.mark))}}k.jsonID("addMark",x);class v extends k{constructor(r,n,i){super(),this.from=r,this.to=n,this.mark=i}apply(r){let n=r.slice(this.from,this.to),i=new s.Ji(w(n.content,r=>r.mark(this.mark.removeFromSet(r.marks)),r),n.openStart,n.openEnd);return b.fromReplace(r,this.from,this.to,i)}invert(){return new x(this.from,this.to,this.mark)}map(r){let n=r.mapResult(this.from,1),i=r.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new v(n.pos,i.pos,this.mark)}merge(r){return r instanceof v&&r.mark.eq(this.mark)&&this.from<=r.to&&this.to>=r.from?new v(Math.min(this.from,r.from),Math.max(this.to,r.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(r,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new v(n.from,n.to,r.markFromJSON(n.mark))}}k.jsonID("removeMark",v);class C extends k{constructor(r,n){super(),this.pos=r,this.mark=n}apply(r){let n=r.nodeAt(this.pos);if(!n)return b.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return b.fromReplace(r,this.pos,this.pos+1,new s.Ji(s.FK.from(i),0,+!n.isLeaf))}invert(r){let n=r.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new C(this.pos,n.marks[i]);return new C(this.pos,this.mark)}}return new A(this.pos,this.mark)}map(r){let n=r.mapResult(this.pos,1);return n.deletedAfter?null:new C(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(r,n){if("number"!=typeof n.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new C(n.pos,r.markFromJSON(n.mark))}}k.jsonID("addNodeMark",C);class A extends k{constructor(r,n){super(),this.pos=r,this.mark=n}apply(r){let n=r.nodeAt(this.pos);if(!n)return b.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return b.fromReplace(r,this.pos,this.pos+1,new s.Ji(s.FK.from(i),0,+!n.isLeaf))}invert(r){let n=r.nodeAt(this.pos);return n&&this.mark.isInSet(n.marks)?new C(this.pos,this.mark):this}map(r){let n=r.mapResult(this.pos,1);return n.deletedAfter?null:new A(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(r,n){if("number"!=typeof n.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new A(n.pos,r.markFromJSON(n.mark))}}k.jsonID("removeNodeMark",A);class E extends k{constructor(r,n,i,s=!1){super(),this.from=r,this.to=n,this.slice=i,this.structure=s}apply(r){return this.structure&&M(r,this.from,this.to)?b.fail("Structure replace would overwrite content"):b.fromReplace(r,this.from,this.to,this.slice)}getMap(){return new g([this.from,this.to-this.from,this.slice.size])}invert(r){return new E(this.from,this.from+this.slice.size,r.slice(this.from,this.to))}map(r){let n=r.mapResult(this.to,-1),i=this.from==this.to&&E.MAP_BIAS<0?n:r.mapResult(this.from,1);return i.deletedAcross&&n.deletedAcross?null:new E(i.pos,Math.max(i.pos,n.pos),this.slice,this.structure)}merge(r){if(!(r instanceof E)||r.structure||this.structure)return null;if(this.from+this.slice.size!=r.from||this.slice.openEnd||r.slice.openStart)if(r.to!=this.from||this.slice.openStart||r.slice.openEnd)return null;else{let n=this.slice.size+r.slice.size==0?s.Ji.empty:new s.Ji(r.slice.content.append(this.slice.content),r.slice.openStart,this.slice.openEnd);return new E(r.from,this.to,n,this.structure)}{let n=this.slice.size+r.slice.size==0?s.Ji.empty:new s.Ji(this.slice.content.append(r.slice.content),this.slice.openStart,r.slice.openEnd);return new E(this.from,this.to+(r.to-r.from),n,this.structure)}}toJSON(){let r={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(r.slice=this.slice.toJSON()),this.structure&&(r.structure=!0),r}static fromJSON(r,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new E(n.from,n.to,s.Ji.fromJSON(r,n.slice),!!n.structure)}}E.MAP_BIAS=1,k.jsonID("replace",E);class S extends k{constructor(r,n,i,s,o,l,a=!1){super(),this.from=r,this.to=n,this.gapFrom=i,this.gapTo=s,this.slice=o,this.insert=l,this.structure=a}apply(r){if(this.structure&&(M(r,this.from,this.gapFrom)||M(r,this.gapTo,this.to)))return b.fail("Structure gap-replace would overwrite content");let n=r.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return b.fail("Gap is not a flat range");let i=this.slice.insertAt(this.insert,n.content);return i?b.fromReplace(r,this.from,this.to,i):b.fail("Content does not fit in gap")}getMap(){return new g([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(r){let n=this.gapTo-this.gapFrom;return new S(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,r.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(r){let n=r.mapResult(this.from,1),i=r.mapResult(this.to,-1),s=this.from==this.gapFrom?n.pos:r.map(this.gapFrom,-1),o=this.to==this.gapTo?i.pos:r.map(this.gapTo,1);return n.deletedAcross&&i.deletedAcross||s<n.pos||o>i.pos?null:new S(n.pos,i.pos,s,o,this.slice,this.insert,this.structure)}toJSON(){let r={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(r.slice=this.slice.toJSON()),this.structure&&(r.structure=!0),r}static fromJSON(r,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new S(n.from,n.to,n.gapFrom,n.gapTo,s.Ji.fromJSON(r,n.slice),n.insert,!!n.structure)}}function M(r,n,i){let s=r.resolve(n),o=i-n,l=s.depth;for(;o>0&&l>0&&s.indexAfter(l)==s.node(l).childCount;)l--,o--;if(o>0){let r=s.node(l).maybeChild(s.indexAfter(l));for(;o>0;){if(!r||r.isLeaf)return!0;r=r.firstChild,o--}}return!1}function T(r,n,i,s){let o,l,a=[],u=[];r.doc.nodesBetween(n,i,(r,c,h)=>{if(!r.isInline)return;let d=r.marks;if(!s.isInSet(d)&&h.type.allowsMarkType(s.type)){let h=Math.max(c,n),p=Math.min(c+r.nodeSize,i),f=s.addToSet(d);for(let r=0;r<d.length;r++)d[r].isInSet(f)||(o&&o.to==h&&o.mark.eq(d[r])?o.to=p:a.push(o=new v(h,p,d[r])));l&&l.to==h?l.to=p:u.push(l=new x(h,p,s))}}),a.forEach(n=>r.step(n)),u.forEach(n=>r.step(n))}function D(r,n,i,o){let l=[],a=0;r.doc.nodesBetween(n,i,(r,u)=>{if(!r.isInline)return;a++;let c=null;if(o instanceof s.sX){let n=r.marks,i;for(;i=o.isInSet(n);)(c||(c=[])).push(i),n=i.removeFromSet(n)}else o?o.isInSet(r.marks)&&(c=[o]):c=r.marks;if(c&&c.length){let s=Math.min(u+r.nodeSize,i);for(let r=0;r<c.length;r++){let i=c[r],o;for(let r=0;r<l.length;r++){let n=l[r];n.step==a-1&&i.eq(l[r].style)&&(o=n)}o?(o.to=s,o.step=a):l.push({style:i,from:Math.max(u,n),to:s,step:a})}}}),l.forEach(n=>r.step(new v(n.from,n.to,n.style)))}function F(r,n,i,o=i.contentMatch,l=!0){let a=r.doc.nodeAt(n),u=[],c=n+1;for(let n=0;n<a.childCount;n++){let h=a.child(n),d=c+h.nodeSize,p=o.matchType(h.type);if(p){o=p;for(let n=0;n<h.marks.length;n++)i.allowsMarkType(h.marks[n].type)||r.step(new v(c,d,h.marks[n]));if(l&&h.isText&&"pre"!=i.whitespace){let r,n=/\r?\n|\r/g,o;for(;r=n.exec(h.text);)o||(o=new s.Ji(s.FK.from(i.schema.text(" ",i.allowedMarks(h.marks))),0,0)),u.push(new E(c+r.index,c+r.index+r[0].length,o))}}else u.push(new E(c,d,s.Ji.empty));c=d}if(!o.validEnd){let n=o.fillBefore(s.FK.empty,!0);r.replace(c,c,new s.Ji(n,0,0))}for(let n=u.length-1;n>=0;n--)r.step(u[n])}function I(r,n,i){return(0==n||r.canReplace(n,r.childCount))&&(i==r.childCount||r.canReplace(0,i))}function L(r){let n=r.parent.content.cutByIndex(r.startIndex,r.endIndex);for(let i=r.depth,s=0,o=0;;--i){let l=r.$from.node(i),a=r.$from.index(i)+s,u=r.$to.indexAfter(i)-o;if(i<r.depth&&l.canReplace(a,u,n))return i;if(0==i||l.type.spec.isolating||!I(l,a,u))break;a&&(s=1),u<l.childCount&&(o=1)}return null}function R(r,n,i){let{$from:o,$to:l,depth:a}=n,u=o.before(a+1),c=l.after(a+1),h=u,d=c,p=s.FK.empty,f=0;for(let r=a,n=!1;r>i;r--)n||o.index(r)>0?(n=!0,p=s.FK.from(o.node(r).copy(p)),f++):h--;let m=s.FK.empty,g=0;for(let r=a,n=!1;r>i;r--)n||l.after(r+1)<l.end(r)?(n=!0,m=s.FK.from(l.node(r).copy(m)),g++):d++;r.step(new S(h,d,u,c,new s.Ji(p.append(m),f,g),p.size-f,!0))}function N(r,n,i=null,s=r){let o=z(r,n),l=o&&P(s,n);return l?o.map(O).concat({type:n,attrs:i}).concat(l.map(O)):null}function O(r){return{type:r,attrs:null}}function z(r,n){let{parent:i,startIndex:s,endIndex:o}=r,l=i.contentMatchAt(s).findWrapping(n);if(!l)return null;let a=l.length?l[0]:n;return i.canReplaceWith(s,o,a)?l:null}function P(r,n){let{parent:i,startIndex:s,endIndex:o}=r,l=i.child(s),a=n.contentMatch.findWrapping(l.type);if(!a)return null;let u=(a.length?a[a.length-1]:n).contentMatch;for(let r=s;u&&r<o;r++)u=u.matchType(i.child(r).type);return u&&u.validEnd?a:null}function $(r,n,i){let o=s.FK.empty;for(let r=i.length-1;r>=0;r--){if(o.size){let n=i[r].type.contentMatch.matchFragment(o);if(!n||!n.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}o=s.FK.from(i[r].type.create(i[r].attrs,o))}let l=n.start,a=n.end;r.step(new S(l,a,l,a,new s.Ji(o,0,0),i.length,!0))}function B(r,n,i,o,l){if(!o.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let a=r.steps.length;r.doc.nodesBetween(n,i,(n,i)=>{let u="function"==typeof l?l(n):l;if(n.isTextblock&&!n.hasMarkup(o,u)&&H(r.doc,r.mapping.slice(a).map(i),o)){let l=null;if(o.schema.linebreakReplacement){let r="pre"==o.whitespace,n=!!o.contentMatch.matchType(o.schema.linebreakReplacement);r&&!n?l=!1:!r&&n&&(l=!0)}!1===l&&j(r,n,i,a),F(r,r.mapping.slice(a).map(i,1),o,void 0,null===l);let c=r.mapping.slice(a),h=c.map(i,1),d=c.map(i+n.nodeSize,1);return r.step(new S(h,d,h+1,d-1,new s.Ji(s.FK.from(o.create(u,null,n.marks)),0,0),1,!0)),!0===l&&q(r,n,i,a),!1}})}function q(r,n,i,s){n.forEach((o,l)=>{if(o.isText){let a,u=/\r?\n|\r/g;for(;a=u.exec(o.text);){let o=r.mapping.slice(s).map(i+1+l+a.index);r.replaceWith(o,o+1,n.type.schema.linebreakReplacement.create())}}})}function j(r,n,i,s){n.forEach((o,l)=>{if(o.type==o.type.schema.linebreakReplacement){let o=r.mapping.slice(s).map(i+1+l);r.replaceWith(o,o+1,n.type.schema.text("\n"))}})}function H(r,n,i){let s=r.resolve(n),o=s.index();return s.parent.canReplaceWith(o,o+1,i)}function V(r,n,i,o,l){let a=r.doc.nodeAt(n);if(!a)throw RangeError("No node at given position");i||(i=a.type);let u=i.create(o,null,l||a.marks);if(a.isLeaf)return r.replaceWith(n,n+a.nodeSize,u);if(!i.validContent(a.content))throw RangeError("Invalid content for node type "+i.name);r.step(new S(n,n+a.nodeSize,n+1,n+a.nodeSize-1,new s.Ji(s.FK.from(u),0,0),1,!0))}function U(r,n,i=1,s){let o=r.resolve(n),l=o.depth-i,a=s&&s[s.length-1]||o.parent;if(l<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let r=o.depth-1,n=i-2;r>l;r--,n--){let i=o.node(r),l=o.index(r);if(i.type.spec.isolating)return!1;let a=i.content.cutByIndex(l,i.childCount),u=s&&s[n+1];u&&(a=a.replaceChild(0,u.type.create(u.attrs)));let c=s&&s[n]||i;if(!i.canReplace(l+1,i.childCount)||!c.type.validContent(a))return!1}let u=o.indexAfter(l),c=s&&s[0];return o.node(l).canReplaceWith(u,u,c?c.type:o.node(l+1).type)}function W(r,n,i=1,o){let l=r.doc.resolve(n),a=s.FK.empty,u=s.FK.empty;for(let r=l.depth,n=l.depth-i,c=i-1;r>n;r--,c--){a=s.FK.from(l.node(r).copy(a));let n=o&&o[c];u=s.FK.from(n?n.type.create(n.attrs,u):l.node(r).copy(u))}r.step(new E(n,n,new s.Ji(a.append(u),i,i),!0))}function J(r,n){let i=r.resolve(n),s=i.index();return G(i.nodeBefore,i.nodeAfter)&&i.parent.canReplace(s,s+1)}function K(r,n){n.content.size||r.type.compatibleContent(n.type);let i=r.contentMatchAt(r.childCount),{linebreakReplacement:s}=r.type.schema;for(let o=0;o<n.childCount;o++){let l=n.child(o),a=l.type==s?r.type.schema.nodes.text:l.type;if(!(i=i.matchType(a))||!r.type.allowsMarks(l.marks))return!1}return i.validEnd}function G(r,n){return!!(r&&n&&!r.isLeaf&&K(r,n))}function Z(r,n,i=-1){let s=r.resolve(n);for(let r=s.depth;;r--){let o,l,a=s.index(r);if(r==s.depth?(o=s.nodeBefore,l=s.nodeAfter):i>0?(o=s.node(r+1),a++,l=s.node(r).maybeChild(a)):(o=s.node(r).maybeChild(a-1),l=s.node(r+1)),o&&!o.isTextblock&&G(o,l)&&s.node(r).canReplace(a,a+1))return n;if(0==r)break;n=i<0?s.before(r):s.after(r)}}function X(r,n,i){let o=null,{linebreakReplacement:l}=r.doc.type.schema,a=r.doc.resolve(n-i),u=a.node().type;if(l&&u.inlineContent){let r="pre"==u.whitespace,n=!!u.contentMatch.matchType(l);r&&!n?o=!1:!r&&n&&(o=!0)}let c=r.steps.length;if(!1===o){let s=r.doc.resolve(n+i);j(r,s.node(),s.before(),c)}u.inlineContent&&F(r,n+i-1,u,a.node().contentMatchAt(a.index()),null==o);let h=r.mapping.slice(c),d=h.map(n-i);if(r.step(new E(d,h.map(n+i,-1),s.Ji.empty,!0)),!0===o){let n=r.doc.resolve(d);q(r,n.node(),n.before(),r.steps.length)}return r}function Y(r,n,i){let s=r.resolve(n);if(s.parent.canReplaceWith(s.index(),s.index(),i))return n;if(0==s.parentOffset)for(let r=s.depth-1;r>=0;r--){let n=s.index(r);if(s.node(r).canReplaceWith(n,n,i))return s.before(r+1);if(n>0)return null}if(s.parentOffset==s.parent.content.size)for(let r=s.depth-1;r>=0;r--){let n=s.indexAfter(r);if(s.node(r).canReplaceWith(n,n,i))return s.after(r+1);if(n<s.node(r).childCount)break}return null}function Q(r,n,i){let s=r.resolve(n);if(!i.content.size)return n;let o=i.content;for(let r=0;r<i.openStart;r++)o=o.firstChild.content;for(let r=1;r<=(0==i.openStart&&i.size?2:1);r++)for(let n=s.depth;n>=0;n--){let i=n==s.depth?0:s.pos<=(s.start(n+1)+s.end(n+1))/2?-1:1,l=s.index(n)+ +(i>0),a=s.node(n),u=!1;if(1==r)u=a.canReplace(l,l,o);else{let r=a.contentMatchAt(l).findWrapping(o.firstChild.type);u=r&&a.canReplaceWith(l,l,r[0])}if(u)return 0==i?s.pos:i<0?s.before(n+1):s.after(n+1)}return null}function ee(r,n,i=n,o=s.Ji.empty){if(n==i&&!o.size)return null;let l=r.resolve(n),a=r.resolve(i);return et(l,a,o)?new E(n,i,o):new er(l,a,o).fit()}function et(r,n,i){return!i.openStart&&!i.openEnd&&r.start()==n.start()&&r.parent.canReplace(r.index(),n.index(),i.content)}k.jsonID("replaceAround",S);class er{constructor(r,n,i){this.$from=r,this.$to=n,this.unplaced=i,this.frontier=[],this.placed=s.FK.empty;for(let n=0;n<=r.depth;n++){let i=r.node(n);this.frontier.push({type:i.type,match:i.contentMatchAt(r.indexAfter(n))})}for(let n=r.depth;n>0;n--)this.placed=s.FK.from(r.node(n).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let r=this.findFittable();r?this.placeNodes(r):this.openMore()||this.dropNode()}let r=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,i=this.$from,o=this.close(r<0?this.$to:i.doc.resolve(r));if(!o)return null;let l=this.placed,a=i.depth,u=o.depth;for(;a&&u&&1==l.childCount;)l=l.firstChild.content,a--,u--;let c=new s.Ji(l,a,u);return r>-1?new S(i.pos,r,this.$to.pos,this.$to.end(),c,n):c.size||i.pos!=this.$to.pos?new E(i.pos,o.pos,c):null}findFittable(){let r=this.unplaced.openStart;for(let n=this.unplaced.content,i=0,s=this.unplaced.openEnd;i<r;i++){let o=n.firstChild;if(n.childCount>1&&(s=0),o.type.spec.isolating&&s<=i){r=i;break}n=o.content}for(let n=1;n<=2;n++)for(let i=1==n?r:this.unplaced.openStart;i>=0;i--){let r,o=null,l=(r=i?(o=es(this.unplaced.content,i-1).firstChild).content:this.unplaced.content).firstChild;for(let r=this.depth;r>=0;r--){let{type:a,match:u}=this.frontier[r],c,h=null;if(1==n&&(l?u.matchType(l.type)||(h=u.fillBefore(s.FK.from(l),!1)):o&&a.compatibleContent(o.type)))return{sliceDepth:i,frontierDepth:r,parent:o,inject:h};if(2==n&&l&&(c=u.findWrapping(l.type)))return{sliceDepth:i,frontierDepth:r,parent:o,wrap:c};if(o&&u.matchType(o.type))break}}}openMore(){let{content:r,openStart:n,openEnd:i}=this.unplaced,o=es(r,n);return!!o.childCount&&!o.firstChild.isLeaf&&(this.unplaced=new s.Ji(r,n+1,Math.max(i,o.size+n>=r.size-i?n+1:0)),!0)}dropNode(){let{content:r,openStart:n,openEnd:i}=this.unplaced,o=es(r,n);if(o.childCount<=1&&n>0){let l=r.size-n<=n+o.size;this.unplaced=new s.Ji(en(r,n-1,1),n-1,l?n-1:i)}else this.unplaced=new s.Ji(en(r,n,1),n,i)}placeNodes({sliceDepth:r,frontierDepth:n,parent:i,inject:o,wrap:l}){for(;this.depth>n;)this.closeFrontierNode();if(l)for(let r=0;r<l.length;r++)this.openFrontierNode(l[r]);let a=this.unplaced,u=i?i.content:a.content,c=a.openStart-r,h=0,d=[],{match:p,type:f}=this.frontier[n];if(o){for(let r=0;r<o.childCount;r++)d.push(o.child(r));p=p.matchFragment(o)}let m=u.size+r-(a.content.size-a.openEnd);for(;h<u.childCount;){let r=u.child(h),n=p.matchType(r.type);if(!n)break;(++h>1||0==c||r.content.size)&&(p=n,d.push(eo(r.mark(f.allowedMarks(r.marks)),1==h?c:0,h==u.childCount?m:-1)))}let g=h==u.childCount;g||(m=-1),this.placed=ei(this.placed,n,s.FK.from(d)),this.frontier[n].match=p,g&&m<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let r=0,n=u;r<m;r++){let r=n.lastChild;this.frontier.push({type:r.type,match:r.contentMatchAt(r.childCount)}),n=r.content}this.unplaced=g?0==r?s.Ji.empty:new s.Ji(en(a.content,r-1,1),r-1,m<0?a.openEnd:r-1):new s.Ji(en(a.content,r,h),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let r=this.frontier[this.depth],n;if(!r.type.isTextblock||!el(this.$to,this.$to.depth,r.type,r.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return -1;let{depth:i}=this.$to,s=this.$to.after(i);for(;i>1&&s==this.$to.end(--i);)++s;return s}findCloseLevel(r){t:for(let n=Math.min(this.depth,r.depth);n>=0;n--){let{match:i,type:s}=this.frontier[n],o=n<r.depth&&r.end(n+1)==r.pos+(r.depth-(n+1)),l=el(r,n,s,i,o);if(l){for(let i=n-1;i>=0;i--){let{match:n,type:s}=this.frontier[i],o=el(r,i,s,n,!0);if(!o||o.childCount)continue t}return{depth:n,fit:l,move:o?r.doc.resolve(r.after(n+1)):r}}}}close(r){let n=this.findCloseLevel(r);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=ei(this.placed,n.depth,n.fit)),r=n.move;for(let i=n.depth+1;i<=r.depth;i++){let n=r.node(i),s=n.type.contentMatch.fillBefore(n.content,!0,r.index(i));this.openFrontierNode(n.type,n.attrs,s)}return r}openFrontierNode(r,n=null,i){let o=this.frontier[this.depth];o.match=o.match.matchType(r),this.placed=ei(this.placed,this.depth,s.FK.from(r.create(n,i))),this.frontier.push({type:r,match:r.contentMatch})}closeFrontierNode(){let r=this.frontier.pop().match.fillBefore(s.FK.empty,!0);r.childCount&&(this.placed=ei(this.placed,this.frontier.length,r))}}function en(r,n,i){return 0==n?r.cutByIndex(i,r.childCount):r.replaceChild(0,r.firstChild.copy(en(r.firstChild.content,n-1,i)))}function ei(r,n,i){return 0==n?r.append(i):r.replaceChild(r.childCount-1,r.lastChild.copy(ei(r.lastChild.content,n-1,i)))}function es(r,n){for(let i=0;i<n;i++)r=r.firstChild.content;return r}function eo(r,n,i){if(n<=0)return r;let o=r.content;return n>1&&(o=o.replaceChild(0,eo(o.firstChild,n-1,1==o.childCount?i-1:0))),n>0&&(o=r.type.contentMatch.fillBefore(o).append(o),i<=0&&(o=o.append(r.type.contentMatch.matchFragment(o).fillBefore(s.FK.empty,!0)))),r.copy(o)}function el(r,n,i,s,o){let l=r.node(n),a=o?r.indexAfter(n):r.index(n);if(a==l.childCount&&!i.compatibleContent(l.type))return null;let u=s.fillBefore(l.content,!0,a);return u&&!ea(i,l.content,a)?u:null}function ea(r,n,i){for(let s=i;s<n.childCount;s++)if(!r.allowsMarks(n.child(s).marks))return!0;return!1}function eu(r){return r.spec.defining||r.spec.definingForContent}function ec(r,n,i,o){if(!o.size)return r.deleteRange(n,i);let l=r.doc.resolve(n),a=r.doc.resolve(i);if(et(l,a,o))return r.step(new E(n,i,o));let u=ef(l,a);0==u[u.length-1]&&u.pop();let c=-(l.depth+1);u.unshift(c);for(let r=l.depth,n=l.pos-1;r>0;r--,n--){let i=l.node(r).type.spec;if(i.defining||i.definingAsContext||i.isolating)break;u.indexOf(r)>-1?c=r:l.before(r)==n&&u.splice(1,0,-r)}let h=u.indexOf(c),d=[],p=o.openStart;for(let r=o.content,n=0;;n++){let i=r.firstChild;if(d.push(i),n==o.openStart)break;r=i.content}for(let r=p-1;r>=0;r--){let n=d[r],i=eu(n.type);if(i&&!n.sameMarkup(l.node(Math.abs(c)-1)))p=r;else if(i||!n.type.isTextblock)break}for(let n=o.openStart;n>=0;n--){let c=(n+p+1)%(o.openStart+1),f=d[c];if(f)for(let n=0;n<u.length;n++){let d=u[(n+h)%u.length],p=!0;d<0&&(p=!1,d=-d);let m=l.node(d-1),g=l.index(d-1);if(m.canReplaceWith(g,g,f.type,f.marks))return r.replace(l.before(d),p?a.after(d):i,new s.Ji(eh(o.content,0,o.openStart,c),c,o.openEnd))}}let f=r.steps.length;for(let s=u.length-1;s>=0&&(r.replace(n,i,o),!(r.steps.length>f));s--){let r=u[s];r<0||(n=l.before(r),i=a.after(r))}}function eh(r,n,i,o,l){if(n<i){let s=r.firstChild;r=r.replaceChild(0,s.copy(eh(s.content,n+1,i,o,s)))}if(n>o){let n=l.contentMatchAt(0),i=n.fillBefore(r).append(r);r=i.append(n.matchFragment(i).fillBefore(s.FK.empty,!0))}return r}function ed(r,n,i,o){if(!o.isInline&&n==i&&r.doc.resolve(n).parent.content.size){let s=Y(r.doc,n,o.type);null!=s&&(n=i=s)}r.replaceRange(n,i,new s.Ji(s.FK.from(o),0,0))}function ep(r,n,i){let s=r.doc.resolve(n),o=r.doc.resolve(i);if(s.parent.isTextblock&&o.parent.isTextblock&&s.start()!=o.start()&&0==s.parentOffset&&0==o.parentOffset){let l=s.sharedDepth(i),a=!1;for(let r=s.depth;r>l;r--)s.node(r).type.spec.isolating&&(a=!0);for(let r=o.depth;r>l;r--)o.node(r).type.spec.isolating&&(a=!0);if(!a){for(let r=s.depth;r>0&&n==s.start(r);r--)n=s.before(r);for(let r=o.depth;r>0&&i==o.start(r);r--)i=o.before(r);s=r.doc.resolve(n),o=r.doc.resolve(i)}}let l=ef(s,o);for(let n=0;n<l.length;n++){let i=l[n],a=n==l.length-1;if(a&&0==i||s.node(i).type.contentMatch.validEnd)return r.delete(s.start(i),o.end(i));if(i>0&&(a||s.node(i-1).canReplace(s.index(i-1),o.indexAfter(i-1))))return r.delete(s.before(i),o.after(i))}for(let l=1;l<=s.depth&&l<=o.depth;l++)if(n-s.start(l)==s.depth-l&&i>s.end(l)&&o.end(l)-i!=o.depth-l&&s.start(l-1)==o.start(l-1)&&s.node(l-1).canReplace(s.index(l-1),o.index(l-1)))return r.delete(s.before(l),i);r.delete(n,i)}function ef(r,n){let i=[],s=Math.min(r.depth,n.depth);for(let o=s;o>=0;o--){let s=r.start(o);if(s<r.pos-(r.depth-o)||n.end(o)>n.pos+(n.depth-o)||r.node(o).type.spec.isolating||n.node(o).type.spec.isolating)break;(s==n.start(o)||o==r.depth&&o==n.depth&&r.parent.inlineContent&&n.parent.inlineContent&&o&&n.start(o-1)==s-1)&&i.push(o)}return i}class em extends k{constructor(r,n,i){super(),this.pos=r,this.attr=n,this.value=i}apply(r){let n=r.nodeAt(this.pos);if(!n)return b.fail("No node at attribute step's position");let i=Object.create(null);for(let r in n.attrs)i[r]=n.attrs[r];i[this.attr]=this.value;let o=n.type.create(i,null,n.marks);return b.fromReplace(r,this.pos,this.pos+1,new s.Ji(s.FK.from(o),0,+!n.isLeaf))}getMap(){return g.empty}invert(r){return new em(this.pos,this.attr,r.nodeAt(this.pos).attrs[this.attr])}map(r){let n=r.mapResult(this.pos,1);return n.deletedAfter?null:new em(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(r,n){if("number"!=typeof n.pos||"string"!=typeof n.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new em(n.pos,n.attr,n.value)}}k.jsonID("attr",em);class eg extends k{constructor(r,n){super(),this.attr=r,this.value=n}apply(r){let n=Object.create(null);for(let i in r.attrs)n[i]=r.attrs[i];n[this.attr]=this.value;let i=r.type.create(n,r.content,r.marks);return b.ok(i)}getMap(){return g.empty}invert(r){return new eg(this.attr,r.attrs[this.attr])}map(r){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(r,n){if("string"!=typeof n.attr)throw RangeError("Invalid input for DocAttrStep.fromJSON");return new eg(n.attr,n.value)}}k.jsonID("docAttr",eg);let e_=class extends Error{};(e_=function r(n){let i=Error.call(this,n);return i.__proto__=r.prototype,i}).prototype=Object.create(Error.prototype),e_.prototype.constructor=e_,e_.prototype.name="TransformError";class ey{constructor(r){this.doc=r,this.steps=[],this.docs=[],this.mapping=new _}get before(){return this.docs.length?this.docs[0]:this.doc}step(r){let n=this.maybeStep(r);if(n.failed)throw new e_(n.failed);return this}maybeStep(r){let n=r.apply(this.doc);return n.failed||this.addStep(r,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let r=1e9,n=-1e9;for(let i=0;i<this.mapping.maps.length;i++){let s=this.mapping.maps[i];i&&(r=s.map(r,1),n=s.map(n,-1)),s.forEach((i,s,o,l)=>{r=Math.min(r,o),n=Math.max(n,l)})}return 1e9==r?null:{from:r,to:n}}addStep(r,n){this.docs.push(this.doc),this.steps.push(r),this.mapping.appendMap(r.getMap()),this.doc=n}replace(r,n=r,i=s.Ji.empty){let o=ee(this.doc,r,n,i);return o&&this.step(o),this}replaceWith(r,n,i){return this.replace(r,n,new s.Ji(s.FK.from(i),0,0))}delete(r,n){return this.replace(r,n,s.Ji.empty)}insert(r,n){return this.replaceWith(r,r,n)}replaceRange(r,n,i){return ec(this,r,n,i),this}replaceRangeWith(r,n,i){return ed(this,r,n,i),this}deleteRange(r,n){return ep(this,r,n),this}lift(r,n){return R(this,r,n),this}join(r,n=1){return X(this,r,n),this}wrap(r,n){return $(this,r,n),this}setBlockType(r,n=r,i,s=null){return B(this,r,n,i,s),this}setNodeMarkup(r,n,i=null,s){return V(this,r,n,i,s),this}setNodeAttribute(r,n,i){return this.step(new em(r,n,i)),this}setDocAttribute(r,n){return this.step(new eg(r,n)),this}addNodeMark(r,n){return this.step(new C(r,n)),this}removeNodeMark(r,n){let i=this.doc.nodeAt(r);if(!i)throw RangeError("No node at position "+r);if(n instanceof s.CU)n.isInSet(i.marks)&&this.step(new A(r,n));else{let s=i.marks,o,l=[];for(;o=n.isInSet(s);)l.push(new A(r,o)),s=o.removeFromSet(s);for(let r=l.length-1;r>=0;r--)this.step(l[r])}return this}split(r,n=1,i){return W(this,r,n,i),this}addMark(r,n,i){return T(this,r,n,i),this}removeMark(r,n,i){return D(this,r,n,i),this}clearIncompatible(r,n,i){return F(this,r,n,i),this}}},10762:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],l=(0,s.A)("terminal",o)},12894:(r,n,i)=>{"use strict";i.d(n,{K:()=>k,w:()=>y});for(var s={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:"'"},o={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},l="u">typeof navigator&&/Mac/.test(navigator.platform),a="u">typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),u=0;u<10;u++)s[48+u]=s[96+u]=String(u);for(var u=1;u<=24;u++)s[u+111]="F"+u;for(var u=65;u<=90;u++)s[u]=String.fromCharCode(u+32),o[u]=String.fromCharCode(u);for(var c in s)o.hasOwnProperty(c)||(o[c]=s[c]);function h(r){var n=!(l&&r.metaKey&&r.shiftKey&&!r.ctrlKey&&!r.altKey||a&&r.shiftKey&&r.key&&1==r.key.length||"Unidentified"==r.key)&&r.key||(r.shiftKey?o:s)[r.keyCode]||r.key||"Unidentified";return"Esc"==n&&(n="Escape"),"Del"==n&&(n="Delete"),"Left"==n&&(n="ArrowLeft"),"Up"==n&&(n="ArrowUp"),"Right"==n&&(n="ArrowRight"),"Down"==n&&(n="ArrowDown"),n}var d=i(76865);let p="u">typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),f="u">typeof navigator&&/Win/.test(navigator.platform);function m(r){let n,i,s,o,l=r.split(/-(?!$)/),a=l[l.length-1];"Space"==a&&(a=" ");for(let r=0;r<l.length-1;r++){let a=l[r];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))n=!0;else if(/^(c|ctrl|control)$/i.test(a))i=!0;else if(/^s(hift)?$/i.test(a))s=!0;else if(/^mod$/i.test(a))p?o=!0:i=!0;else throw Error("Unrecognized modifier name: "+a)}return n&&(a="Alt-"+a),i&&(a="Ctrl-"+a),o&&(a="Meta-"+a),s&&(a="Shift-"+a),a}function g(r){let n=Object.create(null);for(let i in r)n[m(i)]=r[i];return n}function _(r,n,i=!0){return n.altKey&&(r="Alt-"+r),n.ctrlKey&&(r="Ctrl-"+r),n.metaKey&&(r="Meta-"+r),i&&n.shiftKey&&(r="Shift-"+r),r}function y(r){return new d.k_({props:{handleKeyDown:k(r)}})}function k(r){let n=g(r);return function(r,i){let o=h(i),l,a=n[_(o,i)];if(a&&a(r.state,r.dispatch,r))return!0;if(1==o.length&&" "!=o){if(i.shiftKey){let s=n[_(o,i,!1)];if(s&&s(r.state,r.dispatch,r))return!0}if((i.altKey||i.metaKey||i.ctrlKey)&&!(f&&i.ctrlKey&&i.altKey)&&(l=s[i.keyCode])&&l!=o){let s=n[_(l,i)];if(s&&s(r.state,r.dispatch,r))return!0}}return!1}}},13439:(r,n,i)=>{"use strict";i.d(n,{$Z:()=>ep,hG:()=>ew});var s=i(12115),o=i(47650),l=i(8039),a=i(95155),u=i(82159);let{getOwnPropertyNames:c,getOwnPropertySymbols:h}=Object,{hasOwnProperty:d}=Object.prototype;function p(r,n){return function(i,s,o){return r(i,s,o)&&n(i,s,o)}}function f(r){return function(n,i,s){if(!n||!i||"object"!=typeof n||"object"!=typeof i)return r(n,i,s);let{cache:o}=s,l=o.get(n),a=o.get(i);if(l&&a)return l===i&&a===n;o.set(n,i),o.set(i,n);let u=r(n,i,s);return o.delete(n),o.delete(i),u}}function m(r){return null!=r?r[Symbol.toStringTag]:void 0}function g(r){return c(r).concat(h(r))}let _=Object.hasOwn||((r,n)=>d.call(r,n));function y(r,n){return r===n||!r&&!n&&r!=r&&n!=n}let k="__v",b="__o",w="_owner",{getOwnPropertyDescriptor:x,keys:v}=Object;function C(r,n){return r.byteLength===n.byteLength&&z(new Uint8Array(r),new Uint8Array(n))}function A(r,n,i){let s=r.length;if(n.length!==s)return!1;for(;s-- >0;)if(!i.equals(r[s],n[s],s,s,r,n,i))return!1;return!0}function E(r,n){return r.byteLength===n.byteLength&&z(new Uint8Array(r.buffer,r.byteOffset,r.byteLength),new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}function S(r,n){return y(r.getTime(),n.getTime())}function M(r,n){return r.name===n.name&&r.message===n.message&&r.cause===n.cause&&r.stack===n.stack}function T(r,n){return r===n}function D(r,n,i){let s,o,l=r.size;if(l!==n.size)return!1;if(!l)return!0;let a=Array(l),u=r.entries(),c=0;for(;(s=u.next())&&!s.done;){let l=n.entries(),u=!1,h=0;for(;(o=l.next())&&!o.done;){if(a[h]){h++;continue}let l=s.value,d=o.value;if(i.equals(l[0],d[0],c,h,r,n,i)&&i.equals(l[1],d[1],l[0],d[0],r,n,i)){u=a[h]=!0;break}h++}if(!u)return!1;c++}return!0}let F=y;function I(r,n,i){let s=v(r),o=s.length;if(v(n).length!==o)return!1;for(;o-- >0;)if(!$(r,n,i,s[o]))return!1;return!0}function L(r,n,i){let s,o,l,a=g(r),u=a.length;if(g(n).length!==u)return!1;for(;u-- >0;)if(!$(r,n,i,s=a[u])||(o=x(r,s),l=x(n,s),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function R(r,n){return y(r.valueOf(),n.valueOf())}function N(r,n){return r.source===n.source&&r.flags===n.flags}function O(r,n,i){let s,o,l=r.size;if(l!==n.size)return!1;if(!l)return!0;let a=Array(l),u=r.values();for(;(s=u.next())&&!s.done;){let l=n.values(),u=!1,c=0;for(;(o=l.next())&&!o.done;){if(!a[c]&&i.equals(s.value,o.value,s.value,o.value,r,n,i)){u=a[c]=!0;break}c++}if(!u)return!1}return!0}function z(r,n){let i=r.byteLength;if(n.byteLength!==i||r.byteOffset!==n.byteOffset)return!1;for(;i-- >0;)if(r[i]!==n[i])return!1;return!0}function P(r,n){return r.hostname===n.hostname&&r.pathname===n.pathname&&r.protocol===n.protocol&&r.port===n.port&&r.hash===n.hash&&r.username===n.username&&r.password===n.password}function $(r,n,i,s){return(s===w||s===b||s===k)&&(!!r.$$typeof||!!n.$$typeof)||_(n,s)&&i.equals(r[s],n[s],s,s,r,n,i)}let B="[object ArrayBuffer]",q="[object Arguments]",j="[object Boolean]",H="[object DataView]",V="[object Date]",U="[object Error]",W="[object Map]",J="[object Number]",K="[object Object]",G="[object RegExp]",Z="[object Set]",X="[object String]",Y={"[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},Q="[object URL]",ee=Object.prototype.toString;function et({areArrayBuffersEqual:r,areArraysEqual:n,areDataViewsEqual:i,areDatesEqual:s,areErrorsEqual:o,areFunctionsEqual:l,areMapsEqual:a,areNumbersEqual:u,areObjectsEqual:c,arePrimitiveWrappersEqual:h,areRegExpsEqual:d,areSetsEqual:p,areTypedArraysEqual:f,areUrlsEqual:g,unknownTagComparators:_}){return function(y,k,b){if(y===k)return!0;if(null==y||null==k)return!1;let w=typeof y;if(w!==typeof k)return!1;if("object"!==w)return"number"===w?u(y,k,b):"function"===w&&l(y,k,b);let x=y.constructor;if(x!==k.constructor)return!1;if(x===Object)return c(y,k,b);if(Array.isArray(y))return n(y,k,b);if(x===Date)return s(y,k,b);if(x===RegExp)return d(y,k,b);if(x===Map)return a(y,k,b);if(x===Set)return p(y,k,b);let v=ee.call(y);if(v===V)return s(y,k,b);if(v===G)return d(y,k,b);if(v===W)return a(y,k,b);if(v===Z)return p(y,k,b);if(v===K)return"function"!=typeof y.then&&"function"!=typeof k.then&&c(y,k,b);if(v===Q)return g(y,k,b);if(v===U)return o(y,k,b);if(v===q)return c(y,k,b);if(Y[v])return f(y,k,b);if(v===B)return r(y,k,b);if(v===H)return i(y,k,b);if(v===j||v===J||v===X)return h(y,k,b);if(_){let r=_[v];if(!r){let n=m(y);n&&(r=_[n])}if(r)return r(y,k,b)}return!1}}function er({circular:r,createCustomConfig:n,strict:i}){let s={areArrayBuffersEqual:C,areArraysEqual:i?L:A,areDataViewsEqual:E,areDatesEqual:S,areErrorsEqual:M,areFunctionsEqual:T,areMapsEqual:i?p(D,L):D,areNumbersEqual:F,areObjectsEqual:i?L:I,arePrimitiveWrappersEqual:R,areRegExpsEqual:N,areSetsEqual:i?p(O,L):O,areTypedArraysEqual:i?p(z,L):z,areUrlsEqual:P,unknownTagComparators:void 0};if(n&&(s=Object.assign({},s,n(s))),r){let r=f(s.areArraysEqual),n=f(s.areMapsEqual),i=f(s.areObjectsEqual),o=f(s.areSetsEqual);s=Object.assign({},s,{areArraysEqual:r,areMapsEqual:n,areObjectsEqual:i,areSetsEqual:o})}return s}function en(r){return function(n,i,s,o,l,a,u){return r(n,i,u)}}function ei({circular:r,comparator:n,createState:i,equals:s,strict:o}){if(i)return function(l,a){let{cache:u=r?new WeakMap:void 0,meta:c}=i();return n(l,a,{cache:u,equals:s,meta:c,strict:o})};if(r)return function(r,i){return n(r,i,{cache:new WeakMap,equals:s,meta:void 0,strict:o})};let l={cache:void 0,equals:s,meta:void 0,strict:o};return function(r,i){return n(r,i,l)}}let es=eo();function eo(r={}){let{circular:n=!1,createInternalComparator:i,createState:s,strict:o=!1}=r,l=et(er(r)),a=i?i(l):en(l);return ei({circular:n,comparator:l,createState:s,equals:a,strict:o})}eo({strict:!0}),eo({circular:!0}),eo({circular:!0,strict:!0}),eo({createInternalComparator:()=>y}),eo({strict:!0,createInternalComparator:()=>y}),eo({circular:!0,createInternalComparator:()=>y}),eo({circular:!0,createInternalComparator:()=>y,strict:!0});var el=i(94577),ea=(...r)=>n=>{r.forEach(r=>{"function"==typeof r?r(n):r&&(r.current=n)})},eu=({contentComponent:r})=>{let n=(0,l.useSyncExternalStore)(r.subscribe,r.getSnapshot,r.getServerSnapshot);return(0,a.jsx)(a.Fragment,{children:Object.values(n)})};function ec(){let r=new Set,n={};return{subscribe:n=>(r.add(n),()=>{r.delete(n)}),getSnapshot:()=>n,getServerSnapshot:()=>n,setRenderer(i,s){n={...n,[i]:o.createPortal(s.reactElement,s.element,i)},r.forEach(r=>r())},removeRenderer(i){let s={...n};delete s[i],n=s,r.forEach(r=>r())}}}var eh=class extends s.Component{constructor(r){super(r),this.editorContentRef=s.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var r;let n=this.props.editor;if(n&&!n.isDestroyed&&(null==(r=n.view.dom)?void 0:r.parentNode)){if(n.contentComponent)return;let r=this.editorContentRef.current;r.append(...n.view.dom.parentNode.childNodes),n.setOptions({element:r}),n.contentComponent=ec(),n.createNodeViews(),n.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var r;let n=this.props.editor;if(n){n.isEditorContentInitialized=!1,n.isDestroyed||n.view.setProps({nodeViews:{}}),n.contentComponent=null;try{if(!(null==(r=n.view.dom)?void 0:r.parentNode))return;let i=document.createElement("div");i.append(...n.view.dom.parentNode.childNodes),n.setOptions({element:i})}catch{}}}render(){let{editor:r,innerRef:n,...i}=this.props;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{ref:ea(n,this.editorContentRef),...i}),(null==r?void 0:r.contentComponent)&&(0,a.jsx)(eu,{contentComponent:r.contentComponent})]})}},ed=(0,s.forwardRef)((r,n)=>{let i=s.useMemo(()=>Math.floor(0xffffffff*Math.random()).toString(),[r.editor]);return s.createElement(eh,{key:i,innerRef:n,...r})}),ep=s.memo(ed),ef="u">typeof window?s.useLayoutEffect:s.useEffect,em=class{constructor(r){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=r,this.lastSnapshot={editor:r,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(r){return this.subscribers.add(r),()=>{this.subscribers.delete(r)}}watch(r){if(this.editor=r,this.editor){let r=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",r),()=>{n.off("transaction",r)}}}};function eg(r){var n;let[i]=(0,s.useState)(()=>new em(r.editor)),o=(0,el.useSyncExternalStoreWithSelector)(i.subscribe,i.getSnapshot,i.getServerSnapshot,r.selector,null!=(n=r.equalityFn)?n:es);return ef(()=>i.watch(r.editor),[r.editor,i]),(0,s.useDebugValue)(o),o}var e_=!1,ey="u"<typeof window,ek=ey||!!("u">typeof window&&window.next),eb=class r{constructor(r){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=r,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(r){this.editor=r,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(r=>r())}getInitialEditor(){if(void 0===this.options.current.immediatelyRender){if(ey||ek){if(e_)throw Error("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches.");return null}return this.createEditor()}if(this.options.current.immediatelyRender&&ey&&e_)throw Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){let r={...this.options.current,onBeforeCreate:(...r)=>{var n,i;return null==(i=(n=this.options.current).onBeforeCreate)?void 0:i.call(n,...r)},onBlur:(...r)=>{var n,i;return null==(i=(n=this.options.current).onBlur)?void 0:i.call(n,...r)},onCreate:(...r)=>{var n,i;return null==(i=(n=this.options.current).onCreate)?void 0:i.call(n,...r)},onDestroy:(...r)=>{var n,i;return null==(i=(n=this.options.current).onDestroy)?void 0:i.call(n,...r)},onFocus:(...r)=>{var n,i;return null==(i=(n=this.options.current).onFocus)?void 0:i.call(n,...r)},onSelectionUpdate:(...r)=>{var n,i;return null==(i=(n=this.options.current).onSelectionUpdate)?void 0:i.call(n,...r)},onTransaction:(...r)=>{var n,i;return null==(i=(n=this.options.current).onTransaction)?void 0:i.call(n,...r)},onUpdate:(...r)=>{var n,i;return null==(i=(n=this.options.current).onUpdate)?void 0:i.call(n,...r)},onContentError:(...r)=>{var n,i;return null==(i=(n=this.options.current).onContentError)?void 0:i.call(n,...r)},onDrop:(...r)=>{var n,i;return null==(i=(n=this.options.current).onDrop)?void 0:i.call(n,...r)},onPaste:(...r)=>{var n,i;return null==(i=(n=this.options.current).onPaste)?void 0:i.call(n,...r)},onDelete:(...r)=>{var n,i;return null==(i=(n=this.options.current).onDelete)?void 0:i.call(n,...r)}};return new u.KE(r)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(r){return this.subscriptions.add(r),()=>{this.subscriptions.delete(r)}}static compareOptions(r,n){return Object.keys(r).every(i=>!!["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(i)||("extensions"===i&&r.extensions&&n.extensions?r.extensions.length===n.extensions.length&&r.extensions.every((r,i)=>{var s;return r===(null==(s=n.extensions)?void 0:s[i])}):r[i]===n[i]))}onRender(n){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&0===n.length?r.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(n),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(r){if(this.editor&&!this.editor.isDestroyed){if(null===this.previousDeps){this.previousDeps=r;return}if(this.previousDeps.length===r.length&&this.previousDeps.every((n,i)=>n===r[i]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=r}scheduleDestroy(){let r=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===r){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===r&&this.setEditor(null))},1)}};function ew(r={},n=[]){let i=(0,s.useRef)(r);i.current=r;let[o]=(0,s.useState)(()=>new eb(i)),a=(0,l.useSyncExternalStore)(o.subscribe,o.getEditor,o.getServerSnapshot);return(0,s.useDebugValue)(a),(0,s.useEffect)(o.onRender(n)),eg({editor:a,selector:({transactionNumber:n})=>!1===r.shouldRerenderOnTransaction||void 0===r.shouldRerenderOnTransaction?null:r.immediatelyRender&&0===n?0:n+1}),a}var ex=(0,s.createContext)({editor:null});ex.Consumer;var ev=(0,s.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),eC=()=>(0,s.useContext)(ev);s.forwardRef((r,n)=>{let{onDragStart:i}=eC(),s=r.as||"div";return(0,a.jsx)(s,{...r,ref:n,"data-node-view-wrapper":"",onDragStart:i,style:{whiteSpace:"normal",...r.style}})}),s.createContext({markViewContentRef:()=>{}}),u.Db,u.Yv;var eA=(0,s.createContext)({get editor(){throw Error("useTiptap must be used within a <Tiptap> provider")}});eA.displayName="TiptapContext";var eE=()=>(0,s.useContext)(eA);function eS({editor:r,instance:n,children:i}){let o=null!=r?r:n;if(!o)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let l=(0,s.useMemo)(()=>({editor:o}),[o]),u=(0,s.useMemo)(()=>({editor:o}),[o]);return(0,a.jsx)(ex.Provider,{value:u,children:(0,a.jsx)(eA.Provider,{value:l,children:i})})}function eM({...r}){let{editor:n}=eE();return(0,a.jsx)(ep,{editor:n,...r})}eS.displayName="Tiptap",eM.displayName="Tiptap.Content",Object.assign(eS,{Content:eM})},14066:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{TM:()=>Language,iX:()=>Parser});var C,TRANSFER_BUFFER,LANGUAGE_VERSION,MIN_COMPATIBLE_VERSION,process=__webpack_require__(41463),__defProp=Object.defineProperty,__name=(r,n)=>__defProp(r,"name",{value:n,configurable:!0}),Edit=class{static{__name(this,"Edit")}startPosition;oldEndPosition;newEndPosition;startIndex;oldEndIndex;newEndIndex;constructor({startIndex:r,oldEndIndex:n,newEndIndex:i,startPosition:s,oldEndPosition:o,newEndPosition:l}){this.startIndex=r>>>0,this.oldEndIndex=n>>>0,this.newEndIndex=i>>>0,this.startPosition=s,this.oldEndPosition=o,this.newEndPosition=l}editPoint(r,n){let i=n,s={...r};if(n>=this.oldEndIndex){i=this.newEndIndex+(n-this.oldEndIndex);let o=r.row;s.row=this.newEndPosition.row+(r.row-this.oldEndPosition.row),s.column=o===this.oldEndPosition.row?this.newEndPosition.column+(r.column-this.oldEndPosition.column):r.column}else n>this.startIndex&&(i=this.newEndIndex,s.row=this.newEndPosition.row,s.column=this.newEndPosition.column);return{point:s,index:i}}editRange(r){let n={startIndex:r.startIndex,startPosition:{...r.startPosition},endIndex:r.endIndex,endPosition:{...r.endPosition}};return r.endIndex>=this.oldEndIndex?r.endIndex!==Number.MAX_SAFE_INTEGER&&(n.endIndex=this.newEndIndex+(r.endIndex-this.oldEndIndex),n.endPosition={row:this.newEndPosition.row+(r.endPosition.row-this.oldEndPosition.row),column:r.endPosition.row===this.oldEndPosition.row?this.newEndPosition.column+(r.endPosition.column-this.oldEndPosition.column):r.endPosition.column},n.endIndex<this.newEndIndex&&(n.endIndex=Number.MAX_SAFE_INTEGER,n.endPosition={row:Number.MAX_SAFE_INTEGER,column:Number.MAX_SAFE_INTEGER})):r.endIndex>this.startIndex&&(n.endIndex=this.startIndex,n.endPosition={...this.startPosition}),r.startIndex>=this.oldEndIndex?(n.startIndex=this.newEndIndex+(r.startIndex-this.oldEndIndex),n.startPosition={row:this.newEndPosition.row+(r.startPosition.row-this.oldEndPosition.row),column:r.startPosition.row===this.oldEndPosition.row?this.newEndPosition.column+(r.startPosition.column-this.oldEndPosition.column):r.startPosition.column},n.startIndex<this.newEndIndex&&(n.startIndex=Number.MAX_SAFE_INTEGER,n.startPosition={row:Number.MAX_SAFE_INTEGER,column:Number.MAX_SAFE_INTEGER})):r.startIndex>this.startIndex&&(n.startIndex=this.startIndex,n.startPosition={...this.startPosition}),n}},SIZE_OF_SHORT=2,SIZE_OF_INT=4,SIZE_OF_CURSOR=4*SIZE_OF_INT,SIZE_OF_NODE=5*SIZE_OF_INT,SIZE_OF_POINT=2*SIZE_OF_INT,SIZE_OF_RANGE=2*SIZE_OF_INT+2*SIZE_OF_POINT,ZERO_POINT={row:0,column:0},INTERNAL=Symbol("INTERNAL");function assertInternal(r){if(r!==INTERNAL)throw Error("Illegal constructor")}function isPoint(r){return!!r&&"number"==typeof r.row&&"number"==typeof r.column}function setModule(r){C=r}__name(assertInternal,"assertInternal"),__name(isPoint,"isPoint"),__name(setModule,"setModule");var LookaheadIterator=class{static{__name(this,"LookaheadIterator")}0=0;language;constructor(r,n,i){assertInternal(r),this[0]=n,this.language=i}get currentTypeId(){return C._ts_lookahead_iterator_current_symbol(this[0])}get currentType(){return this.language.types[this.currentTypeId]||"ERROR"}delete(){C._ts_lookahead_iterator_delete(this[0]),this[0]=0}reset(r,n){return!!C._ts_lookahead_iterator_reset(this[0],r[0],n)&&(this.language=r,!0)}resetState(r){return!!C._ts_lookahead_iterator_reset_state(this[0],r)}[Symbol.iterator](){return{next:__name(()=>C._ts_lookahead_iterator_next(this[0])?{done:!1,value:this.currentType}:{done:!0,value:""},"next")}}};function getText(r,n,i,s){let o=i-n,l=r.textCallback(n,s);if(l){for(n+=l.length;n<i;){let i=r.textCallback(n,s);if(i&&i.length>0)n+=i.length,l+=i;else break}n>i&&(l=l.slice(0,o))}return l??""}__name(getText,"getText");var Tree=class _Tree{static{__name(this,"Tree")}0=0;textCallback;language;constructor(r,n,i,s){assertInternal(r),this[0]=n,this.language=i,this.textCallback=s}copy(){return new _Tree(INTERNAL,C._ts_tree_copy(this[0]),this.language,this.textCallback)}delete(){C._ts_tree_delete(this[0]),this[0]=0}get rootNode(){return C._ts_tree_root_node_wasm(this[0]),unmarshalNode(this)}rootNodeWithOffset(r,n){let i=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(i,r,"i32"),marshalPoint(i+SIZE_OF_INT,n),C._ts_tree_root_node_with_offset_wasm(this[0]),unmarshalNode(this)}edit(r){marshalEdit(r),C._ts_tree_edit_wasm(this[0])}walk(){return this.rootNode.walk()}getChangedRanges(r){if(!(r instanceof _Tree))throw TypeError("Argument must be a Tree");C._ts_tree_get_changed_ranges_wasm(this[0],r[0]);let n=C.getValue(TRANSFER_BUFFER,"i32"),i=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),s=Array(n);if(n>0){let r=i;for(let i=0;i<n;i++)s[i]=unmarshalRange(r),r+=SIZE_OF_RANGE;C._free(i)}return s}getIncludedRanges(){C._ts_tree_included_ranges_wasm(this[0]);let r=C.getValue(TRANSFER_BUFFER,"i32"),n=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),i=Array(r);if(r>0){let s=n;for(let n=0;n<r;n++)i[n]=unmarshalRange(s),s+=SIZE_OF_RANGE;C._free(n)}return i}},TreeCursor=class _TreeCursor{static{__name(this,"TreeCursor")}0=0;1=0;2=0;3=0;tree;constructor(r,n){assertInternal(r),this.tree=n,unmarshalTreeCursor(this)}copy(){let r=new _TreeCursor(INTERNAL,this.tree);return C._ts_tree_cursor_copy_wasm(this.tree[0]),unmarshalTreeCursor(r),r}delete(){marshalTreeCursor(this),C._ts_tree_cursor_delete_wasm(this.tree[0]),this[0]=this[1]=this[2]=0}get currentNode(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_wasm(this.tree[0]),unmarshalNode(this.tree)}get currentFieldId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_field_id_wasm(this.tree[0])}get currentFieldName(){return this.tree.language.fields[this.currentFieldId]}get currentDepth(){return marshalTreeCursor(this),C._ts_tree_cursor_current_depth_wasm(this.tree[0])}get currentDescendantIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_current_descendant_index_wasm(this.tree[0])}get nodeType(){return this.tree.language.types[this.nodeTypeId]||"ERROR"}get nodeTypeId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_type_id_wasm(this.tree[0])}get nodeStateId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_state_id_wasm(this.tree[0])}get nodeId(){return marshalTreeCursor(this),C._ts_tree_cursor_current_node_id_wasm(this.tree[0])}get nodeIsNamed(){return marshalTreeCursor(this),1===C._ts_tree_cursor_current_node_is_named_wasm(this.tree[0])}get nodeIsMissing(){return marshalTreeCursor(this),1===C._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0])}get nodeText(){marshalTreeCursor(this);let r=C._ts_tree_cursor_start_index_wasm(this.tree[0]),n=C._ts_tree_cursor_end_index_wasm(this.tree[0]);C._ts_tree_cursor_start_position_wasm(this.tree[0]);let i=unmarshalPoint(TRANSFER_BUFFER);return getText(this.tree,r,n,i)}get startPosition(){return marshalTreeCursor(this),C._ts_tree_cursor_start_position_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get endPosition(){return marshalTreeCursor(this),C._ts_tree_cursor_end_position_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get startIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_start_index_wasm(this.tree[0])}get endIndex(){return marshalTreeCursor(this),C._ts_tree_cursor_end_index_wasm(this.tree[0])}gotoFirstChild(){marshalTreeCursor(this);let r=C._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===r}gotoLastChild(){marshalTreeCursor(this);let r=C._ts_tree_cursor_goto_last_child_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===r}gotoParent(){marshalTreeCursor(this);let r=C._ts_tree_cursor_goto_parent_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===r}gotoNextSibling(){marshalTreeCursor(this);let r=C._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===r}gotoPreviousSibling(){marshalTreeCursor(this);let r=C._ts_tree_cursor_goto_previous_sibling_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===r}gotoDescendant(r){marshalTreeCursor(this),C._ts_tree_cursor_goto_descendant_wasm(this.tree[0],r),unmarshalTreeCursor(this)}gotoFirstChildForIndex(r){marshalTreeCursor(this),C.setValue(TRANSFER_BUFFER+SIZE_OF_CURSOR,r,"i32");let n=C._ts_tree_cursor_goto_first_child_for_index_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===n}gotoFirstChildForPosition(r){marshalTreeCursor(this),marshalPoint(TRANSFER_BUFFER+SIZE_OF_CURSOR,r);let n=C._ts_tree_cursor_goto_first_child_for_position_wasm(this.tree[0]);return unmarshalTreeCursor(this),1===n}reset(r){marshalNode(r),marshalTreeCursor(this,TRANSFER_BUFFER+SIZE_OF_NODE),C._ts_tree_cursor_reset_wasm(this.tree[0]),unmarshalTreeCursor(this)}resetTo(r){marshalTreeCursor(this,TRANSFER_BUFFER),marshalTreeCursor(r,TRANSFER_BUFFER+SIZE_OF_CURSOR),C._ts_tree_cursor_reset_to_wasm(this.tree[0],r.tree[0]),unmarshalTreeCursor(this)}},Node=class{static{__name(this,"Node")}0=0;_children;_namedChildren;constructor(r,{id:n,tree:i,startIndex:s,startPosition:o,other:l}){assertInternal(r),this[0]=l,this.id=n,this.tree=i,this.startIndex=s,this.startPosition=o}id;startIndex;startPosition;tree;get typeId(){return marshalNode(this),C._ts_node_symbol_wasm(this.tree[0])}get grammarId(){return marshalNode(this),C._ts_node_grammar_symbol_wasm(this.tree[0])}get type(){return this.tree.language.types[this.typeId]||"ERROR"}get grammarType(){return this.tree.language.types[this.grammarId]||"ERROR"}get isNamed(){return marshalNode(this),1===C._ts_node_is_named_wasm(this.tree[0])}get isExtra(){return marshalNode(this),1===C._ts_node_is_extra_wasm(this.tree[0])}get isError(){return marshalNode(this),1===C._ts_node_is_error_wasm(this.tree[0])}get isMissing(){return marshalNode(this),1===C._ts_node_is_missing_wasm(this.tree[0])}get hasChanges(){return marshalNode(this),1===C._ts_node_has_changes_wasm(this.tree[0])}get hasError(){return marshalNode(this),1===C._ts_node_has_error_wasm(this.tree[0])}get endIndex(){return marshalNode(this),C._ts_node_end_index_wasm(this.tree[0])}get endPosition(){return marshalNode(this),C._ts_node_end_point_wasm(this.tree[0]),unmarshalPoint(TRANSFER_BUFFER)}get text(){return getText(this.tree,this.startIndex,this.endIndex,this.startPosition)}get parseState(){return marshalNode(this),C._ts_node_parse_state_wasm(this.tree[0])}get nextParseState(){return marshalNode(this),C._ts_node_next_parse_state_wasm(this.tree[0])}equals(r){return this.tree===r.tree&&this.id===r.id}child(r){return marshalNode(this),C._ts_node_child_wasm(this.tree[0],r),unmarshalNode(this.tree)}namedChild(r){return marshalNode(this),C._ts_node_named_child_wasm(this.tree[0],r),unmarshalNode(this.tree)}childForFieldId(r){return marshalNode(this),C._ts_node_child_by_field_id_wasm(this.tree[0],r),unmarshalNode(this.tree)}childForFieldName(r){let n=this.tree.language.fields.indexOf(r);return -1!==n?this.childForFieldId(n):null}fieldNameForChild(r){marshalNode(this);let n=C._ts_node_field_name_for_child_wasm(this.tree[0],r);return n?C.AsciiToString(n):null}fieldNameForNamedChild(r){marshalNode(this);let n=C._ts_node_field_name_for_named_child_wasm(this.tree[0],r);return n?C.AsciiToString(n):null}childrenForFieldName(r){let n=this.tree.language.fields.indexOf(r);return -1!==n&&0!==n?this.childrenForFieldId(n):[]}childrenForFieldId(r){marshalNode(this),C._ts_node_children_by_field_id_wasm(this.tree[0],r);let n=C.getValue(TRANSFER_BUFFER,"i32"),i=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),s=Array(n);if(n>0){let r=i;for(let i=0;i<n;i++)s[i]=unmarshalNode(this.tree,r),r+=SIZE_OF_NODE;C._free(i)}return s}firstChildForIndex(r){marshalNode(this);let n=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(n,r,"i32"),C._ts_node_first_child_for_byte_wasm(this.tree[0]),unmarshalNode(this.tree)}firstNamedChildForIndex(r){marshalNode(this);let n=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(n,r,"i32"),C._ts_node_first_named_child_for_byte_wasm(this.tree[0]),unmarshalNode(this.tree)}get childCount(){return marshalNode(this),C._ts_node_child_count_wasm(this.tree[0])}get namedChildCount(){return marshalNode(this),C._ts_node_named_child_count_wasm(this.tree[0])}get firstChild(){return this.child(0)}get firstNamedChild(){return this.namedChild(0)}get lastChild(){return this.child(this.childCount-1)}get lastNamedChild(){return this.namedChild(this.namedChildCount-1)}get children(){if(!this._children){marshalNode(this),C._ts_node_children_wasm(this.tree[0]);let r=C.getValue(TRANSFER_BUFFER,"i32"),n=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32");if(this._children=Array(r),r>0){let i=n;for(let n=0;n<r;n++)this._children[n]=unmarshalNode(this.tree,i),i+=SIZE_OF_NODE;C._free(n)}}return this._children}get namedChildren(){if(!this._namedChildren){marshalNode(this),C._ts_node_named_children_wasm(this.tree[0]);let r=C.getValue(TRANSFER_BUFFER,"i32"),n=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32");if(this._namedChildren=Array(r),r>0){let i=n;for(let n=0;n<r;n++)this._namedChildren[n]=unmarshalNode(this.tree,i),i+=SIZE_OF_NODE;C._free(n)}}return this._namedChildren}descendantsOfType(r,n=ZERO_POINT,i=ZERO_POINT){Array.isArray(r)||(r=[r]);let s=[],o=this.tree.language.types;for(let n of r)"ERROR"==n&&s.push(65535);for(let n=0,i=o.length;n<i;n++)r.includes(o[n])&&s.push(n);let l=C._malloc(SIZE_OF_INT*s.length);for(let r=0,n=s.length;r<n;r++)C.setValue(l+r*SIZE_OF_INT,s[r],"i32");marshalNode(this),C._ts_node_descendants_of_type_wasm(this.tree[0],l,s.length,n.row,n.column,i.row,i.column);let a=C.getValue(TRANSFER_BUFFER,"i32"),u=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),c=Array(a);if(a>0){let r=u;for(let n=0;n<a;n++)c[n]=unmarshalNode(this.tree,r),r+=SIZE_OF_NODE}return C._free(u),C._free(l),c}get nextSibling(){return marshalNode(this),C._ts_node_next_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get previousSibling(){return marshalNode(this),C._ts_node_prev_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get nextNamedSibling(){return marshalNode(this),C._ts_node_next_named_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get previousNamedSibling(){return marshalNode(this),C._ts_node_prev_named_sibling_wasm(this.tree[0]),unmarshalNode(this.tree)}get descendantCount(){return marshalNode(this),C._ts_node_descendant_count_wasm(this.tree[0])}get parent(){return marshalNode(this),C._ts_node_parent_wasm(this.tree[0]),unmarshalNode(this.tree)}childWithDescendant(r){return marshalNode(this),marshalNode(r,1),C._ts_node_child_with_descendant_wasm(this.tree[0]),unmarshalNode(this.tree)}descendantForIndex(r,n=r){if("number"!=typeof r||"number"!=typeof n)throw Error("Arguments must be numbers");marshalNode(this);let i=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(i,r,"i32"),C.setValue(i+SIZE_OF_INT,n,"i32"),C._ts_node_descendant_for_index_wasm(this.tree[0]),unmarshalNode(this.tree)}namedDescendantForIndex(r,n=r){if("number"!=typeof r||"number"!=typeof n)throw Error("Arguments must be numbers");marshalNode(this);let i=TRANSFER_BUFFER+SIZE_OF_NODE;return C.setValue(i,r,"i32"),C.setValue(i+SIZE_OF_INT,n,"i32"),C._ts_node_named_descendant_for_index_wasm(this.tree[0]),unmarshalNode(this.tree)}descendantForPosition(r,n=r){if(!isPoint(r)||!isPoint(n))throw Error("Arguments must be {row, column} objects");marshalNode(this);let i=TRANSFER_BUFFER+SIZE_OF_NODE;return marshalPoint(i,r),marshalPoint(i+SIZE_OF_POINT,n),C._ts_node_descendant_for_position_wasm(this.tree[0]),unmarshalNode(this.tree)}namedDescendantForPosition(r,n=r){if(!isPoint(r)||!isPoint(n))throw Error("Arguments must be {row, column} objects");marshalNode(this);let i=TRANSFER_BUFFER+SIZE_OF_NODE;return marshalPoint(i,r),marshalPoint(i+SIZE_OF_POINT,n),C._ts_node_named_descendant_for_position_wasm(this.tree[0]),unmarshalNode(this.tree)}walk(){return marshalNode(this),C._ts_tree_cursor_new_wasm(this.tree[0]),new TreeCursor(INTERNAL,this.tree)}edit(r){if(this.startIndex>=r.oldEndIndex){let n,i;this.startIndex=r.newEndIndex+(this.startIndex-r.oldEndIndex),this.startPosition.row>r.oldEndPosition.row?(n=this.startPosition.row-r.oldEndPosition.row,i=this.startPosition.column):(n=0,i=this.startPosition.column,this.startPosition.column>=r.oldEndPosition.column&&(i=this.startPosition.column-r.oldEndPosition.column)),n>0?(this.startPosition.row+=n,this.startPosition.column=i):this.startPosition.column+=i}else this.startIndex>r.startIndex&&(this.startIndex=r.newEndIndex,this.startPosition.row=r.newEndPosition.row,this.startPosition.column=r.newEndPosition.column)}toString(){marshalNode(this);let r=C._ts_node_to_string_wasm(this.tree[0]),n=C.AsciiToString(r);return C._free(r),n}};function unmarshalCaptures(r,n,i,s,o){for(let l=0,a=o.length;l<a;l++){let a=C.getValue(i,"i32"),u=unmarshalNode(n,i+=SIZE_OF_INT);i+=SIZE_OF_NODE,o[l]={patternIndex:s,name:r.captureNames[a],node:u}}return i}function marshalNode(r,n=0){let i=TRANSFER_BUFFER+n*SIZE_OF_NODE;C.setValue(i,r.id,"i32"),i+=SIZE_OF_INT,C.setValue(i,r.startIndex,"i32"),i+=SIZE_OF_INT,C.setValue(i,r.startPosition.row,"i32"),i+=SIZE_OF_INT,C.setValue(i,r.startPosition.column,"i32"),i+=SIZE_OF_INT,C.setValue(i,r[0],"i32")}function unmarshalNode(r,n=TRANSFER_BUFFER){let i=C.getValue(n,"i32");if(n+=SIZE_OF_INT,0===i)return null;let s=C.getValue(n,"i32");n+=SIZE_OF_INT;let o=C.getValue(n,"i32");n+=SIZE_OF_INT;let l=C.getValue(n,"i32");return n+=SIZE_OF_INT,new Node(INTERNAL,{id:i,tree:r,startIndex:s,startPosition:{row:o,column:l},other:C.getValue(n,"i32")})}function marshalTreeCursor(r,n=TRANSFER_BUFFER){C.setValue(n+0*SIZE_OF_INT,r[0],"i32"),C.setValue(n+ +SIZE_OF_INT,r[1],"i32"),C.setValue(n+2*SIZE_OF_INT,r[2],"i32"),C.setValue(n+3*SIZE_OF_INT,r[3],"i32")}function unmarshalTreeCursor(r){r[0]=C.getValue(TRANSFER_BUFFER+0*SIZE_OF_INT,"i32"),r[1]=C.getValue(TRANSFER_BUFFER+ +SIZE_OF_INT,"i32"),r[2]=C.getValue(TRANSFER_BUFFER+2*SIZE_OF_INT,"i32"),r[3]=C.getValue(TRANSFER_BUFFER+3*SIZE_OF_INT,"i32")}function marshalPoint(r,n){C.setValue(r,n.row,"i32"),C.setValue(r+SIZE_OF_INT,n.column,"i32")}function unmarshalPoint(r){return{row:C.getValue(r,"i32")>>>0,column:C.getValue(r+SIZE_OF_INT,"i32")>>>0}}function marshalRange(r,n){marshalPoint(r,n.startPosition),marshalPoint(r+=SIZE_OF_POINT,n.endPosition),r+=SIZE_OF_POINT,C.setValue(r,n.startIndex,"i32"),r+=SIZE_OF_INT,C.setValue(r,n.endIndex,"i32")}function unmarshalRange(r){let n={};return n.startPosition=unmarshalPoint(r),n.endPosition=unmarshalPoint(r+=SIZE_OF_POINT),r+=SIZE_OF_POINT,n.startIndex=C.getValue(r,"i32")>>>0,r+=SIZE_OF_INT,n.endIndex=C.getValue(r,"i32")>>>0,n}function marshalEdit(r,n=TRANSFER_BUFFER){marshalPoint(n,r.startPosition),marshalPoint(n+=SIZE_OF_POINT,r.oldEndPosition),marshalPoint(n+=SIZE_OF_POINT,r.newEndPosition),n+=SIZE_OF_POINT,C.setValue(n,r.startIndex,"i32"),n+=SIZE_OF_INT,C.setValue(n,r.oldEndIndex,"i32"),n+=SIZE_OF_INT,C.setValue(n,r.newEndIndex,"i32")}function unmarshalLanguageMetadata(r){let n=C.getValue(r,"i32");return{major_version:n,minor_version:C.getValue(r+=SIZE_OF_INT,"i32"),patch_version:C.getValue(r+=SIZE_OF_INT,"i32")}}__name(unmarshalCaptures,"unmarshalCaptures"),__name(marshalNode,"marshalNode"),__name(unmarshalNode,"unmarshalNode"),__name(marshalTreeCursor,"marshalTreeCursor"),__name(unmarshalTreeCursor,"unmarshalTreeCursor"),__name(marshalPoint,"marshalPoint"),__name(unmarshalPoint,"unmarshalPoint"),__name(marshalRange,"marshalRange"),__name(unmarshalRange,"unmarshalRange"),__name(marshalEdit,"marshalEdit"),__name(unmarshalLanguageMetadata,"unmarshalLanguageMetadata");var LANGUAGE_FUNCTION_REGEX=/^tree_sitter_\w+$/,Language=class _Language{static{__name(this,"Language")}0=0;types;fields;constructor(r,n){assertInternal(r),this[0]=n,this.types=Array(C._ts_language_symbol_count(this[0]));for(let r=0,n=this.types.length;r<n;r++)2>C._ts_language_symbol_type(this[0],r)&&(this.types[r]=C.UTF8ToString(C._ts_language_symbol_name(this[0],r)));this.fields=Array(C._ts_language_field_count(this[0])+1);for(let r=0,n=this.fields.length;r<n;r++){const n=C._ts_language_field_name_for_id(this[0],r);0!==n?this.fields[r]=C.UTF8ToString(n):this.fields[r]=null}}get name(){let r=C._ts_language_name(this[0]);return 0===r?null:C.UTF8ToString(r)}get abiVersion(){return C._ts_language_abi_version(this[0])}get metadata(){return(C._ts_language_metadata_wasm(this[0]),0===C.getValue(TRANSFER_BUFFER,"i32"))?null:unmarshalLanguageMetadata(TRANSFER_BUFFER+SIZE_OF_INT)}get fieldCount(){return this.fields.length-1}get stateCount(){return C._ts_language_state_count(this[0])}fieldIdForName(r){let n=this.fields.indexOf(r);return -1!==n?n:null}fieldNameForId(r){return this.fields[r]??null}idForNodeType(r,n){let i=C.lengthBytesUTF8(r),s=C._malloc(i+1);C.stringToUTF8(r,s,i+1);let o=C._ts_language_symbol_for_name(this[0],s,i,+!!n);return C._free(s),o||null}get nodeTypeCount(){return C._ts_language_symbol_count(this[0])}nodeTypeForId(r){let n=C._ts_language_symbol_name(this[0],r);return n?C.UTF8ToString(n):null}nodeTypeIsNamed(r){return!!C._ts_language_type_is_named_wasm(this[0],r)}nodeTypeIsVisible(r){return!!C._ts_language_type_is_visible_wasm(this[0],r)}get supertypes(){C._ts_language_supertypes_wasm(this[0]);let r=C.getValue(TRANSFER_BUFFER,"i32"),n=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),i=Array(r);if(r>0){let s=n;for(let n=0;n<r;n++)i[n]=C.getValue(s,"i16"),s+=SIZE_OF_SHORT}return i}subtypes(r){C._ts_language_subtypes_wasm(this[0],r);let n=C.getValue(TRANSFER_BUFFER,"i32"),i=C.getValue(TRANSFER_BUFFER+SIZE_OF_INT,"i32"),s=Array(n);if(n>0){let r=i;for(let i=0;i<n;i++)s[i]=C.getValue(r,"i16"),r+=SIZE_OF_SHORT}return s}nextState(r,n){return C._ts_language_next_state(this[0],r,n)}lookaheadIterator(r){let n=C._ts_lookahead_iterator_new(this[0],r);return n?new LookaheadIterator(INTERNAL,n,this):null}static async load(r){let n;if(r instanceof Uint8Array)n=r;else if(globalThis.process?.versions.node){let i=await __webpack_require__.e(480).then(__webpack_require__.t.bind(__webpack_require__,80480,19));n=await i.readFile(r)}else{let i=await fetch(r);if(!i.ok){let r=await i.text();throw Error(`Language.load failed with status ${i.status}.
|
|
@@ -17,4 +17,4 @@ ${i}
|
|
|
17
17
|
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:r,chain:n,state:i,editor:s})=>r.first([()=>r.exitCode(),()=>r.command(()=>{let{selection:r,storedMarks:o}=i;if(r.$from.parent.type.spec.isolating)return!1;let{keepMarks:l}=this.options,{splittableMarks:a}=s.extensionManager,u=o||r.$to.parentOffset&&r.$from.marks();return n().insertContent({type:this.name}).command(({tr:r,dispatch:n})=>{if(n&&u&&l){let n=u.filter(r=>a.includes(r.type.name));r.ensureMarks(n)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),C=i(52740),A=s.bP.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{},nextNodeType:"paragraph"}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:r}){return["hr",(0,s.KV)(this.options.HTMLAttributes,r)]},markdownTokenName:"hr",parseMarkdown:(r,n)=>n.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:r,state:n})=>{if(!(0,s.AB)(n,n.schema.nodes[this.name]))return!1;let{selection:i}=n,{$to:o}=i,l=r();return(0,s.BQ)(i)?l.insertContentAt(o.pos,{type:this.name}):l.insertContent({type:this.name}),l.command(({state:r,tr:n,dispatch:i})=>{if(i){let{$to:i}=n.selection,s=i.end();if(i.nodeAfter)i.nodeAfter.isTextblock?n.setSelection(_.U3.create(n.doc,i.pos+1)):i.nodeAfter.isBlock?n.setSelection(_.nh.create(n.doc,i.pos)):n.setSelection(_.U3.create(n.doc,i.pos));else{let o=r.schema.nodes[this.options.nextNodeType]||i.parent.type.contentMatch.defaultType,l=null==o?void 0:o.create();l&&(n.insert(s,l),n.setSelection(_.U3.create(n.doc,s+1)))}n.scrollIntoView()}return!0}).run()}}},addInputRules(){return[(0,s.Ce)({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),E=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,S=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,M=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,T=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,D=s.CU.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:r=>"normal"!==r.style.fontStyle&&null},{style:"font-style=normal",clearMark:r=>r.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:r}){return["em",(0,s.KV)(this.options.HTMLAttributes,r),0]},addCommands(){return{setItalic:()=>({commands:r})=>r.setMark(this.name),toggleItalic:()=>({commands:r})=>r.toggleMark(this.name),unsetItalic:()=>({commands:r})=>r.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(r,n)=>n.applyMark("italic",n.parseInline(r.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(r,n)=>`*${n.renderChildren(r)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[(0,s.OX)({find:E,type:this.type}),(0,s.OX)({find:M,type:this.type})]},addPasteRules(){return[(0,s.Zc)({find:S,type:this.type}),(0,s.Zc)({find:T,type:this.type})]}}),F=i(59265),I=i(82150),L=" ",R="\xa0",N=s.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:r}){return["p",(0,s.KV)(this.options.HTMLAttributes,r),0]},parseMarkdown:(r,n)=>{let i=r.tokens||[];if(1===i.length&&"image"===i[0].type)return n.parseChildren([i[0]]);let s=n.parseInline(i);return 1===i.length&&"text"===i[0].type&&(i[0].raw===L||i[0].text===L||i[0].raw===R||i[0].text===R)&&1===s.length&&"text"===s[0].type&&(s[0].text===L||s[0].text===R)?n.createNode("paragraph",void 0,[]):n.createNode("paragraph",void 0,s)},renderMarkdown:(r,n,i)=>{var s,o;if(!r)return"";let l=Array.isArray(r.content)?r.content:[];if(0===l.length){let r=Array.isArray(null==(s=null==i?void 0:i.previousNode)?void 0:s.content)?i.previousNode.content:[];return(null==(o=null==i?void 0:i.previousNode)?void 0:o.type)==="paragraph"&&0===r.length?L:""}return n.renderChildren(l)},addCommands(){return{setParagraph:()=>({commands:r})=>r.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),O=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,z=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,P=s.CU.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:r=>!!r.includes("line-through")&&{}}],renderHTML({HTMLAttributes:r}){return["s",(0,s.KV)(this.options.HTMLAttributes,r),0]},markdownTokenName:"del",parseMarkdown:(r,n)=>n.applyMark("strike",n.parseInline(r.tokens||[])),renderMarkdown:(r,n)=>`~~${n.renderChildren(r)}~~`,addCommands(){return{setStrike:()=>({commands:r})=>r.setMark(this.name),toggleStrike:()=>({commands:r})=>r.toggleMark(this.name),unsetStrike:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[(0,s.OX)({find:O,type:this.type})]},addPasteRules(){return[(0,s.Zc)({find:z,type:this.type})]}}),$=s.bP.create({name:"text",group:"inline",parseMarkdown:r=>({type:"text",text:r.text||""}),renderMarkdown:r=>r.text||""}),B=s.CU.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:r=>!!r.includes("underline")&&{}}],renderHTML({HTMLAttributes:r}){return["u",(0,s.KV)(this.options.HTMLAttributes,r),0]},parseMarkdown(r,n){return n.applyMark(this.name||"underline",n.parseInline(r.tokens||[]))},renderMarkdown:(r,n)=>`++${n.renderChildren(r)}++`,markdownTokenizer:{name:"underline",level:"inline",start:r=>r.indexOf("++"),tokenize(r,n,i){let s=/^(\+\+)([\s\S]+?)(\+\+)/.exec(r);if(!s)return;let o=s[2].trim();return{type:"underline",raw:s[0],text:o,tokens:i.inlineTokens(o)}}},addCommands(){return{setUnderline:()=>({commands:r})=>r.setMark(this.name),toggleUnderline:()=>({commands:r})=>r.toggleMark(this.name),unsetUnderline:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),q=i(62678),j=s.YY.create({name:"starterKit",addExtensions(){var r,n,i,s;let o=[];return!1!==this.options.bold&&o.push(p.configure(this.options.bold)),!1!==this.options.blockquote&&o.push(a.configure(this.options.blockquote)),!1!==this.options.bulletList&&o.push(I.Rg.configure(this.options.bulletList)),!1!==this.options.code&&o.push(g.configure(this.options.code)),!1!==this.options.codeBlock&&o.push(w.configure(this.options.codeBlock)),!1!==this.options.document&&o.push(x.configure(this.options.document)),!1!==this.options.dropcursor&&o.push(q.QO.configure(this.options.dropcursor)),!1!==this.options.gapcursor&&o.push(q.vR.configure(this.options.gapcursor)),!1!==this.options.hardBreak&&o.push(v.configure(this.options.hardBreak)),!1!==this.options.heading&&o.push(C.D.configure(this.options.heading)),!1!==this.options.undoRedo&&o.push(q.lb.configure(this.options.undoRedo)),!1!==this.options.horizontalRule&&o.push(A.configure(this.options.horizontalRule)),!1!==this.options.italic&&o.push(D.configure(this.options.italic)),!1!==this.options.listItem&&o.push(I.ck.configure(this.options.listItem)),!1!==this.options.listKeymap&&o.push(I.it.configure(null==(r=this.options)?void 0:r.listKeymap)),!1!==this.options.link&&o.push(F.N_.configure(null==(n=this.options)?void 0:n.link)),!1!==this.options.orderedList&&o.push(I._J.configure(this.options.orderedList)),!1!==this.options.paragraph&&o.push(N.configure(this.options.paragraph)),!1!==this.options.strike&&o.push(P.configure(this.options.strike)),!1!==this.options.text&&o.push($.configure(this.options.text)),!1!==this.options.underline&&o.push(B.configure(null==(i=this.options)?void 0:i.underline)),!1!==this.options.trailingNode&&o.push(q.JU.configure(null==(s=this.options)?void 0:s.trailingNode)),o}})},59265:(r,n,i)=>{"use strict";i.d(n,{N_:()=>td,Ay:()=>tp});var s=i(82159);let o="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",l="ελ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",a="numeric",u="ascii",c="alpha",h="asciinumeric",d="alphanumeric",p="domain",f="emoji",m="scheme",g="slashscheme",_="whitespace";function y(r,n){return r in n||(n[r]=[]),n[r]}function k(r,n,i){for(let s in n[a]&&(n[h]=!0,n[d]=!0),n[u]&&(n[h]=!0,n[c]=!0),n[h]&&(n[d]=!0),n[c]&&(n[d]=!0),n[d]&&(n[p]=!0),n[f]&&(n[p]=!0),n){let n=y(s,i);0>n.indexOf(r)&&n.push(r)}}function b(r,n){let i={};for(let s in n)n[s].indexOf(r)>=0&&(i[s]=!0);return i}function w(r=null){this.j={},this.jr=[],this.jd=null,this.t=r}w.groups={},w.prototype={accepts(){return!!this.t},go(r){let n=this,i=n.j[r];if(i)return i;for(let i=0;i<n.jr.length;i++){let s=n.jr[i][0],o=n.jr[i][1];if(o&&s.test(r))return o}return n.jd},has(r,n=!1){return n?r in this.j:!!this.go(r)},ta(r,n,i,s){for(let o=0;o<r.length;o++)this.tt(r[o],n,i,s)},tr(r,n,i,s){let o;return s=s||w.groups,n&&n.j?o=n:(o=new w(n),i&&s&&k(n,i,s)),this.jr.push([r,o]),o},ts(r,n,i,s){let o=this,l=r.length;if(!l)return o;for(let n=0;n<l-1;n++)o=o.tt(r[n]);return o.tt(r[l-1],n,i,s)},tt(r,n,i,s){s=s||w.groups;let o=this;if(n&&n.j)return o.j[r]=n,n;let l=n,a,u=o.go(r);return u?(Object.assign((a=new w).j,u.j),a.jr.push.apply(a.jr,u.jr),a.jd=u.jd,a.t=u.t):a=new w,l&&(s&&(a.t&&"string"==typeof a.t?k(l,Object.assign(b(a.t,s),i),s):i&&k(l,i,s)),a.t=l),o.j[r]=a,a}};let x=(r,n,i,s,o)=>r.ta(n,i,s,o),v=(r,n,i,s,o)=>r.tr(n,i,s,o),C=(r,n,i,s,o)=>r.ts(n,i,s,o),A=(r,n,i,s,o)=>r.tt(n,i,s,o),E="WORD",S="UWORD",M="ASCIINUMERICAL",T="ALPHANUMERICAL",D="LOCALHOST",F="TLD",I="UTLD",L="SCHEME",R="SLASH_SCHEME",N="NUM",O="WS",z="NL",P="OPENBRACE",$="CLOSEBRACE",B="OPENBRACKET",q="CLOSEBRACKET",j="OPENPAREN",H="CLOSEPAREN",V="OPENANGLEBRACKET",U="CLOSEANGLEBRACKET",W="FULLWIDTHLEFTPAREN",J="FULLWIDTHRIGHTPAREN",K="LEFTCORNERBRACKET",G="RIGHTCORNERBRACKET",Z="LEFTWHITECORNERBRACKET",X="RIGHTWHITECORNERBRACKET",Y="FULLWIDTHLESSTHAN",Q="FULLWIDTHGREATERTHAN",ee="AMPERSAND",et="APOSTROPHE",er="ASTERISK",en="AT",ei="BACKSLASH",es="BACKTICK",eo="CARET",el="COLON",ea="COMMA",eu="DOLLAR",ec="DOT",eh="EQUALS",ed="EXCLAMATION",ep="HYPHEN",ef="PERCENT",em="PIPE",eg="PLUS",e_="POUND",ey="QUERY",ek="QUOTE",eb="FULLWIDTHMIDDLEDOT",ew="SEMI",ex="SLASH",ev="TILDE",eC="UNDERSCORE",eA="EMOJI",eE="SYM";var eS=Object.freeze({__proto__:null,ALPHANUMERICAL:T,AMPERSAND:ee,APOSTROPHE:et,ASCIINUMERICAL:M,ASTERISK:er,AT:en,BACKSLASH:ei,BACKTICK:es,CARET:eo,CLOSEANGLEBRACKET:U,CLOSEBRACE:$,CLOSEBRACKET:q,CLOSEPAREN:H,COLON:el,COMMA:ea,DOLLAR:eu,DOT:ec,EMOJI:eA,EQUALS:eh,EXCLAMATION:ed,FULLWIDTHGREATERTHAN:Q,FULLWIDTHLEFTPAREN:W,FULLWIDTHLESSTHAN:Y,FULLWIDTHMIDDLEDOT:eb,FULLWIDTHRIGHTPAREN:J,HYPHEN:ep,LEFTCORNERBRACKET:K,LEFTWHITECORNERBRACKET:Z,LOCALHOST:D,NL:z,NUM:N,OPENANGLEBRACKET:V,OPENBRACE:P,OPENBRACKET:B,OPENPAREN:j,PERCENT:ef,PIPE:em,PLUS:eg,POUND:e_,QUERY:ey,QUOTE:ek,RIGHTCORNERBRACKET:G,RIGHTWHITECORNERBRACKET:X,SCHEME:L,SEMI:ew,SLASH:ex,SLASH_SCHEME:R,SYM:eE,TILDE:ev,TLD:F,UNDERSCORE:eC,UTLD:I,UWORD:S,WORD:E,WS:O});let eM=/[a-z]/,eT=/\p{L}/u,eD=/\p{Emoji}/u,eF=/\d/,eI=/\s/,eL="\r",eR="\n",eN="️",eO="",ez="",eP=null,e$=null;function eB(r=[]){let n={};w.groups=n;let i=new w;null==eP&&(eP=eV(o)),null==e$&&(e$=eV(l)),A(i,"'",et),A(i,"{",P),A(i,"}",$),A(i,"[",B),A(i,"]",q),A(i,"(",j),A(i,")",H),A(i,"<",V),A(i,">",U),A(i,"(",W),A(i,")",J),A(i,"「",K),A(i,"」",G),A(i,"『",Z),A(i,"』",X),A(i,"<",Y),A(i,">",Q),A(i,"&",ee),A(i,"*",er),A(i,"@",en),A(i,"`",es),A(i,"^",eo),A(i,":",el),A(i,",",ea),A(i,"$",eu),A(i,".",ec),A(i,"=",eh),A(i,"!",ed),A(i,"-",ep),A(i,"%",ef),A(i,"|",em),A(i,"+",eg),A(i,"#",e_),A(i,"?",ey),A(i,'"',ek),A(i,"/",ex),A(i,";",ew),A(i,"~",ev),A(i,"_",eC),A(i,"\\",ei),A(i,"・",eb);let s=v(i,eF,N,{[a]:!0});v(s,eF,s);let y=v(s,eM,M,{[h]:!0}),b=v(s,eT,T,{[d]:!0}),x=v(i,eM,E,{[u]:!0});v(x,eF,y),v(x,eM,x),v(y,eF,y),v(y,eM,y);let eq=v(i,eT,S,{[c]:!0});v(eq,eM),v(eq,eF,b),v(eq,eT,eq),v(b,eF,b),v(b,eM),v(b,eT,b);let ej=A(i,eR,z,{[_]:!0}),eU=A(i,eL,O,{[_]:!0}),eW=v(i,eI,O,{[_]:!0});A(i,ez,eW),A(eU,eR,ej),A(eU,ez,eW),v(eU,eI,eW),A(eW,eL),A(eW,eR),v(eW,eI,eW),A(eW,ez,eW);let eJ=v(i,eD,eA,{[f]:!0});A(eJ,"#"),v(eJ,eD,eJ),A(eJ,eN,eJ);let eK=A(eJ,eO);A(eK,"#"),v(eK,eD,eJ);let eG=[[eM,x],[eF,y]],eZ=[[eM,null],[eT,eq],[eF,b]];for(let r=0;r<eP.length;r++)eH(i,eP[r],F,E,eG);for(let r=0;r<e$.length;r++)eH(i,e$[r],I,S,eZ);k(F,{tld:!0,ascii:!0},n),k(I,{utld:!0,alpha:!0},n),eH(i,"file",L,E,eG),eH(i,"mailto",L,E,eG),eH(i,"http",R,E,eG),eH(i,"https",R,E,eG),eH(i,"ftp",R,E,eG),eH(i,"ftps",R,E,eG),k(L,{scheme:!0,ascii:!0},n),k(R,{slashscheme:!0,ascii:!0},n),r=r.sort((r,n)=>r[0]>n[0]?1:-1);for(let n=0;n<r.length;n++){let s=r[n][0],o=r[n][1]?{[m]:!0}:{[g]:!0};s.indexOf("-")>=0?o[p]=!0:eM.test(s)?eF.test(s)?o[h]=!0:o[u]=!0:o[a]=!0,C(i,s,s,o)}return C(i,"localhost",D,{ascii:!0}),i.jd=new w(eE),{start:i,tokens:Object.assign({groups:n},eS)}}function eq(r,n){let i=ej(n.replace(/[A-Z]/g,r=>r.toLowerCase())),s=i.length,o=[],l=0,a=0;for(;a<s;){let u=r,c=null,h=0,d=null,p=-1,f=-1;for(;a<s&&(c=u.go(i[a]));)(u=c).accepts()?(p=0,f=0,d=u):p>=0&&(p+=i[a].length,f++),h+=i[a].length,l+=i[a].length,a++;l-=p,a-=f,h-=p,o.push({t:d.t,v:n.slice(l-h,l),s:l-h,e:l})}return o}function ej(r){let n=[],i=r.length,s=0;for(;s<i;){let o,l=r.charCodeAt(s),a=l<55296||l>56319||s+1===i||(o=r.charCodeAt(s+1))<56320||o>57343?r[s]:r.slice(s,s+2);n.push(a),s+=a.length}return n}function eH(r,n,i,s,o){let l,a=n.length;for(let i=0;i<a-1;i++){let a=n[i];r.j[a]?l=r.j[a]:((l=new w(s)).jr=o.slice(),r.j[a]=l),r=l}return(l=new w(i)).jr=o.slice(),r.j[n[a-1]]=l,l}function eV(r){let n=[],i=[],s=0,o="0123456789";for(;s<r.length;){let l=0;for(;o.indexOf(r[s+l])>=0;)l++;if(l>0){n.push(i.join(""));for(let n=parseInt(r.substring(s,s+l),10);n>0;n--)i.pop();s+=l}else i.push(r[s]),s++}return n}let eU={defaultProtocol:"http",events:null,format:eJ,formatHref:eJ,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function eW(r,n=null){let i=Object.assign({},eU);r&&(i=Object.assign(i,r instanceof eW?r.o:r));let s=i.ignoreTags,o=[];for(let r=0;r<s.length;r++)o.push(s[r].toUpperCase());this.o=i,n&&(this.defaultRender=n),this.ignoreTags=o}function eJ(r){return r}function eK(r,n){this.t="token",this.v=r,this.tk=n}function eG(r,n){class i extends eK{constructor(n,i){super(n,i),this.t=r}}for(let r in n)i.prototype[r]=n[r];return i.t=r,i}eW.prototype={o:eU,ignoreTags:[],defaultRender:r=>r,check(r){return this.get("validate",r.toString(),r)},get(r,n,i){let s=null!=n,o=this.o[r];return o&&("object"==typeof o?"function"==typeof(o=i.t in o?o[i.t]:eU[r])&&s&&(o=o(n,i)):"function"==typeof o&&s&&(o=o(n,i.t,i))),o},getObj(r,n,i){let s=this.o[r];return"function"==typeof s&&null!=n&&(s=s(n,i.t,i)),s},render(r){let n=r.render(this);return(this.get("render",null,r)||this.defaultRender)(n,r.t,r)}},eK.prototype={isLink:!1,toString(){return this.v},toHref(r){return this.toString()},toFormattedString(r){let n=this.toString(),i=r.get("truncate",n,this),s=r.get("format",n,this);return i&&s.length>i?s.substring(0,i)+"…":s},toFormattedHref(r){return r.get("formatHref",this.toHref(r.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(r=eU.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(r),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(r){return{type:this.t,value:this.toFormattedString(r),isLink:this.isLink,href:this.toFormattedHref(r),start:this.startIndex(),end:this.endIndex()}},validate(r){return r.get("validate",this.toString(),this)},render(r){let n=this,i=this.toHref(r.get("defaultProtocol")),s=r.get("formatHref",i,this),o=r.get("tagName",i,n),l=this.toFormattedString(r),a={},u=r.get("className",i,n),c=r.get("target",i,n),h=r.get("rel",i,n),d=r.getObj("attributes",i,n),p=r.getObj("events",i,n);return a.href=s,u&&(a.class=u),c&&(a.target=c),h&&(a.rel=h),d&&Object.assign(a,d),{tagName:o,attributes:a,content:l,eventListeners:p}}};let eZ=eG("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),eX=eG("text"),eY=eG("nl"),eQ=eG("url",{isLink:!0,toHref(r=eU.defaultProtocol){return this.hasProtocol()?this.v:`${r}://${this.v}`},hasProtocol(){let r=this.tk;return r.length>=2&&r[0].t!==D&&r[1].t===el}}),e0=r=>new w(r);function e1({groups:r}){let n=r.domain.concat([ee,er,en,ei,es,eo,eu,eh,ep,N,ef,em,eg,e_,ex,eE,ev,eC]),i=[et,el,ea,ec,ed,ef,ey,ek,ew,V,U,P,$,q,B,j,H,W,J,K,G,Z,X,Y,Q],s=[ee,et,er,ei,es,eo,eu,eh,ep,P,$,ef,em,eg,e_,ey,ex,eE,ev,eC],o=e0(),l=A(o,ev);x(l,s,l),x(l,r.domain,l);let a=e0(),u=e0(),c=e0();x(o,r.domain,a),x(o,r.scheme,u),x(o,r.slashscheme,c),x(a,s,l),x(a,r.domain,a);let h=A(a,en);A(l,en,h),A(u,en,h),A(c,en,h);let d=A(l,ec);x(d,s,l),x(d,r.domain,l);let p=e0();x(h,r.domain,p),x(p,r.domain,p);let f=A(p,ec);x(f,r.domain,p);let m=e0(eZ);x(f,r.tld,m),x(f,r.utld,m),A(h,D,m);let g=A(p,ep);A(g,ep,g),x(g,r.domain,p),x(m,r.domain,p),A(m,ec,f),A(m,ep,g),x(A(m,el),r.numeric,eZ);let _=A(a,ep),y=A(a,ec);A(_,ep,_),x(_,r.domain,a),x(y,s,l),x(y,r.domain,a);let k=e0(eQ);x(y,r.tld,k),x(y,r.utld,k),x(k,r.domain,a),x(k,s,l),A(k,ec,y),A(k,ep,_),A(k,en,h);let b=A(k,el),w=e0(eQ);x(b,r.numeric,w);let v=e0(eQ),C=e0();x(v,n,v),x(v,i,C),x(C,n,v),x(C,i,C),A(k,ex,v),A(w,ex,v);let E=A(u,el),S=A(c,el),M=A(S,ex),T=A(M,ex);x(u,r.domain,a),A(u,ec,y),A(u,ep,_),x(c,r.domain,a),A(c,ec,y),A(c,ep,_),x(E,r.domain,v),A(E,ex,v),A(E,ey,v),x(T,r.domain,v),x(T,n,v),A(T,ex,v);let F=[[P,$],[B,q],[j,H],[V,U],[W,J],[K,G],[Z,X],[Y,Q]];for(let r=0;r<F.length;r++){let[s,o]=F[r],l=A(v,s);A(C,s,l),A(l,o,v);let a=e0(eQ);x(l,n,a);let u=e0();x(l,i),x(a,n,a),x(a,i,u),x(u,n,a),x(u,i,u),A(a,o,v),A(u,o,v)}return A(o,D,k),A(o,z,eY),{start:o,tokens:eS}}function e2(r,n,i){let s=i.length,o=0,l=[],a=[];for(;o<s;){let u=r,c=null,h=null,d=0,p=null,f=-1;for(;o<s&&!(c=u.go(i[o].t));)a.push(i[o++]);for(;o<s&&(h=c||u.go(i[o].t));)c=null,(u=h).accepts()?(f=0,p=u):f>=0&&f++,o++,d++;if(f<0)(o-=d)<s&&(a.push(i[o]),o++);else{a.length>0&&(l.push(e3(eX,n,a)),a=[]),o-=f,d-=f;let r=p.t,s=i.slice(o-d,o);l.push(e3(r,n,s))}}return a.length>0&&l.push(e3(eX,n,a)),l}function e3(r,n,i){let s=i[0].s,o=i[i.length-1].e;return new r(n.slice(s,o),i)}let e5="u">typeof console&&console&&console.warn||(()=>{}),e4="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",e6={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function e8(){return w.groups={},e6.scanner=null,e6.parser=null,e6.tokenQueue=[],e6.pluginQueue=[],e6.customSchemes=[],e6.initialized=!1,e6}function e9(r,n=!1){if(e6.initialized&&e5(`linkifyjs: already initialized - will not register custom scheme "${r}" ${e4}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(r))throw Error(`linkifyjs: incorrect scheme format.
|
|
18
18
|
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
19
19
|
2. Cannot start or end with "-"
|
|
20
|
-
3. "-" cannot repeat`);e6.customSchemes.push([r,n])}function e7(){e6.scanner=eB(e6.customSchemes);for(let r=0;r<e6.tokenQueue.length;r++)e6.tokenQueue[r][1]({scanner:e6.scanner});e6.parser=e1(e6.scanner.tokens);for(let r=0;r<e6.pluginQueue.length;r++)e6.pluginQueue[r][1]({scanner:e6.scanner,parser:e6.parser});return e6.initialized=!0,e6}function te(r){return e6.initialized||e7(),e2(e6.parser.start,r,eq(e6.scanner.start,r))}function tt(r,n=null,i=null){if(n&&"object"==typeof n){if(i)throw Error(`linkifyjs: Invalid link type ${n}; must be a string`);i=n,n=null}let s=new eW(i),o=te(r),l=[];for(let r=0;r<o.length;r++){let i=o[r];i.isLink&&(!n||i.t===n)&&s.check(i)&&l.push(i.toFormattedObject(s))}return l}te.scan=eq;var tr=i(76865),tn="[\0- \xa0 -\u2029 ]",ti=new RegExp(tn),ts=RegExp(`${tn}$`),to=RegExp(tn,"g");function tl(r){return 1===r.length?r[0].isLink:3===r.length&&!!r[1].isLink&&["()","[]"].includes(r[0].value+r[2].value)}function ta(r){return new tr.k_({key:new tr.hs("autolink"),appendTransaction:(n,i,o)=>{let l=n.some(r=>r.docChanged)&&!i.doc.eq(o.doc),a=n.some(r=>r.getMeta("preventAutolink"));if(!l||a)return;let{tr:u}=o,c=(0,s.T7)(i.doc,[...n]);if((0,s.FF)(c).forEach(({newRange:n})=>{let i,l,a=(0,s.Nx)(o.doc,n,r=>r.isTextblock);if(a.length>1)i=a[0],l=o.doc.textBetween(i.pos,i.pos+i.node.nodeSize,void 0," ");else if(a.length){let r=o.doc.textBetween(n.from,n.to," "," ");if(!ts.test(r))return;i=a[0],l=o.doc.textBetween(i.pos,n.to,void 0," ")}if(i&&l){let n=l.split(ti).filter(Boolean);if(n.length<=0)return!1;let a=n[n.length-1],c=i.pos+l.lastIndexOf(a);if(!a)return!1;let h=te(a).map(n=>n.toObject(r.defaultProtocol));if(!tl(h))return!1;h.filter(r=>r.isLink).map(r=>({...r,from:c+r.start+1,to:c+r.end+1})).filter(r=>!o.schema.marks.code||!o.doc.rangeHasMark(r.from,r.to,o.schema.marks.code)).filter(n=>r.validate(n.value)).filter(n=>r.shouldAutoLink(n.value)).forEach(n=>{(0,s.hO)(n.from,n.to,o.doc).some(n=>n.mark.type===r.type)||u.addMark(n.from,n.to,r.type.create({href:n.href}))})}}),u.steps.length)return u}})}function tu(r){return new tr.k_({key:new tr.hs("handleClickLink"),props:{handleClick:(n,i,o)=>{var l,a;if(0!==o.button||!n.editable)return!1;let u=null;if(o.target instanceof HTMLAnchorElement)u=o.target;else{let n=o.target;if(!n)return!1;let i=r.editor.view.dom;(u=n.closest("a"))&&!i.contains(u)&&(u=null)}if(!u)return!1;let c=!1;if(r.enableClickSelection&&(c=r.editor.commands.extendMarkRange(r.type.name)),r.openOnClick){let i=(0,s.gu)(n.state,r.type.name),o=null!=(l=u.href)?l:i.href,h=null!=(a=u.target)?a:i.target;o&&(window.open(o,h),c=!0)}return c}}})}function tc(r){return new tr.k_({key:new tr.hs("handlePasteLink"),props:{handlePaste:(n,i,s)=>{let{shouldAutoLink:o}=r,{state:l}=n,{selection:a}=l,{empty:u}=a;if(u)return!1;let c="";s.content.forEach(r=>{c+=r.textContent});let h=tt(c,{defaultProtocol:r.defaultProtocol}).find(r=>r.isLink&&r.value===c);return!!c&&!!h&&(void 0===o||!!o(h.value))&&r.editor.commands.setMark(r.type,{href:h.href})}}})}function th(r,n){let i=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return n&&n.forEach(r=>{let n="string"==typeof r?r:r.scheme;n&&i.push(n)}),!r||r.replace(to,"").match(RegExp(`^(?:(?:${i.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var td=s.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(r=>{"string"==typeof r?e9(r):e9(r.scheme,r.optionalSlashes)})},onDestroy(){e8()},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:(r,n)=>!!th(r,n.protocols),validate:r=>!!r,shouldAutoLink:r=>{let n=/^[a-z][a-z0-9+.-]*:\/\//i.test(r),i=/^[a-z][a-z0-9+.-]*:/i.test(r);if(n||i&&!r.includes("@"))return!0;let s=(r.includes("@")?r.split("@").pop():r).split(/[/?#:]/)[0];return!/^\d{1,3}(\.\d{1,3}){3}$/.test(s)&&!!/\./.test(s)}}),addAttributes(){return{href:{default:null,parseHTML:r=>r.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:r=>{let n=r.getAttribute("href");return!!n&&!!this.options.isAllowedUri(n,{defaultValidate:r=>!!th(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&null}}]},renderHTML({HTMLAttributes:r}){return this.options.isAllowedUri(r.href,{defaultValidate:r=>!!th(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",(0,s.KV)(this.options.HTMLAttributes,r),0]:["a",(0,s.KV)(this.options.HTMLAttributes,{...r,href:""}),0]},markdownTokenName:"link",parseMarkdown:(r,n)=>n.applyMark("link",n.parseInline(r.tokens||[]),{href:r.href,title:r.title||null}),renderMarkdown:(r,n)=>{var i,s,o,l;let a=null!=(s=null==(i=r.attrs)?void 0:i.href)?s:"",u=null!=(l=null==(o=r.attrs)?void 0:o.title)?l:"",c=n.renderChildren(r);return u?`[${c}](${a} "${u}")`:`[${c}](${a})`},addCommands(){return{setLink:r=>({chain:n})=>{let{href:i}=r;return!!this.options.isAllowedUri(i,{defaultValidate:r=>!!th(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&n().setMark(this.name,r).setMeta("preventAutolink",!0).run()},toggleLink:r=>({chain:n})=>{let{href:i}=r||{};return(!i||!!this.options.isAllowedUri(i,{defaultValidate:r=>!!th(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&n().toggleMark(this.name,r,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:r})=>r().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(0,s.Zc)({find:r=>{let n=[];if(r){let{protocols:i,defaultProtocol:s}=this.options,o=tt(r).filter(r=>r.isLink&&this.options.isAllowedUri(r.value,{defaultValidate:r=>!!th(r,i),protocols:i,defaultProtocol:s}));o.length&&o.forEach(r=>{this.options.shouldAutoLink(r.value)&&n.push({text:r.value,data:{href:r.href},index:r.start})})}return n},type:this.type,getAttributes:r=>{var n;return{href:null==(n=r.data)?void 0:n.href}}})]},addProseMirrorPlugins(){let r=[],{protocols:n,defaultProtocol:i}=this.options;return this.options.autolink&&r.push(ta({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:r=>!!th(r,n),protocols:n,defaultProtocol:i}),shouldAutoLink:this.options.shouldAutoLink})),r.push(tu({type:this.type,editor:this.editor,openOnClick:"whenNotEditable"===this.options.openOnClick||this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&r.push(tc({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),r}}),tp=td},59883:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],l=(0,s.A)("grip-vertical",o)},60241:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],l=(0,s.A)("minimize-2",o)},60285:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],l=(0,s.A)("ellipsis",o)},62678:(r,n,i)=>{"use strict";i.d(n,{QO:()=>G,vR:()=>Z,Or:()=>Q,JU:()=>er,lb:()=>en});var s=i(82159),o=i(76865),l=i(8242);function a(r={}){return new o.k_({view:n=>new u(n,r)})}class u{constructor(r,n){var i;this.editorView=r,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!=(i=n.width)?i:1,this.color=!1===n.color?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(n=>{let i=r=>{this[n](r)};return r.dom.addEventListener(n,i),{name:n,handler:i}})}destroy(){this.handlers.forEach(({name:r,handler:n})=>this.editorView.dom.removeEventListener(r,n))}update(r,n){null!=this.cursorPos&&n.doc!=r.state.doc&&(this.cursorPos>r.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(r){r!=this.cursorPos&&(this.cursorPos=r,null==r?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let r,n,i=this.editorView.state.doc.resolve(this.cursorPos),s=!i.parent.inlineContent,o,l=this.editorView.dom,a=l.getBoundingClientRect(),u=a.width/l.offsetWidth,c=a.height/l.offsetHeight;if(s){let r=i.nodeBefore,n=i.nodeAfter;if(r||n){let i=this.editorView.nodeDOM(this.cursorPos-(r?r.nodeSize:0));if(i){let s=i.getBoundingClientRect(),l=r?s.bottom:s.top;r&&n&&(l=(l+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let a=this.width/2*c;o={left:s.left,right:s.right,top:l-a,bottom:l+a}}}}if(!o){let r=this.editorView.coordsAtPos(this.cursorPos),n=this.width/2*u;o={left:r.left-n,right:r.left+n,top:r.top,bottom:r.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",s),this.element.classList.toggle("prosemirror-dropcursor-inline",!s),h&&(h!=document.body||"static"!=getComputedStyle(h).position)){let i=h.getBoundingClientRect(),s=i.width/h.offsetWidth,o=i.height/h.offsetHeight;r=i.left-h.scrollLeft*s,n=i.top-h.scrollTop*o}else r=-pageXOffset,n=-pageYOffset;this.element.style.left=(o.left-r)/u+"px",this.element.style.top=(o.top-n)/c+"px",this.element.style.width=(o.right-o.left)/u+"px",this.element.style.height=(o.bottom-o.top)/c+"px"}scheduleRemoval(r){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),r)}dragover(r){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:r.clientX,top:r.clientY}),i=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),s=i&&i.type.spec.disableDropCursor,o="function"==typeof s?s(this.editorView,n,r):s;if(n&&!o){let r=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let n=(0,l.Um)(this.editorView.state.doc,r,this.editorView.dragging.slice);null!=n&&(r=n)}this.setCursor(r),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(r){this.editorView.dom.contains(r.relatedTarget)||this.setCursor(null)}}var c=i(63197),h=i(12894),d=i(27050);class p extends o.LN{constructor(r){super(r,r)}map(r,n){let i=r.resolve(n.map(this.head));return p.valid(i)?new p(i):o.LN.near(i)}content(){return d.Ji.empty}eq(r){return r instanceof p&&r.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(r,n){if("number"!=typeof n.pos)throw RangeError("Invalid input for GapCursor.fromJSON");return new p(r.resolve(n.pos))}getBookmark(){return new f(this.anchor)}static valid(r){let n=r.parent;if(n.inlineContent||!g(r)||!_(r))return!1;let i=n.type.spec.allowGapCursor;if(null!=i)return i;let s=n.contentMatchAt(r.index()).defaultType;return s&&s.isTextblock}static findGapCursorFrom(r,n,i=!1){i:for(;;){if(!i&&p.valid(r))return r;let s=r.pos,l=null;for(let i=r.depth;;i--){let o=r.node(i);if(n>0?r.indexAfter(i)<o.childCount:r.index(i)>0){l=o.child(n>0?r.indexAfter(i):r.index(i)-1);break}if(0==i)return null;s+=n;let a=r.doc.resolve(s);if(p.valid(a))return a}for(;;){let a=n>0?l.firstChild:l.lastChild;if(!a){if(l.isAtom&&!l.isText&&!o.nh.isSelectable(l)){r=r.doc.resolve(s+l.nodeSize*n),i=!1;continue i}break}l=a,s+=n;let u=r.doc.resolve(s);if(p.valid(u))return u}return null}}}p.prototype.visible=!1,p.findFrom=p.findGapCursorFrom,o.LN.jsonID("gapcursor",p);class f{constructor(r){this.pos=r}map(r){return new f(r.map(this.pos))}resolve(r){let n=r.resolve(this.pos);return p.valid(n)?new p(n):o.LN.near(n)}}function m(r){return r.isAtom||r.spec.isolating||r.spec.createGapCursor}function g(r){for(let n=r.depth;n>=0;n--){let i=r.index(n),s=r.node(n);if(0==i){if(s.type.spec.isolating)return!0;continue}for(let r=s.child(i-1);;r=r.lastChild){if(0==r.childCount&&!r.inlineContent||m(r.type))return!0;if(r.inlineContent)return!1}}return!0}function _(r){for(let n=r.depth;n>=0;n--){let i=r.indexAfter(n),s=r.node(n);if(i==s.childCount){if(s.type.spec.isolating)return!0;continue}for(let r=s.child(i);;r=r.firstChild){if(0==r.childCount&&!r.inlineContent||m(r.type))return!0;if(r.inlineContent)return!1}}return!0}function y(){return new o.k_({props:{decorations:v,createSelectionBetween:(r,n,i)=>n.pos==i.pos&&p.valid(i)?new p(i):null,handleClick:w,handleKeyDown:k,handleDOMEvents:{beforeinput:x}}})}let k=(0,h.K)({ArrowLeft:b("horiz",-1),ArrowRight:b("horiz",1),ArrowUp:b("vert",-1),ArrowDown:b("vert",1)});function b(r,n){let i="vert"==r?n>0?"down":"up":n>0?"right":"left";return function(r,s,l){let a=r.selection,u=n>0?a.$to:a.$from,c=a.empty;if(a instanceof o.U3){if(!l.endOfTextblock(i)||0==u.depth)return!1;c=!1,u=r.doc.resolve(n>0?u.after():u.before())}let h=p.findGapCursorFrom(u,n,c);return!!h&&(s&&s(r.tr.setSelection(new p(h))),!0)}}function w(r,n,i){if(!r||!r.editable)return!1;let s=r.state.doc.resolve(n);if(!p.valid(s))return!1;let l=r.posAtCoords({left:i.clientX,top:i.clientY});return!(l&&l.inside>-1&&o.nh.isSelectable(r.state.doc.nodeAt(l.inside)))&&(r.dispatch(r.state.tr.setSelection(new p(s))),!0)}function x(r,n){if("insertCompositionText"!=n.inputType||!(r.state.selection instanceof p))return!1;let{$from:i}=r.state.selection,s=i.parent.contentMatchAt(i.index()).findWrapping(r.state.schema.nodes.text);if(!s)return!1;let l=d.FK.empty;for(let r=s.length-1;r>=0;r--)l=d.FK.from(s[r].createAndFill(null,l));let a=r.state.tr.replace(i.pos,i.pos,new d.Ji(l,0,0));return a.setSelection(o.U3.near(a.doc.resolve(i.pos+1))),r.dispatch(a),!1}function v(r){if(!(r.selection instanceof p))return null;let n=document.createElement("div");return n.className="ProseMirror-gapcursor",c.zF.create(r.doc,[c.NZ.widget(r.selection.head,n,{key:"gapcursor"})])}var C=200,A=function(){};A.prototype.append=function(r){return r.length?(r=A.from(r),!this.length&&r||r.length<C&&this.leafAppend(r)||this.length<C&&r.leafPrepend(this)||this.appendInner(r)):this},A.prototype.prepend=function(r){return r.length?A.from(r).append(this):this},A.prototype.appendInner=function(r){return new S(this,r)},A.prototype.slice=function(r,n){return(void 0===r&&(r=0),void 0===n&&(n=this.length),r>=n)?A.empty:this.sliceInner(Math.max(0,r),Math.min(this.length,n))},A.prototype.get=function(r){if(!(r<0)&&!(r>=this.length))return this.getInner(r)},A.prototype.forEach=function(r,n,i){void 0===n&&(n=0),void 0===i&&(i=this.length),n<=i?this.forEachInner(r,n,i,0):this.forEachInvertedInner(r,n,i,0)},A.prototype.map=function(r,n,i){void 0===n&&(n=0),void 0===i&&(i=this.length);var s=[];return this.forEach(function(n,i){return s.push(r(n,i))},n,i),s},A.from=function(r){return r instanceof A?r:r&&r.length?new E(r):A.empty};var E=function(r){function n(n){r.call(this),this.values=n}r&&(n.__proto__=r),n.prototype=Object.create(r&&r.prototype),n.prototype.constructor=n;var i={length:{configurable:!0},depth:{configurable:!0}};return n.prototype.flatten=function(){return this.values},n.prototype.sliceInner=function(r,i){return 0==r&&i==this.length?this:new n(this.values.slice(r,i))},n.prototype.getInner=function(r){return this.values[r]},n.prototype.forEachInner=function(r,n,i,s){for(var o=n;o<i;o++)if(!1===r(this.values[o],s+o))return!1},n.prototype.forEachInvertedInner=function(r,n,i,s){for(var o=n-1;o>=i;o--)if(!1===r(this.values[o],s+o))return!1},n.prototype.leafAppend=function(r){if(this.length+r.length<=C)return new n(this.values.concat(r.flatten()))},n.prototype.leafPrepend=function(r){if(this.length+r.length<=C)return new n(r.flatten().concat(this.values))},i.length.get=function(){return this.values.length},i.depth.get=function(){return 0},Object.defineProperties(n.prototype,i),n}(A);A.empty=new E([]);var S=function(r){function n(n,i){r.call(this),this.left=n,this.right=i,this.length=n.length+i.length,this.depth=Math.max(n.depth,i.depth)+1}return r&&(n.__proto__=r),n.prototype=Object.create(r&&r.prototype),n.prototype.constructor=n,n.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},n.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},n.prototype.forEachInner=function(r,n,i,s){var o=this.left.length;if(n<o&&!1===this.left.forEachInner(r,n,Math.min(i,o),s)||i>o&&!1===this.right.forEachInner(r,Math.max(n-o,0),Math.min(this.length,i)-o,s+o))return!1},n.prototype.forEachInvertedInner=function(r,n,i,s){var o=this.left.length;if(n>o&&!1===this.right.forEachInvertedInner(r,n-o,Math.max(i,o)-o,s+o)||i<o&&!1===this.left.forEachInvertedInner(r,Math.min(n,o),i,s))return!1},n.prototype.sliceInner=function(r,n){if(0==r&&n==this.length)return this;var i=this.left.length;return n<=i?this.left.slice(r,n):r>=i?this.right.slice(r-i,n-i):this.left.slice(r,i).append(this.right.slice(0,n-i))},n.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new n(this.left,i)},n.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new n(i,this.right)},n.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new n(this.left,new n(this.right,r)):new n(this,r)},n}(A);let M=A,T=500;class D{constructor(r,n){this.items=r,this.eventCount=n}popEvent(r,n){let i,s,o,l;if(0==this.eventCount)return null;let a=this.items.length;for(;;a--)if(this.items.get(a-1).selection){--a;break}n&&(s=(i=this.remapping(a,this.items.length)).maps.length);let u=r.tr,c=[],h=[];return this.items.forEach((r,n)=>{if(!r.step){i||(s=(i=this.remapping(a,n+1)).maps.length),s--,h.push(r);return}if(i){h.push(new I(r.map));let n=r.step.map(i.slice(s)),o;n&&u.maybeStep(n).doc&&(o=u.mapping.maps[u.mapping.maps.length-1],c.push(new I(o,void 0,void 0,c.length+h.length))),s--,o&&i.appendMap(o,s)}else u.maybeStep(r.step);if(r.selection)return o=i?r.selection.map(i.slice(s)):r.selection,l=new D(this.items.slice(0,a).append(h.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:u,selection:o}}addTransform(r,n,i,s){let o=[],l=this.eventCount,a=this.items,u=!s&&a.length?a.get(a.length-1):null;for(let i=0;i<r.steps.length;i++){let c=r.steps[i].invert(r.docs[i]),h=new I(r.mapping.maps[i],c,n),d;(d=u&&u.merge(h))&&(h=d,i?o.pop():a=a.slice(0,a.length-1)),o.push(h),n&&(l++,n=void 0),s||(u=h)}let c=l-i.depth;return c>R&&(a=F(a,c),l-=c),new D(a.append(o),l)}remapping(r,n){let i=new l.X9;return this.items.forEach((n,s)=>{let o=null!=n.mirrorOffset&&s-n.mirrorOffset>=r?i.maps.length-n.mirrorOffset:void 0;i.appendMap(n.map,o)},r,n),i}addMaps(r){return 0==this.eventCount?this:new D(this.items.append(r.map(r=>new I(r))),this.eventCount)}rebased(r,n){if(!this.eventCount)return this;let i=[],s=Math.max(0,this.items.length-n),o=r.mapping,l=r.steps.length,a=this.eventCount;this.items.forEach(r=>{r.selection&&a--},s);let u=n;this.items.forEach(n=>{let s=o.getMirror(--u);if(null==s)return;l=Math.min(l,s);let c=o.maps[s];if(n.step){let l=r.steps[s].invert(r.docs[s]),h=n.selection&&n.selection.map(o.slice(u+1,s));h&&a++,i.push(new I(c,l,h))}else i.push(new I(c))},s);let c=[];for(let r=n;r<l;r++)c.push(new I(o.maps[r]));let h=new D(this.items.slice(0,s).append(c).append(i),a);return h.emptyItemCount()>T&&(h=h.compress(this.items.length-i.length)),h}emptyItemCount(){let r=0;return this.items.forEach(n=>{!n.step&&r++}),r}compress(r=this.items.length){let n=this.remapping(0,r),i=n.maps.length,s=[],o=0;return this.items.forEach((l,a)=>{if(a>=r)s.push(l),l.selection&&o++;else if(l.step){let r=l.step.map(n.slice(i)),a=r&&r.getMap();if(i--,a&&n.appendMap(a,i),r){let u=l.selection&&l.selection.map(n.slice(i));u&&o++;let c=new I(a.invert(),r,u),h,d=s.length-1;(h=s.length&&s[d].merge(c))?s[d]=h:s.push(c)}}else l.map&&i--},this.items.length,0),new D(M.from(s.reverse()),o)}}function F(r,n){let i;return r.forEach((r,s)=>{if(r.selection&&0==n--)return i=s,!1}),r.slice(i)}D.empty=new D(M.empty,0);class I{constructor(r,n,i,s){this.map=r,this.step=n,this.selection=i,this.mirrorOffset=s}merge(r){if(this.step&&r.step&&!r.selection){let n=r.step.merge(this.step);if(n)return new I(n.getMap().invert(),n,this.selection)}}}class L{constructor(r,n,i,s,o){this.done=r,this.undone=n,this.prevRanges=i,this.prevTime=s,this.prevComposition=o}}let R=20;function N(r,n,i,s){let o=i.getMeta(H),l;if(o)return o.historyState;i.getMeta(V)&&(r=new L(r.done,r.undone,null,0,-1));let a=i.getMeta("appendedTransaction");if(0==i.steps.length)return r;if(a&&a.getMeta(H))if(a.getMeta(H).redo)return new L(r.done.addTransform(i,void 0,s,j(n)),r.undone,z(i.mapping.maps),r.prevTime,r.prevComposition);else return new L(r.done,r.undone.addTransform(i,void 0,s,j(n)),null,r.prevTime,r.prevComposition);if(!1===i.getMeta("addToHistory")||a&&!1===a.getMeta("addToHistory"))if(l=i.getMeta("rebased"))return new L(r.done.rebased(i,l),r.undone.rebased(i,l),P(r.prevRanges,i.mapping),r.prevTime,r.prevComposition);else return new L(r.done.addMaps(i.mapping.maps),r.undone.addMaps(i.mapping.maps),P(r.prevRanges,i.mapping),r.prevTime,r.prevComposition);{let o=i.getMeta("composition"),l=0==r.prevTime||!a&&r.prevComposition!=o&&(r.prevTime<(i.time||0)-s.newGroupDelay||!O(i,r.prevRanges)),u=a?P(r.prevRanges,i.mapping):z(i.mapping.maps);return new L(r.done.addTransform(i,l?n.selection.getBookmark():void 0,s,j(n)),D.empty,u,i.time,null==o?r.prevComposition:o)}}function O(r,n){if(!n)return!1;if(!r.docChanged)return!0;let i=!1;return r.mapping.maps[0].forEach((r,s)=>{for(let o=0;o<n.length;o+=2)r<=n[o+1]&&s>=n[o]&&(i=!0)}),i}function z(r){let n=[];for(let i=r.length-1;i>=0&&0==n.length;i--)r[i].forEach((r,i,s,o)=>n.push(s,o));return n}function P(r,n){if(!r)return null;let i=[];for(let s=0;s<r.length;s+=2){let o=n.map(r[s],1),l=n.map(r[s+1],-1);o<=l&&i.push(o,l)}return i}function $(r,n,i){let s=j(n),o=H.get(n).spec.config,l=(i?r.undone:r.done).popEvent(n,s);if(!l)return null;let a=l.selection.resolve(l.transform.doc),u=(i?r.done:r.undone).addTransform(l.transform,n.selection.getBookmark(),o,s),c=new L(i?u:l.remaining,i?l.remaining:u,null,0,-1);return l.transform.setSelection(a).setMeta(H,{redo:i,historyState:c})}let B=!1,q=null;function j(r){let n=r.plugins;if(q!=n){B=!1,q=n;for(let r=0;r<n.length;r++)if(n[r].spec.historyPreserveItems){B=!0;break}}return B}let H=new o.hs("history"),V=new o.hs("closeHistory");function U(r={}){return r={depth:r.depth||100,newGroupDelay:r.newGroupDelay||500},new o.k_({key:H,state:{init:()=>new L(D.empty,D.empty,null,0,-1),apply:(n,i,s)=>N(i,s,n,r)},config:r,props:{handleDOMEvents:{beforeinput(r,n){let i=n.inputType,s="historyUndo"==i?J:"historyRedo"==i?K:null;return!!s&&!!r.editable&&(n.preventDefault(),s(r.state,r.dispatch))}}}})}function W(r,n){return(i,s)=>{let o=H.getState(i);if(!o||0==(r?o.undone:o.done).eventCount)return!1;if(s){let l=$(o,i,r);l&&s(n?l.scrollIntoView():l)}return!0}}let J=W(!1,!0),K=W(!0,!0);W(!1,!1),W(!0,!1),s.YY.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize",textCounter:r=>r.length,wordCounter:r=>r.split(" ").filter(r=>""!==r).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=r=>{let n=(null==r?void 0:r.node)||this.editor.state.doc;if("textSize"===((null==r?void 0:r.mode)||this.options.mode)){let r=n.textBetween(0,n.content.size,void 0," ");return this.options.textCounter(r)}return n.nodeSize},this.storage.words=r=>{let n=(null==r?void 0:r.node)||this.editor.state.doc,i=n.textBetween(0,n.content.size," "," ");return this.options.wordCounter(i)}},addProseMirrorPlugins(){let r=!1;return[new o.k_({key:new o.hs("characterCount"),appendTransaction:(n,i,s)=>{if(r)return;let o=this.options.limit;if(null==o||0===o){r=!0;return}let l=this.storage.characters({node:s.doc});if(l>o){let n=0,i=l-o;console.warn(`[CharacterCount] Initial content exceeded limit of ${o} characters. Content was automatically trimmed.`);let a=s.tr.deleteRange(n,i);return r=!0,a}r=!0},filterTransaction:(r,n)=>{let i=this.options.limit;if(!r.docChanged||0===i||null==i)return!0;let s=this.storage.characters({node:n.doc}),o=this.storage.characters({node:r.doc});if(o<=i||s>i&&o>i&&o<=s)return!0;if(s>i&&o>i&&o>s||!r.getMeta("paste"))return!1;let l=r.selection.$head.pos,a=l-(o-i),u=l;return r.deleteRange(a,u),!(this.storage.characters({node:r.doc})>i)}})]}});var G=s.YY.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[a(this.options)]}});s.YY.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new o.k_({key:new o.hs("focus"),props:{decorations:({doc:r,selection:n})=>{let{isEditable:i,isFocused:s}=this.editor,{anchor:o}=n,l=[];if(!i||!s)return c.zF.create(r,[]);let a=0;"deepest"===this.options.mode&&r.descendants((r,n)=>{if(!r.isText){if(!(o>=n&&o<=n+r.nodeSize-1))return!1;a+=1}});let u=0;return r.descendants((r,n)=>!r.isText&&!!(o>=n&&o<=n+r.nodeSize-1)&&((u+=1,"deepest"===this.options.mode&&a-u>0||"shallowest"===this.options.mode&&u>1)?"deepest"===this.options.mode:void l.push(c.NZ.node(n,n+r.nodeSize,{class:this.options.className})))),c.zF.create(r,l)}}})]}});var Z=s.YY.create({name:"gapCursor",addProseMirrorPlugins:()=>[y()],extendNodeSchema(r){var n;let i={name:r.name,options:r.options,storage:r.storage};return{allowGapCursor:null!=(n=(0,s.gk)((0,s.iI)(r,"allowGapCursor",i)))?n:null}}}),X="placeholder";function Y(r){return r.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var Q=s.YY.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:X,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){let r=this.options.dataAttribute?`data-${Y(this.options.dataAttribute)}`:`data-${X}`;return[new o.k_({key:new o.hs("placeholder"),props:{decorations:({doc:n,selection:i})=>{let o=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:l}=i,a=[];if(!o)return null;let u=this.editor.isEmpty;return n.descendants((n,i)=>{let o=l>=i&&l<=i+n.nodeSize,h=!n.isLeaf&&(0,s.Op)(n);if(!n.type.isTextblock)return this.options.includeChildren;if((o||!this.options.showOnlyCurrent)&&h){let s=[this.options.emptyNodeClass];u&&s.push(this.options.emptyEditorClass);let l=c.NZ.node(i,i+n.nodeSize,{class:s.join(" "),[r]:"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:n,pos:i,hasAnchor:o}):this.options.placeholder});a.push(l)}return this.options.includeChildren}),c.zF.create(n,a)}}})]}});s.YY.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){let{editor:r,options:n}=this;return[new o.k_({key:new o.hs("selection"),props:{decorations:i=>i.selection.empty||r.isFocused||!r.isEditable||(0,s.BQ)(i.selection)||r.view.dragging?null:c.zF.create(i.doc,[c.NZ.inline(i.selection.from,i.selection.to,{class:n.className})])}})]}});var ee="skipTrailingNode";function et({types:r,node:n}){return n&&Array.isArray(r)&&r.includes(n.type)||(null==n?void 0:n.type)===r}var er=s.YY.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var r;let n=new o.hs(this.name),i=this.options.node||(null==(r=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:r.name)||"paragraph",s=Object.entries(this.editor.schema.nodes).map(([,r])=>r).filter(r=>(this.options.notAfter||[]).concat(i).includes(r.name));return[new o.k_({key:n,appendTransaction:(r,s,o)=>{let{doc:l,tr:a,schema:u}=o,c=n.getState(o),h=l.content.size,d=u.nodes[i];if(!r.some(r=>r.getMeta(ee))&&c)return a.insert(h,d.create())},state:{init:(r,n)=>!et({node:n.tr.doc.lastChild,types:s}),apply:(r,n)=>!r.docChanged||r.getMeta("__uniqueIDTransaction")?n:!et({node:r.doc.lastChild,types:s})}})]}}),en=s.YY.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:r,dispatch:n})=>J(r,n),redo:()=>({state:r,dispatch:n})=>K(r,n)}),addProseMirrorPlugins(){return[U(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()}}})},63393:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["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"}]],l=(0,s.A)("folder-plus",o)},65915:r=>{var n=!0,i=!1,s=!1;function o(r,n,i){var s=r.attrIndex(n),o=[n,i];s<0?r.attrPush(o):r.attrs[s]=o}function l(r,n){for(var i=r[n].level-1,s=n-1;s>=0;s--)if(r[s].level===i)return s;return -1}function a(r,n){return f(r[n])&&m(r[n-1])&&g(r[n-2])&&_(r[n])}function u(r,n){if(r.children.unshift(c(r,n)),r.children[1].content=r.children[1].content.slice(3),r.content=r.content.slice(3),i)if(s){r.children.pop();var o="task-item-"+Math.ceil(1e7*Math.random()-1e3);r.children[0].content=r.children[0].content.slice(0,-1)+' id="'+o+'">',r.children.push(p(r.content,o,n))}else r.children.unshift(h(n)),r.children.push(d(n))}function c(r,i){var s=new i("html_inline","",0),o=n?' disabled="" ':"";return 0===r.content.indexOf("[ ] ")?s.content='<input class="task-list-item-checkbox"'+o+'type="checkbox">':(0===r.content.indexOf("[x] ")||0===r.content.indexOf("[X] "))&&(s.content='<input class="task-list-item-checkbox" checked=""'+o+'type="checkbox">'),s}function h(r){var n=new r("html_inline","",0);return n.content="<label>",n}function d(r){var n=new r("html_inline","",0);return n.content="</label>",n}function p(r,n,i){var s=new i("html_inline","",0);return s.content='<label class="task-list-item-label" for="'+n+'">'+r+"</label>",s.attrs=[{for:n}],s}function f(r){return"inline"===r.type}function m(r){return"paragraph_open"===r.type}function g(r){return"list_item_open"===r.type}function _(r){return 0===r.content.indexOf("[ ] ")||0===r.content.indexOf("[x] ")||0===r.content.indexOf("[X] ")}r.exports=function(r,c){c&&(n=!c.enabled,i=!!c.label,s=!!c.labelAfter),r.core.ruler.after("inline","github-task-lists",function(r){for(var i=r.tokens,s=2;s<i.length;s++)a(i,s)&&(u(i[s],r.Token),o(i[s-2],"class","task-list-item"+(n?"":" enabled")),o(i[l(i,s-2)],"class","contains-task-list"))})}},68806:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],l=(0,s.A)("plug",o)},69048:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3",key:"m1af9g"}],["path",{d:"M9 11.2h5.7",key:"3zgcl2"}]],l=(0,s.A)("square-function",o)},73300:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],l=(0,s.A)("clipboard",o)},76022:(r,n,i)=>{"use strict";r.exports=i.p+"static/media/web-tree-sitter.f7f7244f.wasm"},76065:(r,n,i)=>{"use strict";i.d(n,{H:()=>s.Hj});var s=i(5989)},76865:(r,n,i)=>{"use strict";i.d(n,{$t:()=>M,LN:()=>a,U3:()=>d,hs:()=>L,i5:()=>g,k_:()=>D,nh:()=>f,yn:()=>u});var s=i(27050),o=i(8242);let l=Object.create(null);class a{constructor(r,n,i){this.$anchor=r,this.$head=n,this.ranges=i||[new u(r.min(n),r.max(n))]}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 r=this.ranges;for(let n=0;n<r.length;n++)if(r[n].$from.pos!=r[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(r,n=s.Ji.empty){let i=n.content.lastChild,o=null;for(let r=0;r<n.openEnd;r++)o=i,i=i.lastChild;let l=r.steps.length,a=this.ranges;for(let u=0;u<a.length;u++){let{$from:c,$to:h}=a[u],d=r.mapping.slice(l);r.replaceRange(d.map(c.pos),d.map(h.pos),u?s.Ji.empty:n),0==u&&k(r,l,(i?i.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(r,n){let i=r.steps.length,s=this.ranges;for(let o=0;o<s.length;o++){let{$from:l,$to:a}=s[o],u=r.mapping.slice(i),c=u.map(l.pos),h=u.map(a.pos);o?r.deleteRange(c,h):(r.replaceRangeWith(c,h,n),k(r,i,n.isInline?-1:1))}}static findFrom(r,n,i=!1){let s=r.parent.inlineContent?new d(r):y(r.node(0),r.parent,r.pos,r.index(),n,i);if(s)return s;for(let s=r.depth-1;s>=0;s--){let o=n<0?y(r.node(0),r.node(s),r.before(s+1),r.index(s),n,i):y(r.node(0),r.node(s),r.after(s+1),r.index(s)+1,n,i);if(o)return o}return null}static near(r,n=1){return this.findFrom(r,n)||this.findFrom(r,-n)||new g(r.node(0))}static atStart(r){return y(r,r,0,0,1)||new g(r)}static atEnd(r){return y(r,r,r.content.size,r.childCount,-1)||new g(r)}static fromJSON(r,n){if(!n||!n.type)throw RangeError("Invalid input for Selection.fromJSON");let i=l[n.type];if(!i)throw RangeError(`No selection type ${n.type} defined`);return i.fromJSON(r,n)}static jsonID(r,n){if(r in l)throw RangeError("Duplicate use of selection JSON ID "+r);return l[r]=n,n.prototype.jsonID=r,n}getBookmark(){return d.between(this.$anchor,this.$head).getBookmark()}}a.prototype.visible=!0;class u{constructor(r,n){this.$from=r,this.$to=n}}let c=!1;function h(r){c||r.parent.inlineContent||(c=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+r.parent.type.name+")"))}class d extends a{constructor(r,n=r){h(r),h(n),super(r,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(r,n){let i=r.resolve(n.map(this.head));if(!i.parent.inlineContent)return a.near(i);let s=r.resolve(n.map(this.anchor));return new d(s.parent.inlineContent?s:i,i)}replace(r,n=s.Ji.empty){if(super.replace(r,n),n==s.Ji.empty){let n=this.$from.marksAcross(this.$to);n&&r.ensureMarks(n)}}eq(r){return r instanceof d&&r.anchor==this.anchor&&r.head==this.head}getBookmark(){return new p(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(r,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new d(r.resolve(n.anchor),r.resolve(n.head))}static create(r,n,i=n){let s=r.resolve(n);return new this(s,i==n?s:r.resolve(i))}static between(r,n,i){let s=r.pos-n.pos;if((!i||s)&&(i=s>=0?1:-1),!n.parent.inlineContent){let r=a.findFrom(n,i,!0)||a.findFrom(n,-i,!0);if(!r)return a.near(n,i);n=r.$head}return r.parent.inlineContent||(0==s?r=n:(r=(a.findFrom(r,-i,!0)||a.findFrom(r,i,!0)).$anchor).pos<n.pos!=s<0&&(r=n)),new d(r,n)}}a.jsonID("text",d);class p{constructor(r,n){this.anchor=r,this.head=n}map(r){return new p(r.map(this.anchor),r.map(this.head))}resolve(r){return d.between(r.resolve(this.anchor),r.resolve(this.head))}}class f extends a{constructor(r){let n=r.nodeAfter,i=r.node(0).resolve(r.pos+n.nodeSize);super(r,i),this.node=n}map(r,n){let{deleted:i,pos:s}=n.mapResult(this.anchor),o=r.resolve(s);return i?a.near(o):new f(o)}content(){return new s.Ji(s.FK.from(this.node),0,0)}eq(r){return r instanceof f&&r.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new m(this.anchor)}static fromJSON(r,n){if("number"!=typeof n.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new f(r.resolve(n.anchor))}static create(r,n){return new f(r.resolve(n))}static isSelectable(r){return!r.isText&&!1!==r.type.spec.selectable}}f.prototype.visible=!1,a.jsonID("node",f);class m{constructor(r){this.anchor=r}map(r){let{deleted:n,pos:i}=r.mapResult(this.anchor);return n?new p(i,i):new m(i)}resolve(r){let n=r.resolve(this.anchor),i=n.nodeAfter;return i&&f.isSelectable(i)?new f(n):a.near(n)}}class g extends a{constructor(r){super(r.resolve(0),r.resolve(r.content.size))}replace(r,n=s.Ji.empty){if(n==s.Ji.empty){r.delete(0,r.doc.content.size);let n=a.atStart(r.doc);n.eq(r.selection)||r.setSelection(n)}else super.replace(r,n)}toJSON(){return{type:"all"}}static fromJSON(r){return new g(r)}map(r){return new g(r)}eq(r){return r instanceof g}getBookmark(){return _}}a.jsonID("all",g);let _={map(){return this},resolve:r=>new g(r)};function y(r,n,i,s,o,l=!1){if(n.inlineContent)return d.create(r,i);for(let a=s-(o>0?0:1);o>0?a<n.childCount:a>=0;a+=o){let s=n.child(a);if(s.isAtom){if(!l&&f.isSelectable(s))return f.create(r,i-(o<0?s.nodeSize:0))}else{let n=y(r,s,i+o,o<0?s.childCount:0,o,l);if(n)return n}i+=s.nodeSize*o}return null}function k(r,n,i){let s,l=r.steps.length-1;if(l<n)return;let u=r.steps[l];(u instanceof o.Ln||u instanceof o.Wg)&&(r.mapping.maps[l].forEach((r,n,i,o)=>{null==s&&(s=o)}),r.setSelection(a.near(r.doc.resolve(s),i)))}let b=1,w=2,x=4;class v extends o.dL{constructor(r){super(r.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=r.selection,this.storedMarks=r.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(r){if(r.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=r,this.curSelectionFor=this.steps.length,this.updated=(this.updated|b)&~w,this.storedMarks=null,this}get selectionSet(){return(this.updated&b)>0}setStoredMarks(r){return this.storedMarks=r,this.updated|=w,this}ensureMarks(r){return s.CU.sameSet(this.storedMarks||this.selection.$from.marks(),r)||this.setStoredMarks(r),this}addStoredMark(r){return this.ensureMarks(r.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(r){return this.ensureMarks(r.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&w)>0}addStep(r,n){super.addStep(r,n),this.updated=this.updated&~w,this.storedMarks=null}setTime(r){return this.time=r,this}replaceSelection(r){return this.selection.replace(this,r),this}replaceSelectionWith(r,n=!0){let i=this.selection;return n&&(r=r.mark(this.storedMarks||(i.empty?i.$from.marks():i.$from.marksAcross(i.$to)||s.CU.none))),i.replaceWith(this,r),this}deleteSelection(){return this.selection.replace(this),this}insertText(r,n,i){let s=this.doc.type.schema;if(null==n)return r?this.replaceSelectionWith(s.text(r),!0):this.deleteSelection();{if(null==i&&(i=n),!r)return this.deleteRange(n,i);let o=this.storedMarks;if(!o){let r=this.doc.resolve(n);o=i==n?r.marks():r.marksAcross(this.doc.resolve(i))}return this.replaceRangeWith(n,i,s.text(r,o)),this.selection.empty||this.selection.to!=n+r.length||this.setSelection(a.near(this.selection.$to)),this}}setMeta(r,n){return this.meta["string"==typeof r?r:r.key]=n,this}getMeta(r){return this.meta["string"==typeof r?r:r.key]}get isGeneric(){for(let r in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=x,this}get scrolledIntoView(){return(this.updated&x)>0}}function C(r,n){return n&&r?r.bind(n):r}class A{constructor(r,n,i){this.name=r,this.init=C(n.init,i),this.apply=C(n.apply,i)}}let E=[new A("doc",{init:r=>r.doc||r.schema.topNodeType.createAndFill(),apply:r=>r.doc}),new A("selection",{init:(r,n)=>r.selection||a.atStart(n.doc),apply:r=>r.selection}),new A("storedMarks",{init:r=>r.storedMarks||null,apply:(r,n,i,s)=>s.selection.$cursor?r.storedMarks:null}),new A("scrollToSelection",{init:()=>0,apply:(r,n)=>r.scrolledIntoView?n+1:n})];class S{constructor(r,n){this.schema=r,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=E.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new A(r.key,r.spec.state,r))})}}class M{constructor(r){this.config=r}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(r){return this.applyTransaction(r).state}filterTransaction(r,n=-1){for(let i=0;i<this.config.plugins.length;i++)if(i!=n){let n=this.config.plugins[i];if(n.spec.filterTransaction&&!n.spec.filterTransaction.call(n,r,this))return!1}return!0}applyTransaction(r){if(!this.filterTransaction(r))return{state:this,transactions:[]};let n=[r],i=this.applyInner(r),s=null;for(;;){let o=!1;for(let l=0;l<this.config.plugins.length;l++){let a=this.config.plugins[l];if(a.spec.appendTransaction){let u=s?s[l].n:0,c=s?s[l].state:this,h=u<n.length&&a.spec.appendTransaction.call(a,u?n.slice(u):n,c,i);if(h&&i.filterTransaction(h,l)){if(h.setMeta("appendedTransaction",r),!s){s=[];for(let r=0;r<this.config.plugins.length;r++)s.push(r<l?{state:i,n:n.length}:{state:this,n:0})}n.push(h),i=i.applyInner(h),o=!0}s&&(s[l]={state:i,n:n.length})}}if(!o)return{state:i,transactions:n}}}applyInner(r){if(!r.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let n=new M(this.config),i=this.config.fields;for(let s=0;s<i.length;s++){let o=i[s];n[o.name]=o.apply(r,this[o.name],this,n)}return n}get tr(){return new v(this)}static create(r){let n=new S(r.doc?r.doc.type.schema:r.schema,r.plugins),i=new M(n);for(let s=0;s<n.fields.length;s++)i[n.fields[s].name]=n.fields[s].init(r,i);return i}reconfigure(r){let n=new S(this.schema,r.plugins),i=n.fields,s=new M(n);for(let n=0;n<i.length;n++){let o=i[n].name;s[o]=this.hasOwnProperty(o)?this[o]:i[n].init(r,s)}return s}toJSON(r){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),r&&"object"==typeof r)for(let i in r){if("doc"==i||"selection"==i)throw RangeError("The JSON fields `doc` and `selection` are reserved");let s=r[i],o=s.spec.state;o&&o.toJSON&&(n[i]=o.toJSON.call(s,this[s.key]))}return n}static fromJSON(r,n,i){if(!n)throw RangeError("Invalid input for EditorState.fromJSON");if(!r.schema)throw RangeError("Required config field 'schema' missing");let o=new S(r.schema,r.plugins),l=new M(o);return o.fields.forEach(o=>{if("doc"==o.name)l.doc=s.bP.fromJSON(r.schema,n.doc);else if("selection"==o.name)l.selection=a.fromJSON(l.doc,n.selection);else if("storedMarks"==o.name)n.storedMarks&&(l.storedMarks=n.storedMarks.map(r.schema.markFromJSON));else{if(i)for(let s in i){let a=i[s],u=a.spec.state;if(a.key==o.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,s)){l[o.name]=u.fromJSON.call(a,r,n[s],l);return}}l[o.name]=o.init(r,l)}}),l}}function T(r,n,i){for(let s in r){let o=r[s];o instanceof Function?o=o.bind(n):"handleDOMEvents"==s&&(o=T(o,n,{})),i[s]=o}return i}class D{constructor(r){this.spec=r,this.props={},r.props&&T(r.props,this,this.props),this.key=r.key?r.key.key:I("plugin")}getState(r){return r[this.key]}}let F=Object.create(null);function I(r){return r in F?r+"$"+ ++F[r]:(F[r]=0,r+"$")}class L{constructor(r="key"){this.key=I(r)}get(r){return r.config.pluginsByKey[this.key]}getState(r){return r[this.key]}}},80860:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["circle",{cx:"12",cy:"13",r:"8",key:"3y4lt7"}],["path",{d:"M12 9v4l2 2",key:"1c63tq"}],["path",{d:"M5 3 2 6",key:"18tl5t"}],["path",{d:"m22 6-3-3",key:"1opdir"}],["path",{d:"M6.38 18.7 4 21",key:"17xu3x"}],["path",{d:"M17.64 18.67 20 21",key:"kv2oe2"}]],l=(0,s.A)("alarm-clock",o)},82150:(r,n,i)=>{"use strict";i.d(n,{L2:()=>O,Rg:()=>h,_0:()=>z,_J:()=>R,ck:()=>d,it:()=>v});var s=i(82159),o=Object.defineProperty,l=(r,n)=>{for(var i in n)o(r,i,{get:n[i],enumerable:!0})},a="listItem",u="textStyle",c=/^\s*([-+*])\s$/,h=s.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:r}){return["ul",(0,s.KV)(this.options.HTMLAttributes,r),0]},markdownTokenName:"list",parseMarkdown:(r,n)=>"list"!==r.type||r.ordered?[]:{type:"bulletList",content:r.items?n.parseChildren(r.items):[]},renderMarkdown:(r,n)=>r.content?n.renderChildren(r.content,"\n"):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:r,chain:n})=>this.options.keepAttributes?n().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(a,this.editor.getAttributes(u)).run():r.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let r=(0,s.tG)({find:c,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(r=(0,s.tG)({find:c,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(u),editor:this.editor})),[r]}}),d=s.bP.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:r}){return["li",(0,s.KV)(this.options.HTMLAttributes,r),0]},markdownTokenName:"list_item",parseMarkdown:(r,n)=>{var i;if("list_item"!==r.type)return[];let s=null!=(i=n.parseBlockChildren)?i:n.parseChildren,o=[];if(r.tokens&&r.tokens.length>0)if(r.tokens.some(r=>"paragraph"===r.type))o=s(r.tokens);else{let i=r.tokens[0];if(i&&"text"===i.type&&i.tokens&&i.tokens.length>0){if(o=[{type:"paragraph",content:n.parseInline(i.tokens)}],r.tokens.length>1){let n=s(r.tokens.slice(1));o.push(...n)}}else o=s(r.tokens)}return 0===o.length&&(o=[{type:"paragraph",content:[]}]),{type:"listItem",content:o}},renderMarkdown:(r,n,i)=>(0,s.kj)(r,n,r=>{var n,i;if("bulletList"===r.parentType)return"- ";if("orderedList"===r.parentType){let s=(null==(i=null==(n=r.meta)?void 0:n.parentAttrs)?void 0:i.start)||1;return`${s+r.index}. `}return"- "},i),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});l({},{findListItemPos:()=>p,getNextListDepth:()=>f,handleBackspace:()=>y,handleDelete:()=>w,hasListBefore:()=>m,hasListItemAfter:()=>x,hasListItemBefore:()=>g,listItemHasSubList:()=>_,nextListIsDeeper:()=>k,nextListIsHigher:()=>b});var p=(r,n)=>{let{$from:i}=n.selection,o=(0,s.Pg)(r,n.schema),l=null,a=i.depth,u=i.pos,c=null;for(;a>0&&null===c;)(l=i.node(a)).type===o?c=a:(a-=1,u-=1);return null===c?null:{$pos:n.doc.resolve(u),depth:c}},f=(r,n)=>{let i=p(r,n);if(!i)return!1;let[,o]=(0,s.fl)(n,r,i.$pos.pos+4);return o},m=(r,n,i)=>{let{$anchor:s}=r.selection,o=Math.max(0,s.pos-2),l=r.doc.resolve(o).node();return!!l&&!!i.includes(l.type.name)},g=(r,n)=>{var i;let{$anchor:s}=n.selection,o=n.doc.resolve(s.pos-2);return 0!==o.index()&&(null==(i=o.nodeBefore)?void 0:i.type.name)===r},_=(r,n,i)=>{if(!i)return!1;let o=(0,s.Pg)(r,n.schema),l=!1;return i.descendants(r=>{r.type===o&&(l=!0)}),l},y=(r,n,i)=>{if(r.commands.undoInputRule())return!0;if(r.state.selection.from!==r.state.selection.to)return!1;if(!(0,s.rU)(r.state,n)&&m(r.state,n,i)){let{$anchor:i}=r.state.selection,s=r.state.doc.resolve(i.before()-1),o=[];s.node().descendants((r,i)=>{r.type.name===n&&o.push({node:r,pos:i})});let l=o.at(-1);if(!l)return!1;let a=r.state.doc.resolve(s.start()+l.pos+1);return r.chain().cut({from:i.start()-1,to:i.end()+1},a.end()).joinForward().run()}if(!(0,s.rU)(r.state,n)||!(0,s.J_)(r.state))return!1;let o=p(n,r.state);if(!o)return!1;let l=r.state.doc.resolve(o.$pos.pos-2).node(o.depth),a=_(n,r.state,l);return g(n,r.state)&&!a?r.commands.joinItemBackward():r.chain().liftListItem(n).run()},k=(r,n)=>{let i=f(r,n),s=p(r,n);return!!s&&!!i&&i>s.depth},b=(r,n)=>{let i=f(r,n),s=p(r,n);return!!s&&!!i&&i<s.depth},w=(r,n)=>{if(!(0,s.rU)(r.state,n)||!(0,s.QN)(r.state,n))return!1;let{selection:i}=r.state,{$from:o,$to:l}=i;return!(!i.empty&&o.sameParent(l))&&(k(n,r.state)?r.chain().focus(r.state.selection.from+4).lift(n).joinBackward().run():b(n,r.state)?r.chain().joinForward().joinBackward().run():r.commands.joinItemForward())},x=(r,n)=>{var i;let{$anchor:s}=n.selection,o=n.doc.resolve(s.pos-s.parentOffset-2);return o.index()!==o.parent.childCount-1&&(null==(i=o.nodeAfter)?void 0:i.type.name)===r},v=s.YY.create({name:"listKeymap",addOptions:()=>({listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}),addKeyboardShortcuts(){return{Delete:({editor:r})=>{let n=!1;return this.options.listTypes.forEach(({itemName:i})=>{void 0!==r.state.schema.nodes[i]&&w(r,i)&&(n=!0)}),n},"Mod-Delete":({editor:r})=>{let n=!1;return this.options.listTypes.forEach(({itemName:i})=>{void 0!==r.state.schema.nodes[i]&&w(r,i)&&(n=!0)}),n},Backspace:({editor:r})=>{let n=!1;return this.options.listTypes.forEach(({itemName:i,wrapperNames:s})=>{void 0!==r.state.schema.nodes[i]&&y(r,i,s)&&(n=!0)}),n},"Mod-Backspace":({editor:r})=>{let n=!1;return this.options.listTypes.forEach(({itemName:i,wrapperNames:s})=>{void 0!==r.state.schema.nodes[i]&&y(r,i,s)&&(n=!0)}),n}}}}),C=/^(\s*)(\d+)\.\s+(.*)$/,A=/^\s/;function E(r){let n=r.trimStart();return/^[-+*]\s+/.test(n)||/^\d+\.\s+/.test(n)||/^>\s?/.test(n)||/^```/.test(n)||/^~~~/.test(n)}function S(r){let n=[],i=[],s=!1;return r.forEach(r=>{if(s)return void i.push(r);if(""===r.trim()||n.length>0&&E(r)){s=!0,i.push(r);return}n.push(r)}),{paragraphLines:n,blockLines:i}}function M(r){let n=[],i=0,s=0;for(;i<r.length;){let o=r[i],l=o.match(C);if(!l)break;let[,a,u,c]=l,h=a.length,d=[c],p=i+1,f=[o],m=!1;for(;p<r.length;){let n=r[p];if(n.match(C))break;if(""===n.trim())f.push(n),d.push(""),m=!0,p+=1;else if(n.match(A))f.push(n),d.push(n.slice(h+2)),p+=1;else{if(m)break;f.push(n),d.push(n),p+=1}}n.push({indent:h,number:parseInt(u,10),content:d.join("\n").trim(),contentLines:d,raw:f.join("\n")}),s=p,i=p}return[n,s]}function T(r,n,i){let s=[],o=0;for(;o<r.length;){let l=r[o];if(l.indent===n){let{paragraphLines:a,blockLines:u}=S(l.contentLines),c=a.join("\n").trim(),h=[];c&&h.push({type:"paragraph",raw:c,tokens:i.inlineTokens(c)});let d=u.join("\n").trim();if(d){let r=i.blockTokens(d);h.push(...r)}let p=o+1,f=[];for(;p<r.length&&r[p].indent>n;)f.push(r[p]),p+=1;if(f.length>0){let r=Math.min(...f.map(r=>r.indent)),n=T(f,r,i);h.push({type:"list",ordered:!0,start:f[0].number,items:n,raw:f.map(r=>r.raw).join("\n")})}s.push({type:"list_item",raw:l.raw,tokens:h}),o=p}else o+=1}return s}function D(r,n){return r.map(r=>{if("list_item"!==r.type)return n.parseChildren([r])[0];let i=[];return r.tokens&&r.tokens.length>0&&r.tokens.forEach(r=>{if("paragraph"===r.type||"list"===r.type||"blockquote"===r.type||"code"===r.type)i.push(...n.parseChildren([r]));else if("text"===r.type&&r.tokens){let s=n.parseChildren([r]);i.push({type:"paragraph",content:s})}else{let s=n.parseChildren([r]);s.length>0&&i.push(...s)}}),{type:"listItem",content:i}})}var F="listItem",I="textStyle",L=/^(\d+)\.\s$/,R=s.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:r=>r.hasAttribute("start")?parseInt(r.getAttribute("start")||"",10):1},type:{default:null,parseHTML:r=>r.getAttribute("type")}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:r}){let{start:n,...i}=r;return 1===n?["ol",(0,s.KV)(this.options.HTMLAttributes,i),0]:["ol",(0,s.KV)(this.options.HTMLAttributes,r),0]},markdownTokenName:"list",parseMarkdown:(r,n)=>{if("list"!==r.type||!r.ordered)return[];let i=r.start||1,s=r.items?D(r.items,n):[];return 1!==i?{type:"orderedList",attrs:{start:i},content:s}:{type:"orderedList",content:s}},renderMarkdown:(r,n)=>r.content?n.renderChildren(r.content,"\n"):"",markdownTokenizer:{name:"orderedList",level:"block",start:r=>{let n=r.match(/^(\s*)(\d+)\.\s+/),i=null==n?void 0:n.index;return void 0!==i?i:-1},tokenize:(r,n,i)=>{var s;let o=r.split("\n"),[l,a]=M(o);if(0===l.length)return;let u=T(l,0,i);if(0!==u.length)return{type:"list",ordered:!0,start:(null==(s=l[0])?void 0:s.number)||1,items:u,raw:o.slice(0,a).join("\n")}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:r,chain:n})=>this.options.keepAttributes?n().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(F,this.editor.getAttributes(I)).run():r.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let r=(0,s.tG)({find:L,type:this.type,getAttributes:r=>({start:+r[1]}),joinPredicate:(r,n)=>n.childCount+n.attrs.start===+r[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(r=(0,s.tG)({find:L,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:r=>({start:+r[1],...this.editor.getAttributes(I)}),joinPredicate:(r,n)=>n.childCount+n.attrs.start===+r[1],editor:this.editor})),[r]}}),N=/^\s*(\[([( |x])?\])\s$/,O=s.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:r=>{let n=r.getAttribute("data-checked");return""===n||"true"===n},renderHTML:r=>({"data-checked":r.checked})}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:r,HTMLAttributes:n}){return["li",(0,s.KV)(this.options.HTMLAttributes,n,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:r.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(r,n)=>{let i=[];if(r.tokens&&r.tokens.length>0?i.push(n.createNode("paragraph",{},n.parseInline(r.tokens))):r.text?i.push(n.createNode("paragraph",{},[n.createNode("text",{text:r.text})])):i.push(n.createNode("paragraph",{},[])),r.nestedTokens&&r.nestedTokens.length>0){let s=n.parseChildren(r.nestedTokens);i.push(...s)}return n.createNode("taskItem",{checked:r.checked||!1},i)},renderMarkdown:(r,n)=>{var i;let o=(null==(i=r.attrs)?void 0:i.checked)?"x":" ",l=`- [${o}] `;return(0,s.kj)(r,n,l)},addKeyboardShortcuts(){let r={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...r,Tab:()=>this.editor.commands.sinkListItem(this.name)}:r},addNodeView(){return({node:r,HTMLAttributes:n,getPos:i,editor:o})=>{let l=document.createElement("li"),a=document.createElement("label"),u=document.createElement("span"),c=document.createElement("input"),h=document.createElement("div"),d=r=>{var n,i;c.ariaLabel=(null==(i=null==(n=this.options.a11y)?void 0:n.checkboxLabel)?void 0:i.call(n,r,c.checked))||`Task item checkbox for ${r.textContent||"empty task item"}`};d(r),a.contentEditable="false",c.type="checkbox",c.addEventListener("mousedown",r=>r.preventDefault()),c.addEventListener("change",n=>{if(!o.isEditable&&!this.options.onReadOnlyChecked){c.checked=!c.checked;return}let{checked:s}=n.target;o.isEditable&&"function"==typeof i&&o.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:r})=>{let n=i();if("number"!=typeof n)return!1;let o=r.doc.nodeAt(n);return r.setNodeMarkup(n,void 0,{...null==o?void 0:o.attrs,checked:s}),!0}).run(),o.isEditable||!this.options.onReadOnlyChecked||this.options.onReadOnlyChecked(r,s)||(c.checked=!c.checked)}),Object.entries(this.options.HTMLAttributes).forEach(([r,n])=>{l.setAttribute(r,n)}),l.dataset.checked=r.attrs.checked,c.checked=r.attrs.checked,a.append(c,u),l.append(a,h),Object.entries(n).forEach(([r,n])=>{l.setAttribute(r,n)});let p=new Set(Object.keys(n));return{dom:l,contentDOM:h,update:r=>{if(r.type!==this.type)return!1;l.dataset.checked=r.attrs.checked,c.checked=r.attrs.checked,d(r);let n=o.extensionManager.attributes,i=(0,s.zU)(r,n),a=new Set(Object.keys(i)),u=this.options.HTMLAttributes;return p.forEach(r=>{a.has(r)||(r in u?l.setAttribute(r,u[r]):l.removeAttribute(r))}),Object.entries(i).forEach(([r,n])=>{null==n?r in u?l.setAttribute(r,u[r]):l.removeAttribute(r):l.setAttribute(r,n)}),p=a,!0}}}},addInputRules(){return[(0,s.tG)({find:N,type:this.type,getAttributes:r=>({checked:"x"===r[r.length-1]})})]}}),z=s.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:r}){return["ul",(0,s.KV)(this.options.HTMLAttributes,r,{"data-type":this.name}),0]},parseMarkdown:(r,n)=>n.createNode("taskList",{},n.parseChildren(r.items||[])),renderMarkdown:(r,n)=>r.content?n.renderChildren(r.content,"\n"):"",markdownTokenizer:{name:"taskList",level:"block",start(r){var n;let i=null==(n=r.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))?void 0:n.index;return void 0!==i?i:-1},tokenize(r,n,i){let o=r=>{let n=(0,s.Dd)(r,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:r=>({indentLevel:r[1].length,mainContent:r[4],checked:"x"===r[3].toLowerCase()}),createToken:(r,n)=>({type:"taskItem",raw:"",mainContent:r.mainContent,indentLevel:r.indentLevel,checked:r.checked,text:r.mainContent,tokens:i.inlineTokens(r.mainContent),nestedTokens:n}),customNestedParser:o},i);return n?[{type:"taskList",raw:n.raw,items:n.items}]:i.blockTokens(r)},l=(0,s.Dd)(r,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:r=>({indentLevel:r[1].length,mainContent:r[4],checked:"x"===r[3].toLowerCase()}),createToken:(r,n)=>({type:"taskItem",raw:"",mainContent:r.mainContent,indentLevel:r.indentLevel,checked:r.checked,text:r.mainContent,tokens:i.inlineTokens(r.mainContent),nestedTokens:n}),customNestedParser:o},i);if(l)return{type:"taskList",raw:l.raw,items:l.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:r})=>r.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});s.YY.create({name:"listKit",addExtensions(){let r=[];return!1!==this.options.bulletList&&r.push(h.configure(this.options.bulletList)),!1!==this.options.listItem&&r.push(d.configure(this.options.listItem)),!1!==this.options.listKeymap&&r.push(v.configure(this.options.listKeymap)),!1!==this.options.orderedList&&r.push(R.configure(this.options.orderedList)),!1!==this.options.taskItem&&r.push(O.configure(this.options.taskItem)),!1!==this.options.taskList&&r.push(z.configure(this.options.taskList)),r}})},91958:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],l=(0,s.A)("refresh-cw",o)},94290:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],l=(0,s.A)("star",o)},94577:(r,n,i)=>{"use strict";r.exports=i(99617)},94852:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]],l=(0,s.A)("app-window",o)},97144:(r,n,i)=>{"use strict";i.d(n,{$f:()=>N,G2:()=>w,I$:()=>E,Im:()=>z,Qv:()=>c,Sd:()=>k,Z1:()=>S,_G:()=>d,_e:()=>m,bh:()=>x,eB:()=>h,eT:()=>y,ec:()=>O,hy:()=>D,ic:()=>a,iz:()=>M,pC:()=>C,yY:()=>v,y_:()=>P});var s=i(8242),o=i(27050),l=i(76865);let a=(r,n)=>!r.selection.empty&&(n&&n(r.tr.deleteSelection().scrollIntoView()),!0);function u(r,n){let{$cursor:i}=r.selection;return i&&(n?n.endOfTextblock("backward",r):!(i.parentOffset>0))?i:null}let c=(r,n,i)=>{let a=u(r,i);if(!a)return!1;let c=g(a);if(!c){let i=a.blockRange(),o=i&&(0,s.jP)(i);return null!=o&&(n&&n(r.tr.lift(i,o).scrollIntoView()),!0)}let h=c.nodeBefore;if(L(r,c,n,-1))return!0;if(0==a.parent.content.size&&(f(h,"end")||l.nh.isSelectable(h)))for(let i=a.depth;;i--){let u=(0,s.$L)(r.doc,a.before(i),a.after(i),o.Ji.empty);if(u&&u.slice.size<u.to-u.from){if(n){let i=r.tr.step(u);i.setSelection(f(h,"end")?l.LN.findFrom(i.doc.resolve(i.mapping.map(c.pos,-1)),-1):l.nh.create(i.doc,c.pos-h.nodeSize)),n(i.scrollIntoView())}return!0}if(1==i||a.node(i-1).childCount>1)break}return!!h.isAtom&&c.depth==a.depth-1&&(n&&n(r.tr.delete(c.pos-h.nodeSize,c.pos).scrollIntoView()),!0)},h=(r,n,i)=>{let s=u(r,i);if(!s)return!1;let o=g(s);return!!o&&p(r,o,n)},d=(r,n,i)=>{let s=_(r,i);if(!s)return!1;let o=b(s);return!!o&&p(r,o,n)};function p(r,n,i){let a=n.nodeBefore,u=n.pos-1;for(;!a.isTextblock;u--){if(a.type.spec.isolating)return!1;let r=a.lastChild;if(!r)return!1;a=r}let c=n.nodeAfter,h=n.pos+1;for(;!c.isTextblock;h++){if(c.type.spec.isolating)return!1;let r=c.firstChild;if(!r)return!1;c=r}let d=(0,s.$L)(r.doc,u,h,o.Ji.empty);if(!d||d.from!=u||d instanceof s.Ln&&d.slice.size>=h-u)return!1;if(i){let n=r.tr.step(d);n.setSelection(l.U3.create(n.doc,u)),i(n.scrollIntoView())}return!0}function f(r,n,i=!1){for(let s=r;s;s="start"==n?s.firstChild:s.lastChild){if(s.isTextblock)return!0;if(i&&1!=s.childCount)break}return!1}let m=(r,n,i)=>{let{$head:s,empty:o}=r.selection,a=s;if(!o)return!1;if(s.parent.isTextblock){if(i?!i.endOfTextblock("backward",r):s.parentOffset>0)return!1;a=g(s)}let u=a&&a.nodeBefore;return!!u&&!!l.nh.isSelectable(u)&&(n&&n(r.tr.setSelection(l.nh.create(r.doc,a.pos-u.nodeSize)).scrollIntoView()),!0)};function g(r){if(!r.parent.type.spec.isolating)for(let n=r.depth-1;n>=0;n--){if(r.index(n)>0)return r.doc.resolve(r.before(n+1));if(r.node(n).type.spec.isolating)break}return null}function _(r,n){let{$cursor:i}=r.selection;return i&&(n?n.endOfTextblock("forward",r):!(i.parentOffset<i.parent.content.size))?i:null}let y=(r,n,i)=>{let a=_(r,i);if(!a)return!1;let u=b(a);if(!u)return!1;let c=u.nodeAfter;if(L(r,u,n,1))return!0;if(0==a.parent.content.size&&(f(c,"start")||l.nh.isSelectable(c))){let i=(0,s.$L)(r.doc,a.before(),a.after(),o.Ji.empty);if(i&&i.slice.size<i.to-i.from){if(n){let s=r.tr.step(i);s.setSelection(f(c,"start")?l.LN.findFrom(s.doc.resolve(s.mapping.map(u.pos)),1):l.nh.create(s.doc,s.mapping.map(u.pos))),n(s.scrollIntoView())}return!0}}return!!c.isAtom&&u.depth==a.depth-1&&(n&&n(r.tr.delete(u.pos,u.pos+c.nodeSize).scrollIntoView()),!0)},k=(r,n,i)=>{let{$head:s,empty:o}=r.selection,a=s;if(!o)return!1;if(s.parent.isTextblock){if(i?!i.endOfTextblock("forward",r):s.parentOffset<s.parent.content.size)return!1;a=b(s)}let u=a&&a.nodeAfter;return!!u&&!!l.nh.isSelectable(u)&&(n&&n(r.tr.setSelection(l.nh.create(r.doc,a.pos)).scrollIntoView()),!0)};function b(r){if(!r.parent.type.spec.isolating)for(let n=r.depth-1;n>=0;n--){let i=r.node(n);if(r.index(n)+1<i.childCount)return r.doc.resolve(r.after(n+1));if(i.type.spec.isolating)break}return null}let w=(r,n)=>{let i=r.selection,o=i instanceof l.nh,a;if(o){if(i.node.isTextblock||!(0,s.n9)(r.doc,i.from))return!1;a=i.from}else if(null==(a=(0,s.N0)(r.doc,i.from,-1)))return!1;if(n){let i=r.tr.join(a);o&&i.setSelection(l.nh.create(i.doc,a-r.doc.resolve(a).nodeBefore.nodeSize)),n(i.scrollIntoView())}return!0},x=(r,n)=>{let i=r.selection,o;if(i instanceof l.nh){if(i.node.isTextblock||!(0,s.n9)(r.doc,i.to))return!1;o=i.to}else if(null==(o=(0,s.N0)(r.doc,i.to,1)))return!1;return n&&n(r.tr.join(o).scrollIntoView()),!0},v=(r,n)=>{let{$from:i,$to:o}=r.selection,l=i.blockRange(o),a=l&&(0,s.jP)(l);return null!=a&&(n&&n(r.tr.lift(l,a).scrollIntoView()),!0)},C=(r,n)=>{let{$head:i,$anchor:s}=r.selection;return!!i.parent.type.spec.code&&!!i.sameParent(s)&&(n&&n(r.tr.insertText("\n").scrollIntoView()),!0)};function A(r){for(let n=0;n<r.edgeCount;n++){let{type:i}=r.edge(n);if(i.isTextblock&&!i.hasRequiredAttrs())return i}return null}let E=(r,n)=>{let{$head:i,$anchor:s}=r.selection;if(!i.parent.type.spec.code||!i.sameParent(s))return!1;let o=i.node(-1),a=i.indexAfter(-1),u=A(o.contentMatchAt(a));if(!u||!o.canReplaceWith(a,a,u))return!1;if(n){let s=i.after(),o=r.tr.replaceWith(s,s,u.createAndFill());o.setSelection(l.LN.near(o.doc.resolve(s),1)),n(o.scrollIntoView())}return!0},S=(r,n)=>{let i=r.selection,{$from:s,$to:o}=i;if(i instanceof l.i5||s.parent.inlineContent||o.parent.inlineContent)return!1;let a=A(o.parent.contentMatchAt(o.indexAfter()));if(!a||!a.isTextblock)return!1;if(n){let i=(!s.parentOffset&&o.index()<o.parent.childCount?s:o).pos,u=r.tr.insert(i,a.createAndFill());u.setSelection(l.U3.create(u.doc,i+1)),n(u.scrollIntoView())}return!0},M=(r,n)=>{let{$cursor:i}=r.selection;if(!i||i.parent.content.size)return!1;if(i.depth>1&&i.after()!=i.end(-1)){let o=i.before();if((0,s.zy)(r.doc,o))return n&&n(r.tr.split(o).scrollIntoView()),!0}let o=i.blockRange(),l=o&&(0,s.jP)(o);return null!=l&&(n&&n(r.tr.lift(o,l).scrollIntoView()),!0)},T=(r,n)=>{let{$from:i,$to:o}=r.selection;if(r.selection instanceof l.nh&&r.selection.node.isBlock)return!!i.parentOffset&&!!(0,s.zy)(r.doc,i.pos)&&(n&&n(r.tr.split(i.pos).scrollIntoView()),!0);if(!i.depth)return!1;let a=[],u,c,h=!1,d=!1;for(let r=i.depth;;r--){if(i.node(r).isBlock){h=i.end(r)==i.pos+(i.depth-r),d=i.start(r)==i.pos-(i.depth-r),c=A(i.node(r-1).contentMatchAt(i.indexAfter(r-1)));let n=void 0;a.unshift(n||(h&&c?{type:c}:null)),u=r;break}if(1==r)return!1;a.unshift(null)}let p=r.tr;(r.selection instanceof l.U3||r.selection instanceof l.i5)&&p.deleteSelection();let f=p.mapping.map(i.pos),m=(0,s.zy)(p.doc,f,a.length,a);if(m||(a[0]=c?{type:c}:null,m=(0,s.zy)(p.doc,f,a.length,a)),!m)return!1;if(p.split(f,a.length,a),!h&&d&&i.node(u).type!=c){let r=p.mapping.map(i.before(u)),n=p.doc.resolve(r);c&&i.node(u-1).canReplaceWith(n.index(),n.index()+1,c)&&p.setNodeMarkup(p.mapping.map(i.before(u)),c)}return n&&n(p.scrollIntoView()),!0},D=(r,n)=>{let{$from:i,to:s}=r.selection,o,a=i.sharedDepth(s);return 0!=a&&(o=i.before(a),n&&n(r.tr.setSelection(l.nh.create(r.doc,o))),!0)},F=(r,n)=>(n&&n(r.tr.setSelection(new l.i5(r.doc))),!0);function I(r,n,i){let o=n.nodeBefore,l=n.nodeAfter,a=n.index();return!!o&&!!l&&!!o.type.compatibleContent(l.type)&&(!o.content.size&&n.parent.canReplace(a-1,a)?(i&&i(r.tr.delete(n.pos-o.nodeSize,n.pos).scrollIntoView()),!0):!!n.parent.canReplace(a,a+1)&&!!(l.isTextblock||(0,s.n9)(r.doc,n.pos))&&(i&&i(r.tr.join(n.pos).scrollIntoView()),!0))}function L(r,n,i,a){let u=n.nodeBefore,c=n.nodeAfter,h,d,p=u.type.spec.isolating||c.type.spec.isolating;if(!p&&I(r,n,i))return!0;let m=!p&&n.parent.canReplace(n.index(),n.index()+1);if(m&&(h=(d=u.contentMatchAt(u.childCount)).findWrapping(c.type))&&d.matchType(h[0]||c.type).validEnd){if(i){let l=n.pos+c.nodeSize,a=o.FK.empty;for(let r=h.length-1;r>=0;r--)a=o.FK.from(h[r].create(null,a));a=o.FK.from(u.copy(a));let d=r.tr.step(new s.Wg(n.pos-1,l,n.pos,l,new o.Ji(a,1,0),h.length,!0)),p=d.doc.resolve(l+2*h.length);p.nodeAfter&&p.nodeAfter.type==u.type&&(0,s.n9)(d.doc,p.pos)&&d.join(p.pos),i(d.scrollIntoView())}return!0}let g=c.type.spec.isolating||a>0&&p?null:l.LN.findFrom(n,1),_=g&&g.$from.blockRange(g.$to),y=_&&(0,s.jP)(_);if(null!=y&&y>=n.depth)return i&&i(r.tr.lift(_,y).scrollIntoView()),!0;if(m&&f(c,"start",!0)&&f(u,"end")){let l=u,a=[];for(;a.push(l),!l.isTextblock;)l=l.lastChild;let h=c,d=1;for(;!h.isTextblock;h=h.firstChild)d++;if(l.canReplace(l.childCount,l.childCount,h.content)){if(i){let l=o.FK.empty;for(let r=a.length-1;r>=0;r--)l=o.FK.from(a[r].copy(l));i(r.tr.step(new s.Wg(n.pos-a.length,n.pos+c.nodeSize,n.pos+d,n.pos+c.nodeSize-d,new o.Ji(l,a.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function R(r){return function(n,i){let s=n.selection,o=r<0?s.$from:s.$to,a=o.depth;for(;o.node(a).isInline;){if(!a)return!1;a--}return!!o.node(a).isTextblock&&(i&&i(n.tr.setSelection(l.U3.create(n.doc,r<0?o.start(a):o.end(a)))),!0)}}let N=R(-1),O=R(1);function z(r,n=null){return function(i,o){let{$from:l,$to:a}=i.selection,u=l.blockRange(a),c=u&&(0,s.oM)(u,r,n);return!!c&&(o&&o(i.tr.wrap(u,c).scrollIntoView()),!0)}}function P(r,n=null){return function(i,s){let o=!1;for(let s=0;s<i.selection.ranges.length&&!o;s++){let{$from:{pos:l},$to:{pos:a}}=i.selection.ranges[s];i.doc.nodesBetween(l,a,(s,l)=>{if(o)return!1;if(!(!s.isTextblock||s.hasMarkup(r,n)))if(s.type==r)o=!0;else{let n=i.doc.resolve(l),s=n.index();o=n.parent.canReplaceWith(s,s+1,r)}})}if(!o)return!1;if(s){let o=i.tr;for(let s=0;s<i.selection.ranges.length;s++){let{$from:{pos:l},$to:{pos:a}}=i.selection.ranges[s];o.setBlockType(l,a,r,n)}s(o.scrollIntoView())}return!0}}function $(...r){return function(n,i,s){for(let o=0;o<r.length;o++)if(r[o](n,i,s))return!0;return!1}}let B=$(a,c,m),q=$(a,y,k),j={Enter:$(C,S,M,T),"Mod-Enter":E,Backspace:B,"Mod-Backspace":B,"Shift-Backspace":B,Delete:q,"Mod-Delete":q,"Mod-a":F},H={"Ctrl-h":j.Backspace,"Alt-Backspace":j["Mod-Backspace"],"Ctrl-d":j.Delete,"Ctrl-Alt-Backspace":j["Mod-Delete"],"Alt-Delete":j["Mod-Delete"],"Alt-d":j["Mod-Delete"],"Ctrl-a":N,"Ctrl-e":O};for(let r in j)H[r]=j[r];"u">typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"u">typeof os&&os.platform&&os.platform()},97567:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],l=(0,s.A)("box",o)},98307:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],l=(0,s.A)("clipboard-list",o)},99617:(r,n,i)=>{"use strict";var s=i(12115),o=i(8039);function l(r,n){return r===n&&(0!==r||1/r==1/n)||r!=r&&n!=n}var a="function"==typeof Object.is?Object.is:l,u=o.useSyncExternalStore,c=s.useRef,h=s.useEffect,d=s.useMemo,p=s.useDebugValue;n.useSyncExternalStoreWithSelector=function(r,n,i,s,o){var l=c(null);if(null===l.current){var f={hasValue:!1,value:null};l.current=f}else f=l.current;var m=u(r,(l=d(function(){function r(r){if(!c){if(c=!0,l=r,r=s(r),void 0!==o&&f.hasValue){var n=f.value;if(o(n,r))return u=n}return u=r}if(n=u,a(l,r))return n;var i=s(r);return void 0!==o&&o(n,i)?(l=r,n):(l=r,u=i)}var l,u,c=!1,h=void 0===i?null:i;return[function(){return r(n())},null===h?void 0:function(){return r(h())}]},[n,i,s,o]))[0],l[1]);return h(function(){f.hasValue=!0,f.value=m},[m]),p(m),m}}}]);
|
|
20
|
+
3. "-" cannot repeat`);e6.customSchemes.push([r,n])}function e7(){e6.scanner=eB(e6.customSchemes);for(let r=0;r<e6.tokenQueue.length;r++)e6.tokenQueue[r][1]({scanner:e6.scanner});e6.parser=e1(e6.scanner.tokens);for(let r=0;r<e6.pluginQueue.length;r++)e6.pluginQueue[r][1]({scanner:e6.scanner,parser:e6.parser});return e6.initialized=!0,e6}function te(r){return e6.initialized||e7(),e2(e6.parser.start,r,eq(e6.scanner.start,r))}function tt(r,n=null,i=null){if(n&&"object"==typeof n){if(i)throw Error(`linkifyjs: Invalid link type ${n}; must be a string`);i=n,n=null}let s=new eW(i),o=te(r),l=[];for(let r=0;r<o.length;r++){let i=o[r];i.isLink&&(!n||i.t===n)&&s.check(i)&&l.push(i.toFormattedObject(s))}return l}te.scan=eq;var tr=i(76865),tn="[\0- \xa0 -\u2029 ]",ti=new RegExp(tn),ts=RegExp(`${tn}$`),to=RegExp(tn,"g");function tl(r){return 1===r.length?r[0].isLink:3===r.length&&!!r[1].isLink&&["()","[]"].includes(r[0].value+r[2].value)}function ta(r){return new tr.k_({key:new tr.hs("autolink"),appendTransaction:(n,i,o)=>{let l=n.some(r=>r.docChanged)&&!i.doc.eq(o.doc),a=n.some(r=>r.getMeta("preventAutolink"));if(!l||a)return;let{tr:u}=o,c=(0,s.T7)(i.doc,[...n]);if((0,s.FF)(c).forEach(({newRange:n})=>{let i,l,a=(0,s.Nx)(o.doc,n,r=>r.isTextblock);if(a.length>1)i=a[0],l=o.doc.textBetween(i.pos,i.pos+i.node.nodeSize,void 0," ");else if(a.length){let r=o.doc.textBetween(n.from,n.to," "," ");if(!ts.test(r))return;i=a[0],l=o.doc.textBetween(i.pos,n.to,void 0," ")}if(i&&l){let n=l.split(ti).filter(Boolean);if(n.length<=0)return!1;let a=n[n.length-1],c=i.pos+l.lastIndexOf(a);if(!a)return!1;let h=te(a).map(n=>n.toObject(r.defaultProtocol));if(!tl(h))return!1;h.filter(r=>r.isLink).map(r=>({...r,from:c+r.start+1,to:c+r.end+1})).filter(r=>!o.schema.marks.code||!o.doc.rangeHasMark(r.from,r.to,o.schema.marks.code)).filter(n=>r.validate(n.value)).filter(n=>r.shouldAutoLink(n.value)).forEach(n=>{(0,s.hO)(n.from,n.to,o.doc).some(n=>n.mark.type===r.type)||u.addMark(n.from,n.to,r.type.create({href:n.href}))})}}),u.steps.length)return u}})}function tu(r){return new tr.k_({key:new tr.hs("handleClickLink"),props:{handleClick:(n,i,o)=>{var l,a;if(0!==o.button||!n.editable)return!1;let u=null;if(o.target instanceof HTMLAnchorElement)u=o.target;else{let n=o.target;if(!n)return!1;let i=r.editor.view.dom;(u=n.closest("a"))&&!i.contains(u)&&(u=null)}if(!u)return!1;let c=!1;if(r.enableClickSelection&&(c=r.editor.commands.extendMarkRange(r.type.name)),r.openOnClick){let i=(0,s.gu)(n.state,r.type.name),o=null!=(l=u.href)?l:i.href,h=null!=(a=u.target)?a:i.target;o&&(window.open(o,h),c=!0)}return c}}})}function tc(r){return new tr.k_({key:new tr.hs("handlePasteLink"),props:{handlePaste:(n,i,s)=>{let{shouldAutoLink:o}=r,{state:l}=n,{selection:a}=l,{empty:u}=a;if(u)return!1;let c="";s.content.forEach(r=>{c+=r.textContent});let h=tt(c,{defaultProtocol:r.defaultProtocol}).find(r=>r.isLink&&r.value===c);return!!c&&!!h&&(void 0===o||!!o(h.value))&&r.editor.commands.setMark(r.type,{href:h.href})}}})}function th(r,n){let i=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return n&&n.forEach(r=>{let n="string"==typeof r?r:r.scheme;n&&i.push(n)}),!r||r.replace(to,"").match(RegExp(`^(?:(?:${i.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var td=s.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(r=>{"string"==typeof r?e9(r):e9(r.scheme,r.optionalSlashes)})},onDestroy(){e8()},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:(r,n)=>!!th(r,n.protocols),validate:r=>!!r,shouldAutoLink:r=>{let n=/^[a-z][a-z0-9+.-]*:\/\//i.test(r),i=/^[a-z][a-z0-9+.-]*:/i.test(r);if(n||i&&!r.includes("@"))return!0;let s=(r.includes("@")?r.split("@").pop():r).split(/[/?#:]/)[0];return!/^\d{1,3}(\.\d{1,3}){3}$/.test(s)&&!!/\./.test(s)}}),addAttributes(){return{href:{default:null,parseHTML:r=>r.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:r=>{let n=r.getAttribute("href");return!!n&&!!this.options.isAllowedUri(n,{defaultValidate:r=>!!th(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&null}}]},renderHTML({HTMLAttributes:r}){return this.options.isAllowedUri(r.href,{defaultValidate:r=>!!th(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",(0,s.KV)(this.options.HTMLAttributes,r),0]:["a",(0,s.KV)(this.options.HTMLAttributes,{...r,href:""}),0]},markdownTokenName:"link",parseMarkdown:(r,n)=>n.applyMark("link",n.parseInline(r.tokens||[]),{href:r.href,title:r.title||null}),renderMarkdown:(r,n)=>{var i,s,o,l;let a=null!=(s=null==(i=r.attrs)?void 0:i.href)?s:"",u=null!=(l=null==(o=r.attrs)?void 0:o.title)?l:"",c=n.renderChildren(r);return u?`[${c}](${a} "${u}")`:`[${c}](${a})`},addCommands(){return{setLink:r=>({chain:n})=>{let{href:i}=r;return!!this.options.isAllowedUri(i,{defaultValidate:r=>!!th(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&n().setMark(this.name,r).setMeta("preventAutolink",!0).run()},toggleLink:r=>({chain:n})=>{let{href:i}=r||{};return(!i||!!this.options.isAllowedUri(i,{defaultValidate:r=>!!th(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&n().toggleMark(this.name,r,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:r})=>r().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(0,s.Zc)({find:r=>{let n=[];if(r){let{protocols:i,defaultProtocol:s}=this.options,o=tt(r).filter(r=>r.isLink&&this.options.isAllowedUri(r.value,{defaultValidate:r=>!!th(r,i),protocols:i,defaultProtocol:s}));o.length&&o.forEach(r=>{this.options.shouldAutoLink(r.value)&&n.push({text:r.value,data:{href:r.href},index:r.start})})}return n},type:this.type,getAttributes:r=>{var n;return{href:null==(n=r.data)?void 0:n.href}}})]},addProseMirrorPlugins(){let r=[],{protocols:n,defaultProtocol:i}=this.options;return this.options.autolink&&r.push(ta({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:r=>!!th(r,n),protocols:n,defaultProtocol:i}),shouldAutoLink:this.options.shouldAutoLink})),r.push(tu({type:this.type,editor:this.editor,openOnClick:"whenNotEditable"===this.options.openOnClick||this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&r.push(tc({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),r}}),tp=td},59883:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],l=(0,s.A)("grip-vertical",o)},60241:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],l=(0,s.A)("minimize-2",o)},60285:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],l=(0,s.A)("ellipsis",o)},62678:(r,n,i)=>{"use strict";i.d(n,{QO:()=>G,vR:()=>Z,Or:()=>Q,JU:()=>er,lb:()=>en});var s=i(82159),o=i(76865),l=i(8242);function a(r={}){return new o.k_({view:n=>new u(n,r)})}class u{constructor(r,n){var i;this.editorView=r,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!=(i=n.width)?i:1,this.color=!1===n.color?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(n=>{let i=r=>{this[n](r)};return r.dom.addEventListener(n,i),{name:n,handler:i}})}destroy(){this.handlers.forEach(({name:r,handler:n})=>this.editorView.dom.removeEventListener(r,n))}update(r,n){null!=this.cursorPos&&n.doc!=r.state.doc&&(this.cursorPos>r.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(r){r!=this.cursorPos&&(this.cursorPos=r,null==r?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let r,n,i=this.editorView.state.doc.resolve(this.cursorPos),s=!i.parent.inlineContent,o,l=this.editorView.dom,a=l.getBoundingClientRect(),u=a.width/l.offsetWidth,c=a.height/l.offsetHeight;if(s){let r=i.nodeBefore,n=i.nodeAfter;if(r||n){let i=this.editorView.nodeDOM(this.cursorPos-(r?r.nodeSize:0));if(i){let s=i.getBoundingClientRect(),l=r?s.bottom:s.top;r&&n&&(l=(l+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let a=this.width/2*c;o={left:s.left,right:s.right,top:l-a,bottom:l+a}}}}if(!o){let r=this.editorView.coordsAtPos(this.cursorPos),n=this.width/2*u;o={left:r.left-n,right:r.left+n,top:r.top,bottom:r.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",s),this.element.classList.toggle("prosemirror-dropcursor-inline",!s),h&&(h!=document.body||"static"!=getComputedStyle(h).position)){let i=h.getBoundingClientRect(),s=i.width/h.offsetWidth,o=i.height/h.offsetHeight;r=i.left-h.scrollLeft*s,n=i.top-h.scrollTop*o}else r=-pageXOffset,n=-pageYOffset;this.element.style.left=(o.left-r)/u+"px",this.element.style.top=(o.top-n)/c+"px",this.element.style.width=(o.right-o.left)/u+"px",this.element.style.height=(o.bottom-o.top)/c+"px"}scheduleRemoval(r){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),r)}dragover(r){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:r.clientX,top:r.clientY}),i=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),s=i&&i.type.spec.disableDropCursor,o="function"==typeof s?s(this.editorView,n,r):s;if(n&&!o){let r=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let n=(0,l.Um)(this.editorView.state.doc,r,this.editorView.dragging.slice);null!=n&&(r=n)}this.setCursor(r),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(r){this.editorView.dom.contains(r.relatedTarget)||this.setCursor(null)}}var c=i(63197),h=i(12894),d=i(27050);class p extends o.LN{constructor(r){super(r,r)}map(r,n){let i=r.resolve(n.map(this.head));return p.valid(i)?new p(i):o.LN.near(i)}content(){return d.Ji.empty}eq(r){return r instanceof p&&r.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(r,n){if("number"!=typeof n.pos)throw RangeError("Invalid input for GapCursor.fromJSON");return new p(r.resolve(n.pos))}getBookmark(){return new f(this.anchor)}static valid(r){let n=r.parent;if(n.inlineContent||!g(r)||!_(r))return!1;let i=n.type.spec.allowGapCursor;if(null!=i)return i;let s=n.contentMatchAt(r.index()).defaultType;return s&&s.isTextblock}static findGapCursorFrom(r,n,i=!1){i:for(;;){if(!i&&p.valid(r))return r;let s=r.pos,l=null;for(let i=r.depth;;i--){let o=r.node(i);if(n>0?r.indexAfter(i)<o.childCount:r.index(i)>0){l=o.child(n>0?r.indexAfter(i):r.index(i)-1);break}if(0==i)return null;s+=n;let a=r.doc.resolve(s);if(p.valid(a))return a}for(;;){let a=n>0?l.firstChild:l.lastChild;if(!a){if(l.isAtom&&!l.isText&&!o.nh.isSelectable(l)){r=r.doc.resolve(s+l.nodeSize*n),i=!1;continue i}break}l=a,s+=n;let u=r.doc.resolve(s);if(p.valid(u))return u}return null}}}p.prototype.visible=!1,p.findFrom=p.findGapCursorFrom,o.LN.jsonID("gapcursor",p);class f{constructor(r){this.pos=r}map(r){return new f(r.map(this.pos))}resolve(r){let n=r.resolve(this.pos);return p.valid(n)?new p(n):o.LN.near(n)}}function m(r){return r.isAtom||r.spec.isolating||r.spec.createGapCursor}function g(r){for(let n=r.depth;n>=0;n--){let i=r.index(n),s=r.node(n);if(0==i){if(s.type.spec.isolating)return!0;continue}for(let r=s.child(i-1);;r=r.lastChild){if(0==r.childCount&&!r.inlineContent||m(r.type))return!0;if(r.inlineContent)return!1}}return!0}function _(r){for(let n=r.depth;n>=0;n--){let i=r.indexAfter(n),s=r.node(n);if(i==s.childCount){if(s.type.spec.isolating)return!0;continue}for(let r=s.child(i);;r=r.firstChild){if(0==r.childCount&&!r.inlineContent||m(r.type))return!0;if(r.inlineContent)return!1}}return!0}function y(){return new o.k_({props:{decorations:v,createSelectionBetween:(r,n,i)=>n.pos==i.pos&&p.valid(i)?new p(i):null,handleClick:w,handleKeyDown:k,handleDOMEvents:{beforeinput:x}}})}let k=(0,h.K)({ArrowLeft:b("horiz",-1),ArrowRight:b("horiz",1),ArrowUp:b("vert",-1),ArrowDown:b("vert",1)});function b(r,n){let i="vert"==r?n>0?"down":"up":n>0?"right":"left";return function(r,s,l){let a=r.selection,u=n>0?a.$to:a.$from,c=a.empty;if(a instanceof o.U3){if(!l.endOfTextblock(i)||0==u.depth)return!1;c=!1,u=r.doc.resolve(n>0?u.after():u.before())}let h=p.findGapCursorFrom(u,n,c);return!!h&&(s&&s(r.tr.setSelection(new p(h))),!0)}}function w(r,n,i){if(!r||!r.editable)return!1;let s=r.state.doc.resolve(n);if(!p.valid(s))return!1;let l=r.posAtCoords({left:i.clientX,top:i.clientY});return!(l&&l.inside>-1&&o.nh.isSelectable(r.state.doc.nodeAt(l.inside)))&&(r.dispatch(r.state.tr.setSelection(new p(s))),!0)}function x(r,n){if("insertCompositionText"!=n.inputType||!(r.state.selection instanceof p))return!1;let{$from:i}=r.state.selection,s=i.parent.contentMatchAt(i.index()).findWrapping(r.state.schema.nodes.text);if(!s)return!1;let l=d.FK.empty;for(let r=s.length-1;r>=0;r--)l=d.FK.from(s[r].createAndFill(null,l));let a=r.state.tr.replace(i.pos,i.pos,new d.Ji(l,0,0));return a.setSelection(o.U3.near(a.doc.resolve(i.pos+1))),r.dispatch(a),!1}function v(r){if(!(r.selection instanceof p))return null;let n=document.createElement("div");return n.className="ProseMirror-gapcursor",c.zF.create(r.doc,[c.NZ.widget(r.selection.head,n,{key:"gapcursor"})])}var C=200,A=function(){};A.prototype.append=function(r){return r.length?(r=A.from(r),!this.length&&r||r.length<C&&this.leafAppend(r)||this.length<C&&r.leafPrepend(this)||this.appendInner(r)):this},A.prototype.prepend=function(r){return r.length?A.from(r).append(this):this},A.prototype.appendInner=function(r){return new S(this,r)},A.prototype.slice=function(r,n){return(void 0===r&&(r=0),void 0===n&&(n=this.length),r>=n)?A.empty:this.sliceInner(Math.max(0,r),Math.min(this.length,n))},A.prototype.get=function(r){if(!(r<0)&&!(r>=this.length))return this.getInner(r)},A.prototype.forEach=function(r,n,i){void 0===n&&(n=0),void 0===i&&(i=this.length),n<=i?this.forEachInner(r,n,i,0):this.forEachInvertedInner(r,n,i,0)},A.prototype.map=function(r,n,i){void 0===n&&(n=0),void 0===i&&(i=this.length);var s=[];return this.forEach(function(n,i){return s.push(r(n,i))},n,i),s},A.from=function(r){return r instanceof A?r:r&&r.length?new E(r):A.empty};var E=function(r){function n(n){r.call(this),this.values=n}r&&(n.__proto__=r),n.prototype=Object.create(r&&r.prototype),n.prototype.constructor=n;var i={length:{configurable:!0},depth:{configurable:!0}};return n.prototype.flatten=function(){return this.values},n.prototype.sliceInner=function(r,i){return 0==r&&i==this.length?this:new n(this.values.slice(r,i))},n.prototype.getInner=function(r){return this.values[r]},n.prototype.forEachInner=function(r,n,i,s){for(var o=n;o<i;o++)if(!1===r(this.values[o],s+o))return!1},n.prototype.forEachInvertedInner=function(r,n,i,s){for(var o=n-1;o>=i;o--)if(!1===r(this.values[o],s+o))return!1},n.prototype.leafAppend=function(r){if(this.length+r.length<=C)return new n(this.values.concat(r.flatten()))},n.prototype.leafPrepend=function(r){if(this.length+r.length<=C)return new n(r.flatten().concat(this.values))},i.length.get=function(){return this.values.length},i.depth.get=function(){return 0},Object.defineProperties(n.prototype,i),n}(A);A.empty=new E([]);var S=function(r){function n(n,i){r.call(this),this.left=n,this.right=i,this.length=n.length+i.length,this.depth=Math.max(n.depth,i.depth)+1}return r&&(n.__proto__=r),n.prototype=Object.create(r&&r.prototype),n.prototype.constructor=n,n.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},n.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},n.prototype.forEachInner=function(r,n,i,s){var o=this.left.length;if(n<o&&!1===this.left.forEachInner(r,n,Math.min(i,o),s)||i>o&&!1===this.right.forEachInner(r,Math.max(n-o,0),Math.min(this.length,i)-o,s+o))return!1},n.prototype.forEachInvertedInner=function(r,n,i,s){var o=this.left.length;if(n>o&&!1===this.right.forEachInvertedInner(r,n-o,Math.max(i,o)-o,s+o)||i<o&&!1===this.left.forEachInvertedInner(r,Math.min(n,o),i,s))return!1},n.prototype.sliceInner=function(r,n){if(0==r&&n==this.length)return this;var i=this.left.length;return n<=i?this.left.slice(r,n):r>=i?this.right.slice(r-i,n-i):this.left.slice(r,i).append(this.right.slice(0,n-i))},n.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new n(this.left,i)},n.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new n(i,this.right)},n.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new n(this.left,new n(this.right,r)):new n(this,r)},n}(A);let M=A,T=500;class D{constructor(r,n){this.items=r,this.eventCount=n}popEvent(r,n){let i,s,o,l;if(0==this.eventCount)return null;let a=this.items.length;for(;;a--)if(this.items.get(a-1).selection){--a;break}n&&(s=(i=this.remapping(a,this.items.length)).maps.length);let u=r.tr,c=[],h=[];return this.items.forEach((r,n)=>{if(!r.step){i||(s=(i=this.remapping(a,n+1)).maps.length),s--,h.push(r);return}if(i){h.push(new I(r.map));let n=r.step.map(i.slice(s)),o;n&&u.maybeStep(n).doc&&(o=u.mapping.maps[u.mapping.maps.length-1],c.push(new I(o,void 0,void 0,c.length+h.length))),s--,o&&i.appendMap(o,s)}else u.maybeStep(r.step);if(r.selection)return o=i?r.selection.map(i.slice(s)):r.selection,l=new D(this.items.slice(0,a).append(h.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:u,selection:o}}addTransform(r,n,i,s){let o=[],l=this.eventCount,a=this.items,u=!s&&a.length?a.get(a.length-1):null;for(let i=0;i<r.steps.length;i++){let c=r.steps[i].invert(r.docs[i]),h=new I(r.mapping.maps[i],c,n),d;(d=u&&u.merge(h))&&(h=d,i?o.pop():a=a.slice(0,a.length-1)),o.push(h),n&&(l++,n=void 0),s||(u=h)}let c=l-i.depth;return c>R&&(a=F(a,c),l-=c),new D(a.append(o),l)}remapping(r,n){let i=new l.X9;return this.items.forEach((n,s)=>{let o=null!=n.mirrorOffset&&s-n.mirrorOffset>=r?i.maps.length-n.mirrorOffset:void 0;i.appendMap(n.map,o)},r,n),i}addMaps(r){return 0==this.eventCount?this:new D(this.items.append(r.map(r=>new I(r))),this.eventCount)}rebased(r,n){if(!this.eventCount)return this;let i=[],s=Math.max(0,this.items.length-n),o=r.mapping,l=r.steps.length,a=this.eventCount;this.items.forEach(r=>{r.selection&&a--},s);let u=n;this.items.forEach(n=>{let s=o.getMirror(--u);if(null==s)return;l=Math.min(l,s);let c=o.maps[s];if(n.step){let l=r.steps[s].invert(r.docs[s]),h=n.selection&&n.selection.map(o.slice(u+1,s));h&&a++,i.push(new I(c,l,h))}else i.push(new I(c))},s);let c=[];for(let r=n;r<l;r++)c.push(new I(o.maps[r]));let h=new D(this.items.slice(0,s).append(c).append(i),a);return h.emptyItemCount()>T&&(h=h.compress(this.items.length-i.length)),h}emptyItemCount(){let r=0;return this.items.forEach(n=>{!n.step&&r++}),r}compress(r=this.items.length){let n=this.remapping(0,r),i=n.maps.length,s=[],o=0;return this.items.forEach((l,a)=>{if(a>=r)s.push(l),l.selection&&o++;else if(l.step){let r=l.step.map(n.slice(i)),a=r&&r.getMap();if(i--,a&&n.appendMap(a,i),r){let u=l.selection&&l.selection.map(n.slice(i));u&&o++;let c=new I(a.invert(),r,u),h,d=s.length-1;(h=s.length&&s[d].merge(c))?s[d]=h:s.push(c)}}else l.map&&i--},this.items.length,0),new D(M.from(s.reverse()),o)}}function F(r,n){let i;return r.forEach((r,s)=>{if(r.selection&&0==n--)return i=s,!1}),r.slice(i)}D.empty=new D(M.empty,0);class I{constructor(r,n,i,s){this.map=r,this.step=n,this.selection=i,this.mirrorOffset=s}merge(r){if(this.step&&r.step&&!r.selection){let n=r.step.merge(this.step);if(n)return new I(n.getMap().invert(),n,this.selection)}}}class L{constructor(r,n,i,s,o){this.done=r,this.undone=n,this.prevRanges=i,this.prevTime=s,this.prevComposition=o}}let R=20;function N(r,n,i,s){let o=i.getMeta(H),l;if(o)return o.historyState;i.getMeta(V)&&(r=new L(r.done,r.undone,null,0,-1));let a=i.getMeta("appendedTransaction");if(0==i.steps.length)return r;if(a&&a.getMeta(H))if(a.getMeta(H).redo)return new L(r.done.addTransform(i,void 0,s,j(n)),r.undone,z(i.mapping.maps),r.prevTime,r.prevComposition);else return new L(r.done,r.undone.addTransform(i,void 0,s,j(n)),null,r.prevTime,r.prevComposition);if(!1===i.getMeta("addToHistory")||a&&!1===a.getMeta("addToHistory"))if(l=i.getMeta("rebased"))return new L(r.done.rebased(i,l),r.undone.rebased(i,l),P(r.prevRanges,i.mapping),r.prevTime,r.prevComposition);else return new L(r.done.addMaps(i.mapping.maps),r.undone.addMaps(i.mapping.maps),P(r.prevRanges,i.mapping),r.prevTime,r.prevComposition);{let o=i.getMeta("composition"),l=0==r.prevTime||!a&&r.prevComposition!=o&&(r.prevTime<(i.time||0)-s.newGroupDelay||!O(i,r.prevRanges)),u=a?P(r.prevRanges,i.mapping):z(i.mapping.maps);return new L(r.done.addTransform(i,l?n.selection.getBookmark():void 0,s,j(n)),D.empty,u,i.time,null==o?r.prevComposition:o)}}function O(r,n){if(!n)return!1;if(!r.docChanged)return!0;let i=!1;return r.mapping.maps[0].forEach((r,s)=>{for(let o=0;o<n.length;o+=2)r<=n[o+1]&&s>=n[o]&&(i=!0)}),i}function z(r){let n=[];for(let i=r.length-1;i>=0&&0==n.length;i--)r[i].forEach((r,i,s,o)=>n.push(s,o));return n}function P(r,n){if(!r)return null;let i=[];for(let s=0;s<r.length;s+=2){let o=n.map(r[s],1),l=n.map(r[s+1],-1);o<=l&&i.push(o,l)}return i}function $(r,n,i){let s=j(n),o=H.get(n).spec.config,l=(i?r.undone:r.done).popEvent(n,s);if(!l)return null;let a=l.selection.resolve(l.transform.doc),u=(i?r.done:r.undone).addTransform(l.transform,n.selection.getBookmark(),o,s),c=new L(i?u:l.remaining,i?l.remaining:u,null,0,-1);return l.transform.setSelection(a).setMeta(H,{redo:i,historyState:c})}let B=!1,q=null;function j(r){let n=r.plugins;if(q!=n){B=!1,q=n;for(let r=0;r<n.length;r++)if(n[r].spec.historyPreserveItems){B=!0;break}}return B}let H=new o.hs("history"),V=new o.hs("closeHistory");function U(r={}){return r={depth:r.depth||100,newGroupDelay:r.newGroupDelay||500},new o.k_({key:H,state:{init:()=>new L(D.empty,D.empty,null,0,-1),apply:(n,i,s)=>N(i,s,n,r)},config:r,props:{handleDOMEvents:{beforeinput(r,n){let i=n.inputType,s="historyUndo"==i?J:"historyRedo"==i?K:null;return!!s&&!!r.editable&&(n.preventDefault(),s(r.state,r.dispatch))}}}})}function W(r,n){return(i,s)=>{let o=H.getState(i);if(!o||0==(r?o.undone:o.done).eventCount)return!1;if(s){let l=$(o,i,r);l&&s(n?l.scrollIntoView():l)}return!0}}let J=W(!1,!0),K=W(!0,!0);W(!1,!1),W(!0,!1),s.YY.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize",textCounter:r=>r.length,wordCounter:r=>r.split(" ").filter(r=>""!==r).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=r=>{let n=(null==r?void 0:r.node)||this.editor.state.doc;if("textSize"===((null==r?void 0:r.mode)||this.options.mode)){let r=n.textBetween(0,n.content.size,void 0," ");return this.options.textCounter(r)}return n.nodeSize},this.storage.words=r=>{let n=(null==r?void 0:r.node)||this.editor.state.doc,i=n.textBetween(0,n.content.size," "," ");return this.options.wordCounter(i)}},addProseMirrorPlugins(){let r=!1;return[new o.k_({key:new o.hs("characterCount"),appendTransaction:(n,i,s)=>{if(r)return;let o=this.options.limit;if(null==o||0===o){r=!0;return}let l=this.storage.characters({node:s.doc});if(l>o){let n=0,i=l-o;console.warn(`[CharacterCount] Initial content exceeded limit of ${o} characters. Content was automatically trimmed.`);let a=s.tr.deleteRange(n,i);return r=!0,a}r=!0},filterTransaction:(r,n)=>{let i=this.options.limit;if(!r.docChanged||0===i||null==i)return!0;let s=this.storage.characters({node:n.doc}),o=this.storage.characters({node:r.doc});if(o<=i||s>i&&o>i&&o<=s)return!0;if(s>i&&o>i&&o>s||!r.getMeta("paste"))return!1;let l=r.selection.$head.pos,a=l-(o-i),u=l;return r.deleteRange(a,u),!(this.storage.characters({node:r.doc})>i)}})]}});var G=s.YY.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[a(this.options)]}});s.YY.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new o.k_({key:new o.hs("focus"),props:{decorations:({doc:r,selection:n})=>{let{isEditable:i,isFocused:s}=this.editor,{anchor:o}=n,l=[];if(!i||!s)return c.zF.create(r,[]);let a=0;"deepest"===this.options.mode&&r.descendants((r,n)=>{if(!r.isText){if(!(o>=n&&o<=n+r.nodeSize-1))return!1;a+=1}});let u=0;return r.descendants((r,n)=>!r.isText&&!!(o>=n&&o<=n+r.nodeSize-1)&&((u+=1,"deepest"===this.options.mode&&a-u>0||"shallowest"===this.options.mode&&u>1)?"deepest"===this.options.mode:void l.push(c.NZ.node(n,n+r.nodeSize,{class:this.options.className})))),c.zF.create(r,l)}}})]}});var Z=s.YY.create({name:"gapCursor",addProseMirrorPlugins:()=>[y()],extendNodeSchema(r){var n;let i={name:r.name,options:r.options,storage:r.storage};return{allowGapCursor:null!=(n=(0,s.gk)((0,s.iI)(r,"allowGapCursor",i)))?n:null}}}),X="placeholder";function Y(r){return r.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var Q=s.YY.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:X,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){let r=this.options.dataAttribute?`data-${Y(this.options.dataAttribute)}`:`data-${X}`;return[new o.k_({key:new o.hs("placeholder"),props:{decorations:({doc:n,selection:i})=>{let o=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:l}=i,a=[];if(!o)return null;let u=this.editor.isEmpty;return n.descendants((n,i)=>{let o=l>=i&&l<=i+n.nodeSize,h=!n.isLeaf&&(0,s.Op)(n);if(!n.type.isTextblock)return this.options.includeChildren;if((o||!this.options.showOnlyCurrent)&&h){let s=[this.options.emptyNodeClass];u&&s.push(this.options.emptyEditorClass);let l=c.NZ.node(i,i+n.nodeSize,{class:s.join(" "),[r]:"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:n,pos:i,hasAnchor:o}):this.options.placeholder});a.push(l)}return this.options.includeChildren}),c.zF.create(n,a)}}})]}});s.YY.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){let{editor:r,options:n}=this;return[new o.k_({key:new o.hs("selection"),props:{decorations:i=>i.selection.empty||r.isFocused||!r.isEditable||(0,s.BQ)(i.selection)||r.view.dragging?null:c.zF.create(i.doc,[c.NZ.inline(i.selection.from,i.selection.to,{class:n.className})])}})]}});var ee="skipTrailingNode";function et({types:r,node:n}){return n&&Array.isArray(r)&&r.includes(n.type)||(null==n?void 0:n.type)===r}var er=s.YY.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var r;let n=new o.hs(this.name),i=this.options.node||(null==(r=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:r.name)||"paragraph",s=Object.entries(this.editor.schema.nodes).map(([,r])=>r).filter(r=>(this.options.notAfter||[]).concat(i).includes(r.name));return[new o.k_({key:n,appendTransaction:(r,s,o)=>{let{doc:l,tr:a,schema:u}=o,c=n.getState(o),h=l.content.size,d=u.nodes[i];if(!r.some(r=>r.getMeta(ee))&&c)return a.insert(h,d.create())},state:{init:(r,n)=>!et({node:n.tr.doc.lastChild,types:s}),apply:(r,n)=>!r.docChanged||r.getMeta("__uniqueIDTransaction")?n:!et({node:r.doc.lastChild,types:s})}})]}}),en=s.YY.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:r,dispatch:n})=>J(r,n),redo:()=>({state:r,dispatch:n})=>K(r,n)}),addProseMirrorPlugins(){return[U(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()}}})},63393:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["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"}]],l=(0,s.A)("folder-plus",o)},65915:r=>{var n=!0,i=!1,s=!1;function o(r,n,i){var s=r.attrIndex(n),o=[n,i];s<0?r.attrPush(o):r.attrs[s]=o}function l(r,n){for(var i=r[n].level-1,s=n-1;s>=0;s--)if(r[s].level===i)return s;return -1}function a(r,n){return f(r[n])&&m(r[n-1])&&g(r[n-2])&&_(r[n])}function u(r,n){if(r.children.unshift(c(r,n)),r.children[1].content=r.children[1].content.slice(3),r.content=r.content.slice(3),i)if(s){r.children.pop();var o="task-item-"+Math.ceil(1e7*Math.random()-1e3);r.children[0].content=r.children[0].content.slice(0,-1)+' id="'+o+'">',r.children.push(p(r.content,o,n))}else r.children.unshift(h(n)),r.children.push(d(n))}function c(r,i){var s=new i("html_inline","",0),o=n?' disabled="" ':"";return 0===r.content.indexOf("[ ] ")?s.content='<input class="task-list-item-checkbox"'+o+'type="checkbox">':(0===r.content.indexOf("[x] ")||0===r.content.indexOf("[X] "))&&(s.content='<input class="task-list-item-checkbox" checked=""'+o+'type="checkbox">'),s}function h(r){var n=new r("html_inline","",0);return n.content="<label>",n}function d(r){var n=new r("html_inline","",0);return n.content="</label>",n}function p(r,n,i){var s=new i("html_inline","",0);return s.content='<label class="task-list-item-label" for="'+n+'">'+r+"</label>",s.attrs=[{for:n}],s}function f(r){return"inline"===r.type}function m(r){return"paragraph_open"===r.type}function g(r){return"list_item_open"===r.type}function _(r){return 0===r.content.indexOf("[ ] ")||0===r.content.indexOf("[x] ")||0===r.content.indexOf("[X] ")}r.exports=function(r,c){c&&(n=!c.enabled,i=!!c.label,s=!!c.labelAfter),r.core.ruler.after("inline","github-task-lists",function(r){for(var i=r.tokens,s=2;s<i.length;s++)a(i,s)&&(u(i[s],r.Token),o(i[s-2],"class","task-list-item"+(n?"":" enabled")),o(i[l(i,s-2)],"class","contains-task-list"))})}},68806:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],l=(0,s.A)("plug",o)},69048:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3",key:"m1af9g"}],["path",{d:"M9 11.2h5.7",key:"3zgcl2"}]],l=(0,s.A)("square-function",o)},73300:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],l=(0,s.A)("clipboard",o)},76022:(r,n,i)=>{"use strict";r.exports=i.p+"static/media/web-tree-sitter.f7f7244f.wasm"},76065:(r,n,i)=>{"use strict";i.d(n,{H:()=>s.Hj});var s=i(5989)},76865:(r,n,i)=>{"use strict";i.d(n,{$t:()=>M,LN:()=>a,U3:()=>d,hs:()=>L,i5:()=>g,k_:()=>D,nh:()=>f,yn:()=>u});var s=i(27050),o=i(8242);let l=Object.create(null);class a{constructor(r,n,i){this.$anchor=r,this.$head=n,this.ranges=i||[new u(r.min(n),r.max(n))]}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 r=this.ranges;for(let n=0;n<r.length;n++)if(r[n].$from.pos!=r[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(r,n=s.Ji.empty){let i=n.content.lastChild,o=null;for(let r=0;r<n.openEnd;r++)o=i,i=i.lastChild;let l=r.steps.length,a=this.ranges;for(let u=0;u<a.length;u++){let{$from:c,$to:h}=a[u],d=r.mapping.slice(l);r.replaceRange(d.map(c.pos),d.map(h.pos),u?s.Ji.empty:n),0==u&&k(r,l,(i?i.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(r,n){let i=r.steps.length,s=this.ranges;for(let o=0;o<s.length;o++){let{$from:l,$to:a}=s[o],u=r.mapping.slice(i),c=u.map(l.pos),h=u.map(a.pos);o?r.deleteRange(c,h):(r.replaceRangeWith(c,h,n),k(r,i,n.isInline?-1:1))}}static findFrom(r,n,i=!1){let s=r.parent.inlineContent?new d(r):y(r.node(0),r.parent,r.pos,r.index(),n,i);if(s)return s;for(let s=r.depth-1;s>=0;s--){let o=n<0?y(r.node(0),r.node(s),r.before(s+1),r.index(s),n,i):y(r.node(0),r.node(s),r.after(s+1),r.index(s)+1,n,i);if(o)return o}return null}static near(r,n=1){return this.findFrom(r,n)||this.findFrom(r,-n)||new g(r.node(0))}static atStart(r){return y(r,r,0,0,1)||new g(r)}static atEnd(r){return y(r,r,r.content.size,r.childCount,-1)||new g(r)}static fromJSON(r,n){if(!n||!n.type)throw RangeError("Invalid input for Selection.fromJSON");let i=l[n.type];if(!i)throw RangeError(`No selection type ${n.type} defined`);return i.fromJSON(r,n)}static jsonID(r,n){if(r in l)throw RangeError("Duplicate use of selection JSON ID "+r);return l[r]=n,n.prototype.jsonID=r,n}getBookmark(){return d.between(this.$anchor,this.$head).getBookmark()}}a.prototype.visible=!0;class u{constructor(r,n){this.$from=r,this.$to=n}}let c=!1;function h(r){c||r.parent.inlineContent||(c=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+r.parent.type.name+")"))}class d extends a{constructor(r,n=r){h(r),h(n),super(r,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(r,n){let i=r.resolve(n.map(this.head));if(!i.parent.inlineContent)return a.near(i);let s=r.resolve(n.map(this.anchor));return new d(s.parent.inlineContent?s:i,i)}replace(r,n=s.Ji.empty){if(super.replace(r,n),n==s.Ji.empty){let n=this.$from.marksAcross(this.$to);n&&r.ensureMarks(n)}}eq(r){return r instanceof d&&r.anchor==this.anchor&&r.head==this.head}getBookmark(){return new p(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(r,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new d(r.resolve(n.anchor),r.resolve(n.head))}static create(r,n,i=n){let s=r.resolve(n);return new this(s,i==n?s:r.resolve(i))}static between(r,n,i){let s=r.pos-n.pos;if((!i||s)&&(i=s>=0?1:-1),!n.parent.inlineContent){let r=a.findFrom(n,i,!0)||a.findFrom(n,-i,!0);if(!r)return a.near(n,i);n=r.$head}return r.parent.inlineContent||(0==s?r=n:(r=(a.findFrom(r,-i,!0)||a.findFrom(r,i,!0)).$anchor).pos<n.pos!=s<0&&(r=n)),new d(r,n)}}a.jsonID("text",d);class p{constructor(r,n){this.anchor=r,this.head=n}map(r){return new p(r.map(this.anchor),r.map(this.head))}resolve(r){return d.between(r.resolve(this.anchor),r.resolve(this.head))}}class f extends a{constructor(r){let n=r.nodeAfter,i=r.node(0).resolve(r.pos+n.nodeSize);super(r,i),this.node=n}map(r,n){let{deleted:i,pos:s}=n.mapResult(this.anchor),o=r.resolve(s);return i?a.near(o):new f(o)}content(){return new s.Ji(s.FK.from(this.node),0,0)}eq(r){return r instanceof f&&r.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new m(this.anchor)}static fromJSON(r,n){if("number"!=typeof n.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new f(r.resolve(n.anchor))}static create(r,n){return new f(r.resolve(n))}static isSelectable(r){return!r.isText&&!1!==r.type.spec.selectable}}f.prototype.visible=!1,a.jsonID("node",f);class m{constructor(r){this.anchor=r}map(r){let{deleted:n,pos:i}=r.mapResult(this.anchor);return n?new p(i,i):new m(i)}resolve(r){let n=r.resolve(this.anchor),i=n.nodeAfter;return i&&f.isSelectable(i)?new f(n):a.near(n)}}class g extends a{constructor(r){super(r.resolve(0),r.resolve(r.content.size))}replace(r,n=s.Ji.empty){if(n==s.Ji.empty){r.delete(0,r.doc.content.size);let n=a.atStart(r.doc);n.eq(r.selection)||r.setSelection(n)}else super.replace(r,n)}toJSON(){return{type:"all"}}static fromJSON(r){return new g(r)}map(r){return new g(r)}eq(r){return r instanceof g}getBookmark(){return _}}a.jsonID("all",g);let _={map(){return this},resolve:r=>new g(r)};function y(r,n,i,s,o,l=!1){if(n.inlineContent)return d.create(r,i);for(let a=s-(o>0?0:1);o>0?a<n.childCount:a>=0;a+=o){let s=n.child(a);if(s.isAtom){if(!l&&f.isSelectable(s))return f.create(r,i-(o<0?s.nodeSize:0))}else{let n=y(r,s,i+o,o<0?s.childCount:0,o,l);if(n)return n}i+=s.nodeSize*o}return null}function k(r,n,i){let s,l=r.steps.length-1;if(l<n)return;let u=r.steps[l];(u instanceof o.Ln||u instanceof o.Wg)&&(r.mapping.maps[l].forEach((r,n,i,o)=>{null==s&&(s=o)}),r.setSelection(a.near(r.doc.resolve(s),i)))}let b=1,w=2,x=4;class v extends o.dL{constructor(r){super(r.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=r.selection,this.storedMarks=r.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(r){if(r.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=r,this.curSelectionFor=this.steps.length,this.updated=(this.updated|b)&~w,this.storedMarks=null,this}get selectionSet(){return(this.updated&b)>0}setStoredMarks(r){return this.storedMarks=r,this.updated|=w,this}ensureMarks(r){return s.CU.sameSet(this.storedMarks||this.selection.$from.marks(),r)||this.setStoredMarks(r),this}addStoredMark(r){return this.ensureMarks(r.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(r){return this.ensureMarks(r.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&w)>0}addStep(r,n){super.addStep(r,n),this.updated=this.updated&~w,this.storedMarks=null}setTime(r){return this.time=r,this}replaceSelection(r){return this.selection.replace(this,r),this}replaceSelectionWith(r,n=!0){let i=this.selection;return n&&(r=r.mark(this.storedMarks||(i.empty?i.$from.marks():i.$from.marksAcross(i.$to)||s.CU.none))),i.replaceWith(this,r),this}deleteSelection(){return this.selection.replace(this),this}insertText(r,n,i){let s=this.doc.type.schema;if(null==n)return r?this.replaceSelectionWith(s.text(r),!0):this.deleteSelection();{if(null==i&&(i=n),!r)return this.deleteRange(n,i);let o=this.storedMarks;if(!o){let r=this.doc.resolve(n);o=i==n?r.marks():r.marksAcross(this.doc.resolve(i))}return this.replaceRangeWith(n,i,s.text(r,o)),this.selection.empty||this.selection.to!=n+r.length||this.setSelection(a.near(this.selection.$to)),this}}setMeta(r,n){return this.meta["string"==typeof r?r:r.key]=n,this}getMeta(r){return this.meta["string"==typeof r?r:r.key]}get isGeneric(){for(let r in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=x,this}get scrolledIntoView(){return(this.updated&x)>0}}function C(r,n){return n&&r?r.bind(n):r}class A{constructor(r,n,i){this.name=r,this.init=C(n.init,i),this.apply=C(n.apply,i)}}let E=[new A("doc",{init:r=>r.doc||r.schema.topNodeType.createAndFill(),apply:r=>r.doc}),new A("selection",{init:(r,n)=>r.selection||a.atStart(n.doc),apply:r=>r.selection}),new A("storedMarks",{init:r=>r.storedMarks||null,apply:(r,n,i,s)=>s.selection.$cursor?r.storedMarks:null}),new A("scrollToSelection",{init:()=>0,apply:(r,n)=>r.scrolledIntoView?n+1:n})];class S{constructor(r,n){this.schema=r,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=E.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new A(r.key,r.spec.state,r))})}}class M{constructor(r){this.config=r}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(r){return this.applyTransaction(r).state}filterTransaction(r,n=-1){for(let i=0;i<this.config.plugins.length;i++)if(i!=n){let n=this.config.plugins[i];if(n.spec.filterTransaction&&!n.spec.filterTransaction.call(n,r,this))return!1}return!0}applyTransaction(r){if(!this.filterTransaction(r))return{state:this,transactions:[]};let n=[r],i=this.applyInner(r),s=null;for(;;){let o=!1;for(let l=0;l<this.config.plugins.length;l++){let a=this.config.plugins[l];if(a.spec.appendTransaction){let u=s?s[l].n:0,c=s?s[l].state:this,h=u<n.length&&a.spec.appendTransaction.call(a,u?n.slice(u):n,c,i);if(h&&i.filterTransaction(h,l)){if(h.setMeta("appendedTransaction",r),!s){s=[];for(let r=0;r<this.config.plugins.length;r++)s.push(r<l?{state:i,n:n.length}:{state:this,n:0})}n.push(h),i=i.applyInner(h),o=!0}s&&(s[l]={state:i,n:n.length})}}if(!o)return{state:i,transactions:n}}}applyInner(r){if(!r.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let n=new M(this.config),i=this.config.fields;for(let s=0;s<i.length;s++){let o=i[s];n[o.name]=o.apply(r,this[o.name],this,n)}return n}get tr(){return new v(this)}static create(r){let n=new S(r.doc?r.doc.type.schema:r.schema,r.plugins),i=new M(n);for(let s=0;s<n.fields.length;s++)i[n.fields[s].name]=n.fields[s].init(r,i);return i}reconfigure(r){let n=new S(this.schema,r.plugins),i=n.fields,s=new M(n);for(let n=0;n<i.length;n++){let o=i[n].name;s[o]=this.hasOwnProperty(o)?this[o]:i[n].init(r,s)}return s}toJSON(r){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),r&&"object"==typeof r)for(let i in r){if("doc"==i||"selection"==i)throw RangeError("The JSON fields `doc` and `selection` are reserved");let s=r[i],o=s.spec.state;o&&o.toJSON&&(n[i]=o.toJSON.call(s,this[s.key]))}return n}static fromJSON(r,n,i){if(!n)throw RangeError("Invalid input for EditorState.fromJSON");if(!r.schema)throw RangeError("Required config field 'schema' missing");let o=new S(r.schema,r.plugins),l=new M(o);return o.fields.forEach(o=>{if("doc"==o.name)l.doc=s.bP.fromJSON(r.schema,n.doc);else if("selection"==o.name)l.selection=a.fromJSON(l.doc,n.selection);else if("storedMarks"==o.name)n.storedMarks&&(l.storedMarks=n.storedMarks.map(r.schema.markFromJSON));else{if(i)for(let s in i){let a=i[s],u=a.spec.state;if(a.key==o.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,s)){l[o.name]=u.fromJSON.call(a,r,n[s],l);return}}l[o.name]=o.init(r,l)}}),l}}function T(r,n,i){for(let s in r){let o=r[s];o instanceof Function?o=o.bind(n):"handleDOMEvents"==s&&(o=T(o,n,{})),i[s]=o}return i}class D{constructor(r){this.spec=r,this.props={},r.props&&T(r.props,this,this.props),this.key=r.key?r.key.key:I("plugin")}getState(r){return r[this.key]}}let F=Object.create(null);function I(r){return r in F?r+"$"+ ++F[r]:(F[r]=0,r+"$")}class L{constructor(r="key"){this.key=I(r)}get(r){return r.config.pluginsByKey[this.key]}getState(r){return r[this.key]}}},80860:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["circle",{cx:"12",cy:"13",r:"8",key:"3y4lt7"}],["path",{d:"M12 9v4l2 2",key:"1c63tq"}],["path",{d:"M5 3 2 6",key:"18tl5t"}],["path",{d:"m22 6-3-3",key:"1opdir"}],["path",{d:"M6.38 18.7 4 21",key:"17xu3x"}],["path",{d:"M17.64 18.67 20 21",key:"kv2oe2"}]],l=(0,s.A)("alarm-clock",o)},82150:(r,n,i)=>{"use strict";i.d(n,{L2:()=>O,Rg:()=>h,_0:()=>z,_J:()=>R,ck:()=>d,it:()=>v});var s=i(82159),o=Object.defineProperty,l=(r,n)=>{for(var i in n)o(r,i,{get:n[i],enumerable:!0})},a="listItem",u="textStyle",c=/^\s*([-+*])\s$/,h=s.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:r}){return["ul",(0,s.KV)(this.options.HTMLAttributes,r),0]},markdownTokenName:"list",parseMarkdown:(r,n)=>"list"!==r.type||r.ordered?[]:{type:"bulletList",content:r.items?n.parseChildren(r.items):[]},renderMarkdown:(r,n)=>r.content?n.renderChildren(r.content,"\n"):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:r,chain:n})=>this.options.keepAttributes?n().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(a,this.editor.getAttributes(u)).run():r.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let r=(0,s.tG)({find:c,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(r=(0,s.tG)({find:c,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(u),editor:this.editor})),[r]}}),d=s.bP.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:r}){return["li",(0,s.KV)(this.options.HTMLAttributes,r),0]},markdownTokenName:"list_item",parseMarkdown:(r,n)=>{var i;if("list_item"!==r.type)return[];let s=null!=(i=n.parseBlockChildren)?i:n.parseChildren,o=[];if(r.tokens&&r.tokens.length>0)if(r.tokens.some(r=>"paragraph"===r.type))o=s(r.tokens);else{let i=r.tokens[0];if(i&&"text"===i.type&&i.tokens&&i.tokens.length>0){if(o=[{type:"paragraph",content:n.parseInline(i.tokens)}],r.tokens.length>1){let n=s(r.tokens.slice(1));o.push(...n)}}else o=s(r.tokens)}return 0===o.length&&(o=[{type:"paragraph",content:[]}]),{type:"listItem",content:o}},renderMarkdown:(r,n,i)=>(0,s.kj)(r,n,r=>{var n,i;if("bulletList"===r.parentType)return"- ";if("orderedList"===r.parentType){let s=(null==(i=null==(n=r.meta)?void 0:n.parentAttrs)?void 0:i.start)||1;return`${s+r.index}. `}return"- "},i),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});l({},{findListItemPos:()=>p,getNextListDepth:()=>f,handleBackspace:()=>y,handleDelete:()=>w,hasListBefore:()=>m,hasListItemAfter:()=>x,hasListItemBefore:()=>g,listItemHasSubList:()=>_,nextListIsDeeper:()=>k,nextListIsHigher:()=>b});var p=(r,n)=>{let{$from:i}=n.selection,o=(0,s.Pg)(r,n.schema),l=null,a=i.depth,u=i.pos,c=null;for(;a>0&&null===c;)(l=i.node(a)).type===o?c=a:(a-=1,u-=1);return null===c?null:{$pos:n.doc.resolve(u),depth:c}},f=(r,n)=>{let i=p(r,n);if(!i)return!1;let[,o]=(0,s.fl)(n,r,i.$pos.pos+4);return o},m=(r,n,i)=>{let{$anchor:s}=r.selection,o=Math.max(0,s.pos-2),l=r.doc.resolve(o).node();return!!l&&!!i.includes(l.type.name)},g=(r,n)=>{var i;let{$anchor:s}=n.selection,o=n.doc.resolve(s.pos-2);return 0!==o.index()&&(null==(i=o.nodeBefore)?void 0:i.type.name)===r},_=(r,n,i)=>{if(!i)return!1;let o=(0,s.Pg)(r,n.schema),l=!1;return i.descendants(r=>{r.type===o&&(l=!0)}),l},y=(r,n,i)=>{if(r.commands.undoInputRule())return!0;if(r.state.selection.from!==r.state.selection.to)return!1;if(!(0,s.rU)(r.state,n)&&m(r.state,n,i)){let{$anchor:i}=r.state.selection,s=r.state.doc.resolve(i.before()-1),o=[];s.node().descendants((r,i)=>{r.type.name===n&&o.push({node:r,pos:i})});let l=o.at(-1);if(!l)return!1;let a=r.state.doc.resolve(s.start()+l.pos+1);return r.chain().cut({from:i.start()-1,to:i.end()+1},a.end()).joinForward().run()}if(!(0,s.rU)(r.state,n)||!(0,s.J_)(r.state))return!1;let o=p(n,r.state);if(!o)return!1;let l=r.state.doc.resolve(o.$pos.pos-2).node(o.depth),a=_(n,r.state,l);return g(n,r.state)&&!a?r.commands.joinItemBackward():r.chain().liftListItem(n).run()},k=(r,n)=>{let i=f(r,n),s=p(r,n);return!!s&&!!i&&i>s.depth},b=(r,n)=>{let i=f(r,n),s=p(r,n);return!!s&&!!i&&i<s.depth},w=(r,n)=>{if(!(0,s.rU)(r.state,n)||!(0,s.QN)(r.state,n))return!1;let{selection:i}=r.state,{$from:o,$to:l}=i;return!(!i.empty&&o.sameParent(l))&&(k(n,r.state)?r.chain().focus(r.state.selection.from+4).lift(n).joinBackward().run():b(n,r.state)?r.chain().joinForward().joinBackward().run():r.commands.joinItemForward())},x=(r,n)=>{var i;let{$anchor:s}=n.selection,o=n.doc.resolve(s.pos-s.parentOffset-2);return o.index()!==o.parent.childCount-1&&(null==(i=o.nodeAfter)?void 0:i.type.name)===r},v=s.YY.create({name:"listKeymap",addOptions:()=>({listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}),addKeyboardShortcuts(){return{Delete:({editor:r})=>{let n=!1;return this.options.listTypes.forEach(({itemName:i})=>{void 0!==r.state.schema.nodes[i]&&w(r,i)&&(n=!0)}),n},"Mod-Delete":({editor:r})=>{let n=!1;return this.options.listTypes.forEach(({itemName:i})=>{void 0!==r.state.schema.nodes[i]&&w(r,i)&&(n=!0)}),n},Backspace:({editor:r})=>{let n=!1;return this.options.listTypes.forEach(({itemName:i,wrapperNames:s})=>{void 0!==r.state.schema.nodes[i]&&y(r,i,s)&&(n=!0)}),n},"Mod-Backspace":({editor:r})=>{let n=!1;return this.options.listTypes.forEach(({itemName:i,wrapperNames:s})=>{void 0!==r.state.schema.nodes[i]&&y(r,i,s)&&(n=!0)}),n}}}}),C=/^(\s*)(\d+)\.\s+(.*)$/,A=/^\s/;function E(r){let n=r.trimStart();return/^[-+*]\s+/.test(n)||/^\d+\.\s+/.test(n)||/^>\s?/.test(n)||/^```/.test(n)||/^~~~/.test(n)}function S(r){let n=[],i=[],s=!1;return r.forEach(r=>{if(s)return void i.push(r);if(""===r.trim()||n.length>0&&E(r)){s=!0,i.push(r);return}n.push(r)}),{paragraphLines:n,blockLines:i}}function M(r){let n=[],i=0,s=0;for(;i<r.length;){let o=r[i],l=o.match(C);if(!l)break;let[,a,u,c]=l,h=a.length,d=[c],p=i+1,f=[o],m=!1;for(;p<r.length;){let n=r[p];if(n.match(C))break;if(""===n.trim())f.push(n),d.push(""),m=!0,p+=1;else if(n.match(A))f.push(n),d.push(n.slice(h+2)),p+=1;else{if(m)break;f.push(n),d.push(n),p+=1}}n.push({indent:h,number:parseInt(u,10),content:d.join("\n").trim(),contentLines:d,raw:f.join("\n")}),s=p,i=p}return[n,s]}function T(r,n,i){let s=[],o=0;for(;o<r.length;){let l=r[o];if(l.indent===n){let{paragraphLines:a,blockLines:u}=S(l.contentLines),c=a.join("\n").trim(),h=[];c&&h.push({type:"paragraph",raw:c,tokens:i.inlineTokens(c)});let d=u.join("\n").trim();if(d){let r=i.blockTokens(d);h.push(...r)}let p=o+1,f=[];for(;p<r.length&&r[p].indent>n;)f.push(r[p]),p+=1;if(f.length>0){let r=Math.min(...f.map(r=>r.indent)),n=T(f,r,i);h.push({type:"list",ordered:!0,start:f[0].number,items:n,raw:f.map(r=>r.raw).join("\n")})}s.push({type:"list_item",raw:l.raw,tokens:h}),o=p}else o+=1}return s}function D(r,n){return r.map(r=>{if("list_item"!==r.type)return n.parseChildren([r])[0];let i=[];return r.tokens&&r.tokens.length>0&&r.tokens.forEach(r=>{if("paragraph"===r.type||"list"===r.type||"blockquote"===r.type||"code"===r.type)i.push(...n.parseChildren([r]));else if("text"===r.type&&r.tokens){let s=n.parseChildren([r]);i.push({type:"paragraph",content:s})}else{let s=n.parseChildren([r]);s.length>0&&i.push(...s)}}),{type:"listItem",content:i}})}var F="listItem",I="textStyle",L=/^(\d+)\.\s$/,R=s.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:r=>r.hasAttribute("start")?parseInt(r.getAttribute("start")||"",10):1},type:{default:null,parseHTML:r=>r.getAttribute("type")}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:r}){let{start:n,...i}=r;return 1===n?["ol",(0,s.KV)(this.options.HTMLAttributes,i),0]:["ol",(0,s.KV)(this.options.HTMLAttributes,r),0]},markdownTokenName:"list",parseMarkdown:(r,n)=>{if("list"!==r.type||!r.ordered)return[];let i=r.start||1,s=r.items?D(r.items,n):[];return 1!==i?{type:"orderedList",attrs:{start:i},content:s}:{type:"orderedList",content:s}},renderMarkdown:(r,n)=>r.content?n.renderChildren(r.content,"\n"):"",markdownTokenizer:{name:"orderedList",level:"block",start:r=>{let n=r.match(/^(\s*)(\d+)\.\s+/),i=null==n?void 0:n.index;return void 0!==i?i:-1},tokenize:(r,n,i)=>{var s;let o=r.split("\n"),[l,a]=M(o);if(0===l.length)return;let u=T(l,0,i);if(0!==u.length)return{type:"list",ordered:!0,start:(null==(s=l[0])?void 0:s.number)||1,items:u,raw:o.slice(0,a).join("\n")}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:r,chain:n})=>this.options.keepAttributes?n().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(F,this.editor.getAttributes(I)).run():r.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let r=(0,s.tG)({find:L,type:this.type,getAttributes:r=>({start:+r[1]}),joinPredicate:(r,n)=>n.childCount+n.attrs.start===+r[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(r=(0,s.tG)({find:L,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:r=>({start:+r[1],...this.editor.getAttributes(I)}),joinPredicate:(r,n)=>n.childCount+n.attrs.start===+r[1],editor:this.editor})),[r]}}),N=/^\s*(\[([( |x])?\])\s$/,O=s.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:r=>{let n=r.getAttribute("data-checked");return""===n||"true"===n},renderHTML:r=>({"data-checked":r.checked})}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:r,HTMLAttributes:n}){return["li",(0,s.KV)(this.options.HTMLAttributes,n,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:r.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(r,n)=>{let i=[];if(r.tokens&&r.tokens.length>0?i.push(n.createNode("paragraph",{},n.parseInline(r.tokens))):r.text?i.push(n.createNode("paragraph",{},[n.createNode("text",{text:r.text})])):i.push(n.createNode("paragraph",{},[])),r.nestedTokens&&r.nestedTokens.length>0){let s=n.parseChildren(r.nestedTokens);i.push(...s)}return n.createNode("taskItem",{checked:r.checked||!1},i)},renderMarkdown:(r,n)=>{var i;let o=(null==(i=r.attrs)?void 0:i.checked)?"x":" ",l=`- [${o}] `;return(0,s.kj)(r,n,l)},addKeyboardShortcuts(){let r={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...r,Tab:()=>this.editor.commands.sinkListItem(this.name)}:r},addNodeView(){return({node:r,HTMLAttributes:n,getPos:i,editor:o})=>{let l=document.createElement("li"),a=document.createElement("label"),u=document.createElement("span"),c=document.createElement("input"),h=document.createElement("div"),d=r=>{var n,i;c.ariaLabel=(null==(i=null==(n=this.options.a11y)?void 0:n.checkboxLabel)?void 0:i.call(n,r,c.checked))||`Task item checkbox for ${r.textContent||"empty task item"}`};d(r),a.contentEditable="false",c.type="checkbox",c.addEventListener("mousedown",r=>r.preventDefault()),c.addEventListener("change",n=>{if(!o.isEditable&&!this.options.onReadOnlyChecked){c.checked=!c.checked;return}let{checked:s}=n.target;o.isEditable&&"function"==typeof i&&o.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:r})=>{let n=i();if("number"!=typeof n)return!1;let o=r.doc.nodeAt(n);return r.setNodeMarkup(n,void 0,{...null==o?void 0:o.attrs,checked:s}),!0}).run(),o.isEditable||!this.options.onReadOnlyChecked||this.options.onReadOnlyChecked(r,s)||(c.checked=!c.checked)}),Object.entries(this.options.HTMLAttributes).forEach(([r,n])=>{l.setAttribute(r,n)}),l.dataset.checked=r.attrs.checked,c.checked=r.attrs.checked,a.append(c,u),l.append(a,h),Object.entries(n).forEach(([r,n])=>{l.setAttribute(r,n)});let p=new Set(Object.keys(n));return{dom:l,contentDOM:h,update:r=>{if(r.type!==this.type)return!1;l.dataset.checked=r.attrs.checked,c.checked=r.attrs.checked,d(r);let n=o.extensionManager.attributes,i=(0,s.zU)(r,n),a=new Set(Object.keys(i)),u=this.options.HTMLAttributes;return p.forEach(r=>{a.has(r)||(r in u?l.setAttribute(r,u[r]):l.removeAttribute(r))}),Object.entries(i).forEach(([r,n])=>{null==n?r in u?l.setAttribute(r,u[r]):l.removeAttribute(r):l.setAttribute(r,n)}),p=a,!0}}}},addInputRules(){return[(0,s.tG)({find:N,type:this.type,getAttributes:r=>({checked:"x"===r[r.length-1]})})]}}),z=s.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:r}){return["ul",(0,s.KV)(this.options.HTMLAttributes,r,{"data-type":this.name}),0]},parseMarkdown:(r,n)=>n.createNode("taskList",{},n.parseChildren(r.items||[])),renderMarkdown:(r,n)=>r.content?n.renderChildren(r.content,"\n"):"",markdownTokenizer:{name:"taskList",level:"block",start(r){var n;let i=null==(n=r.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))?void 0:n.index;return void 0!==i?i:-1},tokenize(r,n,i){let o=r=>{let n=(0,s.Dd)(r,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:r=>({indentLevel:r[1].length,mainContent:r[4],checked:"x"===r[3].toLowerCase()}),createToken:(r,n)=>({type:"taskItem",raw:"",mainContent:r.mainContent,indentLevel:r.indentLevel,checked:r.checked,text:r.mainContent,tokens:i.inlineTokens(r.mainContent),nestedTokens:n}),customNestedParser:o},i);return n?[{type:"taskList",raw:n.raw,items:n.items}]:i.blockTokens(r)},l=(0,s.Dd)(r,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:r=>({indentLevel:r[1].length,mainContent:r[4],checked:"x"===r[3].toLowerCase()}),createToken:(r,n)=>({type:"taskItem",raw:"",mainContent:r.mainContent,indentLevel:r.indentLevel,checked:r.checked,text:r.mainContent,tokens:i.inlineTokens(r.mainContent),nestedTokens:n}),customNestedParser:o},i);if(l)return{type:"taskList",raw:l.raw,items:l.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:r})=>r.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});s.YY.create({name:"listKit",addExtensions(){let r=[];return!1!==this.options.bulletList&&r.push(h.configure(this.options.bulletList)),!1!==this.options.listItem&&r.push(d.configure(this.options.listItem)),!1!==this.options.listKeymap&&r.push(v.configure(this.options.listKeymap)),!1!==this.options.orderedList&&r.push(R.configure(this.options.orderedList)),!1!==this.options.taskItem&&r.push(O.configure(this.options.taskItem)),!1!==this.options.taskList&&r.push(z.configure(this.options.taskList)),r}})},91958:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],l=(0,s.A)("refresh-cw",o)},94290:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],l=(0,s.A)("star",o)},94577:(r,n,i)=>{"use strict";r.exports=i(99617)},94852:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]],l=(0,s.A)("app-window",o)},96035:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["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"}]],l=(0,s.A)("message-square",o)},97144:(r,n,i)=>{"use strict";i.d(n,{$f:()=>N,G2:()=>w,I$:()=>E,Im:()=>z,Qv:()=>c,Sd:()=>k,Z1:()=>S,_G:()=>d,_e:()=>m,bh:()=>x,eB:()=>h,eT:()=>y,ec:()=>O,hy:()=>D,ic:()=>a,iz:()=>M,pC:()=>C,yY:()=>v,y_:()=>P});var s=i(8242),o=i(27050),l=i(76865);let a=(r,n)=>!r.selection.empty&&(n&&n(r.tr.deleteSelection().scrollIntoView()),!0);function u(r,n){let{$cursor:i}=r.selection;return i&&(n?n.endOfTextblock("backward",r):!(i.parentOffset>0))?i:null}let c=(r,n,i)=>{let a=u(r,i);if(!a)return!1;let c=g(a);if(!c){let i=a.blockRange(),o=i&&(0,s.jP)(i);return null!=o&&(n&&n(r.tr.lift(i,o).scrollIntoView()),!0)}let h=c.nodeBefore;if(L(r,c,n,-1))return!0;if(0==a.parent.content.size&&(f(h,"end")||l.nh.isSelectable(h)))for(let i=a.depth;;i--){let u=(0,s.$L)(r.doc,a.before(i),a.after(i),o.Ji.empty);if(u&&u.slice.size<u.to-u.from){if(n){let i=r.tr.step(u);i.setSelection(f(h,"end")?l.LN.findFrom(i.doc.resolve(i.mapping.map(c.pos,-1)),-1):l.nh.create(i.doc,c.pos-h.nodeSize)),n(i.scrollIntoView())}return!0}if(1==i||a.node(i-1).childCount>1)break}return!!h.isAtom&&c.depth==a.depth-1&&(n&&n(r.tr.delete(c.pos-h.nodeSize,c.pos).scrollIntoView()),!0)},h=(r,n,i)=>{let s=u(r,i);if(!s)return!1;let o=g(s);return!!o&&p(r,o,n)},d=(r,n,i)=>{let s=_(r,i);if(!s)return!1;let o=b(s);return!!o&&p(r,o,n)};function p(r,n,i){let a=n.nodeBefore,u=n.pos-1;for(;!a.isTextblock;u--){if(a.type.spec.isolating)return!1;let r=a.lastChild;if(!r)return!1;a=r}let c=n.nodeAfter,h=n.pos+1;for(;!c.isTextblock;h++){if(c.type.spec.isolating)return!1;let r=c.firstChild;if(!r)return!1;c=r}let d=(0,s.$L)(r.doc,u,h,o.Ji.empty);if(!d||d.from!=u||d instanceof s.Ln&&d.slice.size>=h-u)return!1;if(i){let n=r.tr.step(d);n.setSelection(l.U3.create(n.doc,u)),i(n.scrollIntoView())}return!0}function f(r,n,i=!1){for(let s=r;s;s="start"==n?s.firstChild:s.lastChild){if(s.isTextblock)return!0;if(i&&1!=s.childCount)break}return!1}let m=(r,n,i)=>{let{$head:s,empty:o}=r.selection,a=s;if(!o)return!1;if(s.parent.isTextblock){if(i?!i.endOfTextblock("backward",r):s.parentOffset>0)return!1;a=g(s)}let u=a&&a.nodeBefore;return!!u&&!!l.nh.isSelectable(u)&&(n&&n(r.tr.setSelection(l.nh.create(r.doc,a.pos-u.nodeSize)).scrollIntoView()),!0)};function g(r){if(!r.parent.type.spec.isolating)for(let n=r.depth-1;n>=0;n--){if(r.index(n)>0)return r.doc.resolve(r.before(n+1));if(r.node(n).type.spec.isolating)break}return null}function _(r,n){let{$cursor:i}=r.selection;return i&&(n?n.endOfTextblock("forward",r):!(i.parentOffset<i.parent.content.size))?i:null}let y=(r,n,i)=>{let a=_(r,i);if(!a)return!1;let u=b(a);if(!u)return!1;let c=u.nodeAfter;if(L(r,u,n,1))return!0;if(0==a.parent.content.size&&(f(c,"start")||l.nh.isSelectable(c))){let i=(0,s.$L)(r.doc,a.before(),a.after(),o.Ji.empty);if(i&&i.slice.size<i.to-i.from){if(n){let s=r.tr.step(i);s.setSelection(f(c,"start")?l.LN.findFrom(s.doc.resolve(s.mapping.map(u.pos)),1):l.nh.create(s.doc,s.mapping.map(u.pos))),n(s.scrollIntoView())}return!0}}return!!c.isAtom&&u.depth==a.depth-1&&(n&&n(r.tr.delete(u.pos,u.pos+c.nodeSize).scrollIntoView()),!0)},k=(r,n,i)=>{let{$head:s,empty:o}=r.selection,a=s;if(!o)return!1;if(s.parent.isTextblock){if(i?!i.endOfTextblock("forward",r):s.parentOffset<s.parent.content.size)return!1;a=b(s)}let u=a&&a.nodeAfter;return!!u&&!!l.nh.isSelectable(u)&&(n&&n(r.tr.setSelection(l.nh.create(r.doc,a.pos)).scrollIntoView()),!0)};function b(r){if(!r.parent.type.spec.isolating)for(let n=r.depth-1;n>=0;n--){let i=r.node(n);if(r.index(n)+1<i.childCount)return r.doc.resolve(r.after(n+1));if(i.type.spec.isolating)break}return null}let w=(r,n)=>{let i=r.selection,o=i instanceof l.nh,a;if(o){if(i.node.isTextblock||!(0,s.n9)(r.doc,i.from))return!1;a=i.from}else if(null==(a=(0,s.N0)(r.doc,i.from,-1)))return!1;if(n){let i=r.tr.join(a);o&&i.setSelection(l.nh.create(i.doc,a-r.doc.resolve(a).nodeBefore.nodeSize)),n(i.scrollIntoView())}return!0},x=(r,n)=>{let i=r.selection,o;if(i instanceof l.nh){if(i.node.isTextblock||!(0,s.n9)(r.doc,i.to))return!1;o=i.to}else if(null==(o=(0,s.N0)(r.doc,i.to,1)))return!1;return n&&n(r.tr.join(o).scrollIntoView()),!0},v=(r,n)=>{let{$from:i,$to:o}=r.selection,l=i.blockRange(o),a=l&&(0,s.jP)(l);return null!=a&&(n&&n(r.tr.lift(l,a).scrollIntoView()),!0)},C=(r,n)=>{let{$head:i,$anchor:s}=r.selection;return!!i.parent.type.spec.code&&!!i.sameParent(s)&&(n&&n(r.tr.insertText("\n").scrollIntoView()),!0)};function A(r){for(let n=0;n<r.edgeCount;n++){let{type:i}=r.edge(n);if(i.isTextblock&&!i.hasRequiredAttrs())return i}return null}let E=(r,n)=>{let{$head:i,$anchor:s}=r.selection;if(!i.parent.type.spec.code||!i.sameParent(s))return!1;let o=i.node(-1),a=i.indexAfter(-1),u=A(o.contentMatchAt(a));if(!u||!o.canReplaceWith(a,a,u))return!1;if(n){let s=i.after(),o=r.tr.replaceWith(s,s,u.createAndFill());o.setSelection(l.LN.near(o.doc.resolve(s),1)),n(o.scrollIntoView())}return!0},S=(r,n)=>{let i=r.selection,{$from:s,$to:o}=i;if(i instanceof l.i5||s.parent.inlineContent||o.parent.inlineContent)return!1;let a=A(o.parent.contentMatchAt(o.indexAfter()));if(!a||!a.isTextblock)return!1;if(n){let i=(!s.parentOffset&&o.index()<o.parent.childCount?s:o).pos,u=r.tr.insert(i,a.createAndFill());u.setSelection(l.U3.create(u.doc,i+1)),n(u.scrollIntoView())}return!0},M=(r,n)=>{let{$cursor:i}=r.selection;if(!i||i.parent.content.size)return!1;if(i.depth>1&&i.after()!=i.end(-1)){let o=i.before();if((0,s.zy)(r.doc,o))return n&&n(r.tr.split(o).scrollIntoView()),!0}let o=i.blockRange(),l=o&&(0,s.jP)(o);return null!=l&&(n&&n(r.tr.lift(o,l).scrollIntoView()),!0)},T=(r,n)=>{let{$from:i,$to:o}=r.selection;if(r.selection instanceof l.nh&&r.selection.node.isBlock)return!!i.parentOffset&&!!(0,s.zy)(r.doc,i.pos)&&(n&&n(r.tr.split(i.pos).scrollIntoView()),!0);if(!i.depth)return!1;let a=[],u,c,h=!1,d=!1;for(let r=i.depth;;r--){if(i.node(r).isBlock){h=i.end(r)==i.pos+(i.depth-r),d=i.start(r)==i.pos-(i.depth-r),c=A(i.node(r-1).contentMatchAt(i.indexAfter(r-1)));let n=void 0;a.unshift(n||(h&&c?{type:c}:null)),u=r;break}if(1==r)return!1;a.unshift(null)}let p=r.tr;(r.selection instanceof l.U3||r.selection instanceof l.i5)&&p.deleteSelection();let f=p.mapping.map(i.pos),m=(0,s.zy)(p.doc,f,a.length,a);if(m||(a[0]=c?{type:c}:null,m=(0,s.zy)(p.doc,f,a.length,a)),!m)return!1;if(p.split(f,a.length,a),!h&&d&&i.node(u).type!=c){let r=p.mapping.map(i.before(u)),n=p.doc.resolve(r);c&&i.node(u-1).canReplaceWith(n.index(),n.index()+1,c)&&p.setNodeMarkup(p.mapping.map(i.before(u)),c)}return n&&n(p.scrollIntoView()),!0},D=(r,n)=>{let{$from:i,to:s}=r.selection,o,a=i.sharedDepth(s);return 0!=a&&(o=i.before(a),n&&n(r.tr.setSelection(l.nh.create(r.doc,o))),!0)},F=(r,n)=>(n&&n(r.tr.setSelection(new l.i5(r.doc))),!0);function I(r,n,i){let o=n.nodeBefore,l=n.nodeAfter,a=n.index();return!!o&&!!l&&!!o.type.compatibleContent(l.type)&&(!o.content.size&&n.parent.canReplace(a-1,a)?(i&&i(r.tr.delete(n.pos-o.nodeSize,n.pos).scrollIntoView()),!0):!!n.parent.canReplace(a,a+1)&&!!(l.isTextblock||(0,s.n9)(r.doc,n.pos))&&(i&&i(r.tr.join(n.pos).scrollIntoView()),!0))}function L(r,n,i,a){let u=n.nodeBefore,c=n.nodeAfter,h,d,p=u.type.spec.isolating||c.type.spec.isolating;if(!p&&I(r,n,i))return!0;let m=!p&&n.parent.canReplace(n.index(),n.index()+1);if(m&&(h=(d=u.contentMatchAt(u.childCount)).findWrapping(c.type))&&d.matchType(h[0]||c.type).validEnd){if(i){let l=n.pos+c.nodeSize,a=o.FK.empty;for(let r=h.length-1;r>=0;r--)a=o.FK.from(h[r].create(null,a));a=o.FK.from(u.copy(a));let d=r.tr.step(new s.Wg(n.pos-1,l,n.pos,l,new o.Ji(a,1,0),h.length,!0)),p=d.doc.resolve(l+2*h.length);p.nodeAfter&&p.nodeAfter.type==u.type&&(0,s.n9)(d.doc,p.pos)&&d.join(p.pos),i(d.scrollIntoView())}return!0}let g=c.type.spec.isolating||a>0&&p?null:l.LN.findFrom(n,1),_=g&&g.$from.blockRange(g.$to),y=_&&(0,s.jP)(_);if(null!=y&&y>=n.depth)return i&&i(r.tr.lift(_,y).scrollIntoView()),!0;if(m&&f(c,"start",!0)&&f(u,"end")){let l=u,a=[];for(;a.push(l),!l.isTextblock;)l=l.lastChild;let h=c,d=1;for(;!h.isTextblock;h=h.firstChild)d++;if(l.canReplace(l.childCount,l.childCount,h.content)){if(i){let l=o.FK.empty;for(let r=a.length-1;r>=0;r--)l=o.FK.from(a[r].copy(l));i(r.tr.step(new s.Wg(n.pos-a.length,n.pos+c.nodeSize,n.pos+d,n.pos+c.nodeSize-d,new o.Ji(l,a.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function R(r){return function(n,i){let s=n.selection,o=r<0?s.$from:s.$to,a=o.depth;for(;o.node(a).isInline;){if(!a)return!1;a--}return!!o.node(a).isTextblock&&(i&&i(n.tr.setSelection(l.U3.create(n.doc,r<0?o.start(a):o.end(a)))),!0)}}let N=R(-1),O=R(1);function z(r,n=null){return function(i,o){let{$from:l,$to:a}=i.selection,u=l.blockRange(a),c=u&&(0,s.oM)(u,r,n);return!!c&&(o&&o(i.tr.wrap(u,c).scrollIntoView()),!0)}}function P(r,n=null){return function(i,s){let o=!1;for(let s=0;s<i.selection.ranges.length&&!o;s++){let{$from:{pos:l},$to:{pos:a}}=i.selection.ranges[s];i.doc.nodesBetween(l,a,(s,l)=>{if(o)return!1;if(!(!s.isTextblock||s.hasMarkup(r,n)))if(s.type==r)o=!0;else{let n=i.doc.resolve(l),s=n.index();o=n.parent.canReplaceWith(s,s+1,r)}})}if(!o)return!1;if(s){let o=i.tr;for(let s=0;s<i.selection.ranges.length;s++){let{$from:{pos:l},$to:{pos:a}}=i.selection.ranges[s];o.setBlockType(l,a,r,n)}s(o.scrollIntoView())}return!0}}function $(...r){return function(n,i,s){for(let o=0;o<r.length;o++)if(r[o](n,i,s))return!0;return!1}}let B=$(a,c,m),q=$(a,y,k),j={Enter:$(C,S,M,T),"Mod-Enter":E,Backspace:B,"Mod-Backspace":B,"Shift-Backspace":B,Delete:q,"Mod-Delete":q,"Mod-a":F},H={"Ctrl-h":j.Backspace,"Alt-Backspace":j["Mod-Backspace"],"Ctrl-d":j.Delete,"Ctrl-Alt-Backspace":j["Mod-Delete"],"Alt-Delete":j["Mod-Delete"],"Alt-d":j["Mod-Delete"],"Ctrl-a":N,"Ctrl-e":O};for(let r in j)H[r]=j[r];"u">typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"u">typeof os&&os.platform&&os.platform()},97567:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],l=(0,s.A)("box",o)},98307:(r,n,i)=>{"use strict";i.d(n,{A:()=>l});var s=i(90425);let o=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],l=(0,s.A)("clipboard-list",o)},99617:(r,n,i)=>{"use strict";var s=i(12115),o=i(8039);function l(r,n){return r===n&&(0!==r||1/r==1/n)||r!=r&&n!=n}var a="function"==typeof Object.is?Object.is:l,u=o.useSyncExternalStore,c=s.useRef,h=s.useEffect,d=s.useMemo,p=s.useDebugValue;n.useSyncExternalStoreWithSelector=function(r,n,i,s,o){var l=c(null);if(null===l.current){var f={hasValue:!1,value:null};l.current=f}else f=l.current;var m=u(r,(l=d(function(){function r(r){if(!c){if(c=!0,l=r,r=s(r),void 0!==o&&f.hasValue){var n=f.value;if(o(n,r))return u=n}return u=r}if(n=u,a(l,r))return n;var i=s(r);return void 0!==o&&o(n,i)?(l=r,n):(l=r,u=i)}var l,u,c=!1,h=void 0===i?null:i;return[function(){return r(n())},null===h?void 0:function(){return r(h())}]},[n,i,s,o]))[0],l[1]);return h(function(){f.hasValue=!0,f.value=m},[m]),p(m),m}}}]);
|