diff --git a/.agents/skills/gen-changesets/SKILL.md b/.agents/skills/gen-changesets/SKILL.md index e37dce801..60ae70c88 100644 --- a/.agents/skills/gen-changesets/SKILL.md +++ b/.agents/skills/gen-changesets/SKILL.md @@ -5,7 +5,7 @@ description: Use when generating changesets in the kimi-code repository — deci # Generate Changesets -The only user-facing published package is the CLI: `@moonshot-ai/kimi-code`. All other `@moonshot-ai/*` packages (sdk, kosong, kaos, oauth, telemetry, and so on) are internal. +The only user-facing published package is the CLI: `@moonshot-ai/kimi-code`. All other `@moonshot-ai/*` packages (sdk, kosong, oauth, telemetry, and so on) are internal. ## 1. Whether to Write @@ -32,6 +32,7 @@ Fix occasional loss of tool call results in long conversations. Wording: - One short, user-facing English sentence that states only what changed. Drop trailing clauses that explain the cause, the benefit, or the mechanism. +- When a default flips or an existing behavior is removed, name the behavior users lose, not only the new default. State the escape hatch if one exists, e.g. `Stop hot-reloading config, skills, and AGENTS.md by default; set [watch] enabled = true or KIMI_CODE_WATCH=1 to turn it back on.`; if there is none, say plainly that the old behavior is no longer available. - New features: say plainly what it is plus one line on how to use it, e.g. `Add the /foo slash command to list active sessions. Run /foo to see them.` - Experimental features: also state how to enable them (the flag, config key, or env var). - No file, class, or function names, and no PR numbers. No vague words like refactor, optimize, or improve. No real internal identifiers — use neutral placeholders such as `example.com` or `YOUR_API_KEY`. @@ -60,4 +61,4 @@ Wording: 4. **Show the changeset text to whoever requested the work and get their confirmation before committing.** 5. Do not guess at changes you do not understand: finish the parts that are clear, then list what is unclear and ask whether you may dig into the code. -Before a release, review the accumulated `.changeset/` entries and delete the non-user-facing ones — the release PR regenerates from `.changeset/` on main, so deleting a file removes its changelog entry without touching shipped code. +Before a release, review the accumulated `.changeset/` entries and delete the non-user-facing ones — the release PR regenerates from `.changeset/` on the selected release branch, so deleting a file removes its changelog entry without touching shipped code. diff --git a/.agents/skills/pre-changelog/SKILL.md b/.agents/skills/pre-changelog/SKILL.md index 4f1f83710..33ab0a156 100644 --- a/.agents/skills/pre-changelog/SKILL.md +++ b/.agents/skills/pre-changelog/SKILL.md @@ -13,6 +13,8 @@ This skill reuses `sync-changelog`'s strip / classify / translate rules. Read `s ### 1. Locate the release PR +Select the PR targeting the intended `release/*` branch, not the legacy main version PR. Report its latest head CI link and result alongside the preview. + ```bash gh pr list --state open --search "ci: release packages in:title" \ --json number,title,url,headRefName,baseRefName diff --git a/.agents/skills/review-pr/SKILL.md b/.agents/skills/review-pr/SKILL.md new file mode 100644 index 000000000..cb5db65e0 --- /dev/null +++ b/.agents/skills/review-pr/SKILL.md @@ -0,0 +1,192 @@ +--- +name: review-pr +description: 在 kimi-code 仓库里 review 一个 PR 时使用:按 PR 模板逐节核对描述与 diff,并单独做一轮"回归与用户影响"评审,给出影响等级与评审摘要,评审摘要用用户当前使用的语言。 +disable-model-invocation: true +--- + +# Review PR + +这个仓库过去的回归大多不是逻辑错误,而是"改动相对于自身意图是对的,但悄悄改掉了某个现有人群依赖的行为":方言分支收窄、默认值翻转、删 system prompt 句子、重构或移植时丢掉旧路径的功能、修复引入启动时序变化。通用 review 会把这类"有意的功能变更"排除在 bug 之外,所以这里把它单列成一轮。 + +评审判据只有一条:**改动前能工作的任何输入(配置键、环境变量、命令行参数、provider 响应形态、旧版本写的会话数据、客户端请求、hook 载荷)改动后必须行为不变,除非 PR 明确声明了这个变化并给出了退路。** + +## 工作流 + +1. 拉 PR 元数据与描述: + + ```bash + gh pr view --json title,body,url,files,additions,deletions,baseRefName,headRefName + ``` + +2. 读完整 diff(大 PR 按文件分批读): + + ```bash + gh pr diff + ``` + +3. 读足够的周边代码来验证描述里的每个断言。只看 diff 看不出"改动前谁走到这个分支"。 + +4. **第一遍:定性。** 判断改动类型,决定第三遍的深度,见"第一遍:定性"。 + +5. **第二遍:按模板逐节核对。** 见"模板逐节核对"。 + +6. **第三遍:回归与用户影响。** 尽量用一个独立子 agent 跑:只给它 PR 号、base 与 head、两三句改动简介和 `surfaces.md` 的路径,不给它作者关于影响范围的结论,让它先从 diff 和代码独立列清单,回来后再与作者填的表对比。没有子 agent 能力时自己按同样顺序做:先列清单,再读作者的表。见"第三遍:回归与用户影响"。 + +7. 用用户当前使用的语言写评审摘要,格式见"输出"。 + +## 第一遍:定性 + +| 改动类型 | 第三遍深度 | +|---|---| +| 纯内部重构、测试、文档、测试 CI | 只需给出"没有可观测变化"的证据:哪些分支、默认值、契约文件没动 | +| 发布与打包:release、native 构建、VS Code 发布工作流,打包脚本,web 产物同步 | 全做,人群按安装方式与平台分:npm 包、各平台 native 二进制、VS Code 市场、内置 web 产物 | +| 新增功能,不动既有路径 | 只查新分支是否抢走了既有输入:新增条件是否排在旧条件之前 | +| 行为变更、默认值翻转、校验或权限收紧或放宽 | 全做 | +| prompt 文本变更:system prompt、工具描述、提醒、overlay、内置 skill | 全做,且每一句改动单独成行 | +| 移植、替换旧路径、大重构:v1 到 v2、runtime binding、协议替换 | 全做,并要求作者给出旧路径功能清单 | +| 协议、磁盘格式、SDK 导出、hook 载荷、命令行契约变化 | 全做,并点名仓库外的消费方 | +| 修复类改动改了启动顺序、生命周期、异步时序 | 全做,重点看谁依赖原来的顺序 | + +一个 PR 可以同时属于多类,按最重的那类处理。 + +## 第三遍:回归与用户影响 + +### 1. 行为变化清单 + +列出 diff 改变的每一个可观测行为,包括作者说"不变"的和作者认为"内部"的。内部包会打进 CLI 发布包,"内部"不等于用户无感。 + +每一行记录:行为、变化前、变化后、变化类型(新增 / 修改 / 删除 / 默认翻转 / 收紧 / 放宽)、证据(改动前后各一个 `file:line`,一侧不存在时给可达路径)。 + +读法: + +- 对每个被删除或被收窄的分支、条件、默认值、句子,问"改动前谁走到这里,改动后他们去哪了"。 +- 对每个新增的分支或条件,问"哪些既有输入现在会先命中新分支"。#3492 的回归就是这样产生的:数组字段存在时不再读字符串字段,而 OpenRouter 形态的网关两者同时发。 +- 测试里"把旧断言改成新行为"的改动是行为变化的直接证据,逐条对应到清单。 +- 先看 diff 文件列表有没有命中 `surfaces.md` 的"触发线索"。命中的 surface 必须在清单里有对应行,否则就是漏项。 + +### 2. 受影响人群 + +每一行对应到 `surfaces.md` 里的具体人群,写出人群名字和"这个人群存在"的证据:文档页、issue、配置示例、provider 载荷形态。找不到人群的,不进 finding,进"待作者确认"。 + +### 3. 影响等级 + +等级只由改动的事实决定,不看 changeset、文档、测试这些补救状态。三步判定: + +1. 数据丢失、安全边界放宽、老数据不可读、某人群的功能整体不可用:直接 L3。 +2. 否则,可感知且有一键退路(config、env、flag):L1;可感知且无退路,旧行为不可恢复:L2;无可观测变化:L0。 +3. 静默升级:用户提供的输入(配置、环境变量、数据、请求字段)被忽略或丢弃,且没有任何错误信号,用户无法自行发现:升一级,最高 L3。行为公开地变了、用户能在输出里看到的,不算静默。 + +广度三档,必须写出人群名字:全体用户 / 某类配置或平台人群 / 边缘环境。 + +每一行单独定级,PR 的等级取最高。静默升级的理由:没有信号就没有上报,回归会一直存活到有人偶然发现。 + +### 4. 补救核对 + +固定四问,逐条回答有 / 无 / 不适用,并给出证据: + +- 退路开关:有没有 config、env 或 flag 能恢复旧行为。 +- changeset:有没有点明用户**失去了什么**,而不只是新默认是什么;没有退路时是否明说旧行为不可恢复。 +- 老数据与老客户端:旧版本写的会话、迁移来的数据、上一版发布的客户端(desktop、web、VS Code、ACP)是否仍然可用;回滚到上一版是否安全。 +- guard 测试:有没有一条测试把**未被改动的人群**的旧行为钉住。 + +再加一问:`docs/en` 与 `docs/zh` 里对这个 surface 的承诺是否同步更新。 + +### 等级对应的处理要求 + +- L3:建议阻塞。必须补 guard 测试,并提供退路、flag 门控或迁移,缺一不可合。 +- L2:需要维护者在 PR 里显式拍板;changeset 必须写明失去的行为;文档同步。 +- L1:核对 changeset 与文档即可。 +- L0:一句话说明为什么是 L0,给出证据。 + +### finding 与"待作者确认"的界线 + +- finding 必须同时有:改动前后各一处 `file:line` 证据,和一个具名人群及其存在证据。两者缺一,降级为"待作者确认"。新增整个文件或删除整段实现时一侧天然为空,这时给存在的那一侧加上受影响可达路径的 `file:line` 即可。 +- "待作者确认"最多 5 条,按可能的影响等级排序,多出来的只报数量。 +- 不要报:PR 之前就存在的问题(严重的单独一句"顺带发现")、lint 和类型检查会抓的问题、风格问题。 +- 不要把这些当成"无影响"的证据:作者说"不变"、没有测试引用被删的句子、改动只在内部包。 + +## 模板逐节核对 + +输出为中文时节名用下表的译名,其他语言沿用模板原文的节名: + +| English | 中文 | +|---------|------| +| Requirement or Bug | 需求或 Bug | +| Bug Reproduction Steps | Bug 复现步骤 | +| Root Cause | 根本原因 | +| Code Changes | 代码变更 | +| Behavior Changes and Affected Users | 行为变化与受影响人群 | +| Checklist | 检查清单 | + +旧 PR 若仍用 `Impact Scope` 这一节,按"行为变化与受影响人群"的标准核对。 + +### 需求或 Bug + +- 关联的 issue 是否有效、相关? +- 没有 issue 时,需求是否用一两句话说清楚了? + +### Bug 复现步骤 + +- bug 类 PR:步骤是否清晰、可复现? +- 按步骤能否在 base 分支上确认 bug 存在? + +### 根本原因 + +- bug 类 PR:根因解释是否令人信服? +- 描述的根因与 diff 是否一致? +- 是根本修复还是绕过,是否说清楚了? + +### 代码变更 + +- 描述与实际 diff 是否一致? +- 可视化大纲(diff 块、调用树、文件树)是否准确、有帮助? +- 方案是否合理?有没有更简单的替代? +- 有没有作者漏掉的边界情况? + +### 行为变化与受影响人群 + +- 把第三遍独立列出的清单与作者填的表逐行对比:作者漏列的行为就是 finding;作者写了但你没找到证据的,进"待作者确认"。 +- 人群是否具名,还是只写了"部分用户"? +- 写了 `None` 的,证据是否成立? +- 受影响模块与测试覆盖是否与 diff 文件列表一致?有没有带风险的未测路径? + +### 检查清单 + +- 适用的项是否都勾了? +- 标为"不需要"的项,你是否同意? + +## 输出 + +用用户当前使用的语言,按下面的顺序,示例为中文: + +```markdown +## 结论 +一句话:可合 / 需修改 / 建议阻塞。附 PR 影响等级与改动类型。 + +## 回归与用户影响 +- 改动类型:… +- 影响等级:Lx(广度:…;是否静默:…) + +| 行为 | 变化前 | 变化后 | 受影响人群 | 证据 | 等级 | 退路 | +|---|---|---|---|---|---|---| + +补救核对: +- 退路开关:… +- changeset 是否点明失去的行为:… +- 老数据与老客户端:… +- guard 测试:… +- 文档:… + +待作者确认(最多 5 条): +1. … + +## 模板逐节核对 +逐节说明是否填写充分,指出缺失、不准确、与 diff 不一致之处。 + +## 需要修改的项 +可执行的列表;没有则写"无"。 +``` + +## 复盘回填 + +每次线上回归复盘后,把新发现的人群或触发线索补进 `surfaces.md`,并在它的"历史案例"里加一行。清单不更新就会过时。 diff --git a/.agents/skills/review-pr/surfaces.md b/.agents/skills/review-pr/surfaces.md new file mode 100644 index 000000000..0d937d21c --- /dev/null +++ b/.agents/skills/review-pr/surfaces.md @@ -0,0 +1,129 @@ +# 人群与 surface 清单 + +`review-pr` 第三遍用的仓库专属清单:谁在依赖现有行为,diff 里碰到什么就必须列行为变化。它会过时,每次回归复盘后补一行,见 `SKILL.md` 的"复盘回填"。 + +## 一、人群:谁在依赖现有行为 + +### 客户端与入口 + +| 人群 | 说明 | 契约位置 | +|---|---|---| +| TUI 交互用户 | `kimi` 默认入口 | `apps/kimi-code/src/tui/` | +| print 模式用户 | `kimi -p`,含解析 `--output-format stream-json` 输出的脚本。脚本解析者算二等人群,但输出格式变化必须写进 changeset(#3146) | `apps/kimi-code/src/cli/options.ts` | +| desktop 与 web 用户 | 源码在 code-app 仓库,只消费 kap-server 的 `/api/v1` REST 与 `/api/v1/ws`。本仓 diff 看不到它们的用法,改契约时必须点名让作者去对方仓库核对 | `packages/kap-server/src/routes/`、`packages/kap-server/src/transport/ws/`、`docs/en/reference/server-api.md` | +| VS Code 扩展用户 | 走 SDK 事件适配层,webview 有自己的渲染契约(#3250:v2 不再发 `display` 字段导致卡片空白) | `apps/vscode/` | +| ACP 客户端用户 | Zed 等,`kimi acp`。stdio MCP 是 ACP 的默认传输,客户端会无条件发(#3167);能力矩阵是公开承诺(#3081) | `packages/acp-server/`、`docs/en/reference/kimi-acp.md` | +| SDK 调用方 | `@moonshot-ai/kimi-code-sdk` 的导出面;其中 `KimiForCodingProvider` 走 kosong 的 provider 实现,CLI 与服务端不用 kosong | `packages/node-sdk/src/index.ts`、`packages/node-sdk/package.json` 的 `exports`、`packages/kosong/src/providers/` | +| 远程控制用户 | `kimi web --remote-control`,凭据槽位与 relay 按登录区域选择(#3969) | `packages/remote-control/` | + +### provider 方言 + +| 人群 | 说明 | +|---|---| +| Kimi 官方 | 默认路径,OAuth 托管登录,区域与 relay 差异 | +| `openai` Chat Completions 兼容网关 | 最杂的一群:new-api 等中转、OpenRouter 形态(`reasoning` 字符串与 `reasoning_details` 数组并存,#3900)、只发 `reasoning_content` 的、严格校验历史消息的(#2819)、第三方模型对 `anyOf` 参数的处理(#3383) | +| `anthropic`、`openai_responses`、`google-genai`、`vertexai` | 各自的 thinking、工具调用、usage 字段形态 | +| 自定义模型配置 | `api_key_env`、models.dev catalog 导入、手动配置的 thinking 参数(#3448)、`[secondary_model]` 与 subagent model pool(#3192、#3903) | + +代码位置:`packages/agent-core-v2/src/human/llm/requester/bases/`。 + +### 平台与环境 + +| 人群 | 已知敏感点 | +|---|---| +| Windows | 深路径与递归监听压力(#3931 的动机)、驱动器根与 UNC(#2876)、IME 组合输入(#3915)、CSI-u 键盘序列 | +| Linux | 无 hardlink 的文件系统(#3535)、根目录海量文件导致的 OOM(#3892) | +| macOS | 默认开发环境,最容易被当成"全体用户" | +| 网络代理 | 后台子 agent 重试(#3721) | +| native 二进制 vs npm 安装 | 启动路径、更新机制不同 | +| 安装渠道 | npm 包、各平台 native 二进制、VS Code 市场包、内置 web 产物,由发布与打包工作流决定,`src/` 一行不动也能丢掉一个平台 | + +### git 仓库形态 + +| 人群 | 已知敏感点 | 契约位置 | +|---|---|---| +| 子模块或 worktree 内启动的用户 | `core.worktree` 已设置;路径含符号链接时(macOS `/tmp`、链接的 home、Windows 映射盘)realpath 与字面路径不一致。#3964 的 git 探针在这里整体失败,已随 #4013 回滚 | `packages/agent-core-v2/src/app/git/gitService.ts` | +| git-lfs、git-crypt 用户 | `.git/config` 里的 filter 驱动带 `required = true`;任何"清空 filter 命令"的加固都会让 `git status` 对已修改的被过滤文件直接 fatal,除非同时清 `required`。#3964 踩过,已随 #4013 回滚 | 同上 | +| 大仓库用户 | 依赖 `core.fsmonitor`;footer 的后台 git 有超时预算,超时后静默当作 clean | `apps/kimi-code/src/utils/git/` | +| 要求签名提交或 husky hooks 的仓库 | 任何自动提交路径(Tower 等)关闭 hooks 或签名都会改变提交结果 | `packages/agent-core-v2/src/features/tower/` | + +### 配置状态 + +| 人群 | 说明 | 契约位置 | +|---|---|---| +| 默认配置用户 | 任何默认值翻转对他们都是行为变更 | `packages/agent-core-v2/docs/config-manifest.toml` | +| experimental flag 用户 | `[experimental]` 与 `KIMI_CODE_EXPERIMENTAL_*`;flag 的 `default` 翻成 true 等于面向全体发布 | `packages/agent-core-v2/src/app/flag/flagRegistry.ts`、各域的 `flag.ts` | +| legacy flag 用户 | `KIMI_CODE_LEGACY_FLAG`(#3820:TUI 与 print 模式静默忽略) | | +| 自定义 agent 用户 | `--agent` 的 `disallowedTools` 等策略(#3417) | | +| 配了 hooks 的用户 | 事件名与载荷是外部脚本的契约;配了 hook 时审批面板不渲染并被静默批准(#3888)、v2 不触发 PreToolUse(#3431) | `packages/agent-core-v2/src/features/externalHooks/internal/types.ts`、`docs/en/customization/hooks.md` | +| skills、plugins、MCP 用户 | 含 stdio MCP、用户级 skill 根目录、`[watch]` 热加载(#3931 关掉默认,#4015 翻回;关掉时连带 AGENTS.md 变更提醒失效,`/reload` 只覆盖 config 与 skills) | `docs/en/customization/` | +| 环境变量用户 | 同一个变量在 TUI、print 模式、kap-server 三个入口要行为一致(#3498:三个入口两种行为) | `docs/en/configuration/env-vars.md` | +| 主题、键位、TUI 模式自定义用户 | `tui.toml` | `docs/en/customization/themes.md`、`docs/en/reference/keyboard.md` | + +### 数据年代 + +| 人群 | 说明 | 契约位置 | +|---|---|---| +| 旧版本写的会话 | wire 日志、turn 编号、压缩后的 transcript(#3561、#3866、#3922);新版本能否读、回滚后能否读 | `packages/agent-core-v2/docs/wire-manifest.d.ts`、`packages/agent-core-v2/docs/state-manifest.d.ts` | +| `kimi migrate` 迁来的会话 | 从 `~/.kimi/` 迁到 `~/.kimi-code/` | `packages/migration-legacy/` | +| 搜索索引 | minidb 快照与 WAL | `packages/minidb/` | +| 后台任务与 cron 持久化 | 非正常退出后的恢复(#3924) | | +| 目录布局 | 任何读写 `~/.kimi-code/` 的代码 | `docs/en/configuration/data-locations.md` | + +### 外部自动化 + +| 人群 | 契约 | +|---|---| +| 解析 `stream-json` 的脚本 | 事件形态与顺序 | +| hook 脚本 | 事件名、载荷字段、返回值语义 | +| `kimi export` 的消费者 | 导出格式 | +| 关闭遥测的用户 | `KIMI_DISABLE_TELEMETRY` 在所有入口生效 | + +### 模型行为人群 + +prompt 文本改动影响全体用户,且没有测试能证明"无影响"。已知依赖具体句子的人群: + +- 依赖"不碰工作目录外文件"的(#3879 删除了这条规则)。 +- 依赖"cwd 即项目根"的(#3929 删除了这条断言)。 +- plan 模式提醒节奏(#3489)。 + +基于外部基准分析做的 prompt 改动,本质是把一个人群的收益换成另一个人群的损失,必须写明两边各是谁。 + +## 二、触发线索:diff 里碰到就必须列行为变化 + +| diff 里出现 | 代表的 surface | 必做的检查 | +|---|---|---| +| `packages/agent-core-v2/src/app/agentProfileCatalog/system.md`,以及 `packages/agent-core-v2/src/**/*.md`(工具描述、提醒、overlay、内置 skill) | 模型行为 | 每删或改一句单独成行:这句改动前约束了什么行为,谁依赖,现在由什么来约束 | +| `packages/agent-core-v2/docs/config-manifest.toml`(由 `src/app/config/configSectionContributions.ts` 生成,`test/app/config/configManifest.test.ts` 守护同步) | 配置键、默认值、校验 | 默认翻转与校验收紧必列;改了 manifest 没改 `docs/en/configuration/config-files.md` 视为文档过时 | +| `packages/agent-core-v2/src/**/flag.ts`、`packages/agent-core-v2/src/app/flag/flagRegistry.ts` | experimental flag | `default` 翻转等于面向全体发布,按行为变更处理 | +| `packages/agent-core-v2/src/human/utils/watch.ts`(热加载开关)以及任何模块级默认常量、`?? true` / `?? false` 兜底被配置键覆盖的地方 | 默认值来源 | 默认翻转必列;退路的 config 路径要有 guard 测试,不能只靠 env;退路是否依赖 ConfigService 先于消费方构造 | +| `packages/agent-core-v2/docs/wire-manifest.d.ts`、`packages/agent-core-v2/docs/state-manifest.d.ts` | 磁盘会话格式 | 旧会话能否读、回滚到上一版能否读、有无迁移 | +| `packages/kap-server/test/__snapshots__/apiSurface.snapshot.test.ts.snap`、`packages/kap-server/src/routes/`、`packages/kap-server/src/transport/ws/` | desktop、web、VS Code 的服务端契约 | 消费方在仓库外,点名让作者去 code-app 核对;上一版客户端连新服务端是否仍可用 | +| `packages/node-sdk/src/index.ts`、`packages/node-sdk/package.json` | SDK 导出面 | 删除或改签名即破坏性变更 | +| `packages/klient/src/` | SDK 与 ACP 下面的客户端门面契约 | 只改 klient 的 PR 碰不到 node-sdk 导出面,按 SDK 调用方与 ACP 客户端两个人群核行为变化 | +| `packages/transcript/src/contract/` | kap-server 发给 desktop、web、VS Code 的 transcript 载荷契约 | 消费方在 code-app,点名让作者去核;上一版客户端能否解析新载荷 | +| `.github/workflows/release.yml`、`_native-build.yml`、`manual-native-bundle.yml`、`vscode-publish.yml`,`apps/kimi-code/scripts/native/`、`apps/kimi-code/scripts/check-web-assets.mjs` | 发布产物 | 按安装方式与平台核:npm 包内容、各平台 native 二进制、VS Code 市场包、内置 web 产物是否仍齐全 | +| `packages/acp-server/` | ACP 客户端 | 对照 `docs/en/reference/kimi-acp.md` 的能力矩阵逐项核对 | +| `apps/kimi-code/src/cli/` | 命令行参数、子命令、`--output-format` | 对照 `docs/en/reference/kimi-command.md` | +| `packages/agent-core-v2/src/features/externalHooks/` | hook 事件与载荷 | 对照 `docs/en/customization/hooks.md` 的事件参考 | +| `packages/agent-core-v2/src/human/llm/requester/bases/` | provider 方言分支 | 枚举每种上游载荷形态改动前后各走哪条分支,尤其是多个字段并存的网关 | +| `packages/agent-core-v2/src/app/git/`、`apps/kimi-code/src/utils/git/` | 后台 git 的调用方式、config 覆盖、超时 | 对照"git 仓库形态"人群逐行核:前置探针失败是否让整个后台 git 静默不可用;覆盖的 config 键是否有 `required`、`gpgSign`、`hooksPath` 这类会把"禁用"变成"失败"的键;Windows 用例是否全部 skip | +| `packages/migration-legacy/`、`packages/minidb/`、任何读写 `~/.kimi-code/` 布局的代码 | 数据年代 | 老数据是否仍可读、可迁移 | +| 任何环境变量读取点的新增、删除或语义变化,不限写法(`process.env.X`、`process.env['X']`、动态键、helper)也不限 `KIMI_` 前缀 | 环境变量 | 对照 `docs/en/configuration/env-vars.md` 的全部条目;TUI、print 模式、kap-server 三个入口是否一致 | +| `packages/agent-core-v2/src/app/scopes.ts`、`packages/agent-core-v2/src/features/featureAssemblyService.ts`、config ready 相关 | 启动顺序与生命周期 | 谁依赖原来的顺序;#3471 在合入 34 分钟后被 #3486 整体 revert | +| `docs/en/**`、`docs/zh/**` 的 reference、configuration、customization 页 | 公开承诺 | 改了行为没改文档,或改了文档没改行为,都要指出 | +| 测试里把旧断言改成新行为 | 行为变化的直接证据 | 逐条对应到行为变化清单 | + +## 三、历史案例:用来校准等级 + +| 类型 | 案例 | 当时漏掉的问题 | 事后等级 | +|---|---|---|---| +| 方言分支收窄 | #3492 引入,#3900 用户报告,#3910 修复 | PR 正文写明"只有没有数组时才读字符串",没人问谁会两个字段同时发 | L2 无退路,输入被静默丢弃升 L3,openai 兼容网关人群 | +| 默认值翻转 | #3931,五天后 #4015 翻回默认开 | changeset 只写新默认,没写运行中编辑 config、skills、AGENTS.md、agent 文件、mcp.json 不再自动生效;AGENTS.md 变更提醒随之失效,`/reload` 与 `/new` 不重读 AGENTS.md;review 未覆盖行为变化 | L1 有退路,但改了文件不生效也无任何信号,静默升 L2;changeset 没点明失去的行为,config 路径的退路无 guard 测试 | +| prompt 删句子 | #3879、#3929 | "没有测试引用这句"被当成无影响证据 | L2 无退路,全体用户;行为公开可见,不算静默 | +| 重构丢功能 | #2961 引入,#3081、#3167 用户报告,#3183 修复 | 重构删掉了 ACP 本地执行兜底与 stdio MCP 接受,文档承诺仍在 | L3,功能整体不可用,ACP 人群,报错响亮但无退路 | +| 移植漏项 | #3498、#3098、#3250、#3431、#3820 | v1 路径有、v2 路径没有:env 变量、上下文用量、卡片字段、hook、legacy flag;没人列过旧路径功能清单 | L2 无退路,配置被静默忽略升 L3 | +| 修复引入时序变化 | #3471 合入后 34 分钟被 #3486 revert | 延迟装配改变了启动顺序 | 全体用户 | +| 输出契约无声变化 | #3146 | headless 事件输出变了,没有 changelog | L2,脚本解析者 | +| 静默批准 | #3888 | 配了 hook 时审批面板不渲染,待审调用被静默批准 | L3,安全边界 | +| 安全收紧连带 | #3964(2.1.0),两天后 #4013 整体回滚 | 盲审列出四条:后台 git 探针在子模块 + 符号链接路径下整体失败;filter 驱动 `required = true` 仓库 `git status` fatal;print、ACP、SDK 无信任入口导致 `additional_dir` 静默为空;`~` 条目让 local.toml 整文件失效并静默退出。PR 正文未列任何人群 | L3 候选,四条均无退路、changeset 未提;回滚后代码已不在 main | diff --git a/.agents/skills/sync-changelog/SKILL.md b/.agents/skills/sync-changelog/SKILL.md index e8fbd021a..0835d56d2 100644 --- a/.agents/skills/sync-changelog/SKILL.md +++ b/.agents/skills/sync-changelog/SKILL.md @@ -126,7 +126,12 @@ Public-text rule: do not copy real internal endpoints, key names, account names, ### 4. Merge, Deduplicate, And Classify Entries -Before classifying, merge related entries and drop redundant ones from the user-facing changelog: +First, count the stripped upstream entries in the version range being synced. The count decides how much curation happens before the human review checkpoint: + +- **10 entries or fewer: list everything and let the user decide.** Classify every entry into its section and list them all — do not fold, merge, or drop entries on your own, and do not write a catch-all line. At the human review checkpoint (step 8), present the full list with advisory notes (which entries look low-signal under the two gates below, and why) so the user decides what stays, what merges, and what folds. +- **More than 10 entries: curate first, then review.** Merge related entries and fold low-signal ones into the catch-all line before writing the page, using the rules below. The reviewer still owns the final cutoff — surface the borderline calls instead of resolving them silently. + +The rules below are the shared curation standard: they drive the curator's fold/merge decisions when there are more than 10 entries, and they drive the advisory notes when there are 10 or fewer. - **Curate for end users: collapse low-signal entries into one catch-all line.** The docs changelog is the only curated, user-facing outlet; the full entry list always remains in the upstream package changelog, so hiding detail here loses nothing. Apply two gates to every candidate entry. Gate 1, the reader-action test: **after reading this, is there something the reader must do, or something they must re-evaluate?** Gate 2, the channel test: **is the changelog the only channel that can deliver this?** The changelog is the channel of last resort — when the product itself surfaces the information in context, at the moment of need, to exactly the affected users, the entry is redundant no matter how real the improvement is. "Surfaced" means pushed into the user's path, not merely present on screen: an event-triggered card, prompt, or post-install screen forces the encounter, while a toggle, menu item, command, or settings page only waits to be found. Users do not explore — a capability that lives only in ambient UI is effectively undiscoverable, so the changelog must announce it. What in-product surfacing cannot deliver: hidden controls (env vars, config keys, opt-out flags nobody would find unprompted), invalidations of existing habits or expectations (in-product discovery comes as confusion), and capabilities users would not know to seek. An entry that fails either gate folds. Anchor both gates to the changelog's reader, never to the bug's victim: someone who hit a loud failure does not need the changelog to confirm the fix — the product working again is the notification — and a reader who never hit it gets nothing from the entry. - `Features`: keep when users would try it or must react to it — new capabilities create demand readers did not know to seek. Collapse only behavior that takes effect solely behind an experimental flag. @@ -324,7 +329,7 @@ Check: - Each version has the same section set and order on both pages. - Each section has the same number of entries on both pages. - Within each section, the most valuable, obvious, and larger entries appear before smaller or narrower entries. -- Low-signal entries were collapsed into the single catch-all line, placed last under `Bug Fixes` — or under `Polish` when nothing folded is a fix (both the reader-action test and the channel test applied); the catch-all wording matches what was folded and never claims fixes that did not happen; section sizes stay within the density defaults (about 2 Polish, 3 Bug Fixes) unless extra qualifying entries were deliberately kept and flagged for review. The catch-all line ends with the upstream changelog pointer (file link, no version anchor). +- Entry count decided the curation level: a version range with 10 or fewer upstream entries lists everything classified, with no catch-all line (fold/merge decisions deferred to the review checkpoint); with more than 10, low-signal entries were collapsed into the single catch-all line, placed last under `Bug Fixes` — or under `Polish` when nothing folded is a fix (both the reader-action test and the channel test applied); the catch-all wording matches what was folded and never claims fixes that did not happen; section sizes stay within the density defaults (about 2 Polish, 3 Bug Fixes) unless extra qualifying entries were deliberately kept and flagged for review. The catch-all line ends with the upstream changelog pointer (file link, no version anchor). - PR links and commit hashes were stripped. - No `Thanks ...!` credit remains (remove it every time). - Real internal identifiers were replaced with neutral placeholders. @@ -353,7 +358,7 @@ If the user chooses review: git diff docs/en/release-notes/changelog.md docs/zh/release-notes/changelog.md ``` -2. Summarize synced versions, section counts, and anything that needed manual classification. List every entry folded into a catch-all line (short titles, one line each), any section that exceeds the density defaults, and every borderline call flagged during curation — the reviewer cannot own a cutoff they cannot see. +2. Summarize synced versions, section counts, and anything that needed manual classification. When the synced version range had 10 or fewer upstream entries and everything was listed, present the full entry list with advisory notes (which entries look low-signal and why) and ask the user to decide what stays, what merges, and what folds. When entries were folded into a catch-all line (more than 10 upstream entries), list every folded entry (short titles, one line each), any section that exceeds the density defaults, and every borderline call flagged during curation — the reviewer cannot own a cutoff they cannot see. 3. Tell the user to reply when they are done reviewing, or to ask for edits. 4. Do **not** commit, push, or open a PR until the user explicitly says review is complete, or asks to proceed. @@ -434,6 +439,7 @@ Return the PR URL to the user when done. - Never edit upstream `apps/kimi-code/CHANGELOG.md`. - Do not backfill unreleased `.changeset/*.md` drafts into the docs site. - If upstream wording is wrong, leave upstream alone and fix it in a future changeset. +- A version range with 10 or fewer upstream entries is listed in full; fold/merge/drop decisions belong to the user at the review checkpoint, not the curator. - Always sync on a `docs/changelog-sync-*` branch and open a PR; never push changelog docs sync directly to `main`. - Wait for the human review checkpoint before committing, pushing, or opening a PR. @@ -446,7 +452,8 @@ Return the PR URL to the user when done. | Leaving the `Thanks ...!` credit in docs | Remove it every time, including the multi-author form | | Leaving near-duplicate micro-tweaks as separate bullets | Merge small tweaks to the same surface into one higher-level entry (e.g. composer height + font → composer's default styling) | | Listing many narrow fixes to the same surface as separate bullets | When three or more fixes target the same UI area or the same class of problem, merge them into one higher-level fix entry; keep genuinely distinct or high-value fixes standalone | -| Listing low-signal fixes or internal changes as standalone bullets | Collapse them into the single catch-all line (`Fix several known issues.`) placed last under Bug Fixes; treat the section-size defaults (about 2 Polish, 3 Bug Fixes) as a density guard, not a quota | +| Listing low-signal fixes or internal changes as standalone bullets when curating (>10 entries) | Collapse them into the single catch-all line (`Fix several known issues.`) placed last under Bug Fixes; treat the section-size defaults (about 2 Polish, 3 Bug Fixes) as a density guard, not a quota | +| Folding, merging, or dropping entries on your own when the version range has 10 or fewer upstream entries | List everything classified, with no catch-all line, and let the user decide at the review checkpoint | | Folding a qualifying entry just to hit the section-size default | The defaults are density guards; keep entries that genuinely pass the reader-action test and flag the overflow for the human reviewer | | Keeping a fix because it was severe or hard-won | Severity makes the announcement redundant — the fix itself notifies whoever was hit; keep only behavior-change fixes and retrospective notices with a concrete, locatable action | | Keeping an improvement the product surfaces in context (recovery cards, post-install guidance, progress displays) | The product is the better channel — right users, moment of need; fold it (channel test) | diff --git a/.agents/skills/tdd/SKILL.md b/.agents/skills/tdd/SKILL.md deleted file mode 100644 index 8fc086710..000000000 --- a/.agents/skills/tdd/SKILL.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: tdd -description: Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests. ---- - -# Test-Driven Development - -TDD is the red → green loop. This skill is the reference that makes that loop produce tests worth keeping: what a good test is, where tests go, the anti-patterns, and the rules of the loop. Every section applies on every cycle: consult them before and during the loop, not after. - -When exploring the codebase, read `CONTEXT.md` (if it exists) so test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching. - -## What a good test is - -Tests verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't. A good test reads like a specification: "user can checkout with valid cart" tells you exactly what capability exists, and it survives refactors because it doesn't care about internal structure. - -See [tests.md](tests.md) for examples and [mocking.md](mocking.md) for mocking guidelines. - -## Seams: where tests go - -A **seam** is the public boundary you test at: the interface where you observe behavior without reaching inside. Tests live at seams, never against internals. - -**Test only at pre-agreed seams.** Before writing any test, write down the seams under test and confirm them with the user. No test is written at an unconfirmed seam. You can't test everything, so agreeing the seams up front is how testing effort lands on the critical paths and complex logic instead of every edge case. - -Ask: "What's the public interface, and which seams should we test?" - -When the shape of that interface is itself in question (how deep the module is, where the seam belongs, what the interface should expose), call the Skill tool with "codebase-design" for the vocabulary. It is the shared source of the module, interface, depth, seam, adapter, leverage and locality terms, and it is a reference to consult, not a session to run. - -## Anti-patterns - -- **Implementation-coupled**: mocks internal collaborators, tests private methods, or verifies through a side channel (querying the database instead of using the interface). The tell: the test breaks when you refactor but behavior hasn't changed. -- **Tautological**: the assertion recomputes the expected value the way the code does (`expect(add(a, b)).toBe(a + b)`, a snapshot derived by hand the same way, a constant asserted equal to itself), so it passes by construction and can never disagree with the code. Expected values must come from an independent source of truth: a known-good literal, a worked example, the spec. -- **Horizontal slicing**: writing all tests first, then all implementation. Bulk tests verify _imagined_ behavior: you test the _shape_ of things rather than user-facing behavior, the tests go insensitive to real changes, and you commit to test structure before understanding the implementation. Work in **vertical slices** instead: one test → one implementation → repeat, each test a **tracer bullet** that responds to what the last cycle taught you. - -## Rules of the loop - -- **Red before green.** Write the failing test first, then only enough code to pass it. Don't anticipate future tests or add speculative features. -- **One slice at a time.** One seam, one test, one minimal implementation per cycle. -- **Refactoring is not part of the loop.** It belongs to the review stage (see the `code-review` skill), not the red → green implementation cycle. diff --git a/.agents/skills/tdd/mocking.md b/.agents/skills/tdd/mocking.md deleted file mode 100644 index 71cbfee67..000000000 --- a/.agents/skills/tdd/mocking.md +++ /dev/null @@ -1,59 +0,0 @@ -# When to Mock - -Mock at **system boundaries** only: - -- External APIs (payment, email, etc.) -- Databases (sometimes - prefer test DB) -- Time/randomness -- File system (sometimes) - -Don't mock: - -- Your own classes/modules -- Internal collaborators -- Anything you control - -## Designing for Mockability - -At system boundaries, design interfaces that are easy to mock: - -**1. Use dependency injection** - -Pass external dependencies in rather than creating them internally: - -```typescript -// Easy to mock -function processPayment(order, paymentClient) { - return paymentClient.charge(order.total); -} - -// Hard to mock -function processPayment(order) { - const client = new StripeClient(process.env.STRIPE_KEY); - return client.charge(order.total); -} -``` - -**2. Prefer SDK-style interfaces over generic fetchers** - -Create specific functions for each external operation instead of one generic function with conditional logic: - -```typescript -// GOOD: Each function is independently mockable -const api = { - getUser: (id) => fetch(`/users/${id}`), - getOrders: (userId) => fetch(`/users/${userId}/orders`), - createOrder: (data) => fetch('/orders', { method: 'POST', body: data }), -}; - -// BAD: Mocking requires conditional logic inside the mock -const api = { - fetch: (endpoint, options) => fetch(endpoint, options), -}; -``` - -The SDK approach means: -- Each mock returns one specific shape -- No conditional logic in test setup -- Easier to see which endpoints a test exercises -- Type safety per endpoint diff --git a/.agents/skills/tdd/tests.md b/.agents/skills/tdd/tests.md deleted file mode 100644 index 7ab86479f..000000000 --- a/.agents/skills/tdd/tests.md +++ /dev/null @@ -1,77 +0,0 @@ -# Good and Bad Tests - -## Good Tests - -**Integration-style**: Test through real interfaces, not mocks of internal parts. - -```typescript -// GOOD: Tests observable behavior -test("user can checkout with valid cart", async () => { - const cart = createCart(); - cart.add(product); - const result = await checkout(cart, paymentMethod); - expect(result.status).toBe("confirmed"); -}); -``` - -Characteristics: - -- Tests behavior users/callers care about -- Uses public API only -- Survives internal refactors -- Describes WHAT, not HOW -- One logical assertion per test - -## Bad Tests - -**Implementation-detail tests**: Coupled to internal structure. - -```typescript -// BAD: Tests implementation details -test("checkout calls paymentService.process", async () => { - const mockPayment = jest.mock(paymentService); - await checkout(cart, payment); - expect(mockPayment.process).toHaveBeenCalledWith(cart.total); -}); -``` - -Red flags: - -- Mocking internal collaborators -- Testing private methods -- Asserting on call counts/order -- Test breaks when refactoring without behavior change -- Test name describes HOW not WHAT -- Verifying through external means instead of interface - -```typescript -// BAD: Bypasses interface to verify -test("createUser saves to database", async () => { - await createUser({ name: "Alice" }); - const row = await db.query("SELECT * FROM users WHERE name = ?", ["Alice"]); - expect(row).toBeDefined(); -}); - -// GOOD: Verifies through interface -test("createUser makes user retrievable", async () => { - const user = await createUser({ name: "Alice" }); - const retrieved = await getUser(user.id); - expect(retrieved.name).toBe("Alice"); -}); -``` - -**Tautological tests**: Expected value restates the implementation, so the test passes by construction. - -```typescript -// BAD: Expected value is recomputed the way the code computes it -test("calculateTotal sums line items", () => { - const items = [{ price: 10 }, { price: 5 }]; - const expected = items.reduce((sum, i) => sum + i.price, 0); - expect(calculateTotal(items)).toBe(expected); -}); - -// GOOD: Expected value is an independent, known literal -test("calculateTotal sums line items", () => { - expect(calculateTotal([{ price: 10 }, { price: 5 }])).toBe(15); -}); -``` diff --git a/.agents/skills/write-pr/SKILL.md b/.agents/skills/write-pr/SKILL.md new file mode 100644 index 000000000..b810cb1e0 --- /dev/null +++ b/.agents/skills/write-pr/SKILL.md @@ -0,0 +1,140 @@ +--- +name: write-pr +description: 在 kimi-code 仓库里创建或更新 PR 时使用:如何把 PR 模板的每一节写得简洁、便于 reviewer 理解,包括"行为变化与受影响人群"表。 +--- + +# 写 PR 描述 + +为当前分支创建或更新 PR,描述要让 reviewer 明白这个改动为什么存在、实现长什么样、现有用户会失去什么。 + +## 工作流 + +1. 读 PR 模板: + + `Read(.github/pull_request_template.md)` + +2. 找到或创建 PR: + - 先查当前分支有没有 PR:`gh pr view --json url,number,title,state 2>/dev/null`。 + - 没有的话,看 `git status --short --branch` 和当前分支上的提交。 + - 提交剩余改动,带 upstream 推送分支,用 `gh pr create` 创建 PR。 + - 遵守仓库的 git 安全规范。 + +3. 收集解释改动所需的上下文: + - 读关联的 issue 和相关任务产物。 + - 读完整 diff(`git diff main...HEAD`)和足够的周边代码,理解行为与归属。 + - PR 已存在时,用 `gh pr view` 拿元数据和改动文件列表。 + +4. 按模板各节写描述。描述用用户当前使用的语言,行为变化表也一样;只有三样固定:PR 标题保持英文 Conventional Commit,changeset 保持英文(见 `gen-changesets` skill),节标题沿用模板原文。 + - **Requirement or Bug**:一句话,或 `Resolve #`。不要多写。 + - **Bug Reproduction Steps**:只有 bug 类 PR 需要;feature 写 `N/A`。步骤已在 issue 里的写 `See linked issue`。 + - **Root Cause**:只有 bug 类 PR 需要;feature 写 `N/A`。说明根因,以及这是根本修复还是绕过。 + - **Code Changes**:能用可视化大纲说清楚的就不要写散文,见"代码变更的可视化大纲"。 + - **Behavior Changes and Affected Users**:先填行为变化表,再列受影响模块与测试覆盖,见"行为变化与受影响人群"。 + - **Checklist**:勾上所有适用的项。 + +5. 发布描述: + - 先存到临时文件,再 `gh pr edit --body-file ` 或 `gh pr create --body-file `。 + - 确认更新成功。 + +## 行为变化与受影响人群 + +这一节回答一个问题:合入之后,现有用户会失去什么。这个仓库过去的回归大多来自没人回答这个问题,而不是逻辑错误。 + +判据:**改动前能工作的任何输入(配置键、环境变量、命令行参数、provider 响应形态、旧版本写的会话数据、客户端请求、hook 载荷)改动后必须行为不变,除非这里明确声明了变化并给出退路。** + +写法: + +1. 列出 diff 改变的每一个可观测行为,一行一个。包括你认为"不变"但分支条件挪动了的:新增的条件会不会先于旧条件命中既有输入;删除或收窄的分支改动前谁在走。内部包会打进 CLI 发布包,"内部"不等于用户无感。表格用 PR 描述的语言,下面的示例用英文只是示意形状: + + | Behavior | Before | After | Who relies on the old behavior | Escape hatch | + |---|---|---|---|---| + | reasoning parsing when `reasoning_details` is an array | string `reasoning` also read | string ignored | OpenAI-compatible gateways that send both (OpenRouter dialect) | none | + +2. 人群要具名,不要写"部分用户"。从 `.agents/skills/review-pr/surfaces.md` 里取:客户端(TUI、print 模式、desktop 与 web、VS Code、ACP、SDK)、provider 方言、平台、配置状态、数据年代、外部脚本。 + +3. 改了 prompt 文本(system prompt、工具描述、提醒)的,每一句单独成行,写清这句改动前约束了什么行为、谁依赖、现在由什么来约束。"没有测试引用这句"不是无影响的证据。 + +4. 替换或绕过旧路径的(移植、runtime binding、协议替换),额外列出旧路径的功能清单:它认哪些环境变量、有哪些兜底、接受哪些输入,以及每一项在新路径里的位置。 + +5. 确实没有可观测变化的,写 `None`,并说明证据:哪些分支、默认值、契约文件没动。 + +6. 表后面列受影响模块与每一行对应的测试覆盖。默认翻转或删除行为的,必须有一条测试把未被改动的人群的旧行为钉住,并且 changeset 要写明用户失去了什么,见 `gen-changesets` skill;没有退路的,在 PR 里请维护者显式拍板。 + +## 代码变更的可视化大纲 + +优先用结构化视图,少用散文。用能说清实现的最小组合,没变的类别不要列。 + +逻辑或算法变化用伪代码 diff: + +```diff + on(save) +- write content ++ if content is unchanged ++ return cached result ++ write new content ++ invalidate cache +``` + +运行时控制流用调用树 diff: + +```diff + submitForm + createSession + persistPrompt ++ expandSkillMention + launchAgent +- navigateToSession ++ navigateToSession ++ subscribeToEvents +``` + +文件职责变化用浅层文件树 diff: + +```diff + src/ + ├── commands/ ++│ └── show-me.ts # expands the slash command + ├── sessions/ +-└── transport.ts ++└── transport/ ++ ├── client.ts ++ └── stream.ts +``` + +组件或 UI 结构变化用树 diff: + +```diff + + useSessionEvents() + ++ + ++ +``` + +组件交互、控制流或数据流用 Mermaid,解释 bug 机制时尤其有用: + +```mermaid +sequenceDiagram + participant User + participant UI + participant Daemon + User->>UI: choose command + UI->>Daemon: send expanded prompt + Daemon-->>UI: stream result +``` + +关键数据结构或类型变化用对应语言的代码块: + +```ts +interface SessionEvents { + onTurnStart(cb: (turn: Turn) => void): void; + onTurnEnd(cb: (turn: Turn) => void): void; +} +``` + +可视化大纲的规则: +- 重点是"变了什么"且周边形状已存在时,用 `diff` 块。 +- 大部分是新内容,或 diff 记法会掩盖归属和顺序时,用对应语言或 `text` 块给出完整目标形状。 +- 按最容易理解的顺序讲:先文件还是先数据结构,哪个合适用哪个。 +- 像一个人对另一个人讲话:简单、连贯、简洁。 diff --git a/.changeset/README.md b/.changeset/README.md index 38e368a52..1155a0900 100644 --- a/.changeset/README.md +++ b/.changeset/README.md @@ -15,7 +15,6 @@ Current publishable packages: All other workspace packages are private internal packages, are not published to npm, and are excluded via `ignore` in `.changeset/config.json`: -- `@moonshot-ai/kaos` - `@moonshot-ai/kimi-code-oauth` - `@moonshot-ai/kimi-telemetry` - `@moonshot-ai/kosong` @@ -100,23 +99,27 @@ Commit messages must follow Conventional Commit style. Do not include any author ### 4. CI generates the release PR -Once the changeset file is merged into `main`, `.github/workflows/release.yml` uses `changesets/action@v1` to create or update a release PR. +Changesets accumulate on `main`. Create `release/` from the selected commit; pushes to that branch use `changesets/action@v1` to create or update its release PR. Manual **Release** runs on a release branch only prepare the PR. The workflow explicitly dispatches CI for the generated version branch. The release PR runs: - `pnpm changeset version`: bumps publishable package versions and updates changelogs; - Deletes the consumed `.changeset/*.md` files; -- Uses the title `[CI]: Release packages`. +- Uses the title `ci: release packages`. ### 5. Merge the release PR -Once the release PR is merged into `main`, the same workflow runs: +Review the version PR, latest CI and CLI/extension pre-changelog together. Once the matching version PR is merged into `release/`, publication waits for that exact commit’s push CI. Ordinary pushes do not publish. The existing publication steps then run: - `pnpm install --frozen-lockfile` - `pnpm build` - `pnpm changeset publish` -The packages are then published via npm Trusted Publishing, and a GitHub Release is created. +The packages are then published via npm Trusted Publishing, and a GitHub Release is created. CLI native builds still depend on Changesets reporting a newly published CLI package; npm-succeeded/native-failed whole-run recovery is not changed by this migration. + +VS Code uses the same approved release commit and CI gate, publishing only when the extension version changed in that push. It retains its existing build and marketplace checks. It no longer publishes on main pushes or through a standalone manual entry. The documentation workflow is dispatched on main after CLI artifacts are uploaded; its deployment result is tracked separately. CDN remains manual. + +Migration: merge the main infrastructure PR first to disable the old publisher, then the release infrastructure PR. These PRs do not publish. Close the obsolete main version PR separately. After the actual release, synchronize versions, changelogs, lockfile and consumed changeset removals back to main, preserving later main work. Main synchronization does not publish npm or VS Code. Do not change Desktop's submodule pointer as part of this step. ## Manual Publishing (Not Recommended) @@ -141,7 +144,7 @@ The root-level `pnpm run publish` first runs typecheck, lint, sherif, test, buil - Every PR that affects publishable-package behavior or public API should include a corresponding changeset. - Changes under `plugins/` (the bundled official plugins such as `kimi-datasource`) do **not** need a changeset: each plugin carries its own version in `kimi.plugin.json` and `plugins/marketplace.json` and is distributed via the marketplace CDN, separately from the `@moonshot-ai/kimi-code` npm package. - Changeset files must be committed to the repository — release PRs are only triggered after they're merged. -- Release PRs require human review and merge; they will not publish automatically. +- Release PRs require human review and approval. They do not publish before merge; merging the approved PR automatically publishes after its commit passes CI. - Do not add release changesets for private internal packages; only select `@moonshot-ai/kimi-code` and `@moonshot-ai/kimi-code-sdk`. - If a change in an underlying internal package alters user-visible behavior or public API of a publishable package, add a changeset to the affected publishable package. For example, when a bug fixed in `@moonshot-ai/kosong` resolves an issue CLI users encounter, add a changeset to `@moonshot-ai/kimi-code` describing the user-visible fix. - `@moonshot-ai/kimi-code` is the official CLI package name; after a global install it provides the `kimi` command. diff --git a/.changeset/expand-live-thinking.md b/.changeset/expand-live-thinking.md new file mode 100644 index 000000000..f07d46223 --- /dev/null +++ b/.changeset/expand-live-thinking.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": minor +--- + +Allow expanding thinking during streaming with Ctrl-O diff --git a/.changeset/fix-zombie-session-occupancy.md b/.changeset/fix-zombie-session-occupancy.md new file mode 100644 index 000000000..a626113cb --- /dev/null +++ b/.changeset/fix-zombie-session-occupancy.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +Fix sessions occasionally remaining occupied after an application crash on macOS and Linux. diff --git a/.changeset/import-cc-codex-refresh.md b/.changeset/import-cc-codex-refresh.md new file mode 100644 index 000000000..fc40bc9ca --- /dev/null +++ b/.changeset/import-cc-codex-refresh.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +Update cross-tool imports for custom homes, instruction duplicate checks, project skills, and MCP settings; stop importing standalone `.claude/AGENTS.md`, project `.codex/AGENTS.md`, `.codex/CLAUDE.md`, and loose skill files, which can still be copied manually. diff --git a/.changeset/kap-session-idle-reclaim.md b/.changeset/kap-session-idle-reclaim.md new file mode 100644 index 000000000..5170e7a38 --- /dev/null +++ b/.changeset/kap-session-idle-reclaim.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": minor +--- + +Sessions in web and desktop now unload from memory after 30 minutes idle and resume transparently on next access. diff --git a/.changeset/provider-refresh-command.md b/.changeset/provider-refresh-command.md new file mode 100644 index 000000000..e10c318fb --- /dev/null +++ b/.changeset/provider-refresh-command.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": minor +--- + +Add `/provider refresh [providerId]` to re-fetch provider model lists at runtime; unknown `/provider` subcommands now show a usage hint instead of opening the manager. diff --git a/.changeset/quick-resume-long-sessions.md b/.changeset/quick-resume-long-sessions.md new file mode 100644 index 000000000..79f7614a5 --- /dev/null +++ b/.changeset/quick-resume-long-sessions.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +Speed up session resume for long conversations. diff --git a/.changeset/session-lock-takeover.md b/.changeset/session-lock-takeover.md new file mode 100644 index 000000000..01747440c --- /dev/null +++ b/.changeset/session-lock-takeover.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +Offer to take over a session that is still in use after a retry, so sessions left locked by an exited process can be used again, and add a `KIMI_CODE_SESSION_LOCK=0` switch that turns off the session lock. diff --git a/.changeset/wedged-turn-transcript-axis.md b/.changeset/wedged-turn-transcript-axis.md new file mode 100644 index 000000000..bf83f162b --- /dev/null +++ b/.changeset/wedged-turn-transcript-axis.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +Fix the conversation view freezing at an old point after restarting the app when a turn had been interrupted; interrupted turns are now marked instead of shown as completed. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index eaa61a910..33c85ffc9 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,24 +6,40 @@ External PRs are accepted for approved bug fixes only: link an issue that a main See https://github.com/MoonshotAI/kimi-code/blob/main/CONTRIBUTING.md for more. --> -## Related Issue +## Requirement or Bug - + -Resolve #(issue_number) +## Bug Reproduction Steps -## Problem + - +## Root Cause -## What changed + - +## Code Changes + + + +## Behavior Changes and Affected Users + + ## Checklist - [ ] I have read the [CONTRIBUTING](https://github.com/MoonshotAI/kimi-code/blob/main/CONTRIBUTING.md) document. -- [ ] I have linked a related issue (external PRs: the issue must have a maintainer's `/approve`). +- [ ] I have linked a related issue (external PRs: issue must have a maintainer's `/approve`). - [ ] I have added tests that prove my feature works. +- [ ] The behavior-change table above is complete, and every removed behavior or flipped default is named in the changeset and either has an escape hatch or was explicitly approved by a maintainer in this PR. - [ ] Ran `gen-changesets` skill, or this PR needs no changeset. - [ ] Ran `gen-docs` skill, or this PR needs no doc update. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 636568d71..4f1e84251 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,11 +5,27 @@ on: push: branches: - main + - 'release/*' + + workflow_dispatch: permissions: contents: read +concurrency: + group: ci-${{ github.ref }}-${{ startsWith(github.ref, 'refs/heads/release/') && github.sha || '' }} + cancel-in-progress: ${{ !startsWith(github.ref, 'refs/heads/release/') }} + jobs: + release-workflow-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-node@v6 + with: + node-version-file: .nvmrc + - run: node --test scripts/release-trigger.test.mjs + build: runs-on: ubuntu-latest @@ -141,10 +157,10 @@ jobs: - run: pnpm install --frozen-lockfile - name: Typecheck run: | - pnpm dlx --package @typescript/native-preview@beta tsgo --version + pnpm exec tsc --version for config in packages/*/tsconfig.json apps/kimi-code/tsconfig.json; do echo "Typechecking ${config}" - pnpm dlx --package @typescript/native-preview@beta tsgo -p "${config}" --noEmit + pnpm exec tsc -p "${config}" --noEmit done - name: Typecheck VS Code extension run: pnpm --filter kimi-code run typecheck diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 498f68825..76d0733b4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,16 +2,88 @@ name: Release on: push: - branches: - - main + branches: ['release/*'] + workflow_dispatch: -concurrency: ${{ github.workflow }}-${{ github.ref }} +concurrency: + group: release-${{ github.ref }}-${{ github.sha }} + cancel-in-progress: false jobs: + version: + if: github.repository_owner == 'MoonshotAI' && startsWith(github.ref, 'refs/heads/release/') + concurrency: + group: release-version-${{ github.ref }} + cancel-in-progress: false + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + actions: write + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + - uses: pnpm/action-setup@v6 + - uses: actions/setup-node@v6 + with: + node-version-file: .nvmrc + cache: pnpm + - run: pnpm install --frozen-lockfile + - uses: changesets/action@v1 + id: version + with: + version: pnpm run version:release + commit: 'ci: release packages' + title: 'ci: release packages' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Check version PR + if: steps.version.outputs.pullRequestNumber != '' + env: + GH_TOKEN: ${{ github.token }} + VERSION_BRANCH: changeset-release/${{ github.ref_name }} + run: gh workflow run ci.yml --ref "$VERSION_BRANCH" + + candidate: + if: github.repository_owner == 'MoonshotAI' && github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/') + runs-on: ubuntu-latest + timeout-minutes: 60 + permissions: + contents: read + pull-requests: read + actions: read + checks: read + outputs: + publish: ${{ steps.trigger.outputs.publish }} + steps: + - uses: actions/checkout@v6 + with: + ref: ${{ github.sha }} + - uses: actions/setup-node@v6 + with: + node-version-file: .nvmrc + - name: Wait for merged version commit CI + id: trigger + env: + GH_TOKEN: ${{ github.token }} + run: node scripts/release-trigger.mjs + + vscode: + needs: candidate + if: needs.candidate.outputs.publish == 'true' + permissions: + contents: read + uses: ./.github/workflows/vscode-publish.yml + secrets: + VSCE_PAT: ${{ secrets.VSCE_PAT }} + OVSX_PAT: ${{ secrets.OVSX_PAT }} + release: name: Release runs-on: ubuntu-latest - if: github.repository_owner == 'MoonshotAI' + needs: candidate + if: needs.candidate.outputs.publish == 'true' outputs: packages_published: ${{ steps.changesets.outputs.published }} kimi_native_release: ${{ steps.kimi-release.outputs.should_publish }} @@ -71,16 +143,6 @@ jobs: env: CHANGESETS_PUBLISHED_PACKAGES: ${{ steps.changesets.outputs.publishedPackages }} - deploy-docs: - name: Deploy docs - needs: release - if: needs.release.outputs.packages_published == 'true' - uses: ./.github/workflows/docs-deploy.yml - permissions: - contents: read - pages: write - id-token: write - native-artifacts: name: Native release artifact needs: release @@ -132,3 +194,15 @@ jobs: GH_TOKEN: ${{ github.token }} RELEASE_TAG: ${{ needs.release.outputs.kimi_release_tag }} run: gh release upload "$RELEASE_TAG" dist-native-release/* --clobber + + deploy-docs: + needs: publish-native-assets + runs-on: ubuntu-latest + permissions: + actions: write + steps: + - name: Deploy existing main documentation + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + run: gh workflow run docs-deploy.yml --ref main diff --git a/.github/workflows/vscode-publish.yml b/.github/workflows/vscode-publish.yml index 23b12e12f..f7907a47c 100644 --- a/.github/workflows/vscode-publish.yml +++ b/.github/workflows/vscode-publish.yml @@ -1,35 +1,16 @@ name: Publish VS Code extension -# 把 0.7.3 手动发版流程固化成 CI 流水线: -# -# pnpm install → package:platform(全 6 平台)→ package:verify -# → extension host 冒烟(xvfb)→ publish:vsix → publish:ovsx -# -# 触发语义(参照 kimi-code-app 仓 desktop release.yml 的判定方式): -# 只在"本次 push 改动了 apps/vscode/package.json 的 version"时发布, -# 即 changesets 版本 PR("ci: release packages")合入后自动触发; -# 普通 PR 合入不会改变版本号,不会发布。版本号比较以 push 事件的 -# before SHA 为基准(git show),可覆盖一次 push 含多个 commit 的情况, -# 不依赖工作区状态。workflow_dispatch 为手动兜底, -# 跳过版本号变化检查,直接走后续幂等闸门。 -# -# 幂等(两道保险,可安全重跑,失败即停不自动重试): -# 1. 发布前逐平台核验 VS Marketplace(vsce show)与 Open VSX(REST) -# 线上版本:6 个 targetPlatform(darwin/linux/win32 × x64/arm64) -# 全部在线才跳过对应发布步骤;任一平台缺失(如上次部分发布失败) -# 即放行给发布步骤补齐,重跑可补齐; -# 2. 发布脚本自身带 --skip-duplicate(vsce)/ already-exists 跳过(ovsx)。 -# -# 前置条件:仓库管理员需先配置 secrets VSCE_PAT / OVSX_PAT, -# 未配置时 publish 步骤会失败,属预期。 - on: - push: - branches: - - main - workflow_dispatch: + workflow_call: + secrets: + VSCE_PAT: + required: false + OVSX_PAT: + required: false -concurrency: ${{ github.workflow }}-${{ github.ref }} +concurrency: + group: vscode-publish-${{ github.ref }} + cancel-in-progress: false permissions: contents: read @@ -38,13 +19,14 @@ jobs: publish: name: Publish VSIX to marketplaces runs-on: ubuntu-latest - if: github.repository_owner == 'MoonshotAI' + if: github.repository_owner == 'MoonshotAI' && startsWith(github.ref, 'refs/heads/release/') timeout-minutes: 90 steps: - name: Checkout uses: actions/checkout@v6 with: - fetch-depth: 0 # 需要按 push 事件的 before SHA 取旧版本号比较 + ref: ${{ github.sha }} + fetch-depth: 0 - name: Setup pnpm uses: pnpm/action-setup@v6 @@ -62,7 +44,6 @@ jobs: id: gate shell: bash env: - EVENT_NAME: ${{ github.event_name }} BEFORE_SHA: ${{ github.event.before }} run: | set -euo pipefail @@ -71,27 +52,20 @@ jobs: echo "version=${version}" >> "$GITHUB_OUTPUT" echo "extension version: ${version}" - if [ "${EVENT_NAME}" = "workflow_dispatch" ]; then - echo "manual dispatch — skipping version-change check" + prev="" + if [ -n "${BEFORE_SHA}" ] && [ -n "${BEFORE_SHA//0/}" ]; then + if git show "${BEFORE_SHA}:${pkg}" > /tmp/prev-vscode-pkg.json 2> /dev/null; then + prev="$(node -p "require('/tmp/prev-vscode-pkg.json').version")" + fi else - # 以 push 事件的 before SHA 为比较基准(覆盖多 commit 的单次 push)。 - # before 为空或全 0(如新分支首推)时无法比较,prev 视为空 → - # 判定版本变化放行 —— 宁可多查一次线上闸门,不可漏发。 - prev="" - if [ -n "${BEFORE_SHA}" ] && [ -n "${BEFORE_SHA//0/}" ]; then - if git show "${BEFORE_SHA}:${pkg}" > /tmp/prev-vscode-pkg.json 2> /dev/null; then - prev="$(node -p "require('/tmp/prev-vscode-pkg.json').version")" - fi - else - echo "push event has no usable before SHA ('${BEFORE_SHA}') — treating as a version change" - fi - if [ "${prev}" = "${version}" ]; then - echo "apps/vscode version unchanged in this push (${version}) — nothing to publish" - echo "should_publish=false" >> "$GITHUB_OUTPUT" - exit 0 - fi - echo "version changed ${prev:-} -> ${version} — release push" + echo "push event has no usable before SHA ('${BEFORE_SHA}') — treating as a version change" fi + if [ "${prev}" = "${version}" ]; then + echo "apps/vscode version unchanged in this push (${version}) — nothing to publish" + echo "should_publish=false" >> "$GITHUB_OUTPUT" + exit 0 + fi + echo "version changed ${prev:-} -> ${version} — release push" echo "should_publish=true" >> "$GITHUB_OUTPUT" # 线上闸门:逐平台核验,6 个 targetPlatform 全部在线才跳过对应市场; diff --git a/AGENTS.md b/AGENTS.md index ca4068bbc..e97b035c3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -21,7 +21,6 @@ This is a TypeScript monorepo built for agent-assisted development. Keep the roo - `packages/agent-core-v2`: the DI × Scope agent engine (the v2 port behind kap-server). Four `LifecycleScope` tiers — `App` / `Workspace` / `Session` / `Agent` (`app/scopes.ts`) — plus the L3 unit layer (`Service`/`Fiber` units, collection contribution points, the Feature seam in `src/features/`); there is no App-level session lifecycle facade — callers compose `ISessionIndex` → `IWorkspaceLifecycleService.handlerFor` → the handler. - `packages/node-sdk`: the public TypeScript SDK and harness. - `packages/kosong`: the LLM / provider abstraction layer. -- `packages/kaos`: the execution environment and file/process abstractions. - `packages/oauth`: Kimi OAuth and managed auth utilities. - `packages/telemetry`: shared client-side telemetry infrastructure. - `packages/transcript`: the isomorphic transcript rendering data layer — L1 agent-granular store, L2 idempotent operations, L3 `off/turn/block/delta` subscription granularity, L4 framework-free view registry, plus turn-cursor pagination. Pure TypeScript (browser-safe, no engine imports); the sole owner of the transcript contract types (`src/contract/`) and the op-batch sequencing contract. @@ -58,7 +57,6 @@ This is a TypeScript monorepo built for agent-assisted development. Keep the roo - Internal methods with only a single parameter should not be turned into options objects just for stylistic uniformity. - Split functions only along abstraction levels: each function reads as one level of narrative (Step-down Rule), and a wrapper that adds no new abstraction level — especially one with a single call site — is inlined instead of extracted. - Except for a package's `index.ts`, other `index.ts` files should prefer `export * from './module';`. -- When writing or updating tests, follow the `tdd` skill (`.agents/skills/tdd/SKILL.md`). - Do not add too many new test files. Prefer adding tests to the existing test file of the corresponding component or module. - When a test fails because of a user modification, default to fixing the test first; do not change the implementation to satisfy an old test unless the implementation truly has a bug. - Do not sacrifice code quality for external compatibility unless the user explicitly asks for it. Breaking changes go through changesets and a `major` bump, gated by the rule below. @@ -75,12 +73,17 @@ This is a TypeScript monorepo built for agent-assisted development. Keep the roo - Project-map entries stay at 1–2 sentences; deep package docs live in the package's own `AGENTS.md`. - Keep instruction updates focused and supported by code facts. +## Release Workflow + +- `main` accumulates changesets; `release/*` maintains `ci: release packages` PRs. Merging the matching version PR authorizes publication after its merge-commit CI succeeds. Ordinary pushes do not publish. +- npm publishing and native artifacts retain the existing Changesets flow. CDN upload and routing remain separately approved operations. See `.changeset/README.md` for migration and main synchronization. + ## Workflow Requirements - Prefer `rg` / `rg --files` when reading code. - When designing changes, follow existing boundaries and local patterns first. - In public text and test data, replace real internal identifiers with neutral placeholders such as `example.com`, `example.test`, and `YOUR_API_KEY`. Before opening a PR, ask a read-only agent to audit the diff for context-specific internal identifiers. -- When creating a PR, the PR title must follow Conventional Commit style, e.g. `chore: remove legacy format commands`. +- When creating a PR, use the `write-pr` skill (`.agents/skills/write-pr/SKILL.md`) to write the PR description. The PR title must follow Conventional Commit style, e.g. `chore: remove legacy format commands`. - When an AI agent opens or updates a PR, fill in `.github/pull_request_template.md` — link the related issue or explain the problem, then describe what changed. Do not leave placeholder text or submit a generic summary of the diff. - Do not submit vague AI-generated PR text. The human author must understand the change well enough to explain the code, edge cases, and why the approach fits this repository. - After finishing a task and before submitting a PR, you must run the `gen-changesets` skill (see `.agents/skills/gen-changesets/SKILL.md`) and generate a changeset under `.changeset/` according to its rules. @@ -91,3 +94,39 @@ This is a TypeScript monorepo built for agent-assisted development. Keep the roo - Agent working notes or handoff/summary documents (e.g. `HANDOVER-*.md`, `HANDOFF-*.md`, `handoff.md`). - Throwaway UI/UX prototypes or design mockups (e.g. `*-designs.html`, `*-mockup.html`, `*-demo(s).html`) at the repo root or under a `design/` folder. The only tracked `.html` files should be Vite `index.html` entrypoints. Before committing or opening a PR, run `git status` and `git diff --staged --stat` and remove anything matching these patterns. Put scratch work under `.tmp/` (gitignored) instead of the repo root or the source tree. + +## Code Review Rules + +These rules apply to every pull request review, automated or human. The user populations and contract files they refer to are listed in `.agents/skills/review-pr/surfaces.md`. + +### Review scope: the PR's diff, not the repo + +- Review only the PR's diff against its base. A problem in code the PR does not touch (pre-existing on base) is reported as a non-blocking note, never as a blocking finding — the sole exception is pre-existing code that the PR's behavior directly triggers or amplifies. +- Report a class of issues in one pass: when a finding generalizes to several locations in the diff, list all of them at once instead of raising them across successive rounds. +- No pure style or personal-preference findings. Every finding carries a severity: P0 blocking / P1 should-fix / P2 suggestion. +- Re-reviews are incremental: review only what changed since the previous review; do not restate findings on unchanged code or re-raise resolved threads. Before treating a resolved thread as settled, verify the current code: suppress a finding only when the problem is actually fixed or the finding no longer holds. +- Domain-specific rules keep their own canonical homes — changesets (`.agents/skills/gen-changesets/SKILL.md`), comment-free zones (General Coding Rules), PR text (`write-pr` skill); review against those, not ad-hoc taste. + +### Enumerate changed behavior, not just bugs + +Any input that worked before the change — a config key, env var, CLI flag, provider response shape, session written by an older version, client request, or hook payload — must behave the same after it unless the PR declares the change. For every deleted or narrowed branch, condition, default, or prompt sentence, ask who reached it before and where they go now; for every new condition, ask which existing inputs now match it first. Flag a PR that calls a path "unchanged" when its branch condition moved. + +### A flipped default or removed behavior needs a named loss and an escape hatch + +Everyone on the old default is affected. Require the changeset to name the behavior users lose, not only the new default; a config, env, or flag escape hatch or a maintainer's explicit sign-off in the PR; and a test that pins the old behavior for the population that keeps it. + +### Prompt text is behavior + +Editing or deleting sentences under `packages/agent-core-v2/src/**/*.md` (system prompt, tool descriptions, reminders, overlays, built-in skills) changes agent behavior for every user who receives that prompt. "No test references the sentence" is not evidence of no impact. Require the PR to name the population that receives the text (every session, plan mode, a flag-gated feature such as Tower), what the sentence enforced, who relied on it, and what enforces it now. + +### Contract files are tripwires + +The manifests under `packages/agent-core-v2/docs/` (`config-manifest.toml`, `wire-manifest.d.ts`, `state-manifest.d.ts`), `packages/kap-server/test/__snapshots__/apiSurface.snapshot.test.ts.snap`, `packages/node-sdk/src/index.ts`, `packages/agent-core-v2/src/features/externalHooks/`, `packages/acp-server/`, and `apps/kimi-code/src/cli/` are consumed outside this repository: desktop and web in code-app, the VS Code extension, ACP clients such as Zed, SDK users, hook scripts, and headless-output parsers. When they change, require the PR to name the consumers and how data and clients from the previous release keep working. + +### Ports and refactors carry the old path's feature inventory + +When a change replaces or bypasses an existing path, require a list of what the old path did — env vars honored, fallbacks, accepted inputs — and where each item lives in the new path. A silently dropped item is a regression, not a cleanup. + +### Silent failure outranks a crash + +A change that makes the product silently ignore configuration, silently approve or skip an action, or silently drop data is the most severe finding: users get no signal to report. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a5e50c778..ca79376b2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,7 +30,7 @@ This is a pnpm monorepo. The most relevant entry points are: - `apps/vis` — session debug visualizer - `packages/node-sdk` — public TypeScript SDK (`@moonshot-ai/kimi-code-sdk`) - `packages/agent-core-v2` — the agent engine (v2, DI Scope architecture); `packages/agent-core` is v1 and being phased out -- `packages/klient`, `kap-server`, `protocol`, `transcript`, `kosong`, `kaos`, `oauth`, `telemetry` — internal engine packages +- `packages/klient`, `kap-server`, `protocol`, `transcript`, `kosong`, `oauth`, `telemetry` — internal engine packages - `docs/` — VitePress bilingual docs site For the full project map, see [AGENTS.md](AGENTS.md). diff --git a/CONTRIBUTING.zh-CN.md b/CONTRIBUTING.zh-CN.md index 92ea4107b..4d8df0ca3 100644 --- a/CONTRIBUTING.zh-CN.md +++ b/CONTRIBUTING.zh-CN.md @@ -30,7 +30,7 @@ Kimi Code 对 CLI/TUI 行为、agent 工作流和公开 API 已有自己的主 - `apps/vis` — 会话调试可视化工具 - `packages/node-sdk` — 公开 TypeScript SDK(`@moonshot-ai/kimi-code-sdk`) - `packages/agent-core-v2` — 当前的 agent 引擎(v2,DI Scope 架构);`packages/agent-core` 为 v1,正在逐步废弃 -- `packages/klient`、`kap-server`、`protocol`、`transcript`、`kosong`、`kaos`、`oauth`、`telemetry` — 内部引擎包 +- `packages/klient`、`kap-server`、`protocol`、`transcript`、`kosong`、`oauth`、`telemetry` — 内部引擎包 - `docs/` — VitePress 双语文档站 完整项目地图见 [AGENTS.md](AGENTS.md)。 diff --git a/apps/kimi-code/CHANGELOG.md b/apps/kimi-code/CHANGELOG.md index de9a0c6e5..e99a9a3c2 100644 --- a/apps/kimi-code/CHANGELOG.md +++ b/apps/kimi-code/CHANGELOG.md @@ -1,5 +1,229 @@ # @moonshot-ai/kimi-code +## 2.3.0 + +### Minor Changes + +- [#4294](https://github.com/MoonshotAI/kimi-code/pull/4294) [`3f80896`](https://github.com/MoonshotAI/kimi-code/commit/3f80896a79c5b17867898bd829b6d7a78f569f47) Thanks [@liruifengv](https://github.com/liruifengv)! - Add a confirmation dialog when switching models in a session with conversation history: start a new session, compact and continue, continue directly, or cancel. Shown only when enabled by cloud configuration. + +- [#4188](https://github.com/MoonshotAI/kimi-code/pull/4188) [`3f0857e`](https://github.com/MoonshotAI/kimi-code/commit/3f0857eb7d612c4890c45dfa6acc8381f1e761c2) Thanks [@oocz](https://github.com/oocz)! - List plugin skills under their qualified `:` name so same-named skills from different plugins all stay visible and invocable; invoking a plugin skill by its bare name no longer works, use the qualified name instead. + +- [#4214](https://github.com/MoonshotAI/kimi-code/pull/4214) [`ef727e5`](https://github.com/MoonshotAI/kimi-code/commit/ef727e517923cb312cb48d42825c49dfacd528e7) Thanks [@sailist](https://github.com/sailist)! - Support streaming large requests and responses through remote control, raising the transfer limit from 10 MiB to 100 MiB, with concurrent transfers bounded to protect memory. + +- [#4288](https://github.com/MoonshotAI/kimi-code/pull/4288) [`df0ff3c`](https://github.com/MoonshotAI/kimi-code/commit/df0ff3c5492e8f896927c4af9b4ae00b2b488607) Thanks [@github-actions](https://github.com/apps/github-actions)! - When the same session is open in multiple clients, sending from a second one now shows an occupancy prompt with retry/cancel, or reloads updates made elsewhere first and resends your message. + +- [#4200](https://github.com/MoonshotAI/kimi-code/pull/4200) [`5bab748`](https://github.com/MoonshotAI/kimi-code/commit/5bab748dddaae4b2ac15822d72b83446e5fd7bf4) Thanks [@7Sageer](https://github.com/7Sageer)! - Automatically generate a session title after the first turn and show it as the terminal window title. + +### Patch Changes + +- [#4250](https://github.com/MoonshotAI/kimi-code/pull/4250) [`6e7cc90`](https://github.com/MoonshotAI/kimi-code/commit/6e7cc909da9084a424f822dd5a9aae5b98070b73) Thanks [@sailist](https://github.com/sailist)! - Setting `[permission] dangerous_command_guard = false` now turns off every built-in confirmation guard — dangerous commands, sensitive-file access, and git control-path access — instead of only the dangerous-command guard. + +- [#4281](https://github.com/MoonshotAI/kimi-code/pull/4281) [`5710c54`](https://github.com/MoonshotAI/kimi-code/commit/5710c5496a213742ca0687f69dd8eeb5bde52dbf) Thanks [@sailist](https://github.com/sailist)! - Fix session events stopping after a session is archived and restored. + +- [#4201](https://github.com/MoonshotAI/kimi-code/pull/4201) [`83a39b4`](https://github.com/MoonshotAI/kimi-code/commit/83a39b49ed62627c7a604b39e26d8e9d17ade296) Thanks [@Grapedge](https://github.com/Grapedge)! - Stop blocking the terminal while the footer reads git status. + +- [#4230](https://github.com/MoonshotAI/kimi-code/pull/4230) [`b260326`](https://github.com/MoonshotAI/kimi-code/commit/b2603264ec4687cee766cf5d5e6d4976e432961c) Thanks [@kimi-agent-bot](https://github.com/kimi-agent-bot)! - Report a clear error when thinking effort is set to off for Gemini 4 models. + +- [#4208](https://github.com/MoonshotAI/kimi-code/pull/4208) [`20b5991`](https://github.com/MoonshotAI/kimi-code/commit/20b59915bb11fc56ec389aa96720f1b7daac0862) Thanks [@SeleneXX](https://github.com/SeleneXX)! - Fix Gemini 4 requests always failing with a 400 error. + +- [#4242](https://github.com/MoonshotAI/kimi-code/pull/4242) [`c1459a6`](https://github.com/MoonshotAI/kimi-code/commit/c1459a61845056832b85a0a220ee11a2bc5132f8) Thanks [@wbxl2000](https://github.com/wbxl2000)! - Run hooks such as `PreToolUse` and `Stop` in the session's project directory, as documented, instead of the directory the server was started from. + +- [#4210](https://github.com/MoonshotAI/kimi-code/pull/4210) [`f28c51c`](https://github.com/MoonshotAI/kimi-code/commit/f28c51c01f025bba9f0d0f58f6309e7517a8cd02) Thanks [@sailist](https://github.com/sailist)! - Add the [mcp] default_deferred config key: when the experimental tool-select flag is on, set default_deferred = true in config.toml to load every MCP server's tools on demand by default; a server can opt out with deferred: false. + +- [#4171](https://github.com/MoonshotAI/kimi-code/pull/4171) [`0327e8e`](https://github.com/MoonshotAI/kimi-code/commit/0327e8e9a875949fd40141ef79f902d756dfd3db) Thanks [@7Sageer](https://github.com/7Sageer)! - Support custom-registry model upgrade metadata in model configuration. + +- [#4188](https://github.com/MoonshotAI/kimi-code/pull/4188) [`3f0857e`](https://github.com/MoonshotAI/kimi-code/commit/3f0857eb7d612c4890c45dfa6acc8381f1e761c2) Thanks [@oocz](https://github.com/oocz)! - Allow uppercase letters, dot-separated segments, and @ suffixes in plugin names when installing plugins. + +- [#4294](https://github.com/MoonshotAI/kimi-code/pull/4294) [`3f80896`](https://github.com/MoonshotAI/kimi-code/commit/3f80896a79c5b17867898bd829b6d7a78f569f47) Thanks [@liruifengv](https://github.com/liruifengv)! - Queue /compact while the agent is busy: the command now joins the message queue and runs in order instead of failing with an error; it is skipped if the context was auto-compacted while it waited. + +- [#4190](https://github.com/MoonshotAI/kimi-code/pull/4190) [`e4c99a3`](https://github.com/MoonshotAI/kimi-code/commit/e4c99a3bad19b00bd1939b1cf254f427b50061f0) Thanks [@starquakee](https://github.com/starquakee)! - Clarify unavailable tools, announce when no tools can be loaded, and discourage repeated failed tool selections. + +- [#4272](https://github.com/MoonshotAI/kimi-code/pull/4272) [`ce0834a`](https://github.com/MoonshotAI/kimi-code/commit/ce0834a8f301b89cc4523499a3e074c36851de8f) Thanks [@Grapedge](https://github.com/Grapedge)! - Move the session rating opt-out from tui.toml to config.toml. + +- [#4066](https://github.com/MoonshotAI/kimi-code/pull/4066) [`85077a4`](https://github.com/MoonshotAI/kimi-code/commit/85077a419001285e49ede3574924f001935aed62) Thanks [@7Sageer](https://github.com/7Sageer)! - Keep subagent tool descriptions aligned with currently available tools. + +- [#3799](https://github.com/MoonshotAI/kimi-code/pull/3799) [`7e58f2d`](https://github.com/MoonshotAI/kimi-code/commit/7e58f2d2410d2b541ffd57f4501c0436bba4ccbd) Thanks [@kimi-agent-bot](https://github.com/kimi-agent-bot)! - Fix the latest reply disappearing from the transcript after a background task completion notification arrives; the fold boundary is now anchored to the notification turn itself instead of the asynchronously mounted task card. + +- [#4239](https://github.com/MoonshotAI/kimi-code/pull/4239) [`da5918c`](https://github.com/MoonshotAI/kimi-code/commit/da5918c0c861a1d670f4523a9f9dd968647fe4cb) Thanks [@RealKai42](https://github.com/RealKai42)! - Remind the agent to update its todo list after 5 steps without an update instead of 10, only while the list still has unfinished items, and ask it to bring the list up to date before its final reply. + +- [#4248](https://github.com/MoonshotAI/kimi-code/pull/4248) [`8fcd332`](https://github.com/MoonshotAI/kimi-code/commit/8fcd3326e7488e5e0d4c595115ef74a10c340d5b) Thanks [@kimi-agent-bot](https://github.com/kimi-agent-bot)! - Show a single overflowing preview line in full instead of swapping it for a same-height expand hint. + +- [#4304](https://github.com/MoonshotAI/kimi-code/pull/4304) [`d36071e`](https://github.com/MoonshotAI/kimi-code/commit/d36071ede6ae3cbdc08cbb8a0f7daf7bc6d06f2d) Thanks [@kimi-agent-bot](https://github.com/kimi-agent-bot)! - web: Improved interactions and fixed known bugs. + +## 2.2.0 + +### Minor Changes + +- [#4159](https://github.com/MoonshotAI/kimi-code/pull/4159) [`0a3a2fb`](https://github.com/MoonshotAI/kimi-code/commit/0a3a2fbafab473df9e9f6609f825af78d2c1ce6d) Thanks [@RealKai42](https://github.com/RealKai42)! - Add an opt-in NotifyUser progress update feature (off by default): new sessions can show the agent's mid-turn progress with an optional one-line title, enabled in the TUI `/experiments` or the web/Desktop settings' Lab section; set `[experimental] notify_user = true` or `KIMI_CODE_EXPERIMENTAL_NOTIFY_USER=1` to turn it on. + +- [#4145](https://github.com/MoonshotAI/kimi-code/pull/4145) [`242ac23`](https://github.com/MoonshotAI/kimi-code/commit/242ac230006447f8601e1678c49182bfbae89fe9) Thanks [@wbxl2000](https://github.com/wbxl2000)! - Add `kimi app [path]` to open a new desktop chat in the current or specified directory. + +- [#4061](https://github.com/MoonshotAI/kimi-code/pull/4061) [`20a2cea`](https://github.com/MoonshotAI/kimi-code/commit/20a2cea72f5d2c4be3a3845e4ff24ce302a6630e) Thanks [@chengluyu](https://github.com/chengluyu)! - Cap the agent's in-turn wait for background tasks at 90 seconds (longer timeouts are no longer accepted), discourage repeated waits, and let a new message end the wait immediately. + +- [#3998](https://github.com/MoonshotAI/kimi-code/pull/3998) [`09af3b4`](https://github.com/MoonshotAI/kimi-code/commit/09af3b483faac51a767aee50adb1bc1a8de4cc53) Thanks [@tpoisonooo](https://github.com/tpoisonooo)! - Tower mode: a message sent while the agent is running aborts the in-progress turn and runs as its own turn. + +- [#4031](https://github.com/MoonshotAI/kimi-code/pull/4031) [`33e368a`](https://github.com/MoonshotAI/kimi-code/commit/33e368a1eff8d958856af8e2fb64f4db122b2247) Thanks [@Grapedge](https://github.com/Grapedge)! - Add sticky user message summaries in fullscreen mode; click a summary to jump to the original message. + +- [#4074](https://github.com/MoonshotAI/kimi-code/pull/4074) [`c9f01f0`](https://github.com/MoonshotAI/kimi-code/commit/c9f01f07388abc2cdca40c9c5267f58c65086710) Thanks [@tpoisonooo](https://github.com/tpoisonooo)! - Tower mode: deterministic orchestration with TowerRebase and LLM-free status, goal/tower mutual exclusion, and workspace protection. + +- [#4059](https://github.com/MoonshotAI/kimi-code/pull/4059) [`1f6f0b1`](https://github.com/MoonshotAI/kimi-code/commit/1f6f0b1fa2117cc9374c1be62c534b4a4d60e412) Thanks [@7Sageer](https://github.com/7Sageer)! - Add the KIMI_CODE_TRUST_WORKSPACE environment variable to mark the workspace as trusted. + +- [#4165](https://github.com/MoonshotAI/kimi-code/pull/4165) [`afd95f6`](https://github.com/MoonshotAI/kimi-code/commit/afd95f64a5444b649a4cc33504513bf88e4c54ba) Thanks [@Grapedge](https://github.com/Grapedge)! - Replace user skill cards with highlighted prompts and support Ctrl-S for skill prompts. + +### Patch Changes + +- [#4183](https://github.com/MoonshotAI/kimi-code/pull/4183) [`c15638b`](https://github.com/MoonshotAI/kimi-code/commit/c15638b0a1234e5aa97659fbc625d7dc4d60d93f) Thanks [@RealKai42](https://github.com/RealKai42)! - Cancel in-flight video uploads when a media read is interrupted. + +- [#4081](https://github.com/MoonshotAI/kimi-code/pull/4081) [`06ebfc8`](https://github.com/MoonshotAI/kimi-code/commit/06ebfc821e304bd4ca3f828ae739954166463d65) Thanks [@sailist](https://github.com/sailist)! - Fix shifted turns and lost replies when a UserPromptSubmit hook injects text; hook JSON output without a "message" field is no longer added to the conversation. + +- [#4154](https://github.com/MoonshotAI/kimi-code/pull/4154) [`419aced`](https://github.com/MoonshotAI/kimi-code/commit/419aced0e97fa04b75f8f71b089e1667f6de6d0a) Thanks [@7Sageer](https://github.com/7Sageer)! - Fix media file reading on the first turn after resuming a session. + +- [#4083](https://github.com/MoonshotAI/kimi-code/pull/4083) [`f409caa`](https://github.com/MoonshotAI/kimi-code/commit/f409caa21e71ce7beb158d29ffca1fed76216a64) Thanks [@sailist](https://github.com/sailist)! - Cron tasks from the source session no longer fire inside a forked session. + +- [#4152](https://github.com/MoonshotAI/kimi-code/pull/4152) [`f0bc988`](https://github.com/MoonshotAI/kimi-code/commit/f0bc988bbc7db08d650f37ae0eaa69bcc6e90696) Thanks [@7Sageer](https://github.com/7Sageer)! - Forked subagents now inherit the parent's available agent types, including custom agents. + +- [#4057](https://github.com/MoonshotAI/kimi-code/pull/4057) [`a940f2f`](https://github.com/MoonshotAI/kimi-code/commit/a940f2ff049ed57abce68c59526de7a6628a4112) Thanks [@huangzheng2016](https://github.com/huangzheng2016)! - Fix the permission mode switch in the goal-start approval prompt not taking effect on the v2 engine. + +- [#4081](https://github.com/MoonshotAI/kimi-code/pull/4081) [`06ebfc8`](https://github.com/MoonshotAI/kimi-code/commit/06ebfc821e304bd4ca3f828ae739954166463d65) Thanks [@sailist](https://github.com/sailist)! - Fix messages rendering out of place in sessions with a UserPromptSubmit hook. + +- [#4153](https://github.com/MoonshotAI/kimi-code/pull/4153) [`7091138`](https://github.com/MoonshotAI/kimi-code/commit/7091138f5e66289d04b9b7a5cd77f94af9308be3) Thanks [@RealKai42](https://github.com/RealKai42)! - Let the agent write one- or two-sentence progress notes between tool calls instead of bare status lines; in the experimental Updates panel (`KIMI_CODE_EXPERIMENTAL_NOTIFY_USER=1`), stop asking the agent to repost its mid-turn text as an update and remind it to post updates less often. + +- [#4054](https://github.com/MoonshotAI/kimi-code/pull/4054) [`4fbe065`](https://github.com/MoonshotAI/kimi-code/commit/4fbe065442179435c43d3c3dc8d11bb408b3fd30) Thanks [@RealKai42](https://github.com/RealKai42)! - Stop prompting the agent to send NotifyUser updates when a session is opened in a host that does not display them. + +- [#4091](https://github.com/MoonshotAI/kimi-code/pull/4091) [`21406fb`](https://github.com/MoonshotAI/kimi-code/commit/21406fb4c805cc8c715e6d1f16ad3fb5f25f4fe3) Thanks [@sailist](https://github.com/sailist)! - Omit max_tokens for models without an explicit output limit, fixing repeated 400 errors on strict serving stacks (e.g. bare vLLM) when the model's max output size is unknown. + +- [#4184](https://github.com/MoonshotAI/kimi-code/pull/4184) [`cbd7540`](https://github.com/MoonshotAI/kimi-code/commit/cbd754049a114ee36d1b27675c82819e4963c692) Thanks [@7Sageer](https://github.com/7Sageer)! - Remove the never-implemented `executor = "kaos"` option from MCP stdio server configuration; configs using it now fail validation at load time. + +- [#2919](https://github.com/MoonshotAI/kimi-code/pull/2919) [`0f052fe`](https://github.com/MoonshotAI/kimi-code/commit/0f052fee1399f34086bb6343a56867d7df9b70b5) Thanks [@duyphan154](https://github.com/duyphan154)! - Sanitize foreground Bash tool output so captured terminal escape sequences no longer change the host terminal state. + +- [#4164](https://github.com/MoonshotAI/kimi-code/pull/4164) [`3395f5b`](https://github.com/MoonshotAI/kimi-code/commit/3395f5bea6c77feb6a835d1ca3f4935970f96c6b) Thanks [@huangzheng2016](https://github.com/huangzheng2016)! - Show a "Shutting down" status hint while shutdown hooks run during exit, and let a Ctrl+C during that window force an immediate exit instead of waiting for the hook timeout. + +- [#4033](https://github.com/MoonshotAI/kimi-code/pull/4033) [`eec9bbd`](https://github.com/MoonshotAI/kimi-code/commit/eec9bbd94958248034f5dbf109a639970308f05e) Thanks [@Grapedge](https://github.com/Grapedge)! - Feedback surveys now appear less often. + +- [#4160](https://github.com/MoonshotAI/kimi-code/pull/4160) [`72fc1d0`](https://github.com/MoonshotAI/kimi-code/commit/72fc1d0a3375b2a87dff602a1d91726a99f360e0) Thanks [@kimi-agent-bot](https://github.com/kimi-agent-bot)! - Show "Working…" in the status spinner while thinking. + +- [#4056](https://github.com/MoonshotAI/kimi-code/pull/4056) [`395d537`](https://github.com/MoonshotAI/kimi-code/commit/395d537237d737de0239159b60d1cc160bdf04e6) Thanks [@7Sageer](https://github.com/7Sageer)! - Replace inline MCP commands in the workspace trust prompt with activation summaries and configuration paths for manual inspection. + +- [#4076](https://github.com/MoonshotAI/kimi-code/pull/4076) [`e3bf50c`](https://github.com/MoonshotAI/kimi-code/commit/e3bf50c0831d91ceb3656acf1b7a3f480eaada56) Thanks [@7Sageer](https://github.com/7Sageer)! - Remove interruption reminders from the conversation when their interrupted turns are undone. + +- [#4031](https://github.com/MoonshotAI/kimi-code/pull/4031) [`33e368a`](https://github.com/MoonshotAI/kimi-code/commit/33e368a1eff8d958856af8e2fb64f4db122b2247) Thanks [@Grapedge](https://github.com/Grapedge)! - Replace the user message bullet ✨ with ❯. + +- [#4221](https://github.com/MoonshotAI/kimi-code/pull/4221) [`2e6821d`](https://github.com/MoonshotAI/kimi-code/commit/2e6821dcbd8034f128b2326a73d4704201b7c108) Thanks [@kimi-agent-bot](https://github.com/kimi-agent-bot)! - web: Improved interactions and fixed known bugs. + +## 2.1.1 + +### Patch Changes + +- [#4013](https://github.com/MoonshotAI/kimi-code/pull/4013) [`929403b`](https://github.com/MoonshotAI/kimi-code/commit/929403b6db219eae6099dd23eae2f0efa2bb2823) Thanks [@7Sageer](https://github.com/7Sageer)! - Roll back some of the overly defensive changes in 2.1.0 + +- [#4015](https://github.com/MoonshotAI/kimi-code/pull/4015) [`c7dd841`](https://github.com/MoonshotAI/kimi-code/commit/c7dd84124a00d2dc1a68fbbc3e54b1095ee9ac23) Thanks [@sailist](https://github.com/sailist)! - Revert filesystem watchers for config and workspace files to on by default. Set `[watch] enabled` to `false` or `KIMI_CODE_WATCH=0` to keep them off. + +## 2.1.0 + +### Minor Changes + +- [#3990](https://github.com/MoonshotAI/kimi-code/pull/3990) [`32000d0`](https://github.com/MoonshotAI/kimi-code/commit/32000d08afcd019016fa60db0d68eaf21f3e35a6) Thanks [@Grapedge](https://github.com/Grapedge)! - In fullscreen, click a folded block to open or close it. + +- [#4004](https://github.com/MoonshotAI/kimi-code/pull/4004) [`e17ff67`](https://github.com/MoonshotAI/kimi-code/commit/e17ff679281e340fd328bc2ebaba1237e79a9ad3) Thanks [@Grapedge](https://github.com/Grapedge)! - Add a TUI mode setting to /settings with an experimental fullscreen layout; switching modes takes effect after restarting Kimi Code. You can also set `tui_mode` in `~/.kimi-code/tui.toml` directly: `"regular"` renders into the terminal scrollback, while `"fullscreen"` makes parts of the UI mouse-interactive for a smoother experience. + +### Patch Changes + +- [#3964](https://github.com/MoonshotAI/kimi-code/pull/3964) [`6451f1e`](https://github.com/MoonshotAI/kimi-code/commit/6451f1e056e90037bbf832f3578955cf8e55db64) Thanks [@7Sageer](https://github.com/7Sageer)! - Block file tools from accessing files outside the working directory through symlinks. + +- [#3975](https://github.com/MoonshotAI/kimi-code/pull/3975) [`bb96d80`](https://github.com/MoonshotAI/kimi-code/commit/bb96d80748921618182369a40a6610f38fa16acb) Thanks [@RealKai42](https://github.com/RealKai42)! - Reduce the CLI's startup time and memory usage. + +- [#3957](https://github.com/MoonshotAI/kimi-code/pull/3957) [`6a214b8`](https://github.com/MoonshotAI/kimi-code/commit/6a214b85e53e58a9ef6480f27bcb7b0103c0e34e) Thanks [@huangzheng2016](https://github.com/huangzheng2016)! - Fix a "Maximum call stack size exceeded" error when opening large sessions. + +- [#3974](https://github.com/MoonshotAI/kimi-code/pull/3974) [`994287a`](https://github.com/MoonshotAI/kimi-code/commit/994287acb3a7428b580c09cabd5aba1b5a818aaa) Thanks [@liruifengv](https://github.com/liruifengv)! - Fix forked sessions getting their titles overwritten by auto-generated titles. + +- [#3964](https://github.com/MoonshotAI/kimi-code/pull/3964) [`6451f1e`](https://github.com/MoonshotAI/kimi-code/commit/6451f1e056e90037bbf832f3578955cf8e55db64) Thanks [@7Sageer](https://github.com/7Sageer)! - Apply project-local configuration only after the workspace is trusted. + +- [#3964](https://github.com/MoonshotAI/kimi-code/pull/3964) [`6451f1e`](https://github.com/MoonshotAI/kimi-code/commit/6451f1e056e90037bbf832f3578955cf8e55db64) Thanks [@7Sageer](https://github.com/7Sageer)! - Block repository git configuration from executing commands during background git operations. + +- [#3969](https://github.com/MoonshotAI/kimi-code/pull/3969) [`b3212fd`](https://github.com/MoonshotAI/kimi-code/commit/b3212fd9abc1f4670fb47df16f0137957aed6f2d) Thanks [@sailist](https://github.com/sailist)! - Skip cloud telemetry on the global login until its collector is live, and keep shutdown from aborting TUI exit. + +- [#3979](https://github.com/MoonshotAI/kimi-code/pull/3979) [`e796bb5`](https://github.com/MoonshotAI/kimi-code/commit/e796bb5d482ecb7976c25dad0563b74cc9ec2c68) Thanks [@sailist](https://github.com/sailist)! - Fix MCP OAuth not requesting the offline_access scope, which caused hourly browser re-authorization with providers like Vercel. + +- [#3969](https://github.com/MoonshotAI/kimi-code/pull/3969) [`b3212fd`](https://github.com/MoonshotAI/kimi-code/commit/b3212fd9abc1f4670fb47df16f0137957aed6f2d) Thanks [@sailist](https://github.com/sailist)! - Fix Remote Control failing to start after `kimi login --region global`. + +- [#3964](https://github.com/MoonshotAI/kimi-code/pull/3964) [`6451f1e`](https://github.com/MoonshotAI/kimi-code/commit/6451f1e056e90037bbf832f3578955cf8e55db64) Thanks [@7Sageer](https://github.com/7Sageer)! - Reject additional directories that resolve to the home directory or filesystem root. + +- [#3995](https://github.com/MoonshotAI/kimi-code/pull/3995) [`a54e6f6`](https://github.com/MoonshotAI/kimi-code/commit/a54e6f6a9b36bc1346e41da576d96ff54aa557b6) Thanks [@7Sageer](https://github.com/7Sageer)! - Turn off repeat reminders and forced stops with `KIMI_CODE_REPEAT_BREAKER=0`. + +- [#3970](https://github.com/MoonshotAI/kimi-code/pull/3970) [`895e9d9`](https://github.com/MoonshotAI/kimi-code/commit/895e9d9b868cf9899e444784130fa1946c6cef6c) Thanks [@chengluyu](https://github.com/chengluyu)! - Fix missing Swarm members after reopening an interrupted conversation. + +- [#3989](https://github.com/MoonshotAI/kimi-code/pull/3989) [`a268ad7`](https://github.com/MoonshotAI/kimi-code/commit/a268ad775d9451d008d3c73de053655f6ab0772a) Thanks [@Grapedge](https://github.com/Grapedge)! - Show a Thinking… spinner and keep the status row height steady during streaming. + +- [#3989](https://github.com/MoonshotAI/kimi-code/pull/3989) [`a268ad7`](https://github.com/MoonshotAI/kimi-code/commit/a268ad775d9451d008d3c73de053655f6ab0772a) Thanks [@Grapedge](https://github.com/Grapedge)! - Add a clickable "Jump to bottom" indicator to the fullscreen TUI. + +- [#3976](https://github.com/MoonshotAI/kimi-code/pull/3976) [`f7012aa`](https://github.com/MoonshotAI/kimi-code/commit/f7012aa23b38d90d1a643166e2e78f706a606a34) Thanks [@tpoisonooo](https://github.com/tpoisonooo)! - Tower mode: smaller missions, stricter completion and review checks, and review history in rework briefings. + +- [#3847](https://github.com/MoonshotAI/kimi-code/pull/3847) [`65ae3e3`](https://github.com/MoonshotAI/kimi-code/commit/65ae3e368c7cfa096242cacc12eeeb661e682977) Thanks [@tpoisonooo](https://github.com/tpoisonooo)! - Tower mode: mission titles must be ASCII, and task cards show the mission id. + +- [#3931](https://github.com/MoonshotAI/kimi-code/pull/3931) [`f17a22e`](https://github.com/MoonshotAI/kimi-code/commit/f17a22ebf4e21b8196bfaaa9a2490707676bf519) Thanks [@sailist](https://github.com/sailist)! - Turn off filesystem watchers for config and workspace files by default. Set `[watch] enabled` to `true` or `KIMI_CODE_WATCH=1` to turn them back on. + +- [#4005](https://github.com/MoonshotAI/kimi-code/pull/4005) [`ba41d07`](https://github.com/MoonshotAI/kimi-code/commit/ba41d07810cae37a9e529cad6b0f8e8abc8d7aaf) Thanks [@liruifengv](https://github.com/liruifengv)! - web: Improved interactions and fixed known bugs. + +## 2.0.2 + +### Patch Changes + +- [#3922](https://github.com/MoonshotAI/kimi-code/pull/3922) [`9df7a9c`](https://github.com/MoonshotAI/kimi-code/commit/9df7a9ccfb0d7d0713b51ae1ac165d0634fc40d2) Thanks [@sailist](https://github.com/sailist)! - Fix new messages occasionally landing at an old position in the conversation after resuming a session. + +- [#3911](https://github.com/MoonshotAI/kimi-code/pull/3911) [`88a7d93`](https://github.com/MoonshotAI/kimi-code/commit/88a7d932f1cda95c78bf5488d34ff974a160fb08) Thanks [@Grapedge](https://github.com/Grapedge)! - Fix compaction failing after switching to a model with a smaller context window. + +- [#3929](https://github.com/MoonshotAI/kimi-code/pull/3929) [`6ffdf0d`](https://github.com/MoonshotAI/kimi-code/commit/6ffdf0d579fa1a9f30c2d00c437c6c8de0c03997) Thanks [@7Hanrui](https://github.com/7Hanrui)! - The agent no longer assumes the current working directory is the project root. + +- [#3933](https://github.com/MoonshotAI/kimi-code/pull/3933) [`9721259`](https://github.com/MoonshotAI/kimi-code/commit/97212596f7d694b9683046ec7aad4d1247d29468) Thanks [@liruifengv](https://github.com/liruifengv)! - Fix a message sent while the agent was running sometimes appearing twice in the chat. + +- [#3934](https://github.com/MoonshotAI/kimi-code/pull/3934) [`2e605b1`](https://github.com/MoonshotAI/kimi-code/commit/2e605b10be906fb627c1f3aeaaa066b14ddbdbba) Thanks [@liruifengv](https://github.com/liruifengv)! - web: Improved interactions and fixed known bugs. + +## 2.0.1 + +### Patch Changes + +- [#3878](https://github.com/MoonshotAI/kimi-code/pull/3878) [`f233f9d`](https://github.com/MoonshotAI/kimi-code/commit/f233f9de04d71c42d27df870b18e1bc1a6605f16) Thanks [@7Sageer](https://github.com/7Sageer)! - Stop listing unavailable media tools in subagent menus and clarify Read errors for images and videos. + +- [#3762](https://github.com/MoonshotAI/kimi-code/pull/3762) [`c5ad17f`](https://github.com/MoonshotAI/kimi-code/commit/c5ad17f06aa12702d2b30dff63acba9ed08f688d) Thanks [@7Sageer](https://github.com/7Sageer)! - Providers can read their API key from a named environment variable (`api_key_env` in `config.toml` or the provider API). + +- [#3896](https://github.com/MoonshotAI/kimi-code/pull/3896) [`73ebe9a`](https://github.com/MoonshotAI/kimi-code/commit/73ebe9ab2fbf9bf0ffc8fe5a5375060ce8e984b5) Thanks [@sailist](https://github.com/sailist)! - Keep follow-up messages sent during a turn from appearing twice after a session reload. + +- [#3889](https://github.com/MoonshotAI/kimi-code/pull/3889) [`5108cad`](https://github.com/MoonshotAI/kimi-code/commit/5108cad9b65845ae992520dcf732cbbccc6a34b9) Thanks [@huangzheng2016](https://github.com/huangzheng2016)! - Compact the session index on startup when many entries point to deleted sessions. + +- [#3889](https://github.com/MoonshotAI/kimi-code/pull/3889) [`5108cad`](https://github.com/MoonshotAI/kimi-code/commit/5108cad9b65845ae992520dcf732cbbccc6a34b9) Thanks [@huangzheng2016](https://github.com/huangzheng2016)! - Start the CLI faster by removing a duplicate skills directory scan. + +- [#3889](https://github.com/MoonshotAI/kimi-code/pull/3889) [`5108cad`](https://github.com/MoonshotAI/kimi-code/commit/5108cad9b65845ae992520dcf732cbbccc6a34b9) Thanks [@huangzheng2016](https://github.com/huangzheng2016)! - Open the session list and resume sessions faster on workspaces with many sessions. + +- [#3889](https://github.com/MoonshotAI/kimi-code/pull/3889) [`5108cad`](https://github.com/MoonshotAI/kimi-code/commit/5108cad9b65845ae992520dcf732cbbccc6a34b9) Thanks [@huangzheng2016](https://github.com/huangzheng2016)! - Resume long sessions faster. + +- [#3889](https://github.com/MoonshotAI/kimi-code/pull/3889) [`5108cad`](https://github.com/MoonshotAI/kimi-code/commit/5108cad9b65845ae992520dcf732cbbccc6a34b9) Thanks [@huangzheng2016](https://github.com/huangzheng2016)! - Index sessions for search in capped, incremental background passes, tunable via the [database] searchSyncSessionCap and searchSyncDebounceMs settings. + +- [#3864](https://github.com/MoonshotAI/kimi-code/pull/3864) [`25dd4ce`](https://github.com/MoonshotAI/kimi-code/commit/25dd4ce97345c7ebfd9c036898e5eef955c45ea8) Thanks [@wbxl2000](https://github.com/wbxl2000)! - Rename the kimi install-app subcommand to kimi install-desktop; the old name keeps working as a hidden alias. + +- [#3910](https://github.com/MoonshotAI/kimi-code/pull/3910) [`7dc253c`](https://github.com/MoonshotAI/kimi-code/commit/7dc253c5cefac7c277e5fc7071acf3e855fd503e) Thanks [@sailist](https://github.com/sailist)! - Restore thinking display for OpenAI-compatible providers that send a reasoning string next to an unrecognized reasoning_details array. + +- [#3875](https://github.com/MoonshotAI/kimi-code/pull/3875) [`c1047a6`](https://github.com/MoonshotAI/kimi-code/commit/c1047a6bbe0e37d097e5da54d92dd3fb1b7a28da) Thanks [@7Sageer](https://github.com/7Sageer)! - Fix `kimi -p` exiting early and cancelling the active turn when a cron task fires. + +- [#3894](https://github.com/MoonshotAI/kimi-code/pull/3894) [`910aba2`](https://github.com/MoonshotAI/kimi-code/commit/910aba273e2bee3a8815666a3a9c4fff609f2366) Thanks [@7Sageer](https://github.com/7Sageer)! - Drop literal decision clauses from the system prompt and the auto permission mode reminder. + +- [#3889](https://github.com/MoonshotAI/kimi-code/pull/3889) [`5108cad`](https://github.com/MoonshotAI/kimi-code/commit/5108cad9b65845ae992520dcf732cbbccc6a34b9) Thanks [@huangzheng2016](https://github.com/huangzheng2016)! - Restore sessions with large file-edit histories faster. + +- [#3889](https://github.com/MoonshotAI/kimi-code/pull/3889) [`5108cad`](https://github.com/MoonshotAI/kimi-code/commit/5108cad9b65845ae992520dcf732cbbccc6a34b9) Thanks [@huangzheng2016](https://github.com/huangzheng2016)! - Serve session transcript APIs faster on repeated calls. + +- [#3885](https://github.com/MoonshotAI/kimi-code/pull/3885) [`5acc863`](https://github.com/MoonshotAI/kimi-code/commit/5acc863ae60c092457bd9ecdde55266b5fad7040) Thanks [@starquakee](https://github.com/starquakee)! - select_tools now points out already-available tools to call directly and suggests announced names for near-miss selections. + +- [#3887](https://github.com/MoonshotAI/kimi-code/pull/3887) [`e3f48a2`](https://github.com/MoonshotAI/kimi-code/commit/e3f48a225bbedbe167b30510e67d66ee67fcb0ec) Thanks [@RealKai42](https://github.com/RealKai42)! - Fix deleting or archiving a session sometimes never finishing. + +- [#3891](https://github.com/MoonshotAI/kimi-code/pull/3891) [`53e5e3f`](https://github.com/MoonshotAI/kimi-code/commit/53e5e3fca6bf377662bc4d61d220dde4ded8e7b7) Thanks [@sailist](https://github.com/sailist)! - Keep follow-up messages sent during a turn attached to that turn in the conversation history. + +- [#3906](https://github.com/MoonshotAI/kimi-code/pull/3906) [`60f2a63`](https://github.com/MoonshotAI/kimi-code/commit/60f2a63278f28b77d9358cf589b2da6193bd2614) Thanks [@sailist](https://github.com/sailist)! - Keep a follow-up sent during a turn as one message, and undo the host turn instead of the follow-up alone. + +- [#3879](https://github.com/MoonshotAI/kimi-code/pull/3879) [`1fddc16`](https://github.com/MoonshotAI/kimi-code/commit/1fddc16e3ea2de4c26a18acd764380adf9e2ed64) Thanks [@7Sageer](https://github.com/7Sageer)! - Remove the system-prompt rule that forbade all file access outside the working directory. + +- [#3892](https://github.com/MoonshotAI/kimi-code/pull/3892) [`a80fe31`](https://github.com/MoonshotAI/kimi-code/commit/a80fe31cff0ebae686e60d7d5d0559ad2d2e843d) Thanks [@sailist](https://github.com/sailist)! - Stop workspace file watchers from scanning an unbounded project root, and add `[watch] enabled` / `KIMI_CODE_WATCH` to disable watching entirely. + +- [#3869](https://github.com/MoonshotAI/kimi-code/pull/3869) [`86e0820`](https://github.com/MoonshotAI/kimi-code/commit/86e08208e3445171f6500c948234d7e3a0684324) Thanks [@sailist](https://github.com/sailist)! - Stop asking for approval of bash commands that cannot be statically analyzed in Ask When Needed permission mode. + ## 2.0.0 ### Major Changes diff --git a/apps/kimi-code/dist-web/assets/CodeBlockNode-BMkbTGvt.js b/apps/kimi-code/dist-web/assets/CodeBlockNode-BMkbTGvt.js deleted file mode 100644 index 302b2f7f1..000000000 --- a/apps/kimi-code/dist-web/assets/CodeBlockNode-BMkbTGvt.js +++ /dev/null @@ -1,29 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BaplSJn2.js","assets/index-DusVyqlT.js","assets/index-BxYISzcB.css"])))=>i.map(i=>d[i]); -import{bR as xi,cb as Si,bQ as Ho,M as pl,bl as Ci,af as fl,bY as Mi,cc as Bi,b$ as hl,aU as $,c0 as Ei,c1 as Fi,c2 as Pi,a0 as Mo,aD as No,bE as ue,az as Li,cd as wn,c8 as mt,aI as To,aL as Y,s as Sn,aw as Vt,au as pt,bk as J,ce as Bo,u as ie,I as Ro,A as Oi,bJ as Gt,aY as ht,bL as vl,v as w,t as we,bB as ml,bb as Be,q as b,b7 as $i,cf as zi,cg as bn,ch as Hi,ci as Ni,cj as Ti,ck as Ri,as as A,cl as Eo,cm as Di,cn as Ai,co as Wt,cp as Fo,bO as Do,T as ji,G as qi,F as Po,g as Wi,c7 as _i,b_ as Ii}from"./index-DusVyqlT.js";import{i as fe,t as kn}from"./safeRaf-DGuzXxDK.js";var xn=(k,M,y)=>new Promise((te,ne)=>{var be=P=>{try{r(y.next(P))}catch(H){ne(H)}},ke=P=>{try{r(y.throw(P))}catch(H){ne(H)}},r=P=>P.done?te(P.value):Promise.resolve(P.value).then(be,ke);r((y=y.apply(k,M)).next())});let Lo=!1,_t=null,It=null,Ut=null;function Ui(){return xn(this,null,function*(){if(Ut)return Ut;Ut=xn(null,null,function*(){if(!It)try{if(It=(function(k){const M=k;if(typeof M?.useMonaco=="function")return M;const y=k?.default;return typeof y?.useMonaco=="function"?y:null})(yield xi(()=>import("./index-BaplSJn2.js"),__vite__mapDeps([0,1,2]))),!It)return null}catch{return null}try{return yield(function(k){return xn(this,null,function*(){return Lo?void 0:_t||(_t=xn(null,null,function*(){const y=globalThis?.MonacoEnvironment;y&&(typeof y.getWorker=="function"||typeof y.getWorkerUrl=="function")||typeof k?.preloadMonacoWorkers!="function"||(yield k.preloadMonacoWorkers()),Lo=!0}).finally(()=>{_t=null}),_t)})})(It),Si(),It}catch{return null}});try{return yield Ut}finally{Ut=null}})}var Vi=Object.defineProperty,Gi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Oo=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,$o=(k,M,y)=>M in k?Vi(k,M,{enumerable:!0,configurable:!0,writable:!0,value:y}):k[M]=y,U=(k,M)=>{for(var y in M||(M={}))Yi.call(M,y)&&$o(k,y,M[y]);if(Oo)for(var y of Oo(M))Qi.call(M,y)&&$o(k,y,M[y]);return k},Me=(k,M)=>Gi(k,Ji(M)),j=(k,M,y)=>new Promise((te,ne)=>{var be=P=>{try{r(y.next(P))}catch(H){ne(H)}},ke=P=>{try{r(y.throw(P))}catch(H){ne(H)}},r=P=>P.done?te(P.value):Promise.resolve(P.value).then(be,ke);r((y=y.apply(k,M)).next())});const Xi={key:0,class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},Ki={class:"flex items-center gap-0.5"},Zi=["aria-label"],er={class:"code-diff-stat removed"},tr={class:"code-diff-stat added"},nr=["aria-label"],lr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},or={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},ir=["aria-pressed"],rr={key:3,class:"relative"},ar=["aria-expanded"],ur=["disabled"],sr=["disabled"],dr=["disabled"],cr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},fr={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},vr={class:"code-loading-placeholder"},mr={class:"sr-only","aria-live":"polite",role:"status"},pr=pl({__name:"CodeBlockShell",props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:["toggleCollapse","decreaseFont","resetFont","increaseFont","copy","toggleExpand","preview"],setup(k,{emit:M}){const y=k,te=M,ne=$(!1),be=$(null),ke=$(null);function r(){mt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",H,{once:!0,capture:!0})}function P(){mt(!0),ne.value=!1}function H(Q){var v,z;const wt=Q.target;(v=be.value)!=null&&v.contains(wt)||(z=ke.value)!=null&&z.contains(wt)?document.addEventListener("click",H,{once:!0,capture:!0}):P()}const re=b(()=>y.showFontSizeButtons&&y.enableFontSizeControl||y.showExpandButton||y.isPreviewable&&y.showPreviewButton),{t:T}=hl(),gt=b(()=>y.showTooltips!==!1);function Ge(Q,v){gt.value&&_i(Q.currentTarget,v,"top",!1,void 0,y.isDark)}function Ee(){gt.value&&mt()}function yt(Q){Ge(Q,y.copyText?T("common.copied")||"Copied":T("common.copy")||"Copy")}const gl=b(()=>{var Q,v;return!!Number.isFinite(y.codeFontSize)&&((Q=y.codeFontSize)!=null?Q:0)<=((v=y.codeFontMin)!=null?v:0)}),Jt=b(()=>!y.fontBaselineReady||y.codeFontSize===y.defaultCodeFontSize),Yt=b(()=>{var Q,v;return!!Number.isFinite(y.codeFontSize)&&((Q=y.codeFontSize)!=null?Q:0)>=((v=y.codeFontMax)!=null?v:100)});return(Q,v)=>(Y(),ie(Po,null,[y.showHeader?(Y(),ie("div",Xi,[ht(Q.$slots,"header-left"),ht(Q.$slots,"header-right",{},()=>[w("div",Ki,[k.diffStats?(Y(),ie("div",{key:0,class:"code-diff-stats","aria-label":k.diffStatsAriaLabel},[w("span",er,"-"+Be(k.diffStats.removed),1),w("span",tr,"+"+Be(k.diffStats.added),1)],8,Zi)):we("",!0),y.showCopyButton?(Y(),ie("button",{key:1,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":k.copyText?J(T)("common.copied")||"Copied":J(T)("common.copy")||"Copy",onClick:v[0]||(v[0]=z=>te("copy")),onMouseenter:v[1]||(v[1]=z=>yt(z)),onFocus:v[2]||(v[2]=z=>yt(z)),onMouseleave:Ee,onBlur:Ee},[k.copyText?(Y(),ie("svg",or,[...v[14]||(v[14]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(Y(),ie("svg",lr,[...v[13]||(v[13]=[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),w("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,nr)):we("",!0),y.showCollapseButton?(Y(),ie("button",{key:2,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-pressed":k.isCollapsed,onClick:v[3]||(v[3]=z=>te("toggleCollapse")),onMouseenter:v[4]||(v[4]=z=>Ge(z,k.isCollapsed?J(T)("common.expand")||"Expand":J(T)("common.collapse")||"Collapse")),onFocus:v[5]||(v[5]=z=>Ge(z,k.isCollapsed?J(T)("common.expand")||"Expand":J(T)("common.collapse")||"Collapse")),onMouseleave:Ee,onBlur:Ee},[(Y(),ie("svg",{style:Vt({rotate:k.isCollapsed?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...v[15]||(v[15]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,ir)):we("",!0),re.value?(Y(),ie("div",rr,[w("button",{ref_key:"moreBtnRef",ref:ke,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors","aria-expanded":ne.value,"aria-haspopup":"true",onClick:Do(r,["stop"]),onMouseenter:v[6]||(v[6]=z=>Ge(z,J(T)("common.more")||"More")),onFocus:v[7]||(v[7]=z=>Ge(z,J(T)("common.more")||"More")),onMouseleave:Ee,onBlur:Ee},[...v[16]||(v[16]=[qi('',1)])],40,ar),Ro(Wi,{name:"code-menu"},{default:Gt(()=>[ne.value?(Y(),ie("div",{key:0,ref_key:"moreMenuRef",ref:be,class:"code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]",role:"menu"},[y.showFontSizeButtons&&y.enableFontSizeControl?(Y(),ie(Po,{key:0},[w("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:gl.value,onClick:v[8]||(v[8]=z=>{J(mt)(!0),te("decreaseFont")})},[v[17]||(v[17]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),w("span",null,Be(J(T)("common.fontSmaller")||"Font size −"),1)],8,ur),w("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Jt.value,onClick:v[9]||(v[9]=z=>{J(mt)(!0),te("resetFont")})},[v[18]||(v[18]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),w("path",{d:"M3 3v5h5"})])],-1)),w("span",null,Be(J(T)("common.fontReset")||"Font size reset"),1)],8,sr),w("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Yt.value,onClick:v[10]||(v[10]=z=>{J(mt)(!0),te("increaseFont")})},[v[19]||(v[19]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),w("span",null,Be(J(T)("common.fontLarger")||"Font size +"),1)],8,dr)],64)):we("",!0),y.showExpandButton?(Y(),ie("button",{key:1,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:v[11]||(v[11]=z=>{P(),te("toggleExpand")})},[k.isExpanded?(Y(),ie("svg",cr,[...v[20]||(v[20]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(Y(),ie("svg",fr,[...v[21]||(v[21]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])),w("span",null,Be(k.isExpanded?J(T)("common.collapse")||"Collapse":J(T)("common.expand")||"Expand"),1)])):we("",!0),k.isPreviewable&&y.showPreviewButton?(Y(),ie("button",{key:2,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:v[12]||(v[12]=z=>{P(),te("preview")})},[v[22]||(v[22]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),w("circle",{cx:"12",cy:"12",r:"3"})])],-1)),w("span",null,Be(J(T)("common.preview")||"Preview"),1)])):we("",!0)],512)):we("",!0)]),_:1})])):we("",!0)])])])):we("",!0),vl(w("div",{class:pt(["code-block-shell-content",{"code-block-shell-content--collapsed":k.isCollapsed}])},[ht(Q.$slots,"default")],2),[[ml,!!k.stream||!k.loading]]),vl(w("div",vr,[ht(Q.$slots,"loading",{},()=>[v[23]||(v[23]=w("div",{class:"loading-skeleton"},[w("div",{class:"skeleton-line"}),w("div",{class:"skeleton-line"}),w("div",{class:"skeleton-line short"})],-1))])],512),[[ml,!k.stream&&k.loading]]),w("span",mr,Be(k.copyText?J(T)("common.copied")||"Copied":""),1)],64))}}),hr={class:"html-preview-frame__header"},gr={class:"html-preview-frame__title"},yr={class:"html-preview-frame__label"},wr=["sandbox","srcdoc"],br=Ho(pl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(k){const M=k,y=import.meta!==void 0&&!1;let te=null;const{t:ne}=hl(),be=b(()=>{const P=M.code||"",H=P.trim().toLowerCase();return H.startsWith(" - - - - - - - - ${P} - -`}),ke=b(()=>{return P=M.htmlPreviewSandbox,H=M.htmlPreviewAllowScripts,typeof P=="string"?((function(re){if(!y||typeof console>"u"||te===re)return;const T=(function(gt){return new Set(gt.trim().toLowerCase().split(/\s+/).filter(Boolean))})(re);T.has("allow-scripts")&&T.has("allow-same-origin")&&(te=re,console.warn("[markstream-vue] htmlPreviewSandbox contains both allow-scripts and allow-same-origin. Use this only for fully trusted content served from an isolated origin."))})(P),P):P!==void 0?"":H===!0?"allow-scripts":"";var P,H});function r(P){var H;P.key!=="Escape"&&P.key!=="Esc"||(H=M.onClose)==null||H.call(M)}return No(()=>{typeof window<"u"&&window.addEventListener("keydown",r)}),To(()=>{typeof window<"u"&&window.removeEventListener("keydown",r)}),(P,H)=>(Y(),Sn(ji,{to:"body"},[w("div",{class:pt(["markstream-vue",{dark:M.isDark}])},[w("div",{class:"html-preview-frame__backdrop",onClick:H[2]||(H[2]=re=>{var T;return(T=M.onClose)==null?void 0:T.call(M)})},[w("div",{class:"html-preview-frame",onClick:H[1]||(H[1]=Do(()=>{},["stop"]))},[w("div",hr,[w("div",gr,[H[3]||(H[3]=w("span",{class:"html-preview-frame__dot"},null,-1)),w("span",yr,Be(M.title||J(ne)("common.preview")||"Preview"),1)]),w("button",{type:"button",class:"html-preview-frame__close",onClick:H[0]||(H[0]=re=>{var T;return(T=M.onClose)==null?void 0:T.call(M)})}," × ")]),w("iframe",{class:"html-preview-frame__iframe",sandbox:ke.value,referrerpolicy:"no-referrer",srcdoc:be.value},null,8,wr)])])],2)]))}}),[["__scopeId","data-v-24e66176"]]),kr=["data-markstream-enhanced","data-markstream-enhancement-state","data-markstream-code-block-state","data-markstream-pending","data-markstream-viewport-pending"],xr={class:"code-header-main"},Sr=["innerHTML"],Cr={class:"code-header-copy"},Mr={class:"code-header-title"},Br={key:0,class:"code-header-caption"},Er=["data-markstream-host-hidden"],zo="__markstreamMonacoPassiveTouchState__",Lr=Ho(pl({__name:"CodeBlockNode",props:{node:{},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},theme:{},darkTheme:{default:"vitesse-dark"},lightTheme:{default:"vitesse-light"},isShowPreview:{type:Boolean,default:!0},monacoOptions:{},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},themes:{},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},customId:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},estimatedHeightPx:{},estimatedContentHeightPx:{},estimatedDiffInline:{type:Boolean}},emits:["previewCode","copy"],setup(k,{emit:M}){var y,te,ne,be,ke;const r=k,P=M,H=Ci(),re=fl(Mi,null),T=fl("markstreamHostScrollManaged",null),gt=fl(Bi,void 0),Ge=b(()=>Ii(r,H)),Ee=new Set;function yt(e){return j(this,null,function*(){var t;if(typeof window>"u")return yield e();const n=(t=window.Element)==null?void 0:t.prototype,l=n?.addEventListener;if(!n||!l)return yield e();const o=(function(){const s=window,u=s[zo];if(u)return u;const a={depth:0,original:null};return s[zo]=a,a})();let i=null;try{o.depth===0&&(o.original=l,n.addEventListener=function(u,a,c){var d;const f=(d=o.original)!=null?d:l;return u==="touchstart"&&(function(p,h){if(!p)return!1;const x=p;return!(typeof x.closest!="function"||!x.closest(".monaco-editor, .monaco-diff-editor")||h&&typeof h=="object"&&"passive"in h)})(this,c)?f.call(this,u,a,(function(p){return p==null?{passive:!0}:typeof p=="boolean"?{capture:p,passive:!0}:typeof p=="object"?"passive"in p?p:Me(U({},p),{passive:!0}):{passive:!0}})(c)):f.call(this,u,a,c)}),o.depth++;let s=!1;i=()=>{s||(s=!0,Ee.delete(i),o.depth=Math.max(0,o.depth-1),o.depth===0&&o.original&&n.addEventListener!==o.original&&(n.addEventListener=o.original,o.original=null))},Ee.add(i)}catch{return yield e()}try{return yield e()}finally{i?.()}})}function gl(e,t){}const Jt=Mo(),Yt=b(()=>{const e=Jt?.vnode.props;return!(!e||!e.onPreviewCode&&!e["onPreview-code"])}),{t:Q}=hl(),v=$(null),z=$(null),wt=$(!1),xe=$(ao(r.node.language,r.node.code,Ve())),Cn=b(()=>Eo(xe.value)),Fe=b(()=>Cn.value==="plaintext"?"text":Cn.value),Mn=b(()=>Cn.value==="plaintext"),Pe=$(!1),Se=$(!1),X=$(!1),Ce=$(!1),q=$(!1),bt=$(!1);let B=!1,kt=null,Ft=null,Je=null,Ye=0,Qe=!1,We="";const _e=$(null),ve=$(null);let Bn=null,En=0,Fn=!1;const Ao=Ei(),Qt=Fi(),Pn=Pi(),Ie=$i(null),Z=$(typeof window>"u"||!Pn.value),jo=(ne=(te=(y=Mo())==null?void 0:y.vnode.el)==null?void 0:te.textContent)!=null?ne:"",qo=typeof window<"u"&&String((be=r.node.code)!=null?be:"").length>0&&jo.includes(String(r.node.code)),yl=$(!qo);No(()=>{yl.value=!0}),typeof window<"u"&&ue([()=>z.value,Pn],([e,t],n,l)=>{var o,i,s;if((o=Ie.value)==null||o.destroy(),Ie.value=null,!t||Z.value)return void(Z.value=!0);if(!e)return void(Z.value=!1);let u=!0;const a=(s=(i=Qt?.value.heavyBlockMargin)!=null?i:Qt?.value.rootMargin)!=null?s:"0px",c=Ao(e,{rootMargin:a,allowIdle:!1});Ie.value=c,Z.value=Z.value||c.isVisible.value,c.whenVisible.then(()=>{u&&Ie.value===c&&(Z.value=!0)}).catch(()=>{}),l(()=>{u=!1,c.destroy(),Ie.value===c&&(Ie.value=null)})},{immediate:!0}),Li(()=>{var e;B=!0;for(const t of Array.from(Ee))t();(function(){const t=We;re&&t&&(We="",re.markSettled(t))})(),(e=Ie.value)==null||e.destroy(),Ie.value=null});let se=null,Xt=null,Ln=()=>{},Kt=()=>{},xt=()=>null,de=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),V=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),On=()=>{},Xe=()=>{},$n=()=>{},Ke=null,ze=null,Pt=null,Lt=null,wl=()=>{var e;return String((e=r.node.language)!=null?e:"plaintext")},zn=()=>j(null,null,function*(){}),Hn=!1,Zt=null;const He=[],Nn=[];let Ne=null;const m=b(()=>zi(r.node)),Ze=$({removed:0,added:0}),Wo=b(()=>`-${Ze.value.removed} +${Ze.value.added}`),bl=Object.freeze(Me(U({},Wt),{enabled:!1,revealLineCount:0}));function kl(e){var t,n,l;const o=((n=(t=z.value)==null?void 0:t.getBoundingClientRect)==null?void 0:n.call(t).width)||((l=z.value)==null?void 0:l.clientWidth)||(typeof window>"u"?0:window.innerWidth);return Di(e,o)}function Ot(e,t){return{original:en(e),updated:en(t)}}function en(e){return String(e??"").replace(/\r\n$|\n$|\r$/,"")}function $t(e){var t;return String((t=e?.message)!=null?t:e).includes("no diff result available")}function St(){if(!$e())try{const e=$n();e&&typeof e.catch=="function"&&e.catch(t=>{$t(t)})}catch(e){$t(e)}}const ae=b(()=>{var e,t,n,l;const o=r.monacoOptions?U({},r.monacoOptions):{};if(!m.value)return U({lineDecorationsWidth:0,lineNumbersMinChars:2,glyphMargin:!1},o);const i=o.diffHideUnchangedRegions===void 0?U({},Wt):bn(o.diffHideUnchangedRegions),s=o.hideUnchangedRegions===void 0?void 0:bn(o.hideUnchangedRegions),u=r.stream!==!1&&r.loading!==!1,a=u?U({},bl):i,c=u?U({},bl):s,d=(function(g){return g.diffWordWrap!==void 0?g.diffWordWrap:"off"})(o),f=U({},(e=o.experimental)!=null?e:{}),p=(t=o.diffUnchangedRegionStyle)!=null?t:"line-info",h=(function(g){const N=g.scrollbar&&typeof g.scrollbar=="object"?g.scrollbar:{};return U(Me(U({},N),{verticalScrollbarSize:0,horizontalScrollbarSize:0}),kl(g)?{horizontal:"hidden"}:{})})(o),x={maxComputationTime:0,diffAlgorithm:"legacy",ignoreTrimWhitespace:!1,renderIndicators:!0,diffUpdateThrottleMs:120,renderLineHighlight:"none",renderLineHighlightOnlyWhenFocus:!0,selectionHighlight:!1,occurrencesHighlight:"off",matchBrackets:"never",lineDecorationsWidth:4,lineNumbersMinChars:2,glyphMargin:!1,padding:{top:0,bottom:0},minimap:{enabled:!1},renderOverviewRuler:!1,overviewRulerBorder:!1,hideCursorInOverviewRuler:!0,scrollBeyondLastLine:!1,diffWordWrap:d,renderSideBySide:(n=o.renderSideBySide)==null||n,diffHideUnchangedRegions:a,useInlineViewWhenSpaceIsLimited:(l=o.useInlineViewWhenSpaceIsLimited)!=null&&l,diffLineStyle:"background",diffAppearance:"auto",diffUnchangedRegionStyle:p,diffHunkActionsOnHover:!1,experimental:f};return Me(U(Me(U(U({},x),o),{experimental:f}),c===void 0?{}:{hideUnchangedRegions:c}),{diffHideUnchangedRegions:a,diffWordWrap:d,scrollbar:h})}),Tn=b(()=>(r.theme!==void 0?!po(r.theme):ho(r.darkTheme,r.lightTheme))?(function(e){var t,n;if(e&&typeof e=="object"&&((t=e.colors)!=null&&t["editor.background"])){const o=el(e.colors["editor.background"]);if(o!=null)return o<128}const l=((n=rt(e))!=null?n:"").toLowerCase();return l?["dark","night","moon","black","dracula","mocha","frappe","macchiato","palenight","ocean","poimandres","monokai","laserwave","tokyo","slack-dark","rose-pine","github-dark","material-theme","one-dark","catppuccin-mocha","catppuccin-frappe","catppuccin-macchiato"].some(o=>l.includes(o))&&!["light","latte","dawn","lotus"].some(o=>l.includes(o)):!!r.isDark})(Dt()):!!r.isDark),Rn=b(()=>{var e;if(!m.value)return Tn.value?"dark":"light";const t=(e=ae.value)==null?void 0:e.diffAppearance;return t==="light"||t==="dark"?t:Tn.value?"dark":"light"}),xl=b(()=>m.value?Rn.value==="dark":Tn.value),zt=b(()=>m.value?"diff":"single"),Sl=$(zt.value),ge=$(!1),R=$(!1),Ht=$(!1),me=$(!1),et=$(null),Dn=$(0),Cl=$(0),tn=$(!1);let Nt=null,tt=!1,An=null,jn=!1;const qn=b(()=>{var e,t,n;if(m.value){const o=(e=ae.value)==null?void 0:e.diffWordWrap;if(o==="inherit"){const i=(t=r.monacoOptions)==null?void 0:t.wordWrap;return i==null||String(i)!=="off"}return o==="on"}const l=(n=r.monacoOptions)==null?void 0:n.wordWrap;return l==null||String(l)!=="off"}),Ue=b(()=>{var e;return!!m.value&&kl((e=ae.value)!=null?e:{})}),Wn=b(()=>{var e;const t=(e=r.monacoOptions)==null?void 0:e.diffHideUnchangedRegions;return t===void 0?U({},Wt):bn(t)});function Ml(e){return T?.value===!0||!!e&&(!!e.closest('[data-markstream-virtual-timeline="1"], .markstream-virtual-timeline')||!!e.closest(".vue-recycle-scroller, [data-virtualizer], [data-virtual-scroll-root]"))}const _o=b(()=>Ml(z.value)),Te=b(()=>!(ge.value||!me.value&&R.value)),Bl=b(()=>Te.value),Io=b(()=>Te.value&&!Ht.value),Uo=b(()=>!ge.value&&!me.value&&Te.value),Vo=b(()=>R.value&&!ge.value?"ready":me.value?"fallback":"pending"),nn=$(!1),Re=b(()=>en(r.node.code)),El=b(()=>m.value?r.node.diff===!0?r.node:Me(U({},r.node),{diff:!0}):Re.value===r.node.code?r.node:Me(U({},r.node),{code:Re.value})),pe=$(typeof((ke=r.monacoOptions)==null?void 0:ke.fontSize)=="number"?r.monacoOptions.fontSize:Number.NaN),W=$(pe.value),_n=$(null),ln=$(null),on=$(null),Go=b(()=>{const e=pe.value,t=W.value;return typeof e=="number"&&Number.isFinite(e)&&e>0&&typeof t=="number"&&Number.isFinite(t)&&t>0}),rn=b(()=>{var e;const t=_n.value;if(typeof t=="number"&&Number.isFinite(t)&&t>0)return t;const n=(e=r.monacoOptions)==null?void 0:e.fontSize;if(typeof n=="number"&&Number.isFinite(n)&&n>0)return n;const l=W.value;return typeof l=="number"&&Number.isFinite(l)&&l>0?l:12}),Jo=b(()=>{var e;const t=ln.value;if(typeof t=="number"&&Number.isFinite(t)&&t>0)return t;const n=(e=r.monacoOptions)==null?void 0:e.lineHeight;return typeof n=="number"&&Number.isFinite(n)&&n>0?n:rn.value===12?18:Math.max(12,Math.round(1.5*rn.value))}),an=b(()=>Jo.value),Fl=b(()=>{var e;const t=(e=r.monacoOptions)==null?void 0:e.tabSize;return typeof t=="number"&&Number.isFinite(t)&&t>0?t:4}),un=b(()=>{var e;const t=(e=r.monacoOptions)==null?void 0:e.padding,n=m.value?0:8;return{top:typeof t?.top=="number"&&Number.isFinite(t.top)&&t.top>=0?t.top:n,bottom:typeof t?.bottom=="number"&&Number.isFinite(t.bottom)&&t.bottom>=0?t.bottom:n}}),sn=b(()=>{const e=r.estimatedContentHeightPx;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:null});function dn(e){if(e==null)return null;const t=Math.ceil(e);return!Number.isFinite(t)||t<=0?null:Math.min(t,Math.ceil(Mt()))}function In(){return!m.value&&r.stream!==!1&&r.loading!==!1}const Pl=b(()=>m.value?null:sn.value==null||In()?Math.ceil((e=>{const t=String(e??"");return t?Math.max(1,t.split(/\r\n|\n|\r/).length):1})(Re.value)*an.value+1):null),Ll=b(()=>{if(m.value)return null;const e=sn.value;return e==null||In()?dn(Pl.value):dn(e)}),Yo=b(()=>{const e=r.estimatedHeightPx;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:null}),Un=$(null);function nt(){const e=Un.value;return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.round(e):null}const Vn=b(()=>{const e=nt();return e??(!m.value&&tn.value?null:Te.value||!R.value?Ll.value:null)});function Ol(e){const t=e?"hsl(152 42% 60%)":"var(--diff-added-fg)",n=e?"hsl(0 58% 58%)":"var(--diff-removed-fg)",l=e?"hsl(152 42% 60% / 0.18)":"var(--diff-added-bg)",o=e?"hsl(0 58% 58% / 0.18)":"var(--diff-removed-bg)",i=e?"hsl(152 42% 60% / 0.28)":"var(--diff-added-inline-bg)",s=e?"hsl(0 58% 58% / 0.28)":"var(--diff-removed-inline-bg)",u=`linear-gradient(90deg, ${t} 0 4px, transparent 4px 100%)`,a=`linear-gradient(90deg, ${n} 0 4px, transparent 4px 100%)`,c=e?"hsl(0 0% 7% / 0.98)":"hsl(var(--ms-muted) / 0.45)",d="var(--markstream-code-layout-character-width, 1ch)",f=`calc(${d} + ${d})`,p=`calc(${d} + ${d} + ${d} + ${d} + ${d} + 2px)`,h=`calc(${p} + ${d})`;return{"--markstream-diff-line-number-bg":c,"--markstream-diff-added-fg":t,"--markstream-diff-removed-fg":n,"--markstream-diff-added-line":l,"--markstream-diff-removed-line":o,"--markstream-diff-added-line-fill":l,"--markstream-diff-removed-line-fill":o,"--markstream-diff-added-gutter":u,"--markstream-diff-removed-gutter":a,"--markstream-diff-added-inline":i,"--markstream-diff-removed-inline":s,"--stream-monaco-added-fg":t,"--stream-monaco-removed-fg":n,"--stream-monaco-added-line":l,"--stream-monaco-removed-line":o,"--stream-monaco-added-line-fill":l,"--stream-monaco-removed-line-fill":o,"--stream-monaco-added-gutter":u,"--stream-monaco-removed-gutter":a,"--stream-monaco-added-inline":i,"--stream-monaco-removed-inline":s,"--stream-monaco-gutter-marker-width":"4px","--stream-monaco-gutter-gap":"1ch","--stream-monaco-line-number-left":"0px","--stream-monaco-line-number-width":f,"--stream-monaco-line-number-padding-left":f,"--stream-monaco-line-number-padding-right":d,"--stream-monaco-line-number-separator-width":"2px","--stream-monaco-layout-character-width":d,"--stream-monaco-line-number-box-width":p,"--stream-monaco-line-number-gap-to-code":d,"--stream-monaco-line-number-bg":c,"--stream-monaco-diff-code-gap":d,"--stream-monaco-diff-code-padding":"0px","--stream-monaco-original-margin-width":h,"--stream-monaco-original-scrollable-left":h,"--stream-monaco-original-scrollable-width":`calc(100% - ${h})`,"--stream-monaco-modified-margin-width":h,"--stream-monaco-modified-scrollable-left":h,"--stream-monaco-modified-scrollable-width":`calc(100% - ${h})`}}const $l=b(()=>{var e;const t=(e=r.monacoOptions)==null?void 0:e.fontFamily,n=dn(sn.value),l=dn(Pl.value),o=In(),i=U(U({fontSize:`${rn.value}px`,lineHeight:`${an.value}px`,tabSize:Fl.value,boxSizing:"border-box",maxHeight:`${Mt()}px`,overflow:"auto",paddingTop:`${un.value.top}px`,paddingBottom:`${un.value.bottom}px`},m.value||n==null||o?m.value||l==null?{}:{minHeight:`${l}px`}:{height:`${n}px`,minHeight:`${n}px`}),typeof t=="string"&&t.trim()?{"--markstream-code-font-family":t.trim()}:{});return i["--markstream-pre-line-number-top"]=`${un.value.top}px`,i["--markstream-pre-line-number-left"]="0px",i["--markstream-pre-line-number-padding-left"]="2ch",i["--markstream-pre-line-number-padding-right"]="1ch",i["--markstream-pre-line-number-separator-width"]="2px",m.value&&(i["--markstream-pre-diff-line-height"]=`${an.value}px`,i["--markstream-pre-diff-pane-bottom-padding"]=(Ue.value,"0px"),Object.assign(i,Ol(xl.value))),i}),zl=b(()=>Vn.value!=null&&(!R.value||nt()!=null)),Qo=b(()=>{const e=Vn.value;if(e==null)return null;if(m.value)return Math.ceil(e);const t=Yo.value,n=sn.value;if(t==null||n==null)return Math.ceil(e);const l=Math.max(0,Math.ceil(t)-Math.ceil(n));return Math.ceil(e+l)}),Xo=b(()=>{if(m.value&&Te.value)return{};const e=Vn.value;return zl.value&&e!=null?{minHeight:`${e}px`}:{}});function Hl(){var e,t,n,l,o,i,s,u;const a=(e=z.value)==null?void 0:e.querySelector("pre.code-pre-fallback"),c=V(),d=(t=a?.scrollTop)!=null?t:0;(o=(l=(n=c?.getOriginalEditor)==null?void 0:n.call(c))==null?void 0:l.setScrollTop)==null||o.call(l,d),(u=(s=(i=c?.getModifiedEditor)==null?void 0:i.call(c))==null?void 0:s.setScrollTop)==null||u.call(s,d)}function Nl(){return j(this,null,function*(){return m.value?(tl()!=null||cn(),ee(!0),Hl(),he(),Ht.value=!0,yield A(),ee(!0),yield Le(),ee(!0),!(Ke&&!(yield Ke())||(Rt(),cn(),ee(!0),R.value=!0,yield A(),cn(),ee(!0),Rt(),he(),ce(),0))):!(Ke&&!(yield Ke())||(R.value=!0,yield A(),le(!1),ee(),0))})}function cn(){const e=v.value;return e&&mn(e)?(he(),le({preferModelDiffHeight:!0}),it(),Number.parseFloat(e.style.height||"")||null):tl()}function Tl(){if(!m.value||!q.value||!R.value||Te.value)return!1;const e=v.value;return!!e&&Tt(e)}function Rl(e,t=!1,n={}){const l=Math.ceil(e),o=nt();if(o==null)return l;const i=n.allowBelowEstimatedFloor===!0||Tl();return l>=o||i?((t||i)&&q.value&&(Un.value=null),l):o}function Le(){return new Promise(e=>{let t=!1,n=null,l=null;const o=()=>{t||(t=!0,l!=null&&globalThis.clearTimeout(l),n!=null&&kn(n),e())};l=globalThis.setTimeout(o,50),n=fe(o)})}function Dl(){try{const e=v.value;if(!e)return null;const t=e.querySelector(".view-lines .view-line");if(t){const n=Math.ceil(t.getBoundingClientRect().height);if(n>0)return n}}catch{}return null}function Gn(){var e,t,n,l,o;try{const i=m.value?(n=(t=(e=V())==null?void 0:e.getModifiedEditor)==null?void 0:t.call(e))!=null?n:V():de(),s=xt(),u=(l=s?.EditorOption)==null?void 0:l.fontInfo;if(i&&u!=null){const a=(o=i.getOption)==null?void 0:o.call(i,u),c=a?.fontSize;if(typeof c=="number"&&Number.isFinite(c)&&c>0)return c}}catch{}try{const i=v.value;if(i){const s=i.querySelector(".view-lines .view-line");if(s)try{if(typeof window<"u"&&typeof window.getComputedStyle=="function"){const u=window.getComputedStyle(s).fontSize,a=u&&u.match(/^(\d+(?:\.\d+)?)/);if(a)return Number.parseFloat(a[1])}}catch{}}}catch{}return null}function Ct(e){var t,n;try{const i=xt(),s=(t=i?.EditorOption)==null?void 0:t.lineHeight;if(s!=null){const u=(n=e?.getOption)==null?void 0:n.call(e,s);if(typeof u=="number"&&u>0)return u}}catch{}const l=Dl();if(l&&l>0)return l;const o=Number.isFinite(W.value)&&W.value>0?W.value:14;return Math.max(12,Math.round(1.35*o))}function fn(e){var t,n,l;try{const i=xt(),s=(t=i?.EditorOption)==null?void 0:t.padding;if(s!=null){const u=(n=e?.getOption)==null?void 0:n.call(e,s);if(typeof u?.top=="number"||typeof u?.bottom=="number")return(typeof u?.top=="number"&&Number.isFinite(u.top)?Math.max(0,u.top):0)+(typeof u?.bottom=="number"&&Number.isFinite(u.bottom)?Math.max(0,u.bottom):0)}}catch{}const o=(l=ae.value)==null?void 0:l.padding;return typeof o?.top=="number"||typeof o?.bottom=="number"?(typeof o?.top=="number"&&Number.isFinite(o.top)?Math.max(0,o.top):0)+(typeof o?.bottom=="number"&&Number.isFinite(o.bottom)?Math.max(0,o.bottom):0):m.value?24:0}function Al(e,t){return typeof e!="number"||typeof t!="number"||e<1||t=o&&s>=o&&n[i]===l[s];)i--,s--;const u=Math.max(0,i-o+1),a=Math.max(0,s-o+1);if(u===0||a===0)return{removed:u,added:a};if((u+1)*(a+1)<=15e5){const c=a+1;let d=new Uint32Array(c),f=new Uint32Array(c);for(let h=u-1;h>=0;h--){f[a]=0;for(let g=a-1;g>=0;g--)f[g]=n[o+h]===l[o+g]?d[g+1]+1:Math.max(d[g],f[g+1]);const x=d;d=f,f=x}const p=d[0];return{removed:u-p,added:a-p}}return{removed:u,added:a}}function ql(e){var t;if(!(function(){var s,u,a;return!(!m.value||!Ue.value)&&(r.node.originalCode!=null||r.node.updatedCode!=null?vn(String((s=r.node.originalCode)!=null?s:""),String((u=r.node.updatedCode)!=null?u:"")).removed>0:String((a=r.node.code)!=null?a:"").split(/\r\n|\n|\r/).some(c=>(function(d){return d.startsWith("-")&&!d.startsWith("---")})(c)))})())return!0;const n=e?.querySelector(".stream-monaco-fallback-inline-delete-line");if((t=n?.textContent)!=null&&t.trim()&&(n.hasAttribute("data-stream-monaco-colorize-signature")||n.querySelector('[class*="mtk"]')))return!0;const l=e?.querySelector([".editor.modified .view-zones .view-lines.line-delete",".editor.modified .view-lines .view-line.line-delete",".editor.original .view-zones .view-lines.line-delete",".editor.original .view-lines .view-line.line-delete"].join(","));if(!l||!l.matches(".view-line")&&!l.querySelector(".view-line"))return!1;const o=l.getBoundingClientRect(),i=e?.getBoundingClientRect();return i?.width===0&&i.height===0||o.width>0&&o.height>0}function Wl(e,t){if(!e)return!1;const n=t.added<=0||!!e.querySelector([".line-insert",".gutter-insert",".stream-monaco-fallback-line-insert",".stream-monaco-fallback-gutter-insert",".stream-monaco-fallback-line-number-insert"].join(",")),l=t.removed<=0||!!e.querySelector([".line-delete",".gutter-delete",".inline-deleted-margin-view-zone",".stream-monaco-fallback-line-delete",".stream-monaco-fallback-gutter-delete",".stream-monaco-fallback-line-number-delete",".stream-monaco-fallback-inline-delete-line",".stream-monaco-fallback-inline-delete-margin"].join(","));return n&&l}function Jn(e,t){const n=e?.querySelector(t);return n instanceof HTMLElement?typeof window>"u"||typeof window.getComputedStyle!="function"?n:window.getComputedStyle(n).display==="none"?null:n:null}function _l(e,t){return Jn(e,t)!==null}function Il(e,t){if(!e)return!1;const n=t.added<=0||[".gutter-insert",".stream-monaco-fallback-gutter-insert"].some(o=>_l(e,o)),l=t.removed<=0||[".gutter-delete",".inline-deleted-margin-view-zone",".stream-monaco-fallback-gutter-delete",".stream-monaco-fallback-inline-delete-margin"].some(o=>_l(e,o));return n&&l}function Ul(e){var t;const n=Array.from((t=e?.querySelectorAll(".monaco-diff-editor .margin-view-overlays .line-numbers"))!=null?t:[]);return!!n.length&&n.some(l=>{var o;if(!((o=l.textContent)!=null&&o.trim()))return!1;if(typeof window>"u"||typeof window.getComputedStyle!="function")return!0;const i=window.getComputedStyle(l);if(i.display==="none")return!1;const s=l.getBoundingClientRect();if(s.width<=0&&s.height<=0)return!0;const u=Number.parseFloat(i.width||""),a=Number.parseFloat(i.paddingLeft||""),c=Number.parseFloat(i.paddingRight||""),d=Math.max(s.width,Number.isFinite(u)?u:0)>=8,f=Number.isFinite(a)&&a>=1&&Number.isFinite(c)&&c>=1;return d&&f})}function Vl(e){const t=Jn(e,".monaco-diff-editor .view-lines .view-line");if(!t)return!1;if(!Qn())return!0;const n=Jn(e,".monaco-diff-editor .margin-view-overlays .line-numbers");if(!n)return!1;if(typeof window>"u"||typeof window.getComputedStyle!="function")return!0;const l=t.getBoundingClientRect(),o=n.getBoundingClientRect();if(l.width<=0&&l.height<=0||o.width<=0&&o.height<=0)return!0;const i=l.left-o.right;return i>=0&&i<=32}function Ko(e,t){return!Ue.value||!(t||e?.querySelector([".line-insert",".line-delete",".gutter-insert",".gutter-delete",".stream-monaco-line-number-insert",".stream-monaco-line-number-delete",".stream-monaco-line-insert-fill",".stream-monaco-line-delete-fill",".stream-monaco-fallback-line-insert",".stream-monaco-fallback-line-delete",".stream-monaco-fallback-inline-delete-line"].join(",")))||!!(e?.classList.contains("stream-monaco-diff-inline-native-ready")&&!e.classList.contains("stream-monaco-diff-native-stale"))}function Gl(e,t,n,l){const o=e?.querySelector(`.monaco-diff-editor .editor.${t}`);if(!o)return!1;const i=Array.from(o.querySelectorAll(`.margin-view-overlays .line-numbers.${n}`));if(!i.length)return!0;const s=Array.from(o.querySelectorAll(".lines-content > .view-lines:not(.line-delete) > .view-line"));return!!s.length&&i.every(u=>{const a=u.getBoundingClientRect();let c=null;for(const d of s){const f=d.getBoundingClientRect(),p=Math.abs(f.top-a.top);(!c||p1.25||c.node.classList.contains(l)})}function Zo(e,t){if(!e)return!1;const n=t.added<=0||Gl(e,"modified","stream-monaco-line-number-insert","stream-monaco-line-insert-fill"),l=t.removed<=0||(Ue.value?!!e.classList.contains("stream-monaco-diff-inline-native-ready"):Gl(e,"original","stream-monaco-line-number-delete","stream-monaco-line-delete-fill"));return n&&l}function Yn(e){if(Mn.value)return!0;if(!e)return!1;const t=Array.from(e.querySelectorAll(".monaco-diff-editor .view-lines .view-line, .monaco-editor .view-lines .view-line")).filter(l=>{var o;if(!((o=l.textContent)!=null&&o.trim()))return!1;const i=l.getBoundingClientRect();return i.width>0||i.height>0});if(!t.length)return!1;const n=t.filter(l=>{var o,i;return i=(o=l.textContent)!=null?o:"",/['"`{}()[\]:;=<>.,]|\/\/|\/\*|\b(?:async|await|class|const|enum|export|for|function|if|import|interface|let|return|switch|type|var|while)\b/.test(i.replace(/\u00A0/g," ").trim())});return!n.length||n.filter(l=>Array.from(l.querySelectorAll("span")).filter(o=>{var i;return(i=o.textContent)==null?void 0:i.trim()}).some(o=>String(o.className||"").split(/\s+/).some(i=>/^mtk\d+$/.test(i)&&i!=="mtk1"))).length>0}function Qn(){const e=ae.value;return e?.lineNumbers!=="off"}function Xn(){var e,t;m.value?Ze.value=vn(String((e=r.node.originalCode)!=null?e:""),String((t=r.node.updatedCode)!=null?t:"")):Ze.value={removed:0,added:0}}function lt(){var e;if(m.value)try{const t=V(),n=(e=t?.getLineChanges)==null?void 0:e.call(t);if(!Array.isArray(n))return void Xn();let l=0,o=0;for(const i of n)l+=Al(i.originalStartLineNumber,i.originalEndLineNumber),o+=Al(i.modifiedStartLineNumber,i.modifiedEndLineNumber);Ze.value={removed:l,added:o}}catch{Xn()}else Ze.value={removed:0,added:0}}function Kn(){var e;if(Number.isFinite(W.value)&&W.value>0&&Number.isFinite(pe.value))return W.value;const t=Gn();return typeof((e=r.monacoOptions)==null?void 0:e.fontSize)=="number"?(pe.value=r.monacoOptions.fontSize,W.value=r.monacoOptions.fontSize,W.value):t&&t>0?(pe.value=t,W.value=t,t):(pe.value=12,W.value=12,12)}function ei(){const e=Kn(),t=Math.min(36,e+1);W.value=t}function ti(){const e=Kn(),t=Math.max(10,e-1);W.value=t}function ni(){Kn(),Number.isFinite(pe.value)&&(W.value=pe.value)}function Jl(){var e,t,n,l,o,i,s,u,a,c,d,f,p,h;try{const x=m.value?V():null,g=m.value?x:de();if(!g)return null;if(x?.getOriginalEditor&&x?.getModifiedEditor){const F=(e=x.getOriginalEditor)==null?void 0:e.call(x),S=(t=x.getModifiedEditor)==null?void 0:t.call(x);(n=F?.layout)==null||n.call(F),(l=S?.layout)==null||l.call(S);const D=((o=F?.getContentHeight)==null?void 0:o.call(F))||0,C=((i=S?.getContentHeight)==null?void 0:i.call(S))||0,L=Math.max(D,C);if(L>0)return Math.ceil(L);const K=((a=(u=(s=F?.getModel)==null?void 0:s.call(F))==null?void 0:u.getLineCount)==null?void 0:a.call(u))||1,_=((f=(d=(c=S?.getModel)==null?void 0:c.call(S))==null?void 0:d.getLineCount)==null?void 0:f.call(d))||1,O=Math.max(K,_),I=Math.max(Ct(F),Ct(S)),G=Math.max(fn(F),fn(S));return Math.ceil(O*I+G+0)}if(g?.getContentHeight){(p=g?.layout)==null||p.call(g);const F=g.getContentHeight();if(F>0)return m.value||(tn.value=!0),Math.ceil(F)}const N=(h=g?.getModel)==null?void 0:h.call(g);let oe=1;N&&typeof N.getLineCount=="function"&&(oe=N.getLineCount());const E=Ct(g);return Math.ceil(oe*(E+1.5)+0)}catch{return null}}function Yl(){var e,t;if(m.value)return!1;try{const n=(t=(e=de())==null?void 0:e.getContentHeight)==null?void 0:t.call(e),l=typeof n=="number"&&Number.isFinite(n)&&n>0;return l&&(tn.value=!0),l}catch{return!1}}function Zn(e){var t,n,l;if(typeof window>"u")return null;try{const o=e.getBoundingClientRect(),i=window.getComputedStyle(e);if(i.display==="none"||i.visibility==="hidden")return null;const s=e.querySelector("diffs-container");if(s instanceof HTMLElement){const c=s.getBoundingClientRect();if(c.height>0&&c.bottom>o.top)return Math.ceil(c.bottom-o.top)}const u=[".editor.original .view-lines .view-line",".editor.modified .view-lines .view-line",".editor.original .view-zones > div",".editor.modified .view-zones > div",".editor.original .margin-view-zones > div",".editor.modified .margin-view-zones > div",".editor.original .diff-hidden-lines",".editor.modified .diff-hidden-lines",".stream-monaco-diff-unchanged-bridge"];let a=0;for(const c of Array.from(e.querySelectorAll(u.join(",")))){if(!(c instanceof HTMLElement)||((t=c.parentElement)!=null&&t.classList.contains("view-zones")||(n=c.parentElement)!=null&&n.classList.contains("margin-view-zones"))&&!((l=c.textContent)!=null&&l.trim()||c.matches(".line-delete, .line-insert, .cdr")||c.querySelector(".diff-hidden-lines, .stream-monaco-diff-unchanged-bridge, .line-delete, .line-insert, .cdr")))continue;const d=window.getComputedStyle(c);if(d.display==="none"||d.visibility==="hidden"||Number.parseFloat(d.opacity||"1")<=.01)continue;const f=c.getBoundingClientRect();f.height<=0||f.bottom<=o.top||(a=Math.max(a,f.bottom-o.top))}return a>0?Math.ceil(a):null}catch{return null}}function Tt(e){if(typeof window>"u")return!1;const t=e.getBoundingClientRect();if(t.width<=0||t.height<=0)return!1;const n=e.querySelectorAll(".editor.modified .diff-hidden-lines, .editor.original .diff-hidden-lines, .stream-monaco-diff-unchanged-bridge");for(const l of Array.from(n)){if(!(l instanceof HTMLElement))continue;const o=window.getComputedStyle(l);if(o.display==="none"||o.visibility==="hidden"||Number.parseFloat(o.opacity||"1")<=.01)continue;const i=l.getBoundingClientRect();if(!(i.width<=0||i.height<=0||i.bottom<=t.top||i.top>=t.bottom))return!0}return!1}function el(e){var t;const n=String(e??"").trim(),l=(t=n.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i))==null?void 0:t[1];if(l){const a=l.length===3?l.split("").map(c=>`${c}${c}`).join(""):l;return .2126*Number.parseInt(a.slice(0,2),16)+.7152*Number.parseInt(a.slice(2,4),16)+.0722*Number.parseInt(a.slice(4,6),16)}const o=n.match(/\d+(?:\.\d+)?/g);if(!o||o.length<3)return null;const[i,s,u]=o.slice(0,3).map(Number);return .2126*i+.7152*s+.0722*u}function Rt(){var e,t,n;if(Ql())return;const l=Gn();l&&l>0&&(_n.value=l,W.value=l,pe.value=l);try{const o=Ct(m.value?(n=(t=(e=V())==null?void 0:e.getModifiedEditor)==null?void 0:t.call(e))!=null?n:V():de());o&&o>0&&(ln.value=o)}catch{}try{const o=Dl();o&&o>0&&(ln.value=o)}catch{}}function Ql(){return m.value&&Bl.value}function tl(){var e;if(!m.value||!Te.value)return null;const t=v.value,n=(e=z.value)==null?void 0:e.querySelector("pre.code-pre-fallback");if(!t||!n)return null;const l=Math.ceil(n.getBoundingClientRect().height);return!Number.isFinite(l)||l<=0?null:(t.style.height=`${l}px`,t.style.minHeight=`${l}px`,t.style.maxHeight=`${Math.ceil(Mt())}px`,t.style.overflow="hidden",l)}function nl(){var e,t,n,l,o,i,s,u,a;const c=v.value,d=z.value;if(!c||!d)return;const f=c;f.style.setProperty("--diffs-tab-size",String(Fl.value));const p=(e=r.monacoOptions)==null?void 0:e.padding;p&&typeof p=="object"?f.style.setProperty("--diffs-gap-block",`${un.value.top}px`):f.style.removeProperty("--diffs-gap-block");const h=c.querySelector(".monaco-editor")||c,x=h.querySelector(".monaco-editor-background")||h,g=h.querySelector(".view-lines")||h;let N=null,oe=null,E=null;try{typeof window<"u"&&typeof window.getComputedStyle=="function"&&(N=window.getComputedStyle(h),oe=x===h?N:window.getComputedStyle(x),E=g===h?N:window.getComputedStyle(g))}catch{N=null,oe=null,E=null}const F=String((t=N?.getPropertyValue("--vscode-editor-foreground"))!=null?t:"").trim(),S=String((n=N?.getPropertyValue("--vscode-editor-background"))!=null?n:"").trim(),D=String((o=(l=N?.getPropertyValue("--vscode-editor-selectionBackground"))!=null?l:N?.getPropertyValue("--vscode-editor-hoverHighlightBackground"))!=null?o:"").trim(),C=F||String((s=(i=E?.color)!=null?i:N?.color)!=null?s:"").trim(),L=S||String((a=(u=oe?.backgroundColor)!=null?u:N?.backgroundColor)!=null?a:"").trim(),K=(function(){var _,O,I,G,ye;try{const st=m.value?(I=(O=(_=V())==null?void 0:_.getModifiedEditor)==null?void 0:O.call(_))!=null?I:V():de(),jt=xt(),Et=(G=jt?.EditorOption)==null?void 0:G.fontInfo;if(st&&Et!=null){const qt=(ye=st.getOption)==null?void 0:ye.call(st,Et),dt=qt?.typicalHalfwidthCharacterWidth;if(typeof dt=="number"&&Number.isFinite(dt)&&dt>0)return dt}}catch{}return null})();if(K!=null&&(on.value=K),m.value){const _=(O,I)=>{I?(d.style.setProperty(O,I),f.style.setProperty(O,I)):(d.style.removeProperty(O),f.style.removeProperty(O))};for(const[O,I]of Object.entries(Ol(d.classList.contains("is-dark"))))_(O,I);return C?(d.style.setProperty("--markstream-diff-editor-fg",C),f.style.setProperty("--vscode-editor-foreground",C),f.style.setProperty("--stream-monaco-editor-fg",C)):(d.style.removeProperty("--markstream-diff-editor-fg"),f.style.removeProperty("--vscode-editor-foreground"),f.style.removeProperty("--stream-monaco-editor-fg")),L?(d.style.setProperty("--markstream-diff-editor-bg",L),d.style.setProperty("--markstream-diff-panel-bg",L),d.style.setProperty("--markstream-diff-panel-bg-soft",L),d.style.setProperty("--markstream-diff-panel-bg-strong",L),f.style.setProperty("--vscode-editor-background",L),f.style.setProperty("--stream-monaco-editor-bg",L),f.style.setProperty("--stream-monaco-fixed-editor-bg",L),f.style.setProperty("--stream-monaco-panel-bg",L),f.style.setProperty("--stream-monaco-panel-bg-soft",L),f.style.setProperty("--stream-monaco-panel-bg-strong",L),f.style.backgroundColor=L):(d.style.removeProperty("--markstream-diff-editor-bg"),d.style.removeProperty("--markstream-diff-panel-bg"),d.style.removeProperty("--markstream-diff-panel-bg-soft"),d.style.removeProperty("--markstream-diff-panel-bg-strong"),f.style.removeProperty("--vscode-editor-background"),f.style.removeProperty("--stream-monaco-editor-bg"),f.style.removeProperty("--stream-monaco-fixed-editor-bg"),f.style.removeProperty("--stream-monaco-panel-bg"),f.style.removeProperty("--stream-monaco-panel-bg-soft"),f.style.removeProperty("--stream-monaco-panel-bg-strong"),f.style.backgroundColor=""),void(D?f.style.setProperty("--vscode-editor-selectionBackground",D):f.style.removeProperty("--vscode-editor-selectionBackground"))}if((function(_,O,I){if(!Mn.value)return!1;const G=el(_),ye=el(O);return I?G!=null&&G>170||ye!=null&&ye<110:G!=null&&G<85||ye!=null&&ye>190})(L,C,d.classList.contains("is-dark")))return f.style.removeProperty("--vscode-editor-foreground"),f.style.removeProperty("--vscode-editor-background"),void f.style.removeProperty("--vscode-editor-selectionBackground");C&&f.style.setProperty("--vscode-editor-foreground",C),L&&f.style.setProperty("--vscode-editor-background",L),D&&f.style.setProperty("--vscode-editor-selectionBackground",D)}let ll=0,ol=0;const Xl=/auto|scroll|overlay/i;function Oe(e,t,n){var l;if(typeof window>"u"||m.value||(function(d){return _o.value||Ml(d)})(e))return;const o=Math.ceil(t),i=Math.ceil(n)-o;if(Math.abs(i)<=1)return;const s=(function(d){var f,p;if(typeof window>"u")return null;const h=(f=d?.ownerDocument)!=null?f:document,x=h.scrollingElement||h.documentElement||h.body;let g=(p=d?.parentElement)!=null?p:null;for(;g&&g!==h.body&&g!==x;){const N=window.getComputedStyle(g),oe=(N.overflowY||"").toLowerCase(),E=(N.overflow||"").toLowerCase();if(Xl.test(oe)||Xl.test(E))return g;g=g.parentElement}return x})(e);if(!s)return;const u=(l=e.ownerDocument)!=null?l:document,a=s===u.body||s===u.documentElement||s===u.scrollingElement,c=a?0:s.getBoundingClientRect().top;e.getBoundingClientRect().top-c>=0||(a&&typeof window.scrollBy=="function"?window.scrollBy(0,i):s.scrollTop+=i)}function il(){try{const e=v.value;if(!e)return;const t=e.getBoundingClientRect().height,n=Jl();if(n!=null&&n>0){const o=Rl(n,!0,{allowBelowEstimatedFloor:!m.value&&q.value&&Yl()}),i=nt();return e.style.minHeight=i!=null?`${i}px`:"0px",e.style.height=`${o}px`,e.style.maxHeight="none",e.style.overflow="visible",void Oe(e,t,o)}const l=nt();l!=null&&(e.style.minHeight=`${l}px`,e.style.height=`${l}px`,e.style.maxHeight="none",e.style.overflow="visible",Oe(e,t,l))}catch{}}function ot(){for(var e,t;He.length>0;)try{(t=(e=He.pop())==null?void 0:e.dispose)==null||t.call(e)}catch{}kt!=null&&(kn(kt),kt=null),Ft!=null&&(kn(Ft),Ft=null),Je!=null&&(kn(Je),Je=null),Ye=0,Qe=!1}function De(){for(var e;Nn.length>0;)try{(e=Nn.pop())==null||e()}catch{}}function le(e=!1){Se.value||(Pe.value?il():(function(t={}){var n,l,o;try{const i=v.value;if(!i)return;const s=i.getBoundingClientRect().height,u=Mt(),a=Math.ceil(((n=i.getBoundingClientRect)==null?void 0:n.call(i).height)||0),c=Number.parseFloat(i.style.height||""),d=a>0?a:Number.isFinite(c)&&c>0?Math.ceil(c):0,f=m.value?(function(){var O,I,G,ye,st,jt,Et,qt,dt,xo,So,Co;if($e())return null;try{const ct=V(),ft=(O=ct?.getOriginalEditor)==null?void 0:O.call(ct),vt=(I=ct?.getModifiedEditor)==null?void 0:I.call(ct);if(!ft||!vt)return null;const hi=((st=(ye=(G=ft.getModel)==null?void 0:G.call(ft))==null?void 0:ye.getLineCount)==null?void 0:st.call(ye))||1,gi=((qt=(Et=(jt=vt.getModel)==null?void 0:jt.call(vt))==null?void 0:Et.getLineCount)==null?void 0:qt.call(Et))||1,yi=Math.max(hi,gi),wi=Math.max(Ct(ft),Ct(vt)),bi=Math.max(fn(ft),fn(vt)),ki=Math.max((xo=(dt=ft.getContentHeight)==null?void 0:dt.call(ft))!=null?xo:0,(Co=(So=vt.getContentHeight)==null?void 0:So.call(vt))!=null?Co:0);return Math.ceil(Math.max(ki,yi*wi+bi+0))}catch{return null}})():null,p=m.value&&Tt(i),h=m.value&&mn(i),x=m.value&&i.classList.contains("stream-monaco-diff-native-stale"),g=p&&q.value&&R.value&&!Te.value;if(p||(ve.value=null),En>0&&(En--,_e.value!=null))return void Oe(i,s,Ae(i,_e.value,u,{allowBelowEstimatedFloor:g,preserveScrollableOverflow:rl(i)}));if(m.value&&!h&&!p&&Te.value){const O=tl();if(O!=null){const I=Ae(i,O,u,{allowBelowEstimatedFloor:!0});return ee(!0),void Oe(i,s,I)}}const N=m.value&&t.preferModelDiffHeight===!0,oe=m.value?Zn(i):null,E=oe,F=!m.value&&q.value&&Yl(),S=m.value&&r.loading!==!1&&(E!=null||f!=null&&a>0&&f0&&f0&&f0?d:null:f;else C=Jl();if(m.value&&r.loading===!1&&x&&!g&&C!=null&&f!=null&&(C=Math.min(C,f)),m.value&&C!=null&&d>0&&(r.loading!==!1||r.loading===!1&&x&&!g||t.holdCurrentDiffHeight===!0&&!g)&&(C=Math.max(C,d)),C!=null&&C>0){const O=p&&ve.value!=null,I=p&&a>0&&a=u-1,G=Ae(i,O?Math.max(ve.value,C):I?a:C,u,{clearEstimatedFloor:!0,allowBelowEstimatedFloor:g||F||S,preserveScrollableOverflow:rl(i)});return p&&G0?f:0);if(L>0){const O=p&&ve.value!=null,I=p&&a>0&&a=u-1,G=Ae(i,O?Math.max(ve.value,L):I?a:L,u,{allowBelowEstimatedFloor:g});return p&&G0?Oe(i,s,Ae(i,_,u,{allowBelowEstimatedFloor:g})):m.value||Oe(i,s,Ae(i,u,u))}catch{}})(typeof e=="object"?e:{}))}function Kl(){ll=0,ol=0}function ee(e=!1){var t,n,l;if(Se.value)return;const o=v.value;if(!o)return;const i=m.value?V():de();if(i&&typeof i.layout=="function")try{const s=(t=o.getBoundingClientRect)==null?void 0:t.call(o),u=Math.ceil(((n=s?.width)!=null?n:0)||o.clientWidth||0),a=Math.ceil(((l=s?.height)!=null?l:0)||o.clientHeight||Number.parseFloat(o.style.height||"")||0);if(u>0&&a>0){if(!e&&u===ll&&a===ol)return;ll=u,ol=a,i.layout({width:u,height:a})}else Kl(),i.layout()}catch{}}function he(){if(!m.value)return void De();const e=v.value;if(!e)return void De();const t=e.querySelector(".monaco-diff-editor");if(!t||t.classList.contains("side-by-side"))return void De();const n=Array.from(t.querySelectorAll(".editor.original .diff-hidden-lines")),l=Array.from(t.querySelectorAll(".editor.modified .diff-hidden-lines")),o=Math.min(n.length,l.length);for(let i=0;i div:first-child"),c=s.querySelector(".center");if(!u||!a||!c||c.querySelector(".markstream-inline-fold-proxy"))continue;const d=document.createElement("button");d.type="button",d.className="markstream-inline-fold-proxy",d.dataset.markstreamInlineFoldProxy="true";const f=u.getAttribute("title")||"Show Unchanged Region";d.title=f,d.setAttribute("aria-label",f);const p=g=>{g.preventDefault(),g.stopPropagation()},h=g=>{g.preventDefault(),g.stopPropagation(),u.click(),fe(()=>ce())},x=g=>{g.key!=="Enter"&&g.key!==" "||(g.preventDefault(),g.stopPropagation(),u.click(),fe(()=>ce()))};d.addEventListener("mousedown",p),d.addEventListener("click",h),d.addEventListener("keydown",x),c.appendChild(d),Nn.push(()=>{d.removeEventListener("mousedown",p),d.removeEventListener("click",h),d.removeEventListener("keydown",x),d.parentElement===c&&c.removeChild(d)})}}function ce(e=!1){if(B||kt!=null)return;const t=()=>{B||(he(),le(e),ee())};kt=fe(()=>{kt=null,t(),Ft=fe(()=>{Ft=null,t()})}),it()}function it(e=!1){if(!m.value||B||!e&&r.loading===!1||(Qe=Qe||e,Ye=Math.max(Ye,e?18:6),Je!=null))return;const t=()=>{if(Je=null,!m.value||B||Ye<=0||!Qe&&r.loading===!1)return Ye=0,void(Qe=!1);Ye--,he(),le({preferModelDiffHeight:!0,holdCurrentDiffHeight:Qe}),ee(),Ye>0?Je=fe(t):Qe=!1};Je=fe(t)}function Ae(e,t,n,l={}){const o=m.value&&r.loading!==!1?Zn(e):null,i=o!=null&&o>t+1?o:t,s=Math.min(i,n),u=l.allowBelowEstimatedFloor===!0||Tl(),a=Rl(s,l.clearEstimatedFloor===!0,{allowBelowEstimatedFloor:u}),c=nt();if(e.style.minHeight=c==null||u?"0px":`${Math.min(c,Math.ceil(n))}px`,e.style.height=`${a}px`,e.style.maxHeight=`${Math.ceil(n)}px`,m.value)e.style.overflow="hidden";else{const d=l.preserveScrollableOverflow===!0||t>n+1;e.style.overflow=d?"auto":"hidden"}return a}function Zl(e,t=0){var n;const l=Math.ceil(((n=e.getBoundingClientRect)==null?void 0:n.call(e).height)||0),o=Math.max(t,e.clientHeight||0,l);return o>0&&e.scrollHeight>o+1}function rl(e){var t;return!m.value&&(Fn||Zl(e,(t=_e.value)!=null?t:0))}function al(e){var t,n,l,o,i,s,u,a;if(!m.value)return;const c=Pe.value||!Tt(e)||e.getBoundingClientRect().height>=Mt()-1;if(Bn===c)return;Bn=c;const d=Me(U({},(n=(t=r.monacoOptions)==null?void 0:t.scrollbar)!=null?n:{}),{handleMouseWheel:c}),f=V();try{(i=(o=(l=f?.getOriginalEditor)==null?void 0:l.call(f))==null?void 0:o.updateOptions)==null||i.call(o,{scrollbar:d}),(a=(u=(s=f?.getModifiedEditor)==null?void 0:s.call(f))==null?void 0:u.updateOptions)==null||a.call(u,{scrollbar:d})}catch{}}function mn(e=v.value){return!!$e(e)||!!e?.querySelector(".monaco-diff-editor .view-lines .view-line")}function eo(e=v.value){return!!$e(e)||!!e?.querySelector(".monaco-editor .view-lines .view-line")}function to(){var e,t;if($e())return!0;const n=(t=(e=de())==null?void 0:e.getModel)==null?void 0:t.call(e);return typeof n?.getValue=="function"&&n.getValue()===Re.value}function no(e=v.value){return!!$e(e)||!!e?.classList.contains("stream-monaco-diff-root")&&!(Ue.value&&!e.classList.contains("stream-monaco-diff-inline"))}function $e(e=v.value){return!!e?.querySelector("diffs-container")}function lo(e){return r.loading!==!1||R.value||e.classList.contains("stream-monaco-diff-native-stale")||Tt(e)}function li(){const e=V();return typeof e?.getOriginalEditor=="function"||typeof e?.getModifiedEditor=="function"||typeof e?.getLineChanges=="function"}function oo(){return j(this,arguments,function*(e={}){var t,n,l;if(!m.value)return!0;if($e())return yield A(),yield Le(),$e();const o=e.requireHighlight!==!1;let i=0,s=Ot(String((t=r.node.originalCode)!=null?t:""),String((n=r.node.updatedCode)!=null?n:"")),u=vn(s.original,s.updated),a=u.added>0||u.removed>0;const c=()=>{var d,f;const p=Ot(String((d=r.node.originalCode)!=null?d:""),String((f=r.node.updatedCode)!=null?f:""));p.original===s.original&&p.updated===s.updated||(s=p,u=vn(s.original,s.updated),a=u.added>0||u.removed>0)};for(let d=0;d<30;d++){if(B)return!1;c();const f=v.value,p=V(),h=Qn();let x=!1;try{const S=(l=p?.getLineChanges)==null?void 0:l.call(p);x=Array.isArray(S)&&(!a||S.length>0)}catch{x=!1}const g=!!f?.querySelector(".monaco-diff-editor"),N=mn(f),oe=!a||Wl(f,u),E=!a||Il(f,u),F=!h||Ul(f);if(g&&N&&x&&oe&&E&&F&&ql(f)){try{St(),he(),lt(),ce()}catch{}if(yield A(),yield Le(),B)return!1;const S=v.value,D=!Qn()||Ul(S),C=!a||Wl(S,u),L=!a||Il(S,u),K=Ko(S,a),_=Zo(S,u),O=!o||Yn(S),I=no(S)&&D&&Vl(S)&&C&&L&&K&&_&&O,G=no(S)&&D&&Vl(S)&&C&&L&&ql(S)&&O;if(I||G){if(i++,i>=2)return!0}else i=0}yield A(),yield Le()}return B||(St(),he(),lt(),ce(),c()),!1})}function io(e,t,n){return j(this,null,function*(){try{return void(yield Kt(e,t,n))}catch(l){if(!$t(l))throw l}if(yield A(),yield Le(),!B&&m.value)try{yield Kt(e,t,n)}catch(l){if(!$t(l))throw l}})}function Mt(){var e,t;const n=(t=(e=r.monacoOptions)==null?void 0:e.MAX_HEIGHT)!=null?t:500;if(typeof n=="number")return n;const l=String(n).match(/^(\d+(?:\.\d+)?)/);return l?Number.parseFloat(l[1]):500}const ul=b(()=>r.isShowPreview&&(xe.value==="html"||xe.value==="svg"));function Ve(){return typeof r.node.loading=="boolean"?r.node.loading:r.loading===!0}function ro(){var e,t,n;if(!Ve())return!0;const l=String((e=r.node.raw)!=null?e:""),o=(n=(t=l.split(/\r\n|\n|\r/,1)[0])==null?void 0:t.trimStart())!=null?n:"";return!/^(?:`{3,}|~{3,})/.test(o)||/\r\n|\n|\r/.test(l)}function ao(e,t,n){return!n||ro()&&String(t??"")?wn(String(e??"")):"plain"}function pn(){return Ve()}let Bt=null,sl=!1,hn=0;function uo(){Bt=null,hn++}function so(){return j(this,arguments,function*(e=hn){if(!sl){sl=!0;try{for(;Bt&&!B&&!m.value&&e===hn;){const t=Bt;Bt=null;try{yield Promise.resolve(Ln(t.code,t.language)),yield A(),B||m.value||(le(!1),ee())}catch{}}}finally{sl=!1,!Bt||B||m.value||so()}}})}function co(e,t){Bt={code:e,language:t},so(hn)}ue(()=>[r.node.language,r.node.code,r.node.raw,r.node.loading,r.loading],([e,t,n,l,o])=>{xe.value=ao(e,t,typeof l=="boolean"?l:o===!0)}),ue(()=>[r.node.originalCode,r.node.updatedCode,m.value],()=>{ve.value=null,Xn(),fe(()=>lt())},{immediate:!0});let gn=0;ue(()=>[r.node.originalCode,r.node.updatedCode,Fe.value,m.value,r.stream],e=>j(null,[e],function*([,,,t,n]){var l,o;const i=++gn;if(!t||Ve()||n===!1&&!X.value)return;if(n!==!1&&se&&!X.value&&v.value)try{yield je(v.value)}catch{}const s=Pt;if(s&&!Ce.value){try{yield s}catch{}if(B||!m.value||i!==gn)return}if(i!==gn)return;const u=Ot(String((l=r.node.originalCode)!=null?l:""),String((o=r.node.updatedCode)!=null?o:"")),a=r.loading===!1;a&&at();try{if(yield io(u.original,u.updated,Fe.value),B||!m.value||i!==gn)return;yield A(),ee(!0),he(),le(r.loading===!1||{preferModelDiffHeight:!0}),ee(!0),ce(!0)}catch{return}if(a){if(B||!m.value)return;St(),he(),lt(),ce(),it(!0)}Pe.value&&fe(()=>il())})),ue(()=>r.node.code,e=>j(null,null,function*(){if(Ve()||r.stream===!1||(xe.value||(xe.value=wn(wl(e))),m.value))return;const t=Pt;if(t&&!Ce.value){try{yield t}catch{}if(B||m.value)return}if(se&&!X.value&&v.value)try{yield je(v.value)}catch{}co(en(r.node.code),Fe.value),Pe.value&&fe(()=>il())}));const oi=b(()=>{const e=xe.value;return e?Fo[e]||e.charAt(0).toUpperCase()+e.slice(1):Fo[""]||"Plain Text"}),fo=b(()=>{var e;return Ai(String((e=r.node.raw)!=null?e:""),oi.value,m.value)}),ii=b(()=>fo.value.title),vo=b(()=>fo.value.caption),ri=b(()=>(Hi.value,(function(e,t){if(t===void 0)return Ni(e);if(t){const l=t(e);if(l!=null&&l!=="")return l}const n=wn(e);return Ti(n)||Ri()})(xe.value||"",gt))),ai=b(()=>{const e={};e["--markstream-code-layout-character-width"]=on.value==null?"1ch":`${on.value}px`;const t=o=>{if(o!=null)return typeof o=="number"?`${o}px`:String(o)},n=t(r.minWidth),l=t(r.maxWidth);if(n&&(e.minWidth=n),l&&(e.maxWidth=l),zl.value&&!m.value&&!Se.value){const o=Qo.value;o!=null&&(e.minHeight=`${o}px`)}return m.value||(e.color="var(--markstream-code-fallback-fg, var(--code-fg))",e.backgroundColor="var(--markstream-code-fallback-bg, var(--code-bg))",e.borderColor="var(--markstream-code-border-color, var(--code-border))"),e}),ui=b(()=>r.showTooltips!==!1);function si(){return j(this,null,function*(){try{typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(r.node.code)),wt.value=!0,P("copy",r.node.code),setTimeout(()=>{wt.value=!1},1e3)}catch(e){console.error("复制失败:",e)}})}function di(){Pe.value=!Pe.value;const e=m.value?V():de(),t=v.value;e&&t&&(Pe.value?(yn(!0),t.style.maxHeight="none",t.style.overflow="visible",le(!0)):(yn(!1),t.style.overflow=m.value?"hidden":"auto",le(!0)),al(t))}function ci(){var e,t;if(Se.value=!Se.value,Se.value){if(Fn=!1,v.value){const n=Math.ceil(((t=(e=v.value).getBoundingClientRect)==null?void 0:t.call(e).height)||0);Fn=!m.value&&(Zl(v.value,n)||v.value.style.overflow==="auto"||v.value.style.overflowY==="auto"),n>0&&(_e.value=n)}yn(!1)}else Pe.value&&yn(!0),v.value&&_e.value!=null&&(v.value.style.height=`${_e.value}px`),En=2,A(()=>{Se.value||B||(le(!0),ee(!0))})}function fi(){if(!ul.value)return;const e=xe.value;if(Yt.value){const t=e==="html"?"text/html":"image/svg+xml",n=e==="html"?Q("artifacts.htmlPreviewTitle")||"HTML Preview":Q("artifacts.svgPreviewTitle")||"SVG Preview";return void P("previewCode",{node:r.node,artifactType:t,artifactTitle:n,id:`temp-${e}-${Date.now()}`})}e==="html"&&(nn.value=!nn.value)}function yn(e){var t,n;try{if(m.value){const l=V();(t=l?.updateOptions)==null||t.call(l,{automaticLayout:e})}else{const l=de();(n=l?.updateOptions)==null||n.call(l,{automaticLayout:e})}}catch{}}function vi(e){return j(this,null,function*(){var t;if(!se||B)return;const n=zt.value;if(jn=!1,me.value=!1,et.value=null,Ce.value=!1,R.value=!1,Ht.value=!1,Bn=null,_n.value=null,ln.value=null,on.value=null,(function(){const a=(function(){var c;const d=(c=v.value)==null?void 0:c.parentElement;return d instanceof HTMLElement?d:null})();a&&(a.style.removeProperty("--stream-monaco-line-number-left"),a.style.removeProperty("--stream-monaco-line-number-width"),a.style.removeProperty("--stream-monaco-line-number-gap-to-code"),a.style.removeProperty("--stream-monaco-original-line-number-gap-to-code"),a.style.removeProperty("--stream-monaco-modified-line-number-gap-to-code"),a.style.removeProperty("--stream-monaco-original-scrollable-left"),a.style.removeProperty("--stream-monaco-modified-scrollable-left"))})(),Kl(),(function(){tn.value=!1;const a=Ll.value;Un.value=q.value||a==null?null:a})(),ot(),De(),(function(a){a.replaceChildren()})(e),at(),B)return;const l=j(null,null,function*(){var a,c;if(n==="diff"){(function(){if(Hn||typeof window>"u")return;Hn=!0;const f=p=>{var h;$t("reason"in p?p.reason:(h=p.error)!=null?h:p.message)&&(p.preventDefault(),p.stopImmediatePropagation())};window.addEventListener("error",f,!0),window.addEventListener("unhandledrejection",f,!0),Zt=()=>{window.removeEventListener("error",f,!0),window.removeEventListener("unhandledrejection",f,!0),Hn=!1,Zt=null}})(),Xe();const d=Ot(String((a=r.node.originalCode)!=null?a:""),String((c=r.node.updatedCode)!=null?c:""));Xt?yield yt(()=>Xt(e,d.original,d.updated,Fe.value)):yield yt(()=>se(e,r.node.code,Fe.value))}else yield yt(()=>se(e,Re.value,Fe.value));Ce.value=!0}),o=l.finally(()=>{Pt===o&&(Pt=null)});if(Pt=o,yield(function(a){return j(this,null,function*(){if(!m.value)return void(yield a);let c,d=!1;for(a.then(()=>{d=!0},f=>{d=!0,c=f});;){if(B)return;if(d){if(c)throw c;return}if(mn()&&li())return;yield A(),yield Le()}})})(o),B||zt.value!==n)return;Ce.value=!0;const i=n==="diff"?V():de();if(typeof((t=r.monacoOptions)==null?void 0:t.fontSize)=="number")i?.updateOptions({fontSize:r.monacoOptions.fontSize,automaticLayout:!1}),pe.value=r.monacoOptions.fontSize,W.value=r.monacoOptions.fontSize;else if(!Ql()){const a=Gn();a&&a>0?(pe.value=a,W.value=a):(pe.value=12,W.value=12)}Rt(),yield go(),Pe.value||Se.value||le(!1),q.value=!0,Sl.value=n,(function(){var a,c,d,f,p;if(ot(),m.value){const x=V(),g=(a=x?.getOriginalEditor)==null?void 0:a.call(x),N=(c=x?.getModifiedEditor)==null?void 0:c.call(x),oe=(F,S)=>{try{const D=F?.[S];if(typeof D!="function")return;const C=D.call(F,()=>ce());C&&He.push(C)}catch{}};try{const F=(d=x?.onDidUpdateDiff)==null?void 0:d.call(x,()=>{ce(),fe(()=>lt())});F&&He.push(F)}catch{}oe(g,"onDidContentSizeChange"),oe(N,"onDidContentSizeChange");const E=v.value;if(E&&typeof MutationObserver<"u"){const F=[".view-line",".view-lines",".view-zones",".margin-view-zones",".diff-hidden-lines",".stream-monaco-diff-unchanged-bridge",".stream-monaco-fallback-inline-delete-zone",".stream-monaco-fallback-inline-delete-margin"].join(","),S=L=>{var K;const _=L instanceof HTMLElement?L:L.parentElement;return!!((K=_?.closest)!=null&&K.call(_,F))},D=L=>{var K,_;const O=L instanceof HTMLElement?L:L.parentElement;return!!((K=O?.closest)!=null&&K.call(O,F)||(_=O?.querySelector)!=null&&_.call(O,F))},C=new MutationObserver(L=>{m.value&&lo(E)&&L.some(K=>S(K.target)||Array.from(K.addedNodes).some(D)||Array.from(K.removedNodes).some(S))&&(he(),le({preferModelDiffHeight:!0}),ee(),it())});C.observe(E,{attributeFilter:["class"],attributes:!0,childList:!0,characterData:!0,subtree:!0}),He.push({dispose:()=>C.disconnect()})}if(E){const F=S=>{const D=S.target instanceof Element?S.target:null;if(!D?.closest([".stream-monaco-unchanged-summary",".stream-monaco-unchanged-reveal",".stream-monaco-unchanged-expand",".markstream-inline-fold-proxy",".diff-hidden-lines .center"].join(",")))return;const C=Math.ceil(E.getBoundingClientRect().height||0);C>0&&(ve.value=C)};E.addEventListener("click",F,!0),He.push({dispose:()=>E.removeEventListener("click",F,!0)})}if(E&&typeof ResizeObserver<"u"){const F=new ResizeObserver(()=>{if(!m.value||(ee(),!lo(E)))return;const S=Zn(E);if(S==null)return;const D=Math.ceil(E.getBoundingClientRect().height||0),C=ve.value;if(Tt(E)&&C!=null){if(D>C+1)ve.value=D;else if(DF.disconnect()})}return}const h=de();try{const x=(f=h?.onDidContentSizeChange)==null?void 0:f.call(h,()=>ce());x&&He.push(x)}catch{}try{const x=(p=h?.onDidLayoutChange)==null?void 0:p.call(h,()=>ce());x&&He.push(x)}catch{}})(),nl(),Rt(),he(),lt(),ce(),yield A();let s=null;Ke&&(s=yield Ke(),s&&(yield A(),yield Le()));const u=s??(n==="diff"?yield oo({requireHighlight:!0}):yield(function(){return j(this,null,function*(){if($e())return yield A(),yield Le(),$e();for(let a=0;a<30;a++){if(B||m.value)return!1;const c=v.value,d=to(),f=eo(c),p=!Re.value.trim()||Yn(c);if(d&&f&&p&&(yield A(),yield Le(),!B&&!m.value&&to()&&eo(v.value)&&(!Re.value.trim()||Yn(v.value))))return!0;yield A(),yield Le()}return!1})})());B||(u?(Rt(),cn(),(yield Nl())||qe()):qe())})}function je(e,t={}){if(!se||B||r.stream===!1&&r.loading!==!1||(cl(),ko())||ge.value||v.value!==e||pn())return null;if(ze)return ze;if(X.value&&q.value)return Promise.resolve();const n=dl(),l=Dn.value;let o=!1;X.value=!0,(function(){const s=Ge.value;re&&s&&We!==s&&(We&&re.markSettled(We),We=s,re.markPending(s))})();const i=j(null,null,function*(){try{yield vi(e),Nt=null}catch(s){const u=dl(),a=l!==Dn.value,c=t.allowStaleContentRetry!==!1&&a&&Nt!==u;if(n!==u||c)return c&&(Nt=u),o=!0,X.value=!1,q.value=!1,Ce.value=!1,void(R.value=!1);throw qe(n),s}}).finally(()=>{ze===i&&(ze=null),(function(){const s=We;re&&s&&(We="",A(()=>{var u,a;if(!B){const c=(a=(u=z.value)==null?void 0:u.offsetHeight)!=null?a:0;c>0&&re.reportHeight(s,c)}re.markSettled(s)}))})(),o&&!B&&queueMicrotask(()=>{var s;const u=v.value;u&&!B&&((s=je(u))==null||s.catch(a=>{q.value=!1,R.value=!1,qe()}))})});return ze=i,i}ue(ui,e=>{e||mt()}),ue(()=>W.value,(e,t)=>{const n=m.value?V():de();n&&typeof e=="number"&&Number.isFinite(e)&&e>0&&(n.updateOptions({fontSize:e}),Se.value||le(!0))},{flush:"post",immediate:!1});let mo=0;const mi=ue(()=>[v.value,m.value,r.stream,r.loading,bt.value,Z.value,r.node.language,r.node.raw,r.node.code,r.node.loading],e=>j(null,[e],function*([t,n,l,o,i,s]){const u=++mo;if(!t||!s||Ve()||tt||l===!1&&o!==!1||!se&&(yield(function(){return j(this,null,function*(){if(typeof window>"u"||B||bt.value||ge.value)return;if(Lt)return Lt;const c=j(null,null,function*(){try{const d=yield Ui();if(B)return;if(!d)return void(ge.value=!0);const f=d.useMonaco,p=d.detectLanguage;if(typeof p=="function"&&(wl=p),typeof f!="function")return;Ne=yo();const h=f(Ne);se=h.createEditor||se,Xt=h.createDiffEditor||Xt,Ln=h.updateCode||Ln,Kt=h.updateDiff||Kt,xt=h.getEditor||xt,de=h.getEditorView||de,V=h.getDiffEditorView||V,On=h.cleanupEditor||On,Xe=h.safeClean||h.cleanupEditor||Xe,$n=h.refreshDiffPresentation||$n,zn=h.setTheme||zn,Ke=h.whenVisualReady||null,bt.value=!0}catch{if(B)return;ge.value=!0}}).finally(()=>{Lt===c&&(Lt=null)});return Lt=c,c})})(),u!==mo||r.stream===!1&&r.loading!==!1||pn()||!Z.value||!se||ge.value||X.value||ko()||B||v.value!==t)||pn())return;const a=je(t);if(a){try{yield a}catch{q.value=!1,R.value=!1,qe()}q.value&&R.value&&mi()}}));function po(e){return!!e&&typeof e=="object"&&"light"in e&&"dark"in e}function rt(e){return typeof e=="string"?e:e&&typeof e=="object"&&"name"in e?String(e.name):null}function ho(e,t){if(e===t)return!0;const n=rt(e),l=rt(t);return!!n&&n===l}function Dt(){var e;const t=(function(){if(r.theme!==void 0){const a=r.theme;return po(a)?r.isDark?a.dark:a.light:a}return r.isDark?r.darkTheme:r.lightTheme})(),n=(e=ae.value)==null?void 0:e.theme,l=t??n;if(l!=null&&typeof l=="object")return l;const o=Array.isArray(r.themes)?r.themes:[];if(!o.length||l==null)return l;const i=rt(l),s=o.map(a=>rt(a)).filter(a=>!!a);if(!i||s.includes(i))return l;const u=rt(n);return n!=null&&u&&s.includes(u)?n:o[0]}function go(){return j(this,arguments,function*(e={}){at();const t=()=>{m.value&&St(),fe(()=>{nl(),ce()})};if(e.appearanceOnly)return void t();const n=Dt();if(n)try{yield zn(n),t()}catch{}else t()})}function At(e,t){if(typeof t!="string")return;const n=wn(t),l=Eo(n),o=["plain","objectivec","objectivecpp"].includes(n)?l:n;for(const i of[o,l])i&&!e.includes(i)&&e.push(i)}ue(zt,(e,t)=>j(null,null,function*(){if(e===t||me.value||tt||(uo(),!se||!v.value)||!X.value||r.stream===!1&&r.loading!==!1||!Z.value)return;const n=ze;if(n){try{yield n}catch{}if(B||!v.value)return}if(Sl.value!==e||!X.value||!q.value)try{q.value=!1,R.value=!1,X.value=!1,Ce.value=!1,ot(),De(),Xe(),yield A(),yield je(v.value)}catch{q.value=!1,R.value=!1,qe()}}));const pi=b(()=>{var e;const t=[],n=(e=ae.value)==null?void 0:e.languages;if(Array.isArray(n))for(const l of n)At(t,l);return ro()&&At(t,r.node.language),At(t,xe.value),At(t,Fe.value),At(t,"plaintext"),t});function yo(){const e=Me(U(Me(U({wordWrap:"on",wrappingIndent:"same",themes:r.themes},ae.value||{}),{languages:pi.value,stream:!1,fontSize:rn.value,lineHeight:an.value,theme:Dt(),disableFileHeader:!0}),m.value?{diffAppearance:Rn.value}:{}),{onThemeChange(){nl()}}),t=(function(){var l;const o=(l=ae.value)==null?void 0:l.fontFamily;return typeof o=="string"&&o.trim()?o.trim():m.value?(function(){var i;if(typeof window>"u")return;const s=(i=z.value)==null?void 0:i.querySelector("pre.code-pre-fallback");if(s)return window.getComputedStyle(s).fontFamily.trim()||void 0})():void 0})();t&&(e.fontFamily!=null||(e.fontFamily=t));const n=typeof e.unsafeCSS=="string"?e.unsafeCSS:"";if(e.unsafeCSS=`[data-file], [data-diff] { --diffs-min-number-column-width-default: 2ch !important; } -${n}`.trim(),m.value){e.wordWrap=qn.value?"on":"off";const l=(function(){var o,i;const s=Wn.value;if(s===!1||typeof s=="object"&&s.enabled===!1)return null;const u=typeof s=="object"?s:Wt,a=Math.max(0,Math.floor((o=u.contextLineCount)!=null?o:2));return{contextLineCount:a,collapsedContextThreshold:a+Math.max(1,Math.floor((i=u.minimumLineCount)!=null?i:4))-1}})();e.unsafeCSS+=` -pre { column-gap: 0; } -pre > code { column-gap: 0; padding-block: 0; } -[data-separator="line-info"] { margin-top: 0; } -`,l?(e.parseDiffOptions=Me(U({},e.parseDiffOptions),{context:l.contextLineCount}),e.collapsedContextThreshold=l.collapsedContextThreshold,e.expandUnchanged=!1,e.hunkSeparators="line-info",e.unsafeCSS+=`[data-separator="line-info"][data-separator-last] { height: 28px; } -`):(e.expandUnchanged=!0,e.hunkSeparators="simple")}return e}function at(){const e=yo();if(!Ne)return Ne=e,Ne;for(const t of Object.keys(Ne))t in e||delete Ne[t];return Object.assign(Ne,e),Ne}const wo=b(()=>{var e,t,n,l,o,i,s,u,a,c,d,f,p,h,x;return JSON.stringify({diffLineStyle:(t=(e=ae.value)==null?void 0:e.diffLineStyle)!=null?t:"background",diffUnchangedRegionStyle:(l=(n=ae.value)==null?void 0:n.diffUnchangedRegionStyle)!=null?l:"line-info",diffHideUnchangedRegions:((o=r.monacoOptions)==null?void 0:o.diffHideUnchangedRegions)===void 0?U({},Wt):bn(r.monacoOptions.diffHideUnchangedRegions),renderSideBySide:(s=(i=ae.value)==null?void 0:i.renderSideBySide)==null||s,useInlineViewWhenSpaceIsLimited:(a=(u=ae.value)==null?void 0:u.useInlineViewWhenSpaceIsLimited)!=null&&a,enableSplitViewResizing:(d=(c=ae.value)==null?void 0:c.enableSplitViewResizing)==null||d,ignoreTrimWhitespace:(p=(f=ae.value)==null?void 0:f.ignoreTrimWhitespace)==null||p,originalEditable:(x=(h=ae.value)==null?void 0:h.originalEditable)!=null&&x})}),bo=$(0);function dl(){var e;const t=Dt();return JSON.stringify({kind:zt.value,language:Fe.value,structural:wo.value,optionsRevision:bo.value,settledContentGeneration:Cl.value,theme:(e=rt(t))!=null?e:t==null?null:"custom",isDark:r.isDark})}ue(()=>[r.monacoOptions,r.theme,r.themes,r.lightTheme,r.darkTheme],()=>{bo.value+=1},{deep:!0}),ue(()=>[Re.value,r.node.originalCode,r.node.updatedCode],()=>{Dn.value+=1,Ve()||(Cl.value+=1)});const ut=b(()=>dl());function cl(){me.value&&et.value!==ut.value&&(me.value=!1,et.value=null,Nt=null,An=null,X.value=!1,q.value=!1,Ce.value=!1,R.value=!1,Ht.value=!1)}function ko(){return cl(),me.value&&et.value===ut.value}function qe(e=ut.value){et.value=e,me.value=!0,Ht.value=!1}return ue(ut,()=>j(null,null,function*(){if(tt||!me.value||et.value===ut.value||!se||!v.value||ge.value||B||!Z.value||r.stream===!1&&r.loading!==!1||pn())return;const e=ut.value;tt=!0;try{if(cl(),me.value)return;yield je(v.value)}catch{q.value=!1,R.value=!1,qe()}finally{An=e,yield A(),tt=!1}})),ue(()=>[r.monacoOptions,Z.value],()=>{var e,t;if(at(),!se||!Z.value)return;const n=m.value?V():de(),l=typeof((e=r.monacoOptions)==null?void 0:e.fontSize)=="number"?r.monacoOptions.fontSize:Number.isFinite(W.value)?W.value:void 0;typeof l=="number"&&Number.isFinite(l)&&l>0&&((t=n?.updateOptions)==null||t.call(n,{fontSize:l})),le(!1)},{deep:!0}),ue(()=>[Dt(),Rn.value,bt.value,X.value,Z.value],([e],t)=>{bt.value&&q.value&&Z.value&&go({appearanceOnly:t!=null&&ho(e,t[0])})},{flush:"post"}),ue(()=>[wo.value,bt.value,Z.value],(e,t)=>j(null,[e,t],function*([n,l,o],[i]){if(at(),!l||!o||!se||!v.value||!X.value||n===i||r.stream===!1&&r.loading!==!1)return;const s=ze;if(s){try{yield s}catch{}if(B||!v.value)return}try{q.value=!1,R.value=!1,X.value=!1,Ce.value=!1,ot(),De(),Xe(),yield A(),yield je(v.value,{allowStaleContentRetry:!1})}catch{q.value=!1,R.value=!1,qe()}}),{flush:"post"}),ue(()=>[r.loading,Z.value],(e,t)=>j(null,[e,t],function*([n,l],o){if(!l)return;const i=o?.[0];if(i===!1&&n!==!1&&m.value&&X.value&&(yield A(),fe(()=>{j(null,null,function*(){const u=ze;if(u)try{yield u}catch{}!B&&m.value&&r.loading!==!1&&(at(),St(),ce())})})),n)return;const s=i!==void 0&&i!==!1;yield A(),fe(()=>{j(null,null,function*(){var u,a;try{if(s&&(yield(function(){return j(this,null,function*(){if(!me.value||!se||!v.value||ge.value||B||!Z.value)return!1;if(An===ut.value)return!0;tt=!0;try{me.value=!1,et.value=null,Nt=null,X.value=!1,q.value=!1,Ce.value=!1,R.value=!1,ot(),De(),Xe(),yield A();try{yield je(v.value)}catch{q.value=!1,R.value=!1,qe()}}finally{yield A(),tt=!1}return!0})})()))return void le(!1);if(s&&m.value&&X.value&&jn&&v.value)return jn=!1,q.value=!1,R.value=!1,X.value=!1,Ce.value=!1,ot(),De(),Xe(),yield A(),yield je(v.value,{allowStaleContentRetry:!1}),void it(!0);if(s&&X.value)if(m.value&&v.value){const c=ze;if(c)try{yield c}catch{}at();const d=Ot(String((u=r.node.originalCode)!=null?u:""),String((a=r.node.updatedCode)!=null?a:""));if(yield io(d.original,d.updated,Fe.value),B||!m.value)return;St(),ee(!0),Hl(),he(),lt();const f=yield oo({requireHighlight:!0});B||!f||R.value||(yield Nl()),ce(),it(!0)}else uo(),co(Re.value,Fe.value);s&&m.value?(le({preferModelDiffHeight:!0,holdCurrentDiffHeight:!0}),it(!0)):le(!1)}catch{}})})}),{immediate:!0,flush:"post"}),To(()=>{ot(),De(),On(),Zt?.()}),(e,t)=>ge.value?(Y(),Sn(J(Bo),{key:0,class:pt(["code-pre-fallback",{"is-wrap":qn.value}]),style:Vt($l.value),node:El.value,loading:r.loading,"show-line-numbers":!0,"diff-inline":Ue.value,"diff-hide-unchanged-regions":Wn.value},null,8,["class","style","node","loading","diff-inline","diff-hide-unchanged-regions"])):(Y(),ie("div",{key:1,ref_key:"container",ref:z,style:Vt(ai.value),class:pt(["code-block-container rounded-lg border",[{dark:r.isDark,"is-rendering":r.loading,"is-dark":xl.value,"is-diff":m.value,"is-plain-text":Mn.value}]]),"data-markstream-code-block":"1","data-markstream-enhanced":R.value&&!ge.value?"true":"false","data-markstream-enhancement-state":Vo.value,"data-markstream-code-block-state":Ve()?"streaming":"settled","data-markstream-pending":Uo.value?"true":void 0,"data-markstream-viewport-pending":yl.value&&J(Pn)&&!Z.value?"true":void 0},[Ro(pr,{"show-header":r.showHeader,"show-collapse-button":r.showCollapseButton,"show-font-size-buttons":r.showFontSizeButtons,"enable-font-size-control":r.enableFontSizeControl,"show-copy-button":r.showCopyButton,"show-expand-button":r.showExpandButton,"show-preview-button":r.showPreviewButton,"show-tooltips":r.showTooltips,"is-dark":r.isDark,loading:r.loading,stream:k.stream,"is-collapsed":Se.value,"is-expanded":Pe.value,"copy-text":wt.value,"is-previewable":ul.value,"code-font-size":W.value,"code-font-min":10,"code-font-max":36,"default-code-font-size":pe.value,"font-baseline-ready":Go.value,"diff-stats":m.value?Ze.value:null,"diff-stats-aria-label":Wo.value,onToggleCollapse:ci,onDecreaseFont:ti,onResetFont:ni,onIncreaseFont:ei,onCopy:si,onToggleExpand:di,onPreview:fi},Oi({"header-left":Gt(()=>[ht(e.$slots,"header-left",{},()=>[w("div",xr,[w("span",{class:"icon-slot h-4 w-4 flex-shrink-0",innerHTML:ri.value},null,8,Sr),w("div",Cr,[w("div",Mr,Be(ii.value),1),vo.value?(Y(),ie("div",Br,Be(vo.value),1)):we("",!0)])])],!0)]),loading:Gt(()=>[ht(e.$slots,"loading",{loading:k.loading,stream:k.stream},()=>[t[0]||(t[0]=w("div",{class:"loading-skeleton"},[w("div",{class:"skeleton-line"}),w("div",{class:"skeleton-line"}),w("div",{class:"skeleton-line short"})],-1))],!0)]),default:Gt(()=>[vl(w("div",{class:pt(["code-editor-layer",{"code-editor-layer--collapsed":Se.value}])},[w("div",{ref_key:"codeEditor",ref:v,class:pt(["code-editor-container",k.stream?"":"code-height-placeholder"]),"data-markstream-host-hidden":Io.value?"true":void 0,style:Vt(Xo.value)},null,14,Er),Bl.value?(Y(),Sn(J(Bo),{key:0,class:pt(["code-pre-fallback",{"is-wrap":qn.value}]),style:Vt($l.value),node:El.value,"show-line-numbers":!0,"diff-inline":Ue.value,"diff-hide-unchanged-regions":Wn.value},null,8,["class","style","node","diff-inline","diff-hide-unchanged-regions"])):we("",!0)],2),[[ml,!!k.stream||!k.loading]]),nn.value&&!Yt.value&&ul.value&&xe.value==="html"?(Y(),Sn(br,{key:0,code:r.node.code,"html-preview-allow-scripts":r.htmlPreviewAllowScripts,"html-preview-sandbox":r.htmlPreviewSandbox,"is-dark":r.isDark,"on-close":()=>nn.value=!1},null,8,["code","html-preview-allow-scripts","html-preview-sandbox","is-dark","on-close"])):we("",!0)]),_:2},[e.$slots["header-right"]?{name:"header-right",fn:Gt(()=>[ht(e.$slots,"header-right",{},void 0,!0)]),key:"0"}:void 0]),1032,["show-header","show-collapse-button","show-font-size-buttons","enable-font-size-control","show-copy-button","show-expand-button","show-preview-button","show-tooltips","is-dark","loading","stream","is-collapsed","is-expanded","copy-text","is-previewable","code-font-size","default-code-font-size","font-baseline-ready","diff-stats","diff-stats-aria-label"])],14,kr))}}),[["__scopeId","data-v-ef6e4bb8"]]);export{Lr as default}; diff --git a/apps/kimi-code/dist-web/assets/CodeBlockNode-DXHZxqco.js b/apps/kimi-code/dist-web/assets/CodeBlockNode-DXHZxqco.js new file mode 100644 index 000000000..7a2304bd4 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/CodeBlockNode-DXHZxqco.js @@ -0,0 +1,43 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markstream-D5Q-JKRm.js","assets/index-BOtIzGLC.js","assets/index-CYGRyXzg.css"])))=>i.map(i=>d[i]); +import{bR as Ya,cd as Ga,bQ as aa,M as oa,bl as Ja,af as Wt,bY as Qa,ce as Xa,b$ as ra,aU as S,c0 as Za,c1 as Ka,c2 as eo,a0 as Jn,aD as ia,bE as A,az as lo,cf as Qn,ca as to,cg as no,aI as ua,aL as ul,s as rt,A as Xn,bJ as il,aY as $l,aw as nt,u as Zn,I as ao,bL as oo,v as U,au as it,t as At,bB as ro,bb as Yt,bk as sa,q as m,b7 as io,ch as uo,ci as so,cj as fo,ck as co,as as O,cl as vo,cm as mo,cn as ho,co as po,cp as go,cq as yo,cr as bo,cs as Kn,ct as ea,bO as wo,T as ko,cu as xo,b_ as So}from"./index-BOtIzGLC.js";import{B as la,g as Co,Q as Mo}from"./PreCodeBlock-txKBqZ4o.js";import{i as se,t as at}from"./safeRaf-DGuzXxDK.js";var ot=(C,b,M)=>new Promise((ve,ee)=>{var R=k=>{try{n(M.next(k))}catch(H){ee(H)}},he=k=>{try{n(M.throw(k))}catch(H){ee(H)}},n=k=>k.done?ve(k.value):Promise.resolve(k.value).then(R,he);n((M=M.apply(C,b)).next())});let Ut=!1,Hl=null,Ol=null,Dl=null;function Bo(){return ot(this,null,function*(){if(Dl)return Dl;Dl=ot(null,null,function*(){if(!Ol)try{if(Ol=(function(C){var b,M,ve;const ee=C,R=typeof ee?.createCodeBlockRuntime=="function"||typeof ee?.useMonaco=="function"?ee:C?.default,he=(b=R?.createCodeBlockRuntime)!=null?b:R?.useMonaco;return typeof he!="function"?null:{createCodeBlockRuntime:n=>he.call(R,n),detectLanguage:(M=R?.detectLanguage)==null?void 0:M.bind(R),preloadStreamDiffs:(ve=R?.preloadStreamDiffs)==null?void 0:ve.bind(R)}})(yield Ya(()=>import("./markstream-D5Q-JKRm.js"),__vite__mapDeps([0,1,2]))),!Ol)return null}catch{return null}try{return yield(function(C){return ot(this,null,function*(){return Ut?void 0:Hl||(Hl=ot(null,null,function*(){const M=C?.preloadStreamDiffs;typeof M=="function"&&(yield M()),Ut=!0}).finally(()=>{Hl=null}),Hl)})})(Ol),Ga(),Ol}catch{return null}});try{return yield Dl}finally{Dl=null}})}var Po=Object.defineProperty,$o=Object.defineProperties,Ho=Object.getOwnPropertyDescriptors,ta=Object.getOwnPropertySymbols,Oo=Object.prototype.hasOwnProperty,Do=Object.prototype.propertyIsEnumerable,na=(C,b,M)=>b in C?Po(C,b,{enumerable:!0,configurable:!0,writable:!0,value:M}):C[b]=M,Ce=(C,b)=>{for(var M in b||(b={}))Oo.call(b,M)&&na(C,M,b[M]);if(ta)for(var M of ta(b))Do.call(b,M)&&na(C,M,b[M]);return C},Nl=(C,b)=>$o(C,Ho(b)),D=(C,b,M)=>new Promise((ve,ee)=>{var R=k=>{try{n(M.next(k))}catch(H){ee(H)}},he=k=>{try{n(M.throw(k))}catch(H){ee(H)}},n=k=>k.done?ve(k.value):Promise.resolve(k.value).then(R,he);n((M=M.apply(C,b)).next())});const No={class:"html-preview-frame__header"},Eo={class:"html-preview-frame__title"},Fo={class:"html-preview-frame__label"},To=["sandbox","srcdoc"],zo=aa(oa({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(C){const b=C,M=import.meta!==void 0&&!1;let ve=null;const{t:ee}=ra(),R=m(()=>{const k=b.code||"",H=k.trim().toLowerCase();return H.startsWith(" + + + + + + + + ${k} + +`}),he=m(()=>{return k=b.htmlPreviewSandbox,H=b.htmlPreviewAllowScripts,typeof k=="string"?((function(je){if(!M||typeof console>"u"||ve===je)return;const Q=(function(El){return new Set(El.trim().toLowerCase().split(/\s+/).filter(Boolean))})(je);Q.has("allow-scripts")&&Q.has("allow-same-origin")&&(ve=je,console.warn("[markstream-vue] htmlPreviewSandbox contains both allow-scripts and allow-same-origin. Use this only for fully trusted content served from an isolated origin."))})(k),k):k!==void 0?"":H===!0?"allow-scripts":"";var k,H});function n(k){var H;k.key!=="Escape"&&k.key!=="Esc"||(H=b.onClose)==null||H.call(b)}return ia(()=>{typeof window<"u"&&window.addEventListener("keydown",n)}),ua(()=>{typeof window<"u"&&window.removeEventListener("keydown",n)}),(k,H)=>(ul(),rt(ko,{to:"body"},[U("div",{class:it(["markstream-vue",{dark:b.isDark}])},[U("div",{class:"html-preview-frame__backdrop",onClick:H[2]||(H[2]=je=>{var Q;return(Q=b.onClose)==null?void 0:Q.call(b)})},[U("div",{class:"html-preview-frame",onClick:H[1]||(H[1]=wo(()=>{},["stop"]))},[U("div",No,[U("div",Eo,[H[3]||(H[3]=U("span",{class:"html-preview-frame__dot"},null,-1)),U("span",Fo,Yt(b.title||sa(ee)("common.preview")||"Preview"),1)]),U("button",{type:"button",class:"html-preview-frame__close",onClick:H[0]||(H[0]=je=>{var Q;return(Q=b.onClose)==null?void 0:Q.call(b)})}," × ")]),U("iframe",{class:"html-preview-frame__iframe",sandbox:he.value,referrerpolicy:"no-referrer",srcdoc:R.value},null,8,To)])])],2)]))}}),[["__scopeId","data-v-24e66176"]]),Lo=["data-markstream-enhanced","data-markstream-enhancement-state","data-markstream-code-block-state","data-markstream-pending","data-markstream-viewport-pending"],_o={class:"code-header-main"},Ro=["innerHTML"],jo={class:"code-header-copy"},qo={class:"code-header-title"},Io={key:0,class:"code-header-caption"},Vo=["data-markstream-host-hidden"],Go=aa(oa({__name:"CodeBlockNode",props:{node:{},codeBlockOptions:{},clipboardWriter:{},showLineNumbers:{type:Boolean,default:void 0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},theme:{},darkTheme:{default:void 0},lightTheme:{default:void 0},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},themes:{},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},customId:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},estimatedHeightPx:{},estimatedContentHeightPx:{},estimatedDiffInline:{type:Boolean}},emits:["previewCode","copy"],setup(C,{emit:b}){var M,ve,ee,R,he;const n=C,k=b,H=m(()=>{var e,l;return(l=n.showLineNumbers)!=null?l:((e=n.codeBlockOptions)==null?void 0:e.disableLineNumbers)!==!0}),je=Ja(),Q=Wt(Qa,null),El=Wt("markstreamHostScrollManaged",null),da=Wt(Xa,void 0),fa=m(()=>So(n,je));function Wo(e,l){}const Gt=Jn(),Jt=m(()=>{const e=Gt?.vnode.props;return!(!e||!e.onPreviewCode&&!e["onPreview-code"])}),{t:Qt}=ra(),h=S(null),ne=S(null),ut=S(!1),we=S(zn(n.node.language,n.node.code,Re())),st=m(()=>mo(we.value)),Me=m(()=>st.value==="plaintext"?"text":st.value),dt=m(()=>st.value==="plaintext"),De=S(!1),pe=S(!1),V=S(!1),ge=S(!1),_=S(!1),el=S(!1);let p=!1,sl=!1,ll=null,dl=null,qe=null,Ie=0,Ve=!1,Ne="";const Ee=S(null);let ft=0,ct=!1;const ca=Za(),Fl=Ka(),vt=eo(),Fe=io(null),W=S(typeof window>"u"||!vt.value),va=(ee=(ve=(M=Jn())==null?void 0:M.vnode.el)==null?void 0:ve.textContent)!=null?ee:"",ma=typeof window<"u"&&String((R=n.node.code)!=null?R:"").length>0&&va.includes(String(n.node.code)),Xt=S(!ma);ia(()=>{Xt.value=!0}),typeof window<"u"&&A([()=>ne.value,vt],([e,l],t,a)=>{var o,d,r;if((o=Fe.value)==null||o.destroy(),Fe.value=null,!l||W.value)return void(W.value=!0);if(!e)return void(W.value=!1);let u=!0;const c=(r=(d=Fl?.value.heavyBlockMargin)!=null?d:Fl?.value.rootMargin)!=null?r:"0px",s=ca(e,{rootMargin:c,allowIdle:!1});Fe.value=s,W.value=W.value||s.isVisible.value,s.whenVisible.then(()=>{u&&Fe.value===s&&(W.value=!0)}).catch(()=>{}),a(()=>{u=!1,s.destroy(),Fe.value===s&&(Fe.value=null)})},{immediate:!0}),lo(()=>{var e;p=!0,(function(){const l=Ne;Q&&l&&(Ne="",Q.markSettled(l))})(),(e=Fe.value)==null||e.destroy(),Fe.value=null});let ae=null,Tl=null,mt=()=>{},zl=()=>{},ht=()=>{},pt=()=>{},fl=()=>null,ie=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),Y=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),gt=()=>{},We=()=>{},yt=()=>{},tl=null,Be=null,cl=null,vl=null,Zt=()=>{var e;return String((e=n.node.language)!=null?e:"plaintext")},bt=()=>D(null,null,function*(){}),wt=!1,Ll=null;const Te=[],Kt=[];let Pe=null,ml=null;const i=m(()=>uo(n.node)),hl=S({removed:0,added:0}),ha=m(()=>`-${hl.value.removed} +${hl.value.added}`);function kt(e,l){return{original:e,updated:l}}function en(e){return String(e??"").replace(/\r\n$|\n$|\r$/,"")}function pl(e){var l;return String((l=e?.message)!=null?l:e).includes("no diff result available")}function _l(){if(!Se())try{const e=yt();e&&typeof e.catch=="function"&&e.catch(l=>{pl(l)})}catch(e){pl(e)}}const gl=m(()=>{const e=Ce({},n.codeBlockOptions||{});for(const a of["theme","themes","themeType","language","languages","stream","disableFileHeader","onThemeChange","renderCustomHeader","renderHeaderMetadata","renderHeaderPrefix","maxHeight","padding","tabSize"])delete e[a];if(!i.value)return e;const l=e.parseDiffOptions&&typeof e.parseDiffOptions=="object"?e.parseDiffOptions:{},t={diffStyle:"split",expandUnchanged:!1,collapsedContextThreshold:5,hunkSeparators:"line-info",parseDiffOptions:{context:2}};return Nl(Ce(Ce({},t),e),{parseDiffOptions:Ce(Ce({},t.parseDiffOptions),l)})}),ln=m(()=>{return(n.theme!==void 0?(e=n.theme)&&typeof e=="object"&&"light"in e&&"dark"in e:!Vn(n.darkTheme,n.lightTheme))?!!n.isDark:(function(l){var t;const a=(t=lt(l))!=null?t:"";return ho(a,n.isDark===!0)})(ol());var e}),tn=m(()=>(i.value,ln.value?"dark":"light")),nn=m(()=>i.value?tn.value==="dark":ln.value),E=m(()=>po({darkTheme:n.darkTheme,isDark:n.isDark,lightTheme:n.lightTheme,theme:n.theme,themes:n.themes})),yl=m(()=>i.value?"diff":"single"),an=S(yl.value),me=S(!1),F=S(!1),nl=S(!1),de=S(!1),Ae=S(null),xt=S(0),on=S(0),Rl=S(!1);let bl=null,Ue=!1,St=null,Ct=!1;const jl=m(()=>{var e;return!!i.value&&((e=gl.value)==null?void 0:e.diffStyle)==="unified"}),rn=m(()=>so(gl.value));function un(e){return El?.value===!0||!!e&&(!!e.closest('[data-markstream-virtual-timeline="1"], .markstream-virtual-timeline')||!!e.closest(".vue-recycle-scroller, [data-virtualizer], [data-virtual-scroll-root]"))}const pa=m(()=>un(ne.value)),ze=m(()=>!(me.value||!de.value&&F.value)),sn=m(()=>ze.value),ga=m(()=>ze.value&&!nl.value),ya=m(()=>!me.value&&!de.value&&ze.value),ba=m(()=>F.value&&!me.value?"ready":de.value?"fallback":"pending"),ql=S(!1),$e=m(()=>en(n.node.code)),dn=m(()=>i.value?n.node.diff===!0?n.node:Nl(Ce({},n.node),{diff:!0}):$e.value===n.node.code?n.node:Nl(Ce({},n.node),{code:$e.value}));function Mt(e){const l=e.detectLanguage;typeof l=="function"&&(Zt=l),ml=e,Pe=Un();const t=e.createCodeBlockRuntime(Pe);return!!t&&(ae=t.createEditor||ae,Tl=t.createDiffEditor||Tl,mt=t.updateCode||mt,zl=t.updateDiff||zl,ht=t.finalizeCode||ht,pt=t.finalizeDiff||pt,fl=t.getEditor||fl,ie=t.getEditorView||ie,Y=t.getDiffEditorView||Y,gt=t.cleanupEditor||gt,We=t.safeClean||t.cleanupEditor||We,yt=t.refreshDiffPresentation||yt,bt=t.setTheme||bt,tl=t.whenVisualReady||null,el.value=!0,!0)}const Bt=no,wa=bo,ue=S(typeof((he=n.codeBlockOptions)==null?void 0:he.fontSize)=="number"?n.codeBlockOptions.fontSize:Number.NaN),T=S(ue.value),Pt=S(null),Il=S(null),wl=S(null),Ye=S(null),ka=m(()=>{const e=ue.value,l=T.value;return typeof e=="number"&&Number.isFinite(e)&&e>0&&typeof l=="number"&&Number.isFinite(l)&&l>0}),Vl=m(()=>{var e;const l=(e=n.codeBlockOptions)==null?void 0:e.fontSize;if(typeof l=="number"&&Number.isFinite(l)&&l>0)return l;const t=T.value;return typeof t=="number"&&Number.isFinite(t)&&t>0?t:Bt}),xa=m(()=>{var e;const l=(e=n.codeBlockOptions)==null?void 0:e.lineHeight;return typeof l=="number"&&Number.isFinite(l)&&l>0?l:Vl.value===Bt?wa:Math.max(12,Math.round(1.5*Vl.value))}),Wl=m(()=>xa.value),fn=m(()=>{var e;const l=(e=n.codeBlockOptions)==null?void 0:e.tabSize;return typeof l=="number"&&Number.isFinite(l)&&l>0?l:4}),Al=m(()=>{var e;const l=(e=n.codeBlockOptions)==null?void 0:e.padding,t=typeof l=="number"&&Number.isFinite(l)&&l>=0?l:8;return{top:t,bottom:t}}),$t=m(()=>{const e=fo(n.codeBlockOptions);return Nl(Ce({},e),{fontSize:Vl.value,lineHeight:Wl.value,maxHeight:Bl(),padding:Al.value.top,paddingBottom:Al.value.bottom,tabSize:fn.value})}),Ul=m(()=>{const e=n.estimatedContentHeightPx;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:null});function Yl(e){if(e==null)return null;const l=Math.ceil(e);return!Number.isFinite(l)||l<=0?null:Math.min(l,Math.ceil(Bl()))}function cn(){return!i.value&&n.stream!==!1&&n.loading!==!1}const kl=S(cn());function Gl(){return cn()||kl.value}const vn=m(()=>i.value?null:Ul.value==null||Gl()?Math.ceil((e=>{const l=String(e??"");if(!l)return 1;let t=1;for(let a=0;a{if(i.value)return null;const e=Ul.value;return e==null||Gl()?Yl(vn.value):Yl(e)}),Sa=m(()=>{const e=n.estimatedHeightPx;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:null}),Jl=S(null);function Ge(){const e=Jl.value;return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.round(e):null}const Ht=m(()=>{const e=Ge();return e??(!i.value&&Rl.value?null:ze.value||!F.value?mn.value:null)});function hn(e){const l=e?"hsl(152 42% 60%)":"var(--diff-added-fg)",t=e?"hsl(0 58% 58%)":"var(--diff-removed-fg)",a=e?"color-mix(in lab, #121212 80%, #4d9375)":"color-mix(in lab, #ffffff 88%, #1e754f)",o=e?"color-mix(in lab, #121212 80%, #cb7676)":"color-mix(in lab, #ffffff 88%, #ab5959)";return{"--markstream-diff-line-number-bg":"var(--markstream-diff-editor-bg)","--markstream-diff-added-fg":l,"--markstream-diff-removed-fg":t,"--markstream-diff-added-line":a,"--markstream-diff-removed-line":o,"--markstream-diff-added-line-fill":a,"--markstream-diff-added-number-fill":e?"color-mix(in lab, #121212 85%, #4d9375)":"color-mix(in lab, #ffffff 91%, #1e754f)","--markstream-diff-removed-line-fill":o,"--markstream-diff-removed-number-fill":e?"color-mix(in lab, #121212 85%, #cb7676)":"color-mix(in lab, #ffffff 91%, #ab5959)","--markstream-diff-added-gutter":`linear-gradient(90deg, ${l} 0 4px, transparent 4px 100%)`,"--markstream-diff-removed-gutter":`linear-gradient(90deg, ${t} 0 4px, transparent 4px 100%)`,"--markstream-diff-added-inline":e?"hsl(152 42% 60% / 0.28)":"var(--diff-added-inline-bg)","--markstream-diff-removed-inline":e?"hsl(0 58% 58% / 0.28)":"var(--diff-removed-inline-bg)"}}const pn=m(()=>{const e=Yl(Ul.value),l=Yl(vn.value),t=Gl(),a=Ce({},i.value||e==null||t?i.value||l==null?{}:{minHeight:`${l}px`}:{height:`${e}px`,minHeight:`${e}px`});if(a["--markstream-code-fallback-bg"]=E.value.background,a["--markstream-code-fallback-fg"]=E.value.foreground,E.value.builtin&&(a["--markstream-code-theme-bg"]=E.value.background,a["--markstream-code-theme-fg"]=E.value.foreground,a["--markstream-code-theme-line-number"]=E.value.lineNumber),a["--markstream-pre-line-number-top"]=`${Al.value.top}px`,a["--markstream-pre-line-number-left"]="0px",a["--markstream-pre-line-number-padding-left"]="2ch",a["--markstream-pre-line-number-padding-right"]="1ch",a["--markstream-pre-line-number-separator-width"]="2px",i.value){a["--markstream-pre-diff-line-height"]=`${Wl.value}px`,a["--markstream-pre-diff-pane-bottom-padding"]=(jl.value,"0px");const o=Ye.value;o!=null&&o>0&&(a.height=`${o}px`,a.minHeight=`${o}px`,a.maxHeight=`${o}px`),Object.assign(a,hn(nn.value))}return a}),gn=m(()=>Ht.value!=null&&(!F.value||Ge()!=null)),Ca=m(()=>{const e=Ht.value;if(e==null)return null;if(i.value)return Math.ceil(e);const l=Sa.value,t=Ul.value;if(l==null||t==null)return Math.ceil(e);const a=Math.max(0,Math.ceil(l)-Math.ceil(t));return Math.ceil(e+a)}),Ma=m(()=>{if(i.value&&ze.value)return{};const e=Ht.value;return gn.value&&e!=null?{minHeight:`${e}px`}:{}});function yn(){Jl.value=null}function bn(){var e,l,t,a,o,d,r,u;const c=(e=ne.value)==null?void 0:e.querySelector("pre.code-pre-fallback"),s=Y(),v=(l=c?.scrollTop)!=null?l:0;(o=(a=(t=s?.getOriginalEditor)==null?void 0:t.call(s))==null?void 0:a.setScrollTop)==null||o.call(a,v),(u=(r=(d=s?.getModifiedEditor)==null?void 0:d.call(s))==null?void 0:r.setScrollTop)==null||u.call(r,v)}function wn(){return D(this,null,function*(){return i.value?(Et(),xl(),X(!0),bn(),ye(),nl.value=!0,yield O(),X(!0),yield ke(),X(!0),Ml(),xl(),!!(yield(function(){return D(this,null,function*(){var e;if(!i.value)return!0;for(let l=0;l<4;l++){const t=xl();X(!0),Ot(t),Ba(t),yield O(),yield ke();const a=(e=ne.value)==null?void 0:e.querySelector("pre.code-pre-fallback");if(!a)return!1;if(t==null)return Ql();const o=a.getBoundingClientRect().height;if(o>0&&Math.abs(o-t)<=2)return!0}return!1})})())&&(F.value=!0,yield O(),xl(),X(!0),Ml(),ye(),se(()=>{p||se(()=>{p||((function(){var e,l;const t=(e=ne.value)==null?void 0:e.querySelector(".code-block-shell-content"),a=(l=ne.value)==null?void 0:l.querySelector(".code-editor-layer");t&&a&&(a.style.removeProperty("height"),a.style.removeProperty("min-height"),t.style.removeProperty("height"),t.style.removeProperty("min-height"))})(),fe(!0))})}),fe(),!0)):!(tl&&!(yield tl())||(nl.value=!0,yield O(),X(!0),F.value=!0,yield O(),fe(),0))})}function Ot(e){var l;if(!i.value)return;const t=h.value,a=(l=ne.value)==null?void 0:l.querySelector("pre.code-pre-fallback");if(!t||!a)return;const o=e??Number.parseFloat(t.style.height||"");if(!Number.isFinite(o)||o<=0)return;const d=Math.ceil(o),r=`${d}px`;Ye.value=d;const u=ne.value;u&&(u.dataset.markstreamDiffHandoffHeight=r),a.dataset.markstreamDiffHandoffHeight=r,a.style.setProperty("height",r),a.style.setProperty("min-height",r)}function Ba(e){var l,t,a;if(!i.value)return;const o=(l=ne.value)==null?void 0:l.querySelector(".code-block-shell-content"),d=(t=ne.value)==null?void 0:t.querySelector(".code-editor-layer");if(!o||!d)return;const r=typeof e=="number"&&Number.isFinite(e)&&e>0?Math.ceil(e):Number.parseFloat(((a=h.value)==null?void 0:a.style.height)||"");if(!Number.isFinite(r)||r<=0)return;const u=`${r}px`;d.style.height=u,d.style.minHeight=u,o.style.height=u,o.style.minHeight=u}function xl(){const e=h.value;if(e&&Ql(e)){ye();const l=Cl(e);if(l!=null&&l>0){const t=Math.ceil(l),a=Math.ceil(Bl()),o=Math.min(t,a),d=`${o}px`;return e.style.height=d,e.style.minHeight="0px",e.style.maxHeight=`${a}px`,e.style.overflow=t>a+1?"auto":"hidden",ze.value&&(Ye.value=o,Ot(o)),Le(),o}return le({preferModelDiffHeight:!0}),Ot(),Le(),Number.parseFloat(e.style.height||"")||null}return Et()}function kn(e,l=!1,t={}){const a=Math.ceil(e),o=Ge();if(o==null)return a;const d=t.allowBelowEstimatedFloor===!0;return a>=o||d?((l||d)&&_.value&&yn(),a):o}function ke(){return new Promise(e=>{let l=!1,t=null,a=null;const o=()=>{l||(l=!0,a!=null&&globalThis.clearTimeout(a),t!=null&&at(t),e())};a=globalThis.setTimeout(o,50),t=se(o)})}function xn(){var e;try{const l=h.value;if(!l)return null;const t=(e=l.querySelector(".stream-diffs-shell .stream-diffs-surface"))!=null?e:l.querySelector(".stream-diffs-shell");if(t){const a=Math.ceil(t.getBoundingClientRect().height);if(a>0)return a}}catch{}return null}function Dt(){var e,l,t,a,o,d;try{const r=i.value?(t=(l=(e=Y())==null?void 0:e.getModifiedEditor)==null?void 0:l.call(e))!=null?t:Y():ie(),u=fl(),c=(a=u?.EditorOption)==null?void 0:a.fontInfo;if(r&&c!=null){const s=(o=r.getOption)==null?void 0:o.call(r,c),v=s?.fontSize;if(typeof v=="number"&&Number.isFinite(v)&&v>0)return v}}catch{}try{const r=h.value;if(r){const u=(d=r.querySelector(".stream-diffs-shell .stream-diffs-surface"))!=null?d:r.querySelector(".stream-diffs-shell");if(u)try{if(typeof window<"u"&&typeof window.getComputedStyle=="function"){const c=window.getComputedStyle(u).fontSize,s=c&&c.match(/^(\d+(?:\.\d+)?)/);if(s)return Number.parseFloat(s[1])}}catch{}}}catch{}return null}function al(e){var l,t;try{const d=fl(),r=(l=d?.EditorOption)==null?void 0:l.lineHeight;if(r!=null){const u=(t=e?.getOption)==null?void 0:t.call(e,r);if(typeof u=="number"&&u>0)return u}}catch{}const a=xn();if(a&&a>0)return a;const o=Number.isFinite(T.value)&&T.value>0?T.value:14;return Math.max(12,Math.round(1.35*o))}function Sn(){var e;const l=(e=n.codeBlockOptions)==null?void 0:e.padding;return typeof l=="number"&&Number.isFinite(l)?2*Math.max(0,l):i.value?24:0}function Cn(e){return!!dt.value||!!e&&(Se(e)||tl!=null)}function Sl(){var e,l;i.value?hl.value=xo(String((e=n.node.originalCode)!=null?e:""),String((l=n.node.updatedCode)!=null?l:"")):hl.value={removed:0,added:0}}function Nt(){var e;if(Number.isFinite(T.value)&&T.value>0&&Number.isFinite(ue.value))return T.value;if(typeof((e=n.codeBlockOptions)==null?void 0:e.fontSize)=="number")return ue.value=n.codeBlockOptions.fontSize,T.value=n.codeBlockOptions.fontSize,n.codeBlockOptions.fontSize;const l=Dt();return l&&l>0?(ue.value=l,T.value=l,l):(ue.value=12,T.value=12,12)}function Pa(){const e=Nt(),l=Math.min(36,e+1);T.value=l}function $a(){const e=Nt(),l=Math.max(10,e-1);T.value=l}function Ha(){Nt(),Number.isFinite(ue.value)&&(T.value=ue.value)}function Mn(){var e,l,t,a,o,d,r,u,c,s,v,g,y,j;try{const z=i.value?Y():null,f=i.value?z:ie();if(!f)return null;if(z?.getOriginalEditor&&z?.getModifiedEditor){const B=(e=z.getOriginalEditor)==null?void 0:e.call(z),x=(l=z.getModifiedEditor)==null?void 0:l.call(z);(t=B?.layout)==null||t.call(B),(a=x?.layout)==null||a.call(x);const P=((o=B?.getContentHeight)==null?void 0:o.call(B))||0,Z=((d=x?.getContentHeight)==null?void 0:d.call(x))||0,be=Math.max(P,Z);if(be>0)return Math.ceil(be);const te=((c=(u=(r=B?.getModel)==null?void 0:r.call(B))==null?void 0:u.getLineCount)==null?void 0:c.call(u))||1,L=((g=(v=(s=x?.getModel)==null?void 0:s.call(x))==null?void 0:v.getLineCount)==null?void 0:g.call(v))||1,$=Math.max(te,L),I=Math.max(al(B),al(x)),G=Sn();return Math.ceil($*I+G+0)}if(f?.getContentHeight){(y=f?.layout)==null||y.call(f);const B=f.getContentHeight();if(B>0)return i.value||(Rl.value=!0),Math.ceil(B)}const w=(j=f?.getModel)==null?void 0:j.call(f);let N=1;w&&typeof w.getLineCount=="function"&&(N=w.getLineCount());const q=al(f);return Math.ceil(N*(q+1.5)+0)}catch{return null}}function Bn(){var e,l;if(i.value)return!1;try{const t=(l=(e=ie())==null?void 0:e.getContentHeight)==null?void 0:l.call(e),a=typeof t=="number"&&Number.isFinite(t)&&t>0;return a&&(Rl.value=!0),a}catch{return!1}}function Cl(e){if(typeof window>"u")return null;try{if(window.getComputedStyle(e).display==="none")return null;const l=e.querySelector("diffs-container");if(l instanceof HTMLElement){const a=l.getBoundingClientRect();if(a.height>0)return Math.ceil(a.height)}const t=e.querySelector(".stream-diffs-shell");if(t){const a=t.getBoundingClientRect();if(a.height>0)return Math.ceil(a.height)}return null}catch{return null}}function Pn(e){var l;const t=String(e??"").trim(),a=(l=t.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i))==null?void 0:l[1];if(a){const c=a.length===3?a.split("").map(s=>`${s}${s}`).join(""):a;return .2126*Number.parseInt(c.slice(0,2),16)+.7152*Number.parseInt(c.slice(2,4),16)+.0722*Number.parseInt(c.slice(4,6),16)}const o=t.match(/\d+(?:\.\d+)?/g);if(!o||o.length<3)return null;const[d,r,u]=o.slice(0,3).map(Number);return .2126*d+.7152*r+.0722*u}function Ml(){var e,l,t;if($n())return;const a=Dt();a&&a>0&&(Pt.value=a,T.value=a,ue.value=a);try{const o=al(i.value?(t=(l=(e=Y())==null?void 0:e.getModifiedEditor)==null?void 0:l.call(e))!=null?t:Y():ie());o&&o>0&&(Il.value=o)}catch{}try{const o=xn();o&&o>0&&(Il.value=o)}catch{}}function $n(){return i.value&&sn.value}function Et(){var e;if(!ze.value)return null;const l=h.value,t=(e=ne.value)==null?void 0:e.querySelector("pre.code-pre-fallback");if(!l||!t)return null;const a=Math.ceil(t.getBoundingClientRect().height),o=i.value?Cl(l):null,d=Math.max(a,o!=null&&o>0?Math.ceil(o):0),r=Math.ceil(Bl()),u=Math.min(d,r);return!Number.isFinite(u)||u<=0?null:(i.value&&u>a&&(Ye.value=u),l.style.height=`${u}px`,l.style.minHeight=`${u}px`,l.style.maxHeight=`${r}px`,l.style.overflow=d>r+1?"auto":"hidden",u)}function Ft(){var e,l,t,a,o,d,r,u,c;const s=h.value,v=ne.value;if(!s||!v)return;const g=s;g.style.setProperty("--markstream-diff-metadata-bg",E.value.background),g.style.setProperty("--markstream-diff-metadata-fg",E.value.lineNumber),g.style.setProperty("--diffs-tab-size",String(fn.value)),g.style.setProperty("--diffs-scrollbar-gutter-override","0px"),typeof((e=n.codeBlockOptions)==null?void 0:e.padding)=="number"?g.style.setProperty("--diffs-gap-block",`${Al.value.top}px`):g.style.removeProperty("--diffs-gap-block");const y=s.querySelector(".stream-diffs-shell")||s,j=y,z=y;let f=null,w=null,N=null;try{typeof window<"u"&&typeof window.getComputedStyle=="function"&&(f=window.getComputedStyle(y),w=j===y?f:window.getComputedStyle(j),N=z===y?f:window.getComputedStyle(z))}catch{f=null,w=null,N=null}const q=String((l=f?.getPropertyValue("--vscode-editor-foreground"))!=null?l:"").trim(),B=String((t=f?.getPropertyValue("--vscode-editor-background"))!=null?t:"").trim(),x=String((o=(a=f?.getPropertyValue("--vscode-editor-selectionBackground"))!=null?a:f?.getPropertyValue("--vscode-editor-hoverHighlightBackground"))!=null?o:"").trim(),P=q||String((r=(d=N?.color)!=null?d:f?.color)!=null?r:"").trim(),Z=B||String((c=(u=w?.backgroundColor)!=null?u:f?.backgroundColor)!=null?c:"").trim(),be=(function(){var te,L,$,I,G;try{const ce=i.value?($=(L=(te=Y())==null?void 0:te.getModifiedEditor)==null?void 0:L.call(te))!=null?$:Y():ie(),oe=fl(),re=(I=oe?.EditorOption)==null?void 0:I.fontInfo;if(ce&&re!=null){const K=(G=ce.getOption)==null?void 0:G.call(ce,re),J=K?.typicalHalfwidthCharacterWidth;if(typeof J=="number"&&Number.isFinite(J)&&J>0)return J}}catch{}return null})();if(be!=null&&(wl.value=be),i.value){const te=(L,$)=>{$?(v.style.setProperty(L,$),g.style.setProperty(L,$)):(v.style.removeProperty(L),g.style.removeProperty(L))};for(const[L,$]of Object.entries(hn(v.classList.contains("is-dark"))))te(L,$);return P?(v.style.setProperty("--markstream-diff-editor-fg",P),g.style.setProperty("--vscode-editor-foreground",P)):(v.style.removeProperty("--markstream-diff-editor-fg"),g.style.removeProperty("--vscode-editor-foreground")),Z?(v.style.setProperty("--markstream-diff-editor-bg",Z),v.style.setProperty("--markstream-diff-panel-bg",Z),v.style.setProperty("--markstream-diff-panel-bg-soft",Z),v.style.setProperty("--markstream-diff-panel-bg-strong",Z),g.style.setProperty("--vscode-editor-background",Z),g.style.backgroundColor=Z):(v.style.removeProperty("--markstream-diff-editor-bg"),v.style.removeProperty("--markstream-diff-panel-bg"),v.style.removeProperty("--markstream-diff-panel-bg-soft"),v.style.removeProperty("--markstream-diff-panel-bg-strong"),g.style.removeProperty("--vscode-editor-background"),g.style.backgroundColor=""),void(x?g.style.setProperty("--vscode-editor-selectionBackground",x):g.style.removeProperty("--vscode-editor-selectionBackground"))}if((function(te,L,$){if(!dt.value)return!1;const I=Pn(te),G=Pn(L);return $?I!=null&&I>170||G!=null&&G<110:I!=null&&I<85||G!=null&&G>190})(Z,P,v.classList.contains("is-dark")))return g.style.removeProperty("--vscode-editor-foreground"),g.style.removeProperty("--vscode-editor-background"),void g.style.removeProperty("--vscode-editor-selectionBackground");P&&g.style.setProperty("--vscode-editor-foreground",P),Z&&g.style.setProperty("--vscode-editor-background",Z),x&&g.style.setProperty("--vscode-editor-selectionBackground",x)}A(()=>[n.stream,n.loading,n.node.loading,i.value],([e,l,t,a])=>{a||e===!1||l===!1||kl.value?(a||e===!1)&&kl.value&&(kl.value=!1):(kl.value=!0,yn())},{immediate:!0});let Tt=0,zt=0;const Hn=/auto|scroll|overlay/i;function xe(e,l,t){var a;if(typeof window>"u"||i.value||(function(v){return pa.value||un(v)})(e))return;const o=Math.ceil(l),d=Math.ceil(t)-o;if(Math.abs(d)<=1)return;const r=(function(v){var g,y;if(typeof window>"u")return null;const j=(g=v?.ownerDocument)!=null?g:document,z=j.scrollingElement||j.documentElement||j.body;let f=(y=v?.parentElement)!=null?y:null;for(;f&&f!==j.body&&f!==z;){const w=window.getComputedStyle(f),N=(w.overflowY||"").toLowerCase(),q=(w.overflow||"").toLowerCase();if(Hn.test(N)||Hn.test(q))return f;f=f.parentElement}return z})(e);if(!r)return;const u=(a=e.ownerDocument)!=null?a:document,c=r===u.body||r===u.documentElement||r===u.scrollingElement,s=c?0:r.getBoundingClientRect().top;e.getBoundingClientRect().top-s>=0||(c&&typeof window.scrollBy=="function"?window.scrollBy(0,d):r.scrollTop+=d)}function Lt(){try{const e=h.value;if(!e)return;const l=e.getBoundingClientRect().height,t=Mn();if(t!=null&&t>0){const o=kn(t,!0,{allowBelowEstimatedFloor:!i.value&&_.value&&Bn()}),d=Ge();return e.style.minHeight=d!=null?`${d}px`:"0px",e.style.height=`${o}px`,e.style.maxHeight="none",e.style.overflow="visible",void xe(e,l,o)}const a=Ge();a!=null&&(e.style.minHeight=`${a}px`,e.style.height=`${a}px`,e.style.maxHeight="none",e.style.overflow="visible",xe(e,l,a))}catch{}}function Je(){for(var e,l;Te.length>0;)try{(l=(e=Te.pop())==null?void 0:e.dispose)==null||l.call(e)}catch{}ll!=null&&(at(ll),ll=null),dl!=null&&(at(dl),dl=null),qe!=null&&(at(qe),qe=null),Ie=0,Ve=!1}function Qe(){for(var e;Kt.length>0;)try{(e=Kt.pop())==null||e()}catch{}}function le(e=!1){pe.value||(De.value?Lt():(function(l={}){try{const t=h.value;if(!t)return;const a=t.getBoundingClientRect().height,o=Math.ceil(a||0),d=Bl(),r=o,u=Number.parseFloat(t.style.height||""),c=r>0?r:Number.isFinite(u)&&u>0?Math.ceil(u):0,s=i.value?(function(){var x,P,Z,be,te,L,$,I,G,ce,oe,re;if(Se())return null;try{const K=Y(),J=(x=K?.getOriginalEditor)==null?void 0:x.call(K),rl=(P=K?.getModifiedEditor)==null?void 0:P.call(K);if(!J||!rl)return null;const qa=((te=(be=(Z=J.getModel)==null?void 0:Z.call(J))==null?void 0:be.getLineCount)==null?void 0:te.call(be))||1,Ia=((I=($=(L=rl.getModel)==null?void 0:L.call(rl))==null?void 0:$.getLineCount)==null?void 0:I.call($))||1,Va=Math.max(qa,Ia),Wa=Math.max(al(J),al(rl)),Aa=Sn(),Ua=Math.max((ce=(G=J.getContentHeight)==null?void 0:G.call(J))!=null?ce:0,(re=(oe=rl.getContentHeight)==null?void 0:oe.call(rl))!=null?re:0);return Math.ceil(Math.max(Ua,Va*Wa+Aa+0))}catch{return null}})():null,v=i.value&&Ql(t);if(ft>0&&(ft--,Ee.value!=null))return void xe(t,a,_e(t,Ee.value,d,{preserveScrollableOverflow:Rt(t)}));if(i.value&&!v&&ze.value){const x=Et();if(x!=null){const P=_e(t,x,d,{allowBelowEstimatedFloor:!0});return X(!0),void xe(t,a,P)}}const g=i.value&&l.preferModelDiffHeight===!0,y=i.value?Cl(t):null,j=!i.value&&_.value&&Bn(),z=i.value&&n.loading!==!1&&(y!=null||s!=null&&r>0&&s0&&s0&&s0?c:null:s;else w=Mn();if(i.value&&w!=null&&c>0&&(n.loading!==!1||l.holdCurrentDiffHeight===!0)&&(w=Math.max(w,c)),w!=null&&w>0)return void xe(t,a,_e(t,w,d,{clearEstimatedFloor:!0,allowBelowEstimatedFloor:j||z,preserveScrollableOverflow:Rt(t),renderedStreamingDiffHeight:y}));if(Ee.value!=null)return void xe(t,a,_e(t,Ee.value,d,{preserveScrollableOverflow:Rt(t)}));const N=i.value&&n.loading!==!1?r:Math.max(r,s!=null&&s>0?s:0);if(N>0)return void xe(t,a,_e(t,N,d));const q=Ge();if(!(q==null||i.value&&n.loading!==!1&&v))return void xe(t,a,_e(t,q,d));const B=Number.parseFloat(t.style.height);!Number.isNaN(B)&&B>0?xe(t,a,_e(t,B,d)):i.value||xe(t,a,_e(t,d,d))}catch{}})(typeof e=="object"?e:{}))}function On(){Tt=0,zt=0}function X(e=!1){var l,t,a;if(pe.value)return;const o=h.value;if(!o)return;const d=i.value?Y():ie();if(d&&typeof d.layout=="function")try{const r=(l=o.getBoundingClientRect)==null?void 0:l.call(o),u=Math.ceil(((t=r?.width)!=null?t:0)||o.clientWidth||0),c=Math.ceil(((a=r?.height)!=null?a:0)||o.clientHeight||Number.parseFloat(o.style.height||"")||0);if(u>0&&c>0){if(!e&&u===Tt&&c===zt)return;Tt=u,zt=c,d.layout({width:u,height:c})}else On(),d.layout()}catch{}}function ye(){Qe()}function fe(e=!1){if(p||ll!=null)return;const l=()=>{p||(ye(),le(e),X())};ll=se(()=>{ll=null,l(),dl=se(()=>{dl=null,l()})}),Le()}function Le(e=!1){if(!i.value||p||!e&&n.loading===!1||(Ve=Ve||e,Ie=Math.max(Ie,e?18:6),qe!=null))return;const l=()=>{if(qe=null,!i.value||p||Ie<=0||!Ve&&n.loading===!1)return Ie=0,void(Ve=!1);Ie--,ye(),le({preferModelDiffHeight:!0,holdCurrentDiffHeight:Ve}),X(),Ie>0?qe=se(l):Ve=!1};qe=se(l)}function _e(e,l,t,a={}){var o;const d=i.value&&n.loading!==!1,r="renderedStreamingDiffHeight"in a?d&&(o=a.renderedStreamingDiffHeight)!=null?o:null:d?Cl(e):null,u=r!=null&&r>l+1?r:l,c=Math.min(u,t),s=a.allowBelowEstimatedFloor===!0,v=kn(c,a.clearEstimatedFloor===!0,{allowBelowEstimatedFloor:s}),g=Ge();e.style.minHeight=g==null||s?"0px":`${Math.min(g,Math.ceil(t))}px`,e.style.height=`${v}px`,e.style.maxHeight=`${Math.ceil(t)}px`;const y=a.preserveScrollableOverflow===!0||u>t+1||_t(e,v);return e.style.overflow=y?"auto":"hidden",v}function _t(e,l=0){var t;const a=Math.ceil(((t=e.getBoundingClientRect)==null?void 0:t.call(e).height)||0),o=Math.max(l,e.clientHeight||0,a);return o>0&&e.scrollHeight>o+1}function Rt(e){var l;return ct||_t(e,(l=Ee.value)!=null?l:0)}function Ql(e=h.value){return Se(e)}function Dn(e=h.value){return Se(e)}function Nn(){var e,l;if(Se())return!0;const t=(l=(e=ie())==null?void 0:e.getModel)==null?void 0:l.call(e);return typeof t?.getValue=="function"&&t.getValue()===$e.value}function Se(e=h.value){return!!e?.querySelector("diffs-container")}function En(){return n.loading!==!1||F.value}function Oa(){const e=Y();return typeof e?.getOriginalEditor=="function"||typeof e?.getModifiedEditor=="function"||typeof e?.getLineChanges=="function"}function Fn(){return D(this,null,function*(){if(!i.value)return!0;for(let e=0;e<30;e++){if(p)return!1;if(Se())return yield O(),yield ke(),!p&&Se();yield O(),yield ke()}return!1})}let jt="";function Tn(e,l,t){return D(this,null,function*(){const a=`${e}\0${l}\0${t}`;if(jt!==a){try{return yield zl(e,l,t),void(jt=a)}catch(o){if(!pl(o))throw o}if(yield O(),yield ke(),!p&&i.value)try{yield zl(e,l,t),jt=a}catch(o){if(!pl(o))throw o}}})}function Bl(){var e,l;return(l=(e=n.codeBlockOptions)==null?void 0:e.maxHeight)!=null?l:500}const qt=m(()=>n.isShowPreview&&(we.value==="html"||we.value==="svg"));function Re(){return typeof n.node.loading=="boolean"?n.node.loading:n.loading===!0}function zn(e,l,t){return!t||(function(){var a,o,d;if(!Re())return!0;const r=String((a=n.node.raw)!=null?a:""),u=(d=(o=r.split(/\r\n|\n|\r/,1)[0])==null?void 0:o.trimStart())!=null?d:"";return!/^(?:`{3,}|~{3,})/.test(u)||/\r\n|\n|\r/.test(r)})()&&String(l??"")?Qn(String(e??"")):"plain"}function Xl(){return Re()}let Xe=null,Zl=!1,Kl=0;function Ln(){Xe=null,Kl++}function _n(){return D(this,arguments,function*(e=Kl){if(!Zl){Zl=!0;try{for(;Xe&&!p&&!i.value&&e===Kl;){const l=Xe;Xe=null;try{yield Promise.resolve(mt(l.code,l.language)),yield O(),p||i.value||(le(!1),X())}catch{}}}finally{Zl=!1,!Xe||p||i.value||_n()}}})}function Rn(e,l){Xe={code:e,language:l},_n(Kl)}A(()=>[n.node.language,n.node.code,n.node.raw,n.node.loading,n.loading],([e,l,t,a,o])=>{we.value=zn(e,l,typeof a=="boolean"?a:o===!0)}),A(()=>[n.node.originalCode,n.node.updatedCode,i.value],()=>{se(()=>Sl())},{immediate:!0});let et=0;A(()=>[n.node.originalCode,n.node.updatedCode,Me.value,i.value,n.stream],e=>D(null,[e],function*([,,,l,t]){var a,o;const d=++et;if(!l||Re()||t===!1&&!V.value)return;if(t!==!1&&ae&&!V.value&&h.value)try{yield He(h.value)}catch{}const r=cl;if(r&&!ge.value){try{yield r}catch{}if(p||!i.value||d!==et)return}if(d!==et)return;const u=kt(String((a=n.node.originalCode)!=null?a:""),String((o=n.node.updatedCode)!=null?o:"")),c=n.loading===!1;c&&Ze();try{if(yield Tn(u.original,u.updated,Me.value),p||!i.value||d!==et)return;yield O(),X(!0),ye(),le(n.loading===!1||{preferModelDiffHeight:!0}),X(!0),fe(!0)}catch{return}if(c){if(p||!i.value)return;_l(),ye(),Sl(),fe(),Le(!0)}De.value&&se(()=>Lt())})),A(()=>n.node.code,e=>D(null,null,function*(){if(Re()||n.stream===!1||(we.value||(we.value=Qn(Zt(e))),i.value))return;const l=cl;if(l&&!ge.value){try{yield l}catch{}if(p||i.value)return}if(ae&&!V.value&&h.value)try{yield He(h.value)}catch{}Rn(en(n.node.code),Me.value),De.value&&se(()=>Lt())}));const Da=m(()=>{const e=we.value;return e?Kn[e]||e.charAt(0).toUpperCase()+e.slice(1):Kn[""]||"Plain Text"}),jn=m(()=>{var e;return go(String((e=n.node.raw)!=null?e:""),Da.value,i.value)}),Na=m(()=>jn.value.title),qn=m(()=>jn.value.caption),Ea=m(()=>(co.value,Mo(we.value||"",da))),Fa=m(()=>{const e={};e["--markstream-code-layout-character-width"]=wl.value==null?"1ch":`${wl.value}px`,e["--markstream-code-fallback-bg"]=E.value.background,e["--markstream-code-fallback-fg"]=E.value.foreground,E.value.builtin&&(e["--markstream-code-theme-bg"]=E.value.background,e["--markstream-code-theme-fg"]=E.value.foreground,e["--markstream-code-theme-line-number"]=E.value.lineNumber),e["--markstream-diff-added-line-fill"]=E.value.diffAddedLine,e["--markstream-diff-added-number-fill"]=E.value.diffAddedNumber,e["--markstream-diff-editor-bg"]=E.value.background,e["--markstream-diff-removed-line-fill"]=E.value.diffRemovedLine,e["--markstream-diff-removed-number-fill"]=E.value.diffRemovedNumber,e["--markstream-diff-shell-bg"]=E.value.background,e["--markstream-pre-resolved-theme-bg"]=E.value.background,e["--markstream-pre-resolved-theme-fg"]=E.value.foreground,e["--markstream-pre-resolved-theme-line-number"]=E.value.lineNumber;const l=o=>{if(o!=null)return typeof o=="number"?`${o}px`:String(o)},t=l(n.minWidth),a=l(n.maxWidth);if(t&&(e.minWidth=t),a&&(e.maxWidth=a),gn.value&&!i.value&&!pe.value){const o=Ca.value;o!=null&&(e.minHeight=`${o}px`)}return e.color="var(--markstream-code-fallback-fg, var(--markstream-code-theme-fg, var(--markstream-pre-resolved-theme-fg)))",e.backgroundColor="var(--markstream-code-fallback-bg, var(--markstream-code-theme-bg, var(--markstream-pre-resolved-theme-bg)))",i.value||(e.borderColor="var(--markstream-code-border-color, var(--code-border))"),e}),Ta=m(()=>n.showTooltips!==!1);function za(){return D(this,null,function*(){const e=n.node.code;try{n.clipboardWriter?yield n.clipboardWriter(e):typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(e)),ut.value=!0,k("copy",e),setTimeout(()=>{ut.value=!1},1e3)}catch(l){console.error("复制失败:",l)}})}function La(){De.value=!De.value;const e=i.value?Y():ie(),l=h.value;e&&l&&(De.value?(l.style.maxHeight="none",l.style.overflow="visible",le(!0)):(l.style.overflow="auto",le(!0)))}function _a(){var e,l;if(pe.value=!pe.value,pe.value){if(ct=!1,h.value){const t=Math.ceil(((l=(e=h.value).getBoundingClientRect)==null?void 0:l.call(e).height)||0);ct=_t(h.value,t)||h.value.style.overflow==="auto"||h.value.style.overflowY==="auto",t>0&&(Ee.value=t)}}else h.value&&Ee.value!=null&&(h.value.style.height=`${Ee.value}px`),ft=2,O(()=>{pe.value||p||(le(!0),X(!0))})}function Ra(){if(!qt.value)return;const e=we.value;if(Jt.value){const l=e==="html"?"text/html":"image/svg+xml",t=e==="html"?Qt("artifacts.htmlPreviewTitle")||"HTML Preview":Qt("artifacts.svgPreviewTitle")||"SVG Preview";return void k("previewCode",{node:n.node,artifactType:l,artifactTitle:t,id:`temp-${e}-${Date.now()}`})}e==="html"&&(ql.value=!ql.value)}function He(e,l={}){if(!ae||p||n.stream===!1&&n.loading!==!1||(Vt(),Gn())||me.value||h.value!==e||Xl())return null;if(Be)return Be;if(V.value&&_.value)return Promise.resolve();const t=It(),a=xt.value;let o=!1;V.value=!0,(function(){const r=fa.value;Q&&r&&Ne!==r&&(Ne&&Q.markSettled(Ne),Ne=r,Q.markPending(r))})();const d=D(null,null,function*(){try{yield(function(r){return D(this,null,function*(){var u,c;if(!ae||p)return;sl=!1;const s=yl.value;if(Ct=!1,de.value=!1,Ae.value=null,ge.value=!1,F.value=!1,nl.value=!1,Pt.value=null,Il.value=null,wl.value=null,Ye.value=null,On(),(function(){if(Rl.value=!1,Gl())return void(Jl.value=null);const f=mn.value;Jl.value=_.value||f==null?null:f})(),Je(),Qe(),(function(f){f.replaceChildren()})(r),Ze(),yield ea(An()),p)return;const v=D(null,null,function*(){var f,w;if(s==="diff"){(function(){if(wt||typeof window>"u")return;wt=!0;const q=B=>{var x;pl("reason"in B?B.reason:(x=B.error)!=null?x:B.message)&&(B.preventDefault(),B.stopImmediatePropagation())};window.addEventListener("error",q,!0),window.addEventListener("unhandledrejection",q,!0),Ll=()=>{window.removeEventListener("error",q,!0),window.removeEventListener("unhandledrejection",q,!0),wt=!1,Ll=null}})(),We();const N=kt(String((f=n.node.originalCode)!=null?f:""),String((w=n.node.updatedCode)!=null?w:""));Tl?yield Tl(r,N.original,N.updated,Me.value):yield ae(r,n.node.code,Me.value)}else yield ae(r,$e.value,Me.value);ge.value=!0}),g=v.finally(()=>{cl===g&&(cl=null)});if(cl=g,yield(function(f){return D(this,null,function*(){if(!i.value)return void(yield f);let w,N=!1;for(f.then(()=>{N=!0},q=>{N=!0,w=q});;){if(p)return;if(N){if(w)throw w;return}if(Ql()&&Oa())return;yield O(),yield ke()}})})(g),p||yl.value!==s)return;ge.value=!0;const y=(u=n.codeBlockOptions)==null?void 0:u.fontSize;if(typeof y=="number"&&Number.isFinite(y)&&y>0){const f=s==="diff"?Y():ie();(c=f?.updateOptions)==null||c.call(f,{fontSize:y}),ue.value=y,T.value=y}else if(!$n()){const f=Dt();f&&f>0?(ue.value=f,T.value=f):(ue.value=12,T.value=12)}for(Ml();sl;)if(sl=!1,yield Wn(),p)return;De.value||pe.value||le(!1),_.value=!0,an.value=s,(function(){var f,w,N,q,B;if(Je(),i.value){const P=Y(),Z=(f=P?.getOriginalEditor)==null?void 0:f.call(P),be=(w=P?.getModifiedEditor)==null?void 0:w.call(P),te=($,I)=>{try{const G=$?.[I];if(typeof G!="function")return;const ce=G.call($,()=>fe());ce&&Te.push(ce)}catch{}};try{const $=(N=P?.onDidUpdateDiff)==null?void 0:N.call(P,()=>{fe(),se(()=>Sl())});$&&Te.push($)}catch{}te(Z,"onDidContentSizeChange"),te(be,"onDidContentSizeChange");const L=h.value;if(L&&typeof MutationObserver<"u"){const $=["diffs-container",".stream-diffs-shell",".stream-diffs-surface"].join(","),I=oe=>{var re;const K=oe instanceof HTMLElement?oe:oe.parentElement;return!!((re=K?.closest)!=null&&re.call(K,$))},G=oe=>{var re,K;const J=oe instanceof HTMLElement?oe:oe.parentElement;return!!((re=J?.closest)!=null&&re.call(J,$)||(K=J?.querySelector)!=null&&K.call(J,$))},ce=new MutationObserver(oe=>{i.value&&En()&&oe.some(re=>I(re.target)||Array.from(re.addedNodes).some(G)||Array.from(re.removedNodes).some(I))&&(ye(),le({preferModelDiffHeight:!0}),X(),Le())});ce.observe(L,{attributeFilter:["class"],attributes:!0,childList:!0,characterData:!0,subtree:!0}),Te.push({dispose:()=>ce.disconnect()})}if(L&&typeof ResizeObserver<"u"){const $=new ResizeObserver(()=>{if(!i.value||(X(),!En()))return;const I=Cl(L);I!=null&&(Math.ceil(L.getBoundingClientRect().height||0)<=I+1||(ye(),le({preferModelDiffHeight:!0}),X()))});$.observe(L),Te.push({dispose:()=>$.disconnect()})}return}const x=ie();try{const P=(q=x?.onDidContentSizeChange)==null?void 0:q.call(x,()=>fe());P&&Te.push(P)}catch{}try{const P=(B=x?.onDidLayoutChange)==null?void 0:B.call(x,()=>fe());P&&Te.push(P)}catch{}})(),Ft(),Ml(),ye(),Sl(),fe(),yield O();let j=null;tl&&(j=yield tl(),j&&(yield O(),yield ke()));const z=j??(s==="diff"?yield Fn():yield(function(){return D(this,null,function*(){if(Se())return yield O(),yield ke(),Se();for(let f=0;f<30;f++){if(p||i.value)return!1;const w=h.value,N=Nn(),q=Dn(w),B=!$e.value.trim()||Cn(w);if(N&&q&&B&&(yield O(),yield ke(),!p&&!i.value&&Nn()&&Dn(h.value)&&(!$e.value.trim()||Cn(h.value))))return!0;yield O(),yield ke()}return!1})})());p||(z?(Ml(),xl(),(yield wn())||Oe()):Oe())})})(e),bl=null}catch(r){const u=It(),c=a!==xt.value,s=l.allowStaleContentRetry!==!1&&c&&bl!==u;if(t!==u||s)return s&&(bl=u),o=!0,V.value=!1,_.value=!1,ge.value=!1,void(F.value=!1);throw Oe(t),r}}).finally(()=>{Be===d&&(Be=null),(function(){const r=Ne;Q&&r&&(Ne="",O(()=>{var u,c;if(!p){const s=(c=(u=ne.value)==null?void 0:u.offsetHeight)!=null?c:0;s>0&&Q.reportHeight(r,s)}Q.markSettled(r)}))})(),o&&!p&&queueMicrotask(()=>{var r;const u=h.value;u&&!p&&((r=He(u))==null||r.catch(c=>{_.value=!1,F.value=!1,Oe()}))})});return Be=d,d}A(Ta,e=>{e||to()}),A(()=>T.value,(e,l)=>{var t;const a=i.value?Y():ie();a&&typeof e=="number"&&Number.isFinite(e)&&e>0&&((t=a.updateOptions)==null||t.call(a,{fontSize:e}),pe.value||le(!0))},{flush:"post",immediate:!1});let In=0;const ja=A(()=>[h.value,i.value,n.stream,n.loading,el.value,W.value,n.node.language,n.node.raw,n.node.code,n.node.loading],e=>D(null,[e],function*([l,t,a,o,d,r]){const u=++In;if(!l||!r||Re()||Ue||a===!1&&o!==!1||!ae&&(yield(function(){return D(this,null,function*(){if(typeof window>"u"||p||el.value||me.value)return;if(vl)return vl;const s=D(null,null,function*(){try{const v=yield Bo();if(p)return;if(!v)return void(me.value=!0);Mt(v)}catch{if(p)return;me.value=!0}}).finally(()=>{vl===s&&(vl=null)});return vl=s,s})})(),u!==In||n.stream===!1&&n.loading!==!1||Xl()||!W.value||!ae||me.value||V.value||Gn()||p||h.value!==l)||Xl())return;const c=He(l);if(c){try{yield c}catch{_.value=!1,F.value=!1,Oe()}_.value&&F.value&&ja()}}));function lt(e){return typeof e=="string"?e:null}function Vn(e,l){if(e===l)return!0;const t=lt(e),a=lt(l);return!!t&&t===a}function ol(){return vo({darkTheme:n.darkTheme,isDark:n.isDark,lightTheme:n.lightTheme,theme:n.theme,themes:n.themes})}function Wn(){return D(this,arguments,function*(e={}){Ze();const l=()=>{i.value&&_l(),se(()=>{Ft(),fe()})};if(e.appearanceOnly)return void l();const t=ol();if(t)try{yield ea(An()),yield bt(t),l()}catch{}else l()})}function An(){const e=n.themes;return e&&typeof e[0]=="string"&&typeof e[1]=="string"?{dark:e[0],light:e[1]}:ol()}function Un(){var e,l,t,a,o;const d=$t.value,r=Nl(Ce({},gl.value||{}),{wordWrap:d.overflow==="wrap"?"on":"off",overflow:d.overflow,themes:n.themes,stream:!1,MAX_HEIGHT:(l=(e=n.codeBlockOptions)==null?void 0:e.maxHeight)!=null?l:500,fontSize:Vl.value,lineHeight:Wl.value,theme:ol(),themeType:n.isDark?"dark":"light",disableLineNumbers:!H.value,disableFileHeader:!0,workerManager:(o=(a=(t=gl.value)==null?void 0:t.workerManager)!=null?a:yo())!=null?o:void 0,onThemeChange(){Ft()}}),u=(function(){var g;const y=(g=gl.value)==null?void 0:g.fontFamily;return typeof y=="string"&&y.trim()?y.trim():i.value?(function(){var j;if(typeof window>"u")return;const z=(j=ne.value)==null?void 0:j.querySelector("pre.code-pre-fallback");if(z)return window.getComputedStyle(z).fontFamily.trim()||void 0})():void 0})();u&&(r.fontFamily!=null||(r.fontFamily=u));const c=typeof r.unsafeCSS=="string"?r.unsafeCSS:"",s=` +[data-file] [data-line], +[data-diff] [data-line] { + white-space: ${(v=d.overflow)==="wrap"?"pre-wrap":"pre"} !important; + overflow-wrap: ${v==="wrap"?"anywhere":"normal"} !important; + word-break: normal !important; +}`;var v;return r.unsafeCSS=`[data-file], [data-diff] { --diffs-min-number-column-width-default: 2ch !important; } +${s} + +[data-no-newline], +[data-gutter-buffer="metadata"] { + --diffs-computed-decoration-bg: var(--markstream-diff-metadata-bg) !important; + --diffs-computed-diff-line-bg: var(--markstream-diff-metadata-bg) !important; + --diffs-computed-selected-line-bg: var(--markstream-diff-metadata-bg) !important; + --diffs-line-bg: var(--markstream-diff-metadata-bg) !important; + color: var(--markstream-diff-metadata-fg) !important; + background-color: var(--markstream-diff-metadata-bg) !important; +} +${c}`.trim(),r}function Ze(){const e=Un();if(!Pe)return Pe=e,Pe;for(const l of Object.keys(Pe))l in e||delete Pe[l];return Object.assign(Pe,e),Pe}A(yl,(e,l)=>D(null,null,function*(){if(e===l||de.value||Ue||(Ln(),!ae||!h.value)||!V.value||n.stream===!1&&n.loading!==!1||!W.value)return;const t=Be;if(t){try{yield t}catch{}if(p||!h.value)return}if(an.value!==e||!V.value||!_.value)try{_.value=!1,F.value=!1,V.value=!1,ge.value=!1,Je(),Qe(),We(),yield O(),yield He(h.value)}catch{_.value=!1,F.value=!1,Oe()}}));const tt=S(0),Yn=m(()=>String(tt.value));let Pl=!1;function It(){var e;const l=ol();return JSON.stringify({kind:yl.value,language:Me.value,structural:Yn.value,optionsRevision:tt.value,settledContentGeneration:on.value,theme:(e=lt(l))!=null?e:l==null?null:"custom",isDark:n.isDark})}A(()=>{var e;return(e=n.codeBlockOptions)==null?void 0:e.fontSize},e=>{const l=typeof e=="number"&&Number.isFinite(e)&&e>0?e:Bt;ue.value=l,T.value=l,Pt.value=null,Il.value=null,wl.value=null}),A(()=>[n.codeBlockOptions,n.showLineNumbers],()=>{tt.value+=1,n.stream===!1&&n.loading!==!1&&(Pl=!0)},{deep:!0}),A(()=>[$e.value,n.node.originalCode,n.node.updatedCode],()=>{xt.value+=1,Re()||(on.value+=1)});const Ke=m(()=>It());function Vt(){de.value&&Ae.value!==Ke.value&&(de.value=!1,Ae.value=null,bl=null,St=null,V.value=!1,_.value=!1,ge.value=!1,F.value=!1,nl.value=!1)}function Gn(){return Vt(),de.value&&Ae.value===Ke.value}function Oe(e=Ke.value){Ae.value=e,de.value=!0,nl.value=!1}return A(Ke,()=>D(null,null,function*(){if(Ue||!de.value||Ae.value===Ke.value||!ae||!h.value||me.value||p||!W.value||n.stream===!1&&n.loading!==!1||Xl())return;const e=Ke.value;Ue=!0;try{if(Vt(),de.value)return;yield He(h.value)}catch{_.value=!1,F.value=!1,Oe()}finally{St=e,yield O(),Ue=!1}})),A(()=>[n.codeBlockOptions,W.value],()=>{var e,l;if(Ze(),!ae||!W.value)return;const t=i.value?Y():ie(),a=typeof((e=n.codeBlockOptions)==null?void 0:e.fontSize)=="number"?n.codeBlockOptions.fontSize:Number.isFinite(T.value)?T.value:void 0;typeof a=="number"&&Number.isFinite(a)&&a>0&&((l=t?.updateOptions)==null||l.call(t,{fontSize:a})),le(!1)},{deep:!0}),A(()=>[ol(),tn.value,el.value,V.value,W.value],([e,l],t)=>{if(!el.value||!W.value)return;const a=t!=null&&Vn(e,t[0]),o=t!=null&&l!==t[1];_.value?(sl=!1,Wn({appearanceOnly:a})):a&&!o||(sl=!0)},{flush:"post"}),A(()=>[Yn.value,el.value,W.value],(e,l)=>D(null,[e,l],function*([t,a,o],[d]){if(Ze(),!a||!o||!ae||!h.value||!V.value||t===d)return;if(n.stream===!1&&n.loading!==!1)return void(Pl=!0);Pl=!1;const r=Be;if(r){try{yield r}catch{}if(p||!h.value)return}try{_.value=!1,F.value=!1,V.value=!1,ge.value=!1,Je(),Qe(),We(),ml&&Mt(ml),yield O(),yield He(h.value,{allowStaleContentRetry:!1})}catch{_.value=!1,F.value=!1,Oe()}}),{flush:"post"}),A(()=>[n.loading,W.value],([e,l])=>{e===!1&&l&&Pl&&(Pl=!1,tt.value+=1)},{flush:"post"}),A(()=>[n.loading,W.value],(e,l)=>D(null,[e,l],function*([t,a],o){if(!a)return;const d=o?.[0];if(d===!1&&t!==!1&&i.value&&V.value&&(yield O(),se(()=>{D(null,null,function*(){const u=Be;if(u)try{yield u}catch{}!p&&i.value&&n.loading!==!1&&(Ze(),_l(),fe())})})),t)return;const r=d!==void 0&&d!==!1;yield O(),se(()=>{D(null,null,function*(){var u,c;try{if(r&&(yield(function(){return D(this,null,function*(){if(!de.value||!ae||!h.value||me.value||p||!W.value)return!1;if(St===Ke.value)return!0;Ue=!0;try{de.value=!1,Ae.value=null,bl=null,V.value=!1,_.value=!1,ge.value=!1,F.value=!1,Je(),Qe(),We(),ml&&Mt(ml),yield O();try{yield He(h.value)}catch{_.value=!1,F.value=!1,Oe()}}finally{yield O(),Ue=!1}return!0})})()))return void le(!1);if(r&&i.value&&V.value&&Ct&&h.value)return Ct=!1,_.value=!1,F.value=!1,V.value=!1,ge.value=!1,Je(),Qe(),We(),yield O(),yield He(h.value,{allowStaleContentRetry:!1}),void Le(!0);if(r&&V.value)if(i.value&&h.value){const s=Be;if(s)try{yield s}catch{}Ze();const v=kt(String((u=n.node.originalCode)!=null?u:""),String((c=n.node.updatedCode)!=null?c:""));if(yield Tn(v.original,v.updated,Me.value),p||!i.value)return;yield Promise.resolve(pt()),_l(),X(!0),bn(),ye(),Sl();const g=yield Fn();p||!g||F.value||(yield wn()),fe(),Le(!0)}else Ln(),Rn($e.value,Me.value),yield new Promise(s=>{const v=()=>{p?s():Zl||Xe?setTimeout(v,16):s()};v()}),p||i.value||(yield Promise.resolve(ht()));r&&i.value?(le({preferModelDiffHeight:!0,holdCurrentDiffHeight:!0}),Le(!0)):le(!1)}catch{}})})}),{immediate:!0,flush:"post"}),ua(()=>{Je(),Qe(),gt(),Ll?.()}),(e,l)=>{var t;return me.value?(ul(),rt(la,{key:0,style:nt(pn.value),node:dn.value,loading:n.loading,"show-line-numbers":H.value,"diff-inline":jl.value,"diff-hide-unchanged-regions":rn.value,"code-block-options":n.codeBlockOptions,"resolved-visual-options":$t.value,"reserved-height-px":i.value&&(t=Ye.value)!=null?t:void 0,"is-dark":n.isDark,theme:n.theme,"dark-theme":n.darkTheme,"light-theme":n.lightTheme,themes:n.themes,"show-header":n.showHeader,"show-copy-button":n.showCopyButton,"clipboard-writer":n.clipboardWriter,"show-tooltips":n.showTooltips,onCopy:l[0]||(l[0]=a=>k("copy",a))},Xn({_:2},[e.$slots["header-left"]?{name:"header-left",fn:il(()=>[$l(e.$slots,"header-left",{},void 0,!0)]),key:"0"}:void 0,e.$slots["header-right"]?{name:"header-right",fn:il(()=>[$l(e.$slots,"header-right",{},void 0,!0)]),key:"1"}:void 0]),1032,["style","node","loading","show-line-numbers","diff-inline","diff-hide-unchanged-regions","code-block-options","resolved-visual-options","reserved-height-px","is-dark","theme","dark-theme","light-theme","themes","show-header","show-copy-button","clipboard-writer","show-tooltips"])):(ul(),Zn("div",{key:1,ref_key:"container",ref:ne,style:nt(Fa.value),class:it(["code-block-container rounded-lg border",[{dark:n.isDark,"is-rendering":n.loading,"is-dark":nn.value,"is-diff":i.value,"is-plain-text":dt.value}]]),"data-markstream-code-block":"1","data-markstream-enhanced":F.value&&!me.value?"true":"false","data-markstream-enhancement-state":ba.value,"data-markstream-code-block-state":Re()?"streaming":"settled","data-markstream-pending":ya.value?"true":void 0,"data-markstream-viewport-pending":Xt.value&&sa(vt)&&!W.value?"true":void 0},[ao(Co,{"show-header":n.showHeader,"show-collapse-button":n.showCollapseButton,"show-font-size-buttons":n.showFontSizeButtons,"enable-font-size-control":n.enableFontSizeControl,"show-copy-button":n.showCopyButton,"show-expand-button":n.showExpandButton,"show-preview-button":n.showPreviewButton,"show-tooltips":n.showTooltips,"is-dark":n.isDark,loading:n.loading,stream:C.stream,"is-collapsed":pe.value,"is-expanded":De.value,"copy-text":ut.value,"is-previewable":qt.value,"code-font-size":T.value,"code-font-min":10,"code-font-max":36,"default-code-font-size":ue.value,"font-baseline-ready":ka.value,"diff-stats":i.value?hl.value:null,"diff-stats-aria-label":ha.value,onToggleCollapse:_a,onDecreaseFont:$a,onResetFont:Ha,onIncreaseFont:Pa,onCopy:za,onToggleExpand:La,onPreview:Ra},Xn({"header-left":il(()=>[$l(e.$slots,"header-left",{},()=>[U("div",_o,[U("span",{class:"icon-slot h-4 w-4 flex-shrink-0",innerHTML:Ea.value},null,8,Ro),U("div",jo,[U("div",qo,Yt(Na.value),1),qn.value?(ul(),Zn("div",Io,Yt(qn.value),1)):At("",!0)])])],!0)]),loading:il(()=>[$l(e.$slots,"loading",{loading:C.loading,stream:C.stream},()=>[l[1]||(l[1]=U("div",{class:"loading-skeleton"},[U("div",{class:"skeleton-line"}),U("div",{class:"skeleton-line"}),U("div",{class:"skeleton-line short"})],-1))],!0)]),default:il(()=>{var a;return[oo(U("div",{class:it(["code-editor-layer",{"code-editor-layer--collapsed":pe.value}])},[U("div",{ref_key:"codeEditor",ref:h,class:it(["code-editor-container",C.stream?"":"code-height-placeholder"]),"data-markstream-host-hidden":ga.value?"true":void 0,style:nt(Ma.value)},null,14,Vo),sn.value?(ul(),rt(la,{key:0,style:nt(pn.value),node:dn.value,loading:n.loading,"show-line-numbers":H.value,"diff-inline":jl.value,"diff-hide-unchanged-regions":rn.value,"code-block-options":n.codeBlockOptions,"resolved-visual-options":$t.value,"reserved-height-px":i.value&&(a=Ye.value)!=null?a:void 0,"is-dark":n.isDark,theme:n.theme,"dark-theme":n.darkTheme,"light-theme":n.lightTheme,themes:n.themes,"show-toolbar":!1},null,8,["style","node","loading","show-line-numbers","diff-inline","diff-hide-unchanged-regions","code-block-options","resolved-visual-options","reserved-height-px","is-dark","theme","dark-theme","light-theme","themes"])):At("",!0)],2),[[ro,!!C.stream||!C.loading]]),ql.value&&!Jt.value&&qt.value&&we.value==="html"?(ul(),rt(zo,{key:0,code:n.node.code,"html-preview-allow-scripts":n.htmlPreviewAllowScripts,"html-preview-sandbox":n.htmlPreviewSandbox,"is-dark":n.isDark,"on-close":()=>ql.value=!1},null,8,["code","html-preview-allow-scripts","html-preview-sandbox","is-dark","on-close"])):At("",!0)]}),_:2},[e.$slots["header-right"]?{name:"header-right",fn:il(()=>[$l(e.$slots,"header-right",{},void 0,!0)]),key:"0"}:void 0]),1032,["show-header","show-collapse-button","show-font-size-buttons","enable-font-size-control","show-copy-button","show-expand-button","show-preview-button","show-tooltips","is-dark","loading","stream","is-collapsed","is-expanded","copy-text","is-previewable","code-font-size","default-code-font-size","font-baseline-ready","diff-stats","diff-stats-aria-label"])],14,Lo))}}}),[["__scopeId","data-v-2c9e024e"]]);export{Go as default}; diff --git a/apps/kimi-code/dist-web/assets/PreCodeBlock-txKBqZ4o.js b/apps/kimi-code/dist-web/assets/PreCodeBlock-txKBqZ4o.js new file mode 100644 index 000000000..a9ef3669b --- /dev/null +++ b/apps/kimi-code/dist-web/assets/PreCodeBlock-txKBqZ4o.js @@ -0,0 +1 @@ +import{M as ee,b$ as ne,aL as v,u as h,aY as H,v as t,bb as x,t as y,bk as u,aw as oe,bO as le,G as ie,I as G,bJ as A,F as I,ca as j,g as de,bL as W,bB as Y,au as se,aU as E,q as f,c9 as ce,d3 as ue,cf as te,d4 as me,d5 as pe,bl as ve,af as fe,ce as he,az as ge,A as be,d6 as Z,ar as X,s as we,d7 as ke,cp as ye,ch as q,ck as xe,co as Be,cs as J,cj as Ce}from"./index-BOtIzGLC.js";var Se=Object.defineProperty,Fe=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,D=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,Q=(a,d,e)=>d in a?Se(a,d,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[d]=e,N=(a,d)=>{for(var e in d||(d={}))ae.call(d,e)&&Q(a,e,d[e]);if(D)for(var e of D(d))re.call(d,e)&&Q(a,e,d[e]);return a},_=(a,d)=>Fe(a,Me(d)),K=(a,d,e)=>new Promise((g,b)=>{var z=m=>{try{w(e.next(m))}catch(C){b(C)}},T=m=>{try{w(e.throw(m))}catch(C){b(C)}},w=m=>m.done?g(m.value):Promise.resolve(m.value).then(z,T);w((e=e.apply(a,d)).next())});function ze(a,d){if(d===void 0)return ue(a);if(d){const g=d(a);if(g!=null&&g!=="")return g}const e=te(a);return me(e)||pe()}const Te={key:0,class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},Pe={class:"flex items-center gap-0.5"},je=["aria-label"],He={class:"code-diff-stat removed"},Oe={class:"code-diff-stat added"},$e=["aria-label"],Ne={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Ee={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Le=["aria-pressed"],Re={key:3,class:"relative"},_e=["aria-expanded"],Ae=["disabled"],De=["disabled"],Ve=["disabled"],Ue={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Ge={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Ie={class:"code-loading-placeholder"},We={class:"sr-only","aria-live":"polite",role:"status"},Ye=ee({__name:"CodeBlockShell",props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:["toggleCollapse","decreaseFont","resetFont","increaseFont","copy","toggleExpand","preview"],setup(a,{emit:d}){const e=a,g=d,b=E(!1),z=E(null),T=E(null);function w(){j(!0),b.value=!b.value,b.value&&document.addEventListener("click",C,{once:!0,capture:!0})}function m(){j(!0),b.value=!1}function C(p){var o,i;const R=p.target;(o=z.value)!=null&&o.contains(R)||(i=T.value)!=null&&i.contains(R)?document.addEventListener("click",C,{once:!0,capture:!0}):m()}const O=f(()=>e.showFontSizeButtons&&e.enableFontSizeControl||e.showExpandButton||e.isPreviewable&&e.showPreviewButton),{t:s}=ne(),$=f(()=>e.showTooltips!==!1);function S(p,o){$.value&&ce(p.currentTarget,o,"top",!1,void 0,e.isDark)}function F(){$.value&&j()}function P(p){S(p,e.copyText?s("common.copied")||"Copied":s("common.copy")||"Copy")}const V=f(()=>{var p,o;return!!Number.isFinite(e.codeFontSize)&&((p=e.codeFontSize)!=null?p:0)<=((o=e.codeFontMin)!=null?o:0)}),L=f(()=>!e.fontBaselineReady||e.codeFontSize===e.defaultCodeFontSize),r=f(()=>{var p,o;return!!Number.isFinite(e.codeFontSize)&&((p=e.codeFontSize)!=null?p:0)>=((o=e.codeFontMax)!=null?o:100)});return(p,o)=>(v(),h(I,null,[e.showHeader?(v(),h("div",Te,[H(p.$slots,"header-left"),H(p.$slots,"header-right",{},()=>[t("div",Pe,[a.diffStats?(v(),h("div",{key:0,class:"code-diff-stats","aria-label":a.diffStatsAriaLabel},[t("span",He,"-"+x(a.diffStats.removed),1),t("span",Oe,"+"+x(a.diffStats.added),1)],8,je)):y("",!0),e.showCopyButton?(v(),h("button",{key:1,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":a.copyText?u(s)("common.copied")||"Copied":u(s)("common.copy")||"Copy",onClick:o[0]||(o[0]=i=>g("copy")),onMouseenter:o[1]||(o[1]=i=>P(i)),onFocus:o[2]||(o[2]=i=>P(i)),onMouseleave:F,onBlur:F},[a.copyText?(v(),h("svg",Ee,[...o[14]||(o[14]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(v(),h("svg",Ne,[...o[13]||(o[13]=[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),t("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,$e)):y("",!0),e.showCollapseButton?(v(),h("button",{key:2,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-pressed":a.isCollapsed,onClick:o[3]||(o[3]=i=>g("toggleCollapse")),onMouseenter:o[4]||(o[4]=i=>S(i,a.isCollapsed?u(s)("common.expand")||"Expand":u(s)("common.collapse")||"Collapse")),onFocus:o[5]||(o[5]=i=>S(i,a.isCollapsed?u(s)("common.expand")||"Expand":u(s)("common.collapse")||"Collapse")),onMouseleave:F,onBlur:F},[(v(),h("svg",{style:oe({rotate:a.isCollapsed?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...o[15]||(o[15]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,Le)):y("",!0),O.value?(v(),h("div",Re,[t("button",{ref_key:"moreBtnRef",ref:T,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors","aria-expanded":b.value,"aria-haspopup":"true",onClick:le(w,["stop"]),onMouseenter:o[6]||(o[6]=i=>S(i,u(s)("common.more")||"More")),onFocus:o[7]||(o[7]=i=>S(i,u(s)("common.more")||"More")),onMouseleave:F,onBlur:F},[...o[16]||(o[16]=[ie('',1)])],40,_e),G(de,{name:"code-menu"},{default:A(()=>[b.value?(v(),h("div",{key:0,ref_key:"moreMenuRef",ref:z,class:"code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]",role:"menu"},[e.showFontSizeButtons&&e.enableFontSizeControl?(v(),h(I,{key:0},[t("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:V.value,onClick:o[8]||(o[8]=i=>{u(j)(!0),g("decreaseFont")})},[o[17]||(o[17]=t("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),t("span",null,x(u(s)("common.fontSmaller")||"Font size −"),1)],8,Ae),t("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:L.value,onClick:o[9]||(o[9]=i=>{u(j)(!0),g("resetFont")})},[o[18]||(o[18]=t("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),t("path",{d:"M3 3v5h5"})])],-1)),t("span",null,x(u(s)("common.fontReset")||"Font size reset"),1)],8,De),t("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:r.value,onClick:o[10]||(o[10]=i=>{u(j)(!0),g("increaseFont")})},[o[19]||(o[19]=t("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),t("span",null,x(u(s)("common.fontLarger")||"Font size +"),1)],8,Ve)],64)):y("",!0),e.showExpandButton?(v(),h("button",{key:1,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:o[11]||(o[11]=i=>{m(),g("toggleExpand")})},[a.isExpanded?(v(),h("svg",Ue,[...o[20]||(o[20]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(v(),h("svg",Ge,[...o[21]||(o[21]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])),t("span",null,x(a.isExpanded?u(s)("common.collapse")||"Collapse":u(s)("common.expand")||"Expand"),1)])):y("",!0),a.isPreviewable&&e.showPreviewButton?(v(),h("button",{key:2,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:o[12]||(o[12]=i=>{m(),g("preview")})},[o[22]||(o[22]=t("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),t("circle",{cx:"12",cy:"12",r:"3"})])],-1)),t("span",null,x(u(s)("common.preview")||"Preview"),1)])):y("",!0)],512)):y("",!0)]),_:1})])):y("",!0)])])])):y("",!0),W(t("div",{class:se(["code-block-shell-content",{"code-block-shell-content--collapsed":a.isCollapsed}])},[H(p.$slots,"default")],2),[[Y,!!a.stream||!a.loading]]),W(t("div",Ie,[H(p.$slots,"loading",{},()=>[o[23]||(o[23]=t("div",{class:"loading-skeleton"},[t("div",{class:"skeleton-line"}),t("div",{class:"skeleton-line"}),t("div",{class:"skeleton-line short"})],-1))])],512),[[Y,!a.stream&&a.loading]]),t("span",We,x(a.copyText?u(s)("common.copied")||"Copied":""),1)],64))}}),Ze={class:"code-header-main"},Xe=["innerHTML"],qe={class:"code-header-copy"},Je={class:"code-header-title"},Qe={key:0,class:"code-header-caption"},Ke=ee(_(N({},{inheritAttrs:!1}),{__name:"PreCodeBlock",props:{codeBlockOptions:{},clipboardWriter:{},darkTheme:{},isDark:{type:Boolean,default:!1},lightTheme:{},resolvedVisualOptions:{},showCopyButton:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},showToolbar:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},theme:{},themes:{},node:{},loading:{type:Boolean},showLineNumbers:{type:Boolean,default:!0},diffInline:{type:Boolean},diffHideUnchangedRegions:{type:[Boolean,Object]},reservedHeightPx:{}},emits:["copy"],setup(a,{emit:d}){const e=a,g=d,b=ve(),z=f(()=>{const n=b,{class:l,style:M}=n;return((c,k)=>{var U={};for(var B in c)ae.call(c,B)&&k.indexOf(B)<0&&(U[B]=c[B]);if(c!=null&&D)for(var B of D(c))k.indexOf(B)<0&&re.call(c,B)&&(U[B]=c[B]);return U})(n,["class","style"])}),T=E(null),w=E(!1);let m;const C=fe(he,void 0),O=f(()=>{var n,l;return(l=e.showLineNumbers)!=null?l:((n=e.codeBlockOptions)==null?void 0:n.disableLineNumbers)!==!0}),s=f(()=>q(e.node)),$=f(()=>{var n;return e.diffInline===!0||s.value&&ke((n=e.codeBlockOptions)!=null?n:{})}),S=f(()=>{var n,l;return te(String((l=(n=e.node)==null?void 0:n.language)!=null?l:""))}),F=f(()=>{const n=S.value;return n?J[n]||n.charAt(0).toUpperCase()+n.slice(1):J[""]||"Plain Text"}),P=f(()=>{var n,l;return ye(String((l=(n=e.node)==null?void 0:n.raw)!=null?l:""),F.value,q(e.node))}),V=f(()=>(xe.value,ze(S.value,C))),L=f(()=>{var n;return(n=e.resolvedVisualOptions)!=null?n:Ce(e.codeBlockOptions)}),r=f(()=>Be({darkTheme:e.darkTheme,isDark:e.isDark,lightTheme:e.lightTheme,theme:e.theme,themes:e.themes})),p=f(()=>_(N({"--markstream-code-fallback-bg":r.value.background,"--markstream-code-fallback-fg":r.value.foreground},r.value.builtin?{"--markstream-code-theme-bg":r.value.background,"--markstream-code-theme-fg":r.value.foreground,"--markstream-code-theme-line-number":r.value.lineNumber}:{}),{"--markstream-diff-added-line-fill":r.value.diffAddedLine,"--markstream-diff-added-number-fill":r.value.diffAddedNumber,"--markstream-diff-editor-bg":r.value.background,"--markstream-diff-removed-line-fill":r.value.diffRemovedLine,"--markstream-diff-removed-number-fill":r.value.diffRemovedNumber,"--markstream-diff-shell-bg":r.value.background,"--markstream-pre-resolved-theme-bg":r.value.background,"--markstream-pre-resolved-theme-fg":r.value.foreground,"--markstream-pre-resolved-theme-line-number":r.value.lineNumber,backgroundColor:r.value.background,color:r.value.foreground})),o=f(()=>["code-pre-fallback",b.class,{"is-wrap":L.value.overflow==="wrap"}]),i=f(()=>{var n;const l=L.value,M=((n=e.codeBlockOptions)==null?void 0:n.padding)==null?"1ch":`${l.padding}px`,c=s.value&&typeof e.reservedHeightPx=="number"&&Number.isFinite(e.reservedHeightPx)&&e.reservedHeightPx>0?`${Math.ceil(e.reservedHeightPx)}px`:void 0;return N(_(N(_(N({"--markstream-code-font-family":l.fontFamily,"--markstream-code-padding-x":M,"--markstream-code-padding-y":`${l.padding}px`,"--markstream-code-padding-bottom":`${l.paddingBottom}px`,"--markstream-code-scrollbar-gutter":`${l.scrollbarGutter}px`,"--markstream-code-tab-size":String(l.tabSize)},s.value?{"--markstream-pre-diff-line-height":`${l.lineHeight}px`}:{}),{"--markstream-pre-line-number-top":`${l.padding}px`,"--markstream-pre-line-number-left":"0px","--markstream-pre-line-number-padding-left":"2ch","--markstream-pre-line-number-padding-right":"1ch","--markstream-pre-line-number-separator-width":"2px"}),r.value.builtin?{"--markstream-code-theme-bg":r.value.background,"--markstream-code-theme-fg":r.value.foreground,"--markstream-code-theme-line-number":r.value.lineNumber}:{}),{"--markstream-diff-added-line-fill":r.value.diffAddedLine,"--markstream-diff-added-number-fill":r.value.diffAddedNumber,"--markstream-diff-metadata-bg":r.value.background,"--markstream-diff-metadata-fg":r.value.lineNumber,"--markstream-diff-removed-line-fill":r.value.diffRemovedLine,"--markstream-diff-removed-number-fill":r.value.diffRemovedNumber,"--markstream-pre-resolved-theme-bg":r.value.background,"--markstream-pre-resolved-theme-fg":r.value.foreground,"--markstream-pre-resolved-theme-line-number":r.value.lineNumber,"--markstream-pre-line-number-gap-to-code":M,"--markstream-diff-fallback-handoff-height":c??"auto",backgroundColor:"var(--markstream-code-fallback-bg, var(--markstream-code-theme-bg, var(--markstream-pre-resolved-theme-bg)))",boxSizing:"border-box",color:"var(--markstream-code-fallback-fg, var(--markstream-code-theme-fg, var(--markstream-pre-resolved-theme-fg)))",fontFamily:l.fontFamily,fontSize:`${l.fontSize}px`,lineHeight:`${l.lineHeight}px`,margin:"0",maxHeight:`${l.maxHeight}px`,overflow:"auto",overflowX:l.overflow==="wrap"?"hidden":"auto",overflowY:"auto",paddingBottom:`${l.paddingBottom}px`,paddingLeft:O.value?"var(--markstream-code-padding-left)":M,paddingRight:M,paddingTop:`${l.padding}px`,scrollbarGutter:s.value?"auto":"stable",tabSize:l.tabSize,whiteSpace:l.overflow==="scroll"?"pre":"pre-wrap",overflowWrap:l.overflow==="wrap"?"anywhere":"normal",wordBreak:"normal",width:"100%"}),c?{height:c,minHeight:c,maxHeight:c}:{})});function R(){return K(this,null,function*(){const n=String((M=(l=e.node)==null?void 0:l.code)!=null?M:"");var l,M;try{yield(function(c){return K(this,null,function*(){if(e.clipboardWriter)return void(yield e.clipboardWriter(c));if(typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function")return void(yield navigator.clipboard.writeText(c));if(typeof document>"u"||!document.body)throw new Error("Clipboard API is unavailable");const k=document.createElement("textarea");k.value=c,k.setAttribute("readonly",""),k.style.position="fixed",k.style.opacity="0",document.body.appendChild(k),k.select();try{if(!document.execCommand("copy"))throw new Error("Clipboard copy command failed")}finally{k.remove()}})})(n),w.value=!0,g("copy",n),m&&clearTimeout(m),m=setTimeout(()=>{w.value=!1,m=void 0},1e3)}catch(c){w.value=!1,console.error("[markstream-vue] Failed to copy preformatted code.",c)}})}return ge(()=>{m&&clearTimeout(m)}),(n,l)=>e.showToolbar?(v(),h("div",{key:0,style:oe(p.value),class:"code-block-container rounded-lg border"},[G(Ye,{"show-header":e.showHeader,"show-copy-button":e.showCopyButton,"show-collapse-button":!1,"show-font-size-buttons":!1,"show-expand-button":!1,"show-preview-button":!1,"show-tooltips":e.showTooltips,"copy-text":w.value,stream:"",onCopy:R},be({"header-left":A(()=>[H(n.$slots,"header-left",{},()=>[t("div",Ze,[t("span",{class:"icon-slot h-4 w-4 flex-shrink-0",innerHTML:V.value},null,8,Xe),t("div",qe,[t("div",Je,x(P.value.title),1),P.value.caption?(v(),h("div",Qe,x(P.value.caption),1)):y("",!0)])])])]),default:A(()=>[G(Z,X({ref_key:"preNodeRef",ref:T},z.value,{class:o.value,style:[u(b).style,i.value],node:e.node,loading:e.loading,"show-line-numbers":O.value,"diff-inline":$.value,"diff-hide-unchanged-regions":e.diffHideUnchangedRegions,"reserved-height-px":e.reservedHeightPx,"data-markstream-code-theme":r.value.name}),null,16,["class","style","node","loading","show-line-numbers","diff-inline","diff-hide-unchanged-regions","reserved-height-px","data-markstream-code-theme"])]),_:2},[n.$slots["header-right"]?{name:"header-right",fn:A(()=>[H(n.$slots,"header-right")]),key:"0"}:void 0]),1032,["show-header","show-copy-button","show-tooltips","copy-text"])],4)):(v(),we(Z,X({key:1,ref_key:"preNodeRef",ref:T},z.value,{class:o.value,style:[u(b).style,i.value],node:e.node,loading:e.loading,"show-line-numbers":O.value,"diff-inline":$.value,"diff-hide-unchanged-regions":e.diffHideUnchangedRegions,"reserved-height-px":e.reservedHeightPx,"data-markstream-code-theme":r.value.name}),null,16,["class","style","node","loading","show-line-numbers","diff-inline","diff-hide-unchanged-regions","reserved-height-px","data-markstream-code-theme"]))}})),oo=Object.freeze(Object.defineProperty({__proto__:null,default:Ke},Symbol.toStringTag,{value:"Module"}));export{Ke as B,oo as P,ze as Q,Ye as g}; diff --git a/apps/kimi-code/dist-web/assets/Tooltip-CvCt2OpS.js b/apps/kimi-code/dist-web/assets/Tooltip-B-G_7eI0.js similarity index 75% rename from apps/kimi-code/dist-web/assets/Tooltip-CvCt2OpS.js rename to apps/kimi-code/dist-web/assets/Tooltip-B-G_7eI0.js index 6ce6592a6..eb78915a7 100644 --- a/apps/kimi-code/dist-web/assets/Tooltip-CvCt2OpS.js +++ b/apps/kimi-code/dist-web/assets/Tooltip-B-G_7eI0.js @@ -1 +1 @@ -import{bQ as J,M as O,aU as p,bE as S,az as Q,aL as F,s as G,v as z,I as K,bJ as W,bL as Z,aw as X,H as A,bb as ee,bB as te,g as le,au as ae,T as ne,as as Y,bR as oe}from"./index-DusVyqlT.js";var k=(d,x,e)=>new Promise((n,s)=>{var r=i=>{try{c(e.next(i))}catch(v){s(v)}},y=i=>{try{c(e.throw(i))}catch(v){s(v)}},c=i=>i.done?n(i.value):Promise.resolve(i.value).then(r,y);c((e=e.apply(d,x)).next())});const ie=["id"],re=["data-placement"],se=J(O({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(d){var x;const e=d,n=p(null),s=p(null),r=p({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),y=p({}),c=p((x=e.placement)!=null?x:"top"),i=p(!1),v=p(!1);let E=null,M=null,R=null,P=null,w=null,f=0;function I(){return P?Promise.resolve(P):(w||(w=oe(()=>import("./floating-ui.dom-xGUaHE3m.js"),[]).then(a=>(P=a,a)).catch(a=>{throw w=null,a})),w)}function T(){E&&(E(),E=null),M=null,R=null}function D(a){return k(this,null,function*(){const t=e.anchorEl,l=n.value;if(!e.visible||!t||!l||M===t&&R===l)return;const{autoUpdate:o}=yield I();a()&&e.visible&&e.anchorEl===t&&n.value===l&&(T(),M=t,R=l,E=o(t,l,()=>{$().catch(()=>{B()})}))})}function $(){return k(this,null,function*(){var a,t;const l=e.anchorEl,o=n.value;if(!e.visible||!l||!o)return!1;const{arrow:u,computePosition:C,flip:h,offset:m,shift:b}=yield I();if(!e.visible||e.anchorEl!==l||n.value!==o)return!1;const g=[m((a=e.offset)!=null?a:6),h(),b({padding:6}),...s.value?[u({element:s.value,padding:4})]:[]],{x:j,y:q,placement:N,middlewareData:U}=yield C(l,o,{placement:(t=e.placement)!=null?t:"top",middleware:g,strategy:"fixed"});if(!e.visible||e.anchorEl!==l||n.value!==o)return!1;if(r.value.transform=`translate3d(${Math.round(j)}px, ${Math.round(q)}px, 0)`,r.value.left="0px",r.value.top="0px",c.value=N,U.arrow&&s.value){const{x:V,y:L}=U.arrow,H={top:"bottom",bottom:"top",left:"right",right:"left"}[N.split("-")[0]];y.value={left:V!=null?`${V}px`:"",top:L!=null?`${L}px`:"",[H]:"-3px"}}return!0})}function B(){var a,t;const l=e.anchorEl,o=n.value;if(!l||!o)return!1;const u=l.getBoundingClientRect(),C=o.getBoundingClientRect(),h=(a=e.offset)!=null?a:6,m=(t=e.placement)!=null?t:"top";let b=u.left,g=u.top;return m==="bottom"?g=u.bottom+h:m==="left"?b=u.left-C.width-h:m==="right"?b=u.right+h:g=u.top-C.height-h,r.value.transform=`translate3d(${Math.round(Math.max(0,b))}px, ${Math.round(Math.max(0,g))}px, 0)`,r.value.left="0px",r.value.top="0px",c.value=m,y.value={},!0}S(()=>e.visible,a=>k(null,null,function*(){const t=++f;if(a){if(i.value=!1,yield Y(),t!==f||!e.visible)return;if(e.anchorEl&&n.value)try{const l=e.anchorEl,o=n.value,u=l.getBoundingClientRect();if(!(yield $())||t!==f||!e.visible||e.anchorEl!==l||n.value!==o)return;v.value=!1,i.value=!0,yield D(()=>t===f)}catch{if(t!==f||!e.visible)return;if(i.value=B(),e.anchorEl&&n.value)try{yield D(()=>t===f)}catch{}}else i.value=!0}else T()}));let _=0;return S([()=>e.anchorEl,()=>e.placement,()=>e.content],([a],[t])=>k(null,null,function*(){v.value=!!(a&&t&&a!==t&&Math.hypot(a.getBoundingClientRect().left-t.getBoundingClientRect().left,a.getBoundingClientRect().top-t.getBoundingClientRect().top)<=120);const l=++_;if(e.visible&&e.anchorEl&&n.value){if(yield Y(),l!==_||!e.visible||!e.anchorEl||!n.value)return;try{const o=yield $();if(l!==_||!e.visible||!e.anchorEl||!n.value)return;o||B()}catch{B()}yield D(()=>l===_)}})),Q(()=>{f+=1,T()}),(a,t)=>(F(),G(ne,{to:"body"},[z("div",{class:ae(["markstream-vue",{dark:d.isDark}])},[K(le,{name:"tooltip",appear:""},{default:W(()=>[Z(z("div",{id:e.id,ref_key:"tooltip",ref:n,style:X({position:"fixed",transitionProperty:v.value?"opacity, transform":"opacity",left:r.value.left,top:r.value.top,transform:r.value.transform,visibility:i.value?"visible":"hidden",pointerEvents:i.value?void 0:"none"}),class:"tooltip-element",role:"tooltip"},[A(ee(d.content)+" ",1),z("div",{ref_key:"arrowEl",ref:s,class:"tooltip-arrow","data-placement":c.value,style:X(y.value)},null,12,re)],12,ie),[[te,d.visible]])]),_:1})],2)]))}}),[["__scopeId","data-v-c606ee4c"]]);export{se as default}; +import{bQ as H,M as J,aU as p,bE as S,az as O,aL as Q,s as F,v as I,I as K,bJ as W,bL as Z,aw as X,H as A,bb as ee,bB as te,g as le,au as ae,T as ne,as as Y,bR as oe}from"./index-BOtIzGLC.js";var k=(d,x,e)=>new Promise((n,s)=>{var r=i=>{try{c(e.next(i))}catch(v){s(v)}},y=i=>{try{c(e.throw(i))}catch(v){s(v)}},c=i=>i.done?n(i.value):Promise.resolve(i.value).then(r,y);c((e=e.apply(d,x)).next())});const ie=["id"],re=["data-placement"],se=H(J({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(d){var x;const e=d,n=p(null),s=p(null),r=p({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),y=p({}),c=p((x=e.placement)!=null?x:"top"),i=p(!1),v=p(!1);let E=null,M=null,R=null,P=null,w=null,f=0;function N(){return P?Promise.resolve(P):(w||(w=oe(()=>import("./floating-ui.dom-xGUaHE3m.js"),[]).then(a=>(P=a,a)).catch(a=>{throw w=null,a})),w)}function T(){E&&(E(),E=null),M=null,R=null}function D(a){return k(this,null,function*(){const t=e.anchorEl,l=n.value;if(!e.visible||!t||!l||M===t&&R===l)return;const{autoUpdate:o}=yield N();a()&&e.visible&&e.anchorEl===t&&n.value===l&&(T(),M=t,R=l,E=o(t,l,()=>{$().catch(()=>{B()})}))})}function $(){return k(this,null,function*(){var a,t;const l=e.anchorEl,o=n.value;if(!e.visible||!l||!o)return!1;const{arrow:u,computePosition:C,flip:h,offset:m,shift:b}=yield N();if(!e.visible||e.anchorEl!==l||n.value!==o)return!1;const g=[m((a=e.offset)!=null?a:6),h(),b({padding:6}),...s.value?[u({element:s.value,padding:4})]:[]],{x:j,y:q,placement:U,middlewareData:V}=yield C(l,o,{placement:(t=e.placement)!=null?t:"top",middleware:g,strategy:"fixed"});if(!e.visible||e.anchorEl!==l||n.value!==o)return!1;if(r.value.transform=`translate3d(${Math.round(j)}px, ${Math.round(q)}px, 0)`,r.value.left="0px",r.value.top="0px",c.value=U,V.arrow&&s.value){const{x:z,y:L}=V.arrow,G={top:"bottom",bottom:"top",left:"right",right:"left"}[U.split("-")[0]];y.value={left:z!=null?`${z}px`:"",top:L!=null?`${L}px`:"",[G]:"-3px"}}return!0})}function B(){var a,t;const l=e.anchorEl,o=n.value;if(!l||!o)return!1;const u=l.getBoundingClientRect(),C=o.getBoundingClientRect(),h=(a=e.offset)!=null?a:6,m=(t=e.placement)!=null?t:"top";let b=u.left,g=u.top;return m==="bottom"?g=u.bottom+h:m==="left"?b=u.left-C.width-h:m==="right"?b=u.right+h:g=u.top-C.height-h,r.value.transform=`translate3d(${Math.round(Math.max(0,b))}px, ${Math.round(Math.max(0,g))}px, 0)`,r.value.left="0px",r.value.top="0px",c.value=m,y.value={},!0}S(()=>e.visible,a=>k(null,null,function*(){const t=++f;if(a){if(i.value=!1,yield Y(),t!==f||!e.visible)return;if(e.anchorEl&&n.value)try{const l=e.anchorEl,o=n.value,u=l.getBoundingClientRect();if(!(yield $())||t!==f||!e.visible||e.anchorEl!==l||n.value!==o)return;v.value=!1,i.value=!0,yield D(()=>t===f)}catch{if(t!==f||!e.visible)return;if(i.value=B(),e.anchorEl&&n.value)try{yield D(()=>t===f)}catch{}}else i.value=!0}else T()}));let _=0;return S([()=>e.anchorEl,()=>e.placement,()=>e.content],([a],[t])=>k(null,null,function*(){v.value=!!(a&&t&&a!==t&&Math.hypot(a.getBoundingClientRect().left-t.getBoundingClientRect().left,a.getBoundingClientRect().top-t.getBoundingClientRect().top)<=120);const l=++_;if(e.visible&&e.anchorEl&&n.value){if(yield Y(),l!==_||!e.visible||!e.anchorEl||!n.value)return;try{const o=yield $();if(l!==_||!e.visible||!e.anchorEl||!n.value)return;o||B()}catch{B()}yield D(()=>l===_)}})),O(()=>{f+=1,T()}),(a,t)=>(Q(),F(ne,{to:"body"},[I("div",{class:ae(["markstream-vue",{dark:d.isDark}])},[K(le,{name:"tooltip",appear:""},{default:W(()=>[Z(I("div",{id:e.id,ref_key:"tooltip",ref:n,style:X({position:"fixed",transitionProperty:v.value?"opacity, transform":"opacity",left:r.value.left,top:r.value.top,transform:r.value.transform,visibility:i.value?"visible":"hidden",pointerEvents:i.value?void 0:"none"}),class:"tooltip-element",role:"tooltip"},[A(ee(d.content)+" ",1),I("div",{ref_key:"arrowEl",ref:s,class:"tooltip-arrow","data-placement":c.value,style:X(y.value)},null,12,re)],12,ie),[[te,d.visible]])]),_:1})],2)]))}}),[["__scopeId","data-v-c606ee4c"]]);export{se as default}; diff --git a/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-CMsWFmhV.js b/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-DpFT7k4x.js similarity index 85% rename from apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-CMsWFmhV.js rename to apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-DpFT7k4x.js index 6018a60fc..0534e374e 100644 --- a/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-CMsWFmhV.js +++ b/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-DpFT7k4x.js @@ -1 +1 @@ -import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-VIWv47K9.js";import{p as f}from"./chunk-JWPE2WC7-D24iyGyr.js";import{_ as n,l as o}from"./mermaid.core-DKNppTOJ.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-D3UUATjS.js";import"./index-DusVyqlT.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},B={parser:R,db:a,renderer:u,styles:p};export{B as diagram}; +import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-m4Krf3Vn.js";import{p as f}from"./chunk-JWPE2WC7-TZtJmqSP.js";import{_ as n,l as o}from"./mermaid.core-B_UcP3X_.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-BnQdr27u.js";import"./index-BOtIzGLC.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},B={parser:R,db:a,renderer:u,styles:p};export{B as diagram}; diff --git a/apps/kimi-code/dist-web/assets/arc-CXuu1fyI.js b/apps/kimi-code/dist-web/assets/arc-CeSAjRC_.js similarity index 98% rename from apps/kimi-code/dist-web/assets/arc-CXuu1fyI.js rename to apps/kimi-code/dist-web/assets/arc-CeSAjRC_.js index 3fc9fe09b..6c2589dc9 100644 --- a/apps/kimi-code/dist-web/assets/arc-CXuu1fyI.js +++ b/apps/kimi-code/dist-web/assets/arc-CeSAjRC_.js @@ -1 +1 @@ -import{G as ln,H as un,I as N,J as I,K as J,L as an,M as y,N as tn,O as j,P as _,Q as rn,R as o,S as on,T as sn,V as fn}from"./mermaid.core-DKNppTOJ.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,q,O,v,R,K,u){var D=q-l,i=O-h,n=K-v,d=u-R,a=d*D-n*i;if(!(a*ar*r+M*M&&(G=w,H=p),{cx:G,cy:H,x01:-n,y01:-d,x11:G*(v/T-1),y11:H*(v/T-1)}}function hn(){var l=cn,h=yn,q=J(0),O=null,v=gn,R=dn,K=mn,u=null,D=ln(i);function i(){var n,d,a=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=R.apply(this,arguments)-an,L=rn(c-f),t=c>f;if(u||(u=n=D()),sy))u.moveTo(0,0);else if(L>tn-y)u.moveTo(s*N(f),s*I(f)),u.arc(0,0,s,f,c,!t),a>y&&(u.moveTo(a*N(c),a*I(c)),u.arc(0,0,a,c,f,t));else{var m=f,g=c,A=f,T=c,P=L,E=L,G=K.apply(this,arguments)/2,H=G>y&&(O?+O.apply(this,arguments):j(a*a+s*s)),w=_(rn(s-a)/2,+q.apply(this,arguments)),p=w,x=w,e,r;if(H>y){var M=sn(H/a*I(G)),z=sn(H/s*I(G));(P-=M*2)>y?(M*=t?1:-1,A+=M,T-=M):(P=0,A=T=(f+c)/2),(E-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(E=0,m=g=(f+c)/2)}var Q=s*N(m),V=s*I(m),B=a*N(T),C=a*I(T);if(w>y){var F=s*N(g),U=s*I(g),X=a*N(A),Y=a*I(A),S;if(Ly?x>y?(e=W(X,Y,Q,V,s,x,t),r=W(F,U,B,C,s,x,t),u.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?u.lineTo(B,C):p>y?(e=W(B,C,F,U,a,-p,t),r=W(Q,V,X,Y,a,-p,t),u.lineTo(e.cx+e.x01,e.cy+e.y01),pr*r+M*M&&(G=w,H=p),{cx:G,cy:H,x01:-n,y01:-d,x11:G*(v/T-1),y11:H*(v/T-1)}}function hn(){var l=cn,h=yn,q=J(0),O=null,v=gn,R=dn,K=mn,u=null,D=ln(i);function i(){var n,d,a=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=R.apply(this,arguments)-an,L=rn(c-f),t=c>f;if(u||(u=n=D()),sy))u.moveTo(0,0);else if(L>tn-y)u.moveTo(s*N(f),s*I(f)),u.arc(0,0,s,f,c,!t),a>y&&(u.moveTo(a*N(c),a*I(c)),u.arc(0,0,a,c,f,t));else{var m=f,g=c,A=f,T=c,P=L,E=L,G=K.apply(this,arguments)/2,H=G>y&&(O?+O.apply(this,arguments):j(a*a+s*s)),w=_(rn(s-a)/2,+q.apply(this,arguments)),p=w,x=w,e,r;if(H>y){var M=sn(H/a*I(G)),z=sn(H/s*I(G));(P-=M*2)>y?(M*=t?1:-1,A+=M,T-=M):(P=0,A=T=(f+c)/2),(E-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(E=0,m=g=(f+c)/2)}var Q=s*N(m),V=s*I(m),B=a*N(T),C=a*I(T);if(w>y){var F=s*N(g),U=s*I(g),X=a*N(A),Y=a*I(A),S;if(Ly?x>y?(e=W(X,Y,Q,V,s,x,t),r=W(F,U,B,C,s,x,t),u.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?u.lineTo(B,C):p>y?(e=W(B,C,F,U,a,-p,t),r=W(Q,V,X,Y,a,-p,t),u.lineTo(e.cx+e.x01,e.cy+e.y01),ps?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=e}),(function(A,G,N){var v=N(0);function h(){}for(var i in v)h[i]=v[i];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=h}),(function(A,G,N){function v(h,i){h==null&&i==null?(this.x=0,this.y=0):(this.x=h,this.y=i)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(h){this.x=h},v.prototype.setY=function(h){this.y=h},v.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},A.exports=v}),(function(A,G,N){var v=N(2),h=N(10),i=N(0),r=N(7),a=N(3),f=N(1),e=N(13),u=N(12),t=N(11);function s(c,l,T){v.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof r?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(v.prototype);for(var o in v)s[o]=v[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},s.prototype.remove=function(c){var l=c;if(c instanceof a){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,d=T.length,C=0;C-1&&P>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(w,1),g.target!=g.source&&g.target.edges.splice(P,1);var S=g.source.owner.getEdges().indexOf(g);if(S==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(S,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,C=this.getNodes(),S=C.length,w=0;wT&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(C[0].getParent().paddingLeft!=null?d=C[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new u(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,C,S,w,P,B,U=this.nodes,V=U.length,M=0;MC&&(l=C),Tw&&(g=w),dC&&(l=C),Tw&&(g=w),d=this.nodes.length){var V=0;T.forEach(function(M){M.owner==c&&V++}),V==this.nodes.length&&(this.isConnected=!0)}},A.exports=s}),(function(A,G,N){var v,h=N(1);function i(r){v=N(6),this.layout=r,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var r=this.layout.newGraph(),a=this.layout.newNode(null),f=this.add(r,a);return this.setRootGraph(f),this.rootGraph},i.prototype.add=function(r,a,f,e,u){if(f==null&&e==null&&u==null){if(r==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return r.parent=a,a.child=r,r}else{u=f,e=a,f=r;var t=e.getOwner(),s=u.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,e,u);if(f.isInterGraph=!0,f.source=e,f.target=u,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},i.prototype.remove=function(r){if(r instanceof v){var a=r;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(a.getEdges());for(var e,u=f.length,t=0;t=r.getRight()?a[0]+=Math.min(r.getX()-i.getX(),i.getRight()-r.getRight()):r.getX()<=i.getX()&&r.getRight()>=i.getRight()&&(a[0]+=Math.min(i.getX()-r.getX(),r.getRight()-i.getRight())),i.getY()<=r.getY()&&i.getBottom()>=r.getBottom()?a[1]+=Math.min(r.getY()-i.getY(),i.getBottom()-r.getBottom()):r.getY()<=i.getY()&&r.getBottom()>=i.getBottom()&&(a[1]+=Math.min(i.getY()-r.getY(),r.getBottom()-i.getBottom()));var u=Math.abs((r.getCenterY()-i.getCenterY())/(r.getCenterX()-i.getCenterX()));r.getCenterY()===i.getCenterY()&&r.getCenterX()===i.getCenterX()&&(u=1);var t=u*a[0],s=a[1]/u;a[0]t)return a[0]=f,a[1]=o,a[2]=u,a[3]=U,!1;if(eu)return a[0]=s,a[1]=e,a[2]=P,a[3]=t,!1;if(fu?(a[0]=l,a[1]=T,n=!0):(a[0]=c,a[1]=o,n=!0):p===y&&(f>u?(a[0]=s,a[1]=o,n=!0):(a[0]=g,a[1]=T,n=!0)),-m===y?u>f?(a[2]=B,a[3]=U,E=!0):(a[2]=P,a[3]=w,E=!0):m===y&&(u>f?(a[2]=S,a[3]=w,E=!0):(a[2]=V,a[3]=U,E=!0)),n&&E)return!1;if(f>u?e>t?(I=this.getCardinalDirection(p,y,4),O=this.getCardinalDirection(m,y,2)):(I=this.getCardinalDirection(-p,y,3),O=this.getCardinalDirection(-m,y,1)):e>t?(I=this.getCardinalDirection(-p,y,1),O=this.getCardinalDirection(-m,y,3)):(I=this.getCardinalDirection(p,y,2),O=this.getCardinalDirection(m,y,4)),!n)switch(I){case 1:W=o,R=f+-C/y,a[0]=R,a[1]=W;break;case 2:R=g,W=e+d*y,a[0]=R,a[1]=W;break;case 3:W=T,R=f+C/y,a[0]=R,a[1]=W;break;case 4:R=l,W=e+-d*y,a[0]=R,a[1]=W;break}if(!E)switch(O){case 1:Q=w,x=u+-_/y,a[2]=x,a[3]=Q;break;case 2:x=V,Q=t+M*y,a[2]=x,a[3]=Q;break;case 3:Q=U,x=u+_/y,a[2]=x,a[3]=Q;break;case 4:x=B,Q=t+-M*y,a[2]=x,a[3]=Q;break}}return!1},h.getCardinalDirection=function(i,r,a){return i>r?a:1+a%4},h.getIntersection=function(i,r,a,f){if(f==null)return this.getIntersection2(i,r,a);var e=i.x,u=i.y,t=r.x,s=r.y,o=a.x,c=a.y,l=f.x,T=f.y,g=void 0,d=void 0,C=void 0,S=void 0,w=void 0,P=void 0,B=void 0,U=void 0,V=void 0;return C=s-u,w=e-t,B=t*u-e*s,S=T-c,P=o-l,U=l*c-o*T,V=C*P-S*w,V===0?null:(g=(w*U-P*B)/V,d=(S*B-C*U)/V,new v(g,d))},h.angleOfVector=function(i,r,a,f){var e=void 0;return i!==a?(e=Math.atan((f-r)/(a-i)),a=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,A.exports=h}),(function(A,G,N){function v(){}v.sign=function(h){return h>0?1:h<0?-1:0},v.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},v.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},A.exports=v}),(function(A,G,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,A.exports=v}),(function(A,G,N){var v=(function(){function e(u,t){for(var s=0;s"u"?"undefined":v(i);return i==null||r!="object"&&r!="function"},A.exports=h}),(function(A,G,N){function v(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(C.push(w[0]);C.length>0&&c;){var P=C[0];C.splice(0,1),d.add(P);for(var B=P.getEdges(),g=0;g-1&&w.splice(_,1)}d=new Set,S=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g0){for(var T=this.edgeToDummyNodes.get(l),g=0;g=0&&c.splice(U,1);var V=S.getNeighborsList();V.forEach(function(n){if(l.indexOf(n)<0){var E=T.get(n),p=E-1;p==1&&P.push(n),T.set(n,p)}})}l=l.concat(P),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=s}),(function(A,G,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},A.exports=v}),(function(A,G,N){var v=N(5);function h(i,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(i){this.lworldExtX=i},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(i){this.lworldExtY=i},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},h.prototype.transformX=function(i){var r=0,a=this.lworldExtX;return a!=0&&(r=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/a),r},h.prototype.transformY=function(i){var r=0,a=this.lworldExtY;return a!=0&&(r=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/a),r},h.prototype.inverseTransformX=function(i){var r=0,a=this.ldeviceExtX;return a!=0&&(r=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/a),r},h.prototype.inverseTransformY=function(i){var r=0,a=this.ldeviceExtY;return a!=0&&(r=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/a),r},h.prototype.inverseTransformPoint=function(i){var r=new v(this.inverseTransformX(i.x),this.inverseTransformY(i.y));return r},A.exports=h}),(function(A,G,N){function v(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);si.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oC||d>C)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(C=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>C||d>C)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},e.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=g.length||C>=g[0].length)){for(var S=0;Se}}]),a})();A.exports=r}),(function(A,G,N){function v(){}v.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var i=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St0;)Ct.push(0);return Ct})(this.n),a=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,e=Math.min(this.m-1,this.n),u=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;m--)if(this.s[m]!==0){for(var y=m+1;y=0;z--){if((function(Tt,Ct){return Tt&&Ct})(z0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(r[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){r[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(r[Nt]):0)+(Nt!==J+1?Math.abs(r[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=r[n-2];r[n-2]=0;for(var ut=n-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],it),wt=this.s[ut]/Et,Ot=it/Et;this.s[ut]=Et,ut!==J&&(it=-Ot*r[ut-1],r[ut-1]=wt*r[ut-1]);for(var mt=0;mt=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,JMath.abs(i)?(r=i/h,r=Math.abs(h)*Math.sqrt(1+r*r)):i!=0?(r=h/i,r=Math.abs(i)*Math.sqrt(1+r*r)):r=0,r},A.exports=v}),(function(A,G,N){var v=(function(){function r(a,f){for(var e=0;e2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,r),this.sequence1=a,this.sequence2=f,this.match_score=e,this.mismatch_penalty=u,this.gap_penalty=t,this.iMax=a.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;a--){var f=this.listeners[a];f.event===i&&f.callback===r&&this.listeners.splice(a,1)}},h.emit=function(i,r){for(var a=0;a{var G={45:((i,r,a)=>{var f={};f.layoutBase=a(551),f.CoSEConstants=a(806),f.CoSEEdge=a(767),f.CoSEGraph=a(880),f.CoSEGraphManager=a(578),f.CoSELayout=a(765),f.CoSENode=a(991),f.ConstraintHandler=a(902),i.exports=f}),806:((i,r,a)=>{var f=a(551).FDLayoutConstants;function e(){}for(var u in f)e[u]=f[u];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,i.exports=e}),767:((i,r,a)=>{var f=a(551).FDLayoutEdge;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),880:((i,r,a)=>{var f=a(551).LGraph;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),578:((i,r,a)=>{var f=a(551).LGraphManager;function e(t){f.call(this,t)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),765:((i,r,a)=>{var f=a(551).FDLayout,e=a(578),u=a(880),t=a(991),s=a(767),o=a(806),c=a(902),l=a(551).FDLayoutConstants,T=a(551).LayoutConstants,g=a(551).Point,d=a(551).PointD,C=a(551).DimensionD,S=a(551).Layout,w=a(551).Integer,P=a(551).IGeometry,B=a(551).LGraph,U=a(551).Transform,V=a(551).LinkedList;function M(){f.call(this),this.toBeTiled={},this.constraints={}}M.prototype=Object.create(f.prototype);for(var _ in f)M[_]=f[_];M.prototype.newGraphManager=function(){var n=new e(this);return this.graphManager=n,n},M.prototype.newGraph=function(n){return new u(null,this.graphManager,n)},M.prototype.newNode=function(n){return new t(this.graphManager,n)},M.prototype.newEdge=function(n){return new s(null,null,n)},M.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},M.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},M.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},M.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return E.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},M.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},M.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),E={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(m.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var O=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(D){n.fixedNodesOnHorizontal.add(D),n.fixedNodesOnVertical.add(D)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*D.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),k=D[tt],D[tt]=D[H],D[H]=k;return D},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var H=O.has(D.left)?O.get(D.left):D.left,k=O.has(D.right)?O.get(D.right):D.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(k)||(n.nodesInRelativeHorizontal.push(k),n.nodeToRelativeConstraintMapHorizontal.set(k,[]),n.dummyToNodeForVerticalAlignment.has(k)?n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(k)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(k).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:k,gap:D.gap}),n.nodeToRelativeConstraintMapHorizontal.get(k).push({left:H,gap:D.gap})}else{var tt=R.has(D.top)?R.get(D.top):D.top,ht=R.has(D.bottom)?R.get(D.bottom):D.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:D.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:D.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var H=O.has(D.left)?O.get(D.left):D.left,k=O.has(D.right)?O.get(D.right):D.right;Q.has(H)?Q.get(H).push(k):Q.set(H,[k]),Q.has(k)?Q.get(k).push(H):Q.set(k,[H])}else{var tt=R.has(D.top)?R.get(D.top):D.top,ht=R.has(D.bottom)?R.get(D.bottom):D.bottom;z.has(tt)?z.get(tt).push(ht):z.set(tt,[ht]),z.has(ht)?z.get(ht).push(tt):z.set(ht,[tt])}});var X=function(H,k){var tt=[],ht=[],J=new V,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var ut=it;for(J.push(ut),It.add(ut),tt[Nt].push(ut);J.length!=0;){ut=J.shift(),k.has(ut)&&(ht[Nt]=!0);var Et=H.get(ut);Et.forEach(function(wt){It.has(wt)||(J.push(wt),It.add(wt),tt[Nt].push(wt))})}Nt++}}),{components:tt,isFixed:ht}},rt=X(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var $=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},M.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var D=n.idToNodeMap.get($.nodeId);D.displacementX=0,D.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p1){var R;for(R=0;Rm&&(m=Math.floor(O.y)),I=Math.floor(O.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-O.x/2,T.WORLD_CENTER_Y-O.y/2))},M.radialLayout=function(n,E,p){var m=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);M.branchRadialLayout(E,null,0,359,0,m);var y=B.calculateBounds(n),I=new U;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var O=0;O1;){var k=H[0];H.splice(0,1);var tt=z.indexOf(k);tt>=0&&z.splice(tt,1),$--,X--}E!=null?D=(z.indexOf(H[0])+1)%$:D=0;for(var ht=Math.abs(m-p)/X,J=D;rt!=X;J=++J%$){var It=z[J].getOtherEnd(n);if(It!=E){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;M.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},M.maxDiagonalInTree=function(n){for(var E=w.MIN_VALUE,p=0;pE&&(E=y)}return E},M.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},M.prototype.groupZeroDegreeMembers=function(){var n=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y"u"&&(E[R]=[]),E[R]=E[R].concat(I)}Object.keys(E).forEach(function(W){if(E[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=E[W];var Q=E[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[x]=z;var X=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var $=0;$y?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(I+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>I?(m.rect.y-=(m.labelHeight-I)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-I)/2):m.labelPosVertical=="bottom"&&m.setHeight(I+m.labelHeight))}})},M.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var E=this.compoundOrder[n],p=E.id,m=E.paddingLeft,y=E.paddingTop,I=E.labelMarginLeft,O=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,I,O)}},M.prototype.repopulateZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=n.idToDummyNode[p],y=m.paddingLeft,I=m.paddingTop,O=m.labelMarginLeft,R=m.labelMarginTop;n.adjustLocations(E[p],m.rect.x,m.rect.y,y,I,O,R)})},M.prototype.getToBeTiled=function(n){var E=n.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=n.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y0)return this.toBeTiled[E]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},M.prototype.getNodeDegree=function(n){n.id;for(var E=n.getEdges(),p=0,m=0;mQ&&(Q=X.rect.height)}p+=Q+n.verticalPadding}},M.prototype.tileCompoundMembers=function(n,E){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(n[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,O=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(O+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>O?(y.rect.y-=(y.labelHeight-O)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-O)/2):y.labelPosVertical=="bottom"&&y.setHeight(O+y.labelHeight))}})},M.prototype.tileNodes=function(n,E){var p=this.tileNodesByFavoringDim(n,E,!0),m=this.tileNodesByFavoringDim(n,E,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(m),O;return IR&&(R=$.getWidth())});var W=I/y,x=O/y,Q=Math.pow(p-m,2)+4*(W+m)*(x+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(W+m)-m;return R>rt&&(rt=R),rt+=m*2,rt},M.prototype.tileNodesByFavoringDim=function(n,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};I&&(O.idealRowWidth=this.calcIdealRowWidth(n,p));var R=function(D){return D.rect.width*D.rect.height},W=function(D,H){return R(H)-R(D)};n.sort(function($,D){var H=W;return O.idealRowWidth?(H=I,H($.id,D.id)):H($,D)});for(var x=0,Q=0,z=0;z0&&(O+=n.horizontalPadding),n.rowWidth[p]=O,n.width0&&(R+=n.verticalPadding);var W=0;R>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=R,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(E)},M.prototype.getShortestRowIndex=function(n){for(var E=-1,p=Number.MAX_VALUE,m=0;mp&&(E=m,p=n.rowWidth[m]);return E},M.prototype.canAddHorizontal=function(n,E,p){if(n.idealRowWidth){var m=n.rows.length-1,y=n.rowWidth[m];return y+E+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var O=n.rowWidth[I];if(O+n.horizontalPadding+E<=n.width)return!0;var R=0;n.rowHeight[I]0&&(R=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-O>=E+n.horizontalPadding?W=(n.height+R)/(O+E+n.horizontalPadding):W=(n.height+R)/n.width,R=p+n.verticalPadding;var x;return n.widthI&&E!=p){m.splice(-1,1),n.rows[p].push(y),n.rowWidth[E]=n.rowWidth[E]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var O=Number.MIN_VALUE,R=0;RO&&(O=m[R].height);E>0&&(O+=n.verticalPadding);var W=n.rowHeight[E]+n.rowHeight[p];n.rowHeight[E]=O,n.rowHeight[p]0)for(var rt=y;rt<=I;rt++)X[0]+=this.grid[rt][O-1].length+this.grid[rt][O].length-1;if(I0)for(var rt=O;rt<=R;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var $=w.MAX_VALUE,D,H,k=0;k{var f=a(551).FDLayoutNode,e=a(551).IMath;function u(s,o,c,l){f.call(this,s,o,c,l)}u.prototype=Object.create(f.prototype);for(var t in f)u[t]=f[t];u.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},u.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Lt=0;ot.forEach(function(st){Z=="horizontal"?(et.set(st,g.has(st)?d[g.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?C[g.get(st)]:q.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){Z=="horizontal"?ft+=g.has(st)?d[g.get(st)]:q.get(st):ft+=g.has(st)?C[g.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var At=function(){var ot=dt.shift(),Lt=Y.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)st&&(st=kt),KtXt&&(Xt=Kt)}}catch(ee){Ct=!0,Bt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw Bt}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;et.set(te,et.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},_=function(Y){var Z=0,K=0,q=0,at=0;if(Y.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?Z++:K++:C[g.get(j.top)]-C[g.get(j.bottom)]>=0?q++:at++}),Z>K&&q>at)for(var ct=0;ctK)for(var nt=0;ntat)for(var et=0;et1)l.fixedNodeConstraint.forEach(function(F,Y){m[Y]=[F.position.x,F.position.y],y[Y]=[d[g.get(F.nodeId)],C[g.get(F.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var F=0;if(l.alignmentConstraint.vertical){for(var Y=l.alignmentConstraint.vertical,Z=function(et){var j=new Set;Y[et].forEach(function(pt){j.add(pt)});var dt=new Set([].concat(f(j)).filter(function(pt){return R.has(pt)})),At=void 0;dt.size>0?At=d[g.get(dt.values().next().value)]:At=V(j).x,Y[et].forEach(function(pt){m[F]=[At,C[g.get(pt)]],y[F]=[d[g.get(pt)],C[g.get(pt)]],F++})},K=0;K0?At=d[g.get(dt.values().next().value)]:At=V(j).y,q[et].forEach(function(pt){m[F]=[d[g.get(pt)],At],y[F]=[d[g.get(pt)],C[g.get(pt)]],F++})},ct=0;ctz&&(z=Q[rt].length,X=rt);if(z0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(F,Y){var Z={x:d[g.get(F.nodeId)],y:C[g.get(F.nodeId)]},K=F.position,q=U(K,Z);mt.x+=q.x,mt.y+=q.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(F,Y){d[Y]+=mt.x}),C.forEach(function(F,Y){C[Y]+=mt.y}),l.fixedNodeConstraint.forEach(function(F){d[g.get(F.nodeId)]=F.position.x,C[g.get(F.nodeId)]=F.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(Y){var Z=new Set;Dt[Y].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return R.has(at)})),q=void 0;K.size>0?q=d[g.get(K.values().next().value)]:q=V(Z).x,Z.forEach(function(at){R.has(at)||(d[g.get(at)]=q)})},Ht=0;Ht0?q=C[g.get(K.values().next().value)]:q=V(Z).y,Z.forEach(function(at){R.has(at)||(C[g.get(at)]=q)})},Ft=0;Ft{i.exports=A})},N={};function v(i){var r=N[i];if(r!==void 0)return r.exports;var a=N[i]={exports:{}};return G[i](a,a.exports,v),a.exports}var h=v(45);return h})()})})(he)),he.exports}var pr=se.exports,De;function yr(){return De||(De=1,(function(L,b){(function(G,N){L.exports=N(vr())})(pr,function(A){return(()=>{var G={658:(i=>{i.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var a=arguments.length,f=Array(a>1?a-1:0),e=1;e{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var d=s[Symbol.iterator](),C;!(l=(C=d.next()).done)&&(c.push(C.value),!(o&&c.length===o));l=!0);}catch(S){T=!0,g=S}finally{try{!l&&d.return&&d.return()}finally{if(T)throw g}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),e=a(140).layoutBase.LinkedList,u={};u.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var O=0;O1){C=g[0],S=C.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),B),U},u.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,C=!1,S=void 0;try{for(var w=s.nodeIndexes[Symbol.iterator](),P;!(d=(P=w.next()).done);d=!0){var B=P.value,U=f(B,2),V=U[0],M=U[1],_=o.cy.getElementById(V);if(_){var n=_.boundingBox(),E=s.xCoords[M]-n.w/2,p=s.xCoords[M]+n.w/2,m=s.yCoords[M]-n.h/2,y=s.yCoords[M]+n.h/2;El&&(l=p),mg&&(g=y)}}}catch(x){C=!0,S=x}finally{try{!d&&w.return&&w.return()}finally{if(C)throw S}}var I=t.x-(l+c)/2,O=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+O})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;zl&&(l=X),rtg&&(g=$)});var R=t.x-(l+c)/2,W=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var Q=s[x];Q.setCenter(Q.getCenterX()+R,Q.getCenterY()+W)})}}},u.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,C=void 0,S=void 0,w=void 0,P=void 0,B=t.descendants().not(":parent"),U=B.length,V=0;VC&&(l=C),Tw&&(g=w),d{var f=a(548),e=a(140).CoSELayout,u=a(140).CoSENode,t=a(140).layoutBase.PointD,s=a(140).layoutBase.DimensionD,o=a(140).layoutBase.LayoutConstants,c=a(140).layoutBase.FDLayoutConstants,l=a(140).CoSEConstants,T=function(d,C){var S=d.cy,w=d.eles,P=w.nodes(),B=w.edges(),U=void 0,V=void 0,M=void 0,_={};d.randomize&&(U=C.nodeIndexes,V=C.xCoords,M=C.yCoords);var n=function(x){return typeof x=="function"},E=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(S,w),m=function W(x,Q,z,X){for(var rt=Q.length,$=0;$0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),k),W(J,H,z,X)}}},y=function(x,Q,z){for(var X=0,rt=0,$=0;$0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,Q){Q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(x.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var O=new e,R=O.newGraphManager();return m(R.addRoot(),f.getTopMostNodes(P),O,d),y(O,R,B),I(O,d),O.runLayout(),_};i.exports={coseLayout:T}}),212:((i,r,a)=>{var f=(function(){function d(C,S){for(var w=0;w0)if(p){var I=t.getTopMostNodes(w.eles.nodes());if(M=t.connectComponents(P,w.eles,I),M.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),w.randomize&&M.forEach(function(vt){w.eles=vt,U.push(o(w))}),w.quality=="default"||w.quality=="proof"){var O=P.collection();if(w.tile){var R=new Map,W=[],x=[],Q=0,z={nodeIndexes:R,xCoords:W,yCoords:x},X=[];if(M.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){O.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),O.length>1){var rt=O.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),M.push(O),U.push(z);for(var $=X.length-1;$>=0;$--)M.splice(X[$],1),U.splice(X[$],1),_.splice(X[$],1)}}M.forEach(function(vt,it){w.eles=vt,V.push(l(w,U[it])),t.relocateComponent(_[it],V[it],w)})}else M.forEach(function(vt,it){t.relocateComponent(_[it],U[it],w)});var D=new Set;if(M.length>1){var H=[],k=B.filter(function(vt){return vt.css("display")=="none"});M.forEach(function(vt,it){var ut=void 0;if(w.quality=="draft"&&(ut=U[it].nodeIndexes),vt.nodes().not(k).length>0){var Et={};Et.edges=[],Et.nodes=[];var wt=void 0;vt.nodes().not(k).forEach(function(Ot){if(w.quality=="draft")if(!Ot.isParent())wt=ut.get(Ot.id()),Et.nodes.push({x:U[it].xCoords[wt]-Ot.boundingbox().w/2,y:U[it].yCoords[wt]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var mt=t.calcBoundingBox(Ot,U[it].xCoords,U[it].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else V[it][Ot.id()]&&Et.nodes.push({x:V[it][Ot.id()].getLeft(),y:V[it][Ot.id()].getTop(),width:V[it][Ot.id()].getWidth(),height:V[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var mt=Ot.source(),Dt=Ot.target();if(mt.css("display")!="none"&&Dt.css("display")!="none")if(w.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Dt.id()),Ut=[],Pt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,U[it].xCoords,U[it].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(U[it].xCoords[Rt]),Ut.push(U[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,U[it].xCoords,U[it].yCoords,ut);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(U[it].xCoords[Ht]),Pt.push(U[it].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else V[it][mt.id()]&&V[it][Dt.id()]&&Et.edges.push({startX:V[it][mt.id()].getCenterX(),startY:V[it][mt.id()].getCenterY(),endX:V[it][Dt.id()].getCenterX(),endY:V[it][Dt.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),D.add(it))}});var tt=E.packComponents(H,w.randomize).shifts;if(w.quality=="draft")U.forEach(function(vt,it){var ut=vt.xCoords.map(function(wt){return wt+tt[it].dx}),Et=vt.yCoords.map(function(wt){return wt+tt[it].dy});vt.xCoords=ut,vt.yCoords=Et});else{var ht=0;D.forEach(function(vt){Object.keys(V[vt]).forEach(function(it){var ut=V[vt][it];ut.setCenter(ut.getCenterX()+tt[ht].dx,ut.getCenterY()+tt[ht].dy)}),ht++})}}}else{var m=w.eles.boundingBox();if(_.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),w.randomize){var y=o(w);U.push(y)}w.quality=="default"||w.quality=="proof"?(V.push(l(w,U[0])),t.relocateComponent(_[0],V[0],w)):t.relocateComponent(_[0],U[0],w)}var J=function(it,ut){if(w.quality=="default"||w.quality=="proof"){typeof it=="number"&&(it=ut);var Et=void 0,wt=void 0,Ot=it.data("id");return V.forEach(function(Dt){Ot in Dt&&(Et={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},wt=Dt[Ot])}),w.nodeDimensionsIncludeLabels&&(wt.labelWidth&&(wt.labelPosHorizontal=="left"?Et.x+=wt.labelWidth/2:wt.labelPosHorizontal=="right"&&(Et.x-=wt.labelWidth/2)),wt.labelHeight&&(wt.labelPosVertical=="top"?Et.y+=wt.labelHeight/2:wt.labelPosVertical=="bottom"&&(Et.y-=wt.labelHeight/2))),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return U.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(mt={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(w.quality=="default"||w.quality=="proof"||w.randomize){var It=t.calcParentsWithoutChildren(P,B),Nt=B.filter(function(vt){return vt.css("display")=="none"});w.eles=B.not(Nt),B.nodes().not(":parent").not(Nt).layoutPositions(S,w,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d})();i.exports=g}),657:((i,r,a)=>{var f=a(548),e=a(140).layoutBase.Matrix,u=a(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,C=new Map,S=new Map,w=[],P=[],B=[],U=[],V=[],M=[],_=[],n=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,I=o.samplingType,O=o.nodeSeparation,R=void 0,W=function(){for(var Y=0,Z=0,K=!1;Z=at;){nt=q[at++];for(var xt=w[nt],lt=0;ltdt&&(dt=V[Lt],At=Lt)}return At},Q=function(Y){var Z=void 0;if(Y){Z=Math.floor(Math.random()*E);for(var q=0;q=1)break;j=et}for(var pt=0;pt=1)break;j=et}for(var lt=0;lt0&&(Z.isParent()?w[Y].push(S.get(Z.id())):w[Y].push(Z.id()))})});var Nt=function(Y){var Z=C.get(Y),K=void 0;d.get(Y).forEach(function(q){c.getElementById(q).isParent()?K=S.get(q):K=q,w[Z].push(K),w[C.get(K)].push(Y)})},vt=!0,it=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),wt;!(vt=(wt=Et.next()).done);vt=!0){var Ot=wt.value;Nt(Ot)}}catch(F){it=!0,ut=F}finally{try{!vt&&Et.return&&Et.return()}finally{if(it)throw ut}}E=C.size;var mt=void 0;if(E>2){R=E{var f=a(212),e=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&e(cytoscape),i.exports=e}),140:(i=>{i.exports=A})},N={};function v(i){var r=N[i];if(r!==void 0)return r.exports;var a=N[i]={exports:{}};return G[i](a,a.exports,v),a.exports}var h=v(579);return h})()})})(se)),se.exports}var mr=yr();const Er=Ze(mr);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:gt(L=>`${L},${L/2} 0,${L} 0,0`,"L"),R:gt(L=>`0,${L/2} ${L},0 ${L},${L}`,"R"),T:gt(L=>`0,0 ${L},0 ${L/2},${L}`,"T"),B:gt(L=>`${L/2},0 ${L},${L} 0,${L}`,"B")},oe={L:gt((L,b)=>L-b+2,"L"),R:gt((L,b)=>L-2,"R"),T:gt((L,b)=>L-b+2,"T"),B:gt((L,b)=>L-2,"B")},Tr=gt(function(L){return Wt(L)?L==="L"?"R":"L":L==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=gt(function(L){const b=L;return b==="L"||b==="R"||b==="T"||b==="B"},"isArchitectureDirection"),Wt=gt(function(L){const b=L;return b==="L"||b==="R"},"isArchitectureDirectionX"),qt=gt(function(L){const b=L;return b==="T"||b==="B"},"isArchitectureDirectionY"),Te=gt(function(L,b){const A=Wt(L)&&qt(b),G=qt(L)&&Wt(b);return A||G},"isArchitectureDirectionXY"),Nr=gt(function(L){const b=L[0],A=L[1],G=Wt(b)&&qt(A),N=qt(b)&&Wt(A);return G||N},"isArchitecturePairXY"),Lr=gt(function(L){return L!=="LL"&&L!=="RR"&&L!=="TT"&&L!=="BB"},"isValidArchitectureDirectionPair"),pe=gt(function(L,b){const A=`${L}${b}`;return Lr(A)?A:void 0},"getArchitectureDirectionPair"),Cr=gt(function([L,b],A){const G=A[0],N=A[1];return Wt(G)?qt(N)?[L+(G==="L"?-1:1),b+(N==="T"?1:-1)]:[L+(G==="L"?-1:1),b]:Wt(N)?[L+(N==="L"?1:-1),b+(G==="T"?1:-1)]:[L,b+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),wr=gt(function(L){return L==="LT"||L==="TL"?[1,1]:L==="BL"||L==="LB"?[1,-1]:L==="BR"||L==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=gt(function(L,b){return Te(L,b)?"bend":Wt(L)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Mr=gt(function(L){return L.type==="service"},"isArchitectureService"),Or=gt(function(L){return L.type==="junction"},"isArchitectureJunction"),be=gt(L=>L.data(),"edgeData"),ie=gt(L=>L.data(),"nodeData"),Dr=nr.architecture,Pe=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Je,this.getAccTitle=Ke,this.setDiagramTitle=je,this.getDiagramTitle=_e,this.getAccDescription=tr,this.setAccDescription=er,this.clear()}static{gt(this,"ArchitectureDB")}setDiagramId(L){this.diagramId=L}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",rr()}addService({id:L,icon:b,in:A,title:G,iconText:N}){if(this.registeredIds[L]!==void 0)throw new Error(`The service id [${L}] is already in use by another ${this.registeredIds[L]}`);if(A!==void 0){if(L===A)throw new Error(`The service [${L}] cannot be placed within itself`);if(this.registeredIds[A]===void 0)throw new Error(`The service [${L}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[A]==="node")throw new Error(`The service [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"service",icon:b,iconText:N,title:G,edges:[],in:A}}getServices(){return Object.values(this.nodes).filter(Mr)}addJunction({id:L,in:b}){if(this.registeredIds[L]!==void 0)throw new Error(`The junction id [${L}] is already in use by another ${this.registeredIds[L]}`);if(b!==void 0){if(L===b)throw new Error(`The junction [${L}] cannot be placed within itself`);if(this.registeredIds[b]===void 0)throw new Error(`The junction [${L}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[b]==="node")throw new Error(`The junction [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"junction",edges:[],in:b}}getJunctions(){return Object.values(this.nodes).filter(Or)}getNodes(){return Object.values(this.nodes)}getNode(L){return this.nodes[L]??null}addGroup({id:L,icon:b,in:A,title:G}){if(this.registeredIds?.[L]!==void 0)throw new Error(`The group id [${L}] is already in use by another ${this.registeredIds[L]}`);if(A!==void 0){if(L===A)throw new Error(`The group [${L}] cannot be placed within itself`);if(this.registeredIds?.[A]===void 0)throw new Error(`The group [${L}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[A]==="node")throw new Error(`The group [${L}]'s parent is not a group`)}this.registeredIds[L]="group",this.groups[L]={id:L,icon:b,title:G,in:A}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:L,rhsId:b,lhsDir:A,rhsDir:G,lhsInto:N,rhsInto:v,lhsGroup:h,rhsGroup:i,title:r}){if(!Re(A))throw new Error(`Invalid direction given for left hand side of edge ${L}--${b}. Expected (L,R,T,B) got ${String(A)}`);if(!Re(G))throw new Error(`Invalid direction given for right hand side of edge ${L}--${b}. Expected (L,R,T,B) got ${String(G)}`);if(this.nodes[L]===void 0&&this.groups[L]===void 0)throw new Error(`The left-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[b]===void 0&&this.groups[b]===void 0)throw new Error(`The right-hand id [${b}] does not yet exist. Please create the service/group before declaring an edge to it.`);const a=this.nodes[L].in,f=this.nodes[b].in;if(h&&a&&f&&a==f)throw new Error(`The left-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(i&&a&&f&&a==f)throw new Error(`The right-hand id [${b}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const e={lhsId:L,lhsDir:A,lhsInto:N,lhsGroup:h,rhsId:b,rhsDir:G,rhsInto:v,rhsGroup:i,title:r};this.edges.push(e),this.nodes[L]&&this.nodes[b]&&(this.nodes[L].edges.push(this.edges[this.edges.length-1]),this.nodes[b].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(L){if(L.members.length<2)throw new Error(`An align directive requires at least two members; got ${L.members.length}`);const b=new Set;L.members.forEach(A=>{if(this.registeredIds[A]!=="node")throw new Error(`align ${L.direction} references [${A}], which is not a service or junction`);if(b.has(A))throw new Error(`align ${L.direction} lists [${A}] more than once`);b.add(A)}),this.layoutHints.push(L)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const L={},b=Object.entries(this.nodes).reduce((i,[r,a])=>(i[r]=a.edges.reduce((f,e)=>{const u=this.getNode(e.lhsId)?.in,t=this.getNode(e.rhsId)?.in;if(u&&t&&u!==t){const s=Ar(e.lhsDir,e.rhsDir);s!=="bend"&&(L[u]??={},L[u][t]=s,L[t]??={},L[t][u]=s)}if(e.lhsId===r){const s=pe(e.lhsDir,e.rhsDir);s&&(f[s]=e.rhsId)}else{const s=pe(e.rhsDir,e.lhsDir);s&&(f[s]=e.lhsId)}return f},{}),i),{}),A=Object.keys(b)[0],G={[A]:1},N=Object.keys(b).reduce((i,r)=>r===A?i:{...i,[r]:1},{}),v=gt(i=>{const r={[i]:[0,0]},a=[i];for(;a.length>0;){const f=a.shift();if(f){G[f]=1,delete N[f];const e=b[f],[u,t]=r[f];Object.entries(e).forEach(([s,o])=>{G[o]||(r[o]=Cr([u,t],s),a.push(o))})}}return r},"BFS"),h=[v(A)];for(;Object.keys(N).length>0;)h.push(v(Object.keys(N)[0]));this.dataStructures={adjList:b,spatialMaps:h,groupAlignments:L}}return this.dataStructures}setElementForId(L,b){this.elements[L]=b}getElementById(L){return this.elements[L]}getConfig(){return ir({...Dr,...ar().architecture})}getConfigField(L){return this.getConfig()[L]}},xr=gt((L,b)=>{ke(L,b),L.groups.map(A=>b.addGroup(A)),L.services.map(A=>b.addService({...A,type:"service"})),L.junctions.map(A=>b.addJunction({...A,type:"junction"})),L.edges.map(A=>b.addEdge(A)),L.alignments?.map(A=>b.addLayoutHint({direction:A.direction,members:[...A.members]}))},"populateDb"),Ge={parser:{yy:void 0},parse:gt(async L=>{const b=await cr("architecture",L);Se.debug(b);const A=Ge.parser?.yy;if(!(A instanceof Pe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");xr(b,A)},"parse")},Ir=gt(L=>` +import{p as ke}from"./chunk-JWPE2WC7-TZtJmqSP.js";import{b7 as Ze,_ as gt,F as qe,ad as Qe,l as Se,b as Je,a as Ke,o as je,p as _e,g as tr,s as er,q as rr,B as ir,z as ar,D as nr,c as me,a$ as Ee,ai as ve,i as or,d as sr,r as hr,aj as lr,b8 as fr}from"./mermaid.core-B_UcP3X_.js";import{p as cr}from"./cynefin-VYW2F7L2-BnQdr27u.js";import{c as Fe}from"./cytoscape.esm-OyMbaexL.js";import"./index-BOtIzGLC.js";var se={exports:{}},he={exports:{}},le={exports:{}},gr=le.exports,Me;function ur(){return Me||(Me=1,(function(L,b){(function(G,N){L.exports=N()})(gr,function(){return(function(A){var G={};function N(v){if(G[v])return G[v].exports;var h=G[v]={i:v,l:!1,exports:{}};return A[v].call(h.exports,h,h.exports,N),h.l=!0,h.exports}return N.m=A,N.c=G,N.i=function(v){return v},N.d=function(v,h,i){N.o(v,h)||Object.defineProperty(v,h,{configurable:!1,enumerable:!0,get:i})},N.n=function(v){var h=v&&v.__esModule?function(){return v.default}:function(){return v};return N.d(h,"a",h),h},N.o=function(v,h){return Object.prototype.hasOwnProperty.call(v,h)},N.p="",N(N.s=28)})([(function(A,G,N){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,A.exports=v}),(function(A,G,N){var v=N(2),h=N(8),i=N(9);function r(f,e,u){v.call(this,u),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=u,this.bendpoints=[],this.source=f,this.target=e}r.prototype=Object.create(v.prototype);for(var a in v)r[a]=v[a];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,e){for(var u=this.getOtherEnd(f),t=e.getGraphManager().getRoot();;){if(u.getOwner()==e)return u;if(u.getOwner()==t)break;u=u.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=r}),(function(A,G,N){function v(h){this.vGraphObject=h}A.exports=v}),(function(A,G,N){var v=N(2),h=N(10),i=N(13),r=N(0),a=N(16),f=N(5);function e(t,s,o,c){o==null&&c==null&&(c=s),v.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new i(s.x,s.y,o.width,o.height):this.rect=new i}e.prototype=Object.create(v.prototype);for(var u in v)e[u]=v[u];e.prototype.getEdges=function(){return this.edges},e.prototype.getChild=function(){return this.child},e.prototype.getOwner=function(){return this.owner},e.prototype.getWidth=function(){return this.rect.width},e.prototype.setWidth=function(t){this.rect.width=t},e.prototype.getHeight=function(){return this.rect.height},e.prototype.setHeight=function(t){this.rect.height=t},e.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},e.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},e.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},e.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},e.prototype.getRect=function(){return this.rect},e.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},e.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},e.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},e.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},e.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},e.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},e.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";s.push(c)}}),s},e.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},e.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},e.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;ls?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=e}),(function(A,G,N){var v=N(0);function h(){}for(var i in v)h[i]=v[i];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=h}),(function(A,G,N){function v(h,i){h==null&&i==null?(this.x=0,this.y=0):(this.x=h,this.y=i)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(h){this.x=h},v.prototype.setY=function(h){this.y=h},v.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},A.exports=v}),(function(A,G,N){var v=N(2),h=N(10),i=N(0),r=N(7),a=N(3),f=N(1),e=N(13),u=N(12),t=N(11);function s(c,l,T){v.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof r?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(v.prototype);for(var o in v)s[o]=v[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},s.prototype.remove=function(c){var l=c;if(c instanceof a){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,d=T.length,C=0;C-1&&P>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(w,1),g.target!=g.source&&g.target.edges.splice(P,1);var S=g.source.owner.getEdges().indexOf(g);if(S==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(S,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,C=this.getNodes(),S=C.length,w=0;wT&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(C[0].getParent().paddingLeft!=null?d=C[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new u(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,C,S,w,P,B,U=this.nodes,V=U.length,M=0;MC&&(l=C),Tw&&(g=w),dC&&(l=C),Tw&&(g=w),d=this.nodes.length){var V=0;T.forEach(function(M){M.owner==c&&V++}),V==this.nodes.length&&(this.isConnected=!0)}},A.exports=s}),(function(A,G,N){var v,h=N(1);function i(r){v=N(6),this.layout=r,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var r=this.layout.newGraph(),a=this.layout.newNode(null),f=this.add(r,a);return this.setRootGraph(f),this.rootGraph},i.prototype.add=function(r,a,f,e,u){if(f==null&&e==null&&u==null){if(r==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return r.parent=a,a.child=r,r}else{u=f,e=a,f=r;var t=e.getOwner(),s=u.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,e,u);if(f.isInterGraph=!0,f.source=e,f.target=u,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},i.prototype.remove=function(r){if(r instanceof v){var a=r;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(a.getEdges());for(var e,u=f.length,t=0;t=r.getRight()?a[0]+=Math.min(r.getX()-i.getX(),i.getRight()-r.getRight()):r.getX()<=i.getX()&&r.getRight()>=i.getRight()&&(a[0]+=Math.min(i.getX()-r.getX(),r.getRight()-i.getRight())),i.getY()<=r.getY()&&i.getBottom()>=r.getBottom()?a[1]+=Math.min(r.getY()-i.getY(),i.getBottom()-r.getBottom()):r.getY()<=i.getY()&&r.getBottom()>=i.getBottom()&&(a[1]+=Math.min(i.getY()-r.getY(),r.getBottom()-i.getBottom()));var u=Math.abs((r.getCenterY()-i.getCenterY())/(r.getCenterX()-i.getCenterX()));r.getCenterY()===i.getCenterY()&&r.getCenterX()===i.getCenterX()&&(u=1);var t=u*a[0],s=a[1]/u;a[0]t)return a[0]=f,a[1]=o,a[2]=u,a[3]=U,!1;if(eu)return a[0]=s,a[1]=e,a[2]=P,a[3]=t,!1;if(fu?(a[0]=l,a[1]=T,n=!0):(a[0]=c,a[1]=o,n=!0):p===y&&(f>u?(a[0]=s,a[1]=o,n=!0):(a[0]=g,a[1]=T,n=!0)),-m===y?u>f?(a[2]=B,a[3]=U,E=!0):(a[2]=P,a[3]=w,E=!0):m===y&&(u>f?(a[2]=S,a[3]=w,E=!0):(a[2]=V,a[3]=U,E=!0)),n&&E)return!1;if(f>u?e>t?(I=this.getCardinalDirection(p,y,4),O=this.getCardinalDirection(m,y,2)):(I=this.getCardinalDirection(-p,y,3),O=this.getCardinalDirection(-m,y,1)):e>t?(I=this.getCardinalDirection(-p,y,1),O=this.getCardinalDirection(-m,y,3)):(I=this.getCardinalDirection(p,y,2),O=this.getCardinalDirection(m,y,4)),!n)switch(I){case 1:W=o,R=f+-C/y,a[0]=R,a[1]=W;break;case 2:R=g,W=e+d*y,a[0]=R,a[1]=W;break;case 3:W=T,R=f+C/y,a[0]=R,a[1]=W;break;case 4:R=l,W=e+-d*y,a[0]=R,a[1]=W;break}if(!E)switch(O){case 1:Q=w,x=u+-_/y,a[2]=x,a[3]=Q;break;case 2:x=V,Q=t+M*y,a[2]=x,a[3]=Q;break;case 3:Q=U,x=u+_/y,a[2]=x,a[3]=Q;break;case 4:x=B,Q=t+-M*y,a[2]=x,a[3]=Q;break}}return!1},h.getCardinalDirection=function(i,r,a){return i>r?a:1+a%4},h.getIntersection=function(i,r,a,f){if(f==null)return this.getIntersection2(i,r,a);var e=i.x,u=i.y,t=r.x,s=r.y,o=a.x,c=a.y,l=f.x,T=f.y,g=void 0,d=void 0,C=void 0,S=void 0,w=void 0,P=void 0,B=void 0,U=void 0,V=void 0;return C=s-u,w=e-t,B=t*u-e*s,S=T-c,P=o-l,U=l*c-o*T,V=C*P-S*w,V===0?null:(g=(w*U-P*B)/V,d=(S*B-C*U)/V,new v(g,d))},h.angleOfVector=function(i,r,a,f){var e=void 0;return i!==a?(e=Math.atan((f-r)/(a-i)),a=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,A.exports=h}),(function(A,G,N){function v(){}v.sign=function(h){return h>0?1:h<0?-1:0},v.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},v.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},A.exports=v}),(function(A,G,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,A.exports=v}),(function(A,G,N){var v=(function(){function e(u,t){for(var s=0;s"u"?"undefined":v(i);return i==null||r!="object"&&r!="function"},A.exports=h}),(function(A,G,N){function v(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(C.push(w[0]);C.length>0&&c;){var P=C[0];C.splice(0,1),d.add(P);for(var B=P.getEdges(),g=0;g-1&&w.splice(_,1)}d=new Set,S=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g0){for(var T=this.edgeToDummyNodes.get(l),g=0;g=0&&c.splice(U,1);var V=S.getNeighborsList();V.forEach(function(n){if(l.indexOf(n)<0){var E=T.get(n),p=E-1;p==1&&P.push(n),T.set(n,p)}})}l=l.concat(P),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=s}),(function(A,G,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},A.exports=v}),(function(A,G,N){var v=N(5);function h(i,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(i){this.lworldExtX=i},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(i){this.lworldExtY=i},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},h.prototype.transformX=function(i){var r=0,a=this.lworldExtX;return a!=0&&(r=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/a),r},h.prototype.transformY=function(i){var r=0,a=this.lworldExtY;return a!=0&&(r=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/a),r},h.prototype.inverseTransformX=function(i){var r=0,a=this.ldeviceExtX;return a!=0&&(r=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/a),r},h.prototype.inverseTransformY=function(i){var r=0,a=this.ldeviceExtY;return a!=0&&(r=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/a),r},h.prototype.inverseTransformPoint=function(i){var r=new v(this.inverseTransformX(i.x),this.inverseTransformY(i.y));return r},A.exports=h}),(function(A,G,N){function v(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);si.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oC||d>C)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(C=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>C||d>C)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},e.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=g.length||C>=g[0].length)){for(var S=0;Se}}]),a})();A.exports=r}),(function(A,G,N){function v(){}v.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var i=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St0;)Ct.push(0);return Ct})(this.n),a=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,e=Math.min(this.m-1,this.n),u=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;m--)if(this.s[m]!==0){for(var y=m+1;y=0;z--){if((function(Tt,Ct){return Tt&&Ct})(z0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(r[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){r[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(r[Nt]):0)+(Nt!==J+1?Math.abs(r[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=r[n-2];r[n-2]=0;for(var ut=n-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],it),wt=this.s[ut]/Et,Ot=it/Et;this.s[ut]=Et,ut!==J&&(it=-Ot*r[ut-1],r[ut-1]=wt*r[ut-1]);for(var mt=0;mt=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,JMath.abs(i)?(r=i/h,r=Math.abs(h)*Math.sqrt(1+r*r)):i!=0?(r=h/i,r=Math.abs(i)*Math.sqrt(1+r*r)):r=0,r},A.exports=v}),(function(A,G,N){var v=(function(){function r(a,f){for(var e=0;e2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,r),this.sequence1=a,this.sequence2=f,this.match_score=e,this.mismatch_penalty=u,this.gap_penalty=t,this.iMax=a.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;a--){var f=this.listeners[a];f.event===i&&f.callback===r&&this.listeners.splice(a,1)}},h.emit=function(i,r){for(var a=0;a{var G={45:((i,r,a)=>{var f={};f.layoutBase=a(551),f.CoSEConstants=a(806),f.CoSEEdge=a(767),f.CoSEGraph=a(880),f.CoSEGraphManager=a(578),f.CoSELayout=a(765),f.CoSENode=a(991),f.ConstraintHandler=a(902),i.exports=f}),806:((i,r,a)=>{var f=a(551).FDLayoutConstants;function e(){}for(var u in f)e[u]=f[u];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,i.exports=e}),767:((i,r,a)=>{var f=a(551).FDLayoutEdge;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),880:((i,r,a)=>{var f=a(551).LGraph;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),578:((i,r,a)=>{var f=a(551).LGraphManager;function e(t){f.call(this,t)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),765:((i,r,a)=>{var f=a(551).FDLayout,e=a(578),u=a(880),t=a(991),s=a(767),o=a(806),c=a(902),l=a(551).FDLayoutConstants,T=a(551).LayoutConstants,g=a(551).Point,d=a(551).PointD,C=a(551).DimensionD,S=a(551).Layout,w=a(551).Integer,P=a(551).IGeometry,B=a(551).LGraph,U=a(551).Transform,V=a(551).LinkedList;function M(){f.call(this),this.toBeTiled={},this.constraints={}}M.prototype=Object.create(f.prototype);for(var _ in f)M[_]=f[_];M.prototype.newGraphManager=function(){var n=new e(this);return this.graphManager=n,n},M.prototype.newGraph=function(n){return new u(null,this.graphManager,n)},M.prototype.newNode=function(n){return new t(this.graphManager,n)},M.prototype.newEdge=function(n){return new s(null,null,n)},M.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},M.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},M.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},M.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return E.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},M.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},M.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),E={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(m.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var O=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(D){n.fixedNodesOnHorizontal.add(D),n.fixedNodesOnVertical.add(D)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*D.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),k=D[tt],D[tt]=D[H],D[H]=k;return D},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var H=O.has(D.left)?O.get(D.left):D.left,k=O.has(D.right)?O.get(D.right):D.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(k)||(n.nodesInRelativeHorizontal.push(k),n.nodeToRelativeConstraintMapHorizontal.set(k,[]),n.dummyToNodeForVerticalAlignment.has(k)?n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(k)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(k).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:k,gap:D.gap}),n.nodeToRelativeConstraintMapHorizontal.get(k).push({left:H,gap:D.gap})}else{var tt=R.has(D.top)?R.get(D.top):D.top,ht=R.has(D.bottom)?R.get(D.bottom):D.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:D.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:D.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var H=O.has(D.left)?O.get(D.left):D.left,k=O.has(D.right)?O.get(D.right):D.right;Q.has(H)?Q.get(H).push(k):Q.set(H,[k]),Q.has(k)?Q.get(k).push(H):Q.set(k,[H])}else{var tt=R.has(D.top)?R.get(D.top):D.top,ht=R.has(D.bottom)?R.get(D.bottom):D.bottom;z.has(tt)?z.get(tt).push(ht):z.set(tt,[ht]),z.has(ht)?z.get(ht).push(tt):z.set(ht,[tt])}});var X=function(H,k){var tt=[],ht=[],J=new V,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var ut=it;for(J.push(ut),It.add(ut),tt[Nt].push(ut);J.length!=0;){ut=J.shift(),k.has(ut)&&(ht[Nt]=!0);var Et=H.get(ut);Et.forEach(function(wt){It.has(wt)||(J.push(wt),It.add(wt),tt[Nt].push(wt))})}Nt++}}),{components:tt,isFixed:ht}},rt=X(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var $=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},M.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var D=n.idToNodeMap.get($.nodeId);D.displacementX=0,D.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p1){var R;for(R=0;Rm&&(m=Math.floor(O.y)),I=Math.floor(O.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-O.x/2,T.WORLD_CENTER_Y-O.y/2))},M.radialLayout=function(n,E,p){var m=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);M.branchRadialLayout(E,null,0,359,0,m);var y=B.calculateBounds(n),I=new U;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var O=0;O1;){var k=H[0];H.splice(0,1);var tt=z.indexOf(k);tt>=0&&z.splice(tt,1),$--,X--}E!=null?D=(z.indexOf(H[0])+1)%$:D=0;for(var ht=Math.abs(m-p)/X,J=D;rt!=X;J=++J%$){var It=z[J].getOtherEnd(n);if(It!=E){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;M.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},M.maxDiagonalInTree=function(n){for(var E=w.MIN_VALUE,p=0;pE&&(E=y)}return E},M.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},M.prototype.groupZeroDegreeMembers=function(){var n=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y"u"&&(E[R]=[]),E[R]=E[R].concat(I)}Object.keys(E).forEach(function(W){if(E[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=E[W];var Q=E[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[x]=z;var X=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var $=0;$y?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(I+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>I?(m.rect.y-=(m.labelHeight-I)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-I)/2):m.labelPosVertical=="bottom"&&m.setHeight(I+m.labelHeight))}})},M.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var E=this.compoundOrder[n],p=E.id,m=E.paddingLeft,y=E.paddingTop,I=E.labelMarginLeft,O=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,I,O)}},M.prototype.repopulateZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=n.idToDummyNode[p],y=m.paddingLeft,I=m.paddingTop,O=m.labelMarginLeft,R=m.labelMarginTop;n.adjustLocations(E[p],m.rect.x,m.rect.y,y,I,O,R)})},M.prototype.getToBeTiled=function(n){var E=n.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=n.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y0)return this.toBeTiled[E]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},M.prototype.getNodeDegree=function(n){n.id;for(var E=n.getEdges(),p=0,m=0;mQ&&(Q=X.rect.height)}p+=Q+n.verticalPadding}},M.prototype.tileCompoundMembers=function(n,E){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(n[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,O=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(O+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>O?(y.rect.y-=(y.labelHeight-O)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-O)/2):y.labelPosVertical=="bottom"&&y.setHeight(O+y.labelHeight))}})},M.prototype.tileNodes=function(n,E){var p=this.tileNodesByFavoringDim(n,E,!0),m=this.tileNodesByFavoringDim(n,E,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(m),O;return IR&&(R=$.getWidth())});var W=I/y,x=O/y,Q=Math.pow(p-m,2)+4*(W+m)*(x+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(W+m)-m;return R>rt&&(rt=R),rt+=m*2,rt},M.prototype.tileNodesByFavoringDim=function(n,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};I&&(O.idealRowWidth=this.calcIdealRowWidth(n,p));var R=function(D){return D.rect.width*D.rect.height},W=function(D,H){return R(H)-R(D)};n.sort(function($,D){var H=W;return O.idealRowWidth?(H=I,H($.id,D.id)):H($,D)});for(var x=0,Q=0,z=0;z0&&(O+=n.horizontalPadding),n.rowWidth[p]=O,n.width0&&(R+=n.verticalPadding);var W=0;R>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=R,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(E)},M.prototype.getShortestRowIndex=function(n){for(var E=-1,p=Number.MAX_VALUE,m=0;mp&&(E=m,p=n.rowWidth[m]);return E},M.prototype.canAddHorizontal=function(n,E,p){if(n.idealRowWidth){var m=n.rows.length-1,y=n.rowWidth[m];return y+E+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var O=n.rowWidth[I];if(O+n.horizontalPadding+E<=n.width)return!0;var R=0;n.rowHeight[I]0&&(R=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-O>=E+n.horizontalPadding?W=(n.height+R)/(O+E+n.horizontalPadding):W=(n.height+R)/n.width,R=p+n.verticalPadding;var x;return n.widthI&&E!=p){m.splice(-1,1),n.rows[p].push(y),n.rowWidth[E]=n.rowWidth[E]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var O=Number.MIN_VALUE,R=0;RO&&(O=m[R].height);E>0&&(O+=n.verticalPadding);var W=n.rowHeight[E]+n.rowHeight[p];n.rowHeight[E]=O,n.rowHeight[p]0)for(var rt=y;rt<=I;rt++)X[0]+=this.grid[rt][O-1].length+this.grid[rt][O].length-1;if(I0)for(var rt=O;rt<=R;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var $=w.MAX_VALUE,D,H,k=0;k{var f=a(551).FDLayoutNode,e=a(551).IMath;function u(s,o,c,l){f.call(this,s,o,c,l)}u.prototype=Object.create(f.prototype);for(var t in f)u[t]=f[t];u.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},u.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Lt=0;ot.forEach(function(st){Z=="horizontal"?(et.set(st,g.has(st)?d[g.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?C[g.get(st)]:q.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){Z=="horizontal"?ft+=g.has(st)?d[g.get(st)]:q.get(st):ft+=g.has(st)?C[g.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var At=function(){var ot=dt.shift(),Lt=Y.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)st&&(st=kt),KtXt&&(Xt=Kt)}}catch(ee){Ct=!0,Bt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw Bt}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;et.set(te,et.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},_=function(Y){var Z=0,K=0,q=0,at=0;if(Y.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?Z++:K++:C[g.get(j.top)]-C[g.get(j.bottom)]>=0?q++:at++}),Z>K&&q>at)for(var ct=0;ctK)for(var nt=0;ntat)for(var et=0;et1)l.fixedNodeConstraint.forEach(function(F,Y){m[Y]=[F.position.x,F.position.y],y[Y]=[d[g.get(F.nodeId)],C[g.get(F.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var F=0;if(l.alignmentConstraint.vertical){for(var Y=l.alignmentConstraint.vertical,Z=function(et){var j=new Set;Y[et].forEach(function(pt){j.add(pt)});var dt=new Set([].concat(f(j)).filter(function(pt){return R.has(pt)})),At=void 0;dt.size>0?At=d[g.get(dt.values().next().value)]:At=V(j).x,Y[et].forEach(function(pt){m[F]=[At,C[g.get(pt)]],y[F]=[d[g.get(pt)],C[g.get(pt)]],F++})},K=0;K0?At=d[g.get(dt.values().next().value)]:At=V(j).y,q[et].forEach(function(pt){m[F]=[d[g.get(pt)],At],y[F]=[d[g.get(pt)],C[g.get(pt)]],F++})},ct=0;ctz&&(z=Q[rt].length,X=rt);if(z0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(F,Y){var Z={x:d[g.get(F.nodeId)],y:C[g.get(F.nodeId)]},K=F.position,q=U(K,Z);mt.x+=q.x,mt.y+=q.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(F,Y){d[Y]+=mt.x}),C.forEach(function(F,Y){C[Y]+=mt.y}),l.fixedNodeConstraint.forEach(function(F){d[g.get(F.nodeId)]=F.position.x,C[g.get(F.nodeId)]=F.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(Y){var Z=new Set;Dt[Y].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return R.has(at)})),q=void 0;K.size>0?q=d[g.get(K.values().next().value)]:q=V(Z).x,Z.forEach(function(at){R.has(at)||(d[g.get(at)]=q)})},Ht=0;Ht0?q=C[g.get(K.values().next().value)]:q=V(Z).y,Z.forEach(function(at){R.has(at)||(C[g.get(at)]=q)})},Ft=0;Ft{i.exports=A})},N={};function v(i){var r=N[i];if(r!==void 0)return r.exports;var a=N[i]={exports:{}};return G[i](a,a.exports,v),a.exports}var h=v(45);return h})()})})(he)),he.exports}var pr=se.exports,De;function yr(){return De||(De=1,(function(L,b){(function(G,N){L.exports=N(vr())})(pr,function(A){return(()=>{var G={658:(i=>{i.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var a=arguments.length,f=Array(a>1?a-1:0),e=1;e{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var d=s[Symbol.iterator](),C;!(l=(C=d.next()).done)&&(c.push(C.value),!(o&&c.length===o));l=!0);}catch(S){T=!0,g=S}finally{try{!l&&d.return&&d.return()}finally{if(T)throw g}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),e=a(140).layoutBase.LinkedList,u={};u.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var O=0;O1){C=g[0],S=C.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),B),U},u.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,C=!1,S=void 0;try{for(var w=s.nodeIndexes[Symbol.iterator](),P;!(d=(P=w.next()).done);d=!0){var B=P.value,U=f(B,2),V=U[0],M=U[1],_=o.cy.getElementById(V);if(_){var n=_.boundingBox(),E=s.xCoords[M]-n.w/2,p=s.xCoords[M]+n.w/2,m=s.yCoords[M]-n.h/2,y=s.yCoords[M]+n.h/2;El&&(l=p),mg&&(g=y)}}}catch(x){C=!0,S=x}finally{try{!d&&w.return&&w.return()}finally{if(C)throw S}}var I=t.x-(l+c)/2,O=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+O})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;zl&&(l=X),rtg&&(g=$)});var R=t.x-(l+c)/2,W=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var Q=s[x];Q.setCenter(Q.getCenterX()+R,Q.getCenterY()+W)})}}},u.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,C=void 0,S=void 0,w=void 0,P=void 0,B=t.descendants().not(":parent"),U=B.length,V=0;VC&&(l=C),Tw&&(g=w),d{var f=a(548),e=a(140).CoSELayout,u=a(140).CoSENode,t=a(140).layoutBase.PointD,s=a(140).layoutBase.DimensionD,o=a(140).layoutBase.LayoutConstants,c=a(140).layoutBase.FDLayoutConstants,l=a(140).CoSEConstants,T=function(d,C){var S=d.cy,w=d.eles,P=w.nodes(),B=w.edges(),U=void 0,V=void 0,M=void 0,_={};d.randomize&&(U=C.nodeIndexes,V=C.xCoords,M=C.yCoords);var n=function(x){return typeof x=="function"},E=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(S,w),m=function W(x,Q,z,X){for(var rt=Q.length,$=0;$0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),k),W(J,H,z,X)}}},y=function(x,Q,z){for(var X=0,rt=0,$=0;$0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,Q){Q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(x.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var O=new e,R=O.newGraphManager();return m(R.addRoot(),f.getTopMostNodes(P),O,d),y(O,R,B),I(O,d),O.runLayout(),_};i.exports={coseLayout:T}}),212:((i,r,a)=>{var f=(function(){function d(C,S){for(var w=0;w0)if(p){var I=t.getTopMostNodes(w.eles.nodes());if(M=t.connectComponents(P,w.eles,I),M.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),w.randomize&&M.forEach(function(vt){w.eles=vt,U.push(o(w))}),w.quality=="default"||w.quality=="proof"){var O=P.collection();if(w.tile){var R=new Map,W=[],x=[],Q=0,z={nodeIndexes:R,xCoords:W,yCoords:x},X=[];if(M.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){O.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),O.length>1){var rt=O.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),M.push(O),U.push(z);for(var $=X.length-1;$>=0;$--)M.splice(X[$],1),U.splice(X[$],1),_.splice(X[$],1)}}M.forEach(function(vt,it){w.eles=vt,V.push(l(w,U[it])),t.relocateComponent(_[it],V[it],w)})}else M.forEach(function(vt,it){t.relocateComponent(_[it],U[it],w)});var D=new Set;if(M.length>1){var H=[],k=B.filter(function(vt){return vt.css("display")=="none"});M.forEach(function(vt,it){var ut=void 0;if(w.quality=="draft"&&(ut=U[it].nodeIndexes),vt.nodes().not(k).length>0){var Et={};Et.edges=[],Et.nodes=[];var wt=void 0;vt.nodes().not(k).forEach(function(Ot){if(w.quality=="draft")if(!Ot.isParent())wt=ut.get(Ot.id()),Et.nodes.push({x:U[it].xCoords[wt]-Ot.boundingbox().w/2,y:U[it].yCoords[wt]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var mt=t.calcBoundingBox(Ot,U[it].xCoords,U[it].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else V[it][Ot.id()]&&Et.nodes.push({x:V[it][Ot.id()].getLeft(),y:V[it][Ot.id()].getTop(),width:V[it][Ot.id()].getWidth(),height:V[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var mt=Ot.source(),Dt=Ot.target();if(mt.css("display")!="none"&&Dt.css("display")!="none")if(w.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Dt.id()),Ut=[],Pt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,U[it].xCoords,U[it].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(U[it].xCoords[Rt]),Ut.push(U[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,U[it].xCoords,U[it].yCoords,ut);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(U[it].xCoords[Ht]),Pt.push(U[it].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else V[it][mt.id()]&&V[it][Dt.id()]&&Et.edges.push({startX:V[it][mt.id()].getCenterX(),startY:V[it][mt.id()].getCenterY(),endX:V[it][Dt.id()].getCenterX(),endY:V[it][Dt.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),D.add(it))}});var tt=E.packComponents(H,w.randomize).shifts;if(w.quality=="draft")U.forEach(function(vt,it){var ut=vt.xCoords.map(function(wt){return wt+tt[it].dx}),Et=vt.yCoords.map(function(wt){return wt+tt[it].dy});vt.xCoords=ut,vt.yCoords=Et});else{var ht=0;D.forEach(function(vt){Object.keys(V[vt]).forEach(function(it){var ut=V[vt][it];ut.setCenter(ut.getCenterX()+tt[ht].dx,ut.getCenterY()+tt[ht].dy)}),ht++})}}}else{var m=w.eles.boundingBox();if(_.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),w.randomize){var y=o(w);U.push(y)}w.quality=="default"||w.quality=="proof"?(V.push(l(w,U[0])),t.relocateComponent(_[0],V[0],w)):t.relocateComponent(_[0],U[0],w)}var J=function(it,ut){if(w.quality=="default"||w.quality=="proof"){typeof it=="number"&&(it=ut);var Et=void 0,wt=void 0,Ot=it.data("id");return V.forEach(function(Dt){Ot in Dt&&(Et={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},wt=Dt[Ot])}),w.nodeDimensionsIncludeLabels&&(wt.labelWidth&&(wt.labelPosHorizontal=="left"?Et.x+=wt.labelWidth/2:wt.labelPosHorizontal=="right"&&(Et.x-=wt.labelWidth/2)),wt.labelHeight&&(wt.labelPosVertical=="top"?Et.y+=wt.labelHeight/2:wt.labelPosVertical=="bottom"&&(Et.y-=wt.labelHeight/2))),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return U.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(mt={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(w.quality=="default"||w.quality=="proof"||w.randomize){var It=t.calcParentsWithoutChildren(P,B),Nt=B.filter(function(vt){return vt.css("display")=="none"});w.eles=B.not(Nt),B.nodes().not(":parent").not(Nt).layoutPositions(S,w,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d})();i.exports=g}),657:((i,r,a)=>{var f=a(548),e=a(140).layoutBase.Matrix,u=a(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,C=new Map,S=new Map,w=[],P=[],B=[],U=[],V=[],M=[],_=[],n=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,I=o.samplingType,O=o.nodeSeparation,R=void 0,W=function(){for(var Y=0,Z=0,K=!1;Z=at;){nt=q[at++];for(var xt=w[nt],lt=0;ltdt&&(dt=V[Lt],At=Lt)}return At},Q=function(Y){var Z=void 0;if(Y){Z=Math.floor(Math.random()*E);for(var q=0;q=1)break;j=et}for(var pt=0;pt=1)break;j=et}for(var lt=0;lt0&&(Z.isParent()?w[Y].push(S.get(Z.id())):w[Y].push(Z.id()))})});var Nt=function(Y){var Z=C.get(Y),K=void 0;d.get(Y).forEach(function(q){c.getElementById(q).isParent()?K=S.get(q):K=q,w[Z].push(K),w[C.get(K)].push(Y)})},vt=!0,it=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),wt;!(vt=(wt=Et.next()).done);vt=!0){var Ot=wt.value;Nt(Ot)}}catch(F){it=!0,ut=F}finally{try{!vt&&Et.return&&Et.return()}finally{if(it)throw ut}}E=C.size;var mt=void 0;if(E>2){R=E{var f=a(212),e=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&e(cytoscape),i.exports=e}),140:(i=>{i.exports=A})},N={};function v(i){var r=N[i];if(r!==void 0)return r.exports;var a=N[i]={exports:{}};return G[i](a,a.exports,v),a.exports}var h=v(579);return h})()})})(se)),se.exports}var mr=yr();const Er=Ze(mr);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:gt(L=>`${L},${L/2} 0,${L} 0,0`,"L"),R:gt(L=>`0,${L/2} ${L},0 ${L},${L}`,"R"),T:gt(L=>`0,0 ${L},0 ${L/2},${L}`,"T"),B:gt(L=>`${L/2},0 ${L},${L} 0,${L}`,"B")},oe={L:gt((L,b)=>L-b+2,"L"),R:gt((L,b)=>L-2,"R"),T:gt((L,b)=>L-b+2,"T"),B:gt((L,b)=>L-2,"B")},Tr=gt(function(L){return Wt(L)?L==="L"?"R":"L":L==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=gt(function(L){const b=L;return b==="L"||b==="R"||b==="T"||b==="B"},"isArchitectureDirection"),Wt=gt(function(L){const b=L;return b==="L"||b==="R"},"isArchitectureDirectionX"),qt=gt(function(L){const b=L;return b==="T"||b==="B"},"isArchitectureDirectionY"),Te=gt(function(L,b){const A=Wt(L)&&qt(b),G=qt(L)&&Wt(b);return A||G},"isArchitectureDirectionXY"),Nr=gt(function(L){const b=L[0],A=L[1],G=Wt(b)&&qt(A),N=qt(b)&&Wt(A);return G||N},"isArchitecturePairXY"),Lr=gt(function(L){return L!=="LL"&&L!=="RR"&&L!=="TT"&&L!=="BB"},"isValidArchitectureDirectionPair"),pe=gt(function(L,b){const A=`${L}${b}`;return Lr(A)?A:void 0},"getArchitectureDirectionPair"),Cr=gt(function([L,b],A){const G=A[0],N=A[1];return Wt(G)?qt(N)?[L+(G==="L"?-1:1),b+(N==="T"?1:-1)]:[L+(G==="L"?-1:1),b]:Wt(N)?[L+(N==="L"?1:-1),b+(G==="T"?1:-1)]:[L,b+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),wr=gt(function(L){return L==="LT"||L==="TL"?[1,1]:L==="BL"||L==="LB"?[1,-1]:L==="BR"||L==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=gt(function(L,b){return Te(L,b)?"bend":Wt(L)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Mr=gt(function(L){return L.type==="service"},"isArchitectureService"),Or=gt(function(L){return L.type==="junction"},"isArchitectureJunction"),be=gt(L=>L.data(),"edgeData"),ie=gt(L=>L.data(),"nodeData"),Dr=nr.architecture,Pe=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Je,this.getAccTitle=Ke,this.setDiagramTitle=je,this.getDiagramTitle=_e,this.getAccDescription=tr,this.setAccDescription=er,this.clear()}static{gt(this,"ArchitectureDB")}setDiagramId(L){this.diagramId=L}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",rr()}addService({id:L,icon:b,in:A,title:G,iconText:N}){if(this.registeredIds[L]!==void 0)throw new Error(`The service id [${L}] is already in use by another ${this.registeredIds[L]}`);if(A!==void 0){if(L===A)throw new Error(`The service [${L}] cannot be placed within itself`);if(this.registeredIds[A]===void 0)throw new Error(`The service [${L}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[A]==="node")throw new Error(`The service [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"service",icon:b,iconText:N,title:G,edges:[],in:A}}getServices(){return Object.values(this.nodes).filter(Mr)}addJunction({id:L,in:b}){if(this.registeredIds[L]!==void 0)throw new Error(`The junction id [${L}] is already in use by another ${this.registeredIds[L]}`);if(b!==void 0){if(L===b)throw new Error(`The junction [${L}] cannot be placed within itself`);if(this.registeredIds[b]===void 0)throw new Error(`The junction [${L}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[b]==="node")throw new Error(`The junction [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"junction",edges:[],in:b}}getJunctions(){return Object.values(this.nodes).filter(Or)}getNodes(){return Object.values(this.nodes)}getNode(L){return this.nodes[L]??null}addGroup({id:L,icon:b,in:A,title:G}){if(this.registeredIds?.[L]!==void 0)throw new Error(`The group id [${L}] is already in use by another ${this.registeredIds[L]}`);if(A!==void 0){if(L===A)throw new Error(`The group [${L}] cannot be placed within itself`);if(this.registeredIds?.[A]===void 0)throw new Error(`The group [${L}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[A]==="node")throw new Error(`The group [${L}]'s parent is not a group`)}this.registeredIds[L]="group",this.groups[L]={id:L,icon:b,title:G,in:A}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:L,rhsId:b,lhsDir:A,rhsDir:G,lhsInto:N,rhsInto:v,lhsGroup:h,rhsGroup:i,title:r}){if(!Re(A))throw new Error(`Invalid direction given for left hand side of edge ${L}--${b}. Expected (L,R,T,B) got ${String(A)}`);if(!Re(G))throw new Error(`Invalid direction given for right hand side of edge ${L}--${b}. Expected (L,R,T,B) got ${String(G)}`);if(this.nodes[L]===void 0&&this.groups[L]===void 0)throw new Error(`The left-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[b]===void 0&&this.groups[b]===void 0)throw new Error(`The right-hand id [${b}] does not yet exist. Please create the service/group before declaring an edge to it.`);const a=this.nodes[L].in,f=this.nodes[b].in;if(h&&a&&f&&a==f)throw new Error(`The left-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(i&&a&&f&&a==f)throw new Error(`The right-hand id [${b}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const e={lhsId:L,lhsDir:A,lhsInto:N,lhsGroup:h,rhsId:b,rhsDir:G,rhsInto:v,rhsGroup:i,title:r};this.edges.push(e),this.nodes[L]&&this.nodes[b]&&(this.nodes[L].edges.push(this.edges[this.edges.length-1]),this.nodes[b].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(L){if(L.members.length<2)throw new Error(`An align directive requires at least two members; got ${L.members.length}`);const b=new Set;L.members.forEach(A=>{if(this.registeredIds[A]!=="node")throw new Error(`align ${L.direction} references [${A}], which is not a service or junction`);if(b.has(A))throw new Error(`align ${L.direction} lists [${A}] more than once`);b.add(A)}),this.layoutHints.push(L)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const L={},b=Object.entries(this.nodes).reduce((i,[r,a])=>(i[r]=a.edges.reduce((f,e)=>{const u=this.getNode(e.lhsId)?.in,t=this.getNode(e.rhsId)?.in;if(u&&t&&u!==t){const s=Ar(e.lhsDir,e.rhsDir);s!=="bend"&&(L[u]??={},L[u][t]=s,L[t]??={},L[t][u]=s)}if(e.lhsId===r){const s=pe(e.lhsDir,e.rhsDir);s&&(f[s]=e.rhsId)}else{const s=pe(e.rhsDir,e.lhsDir);s&&(f[s]=e.lhsId)}return f},{}),i),{}),A=Object.keys(b)[0],G={[A]:1},N=Object.keys(b).reduce((i,r)=>r===A?i:{...i,[r]:1},{}),v=gt(i=>{const r={[i]:[0,0]},a=[i];for(;a.length>0;){const f=a.shift();if(f){G[f]=1,delete N[f];const e=b[f],[u,t]=r[f];Object.entries(e).forEach(([s,o])=>{G[o]||(r[o]=Cr([u,t],s),a.push(o))})}}return r},"BFS"),h=[v(A)];for(;Object.keys(N).length>0;)h.push(v(Object.keys(N)[0]));this.dataStructures={adjList:b,spatialMaps:h,groupAlignments:L}}return this.dataStructures}setElementForId(L,b){this.elements[L]=b}getElementById(L){return this.elements[L]}getConfig(){return ir({...Dr,...ar().architecture})}getConfigField(L){return this.getConfig()[L]}},xr=gt((L,b)=>{ke(L,b),L.groups.map(A=>b.addGroup(A)),L.services.map(A=>b.addService({...A,type:"service"})),L.junctions.map(A=>b.addJunction({...A,type:"junction"})),L.edges.map(A=>b.addEdge(A)),L.alignments?.map(A=>b.addLayoutHint({direction:A.direction,members:[...A.members]}))},"populateDb"),Ge={parser:{yy:void 0},parse:gt(async L=>{const b=await cr("architecture",L);Se.debug(b);const A=Ge.parser?.yy;if(!(A instanceof Pe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");xr(b,A)},"parse")},Ir=gt(L=>` .edge { stroke-width: ${L.archEdgeWidth}; stroke: ${L.archEdgeColor}; diff --git a/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-dNCVszO9.js b/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3--KepqvbS.js similarity index 99% rename from apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-dNCVszO9.js rename to apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3--KepqvbS.js index 836a3d59a..9ea46be2b 100644 --- a/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-dNCVszO9.js +++ b/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3--KepqvbS.js @@ -1,4 +1,4 @@ -import{g as de}from"./chunk-5VM5RSS4-CUvXVaNK.js";import{aA as pe,aB as Kt,aC as fe,aD as xe,aE as ye,aF as be,aG as we,aH as me,aI as Se,aJ as Le,aK as ke,aL as ve,aM as Ee,aN as _e,aO as Te,aP as De,aQ as Be,aR as Ne,aS as Ie,aT as Ce,aU as Oe,aV as Re,aW as Ae,aX as ze,aY as Me,_ as g,z as rt,d as D,e as Pe,l as k,q as Fe,t as We,c as R,aZ as Ye,a7 as He,a8 as Ke,a3 as Ue,a_ as M,a$ as kt,b0 as Q,as as Xe,y as $,k as Ve,b1 as je,i as Ct,b2 as Ot,b3 as Ge}from"./mermaid.core-DKNppTOJ.js";import{G as Ze}from"./graph-DOmOIIwC.js";import{c as qe}from"./channel-Dyw0qvA2.js";import"./index-DusVyqlT.js";function Je(e){return Array.isArray(e)}function Qe(e){if(pe(e))return e;const t=Kt(e);if(!$e(e))return{};if(Je(e)){const s=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(fe(e)){const s=e,i=s.constructor;return new i(s.buffer,s.byteOffset,s.length)}if(t==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(t==="[object DataView]"){const s=e,i=s.buffer,c=s.byteOffset,r=s.byteLength,n=new ArrayBuffer(r),l=new Uint8Array(i,c,r);return new Uint8Array(n).set(l),new DataView(n)}if(t==="[object Boolean]"||t==="[object Number]"||t==="[object String]"){const s=e.constructor,i=new s(e.valueOf());return t==="[object String]"?er(i,e):xt(i,e),i}if(t==="[object Date]")return new Date(Number(e));if(t==="[object RegExp]"){const s=e,i=new RegExp(s.source,s.flags);return i.lastIndex=s.lastIndex,i}if(t==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(t==="[object Map]"){const s=e,i=new Map;return s.forEach((c,r)=>{i.set(r,c)}),i}if(t==="[object Set]"){const s=e,i=new Set;return s.forEach(c=>{i.add(c)}),i}if(t==="[object Arguments]"){const s=e,i={};return xt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return rr(a,e),xt(a,e),tr(a,e),a}function $e(e){switch(Kt(e)){case Me:case ze:case Ae:case Re:case Oe:case Ce:case Ie:case Ne:case Be:case De:case Te:case _e:case Ee:case ve:case ke:case Le:case Se:case me:case we:case be:case ye:case xe:return!0;default:return!1}}function xt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function tr(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s=a)&&(e[s]=t[s])}function rr(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var bt=(function(){var e=g(function(T,m,p,x){for(p=p||{},x=T.length;x--;p[T[x]]=m);return p},"o"),t=[1,15],a=[1,7],s=[1,13],i=[1,14],c=[1,19],r=[1,16],n=[1,17],l=[1,18],u=[8,30],h=[8,10,21,28,29,30,31,39,43,46],d=[1,23],b=[1,24],w=[8,10,15,16,21,28,29,30,31,39,43,46],y=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],S={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:g(function(m,p,x,L,E,o,F){var f=o.length-1;switch(E){case 4:L.getLogger().debug("Rule: separator (NL) ");break;case 5:L.getLogger().debug("Rule: separator (Space) ");break;case 6:L.getLogger().debug("Rule: separator (EOF) ");break;case 7:L.getLogger().debug("Rule: hierarchy: ",o[f-1]),L.setHierarchy(o[f-1]);break;case 8:L.getLogger().debug("Stop NL ");break;case 9:L.getLogger().debug("Stop EOF ");break;case 10:L.getLogger().debug("Stop NL2 ");break;case 11:L.getLogger().debug("Stop EOF2 ");break;case 12:L.getLogger().debug("Rule: statement: ",o[f]),typeof o[f].length=="number"?this.$=o[f]:this.$=[o[f]];break;case 13:L.getLogger().debug("Rule: statement #2: ",o[f-1]),this.$=[o[f-1]].concat(o[f]);break;case 14:L.getLogger().debug("Rule: link: ",o[f],m),this.$={edgeTypeStr:o[f],label:""};break;case 15:L.getLogger().debug("Rule: LABEL link: ",o[f-3],o[f-1],o[f]),this.$={edgeTypeStr:o[f],label:o[f-1]};break;case 18:const C=parseInt(o[f]),Z=L.generateId();this.$={id:Z,type:"space",label:"",width:C,children:[]};break;case 23:L.getLogger().debug("Rule: (nodeStatement link node) ",o[f-2],o[f-1],o[f]," typestr: ",o[f-1].edgeTypeStr);const V=L.edgeStrToEdgeData(o[f-1].edgeTypeStr),at=L.edgeStrToEdgeStartData(o[f-1].edgeTypeStr),gt=L.edgeStrToThickness(o[f-1].edgeTypeStr),O=L.edgeStrToPattern(o[f-1].edgeTypeStr);this.$=[{id:o[f-2].id,label:o[f-2].label,type:o[f-2].type,directions:o[f-2].directions},{id:o[f-2].id+"-"+o[f].id,start:o[f-2].id,end:o[f].id,label:o[f-1].label,type:"edge",thickness:gt,pattern:O,directions:o[f].directions,arrowTypeEnd:V,arrowTypeStart:at},{id:o[f].id,label:o[f].label,type:L.typeStr2Type(o[f].typeStr),directions:o[f].directions}];break;case 24:L.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[f-1],o[f]),this.$={id:o[f-1].id,label:o[f-1].label,type:L.typeStr2Type(o[f-1].typeStr),directions:o[f-1].directions,widthInColumns:parseInt(o[f],10)};break;case 25:L.getLogger().debug("Rule: nodeStatement (node) ",o[f]),this.$={id:o[f].id,label:o[f].label,type:L.typeStr2Type(o[f].typeStr),directions:o[f].directions,widthInColumns:1};break;case 26:L.getLogger().debug("APA123",this?this:"na"),L.getLogger().debug("COLUMNS: ",o[f]),this.$={type:"column-setting",columns:o[f]==="auto"?-1:parseInt(o[f])};break;case 27:L.getLogger().debug("Rule: id-block statement : ",o[f-2],o[f-1]),L.generateId(),this.$={...o[f-2],type:"composite",children:o[f-1]};break;case 28:L.getLogger().debug("Rule: blockStatement : ",o[f-2],o[f-1],o[f]);const j=L.generateId();this.$={id:j,type:"composite",label:"",children:o[f-1]};break;case 29:L.getLogger().debug("Rule: node (NODE_ID separator): ",o[f]),this.$={id:o[f]};break;case 30:L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[f-1],o[f]),this.$={id:o[f-1],label:o[f].label,typeStr:o[f].typeStr,directions:o[f].directions};break;case 31:L.getLogger().debug("Rule: dirList: ",o[f]),this.$=[o[f]];break;case 32:L.getLogger().debug("Rule: dirList: ",o[f-1],o[f]),this.$=[o[f-1]].concat(o[f]);break;case 33:L.getLogger().debug("Rule: nodeShapeNLabel: ",o[f-2],o[f-1],o[f]),this.$={typeStr:o[f-2]+o[f],label:o[f-1]};break;case 34:L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[f-3],o[f-2]," #3:",o[f-1],o[f]),this.$={typeStr:o[f-3]+o[f],label:o[f-2],directions:o[f-1]};break;case 35:case 36:this.$={type:"classDef",id:o[f-1].trim(),css:o[f].trim()};break;case 37:this.$={type:"applyClass",id:o[f-1].trim(),styleClass:o[f].trim()};break;case 38:this.$={type:"applyStyles",id:o[f-1].trim(),stylesStr:o[f].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:s,29:i,31:c,39:r,43:n,46:l}),e(h,[2,16],{14:22,15:d,16:b}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(w,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,31:c},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(y,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:c},{31:[2,14]},{17:[1,36]},e(w,[2,24]),{10:t,11:37,13:4,14:22,15:d,16:b,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(y,[2,30]),{18:[1,43]},{18:[1,44]},e(w,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(h,[2,27]),e(y,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(y,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(m,p){if(p.recoverable)this.trace(m);else{var x=new Error(m);throw x.hash=p,x}},"parseError"),parse:g(function(m){var p=this,x=[0],L=[],E=[null],o=[],F=this.table,f="",C=0,Z=0,V=2,at=1,gt=o.slice.call(arguments,1),O=Object.create(this.lexer),j={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(j.yy[ut]=this.yy[ut]);O.setInput(m,j.yy),j.yy.lexer=O,j.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var dt=O.yylloc;o.push(dt);var ge=O.options&&O.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ue(W){x.length=x.length-2*W,E.length=E.length-W,o.length=o.length-W}g(ue,"popStack");function Nt(){var W;return W=L.pop()||O.lex()||at,typeof W!="number"&&(W instanceof Array&&(L=W,W=L.pop()),W=p.symbols_[W]||W),W}g(Nt,"lex");for(var P,q,H,pt,J={},st,G,It,it;;){if(q=x[x.length-1],this.defaultActions[q]?H=this.defaultActions[q]:((P===null||typeof P>"u")&&(P=Nt()),H=F[q]&&F[q][P]),typeof H>"u"||!H.length||!H[0]){var ft="";it=[];for(st in F[q])this.terminals_[st]&&st>V&&it.push("'"+this.terminals_[st]+"'");O.showPosition?ft="Parse error on line "+(C+1)+`: +import{g as de}from"./chunk-5VM5RSS4-DxIYPYOn.js";import{aA as pe,aB as Kt,aC as fe,aD as xe,aE as ye,aF as be,aG as we,aH as me,aI as Se,aJ as Le,aK as ke,aL as ve,aM as Ee,aN as _e,aO as Te,aP as De,aQ as Be,aR as Ne,aS as Ie,aT as Ce,aU as Oe,aV as Re,aW as Ae,aX as ze,aY as Me,_ as g,z as rt,d as D,e as Pe,l as k,q as Fe,t as We,c as R,aZ as Ye,a7 as He,a8 as Ke,a3 as Ue,a_ as M,a$ as kt,b0 as Q,as as Xe,y as $,k as Ve,b1 as je,i as Ct,b2 as Ot,b3 as Ge}from"./mermaid.core-B_UcP3X_.js";import{G as Ze}from"./graph-DOmOIIwC.js";import{c as qe}from"./channel-Bw0eTBly.js";import"./index-BOtIzGLC.js";function Je(e){return Array.isArray(e)}function Qe(e){if(pe(e))return e;const t=Kt(e);if(!$e(e))return{};if(Je(e)){const s=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(fe(e)){const s=e,i=s.constructor;return new i(s.buffer,s.byteOffset,s.length)}if(t==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(t==="[object DataView]"){const s=e,i=s.buffer,c=s.byteOffset,r=s.byteLength,n=new ArrayBuffer(r),l=new Uint8Array(i,c,r);return new Uint8Array(n).set(l),new DataView(n)}if(t==="[object Boolean]"||t==="[object Number]"||t==="[object String]"){const s=e.constructor,i=new s(e.valueOf());return t==="[object String]"?er(i,e):xt(i,e),i}if(t==="[object Date]")return new Date(Number(e));if(t==="[object RegExp]"){const s=e,i=new RegExp(s.source,s.flags);return i.lastIndex=s.lastIndex,i}if(t==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(t==="[object Map]"){const s=e,i=new Map;return s.forEach((c,r)=>{i.set(r,c)}),i}if(t==="[object Set]"){const s=e,i=new Set;return s.forEach(c=>{i.add(c)}),i}if(t==="[object Arguments]"){const s=e,i={};return xt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return rr(a,e),xt(a,e),tr(a,e),a}function $e(e){switch(Kt(e)){case Me:case ze:case Ae:case Re:case Oe:case Ce:case Ie:case Ne:case Be:case De:case Te:case _e:case Ee:case ve:case ke:case Le:case Se:case me:case we:case be:case ye:case xe:return!0;default:return!1}}function xt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function tr(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s=a)&&(e[s]=t[s])}function rr(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var bt=(function(){var e=g(function(T,m,p,x){for(p=p||{},x=T.length;x--;p[T[x]]=m);return p},"o"),t=[1,15],a=[1,7],s=[1,13],i=[1,14],c=[1,19],r=[1,16],n=[1,17],l=[1,18],u=[8,30],h=[8,10,21,28,29,30,31,39,43,46],d=[1,23],b=[1,24],w=[8,10,15,16,21,28,29,30,31,39,43,46],y=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],S={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:g(function(m,p,x,L,E,o,F){var f=o.length-1;switch(E){case 4:L.getLogger().debug("Rule: separator (NL) ");break;case 5:L.getLogger().debug("Rule: separator (Space) ");break;case 6:L.getLogger().debug("Rule: separator (EOF) ");break;case 7:L.getLogger().debug("Rule: hierarchy: ",o[f-1]),L.setHierarchy(o[f-1]);break;case 8:L.getLogger().debug("Stop NL ");break;case 9:L.getLogger().debug("Stop EOF ");break;case 10:L.getLogger().debug("Stop NL2 ");break;case 11:L.getLogger().debug("Stop EOF2 ");break;case 12:L.getLogger().debug("Rule: statement: ",o[f]),typeof o[f].length=="number"?this.$=o[f]:this.$=[o[f]];break;case 13:L.getLogger().debug("Rule: statement #2: ",o[f-1]),this.$=[o[f-1]].concat(o[f]);break;case 14:L.getLogger().debug("Rule: link: ",o[f],m),this.$={edgeTypeStr:o[f],label:""};break;case 15:L.getLogger().debug("Rule: LABEL link: ",o[f-3],o[f-1],o[f]),this.$={edgeTypeStr:o[f],label:o[f-1]};break;case 18:const C=parseInt(o[f]),Z=L.generateId();this.$={id:Z,type:"space",label:"",width:C,children:[]};break;case 23:L.getLogger().debug("Rule: (nodeStatement link node) ",o[f-2],o[f-1],o[f]," typestr: ",o[f-1].edgeTypeStr);const V=L.edgeStrToEdgeData(o[f-1].edgeTypeStr),at=L.edgeStrToEdgeStartData(o[f-1].edgeTypeStr),gt=L.edgeStrToThickness(o[f-1].edgeTypeStr),O=L.edgeStrToPattern(o[f-1].edgeTypeStr);this.$=[{id:o[f-2].id,label:o[f-2].label,type:o[f-2].type,directions:o[f-2].directions},{id:o[f-2].id+"-"+o[f].id,start:o[f-2].id,end:o[f].id,label:o[f-1].label,type:"edge",thickness:gt,pattern:O,directions:o[f].directions,arrowTypeEnd:V,arrowTypeStart:at},{id:o[f].id,label:o[f].label,type:L.typeStr2Type(o[f].typeStr),directions:o[f].directions}];break;case 24:L.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[f-1],o[f]),this.$={id:o[f-1].id,label:o[f-1].label,type:L.typeStr2Type(o[f-1].typeStr),directions:o[f-1].directions,widthInColumns:parseInt(o[f],10)};break;case 25:L.getLogger().debug("Rule: nodeStatement (node) ",o[f]),this.$={id:o[f].id,label:o[f].label,type:L.typeStr2Type(o[f].typeStr),directions:o[f].directions,widthInColumns:1};break;case 26:L.getLogger().debug("APA123",this?this:"na"),L.getLogger().debug("COLUMNS: ",o[f]),this.$={type:"column-setting",columns:o[f]==="auto"?-1:parseInt(o[f])};break;case 27:L.getLogger().debug("Rule: id-block statement : ",o[f-2],o[f-1]),L.generateId(),this.$={...o[f-2],type:"composite",children:o[f-1]};break;case 28:L.getLogger().debug("Rule: blockStatement : ",o[f-2],o[f-1],o[f]);const j=L.generateId();this.$={id:j,type:"composite",label:"",children:o[f-1]};break;case 29:L.getLogger().debug("Rule: node (NODE_ID separator): ",o[f]),this.$={id:o[f]};break;case 30:L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[f-1],o[f]),this.$={id:o[f-1],label:o[f].label,typeStr:o[f].typeStr,directions:o[f].directions};break;case 31:L.getLogger().debug("Rule: dirList: ",o[f]),this.$=[o[f]];break;case 32:L.getLogger().debug("Rule: dirList: ",o[f-1],o[f]),this.$=[o[f-1]].concat(o[f]);break;case 33:L.getLogger().debug("Rule: nodeShapeNLabel: ",o[f-2],o[f-1],o[f]),this.$={typeStr:o[f-2]+o[f],label:o[f-1]};break;case 34:L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[f-3],o[f-2]," #3:",o[f-1],o[f]),this.$={typeStr:o[f-3]+o[f],label:o[f-2],directions:o[f-1]};break;case 35:case 36:this.$={type:"classDef",id:o[f-1].trim(),css:o[f].trim()};break;case 37:this.$={type:"applyClass",id:o[f-1].trim(),styleClass:o[f].trim()};break;case 38:this.$={type:"applyStyles",id:o[f-1].trim(),stylesStr:o[f].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:s,29:i,31:c,39:r,43:n,46:l}),e(h,[2,16],{14:22,15:d,16:b}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(w,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,31:c},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(y,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:c},{31:[2,14]},{17:[1,36]},e(w,[2,24]),{10:t,11:37,13:4,14:22,15:d,16:b,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(y,[2,30]),{18:[1,43]},{18:[1,44]},e(w,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(h,[2,27]),e(y,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(y,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(m,p){if(p.recoverable)this.trace(m);else{var x=new Error(m);throw x.hash=p,x}},"parseError"),parse:g(function(m){var p=this,x=[0],L=[],E=[null],o=[],F=this.table,f="",C=0,Z=0,V=2,at=1,gt=o.slice.call(arguments,1),O=Object.create(this.lexer),j={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(j.yy[ut]=this.yy[ut]);O.setInput(m,j.yy),j.yy.lexer=O,j.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var dt=O.yylloc;o.push(dt);var ge=O.options&&O.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ue(W){x.length=x.length-2*W,E.length=E.length-W,o.length=o.length-W}g(ue,"popStack");function Nt(){var W;return W=L.pop()||O.lex()||at,typeof W!="number"&&(W instanceof Array&&(L=W,W=L.pop()),W=p.symbols_[W]||W),W}g(Nt,"lex");for(var P,q,H,pt,J={},st,G,It,it;;){if(q=x[x.length-1],this.defaultActions[q]?H=this.defaultActions[q]:((P===null||typeof P>"u")&&(P=Nt()),H=F[q]&&F[q][P]),typeof H>"u"||!H.length||!H[0]){var ft="";it=[];for(st in F[q])this.terminals_[st]&&st>V&&it.push("'"+this.terminals_[st]+"'");O.showPosition?ft="Parse error on line "+(C+1)+`: `+O.showPosition()+` Expecting `+it.join(", ")+", got '"+(this.terminals_[P]||P)+"'":ft="Parse error on line "+(C+1)+": Unexpected "+(P==at?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(ft,{text:O.match,token:this.terminals_[P]||P,line:O.yylineno,loc:dt,expected:it})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+P);switch(H[0]){case 1:x.push(P),E.push(O.yytext),o.push(O.yylloc),x.push(H[1]),P=null,Z=O.yyleng,f=O.yytext,C=O.yylineno,dt=O.yylloc;break;case 2:if(G=this.productions_[H[1]][1],J.$=E[E.length-G],J._$={first_line:o[o.length-(G||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(G||1)].first_column,last_column:o[o.length-1].last_column},ge&&(J._$.range=[o[o.length-(G||1)].range[0],o[o.length-1].range[1]]),pt=this.performAction.apply(J,[f,Z,C,j.yy,H[1],E,o].concat(gt)),typeof pt<"u")return pt;G&&(x=x.slice(0,-1*G*2),E=E.slice(0,-1*G),o=o.slice(0,-1*G)),x.push(this.productions_[H[1]][0]),E.push(J.$),o.push(J._$),It=F[x[x.length-2]][x[x.length-1]],x.push(It);break;case 3:return!0}}return!0},"parse")},N=(function(){var T={EOF:1,parseError:g(function(p,x){if(this.yy.parser)this.yy.parser.parseError(p,x);else throw new Error(p)},"parseError"),setInput:g(function(m,p){return this.yy=p||this.yy||{},this._input=m,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:g(function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var p=m.match(/(?:\r\n?|\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},"input"),unput:g(function(m){var p=m.length,x=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var L=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===L.length?this.yylloc.first_column:0)+L[L.length-x.length].length-x[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(m){this.unput(this.match.slice(m))},"less"),pastInput:g(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var m=this.pastInput(),p=new Array(m.length+1).join("-");return m+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-Dsva6pwc.js b/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-FIxdIiPR.js similarity index 99% rename from apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-Dsva6pwc.js rename to apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-FIxdIiPR.js index 064041fe3..22716357a 100644 --- a/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-Dsva6pwc.js +++ b/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-FIxdIiPR.js @@ -1,4 +1,4 @@ -import{g as Oe,d as Re}from"./chunk-32BRIVSS-BPgqH-Ub.js";import{s as Se,g as De,a as Pe,b as Be,_ as y,c as Dt,d as Nt,l as he,e as Ie,f as Me,h as Tt,i as pe,j as Le,w as Ne,k as Jt,m as ue}from"./mermaid.core-DKNppTOJ.js";import"./index-DusVyqlT.js";var jt=(function(){var e=y(function(_t,x,v,E){for(v=v||{},E=_t.length;E--;v[_t[E]]=x);return v},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],r=[1,28],a=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],p=[1,68],g=[1,69],m=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],st=[1,47],rt=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Xt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ot=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],A=[1,82],k=[1,83],C=[1,84],w=[1,85],T=[12,14,42],se=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],vt=[12,33],Wt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Qt={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:y(function(x,v,E,b,R,h,Rt){var f=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[f-3]);break;case 19:b.setTitle(h[f].substring(6)),this.$=h[f].substring(6);break;case 20:b.setAccDescription(h[f].substring(15)),this.$=h[f].substring(15);break;case 21:this.$=h[f].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[f].trim(),b.setAccDescription(this.$);break;case 28:h[f].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 29:h[f].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 30:b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 31:h[f].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[f]),this.$=h[f];break;case 32:b.addDeploymentNode("node",...h[f]),this.$=h[f];break;case 33:b.addDeploymentNode("nodeL",...h[f]),this.$=h[f];break;case 34:b.addDeploymentNode("nodeR",...h[f]),this.$=h[f];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[f]),this.$=h[f];break;case 40:b.addPersonOrSystem("external_person",...h[f]),this.$=h[f];break;case 41:b.addPersonOrSystem("system",...h[f]),this.$=h[f];break;case 42:b.addPersonOrSystem("system_db",...h[f]),this.$=h[f];break;case 43:b.addPersonOrSystem("system_queue",...h[f]),this.$=h[f];break;case 44:b.addPersonOrSystem("external_system",...h[f]),this.$=h[f];break;case 45:b.addPersonOrSystem("external_system_db",...h[f]),this.$=h[f];break;case 46:b.addPersonOrSystem("external_system_queue",...h[f]),this.$=h[f];break;case 47:b.addContainer("container",...h[f]),this.$=h[f];break;case 48:b.addContainer("container_db",...h[f]),this.$=h[f];break;case 49:b.addContainer("container_queue",...h[f]),this.$=h[f];break;case 50:b.addContainer("external_container",...h[f]),this.$=h[f];break;case 51:b.addContainer("external_container_db",...h[f]),this.$=h[f];break;case 52:b.addContainer("external_container_queue",...h[f]),this.$=h[f];break;case 53:b.addComponent("component",...h[f]),this.$=h[f];break;case 54:b.addComponent("component_db",...h[f]),this.$=h[f];break;case 55:b.addComponent("component_queue",...h[f]),this.$=h[f];break;case 56:b.addComponent("external_component",...h[f]),this.$=h[f];break;case 57:b.addComponent("external_component_db",...h[f]),this.$=h[f];break;case 58:b.addComponent("external_component_queue",...h[f]),this.$=h[f];break;case 60:b.addRel("rel",...h[f]),this.$=h[f];break;case 61:b.addRel("birel",...h[f]),this.$=h[f];break;case 62:b.addRel("rel_u",...h[f]),this.$=h[f];break;case 63:b.addRel("rel_d",...h[f]),this.$=h[f];break;case 64:b.addRel("rel_l",...h[f]),this.$=h[f];break;case 65:b.addRel("rel_r",...h[f]),this.$=h[f];break;case 66:b.addRel("rel_b",...h[f]),this.$=h[f];break;case 67:h[f].splice(0,1),b.addRel("rel",...h[f]),this.$=h[f];break;case 68:b.updateElStyle("update_el_style",...h[f]),this.$=h[f];break;case 69:b.updateRelStyle("update_rel_style",...h[f]),this.$=h[f];break;case 70:b.updateLayoutConfig("update_layout_config",...h[f]),this.$=h[f];break;case 71:this.$=[h[f]];break;case 72:h[f].unshift(h[f-1]),this.$=h[f];break;case 73:case 75:this.$=h[f].trim();break;case 74:let Et={};Et[h[f-1].trim()]=h[f].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:a,36:n,37:i,38:u,39:d,40:p,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Xt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[2,23]),{35:80,75:81,76:A,77:k,79:C,80:w},{35:86,75:81,76:A,77:k,79:C,80:w},{35:87,75:81,76:A,77:k,79:C,80:w},{35:88,75:81,76:A,77:k,79:C,80:w},{35:89,75:81,76:A,77:k,79:C,80:w},{35:90,75:81,76:A,77:k,79:C,80:w},{35:91,75:81,76:A,77:k,79:C,80:w},{35:92,75:81,76:A,77:k,79:C,80:w},{35:93,75:81,76:A,77:k,79:C,80:w},{35:94,75:81,76:A,77:k,79:C,80:w},{35:95,75:81,76:A,77:k,79:C,80:w},{35:96,75:81,76:A,77:k,79:C,80:w},{35:97,75:81,76:A,77:k,79:C,80:w},{35:98,75:81,76:A,77:k,79:C,80:w},{35:99,75:81,76:A,77:k,79:C,80:w},{35:100,75:81,76:A,77:k,79:C,80:w},{35:101,75:81,76:A,77:k,79:C,80:w},{35:102,75:81,76:A,77:k,79:C,80:w},{35:103,75:81,76:A,77:k,79:C,80:w},{35:104,75:81,76:A,77:k,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:A,77:k,79:C,80:w},{35:106,75:81,76:A,77:k,79:C,80:w},{35:107,75:81,76:A,77:k,79:C,80:w},{35:108,75:81,76:A,77:k,79:C,80:w},{35:109,75:81,76:A,77:k,79:C,80:w},{35:110,75:81,76:A,77:k,79:C,80:w},{35:111,75:81,76:A,77:k,79:C,80:w},{35:112,75:81,76:A,77:k,79:C,80:w},{35:113,75:81,76:A,77:k,79:C,80:w},{35:114,75:81,76:A,77:k,79:C,80:w},{35:115,75:81,76:A,77:k,79:C,80:w},{20:116,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:A,77:k,79:C,80:w},{35:120,75:81,76:A,77:k,79:C,80:w},{35:121,75:81,76:A,77:k,79:C,80:w},{35:122,75:81,76:A,77:k,79:C,80:w},{35:123,75:81,76:A,77:k,79:C,80:w},{35:124,75:81,76:A,77:k,79:C,80:w},{35:125,75:81,76:A,77:k,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Xt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:r}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:r,34:a,36:n,37:i,38:u,39:d,40:p,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ot,[2,21]),e(Ot,[2,22]),e(T,[2,39]),e(se,[2,71],{75:81,35:132,76:A,77:k,79:C,80:w}),e(Bt,[2,73]),{78:[1,133]},e(Bt,[2,75]),e(Bt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Xt,[2,18]),e(Ct,[2,38]),e(se,[2,72]),e(Bt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Wt,[2,25]),e(Wt,[2,26],{12:[1,138]}),e(Wt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:y(function(x,v){if(v.recoverable)this.trace(x);else{var E=new Error(x);throw E.hash=v,E}},"parseError"),parse:y(function(x){var v=this,E=[0],b=[],R=[null],h=[],Rt=this.table,f="",Et=0,re=0,ke=2,le=1,Ce=h.slice.call(arguments,1),D=Object.create(this.lexer),At={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(At.yy[Ht]=this.yy[Ht]);D.setInput(x,At.yy),At.yy.lexer=D,At.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var qt=D.yylloc;h.push(qt);var we=D.options&&D.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(L){E.length=E.length-2*L,R.length=R.length-L,h.length=h.length-L}y(Te,"popStack");function oe(){var L;return L=b.pop()||D.lex()||le,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=v.symbols_[L]||L),L}y(oe,"lex");for(var I,kt,N,Gt,wt={},Mt,W,ce,Lt;;){if(kt=E[E.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((I===null||typeof I>"u")&&(I=oe()),N=Rt[kt]&&Rt[kt][I]),typeof N>"u"||!N.length||!N[0]){var Kt="";Lt=[];for(Mt in Rt[kt])this.terminals_[Mt]&&Mt>ke&&Lt.push("'"+this.terminals_[Mt]+"'");D.showPosition?Kt="Parse error on line "+(Et+1)+`: +import{g as Oe,d as Re}from"./chunk-32BRIVSS-D_mpvupa.js";import{s as Se,g as De,a as Pe,b as Be,_ as y,c as Dt,d as Nt,l as he,e as Ie,f as Me,h as Tt,i as pe,j as Le,w as Ne,k as Jt,m as ue}from"./mermaid.core-B_UcP3X_.js";import"./index-BOtIzGLC.js";var jt=(function(){var e=y(function(_t,x,v,E){for(v=v||{},E=_t.length;E--;v[_t[E]]=x);return v},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],r=[1,28],a=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],p=[1,68],g=[1,69],m=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],st=[1,47],rt=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Xt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ot=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],A=[1,82],k=[1,83],C=[1,84],w=[1,85],T=[12,14,42],se=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],vt=[12,33],Wt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Qt={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:y(function(x,v,E,b,R,h,Rt){var f=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[f-3]);break;case 19:b.setTitle(h[f].substring(6)),this.$=h[f].substring(6);break;case 20:b.setAccDescription(h[f].substring(15)),this.$=h[f].substring(15);break;case 21:this.$=h[f].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[f].trim(),b.setAccDescription(this.$);break;case 28:h[f].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 29:h[f].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 30:b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 31:h[f].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[f]),this.$=h[f];break;case 32:b.addDeploymentNode("node",...h[f]),this.$=h[f];break;case 33:b.addDeploymentNode("nodeL",...h[f]),this.$=h[f];break;case 34:b.addDeploymentNode("nodeR",...h[f]),this.$=h[f];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[f]),this.$=h[f];break;case 40:b.addPersonOrSystem("external_person",...h[f]),this.$=h[f];break;case 41:b.addPersonOrSystem("system",...h[f]),this.$=h[f];break;case 42:b.addPersonOrSystem("system_db",...h[f]),this.$=h[f];break;case 43:b.addPersonOrSystem("system_queue",...h[f]),this.$=h[f];break;case 44:b.addPersonOrSystem("external_system",...h[f]),this.$=h[f];break;case 45:b.addPersonOrSystem("external_system_db",...h[f]),this.$=h[f];break;case 46:b.addPersonOrSystem("external_system_queue",...h[f]),this.$=h[f];break;case 47:b.addContainer("container",...h[f]),this.$=h[f];break;case 48:b.addContainer("container_db",...h[f]),this.$=h[f];break;case 49:b.addContainer("container_queue",...h[f]),this.$=h[f];break;case 50:b.addContainer("external_container",...h[f]),this.$=h[f];break;case 51:b.addContainer("external_container_db",...h[f]),this.$=h[f];break;case 52:b.addContainer("external_container_queue",...h[f]),this.$=h[f];break;case 53:b.addComponent("component",...h[f]),this.$=h[f];break;case 54:b.addComponent("component_db",...h[f]),this.$=h[f];break;case 55:b.addComponent("component_queue",...h[f]),this.$=h[f];break;case 56:b.addComponent("external_component",...h[f]),this.$=h[f];break;case 57:b.addComponent("external_component_db",...h[f]),this.$=h[f];break;case 58:b.addComponent("external_component_queue",...h[f]),this.$=h[f];break;case 60:b.addRel("rel",...h[f]),this.$=h[f];break;case 61:b.addRel("birel",...h[f]),this.$=h[f];break;case 62:b.addRel("rel_u",...h[f]),this.$=h[f];break;case 63:b.addRel("rel_d",...h[f]),this.$=h[f];break;case 64:b.addRel("rel_l",...h[f]),this.$=h[f];break;case 65:b.addRel("rel_r",...h[f]),this.$=h[f];break;case 66:b.addRel("rel_b",...h[f]),this.$=h[f];break;case 67:h[f].splice(0,1),b.addRel("rel",...h[f]),this.$=h[f];break;case 68:b.updateElStyle("update_el_style",...h[f]),this.$=h[f];break;case 69:b.updateRelStyle("update_rel_style",...h[f]),this.$=h[f];break;case 70:b.updateLayoutConfig("update_layout_config",...h[f]),this.$=h[f];break;case 71:this.$=[h[f]];break;case 72:h[f].unshift(h[f-1]),this.$=h[f];break;case 73:case 75:this.$=h[f].trim();break;case 74:let Et={};Et[h[f-1].trim()]=h[f].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:a,36:n,37:i,38:u,39:d,40:p,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Xt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[2,23]),{35:80,75:81,76:A,77:k,79:C,80:w},{35:86,75:81,76:A,77:k,79:C,80:w},{35:87,75:81,76:A,77:k,79:C,80:w},{35:88,75:81,76:A,77:k,79:C,80:w},{35:89,75:81,76:A,77:k,79:C,80:w},{35:90,75:81,76:A,77:k,79:C,80:w},{35:91,75:81,76:A,77:k,79:C,80:w},{35:92,75:81,76:A,77:k,79:C,80:w},{35:93,75:81,76:A,77:k,79:C,80:w},{35:94,75:81,76:A,77:k,79:C,80:w},{35:95,75:81,76:A,77:k,79:C,80:w},{35:96,75:81,76:A,77:k,79:C,80:w},{35:97,75:81,76:A,77:k,79:C,80:w},{35:98,75:81,76:A,77:k,79:C,80:w},{35:99,75:81,76:A,77:k,79:C,80:w},{35:100,75:81,76:A,77:k,79:C,80:w},{35:101,75:81,76:A,77:k,79:C,80:w},{35:102,75:81,76:A,77:k,79:C,80:w},{35:103,75:81,76:A,77:k,79:C,80:w},{35:104,75:81,76:A,77:k,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:A,77:k,79:C,80:w},{35:106,75:81,76:A,77:k,79:C,80:w},{35:107,75:81,76:A,77:k,79:C,80:w},{35:108,75:81,76:A,77:k,79:C,80:w},{35:109,75:81,76:A,77:k,79:C,80:w},{35:110,75:81,76:A,77:k,79:C,80:w},{35:111,75:81,76:A,77:k,79:C,80:w},{35:112,75:81,76:A,77:k,79:C,80:w},{35:113,75:81,76:A,77:k,79:C,80:w},{35:114,75:81,76:A,77:k,79:C,80:w},{35:115,75:81,76:A,77:k,79:C,80:w},{20:116,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:A,77:k,79:C,80:w},{35:120,75:81,76:A,77:k,79:C,80:w},{35:121,75:81,76:A,77:k,79:C,80:w},{35:122,75:81,76:A,77:k,79:C,80:w},{35:123,75:81,76:A,77:k,79:C,80:w},{35:124,75:81,76:A,77:k,79:C,80:w},{35:125,75:81,76:A,77:k,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Xt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:r}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:r,34:a,36:n,37:i,38:u,39:d,40:p,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ot,[2,21]),e(Ot,[2,22]),e(T,[2,39]),e(se,[2,71],{75:81,35:132,76:A,77:k,79:C,80:w}),e(Bt,[2,73]),{78:[1,133]},e(Bt,[2,75]),e(Bt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Xt,[2,18]),e(Ct,[2,38]),e(se,[2,72]),e(Bt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Wt,[2,25]),e(Wt,[2,26],{12:[1,138]}),e(Wt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:y(function(x,v){if(v.recoverable)this.trace(x);else{var E=new Error(x);throw E.hash=v,E}},"parseError"),parse:y(function(x){var v=this,E=[0],b=[],R=[null],h=[],Rt=this.table,f="",Et=0,re=0,ke=2,le=1,Ce=h.slice.call(arguments,1),D=Object.create(this.lexer),At={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(At.yy[Ht]=this.yy[Ht]);D.setInput(x,At.yy),At.yy.lexer=D,At.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var qt=D.yylloc;h.push(qt);var we=D.options&&D.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(L){E.length=E.length-2*L,R.length=R.length-L,h.length=h.length-L}y(Te,"popStack");function oe(){var L;return L=b.pop()||D.lex()||le,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=v.symbols_[L]||L),L}y(oe,"lex");for(var I,kt,N,Gt,wt={},Mt,W,ce,Lt;;){if(kt=E[E.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((I===null||typeof I>"u")&&(I=oe()),N=Rt[kt]&&Rt[kt][I]),typeof N>"u"||!N.length||!N[0]){var Kt="";Lt=[];for(Mt in Rt[kt])this.terminals_[Mt]&&Mt>ke&&Lt.push("'"+this.terminals_[Mt]+"'");D.showPosition?Kt="Parse error on line "+(Et+1)+`: `+D.showPosition()+` Expecting `+Lt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Kt="Parse error on line "+(Et+1)+": Unexpected "+(I==le?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Kt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:qt,expected:Lt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+kt+", token: "+I);switch(N[0]){case 1:E.push(I),R.push(D.yytext),h.push(D.yylloc),E.push(N[1]),I=null,re=D.yyleng,f=D.yytext,Et=D.yylineno,qt=D.yylloc;break;case 2:if(W=this.productions_[N[1]][1],wt.$=R[R.length-W],wt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},we&&(wt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Gt=this.performAction.apply(wt,[f,re,Et,At.yy,N[1],R,h].concat(Ce)),typeof Gt<"u")return Gt;W&&(E=E.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),E.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ce=Rt[E[E.length-2]][E[E.length-1]],E.push(ce);break;case 3:return!0}}return!0},"parse")},Ae=(function(){var _t={EOF:1,parseError:y(function(v,E){if(this.yy.parser)this.yy.parser.parseError(v,E);else throw new Error(v)},"parseError"),setInput:y(function(x,v){return this.yy=v||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:y(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var v=x.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:y(function(x){var v=x.length,E=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),E.length-1&&(this.yylineno-=E.length-1);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:E?(E.length===b.length?this.yylloc.first_column:0)+b[b.length-E.length].length-E[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:y(function(){return this._more=!0,this},"more"),reject:y(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:y(function(x){this.unput(this.match.slice(x))},"less"),pastInput:y(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:y(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:y(function(){var x=this.pastInput(),v=new Array(x.length+1).join("-");return x+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/channel-Bw0eTBly.js b/apps/kimi-code/dist-web/assets/channel-Bw0eTBly.js new file mode 100644 index 000000000..640ab0d02 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/channel-Bw0eTBly.js @@ -0,0 +1 @@ +import{U as a,C as n}from"./mermaid.core-B_UcP3X_.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c}; diff --git a/apps/kimi-code/dist-web/assets/channel-Dyw0qvA2.js b/apps/kimi-code/dist-web/assets/channel-Dyw0qvA2.js deleted file mode 100644 index 7d0df08d2..000000000 --- a/apps/kimi-code/dist-web/assets/channel-Dyw0qvA2.js +++ /dev/null @@ -1 +0,0 @@ -import{U as a,C as n}from"./mermaid.core-DKNppTOJ.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c}; diff --git a/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-Df_GFe3n.js b/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-CMIj8h4B.js similarity index 67% rename from apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-Df_GFe3n.js rename to apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-CMIj8h4B.js index 044adb3e4..9979182ca 100644 --- a/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-Df_GFe3n.js +++ b/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-CMIj8h4B.js @@ -1 +1 @@ -import{_ as i}from"./mermaid.core-DKNppTOJ.js";var r=class{constructor(t){this.init=t,this.records=this.init()}static{i(this,"ImperativeState")}reset(){this.records=this.init()}};export{r as I}; +import{_ as i}from"./mermaid.core-B_UcP3X_.js";var r=class{constructor(t){this.init=t,this.records=this.init()}static{i(this,"ImperativeState")}reset(){this.records=this.init()}};export{r as I}; diff --git a/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-BPgqH-Ub.js b/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-D_mpvupa.js similarity index 96% rename from apps/kimi-code/dist-web/assets/chunk-32BRIVSS-BPgqH-Ub.js rename to apps/kimi-code/dist-web/assets/chunk-32BRIVSS-D_mpvupa.js index f94653fc2..b62269c36 100644 --- a/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-BPgqH-Ub.js +++ b/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-D_mpvupa.js @@ -1 +1 @@ -import{_ as i,d as l,n as d,j as o}from"./mermaid.core-DKNppTOJ.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{p as a,f as b,g as c,x as d,m as e,w as f,h as g,y as h}; +import{_ as i,d as l,n as d,j as o}from"./mermaid.core-B_UcP3X_.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{p as a,f as b,g as c,x as d,m as e,w as f,h as g,y as h}; diff --git a/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-CUvXVaNK.js b/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-DxIYPYOn.js similarity index 83% rename from apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-CUvXVaNK.js rename to apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-DxIYPYOn.js index 3150afac1..de874d319 100644 --- a/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-CUvXVaNK.js +++ b/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-DxIYPYOn.js @@ -1,4 +1,4 @@ -import{_ as e}from"./mermaid.core-DKNppTOJ.js";var l=e(()=>` +import{_ as e}from"./mermaid.core-B_UcP3X_.js";var l=e(()=>` /* Font Awesome icon styling - consolidated */ .label-icon { display: inline-block; diff --git a/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-BRYxwC6w.js b/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-DaQFz5qU.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-BRYxwC6w.js rename to apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-DaQFz5qU.js index 5ba9d5ae9..f88043524 100644 --- a/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-BRYxwC6w.js +++ b/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-DaQFz5qU.js @@ -1,4 +1,4 @@ -import{g as te}from"./chunk-XXDRQBXY-DGdcv7YP.js";import{s as ee}from"./chunk-VR4S4FIN-DN3fhyNm.js";import{_ as f,l as _,c as $,x as se,y as ie,a as re,b as ae,g as ne,s as oe,o as le,p as ce,a9 as he,k as j,q as ue,d as bt,a5 as de}from"./mermaid.core-DKNppTOJ.js";import{f as fe}from"./chunk-32BRIVSS-BPgqH-Ub.js";var vt=(function(){var t=f(function(V,a,d,r){for(d=d||{},r=V.length;r--;d[V[r]]=a);return d},"o"),e=[1,2],o=[1,3],s=[1,4],c=[2,4],h=[1,9],p=[1,11],y=[1,16],n=[1,17],T=[1,18],m=[1,19],O=[1,33],x=[1,20],k=[1,21],u=[1,22],L=[1,23],I=[1,24],v=[1,26],F=[1,27],C=[1,28],P=[1,29],w=[1,30],H=[1,31],it=[1,32],rt=[1,35],at=[1,36],nt=[1,37],ot=[1,38],z=[1,34],S=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],lt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],xt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],yt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:f(function(a,d,r,g,E,i,B){var l=i.length-1;switch(E){case 3:return g.setRootDoc(i[l]),i[l];case 4:this.$=[];break;case 5:i[l]!="nl"&&(i[l-1].push(i[l]),this.$=i[l-1]);break;case 6:case 7:this.$=i[l];break;case 8:this.$="nl";break;case 12:this.$=i[l];break;case 13:const Q=i[l-1];Q.description=g.trimColon(i[l]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[l-2],state2:i[l]};break;case 15:const gt=g.trimColon(i[l]);this.$={stmt:"relation",state1:i[l-3],state2:i[l-1],description:gt};break;case 19:this.$={stmt:"state",id:i[l-3],type:"default",description:"",doc:i[l-1]};break;case 20:var Y=i[l],K=i[l-2].trim();if(i[l].match(":")){var ht=i[l].split(":");Y=ht[0],K=[K,ht[1]]}this.$={stmt:"state",id:Y,type:"default",description:K};break;case 21:this.$={stmt:"state",id:i[l-3],type:"default",description:i[l-5],doc:i[l-1]};break;case 22:this.$={stmt:"state",id:i[l],type:"fork"};break;case 23:this.$={stmt:"state",id:i[l],type:"join"};break;case 24:this.$={stmt:"state",id:i[l],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[l-1].trim(),note:{position:i[l-2].trim(),text:i[l].trim()}};break;case 29:this.$=i[l].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=i[l].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[l-3],url:i[l-2],tooltip:i[l-1]};break;case 33:this.$={stmt:"click",id:i[l-3],url:i[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[l-1].trim(),classes:i[l].trim()};break;case 36:this.$={stmt:"style",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 37:this.$={stmt:"applyClass",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:o,6:s},{1:[3]},{3:5,4:e,5:o,6:s},{3:6,4:e,5:o,6:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],c,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,7]),t(S,[2,8]),t(S,[2,9]),t(S,[2,10]),t(S,[2,11]),t(S,[2,12],{14:[1,40],15:[1,41]}),t(S,[2,16]),{18:[1,42]},t(S,[2,18],{20:[1,43]}),{23:[1,44]},t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(S,[2,28]),{34:[1,49]},{36:[1,50]},t(S,[2,31]),{13:51,24:O,57:z},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(lt,[2,44],{58:[1,56]}),t(lt,[2,45],{58:[1,57]}),t(S,[2,38]),t(S,[2,39]),t(S,[2,40]),t(S,[2,41]),t(S,[2,6]),t(S,[2,13]),{13:58,24:O,57:z},t(S,[2,17]),t(xt,c,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(S,[2,29]),t(S,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(S,[2,14],{14:[1,71]}),{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,72],22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(S,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(S,[2,15]),t(S,[2,19]),t(xt,c,{7:78}),t(S,[2,26]),t(S,[2,27]),{5:[1,79]},{5:[1,80]},{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,81],22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,32]),t(S,[2,33]),t(S,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(a,d){if(d.recoverable)this.trace(a);else{var r=new Error(a);throw r.hash=d,r}},"parseError"),parse:f(function(a){var d=this,r=[0],g=[],E=[null],i=[],B=this.table,l="",Y=0,K=0,ht=2,Q=1,gt=i.slice.call(arguments,1),b=Object.create(this.lexer),U={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(U.yy[Tt]=this.yy[Tt]);b.setInput(a,U.yy),U.yy.lexer=b,U.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Et=b.yylloc;i.push(Et);var Qt=b.options&&b.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(N){r.length=r.length-2*N,E.length=E.length-N,i.length=i.length-N}f(Zt,"popStack");function Lt(){var N;return N=g.pop()||b.lex()||Q,typeof N!="number"&&(N instanceof Array&&(g=N,N=g.pop()),N=d.symbols_[N]||N),N}f(Lt,"lex");for(var A,W,R,_t,X={},ut,G,It,dt;;){if(W=r[r.length-1],this.defaultActions[W]?R=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=Lt()),R=B[W]&&B[W][A]),typeof R>"u"||!R.length||!R[0]){var mt="";dt=[];for(ut in B[W])this.terminals_[ut]&&ut>ht&&dt.push("'"+this.terminals_[ut]+"'");b.showPosition?mt="Parse error on line "+(Y+1)+`: +import{g as te}from"./chunk-XXDRQBXY-AHUPVB2f.js";import{s as ee}from"./chunk-VR4S4FIN-CYEgbtU1.js";import{_ as f,l as _,c as $,x as se,y as ie,a as re,b as ae,g as ne,s as oe,o as le,p as ce,a9 as he,k as j,q as ue,d as bt,a5 as de}from"./mermaid.core-B_UcP3X_.js";import{f as fe}from"./chunk-32BRIVSS-D_mpvupa.js";var vt=(function(){var t=f(function(V,a,d,r){for(d=d||{},r=V.length;r--;d[V[r]]=a);return d},"o"),e=[1,2],o=[1,3],s=[1,4],c=[2,4],h=[1,9],p=[1,11],y=[1,16],n=[1,17],T=[1,18],m=[1,19],O=[1,33],x=[1,20],k=[1,21],u=[1,22],L=[1,23],I=[1,24],v=[1,26],F=[1,27],C=[1,28],P=[1,29],w=[1,30],H=[1,31],it=[1,32],rt=[1,35],at=[1,36],nt=[1,37],ot=[1,38],z=[1,34],S=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],lt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],xt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],yt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:f(function(a,d,r,g,E,i,B){var l=i.length-1;switch(E){case 3:return g.setRootDoc(i[l]),i[l];case 4:this.$=[];break;case 5:i[l]!="nl"&&(i[l-1].push(i[l]),this.$=i[l-1]);break;case 6:case 7:this.$=i[l];break;case 8:this.$="nl";break;case 12:this.$=i[l];break;case 13:const Q=i[l-1];Q.description=g.trimColon(i[l]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[l-2],state2:i[l]};break;case 15:const gt=g.trimColon(i[l]);this.$={stmt:"relation",state1:i[l-3],state2:i[l-1],description:gt};break;case 19:this.$={stmt:"state",id:i[l-3],type:"default",description:"",doc:i[l-1]};break;case 20:var Y=i[l],K=i[l-2].trim();if(i[l].match(":")){var ht=i[l].split(":");Y=ht[0],K=[K,ht[1]]}this.$={stmt:"state",id:Y,type:"default",description:K};break;case 21:this.$={stmt:"state",id:i[l-3],type:"default",description:i[l-5],doc:i[l-1]};break;case 22:this.$={stmt:"state",id:i[l],type:"fork"};break;case 23:this.$={stmt:"state",id:i[l],type:"join"};break;case 24:this.$={stmt:"state",id:i[l],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[l-1].trim(),note:{position:i[l-2].trim(),text:i[l].trim()}};break;case 29:this.$=i[l].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=i[l].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[l-3],url:i[l-2],tooltip:i[l-1]};break;case 33:this.$={stmt:"click",id:i[l-3],url:i[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[l-1].trim(),classes:i[l].trim()};break;case 36:this.$={stmt:"style",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 37:this.$={stmt:"applyClass",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:o,6:s},{1:[3]},{3:5,4:e,5:o,6:s},{3:6,4:e,5:o,6:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],c,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,7]),t(S,[2,8]),t(S,[2,9]),t(S,[2,10]),t(S,[2,11]),t(S,[2,12],{14:[1,40],15:[1,41]}),t(S,[2,16]),{18:[1,42]},t(S,[2,18],{20:[1,43]}),{23:[1,44]},t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(S,[2,28]),{34:[1,49]},{36:[1,50]},t(S,[2,31]),{13:51,24:O,57:z},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(lt,[2,44],{58:[1,56]}),t(lt,[2,45],{58:[1,57]}),t(S,[2,38]),t(S,[2,39]),t(S,[2,40]),t(S,[2,41]),t(S,[2,6]),t(S,[2,13]),{13:58,24:O,57:z},t(S,[2,17]),t(xt,c,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(S,[2,29]),t(S,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(S,[2,14],{14:[1,71]}),{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,72],22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(S,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(S,[2,15]),t(S,[2,19]),t(xt,c,{7:78}),t(S,[2,26]),t(S,[2,27]),{5:[1,79]},{5:[1,80]},{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,81],22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,32]),t(S,[2,33]),t(S,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(a,d){if(d.recoverable)this.trace(a);else{var r=new Error(a);throw r.hash=d,r}},"parseError"),parse:f(function(a){var d=this,r=[0],g=[],E=[null],i=[],B=this.table,l="",Y=0,K=0,ht=2,Q=1,gt=i.slice.call(arguments,1),b=Object.create(this.lexer),U={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(U.yy[Tt]=this.yy[Tt]);b.setInput(a,U.yy),U.yy.lexer=b,U.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Et=b.yylloc;i.push(Et);var Qt=b.options&&b.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(N){r.length=r.length-2*N,E.length=E.length-N,i.length=i.length-N}f(Zt,"popStack");function Lt(){var N;return N=g.pop()||b.lex()||Q,typeof N!="number"&&(N instanceof Array&&(g=N,N=g.pop()),N=d.symbols_[N]||N),N}f(Lt,"lex");for(var A,W,R,_t,X={},ut,G,It,dt;;){if(W=r[r.length-1],this.defaultActions[W]?R=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=Lt()),R=B[W]&&B[W][A]),typeof R>"u"||!R.length||!R[0]){var mt="";dt=[];for(ut in B[W])this.terminals_[ut]&&ut>ht&&dt.push("'"+this.terminals_[ut]+"'");b.showPosition?mt="Parse error on line "+(Y+1)+`: `+b.showPosition()+` Expecting `+dt.join(", ")+", got '"+(this.terminals_[A]||A)+"'":mt="Parse error on line "+(Y+1)+": Unexpected "+(A==Q?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(mt,{text:b.match,token:this.terminals_[A]||A,line:b.yylineno,loc:Et,expected:dt})}if(R[0]instanceof Array&&R.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(R[0]){case 1:r.push(A),E.push(b.yytext),i.push(b.yylloc),r.push(R[1]),A=null,K=b.yyleng,l=b.yytext,Y=b.yylineno,Et=b.yylloc;break;case 2:if(G=this.productions_[R[1]][1],X.$=E[E.length-G],X._$={first_line:i[i.length-(G||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(G||1)].first_column,last_column:i[i.length-1].last_column},Qt&&(X._$.range=[i[i.length-(G||1)].range[0],i[i.length-1].range[1]]),_t=this.performAction.apply(X,[l,K,Y,U.yy,R[1],E,i].concat(gt)),typeof _t<"u")return _t;G&&(r=r.slice(0,-1*G*2),E=E.slice(0,-1*G),i=i.slice(0,-1*G)),r.push(this.productions_[R[1]][0]),E.push(X.$),i.push(X._$),It=B[r[r.length-2]][r[r.length-1]],r.push(It);break;case 3:return!0}}return!0},"parse")},qt=(function(){var V={EOF:1,parseError:f(function(d,r){if(this.yy.parser)this.yy.parser.parseError(d,r);else throw new Error(d)},"parseError"),setInput:f(function(a,d){return this.yy=d||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var d=a.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:f(function(a){var d=a.length,r=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===g.length?this.yylloc.first_column:0)+g[g.length-r.length].length-r[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(a){this.unput(this.match.slice(a))},"less"),pastInput:f(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var a=this.pastInput(),d=new Array(a.length+1).join("-");return a+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-D24iyGyr.js b/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-TZtJmqSP.js similarity index 71% rename from apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-D24iyGyr.js rename to apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-TZtJmqSP.js index 8ac3d6b3c..9edc2fecf 100644 --- a/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-D24iyGyr.js +++ b/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-TZtJmqSP.js @@ -1 +1 @@ -import{_ as i}from"./mermaid.core-DKNppTOJ.js";function t(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}i(t,"populateCommonDb");export{t as p}; +import{_ as i}from"./mermaid.core-B_UcP3X_.js";function t(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}i(t,"populateCommonDb");export{t as p}; diff --git a/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-VIWv47K9.js b/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-m4Krf3Vn.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-VIWv47K9.js rename to apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-m4Krf3Vn.js index 96d6117c9..11638d9a2 100644 --- a/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-VIWv47K9.js +++ b/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-m4Krf3Vn.js @@ -1,4 +1,4 @@ -import{_ as p,l as w,F as L,z as E,q as I,W as X,e as q,i as H,c as G}from"./mermaid.core-DKNppTOJ.js";var z="",b="",N="",A=[],R=new Map,k=p(e=>H(e,G()),"sanitizeText"),F=p(e=>{switch(e.type){case"terminal":return{...e,value:k(e.value)};case"nonterminal":return{...e,name:k(e.name)};case"sequence":return{...e,elements:e.elements.map(F)};case"choice":return{...e,alternatives:e.alternatives.map(F)};case"optional":return{...e,element:F(e.element)};case"repetition":return{...e,element:F(e.element),separator:e.separator?F(e.separator):void 0};case"special":return{...e,text:k(e.text)}}},"sanitizeAstNode"),U=p(()=>{z="",b="",N="",A.length=0,R.clear(),I(),w.debug("[Railroad] Database cleared")},"clear"),W=p(e=>{z=k(e),w.debug("[Railroad] Title set:",e)},"setTitle"),_=p(()=>z,"getTitle"),j=p(e=>{const i={...e,name:k(e.name),definition:F(e.definition),comment:e.comment?k(e.comment):void 0};w.debug("[Railroad] Adding rule:",i.name),R.has(i.name)&&w.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),A.push(i),R.set(i.name,i)},"addRule"),K=p(()=>A,"getRules"),J=p(e=>R.get(e),"getRule"),Q=p(e=>{b=k(e).replace(/^\s+/g,""),w.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),Z=p(()=>b,"getAccTitle"),V=p(e=>{N=k(e).replace(/\n\s+/g,` +import{_ as p,l as w,F as L,z as E,q as I,W as X,e as q,i as H,c as G}from"./mermaid.core-B_UcP3X_.js";var z="",b="",N="",A=[],R=new Map,k=p(e=>H(e,G()),"sanitizeText"),F=p(e=>{switch(e.type){case"terminal":return{...e,value:k(e.value)};case"nonterminal":return{...e,name:k(e.name)};case"sequence":return{...e,elements:e.elements.map(F)};case"choice":return{...e,alternatives:e.alternatives.map(F)};case"optional":return{...e,element:F(e.element)};case"repetition":return{...e,element:F(e.element),separator:e.separator?F(e.separator):void 0};case"special":return{...e,text:k(e.text)}}},"sanitizeAstNode"),U=p(()=>{z="",b="",N="",A.length=0,R.clear(),I(),w.debug("[Railroad] Database cleared")},"clear"),W=p(e=>{z=k(e),w.debug("[Railroad] Title set:",e)},"setTitle"),_=p(()=>z,"getTitle"),j=p(e=>{const i={...e,name:k(e.name),definition:F(e.definition),comment:e.comment?k(e.comment):void 0};w.debug("[Railroad] Adding rule:",i.name),R.has(i.name)&&w.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),A.push(i),R.set(i.name,i)},"addRule"),K=p(()=>A,"getRules"),J=p(e=>R.get(e),"getRule"),Q=p(e=>{b=k(e).replace(/^\s+/g,""),w.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),Z=p(()=>b,"getAccTitle"),V=p(e=>{N=k(e).replace(/\n\s+/g,` `),w.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),ee=p(()=>N,"getAccDescription"),te=W,re=_,ie={clear:U,setTitle:W,getTitle:_,addRule:j,getRules:K,getRule:J,setAccTitle:Q,getAccTitle:Z,setAccDescription:V,getAccDescription:ee,setDiagramTitle:te,getDiagramTitle:re},g={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},ne=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,ae=/^[\w "',.-]+$/,oe=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),B=p(e=>e?Object.keys(e).every(i=>i==="railroad"||oe.has(i)):!1,"isRailroadStyleOptions"),le=p(e=>e?"railroad"in e&&e.railroad?e.railroad:B(e)?e:{}:{},"extractRailroadOverrides"),se=p(e=>{if(!e||B(e))return{};const{railroad:i,svgId:a,theme:r,look:t,...n}=e;return n},"extractThemeOverrides"),m=p((e,i)=>{if(typeof e!="string")return i;const a=e.trim();return ne.test(a)?a:i},"sanitizeColorValue"),Y=p((e,i)=>{if(typeof e!="string")return i;const a=e.trim();return ae.test(a)?a:i},"sanitizeFontFamilyValue"),S=p((e,i)=>{const a=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(a)&&a>=0?a:i},"sanitizeNumberValue"),de=p(e=>{const i=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(i)&&i>0?i:void 0},"parseThemeFontSize"),ce=p(e=>{const i=Y(e.fontFamily,g.fontFamily),a=de(e.fontSize)??g.fontSize;return{...g,fontFamily:i,fontSize:a,terminalFill:m(e.secondBkg??e.secondaryColor,g.terminalFill),terminalStroke:m(e.secondaryBorderColor??e.lineColor,g.terminalStroke),terminalTextColor:m(e.secondaryTextColor??e.textColor,g.terminalTextColor),nonTerminalFill:m(e.mainBkg??e.background,g.nonTerminalFill),nonTerminalStroke:m(e.primaryBorderColor??e.lineColor,g.nonTerminalStroke),nonTerminalTextColor:m(e.primaryTextColor??e.textColor,g.nonTerminalTextColor),lineColor:m(e.lineColor,g.lineColor),markerFill:m(e.lineColor,g.markerFill),commentFill:m(e.labelBackground??e.tertiaryColor,g.commentFill),commentStroke:m(e.tertiaryBorderColor??e.lineColor,g.commentStroke),commentTextColor:m(e.tertiaryTextColor??e.textColor,g.commentTextColor),specialFill:m(e.tertiaryColor??e.secondaryColor,g.specialFill),specialStroke:m(e.tertiaryBorderColor??e.secondaryBorderColor,g.specialStroke),ruleNameColor:m(e.titleColor??e.textColor,g.ruleNameColor)}},"buildThemeDefaults"),M=p(e=>{const i=E(),a={...X(),...i.themeVariables??{},...se(e)},r=ce(a),t={...i.railroad??{},...le(e)};return{compactMode:t.compactMode??r.compactMode,padding:S(t.padding,r.padding),verticalSeparation:S(t.verticalSeparation,r.verticalSeparation),horizontalSeparation:S(t.horizontalSeparation,r.horizontalSeparation),arcRadius:S(t.arcRadius,r.arcRadius),fontSize:S(t.fontSize,r.fontSize),fontFamily:Y(t.fontFamily,r.fontFamily),terminalFill:m(t.terminalFill,r.terminalFill),terminalStroke:m(t.terminalStroke,r.terminalStroke),terminalTextColor:m(t.terminalTextColor,r.terminalTextColor),nonTerminalFill:m(t.nonTerminalFill,r.nonTerminalFill),nonTerminalStroke:m(t.nonTerminalStroke,r.nonTerminalStroke),nonTerminalTextColor:m(t.nonTerminalTextColor,r.nonTerminalTextColor),lineColor:m(t.lineColor,r.lineColor),strokeWidth:S(t.strokeWidth,r.strokeWidth),markerFill:m(t.markerFill,r.markerFill),commentFill:m(t.commentFill,r.commentFill),commentStroke:m(t.commentStroke,r.commentStroke),commentTextColor:m(t.commentTextColor,r.commentTextColor),specialFill:m(t.specialFill,r.specialFill),specialStroke:m(t.specialStroke,r.specialStroke),ruleNameColor:m(t.ruleNameColor,r.ruleNameColor),showMarkers:t.showMarkers??r.showMarkers,markerRadius:S(t.markerRadius,r.markerRadius)}},"buildRailroadStyleOptions"),ue=p(e=>{const{fontFamily:i,fontSize:a,terminalFill:r,terminalStroke:t,terminalTextColor:n,nonTerminalFill:h,nonTerminalStroke:s,nonTerminalTextColor:o,lineColor:u,strokeWidth:c,markerFill:d,commentFill:x,commentStroke:l,commentTextColor:f,specialFill:y,specialStroke:v,ruleNameColor:C}=M(e);return` .railroad-diagram { font-family: ${i}; diff --git a/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-BoueTeQN.js b/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-BrAj5IFL.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-BoueTeQN.js rename to apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-BrAj5IFL.js index b5c4a210b..aa42a0662 100644 --- a/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-BoueTeQN.js +++ b/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-BrAj5IFL.js @@ -1 +1 @@ -import{_ as u,l as i}from"./mermaid.core-DKNppTOJ.js";import{i as m,G as y}from"./graph-DOmOIIwC.js";import{b as _,m as X}from"./map-DxJ2ADlA.js";var j=4;function p(e){return _(e,j)}function C(e){var r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:F(e),edges:M(e)};return m(e.graph())||(r.value=p(e.graph())),r}function F(e){return X(e.nodes(),function(r){var n=e.node(r),s=e.parent(r),t={v:r};return m(n)||(t.value=n),m(s)||(t.parent=s),t})}function M(e){return X(e.edges(),function(r){var n=e.edge(r),s={v:r.v,w:r.w};return m(r.name)||(s.name=r.name),m(n)||(s.value=n),s})}var c=new Map,w=new Map,A=new Map,J=u(()=>{w.clear(),A.clear(),c.clear()},"clear"),v=u((e,r)=>{const n=w.get(r)||[];return i.trace("In isDescendant",r," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),R=u((e,r)=>{const n=w.get(r)||[];return i.info("Descendants of ",r," is ",n),i.info("Edge is ",e),e.v===r||e.w===r?!1:n?n.includes(e.v)||v(e.v,r)||v(e.w,r)||n.includes(e.w):(i.debug("Tilt, ",r,",not in descendants"),!1)},"edgeInCluster"),b=u((e,r,n,s)=>{i.warn("Copying children of ",e,"root",s,"data",r.node(e),s);const t=r.children(e)||[];e!==s&&t.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",t),t.forEach(o=>{if(r.children(o).length>0)b(o,r,n,s);else{const l=r.node(o);i.info("cp ",o," to ",s," with parent ",e),n.setNode(o,l),s!==r.parent(o)&&(i.warn("Setting parent",o,r.parent(o)),n.setParent(o,r.parent(o))),e!==s&&o!==e?(i.debug("Setting parent",o,e),n.setParent(o,e)):(i.info("In copy ",e,"root",s,"data",r.node(e),s),i.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==s,"node!==clusterId",o!==e));const f=r.edges(o);i.debug("Copying Edges",f),f.forEach(a=>{i.info("Edge",a);const d=r.edge(a.v,a.w,a.name);i.info("Edge data",d,s);try{if(R(a,s)){const g=w.get(s)||[],E=g.includes(a.v)||v(a.v,s)||a.v===s,x=g.includes(a.w)||v(a.w,s)||a.w===s;if(E&&x)i.info("Copying as ",a.v,a.w,d,a.name),n.setEdge(a.v,a.w,d,a.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]));else{const N=E?s:a.v,h=x?s:a.w;i.info("Rebinding cross-boundary edge as ",N,h,d,a.name),r.setEdge(N,h,d,a.name)}}else i.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",s," clusterId:",e)}catch(g){i.error(g)}})}i.debug("Removing node",o),r.removeNode(o)})},"copy"),O=u((e,r)=>{const n=r.children(e);let s=[...n];for(const t of n)A.set(t,e),s=[...s,...O(t,r)];return s},"extractDescendants"),P=u((e,r,n)=>{const s=e.edges().filter(a=>a.v===r||a.w===r),t=e.edges().filter(a=>a.v===n||a.w===n),o=s.map(a=>({v:a.v===r?n:a.v,w:a.w===r?r:a.w})),l=t.map(a=>({v:a.v,w:a.w}));return o.filter(a=>l.some(d=>a.v===d.v&&a.w===d.w))},"findCommonEdges"),D=u((e,r,n)=>{const s=r.children(e);if(i.trace("Searching children of id ",e,s),s.length<1)return e;let t;for(const o of s){const l=D(o,r,n),f=P(r,n,l);if(l)if(f.length>0)t=l;else return l}return t},"findNonClusterChild"),S=u(e=>!c.has(e)||!c.get(e).externalConnections?e:c.has(e)?c.get(e).id:e,"getAnchorId"),U=u((e,r)=>{if(!e||r>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",D(n,e,n)),w.set(n,O(n,e)),c.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const s=e.children(n),t=e.edges();s.length>0?(i.debug("Cluster identified",n,w),t.forEach(o=>{const l=v(o.v,n),f=v(o.w,n);l^f&&(i.warn("Edge: ",o," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",w.get(n)),c.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,w)});for(let n of c.keys()){const s=c.get(n).id,t=e.parent(s);t!==n&&c.has(t)&&!c.get(t).externalConnections&&(c.get(n).id=t);const o=e.edges().some(l=>l.v===n);if(s&&c.get(n)?.externalConnections&&o&&L(e,s,n)){const l=T(e,n,e.parent(s));l&&(c.get(n).id=l)}}e.edges().forEach(function(n){const s=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let t=n.v,o=n.w;if(i.warn("Fix XXX",c,"ids:",n.v,n.w,"Translating: ",c.get(n.v)," --- ",c.get(n.w)),c.get(n.v)||c.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),t=S(n.v),o=S(n.w),e.removeEdge(n.v,n.w,n.name),t!==n.v){const l=e.parent(t);c.get(l).externalConnections=!0,s.fromCluster=n.v}if(o!==n.w){const l=e.parent(o);c.get(l).externalConnections=!0,s.toCluster=n.w}i.warn("Fix Replacing with XXX",t,o,n.name),e.setEdge(t,o,s,n.name)}}),i.warn("Adjusted Graph",C(e)),k(e,0),i.trace(c)},"adjustClustersAndEdges"),k=u((e,r)=>{if(i.warn("extractor - ",r,C(e),e.children("D")),r>10){i.error("Bailing out");return}let n=e.nodes(),s=!1;for(const t of n){const o=e.children(t);s=s||o.length>0}if(!s){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,r);for(const t of n)if(i.debug("Extracting node",t,c,c.has(t)&&!c.get(t).externalConnections,!e.parent(t),e.node(t),e.children("D")," Depth ",r),!c.has(t))i.debug("Not a cluster",t,r);else if(c.get(t)?.clusterData?.explicitDir&&e.children(t)&&e.children(t).length>0){i.warn("Cluster with explicit dir, creating subgraph for children",t,r);const o=c.get(t).clusterData.dir,l=new y({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});b(t,e,l,t);const f=e.node(t)||{};e.setNode(t,{...f,clusterNode:!0,id:t,clusterData:c.get(t).clusterData,label:c.get(t).label,graph:l}),i.warn("Subgraph for cluster with explicit dir created:",t,C(l))}else if(!c.get(t).externalConnections&&e.children(t)&&e.children(t).length>0){i.warn("Cluster without external connections, without a parent and with children",t,r);let l=e.graph().rankdir==="TB"?"LR":"TB";c.get(t)?.clusterData?.dir&&(l=c.get(t).clusterData.dir,i.warn("Fixing dir",c.get(t).clusterData.dir,l));const f=new y({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});b(t,e,f,t);const a=e.node(t)||{};e.setNode(t,{...a,clusterNode:!0,id:t,clusterData:c.get(t).clusterData,label:c.get(t).label,graph:f}),i.debug("Old graph after copy",C(e))}else i.warn("Cluster ** ",t," **not meeting the criteria !externalConnections:",!c.get(t).externalConnections," no parent: ",!e.parent(t)," children ",e.children(t)&&e.children(t).length>0,e.children("D"),r),i.debug(c);n=e.nodes(),i.warn("New list of nodes",n);for(const t of n){const o=e.node(t);i.warn(" Now next level",t,o),o?.clusterNode&&k(o.graph,r+1)}},"extractor"),B=u((e,r)=>{if(r.length===0)return[];let n=Object.assign([],r);return r.forEach(s=>{const t=e.children(s),o=B(e,t);n=[...n,...o]}),n},"sorter"),W=u(e=>B(e,e.children()),"sortNodesByHierarchy"),L=u((e,r,n)=>{let s=e.parent(r);for(;s&&s!==n;){const t=c.get(s);if(t&&!t.externalConnections)return!0;s=e.parent(s)}return!1},"isNodeInExtractableCluster"),T=u((e,r,n)=>{const s=e.children(r)??[];for(const t of s){if(t===n||v(t,n))continue;const o=D(t,e,r);if(o&&!L(e,o,r))return o}return null},"findSafeAnchorNode");export{U as a,c as b,J as c,D as f,W as s,C as w}; +import{_ as u,l as i}from"./mermaid.core-B_UcP3X_.js";import{i as m,G as y}from"./graph-DOmOIIwC.js";import{b as _,m as X}from"./map-DxJ2ADlA.js";var j=4;function p(e){return _(e,j)}function C(e){var r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:F(e),edges:M(e)};return m(e.graph())||(r.value=p(e.graph())),r}function F(e){return X(e.nodes(),function(r){var n=e.node(r),s=e.parent(r),t={v:r};return m(n)||(t.value=n),m(s)||(t.parent=s),t})}function M(e){return X(e.edges(),function(r){var n=e.edge(r),s={v:r.v,w:r.w};return m(r.name)||(s.name=r.name),m(n)||(s.value=n),s})}var c=new Map,w=new Map,A=new Map,J=u(()=>{w.clear(),A.clear(),c.clear()},"clear"),v=u((e,r)=>{const n=w.get(r)||[];return i.trace("In isDescendant",r," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),R=u((e,r)=>{const n=w.get(r)||[];return i.info("Descendants of ",r," is ",n),i.info("Edge is ",e),e.v===r||e.w===r?!1:n?n.includes(e.v)||v(e.v,r)||v(e.w,r)||n.includes(e.w):(i.debug("Tilt, ",r,",not in descendants"),!1)},"edgeInCluster"),b=u((e,r,n,s)=>{i.warn("Copying children of ",e,"root",s,"data",r.node(e),s);const t=r.children(e)||[];e!==s&&t.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",t),t.forEach(o=>{if(r.children(o).length>0)b(o,r,n,s);else{const l=r.node(o);i.info("cp ",o," to ",s," with parent ",e),n.setNode(o,l),s!==r.parent(o)&&(i.warn("Setting parent",o,r.parent(o)),n.setParent(o,r.parent(o))),e!==s&&o!==e?(i.debug("Setting parent",o,e),n.setParent(o,e)):(i.info("In copy ",e,"root",s,"data",r.node(e),s),i.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==s,"node!==clusterId",o!==e));const f=r.edges(o);i.debug("Copying Edges",f),f.forEach(a=>{i.info("Edge",a);const d=r.edge(a.v,a.w,a.name);i.info("Edge data",d,s);try{if(R(a,s)){const g=w.get(s)||[],E=g.includes(a.v)||v(a.v,s)||a.v===s,x=g.includes(a.w)||v(a.w,s)||a.w===s;if(E&&x)i.info("Copying as ",a.v,a.w,d,a.name),n.setEdge(a.v,a.w,d,a.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]));else{const N=E?s:a.v,h=x?s:a.w;i.info("Rebinding cross-boundary edge as ",N,h,d,a.name),r.setEdge(N,h,d,a.name)}}else i.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",s," clusterId:",e)}catch(g){i.error(g)}})}i.debug("Removing node",o),r.removeNode(o)})},"copy"),O=u((e,r)=>{const n=r.children(e);let s=[...n];for(const t of n)A.set(t,e),s=[...s,...O(t,r)];return s},"extractDescendants"),P=u((e,r,n)=>{const s=e.edges().filter(a=>a.v===r||a.w===r),t=e.edges().filter(a=>a.v===n||a.w===n),o=s.map(a=>({v:a.v===r?n:a.v,w:a.w===r?r:a.w})),l=t.map(a=>({v:a.v,w:a.w}));return o.filter(a=>l.some(d=>a.v===d.v&&a.w===d.w))},"findCommonEdges"),D=u((e,r,n)=>{const s=r.children(e);if(i.trace("Searching children of id ",e,s),s.length<1)return e;let t;for(const o of s){const l=D(o,r,n),f=P(r,n,l);if(l)if(f.length>0)t=l;else return l}return t},"findNonClusterChild"),S=u(e=>!c.has(e)||!c.get(e).externalConnections?e:c.has(e)?c.get(e).id:e,"getAnchorId"),U=u((e,r)=>{if(!e||r>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",D(n,e,n)),w.set(n,O(n,e)),c.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const s=e.children(n),t=e.edges();s.length>0?(i.debug("Cluster identified",n,w),t.forEach(o=>{const l=v(o.v,n),f=v(o.w,n);l^f&&(i.warn("Edge: ",o," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",w.get(n)),c.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,w)});for(let n of c.keys()){const s=c.get(n).id,t=e.parent(s);t!==n&&c.has(t)&&!c.get(t).externalConnections&&(c.get(n).id=t);const o=e.edges().some(l=>l.v===n);if(s&&c.get(n)?.externalConnections&&o&&L(e,s,n)){const l=T(e,n,e.parent(s));l&&(c.get(n).id=l)}}e.edges().forEach(function(n){const s=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let t=n.v,o=n.w;if(i.warn("Fix XXX",c,"ids:",n.v,n.w,"Translating: ",c.get(n.v)," --- ",c.get(n.w)),c.get(n.v)||c.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),t=S(n.v),o=S(n.w),e.removeEdge(n.v,n.w,n.name),t!==n.v){const l=e.parent(t);c.get(l).externalConnections=!0,s.fromCluster=n.v}if(o!==n.w){const l=e.parent(o);c.get(l).externalConnections=!0,s.toCluster=n.w}i.warn("Fix Replacing with XXX",t,o,n.name),e.setEdge(t,o,s,n.name)}}),i.warn("Adjusted Graph",C(e)),k(e,0),i.trace(c)},"adjustClustersAndEdges"),k=u((e,r)=>{if(i.warn("extractor - ",r,C(e),e.children("D")),r>10){i.error("Bailing out");return}let n=e.nodes(),s=!1;for(const t of n){const o=e.children(t);s=s||o.length>0}if(!s){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,r);for(const t of n)if(i.debug("Extracting node",t,c,c.has(t)&&!c.get(t).externalConnections,!e.parent(t),e.node(t),e.children("D")," Depth ",r),!c.has(t))i.debug("Not a cluster",t,r);else if(c.get(t)?.clusterData?.explicitDir&&e.children(t)&&e.children(t).length>0){i.warn("Cluster with explicit dir, creating subgraph for children",t,r);const o=c.get(t).clusterData.dir,l=new y({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});b(t,e,l,t);const f=e.node(t)||{};e.setNode(t,{...f,clusterNode:!0,id:t,clusterData:c.get(t).clusterData,label:c.get(t).label,graph:l}),i.warn("Subgraph for cluster with explicit dir created:",t,C(l))}else if(!c.get(t).externalConnections&&e.children(t)&&e.children(t).length>0){i.warn("Cluster without external connections, without a parent and with children",t,r);let l=e.graph().rankdir==="TB"?"LR":"TB";c.get(t)?.clusterData?.dir&&(l=c.get(t).clusterData.dir,i.warn("Fixing dir",c.get(t).clusterData.dir,l));const f=new y({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});b(t,e,f,t);const a=e.node(t)||{};e.setNode(t,{...a,clusterNode:!0,id:t,clusterData:c.get(t).clusterData,label:c.get(t).label,graph:f}),i.debug("Old graph after copy",C(e))}else i.warn("Cluster ** ",t," **not meeting the criteria !externalConnections:",!c.get(t).externalConnections," no parent: ",!e.parent(t)," children ",e.children(t)&&e.children(t).length>0,e.children("D"),r),i.debug(c);n=e.nodes(),i.warn("New list of nodes",n);for(const t of n){const o=e.node(t);i.warn(" Now next level",t,o),o?.clusterNode&&k(o.graph,r+1)}},"extractor"),B=u((e,r)=>{if(r.length===0)return[];let n=Object.assign([],r);return r.forEach(s=>{const t=e.children(s),o=B(e,t);n=[...n,...o]}),n},"sorter"),W=u(e=>B(e,e.children()),"sortNodesByHierarchy"),L=u((e,r,n)=>{let s=e.parent(r);for(;s&&s!==n;){const t=c.get(s);if(t&&!t.externalConnections)return!0;s=e.parent(s)}return!1},"isNodeInExtractableCluster"),T=u((e,r,n)=>{const s=e.children(r)??[];for(const t of s){if(t===n||v(t,n))continue;const o=D(t,e,r);if(o&&!L(e,o,r))return o}return null},"findSafeAnchorNode");export{U as a,c as b,J as c,D as f,W as s,C as w}; diff --git a/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-CzjVKRuS.js b/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-DyjtUXRY.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-CzjVKRuS.js rename to apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-DyjtUXRY.js index 8604cf6ef..a52c8682a 100644 --- a/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-CzjVKRuS.js +++ b/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-DyjtUXRY.js @@ -1,4 +1,4 @@ -import{g as tt}from"./chunk-5VM5RSS4-CUvXVaNK.js";import{g as st}from"./chunk-XXDRQBXY-DGdcv7YP.js";import{s as it}from"./chunk-VR4S4FIN-DN3fhyNm.js";import{_ as f,l as Ie,c as F,v as at,x as nt,y as Oe,d as de,a5 as rt,b as ut,a as lt,s as ct,g as ot,o as ht,p as dt,k as I,q as pt,r as At,i as ft,a6 as G}from"./mermaid.core-DKNppTOJ.js";import{f as gt}from"./chunk-32BRIVSS-BPgqH-Ub.js";var we=(function(){var t=f(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],n=[1,20],r=[1,41],c=[1,26],u=[1,42],d=[1,24],m=[1,25],g=[1,32],N=[1,33],Ae=[1,34],b=[1,45],fe=[1,35],ge=[1,36],me=[1,37],Ce=[1,38],be=[1,27],ke=[1,28],Ee=[1,29],Te=[1,30],ye=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],De=[1,9],A=[1,8,9],Z=[1,58],$=[1,59],ee=[1,60],te=[1,61],se=[1,62],Fe=[1,63],Be=[1,64],_=[1,8,9,41],Pe=[1,77],M=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ie=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ae=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Me=[13,60,68,69,70,71,72,86,100,102,103],ne=[1,103],z=[1,121],Y=[1,117],K=[1,113],W=[1,119],Q=[1,114],j=[1,115],X=[1,116],q=[1,118],H=[1,120],Re=[22,50,60,61,82,86,87,88,89,90],Ge=[1,128],re=[12,39],_e=[1,8,9,39,41,44,46],ue=[1,8,9,22],Ue=[1,153],ze=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Se={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(o,h,p,l,C,e,J){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:l.addMember(e[s-1],l.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(De,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be}),{39:[1,65]},t(_,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Pe,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(M,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(M,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},t(ie,[2,133]),t(ie,[2,134]),t(ie,[2,135]),t(ie,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:n,42:r,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be},t(A,[2,64]),{67:93,73:Fe,74:Be},t(ae,[2,83],{66:94,68:Z,69:$,70:ee,71:te,72:se}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Me,[2,89]),t(Me,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:r,43:23,48:u,54:g,56:N},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:ne},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:z,50:Y,59:110,60:K,82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},{60:[1,122]},{13:Pe,55:123},t(_,[2,72]),t(_,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},t(Re,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(M,[2,16]),t(M,[2,17]),t(M,[2,18]),{11:127,12:Ge,39:[2,36]},t(re,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(re,[2,10]),t(_e,[2,55],{11:131,12:Ge}),t(De,[2,7]),{9:[1,132]},t(ue,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},t(ae,[2,82],{66:136,68:Z,69:$,70:ee,71:te,72:se}),t(ae,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:r,43:23,48:u,54:g,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(_,[2,48],{39:[1,142]}),{41:[1,143]},t(_,[2,50]),{41:[2,61],45:144,51:ne},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:Ue}),t(ze,[2,107],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(_,[2,71]),t(A,[2,73],{61:Ue}),{60:[1,155]},t(M,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(re,[2,12]),t(_e,[2,56]),{1:[2,4]},t(ue,[2,69]),t(ue,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(ae,[2,80]),t(_,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:r,43:23,48:u,54:g,56:N},{45:163,51:ne},t(_,[2,49]),{41:[2,62]},t(_,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:W,84:169,85:112,86:Q,87:j,88:X,89:q,90:H},t(x,[2,110]),t(Re,[2,75]),{14:[1,170]},t(re,[2,11]),t(ue,[2,70]),t(_,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ne},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(ze,[2,108],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(_e,[2,8]),t(_,[2,51]),{41:[1,175]},t(_,[2,54]),t(A,[2,104]),t(_,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:f(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:f(function(o){var h=this,p=[0],l=[],C=[null],e=[],J=this.table,s="",ce=0,Ye=0,Je=2,Ke=1,Ze=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var Ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ne)&&(w.yy[Ne]=this.yy[Ne]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Le=D.yylloc;e.push(Le);var $e=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(S){p.length=p.length-2*S,C.length=C.length-S,e.length=e.length-S}f(et,"popStack");function We(){var S;return S=l.pop()||D.lex()||Ke,typeof S!="number"&&(S instanceof Array&&(l=S,S=l.pop()),S=h.symbols_[S]||S),S}f(We,"lex");for(var B,V,L,xe,R={},oe,v,Qe,he;;){if(V=p[p.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=We()),L=J[V]&&J[V][B]),typeof L>"u"||!L.length||!L[0]){var ve="";he=[];for(oe in J[V])this.terminals_[oe]&&oe>Je&&he.push("'"+this.terminals_[oe]+"'");D.showPosition?ve="Parse error on line "+(ce+1)+`: +import{g as tt}from"./chunk-5VM5RSS4-DxIYPYOn.js";import{g as st}from"./chunk-XXDRQBXY-AHUPVB2f.js";import{s as it}from"./chunk-VR4S4FIN-CYEgbtU1.js";import{_ as f,l as Ie,c as F,v as at,x as nt,y as Oe,d as de,a5 as rt,b as ut,a as lt,s as ct,g as ot,o as ht,p as dt,k as I,q as pt,r as At,i as ft,a6 as G}from"./mermaid.core-B_UcP3X_.js";import{f as gt}from"./chunk-32BRIVSS-D_mpvupa.js";var we=(function(){var t=f(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],n=[1,20],r=[1,41],c=[1,26],u=[1,42],d=[1,24],m=[1,25],g=[1,32],N=[1,33],Ae=[1,34],b=[1,45],fe=[1,35],ge=[1,36],me=[1,37],Ce=[1,38],be=[1,27],ke=[1,28],Ee=[1,29],Te=[1,30],ye=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],De=[1,9],A=[1,8,9],Z=[1,58],$=[1,59],ee=[1,60],te=[1,61],se=[1,62],Fe=[1,63],Be=[1,64],_=[1,8,9,41],Pe=[1,77],M=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ie=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ae=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Me=[13,60,68,69,70,71,72,86,100,102,103],ne=[1,103],z=[1,121],Y=[1,117],K=[1,113],W=[1,119],Q=[1,114],j=[1,115],X=[1,116],q=[1,118],H=[1,120],Re=[22,50,60,61,82,86,87,88,89,90],Ge=[1,128],re=[12,39],_e=[1,8,9,39,41,44,46],ue=[1,8,9,22],Ue=[1,153],ze=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Se={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(o,h,p,l,C,e,J){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:l.addMember(e[s-1],l.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(De,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be}),{39:[1,65]},t(_,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Pe,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(M,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(M,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},t(ie,[2,133]),t(ie,[2,134]),t(ie,[2,135]),t(ie,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:n,42:r,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be},t(A,[2,64]),{67:93,73:Fe,74:Be},t(ae,[2,83],{66:94,68:Z,69:$,70:ee,71:te,72:se}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Me,[2,89]),t(Me,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:r,43:23,48:u,54:g,56:N},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:ne},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:z,50:Y,59:110,60:K,82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},{60:[1,122]},{13:Pe,55:123},t(_,[2,72]),t(_,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},t(Re,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(M,[2,16]),t(M,[2,17]),t(M,[2,18]),{11:127,12:Ge,39:[2,36]},t(re,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(re,[2,10]),t(_e,[2,55],{11:131,12:Ge}),t(De,[2,7]),{9:[1,132]},t(ue,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},t(ae,[2,82],{66:136,68:Z,69:$,70:ee,71:te,72:se}),t(ae,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:r,43:23,48:u,54:g,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(_,[2,48],{39:[1,142]}),{41:[1,143]},t(_,[2,50]),{41:[2,61],45:144,51:ne},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:Ue}),t(ze,[2,107],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(_,[2,71]),t(A,[2,73],{61:Ue}),{60:[1,155]},t(M,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(re,[2,12]),t(_e,[2,56]),{1:[2,4]},t(ue,[2,69]),t(ue,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(ae,[2,80]),t(_,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:r,43:23,48:u,54:g,56:N},{45:163,51:ne},t(_,[2,49]),{41:[2,62]},t(_,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:W,84:169,85:112,86:Q,87:j,88:X,89:q,90:H},t(x,[2,110]),t(Re,[2,75]),{14:[1,170]},t(re,[2,11]),t(ue,[2,70]),t(_,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ne},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(ze,[2,108],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(_e,[2,8]),t(_,[2,51]),{41:[1,175]},t(_,[2,54]),t(A,[2,104]),t(_,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:f(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:f(function(o){var h=this,p=[0],l=[],C=[null],e=[],J=this.table,s="",ce=0,Ye=0,Je=2,Ke=1,Ze=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var Ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ne)&&(w.yy[Ne]=this.yy[Ne]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Le=D.yylloc;e.push(Le);var $e=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(S){p.length=p.length-2*S,C.length=C.length-S,e.length=e.length-S}f(et,"popStack");function We(){var S;return S=l.pop()||D.lex()||Ke,typeof S!="number"&&(S instanceof Array&&(l=S,S=l.pop()),S=h.symbols_[S]||S),S}f(We,"lex");for(var B,V,L,xe,R={},oe,v,Qe,he;;){if(V=p[p.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=We()),L=J[V]&&J[V][B]),typeof L>"u"||!L.length||!L[0]){var ve="";he=[];for(oe in J[V])this.terminals_[oe]&&oe>Je&&he.push("'"+this.terminals_[oe]+"'");D.showPosition?ve="Parse error on line "+(ce+1)+`: `+D.showPosition()+` Expecting `+he.join(", ")+", got '"+(this.terminals_[B]||B)+"'":ve="Parse error on line "+(ce+1)+": Unexpected "+(B==Ke?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(ve,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Le,expected:he})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+B);switch(L[0]){case 1:p.push(B),C.push(D.yytext),e.push(D.yylloc),p.push(L[1]),B=null,Ye=D.yyleng,s=D.yytext,ce=D.yylineno,Le=D.yylloc;break;case 2:if(v=this.productions_[L[1]][1],R.$=C[C.length-v],R._$={first_line:e[e.length-(v||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(v||1)].first_column,last_column:e[e.length-1].last_column},$e&&(R._$.range=[e[e.length-(v||1)].range[0],e[e.length-1].range[1]]),xe=this.performAction.apply(R,[s,Ye,ce,w.yy,L[1],C,e].concat(Ze)),typeof xe<"u")return xe;v&&(p=p.slice(0,-1*v*2),C=C.slice(0,-1*v),e=e.slice(0,-1*v)),p.push(this.productions_[L[1]][0]),C.push(R.$),e.push(R._$),Qe=J[p[p.length-2]][p[p.length-1]],p.push(Qe);break;case 3:return!0}}return!0},"parse")},He=(function(){var O={EOF:1,parseError:f(function(h,p){if(this.yy.parser)this.yy.parser.parseError(h,p);else throw new Error(h)},"parseError"),setInput:f(function(o,h){return this.yy=h||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:f(function(o){var h=o.length,p=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===l.length?this.yylloc.first_column:0)+l[l.length-p.length].length-p[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(o){this.unput(this.match.slice(o))},"less"),pastInput:f(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var o=this.pastInput(),h=new Array(o.length+1).join("-");return o+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-DN3fhyNm.js b/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-CYEgbtU1.js similarity index 87% rename from apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-DN3fhyNm.js rename to apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-CYEgbtU1.js index 8155e6fc2..a47bef2b3 100644 --- a/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-DN3fhyNm.js +++ b/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-CYEgbtU1.js @@ -1 +1 @@ -import{_ as a,e as w,l as x}from"./mermaid.core-DKNppTOJ.js";var d=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=l(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),l=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{d as s}; +import{_ as a,e as w,l as x}from"./mermaid.core-B_UcP3X_.js";var d=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=l(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),l=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{d as s}; diff --git a/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-DGdcv7YP.js b/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-AHUPVB2f.js similarity index 72% rename from apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-DGdcv7YP.js rename to apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-AHUPVB2f.js index 792a84701..860c7de34 100644 --- a/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-DGdcv7YP.js +++ b/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-AHUPVB2f.js @@ -1 +1 @@ -import{_ as a,d as o}from"./mermaid.core-DKNppTOJ.js";var d=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g}; +import{_ as a,d as o}from"./mermaid.core-B_UcP3X_.js";var d=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g}; diff --git a/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-Bx-1PFrT.js b/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-Bx-1PFrT.js new file mode 100644 index 000000000..f3ca338ad --- /dev/null +++ b/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-Bx-1PFrT.js @@ -0,0 +1 @@ +import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-DyjtUXRY.js";import{_ as i}from"./mermaid.core-B_UcP3X_.js";import"./chunk-5VM5RSS4-DxIYPYOn.js";import"./chunk-XXDRQBXY-AHUPVB2f.js";import"./chunk-VR4S4FIN-CYEgbtU1.js";import"./chunk-32BRIVSS-D_mpvupa.js";import"./index-BOtIzGLC.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram}; diff --git a/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-CdLohFSG.js b/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-CdLohFSG.js deleted file mode 100644 index 7c4cf1ee2..000000000 --- a/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-CdLohFSG.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-CzjVKRuS.js";import{_ as i}from"./mermaid.core-DKNppTOJ.js";import"./chunk-5VM5RSS4-CUvXVaNK.js";import"./chunk-XXDRQBXY-DGdcv7YP.js";import"./chunk-VR4S4FIN-DN3fhyNm.js";import"./chunk-32BRIVSS-BPgqH-Ub.js";import"./index-DusVyqlT.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram}; diff --git a/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-Bx-1PFrT.js b/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-Bx-1PFrT.js new file mode 100644 index 000000000..f3ca338ad --- /dev/null +++ b/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-Bx-1PFrT.js @@ -0,0 +1 @@ +import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-DyjtUXRY.js";import{_ as i}from"./mermaid.core-B_UcP3X_.js";import"./chunk-5VM5RSS4-DxIYPYOn.js";import"./chunk-XXDRQBXY-AHUPVB2f.js";import"./chunk-VR4S4FIN-CYEgbtU1.js";import"./chunk-32BRIVSS-D_mpvupa.js";import"./index-BOtIzGLC.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram}; diff --git a/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-CdLohFSG.js b/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-CdLohFSG.js deleted file mode 100644 index 7c4cf1ee2..000000000 --- a/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-CdLohFSG.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-CzjVKRuS.js";import{_ as i}from"./mermaid.core-DKNppTOJ.js";import"./chunk-5VM5RSS4-CUvXVaNK.js";import"./chunk-XXDRQBXY-DGdcv7YP.js";import"./chunk-VR4S4FIN-DN3fhyNm.js";import"./chunk-32BRIVSS-BPgqH-Ub.js";import"./index-DusVyqlT.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram}; diff --git a/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-gxrKFGCX.js b/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-D0OqAsiW.js similarity index 99% rename from apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-gxrKFGCX.js rename to apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-D0OqAsiW.js index 899ffb46d..2148f6dbf 100644 --- a/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-gxrKFGCX.js +++ b/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-D0OqAsiW.js @@ -1 +1 @@ -import{b7 as lt,_ as V,l as k,d as gt}from"./mermaid.core-DKNppTOJ.js";import{c as tt}from"./cytoscape.esm-OyMbaexL.js";import"./index-DusVyqlT.js";var Z={exports:{}},$={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,L){var o=L(2),e=L(8),t=L(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;vh&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,L){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var T=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,T=D.length,y=0;y-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,T,y=this.getNodes(),O=y.length,s=0;sD&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;my&&(v=y),Ds&&(u=s),Ty&&(v=y),Ds&&(u=s),T=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,L){var o,e=L(1);function t(i){o=L(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(nd)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(gd?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=E,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){var o=(function(){function n(d,r){for(var h=0;h"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,L){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),T.add(f);for(var c=f.getEdges(),u=0;u-1&&s.splice(C,1)}T=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u0){for(var D=this.edgeToDummyNodes.get(v),u=0;u=0&&p.splice(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,L){var o=L(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,L){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);ht.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;ay||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement=u.length||y>=u[0].length)){for(var O=0;On}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;lg.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return f.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c1){var R;for(R=0;RE&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var q=(c+F*W)%360,ht=(q+W)%360;y.branchRadialLayout(K,s,q,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;cf&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),A=0;A"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U=0;s--){var f=this.compoundOrder[s],c=f.id,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var E=c.getNodes(),A=0;A0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,E=0;EM&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,E=0;Ec&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.widthm&&f!=c){E.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;RC&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X0){var R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(Z)),Z.exports}var yt=vt();const Et=lt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=gt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{k.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){k.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return k.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw k.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Nt=Lt;export{Nt as render}; +import{b7 as lt,_ as V,l as k,d as gt}from"./mermaid.core-B_UcP3X_.js";import{c as tt}from"./cytoscape.esm-OyMbaexL.js";import"./index-BOtIzGLC.js";var Z={exports:{}},$={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,L){var o=L(2),e=L(8),t=L(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;vh&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,L){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var T=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,T=D.length,y=0;y-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,T,y=this.getNodes(),O=y.length,s=0;sD&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;my&&(v=y),Ds&&(u=s),Ty&&(v=y),Ds&&(u=s),T=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,L){var o,e=L(1);function t(i){o=L(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(nd)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(gd?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=E,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){var o=(function(){function n(d,r){for(var h=0;h"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,L){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),T.add(f);for(var c=f.getEdges(),u=0;u-1&&s.splice(C,1)}T=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u0){for(var D=this.edgeToDummyNodes.get(v),u=0;u=0&&p.splice(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,L){var o=L(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,L){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);ht.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;ay||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement=u.length||y>=u[0].length)){for(var O=0;On}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;lg.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return f.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c1){var R;for(R=0;RE&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var q=(c+F*W)%360,ht=(q+W)%360;y.branchRadialLayout(K,s,q,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;cf&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),A=0;A"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U=0;s--){var f=this.compoundOrder[s],c=f.id,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var E=c.getNodes(),A=0;A0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,E=0;EM&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,E=0;Ec&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.widthm&&f!=c){E.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;RC&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X0){var R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(Z)),Z.exports}var yt=vt();const Et=lt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=gt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{k.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){k.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return k.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw k.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Nt=Lt;export{Nt as render}; diff --git a/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-D3UUATjS.js b/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-BnQdr27u.js similarity index 99% rename from apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-D3UUATjS.js rename to apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-BnQdr27u.js index 12d3a3122..c80f88c58 100644 --- a/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-D3UUATjS.js +++ b/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-BnQdr27u.js @@ -1,4 +1,4 @@ -import{bR as et}from"./index-DusVyqlT.js";var RI=Object.create,Ds=Object.defineProperty,AI=Object.getOwnPropertyDescriptor,Ad=Object.getOwnPropertyNames,EI=Object.getPrototypeOf,CI=Object.prototype.hasOwnProperty,i=(e,t)=>Ds(e,"name",{value:t,configurable:!0}),bI=(e,t)=>function(){return e&&(t=(0,e[Ad(e)[0]])(e=0)),t},H=(e,t)=>function(){return t||(0,e[Ad(e)[0]])((t={exports:{}}).exports,t),t.exports},Vr=(e,t)=>{for(var r in t)Ds(e,r,{get:t[r],enumerable:!0})},Ed=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ad(t))!CI.call(e,a)&&a!==r&&Ds(e,a,{get:()=>t[a],enumerable:!(n=AI(t,a))||n.enumerable});return e},Ll=(e,t,r)=>(Ed(e,t,"default"),r),Cd=(e,t,r)=>(r=e!=null?RI(EI(e)):{},Ed(Ds(r,"default",{value:e,enumerable:!0}),e)),bd=e=>Ed(Ds({},"__esModule",{value:!0}),e),Dl={};Vr(Dl,{AnnotatedTextEdit:()=>mr,ChangeAnnotation:()=>an,ChangeAnnotationIdentifier:()=>Ke,CodeAction:()=>ef,CodeActionContext:()=>Qc,CodeActionKind:()=>Zc,CodeActionTriggerKind:()=>Xi,CodeDescription:()=>Nc,CodeLens:()=>tf,Color:()=>Co,ColorInformation:()=>Cc,ColorPresentation:()=>bc,Command:()=>nn,CompletionItem:()=>zc,CompletionItemKind:()=>Lc,CompletionItemLabelDetails:()=>Fc,CompletionItemTag:()=>xc,CompletionList:()=>jc,CreateFile:()=>ya,DeleteFile:()=>va,Diagnostic:()=>Vi,DiagnosticRelatedInformation:()=>bo,DiagnosticSeverity:()=>wc,DiagnosticTag:()=>Ic,DocumentHighlight:()=>Vc,DocumentHighlightKind:()=>Wc,DocumentLink:()=>nf,DocumentSymbol:()=>Jc,DocumentUri:()=>Rc,EOL:()=>zg,FoldingRange:()=>Sc,FoldingRangeKind:()=>_c,FormattingOptions:()=>rf,Hover:()=>Bc,InlayHint:()=>pf,InlayHintKind:()=>wo,InlayHintLabelPart:()=>Io,InlineCompletionContext:()=>Tf,InlineCompletionItem:()=>hf,InlineCompletionList:()=>yf,InlineCompletionTriggerKind:()=>gf,InlineValueContext:()=>df,InlineValueEvaluatableExpression:()=>ff,InlineValueText:()=>uf,InlineValueVariableLookup:()=>cf,InsertReplaceEdit:()=>Mc,InsertTextFormat:()=>Dc,InsertTextMode:()=>Gc,Location:()=>Wi,LocationLink:()=>Ec,MarkedString:()=>Yi,MarkupContent:()=>Ta,MarkupKind:()=>So,OptionalVersionedTextDocumentIdentifier:()=>Hi,ParameterInformation:()=>Uc,Position:()=>ie,Range:()=>Q,RenameFile:()=>ga,SelectedCompletionInfo:()=>vf,SelectionRange:()=>af,SemanticTokenModifiers:()=>of,SemanticTokenTypes:()=>sf,SemanticTokens:()=>lf,SignatureInformation:()=>Kc,StringValue:()=>mf,SymbolInformation:()=>Yc,SymbolKind:()=>qc,SymbolTag:()=>Hc,TextDocument:()=>Rf,TextDocumentEdit:()=>qi,TextDocumentIdentifier:()=>Pc,TextDocumentItem:()=>Oc,TextEdit:()=>Yt,URI:()=>Eo,VersionedTextDocumentIdentifier:()=>kc,WorkspaceChange:()=>Fg,WorkspaceEdit:()=>_o,WorkspaceFolder:()=>$f,WorkspaceSymbol:()=>Xc,integer:()=>Ac,uinteger:()=>Ki});var Rc,Eo,Ac,Ki,ie,Q,Wi,Ec,Co,Cc,bc,_c,Sc,bo,wc,Ic,Nc,Vi,nn,Yt,an,Ke,mr,qi,ya,ga,va,_o,ki,Ku,Fg,Pc,kc,Hi,Oc,So,Ta,Lc,Dc,xc,Mc,Gc,Fc,zc,jc,Yi,Bc,Uc,Kc,Wc,Vc,qc,Hc,Yc,Xc,Jc,Zc,Xi,Qc,ef,tf,rf,nf,af,sf,of,lf,uf,cf,ff,df,wo,Io,pf,mf,hf,yf,gf,vf,Tf,$f,zg,Rf,lh,A,xs=bI({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Rc||(Rc={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Eo||(Eo={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ac||(Ac={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ki||(Ki={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Ki.MAX_VALUE),a===Number.MAX_VALUE&&(a=Ki.MAX_VALUE),{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.uinteger(a.line)&&A.uinteger(a.character)}i(r,"is"),e.is=r})(ie||(ie={})),(function(e){function t(n,a,s,o){if(A.uinteger(n)&&A.uinteger(a)&&A.uinteger(s)&&A.uinteger(o))return{start:ie.create(n,a),end:ie.create(s,o)};if(ie.is(n)&&ie.is(a))return{start:n,end:a};throw new Error(`Range#create called with invalid arguments[${n}, ${a}, ${s}, ${o}]`)}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&ie.is(a.start)&&ie.is(a.end)}i(r,"is"),e.is=r})(Q||(Q={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(A.string(a.uri)||A.undefined(a.uri))}i(r,"is"),e.is=r})(Wi||(Wi={})),(function(e){function t(n,a,s,o){return{targetUri:n,targetRange:a,targetSelectionRange:s,originSelectionRange:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.targetRange)&&A.string(a.targetUri)&&Q.is(a.targetSelectionRange)&&(Q.is(a.originSelectionRange)||A.undefined(a.originSelectionRange))}i(r,"is"),e.is=r})(Ec||(Ec={})),(function(e){function t(n,a,s,o){return{red:n,green:a,blue:s,alpha:o}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.numberRange(a.red,0,1)&&A.numberRange(a.green,0,1)&&A.numberRange(a.blue,0,1)&&A.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r})(Co||(Co={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&Q.is(a.range)&&Co.is(a.color)}i(r,"is"),e.is=r})(Cc||(Cc={})),(function(e){function t(n,a,s){return{label:n,textEdit:a,additionalTextEdits:s}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.undefined(a.textEdit)||Yt.is(a))&&(A.undefined(a.additionalTextEdits)||A.typedArray(a.additionalTextEdits,Yt.is))}i(r,"is"),e.is=r})(bc||(bc={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(_c||(_c={})),(function(e){function t(n,a,s,o,l,u){const c={startLine:n,endLine:a};return A.defined(s)&&(c.startCharacter=s),A.defined(o)&&(c.endCharacter=o),A.defined(l)&&(c.kind=l),A.defined(u)&&(c.collapsedText=u),c}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.uinteger(a.startLine)&&A.uinteger(a.startLine)&&(A.undefined(a.startCharacter)||A.uinteger(a.startCharacter))&&(A.undefined(a.endCharacter)||A.uinteger(a.endCharacter))&&(A.undefined(a.kind)||A.string(a.kind))}i(r,"is"),e.is=r})(Sc||(Sc={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Wi.is(a.location)&&A.string(a.message)}i(r,"is"),e.is=r})(bo||(bo={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(wc||(wc={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(Ic||(Ic={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&A.string(n.href)}i(t,"is"),e.is=t})(Nc||(Nc={})),(function(e){function t(n,a,s,o,l,u){let c={range:n,message:a};return A.defined(s)&&(c.severity=s),A.defined(o)&&(c.code=o),A.defined(l)&&(c.source=l),A.defined(u)&&(c.relatedInformation=u),c}i(t,"create"),e.create=t;function r(n){var a;let s=n;return A.defined(s)&&Q.is(s.range)&&A.string(s.message)&&(A.number(s.severity)||A.undefined(s.severity))&&(A.integer(s.code)||A.string(s.code)||A.undefined(s.code))&&(A.undefined(s.codeDescription)||A.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&(A.string(s.source)||A.undefined(s.source))&&(A.undefined(s.relatedInformation)||A.typedArray(s.relatedInformation,bo.is))}i(r,"is"),e.is=r})(Vi||(Vi={})),(function(e){function t(n,a,...s){let o={title:n,command:a};return A.defined(s)&&s.length>0&&(o.arguments=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.title)&&A.string(a.command)}i(r,"is"),e.is=r})(nn||(nn={})),(function(e){function t(s,o){return{range:s,newText:o}}i(t,"replace"),e.replace=t;function r(s,o){return{range:{start:s,end:s},newText:o}}i(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}i(n,"del"),e.del=n;function a(s){const o=s;return A.objectLiteral(o)&&A.string(o.newText)&&Q.is(o.range)}i(a,"is"),e.is=a})(Yt||(Yt={})),(function(e){function t(n,a,s){const o={label:n};return a!==void 0&&(o.needsConfirmation=a),s!==void 0&&(o.description=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(A.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r})(an||(an={})),(function(e){function t(r){const n=r;return A.string(n)}i(t,"is"),e.is=t})(Ke||(Ke={})),(function(e){function t(s,o,l){return{range:s,newText:o,annotationId:l}}i(t,"replace"),e.replace=t;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}i(r,"insert"),e.insert=r;function n(s,o){return{range:s,newText:"",annotationId:o}}i(n,"del"),e.del=n;function a(s){const o=s;return Yt.is(o)&&(an.is(o.annotationId)||Ke.is(o.annotationId))}i(a,"is"),e.is=a})(mr||(mr={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Hi.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r})(qi||(qi={})),(function(e){function t(n,a,s){let o={kind:"create",uri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="create"&&A.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ya||(ya={})),(function(e){function t(n,a,s,o){let l={kind:"rename",oldUri:n,newUri:a};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="rename"&&A.string(a.oldUri)&&A.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ga||(ga={})),(function(e){function t(n,a,s){let o={kind:"delete",uri:n};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="delete"&&A.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||A.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||A.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(va||(va={})),(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(a=>A.string(a.kind)?ya.is(a)||ga.is(a)||va.is(a):qi.is(a)))}i(t,"is"),e.is=t})(_o||(_o={})),ki=class{static{i(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(r===void 0?n=Yt.insert(e,t):Ke.is(r)?(a=r,n=mr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.insert(e,t,a)),this.edits.push(n),a!==void 0)return a}replace(e,t,r){let n,a;if(r===void 0?n=Yt.replace(e,t):Ke.is(r)?(a=r,n=mr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=Yt.del(e):Ke.is(t)?(n=t,r=mr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=mr.del(e,n)),this.edits.push(r),n!==void 0)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},Ku=class{static{i(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(Ke.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Fg=class{static{i(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ku(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(qi.is(t)){const r=new ki(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new ki(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Hi.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const n=[],a={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(a),r=new ki(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new ki(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ku,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ya.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=ya.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let a;an.is(r)||Ke.is(r)?a=r:n=r;let s,o;if(a===void 0?s=ga.create(e,t,n):(o=Ke.is(a)?a:this._changeAnnotations.manage(a),s=ga.create(e,t,n,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=va.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=va.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}},(function(e){function t(n){return{uri:n}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)}i(r,"is"),e.is=r})(Pc||(Pc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.integer(a.version)}i(r,"is"),e.is=r})(kc||(kc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&(a.version===null||A.integer(a.version))}i(r,"is"),e.is=r})(Hi||(Hi={})),(function(e){function t(n,a,s,o){return{uri:n,languageId:a,version:s,text:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.string(a.languageId)&&A.integer(a.version)&&A.string(a.text)}i(r,"is"),e.is=r})(Oc||(Oc={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){const n=r;return n===e.PlainText||n===e.Markdown}i(t,"is"),e.is=t})(So||(So={})),(function(e){function t(r){const n=r;return A.objectLiteral(r)&&So.is(n.kind)&&A.string(n.value)}i(t,"is"),e.is=t})(Ta||(Ta={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Lc||(Lc={})),(function(e){e.PlainText=1,e.Snippet=2})(Dc||(Dc={})),(function(e){e.Deprecated=1})(xc||(xc={})),(function(e){function t(n,a,s){return{newText:n,insert:a,replace:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a&&A.string(a.newText)&&Q.is(a.insert)&&Q.is(a.replace)}i(r,"is"),e.is=r})(Mc||(Mc={})),(function(e){e.asIs=1,e.adjustIndentation=2})(Gc||(Gc={})),(function(e){function t(r){const n=r;return n&&(A.string(n.detail)||n.detail===void 0)&&(A.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t})(Fc||(Fc={})),(function(e){function t(r){return{label:r}}i(t,"create"),e.create=t})(zc||(zc={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),e.create=t})(jc||(jc={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){const a=n;return A.string(a)||A.objectLiteral(a)&&A.string(a.language)&&A.string(a.value)}i(r,"is"),e.is=r})(Yi||(Yi={})),(function(e){function t(r){let n=r;return!!n&&A.objectLiteral(n)&&(Ta.is(n.contents)||Yi.is(n.contents)||A.typedArray(n.contents,Yi.is))&&(r.range===void 0||Q.is(r.range))}i(t,"is"),e.is=t})(Bc||(Bc={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t})(Uc||(Uc={})),(function(e){function t(r,n,...a){let s={label:r};return A.defined(n)&&(s.documentation=n),A.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),e.create=t})(Kc||(Kc={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(Wc||(Wc={})),(function(e){function t(r,n){let a={range:r};return A.number(n)&&(a.kind=n),a}i(t,"create"),e.create=t})(Vc||(Vc={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(qc||(qc={})),(function(e){e.Deprecated=1})(Hc||(Hc={})),(function(e){function t(r,n,a,s,o){let l={name:r,kind:n,location:{uri:s,range:a}};return o&&(l.containerName=o),l}i(t,"create"),e.create=t})(Yc||(Yc={})),(function(e){function t(r,n,a,s){return s!==void 0?{name:r,kind:n,location:{uri:a,range:s}}:{name:r,kind:n,location:{uri:a}}}i(t,"create"),e.create=t})(Xc||(Xc={})),(function(e){function t(n,a,s,o,l,u){let c={name:n,detail:a,kind:s,range:o,selectionRange:l};return u!==void 0&&(c.children=u),c}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.name)&&A.number(a.kind)&&Q.is(a.range)&&Q.is(a.selectionRange)&&(a.detail===void 0||A.string(a.detail))&&(a.deprecated===void 0||A.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}i(r,"is"),e.is=r})(Jc||(Jc={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Zc||(Zc={})),(function(e){e.Invoked=1,e.Automatic=2})(Xi||(Xi={})),(function(e){function t(n,a,s){let o={diagnostics:n};return a!=null&&(o.only=a),s!=null&&(o.triggerKind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.typedArray(a.diagnostics,Vi.is)&&(a.only===void 0||A.typedArray(a.only,A.string))&&(a.triggerKind===void 0||a.triggerKind===Xi.Invoked||a.triggerKind===Xi.Automatic)}i(r,"is"),e.is=r})(Qc||(Qc={})),(function(e){function t(n,a,s){let o={title:n},l=!0;return typeof a=="string"?(l=!1,o.kind=a):nn.is(a)?o.command=a:o.edit=a,l&&s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.title)&&(a.diagnostics===void 0||A.typedArray(a.diagnostics,Vi.is))&&(a.kind===void 0||A.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||nn.is(a.command))&&(a.isPreferred===void 0||A.boolean(a.isPreferred))&&(a.edit===void 0||_o.is(a.edit))}i(r,"is"),e.is=r})(ef||(ef={})),(function(e){function t(n,a){let s={range:n};return A.defined(a)&&(s.data=a),s}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.command)||nn.is(a.command))}i(r,"is"),e.is=r})(tf||(tf={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.uinteger(a.tabSize)&&A.boolean(a.insertSpaces)}i(r,"is"),e.is=r})(rf||(rf={})),(function(e){function t(n,a,s){return{range:n,target:a,data:s}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.target)||A.string(a.target))}i(r,"is"),e.is=r})(nf||(nf={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r})(af||(af={})),(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(sf||(sf={})),(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(of||(of={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i(t,"is"),e.is=t})(lf||(lf={})),(function(e){function t(n,a){return{range:n,text:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.string(a.text)}i(r,"is"),e.is=r})(uf||(uf={})),(function(e){function t(n,a,s){return{range:n,variableName:a,caseSensitiveLookup:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.boolean(a.caseSensitiveLookup)&&(A.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r})(cf||(cf={})),(function(e){function t(n,a){return{range:n,expression:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&(A.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r})(ff||(ff={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.defined(a)&&Q.is(n.stoppedLocation)}i(r,"is"),e.is=r})(df||(df={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t})(wo||(wo={})),(function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.location===void 0||Wi.is(a.location))&&(a.command===void 0||nn.is(a.command))}i(r,"is"),e.is=r})(Io||(Io={})),(function(e){function t(n,a,s){const o={position:n,label:a};return s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&ie.is(a.position)&&(A.string(a.label)||A.typedArray(a.label,Io.is))&&(a.kind===void 0||wo.is(a.kind))&&a.textEdits===void 0||A.typedArray(a.textEdits,Yt.is)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.paddingLeft===void 0||A.boolean(a.paddingLeft))&&(a.paddingRight===void 0||A.boolean(a.paddingRight))}i(r,"is"),e.is=r})(pf||(pf={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t})(mf||(mf={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t})(hf||(hf={})),(function(e){function t(r){return{items:r}}i(t,"create"),e.create=t})(yf||(yf={})),(function(e){e.Invoked=0,e.Automatic=1})(gf||(gf={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t})(vf||(vf={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t})(Tf||(Tf={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&Eo.is(n.uri)&&A.string(n.name)}i(t,"is"),e.is=t})($f||($f={})),zg=[` +import{bR as et}from"./index-BOtIzGLC.js";var RI=Object.create,Ds=Object.defineProperty,AI=Object.getOwnPropertyDescriptor,Ad=Object.getOwnPropertyNames,EI=Object.getPrototypeOf,CI=Object.prototype.hasOwnProperty,i=(e,t)=>Ds(e,"name",{value:t,configurable:!0}),bI=(e,t)=>function(){return e&&(t=(0,e[Ad(e)[0]])(e=0)),t},H=(e,t)=>function(){return t||(0,e[Ad(e)[0]])((t={exports:{}}).exports,t),t.exports},Vr=(e,t)=>{for(var r in t)Ds(e,r,{get:t[r],enumerable:!0})},Ed=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ad(t))!CI.call(e,a)&&a!==r&&Ds(e,a,{get:()=>t[a],enumerable:!(n=AI(t,a))||n.enumerable});return e},Ll=(e,t,r)=>(Ed(e,t,"default"),r),Cd=(e,t,r)=>(r=e!=null?RI(EI(e)):{},Ed(Ds(r,"default",{value:e,enumerable:!0}),e)),bd=e=>Ed(Ds({},"__esModule",{value:!0}),e),Dl={};Vr(Dl,{AnnotatedTextEdit:()=>mr,ChangeAnnotation:()=>an,ChangeAnnotationIdentifier:()=>Ke,CodeAction:()=>ef,CodeActionContext:()=>Qc,CodeActionKind:()=>Zc,CodeActionTriggerKind:()=>Xi,CodeDescription:()=>Nc,CodeLens:()=>tf,Color:()=>Co,ColorInformation:()=>Cc,ColorPresentation:()=>bc,Command:()=>nn,CompletionItem:()=>zc,CompletionItemKind:()=>Lc,CompletionItemLabelDetails:()=>Fc,CompletionItemTag:()=>xc,CompletionList:()=>jc,CreateFile:()=>ya,DeleteFile:()=>va,Diagnostic:()=>Vi,DiagnosticRelatedInformation:()=>bo,DiagnosticSeverity:()=>wc,DiagnosticTag:()=>Ic,DocumentHighlight:()=>Vc,DocumentHighlightKind:()=>Wc,DocumentLink:()=>nf,DocumentSymbol:()=>Jc,DocumentUri:()=>Rc,EOL:()=>zg,FoldingRange:()=>Sc,FoldingRangeKind:()=>_c,FormattingOptions:()=>rf,Hover:()=>Bc,InlayHint:()=>pf,InlayHintKind:()=>wo,InlayHintLabelPart:()=>Io,InlineCompletionContext:()=>Tf,InlineCompletionItem:()=>hf,InlineCompletionList:()=>yf,InlineCompletionTriggerKind:()=>gf,InlineValueContext:()=>df,InlineValueEvaluatableExpression:()=>ff,InlineValueText:()=>uf,InlineValueVariableLookup:()=>cf,InsertReplaceEdit:()=>Mc,InsertTextFormat:()=>Dc,InsertTextMode:()=>Gc,Location:()=>Wi,LocationLink:()=>Ec,MarkedString:()=>Yi,MarkupContent:()=>Ta,MarkupKind:()=>So,OptionalVersionedTextDocumentIdentifier:()=>Hi,ParameterInformation:()=>Uc,Position:()=>ie,Range:()=>Q,RenameFile:()=>ga,SelectedCompletionInfo:()=>vf,SelectionRange:()=>af,SemanticTokenModifiers:()=>of,SemanticTokenTypes:()=>sf,SemanticTokens:()=>lf,SignatureInformation:()=>Kc,StringValue:()=>mf,SymbolInformation:()=>Yc,SymbolKind:()=>qc,SymbolTag:()=>Hc,TextDocument:()=>Rf,TextDocumentEdit:()=>qi,TextDocumentIdentifier:()=>Pc,TextDocumentItem:()=>Oc,TextEdit:()=>Yt,URI:()=>Eo,VersionedTextDocumentIdentifier:()=>kc,WorkspaceChange:()=>Fg,WorkspaceEdit:()=>_o,WorkspaceFolder:()=>$f,WorkspaceSymbol:()=>Xc,integer:()=>Ac,uinteger:()=>Ki});var Rc,Eo,Ac,Ki,ie,Q,Wi,Ec,Co,Cc,bc,_c,Sc,bo,wc,Ic,Nc,Vi,nn,Yt,an,Ke,mr,qi,ya,ga,va,_o,ki,Ku,Fg,Pc,kc,Hi,Oc,So,Ta,Lc,Dc,xc,Mc,Gc,Fc,zc,jc,Yi,Bc,Uc,Kc,Wc,Vc,qc,Hc,Yc,Xc,Jc,Zc,Xi,Qc,ef,tf,rf,nf,af,sf,of,lf,uf,cf,ff,df,wo,Io,pf,mf,hf,yf,gf,vf,Tf,$f,zg,Rf,lh,A,xs=bI({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Rc||(Rc={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Eo||(Eo={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ac||(Ac={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ki||(Ki={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Ki.MAX_VALUE),a===Number.MAX_VALUE&&(a=Ki.MAX_VALUE),{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.uinteger(a.line)&&A.uinteger(a.character)}i(r,"is"),e.is=r})(ie||(ie={})),(function(e){function t(n,a,s,o){if(A.uinteger(n)&&A.uinteger(a)&&A.uinteger(s)&&A.uinteger(o))return{start:ie.create(n,a),end:ie.create(s,o)};if(ie.is(n)&&ie.is(a))return{start:n,end:a};throw new Error(`Range#create called with invalid arguments[${n}, ${a}, ${s}, ${o}]`)}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&ie.is(a.start)&&ie.is(a.end)}i(r,"is"),e.is=r})(Q||(Q={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(A.string(a.uri)||A.undefined(a.uri))}i(r,"is"),e.is=r})(Wi||(Wi={})),(function(e){function t(n,a,s,o){return{targetUri:n,targetRange:a,targetSelectionRange:s,originSelectionRange:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.targetRange)&&A.string(a.targetUri)&&Q.is(a.targetSelectionRange)&&(Q.is(a.originSelectionRange)||A.undefined(a.originSelectionRange))}i(r,"is"),e.is=r})(Ec||(Ec={})),(function(e){function t(n,a,s,o){return{red:n,green:a,blue:s,alpha:o}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.numberRange(a.red,0,1)&&A.numberRange(a.green,0,1)&&A.numberRange(a.blue,0,1)&&A.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r})(Co||(Co={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&Q.is(a.range)&&Co.is(a.color)}i(r,"is"),e.is=r})(Cc||(Cc={})),(function(e){function t(n,a,s){return{label:n,textEdit:a,additionalTextEdits:s}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.undefined(a.textEdit)||Yt.is(a))&&(A.undefined(a.additionalTextEdits)||A.typedArray(a.additionalTextEdits,Yt.is))}i(r,"is"),e.is=r})(bc||(bc={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(_c||(_c={})),(function(e){function t(n,a,s,o,l,u){const c={startLine:n,endLine:a};return A.defined(s)&&(c.startCharacter=s),A.defined(o)&&(c.endCharacter=o),A.defined(l)&&(c.kind=l),A.defined(u)&&(c.collapsedText=u),c}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.uinteger(a.startLine)&&A.uinteger(a.startLine)&&(A.undefined(a.startCharacter)||A.uinteger(a.startCharacter))&&(A.undefined(a.endCharacter)||A.uinteger(a.endCharacter))&&(A.undefined(a.kind)||A.string(a.kind))}i(r,"is"),e.is=r})(Sc||(Sc={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Wi.is(a.location)&&A.string(a.message)}i(r,"is"),e.is=r})(bo||(bo={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(wc||(wc={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(Ic||(Ic={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&A.string(n.href)}i(t,"is"),e.is=t})(Nc||(Nc={})),(function(e){function t(n,a,s,o,l,u){let c={range:n,message:a};return A.defined(s)&&(c.severity=s),A.defined(o)&&(c.code=o),A.defined(l)&&(c.source=l),A.defined(u)&&(c.relatedInformation=u),c}i(t,"create"),e.create=t;function r(n){var a;let s=n;return A.defined(s)&&Q.is(s.range)&&A.string(s.message)&&(A.number(s.severity)||A.undefined(s.severity))&&(A.integer(s.code)||A.string(s.code)||A.undefined(s.code))&&(A.undefined(s.codeDescription)||A.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&(A.string(s.source)||A.undefined(s.source))&&(A.undefined(s.relatedInformation)||A.typedArray(s.relatedInformation,bo.is))}i(r,"is"),e.is=r})(Vi||(Vi={})),(function(e){function t(n,a,...s){let o={title:n,command:a};return A.defined(s)&&s.length>0&&(o.arguments=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.title)&&A.string(a.command)}i(r,"is"),e.is=r})(nn||(nn={})),(function(e){function t(s,o){return{range:s,newText:o}}i(t,"replace"),e.replace=t;function r(s,o){return{range:{start:s,end:s},newText:o}}i(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}i(n,"del"),e.del=n;function a(s){const o=s;return A.objectLiteral(o)&&A.string(o.newText)&&Q.is(o.range)}i(a,"is"),e.is=a})(Yt||(Yt={})),(function(e){function t(n,a,s){const o={label:n};return a!==void 0&&(o.needsConfirmation=a),s!==void 0&&(o.description=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(A.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r})(an||(an={})),(function(e){function t(r){const n=r;return A.string(n)}i(t,"is"),e.is=t})(Ke||(Ke={})),(function(e){function t(s,o,l){return{range:s,newText:o,annotationId:l}}i(t,"replace"),e.replace=t;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}i(r,"insert"),e.insert=r;function n(s,o){return{range:s,newText:"",annotationId:o}}i(n,"del"),e.del=n;function a(s){const o=s;return Yt.is(o)&&(an.is(o.annotationId)||Ke.is(o.annotationId))}i(a,"is"),e.is=a})(mr||(mr={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Hi.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r})(qi||(qi={})),(function(e){function t(n,a,s){let o={kind:"create",uri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="create"&&A.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ya||(ya={})),(function(e){function t(n,a,s,o){let l={kind:"rename",oldUri:n,newUri:a};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="rename"&&A.string(a.oldUri)&&A.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ga||(ga={})),(function(e){function t(n,a,s){let o={kind:"delete",uri:n};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="delete"&&A.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||A.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||A.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(va||(va={})),(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(a=>A.string(a.kind)?ya.is(a)||ga.is(a)||va.is(a):qi.is(a)))}i(t,"is"),e.is=t})(_o||(_o={})),ki=class{static{i(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(r===void 0?n=Yt.insert(e,t):Ke.is(r)?(a=r,n=mr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.insert(e,t,a)),this.edits.push(n),a!==void 0)return a}replace(e,t,r){let n,a;if(r===void 0?n=Yt.replace(e,t):Ke.is(r)?(a=r,n=mr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=Yt.del(e):Ke.is(t)?(n=t,r=mr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=mr.del(e,n)),this.edits.push(r),n!==void 0)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},Ku=class{static{i(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(Ke.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Fg=class{static{i(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ku(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(qi.is(t)){const r=new ki(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new ki(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Hi.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const n=[],a={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(a),r=new ki(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new ki(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ku,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ya.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=ya.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let a;an.is(r)||Ke.is(r)?a=r:n=r;let s,o;if(a===void 0?s=ga.create(e,t,n):(o=Ke.is(a)?a:this._changeAnnotations.manage(a),s=ga.create(e,t,n,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=va.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=va.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}},(function(e){function t(n){return{uri:n}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)}i(r,"is"),e.is=r})(Pc||(Pc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.integer(a.version)}i(r,"is"),e.is=r})(kc||(kc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&(a.version===null||A.integer(a.version))}i(r,"is"),e.is=r})(Hi||(Hi={})),(function(e){function t(n,a,s,o){return{uri:n,languageId:a,version:s,text:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.string(a.languageId)&&A.integer(a.version)&&A.string(a.text)}i(r,"is"),e.is=r})(Oc||(Oc={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){const n=r;return n===e.PlainText||n===e.Markdown}i(t,"is"),e.is=t})(So||(So={})),(function(e){function t(r){const n=r;return A.objectLiteral(r)&&So.is(n.kind)&&A.string(n.value)}i(t,"is"),e.is=t})(Ta||(Ta={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Lc||(Lc={})),(function(e){e.PlainText=1,e.Snippet=2})(Dc||(Dc={})),(function(e){e.Deprecated=1})(xc||(xc={})),(function(e){function t(n,a,s){return{newText:n,insert:a,replace:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a&&A.string(a.newText)&&Q.is(a.insert)&&Q.is(a.replace)}i(r,"is"),e.is=r})(Mc||(Mc={})),(function(e){e.asIs=1,e.adjustIndentation=2})(Gc||(Gc={})),(function(e){function t(r){const n=r;return n&&(A.string(n.detail)||n.detail===void 0)&&(A.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t})(Fc||(Fc={})),(function(e){function t(r){return{label:r}}i(t,"create"),e.create=t})(zc||(zc={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),e.create=t})(jc||(jc={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){const a=n;return A.string(a)||A.objectLiteral(a)&&A.string(a.language)&&A.string(a.value)}i(r,"is"),e.is=r})(Yi||(Yi={})),(function(e){function t(r){let n=r;return!!n&&A.objectLiteral(n)&&(Ta.is(n.contents)||Yi.is(n.contents)||A.typedArray(n.contents,Yi.is))&&(r.range===void 0||Q.is(r.range))}i(t,"is"),e.is=t})(Bc||(Bc={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t})(Uc||(Uc={})),(function(e){function t(r,n,...a){let s={label:r};return A.defined(n)&&(s.documentation=n),A.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),e.create=t})(Kc||(Kc={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(Wc||(Wc={})),(function(e){function t(r,n){let a={range:r};return A.number(n)&&(a.kind=n),a}i(t,"create"),e.create=t})(Vc||(Vc={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(qc||(qc={})),(function(e){e.Deprecated=1})(Hc||(Hc={})),(function(e){function t(r,n,a,s,o){let l={name:r,kind:n,location:{uri:s,range:a}};return o&&(l.containerName=o),l}i(t,"create"),e.create=t})(Yc||(Yc={})),(function(e){function t(r,n,a,s){return s!==void 0?{name:r,kind:n,location:{uri:a,range:s}}:{name:r,kind:n,location:{uri:a}}}i(t,"create"),e.create=t})(Xc||(Xc={})),(function(e){function t(n,a,s,o,l,u){let c={name:n,detail:a,kind:s,range:o,selectionRange:l};return u!==void 0&&(c.children=u),c}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.name)&&A.number(a.kind)&&Q.is(a.range)&&Q.is(a.selectionRange)&&(a.detail===void 0||A.string(a.detail))&&(a.deprecated===void 0||A.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}i(r,"is"),e.is=r})(Jc||(Jc={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Zc||(Zc={})),(function(e){e.Invoked=1,e.Automatic=2})(Xi||(Xi={})),(function(e){function t(n,a,s){let o={diagnostics:n};return a!=null&&(o.only=a),s!=null&&(o.triggerKind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.typedArray(a.diagnostics,Vi.is)&&(a.only===void 0||A.typedArray(a.only,A.string))&&(a.triggerKind===void 0||a.triggerKind===Xi.Invoked||a.triggerKind===Xi.Automatic)}i(r,"is"),e.is=r})(Qc||(Qc={})),(function(e){function t(n,a,s){let o={title:n},l=!0;return typeof a=="string"?(l=!1,o.kind=a):nn.is(a)?o.command=a:o.edit=a,l&&s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.title)&&(a.diagnostics===void 0||A.typedArray(a.diagnostics,Vi.is))&&(a.kind===void 0||A.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||nn.is(a.command))&&(a.isPreferred===void 0||A.boolean(a.isPreferred))&&(a.edit===void 0||_o.is(a.edit))}i(r,"is"),e.is=r})(ef||(ef={})),(function(e){function t(n,a){let s={range:n};return A.defined(a)&&(s.data=a),s}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.command)||nn.is(a.command))}i(r,"is"),e.is=r})(tf||(tf={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.uinteger(a.tabSize)&&A.boolean(a.insertSpaces)}i(r,"is"),e.is=r})(rf||(rf={})),(function(e){function t(n,a,s){return{range:n,target:a,data:s}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.target)||A.string(a.target))}i(r,"is"),e.is=r})(nf||(nf={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r})(af||(af={})),(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(sf||(sf={})),(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(of||(of={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i(t,"is"),e.is=t})(lf||(lf={})),(function(e){function t(n,a){return{range:n,text:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.string(a.text)}i(r,"is"),e.is=r})(uf||(uf={})),(function(e){function t(n,a,s){return{range:n,variableName:a,caseSensitiveLookup:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.boolean(a.caseSensitiveLookup)&&(A.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r})(cf||(cf={})),(function(e){function t(n,a){return{range:n,expression:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&(A.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r})(ff||(ff={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.defined(a)&&Q.is(n.stoppedLocation)}i(r,"is"),e.is=r})(df||(df={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t})(wo||(wo={})),(function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.location===void 0||Wi.is(a.location))&&(a.command===void 0||nn.is(a.command))}i(r,"is"),e.is=r})(Io||(Io={})),(function(e){function t(n,a,s){const o={position:n,label:a};return s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&ie.is(a.position)&&(A.string(a.label)||A.typedArray(a.label,Io.is))&&(a.kind===void 0||wo.is(a.kind))&&a.textEdits===void 0||A.typedArray(a.textEdits,Yt.is)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.paddingLeft===void 0||A.boolean(a.paddingLeft))&&(a.paddingRight===void 0||A.boolean(a.paddingRight))}i(r,"is"),e.is=r})(pf||(pf={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t})(mf||(mf={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t})(hf||(hf={})),(function(e){function t(r){return{items:r}}i(t,"create"),e.create=t})(yf||(yf={})),(function(e){e.Invoked=0,e.Automatic=1})(gf||(gf={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t})(vf||(vf={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t})(Tf||(Tf={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&Eo.is(n.uri)&&A.string(n.name)}i(t,"is"),e.is=t})($f||($f={})),zg=[` `,`\r `,"\r"],(function(e){function t(s,o,l,u){return new lh(s,o,l,u)}i(t,"create"),e.create=t;function r(s){let o=s;return!!(A.defined(o)&&A.string(o.uri)&&(A.undefined(o.languageId)||A.string(o.languageId))&&A.uinteger(o.lineCount)&&A.func(o.getText)&&A.func(o.positionAt)&&A.func(o.offsetAt))}i(r,"is"),e.is=r;function n(s,o){let l=s.getText(),u=a(o,(f,d)=>{let m=f.range.start.line-d.range.start.line;return m===0?f.range.start.character-d.range.start.character:m}),c=l.length;for(let f=u.length-1;f>=0;f--){let d=u[f],m=s.offsetAt(d.range.start),g=s.offsetAt(d.range.end);if(g<=c)l=l.substring(0,m)+d.newText+l.substring(g,l.length);else throw new Error("Overlapping edit");c=m}return l}i(n,"applyEdits"),e.applyEdits=n;function a(s,o){if(s.length<=1)return s;const l=s.length/2|0,u=s.slice(0,l),c=s.slice(l);a(u,o),a(c,o);let f=0,d=0,m=0;for(;f({domains:new Map,transitions:[]}),"createDefaultData"),H=rt(),St=s(()=>H.domains,"getDomains"),Mt=s(()=>H.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));H.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(H.transitions=t.filter(e=>e.from===e.to?(O.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=s(()=>U({...At.cynefin,...Q().cynefin}),"getConfig"),Pt=s(()=>{Tt(),H=rt()},"clear"),Y={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},Wt=s(t=>{xt(t,Y),Y.setDomains(t.domains),Y.setTransitions(t.transitions)},"populate"),It={parse:s(async t=>{const e=await Bt("cynefin",t);O.debug(e),Wt(e)},"parse")};function E(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(E,"seededRandom");function st(t){let e=0;for(let n=0;n{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),Rt=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,_t=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),I=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=Rt();O.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,F=o.boundaryAmplitude,R=i+b*2,_=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,_,R,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${R} ${_}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const T=k.append("g").attr("transform",`translate(${b}, ${b})`),V=Ft(i,f),Z=it(o.seed,e),mt=T.append("g").attr("class","cynefin-backgrounds"),X=["complex","complicated","chaotic","clear"];for(const l of X){const r=V[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=T.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Z,F)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Z+100,F)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;T.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=T.append("g").attr("class","cynefin-labels");for(const l of X){const r=V[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=T.append("g").attr("class","cynefin-subtitles");for(const r of X){const u=V[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=T.append("g").attr("class","cynefin-items"),A=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=V[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(A+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const G=x.getBBox();G.width>0&&($=G.width)}const C=$+tt*2,W=u.cx-C/2;M.attr("transform",`translate(${W}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",A/2)}),N>0){const g=B+L.length*(A+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const W=$.getBBox();W.width>0&&(P=W.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",A/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=T.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=V[y.from],N=V[y.to];if(!L||!N)return;if(y.from===y.to){O.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),W=C*.15,G=-x/C,ht=$/C,et=M+G*W,nt=P+ht*W;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}I&&T.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(I)},"draw"),Vt={draw:_t},Et=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Ht=s(()=>{const t=Et();return` +import{p as xt}from"./chunk-JWPE2WC7-TZtJmqSP.js";import{s as gt,g as $t,p as bt,o as wt,a as Ct,b as vt,_ as s,l as O,F as Dt,e as kt,q as Tt,B as U,z as Q,D as At,W as ot}from"./mermaid.core-B_UcP3X_.js";import{p as Bt}from"./cynefin-VYW2F7L2-BnQdr27u.js";import"./index-BOtIzGLC.js";var rt=s(()=>({domains:new Map,transitions:[]}),"createDefaultData"),H=rt(),St=s(()=>H.domains,"getDomains"),Mt=s(()=>H.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));H.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(H.transitions=t.filter(e=>e.from===e.to?(O.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=s(()=>U({...At.cynefin,...Q().cynefin}),"getConfig"),Pt=s(()=>{Tt(),H=rt()},"clear"),Y={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},Wt=s(t=>{xt(t,Y),Y.setDomains(t.domains),Y.setTransitions(t.transitions)},"populate"),It={parse:s(async t=>{const e=await Bt("cynefin",t);O.debug(e),Wt(e)},"parse")};function E(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(E,"seededRandom");function st(t){let e=0;for(let n=0;n{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),Rt=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,_t=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),I=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=Rt();O.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,F=o.boundaryAmplitude,R=i+b*2,_=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,_,R,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${R} ${_}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const T=k.append("g").attr("transform",`translate(${b}, ${b})`),V=Ft(i,f),Z=it(o.seed,e),mt=T.append("g").attr("class","cynefin-backgrounds"),X=["complex","complicated","chaotic","clear"];for(const l of X){const r=V[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=T.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Z,F)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Z+100,F)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;T.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=T.append("g").attr("class","cynefin-labels");for(const l of X){const r=V[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=T.append("g").attr("class","cynefin-subtitles");for(const r of X){const u=V[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=T.append("g").attr("class","cynefin-items"),A=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=V[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(A+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const G=x.getBBox();G.width>0&&($=G.width)}const C=$+tt*2,W=u.cx-C/2;M.attr("transform",`translate(${W}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",A/2)}),N>0){const g=B+L.length*(A+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const W=$.getBBox();W.width>0&&(P=W.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",A/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=T.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=V[y.from],N=V[y.to];if(!L||!N)return;if(y.from===y.to){O.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),W=C*.15,G=-x/C,ht=$/C,et=M+G*W,nt=P+ht*W;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}I&&T.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(I)},"draw"),Vt={draw:_t},Et=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Ht=s(()=>{const t=Et();return` .cynefinDomain { stroke: none; } diff --git a/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-BBTY0HCS.js b/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-CoCFT_Gw.js similarity index 97% rename from apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-BBTY0HCS.js rename to apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-CoCFT_Gw.js index ce449208c..dbfae5d0f 100644 --- a/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-BBTY0HCS.js +++ b/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-CoCFT_Gw.js @@ -1,4 +1,4 @@ -import{c as O,w as I,a as J,f as P,b as E,s as A}from"./chunk-RYQCIY6F-BoueTeQN.js";import{_ as w,am as v,an as D,ao as H,ap as Y,l,c as _,aq as W,ar as $,ag as j,as as q,ah as R,af as F,at as z,au as K,av as G}from"./mermaid.core-DKNppTOJ.js";import{G as Q}from"./graph-DOmOIIwC.js";import{l as U}from"./layout-D-LzfAck.js";import"./map-DxJ2ADlA.js";import"./index-DusVyqlT.js";var C=w((s,t,g)=>Math.max(t,Math.min(g,s)),"clamp"),B=w((s="TB")=>{switch(s){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),V=w(s=>s==="flowchart"||s==="flowchart-v2"||s==="stateDiagram","shouldMergeSelfLoopSegments"),Z=w((s,t,g,y,c)=>{const o=[],r=new Set;if(g.forEach(({start:i,end:n})=>{i!==y&&r.add(i),n!==y&&r.add(n)}),r.forEach(i=>{const n=s.node(i);typeof n?.x=="number"&&typeof n?.y=="number"&&o.push(n)}),o.length===0&&g.forEach(({edge:i})=>{(i.points??[]).forEach(n=>{typeof n?.x=="number"&&typeof n?.y=="number"&&o.push(n)})}),o.length===0)return B(c);const f=o.reduce((i,n)=>({x:i.x+n.x/o.length,y:i.y+n.y/o.length}),{x:0,y:0}),h=f.x-t.x,a=f.y-t.y;return Math.abs(h)>Math.abs(a)?h>0?"right":"left":Math.abs(a)>0?a>0?"bottom":"top":B(c)},"getSelfLoopSide"),ee=w((s,t="top",g=0,y=0)=>{const c=s.x,o=s.y-g,r=s.width/2,f=s.height/2,h=Math.max(36,Math.min(100,s.width*.8)),a=C(Math.max(y,s.width*.35),36,h),i=C(Math.min(s.width,s.height)*.45,24,48);switch(t){case"bottom":{const n=o+f;return[{x:c-a/2,y:n},{x:c-a/2,y:n+i},{x:c+a/2,y:n+i},{x:c+a/2,y:n}]}case"right":{const n=c+r;return[{x:n,y:o-a/2},{x:n+i,y:o-a/2},{x:n+i,y:o+a/2},{x:n,y:o+a/2}]}case"left":{const n=c-r;return[{x:n,y:o-a/2},{x:n-i,y:o-a/2},{x:n-i,y:o+a/2},{x:n,y:o+a/2}]}case"top":default:{const n=o-f;return[{x:c-a/2,y:n},{x:c-a/2,y:n-i},{x:c+a/2,y:n-i},{x:c+a/2,y:n}]}}},"getSelfLoopPoints"),te=w((s,t,g="top",y=0,c={})=>{const r=s.x,f=s.y-y,h=c.width??0,a=c.height??0;switch(g){case"bottom":return{x:r,y:Math.max(...t.map(i=>i.y))+a/2+4};case"right":return{x:Math.max(...t.map(i=>i.x))+h/2+4,y:f};case"left":return{x:Math.min(...t.map(i=>i.x))-h/2-4,y:f};case"top":default:return{x:r,y:Math.min(...t.map(i=>i.y))-a/2-4}}},"getSelfLoopLabelPosition"),ne=w((s,t=0,{mergeSelfLoops:g=!0}={})=>{const y=new Map,c=[],o=s.graph()?.rankdir;return s.edges().forEach(r=>{const f=s.edge(r);if(g&&f.selfLoop){const h=f.selfLoop.id;y.has(h)||y.set(h,[]),y.get(h).push({edge:f,start:r.v,end:r.w})}else c.push({edge:f,start:r.v,end:r.w})}),y.forEach(r=>{if(r.length!==3){r.forEach(L=>c.push(L));return}r.sort((L,d)=>L.edge.selfLoop.order-d.edge.selfLoop.order);const[f,h,a]=r,i=f.edge.originalEdge??h.edge.originalEdge??a.edge.originalEdge??h.edge,n=s.node(i.start);if(!n){r.forEach(L=>c.push(L));return}const p={width:h.edge.width,height:h.edge.height},m=Z(s,n,r,i.start,o),X=ee(n,m,t,p.width??0),S=te(n,X,m,t,p),b={...h.edge,...i,id:i.id,points:X,start:i.start,end:i.end,x:S.x,y:S.y,width:p.width,height:p.height,labelStyle:h.edge.labelStyle,fromCluster:f.edge.fromCluster??h.edge.fromCluster??a.edge.fromCluster,toCluster:f.edge.toCluster??h.edge.toCluster??a.edge.toCluster};delete b.selfLoop,delete b.originalEdge,c.push({edge:b,start:b.start,end:b.end})}),c},"getEdgesToRender"),T=w(async(s,t,g,y,c,o)=>{l.warn("Graph in recursive render:XAX",I(t),c);const r=t.graph().rankdir;l.trace("Dir in recursive render - dir:",r);const f=s.insert("g").attr("class","root");t.nodes()?l.info("Recursive render XXX",t.nodes()):l.info("No nodes found for",t),t.edges().length>0&&l.info("Recursive edges",t.edge(t.edges()[0]));const h=f.insert("g").attr("class","clusters"),a=f.insert("g").attr("class","edgePaths"),i=f.insert("g").attr("class","edgeLabels"),n=f.insert("g").attr("class","nodes"),p=V(g);await Promise.all(t.nodes().map(async function(d){const e=t.node(d);if(c!==void 0){const u=JSON.parse(JSON.stringify(c.clusterData));l.trace(`Setting data for parent cluster XXX +import{c as O,w as I,a as J,f as P,b as E,s as A}from"./chunk-RYQCIY6F-BrAj5IFL.js";import{_ as w,am as v,an as D,ao as H,ap as Y,l,c as _,aq as W,ar as $,ag as j,as as q,ah as R,af as F,at as z,au as K,av as G}from"./mermaid.core-B_UcP3X_.js";import{G as Q}from"./graph-DOmOIIwC.js";import{l as U}from"./layout-D-LzfAck.js";import"./map-DxJ2ADlA.js";import"./index-BOtIzGLC.js";var C=w((s,t,g)=>Math.max(t,Math.min(g,s)),"clamp"),B=w((s="TB")=>{switch(s){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),V=w(s=>s==="flowchart"||s==="flowchart-v2"||s==="stateDiagram","shouldMergeSelfLoopSegments"),Z=w((s,t,g,y,c)=>{const o=[],r=new Set;if(g.forEach(({start:i,end:n})=>{i!==y&&r.add(i),n!==y&&r.add(n)}),r.forEach(i=>{const n=s.node(i);typeof n?.x=="number"&&typeof n?.y=="number"&&o.push(n)}),o.length===0&&g.forEach(({edge:i})=>{(i.points??[]).forEach(n=>{typeof n?.x=="number"&&typeof n?.y=="number"&&o.push(n)})}),o.length===0)return B(c);const f=o.reduce((i,n)=>({x:i.x+n.x/o.length,y:i.y+n.y/o.length}),{x:0,y:0}),h=f.x-t.x,a=f.y-t.y;return Math.abs(h)>Math.abs(a)?h>0?"right":"left":Math.abs(a)>0?a>0?"bottom":"top":B(c)},"getSelfLoopSide"),ee=w((s,t="top",g=0,y=0)=>{const c=s.x,o=s.y-g,r=s.width/2,f=s.height/2,h=Math.max(36,Math.min(100,s.width*.8)),a=C(Math.max(y,s.width*.35),36,h),i=C(Math.min(s.width,s.height)*.45,24,48);switch(t){case"bottom":{const n=o+f;return[{x:c-a/2,y:n},{x:c-a/2,y:n+i},{x:c+a/2,y:n+i},{x:c+a/2,y:n}]}case"right":{const n=c+r;return[{x:n,y:o-a/2},{x:n+i,y:o-a/2},{x:n+i,y:o+a/2},{x:n,y:o+a/2}]}case"left":{const n=c-r;return[{x:n,y:o-a/2},{x:n-i,y:o-a/2},{x:n-i,y:o+a/2},{x:n,y:o+a/2}]}case"top":default:{const n=o-f;return[{x:c-a/2,y:n},{x:c-a/2,y:n-i},{x:c+a/2,y:n-i},{x:c+a/2,y:n}]}}},"getSelfLoopPoints"),te=w((s,t,g="top",y=0,c={})=>{const r=s.x,f=s.y-y,h=c.width??0,a=c.height??0;switch(g){case"bottom":return{x:r,y:Math.max(...t.map(i=>i.y))+a/2+4};case"right":return{x:Math.max(...t.map(i=>i.x))+h/2+4,y:f};case"left":return{x:Math.min(...t.map(i=>i.x))-h/2-4,y:f};case"top":default:return{x:r,y:Math.min(...t.map(i=>i.y))-a/2-4}}},"getSelfLoopLabelPosition"),ne=w((s,t=0,{mergeSelfLoops:g=!0}={})=>{const y=new Map,c=[],o=s.graph()?.rankdir;return s.edges().forEach(r=>{const f=s.edge(r);if(g&&f.selfLoop){const h=f.selfLoop.id;y.has(h)||y.set(h,[]),y.get(h).push({edge:f,start:r.v,end:r.w})}else c.push({edge:f,start:r.v,end:r.w})}),y.forEach(r=>{if(r.length!==3){r.forEach(L=>c.push(L));return}r.sort((L,d)=>L.edge.selfLoop.order-d.edge.selfLoop.order);const[f,h,a]=r,i=f.edge.originalEdge??h.edge.originalEdge??a.edge.originalEdge??h.edge,n=s.node(i.start);if(!n){r.forEach(L=>c.push(L));return}const p={width:h.edge.width,height:h.edge.height},m=Z(s,n,r,i.start,o),X=ee(n,m,t,p.width??0),S=te(n,X,m,t,p),b={...h.edge,...i,id:i.id,points:X,start:i.start,end:i.end,x:S.x,y:S.y,width:p.width,height:p.height,labelStyle:h.edge.labelStyle,fromCluster:f.edge.fromCluster??h.edge.fromCluster??a.edge.fromCluster,toCluster:f.edge.toCluster??h.edge.toCluster??a.edge.toCluster};delete b.selfLoop,delete b.originalEdge,c.push({edge:b,start:b.start,end:b.end})}),c},"getEdgesToRender"),T=w(async(s,t,g,y,c,o)=>{l.warn("Graph in recursive render:XAX",I(t),c);const r=t.graph().rankdir;l.trace("Dir in recursive render - dir:",r);const f=s.insert("g").attr("class","root");t.nodes()?l.info("Recursive render XXX",t.nodes()):l.info("No nodes found for",t),t.edges().length>0&&l.info("Recursive edges",t.edge(t.edges()[0]));const h=f.insert("g").attr("class","clusters"),a=f.insert("g").attr("class","edgePaths"),i=f.insert("g").attr("class","edgeLabels"),n=f.insert("g").attr("class","nodes"),p=V(g);await Promise.all(t.nodes().map(async function(d){const e=t.node(d);if(c!==void 0){const u=JSON.parse(JSON.stringify(c.clusterData));l.trace(`Setting data for parent cluster XXX Node.id = `,d,` data=`,u.height,` Parent cluster`,c.height),t.setNode(c.id,u),t.parent(d)||(l.trace("Setting parent",d,c.id),t.setParent(d,c.id,u))}if(l.info("(Insert) Node XXX"+d+": "+JSON.stringify(t.node(d))),e?.clusterNode){l.info("Cluster identified XBX",d,e.width,t.node(d));const{ranksep:u,nodesep:x}=t.graph();e.graph.setGraph({...e.graph.graph(),ranksep:u+25,nodesep:x});const N=await T(n,e.graph,g,y,t.node(d),o),M=N.elem;W(e,M),e.diff=N.diff||0,l.info("New compound node after recursive render XAX",d,"width",e.width,"height",e.height),$(M,e)}else t.children(d).length>0?(l.trace("Cluster - the non recursive path XBX",d,e.id,e,e.width,"Graph:",t),l.trace(P(e.id,t)),E.set(e.id,{id:P(e.id,t),node:e})):(l.trace("Node - the non recursive path XAX",d,n,t.node(d),r),await j(n,t.node(d),{config:o,dir:r}))})),await w(async()=>{const d=t.edges().map(async function(e){const u=t.edge(e.v,e.w,e.name);if(l.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),l.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(t.edge(e))),l.info("Fix",E,"ids:",e.v,e.w,"Translating: ",E.get(e.v),E.get(e.w)),p&&u.selfLoop){if(u.selfLoop.order!==1)return;const x=u.id;u.id=u.selfLoop.id,await G(i,u),u.id=x;return}await G(i,u)});await Promise.all(d)},"processEdges")(),l.info("Graph before layout:",JSON.stringify(I(t))),l.info("############################################# XXX"),l.info("### Layout ### XXX"),l.info("############################################# XXX"),U(t),l.info("Graph after layout:",JSON.stringify(I(t)));let X=0,{subGraphTitleTotalMargin:S}=q(o);await Promise.all(A(t).map(async function(d){const e=t.node(d);if(l.info("Position XBX => "+d+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e?.clusterNode)e.y+=S,l.info("A tainted cluster node XBX1",d,e.id,e.width,e.height,e.x,e.y,t.parent(d)),E.get(e.id).node=e,R(e);else if(t.children(d).length>0){l.info("A pure cluster node XBX1",d,e.id,e.x,e.y,e.width,e.height,t.parent(d)),e.height+=S,t.node(e.parentId);const u=e?.padding/2||0,x=e?.labelBBox?.height||0,N=x-u||0;l.debug("OffsetY",N,"labelHeight",x,"halfPadding",u),await F(h,e),E.get(e.id).node=e}else{const u=t.node(e.parentId);e.y+=S/2,l.info("A regular node XBX1 - using the padding",e.id,"parent",e.parentId,e.width,e.height,e.x,e.y,"offsetY",e.offsetY,"parent",u,u?.offsetY,e),R(e)}}));const b=S/2;return ne(t,b,{mergeSelfLoops:p}).forEach(function({edge:d,start:e,end:u}){l.info("Edge "+e+" -> "+u+": "+JSON.stringify(d),d),d.points.forEach(k=>k.y+=b);const x=t.node(e),N=t.node(u),M=z(a,d,E,g,x,N,y);K(d,M)}),t.nodes().forEach(function(d){const e=t.node(d);l.info(d,e.type,e.diff),e.isGroup&&(X=e.diff)}),l.warn("Returning from recursive render XAX",f,X),{elem:f,diff:X}},"recursiveRender"),ce=w(async(s,t)=>{const g=new Q({multigraph:!0,compound:!0}).setGraph({rankdir:s.direction,nodesep:s.config?.nodeSpacing||s.config?.flowchart?.nodeSpacing||s.nodeSpacing,ranksep:s.config?.rankSpacing||s.config?.flowchart?.rankSpacing||s.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),y=t.select("g");v(y,s.markers,s.type,s.diagramId),D(),H(),Y(),O(),s.nodes.forEach(o=>{g.setNode(o.id,{...o}),o.parentId&&g.setParent(o.id,o.parentId)}),l.debug("Edges:",s.edges),s.edges.forEach(o=>{if(o.start===o.end){const r=o.start,f=r+"---"+r+"---1",h=r+"---"+r+"---2",a=g.node(r);g.setNode(f,{domId:f,id:f,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),g.setParent(f,a.parentId),g.setNode(h,{domId:h,id:h,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),g.setParent(h,a.parentId);const i=structuredClone(o),n=structuredClone(o),p=structuredClone(o),m=structuredClone(o);n.originalEdge=i,n.selfLoop={id:i.id,order:0},p.originalEdge=i,p.selfLoop={id:i.id,order:1},m.originalEdge=i,m.selfLoop={id:i.id,order:2},n.label="",n.arrowTypeEnd="none",n.endLabelLeft="",n.endLabelRight="",n.startLabelLeft="",n.id=r+"-cyclic-special-1",p.startLabelRight="",p.startLabelLeft="",p.endLabelLeft="",p.endLabelRight="",p.arrowTypeStart="none",p.arrowTypeEnd="none",p.id=r+"-cyclic-special-mid",m.label="",m.startLabelRight="",m.startLabelLeft="",m.arrowTypeStart="none",a.isGroup&&(n.fromCluster=r,m.toCluster=r),m.id=r+"-cyclic-special-2",m.arrowTypeStart="none",g.setEdge(r,f,n,r+"-cyclic-special-0"),g.setEdge(f,h,p,r+"-cyclic-special-1"),g.setEdge(h,r,m,r+"-cyclic-special-2")}else g.setEdge(o.start,o.end,{...o},o.id)}),l.warn("Graph at first:",JSON.stringify(I(g))),J(g),l.warn("Graph after XAX:",JSON.stringify(I(g)));const c=_();await T(y,g,s.type,s.diagramId,void 0,c)},"render");export{ne as getEdgesToRender,ce as render}; diff --git a/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-DsY299GE.js b/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-DuCbEYlU.js similarity index 98% rename from apps/kimi-code/dist-web/assets/diagram-FQU43EPY-DsY299GE.js rename to apps/kimi-code/dist-web/assets/diagram-FQU43EPY-DuCbEYlU.js index 627606c56..aeeead004 100644 --- a/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-DsY299GE.js +++ b/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-DuCbEYlU.js @@ -1,3 +1,3 @@ -import{p as re}from"./chunk-JWPE2WC7-D24iyGyr.js";import{p as oe,o as se,s as de,g as le,a as ce,b as me,_ as o,l as g,c as D,d as ue,A as xe,q as fe,B as ge,z as M,D as he,i as y,w as P,ak as pe}from"./mermaid.core-DKNppTOJ.js";import{p as be,i as ve}from"./cynefin-VYW2F7L2-D3UUATjS.js";import"./index-DusVyqlT.js";var T="position frame",$="frame positioned",S="position relation",N="relation positioned",we=o(function(e){g.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){C(),fe()},"clear");function C(){B={}}o(C,"reset");var Se=he.eventmodeling,ke=o(()=>ge({...Se,...M().eventmodeling}),"getConfig"),B={};function O(){let e=Fe;const{ast:n}=B,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=G(i,n.dataEntities,t);e=v(e,{$kind:T,index:a,frame:i,textProps:r});let d;K(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=v(e,{$kind:S,index:a,frame:i,sourceFrame:l})})):e=v(e,{$kind:S,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function I(e){B.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function W(e){const n=e.split(".");if(n.length===2)return n[0]}o(W,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&aNumber.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=W(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function L(e){const{themeVariables:n}=M();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(L,"calculateEntityVisualProps");function G(e,n,t){const i=M(),a=y(H(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
"};let c=`${P(a,t.textMaxWidth,d)}`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" "," ")),e.dataReference){const p=n.find(w=>w.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{ +import{p as re}from"./chunk-JWPE2WC7-TZtJmqSP.js";import{p as oe,o as se,s as de,g as le,a as ce,b as me,_ as o,l as g,c as D,d as ue,A as xe,q as fe,B as ge,z as M,D as he,i as y,w as P,ak as pe}from"./mermaid.core-B_UcP3X_.js";import{p as be,i as ve}from"./cynefin-VYW2F7L2-BnQdr27u.js";import"./index-BOtIzGLC.js";var T="position frame",$="frame positioned",S="position relation",N="relation positioned",we=o(function(e){g.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){C(),fe()},"clear");function C(){B={}}o(C,"reset");var Se=he.eventmodeling,ke=o(()=>ge({...Se,...M().eventmodeling}),"getConfig"),B={};function O(){let e=Fe;const{ast:n}=B,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=G(i,n.dataEntities,t);e=v(e,{$kind:T,index:a,frame:i,textProps:r});let d;K(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=v(e,{$kind:S,index:a,frame:i,sourceFrame:l})})):e=v(e,{$kind:S,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function I(e){B.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function W(e){const n=e.split(".");if(n.length===2)return n[0]}o(W,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&aNumber.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=W(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function L(e){const{themeVariables:n}=M();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(L,"calculateEntityVisualProps");function G(e,n,t){const i=M(),a=y(H(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
"};let c=`${P(a,t.textMaxWidth,d)}`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" "," ")),e.dataReference){const p=n.find(w=>w.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{ `)+2),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" "," "),r+="
")}const m=r!==void 0;m&&(c+=`

${r}`);const x={fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:d.fontFamily},u=pe(c,x),h=m?u.width/3:u.width,f={content:c,width:h,height:u.height};return g.debug(`[${e.name}] ${e.entityIdentifier} text`,f),f}o(G,"calculateTextProps");function V(e,n){const t=n,i=L(t.frame),a={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:$,frame:t.frame,index:t.index,visual:i,dimension:a,textProps:t.textProps}]}o(V,"decidePositionFrame");function X(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}o(X,"calculateX");function j(e,n){const t=[...e.map(i=>i.r),n];return Math.max(...t)}o(j,"calculateMaxRight");function A(e){return Object.values(e).sort((n,t)=>n.index-t.index)}o(A,"sortedSwimlanesArray");function Y(e,n){const t=n,i=_(t.frame,e.swimlanes);let a;i.index in e.swimlanes?a=e.swimlanes[i.index]:a={index:i.index,label:i.label,r:0,y:i.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,d=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,l={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},c=X(a,d,r),m=c+l.width+s.boxPadding,x=j(Object.values(e.swimlanes),m);a.r=c+l.width,a.maxHeight=Math.max(a.maxHeight,l.height),a.height=Math.max(s.swimlaneMinHeight,a.maxHeight)+2*s.swimlanePadding;const u={x:c,y:s.swimlanePadding+a.y,r:m,dimension:l,leftSibling:!1,swimlane:a,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},h={...e,boxes:[...e.boxes,u],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:i.index,previousFrame:t.frame,maxR:x},f=A(h.swimlanes);f.length>0&&(f[0].y=0);for(let p=1;p0}o(K,"hasSourceFrame");function k(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}o(k,"findBoxByFrame");function q(e,n,t){if(!(t<0))for(let i=t;i>=0;i--){const a=e[i];if(a.swimlane.index!==n)return a}}o(q,"findBoxByLineIndex");function J(e,n){const t=n;if(ve(t.frame)||z(t.index,t.frame))return[];const i=k(e.boxes,t.frame);if(i===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let a;return t.sourceFrame?a=k(e.boxes,t.sourceFrame):a=q(e.boxes,i.swimlane.index,t.index-1),a===void 0?[]:[{$kind:N,frame:t.frame,index:t.index,sourceBox:a,targetBox:i}]}o(J,"decidePositionRelation");function Q(e,n){const t=n,i={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,i]}}o(Q,"evolveRelationPositioned");var Me={[T]:V,[S]:J},Be={[$]:Y,[N]:Q};function Z(e,n){const t=Me[n.$kind];if(t==null)return[];const i=t(e,n);return g.debug("decided events",i),i}o(Z,"decide");function ee(e,n){const t=n.reduce((i,a)=>{const r=Be[a.$kind];return r==null?i:r(i,a)},e);return g.debug("evolve events",{state:e,newState:t,events:n}),t}o(ee,"evolve");function v(e,n){const t=Z(e,n);return ee(e,t)}o(v,"dispatch");var F={getConfig:ke,setOptions:we,getOptions:ye,clear:Pe,setAccTitle:me,getAccTitle:ce,getAccDescription:le,setAccDescription:de,setDiagramTitle:se,getDiagramTitle:oe,setAst:I,getDiagramProps:E,getState:O},Ee={parse:o(async e=>{const n=await be("eventmodeling",e);g.debug(n),F.setAst(n),re(n,F)},"parse")},Ae=D(),Re=Ae?.eventmodeling;function te(e,n){return t=>{const i=t.swimlane.y+n.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",t.x).attr("y",i).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),a.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",i+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(t.text)}}o(te,"renderD3Box");function ne(e,n){return e>n}o(ne,"dirUpwards");function ie(e,n,t,i){return a=>{const r=a.sourceBox.swimlane.y+n.swimlanePadding,d=a.targetBox.swimlane.y+n.swimlanePadding,l=ne(r,d),c=a.sourceBox.x+a.sourceBox.dimension.width*2/3,m=a.targetBox.x+a.targetBox.dimension.width/3;let x,u;g.debug(`rendering relation up=${l} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),l?(x=r,u=d+a.targetBox.dimension.height):(x=r+a.sourceBox.dimension.height,u=d);const h=i.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",h).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${c} ${x} L${m} ${u}`)}}o(ie,"renderD3Relation");function ae(e,n,t,i){return a=>{const r=e.append("g").attr("class","em-swimlane"),d=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",l=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",a.height).attr("fill",d).attr("stroke",l),r.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}o(ae,"renderD3Swimlane");var De=o(function(e,n,t,i){if(g.debug("in eventmodeling renderer",e+` `,"id:",n,t),!Re)throw new Error("EventModeling config not found");const a=i.db,{themeVariables:r,eventmodeling:d}=D(),l=ue(`[id="${n}"]`),c=a.getDiagramProps(),m=a.getState(),x=`em-arrowhead-${n}`,u=r.emArrowhead??"#000000";m.sortedSwimlanesArray.forEach(ae(l,m.maxR,c,r)),m.boxes.forEach(te(l,c)),m.relations.forEach(ie(l,c,x,r)),l.append("defs").append("marker").attr("id",x).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",u),xe(void 0,l,d?.padding??30,d?.useMaxWidth)},"draw"),Te={draw:De},$e=o(e=>"","getStyles"),Ne=$e,He={parser:Ee,db:F,renderer:Te,styles:Ne};export{He as diagram}; diff --git a/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-nEZgArkk.js b/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-DaD-7Fad.js similarity index 97% rename from apps/kimi-code/dist-web/assets/diagram-G47NLZAW-nEZgArkk.js rename to apps/kimi-code/dist-web/assets/diagram-G47NLZAW-DaD-7Fad.js index 2c56742de..e266f8889 100644 --- a/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-nEZgArkk.js +++ b/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-DaD-7Fad.js @@ -1,4 +1,4 @@ -import{p as me}from"./chunk-JWPE2WC7-D24iyGyr.js";import{_ as w,W as ge,z as te,B as Q,F as ye,e as Se,l as ee,bf as B,d as j,b as ve,a as xe,o as be,p as we,g as Ce,s as Te,D as Le,bg as $e,q as Ae}from"./mermaid.core-DKNppTOJ.js";import{s as Fe}from"./chunk-VR4S4FIN-DN3fhyNm.js";import{p as Ne}from"./cynefin-VYW2F7L2-D3UUATjS.js";import{b as I}from"./defaultLocale-DX6XiGOO.js";import{o as K}from"./ordinal-Cboi1Yqb.js";import"./index-DusVyqlT.js";import"./init-Gi6I4Gst.js";function Me(e){var a=0,n=e.children,l=n&&n.length;if(!l)a=1;else for(;--l>=0;)a+=n[l].value;e.value=a}function _e(){return this.eachAfter(Me)}function ke(e,a){let n=-1;for(const l of this)e.call(a,l,++n,this);return this}function ze(e,a){for(var n=this,l=[n],r,o,h=-1;n=l.pop();)if(e.call(a,n,++h,this),r=n.children)for(o=r.length-1;o>=0;--o)l.push(r[o]);return this}function Ve(e,a){for(var n=this,l=[n],r=[],o,h,d,g=-1;n=l.pop();)if(r.push(n),o=n.children)for(h=0,d=o.length;h=0;)n+=l[r].value;a.value=n})}function Be(e){return this.eachBefore(function(a){a.children&&a.children.sort(e)})}function We(e){for(var a=this,n=Ee(a,e),l=[a];a!==n;)a=a.parent,l.push(a);for(var r=l.length;e!==n;)l.splice(r,0,e),e=e.parent;return l}function Ee(e,a){if(e===a)return e;var n=e.ancestors(),l=a.ancestors(),r=null;for(e=n.pop(),a=l.pop();e===a;)r=e,e=n.pop(),a=l.pop();return r}function Re(){for(var e=this,a=[e];e=e.parent;)a.push(e);return a}function He(){return Array.from(this)}function Ie(){var e=[];return this.eachBefore(function(a){a.children||e.push(a)}),e}function Oe(){var e=this,a=[];return e.each(function(n){n!==e&&a.push({source:n.parent,target:n})}),a}function*qe(){var e=this,a,n=[e],l,r,o;do for(a=n.reverse(),n=[];e=a.pop();)if(yield e,l=e.children)for(r=0,o=l.length;r=0;--d)r.push(o=h[d]=new U(h[d])),o.parent=l,o.depth=l.depth+1;return n.eachBefore(Ue)}function Ge(){return ae(this).eachBefore(je)}function Xe(e){return e.children}function Ye(e){return Array.isArray(e)?e[1]:null}function je(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Ue(e){var a=0;do e.height=a;while((e=e.parent)&&e.height<++a)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}U.prototype=ae.prototype={constructor:U,count:_e,each:ke,eachAfter:Ve,eachBefore:ze,find:De,sum:Pe,sort:Be,path:We,ancestors:Re,descendants:He,leaves:Ie,links:Oe,copy:Ge,[Symbol.iterator]:qe};function Ze(e){if(typeof e!="function")throw new Error;return e}function O(){return 0}function q(e){return function(){return e}}function Je(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Ke(e,a,n,l,r){for(var o=e.children,h,d=-1,g=o.length,c=e.value&&(l-a)/e.value;++dN&&(N=c),M=u*u*E,$=Math.max(N/M,M/y),$>V){u-=c;break}V=$}h.push(g={value:u,dice:x1?l:1)},n})(et);function nt(){var e=at,a=!1,n=1,l=1,r=[0],o=O,h=O,d=O,g=O,c=O;function p(s){return s.x0=s.y0=0,s.x1=n,s.y1=l,s.eachBefore(b),r=[0],a&&s.eachBefore(Je),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,u=s.x1-x,y=s.y1-x;u{$e(r)&&(n?.textStyles?n.textStyles.push(r):n.textStyles=[r]),n?.styles?n.styles.push(r):n.styles=[r]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){Ae(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function oe(e){if(!e.length)return[];const a=[],n=[];return e.forEach(l=>{const r={name:l.name,children:l.type==="Leaf"?void 0:[]};for(r.classSelector=l?.classSelector,l?.cssCompiledStyles&&(r.cssCompiledStyles=l.cssCompiledStyles),l.type==="Leaf"&&l.value!==void 0&&(r.value=l.value);n.length>0&&n[n.length-1].level>=l.level;)n.pop();if(n.length===0)a.push(r);else{const o=n[n.length-1].node;o.children?o.children.push(r):o.children=[r]}l.type!=="Leaf"&&n.push({node:r,level:l.level})}),a}w(oe,"buildHierarchy");var lt=w((e,a)=>{me(e,a);const n=[];for(const o of e.TreemapRows??[])o.$type==="ClassDefStatement"&&a.addClass(o.className??"",o.styleText??"");for(const o of e.TreemapRows??[]){const h=o.item;if(!h)continue;const d=o.indent?parseInt(o.indent):0,g=rt(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],p=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:p};n.push(b)}const l=oe(n),r=w((o,h)=>{for(const d of o)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(l,0)},"populate"),rt=w(e=>e.name?String(e.name):"","getItemName"),ce={parser:{yy:void 0},parse:w(async e=>{try{const n=await Ne("treemap",e);ee.debug("Treemap AST:",n);const l=ce.parser?.yy;if(!(l instanceof ie))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");lt(n,l)}catch(a){throw ee.error("Error parsing treemap:",a),a}},"parse")},st=10,W=10,G=25,it=w((e,a,n,l)=>{const r=l.db,o=r.getConfig(),h=o.padding??st,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=te();if(!g)return;const p=d?30:0,b=ye(a),s=o.nodeWidth?o.nodeWidth*W:960,x=o.nodeHeight?o.nodeHeight*W:500,S=s,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),Se(b,v,S,o.useMaxWidth);let u;try{const t=o.valueFormat||",";if(t==="$0,0")u=w(i=>"$"+I(",")(i),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const i=/\.\d+/.exec(t),f=i?i[0]:"";u=w(C=>"$"+I(","+f)(C),"valueFormat")}else if(t.startsWith("$")){const i=t.substring(1);u=w(f=>"$"+I(i||"")(f),"valueFormat")}else u=I(t)}catch(t){ee.error("Error creating format function:",t),u=I(",")}const y=K().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=K().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),$=K().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),E=ae(g).sum(t=>t.value??0).sort((t,i)=>(i.value??0)-(t.value??0)),ne=nt().size([s,x]).paddingTop(t=>t.children&&t.children.length>0?G+W:0).paddingInner(h).paddingLeft(t=>t.children&&t.children.length>0?W:0).paddingRight(t=>t.children&&t.children.length>0?W:0).paddingBottom(t=>t.children&&t.children.length>0?W:0).round(!0)(E),he=ne.descendants().filter(t=>t.children&&t.children.length>0),R=V.selectAll(".treemapSection").data(he).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);R.append("rect").attr("width",t=>t.x1-t.x0).attr("height",G).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>t.depth===0?"display: none;":""),R.append("clipPath").attr("id",(t,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",G),R.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,i)=>`treemapSection section${i}`).attr("fill",t=>y(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>N(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const i=B({cssCompiledStyles:t.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),R.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",G/2).attr("dominant-baseline","middle").text(t=>t.depth===0?"":t.data.name).attr("font-weight","bold").attr("clip-path",(t,i)=>`url(#clip-section-${a}-${i})`).attr("style",t=>{if(t.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(t){if(t.depth===0)return;const i=j(this),f=t.data.name;i.text(f);const C=t.x1-t.x0,L=6;let T;o.showValues!==!1&&t.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),_=i.node();if(_.getComputedTextLength()>m){let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){i.text("..."),_.getComputedTextLength()>m&&i.text("");break}if(i.text(z+"..."),_.getComputedTextLength()<=m)break}}}),o.showValues!==!1&&R.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",G/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?u(t.value):"").attr("font-style","italic").attr("style",t=>{if(t.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const le=ne.leaves(),A=le.length>20,de=A?16:38,X=A?14:28,D=A?4:8,H=A?4:6,Z=A?2:4,re=A?8:10,J=A?1:2,Y=V.selectAll(".treemapLeafGroup").data(le).enter().append("g").attr("class",(t,i)=>`treemapNode treemapLeafGroup leaf${i}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);Y.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("style",t=>B({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("stroke-width",3),Y.append("clipPath").attr("id",(t,i)=>`clip-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),Y.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>{const i=`text-anchor: middle; dominant-baseline: middle; font-size: ${de}px;fill:`+$(t.data.name)+";",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,i)=>`url(#clip-${a}-${i})`).text(t=>t.data.name).each(function(t){const i=j(this),f=t.x1-t.x0,C=t.y1-t.y0,L=i.node(),T=f-2*Z,P=C-2*Z;if(TT&&m>D;)m--,i.style("font-size",`${m}px`);let F=Math.max(H,Math.min(X,Math.round(m*_))),k=m+J+F;for(;k>P&&m>D&&(m--,F=Math.max(H,Math.min(X,Math.round(m*_))),!(FT||m(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${X}px;fill:`+$(i.data.name)+";",C=B({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?u(i.value):"").each(function(i){const f=j(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=j(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(H,Math.min(X,Math.round(T*.6)));f.style("font-size",`${m}px`);const F=(i.y1-i.y0)/2+T/2+J;f.attr("y",F);const k=i.x1-i.x0,se=i.y1-i.y0-4,fe=k-2*Z;f.node().getComputedTextLength()>fe||F+m>se||m{const a=ge(),n=te(),l=Q(a,n.themeVariables),r=Q(ht,e),o=r.titleColor??l.titleColor,h=r.labelColor??l.textColor,d=r.valueColor??l.textColor;return` +import{p as me}from"./chunk-JWPE2WC7-TZtJmqSP.js";import{_ as w,W as ge,z as te,B as Q,F as ye,e as Se,l as ee,bf as B,d as j,b as ve,a as xe,o as be,p as we,g as Ce,s as Te,D as Le,bg as $e,q as Ae}from"./mermaid.core-B_UcP3X_.js";import{s as Fe}from"./chunk-VR4S4FIN-CYEgbtU1.js";import{p as Ne}from"./cynefin-VYW2F7L2-BnQdr27u.js";import{b as I}from"./defaultLocale-DX6XiGOO.js";import{o as K}from"./ordinal-Cboi1Yqb.js";import"./index-BOtIzGLC.js";import"./init-Gi6I4Gst.js";function Me(e){var a=0,n=e.children,l=n&&n.length;if(!l)a=1;else for(;--l>=0;)a+=n[l].value;e.value=a}function _e(){return this.eachAfter(Me)}function ke(e,a){let n=-1;for(const l of this)e.call(a,l,++n,this);return this}function ze(e,a){for(var n=this,l=[n],r,o,h=-1;n=l.pop();)if(e.call(a,n,++h,this),r=n.children)for(o=r.length-1;o>=0;--o)l.push(r[o]);return this}function Ve(e,a){for(var n=this,l=[n],r=[],o,h,d,g=-1;n=l.pop();)if(r.push(n),o=n.children)for(h=0,d=o.length;h=0;)n+=l[r].value;a.value=n})}function Be(e){return this.eachBefore(function(a){a.children&&a.children.sort(e)})}function We(e){for(var a=this,n=Ee(a,e),l=[a];a!==n;)a=a.parent,l.push(a);for(var r=l.length;e!==n;)l.splice(r,0,e),e=e.parent;return l}function Ee(e,a){if(e===a)return e;var n=e.ancestors(),l=a.ancestors(),r=null;for(e=n.pop(),a=l.pop();e===a;)r=e,e=n.pop(),a=l.pop();return r}function Re(){for(var e=this,a=[e];e=e.parent;)a.push(e);return a}function He(){return Array.from(this)}function Ie(){var e=[];return this.eachBefore(function(a){a.children||e.push(a)}),e}function Oe(){var e=this,a=[];return e.each(function(n){n!==e&&a.push({source:n.parent,target:n})}),a}function*qe(){var e=this,a,n=[e],l,r,o;do for(a=n.reverse(),n=[];e=a.pop();)if(yield e,l=e.children)for(r=0,o=l.length;r=0;--d)r.push(o=h[d]=new U(h[d])),o.parent=l,o.depth=l.depth+1;return n.eachBefore(Ue)}function Ge(){return ae(this).eachBefore(je)}function Xe(e){return e.children}function Ye(e){return Array.isArray(e)?e[1]:null}function je(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Ue(e){var a=0;do e.height=a;while((e=e.parent)&&e.height<++a)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}U.prototype=ae.prototype={constructor:U,count:_e,each:ke,eachAfter:Ve,eachBefore:ze,find:De,sum:Pe,sort:Be,path:We,ancestors:Re,descendants:He,leaves:Ie,links:Oe,copy:Ge,[Symbol.iterator]:qe};function Ze(e){if(typeof e!="function")throw new Error;return e}function O(){return 0}function q(e){return function(){return e}}function Je(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Ke(e,a,n,l,r){for(var o=e.children,h,d=-1,g=o.length,c=e.value&&(l-a)/e.value;++dN&&(N=c),M=u*u*E,$=Math.max(N/M,M/y),$>V){u-=c;break}V=$}h.push(g={value:u,dice:x1?l:1)},n})(et);function nt(){var e=at,a=!1,n=1,l=1,r=[0],o=O,h=O,d=O,g=O,c=O;function p(s){return s.x0=s.y0=0,s.x1=n,s.y1=l,s.eachBefore(b),r=[0],a&&s.eachBefore(Je),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,u=s.x1-x,y=s.y1-x;u{$e(r)&&(n?.textStyles?n.textStyles.push(r):n.textStyles=[r]),n?.styles?n.styles.push(r):n.styles=[r]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){Ae(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function oe(e){if(!e.length)return[];const a=[],n=[];return e.forEach(l=>{const r={name:l.name,children:l.type==="Leaf"?void 0:[]};for(r.classSelector=l?.classSelector,l?.cssCompiledStyles&&(r.cssCompiledStyles=l.cssCompiledStyles),l.type==="Leaf"&&l.value!==void 0&&(r.value=l.value);n.length>0&&n[n.length-1].level>=l.level;)n.pop();if(n.length===0)a.push(r);else{const o=n[n.length-1].node;o.children?o.children.push(r):o.children=[r]}l.type!=="Leaf"&&n.push({node:r,level:l.level})}),a}w(oe,"buildHierarchy");var lt=w((e,a)=>{me(e,a);const n=[];for(const o of e.TreemapRows??[])o.$type==="ClassDefStatement"&&a.addClass(o.className??"",o.styleText??"");for(const o of e.TreemapRows??[]){const h=o.item;if(!h)continue;const d=o.indent?parseInt(o.indent):0,g=rt(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],p=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:p};n.push(b)}const l=oe(n),r=w((o,h)=>{for(const d of o)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(l,0)},"populate"),rt=w(e=>e.name?String(e.name):"","getItemName"),ce={parser:{yy:void 0},parse:w(async e=>{try{const n=await Ne("treemap",e);ee.debug("Treemap AST:",n);const l=ce.parser?.yy;if(!(l instanceof ie))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");lt(n,l)}catch(a){throw ee.error("Error parsing treemap:",a),a}},"parse")},st=10,W=10,G=25,it=w((e,a,n,l)=>{const r=l.db,o=r.getConfig(),h=o.padding??st,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=te();if(!g)return;const p=d?30:0,b=ye(a),s=o.nodeWidth?o.nodeWidth*W:960,x=o.nodeHeight?o.nodeHeight*W:500,S=s,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),Se(b,v,S,o.useMaxWidth);let u;try{const t=o.valueFormat||",";if(t==="$0,0")u=w(i=>"$"+I(",")(i),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const i=/\.\d+/.exec(t),f=i?i[0]:"";u=w(C=>"$"+I(","+f)(C),"valueFormat")}else if(t.startsWith("$")){const i=t.substring(1);u=w(f=>"$"+I(i||"")(f),"valueFormat")}else u=I(t)}catch(t){ee.error("Error creating format function:",t),u=I(",")}const y=K().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=K().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),$=K().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),E=ae(g).sum(t=>t.value??0).sort((t,i)=>(i.value??0)-(t.value??0)),ne=nt().size([s,x]).paddingTop(t=>t.children&&t.children.length>0?G+W:0).paddingInner(h).paddingLeft(t=>t.children&&t.children.length>0?W:0).paddingRight(t=>t.children&&t.children.length>0?W:0).paddingBottom(t=>t.children&&t.children.length>0?W:0).round(!0)(E),he=ne.descendants().filter(t=>t.children&&t.children.length>0),R=V.selectAll(".treemapSection").data(he).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);R.append("rect").attr("width",t=>t.x1-t.x0).attr("height",G).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>t.depth===0?"display: none;":""),R.append("clipPath").attr("id",(t,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",G),R.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,i)=>`treemapSection section${i}`).attr("fill",t=>y(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>N(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const i=B({cssCompiledStyles:t.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),R.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",G/2).attr("dominant-baseline","middle").text(t=>t.depth===0?"":t.data.name).attr("font-weight","bold").attr("clip-path",(t,i)=>`url(#clip-section-${a}-${i})`).attr("style",t=>{if(t.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(t){if(t.depth===0)return;const i=j(this),f=t.data.name;i.text(f);const C=t.x1-t.x0,L=6;let T;o.showValues!==!1&&t.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),_=i.node();if(_.getComputedTextLength()>m){let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){i.text("..."),_.getComputedTextLength()>m&&i.text("");break}if(i.text(z+"..."),_.getComputedTextLength()<=m)break}}}),o.showValues!==!1&&R.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",G/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?u(t.value):"").attr("font-style","italic").attr("style",t=>{if(t.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const le=ne.leaves(),A=le.length>20,de=A?16:38,X=A?14:28,D=A?4:8,H=A?4:6,Z=A?2:4,re=A?8:10,J=A?1:2,Y=V.selectAll(".treemapLeafGroup").data(le).enter().append("g").attr("class",(t,i)=>`treemapNode treemapLeafGroup leaf${i}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);Y.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("style",t=>B({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("stroke-width",3),Y.append("clipPath").attr("id",(t,i)=>`clip-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),Y.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>{const i=`text-anchor: middle; dominant-baseline: middle; font-size: ${de}px;fill:`+$(t.data.name)+";",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,i)=>`url(#clip-${a}-${i})`).text(t=>t.data.name).each(function(t){const i=j(this),f=t.x1-t.x0,C=t.y1-t.y0,L=i.node(),T=f-2*Z,P=C-2*Z;if(TT&&m>D;)m--,i.style("font-size",`${m}px`);let F=Math.max(H,Math.min(X,Math.round(m*_))),k=m+J+F;for(;k>P&&m>D&&(m--,F=Math.max(H,Math.min(X,Math.round(m*_))),!(FT||m(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${X}px;fill:`+$(i.data.name)+";",C=B({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?u(i.value):"").each(function(i){const f=j(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=j(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(H,Math.min(X,Math.round(T*.6)));f.style("font-size",`${m}px`);const F=(i.y1-i.y0)/2+T/2+J;f.attr("y",F);const k=i.x1-i.x0,se=i.y1-i.y0-4,fe=k-2*Z;f.node().getComputedTextLength()>fe||F+m>se||m{const a=ge(),n=te(),l=Q(a,n.themeVariables),r=Q(ht,e),o=r.titleColor??l.titleColor,h=r.labelColor??l.textColor,d=r.valueColor??l.textColor;return` .treemapNode.section { stroke: ${r.sectionStrokeColor}; stroke-width: ${r.sectionStrokeWidth}; diff --git a/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-BSozxDpD.js b/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-CKxpc0Zm.js similarity index 93% rename from apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-BSozxDpD.js rename to apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-CKxpc0Zm.js index 08f190865..605600e48 100644 --- a/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-BSozxDpD.js +++ b/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-CKxpc0Zm.js @@ -1,4 +1,4 @@ -import{p as B}from"./chunk-JWPE2WC7-D24iyGyr.js";import{_ as b,B as u,F as $,e as C,l as m,b as S,a as D,o as T,p as z,g as F,s as P,z as E,D as A,q as W}from"./mermaid.core-DKNppTOJ.js";import{p as _}from"./cynefin-VYW2F7L2-D3UUATjS.js";import"./index-DusVyqlT.js";var N=A.packet,w=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=z,this.getAccDescription=F,this.setAccDescription=P}static{b(this,"PacketDB")}getConfig(){const t=u({...N,...E().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},L=1e4,M=b((t,e)=>{B(t,e);let r=-1,s=[],n=1;const{bitsPerRow:l}=e.getConfig();for(let{start:a,end:i,bits:d,label:c}of t.blocks){if(a!==void 0&&i!==void 0&&i{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const s=e*r-1,n=e*r;return[{start:t.start,end:s,label:t.label,bits:s-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:b(async t=>{const e=await _("packet",t),r=v.parser?.yy;if(!(r instanceof w))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");m.debug(e),M(e,r)},"parse")},I=b((t,e,r,s)=>{const n=s.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),o=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(o?0:a),k=d*c+2,f=$(e);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())O(f,y,x,l);f.append("text").text(o).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=b((t,e,r,{rowHeight:s,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=t.append("g"),p=r*(s+l)+l;for(const o of e){const h=o.start%i*a+1,g=(o.end-o.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!d)continue;const k=o.end===o.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=b(({packet:t}={})=>{const e=u(q,t);return` +import{p as B}from"./chunk-JWPE2WC7-TZtJmqSP.js";import{_ as b,B as u,F as $,e as C,l as m,b as S,a as D,o as T,p as z,g as F,s as P,z as E,D as A,q as W}from"./mermaid.core-B_UcP3X_.js";import{p as _}from"./cynefin-VYW2F7L2-BnQdr27u.js";import"./index-BOtIzGLC.js";var N=A.packet,w=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=z,this.getAccDescription=F,this.setAccDescription=P}static{b(this,"PacketDB")}getConfig(){const t=u({...N,...E().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},L=1e4,M=b((t,e)=>{B(t,e);let r=-1,s=[],n=1;const{bitsPerRow:l}=e.getConfig();for(let{start:a,end:i,bits:d,label:c}of t.blocks){if(a!==void 0&&i!==void 0&&i{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const s=e*r-1,n=e*r;return[{start:t.start,end:s,label:t.label,bits:s-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:b(async t=>{const e=await _("packet",t),r=v.parser?.yy;if(!(r instanceof w))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");m.debug(e),M(e,r)},"parse")},I=b((t,e,r,s)=>{const n=s.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),o=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(o?0:a),k=d*c+2,f=$(e);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())O(f,y,x,l);f.append("text").text(o).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=b((t,e,r,{rowHeight:s,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=t.append("g"),p=r*(s+l)+l;for(const o of e){const h=o.start%i*a+1,g=(o.end-o.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!d)continue;const k=o.end===o.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=b(({packet:t}={})=>{const e=u(q,t);return` .packetByte { font-size: ${e.byteFontSize}; } diff --git a/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-wQHl6g_d.js b/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-B5bqGU_R.js similarity index 96% rename from apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-wQHl6g_d.js rename to apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-B5bqGU_R.js index 40324f508..d822526c6 100644 --- a/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-wQHl6g_d.js +++ b/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-B5bqGU_R.js @@ -1,4 +1,4 @@ -import{I as X}from"./chunk-2Q5K7J3B-Df_GFe3n.js";import{p as O}from"./chunk-JWPE2WC7-D24iyGyr.js";import{o as G,b as Y,s as F,p as P,g as j,a as q,_ as f,B as A,l as D,F as Z,e as U,z as N,q as J,i as K,ai as Q,D as ee,aj as te}from"./mermaid.core-DKNppTOJ.js";import{p as ne}from"./cynefin-VYW2F7L2-D3UUATjS.js";import"./index-DusVyqlT.js";var E=/[─━│┃└┗├┣]/,S=/[└┗├┣]/,re=/[─━]/,V=/^[\s│┃]+$/,$=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,k=/^\s*%%/,ie=" ";function L(n){return n.some(e=>E.test(e))}f(L,"isBoxDrawingFormat");function _(n){for(const e of n){const t=S.exec(e);if(t?.index&&t.index>0)return t.index}return 4}f(_,"inferSegmentWidth");function M(n,e){return n.replace(/\bline\s+(\d+)\b/gi,(t,r)=>{const i=parseInt(r,10),a=e.get(i);return a?`line ${a}`:t})}f(M,"remapErrorLines");function R(n){const e=n.split(` +import{I as X}from"./chunk-2Q5K7J3B-CMIj8h4B.js";import{p as O}from"./chunk-JWPE2WC7-TZtJmqSP.js";import{o as G,b as Y,s as F,p as P,g as j,a as q,_ as f,B as A,l as D,F as Z,e as U,z as N,q as J,i as K,ai as Q,D as ee,aj as te}from"./mermaid.core-B_UcP3X_.js";import{p as ne}from"./cynefin-VYW2F7L2-BnQdr27u.js";import"./index-BOtIzGLC.js";var E=/[─━│┃└┗├┣]/,S=/[└┗├┣]/,re=/[─━]/,V=/^[\s│┃]+$/,$=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,k=/^\s*%%/,ie=" ";function L(n){return n.some(e=>E.test(e))}f(L,"isBoxDrawingFormat");function _(n){for(const e of n){const t=S.exec(e);if(t?.index&&t.index>0)return t.index}return 4}f(_,"inferSegmentWidth");function M(n,e){return n.replace(/\bline\s+(\d+)\b/gi,(t,r)=>{const i=parseInt(r,10),a=e.get(i);return a?`line ${a}`:t})}f(M,"remapErrorLines");function R(n){const e=n.split(` `),t=new Map;let r=-1;for(const[s,o]of e.entries())if(o.trim()==="treeView-beta"){r=s;break}if(r===-1)return{text:n,lineMap:t};const i=[];for(let s=r+1;s({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),oe=f(()=>{x.reset(),J()},"clear"),se=f(()=>x.records.stack[0],"getRoot"),ae=f(()=>x.records.cnt,"getCount"),ce=ee.treeView,le=f(()=>A(ce,N().treeView),"getConfig"),de=f((n,e,t,r,i,a)=>{for(;n<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();const c={id:x.records.cnt++,level:n,name:e,nodeType:t,icon:i,cssClass:r,description:a,children:[]};x.records.stack[x.records.stack.length-1].children.push(c),x.records.stack.push(c)},"addNode"),he={clear:oe,addNode:de,getRoot:se,getCount:ae,getConfig:le,getAccTitle:q,getAccDescription:j,getDiagramTitle:P,setAccDescription:F,setAccTitle:Y,setDiagramTitle:G},I=he,pe=f(n=>{O(n,I);for(const e of n.nodes){const t=typeof e.indent=="number"?e.indent:0;let r=e.name;const i=r.endsWith("/");i&&(r=r.slice(0,-1));const a=i?"directory":"file",c=e.classAnnotation||void 0,l=e.iconAnnotation,s=l!==void 0?l||"none":void 0,o=e.descAnnotation||void 0,h=o?K(o,N()):void 0;I.addNode(t,r,a,c,s,h)}},"populate"),fe={parse:f(async n=>{const{text:e,lineMap:t}=R(n);try{const r=await ne("treeView",e);D.debug(r),pe(r)}catch(r){throw t.size>0&&r instanceof Error&&(r.message=M(r.message,t)),r}},"parse")},b={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:''},file:{body:''}}};function z(n,e){const t=e?.filenameIcons?.[n];if(t)return t;const r=n.lastIndexOf(".");if(r>0){const i=n.substring(r).toLowerCase(),a=e?.extensionIcons;return a?.[i]??a?.[i.slice(1)]}}f(z,"detectIcon");function C(n,e){return n.includes(":")?n:n in b.icons||!e?`${b.prefix}:${n}`:`${e}:${n}`}f(C,"qualifyIcon");function B(n,e){if(n.icon!=="none"){if(n.icon)return C(n.icon,e.defaultIconPack);if(e.showIcons){if(n.nodeType==="file"){const t=z(n.name,e);if(t==="none")return;if(t)return C(t,e.defaultIconPack)}return`${b.prefix}:${n.nodeType==="directory"?"folder":"file"}`}}}f(B,"getNodeIcon");te([{name:b.prefix,icons:b}]);var y=14,ge=4,ue=16,H=f((n,e)=>`tv-icon-${n}-${e.replace(/[^\w-]/g,"-")}`,"iconSymbolId"),we=f(async(n,e,t,r)=>{const i=new Set,a=f(s=>{const o=B(s,t);o&&i.add(o),s.children.forEach(a)},"collect");if(a(e),i.size===0)return;const c=await Promise.all([...i].map(async s=>({icon:s,svg:await Q(s,{height:y,width:y})}))),l=n.append("defs");for(const{icon:s,svg:o}of c)l.append("g").attr("id",H(r,s)).html(o)},"injectIconDefs"),me=f((n,e,t,r,i,a)=>{const c=r.append("g");let l="treeView-node-label";t.nodeType==="directory"&&(l+=" treeView-node-dir"),t.cssClass&&(l+=` ${t.cssClass}`);const s=y+ge,o=B(t,i),h=o!==void 0;o&&c.append("use").attr("xlink:href",`#${H(a,o)}`).attr("x",n+i.paddingX).attr("y",e+i.paddingY).attr("class","treeView-node-icon");const p=c.append("text").text(t.name).attr("dominant-baseline","middle").attr("class",l),{height:d,width:w}=p.node().getBBox(),g=d+i.paddingY*2,m=n+i.paddingX+(h?s:0);p.attr("x",m),p.attr("y",e+g/2);const u=m+w,v=w+i.paddingX*2+(h?s:0);return t.BBox={x:n,y:e,width:v,height:g},t.cssClass?.split(/\s+/).includes("highlight")&&c.insert("rect",":first-child").attr("x",n).attr("y",e+1).attr("width",0).attr("height",g-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:t,nodeGroup:c,labelRightEdge:u,centerY:e+g/2}},"positionLabel"),T=f((n,e,t,r,i,a)=>n.append("line").attr("x1",e).attr("y1",t).attr("x2",r).attr("y2",i).attr("stroke-width",a).attr("class","treeView-node-line"),"positionLine"),xe=f((n,e,t,r)=>{let i=0,a=0;const c=[],l=f((h,p,d,w)=>{const g=w*(d.rowIndent+d.paddingX),m=me(g,i,p,h,d,r);c.push(m);const{height:u,width:v}=p.BBox;T(h,g-d.rowIndent,i+u/2,g,i+u/2,d.lineThickness),a=Math.max(a,g+v),i+=u},"drawNode"),s=f((h,p=0)=>{l(n,h,t,p),h.children.forEach(m=>{s(m,p+1)});const{x:d,y:w,height:g}=h.BBox;if(h.children.length){const{y:m,height:u}=h.children[h.children.length-1].BBox;T(n,d+t.paddingX,w+g,d+t.paddingX,m+u/2+t.lineThickness/2,t.lineThickness)}},"processNode");s(e);const o=c.filter(h=>h.node.description);if(o.length>0){const p=Math.max(...c.map(d=>d.labelRightEdge))+ue;for(const d of o){const g=d.nodeGroup.append("text").text(d.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",p).attr("y",d.centerY).node().getBBox();a=Math.max(a,p+g.width+t.paddingX)}}for(const h of c)if(h.node.cssClass?.split(/\s+/).includes("highlight")){const p=h.nodeGroup.select(".treeView-highlight-bg");if(!p.empty()){const d=a-h.node.BBox.x+8;p.attr("width",d),a=Math.max(a,h.node.BBox.x+d+2)}}return{totalHeight:i,totalWidth:a}},"drawTree"),ve=f(async(n,e,t,r)=>{D.debug(`Rendering treeView diagram `+n);const i=r.db,a=i.getRoot(),c=i.getConfig(),l=Z(e);await we(l,a,c,e);const s=l.append("g");s.attr("class","tree-view");const{totalHeight:o,totalWidth:h}=xe(s,a,c,e);l.attr("viewBox",`-${c.lineThickness/2} 0 ${h} ${o}`),U(l,o,h,c.useMaxWidth)},"draw"),be={draw:ve},Ie=be,Ce={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},ye=f(({treeView:n})=>{const{labelFontSize:e,labelColor:t,lineColor:r,iconColor:i,descriptionColor:a,highlightBg:c,highlightStroke:l}=A(Ce,n);return` diff --git a/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-Cr-V3eBB.js b/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-5zxq5HEQ.js similarity index 95% rename from apps/kimi-code/dist-web/assets/diagram-WEI45ONY-Cr-V3eBB.js rename to apps/kimi-code/dist-web/assets/diagram-WEI45ONY-5zxq5HEQ.js index ecfdfae40..8aa9f3ebb 100644 --- a/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-Cr-V3eBB.js +++ b/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-5zxq5HEQ.js @@ -1,4 +1,4 @@ -import{p as k}from"./chunk-JWPE2WC7-D24iyGyr.js";import{s as R,g as F,p as I,o as _,a as D,b as E,_ as c,F as z,q as P,B as y,z as C,D as G,l as B,W,e as V}from"./mermaid.core-DKNppTOJ.js";import{p as H}from"./cynefin-VYW2F7L2-D3UUATjS.js";import"./index-DusVyqlT.js";var m={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w={axes:[],curves:[],options:m},x=structuredClone(w),j=G.radar,q=c(()=>y({...j,...C().radar}),"getConfig"),b=c(()=>x.axes,"getAxes"),N=c(()=>x.curves,"getCurves"),U=c(()=>x.options,"getOptions"),X=c(a=>{x.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=c(a=>{x.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=c(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});x.options={showLegend:t.showLegend?.value??m.showLegend,ticks:t.ticks?.value??m.ticks,max:t.max?.value??m.max,min:t.min?.value??m.min,graticule:t.graticule?.value??m.graticule}},"setOptions"),K=c(()=>{P(),x=structuredClone(w)},"clear"),$={getAxes:b,getCurves:N,getOptions:U,setAxes:X,setCurves:Y,setOptions:J,getConfig:q,clear:K,setAccTitle:E,getAccTitle:D,setDiagramTitle:_,getDiagramTitle:I,getAccDescription:F,setAccDescription:R},Q=c(a=>{k(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),tt={parse:c(async a=>{const t=await H("radar",a);B.debug(t),Q(t)},"parse")},et=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=z(t),u=at(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;rt(u,i,v,n.ticks,n.graticule),st(u,i,v,o),A(u,i,l,h,g,n.graticule,o),T(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),at=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return V(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),rt=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),st=c((a,t,e,r)=>{const s=t.length;for(let i=0;i.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function A(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=M(g,r,s,o),S=f*Math.cos(v),O=f*Math.sin(v);return{x:S,y:O}});i==="circle"?a.append("path").attr("d",L(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(A,"drawCurves");function M(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(M,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s{const d=a.append("g").attr("transform",`translate(${s}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}c(T,"drawLegend");var nt={draw:et},ot=c((a,t)=>{let e="";for(let r=0;ry({...j,...C().radar}),"getConfig"),b=c(()=>x.axes,"getAxes"),N=c(()=>x.curves,"getCurves"),U=c(()=>x.options,"getOptions"),X=c(a=>{x.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=c(a=>{x.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=c(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});x.options={showLegend:t.showLegend?.value??m.showLegend,ticks:t.ticks?.value??m.ticks,max:t.max?.value??m.max,min:t.min?.value??m.min,graticule:t.graticule?.value??m.graticule}},"setOptions"),K=c(()=>{P(),x=structuredClone(w)},"clear"),$={getAxes:b,getCurves:N,getOptions:U,setAxes:X,setCurves:Y,setOptions:J,getConfig:q,clear:K,setAccTitle:E,getAccTitle:D,setDiagramTitle:_,getDiagramTitle:I,getAccDescription:F,setAccDescription:R},Q=c(a=>{k(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),tt={parse:c(async a=>{const t=await H("radar",a);B.debug(t),Q(t)},"parse")},et=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=z(t),u=at(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;rt(u,i,v,n.ticks,n.graticule),st(u,i,v,o),A(u,i,l,h,g,n.graticule,o),T(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),at=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return V(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),rt=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),st=c((a,t,e,r)=>{const s=t.length;for(let i=0;i.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function A(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=M(g,r,s,o),S=f*Math.cos(v),O=f*Math.sin(v);return{x:S,y:O}});i==="circle"?a.append("path").attr("d",L(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(A,"drawCurves");function M(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(M,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s{const d=a.append("g").attr("transform",`translate(${s}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}c(T,"drawLegend");var nt={draw:et},ot=c((a,t)=>{let e="";for(let r=0;r{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},R={parser:g,db:n,renderer:m,styles:l};export{R as diagram}; +import{g as l,r as m,d as n}from"./chunk-MOJQB5TN-m4Krf3Vn.js";import{p}from"./chunk-JWPE2WC7-TZtJmqSP.js";import{_ as t,l as o}from"./mermaid.core-B_UcP3X_.js";import{M as u,a as f}from"./cynefin-VYW2F7L2-BnQdr27u.js";import"./index-BOtIzGLC.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},R={parser:g,db:n,renderer:m,styles:l};export{R as diagram}; diff --git a/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-ma6YVYn1.js b/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-DE-pAoai.js similarity index 99% rename from apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-ma6YVYn1.js rename to apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-DE-pAoai.js index b6afbcb61..9de980b3b 100644 --- a/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-ma6YVYn1.js +++ b/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-DE-pAoai.js @@ -1,4 +1,4 @@ -import{g as Mt}from"./chunk-XXDRQBXY-DGdcv7YP.js";import{s as Bt}from"./chunk-VR4S4FIN-DN3fhyNm.js";import{_ as l,b as Ft,a as Yt,s as Pt,g as zt,o as Gt,p as Kt,c as it,l as V,q as Ut,r as Zt,t as jt,u as Wt,v as qt,x as Qt,d as Xt,y as Ht}from"./mermaid.core-DKNppTOJ.js";import{c as Jt}from"./channel-Dyw0qvA2.js";import"./index-DusVyqlT.js";var _t=(function(){var e=l(function(I,n,c,o){for(c=c||{},o=I.length;o--;c[I[o]]=n);return c},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],h=[1,10],a=[1,11],u=[1,12],d=[1,13],y=[1,23],f=[1,24],m=[1,25],j=[1,26],W=[1,27],S=[1,19],q=[1,28],M=[1,29],D=[1,20],R=[1,18],T=[1,21],C=[1,22],nt=[1,36],at=[1,37],ct=[1,38],ot=[1,39],lt=[1,40],B=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],O=[1,45],N=[1,46],F=[1,55],Y=[40,48,50,51,52,71,72],P=[1,66],z=[1,64],A=[1,61],G=[1,65],K=[1,67],Q=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],gt=[66,67,68,69,70],bt=[1,85],kt=[1,84],mt=[1,82],Et=[1,83],St=[6,10,42,47],L=[6,10,13,41,42,47,48,49],X=[1,93],H=[1,92],J=[1,91],U=[19,58],Tt=[1,102],Ot=[1,101],ht=[19,58,61,63],ut={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType:65,ZERO_OR_ONE:66,ZERO_OR_MORE:67,ONE_OR_MORE:68,ONLY_ONE:69,MD_PARENT:70,NON_IDENTIFYING:71,IDENTIFYING:72,WORD:73,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",59:"?",61:",",62:"ATTRIBUTE_KEY",63:"COMMENT",66:"ZERO_OR_ONE",67:"ZERO_OR_MORE",68:"ONE_OR_MORE",69:"ONLY_ONE",70:"MD_PARENT",71:"NON_IDENTIFYING",72:"IDENTIFYING",73:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:l(function(n,c,o,r,p,t,Z){var s=t.length-1;switch(p){case 1:break;case 2:this.$=[];break;case 3:t[s-1].push(t[s]),this.$=t[s-1];break;case 4:case 5:this.$=t[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[s-4]),r.addEntity(t[s-2]),r.addRelationship(t[s-4],t[s],t[s-2],t[s-3]);break;case 9:r.addEntity(t[s-8]),r.addEntity(t[s-4]),r.addRelationship(t[s-8],t[s],t[s-4],t[s-5]),r.setClass([t[s-8]],t[s-6]),r.setClass([t[s-4]],t[s-2]);break;case 10:r.addEntity(t[s-6]),r.addEntity(t[s-2]),r.addRelationship(t[s-6],t[s],t[s-2],t[s-3]),r.setClass([t[s-6]],t[s-4]);break;case 11:r.addEntity(t[s-6]),r.addEntity(t[s-4]),r.addRelationship(t[s-6],t[s],t[s-4],t[s-5]),r.setClass([t[s-4]],t[s-2]);break;case 12:r.addEntity(t[s-3]),r.addAttributes(t[s-3],t[s-1]);break;case 13:r.addEntity(t[s-5]),r.addAttributes(t[s-5],t[s-1]),r.setClass([t[s-5]],t[s-3]);break;case 14:r.addEntity(t[s-2]);break;case 15:r.addEntity(t[s-4]),r.setClass([t[s-4]],t[s-2]);break;case 16:r.addEntity(t[s]);break;case 17:r.addEntity(t[s-2]),r.setClass([t[s-2]],t[s]);break;case 18:r.addEntity(t[s-6],t[s-4]),r.addAttributes(t[s-6],t[s-1]);break;case 19:r.addEntity(t[s-8],t[s-6]),r.addAttributes(t[s-8],t[s-1]),r.setClass([t[s-8]],t[s-3]);break;case 20:r.addEntity(t[s-5],t[s-3]);break;case 21:r.addEntity(t[s-7],t[s-5]),r.setClass([t[s-7]],t[s-2]);break;case 22:r.addEntity(t[s-3],t[s-1]);break;case 23:r.addEntity(t[s-5],t[s-3]),r.setClass([t[s-5]],t[s]);break;case 24:case 25:this.$=t[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[s-3],r.addClass(t[s-2],t[s-1]);break;case 37:case 38:case 59:case 68:this.$=[t[s]];break;case 39:case 40:this.$=t[s-2].concat([t[s]]);break;case 41:this.$=t[s-2],r.setClass(t[s-1],t[s]);break;case 42:this.$=t[s-3],r.addCssStyles(t[s-2],t[s-1]);break;case 43:this.$=[t[s]];break;case 44:t[s-2].push(t[s]),this.$=t[s-2];break;case 46:this.$=t[s-1]+t[s];break;case 54:case 80:case 81:this.$=t[s].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 82:this.$=t[s];break;case 60:t[s].push(t[s-1]),this.$=t[s];break;case 61:this.$={type:t[s-1],name:t[s]};break;case 62:this.$={type:t[s-2],name:t[s-1],keys:t[s]};break;case 63:this.$={type:t[s-2],name:t[s-1],comment:t[s]};break;case 64:this.$={type:t[s-3],name:t[s-2],keys:t[s-1],comment:t[s]};break;case 65:case 67:case 70:this.$=t[s];break;case 66:this.$=t[s-1]+t[s];break;case 69:t[s-2].push(t[s]),this.$=t[s-2];break;case 71:this.$=t[s].replace(/"/g,"");break;case 72:this.$={cardA:t[s],relType:t[s-1],cardB:t[s-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:h,24:a,26:u,28:d,29:14,30:15,31:16,32:17,33:y,34:f,35:m,36:j,37:W,40:S,43:q,44:M,48:D,50:R,51:T,52:C},e(i,[2,7],{1:[2,1]}),e(i,[2,3]),{9:30,11:9,22:h,24:a,26:u,28:d,29:14,30:15,31:16,32:17,33:y,34:f,35:m,36:j,37:W,40:S,43:q,44:M,48:D,50:R,51:T,52:C},e(i,[2,5]),e(i,[2,6]),e(i,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:nt,67:at,68:ct,69:ot,70:lt}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(i,[2,27]),e(i,[2,28]),e(i,[2,29]),e(i,[2,30]),e(i,[2,31]),e(B,[2,54]),e(B,[2,55]),e(B,[2,56]),e(B,[2,57]),e(B,[2,58]),e(i,[2,32]),e(i,[2,33]),e(i,[2,34]),e(i,[2,35]),{16:44,40:O,41:N},{16:47,40:O,41:N},{16:48,40:O,41:N},e(i,[2,4]),{11:49,40:S,48:D,50:R,51:T,52:C},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:F},{11:56,40:S,48:D,50:R,51:T,52:C},{65:57,71:[1,58],72:[1,59]},e(Y,[2,73]),e(Y,[2,74]),e(Y,[2,75]),e(Y,[2,76]),e(Y,[2,77]),e(i,[2,24]),e(i,[2,25]),e(i,[2,26]),{13:P,38:60,41:z,42:A,45:62,46:63,48:G,49:K},e(Q,[2,37]),e(Q,[2,38]),{16:68,40:O,41:N,42:A},{13:P,38:69,41:z,42:A,45:62,46:63,48:G,49:K},{13:[1,70],15:[1,71]},e(i,[2,17],{64:35,12:72,17:[1,73],42:A,66:nt,67:at,68:ct,69:ot,70:lt}),{19:[1,74]},e(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:F},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:nt,67:at,68:ct,69:ot,70:lt},e(gt,[2,78]),e(gt,[2,79]),{6:bt,10:kt,39:81,42:mt,47:Et},{40:[1,86],41:[1,87]},e(St,[2,43],{46:88,13:P,41:z,48:G,49:K}),e(L,[2,45]),e(L,[2,50]),e(L,[2,51]),e(L,[2,52]),e(L,[2,53]),e(i,[2,41],{42:A}),{6:bt,10:kt,39:89,42:mt,47:Et},{14:90,40:X,50:H,73:J},{16:94,40:O,41:N},{11:95,40:S,48:D,50:R,51:T,52:C},{18:96,19:[1,97],53:53,54:54,58:F},e(i,[2,12]),{19:[2,60]},e(U,[2,61],{56:98,57:99,60:100,62:Tt,63:Ot}),e([19,58,62,63],[2,67]),{58:[2,66]},e(i,[2,22],{15:[1,104],17:[1,103]}),e([40,48,50,51,52],[2,72]),e(i,[2,36]),{13:P,41:z,45:105,46:63,48:G,49:K},e(i,[2,47]),e(i,[2,48]),e(i,[2,49]),e(Q,[2,39]),e(Q,[2,40]),e(L,[2,46]),e(i,[2,42]),e(i,[2,8]),e(i,[2,80]),e(i,[2,81]),e(i,[2,82]),{13:[1,106],42:A},{13:[1,108],15:[1,107]},{19:[1,109]},e(i,[2,15]),e(U,[2,62],{57:110,61:[1,111],63:Ot}),e(U,[2,63]),e(ht,[2,68]),e(U,[2,71]),e(ht,[2,70]),{18:112,19:[1,113],53:53,54:54,58:F},{16:114,40:O,41:N},e(St,[2,44],{46:88,13:P,41:z,48:G,49:K}),{14:115,40:X,50:H,73:J},{16:116,40:O,41:N},{14:117,40:X,50:H,73:J},e(i,[2,13]),e(U,[2,64]),{60:118,62:Tt},{19:[1,119]},e(i,[2,20]),e(i,[2,23],{17:[1,120],42:A}),e(i,[2,11]),{13:[1,121],42:A},e(i,[2,10]),e(ht,[2,69]),e(i,[2,18]),{18:122,19:[1,123],53:53,54:54,58:F},{14:124,40:X,50:H,73:J},{19:[1,125]},e(i,[2,21]),e(i,[2,9]),e(i,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:l(function(n,c){if(c.recoverable)this.trace(n);else{var o=new Error(n);throw o.hash=c,o}},"parseError"),parse:l(function(n){var c=this,o=[0],r=[],p=[null],t=[],Z=this.table,s="",tt=0,Nt=0,Dt=2,At=1,Lt=t.slice.call(arguments,1),_=Object.create(this.lexer),x={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(x.yy[dt]=this.yy[dt]);_.setInput(n,x.yy),x.yy.lexer=_,x.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var pt=_.yylloc;t.push(pt);var wt=_.options&&_.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Vt(b){o.length=o.length-2*b,p.length=p.length-b,t.length=t.length-b}l(Vt,"popStack");function It(){var b;return b=r.pop()||_.lex()||At,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=c.symbols_[b]||b),b}l(It,"lex");for(var g,v,k,ft,w={},et,E,Rt,st;;){if(v=o[o.length-1],this.defaultActions[v]?k=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=It()),k=Z[v]&&Z[v][g]),typeof k>"u"||!k.length||!k[0]){var yt="";st=[];for(et in Z[v])this.terminals_[et]&&et>Dt&&st.push("'"+this.terminals_[et]+"'");_.showPosition?yt="Parse error on line "+(tt+1)+`: +import{g as Mt}from"./chunk-XXDRQBXY-AHUPVB2f.js";import{s as Bt}from"./chunk-VR4S4FIN-CYEgbtU1.js";import{_ as l,b as Ft,a as Yt,s as Pt,g as zt,o as Gt,p as Kt,c as it,l as V,q as Ut,r as Zt,t as jt,u as Wt,v as qt,x as Qt,d as Xt,y as Ht}from"./mermaid.core-B_UcP3X_.js";import{c as Jt}from"./channel-Bw0eTBly.js";import"./index-BOtIzGLC.js";var _t=(function(){var e=l(function(I,n,c,o){for(c=c||{},o=I.length;o--;c[I[o]]=n);return c},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],h=[1,10],a=[1,11],u=[1,12],d=[1,13],y=[1,23],f=[1,24],m=[1,25],j=[1,26],W=[1,27],S=[1,19],q=[1,28],M=[1,29],D=[1,20],R=[1,18],T=[1,21],C=[1,22],nt=[1,36],at=[1,37],ct=[1,38],ot=[1,39],lt=[1,40],B=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],O=[1,45],N=[1,46],F=[1,55],Y=[40,48,50,51,52,71,72],P=[1,66],z=[1,64],A=[1,61],G=[1,65],K=[1,67],Q=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],gt=[66,67,68,69,70],bt=[1,85],kt=[1,84],mt=[1,82],Et=[1,83],St=[6,10,42,47],L=[6,10,13,41,42,47,48,49],X=[1,93],H=[1,92],J=[1,91],U=[19,58],Tt=[1,102],Ot=[1,101],ht=[19,58,61,63],ut={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType:65,ZERO_OR_ONE:66,ZERO_OR_MORE:67,ONE_OR_MORE:68,ONLY_ONE:69,MD_PARENT:70,NON_IDENTIFYING:71,IDENTIFYING:72,WORD:73,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",59:"?",61:",",62:"ATTRIBUTE_KEY",63:"COMMENT",66:"ZERO_OR_ONE",67:"ZERO_OR_MORE",68:"ONE_OR_MORE",69:"ONLY_ONE",70:"MD_PARENT",71:"NON_IDENTIFYING",72:"IDENTIFYING",73:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:l(function(n,c,o,r,p,t,Z){var s=t.length-1;switch(p){case 1:break;case 2:this.$=[];break;case 3:t[s-1].push(t[s]),this.$=t[s-1];break;case 4:case 5:this.$=t[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[s-4]),r.addEntity(t[s-2]),r.addRelationship(t[s-4],t[s],t[s-2],t[s-3]);break;case 9:r.addEntity(t[s-8]),r.addEntity(t[s-4]),r.addRelationship(t[s-8],t[s],t[s-4],t[s-5]),r.setClass([t[s-8]],t[s-6]),r.setClass([t[s-4]],t[s-2]);break;case 10:r.addEntity(t[s-6]),r.addEntity(t[s-2]),r.addRelationship(t[s-6],t[s],t[s-2],t[s-3]),r.setClass([t[s-6]],t[s-4]);break;case 11:r.addEntity(t[s-6]),r.addEntity(t[s-4]),r.addRelationship(t[s-6],t[s],t[s-4],t[s-5]),r.setClass([t[s-4]],t[s-2]);break;case 12:r.addEntity(t[s-3]),r.addAttributes(t[s-3],t[s-1]);break;case 13:r.addEntity(t[s-5]),r.addAttributes(t[s-5],t[s-1]),r.setClass([t[s-5]],t[s-3]);break;case 14:r.addEntity(t[s-2]);break;case 15:r.addEntity(t[s-4]),r.setClass([t[s-4]],t[s-2]);break;case 16:r.addEntity(t[s]);break;case 17:r.addEntity(t[s-2]),r.setClass([t[s-2]],t[s]);break;case 18:r.addEntity(t[s-6],t[s-4]),r.addAttributes(t[s-6],t[s-1]);break;case 19:r.addEntity(t[s-8],t[s-6]),r.addAttributes(t[s-8],t[s-1]),r.setClass([t[s-8]],t[s-3]);break;case 20:r.addEntity(t[s-5],t[s-3]);break;case 21:r.addEntity(t[s-7],t[s-5]),r.setClass([t[s-7]],t[s-2]);break;case 22:r.addEntity(t[s-3],t[s-1]);break;case 23:r.addEntity(t[s-5],t[s-3]),r.setClass([t[s-5]],t[s]);break;case 24:case 25:this.$=t[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[s-3],r.addClass(t[s-2],t[s-1]);break;case 37:case 38:case 59:case 68:this.$=[t[s]];break;case 39:case 40:this.$=t[s-2].concat([t[s]]);break;case 41:this.$=t[s-2],r.setClass(t[s-1],t[s]);break;case 42:this.$=t[s-3],r.addCssStyles(t[s-2],t[s-1]);break;case 43:this.$=[t[s]];break;case 44:t[s-2].push(t[s]),this.$=t[s-2];break;case 46:this.$=t[s-1]+t[s];break;case 54:case 80:case 81:this.$=t[s].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 82:this.$=t[s];break;case 60:t[s].push(t[s-1]),this.$=t[s];break;case 61:this.$={type:t[s-1],name:t[s]};break;case 62:this.$={type:t[s-2],name:t[s-1],keys:t[s]};break;case 63:this.$={type:t[s-2],name:t[s-1],comment:t[s]};break;case 64:this.$={type:t[s-3],name:t[s-2],keys:t[s-1],comment:t[s]};break;case 65:case 67:case 70:this.$=t[s];break;case 66:this.$=t[s-1]+t[s];break;case 69:t[s-2].push(t[s]),this.$=t[s-2];break;case 71:this.$=t[s].replace(/"/g,"");break;case 72:this.$={cardA:t[s],relType:t[s-1],cardB:t[s-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:h,24:a,26:u,28:d,29:14,30:15,31:16,32:17,33:y,34:f,35:m,36:j,37:W,40:S,43:q,44:M,48:D,50:R,51:T,52:C},e(i,[2,7],{1:[2,1]}),e(i,[2,3]),{9:30,11:9,22:h,24:a,26:u,28:d,29:14,30:15,31:16,32:17,33:y,34:f,35:m,36:j,37:W,40:S,43:q,44:M,48:D,50:R,51:T,52:C},e(i,[2,5]),e(i,[2,6]),e(i,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:nt,67:at,68:ct,69:ot,70:lt}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(i,[2,27]),e(i,[2,28]),e(i,[2,29]),e(i,[2,30]),e(i,[2,31]),e(B,[2,54]),e(B,[2,55]),e(B,[2,56]),e(B,[2,57]),e(B,[2,58]),e(i,[2,32]),e(i,[2,33]),e(i,[2,34]),e(i,[2,35]),{16:44,40:O,41:N},{16:47,40:O,41:N},{16:48,40:O,41:N},e(i,[2,4]),{11:49,40:S,48:D,50:R,51:T,52:C},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:F},{11:56,40:S,48:D,50:R,51:T,52:C},{65:57,71:[1,58],72:[1,59]},e(Y,[2,73]),e(Y,[2,74]),e(Y,[2,75]),e(Y,[2,76]),e(Y,[2,77]),e(i,[2,24]),e(i,[2,25]),e(i,[2,26]),{13:P,38:60,41:z,42:A,45:62,46:63,48:G,49:K},e(Q,[2,37]),e(Q,[2,38]),{16:68,40:O,41:N,42:A},{13:P,38:69,41:z,42:A,45:62,46:63,48:G,49:K},{13:[1,70],15:[1,71]},e(i,[2,17],{64:35,12:72,17:[1,73],42:A,66:nt,67:at,68:ct,69:ot,70:lt}),{19:[1,74]},e(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:F},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:nt,67:at,68:ct,69:ot,70:lt},e(gt,[2,78]),e(gt,[2,79]),{6:bt,10:kt,39:81,42:mt,47:Et},{40:[1,86],41:[1,87]},e(St,[2,43],{46:88,13:P,41:z,48:G,49:K}),e(L,[2,45]),e(L,[2,50]),e(L,[2,51]),e(L,[2,52]),e(L,[2,53]),e(i,[2,41],{42:A}),{6:bt,10:kt,39:89,42:mt,47:Et},{14:90,40:X,50:H,73:J},{16:94,40:O,41:N},{11:95,40:S,48:D,50:R,51:T,52:C},{18:96,19:[1,97],53:53,54:54,58:F},e(i,[2,12]),{19:[2,60]},e(U,[2,61],{56:98,57:99,60:100,62:Tt,63:Ot}),e([19,58,62,63],[2,67]),{58:[2,66]},e(i,[2,22],{15:[1,104],17:[1,103]}),e([40,48,50,51,52],[2,72]),e(i,[2,36]),{13:P,41:z,45:105,46:63,48:G,49:K},e(i,[2,47]),e(i,[2,48]),e(i,[2,49]),e(Q,[2,39]),e(Q,[2,40]),e(L,[2,46]),e(i,[2,42]),e(i,[2,8]),e(i,[2,80]),e(i,[2,81]),e(i,[2,82]),{13:[1,106],42:A},{13:[1,108],15:[1,107]},{19:[1,109]},e(i,[2,15]),e(U,[2,62],{57:110,61:[1,111],63:Ot}),e(U,[2,63]),e(ht,[2,68]),e(U,[2,71]),e(ht,[2,70]),{18:112,19:[1,113],53:53,54:54,58:F},{16:114,40:O,41:N},e(St,[2,44],{46:88,13:P,41:z,48:G,49:K}),{14:115,40:X,50:H,73:J},{16:116,40:O,41:N},{14:117,40:X,50:H,73:J},e(i,[2,13]),e(U,[2,64]),{60:118,62:Tt},{19:[1,119]},e(i,[2,20]),e(i,[2,23],{17:[1,120],42:A}),e(i,[2,11]),{13:[1,121],42:A},e(i,[2,10]),e(ht,[2,69]),e(i,[2,18]),{18:122,19:[1,123],53:53,54:54,58:F},{14:124,40:X,50:H,73:J},{19:[1,125]},e(i,[2,21]),e(i,[2,9]),e(i,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:l(function(n,c){if(c.recoverable)this.trace(n);else{var o=new Error(n);throw o.hash=c,o}},"parseError"),parse:l(function(n){var c=this,o=[0],r=[],p=[null],t=[],Z=this.table,s="",tt=0,Nt=0,Dt=2,At=1,Lt=t.slice.call(arguments,1),_=Object.create(this.lexer),x={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(x.yy[dt]=this.yy[dt]);_.setInput(n,x.yy),x.yy.lexer=_,x.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var pt=_.yylloc;t.push(pt);var wt=_.options&&_.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Vt(b){o.length=o.length-2*b,p.length=p.length-b,t.length=t.length-b}l(Vt,"popStack");function It(){var b;return b=r.pop()||_.lex()||At,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=c.symbols_[b]||b),b}l(It,"lex");for(var g,v,k,ft,w={},et,E,Rt,st;;){if(v=o[o.length-1],this.defaultActions[v]?k=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=It()),k=Z[v]&&Z[v][g]),typeof k>"u"||!k.length||!k[0]){var yt="";st=[];for(et in Z[v])this.terminals_[et]&&et>Dt&&st.push("'"+this.terminals_[et]+"'");_.showPosition?yt="Parse error on line "+(tt+1)+`: `+_.showPosition()+` Expecting `+st.join(", ")+", got '"+(this.terminals_[g]||g)+"'":yt="Parse error on line "+(tt+1)+": Unexpected "+(g==At?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(yt,{text:_.match,token:this.terminals_[g]||g,line:_.yylineno,loc:pt,expected:st})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+g);switch(k[0]){case 1:o.push(g),p.push(_.yytext),t.push(_.yylloc),o.push(k[1]),g=null,Nt=_.yyleng,s=_.yytext,tt=_.yylineno,pt=_.yylloc;break;case 2:if(E=this.productions_[k[1]][1],w.$=p[p.length-E],w._$={first_line:t[t.length-(E||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(E||1)].first_column,last_column:t[t.length-1].last_column},wt&&(w._$.range=[t[t.length-(E||1)].range[0],t[t.length-1].range[1]]),ft=this.performAction.apply(w,[s,Nt,tt,x.yy,k[1],p,t].concat(Lt)),typeof ft<"u")return ft;E&&(o=o.slice(0,-1*E*2),p=p.slice(0,-1*E),t=t.slice(0,-1*E)),o.push(this.productions_[k[1]][0]),p.push(w.$),t.push(w._$),Rt=Z[o[o.length-2]][o[o.length-1]],o.push(Rt);break;case 3:return!0}}return!0},"parse")},vt=(function(){var I={EOF:1,parseError:l(function(c,o){if(this.yy.parser)this.yy.parser.parseError(c,o);else throw new Error(c)},"parseError"),setInput:l(function(n,c){return this.yy=c||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var c=n.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:l(function(n){var c=n.length,o=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===r.length?this.yylloc.first_column:0)+r[r.length-o.length].length-o[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(n){this.unput(this.match.slice(n))},"less"),pastInput:l(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var n=this.pastInput(),c=new Array(n.length+1).join("-");return n+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-BMN1wm6S.js b/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-DuNG8YS2.js similarity index 99% rename from apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-BMN1wm6S.js rename to apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-DuNG8YS2.js index d80746af9..64272f5fb 100644 --- a/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-BMN1wm6S.js +++ b/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-DuNG8YS2.js @@ -1,4 +1,4 @@ -import{g as He}from"./chunk-5VM5RSS4-CUvXVaNK.js";import{g as Xe}from"./chunk-XXDRQBXY-DGdcv7YP.js";import{s as Qe}from"./chunk-VR4S4FIN-DN3fhyNm.js";import{_ as b,b6 as Ze,X as Oe,l as Z,c as g1,v as Je,x as $e,y as ie,b as et,s as tt,o as st,a as it,g as rt,p as at,k as nt,Y as ut,Z as ot,bp as lt,r as te,d as se,a5 as ct,q as ht,b9 as dt,t as pt}from"./mermaid.core-DKNppTOJ.js";import{f as ft}from"./chunk-32BRIVSS-BPgqH-Ub.js";import{c as gt}from"./channel-Dyw0qvA2.js";var bt="flowchart-",At=class{constructor(){this.vertexCounter=0,this.config=g1(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=et,this.setAccDescription=tt,this.setDiagramTitle=st,this.getAccTitle=it,this.getAccDescription=rt,this.getDiagramTitle=at,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{b(this,"FlowDB")}sanitizeText(e){return nt.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(const i of this.vertices.values())if(i.id===e)return this.diagramId?`${this.diagramId}-${i.domId}`:i.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,i,r,a,o,d,l={},A){if(!e||e.trim().length===0)return;let n;if(A!==void 0){let k;A.includes(` +import{g as He}from"./chunk-5VM5RSS4-DxIYPYOn.js";import{g as Xe}from"./chunk-XXDRQBXY-AHUPVB2f.js";import{s as Qe}from"./chunk-VR4S4FIN-CYEgbtU1.js";import{_ as b,b6 as Ze,X as Oe,l as Z,c as g1,v as Je,x as $e,y as ie,b as et,s as tt,o as st,a as it,g as rt,p as at,k as nt,Y as ut,Z as ot,bp as lt,r as te,d as se,a5 as ct,q as ht,b9 as dt,t as pt}from"./mermaid.core-B_UcP3X_.js";import{f as ft}from"./chunk-32BRIVSS-D_mpvupa.js";import{c as gt}from"./channel-Bw0eTBly.js";var bt="flowchart-",At=class{constructor(){this.vertexCounter=0,this.config=g1(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=et,this.setAccDescription=tt,this.setDiagramTitle=st,this.getAccTitle=it,this.getAccDescription=rt,this.getDiagramTitle=at,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{b(this,"FlowDB")}sanitizeText(e){return nt.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(const i of this.vertices.values())if(i.id===e)return this.diagramId?`${this.diagramId}-${i.domId}`:i.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,i,r,a,o,d,l={},A){if(!e||e.trim().length===0)return;let n;if(A!==void 0){let k;A.includes(` `)?k=A+` `:k=`{ `+A+` diff --git a/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-ZiopqOWU.js b/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-Dz61VBiM.js similarity index 99% rename from apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-ZiopqOWU.js rename to apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-Dz61VBiM.js index dfa52d95f..e006143d6 100644 --- a/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-ZiopqOWU.js +++ b/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-Dz61VBiM.js @@ -1,4 +1,4 @@ -import{bh as on,bi as On,bj as cn,bk as un,bl as ln,bm as ue,bn as Hn,b7 as oe,g as Nn,s as Pn,p as Vn,o as Rn,a as zn,b as qn,_ as d,c as Yt,d as Zt,e as Bn,bo as it,l as Tt,k as Zn,j as Xn,q as Gn,y as jn}from"./mermaid.core-DKNppTOJ.js";import{b as Qn,t as Ne,c as Jn,a as Kn,l as tr}from"./linear-1b2KM_9_.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-DusVyqlT.js";import"./defaultLocale-DX6XiGOO.js";function nr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function rr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ir(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function sr(t){return"translate("+t+",0)"}function ar(t){return"translate(0,"+t+")"}function or(t){return e=>+t(e)}function cr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ur(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===Gt||t===Xt?-1:1,w=t===Xt||t===le?"x":"y",P=t===Gt||t===xe?sr:ar;function _(Y){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),B=i??(e.tickFormat?e.tickFormat.apply(e,n):ir),v=Math.max(s,0)+y,U=e.range(),R=+U[0]+F,E=+U[U.length-1]+F,z=(e.bandwidth?cr:or)(e.copy(),F),G=Y.selection?Y.selection():Y,T=G.selectAll(".domain").data([null]),k=G.selectAll(".tick").data(X,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),Y!==G&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",Pe).attr("transform",function(M){return isFinite(M=z(M))?P(M+F):this.getAttribute("transform")}),L.attr("opacity",Pe).attr("transform",function(M){var D=this.parentNode.__axis;return P((D&&isFinite(D=D(M))?D:z(M))+F)})),p.remove(),T.attr("d",t===Xt||t===le?a?"M"+S*a+","+R+"H"+F+"V"+E+"H"+S*a:"M"+F+","+R+"V"+E:a?"M"+R+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+R+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return P(z(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(B),G.filter(ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),G.each(function(){this.__axis=z})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function lr(t){return fn(Gt,t)}function fr(t){return fn(xe,t)}const dr=Math.PI/180,hr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,mr=Ft*Ft*Ft;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=On(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),s,a;return e===n&&n===r?s=a=i:(s=fe((.4360747*e+.3850649*n+.1430804*r)/dn),a=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function gr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,gr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>mr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Ft?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(t)),t.a===0&&t.b===0)return new ht(NaN,0(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(Snt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ge.setTime(+s),ye.setTime(+a),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Ve=yt*30,ke=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const Tr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());Tr.range;const Pt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Pt.range;const xr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());xr.range;const xt=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const br=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));br.range;function Dt(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Se)}const zt=Dt(0),Vt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);zt.range;Vt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return nt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Se)}const wn=Mt(0),re=Mt(1),wr=Mt(2),Dr=Mt(3),It=Mt(4),Mr=Mt(5),Cr=Mt(6);wn.range;re.range;wr.range;Dr.range;It.range;Mr.range;Cr.range;const Rt=nt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Rt.range;const Sr=nt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Sr.range;const kt=nt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=nt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function _r(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Ve],[e,3,3*Ve],[t,1,ke]];function y(S,w,P){const _=wv).right(a,_);if(Y===a.length)return t.every(Ne(S/ke,w/ke,P));if(Y===0)return Et.every(Math.max(Ne(S,w,P),1));const[X,B]=a[_/a[Y-1][2]53)return null;"w"in f||(f.w=1),"Z"in f?(A=ve($t(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?re.ceil(A):re(A),A=_e.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=pe($t(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Vt.ceil(A):Vt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ve($t(f.y,0,1)).getUTCDay():pe($t(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ve(f)):pe(f)}}function p(h,N,V,f){for(var tt=0,A=N.length,Q=V.length,Z,st;tt=Q)return-1;if(Z=N.charCodeAt(tt++),Z===37){if(Z=N.charAt(tt++),st=G[Z in Re?N.charAt(tt++):Z],!st||(f=st(h,V,f))<0)return-1}else if(Z!=V.charCodeAt(f++))return-1}return f}function L(h,N,V){var f=S.exec(N.slice(V));return f?(h.p=w.get(f[0].toLowerCase()),V+f[0].length):-1}function x(h,N,V){var f=Y.exec(N.slice(V));return f?(h.w=X.get(f[0].toLowerCase()),V+f[0].length):-1}function C(h,N,V){var f=P.exec(N.slice(V));return f?(h.w=_.get(f[0].toLowerCase()),V+f[0].length):-1}function M(h,N,V){var f=U.exec(N.slice(V));return f?(h.m=R.get(f[0].toLowerCase()),V+f[0].length):-1}function D(h,N,V){var f=B.exec(N.slice(V));return f?(h.m=v.get(f[0].toLowerCase()),V+f[0].length):-1}function c(h,N,V){return p(h,e,N,V)}function g(h,N,V){return p(h,n,N,V)}function b(h,N,V){return p(h,r,N,V)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function $(h){return s[h.getUTCDay()]}function O(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",z);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Re={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Er=/^%/,Ir=/[\\^$*+?|[\]().{}]/g;function q(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s[e.toLowerCase(),n]))}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Pr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Be(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ze(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xr(t,e,n){var r=Er.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return q(t.getDate(),e,2)}function Qr(t,e){return q(t.getHours(),e,2)}function Jr(t,e){return q(t.getHours()%12||12,e,2)}function Kr(t,e){return q(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return q(t.getMilliseconds(),e,3)}function ti(t,e){return Dn(t,e)+"000"}function ei(t,e){return q(t.getMonth()+1,e,2)}function ni(t,e){return q(t.getMinutes(),e,2)}function ri(t,e){return q(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return e===0?7:e}function si(t,e){return q(zt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function ai(t,e){return t=Mn(t),q(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function oi(t){return t.getDay()}function ci(t,e){return q(Vt.count(kt(t)-1,t),e,2)}function ui(t,e){return q(t.getFullYear()%100,e,2)}function li(t,e){return t=Mn(t),q(t.getFullYear()%100,e,2)}function fi(t,e){return q(t.getFullYear()%1e4,e,4)}function di(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),q(t.getFullYear()%1e4,e,4)}function hi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Ge(t,e){return q(t.getUTCDate(),e,2)}function mi(t,e){return q(t.getUTCHours(),e,2)}function gi(t,e){return q(t.getUTCHours()%12||12,e,2)}function yi(t,e){return q(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return q(t.getUTCMilliseconds(),e,3)}function ki(t,e){return Cn(t,e)+"000"}function pi(t,e){return q(t.getUTCMonth()+1,e,2)}function vi(t,e){return q(t.getUTCMinutes(),e,2)}function Ti(t,e){return q(t.getUTCSeconds(),e,2)}function xi(t){var e=t.getUTCDay();return e===0?7:e}function bi(t,e){return q(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function wi(t,e){return t=Sn(t),q(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function Di(t){return t.getUTCDay()}function Mi(t,e){return q(re.count(wt(t)-1,t),e,2)}function Ci(t,e){return q(t.getUTCFullYear()%100,e,2)}function Si(t,e){return t=Sn(t),q(t.getUTCFullYear()%100,e,2)}function _i(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function Yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),q(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Ui({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ui(t){return St=Ur(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ei(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,s,a,y,F,S){var w=Jn(),P=w.invert,_=w.domain,Y=S(".%L"),X=S(":%S"),B=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),R=S("%b %d"),E=S("%B"),z=S("%Y");function G(T){return(F(T)4&&(Y+=7),_.add(Y,n));return X.diff(B,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}}))})(jt)),jt.exports}var $i=Wi();const Oi=oe($i);var Qt={exports:{}},Hi=Qt.exports,tn;function Ni(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Hi,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(U){if(!U||U==="Z")return 0;var R=U.match(/([+-]|\d\d)/g),E=60*R[1]+(+R[2]||0);return E===0?0:R[0]==="+"?-E:E})(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var R,E=F.meridiem;if(E){for(var z=1;z<=24;z+=1)if(v.indexOf(E(z,0,U))>-1){R=z>12;break}}else R=v===(U?"pm":"PM");return R},X={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,R=v.match(/\d+/);if(this.day=R[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),R=(_("monthsShort")||U.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function B(v){var U,R;U=v,R=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,C,M){var D=M&&M.toUpperCase();return C||R[M]||n[M]||R[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(c,g,b){return g||b.slice(1)}))}))).match(r),z=E.length,G=0;G-1)return new Date((I==="X"?1e3:1)*m);var u=B(I)(m),K=u.year,l=u.month,$=u.day,O=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,V=new Date,f=$||(K||l?1:V.getDate()),tt=K||V.getFullYear(),A=0;K&&!l||(A=l>0?l-1:V.getMonth());var Q,Z=O||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,Z,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,Z,st,at,pt)):(Q=new Date(tt,A,f,Z,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}})(T,L,k,R),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=R.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else z.call(this,G)}}}))})(Qt)),Qt.exports}var Pi=Ni();const Vi=oe(Pi);var Jt={exports:{}},Ri=Jt.exports,en;function zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),P==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),P==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return P}}));return s.bind(this)(w)}}}))})(Jt)),Jt.exports}var qi=zi();const Bi=oe(qi);var Kt={exports:{}},Zi=Kt.exports,nn;function Xi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Zi,(function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=31536e6,S=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof z},X=function(T,k,p){return new z(T,p,k.$l)},B=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},R=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+R(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},z=(function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return X(p*_[B(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach((function(c){C.$d[B(c)]=p[c]})),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map((function(c){return c!=null?Number(c):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce((function(L,x){return L+(p.$d[x]||0)*_[x]}),0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return L.replace(P,(function(C,M){return M||String(x[C])}))},k.as=function(p){return this.$ms/_[B(p)]},k.get=function(p){var L=this.$ms,x=B(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[B(L)]:Y(p)?p.$ms:X(p,this).$ms,X(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return X(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T})(),G=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return X(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?G(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?G(this,C,-1):x.bind(this)(C,M)}}}))})(Kt)),Kt.exports}var Gi=Xi();const ji=oe(Gi);var we=(function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],P=[1,9],_=[1,10],Y=[1,11],X=[1,12],B=[1,13],v=[1,14],U=[1,15],R=[1,16],E=[1,19],z=[1,20],G=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,$=2,O=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var V=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||O,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,Z,st,at={},pt,ut,He,Bt;;){if(Q=b[b.length-1],this.defaultActions[Q]?Z=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),Z=W[Q]&&W[Q][A]),typeof Z>"u"||!Z.length||!Z[0]){var ce="";Bt=[];for(pt in W[Q])this.terminals_[pt]&&pt>$&&Bt.push("'"+this.terminals_[pt]+"'");H.showPosition?ce="Parse error on line "+(K+1)+`: +import{bh as on,bi as On,bj as cn,bk as un,bl as ln,bm as ue,bn as Hn,b7 as oe,g as Nn,s as Pn,p as Vn,o as Rn,a as zn,b as qn,_ as d,c as Yt,d as Zt,e as Bn,bo as it,l as Tt,k as Zn,j as Xn,q as Gn,y as jn}from"./mermaid.core-B_UcP3X_.js";import{b as Qn,t as Ne,c as Jn,a as Kn,l as tr}from"./linear-Vyz-NdPh.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-BOtIzGLC.js";import"./defaultLocale-DX6XiGOO.js";function nr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function rr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ir(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function sr(t){return"translate("+t+",0)"}function ar(t){return"translate(0,"+t+")"}function or(t){return e=>+t(e)}function cr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ur(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===Gt||t===Xt?-1:1,w=t===Xt||t===le?"x":"y",P=t===Gt||t===xe?sr:ar;function _(Y){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),B=i??(e.tickFormat?e.tickFormat.apply(e,n):ir),v=Math.max(s,0)+y,U=e.range(),R=+U[0]+F,E=+U[U.length-1]+F,z=(e.bandwidth?cr:or)(e.copy(),F),G=Y.selection?Y.selection():Y,T=G.selectAll(".domain").data([null]),k=G.selectAll(".tick").data(X,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),Y!==G&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",Pe).attr("transform",function(M){return isFinite(M=z(M))?P(M+F):this.getAttribute("transform")}),L.attr("opacity",Pe).attr("transform",function(M){var D=this.parentNode.__axis;return P((D&&isFinite(D=D(M))?D:z(M))+F)})),p.remove(),T.attr("d",t===Xt||t===le?a?"M"+S*a+","+R+"H"+F+"V"+E+"H"+S*a:"M"+F+","+R+"V"+E:a?"M"+R+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+R+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return P(z(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(B),G.filter(ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),G.each(function(){this.__axis=z})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function lr(t){return fn(Gt,t)}function fr(t){return fn(xe,t)}const dr=Math.PI/180,hr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,mr=Ft*Ft*Ft;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=On(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),s,a;return e===n&&n===r?s=a=i:(s=fe((.4360747*e+.3850649*n+.1430804*r)/dn),a=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function gr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,gr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>mr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Ft?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(t)),t.a===0&&t.b===0)return new ht(NaN,0(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(Snt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ge.setTime(+s),ye.setTime(+a),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Ve=yt*30,ke=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const Tr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());Tr.range;const Pt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Pt.range;const xr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());xr.range;const xt=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const br=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));br.range;function Dt(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Se)}const zt=Dt(0),Vt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);zt.range;Vt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return nt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Se)}const wn=Mt(0),re=Mt(1),wr=Mt(2),Dr=Mt(3),It=Mt(4),Mr=Mt(5),Cr=Mt(6);wn.range;re.range;wr.range;Dr.range;It.range;Mr.range;Cr.range;const Rt=nt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Rt.range;const Sr=nt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Sr.range;const kt=nt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=nt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function _r(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Ve],[e,3,3*Ve],[t,1,ke]];function y(S,w,P){const _=wv).right(a,_);if(Y===a.length)return t.every(Ne(S/ke,w/ke,P));if(Y===0)return Et.every(Math.max(Ne(S,w,P),1));const[X,B]=a[_/a[Y-1][2]53)return null;"w"in f||(f.w=1),"Z"in f?(A=ve($t(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?re.ceil(A):re(A),A=_e.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=pe($t(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Vt.ceil(A):Vt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ve($t(f.y,0,1)).getUTCDay():pe($t(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ve(f)):pe(f)}}function p(h,N,V,f){for(var tt=0,A=N.length,Q=V.length,Z,st;tt=Q)return-1;if(Z=N.charCodeAt(tt++),Z===37){if(Z=N.charAt(tt++),st=G[Z in Re?N.charAt(tt++):Z],!st||(f=st(h,V,f))<0)return-1}else if(Z!=V.charCodeAt(f++))return-1}return f}function L(h,N,V){var f=S.exec(N.slice(V));return f?(h.p=w.get(f[0].toLowerCase()),V+f[0].length):-1}function x(h,N,V){var f=Y.exec(N.slice(V));return f?(h.w=X.get(f[0].toLowerCase()),V+f[0].length):-1}function C(h,N,V){var f=P.exec(N.slice(V));return f?(h.w=_.get(f[0].toLowerCase()),V+f[0].length):-1}function M(h,N,V){var f=U.exec(N.slice(V));return f?(h.m=R.get(f[0].toLowerCase()),V+f[0].length):-1}function D(h,N,V){var f=B.exec(N.slice(V));return f?(h.m=v.get(f[0].toLowerCase()),V+f[0].length):-1}function c(h,N,V){return p(h,e,N,V)}function g(h,N,V){return p(h,n,N,V)}function b(h,N,V){return p(h,r,N,V)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function $(h){return s[h.getUTCDay()]}function O(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",z);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Re={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Er=/^%/,Ir=/[\\^$*+?|[\]().{}]/g;function q(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s[e.toLowerCase(),n]))}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Pr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Be(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ze(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xr(t,e,n){var r=Er.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return q(t.getDate(),e,2)}function Qr(t,e){return q(t.getHours(),e,2)}function Jr(t,e){return q(t.getHours()%12||12,e,2)}function Kr(t,e){return q(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return q(t.getMilliseconds(),e,3)}function ti(t,e){return Dn(t,e)+"000"}function ei(t,e){return q(t.getMonth()+1,e,2)}function ni(t,e){return q(t.getMinutes(),e,2)}function ri(t,e){return q(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return e===0?7:e}function si(t,e){return q(zt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function ai(t,e){return t=Mn(t),q(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function oi(t){return t.getDay()}function ci(t,e){return q(Vt.count(kt(t)-1,t),e,2)}function ui(t,e){return q(t.getFullYear()%100,e,2)}function li(t,e){return t=Mn(t),q(t.getFullYear()%100,e,2)}function fi(t,e){return q(t.getFullYear()%1e4,e,4)}function di(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),q(t.getFullYear()%1e4,e,4)}function hi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Ge(t,e){return q(t.getUTCDate(),e,2)}function mi(t,e){return q(t.getUTCHours(),e,2)}function gi(t,e){return q(t.getUTCHours()%12||12,e,2)}function yi(t,e){return q(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return q(t.getUTCMilliseconds(),e,3)}function ki(t,e){return Cn(t,e)+"000"}function pi(t,e){return q(t.getUTCMonth()+1,e,2)}function vi(t,e){return q(t.getUTCMinutes(),e,2)}function Ti(t,e){return q(t.getUTCSeconds(),e,2)}function xi(t){var e=t.getUTCDay();return e===0?7:e}function bi(t,e){return q(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function wi(t,e){return t=Sn(t),q(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function Di(t){return t.getUTCDay()}function Mi(t,e){return q(re.count(wt(t)-1,t),e,2)}function Ci(t,e){return q(t.getUTCFullYear()%100,e,2)}function Si(t,e){return t=Sn(t),q(t.getUTCFullYear()%100,e,2)}function _i(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function Yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),q(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Ui({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ui(t){return St=Ur(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ei(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,s,a,y,F,S){var w=Jn(),P=w.invert,_=w.domain,Y=S(".%L"),X=S(":%S"),B=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),R=S("%b %d"),E=S("%B"),z=S("%Y");function G(T){return(F(T)4&&(Y+=7),_.add(Y,n));return X.diff(B,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}}))})(jt)),jt.exports}var $i=Wi();const Oi=oe($i);var Qt={exports:{}},Hi=Qt.exports,tn;function Ni(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Hi,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(U){if(!U||U==="Z")return 0;var R=U.match(/([+-]|\d\d)/g),E=60*R[1]+(+R[2]||0);return E===0?0:R[0]==="+"?-E:E})(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var R,E=F.meridiem;if(E){for(var z=1;z<=24;z+=1)if(v.indexOf(E(z,0,U))>-1){R=z>12;break}}else R=v===(U?"pm":"PM");return R},X={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,R=v.match(/\d+/);if(this.day=R[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),R=(_("monthsShort")||U.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function B(v){var U,R;U=v,R=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,C,M){var D=M&&M.toUpperCase();return C||R[M]||n[M]||R[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(c,g,b){return g||b.slice(1)}))}))).match(r),z=E.length,G=0;G-1)return new Date((I==="X"?1e3:1)*m);var u=B(I)(m),K=u.year,l=u.month,$=u.day,O=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,V=new Date,f=$||(K||l?1:V.getDate()),tt=K||V.getFullYear(),A=0;K&&!l||(A=l>0?l-1:V.getMonth());var Q,Z=O||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,Z,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,Z,st,at,pt)):(Q=new Date(tt,A,f,Z,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}})(T,L,k,R),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=R.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else z.call(this,G)}}}))})(Qt)),Qt.exports}var Pi=Ni();const Vi=oe(Pi);var Jt={exports:{}},Ri=Jt.exports,en;function zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),P==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),P==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return P}}));return s.bind(this)(w)}}}))})(Jt)),Jt.exports}var qi=zi();const Bi=oe(qi);var Kt={exports:{}},Zi=Kt.exports,nn;function Xi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Zi,(function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=31536e6,S=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof z},X=function(T,k,p){return new z(T,p,k.$l)},B=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},R=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+R(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},z=(function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return X(p*_[B(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach((function(c){C.$d[B(c)]=p[c]})),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map((function(c){return c!=null?Number(c):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce((function(L,x){return L+(p.$d[x]||0)*_[x]}),0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return L.replace(P,(function(C,M){return M||String(x[C])}))},k.as=function(p){return this.$ms/_[B(p)]},k.get=function(p){var L=this.$ms,x=B(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[B(L)]:Y(p)?p.$ms:X(p,this).$ms,X(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return X(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T})(),G=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return X(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?G(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?G(this,C,-1):x.bind(this)(C,M)}}}))})(Kt)),Kt.exports}var Gi=Xi();const ji=oe(Gi);var we=(function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],P=[1,9],_=[1,10],Y=[1,11],X=[1,12],B=[1,13],v=[1,14],U=[1,15],R=[1,16],E=[1,19],z=[1,20],G=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,$=2,O=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var V=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||O,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,Z,st,at={},pt,ut,He,Bt;;){if(Q=b[b.length-1],this.defaultActions[Q]?Z=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),Z=W[Q]&&W[Q][A]),typeof Z>"u"||!Z.length||!Z[0]){var ce="";Bt=[];for(pt in W[Q])this.terminals_[pt]&&pt>$&&Bt.push("'"+this.terminals_[pt]+"'");H.showPosition?ce="Parse error on line "+(K+1)+`: `+H.showPosition()+` Expecting `+Bt.join(", ")+", got '"+(this.terminals_[A]||A)+"'":ce="Parse error on line "+(K+1)+": Unexpected "+(A==O?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(ce,{text:H.match,token:this.terminals_[A]||A,line:H.yylineno,loc:N,expected:Bt})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+A);switch(Z[0]){case 1:b.push(A),I.push(H.yytext),o.push(H.yylloc),b.push(Z[1]),A=null,l=H.yyleng,u=H.yytext,K=H.yylineno,N=H.yylloc;break;case 2:if(ut=this.productions_[Z[1]][1],at.$=I[I.length-ut],at._$={first_line:o[o.length-(ut||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(ut||1)].first_column,last_column:o[o.length-1].last_column},V&&(at._$.range=[o[o.length-(ut||1)].range[0],o[o.length-1].range[1]]),st=this.performAction.apply(at,[u,l,K,J.yy,Z[1],I,o].concat(j)),typeof st<"u")return st;ut&&(b=b.slice(0,-1*ut*2),I=I.slice(0,-1*ut),o=o.slice(0,-1*ut)),b.push(this.productions_[Z[1]][0]),I.push(at.$),o.push(at._$),He=W[b[b.length-2]][b[b.length-1]],b.push(He);break;case 3:return!0}}return!0},"parse")},C=(function(){var D={EOF:1,parseError:d(function(g,b){if(this.yy.parser)this.yy.parser.parseError(g,b);else throw new Error(g)},"parseError"),setInput:d(function(c,g){return this.yy=g||this.yy||{},this._input=c,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var g=c.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:d(function(c){var g=c.length,b=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),b.length-1&&(this.yylineno-=b.length-1);var I=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:b?(b.length===m.length?this.yylloc.first_column:0)+m[m.length-b.length].length-b[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[I[0],I[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(c){this.unput(this.match.slice(c))},"less"),pastInput:d(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var c=this.pastInput(),g=new Array(c.length+1).join("-");return c+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-C1RnDoR4.js b/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-pTb313_D.js similarity index 99% rename from apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-C1RnDoR4.js rename to apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-pTb313_D.js index c29fba19d..bd00b3762 100644 --- a/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-C1RnDoR4.js +++ b/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-pTb313_D.js @@ -1,4 +1,4 @@ -import{I as le}from"./chunk-2Q5K7J3B-Df_GFe3n.js";import{p as he}from"./chunk-JWPE2WC7-D24iyGyr.js";import{p as $e,o as fe,s as ge,g as ue,a as ye,b as xe,_ as h,z as J,l as w,d as me,c as W,y as pe,A as be,q as we,k as B,B as ke,D as ve,E as Ce}from"./mermaid.core-DKNppTOJ.js";import{p as Ee}from"./cynefin-VYW2F7L2-D3UUATjS.js";import"./index-DusVyqlT.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),qe=h(function(){return d.records.currBranch},"getCurrentBranch"),Pe=h(function(){return d.records.direction},"getDirection"),We=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:qe,getDirection:Pe,getHead:We,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,q=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),q.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=W(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",` +import{I as le}from"./chunk-2Q5K7J3B-CMIj8h4B.js";import{p as he}from"./chunk-JWPE2WC7-TZtJmqSP.js";import{p as $e,o as fe,s as ge,g as ue,a as ye,b as xe,_ as h,z as J,l as w,d as me,c as W,y as pe,A as be,q as we,k as B,B as ke,D as ve,E as Ce}from"./mermaid.core-B_UcP3X_.js";import{p as Ee}from"./cynefin-VYW2F7L2-BnQdr27u.js";import"./index-BOtIzGLC.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),qe=h(function(){return d.records.currBranch},"getCurrentBranch"),Pe=h(function(){return d.records.direction},"getDirection"),We=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:qe,getDirection:Pe,getHead:We,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,q=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),q.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=W(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",` ${s-i/2-L/2},${x+R} ${s-i/2-L/2},${x-R} ${t.posWithOffset-i/2-L},${x-c-R} diff --git a/apps/kimi-code/dist-web/assets/index-B3oDj0jz.js b/apps/kimi-code/dist-web/assets/index-B3oDj0jz.js deleted file mode 100644 index 2bc326c4a..000000000 --- a/apps/kimi-code/dist-web/assets/index-B3oDj0jz.js +++ /dev/null @@ -1,1428 +0,0 @@ -import{t as fe,b as Sn,c as wr,a as Tr,d as Er,s as Ir,g as Ar,e as Rr}from"./index-0m3MlJDE.js";import{f as Kl}from"./index-0m3MlJDE.js";import{cT as Y,cU as Hr,bR as Mr,cV as Dr,cW as Pr}from"./index-DusVyqlT.js";const xi="diffs-container",Or=(()=>{try{return!1}catch{return!1}})(),Nr=/(?=^From [a-f0-9]+ .+$)/m,Li=/(?=^diff --git)/gm,cl=/(?=^---\s+\S)/gm,ul=/(?=^@@ )/gm,Fr=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,zr=/(?<=\n)/,Ur=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Br=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,_r=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Vr=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,fl=/^<{7,}(?:\s.*)?$/,pl=/^\|{7,}(?:\s.*)?$/,gl=/^={7,}$/,ml=/^>{7,}(?:\s.*)?$/,nn="header-prefix",rn="header-metadata",on="header-custom",P={dark:"pierre-dark",light:"pierre-light"},ki="data-theme-css",wi="data-unsafe-css",$r="data-core-css",Wr="data-diffs-scrollbar-measure",Ti="--diffs-scrollbar-gutter-measured",vl=1,Gr=1e5,sn={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},Pe={...sn,hunkLineCount:1},jr={paddingTop:8,paddingBottom:8,gap:8},qr={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},Kr=Object.freeze({fromStart:0,fromEnd:0}),Ae={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Ei={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Ee=new Set;let Ie=null;function K(e){Ee.add(e),Ie??=requestAnimationFrame(Ii)}function Yr(e){Ee.delete(e),Ee.size===0&&Ie!=null&&(cancelAnimationFrame(Ie),Ie=null)}function Ii(e){const t=new Set(Ee);Ee.clear();for(const n of t)try{n(e)}catch(i){console.error(i)}Ee.size>0?Ie=requestAnimationFrame(Ii):Ie=null}function Re(e,t,n){if(e===t||e==null||t==null)return e===t;const i=new Set(n),r=Object.keys(e),o=new Set(Object.keys(t));for(const s of r)if(o.delete(s),!i.has(s)&&(!(s in t)||e[s]!==t[s]))return!1;for(const s of Array.from(o))if(!i.has(s))return!1;return!0}function Me(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function an(e,t){const n=e?.theme??P,i=t?.theme??P,r=yn(e),o=yn(t);return Me(n,i)&&Re(e,t,["theme","parseDiffOptions"])&&Re(r,o)}function yn(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function Vt(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function $t({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:i=!1,fitPerfectlyOverscroll:r=0,overscrollSize:o}){const s=n+o*2,l=i?n+r*2:s;if(t=Math.max(t,l),s>=t||i){const h=Math.max(e-r,0),c=Math.min(e+l,t);return{top:h,bottom:Math.max(c,h)}}let a=e+n/2-s/2,d=a+s;return a<0&&(a=0),d>t&&(d=t),a=Math.floor(Math.max(a,0)),{top:a,bottom:Math.ceil(Math.max(Math.min(d,t),a))}}function Xr(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function $(e){return{type:"text",value:e}}function A({tagName:e,children:t=[],properties:n={}}){return{type:"element",tagName:e,properties:n,children:t}}function ut({name:e,width:t=16,height:n=16,properties:i}){return A({tagName:"svg",properties:{width:t,height:n,viewBox:"0 0 16 16",...i},children:[A({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function Qr(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t;"children"in t?t=t.children[0]:t=null}}function we(e){return A({tagName:"div",properties:{"data-gutter":""},children:e})}function Ai(e,t,n,i={}){return A({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...i},children:t!=null?[A({tagName:"span",properties:{"data-line-number-content":""},children:[$(`${t}`)]})]:void 0})}function G(e,t,n){return A({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function Jr(){return A({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[ut({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function Zr(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}var Ri=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){const n=!(e===this.selectedRange||Vt(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!n||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode==="diff"&&e.type==="diff-line")return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode==="file"&&e.type==="line")return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:t,onLineClick:n,onLineNumberClick:i,onTokenClick:r,onMergeConflictActionClick:o}=this.options;t==null&&n==null&&i==null&&o==null&&r==null||this.options.onGutterUtilityClick!=null&&Je(e.composedPath())||(de(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:t="disabled",onLineEnter:n,onLineLeave:i,onTokenEnter:r,onTokenLeave:o,enableGutterUtility:s=!1}=this.options;t==="disabled"&&!s&&n==null&&i==null&&r==null&&o==null||(de(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(de(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){de(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:n}=this.options,i=t.composedPath();de(n,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:i});const r=this.resolvePointerTarget(i);de(n,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",r);const{onLineClick:o,onLineNumberClick:s,onLineEnter:l,onLineLeave:a,onTokenClick:d,onTokenEnter:h,onTokenLeave:c,onHunkExpand:u,onMergeConflictActionClick:f}=this.options;switch(e){case"move":{const p=wt(r)&&this.hoveredLine?.lineElement===r.lineElement;ht(r)&&this.hoveredToken?.tokenElement===r.tokenElement||(this.hoveredToken!=null&&(c?.(this.hoveredToken,t),this.clearHoveredToken()),ht(r)&&(this.setHoveredToken(this.toTokenEventBaseProps(r)),h?.(this.hoveredToken,t))),p||(this.hoveredLine!=null&&(a?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),wt(r)?(this.setHoveredLine(this.toEventBaseProps(r)),this.placeUtility(),l?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{if(r==null)break;if(no(r)&&f!=null){f(r);break}if(to(r)&&u!=null){u(r.hunkIndex,r.all||t.shiftKey?"both":r.direction,r.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!wt(r))break;ht(r)&&d!=null&&d(this.toTokenEventBaseProps(r),t);const p=this.toEventBaseProps(r);s!=null&&r.numberColumn?s({...p,event:t}):o?.({...p,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:n="disabled",onLineClick:i,onLineNumberClick:r,onLineEnter:o,onLineLeave:s,onTokenClick:l,onTokenEnter:a,onTokenLeave:d,onHunkExpand:h,onMergeConflictActionClick:c,enableGutterUtility:u=!1,enableLineSelection:f=!1,onGutterUtilityClick:p}=this.options,v=p!=null,y=n!=="disabled"||i!=null||r!=null||o!=null||s!=null||l!=null||a!=null||d!=null||h!=null||c!=null||u||f||v;y&&!this.hasPointerListeners?(e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,de(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const b=[];return(t==="both"||t==="click")&&(i!=null&&b.push("onLineClick"),r!=null&&b.push("onLineNumberClick"),h!=null&&b.push("expandable hunk separators"),c!=null&&b.push("merge conflict actions")),b})()),de(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),de(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!y&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const C=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",g=this.pointerSession.mode==="gutterSelecting";(!f&&C||!v&&g)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,i=e!=null,r=t!=null||n;i&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!i&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),r&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!r&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType==="mouse"&&e.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const t=e.composedPath();Je(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:t=!1}=this.options;if(!t)return;const n=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(n==null)return;const{pre:i}=this;if(i==null)return;const{lineNumber:r,eventSide:o,lineIndex:s}=n;if(e.shiftKey&&this.selectedRange!=null){const l=this.getIndexesFromSelection(this.selectedRange,i.getAttribute("data-diff-type")==="split");if(l==null)return;const a=l.start<=l.end?s>=l.start:s<=l.end;this.selectionAnchor={lineNumber:a?this.selectedRange.start:this.selectedRange.end,side:a?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(r,o,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===r&&this.selectedRange?.end===r){const l={lineNumber:r,side:o};this.selectionAnchor=l,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:l,pending:l},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:r,side:o},this.updateSelection(r,o,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;if(n==null)return;const i=this.currentSelectionEnds(),r=i?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),o=i?.top??r;r==null||o==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:o,current:r},t&&(this.selectionAnchor={lineNumber:o.lineNumber,side:o.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{const{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(n==null)return;this.pointerSession.current=n,t===!0&&this.updateSelection(n.lineNumber,n.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;this.updateSelection(n.lineNumber,n.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;const i={lineNumber:n.lineNumber,side:n.eventSide};if(Zr(this.pointerSession.pending,i))return;this.updateSelection(n.lineNumber,n.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const i=this.resolveSelectionPoint(e,{source:"coordinates-first"});i!=null&&(this.pointerSession.current=i,t&&this.updateSelection(i.lineNumber,i.side)),n?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){const{lineHoverHighlight:t="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!=="disabled"&&((t==="both"||t==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(t==="both"||t==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const t=document.createElement("div");t.innerHTML=fe(Jr());const n=t.firstElementChild;if(!(n instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");n.remove(),this.gutterUtilityButton=n}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const t=this.resolvePointerTarget(e);Be(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const e=this.currentSelectionEnds();if(e==null)return!1;const t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){const t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},i=this.selectionPointRowIndex(t),r=this.selectionPointRowIndex(n);if(!(i==null||r==null))return i>r?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){const t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;const t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;const n=this.mode==="diff"?`${t[0]},${t[1]}`:`${t[0]}`,i=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(const r of i){if(!(r instanceof HTMLElement))continue;const o=this.resolvePointerTarget(Qe(r));if(Be(o)&&!(this.mode==="diff"&&e.side!=null&&o.side!==e.side))return o}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,t){const n=this.resolvePointerTarget(e);if(Be(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode==="diff"?n.side:void 0}}resolveSelectionInfo(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionInfoFromPath(n,t.requireNumberColumn):void 0}selectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(Be(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}resolveSelectionPoint(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionPointFromPath(n):void 0}resolveSelectionPath(e,t){const n=t.excludeUtility!==!1;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),n);case"coordinates-first":{const i=this.pathFromCoordinates(e,n);return i!==void 0?i??void 0:this.pathFromEventPath(e.composedPath(),n)}}}pathFromCoordinates(e,t){const n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&Je(e))){for(const n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){const n=Qe(e);if(t&&Je(n))return;const i=ro(e);return i!=null?Qe(i):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const t=so(oo(e));if(t==null)return;const n=this.targetForSelectionPoint(t);return n!=null?Qe(n.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const t=this.pre?.getRootNode(),n=Ln(t)?t:Ln(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){const{getLineIndex:n}=this.options;return n!=null?n(e,t):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){const i=this.getCurrentSelectionRange();let r;if(e==null)r=null;else{const o=this.selectionAnchor?.side??t,s=this.selectionAnchor?.lineNumber??e;r=this.buildSelectionRange(s,e,o,t)}Vt(i??void 0,r??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=r:(this.selectedRange=r,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;const n=this.getLineIndex(e.start,e.side),i=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&i!=null?{start:t?n[1]:n[0],end:t?i[1]:i[0]}:void 0}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const e=this.pre.querySelectorAll("[data-selected-line]");for(const l of e)l.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:t}=this.pre;if(t.length===0)return;if(t.length>2)throw console.error(t),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const n=this.pre.getAttribute("data-diff-type")==="split",i=this.getIndexesFromSelection(this.selectedRange,n);if(i==null)throw console.error({rowRange:i,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const r=i.start===i.end,o=Math.min(i.start,i.end),s=Math.max(i.start,i.end);for(const l of t){const[a,d]=l.children,h=d.children.length;if(h!==a.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let c=0;cs)break;if(p==null||pNumber.parseInt(i,10)).filter(i=>!Number.isNaN(i));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function qe({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:i,onLineClick:r,onLineEnter:o,onLineLeave:s,onLineNumberClick:l,onTokenClick:a,onTokenEnter:d,onTokenLeave:h,renderGutterUtility:c,__debugPointerEvents:u,enableLineSelection:f,controlledSelection:p,onLineSelected:v,onLineSelectionStart:y,onLineSelectionChange:C,onLineSelectionEnd:g},b,m,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:eo({enableGutterUtility:t,renderGutterUtility:c,onGutterUtilityClick:i}),usesCustomGutterUtility:c!=null,lineHoverHighlight:n,onGutterUtilityClick:i,onHunkExpand:b,onMergeConflictActionClick:x,onLineClick:r,onLineEnter:o,onLineLeave:s,onLineNumberClick:l,onTokenClick:a,onTokenEnter:d,onTokenLeave:h,__debugPointerEvents:u,enableLineSelection:f,controlledSelection:p,onLineSelected:v,onLineSelectionStart:y,onLineSelectionChange:C,onLineSelectionEnd:g,getLineIndex:m}}function eo({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function Be(e){return e!=null&&"kind"in e&&e.kind==="line"}function ht(e){return e!=null&&"kind"in e&&e.kind==="token"}function wt(e){return Be(e)||ht(e)}function to(e){return"type"in e&&e.type==="line-info"}function no(e){return"kind"in e&&e.kind==="merge-conflict-action"}function io(e){return e==="current"||e==="incoming"||e==="both"}function xn(e,t){const n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function Qe(e){const t=[];let n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function ro(e){const t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;const n=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(n instanceof HTMLElement))return;const i=n.previousElementSibling;return i instanceof HTMLElement&&(i.hasAttribute("data-line")||i.hasAttribute("data-column-number"))?i:void 0}function oo(e){const t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const n=e.getAttribute("name")??void 0;return n!=null&&n.startsWith("annotation-")?n:void 0}}function so(e){if(e==null)return;const t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;const n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function Ln(e){return e!=null&&typeof e.elementFromPoint=="function"}function kn(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function wn(e){const t=e.getAttribute("data-line-type");if(t!=null)switch(t){case"change-deletion":case"change-addition":case"context":case"context-expanded":return t;default:return}}function Je(e){for(const t of e)if(t instanceof HTMLElement&&(t.hasAttribute("data-utility-button")||t.hasAttribute("data-gutter-utility-slot")||t.getAttribute("slot")==="gutter-utility-slot"||t.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}function de(e="none",t,...n){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...n)}var Hi=class ce{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const t=ce.resizeObserver??new ResizeObserver(ce.handleSharedResizeEntries);return ce.resizeObserver=t,t}static handleSharedResizeEntries(t){const n=new Map;for(const i of t){const r=ce.managersByElement.get(i.target);if(r==null)continue;const o=n.get(r);o==null?n.set(r,[i]):o.push(i)}for(const[i,r]of n)i.handleResizeEntries(r)}observedNodes=new Map;setup(t,n){const i=new Set;let r=0;const o=new Map(this.observedNodes);this.observedNodes.clear();for(const s of t.children){if(r===2)break;const l=(()=>{if(s instanceof HTMLElement&&s.tagName==="CODE")return s})();if(l==null)continue;r++;let a=o.get(l);if(a!=null&&a.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let d=l.firstElementChild;d instanceof HTMLElement||(d=null),a!=null?(this.observedNodes.set(l,a),o.delete(l),a.numberElement!==d?(a.numberElement!=null&&(this.unobserve(a.numberElement),o.delete(a.numberElement)),d!=null&&(this.observe(d),o.delete(d),this.observedNodes.set(d,a)),a.numberElement=d,a.numberWidth=0):a.numberElement!=null?(o.delete(a.numberElement),this.observedNodes.set(a.numberElement,a)):a.numberWidth=0):(a={type:"code",codeElement:l,numberElement:d,codeWidth:"auto",numberWidth:0},this.observedNodes.set(l,a),this.observe(l),d!=null&&(this.observedNodes.set(d,a),this.observe(d)))}if(r>1&&!n){const s=t.querySelectorAll('[data-line-annotation*=","]'),l=new Map;for(const a of s){if(!(a instanceof HTMLElement))continue;const d=a.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(d)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:d,element:a});continue}let h=l.get(d);h==null&&(h=[],l.set(d,h)),h.push(a)}for(const[a,d]of l){if(d.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",a,d);continue}const[h,c]=d,u=h.firstElementChild,f=c.firstElementChild;if(!(h instanceof HTMLElement)||!(c instanceof HTMLElement)||!(u instanceof HTMLElement)||!(f instanceof HTMLElement))continue;let p=o.get(u);if(p!=null){this.observedNodes.set(u,p),this.observedNodes.set(f,p),o.delete(u),o.delete(f);continue}const v=u.getBoundingClientRect().height,y=f.getBoundingClientRect().height;p={type:"annotations",column1:{container:h,child:u,childHeight:v},column2:{container:c,child:f,childHeight:y},currentHeight:"auto"},i.add({child1:u,child2:f,item:p,newHeight:Math.max(v,y)})}for(const a of i)this.applyNewHeight(a.item,a.newHeight),this.observedNodes.set(a.child1,a.item),this.observedNodes.set(a.child2,a.item),this.observe(a.child1),this.observe(a.child2);i.clear()}for(const[s,l]of o)this.unobserve(s),l.type==="code"?ho(l):co(l);o.clear()}cleanUp(){for(const t of this.observedNodes.keys())this.unobserve(t);this.observedNodes.clear()}observe(t){const{managersByElement:n}=ce,i=n.get(t);if(i!==this){if(i!=null&&i!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");n.set(t,this),ce.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:n,resizeObserver:i}=ce,r=n.get(t);if(r!=null){if(r!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");n.delete(t),i?.unobserve(t),i!=null&&n.size===0&&(i.disconnect(),ce.resizeObserver=void 0)}}handleResizeEntries(t){const n=new Map,i=new Set;for(const r of t){const{target:o,borderBoxSize:s,contentBoxSize:l}=r;if(!(o instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",r);continue}const a=this.observedNodes.get(o);if(a==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",r);continue}if(a.type==="annotations"){const d=(()=>{if(o===a.column1.child)return a.column1;if(o===a.column2.child)return a.column2})();if(d==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:a,target:o});continue}d.childHeight=s[0].blockSize,i.add(a)}else if(a.type==="code"){const d=n.get(a)??{},h=l[0].inlineSize;o===a.codeElement?d.codeInlineSize=h:o===a.numberElement&&(d.numberInlineSize=h),n.set(a,d)}}this.applyAnnotationUpdates(i),i.clear(),this.applyColumnUpdates(n),n.clear()}applyAnnotationUpdates(t){for(const n of t)this.applyNewHeight(n,Math.max(n.column1.childHeight,n.column2.childHeight))}applyColumnUpdates=t=>{for(const[n,i]of t){const r=i.codeInlineSize!=null?ao(i.codeInlineSize):n.codeWidth,o=i.numberInlineSize!=null?lo(i.numberInlineSize):n.numberWidth,s=r!==n.codeWidth,l=o!==n.numberWidth;if(!(!s&&!l)&&(n.codeWidth=r,n.numberWidth=o,s&&n.codeElement.style.setProperty("--diffs-column-width",`${typeof r=="number"?`${r}px`:"auto"}`),l&&n.codeElement.style.setProperty("--diffs-column-number-width",`${o===0?"auto":`${o}px`}`),s||l&&r!=="auto")){const a=typeof r=="number"?Math.max(r-o,0):0;n.codeElement.style.setProperty("--diffs-column-content-width",`${a>0?`${a}px`:"auto"}`)}}};applyNewHeight(t,n){n!==t.currentHeight&&(t.currentHeight=Math.max(n,0),t.column1.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`),t.column2.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`))}};function ao(e){const t=Math.max(Math.floor(e),0);return t===0?"auto":t}function lo(e){return Math.max(Math.ceil(e),0)}function ho(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width"))}function co(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty("--diffs-annotation-min-height"),e.column2.container.isConnected&&e.column2.container.style.removeProperty("--diffs-annotation-min-height")}const Ce=new Map,Tt=new Map,Wt=new Map,ft=new Set;function pt(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!ft.has(t))return!1;return!0}function Tn(e,t){e=Array.isArray(e)?e:[e];for(const n of e){if(ft.has(n.name))continue;let i=Ce.get(n.name);i==null&&(i=n,Ce.set(n.name,i)),ft.add(i.name),t.loadLanguageSync(i.data)}}function uo(){Ce.clear(),ft.clear()}function Mi(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}async function Di(e){if(Mi())throw new Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=Tt.get(e);if(t!=null)return t;try{let n=Wt.get(e);if(n==null&&Object.prototype.hasOwnProperty.call(Sn,e)&&(n=Sn[e]),n==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const i=n().then(({default:r})=>{const o={name:e,data:r};return Ce.has(e)||Ce.set(e,o),o});return Tt.set(e,i),await i}finally{Tt.delete(e)}}function Pi(e){return Ce.get(e)??Di(e)}const gt=new Set;function En(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let i;if(typeof n=="string"){if(i=Y.getResolvedTheme(n),i==null)throw new Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else i=n,n=n.name,Y.getResolvedTheme(n)==null&&Y.seedResolvedTheme(n,i);gt.has(n)||(gt.add(n),t.loadThemeSync(i))}}function fo(){Y.clearResolvedThemes(),gt.clear()}function Oi(e){if(Mi())throw new Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(Y.hasRegisteredTheme(e))return;const t=Hr.getTheme(e);if(t!=null){Y.registerThemeIfAbsent(t.name,t.load);return}throw new Error(`No valid theme loader registered for "${e}"`)}function Ni(e,t){if(t.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function po(e){Oi(e);const t=await Y.resolveTheme(e);return Ni(e,t),t}function go(e){return Y.getResolvedTheme(e)??po(e)}let V;async function St({themes:e,langs:t,preferredHighlighter:n="shiki-js"}){V??=wr({themes:[],langs:["text"],engine:n==="shiki-wasm"?Tr(Mr(()=>import("./wasm-CG6Dc4jp.js"),[])):Er()});const i=mo(V)?await V:V;V=i;const r=[];for(const s of t){if(s==="text"||s==="ansi")continue;const l=Pi(s);"then"in l?r.push(l):Tn(l,i)}const o=[];for(const s of e){const l=go(s);"then"in l?o.push(l):En(l,V)}return(r.length>0||o.length>0)&&await Promise.all([Promise.all(r).then(s=>{Tn(s,i)}),Promise.all(o).then(s=>{En(s,i)})]),i}function bl(e=V){return e!=null&&!("then"in e)}function Fi(){if(V!=null&&!("then"in V))return V}function mo(e=V){return e!=null&&"then"in e}function Cl(e=V){return e==null}async function Sl(e){await St(e)}async function yl(){V!=null&&((await V).dispose(),uo(),fo(),V=void 0)}for(const e of Dr.getThemes())Y.registerThemeIfAbsent(e.name,e.load);function ln(e=P){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function We(e){for(const t of ln(e))if(!gt.has(t))return!1;return!0}function vo(e){return Y.hasResolvedThemes(e)}function Oe(e,t){return Me(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function se(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function yt(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function Gt(e){return A({tagName:"div",children:[A({tagName:"div",children:e.annotations?.map(t=>A({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function bo(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function zi({fileOrDiff:e,mode:t,stickyHeader:n}){const i="type"in e?e:void 0,r={"data-diffs-header":t,"data-change-type":i?.type,"data-sticky":n?"":void 0};return A({tagName:"div",children:[t==="custom"?A({tagName:"slot",properties:{name:on}}):Co({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),...t==="custom"?[]:[So(i)]],properties:r})}function Co({name:e,prevName:t,iconType:n}){const i=[A({tagName:"slot",properties:{name:nn}}),ut({name:bo(n),properties:{"data-change-icon":n}})];return t!=null&&(i.push(A({tagName:"div",children:[A({tagName:"bdi",children:[$(t)]})],properties:{"data-prev-name":""}})),i.push(ut({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),i.push(A({tagName:"div",children:[A({tagName:"bdi",children:[$(e)]})],properties:{"data-title":""}})),A({tagName:"div",children:i,properties:{"data-header-content":""}})}function So(e){const t=[];if(e!=null){let n=0,i=0;for(const r of e.hunks)n+=r.additionLines,i+=r.deletionLines;(i>0||n===0)&&t.push(A({tagName:"span",children:[$(`-${i}`)],properties:{"data-deletions-count":""}})),(n>0||i===0)&&t.push(A({tagName:"span",children:[$(`+${n}`)],properties:{"data-additions-count":""}}))}return t.push(A({tagName:"slot",properties:{name:rn}})),A({tagName:"div",children:t,properties:{"data-metadata":""}})}function Ui(e){return A({tagName:"pre",properties:yo(e)})}function yo({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:i,split:r,totalLines:o,type:s,customProperties:l}){return{...l,"data-diff":s==="diff"?"":void 0,"data-file":s==="file"?"":void 0,"data-diff-type":s==="diff"?r?"split":"single":void 0,"data-overflow":i,"data-disable-line-numbers":n?"":void 0,"data-background":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,style:`--diffs-min-number-column-width-default:${`${o}`.length}ch;`}}const J=new Map;let mt=0;const Ne={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",jbuilder:"ruby",builder:"ruby",rabl:"ruby",arb:"ruby",ru:"ruby",podspec:"ruby",Gemfile:"ruby",Rakefile:"ruby",Guardfile:"ruby",Capfile:"ruby",Berksfile:"ruby",Brewfile:"ruby",Vagrantfile:"ruby",Thorfile:"ruby",Appraisals:"ruby",Dangerfile:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function X(e){if(J.has(e))return J.get(e)??"text";if(Ne[e]!=null)return Ne[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(J.has(t[1]))return J.get(t[1])??"text";if(Ne[t[1]]!=null)return Ne[t[1]]??"text"}const n=e.match(/\.([^.]+)$/)?.[1]??"";return J.has(n)?J.get(n)??"text":Ne[n]??"text"}function xl(e,t){if(e<=mt)return!1;J.clear();for(const n in t){const i=t[n];i!=null&&J.set(n,i)}return mt=e,!0}function Ll(){return mt}function xo(e,t){const n=J.get(e);return n===t?!1:(n!=null&&console.warn(`setCustomExtension: overriding custom mapping for "${e}" from "${n}" to "${t}"`),J.set(e,t),mt++,!0)}function kl(){return Object.fromEntries(J)}function dn(e,{theme:t,preferredHighlighter:n="shiki-js"}){return{langs:[e??"text"],themes:ln(t),preferredHighlighter:n}}function pe(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function ye(e){return e.replace(/\n$|\r\n$/,"")}function Lo(e,t,n){const i=typeof n.lineInfo=="function"?n.lineInfo(t):n.lineInfo[t-1];if(i==null){const r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),new Error(r)}return e.tagName="div",e.properties["data-line"]=i.lineNumber,e.properties["data-alt-line"]=i.altLineNumber,e.properties["data-line-type"]=i.type,e.properties["data-line-index"]=i.lineIndex,e.children.length===0&&e.children.push($(` -`)),e}const Ze=Symbol("no-token"),Et=Symbol("multiple-tokens");function Bi(e){const t=ko(e);if(t!=null)return t;let n=Ze;const i=[];let r=[],o;const s=()=>{if(r.length===0||o==null){r=[],o=void 0;return}if(r.length===1){const a=r[0];if(a?.type==="element"){wo(a,o);for(const d of a.children)ct(d)}else ct(a);i.push(a),r=[],o=void 0;return}for(const a of r)ct(a);i.push(A({tagName:"span",properties:{"data-char":o},children:r})),r=[],o=void 0},l=a=>{if(a!==Ze){if(a===Et){n=Et;return}if(n===Ze){n=a;return}n!==a&&(n=Et)}};for(const a of e.children){const d=a.type==="element"?Bi(a):Ze;if(l(d),typeof d!="number"){s(),i.push(a);continue}o!=null&&o!==d&&s(),o??=d,r.push(a)}return s(),e.children=i,n}function ko(e){const t=e.properties["data-char"];if(typeof t=="number")return t}function ct(e){if(e.type==="element"){e.properties["data-char"]=void 0;for(const t of e.children)ct(t)}}function wo(e,t){e.properties["data-char"]=t}function To(e={}){const{classPrefix:t="__shiki_",classSuffix:n="",classReplacer:i=l=>l}=e,r=new Map;function o(l){return Object.entries(l).map(([a,d])=>`${a}:${d}`).join(";")}function s(l){let a=t+Eo(typeof l=="string"?l:o(l))+n;return a=i(a),r.has(a)||r.set(a,typeof l=="string"?l:{...l}),a}return{name:"@shikijs/transformers:style-to-class",pre(l){if(!l.properties.style)return;const a=s(l.properties.style);delete l.properties.style,this.addClassToHast(l,a)},tokens(l){for(const a of l)for(const d of a){if(!d.htmlStyle)continue;const h=s(d.htmlStyle);d.htmlStyle={},d.htmlAttrs||={},d.htmlAttrs.class?d.htmlAttrs.class+=` ${h}`:d.htmlAttrs.class=h}},getClassRegistry(){return r},getCSS(){let l="";for(const[a,d]of r.entries())l+=`.${a}{${typeof d=="string"?d:o(d)}}`;return l},clearRegistry(){r.clear()}}}function Eo(e,t=0){let n=3735928559^t,i=1103547991^t;for(let r=0,o;r>>16,2246822507),n^=Math.imul(i^i>>>13,3266489909),i=Math.imul(i^i>>>16,2246822507),i^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&i)+(n>>>0)).toString(36).slice(0,6)}function _i(e=!1,t=!1){const n={lineInfo:[]},i=[{line(r){return delete r.properties.class,r},pre(r){const o=Qr(r),s=[];if(o!=null){let l=1;for(const a of o.children)a.type==="element"&&(e&&Bi(a),s.push(Lo(a,l,n)),l++);o.children=s}return r},...e?{tokens(r){for(const o of r){let s=0;for(const l of o){const a=l;a.__lineChar??=s,s+=l.content.length}}},preprocess(r,o){o.mergeWhitespaces="never"},span(r,o,s,l,a){if(a?.offset!=null&&a.content!=null){const d=a.__lineChar;return d!=null&&(r.properties["data-char"]=d),r}return r}}:null}];return t&&i.push(Io,In),{state:n,transformers:i,toClass:In}}const In=To({classPrefix:"hl-"}),Io={name:"token-style-normalizer",tokens(e){for(const t of e)for(const n of t){if(n.htmlStyle!=null)continue;const i={};n.color!=null&&(i.color=n.color),n.bgColor!=null&&(i["background-color"]=n.bgColor),n.fontStyle!=null&&n.fontStyle!==0&&((n.fontStyle&1)!==0&&(i["font-style"]="italic"),(n.fontStyle&2)!==0&&(i["font-weight"]="bold"),(n.fontStyle&4)!==0&&(i["text-decoration"]="underline")),Object.keys(i).length>0&&(n.htmlStyle=i)}}};function _(e){return`--${e==="token"?"diffs-token":"diffs"}-`}const Ao=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,Ro=/^0(?:\.0+)?%?$/;function Ho(e){const t=e.indexOf("(");if(t<=0||!e.endsWith(")"))return;const n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;const i=e.slice(t+1,-1).trim();if(i.length===0)return;const r=i.lastIndexOf("/");if(r!==-1)return i.slice(r+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){const o=i.split(",");if(o.length===4)return o[3]?.trim()}}function Mo(e){const t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;const n=t[1];let i,r=1;return n.length===3?i=n.split("").map(o=>o+o).join(""):n.length===6?i=n:(i=n.slice(0,6),r=parseInt(n.slice(6,8),16)/255),[parseInt(i.slice(0,2),16),parseInt(i.slice(2,4),16),parseInt(i.slice(4,6),16),r]}function It(e){if(e==null)return null;const t=Mo(e);if(t==null)return null;const n=t[0]/255,i=t[1]/255,r=t[2]/255,o=s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4;return .2126*o(n)+.7152*o(i)+.0722*o(r)}function An(e){if(e==null)return!1;const t=e.trim().toLowerCase();if(t==="transparent"||Ao.test(t))return!0;const n=Ho(t);return n!=null&&Ro.test(n)}function Do(e,t,n){if(t==null||n==null)return!1;const i=It(e),r=It(t),o=It(n);return i==null||r==null||o==null?!1:Math.abs(i-o){const s=e.at(-1);return s===""||s===` -`||s===`\r -`||s==="\r"?Math.max(0,e.length-2):e.length-1})();for(let s=t;s0||l<1/0,{state:h,transformers:c}=_i(r),u=o?"text":e.lang??X(e.name),f=typeof n=="string"?t.getTheme(n).type:void 0,p=hn({theme:n,highlighter:t});h.lineInfo=g=>({type:"context",lineIndex:g-1+s,lineNumber:g+s});const v=typeof n=="string"?{lang:u,theme:n,transformers:c,defaultColor:!1,cssVariablePrefix:_("token"),tokenizeMaxLineLength:i,tokenizeTimeLimit:0}:{lang:u,themes:n,transformers:c,defaultColor:!1,cssVariablePrefix:_("token"),tokenizeMaxLineLength:i,tokenizeTimeLimit:0},y=jt(t.codeToHast(d?Fo(a??bt(e.contents),s,l):ye(e.contents),v)),C=d?new Array(s):y;return d&&C.push(...y),{code:C,themeStyles:p,baseThemeType:f}}function Fo(e,t,n){let i="";return vt({lines:e,startingLine:t,totalLines:n,callback({content:r}){i+=r}}),i}const Vi="-1,-1";function qt(e){return e?.some(t=>t.lineNumber===0)??!1}function Kt(e){const t=e[0];return t!=null&&t.length>0?t:void 0}function xt(e){return e.startingLine===0&&e.totalLines>0}function $i(e,t){return A({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${t}`}})}function Yt(e){return(e.lang??X(e.name))==="text"}function Wi(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}let zo=-1;var Uo=class{options;onRenderUpdate;workerManager;__id=`file-renderer:${++zo}`;highlighter;renderCache;computedLang="text";lineAnnotations={};lineCache;constructor(e={theme:P},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=We(e.theme??P)?Fi():void 0)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}setLineAnnotations(e){this.lineAnnotations={};for(const t of e){const n=this.lineAnnotations[t.lineNumber]??[];this.lineAnnotations[t.lineNumber]=n,n.push(t)}}cleanUp(){this.recycle(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.clearRenderCache(),this.highlighter=void 0,this.workerManager?.cleanUpTasks(this),this.lineCache=void 0}clearRenderCache(){this.renderCache=void 0}hydrate(e){const{options:t}=this.getRenderOptions(e),n=Mt(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());let i=this.workerManager?.getFileResultCache(e);i!=null&&!Oe(t,i.options)&&(i=void 0),this.renderCache??={file:e,options:t,highlighted:!n&&!Yt(e),result:n?void 0:i?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightFileAST(this,e):this.highlighter==null&&(this.computedLang=e.lang??X(e.name),this.initializeHighlighter())}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getFileRenderOptions();const{theme:i=P,tokenizeMaxLineLength:r=1e3}=this.options;return{theme:i,useTokenTransformer:Wi(this.options),tokenizeMaxLineLength:r}})(),{renderCache:n}=this;return n?.result==null?{options:t,forceHighlight:!0}:!se(e,n.file)||!Oe(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}getOrCreateLineCache(e){if(e.cacheKey==null)return this.lineCache=void 0,bt(e.contents);let{lineCache:t}=this;return(t==null||t.cacheKey!==e.cacheKey)&&(t={cacheKey:e.cacheKey,lines:bt(e.contents)}),this.lineCache=t,t.lines}renderFile(e=this.renderCache?.file,t=Ae){if(e==null)return;let{options:n,forceHighlight:i}=this.getRenderOptions(e);const r=this.getMatchingWorkerResultCache(e,n);r!=null&&!this.hasHighlightedRenderCache(e,n)&&(this.renderCache={file:e,highlighted:!0,renderRange:void 0,...r},i=!1),this.renderCache??={file:e,highlighted:!1,options:n,result:void 0,renderRange:void 0};const o=this.getOrCreateLineCache(e),s=e.contents.length>0,l=!s||Yt(e)||Mt(o.length,this.getTokenizeMaxLength()),a=!se(e,this.renderCache.file),d=!yt(this.renderCache.renderRange,t);if(this.workerManager?.isWorkingPool()===!0)(l||this.renderCache.result==null||!this.renderCache.highlighted&&(a||d))&&(this.renderCache.file=e,this.renderCache.options=n,this.renderCache.highlighted=!1,(this.renderCache.result==null||a||d||i)&&(this.renderCache.result=this.workerManager.getPlainFileAST(e,t.startingLine,t.totalLines,o)),this.renderCache.renderRange=t),!l&&s&&(!this.renderCache.highlighted||i)&&this.workerManager.highlightFileAST(this,e);else{this.computedLang=e.lang??X(e.name);const h=this.highlighter!=null&&We(n.theme),c=this.highlighter!=null&&pt(this.computedLang),u=!l&&c;if(this.highlighter!=null&&h&&(i||l||!this.renderCache.highlighted&&u||this.renderCache.result==null)){const{result:f,options:p}=this.renderFileWithHighlighter(e,this.highlighter,l||!c);this.renderCache={file:e,options:p,highlighted:u,result:f,renderRange:void 0}}(!h||!l&&!c)&&this.asyncHighlight(e).then(({result:f,options:p})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,f,p,!l)})}return this.renderCache.result!=null?this.processFileResult(this.renderCache.file,t,this.renderCache.result):void 0}async asyncRender(e,t=Ae){const{result:n}=await this.asyncHighlight(e);return this.processFileResult(e,t,n)}async asyncHighlight(e){const t=Mt(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??X(e.name);const n=this.highlighter!=null&&vo(ln(this.options.theme)),i=t||this.highlighter!=null&&pt(this.computedLang);return(this.highlighter==null||!n||!i)&&(this.highlighter=await this.initializeHighlighter()),this.renderFileWithHighlighter(e,this.highlighter,t)}renderFileWithHighlighter(e,t,n=!1){const{options:i}=this.getRenderOptions(e);return{result:No(e,t,i,{forcePlainText:n}),options:i}}processFileResult(e,t,{code:n,themeStyles:i,baseThemeType:r}){const{disableFileHeader:o=!1}=this.options,s=[],l=we(),a=this.getOrCreateLineCache(e);let d=0;const h=xt(t)?Kt(this.lineAnnotations):void 0;return h!=null&&(l.children.push(G("context","annotation",1)),s.push(Gt({hunkIndex:-1,lineIndex:-1,annotations:h.map(c=>pe(c))})),d++),vt({lines:a,startingLine:t.startingLine,totalLines:t.totalLines,callback:({lineIndex:c,lineNumber:u})=>{const f=n[c];if(f==null){const p="FileRenderer.processFileResult: Line doesnt exist";throw console.error(p,{name:e.name,lineIndex:c,lineNumber:u,lines:a}),new Error(p)}if(f!=null){l.children.push(Ai("context",u,`${c}`)),s.push(f),d++;const p=this.lineAnnotations[u];p!=null&&(l.children.push(G("context","annotation",1)),s.push(Gt({hunkIndex:0,lineIndex:u,annotations:p.map(v=>pe(v))})),d++)}}}),l.properties.style=`grid-row: span ${d}`,{gutterAST:l.children??[],contentAST:s,preAST:this.createPreElement(a.length),headerAST:o?void 0:this.renderHeader(e),totalLines:a.length,rowCount:d,themeStyles:i,baseThemeType:r,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderHeader(e){const{headerRenderMode:t="default",stickyHeader:n=!1}=this.options;return zi({fileOrDiff:e,mode:t,stickyHeader:n})}renderFullHTML(e){return fe(this.renderFullAST(e))}renderFullAST(e,t=[]){return t.push(A({tagName:"code",children:this.renderCodeAST(e),properties:{"data-code":""}})),{...e.preAST,children:t}}renderCodeAST(e){const t=we();return t.children=e.gutterAST,t.properties.style=`grid-row: span ${e.rowCount}`,[t,$i(e.contentAST,e.rowCount)]}renderPartialHTML(e,t=!1){return t?fe(A({tagName:"code",children:e,properties:{"data-code":""}})):fe(e)}async initializeHighlighter(){return this.highlighter=await St(dn(this.computedLang,this.options)),this.highlighter}onHighlightSuccess(e,t,n,i=!0){if(this.renderCache==null)return;const r=!se(e,this.renderCache.file)||!this.renderCache.highlighted||!Oe(n,this.renderCache.options);this.renderCache={file:e,options:n,highlighted:i,result:t,renderRange:void 0},r&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){const n=this.workerManager?.getFileResultCache(e);if(!(n==null||!Oe(t,n.options)))return n}hasHighlightedRenderCache(e,t){const{renderCache:n}=this;return n?.result!=null&&n.highlighted&&se(e,n.file)&&Oe(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}createPreElement(e){const{disableLineNumbers:t=!1,overflow:n="scroll"}=this.options;return Ui({type:"file",diffIndicators:"none",disableBackground:!0,disableLineNumbers:t,overflow:n,split:!1,totalLines:e})}};function Mt(e,t){return e>t}const Gi=``;function Bo(e,t){return e.lineNumber===t.lineNumber&&e.metadata===t.metadata}function ji(e,t){return e==null||t==null?e===t:_o(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackground===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}const Hn={};function _o(e=Hn,t=Hn){if(e===t)return!0;const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0}function cn(e){const t=document.createElement("div");return t.dataset.annotationSlot="",t.slot=e,t.style.whiteSpace="normal",t}function qi(){const e=document.createElement("div");return e.slot="gutter-utility-slot",e.style.position="absolute",e.style.top="0",e.style.bottom="0",e.style.textAlign="center",e.style.whiteSpace="normal",e.style.touchAction="none",e}function Ki(){const e=document.createElement("style");return e.setAttribute(wi,""),e}var Yi=`@layer base { - :host { - --diffs-font-fallback: "SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono", - "Courier New", monospace; - --diffs-header-font-fallback: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", - "Noto Sans", "Liberation Sans", Arial, sans-serif; - --diffs-mixer: light-dark(#000, #fff); - --diffs-gap-fallback: 8px; - --diffs-scrollbar-gutter-fallback: 6px; - --diffs-scrollbar-gutter: var(--diffs-scrollbar-gutter-override, var(--diffs-scrollbar-gutter-measured, var(--diffs-scrollbar-gutter-fallback))); - --diffs-added-light: #0dbe4e; - --diffs-added-dark: #5ecc71; - --diffs-modified-light: #009fff; - --diffs-modified-dark: #69b1ff; - --diffs-deleted-light: #ff2e3f; - --diffs-deleted-dark: #ff6762; - color-scheme: light dark; - font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback)); - font-size: var(--diffs-font-size, 13px); - line-height: var(--diffs-line-height, 20px); - font-feature-settings: var(--diffs-font-features); - --diffs-bg: light-dark(var(--diffs-light-bg, #fff), var(--diffs-dark-bg, #000)); - --diffs-bg-buffer: var(--diffs-bg-buffer-override, light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)))); - --diffs-bg-context: var(--diffs-bg-context-override, light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer)))); - --diffs-bg-context-gutter: var(--diffs-bg-context-gutter-override, light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)), color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg)))); - --diffs-bg-separator: var(--diffs-bg-separator-override, light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer)))); - --diffs-fg: light-dark(var(--diffs-light, #000), var(--diffs-dark, #fff)); - --diffs-fg-number: var(--diffs-fg-number-override, light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)), color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)))); - --diffs-fg-conflict-marker: var(--diffs-fg-conflict-marker-override, var(--diffs-fg-number)); - --diffs-deletion-base: var(--diffs-deletion-color-override, light-dark(var(--diffs-light-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-light))), var(--diffs-dark-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-dark))))); - --diffs-addition-base: var(--diffs-addition-color-override, light-dark(var(--diffs-light-addition-color, var(--diffs-addition-color, var(--diffs-added-light))), var(--diffs-dark-addition-color, var(--diffs-addition-color, var(--diffs-added-dark))))); - --diffs-modified-base: var(--diffs-modified-color-override, light-dark(var(--diffs-light-modified-color, var(--diffs-modified-color, var(--diffs-modified-light))), var(--diffs-dark-modified-color, var(--diffs-modified-color, var(--diffs-modified-dark))))); - --diffs-bg-deletion: var(--diffs-bg-deletion-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base)))); - --diffs-bg-deletion-emphasis: var(--diffs-bg-deletion-emphasis-override, light-dark(rgb(from var(--diffs-deletion-base) r g b / .15), rgb(from var(--diffs-deletion-base) r g b / .2))); - --diffs-bg-addition: var(--diffs-bg-addition-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base)))); - --diffs-bg-addition-emphasis: var(--diffs-bg-addition-emphasis-override, light-dark(rgb(from var(--diffs-addition-base) r g b / .15), rgb(from var(--diffs-addition-base) r g b / .2))); - --diffs-selection-base: var(--diffs-modified-base); - --diffs-selection-number-fg: light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer))); - background-color: var(--diffs-bg); - color: var(--diffs-fg); - display: block; - } - - pre, code, [data-error-wrapper] { - isolation: isolate; - font-family: var(--diffs-font-family, var(--diffs-font-fallback)); - outline: none; - margin: 0; - padding: 0; - display: block; - } - - pre, code { - background-color: var(--diffs-bg); - } - - code { - contain: content; - } - - *, :before, :after { - box-sizing: border-box; - } - - [data-icon-sprite] { - display: none; - } - - [data-diffs-header], [data-separator] { - font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback)); - } - - [data-diffs-header][data-sticky] { - z-index: 1; - background-color: var(--diffs-bg); - position: sticky; - top: 0; - } - - [data-file-info] { - color: var(--fg); - background-color: color-mix(in lab, var(--bg) 98%, var(--fg)); - border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg)); - padding: 10px; - font-weight: 700; - } - - [data-diff], [data-file] { - --diffs-grid-number-column-width: minmax(min-content, max-content); - --diffs-code-grid: var(--diffs-grid-number-column-width) 1fr; - - &[data-dehydrated] { - --diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr); - } - - &:hover [data-code]::-webkit-scrollbar-thumb { - background-color: var(--diffs-bg-context); - } - } - - @supports (-webkit-touch-callout: none) { - :host { - --diffs-scrollbar-gutter-fallback: 0px; - } - } - - [data-line] span { - color: light-dark(var(--diffs-token-light, var(--diffs-light)), var(--diffs-token-dark, var(--diffs-dark))); - background-color: light-dark(var(--diffs-token-light-bg, inherit), var(--diffs-token-dark-bg, inherit)); - font-weight: light-dark(var(--diffs-token-light-font-weight, inherit), var(--diffs-token-dark-font-weight, inherit)); - font-style: light-dark(var(--diffs-token-light-font-style, inherit), var(--diffs-token-dark-font-style, inherit)); - text-decoration: light-dark(var(--diffs-token-light-text-decoration, inherit), var(--diffs-token-dark-text-decoration, inherit)); - } - - [data-line], [data-gutter-buffer], [data-column-number], [data-line-annotation], [data-no-newline], [data-merge-conflict], [data-merge-conflict-actions] { - --diffs-computed-decoration-bg: var(--diffs-bg); - --diffs-computed-diff-line-bg: var(--diffs-bg); - --diffs-computed-selected-line-bg: var(--diffs-bg); - color: var(--diffs-fg); - background-color: var(--diffs-line-bg, var(--diffs-bg)); - - @media (pointer: fine) { - &:where([data-hovered]) { - --diffs-computed-hovered-line-bg: light-dark(color-mix(in lab, - var(--diffs-computed-selected-line-bg) 97%, - var(--diffs-bg-hover-override, var(--diffs-mixer))), color-mix(in lab, - var(--diffs-computed-selected-line-bg) 91%, - var(--diffs-bg-hover-override, var(--diffs-mixer)))); - --diffs-line-bg: var(--diffs-computed-hovered-line-bg, inherit); - } - } - } - - [data-line], [data-no-newline] { - &[data-decoration-bg] { - --mix-deco-light: 92%; - --mix-deco-dark: 85%; - - &[data-decoration-bg-depth="2"] { - --mix-deco-light: 88%; - --mix-deco-dark: 80%; - } - - &[data-decoration-bg-depth="3"] { - --mix-deco-light: 85%; - --mix-deco-dark: 78%; - } - - @media (pointer: fine) { - &[data-hovered]:not([data-selected-line]) { - --mix-deco-light: 85%; - --mix-deco-dark: 85%; - } - - &[data-hovered]:not([data-selected-line])[data-decoration-bg-depth="2"] { - --mix-deco-light: 83%; - --mix-deco-dark: 83%; - } - - &[data-hovered]:not([data-selected-line])[data-decoration-bg-depth="3"] { - --mix-deco-light: 81%; - --mix-deco-dark: 81%; - } - } - - --diffs-computed-decoration-bg: light-dark(color-mix(in lab, - var(--diffs-bg) var(--mix-deco-light), - var(--diffs-decoration-bg)), color-mix(in lab, - var(--diffs-bg) var(--mix-deco-dark), - var(--diffs-decoration-bg))); - --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg); - --diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg); - --diffs-line-bg: var(--diffs-computed-decoration-bg); - } - } - - [data-line-annotation], [data-gutter-buffer="annotation"] { - --diffs-annotation-bg: var(--diffs-bg-context); - --diffs-computed-decoration-bg: var(--diffs-annotation-bg); - --diffs-computed-diff-line-bg: var(--diffs-annotation-bg); - --diffs-computed-selected-line-bg: var(--diffs-annotation-bg); - --diffs-line-bg: var(--diffs-annotation-bg); - } - - [data-merge-conflict-actions], [data-gutter-buffer="merge-conflict-action"], [data-gutter-buffer="merge-conflict-marker-base"], [data-gutter-buffer="merge-conflict-marker-separator"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"] { - --diffs-computed-decoration-bg: var(--diffs-bg-context); - --diffs-computed-diff-line-bg: var(--diffs-bg-context); - --diffs-computed-selected-line-bg: var(--diffs-bg-context); - --diffs-line-bg: var(--diffs-bg-context); - } - - [data-gutter-buffer="merge-conflict-marker-start"], [data-merge-conflict="marker-start"] { - --diffs-computed-decoration-bg: light-dark(color-mix(in lab, - var(--diffs-bg) 78%, - var(--conflict-bg-current-header-override, var(--diffs-addition-base))), color-mix(in lab, - var(--diffs-bg) 68%, - var(--conflict-bg-current-header-override, var(--diffs-addition-base)))); - --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg); - --diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg); - --diffs-line-bg: var(--diffs-computed-decoration-bg); - } - - [data-gutter-buffer="merge-conflict-marker-end"], [data-merge-conflict="marker-end"] { - --diffs-computed-decoration-bg: light-dark(color-mix(in lab, - var(--diffs-bg) 78%, - var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))), color-mix(in lab, - var(--diffs-bg) 68%, - var(--conflict-bg-incoming-header-override, var(--diffs-modified-base)))); - --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg); - --diffs-computed-selected-line-bg: var(--diffs-computed-decoration-bg); - --diffs-line-bg: var(--diffs-computed-decoration-bg); - } - - [data-has-merge-conflict] [data-line-annotation], [data-has-merge-conflict] [data-gutter-buffer="annotation"] { - --diffs-computed-decoration-bg: var(--diffs-bg); - --diffs-computed-diff-line-bg: var(--diffs-bg); - --diffs-computed-selected-line-bg: var(--diffs-bg); - --diffs-line-bg: var(--diffs-bg); - } - - :where([data-background]) { - & [data-gutter-buffer], & [data-column-number] { - --mix-light: 91%; - --mix-dark: 85%; - } - - & [data-line], & [data-no-newline] { - --mix-light: 88%; - --mix-dark: 80%; - } - - & [data-gutter-buffer], & [data-column-number], & [data-line], & [data-no-newline] { - --diffs-diff-line-mix-target: var(--diffs-bg); - - &[data-line-type="change-deletion"] { - --diffs-diff-line-mix-target: var(--diffs-bg-deletion-override, var(--diffs-deletion-base)); - - @media (pointer: fine) { - &[data-hovered] { - --mix-light: 80%; - --mix-dark: 75%; - } - } - - &:where([data-gutter-buffer], [data-column-number]) { - color: var(--diffs-fg-number-deletion-override, var(--diffs-deletion-base)); - --diffs-diff-line-mix-target: var(--diffs-bg-deletion-number-override, var(--diffs-deletion-base)); - } - - --diffs-computed-diff-line-bg: light-dark(color-mix(in lab, - var(--diffs-computed-decoration-bg) var(--mix-light), - var(--diffs-diff-line-mix-target)), color-mix(in lab, - var(--diffs-computed-decoration-bg) var(--mix-dark), - var(--diffs-diff-line-mix-target))); - --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg); - --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit); - } - - &[data-line-type="change-addition"] { - --diffs-diff-line-mix-target: var(--diffs-bg-addition-override, var(--diffs-addition-base)); - - @media (pointer: fine) { - &[data-hovered] { - --mix-light: 80%; - --mix-dark: 70%; - } - } - - &:where([data-gutter-buffer], [data-column-number]) { - color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base)); - --diffs-diff-line-mix-target: var(--diffs-bg-addition-number-override, var(--diffs-addition-base)); - } - - --diffs-computed-diff-line-bg: light-dark(color-mix(in lab, - var(--diffs-computed-decoration-bg) var(--mix-light), - var(--diffs-diff-line-mix-target)), color-mix(in lab, - var(--diffs-computed-decoration-bg) var(--mix-dark), - var(--diffs-diff-line-mix-target))); - --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg); - --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit); - } - - &[data-merge-conflict="current"] { - --diffs-diff-line-mix-target: var(--conflict-bg-current-override, var(--diffs-addition-base)); - - &:where([data-gutter-buffer], [data-column-number]) { - color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base)); - --diffs-diff-line-mix-target: var(--conflict-bg-current-number-override, var(--diffs-addition-base)); - } - - @media (pointer: fine) { - &[data-hovered] { - --mix-light: 80%; - --mix-dark: 70%; - } - } - - --diffs-computed-diff-line-bg: light-dark(color-mix(in lab, - var(--diffs-computed-decoration-bg) var(--mix-light), - var(--diffs-diff-line-mix-target)), color-mix(in lab, - var(--diffs-computed-decoration-bg) var(--mix-dark), - var(--diffs-diff-line-mix-target))); - --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg); - --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit); - } - - &[data-merge-conflict="incoming"] { - --diffs-diff-line-mix-target: var(--conflict-bg-incoming-override, var(--diffs-modified-base)); - - &:where([data-gutter-buffer], [data-column-number]) { - color: var(--diffs-modified-base); - --diffs-diff-line-mix-target: var(--conflict-bg-incoming-number-override, var(--diffs-modified-base)); - } - - @media (pointer: fine) { - &[data-hovered] { - --mix-light: 80%; - --mix-dark: 70%; - } - } - - --diffs-computed-diff-line-bg: light-dark(color-mix(in lab, - var(--diffs-computed-decoration-bg) var(--mix-light), - var(--diffs-diff-line-mix-target)), color-mix(in lab, - var(--diffs-computed-decoration-bg) var(--mix-dark), - var(--diffs-diff-line-mix-target))); - --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg); - --diffs-line-bg: var(--diffs-computed-diff-line-bg, inherit); - } - } - } - - [data-gutter-buffer], [data-column-number], [data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline] { - --diffs-selection-mix-target: var(--diffs-bg-selection-override, var(--diffs-selection-base)); - - &:where([data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline])[data-selected-line] { - --mix-selection-light: 82%; - --mix-selection-dark: 75%; - - @media (pointer: fine) { - &[data-hovered]:not([data-merge-conflict], [data-line-type="change-addition"], [data-line-type="change-deletion"]) { - --mix-selection-light: 75%; - --mix-selection-dark: 70%; - } - } - } - - &:where([data-gutter-buffer], [data-column-number])[data-selected-line] { - --mix-selection-light: 75%; - --mix-selection-dark: 60%; - --diffs-selection-mix-target: var(--diffs-bg-selection-number-override, var(--diffs-selection-base)); - - @media (pointer: fine) { - &[data-hovered]:not([data-merge-conflict], [data-line-type="change-addition"], [data-line-type="change-deletion"]) { - --mix-selection-light: 70%; - --mix-selection-dark: 55%; - } - } - } - - &[data-selected-line] { - --diffs-computed-selected-line-bg: light-dark(color-mix(in lab, - var(--diffs-computed-diff-line-bg) var(--mix-selection-light), - var(--diffs-selection-mix-target)), color-mix(in lab, - var(--diffs-computed-diff-line-bg) var(--mix-selection-dark), - var(--diffs-selection-mix-target))); - --diffs-line-bg: var(--diffs-computed-selected-line-bg, inherit); - } - } - - [data-gutter-buffer], [data-column-number] { - &[data-selected-line] { - color: var(--diffs-selection-number-fg); - } - } - - [data-no-newline] { - user-select: none; - - & span { - opacity: .6; - } - } - - [data-diff-type="split"][data-overflow="scroll"] { - grid-template-columns: 1fr 1fr; - display: grid; - - & [data-additions] { - border-left: 1px solid var(--diffs-bg); - } - - & [data-deletions] { - border-right: 1px solid var(--diffs-bg); - } - } - - [data-code] { - grid-auto-flow: dense; - grid-template-columns: var(--diffs-code-grid); - overflow: var(--diffs-overflow-override, scroll) clip; - overscroll-behavior-x: none; - tab-size: var(--diffs-tab-size, 2); - padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback)); - padding-bottom: max(0px, - calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) - - var(--diffs-scrollbar-gutter))); - scrollbar-gutter: stable; - align-self: flex-start; - display: grid; - } - - [data-diffs-scrollbar-measure] { - opacity: 0; - pointer-events: none; - scrollbar-gutter: auto; - grid-template-columns: none; - width: 100px; - height: 100px; - padding: 0; - position: absolute; - top: -200px; - left: -200px; - } - - [data-container-size] { - container-type: inline-size; - } - - [data-code]::-webkit-scrollbar { - width: 0; - height: var(--diffs-scrollbar-gutter); - } - - [data-code]::-webkit-scrollbar-track { - background: none; - } - - [data-code]::-webkit-scrollbar-thumb { - background-color: #0000; - background-clip: content-box; - border: 1px solid #0000; - border-radius: 3px; - } - - [data-code]::-webkit-scrollbar-corner { - background-color: #0000; - } - - @supports ((-moz-appearance: none)) { - [data-code] { - scrollbar-width: thin; - scrollbar-color: var(--diffs-bg-context) transparent; - padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback)); - } - } - - [data-diffs-header] ~ [data-diff], [data-diffs-header] ~ [data-file] { - & [data-code], &[data-overflow="wrap"] { - padding-top: 0; - } - } - - [data-gutter] { - grid-template-rows: subgrid; - grid-template-columns: subgrid; - z-index: 3; - background-color: var(--diffs-bg); - grid-column: 1; - display: grid; - position: relative; - - & [data-gutter-buffer], & [data-column-number] { - border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg)); - } - } - - [data-content] { - grid-template-rows: subgrid; - grid-template-columns: subgrid; - background-color: var(--diffs-bg); - grid-column: 2; - min-width: 0; - display: grid; - } - - [data-diff-type="split"][data-overflow="wrap"] { - grid-auto-flow: dense; - grid-template-columns: repeat(2, var(--diffs-code-grid)); - padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback)); - display: grid; - - & [data-deletions] { - display: contents; - - & [data-gutter] { - grid-column: 1; - } - - & [data-content] { - border-right: 1px solid var(--diffs-bg); - grid-column: 2; - } - } - - & [data-additions] { - display: contents; - - & [data-gutter] { - border-left: 1px solid var(--diffs-bg); - grid-column: 3; - } - - & [data-content] { - grid-column: 4; - } - } - } - - [data-overflow="scroll"] [data-gutter] { - position: sticky; - left: 0; - } - - [data-interactive-lines] [data-line] { - cursor: pointer; - } - - [data-interactive-line-numbers] [data-column-number] { - cursor: pointer; - touch-action: none; - } - - [data-content-buffer], [data-gutter-buffer] { - user-select: none; - min-height: 1lh; - position: relative; - } - - [data-gutter-buffer] { - padding-left: 2ch; - padding-right: 1ch; - - &:before { - content: ""; - min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch)); - display: block; - } - } - - [data-gutter-buffer="annotation"] { - --diffs-annotation-bg: var(--diffs-bg-context-gutter); - min-height: 0; - } - - [data-gutter-buffer="buffer"] { - --diffs-line-bg: var(--diffs-bg-context-gutter); - } - - [data-content-buffer] { - background-position: 5px 0; - background-size: 8px 8px; - background-origin: border-box; - background-image: repeating-linear-gradient(-45deg, - transparent, - transparent calc(3px * 1.414), - var(--diffs-bg-buffer) calc(3px * 1.414), - var(--diffs-bg-buffer) calc(4px * 1.414)); - grid-column: 1; - } - - [data-separator] { - box-sizing: content-box; - background-color: var(--diffs-bg); - } - - [data-separator="simple"] { - min-height: 4px; - } - - [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"], [data-separator="simple"] { - background-color: var(--diffs-bg-separator); - } - - [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"] { - height: 32px; - position: relative; - } - - [data-separator-wrapper] { - user-select: none; - fill: currentColor; - background-color: var(--diffs-bg); - align-items: center; - height: 100%; - display: flex; - position: absolute; - inset-inline: 0; - } - - [data-content] [data-separator-wrapper] { - display: none; - } - - [data-separator="metadata"] [data-separator-wrapper] { - background-color: var(--diffs-bg-separator); - height: 100%; - color: var(--diffs-fg-number); - white-space: nowrap; - text-overflow: ellipsis; - min-width: min-content; - padding-inline: 1ch; - inset-inline: 100% auto; - overflow: hidden; - } - - [data-separator="line-info"] { - margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback)); - - & [data-separator-wrapper] { - min-width: 16px; - } - } - - [data-separator="line-info-basic"], [data-separator="metadata"] { - margin-block: 0; - } - - [data-separator="line-info"][data-separator-first] { - margin-top: 0; - } - - [data-separator="line-info"][data-separator-last] { - margin-bottom: 0; - } - - [data-expand-index] [data-separator-wrapper] { - grid-template-columns: 32px auto; - display: grid; - } - - [data-expand-index] [data-separator-wrapper][data-separator-multi-button] { - grid-template-columns: 32px 32px auto; - } - - [data-expand-button], [data-separator-content] { - background-color: var(--diffs-bg-separator); - flex: none; - align-items: center; - display: flex; - } - - [data-expand-index] [data-separator-content]:hover { - cursor: pointer; - text-decoration: underline; - } - - [data-expand-button] { - cursor: pointer; - min-width: 32px; - color: var(--diffs-fg-number); - border-right: 2px solid var(--diffs-bg); - flex-shrink: 0; - justify-content: center; - align-self: stretch; - - &:hover { - color: var(--diffs-fg); - } - - &[data-expand-all-button] { - display: none; - } - } - - [data-expand-down] [data-icon] { - transform: scaleY(-1); - } - - [data-separator-content] { - height: 100%; - color: var(--diffs-fg-number); - flex: auto; - justify-content: flex-start; - padding: 0 1ch; - overflow: hidden; - } - - [data-separator="line-info"], [data-separator="line-info-basic"] { - & [data-separator-content] { - user-select: none; - height: 100%; - overflow: clip; - } - } - - [data-unmodified-lines] { - text-overflow: ellipsis; - white-space: nowrap; - flex: 0 auto; - min-width: 0; - display: block; - overflow: hidden; - } - - @supports (width: 1cqi) { - [data-unified] { - & [data-separator="line-info"] [data-separator-wrapper] { - padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback)); - width: 100cqi; - - & [data-separator-content] { - border-radius: 6px; - } - } - - & [data-separator="line-info"][data-expand-index] [data-separator-wrapper] [data-separator-content] { - border-top-left-radius: unset; - border-bottom-left-radius: unset; - } - } - - [data-gutter] { - & [data-separator="line-info"] [data-separator-wrapper] { - padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback)); - } - - & [data-separator="line-info"] [data-separator-content] { - border-top-left-radius: 6px; - border-bottom-left-radius: 6px; - } - - & [data-separator="line-info"][data-expand-index] [data-separator-content] { - border-top-left-radius: unset; - border-bottom-left-radius: unset; - } - } - - [data-additions] { - & [data-content] [data-separator="line-info"] { - background-color: var(--diffs-bg); - - & [data-separator-wrapper] { - display: none; - } - } - - & [data-gutter] [data-separator="line-info"] [data-separator-wrapper] { - background-color: var(--diffs-bg-separator); - border-top-right-radius: 6px; - border-bottom-right-radius: 6px; - height: 100%; - display: block; - - & [data-separator-content], & [data-expand-button] { - display: none; - } - } - } - - [data-overflow="scroll"] [data-additions] [data-gutter] [data-separator="line-info"] [data-separator-wrapper] { - width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback))); - } - - [data-overflow="wrap"] [data-additions] [data-content] [data-separator="line-info"] [data-separator-wrapper] { - background-color: var(--diffs-bg-separator); - height: 100%; - margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback)); - border-top-right-radius: 6px; - border-bottom-right-radius: 6px; - display: block; - - & [data-separator-content], & [data-expand-button] { - display: none; - } - } - - [data-separator="line-info"] [data-separator-wrapper] { - & [data-expand-both], & [data-expand-down], & [data-expand-up] { - border-top-left-radius: 6px; - border-bottom-left-radius: 6px; - } - } - - @media (pointer: fine) { - [data-separator="line-info"] [data-separator-wrapper] { - &[data-separator-multi-button] { - & [data-expand-up] { - border-top-left-radius: 6px; - border-bottom-left-radius: unset; - } - - & [data-expand-down] { - border-bottom-left-radius: 6px; - border-top-left-radius: unset; - } - } - } - } - } - - @media (pointer: coarse) { - [data-separator="line-info-basic"] [data-separator-wrapper][data-separator-multi-button] { - grid-template-columns: 34px 34px auto; - - & [data-separator-content] { - grid-column: unset; - grid-row: unset; - } - } - - @supports (width: 1cqi) { - [data-separator="line-info"] [data-separator-wrapper] { - & [data-expand-both], & [data-expand-down], & [data-expand-up] { - border-top-left-radius: 6px; - border-bottom-left-radius: 6px; - } - - &[data-separator-multi-button] { - & [data-expand-up] { - border-top-left-radius: 6px; - border-bottom-left-radius: 6px; - } - - & [data-expand-down] { - border-bottom-left-radius: unset; - border-top-left-radius: unset; - } - } - } - } - } - - @media (pointer: fine) { - [data-separator-wrapper][data-separator-multi-button] { - grid-template-rows: 50% 50%; - display: grid; - - & [data-separator-content] { - grid-area: 1 / 2 / -1; - min-width: min-content; - } - - & [data-expand-button] { - grid-column: 1; - } - } - - [data-separator="line-info"] [data-separator-wrapper], [data-separator="line-info"] [data-separator-wrapper][data-separator-multi-button] { - grid-template-columns: 34px auto; - } - - [data-separator="line-info-basic"][data-expand-index] [data-separator-wrapper] { - grid-template-columns: 100% auto; - } - - [data-separator="line-info"], [data-separator="line-info-basic"] { - & [data-separator-multi-button] { - & [data-expand-up] { - border-bottom: 1px solid var(--diffs-bg); - border-right: 2px solid var(--diffs-bg); - } - - & [data-expand-down] { - border-top: 1px solid var(--diffs-bg); - border-right: 2px solid var(--diffs-bg); - } - } - } - } - - [data-additions] [data-gutter] [data-separator-wrapper], [data-additions] [data-separator="line-info-basic"] [data-separator-wrapper], [data-content] [data-separator-wrapper] { - display: none; - } - - [data-line-annotation] { - min-height: var(--diffs-annotation-min-height, 0); - z-index: 2; - } - - [data-merge-conflict-actions] { - z-index: 2; - } - - [data-separator="custom"] { - grid-template-columns: subgrid; - display: grid; - } - - [data-line], [data-column-number], [data-no-newline] { - padding-inline: 1ch; - position: relative; - } - - [data-indicators="classic"] [data-line] { - padding-inline-start: 2ch; - } - - [data-indicators="classic"] { - & [data-line-type="change-addition"], & [data-line-type="change-deletion"] { - &[data-no-newline], &[data-line] { - &:before { - user-select: none; - width: 1ch; - height: 1lh; - display: inline-block; - position: absolute; - top: 0; - left: 0; - } - } - } - - & [data-line-type="change-addition"] { - &[data-line], &[data-no-newline] { - &:before { - content: "+"; - color: var(--diffs-addition-base); - } - } - } - - & [data-line-type="change-deletion"] { - &[data-line], &[data-no-newline] { - &:before { - content: "-"; - color: var(--diffs-deletion-base); - } - } - } - } - - [data-indicators="bars"] { - & [data-line-type="change-deletion"], & [data-line-type="change-addition"] { - &[data-column-number] { - &:before { - content: ""; - user-select: none; - contain: strict; - width: 4px; - height: 100%; - display: block; - position: absolute; - top: 0; - left: 0; - } - } - } - - & [data-line-type="change-deletion"] { - &[data-column-number] { - &:before { - background-image: linear-gradient(0deg, - var(--diffs-bg-deletion) 50%, - var(--diffs-deletion-base) 50%); - background-repeat: repeat; - background-size: 2px 2px; - background-size: calc(1lh / round(1lh / 2px)) - calc(1lh / round(1lh / 2px)); - } - } - } - - & [data-line-type="change-addition"] { - &[data-column-number] { - &:before { - background-color: var(--diffs-addition-base); - } - } - } - } - - [data-overflow="wrap"] { - & [data-line], & [data-annotation-content] { - white-space: pre-wrap; - word-break: break-word; - } - } - - [data-overflow="scroll"] [data-line] { - white-space: pre; - min-height: 1lh; - } - - [data-column-number] { - box-sizing: content-box; - text-align: right; - user-select: none; - color: var(--diffs-fg-number); - padding-left: 2ch; - } - - [data-line-number-content] { - min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch)); - z-index: 1; - display: inline-block; - position: relative; - } - - [data-disable-line-numbers] { - & [data-gutter-buffer], & [data-column-number] { - min-width: 4px; - padding: 0; - - &:before { - min-width: 0; - } - } - - & [data-line-number-content] { - display: none; - } - - & [data-gutter-utility-slot] { - right: unset; - justify-content: flex-start; - left: 0; - } - - &[data-indicators="bars"] [data-gutter-utility-slot] { - left: 6px; - } - } - - [data-file][data-disable-line-numbers] { - & [data-gutter-buffer], & [data-column-number] { - border-right: 0; - min-width: 0; - } - } - - [data-diff-span] { - box-decoration-break: clone; - border-radius: 3px; - } - - [data-line-type="change-addition"] [data-diff-span] { - background-color: var(--diffs-bg-addition-emphasis); - } - - [data-line-type="change-deletion"] [data-diff-span] { - background-color: var(--diffs-bg-deletion-emphasis); - } - - [data-merge-conflict="marker-start"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"], [data-merge-conflict="marker-end"] { - color: var(--diffs-fg); - padding-left: 1ch; - } - - [data-merge-conflict="marker-start"], [data-merge-conflict="marker-end"] { - align-items: center; - display: flex; - - &:after { - color: var(--diffs-fg-conflict-marker); - font-size: .75rem; - font-style: normal; - line-height: 1.25rem; - font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback)); - padding-left: 1ch; - } - } - - [data-merge-conflict="marker-start"]:after { - content: "(Current Change)"; - } - - [data-merge-conflict="marker-end"]:after { - content: "(Incoming Change)"; - } - - [data-merge-conflict-actions-content] { - min-height: 1.75rem; - font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback)); - color: var(--diffs-fg); - align-items: center; - gap: .25rem; - padding-inline: .5rem; - font-size: .75rem; - line-height: 1.2; - display: flex; - } - - [data-merge-conflict-action] { - appearance: none; - color: var(--diffs-fg-number); - font: inherit; - cursor: pointer; - background: none; - border: 0; - padding: 0; - font-style: normal; - } - - [data-merge-conflict-action]:hover { - color: var(--diffs-fg); - } - - [data-merge-conflict-action="current"]:hover { - color: var(--diffs-addition-base); - } - - [data-merge-conflict-action="incoming"]:hover { - color: var(--diffs-modified-base); - } - - [data-merge-conflict-action-separator] { - color: var(--diffs-fg-number); - opacity: .6; - user-select: none; - } - - [data-diffs-header="default"] { - background-color: var(--diffs-bg); - justify-content: space-between; - align-items: center; - gap: var(--diffs-gap-inline, var(--diffs-gap-fallback)); - min-height: calc(1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3)); - z-index: 2; - flex-direction: row; - padding-inline: 16px; - display: flex; - position: relative; - top: 0; - } - - [data-header-content] { - align-items: center; - gap: var(--diffs-gap-inline, var(--diffs-gap-fallback)); - white-space: nowrap; - flex-direction: row; - min-width: 0; - display: flex; - } - - [data-header-content] [data-prev-name], [data-header-content] [data-title] { - text-overflow: ellipsis; - white-space: nowrap; - direction: rtl; - min-width: 0; - overflow: hidden; - } - - [data-prev-name] { - opacity: .7; - } - - [data-rename-icon] { - fill: currentColor; - flex-grow: 0; - flex-shrink: 0; - } - - [data-diffs-header="default"] [data-metadata] { - white-space: nowrap; - align-items: center; - gap: 1ch; - display: flex; - } - - [data-diffs-header="default"] [data-additions-count] { - font-family: var(--diffs-font-family, var(--diffs-font-fallback)); - color: var(--diffs-addition-base); - } - - [data-diffs-header="default"] [data-deletions-count] { - font-family: var(--diffs-font-family, var(--diffs-font-fallback)); - color: var(--diffs-deletion-base); - } - - [data-change-icon] { - fill: currentColor; - flex-shrink: 0; - } - - [data-change-icon="change"], [data-change-icon="rename-pure"], [data-change-icon="rename-changed"] { - color: var(--diffs-modified-base); - } - - [data-change-icon="new"] { - color: var(--diffs-addition-base); - } - - [data-change-icon="deleted"] { - color: var(--diffs-deletion-base); - } - - [data-change-icon="file"] { - opacity: .6; - } - - [data-annotation-content] { - z-index: 2; - isolation: isolate; - align-self: flex-start; - min-width: 0; - display: flow-root; - position: relative; - } - - [data-overflow="scroll"] [data-annotation-content], [data-overflow="scroll"] [data-merge-conflict-actions-content] { - width: var(--diffs-column-content-width, auto); - left: var(--diffs-column-number-width, 0); - position: sticky; - } - - [data-annotation-slot] { - text-wrap-mode: wrap; - word-break: normal; - white-space-collapse: collapse; - } - - [data-gutter-utility-slot] { - touch-action: none; - justify-content: flex-end; - display: flex; - position: absolute; - top: 0; - bottom: 0; - right: 0; - } - - [data-utility-button] { - appearance: none; - cursor: pointer; - width: 1lh; - height: 1lh; - font-size: var(--diffs-font-size, 13px); - line-height: var(--diffs-line-height, 20px); - background-color: var(--diffs-modified-base); - color: var(--diffs-bg); - fill: currentColor; - z-index: 4; - touch-action: none; - border: none; - border-radius: 4px; - justify-content: center; - align-items: center; - margin-right: calc(-1lh + 1ch); - padding: 0; - display: flex; - position: relative; - - &:before { - content: ""; - display: block; - position: absolute; - inset: 0 0 0 -4px; - } - } - - [data-decoration-bar-stack] { - pointer-events: none; - isolation: isolate; - z-index: 1; - background-color: var(--diffs-decoration-bar-color, transparent); - box-sizing: content-box; - border-left: 2px solid var(--diffs-bg); - border-right: 2px solid var(--diffs-bg); - width: 6px; - position: absolute; - top: 0; - bottom: 0; - right: -2px; - - [data-decoration-bar-depth="1"] & { - background-color: color-mix(in lab, - var(--diffs-bg) 20%, - var(--diffs-decoration-bar-color, transparent)); - } - - [data-decoration-bar-depth="2"] & { - background-color: color-mix(in lab, - var(--diffs-bg) 45%, - var(--diffs-decoration-bar-color, transparent)); - } - - [data-decoration-bar-depth="3"] & { - background-color: color-mix(in lab, - var(--diffs-bg) 65%, - var(--diffs-decoration-bar-color, transparent)); - } - - [data-decoration-bar-start] & { - border-top-left-radius: 5px; - border-top-right-radius: 5px; - } - - [data-decoration-bar-end] & { - z-index: 3; - border-bottom-right-radius: 5px; - border-bottom-left-radius: 5px; - } - } - - [data-placeholder] { - contain: strict; - } - - [data-error-wrapper] { - padding: var(--diffs-gap-block, var(--diffs-gap-fallback)) - var(--diffs-gap-inline, var(--diffs-gap-fallback)); - scrollbar-width: none; - max-height: 400px; - overflow: auto; - - & [data-error-message] { - color: var(--diffs-deletion-base); - font-size: 18px; - font-weight: bold; - } - - & [data-error-stack] { - color: var(--diffs-fg-number); - } - } -} - -@layer theme, rendered, unsafe; -`;let et;function He(e){if(et!=null)return et;const t=e.host;if(typeof HTMLElement<"u"&&t instanceof HTMLElement&&!t.isConnected)return;const n=document.createElement("div");n.setAttribute("data-code",""),n.setAttribute(Wr,"true");const i=document.createElement("div");return i.style.position="relative",i.style.width="200%",i.style.height="200%",n.appendChild(i),e.appendChild(n),et=Math.max(n.offsetHeight-n.clientHeight,0),n.remove(),et}function Xi(e){return`${Ti}: ${e==null?"var(--diffs-scrollbar-gutter-fallback)":`${e}px`};`}const un="@layer base, theme, rendered, unsafe;",Vo=new RegExp(`${Wo(Ti)}\\s*:\\s*[^;]+;`);function $o(e){return`${un} -${Yi} -@layer theme { - ${e} -}`}function fn(e){return`${un} -@layer unsafe { - ${e} -}`}function pn(e,t="system",n){return`${un} -@layer rendered { - :host {${t==="system"?"":` - color-scheme: ${t};`} - ${Xi(n)} - ${e} - } -}`}function Qi(e,t){const n=Xi(t);return e.replace(Vo,n)}function Wo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ge({code:e,pre:t,columnType:n,rowSpan:i,containerSize:r=!1}={}){return e==null&&(e=document.createElement("code"),e.setAttribute("data-code",""),n!=null&&e.setAttribute(`data-${n}`,""),t?.appendChild(e)),i!=null?e.style.setProperty("grid-row",`span ${i}`):e.style.removeProperty("grid-row"),r?e.setAttribute("data-container-size",""):e.removeAttribute("data-container-size"),e}function Ji(e,t){if(t==null)return;const n=e.shadowRoot??e.attachShadow({mode:"open"});n.innerHTML===""&&(n.innerHTML=t)}function gn(e,{type:t,diffIndicators:n,disableBackground:i,disableLineNumbers:r,overflow:o,split:s,totalLines:l,customProperties:a}){if(a!=null)for(const d in a){const h=a[d];h!=null&&e.setAttribute(d,`${h}`)}switch(t==="diff"?(e.setAttribute("data-diff",""),e.removeAttribute("data-file")):(e.setAttribute("data-file",""),e.removeAttribute("data-diff")),n){case"bars":case"classic":e.setAttribute("data-indicators",n);break;case"none":e.removeAttribute("data-indicators");break}return r?e.setAttribute("data-disable-line-numbers",""):e.removeAttribute("data-disable-line-numbers"),i?e.removeAttribute("data-background"):e.setAttribute("data-background",""),t==="diff"?e.setAttribute("data-diff-type",s?"split":"single"):e.removeAttribute("data-diff-type"),e.setAttribute("data-overflow",o),e.style.setProperty("--diffs-min-number-column-width-default",`${`${l}`.length}ch`),e}function Ke(e){if(typeof HTMLStyleElement<"u"&&e instanceof HTMLStyleElement)return!0;const t=e.tagName??e.nodeName;return typeof t=="string"&&t.toLowerCase()==="style"}function Mn(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,themeType:e?.themeType,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:e?.useTokenTransformer,tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,unsafeCSS:e?.unsafeCSS,headerRenderMode:e?.renderCustomHeader!=null?"custom":"default"}}function mn({shadowRoot:e,currentNode:t,themeCSS:n}){if(n.trim()===""){t?.remove();return}return t??=Go(),t.textContent=n,t.parentNode!==e&&e.appendChild(t),t}function Go(){const e=document.createElement("style");return e.setAttribute(ki,""),e}if(typeof HTMLElement<"u"&&customElements.get("diffs-container")==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;const i=this.attachShadow({mode:"open"});e==null&&(e=new CSSStyleSheet,e.replaceSync(Yi)),i.adoptedStyleSheets=[e]}connectedCallback(){He(this.shadowRoot??this.attachShadow({mode:"open"}))}}customElements.define(xi,t)}const jo=[];let qo=-1;var Ko=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file:${++qo}`;type="file";fileContainer;spriteSVG;pre;code;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;errorWrapper;placeHolder;lastRenderedHeaderHTML;cachedHeaderHTML;appliedPreAttributes;lastRowCount;mounted=!1;headerElement;headerCustom;headerPrefix;headerMetadata;fileRenderer;resizeManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;file;renderRange;enabled=!0;constructor(e={theme:P},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.fileRenderer=new Uo(e,this.handleHighlightRender,this.workerManager),this.resizeManager=new Hi,this.interactionManager=new Ri("file",qe(e)),this.workerManager?.subscribeToThemeChanges(this)}handleHighlightRender=()=>{this.rerender()};rerender(){!this.enabled||this.file==null||this.render({file:this.file,forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.fileRenderer.clearRenderCache(),this.rerender()}setOptions(e){e!=null&&(this.options=e,this.cachedHeaderHTML=void 0,this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(qe(this.options))}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??"system")!==e&&(this.mergeOptions({themeType:e}),this.applyCachedThemeState(e))}applyCachedThemeState(e){if(typeof this.options.theme=="string"||this.fileContainer==null||this.appliedThemeCSS==null)return!1;const t=this.appliedThemeCSS.baseThemeType??e;return this.appliedThemeCSS.themeType===t?!1:(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!Me(this.appliedThemeCSS.theme,this.options.theme??P)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(e){this.lineAnnotations=e}setSelectedLines(e,t){this.interactionManager.setSelection(e,t)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}const{overflow:e="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,e==="wrap"),this.managersDirty=!1}cleanUp(e=!1){this.emitPostRender(!0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,e||(this.lineAnnotations=[]),this.annotationCache.clear(),this.pre=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.lastRenderedHeaderHTML=void 0,e||(this.cachedHeaderHTML=void 0),this.errorWrapper=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.placeHolder=void 0,this.unsafeCSSStyle=void 0,e?this.fileRenderer.recycle():(this.fileRenderer.cleanUp(),this.workerManager=void 0,this.file=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(e){const{fileContainer:t,prerenderedHTML:n,preventEmit:i=!1,file:r,lineAnnotations:o}=e;this.hydrateElements(t,n),Yo(this.pre,r,this.options.collapsed)||Xo(this.headerElement,r,this.options.disableFileHeader)?this.render({...e,preventEmit:!0}):this.hydrationSetup({file:r,lineAnnotations:o}),i||this.emitPostRender()}hydrateElements(e,t){this.fileContainer!==e&&this.emitPostRender(!0),Ji(e,t);for(const n of Array.from(e.shadowRoot?.children??[])){if(n instanceof SVGElement){this.spriteSVG=n;continue}if(n instanceof HTMLElement){if(n instanceof HTMLPreElement){this.pre=n,this.appliedPreAttributes=void 0;continue}if(n instanceof HTMLStyleElement&&n.hasAttribute("data-theme-css")){this.themeCSSStyle=n;continue}if(n instanceof HTMLStyleElement&&n.hasAttribute("data-unsafe-css")){this.unsafeCSSStyle=n,this.appliedUnsafeCSS=n.textContent;continue}if("diffsHeader"in n.dataset){this.headerElement=n,this.lastRenderedHeaderHTML=void 0;continue}}}this.pre!=null&&(this.syncCodeNodeFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({file:e,lineAnnotations:t}){this.lineAnnotations=t??this.lineAnnotations,this.file=e,this.fileRenderer.setOptions(Mn(this.options)),this.syncInteractionOptions(),this.pre!=null&&(this.fileRenderer.hydrate(e),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}getOrCreateLineCache(e=this.file){return e!=null?this.fileRenderer.getOrCreateLineCache(e):jo}render({file:e,fileContainer:t,forceRender:n=!1,preventEmit:i=!1,containerWrapper:r,deferManagers:o=!1,lineAnnotations:s,renderRange:l}){const{collapsed:a=!1,themeType:d="system"}=this.options;if(!this.enabled)throw new Error("File.render: attempting to call render after cleaned up");const h=a?void 0:l,c=this.renderRange,u=this.hasThemeChanged(),f=s!=null&&(s.length>0||this.lineAnnotations.length>0)?s!==this.lineAnnotations:!1,p=!se(this.file,e);if(!a&&!n&&yt(h,this.renderRange)&&!p&&!f&&!u)return this.applyCachedThemeState(d);this.renderRange=h,p&&(this.cachedHeaderHTML=void 0),this.file=e,this.fileRenderer.setOptions(Mn(this.options)),this.syncInteractionOptions(),s!=null&&this.setLineAnnotations(s),this.fileRenderer.setLineAnnotations(this.lineAnnotations);const{disableErrorHandling:v=!1,disableFileHeader:y=!1}=this.options;if(y&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),t=this.getOrCreateFileContainerNode(t,r),this.applyCachedThemeState(d),a){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const C=this.fileRenderer.renderFile(e,Ei);C!=null&&this.applyThemeState(t,C.themeStyles,d,C.baseThemeType),C?.headerAST!=null&&this.applyHeaderToDOM(C.headerAST,t),this.injectUnsafeCSS()}catch(C){if(v)throw C;console.error(C),C instanceof Error&&this.applyErrorToDOM(C,t)}return i||this.emitPostRender(),!0}try{const C=this.getOrCreatePreNode(t);if(!this.canPartiallyRender(n,f,p||u)||!this.applyPartialRender(c,h)){const g=this.fileRenderer.renderFile(e,h);if(g==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(t,g.themeStyles,d,g.baseThemeType),g.headerAST!=null&&this.applyHeaderToDOM(g.headerAST,t),this.applyFullRender(g,C)}this.applyBuffers(C,h),this.injectUnsafeCSS(),this.managersDirty=!0,o||this.flushManagers(),this.renderAnnotations(),this.renderGutterUtility()}catch(C){if(v)throw C;console.error(C),C instanceof Error&&this.applyErrorToDOM(C,t)}return i||this.emitPostRender(),!0}emitPostRender(e=!1){const{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,t==null))return;n?.(t,this,"unmount");return}if(t==null)return;const i=this.mounted?"update":"mount";this.mounted=!0,n?.(t,this,i)}removeRenderedCode(){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.code?.remove(),this.code=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(const{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}canPartiallyRender(e,t,n){return!(e||t||n)}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){const t=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",t.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${e}px`),!0}primeHighlightCache(){const{file:e,workerManager:t}=this;e==null||e.cacheKey==null||t==null||Yt(e)||this.fileRenderer.getOrCreateLineCache(e).length>(this.options.tokenizeMaxLength??1e5)||t.primeFileHighlightCache(e)}cleanChildNodes(){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.code?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.gutterUtilityContent?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.code=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.gutterUtilityContent=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:n}of this.annotationCache.values())n.remove();this.annotationCache.clear();return}const e=new Map(this.annotationCache),{renderAnnotation:t}=this.options;if(t!=null&&this.lineAnnotations.length>0)for(const[n,i]of this.lineAnnotations.entries()){const r=`${n}-${pe(i)}`;let o=this.annotationCache.get(r);if(o==null||!Bo(i,o.annotation)){o?.element.remove();const s=t(i);if(s==null)continue;o={element:cn(pe(i)),annotation:i},o.element.appendChild(s),this.fileContainer.appendChild(o.element),this.annotationCache.set(r,o)}e.delete(r)}for(const[n,{element:i}]of e.entries())this.annotationCache.delete(n),i.remove()}renderGutterUtility(){const{renderGutterUtility:e}=this.options;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const n=qi();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}injectUnsafeCSS(){const{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(t!=null){if(e==null||e===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===t&&this.appliedUnsafeCSS===e||(this.unsafeCSSStyle??=Ki(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=fn(e),this.appliedUnsafeCSS=e)}}applyThemeState(e,t,n,i){const r=e.shadowRoot??e.attachShadow({mode:"open"}),o=i??n,s=this.options.theme??P,l=typeof s=="string"?s:{...s},a=He(r);if(this.themeCSSStyle?.parentNode===r&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===o&&this.appliedThemeCSS.scrollbarGutter===a){this.appliedThemeCSS.theme=l;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===r){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:l,themeStyles:t,themeType:o,baseThemeType:i,scrollbarGutter:a};return}this.themeCSSStyle=mn({shadowRoot:r,currentNode:this.themeCSSStyle,themeCSS:pn(t,o,a)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{theme:l,themeStyles:t,themeType:o,baseThemeType:i,scrollbarGutter:a}:void 0}hydrateMeasuredScrollbar(){const e=this.fileContainer?.shadowRoot;e==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=Qi(this.themeCSSStyle.textContent??"",He(e)))}applyFullRender(e,t){this.cleanupErrorWrapper(),this.applyPreNodeAttributes(t,e),this.code=Ge({code:this.code}),this.code.innerHTML=this.fileRenderer.renderPartialHTML(this.fileRenderer.renderCodeAST(e)),t.replaceChildren(this.code),this.lastRowCount=e.rowCount}applyPartialRender(e,t){if(e==null||t==null)return!1;const{file:n,code:i}=this,r=i!=null?this.getColumns(i):void 0;if(n==null||i==null||r==null)return!1;const o=e.startingLine,s=t.startingLine,l=e.totalLines===1/0?Number.POSITIVE_INFINITY:o+e.totalLines,a=t.totalLines===1/0?Number.POSITIVE_INFINITY:s+t.totalLines,d=Math.max(o,s),h=Math.min(l,a);if(h<=d||!this.trimDOMToOverlap(r.gutter,d,h)||!this.trimDOMToOverlap(r.content,d,h))return!1;let{length:c}=r.content.children;const u=(y,C)=>{if(!(C<=0))return this.fileRenderer.renderFile(n,{startingLine:y,totalLines:C,bufferBefore:0,bufferAfter:0})},f=sh?u(h,p):void 0;return v===void 0&&a>h?!1:(this.cleanupErrorWrapper(),f!=null&&(r.gutter.insertAdjacentHTML("afterbegin",this.fileRenderer.renderPartialHTML(f.gutterAST)),r.content.insertAdjacentHTML("afterbegin",this.fileRenderer.renderPartialHTML(f.contentAST)),c+=f.rowCount),v!=null&&(r.gutter.insertAdjacentHTML("beforeend",this.fileRenderer.renderPartialHTML(v.gutterAST)),r.content.insertAdjacentHTML("beforeend",this.fileRenderer.renderPartialHTML(v.contentAST)),c+=v.rowCount),this.lastRowCount!==c&&(r.gutter.style.setProperty("grid-row",`span ${c}`),r.content.style.setProperty("grid-row",`span ${c}`),this.lastRowCount=c),!0)}getColumns(e){const t=e.children[0],n=e.children[1];if(!(!(t instanceof HTMLElement)||!(n instanceof HTMLElement)||t.dataset.gutter==null||n.dataset.content==null))return{gutter:t,content:n}}trimDOMToOverlap(e,t,n){const i=this.getDOMBoundaryIndices(e,[t,n]),r=i.get(t)??e.children.length,o=i.get(n)??e.children.length;if(r>o)return!1;for(let s=e.children.length-1;s>=o;s-=1)e.children[s]?.remove();for(let s=r-1;s>=0;s-=1)e.children[s]?.remove();return!0}getDOMBoundaryIndices(e,t){const n=[...new Set(t)].sort((l,a)=>l-a),i=new Map;if(n.length===0)return i;let r=0,o=n[r];const{children:s}=e;o===0&&(i.set(0,0),r+=1,o=n[r]);for(let l=0;l=o;)i.set(o,l),r+=1,o=n[r];if(r>=n.length)break}}for(const l of n)i.has(l)||i.set(l,s.length);return i}getLineIndexFromDOMNode(e){const t=e.dataset.lineIndex;if(t==null)return;const n=Number(t);return Number.isNaN(n)?void 0:n}applyBuffers(e,t){if(t==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(this.bufferBefore==null&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",e.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${t.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter==null&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",e.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${t.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyHeaderToDOM(e,t){const{file:n}=this;if(n==null)return;this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const i=this.cachedHeaderHTML??fe(e);if(this.cachedHeaderHTML=i,i!==this.lastRenderedHeaderHTML){const l=document.createElement("div");l.innerHTML=i;const a=l.firstElementChild;if(!(a instanceof HTMLElement))return;this.headerElement!=null?t.shadowRoot?.replaceChild(a,this.headerElement):t.shadowRoot?.prepend(a),this.headerElement=a,this.lastRenderedHeaderHTML=i}if(this.isContainerManaged)return;const{renderHeaderPrefix:r,renderCustomHeader:o,renderHeaderMetadata:s}=this.options;if(o!=null){const l=o(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,on,l),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0}else{const l=r?.(n)??void 0,a=s?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,nn,l),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,rn,a),this.headerCustom?.remove(),this.headerCustom=void 0}}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,i){if(i==null){t?.remove();return}const r=t??this.createHeaderSlotElement(n);return t==null&&e.appendChild(r),this.replaceHeaderSlotContent(r,i),r}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){const t=document.createElement("div");return t.slot=e,t}getOrCreateFileContainerNode(e,t){const{fileContainer:n}=this,i=e??n??document.createElement("diffs-container"),r=n!==i;return r&&this.emitPostRender(!0),this.fileContainer=i,n!=null&&r&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),r&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){const{shadowRoot:t}=e;if(t!=null)for(const n of t.children)n instanceof SVGElement?this.spriteSVG??=n:Ke(n)&&n.hasAttribute("data-theme-css")?(this.themeCSSStyle??=n,this.hasAdoptedThemeCSS=!0):Ke(n)&&n.hasAttribute("data-unsafe-css")&&(this.unsafeCSSStyle??=n,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){const t=e.shadowRoot??e.attachShadow({mode:"open"});if(this.spriteSVG==null){const n=document.createElement("div");n.innerHTML=Gi;const i=n.firstChild;i instanceof SVGElement&&(this.spriteSVG=i)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){const t=e.shadowRoot??e.attachShadow({mode:"open"});return this.pre==null?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.code=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(e.shadowRoot?.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodeFromPre(e){this.code=void 0;for(const t of Array.from(e.children))if(t instanceof HTMLElement&&t.hasAttribute("data-code")){this.code=t;return}}applyPreNodeAttributes(e,{totalLines:t}){const{overflow:n="scroll",disableLineNumbers:i=!1}=this.options,r={type:"file",split:!1,overflow:n,disableLineNumbers:i,diffIndicators:"none",disableBackground:!0,totalLines:t};ji(r,this.appliedPreAttributes)||(gn(e,r),this.appliedPreAttributes=r)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const n=t.shadowRoot??t.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",n.appendChild(this.errorWrapper);const i=document.createElement("div");i.dataset.errorMessage="",i.innerText=e.message,this.errorWrapper.appendChild(i);const r=document.createElement("pre");r.dataset.errorStack="",r.innerText=e.stack??"No Error Stack",this.errorWrapper.appendChild(r)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function Yo(e,t,n=!1){return!n&&e==null&&t!=null}function Xo(e,t,n=!1){return e==null&&t!=null&&!n}function Dt(e){return{...sn,...e}}function oe(e,t){const n=Qo(e,t);return t?n:e.diffHeaderHeight+n}function Qo(e,t){return e.paddingTop??(t?e.spacing:0)}function Ct(e){return e.paddingBottom??e.spacing}function Jo(e){switch(e){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}const Zo=5e3;let es=-1;function ts(e,t){return(e.overflow??"scroll")!==(t.overflow??"scroll")||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||e.unsafeCSS!==t.unsafeCSS}var ns=class extends Ko{virtualizer;metrics;__id=`virtualized-file:${++es}`;top;height=0;cache={heights:new Map,checkpoints:[],fileAnnotationHeight:0};isVisible=!1;isSetup=!1;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(e,t,n=sn,i,r=!1){super(e,i,r),this.virtualizer=t,this.metrics=n}setMetrics(e,t=!1){!t&&Re(this.metrics,e)||(this.metrics=e,this.resetLayoutCache())}setLineAnnotations(e){this.syncLineAnnotations(e)&&this.resetLayoutCache()}syncLineAnnotations(e){return e==null||e===this.lineAnnotations||e.length===0&&this.lineAnnotations.length===0?!1:(super.setLineAnnotations(e),!0)}hasLineAnnotations(){return this.lineAnnotations.some(e=>e.lineNumber>0)}getLineHeight(e,t=!1){const n=this.cache.heights.get(e);if(n!=null)return n;const i=t?2:1;return this.metrics.lineHeight*i}setOptions(e){if(this.isAdvancedMode())throw new Error("VirtualizedFile.setOptions cannot be used inside CodeView. Update CodeView options instead.");if(e==null)return;const{options:t}=this,n=!an(t,e),i=ts(t,e);super.setOptions(e),i&&this.resetLayoutCache(!0),n&&(this.forceRenderOverride=!0),n&&this.virtualizer.instanceChanged(this,i)}setThemeType(e){if(this.isAdvancedMode())throw new Error("VirtualizedFile.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(e)}resetLayoutCache(e=!1){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heights.size>0&&this.cache.heights.clear(),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.renderRange!=null&&(this.renderRange=void 0),e&&this.isSimpleMode()&&this.computeApproximateSize()}reconcileHeights(){let e=!1;if(this.fileContainer==null||this.file==null)return this.height!==0&&(e=!0),this.height=0,e;const{overflow:t="scroll"}=this.options;if(this.top=this.getVirtualizedTop(),t==="scroll"&&this.lineAnnotations.length===0&&!this.isResizeDebuggingEnabled()||this.code==null)return e;const n=this.code.children[1];if(!(n instanceof HTMLElement))return e;const i=qt(this.lineAnnotations);if(this.renderRange!=null&&i&&xt(this.renderRange)){const r=is(n)??0;r!==this.cache.fileAnnotationHeight&&(this.cache.fileAnnotationHeight=r,e=!0)}else!i&&this.cache.fileAnnotationHeight!==0&&(this.cache.fileAnnotationHeight=0,e=!0);for(const r of n.children){if(!(r instanceof HTMLElement))continue;const o=r.dataset.lineIndex;if(o==null)continue;const s=Number(o);let l=r.getBoundingClientRect().height,a=!1;r.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in r.nextElementSibling.dataset||"noNewline"in r.nextElementSibling.dataset)&&("noNewline"in r.nextElementSibling.dataset&&(a=!0),l+=r.nextElementSibling.getBoundingClientRect().height);const d=this.getLineHeight(s,a);l!==d&&(e=!0,l===this.metrics.lineHeight*(a?2:1)?this.cache.heights.delete(s):this.cache.heights.set(s,l))}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer==null||this.file==null?!1:(e&&(this.top=this.getVirtualizedTop()),this.render({file:this.file}));prepareCodeViewItem(e,t,n,i){const r=this.syncLineAnnotations(i);let o=n?.resetFileLayoutCache===!0||r;n?.metrics!=null&&(this.metrics=n.metrics,o=!0);const{collapsed:s=!1}=this.options;return this.currentCollapsed!==s&&(this.currentCollapsed=s,o=!0),o&&this.resetLayoutCache(),this.file!==e&&(this.layoutDirty=!0),this.file=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e){if(this.file==null||e<1)return;const{disableFileHeader:t=!1,collapsed:n=!1}=this.options,i=Dn(this.getOrCreateLineCache(this.file));let r=oe(this.metrics,t);if(n||i<0)return{top:r,height:0};const o=Math.min(Math.max(e-1,0),i),{overflow:s="scroll"}=this.options,{lineHeight:l}=this.metrics;if(r+=this.cache.fileAnnotationHeight,s==="scroll"&&!this.hasLineAnnotations())return{top:r+o*l,height:l};const a=this.getLayoutCheckpointBeforeLineIndex(o);r=a?.top??r;for(let d=a?.lineIndex??0;dl?void 0:{lineNumber:u+1,top:o+a+u*h}}let d=o+(s===0?a:this.renderRange.bufferBefore);for(let h=s;h<=l;h++){if(d>=e)return{lineNumber:h+1,top:d};d+=this.getLineHeight(h)}}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){if(this.top==null||this.file==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};const t=e!=null?this.computeRenderRangeFromWindow(this.file,this.top,e):this.renderRange;if(t==null)return;const{bufferBefore:n,bufferAfter:i,totalLines:r}=t;let o=0;if(r===0){const s=e??this.virtualizer.getWindowSpecs();this.top{this.addLayoutCheckpoint(h,this.height),this.height+=this.getLineHeight(h,!1)}}),l.length>0&&(this.height+=d),this.fileContainer!=null&&t&&!n){const h=this.fileContainer.getBoundingClientRect();h.height!==this.height?console.log("VirtualizedFile.computeApproximateSize: computed height doesnt match",{name:this.file.name,elementHeight:h.height,computedHeight:this.height}):console.log("VirtualizedFile.computeApproximateSize: computed height IS CORRECT")}this.layoutDirty=!1}setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){!this.enabled||this.file==null||(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}render({fileContainer:e,file:t,forceRender:n=!1,lineAnnotations:i,...r}){const{forceRenderOverride:o,isSetup:s}=this;this.forceRenderOverride=void 0;const l=this.syncLineAnnotations(i);if(l&&this.resetLayoutCache(),this.file??=t,e=this.getOrCreateFileContainerNode(e),this.file==null)return console.error("VirtualizedFile.render: attempting to virtually render when we dont have file"),!1;if(s)this.top??=this.getVirtualizedTop();else{this.computeApproximateSize();const c=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(c==null)throw new Error("VirtualizedFile.render: simple virtualizer is not available");c.connect(e,this),this.isVisible=c.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode())return this.renderPlaceholder(this.height);const a=this.virtualizer.getWindowSpecs(),d=this.top??0,h=this.computeRenderRangeFromWindow(this.file,d,a);return super.render({file:this.file,fileContainer:e,renderRange:h,lineAnnotations:i,forceRender:(o??n)||l,...r})}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}isSimpleMode(){return this.virtualizer.type==="simple"}isAdvancedMode(){return this.virtualizer.type==="advanced"}addLayoutCheckpoint(e,t){e%Zo===0&&this.cache.checkpoints.push({lineIndex:e,top:t})}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,i;for(;t<=n;){const r=t+n>>1,o=this.cache.checkpoints[r];if(o==null)throw new Error("VirtualizedFile: invalid checkpoint index");o.lineIndex<=e?(i=o,t=r+1):n=r-1}return i}getLayoutCheckpointBeforeTop(e,t){let n=0,i=this.cache.checkpoints.length-1,r=-1;for(;n<=i;){const o=n+i>>1,s=this.cache.checkpoints[o];if(s==null)throw new Error("VirtualizedFile: invalid checkpoint index");s.top<=e?(r=o,n=o+1):i=o-1}if(t==null)return r>=0?this.cache.checkpoints[r]:void 0;for(let o=r;o>=0;o--){const s=this.cache.checkpoints[o];if(s==null)throw new Error("VirtualizedFile: invalid checkpoint index");if(s.lineIndex%t===0)return s}}getVirtualizedTop(){return this.virtualizer.type==="advanced"?this.virtualizer.getLocalTopForInstance(this):this.fileContainer!=null?this.virtualizer.getOffsetInScrollContainer(this.fileContainer):0}getSimpleVirtualizer(){return this.virtualizer.type==="simple"?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}computeRenderRangeFromWindow(e,t,{top:n,bottom:i}){const{disableFileHeader:r=!1,overflow:o="scroll"}=this.options,{hunkLineCount:s,lineHeight:l}=this.metrics,a=this.getOrCreateLineCache(e),d=a.length,h=this.height,c=oe(this.metrics,r),u=d>0?Ct(this.metrics):0,{fileAnnotationHeight:f}=this.cache,p=c+f,v=Math.max(0,h-c-f-u),y=qt(this.lineAnnotations),C=t+c,g=f>0&&y&&Cn;if(ti)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:h-c-u};if(d<=s)return{startingLine:0,totalLines:s,bufferBefore:0,bufferAfter:0};const b=Math.ceil(Math.max(i-n,0)/l),m=Math.ceil(b/s)*s+s*2,x=m/s,S=(n+i)/2;if(o==="scroll"&&!this.hasLineAnnotations()){const Z=t+p,ve=Z+v;if(!g&&!(Zn))return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:h-c-u};const ae=Math.floor(g&&S{const ve=R%s===0,ae=Math.floor(R/s);if(ve&&(w[ae]=I-(t+p),H!=null)){if(H<=0)return!0;H--}const j=this.getLineHeight(Z,!1);return I>n-j&&IS&&(T??=ae),H==null&&I>=i&&ve&&(H=L),R++,I+=j,!1}}),E==null)if(g)E=0,T=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:h-c-u};T??=E;const N=Math.round(T-x/2),W=Math.max(0,Math.ceil(d/s)-x),M=Math.max(0,Math.min(N,W)),F=M*s,O=N<0?m+N*s:m,Q=w[M]??0,ge=F===0?0:f+Q,me=M+O/s,xe=me0&&(f[f.length-1]===` -`||f[f.length-1]==="\r"||f[f.length-1]===`\r -`||f[f.length-1]==="");)f.pop();const{additionStart:m,deletionStart:x}=v;h=d?h:x-1,c=d?c:m-1;const S={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:v.additionCount,additionStart:m,additionLines:y,deletionCount:v.deletionCount,deletionStart:x,deletionLines:C,deletionLineIndex:h,additionLineIndex:c,hunkContent:[],hunkContext:Fn(v.hunkContext),hunkSpecs:U(p),noEOFCRAdditions:!1,noEOFCRDeletions:!1};let L=0,w=0;for(let k=1;k=S.additionCount&&w>=S.deletionCount&&!I.startsWith("\\")){if(o&&gs(I)&&!ms(I))throw Error("parsePatchContent: hunk has more lines than expected");break}const R=I[0];if(R!=="+"&&R!=="-"&&R!==" "&&R!=="\\"){if(o)throw Error("parsePatchContent: invalid hunk line");console.error(`parseLineType: Invalid firstChar: "${R}", full line: "${I}"`),console.error("processFile: invalid rawLine:",I);continue}const E=Cs(R);if(E==="addition"){if(o&&L>=S.additionCount)throw Error("parsePatchContent: hunk has too many addition lines");const T=Pt(I);(g==null||g.type!=="change")&&(g=Ot("change",h,c),S.hunkContent.push(g)),c++,L++,d&&a.additionLines.push(T),g.additions++,y++,b="addition"}else if(E==="deletion"){if(o&&w>=S.deletionCount)throw Error("parsePatchContent: hunk has too many deletion lines");const T=Pt(I);(g==null||g.type!=="change")&&(g=Ot("change",h,c),S.hunkContent.push(g)),h++,w++,d&&a.deletionLines.push(T),g.deletions++,C++,b="deletion"}else if(E==="context"){if(o&&(w>=S.deletionCount||L>=S.additionCount))throw Error("parsePatchContent: hunk has too many context lines");const T=Pt(I);(g==null||g.type!=="context")&&(g=Ot("context",h,c),S.hunkContent.push(g)),c++,h++,L++,w++,d&&(a.deletionLines.push(T),a.additionLines.push(T)),g.lines++,b="context"}else if(E==="metadata"&&g!=null){if(g.type==="context"?(S.noEOFCRAdditions=!0,S.noEOFCRDeletions=!0):b==="deletion"?S.noEOFCRDeletions=!0:b==="addition"&&(S.noEOFCRAdditions=!0),d&&(b==="addition"||b==="context")){const T=a.additionLines.length-1;T>=0&&(a.additionLines[T]=ye(a.additionLines[T]))}if(d&&(b==="deletion"||b==="context")){const T=a.deletionLines.length-1;T>=0&&(a.deletionLines[T]=ye(a.deletionLines[T]))}}}if(o&&(L!==S.additionCount||w!==S.deletionCount))throw Error("parsePatchContent: hunk line count mismatch");S.additionLines=y,S.deletionLines=C,S.collapsedBefore=Math.max(S.additionStart-1-s,0),a.hunks.push(S),s=S.additionStart+S.additionCount-1;for(const k of S.hunkContent)k.type==="context"?(S.splitLineCount+=k.lines,S.unifiedLineCount+=k.lines):(S.splitLineCount+=Math.max(k.additions,k.deletions),S.unifiedLineCount+=k.deletions+k.additions);S.splitLineStart=a.splitLineCount+S.collapsedBefore,S.unifiedLineStart=a.unifiedLineCount+S.collapsedBefore,a.splitLineCount+=S.collapsedBefore+S.splitLineCount,a.unifiedLineCount+=S.collapsedBefore+S.unifiedLineCount}if(a!=null){if(o&&d&&!n&&a.hunks.length===0)throw Error("parsePatchContent: unified file has no hunks");if(a.hunks.length>0&&!d&&a.additionLines.length>0&&a.deletionLines.length>0){const u=a.hunks[a.hunks.length-1],f=u.additionStart+u.additionCount-1,p=a.additionLines.length,v=Math.max(p-f,0);a.splitLineCount+=v,a.unifiedLineCount+=v}return n||(a.prevName!=null&&a.name!==a.prevName?a.hunks.length>0?a.type="rename-changed":a.type="rename-pure":(i==null||i.contents==="")&&r!=null&&r.contents!==""?a.type="new":i!=null&&i.contents!==""&&(r==null||r.contents==="")&&(a.type="deleted")),a.type!=="rename-pure"&&a.type!=="rename-changed"&&(a.prevName=void 0),a}}function hs(e,t,n=!1){const i=[],r=cs(e)?e.split(Nr):[e];for(const o of r)try{i.push(as(o,t!=null?`${t}-${i.length}`:void 0,n))}catch(s){if(n)throw s;console.error(s)}return i}function cs(e){return e.startsWith("From ")||e.includes(` -From `)}function Pn(e){const t=tr(e);for(let n=0;nn&&t.push(e.slice(n,i)),n=i,s=!0,i=Qt(e,l);continue}if(s&&e.startsWith("@@ -",i)){const d=ir(e.slice(i,l));d!=null&&(r=d.deletionCount,o=d.additionCount)}i=l;continue}const a=e[i];if(a==="\\"){i=l;continue}a===" "?(r=Math.max(r-1,0),o=Math.max(o-1,0)):a==="-"?r=Math.max(r-1,0):a==="+"&&(o=Math.max(o-1,0)),i=l}return t.push(e.slice(n)),t}function ps(e){return nr(e,0)}function nr(e,t){const n=Qt(e,t);return On(e,t,"---")&&On(e,n,"+++")}function On(e,t,n){if(!e.startsWith(n,t))return!1;const i=e[t+n.length];if(i!==" "&&i!==" ")return!1;for(let r=t+n.length+1;r9)break;i=i*10+r}if(n!==t)return{value:i,endIndex:n}}function vs(e){return e.endsWith(`\r -`)?e.slice(0,-2):e.endsWith(` -`)?e.slice(0,-1):e}function bs(e){return e.startsWith("diff --git")||e.includes(` -diff --git`)}function rr(e,t){if(e.length===0)return[""];const n=` -${t}`,i=e.startsWith(t)?0:Nn(e,n,0);if(i===-1)return[e];const r=[];i>0&&r.push(e.slice(0,i));let o=i;for(;;){const s=Nn(e,n,o+1);if(s===-1)break;r.push(e.slice(o,s)),o=s}return r.push(e.slice(o)),r}function Nn(e,t,n){const i=e.indexOf(t,n);return i===-1?-1:i+1}function Fn(e){return e==null?e:U(e)}function Cs(e){return e===" "?"context":e==="\\"?"metadata":e==="+"?"addition":"deletion"}function Pt(e){const t=e.slice(1);return U(t===""?` -`:t)}function Ot(e,t,n){return e==="change"?{type:"change",additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:"context",lines:0,additionLineIndex:n,deletionLineIndex:t}}class vn{diff(t,n,i={}){let r;typeof i=="function"?(r=i,i={}):"callback"in i&&(r=i.callback);const o=this.castInput(t,i),s=this.castInput(n,i),l=this.removeEmpty(this.tokenize(o,i)),a=this.removeEmpty(this.tokenize(s,i));return this.diffWithOptionsObj(l,a,i,r)}diffWithOptionsObj(t,n,i,r){var o;const s=g=>{if(g=this.postProcess(g,i),r){setTimeout(function(){r(g)},0);return}else return g},l=n.length,a=t.length;let d=1,h=l+a;i.maxEditLength!=null&&(h=Math.min(h,i.maxEditLength));const c=(o=i.timeout)!==null&&o!==void 0?o:1/0,u=Date.now()+c,f=[{oldPos:-1,lastComponent:void 0}];let p=this.extractCommon(f[0],n,t,0,i);if(f[0].oldPos+1>=a&&p+1>=l)return s(this.buildValues(f[0].lastComponent,n,t));let v=-1/0,y=1/0;const C=()=>{for(let g=Math.max(v,-d);g<=Math.min(y,d);g+=2){let b;const m=f[g-1],x=f[g+1];m&&(f[g-1]=void 0);let S=!1;if(x){const w=x.oldPos-g;S=x&&0<=w&&w=a&&p+1>=l)return s(this.buildValues(b.lastComponent,n,t))||!0;f[g]=b,b.oldPos+1>=a&&(y=Math.min(y,g-1)),p+1>=l&&(v=Math.max(v,g+1))}d++};if(r)(function g(){setTimeout(function(){if(d>h||Date.now()>u)return r(void 0);C()||g()},0)})();else for(;d<=h&&Date.now()<=u;){const g=C();if(g)return g}}addToPath(t,n,i,r,o){const s=t.lastComponent;return s&&!o.oneChangePerToken&&s.added===n&&s.removed===i?{oldPos:t.oldPos+r,lastComponent:{count:s.count+1,added:n,removed:i,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+r,lastComponent:{count:1,added:n,removed:i,previousComponent:s}}}extractCommon(t,n,i,r,o){const s=n.length,l=i.length;let a=t.oldPos,d=a-r,h=0;for(;d+1u.length?p:u}),h.value=this.join(c)}else h.value=this.join(n.slice(a,a+h.count));a+=h.count,h.added||(d+=h.count)}}return r}}class Ss extends vn{}const ys=new Ss;function xs(e,t,n){return ys.diff(e,t,n)}const zn="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";class Ls extends vn{tokenize(t){const n=new RegExp(`(\\r?\\n)|[${zn}]+|[^\\S\\n\\r]+|[^${zn}]`,"ug");return t.match(n)||[]}}const ks=new Ls;function ws(e,t,n){return ks.diff(e,t,n)}class Ts extends vn{constructor(){super(...arguments),this.tokenize=Is}equals(t,n,i){return i.ignoreWhitespace?((!i.newlineIsToken||!t.includes(` -`))&&(t=t.trim()),(!i.newlineIsToken||!n.includes(` -`))&&(n=n.trim())):i.ignoreNewlineAtEof&&!i.newlineIsToken&&(t.endsWith(` -`)&&(t=t.slice(0,-1)),n.endsWith(` -`)&&(n=n.slice(0,-1))),super.equals(t,n,i)}}const Es=new Ts;function Un(e,t,n){return Es.diff(e,t,n)}function Is(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,` -`));const n=[],i=e.split(/(\n|\r\n)/);i[i.length-1]||i.pop();for(let r=0;r"~"||e[t]==='"'||e[t]==="\\")return!0;return!1}function be(e){if(!As(e))return e;let t='"';const n=new TextEncoder().encode(e);let i=0;for(;i=32&&r<=126?t+=String.fromCharCode(r):t+="\\"+r.toString(8).padStart(3,"0"),i++}return t+='"',t}const Bn={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function _n(e,t,n,i,r,o,s){let l;s?typeof s=="function"?l={callback:s}:l=s:l={},typeof l.context>"u"&&(l.context=4);const a=l.context;if(l.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(l.callback){const{callback:h}=l;Un(n,i,Object.assign(Object.assign({},l),{callback:c=>{const u=d(c);h(u)}}))}else return d(Un(n,i,l));function d(h){if(!h)return;h.push({value:"",lines:[]});function c(g){return g.map(function(b){return" "+b})}const u=[];let f=0,p=0,v=[],y=1,C=1;for(let g=0;g0?c(x.lines.slice(-a)):[],f-=v.length,p-=v.length)}for(const x of m)v.push((b.added?"+":"-")+x);b.added?C+=m.length:y+=m.length}else{if(f)if(m.length<=a*2&&g1&&!t.includeFileHeaders&&!e.every(h=>h.isGit))throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return e.map(h=>Jt(h,t)).join(` -`)}const a=[];if(e.isGit){if(t=Bn,!e.oldFileName)throw new Error("oldFileName must be specified for Git patches");if(!e.newFileName)throw new Error("newFileName must be specified for Git patches");let h=e.oldFileName,c=e.newFileName;e.isCreate&&h==="/dev/null"?h=c.replace(/^b\//,"a/"):e.isDelete&&c==="/dev/null"&&(c=h.replace(/^a\//,"b/")),a.push("diff --git "+be(h)+" "+be(c)),e.isDelete&&a.push("deleted file mode "+((n=e.oldMode)!==null&&n!==void 0?n:"100644")),e.isCreate&&a.push("new file mode "+((i=e.newMode)!==null&&i!==void 0?i:"100644")),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(a.push("old mode "+e.oldMode),a.push("new mode "+e.newMode)),e.isRename&&(a.push("rename from "+be(((r=e.oldFileName)!==null&&r!==void 0?r:"").replace(/^a\//,""))),a.push("rename to "+be(((o=e.newFileName)!==null&&o!==void 0?o:"").replace(/^b\//,"")))),e.isCopy&&(a.push("copy from "+be(((s=e.oldFileName)!==null&&s!==void 0?s:"").replace(/^a\//,""))),a.push("copy to "+be(((l=e.newFileName)!==null&&l!==void 0?l:"").replace(/^b\//,""))))}else t.includeIndex&&e.oldFileName==e.newFileName&&e.oldFileName!==void 0&&a.push("Index: "+e.oldFileName),t.includeUnderline&&a.push("===================================================================");const d=e.hunks.length>0;t.includeFileHeaders&&e.oldFileName!==void 0&&e.newFileName!==void 0&&(!e.isGit||d)&&(a.push("--- "+be(e.oldFileName)+(e.oldHeader?" "+e.oldHeader:"")),a.push("+++ "+be(e.newFileName)+(e.newHeader?" "+e.newHeader:"")));for(let h=0;h{l(a?Jt(a,s.headerOptions):void 0)}}))}else{const l=_n(e,t,n,i,r,o,s);return l?Jt(l,s?.headerOptions):void 0}}function Hs(e){const t=e.endsWith(` -`),n=e.split(` -`).map(i=>i+` -`);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function Zt(e,t,n,i=!1){const r=ds(Rs(e.name,t.name,e.contents,t.contents,e.header,t.header,n),{cacheKey:(()=>{if(e.cacheKey!=null&&t.cacheKey!=null)return`${e.cacheKey}:${t.cacheKey}`})(),oldFile:e,newFile:t,throwOnError:i});if(r==null)throw new Error("parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?");return t.lang!=null&&(r.lang=t.lang),r}var Ms=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,this.enabled=!1)}setup(e,t,n){if(t==null||n==null)for(const i of e.children??[])i instanceof HTMLElement&&("deletions"in i.dataset?t=i:"additions"in i.dataset&&(n=i));if(n==null||t==null){this.cleanUp();return}this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener("scroll",this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==n&&(this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),this.codeAdditions=n,n.addEventListener("scroll",this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function Fe(e,t){return Me(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function nt(e){return A({tagName:"div",properties:{"data-content-buffer":"","data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function it(e){return A({tagName:"div",children:[A({tagName:"span",children:[$("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":e,"data-column-content":""}})}function Nt(e){return A({tagName:"div",children:[ut({name:e==="both"?"diffs-icon-expand-all":"diffs-icon-expand",properties:{"data-icon":""}})],properties:{role:"button","data-expand-button":"","data-expand-both":e==="both"?"":void 0,"data-expand-up":e==="up"?"":void 0,"data-expand-down":e==="down"?"":void 0}})}function Le({type:e,content:t,expandIndex:n,chunked:i=!1,slotName:r,isFirstHunk:o,isLastHunk:s}){let l=0;const a=[];if(e==="metadata"&&t!=null&&a.push(A({tagName:"div",children:[$(t)],properties:{"data-separator-wrapper":""}})),(e==="line-info"||e==="line-info-basic")&&t!=null){const d=[];n!=null&&(i?(o||(d.push(Nt("up")),l++),s||(d.push(Nt("down")),l++)):(d.push(Nt(!o&&!s?"both":o?"down":"up")),l++)),d.push(A({tagName:"div",children:[A({tagName:"span",children:[$(t)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),i&&n!=null&&d.push(A({tagName:"div",children:[$("Expand all")],properties:{role:"button","data-expand-button":"","data-expand-all-button":""}})),a.push(A({tagName:"div",children:d,properties:{"data-separator-wrapper":"","data-separator-multi-button":l>1?"":void 0}}))}return e==="custom"&&r!=null&&a.push(A({tagName:"slot",properties:{name:r}})),A({tagName:"div",children:a,properties:{"data-separator":a.length===0?"simple":e,"data-expand-index":n,"data-separator-first":o?"":void 0,"data-separator-last":s?"":void 0}})}function Ds(e,t){return`hunk-separator-${e}-${t}`}function Ps(e){const t=e.at(-1);return t==null?0:Math.max(t.additionStart+t.additionCount,t.deletionStart+t.deletionCount)}function Os(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}function Vn({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":""},alwaysWrap:!0}}function rt({item:e,arr:t,enableJoin:n,isNeutral:i=!1,isLastItem:r=!1}){const o=t[t.length-1];if(o==null||r||!n){t.push([i?0:1,e.value]);return}const s=o[0]===0;if(i===s||i&&e.value.length===1&&!s){o[1]+=e.value;return}t.push([i?0:1,e.value])}function Ye({isPartial:e,rangeSize:t,expandedHunks:n,hunkIndex:i,collapsedContextThreshold:r}){const o=Math.max(t,0);if(o===0||e)return{fromStart:0,fromEnd:0,rangeSize:o,collapsedLines:o,renderAll:!1};if(n===!0||o<=r)return{fromStart:o,fromEnd:0,rangeSize:o,collapsedLines:0,renderAll:!0};const s=n?.get(i),l=Math.min(Math.max(s?.fromStart??0,0),o),a=Math.min(Math.max(s?.fromEnd??0,0),o),d=l+a,h=d>=o;return{fromStart:h?o:l,fromEnd:h?0:a,rangeSize:o,collapsedLines:Math.max(o-d,0),renderAll:h}}function or({fileDiff:e,errorPrefix:t}){const n=e.hunks[e.hunks.length-1];if(n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;const i=e.additionLines.length-(n.additionLineIndex+n.additionCount),r=e.deletionLines.length-(n.deletionLineIndex+n.deletionCount);if(i<=0&&r<=0)return 0;if(i!==r)throw new Error(`${t}: trailing context mismatch (additions=${i}, deletions=${r}) for ${e.name}`);return Math.min(i,r)}function Xe({fileDiff:e,hunkIndex:t,expandedHunks:n,collapsedContextThreshold:i,errorPrefix:r}){if(t!==e.hunks.length-1)return;const o=or({fileDiff:e,errorPrefix:r});if(o<=0)return;if(n===!0||o<=i)return{fromStart:o,fromEnd:0,rangeSize:o,collapsedLines:0,renderAll:!0};const s=n?.get(e.hunks.length),l=Math.min(Math.max(s?.fromStart??0,0),o);return{fromStart:l,fromEnd:0,rangeSize:o,collapsedLines:o-l,renderAll:l>=o}}function sr({type:e,metrics:t}){return t.hunkSeparatorHeight??Jo(e)}function ar({type:e,metrics:t}){return e==="simple"||e==="metadata"||e==="line-info-basic"?0:t.spacing}function Ns({type:e,hunkIndex:t,hunkSpecs:n}){switch(e){case"simple":return t>0;case"metadata":return n!=null;case"line-info":case"line-info-basic":case"custom":return!0}}function Fs(e){return e!=="simple"&&e!=="metadata"}function Ve({type:e,metrics:t,hunkIndex:n,hunkSpecs:i}){if(!Ns({type:e,hunkIndex:n,hunkSpecs:i}))return;const r=sr({type:e,metrics:t}),o=ar({type:e,metrics:t}),s=n>0?o:0,l=o;return{height:r,gapBefore:s,gapAfter:l,totalHeight:s+r+l}}function $e({type:e,metrics:t}){if(!Fs(e))return;const n=sr({type:e,metrics:t}),i=ar({type:e,metrics:t});return{height:n,gapBefore:i,gapAfter:0,totalHeight:i+n}}function je({diff:e,diffStyle:t,startingLine:n=0,totalLines:i=1/0,expandedHunks:r,collapsedContextThreshold:o=1,callback:s}){const l=zs({diff:e,diffStyle:t,startingLine:n,expandedHunks:r,collapsedContextThreshold:o}),a={viewportStart:n,viewportEnd:n+i,isWindowedHighlight:n>0||i<1/0,splitCount:l.splitCount,unifiedCount:l.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!a.isWindowedHighlight)return!1;const d=a.unifiedCount>=n+i,h=a.splitCount>=n+i;return t==="unified"?d:(t==="split"||d)&&h},shouldSkip(d,h){if(!a.isWindowedHighlight)return!1;const c=a.unifiedCount+d=n-d&&a.unifiedCount=n-d&&a.splitCount0?0:t==="unified"?w===h.unifiedLineStart+h.unifiedLineCount-1?u.collapsedLines:0:k===h.splitLineStart+h.splitLineCount-1?u.collapsedLines:0},y=function(){return v?0:(v=!0,c.collapsedLines)};const h=e.hunks[d];if(h==null)throw new Error("iterateOverDiff: invalid hunk index");if(a.shouldBreak())break;const c=Ye({isPartial:e.isPartial,rangeSize:h.collapsedBefore,expandedHunks:r,hunkIndex:d,collapsedContextThreshold:o}),u=d===a.finalHunkIndex?Xe({fileDiff:e,hunkIndex:d,expandedHunks:r,collapsedContextThreshold:o,errorPrefix:"iterateOverDiff"}):void 0,f=c.fromStart+c.fromEnd;let v=c.collapsedLines===0;if(a.shouldSkip(f,f))a.incrementCounts(f,f),y();else{let w=h.unifiedLineStart-c.rangeSize,k=h.splitLineStart-c.rangeSize,I=h.deletionLineIndex-c.rangeSize,R=h.additionLineIndex-c.rangeSize,E=h.deletionStart-c.rangeSize,T=h.additionStart-c.rangeSize;if(ot(a,c.fromStart,t,H=>a.emit({hunkIndex:d,hunk:h,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:E+H,lineIndex:I+H,noEOFCR:!1,unifiedLineIndex:w+H,splitLineIndex:k+H},additionLine:{unifiedLineIndex:w+H,splitLineIndex:k+H,lineIndex:R+H,lineNumber:T+H,noEOFCR:!1}}))||(w=h.unifiedLineStart-c.fromEnd,k=h.splitLineStart-c.fromEnd,I=h.deletionLineIndex-c.fromEnd,R=h.additionLineIndex-c.fromEnd,E=h.deletionStart-c.fromEnd,T=h.additionStart-c.fromEnd,ot(a,c.fromEnd,t,H=>a.emit({hunkIndex:d,hunk:h,collapsedBefore:y(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:E+H,lineIndex:I+H,noEOFCR:!1,unifiedLineIndex:w+H,splitLineIndex:k+H},additionLine:{unifiedLineIndex:w+H,splitLineIndex:k+H,lineIndex:R+H,lineNumber:T+H,noEOFCR:!1}}),()=>{y()})))break e}let C=h.unifiedLineStart,g=h.splitLineStart,b=h.deletionLineIndex,m=h.additionLineIndex,x=h.deletionStart,S=h.additionStart;const L=h.hunkContent.at(-1);for(const w of h.hunkContent){if(a.shouldBreak())break e;const k=w===L;if(w.type==="context"){if(a.shouldSkip(w.lines,w.lines))a.incrementCounts(w.lines,w.lines),y();else if(ot(a,w.lines,t,I=>{const R=k&&I===w.lines-1,E=C+I,T=g+I;return a.emit({hunkIndex:d,hunk:h,collapsedBefore:y(),collapsedAfter:p(E,T),type:"context",deletionLine:{lineNumber:x+I,lineIndex:b+I,noEOFCR:R&&h.noEOFCRDeletions,unifiedLineIndex:E,splitLineIndex:T},additionLine:{unifiedLineIndex:E,splitLineIndex:T,lineIndex:m+I,lineNumber:S+I,noEOFCR:R&&h.noEOFCRAdditions}})},()=>{y()}))break e;C+=w.lines,g+=w.lines,b+=w.lines,m+=w.lines,x+=w.lines,S+=w.lines}else{const I=Math.max(w.deletions,w.additions),R=w.deletions+w.additions;if(!a.shouldSkip(R,I)){const E=_s(a,w,t);(E[0]?.[0]??0)>0&&y();for(const[T,H]of E)for(let N=T;N{const T=E===R-1;return a.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:T?w:0,type:"context-expanded",deletionLine:{lineNumber:x+E,lineIndex:b+E,noEOFCR:!1,unifiedLineIndex:C+E,splitLineIndex:g+E},additionLine:{unifiedLineIndex:C+E,splitLineIndex:g+E,lineIndex:m+E,lineNumber:S+E,noEOFCR:!1}})},void 0,()=>a.shouldBreak()))break e}}}function zs({diff:e,diffStyle:t,startingLine:n,expandedHunks:i,collapsedContextThreshold:r}){if(n<=0||t==="both")return{hunkIndex:0,splitCount:0,unifiedCount:0};const o=Us({diff:e,expandedHunks:i,collapsedContextThreshold:r});let s=0,l=e.hunks.length-1,a=e.hunks.length;for(;s<=l;){const h=s+l>>1,c=o[h+1];if(c==null)throw new Error("iterateOverDiff: invalid hunk prefix index");(t==="unified"?c.unifiedCount:c.splitCount)>n?(a=h,l=h-1):s=h+1}if(a>=e.hunks.length){const h=o[e.hunks.length];if(h==null)throw new Error("iterateOverDiff: invalid terminal hunk prefix index");return{hunkIndex:e.hunks.length,splitCount:h.splitCount,unifiedCount:h.unifiedCount}}const d=o[a];if(d==null)throw new Error("iterateOverDiff: invalid selected hunk prefix index");return{hunkIndex:a,splitCount:d.splitCount,unifiedCount:d.unifiedCount}}function Us({diff:e,expandedHunks:t,collapsedContextThreshold:n}){let i=0,r=0;const o=e.hunks.length-1,s=[{splitCount:0,unifiedCount:0}];for(let l=0;la&&i.push([a,d])}if(n!=="split"&&r(e.unifiedCount),n!=="unified"&&r(e.splitCount),i.length===0)return[0,0];let o=i[0][0],s=i[0][1];for(let l=1;l0&&(e.incrementCounts(s,s),r?.());let a=s;for(;a=l){e.incrementCounts(t-a,t-a);break}if(e.isInWindow(0,0)){if(i(a)===!0)return!0}else e.incrementCounts(1,1);a++}return!1}function _s(e,t,n){if(!e.isWindowedHighlight)return[[0,n==="unified"?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];const i=n!=="split",r=n!=="unified",o=n==="unified"?"unified":"split",s=[];function l(c,u){if(c+u<=e.viewportStart||c>=e.viewportEnd)return;const f=Math.max(0,e.viewportStart-c),p=Math.min(u,e.viewportEnd-c);return p>f?[f,p]:void 0}function a(c,u){return o==="split"?c:u==="additions"?[c[0]+t.deletions,c[1]+t.deletions]:c}function d(c,u){if(c==null)return;const[f,p]=a(c,u);p>f&&s.push([f,p])}if(i&&(d(l(e.unifiedCount,t.deletions),"deletions"),d(l(e.unifiedCount+t.deletions,t.additions),"additions")),r&&(d(l(e.splitCount,t.deletions),"deletions"),d(l(e.splitCount,t.additions),"additions")),s.length===0)return s;s.sort((c,u)=>c[0]-u[0]);const h=[s[0]];for(const[c,u]of s.slice(1)){const f=h[h.length-1];c<=f[1]?f[1]=Math.max(f[1],u):h.push([c,u])}return h}function Vs({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:i,diffStyle:r,index:o,unifiedLineIndex:s,splitLineIndex:l,additionLineIndex:a,deletionLineIndex:d,additionLineNumber:h,deletionLineNumber:c,content:u,isLastContent:f,unifiedCount:p,splitCount:v}){const y=o=u.deletions?s+o:void 0:o=u.deletions?a+(o-u.deletions):void 0:o=u.deletions?h+(o-u.deletions):void 0:o0||o<1/0,d=typeof n.theme=="string"?t.getTheme(n.theme).type:void 0,h=hn({theme:n.theme,highlighter:t}),c=i&&!a&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":n.lineDiffType,u={deletionLines:[],additionLines:[]},{maxLineDiffLength:f}=n,p=!i&&!e.isPartial,v=i?s:void 0,y=new Map;function C(b){const m=p?0:b,x=y.get(m)??js();return y.set(m,x),x}function g(b,m,x,S){if(a){let L=x.at(-1);(L==null||L.targetIndex+L.count!==m)&&(L={targetIndex:m,originalOffset:S.length,count:0},x.push(L)),L.count++}S.push(b)}je({diff:e,diffStyle:"both",startingLine:r,totalLines:o,expandedHunks:a?v:!0,collapsedContextThreshold:l,callback:({hunkIndex:b,additionLine:m,deletionLine:x,type:S})=>{const L=C(b),w=m!=null?m.splitLineIndex:x.splitLineIndex;S==="change"&&m!=null&&x!=null&&Gs({additionLine:e.additionLines[m.lineIndex],deletionLine:e.deletionLines[x.lineIndex],deletionLineIndex:L.deletionContent.length,additionLineIndex:L.additionContent.length,deletionDecorations:L.deletionDecorations,additionDecorations:L.additionDecorations,lineDiffType:c,maxLineDiffLength:f}),x!=null&&(g(e.deletionLines[x.lineIndex],x.lineIndex,L.deletionSegments,L.deletionContent),L.deletionInfo.push({type:S==="change"?"change-deletion":S,lineNumber:x.lineNumber,altLineNumber:S==="change"?void 0:m.lineNumber??void 0,lineIndex:`${x.unifiedLineIndex},${w}`})),m!=null&&(g(e.additionLines[m.lineIndex],m.lineIndex,L.additionSegments,L.additionContent),L.additionInfo.push({type:S==="change"?"change-addition":S,lineNumber:m.lineNumber,altLineNumber:S==="change"?void 0:x.lineNumber??void 0,lineIndex:`${m.unifiedLineIndex},${w}`}))}});for(const b of y.values()){if(b.deletionContent.length===0&&b.additionContent.length===0)continue;const m={name:e.prevName??e.name,contents:b.deletionContent.value},x={name:e.name,contents:b.additionContent.value},{deletionLines:S,additionLines:L}=qs({deletionFile:m,deletionInfo:b.deletionInfo,deletionDecorations:b.deletionDecorations,additionFile:x,additionInfo:b.additionInfo,additionDecorations:b.additionDecorations,highlighter:t,options:n,languageOverride:i?"text":e.lang});if(p){u.deletionLines=S,u.additionLines=L;continue}if(b.deletionSegments.length>0)for(const w of b.deletionSegments)for(let k=0;k0)for(const w of b.additionSegments)for(let k=0;kl||t.length>l))return;const a=s==="char"?xs(e,t):ws(e,t),d=[],h=[],c=s==="word-alt",u=a.at(-1);for(const p of a){const v=p===u;!p.added&&!p.removed?(rt({item:p,arr:d,enableJoin:c,isNeutral:!0,isLastItem:v}),rt({item:p,arr:h,enableJoin:c,isNeutral:!0,isLastItem:v})):p.removed?rt({item:p,arr:d,enableJoin:c,isLastItem:v}):rt({item:p,arr:h,enableJoin:c,isLastItem:v})}let f=0;for(const p of d)p[0]===1&&r.push(Vn({line:n,spanStart:f,spanLength:p[1].length})),f+=p[1].length;f=0;for(const p of h)p[0]===1&&o.push(Vn({line:i,spanStart:f,spanLength:p[1].length})),f+=p[1].length}function js(){return{deletionContent:{push(e){this.value+=e,this.length++},value:"",length:0},additionContent:{push(e){this.value+=e,this.length++},value:"",length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function qs({deletionFile:e,additionFile:t,deletionInfo:n,additionInfo:i,highlighter:r,deletionDecorations:o,additionDecorations:s,languageOverride:l,options:{theme:a=P,...d}}){const h=l??X(e.name),c=l??X(t.name),{state:u,transformers:f}=_i(d.useTokenTransformer),p=typeof a=="string"?{...d,lang:"text",theme:a,transformers:f,decorations:void 0,defaultColor:!1,cssVariablePrefix:_("token"),tokenizeTimeLimit:0}:{...d,lang:"text",themes:a,transformers:f,decorations:void 0,defaultColor:!1,cssVariablePrefix:_("token"),tokenizeTimeLimit:0};return{deletionLines:e.contents===""?[]:(p.lang=h,u.lineInfo=n,p.decorations=o,jt(r.codeToHast(ye(e.contents),p))),additionLines:t.contents===""?[]:(p.lang=c,p.decorations=s,u.lineInfo=i,jt(r.codeToHast(ye(t.contents),p)))}}function en(e){const t=e.lang??X(e.name),n=e.lang??(e.prevName!=null?X(e.prevName):"text");return t==="text"&&n==="text"}let Ks=-1;var lr=class{options;onRenderUpdate;workerManager;__id=`diff-hunks-renderer:${++Ks}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang="text";renderCache;constructor(e={theme:P},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=We(e.theme??P)?Fi():void 0)}cleanUp(){this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this)}clearRenderCache(){this.renderCache=void 0}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){const i={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t==="up"||t==="both")&&(i.fromStart+=n),(t==="down"||t==="both")&&(i.fromEnd+=n),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(e,i)}getExpandedHunk(e){return this.expandedHunks.get(e)??Kr}getExpandedHunksMap(){return this.expandedHunks}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(const t of e){const n=(()=>{switch(t.side){case"deletions":return this.deletionAnnotations;case"additions":return this.additionAnnotations}})(),i=n[t.lineNumber]??[];n[t.lineNumber]=i,i.push(t)}}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e}}getSplitLineDecoration({side:e,type:t}){return t!=="change"?{gutterLineType:t}:{gutterLineType:e==="deletions"?"change-deletion":"change-addition"}}createAnnotationElement=e=>Gt(e);getOptionsWithDefaults(){const{diffIndicators:e="bars",diffStyle:t="split",disableBackground:n=!1,disableFileHeader:i=!1,disableLineNumbers:r=!1,disableVirtualizationBuffers:o=!1,collapsed:s=!1,expandUnchanged:l=!1,collapsedContextThreshold:a=1,expansionLineCount:d=100,hunkSeparators:h="line-info",lineDiffType:c="word-alt",maxLineDiffLength:u=1e3,overflow:f="scroll",stickyHeader:p=!1,theme:v=P,headerRenderMode:y="default",tokenizeMaxLineLength:C=1e3,tokenizeMaxLength:g=Gr,useTokenTransformer:b=!1,useCSSClasses:m=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:i,disableLineNumbers:r,disableVirtualizationBuffers:o,collapsed:s,expandUnchanged:l,collapsedContextThreshold:a,expansionLineCount:d,hunkSeparators:h,lineDiffType:c,maxLineDiffLength:u,overflow:f,stickyHeader:p,theme:this.workerManager?.getDiffRenderOptions().theme??v,headerRenderMode:y,tokenizeMaxLineLength:C,tokenizeMaxLength:g,useTokenTransformer:b,useCSSClasses:m}}async initializeHighlighter(){return this.highlighter=await St(dn(this.computedLang,this.options)),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;const{options:t}=this.getRenderOptions(e),n=zt(e,this.getTokenizeMaxLength());let i=this.workerManager?.getDiffResultCache(e);i!=null&&!Fe(t,i.options)&&(i=void 0),this.renderCache??={diff:e,highlighted:!n&&!en(e),options:t,result:n?void 0:i?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter==null&&(this.computedLang=e.lang??X(e.name),this.initializeHighlighter())}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();const{theme:i,tokenizeMaxLineLength:r,lineDiffType:o,maxLineDiffLength:s}=this.getOptionsWithDefaults();return{theme:i,useTokenTransformer:Wi(this.options),tokenizeMaxLineLength:r,lineDiffType:o,maxLineDiffLength:s}})();this.getOptionsWithDefaults();const{renderCache:n}=this;return n?.result==null?{options:t,forceHighlight:!0}:!_e(e,n.diff)||!Fe(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}renderDiff(e=this.renderCache?.diff,t=Ae){if(e==null)return;const{expandUnchanged:n=!1,collapsedContextThreshold:i}=this.getOptionsWithDefaults();let{options:r,forceHighlight:o}=this.getRenderOptions(e);const s=this.getMatchingWorkerResultCache(e,r);s!=null&&!this.hasHighlightedRenderCache(e,r)&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...s},o=!1),this.renderCache??={diff:e,highlighted:!1,options:r,result:void 0,renderRange:void 0};const l=e.additionLines.length>0||e.deletionLines.length>0,a=!l||en(e)||zt(e,this.getTokenizeMaxLength()),d=!_e(e,this.renderCache.diff),h=!yt(this.renderCache.renderRange,t);if(this.workerManager?.isWorkingPool()===!0)(a||this.renderCache.result==null||!this.renderCache.highlighted&&(d||h))&&(this.renderCache.diff=e,this.renderCache.options=r,this.renderCache.highlighted=!1,(this.renderCache.result==null||d||h||o)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,Os(t)||n?!0:this.expandedHunks,i)),this.renderCache.renderRange=t),!a&&l&&(!this.renderCache.highlighted||o)&&this.workerManager.highlightDiffAST(this,e);else{this.computedLang=e.lang??X(e.name);const c=this.highlighter!=null&&We(r.theme),u=this.highlighter!=null&&pt(this.computedLang),f=!a&&u;if(this.highlighter!=null&&c&&(o||a||!this.renderCache.highlighted&&f||this.renderCache.result==null)){const{result:p,options:v}=this.renderDiffWithHighlighter(e,this.highlighter,a||!u);this.renderCache={diff:e,options:v,highlighted:f,result:p,renderRange:void 0}}(!c||!a&&!u)&&this.asyncHighlight(e).then(({result:p,options:v})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,p,v,!a)})}return this.renderCache.result!=null?this.processDiffResult(this.renderCache.diff,t,this.renderCache.result):void 0}async asyncRender(e,t=Ae){const{result:n}=await this.asyncHighlight(e);return this.processDiffResult(e,t,n)}createPreElement(e,t,n){const{diffIndicators:i,disableBackground:r,disableLineNumbers:o,overflow:s}=this.getOptionsWithDefaults();return Ui({type:"diff",diffIndicators:i,disableBackground:r,disableLineNumbers:o,overflow:s,split:e,totalLines:t,customProperties:n})}async asyncHighlight(e){const t=zt(e,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??X(e.name);const n=this.highlighter!=null&&We(this.options.theme??P),i=t||this.highlighter!=null&&pt(this.computedLang);return(this.highlighter==null||!n||!i)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter,t)}renderDiffWithHighlighter(e,t,n=!1){const{options:i}=this.getRenderOptions(e),{collapsedContextThreshold:r}=this.getOptionsWithDefaults();return{result:Ws(e,t,i,{forcePlainText:n,expandedHunks:n?!0:void 0,collapsedContextThreshold:r}),options:i}}onHighlightSuccess(e,t,n,i=!0){if(this.renderCache==null)return;const r=!this.renderCache.highlighted||!Fe(this.renderCache.options,n)||!_e(this.renderCache.diff,e);this.renderCache={diff:e,options:n,highlighted:i,result:t,renderRange:void 0},r&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){const n=this.workerManager?.getDiffResultCache(e);if(!(n==null||!Fe(t,n.options)))return n}hasHighlightedRenderCache(e,t){const{renderCache:n}=this;return n?.result!=null&&n.highlighted&&_e(e,n.diff)&&Fe(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(e,t,{code:n,themeStyles:i,baseThemeType:r}){const{diffStyle:o,disableFileHeader:s,expandUnchanged:l,expansionLineCount:a,collapsedContextThreshold:d,hunkSeparators:h}=this.getOptionsWithDefaults();this.diff=e;const c=o==="unified";let u=[],f=[],p=[];const v=[],{additionLines:y,deletionLines:C}=n,g={rowCount:0,hunkSeparators:h,additionsContentAST:u,deletionsContentAST:f,unifiedContentAST:p,unifiedGutterAST:we(),deletionsGutterAST:we(),additionsGutterAST:we(),expansionLineCount:a,hunkData:v,incrementRowCount(T=1){g.rowCount+=T},pushToGutter(T,H){switch(T){case"unified":g.unifiedGutterAST.children.push(H);break;case"deletions":g.deletionsGutterAST.children.push(H);break;case"additions":g.additionsGutterAST.children.push(H);break}}},b=or({fileDiff:e,errorPrefix:"DiffHunksRenderer.processDiffResult"}),m={size:0,side:void 0,increment(){this.size+=1},flush(){if(o!=="unified"){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side==="additions"?(g.pushToGutter("additions",G(void 0,"buffer",this.size)),u?.push(nt(this.size))):(g.pushToGutter("deletions",G(void 0,"buffer",this.size)),f?.push(nt(this.size))),this.size=0,this.side=void 0}}},x=(T,H,N,W,M)=>{g.pushToGutter(T,Ai(H,N,W,M))};function S(T){m.flush(),o==="unified"?Ft("unified",T,g):(Ft("deletions",T,g),Ft("additions",T,g))}this.pushFileLevelAnnotations(e,o,t,g),je({diff:e,diffStyle:o,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:l?!0:this.expandedHunks,collapsedContextThreshold:d,callback:({hunkIndex:T,hunk:H,collapsedBefore:N,collapsedAfter:W,additionLine:M,deletionLine:F,type:O})=>{const Q=F!=null?F.splitLineIndex:M.splitLineIndex,ge=M!=null?M.unifiedLineIndex:F.unifiedLineIndex;o==="split"&&O!=="change"&&m.flush(),N>0&&S({hunkIndex:T,collapsedLines:N,rangeSize:Math.max(H?.collapsedBefore??0,0),hunkSpecs:H?.hunkSpecs,isFirstHunk:T===0,isLastHunk:!1,isExpandable:!e.isPartial});const me=o==="unified"?ge:Q,xe={type:O,hunkIndex:T,lineIndex:me,unifiedLineIndex:ge,splitLineIndex:Q,deletionLine:F,additionLine:M};if(o==="unified"){const D=this.getUnifiedInjectedRowsForLine?.(xe);D?.before!=null&&Gn(D.before,g);let B=F!=null?C[F.lineIndex]:void 0,z=M!=null?y[M.lineIndex]:void 0;if(B==null&&z==null){const te="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(te,{file:e.name}),new Error(te)}const le=O==="change"?M!=null?"change-addition":"change-deletion":O,ee=this.getUnifiedLineDecoration({type:O,lineType:le,additionLineIndex:M?.lineIndex,deletionLineIndex:F?.lineIndex});x("unified",ee.gutterLineType,M!=null?M.lineNumber:F.lineNumber,`${ge},${Q}`,ee.gutterProperties),z!=null?z=at(z,ee.contentProperties):B!=null&&(B=at(B,ee.contentProperties)),st({diffStyle:"unified",type:O,deletionLine:B,additionLine:z,unifiedSpan:this.getAnnotations("unified",F?.lineNumber,M?.lineNumber,T,me),createAnnotationElement:te=>this.createAnnotationElement(te),context:g}),D?.after!=null&&Gn(D.after,g)}else{const D=this.getSplitInjectedRowsForLine?.(xe);D?.before!=null&&jn(D.before,g,m);let B=F!=null?C[F.lineIndex]:void 0,z=M!=null?y[M.lineIndex]:void 0;const le=this.getSplitLineDecoration({side:"deletions",type:O,lineIndex:F?.lineIndex}),ee=this.getSplitLineDecoration({side:"additions",type:O,lineIndex:M?.lineIndex});if(B==null&&z==null){const q="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(q,{file:e.name}),new Error(q)}const te=(()=>{if(O==="change"){if(z==null)return"additions";if(B==null)return"deletions"}})();if(te!=null){if(m.side!=null&&m.side!==te)throw new Error("DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits");m.side=te,m.increment()}const De=this.getAnnotations("split",F?.lineNumber,M?.lineNumber,T,me);if(De!=null&&m.size>0&&m.flush(),F!=null){const q=at(B,le.contentProperties);x("deletions",le.gutterLineType,F.lineNumber,`${F.unifiedLineIndex},${Q}`,le.gutterProperties),q!=null&&(B=q)}if(M!=null){const q=at(z,ee.contentProperties);x("additions",ee.gutterLineType,M.lineNumber,`${M.unifiedLineIndex},${Q}`,ee.gutterProperties),q!=null&&(z=q)}st({diffStyle:"split",type:O,additionLine:z,deletionLine:B,...De,createAnnotationElement:q=>this.createAnnotationElement(q),context:g}),D?.after!=null&&jn(D.after,g,m)}const Z=o==="split"&&H!=null&&Q===H.splitLineStart+H.splitLineCount-1,ve=Z?H.noEOFCRDeletions:!1,ae=Z?H.noEOFCRAdditions:!1,j=(F?.noEOFCR??!1)||ve,Se=(M?.noEOFCR??!1)||ae;if(Se||j){if(o==="split"&&m.flush(),j){const D=O==="context"||O==="context-expanded"?O:"change-deletion";o==="unified"?(g.unifiedContentAST.push(it(D)),g.pushToGutter("unified",G(D,"metadata",1))):(g.deletionsContentAST.push(it(D)),g.pushToGutter("deletions",G(D,"metadata",1)),Se||(g.pushToGutter("additions",G(void 0,"buffer",1)),g.additionsContentAST.push(nt(1))))}if(Se){const D=O==="context"||O==="context-expanded"?O:"change-addition";o==="unified"?(g.unifiedContentAST.push(it(D)),g.pushToGutter("unified",G(D,"metadata",1))):(g.additionsContentAST.push(it(D)),g.pushToGutter("additions",G(D,"metadata",1)),j||(g.pushToGutter("deletions",G(void 0,"buffer",1)),g.deletionsContentAST.push(nt(1))))}g.incrementRowCount(1)}W>0&&h!=="simple"&&S({hunkIndex:O==="context-expanded"?T:T+1,collapsedLines:W,rangeSize:b,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!e.isPartial}),g.incrementRowCount(1)}}),o==="split"&&m.flush();const L=Math.max(Ps(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),w=t.bufferBefore>0||t.bufferAfter>0,k=!c&&e.type!=="deleted",I=!c&&e.type!=="new",R=g.rowCount>0||w;u=k&&R?u:void 0,f=I&&R?f:void 0,p=c&&R?p:void 0;const E=this.createPreElement(f!=null&&u!=null,L);return{unifiedGutterAST:c&&R?g.unifiedGutterAST.children:void 0,unifiedContentAST:p,deletionsGutterAST:I&&R?g.deletionsGutterAST.children:void 0,deletionsContentAST:f,additionsGutterAST:k&&R?g.additionsGutterAST.children:void 0,additionsContentAST:u,hunkData:v,preNode:E,themeStyles:i,baseThemeType:r,headerElement:s?void 0:this.renderHeader(this.diff),totalLines:L,rowCount:g.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderCodeAST(e,t){const n=e==="unified"?t.unifiedGutterAST:e==="deletions"?t.deletionsGutterAST:t.additionsGutterAST,i=e==="unified"?t.unifiedContentAST:e==="deletions"?t.deletionsContentAST:t.additionsContentAST;if(n==null||i==null)return;const r=we(n);return r.properties.style=`grid-row: span ${t.rowCount}`,[r,$i(i,t.rowCount)]}renderFullAST(e,t=[]){const n=this.getOptionsWithDefaults().hunkSeparators==="line-info",i=this.renderCodeAST("unified",e);if(i!=null)return t.push(A({tagName:"code",children:i,properties:{"data-code":"","data-container-size":n?"":void 0,"data-unified":""}})),{...e.preNode,children:t};const r=this.renderCodeAST("deletions",e);r!=null&&t.push(A({tagName:"code",children:r,properties:{"data-code":"","data-container-size":n?"":void 0,"data-deletions":""}}));const o=this.renderCodeAST("additions",e);return o!=null&&t.push(A({tagName:"code",children:o,properties:{"data-code":"","data-container-size":n?"":void 0,"data-additions":""}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return fe(this.renderFullAST(e,t))}renderPartialHTML(e,t){return t==null?fe(e):fe(A({tagName:"code",children:e,properties:{"data-code":"","data-container-size":this.getOptionsWithDefaults().hunkSeparators==="line-info"?"":void 0,[`data-${t}`]:""}}))}pushFileLevelAnnotations(e,t,n,i){if(!xt(n))return;const r=e.type!=="new"?$n(Kt(this.deletionAnnotations)):[],o=e.type!=="deleted"?$n(Kt(this.additionAnnotations)):[];if(r.length===0&&o.length===0)return;const s=-1,l=-1,{createAnnotationElement:a}=this;if(t==="unified"){st({diffStyle:t,type:"context",unifiedSpan:{type:"annotation",hunkIndex:s,lineIndex:l,annotations:r.concat(o)},createAnnotationElement:a,context:i});return}st({diffStyle:t,type:"context",deletionSpan:{type:"annotation",hunkIndex:s,lineIndex:l,annotations:r},additionSpan:{type:"annotation",hunkIndex:s,lineIndex:l,annotations:o},createAnnotationElement:a,context:i})}getAnnotations(e,t,n,i,r){const o={type:"annotation",hunkIndex:i,lineIndex:r,annotations:[]};if(t!=null)for(const l of this.deletionAnnotations[t]??[])o.annotations.push(pe(l));const s={type:"annotation",hunkIndex:i,lineIndex:r,annotations:[]};if(n!=null)for(const l of this.additionAnnotations[n]??[])(e==="unified"?o:s).annotations.push(pe(l));if(e==="unified")return o.annotations.length>0?o:void 0;if(!(s.annotations.length===0&&o.annotations.length===0))return{deletionSpan:o,additionSpan:s}}renderHeader(e){const{headerRenderMode:t,stickyHeader:n}=this.getOptionsWithDefaults();return zi({fileOrDiff:e,mode:t,stickyHeader:n})}};function $n(e){return e?.map(t=>pe(t))??[]}const Ys=new Intl.PluralRules("en-US");function Wn(e){return`${e} unmodified line${Ys.select(e)==="one"?"":"s"}`}function Gn(e,t){for(const n of e)t.unifiedContentAST.push(n.content),t.pushToGutter("unified",n.gutter),t.incrementRowCount(1)}function jn(e,t,n){for(const{deletion:i,addition:r}of e){if(i==null&&r==null)continue;const o=i!=null&&r!=null?void 0:i==null?"deletions":"additions";(o==null||n.side!==o)&&n.flush(),i!=null&&(t.deletionsContentAST.push(i.content),t.pushToGutter("deletions",i.gutter)),r!=null&&(t.additionsContentAST.push(r.content),t.pushToGutter("additions",r.gutter)),o!=null&&(n.side=o,n.increment()),t.incrementRowCount(1)}}function st({diffStyle:e,type:t,deletionLine:n,additionLine:i,unifiedSpan:r,deletionSpan:o,additionSpan:s,createAnnotationElement:l,context:a}){let d=!1;if(e==="unified"){if(i!=null?a.unifiedContentAST.push(i):n!=null&&a.unifiedContentAST.push(n),r!=null){const h=t==="change"?n!=null?"change-deletion":"change-addition":t;a.unifiedContentAST.push(l(r)),a.pushToGutter("unified",G(h,"annotation",1)),d=!0}}else if(e==="split"){if(n!=null&&a.deletionsContentAST.push(n),i!=null&&a.additionsContentAST.push(i),o!=null){const h=t==="change"?n!=null?"change-deletion":"context":t;a.deletionsContentAST.push(l(o)),a.pushToGutter("deletions",G(h,"annotation",1)),d=!0}if(s!=null){const h=t==="change"?i!=null?"change-addition":"context":t;a.additionsContentAST.push(l(s)),a.pushToGutter("additions",G(h,"annotation",1)),d=!0}}d&&a.incrementRowCount(1)}function Ft(e,{hunkIndex:t,collapsedLines:n,rangeSize:i,hunkSpecs:r,isFirstHunk:o,isLastHunk:s,isExpandable:l},a){if(n<=0)return;const d=e==="unified"?a.unifiedContentAST:e==="deletions"?a.deletionsContentAST:a.additionsContentAST;if(a.hunkSeparators==="metadata"){r!=null&&(a.pushToGutter(e,Le({type:"metadata",content:r,isFirstHunk:o,isLastHunk:s})),d.push(Le({type:"metadata",content:r,isFirstHunk:o,isLastHunk:s})),e!=="additions"&&a.incrementRowCount(1));return}if(a.hunkSeparators==="simple"){t>0&&(a.pushToGutter(e,Le({type:"simple",isFirstHunk:o,isLastHunk:!1})),d.push(Le({type:"simple",isFirstHunk:o,isLastHunk:!1})),e!=="additions"&&a.incrementRowCount(1));return}const h=Ds(e,t),c=i>a.expansionLineCount,u=l?t:void 0;a.pushToGutter(e,Le({type:a.hunkSeparators,content:Wn(n),expandIndex:u,chunked:c,slotName:h,isFirstHunk:o,isLastHunk:s})),d.push(Le({type:a.hunkSeparators,content:Wn(n),expandIndex:u,chunked:c,slotName:h,isFirstHunk:o,isLastHunk:s})),e!=="additions"&&a.incrementRowCount(1),a.hunkData.push({slotName:h,hunkIndex:t,lines:n,type:e,expandable:l?{up:!o,down:!s,chunked:c}:void 0})}function at(e,t){return e==null||e.type!=="element"||t==null?e:{...e,properties:{...e.properties,...t}}}function zt(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function Xs(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function Qs(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}function Js(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:e?.useTokenTransformer,tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:typeof e?.hunkSeparators=="function"?"custom":e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader!=null?"custom":"default"}}let Zs=-1;var dr=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file-diff:${++Zs}`;type="file-diff";fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;cachedHeaderHTML;lastRowCount;mounted=!1;enabled=!0;constructor(e={theme:P},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.hunksRenderer=this.createHunksRenderer(e),this.resizeManager=new Hi,this.scrollSyncManager=new Ms,this.interactionManager=new Ri("diff",qe(e,typeof e.hunkSeparators=="function"||(e.hunkSeparators??"line-info")==="line-info"||e.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(e){return Js(e)}createHunksRenderer(e){return new lr(this.getHunksRendererOptions(e),this.handleHighlightRender,this.workerManager)}getLineIndex=(e,t="additions")=>{if(this.fileDiff==null)return;const n=this.fileDiff.hunks.at(-1);let i,r;e:for(const o of this.fileDiff.hunks){let s=t==="deletions"?o.deletionStart:o.additionStart;const l=t==="deletions"?o.deletionCount:o.additionCount;let a=o.splitLineStart,d=o.unifiedLineStart;if(e=s+l){if(o===n){const h=e-(s+l);i=d+o.unifiedLineCount+h,r=a+o.splitLineCount+h;break e}continue}for(const h of o.hunkContent)if(h.type==="context")if(ethis.interactionManager.getHoveredLine();setLineAnnotations(e){this.lineAnnotations=e}canPartiallyRender(e,t,n){return!(e||t||n||typeof this.options.hunkSeparators=="function")}setSelectedLines(e,t){this.interactionManager.setSelection(e,t)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}const{diffStyle:e="split",overflow:t="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,t==="wrap"),t==="scroll"&&e==="split"?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}cleanUp(e=!1){this.emitPostRender(!0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,e||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder=void 0,this.lastRenderedHeaderHTML=void 0,e||(this.cachedHeaderHTML=void 0),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,e?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(e){const{fileContainer:t,prerenderedHTML:n,preventEmit:i=!1,lineAnnotations:r,oldFile:o,newFile:s,fileDiff:l}=e;this.hydrateElements(t,n),na(this.pre,ea({fileDiff:l,oldFile:o,newFile:s}),this.options.collapsed)||ia(this.headerElement,ta({fileDiff:l,oldFile:o,newFile:s}),this.options.disableFileHeader)?this.render({...e,preventEmit:!0}):this.hydrationSetup({fileDiff:l,oldFile:o,newFile:s,lineAnnotations:r}),i||this.emitPostRender()}hydrateElements(e,t){this.fileContainer!==e&&this.emitPostRender(!0),Ji(e,t);for(const n of e.shadowRoot?.children??[]){if(n instanceof SVGElement){this.spriteSVG=n;continue}if(n instanceof HTMLElement){if(n instanceof HTMLPreElement){this.pre=n;for(const i of n.children)!(i instanceof HTMLElement)||i.tagName.toLowerCase()!=="code"||("deletions"in i.dataset&&(this.codeDeletions=i),"additions"in i.dataset&&(this.codeAdditions=i),"unified"in i.dataset&&(this.codeUnified=i));continue}if("diffsHeader"in n.dataset){this.headerElement=n;continue}if(n instanceof HTMLStyleElement&&n.hasAttribute("data-theme-css")){this.themeCSSStyle=n;continue}if(n instanceof HTMLStyleElement&&n.hasAttribute("data-unsafe-css")){this.unsafeCSSStyle=n,this.appliedUnsafeCSS=n.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:e,oldFile:t,newFile:n,lineAnnotations:i}){this.lineAnnotations=i??this.lineAnnotations,this.additionFile=n,this.deletionFile=t,this.fileDiff=e??(t!=null&&n!=null?Zt(t,n,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(e,t,n)=>{this.expandHunk(e,t,n)};expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.rerender()};render({oldFile:e,newFile:t,fileDiff:n,deferManagers:i=!1,forceRender:r=!1,preventEmit:o=!1,lineAnnotations:s,fileContainer:l,containerWrapper:a,renderRange:d}){if(!this.enabled)throw new Error("FileDiff.render: attempting to call render after cleaned up");const{collapsed:h=!1,themeType:c="system"}=this.options,u=h?void 0:d,f=this.hasThemeChanged(),p=e!=null&&t!=null&&(!se(e,this.deletionFile)||!se(t,this.additionFile));let v=n!=null&&n!==this.fileDiff;const y=s!=null&&(s.length>0||this.lineAnnotations.length>0)?s!==this.lineAnnotations:!1;if(!h&&yt(u,this.renderRange)&&!r&&!y&&!f&&(n!=null&&n===this.fileDiff||n==null&&!p))return this.applyCachedThemeState(c);const{renderRange:C}=this;if(this.renderRange=u,this.deletionFile=e,this.additionFile=t,n!=null?this.fileDiff=n:e!=null&&t!=null&&p&&(v=!0,this.fileDiff=Zt(e,t,this.options.parseDiffOptions)),v&&(this.cachedHeaderHTML=void 0),s!=null&&this.setLineAnnotations(s),this.fileDiff==null)return!1;this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);const{disableErrorHandling:g=!1,disableFileHeader:b=!1}=this.options;if(b&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),l=this.getOrCreateFileContainer(l,a),this.applyCachedThemeState(c),h){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const m=this.hunksRenderer.renderDiff(this.fileDiff,Ei);m!=null&&this.applyThemeState(l,m.themeStyles,c,m.baseThemeType),m?.headerElement!=null&&this.applyHeaderToDOM(m.headerElement,l),this.renderSeparators([]),this.injectUnsafeCSS()}catch(m){if(g)throw m;console.error(m),m instanceof Error&&this.applyErrorToDOM(m,l)}return o||this.emitPostRender(),!0}try{const m=this.getOrCreatePreNode(l);if(!(this.canPartiallyRender(r,y,p||v||f)&&this.applyPartialRender({previousRenderRange:C,renderRange:u}))){const x=this.hunksRenderer.renderDiff(this.fileDiff,u);if(x==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(l,x.themeStyles,c,x.baseThemeType),x.headerElement!=null&&this.applyHeaderToDOM(x.headerElement,l),x.additionsContentAST!=null||x.deletionsContentAST!=null||x.unifiedContentAST!=null?this.applyHunksToDOM(m,x):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(x.hunkData)}this.applyBuffers(m,u),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,i||this.flushManagers()}catch(m){if(g)throw m;console.error(m),m instanceof Error&&this.applyErrorToDOM(m,l)}return o||this.emitPostRender(),!0}emitPostRender(e=!1){const{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,t==null))return;this.options.onPostRender?.(t,this,"unmount");return}if(t==null)return;const i=this.mounted?"update":"mount";this.mounted=!0,n?.(t,this,i)}removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(const{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();for(const{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){const t=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",t.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${e}px`),!0}primeHighlightCache(){const{fileDiff:e,workerManager:t}=this;if(e==null||t==null||en(e))return;const n=this.options.tokenizeMaxLength??1e5;Math.max(e.additionLines.length,e.deletionLines.length)>n||t.primeDiffHighlightCache(e)}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(e){const{hunkSeparators:t}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof t!="function"){for(const{element:i}of this.separatorCache.values())i.remove();this.separatorCache.clear();return}const n=new Map(this.separatorCache);for(const i of e){const r=i.slotName;let o=this.separatorCache.get(r);if(o==null||!Qs(i,o.hunkData)){o?.element.remove();const s=document.createElement("div");s.style.display="contents",s.slot=i.slotName;const l=t(i,this);l!=null&&s.appendChild(l),this.fileContainer.appendChild(s),o={element:s,hunkData:i},this.separatorCache.set(r,o)}n.delete(r)}for(const[i,{element:r}]of n.entries())this.separatorCache.delete(i),r.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:n}of this.annotationCache.values())n.remove();this.annotationCache.clear();return}const e=new Map(this.annotationCache),{renderAnnotation:t}=this.options;if(t!=null&&this.lineAnnotations.length>0)for(const[n,i]of this.lineAnnotations.entries()){const r=`${n}-${pe(i)}`;let o=this.annotationCache.get(r);if(o==null||!Xs(i,o.annotation)){o?.element.remove();const s=t(i);if(s==null)continue;o={element:cn(pe(i)),annotation:i},o.element.appendChild(s),this.fileContainer.appendChild(o.element),this.annotationCache.set(r,o)}e.delete(r)}for(const[n,{element:i}]of e.entries())this.annotationCache.delete(n),i.remove()}renderGutterUtility(){const{renderGutterUtility:e}=this.options;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const n=qi();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}getOrCreateFileContainer(e,t){const{fileContainer:n}=this,i=e??n??document.createElement("diffs-container"),r=n!==i;return r&&this.emitPostRender(!0),this.fileContainer=i,n!=null&&r&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),r&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){const{shadowRoot:t}=e;if(t!=null)for(const n of t.children)n instanceof SVGElement?this.spriteSVG??=n:Ke(n)&&n.hasAttribute("data-theme-css")?(this.themeCSSStyle??=n,this.hasAdoptedThemeCSS=!0):Ke(n)&&n.hasAttribute("data-unsafe-css")&&(this.unsafeCSSStyle??=n,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){const t=e.shadowRoot??e.attachShadow({mode:"open"});if(this.spriteSVG==null){const n=document.createElement("div");n.innerHTML=Gi;const i=n.firstChild;i instanceof SVGElement&&(this.spriteSVG=i)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){const t=e.shadowRoot??e.attachShadow({mode:"open"});return this.pre==null?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(t.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(e){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(const t of Array.from(e.children))t instanceof HTMLElement&&(t.hasAttribute("data-unified")?this.codeUnified=t:t.hasAttribute("data-deletions")?this.codeDeletions=t:t.hasAttribute("data-additions")&&(this.codeAdditions=t))}applyHeaderToDOM(e,t){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const{fileDiff:n}=this,i=this.cachedHeaderHTML??fe(e);if(this.cachedHeaderHTML=i,i!==this.lastRenderedHeaderHTML){const d=document.createElement("div");d.innerHTML=i;const h=d.firstElementChild;if(!(h instanceof HTMLElement))return;this.headerElement!=null?t.shadowRoot?.replaceChild(h,this.headerElement):t.shadowRoot?.prepend(h),this.headerElement=h,this.lastRenderedHeaderHTML=i}if(this.isContainerManaged||n==null)return;const{renderCustomHeader:r,renderHeaderPrefix:o,renderHeaderMetadata:s}=this.options;if(r!=null){const d=r(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,on,d),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0;return}const l=o?.(n)??void 0,a=s?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,nn,l),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,rn,a),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,i){if(i==null){t?.remove();return}const r=t??this.createHeaderSlotElement(n);return t==null&&e.appendChild(r),this.replaceHeaderSlotContent(r,i),r}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){const t=document.createElement("div");return t.slot=e,t}injectUnsafeCSS(){const{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(t!=null){if(e==null||e===""){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}this.unsafeCSSStyle?.parentNode===t&&this.appliedUnsafeCSS===e||(this.unsafeCSSStyle??=Ki(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=fn(e),this.appliedUnsafeCSS=e)}}applyThemeState(e,t,n,i){const r=e.shadowRoot??e.attachShadow({mode:"open"}),o=i??n,s=this.options.theme??P,l=typeof s=="string"?s:{...s},a=He(r);if(this.themeCSSStyle?.parentNode===r&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===o&&this.appliedThemeCSS.scrollbarGutter===a){this.appliedThemeCSS.theme=l;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===r){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:l,themeStyles:t,themeType:o,baseThemeType:i,scrollbarGutter:a};return}this.themeCSSStyle=mn({shadowRoot:r,currentNode:this.themeCSSStyle,themeCSS:pn(t,o,a)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{theme:l,themeStyles:t,themeType:o,baseThemeType:i,scrollbarGutter:a}:void 0}hydrateMeasuredScrollbar(){const e=this.fileContainer?.shadowRoot;e==null||this.themeCSSStyle==null||(this.themeCSSStyle.textContent=Qi(this.themeCSSStyle.textContent??"",He(e)))}applyHunksToDOM(e,t){const{overflow:n="scroll"}=this.options,i=(this.options.hunkSeparators??"line-info")==="line-info",r=n==="wrap"?t.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t);let o=!1;const s=[],l=this.hunksRenderer.renderCodeAST("unified",t),a=this.hunksRenderer.renderCodeAST("deletions",t),d=this.hunksRenderer.renderCodeAST("additions",t);l!=null?(o=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=Ge({code:this.codeUnified,columnType:"unified",rowSpan:r,containerSize:i}),this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(l),s.push(this.codeUnified)):a!=null||d!=null?(a!=null?(o=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=Ge({code:this.codeDeletions,columnType:"deletions",rowSpan:r,containerSize:i}),this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(a),s.push(this.codeDeletions)):(this.codeDeletions?.remove(),this.codeDeletions=void 0),d!=null?(o=o||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=Ge({code:this.codeAdditions,columnType:"additions",rowSpan:r,containerSize:i}),this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(d),s.push(this.codeAdditions)):(this.codeAdditions?.remove(),this.codeAdditions=void 0)):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0),s.length===0?e.textContent="":o&&e.replaceChildren(...s),this.lastRowCount=t.rowCount}applyPartialRender({previousRenderRange:e,renderRange:t}){const{pre:n,codeUnified:i,codeAdditions:r,codeDeletions:o,options:{diffStyle:s="split"}}=this;if(n==null||e==null||t==null||!Number.isFinite(e.totalLines)||!Number.isFinite(t.totalLines)||this.lastRowCount==null)return!1;const l=this.getCodeColumns(s,i,o,r);if(l==null)return!1;const a=e.startingLine,d=t.startingLine,h=a+e.totalLines,c=d+t.totalLines,u=Math.max(a,d),f=Math.min(h,c);if(f<=u)return!1;const p=Math.max(0,u-a),v=Math.max(0,h-f),y=this.trimColumns({columns:l,trimStart:p,trimEnd:v,previousStart:a,overlapStart:u,overlapEnd:f,diffStyle:s});if(y<0)throw new Error("applyPartialRender: failed to trim to overlap");if(this.lastRowCount{if(!(L<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:S,totalLines:L,bufferBefore:0,bufferAfter:0})},b=g(d,Math.max(u-d,0));if(b==null&&df)return!1;const x=(S,L)=>{if(S!=null){if(s==="unified"&&!Array.isArray(l))this.insertPartialHTML(s,l,S,L);else if(s==="split"&&Array.isArray(l))this.insertPartialHTML(s,l,S,L);else throw new Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");C+=S.rowCount}};return this.cleanupErrorWrapper(),x(b,"afterbegin"),x(m,"beforeend"),this.lastRowCount!==C&&(this.applyRowSpan(s,l,C),this.lastRowCount=C),!0}insertPartialHTML(e,t,n,i){if(e==="unified"&&!Array.isArray(t)){const r=this.hunksRenderer.renderCodeAST("unified",n);this.renderPartialColumn(t,r,i)}else if(e==="split"&&Array.isArray(t)){const r=this.hunksRenderer.renderCodeAST("deletions",n),o=this.hunksRenderer.renderCodeAST("additions",n);this.renderPartialColumn(t[0],r,i),this.renderPartialColumn(t[1],o,i)}else throw new Error("FileDiff.insertPartialHTML: Invalid argument composition")}renderPartialColumn(e,t,n){if(e==null||t==null)return;const i=qn(t[0]),r=qn(t[1]);if(i==null||r==null)throw new Error("FileDiff.insertPartialHTML: Unexpected AST structure");const o=r.at(0);n==="beforeend"&&o?.type==="element"&&typeof o.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(o.properties["data-buffer-size"],e.content.children[e.content.children.length-1],e.gutter.children[e.gutter.children.length-1],i,r,!0);const s=r.at(-1);n==="afterbegin"&&s?.type==="element"&&typeof s.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(s.properties["data-buffer-size"],e.content.children[0],e.gutter.children[0],i,r,!1),e.gutter.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(i)),e.content.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(r))}mergeBuffersIfNecessary(e,t,n,i,r,o){if(!(t instanceof HTMLElement)||!(n instanceof HTMLElement))return;const s=this.getBufferSize(t.dataset);s!=null&&(o?(i.shift(),r.shift()):(i.pop(),r.pop()),this.updateBufferSize(t,s+e),this.updateBufferSize(n,s+e))}applyRowSpan(e,t,n){const i=r=>{r!=null&&(r.gutter.style.setProperty("grid-row",`span ${n}`),r.content.style.setProperty("grid-row",`span ${n}`))};if(e==="unified"&&!Array.isArray(t))i(t);else if(e==="split"&&Array.isArray(t))i(t[0]),i(t[1]);else throw new Error("dun fuuuuked up")}trimColumnRows(e,t,n){let i=0,r=0,o=0,s=!1;const l=n>=0;if(e==null)return 0;const a=Array.from(e.content.children),d=Array.from(e.gutter.children);if(a.length!==d.length)throw new Error("FileDiff.trimColumnRows: columns do not match");for(;o0||l&&i>=n)&&(h.remove(),c.remove(),t>0&&(t--,t===0&&(s=!0)),r++),i++;continue}if("separator"in h.dataset&&"separator"in c.dataset){(t>0||l&&i>=n)&&(h.remove(),c.remove(),r++);continue}if(h.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in c.dataset){(t>0||l&&i>=n)&&(h.remove(),c.remove(),r++);continue}if(h.dataset.gutterBuffer==="metadata"&&"noNewline"in c.dataset){(t>0||l&&i>=n)&&(h.remove(),c.remove(),r++);continue}if(h.dataset.gutterBuffer==="buffer"&&"contentBuffer"in c.dataset){const u=this.getBufferSize(c.dataset);if(u==null)throw new Error("FileDiff.trimColumnRows: invalid element");if(t>0){const f=Math.min(t,u),p=u-f;p>0?(this.updateBufferSize(h,p),this.updateBufferSize(c,p),r+=f):(h.remove(),c.remove(),r+=u),t-=f,t===0&&p===0&&(s=!0)}else if(l){const f=i,p=i+u-1;if(n<=f)h.remove(),c.remove(),r+=u;else if(n<=p){const v=p-n+1,y=u-v;this.updateBufferSize(h,y),this.updateBufferSize(c,y),r+=v}}i+=u;continue}throw console.error({gutterElement:h,contentElement:c}),new Error("FileDiff.trimColumnRows: unknown row elements")}return r}trimColumns({columns:e,diffStyle:t,overlapEnd:n,overlapStart:i,previousStart:r,trimEnd:o,trimStart:s}){const l=Math.max(0,i-r),a=n-r;if(a<0)throw new Error("FileDiff.trimColumns: overlap ends before previous");const d=s>0,h=o>0;if(!d&&!h)return 0;const c=d?l:0,u=h?a:-1;if(t==="unified"&&!Array.isArray(e))return this.trimColumnRows(e,c,u);if(t==="split"&&Array.isArray(e)){const f=this.trimColumnRows(e[0],c,u),p=this.trimColumnRows(e[1],c,u);if(e[0]!=null&&e[1]!=null&&f!==p)throw new Error("FileDiff.trimColumns: split columns out of sync");return e[0]!=null?f:p}else throw console.error({diffStyle:t,columns:e}),new Error("FileDiff.trimColumns: Invalid columns for diffType")}getBufferSize(e){const t=Number.parseInt(e?.bufferSize??"",10);return Number.isNaN(t)?void 0:t}updateBufferSize(e,t){e.dataset.bufferSize=`${t}`,e.style.setProperty("grid-row",`span ${t}`),e.style.setProperty("min-height",`calc(${t} * 1lh)`)}getCodeColumns(e,t,n,i){function r(o){if(o==null)return;const s=o.children[0],l=o.children[1];if(!(!(s instanceof HTMLElement)||!(l instanceof HTMLElement)||s.dataset.gutter==null||l.dataset.content==null))return{gutter:s,content:l}}if(e==="unified")return r(t);{const o=r(n),s=r(i);return o!=null||s!=null?[o,s]:void 0}}applyBuffers(e,t){if(t==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(this.bufferBefore==null&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",e.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${t.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter==null&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",e.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${t.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(e,{additionsContentAST:t,deletionsContentAST:n,totalLines:i},r){const{diffIndicators:o="bars",disableBackground:s=!1,disableLineNumbers:l=!1,overflow:a="scroll",diffStyle:d="split"}=this.options,h={type:"diff",diffIndicators:o,disableBackground:s,disableLineNumbers:l,overflow:a,split:d==="unified"?!1:t!=null&&n!=null,totalLines:i,customProperties:r};ji(h,this.appliedPreAttributes)||(gn(e,h),this.appliedPreAttributes=h)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const n=t.shadowRoot??t.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",n.appendChild(this.errorWrapper);const i=document.createElement("div");i.dataset.errorMessage="",i.innerText=e.message,this.errorWrapper.appendChild(i);const r=document.createElement("pre");r.dataset.errorStack="",r.innerText=e.stack??"No Error Stack",this.errorWrapper.appendChild(r)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function ea({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function ta({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function na(e,t,n=!1){return!n&&e==null&&t}function ia(e,t,n=!1){return e==null&&t&&!n}function qn(e){if(!(e==null||e.type!=="element"))return e.children??[]}function ra({fileDiff:e,metrics:t,disableFileHeader:n,hunkSeparators:i,expandUnchanged:r,expandedHunks:o,collapsedContextThreshold:s}){let l=oe(t,n),a=l;const d=r?!0:o,h=e.hunks.length-1;for(let c=0;c0){const C=Ve({type:i,metrics:t,hunkIndex:c,hunkSpecs:u.hunkSpecs})?.totalHeight??0;l+=C,a+=C}l+=u.splitLineCount*t.lineHeight,a+=u.unifiedLineCount*t.lineHeight;const v=oa(u);l+=v.split*t.lineHeight,a+=v.unified*t.lineHeight;const y=c===h?Xe({fileDiff:e,hunkIndex:c,expandedHunks:d,collapsedContextThreshold:s,errorPrefix:"computeEstimatedDiffHeights"}):void 0;if(y!=null){const C=(y.fromStart+y.fromEnd)*t.lineHeight;if(l+=C,a+=C,y.collapsedLines>0){const g=$e({type:i,metrics:t})?.totalHeight??0;l+=g,a+=g}}}if(e.hunks.length>0){const c=Ct(t);l+=c,a+=c}return{splitHeight:l,unifiedHeight:a}}function oa(e){if(!e.noEOFCRAdditions&&!e.noEOFCRDeletions)return{split:0,unified:0};const t=e.hunkContent.at(-1);if(t==null)return{split:0,unified:0};if(t.type==="context"){const n=t.lines>0?1:0;return{split:n,unified:n}}return sa(e,t)}function sa(e,t){const n=(t.deletions>0&&e.noEOFCRDeletions?1:0)+(t.additions>0&&e.noEOFCRAdditions?1:0),i=t.deletions>0&&e.noEOFCRDeletions,r=t.additions>0&&e.noEOFCRAdditions;return{split:i||r?1:0,unified:n}}const tn=5e3;let aa=-1;var la=class extends dr{__id=`little-virtualized-file-diff:${++aa}`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0,fileAnnotationHeight:0};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(e,t,n,i,r=!1){super(e,i,r),this.virtualizer=t,this.metrics=Dt(n)}setMetrics(e,t=!1){const n=Dt(e);!t&&Re(this.metrics,n)||(this.metrics=n,this.resetLayoutCache({includeEstimatedHeights:!0}))}setLineAnnotations(e){this.syncLineAnnotations(e)&&this.resetLayoutCache({includeEstimatedHeights:!1})}syncLineAnnotations(e){return e==null||e===this.lineAnnotations||e.length===0&&this.lineAnnotations.length===0?!1:(super.setLineAnnotations(e),!0)}setFileAnnotationHeight(e){const t=this.cache.fileAnnotationHeight;return e===t?!1:(this.cache.fileAnnotationHeight=e,this.cache.measuredHeightDeltaTotal+=e-t,!0)}hasFileAnnotations(e=this.fileDiff){return e==null||!qt(this.lineAnnotations)?!1:this.lineAnnotations.some(t=>t.lineNumber!==0?!1:e.type==="new"?t.side==="additions":e.type==="deleted"?t.side==="deletions":!0)}getLineHeight(e,t=!1){return this.getEstimatedLineHeight(t)+(this.cache.heightDeltas.get(e)??0)}getEstimatedLineHeight(e=!1){const t=e?2:1;return this.metrics.lineHeight*t}setOptions(e){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.");if(e==null)return;const{options:t}=this,n=!an(t,e),i=n&&pa(t,e);super.setOptions(e),i&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:ga(t,e)}),n&&(this.forceRenderOverride=!0),n&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,i)}setThemeType(e){if(this.isAdvancedMode())throw new Error("VirtualizedFileDiff.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(e)}resetLayoutCache({forceSimpleRecompute:e=!1,includeEstimatedHeights:t=!1}={}){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heightDeltas.size>0&&this.cache.heightDeltas.clear(),this.cache.measuredHeightDeltaTotal!==0&&(this.cache.measuredHeightDeltaTotal=0),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.totalLines!==0&&(this.cache.totalLines=0),t&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),this.renderRange!=null&&(this.renderRange=void 0),e&&this.isSimpleMode()&&this.computeApproximateSize()}reconcileHeights(){let e=!1;const{overflow:t="scroll"}=this.options;if(this.fileContainer==null||this.fileDiff==null)return this.height!==0&&(e=!0),this.height=0,e;if(this.top=this.getVirtualizedTop(),t==="scroll"&&this.lineAnnotations.length===0&&!this.isResizeDebuggingEnabled())return e;const n=this.getDiffStyle(),i=n==="split"?[this.codeDeletions,this.codeAdditions]:[this.codeUnified],r=this.hasFileAnnotations(this.fileDiff);if(this.renderRange!=null&&r&&xt(this.renderRange)){const o=da(i)??0;this.setFileAnnotationHeight(o)&&(e=!0)}else!r&&this.setFileAnnotationHeight(0)&&(e=!0);for(const o of i){if(o==null)continue;const s=o.children[1];if(s instanceof HTMLElement)for(const l of s.children){if(!(l instanceof HTMLElement))continue;const a=l.dataset.lineIndex;if(a==null)continue;const d=va(a,n);let h=l.getBoundingClientRect().height,c=!1;l.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in l.nextElementSibling.dataset||"noNewline"in l.nextElementSibling.dataset)&&("noNewline"in l.nextElementSibling.dataset&&(c=!0),h+=l.nextElementSibling.getBoundingClientRect().height);const u=this.getEstimatedLineHeight(c),f=this.cache.heightDeltas.get(d)??0,p=h-u;p!==f&&(e=!0,this.cache.measuredHeightDeltaTotal+=p-f,p===0?this.cache.heightDeltas.delete(d):this.cache.heightDeltas.set(d,p))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer==null?!1:(e&&(this.top=this.getVirtualizedTop()),this.render());prepareCodeViewItem(e,t,n,i){const r=!_e(this.fileDiff,e),o=this.syncLineAnnotations(i);let s=n?.resetDiffLayoutCache===!0||r||o,l=r||n?.resetDiffLayoutCache===!0&&n.includeEstimatedDiffHeights;n?.metrics!=null&&(this.metrics=Dt(n.metrics),s=!0,l=!0);const{collapsed:a=!1}=this.options;return this.currentCollapsed!==a&&(this.currentCollapsed=a,s=!0),s&&this.resetLayoutCache({includeEstimatedHeights:l}),this.fileDiff=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e,t="additions"){if(this.fileDiff==null||e<1)return;const n=this.getLineIndex(e,t);if(n==null)return;const{disableFileHeader:i=!1,expandUnchanged:r=!1,collapsed:o=!1,collapsedContextThreshold:s=1}=this.options,l=this.getDiffStyle(),a=this.getHunkSeparatorType(),d=l==="split"?n[1]:n[0];this.approximateLayoutCheckpoints();const h=oe(this.metrics,i),c=this.getLayoutCheckpointBeforeLineIndex(d);let u=c?.top??h+this.cache.fileAnnotationHeight;if(o)return{top:h,height:0};let f;return je({diff:this.fileDiff,diffStyle:l,startingLine:c?.renderedLineIndex??0,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:s,callback:({hunkIndex:p,hunk:v,collapsedBefore:y,collapsedAfter:C,deletionLine:g,additionLine:b})=>{const m=l==="split"?b?.splitLineIndex??g?.splitLineIndex:b?.unifiedLineIndex??g?.unifiedLineIndex;if(m==null)throw new Error("VirtualizedFileDiff.getLinePosition: missing line index data");if(y>0){const S=Ve({type:a,metrics:this.metrics,hunkIndex:p,hunkSpecs:v?.hunkSpecs});if(S!=null){if(u+=S.gapBefore,d>=m-y&&d0){const S=$e({type:a,metrics:this.metrics});if(S!=null){if(d>m&&d<=m+C)return f={top:u+S.gapBefore,height:S.height},!0;u+=S.totalHeight}}return!1}}),f}getNumericScrollAnchor(e){if(this.fileDiff==null)return;const{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsed:i=!1,collapsedContextThreshold:r=1}=this.options;if(i)return;const o=this.getDiffStyle(),s=this.getHunkSeparatorType();this.approximateLayoutCheckpoints();const l=this.getLayoutCheckpointBeforeTop(e);let a=l?.top??oe(this.metrics,t)+this.cache.fileAnnotationHeight,d;return je({diff:this.fileDiff,diffStyle:o,startingLine:l?.renderedLineIndex??0,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:r,callback:({hunkIndex:h,hunk:c,collapsedBefore:u,collapsedAfter:f,deletionLine:p,additionLine:v})=>{const y=o==="split"?v?.splitLineIndex??p?.splitLineIndex:v?.unifiedLineIndex??p?.unifiedLineIndex;if(y==null)throw new Error("VirtualizedFileDiff.getNumericScrollAnchor: missing line index data");if(u>0){const g=Ve({type:s,metrics:this.metrics,hunkIndex:h,hunkSpecs:c?.hunkSpecs});g!=null&&(a+=g.totalHeight)}if(a>=e&&(p!=null?d={lineNumber:p.lineNumber,side:"deletions",top:a}:v!=null&&(d={lineNumber:v.lineNumber,side:"additions",top:a}),d!=null))return!0;const C=this.getLineHeight(y,(v?.noEOFCR??!1)||(p?.noEOFCR??!1));if(a+=C,f>0){const g=$e({type:s,metrics:this.metrics});g!=null&&(a+=g.totalHeight)}return!1}}),d}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){if(this.top==null||this.fileDiff==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};const t=e!=null?this.computeRenderRangeFromWindow(this.fileDiff,this.top,e):this.renderRange;if(t==null)return;const{bufferBefore:n,bufferAfter:i,totalLines:r}=t;let o=0;if(r===0){const s=e??this.virtualizer.getWindowSpecs();this.top{this.hunksRenderer.expandHunk(e,t,n),this.forceRenderOverride=!0,this.resetLayoutCache({includeEstimatedHeights:!0}),this.isSimpleMode()&&this.computeApproximateSize(),this.virtualizer.instanceChanged(this,!0)};setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}computeApproximateSize(e=!1){const t=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!t)return;const n=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,this.fileDiff==null){this.layoutDirty=!1;return}const{disableFileHeader:i=!1,collapsed:r=!1}=this.options,o=oe(this.metrics,i);if(this.height+=o,r){this.layoutDirty=!1;return}this.height=this.getActiveEstimatedHeight()+this.cache.measuredHeightDeltaTotal,t&&!n&&this.validateComputedHeight(),this.layoutDirty=!1}getActiveEstimatedHeight(){this.ensureEstimatedDiffHeights();const e=this.getDiffStyle()==="split"?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(e==null)throw new Error("VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height");return e}ensureEstimatedDiffHeights(){if(this.fileDiff==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;const{disableFileHeader:e=!1,expandUnchanged:t=!1,collapsedContextThreshold:n=1}=this.options,{splitHeight:i,unifiedHeight:r}=ra({fileDiff:this.fileDiff,metrics:this.metrics,disableFileHeader:e,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:t,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:n});this.cache.estimatedSplitHeight=i,this.cache.estimatedUnifiedHeight=r}validateComputedHeight(){if(this.fileContainer==null||this.fileDiff==null)return;const e=this.fileContainer.getBoundingClientRect();e.height!==this.height?console.log("VirtualizedFileDiff.computeApproximateSize: computed height doesnt match",{name:this.fileDiff.name,elementHeight:e.height,computedHeight:this.height}):console.log("VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT")}render({fileContainer:e,oldFile:t,newFile:n,fileDiff:i,forceRender:r=!1,lineAnnotations:o,...s}={}){const{forceRenderOverride:l,isSetup:a}=this;this.forceRenderOverride=void 0;const d=this.syncLineAnnotations(o);if(d&&this.resetLayoutCache({includeEstimatedHeights:!1}),this.fileDiff??=i??(t!=null&&n!=null?Zt(t,n,this.options.parseDiffOptions):void 0),e=this.getOrCreateFileContainer(e),this.fileDiff==null)return console.error("VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data"),!1;if(a)this.top??=this.getVirtualizedTop();else{this.computeApproximateSize();const f=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(f==null)throw new Error("VirtualizedFileDiff.render: simple virtualizer is not available");f.connect(e,this),this.isVisible=f.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode())return this.renderPlaceholder(this.height);const h=this.virtualizer.getWindowSpecs(),c=this.top??0,u=this.computeRenderRangeFromWindow(this.fileDiff,c,h);return super.render({fileDiff:this.fileDiff,fileContainer:e,renderRange:u,oldFile:t,newFile:n,lineAnnotations:o,forceRender:(l??r)||d,...s})}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}isSimpleMode(){return this.virtualizer.type==="simple"}isAdvancedMode(){return this.virtualizer.type==="advanced"}getVirtualizedTop(){return this.virtualizer.type==="advanced"?this.virtualizer.getLocalTopForInstance(this):this.fileContainer!=null?this.virtualizer.getOffsetInScrollContainer(this.fileContainer):0}getSimpleVirtualizer(){return this.virtualizer.type==="simple"?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??"split"}getHunkSeparatorType(){return ma(this.options.hunkSeparators)}approximateLayoutCheckpoints(){if(this.cache.checkpoints.length>0||this.fileDiff==null||this.fileDiff.hunks.length===0||this.options.collapsed===!0)return;const{disableFileHeader:e=!1,expandUnchanged:t=!1,collapsedContextThreshold:n=1}=this.options,i=this.fileDiff.hunks.length-1,r=this.getDiffStyle(),o=this.getHunkSeparatorType(),s=t?!0:this.hunksRenderer.getExpandedHunksMap(),l=ha(this.cache.heightDeltas);let a=oe(this.metrics,e)+this.cache.fileAnnotationHeight,d=0;const h=({rowCount:c,startLineIndex:u,preSeparatorHeight:f=0,postSeparatorHeight:p=0,metadataOffsets:v=[]})=>{if(c<=0)return;const y=d,C=d+c;let g=ca(y);for(;g0?f:0)+b*this.metrics.lineHeight+ua(v,b)*this.metrics.lineHeight+Kn(l,u,u+b);this.cache.checkpoints.push({renderedLineIndex:g,lineIndex:u+b,top:m}),g+=tn}a+=f+c*this.metrics.lineHeight+v.length*this.metrics.lineHeight+Kn(l,u,u+c)+p,d=C};for(let c=0;c0?Ve({type:o,metrics:this.metrics,hunkIndex:c,hunkSpecs:u.hunkSpecs})?.totalHeight??0:0;h({rowCount:f.fromStart,startLineIndex:(r==="split"?u.splitLineStart:u.unifiedLineStart)-f.rangeSize});let v=p;h({rowCount:f.fromEnd,startLineIndex:(r==="split"?u.splitLineStart:u.unifiedLineStart)-f.fromEnd,preSeparatorHeight:v}),f.fromEnd>0&&(v=0);const y=c===i?Xe({fileDiff:this.fileDiff,hunkIndex:c,expandedHunks:s,collapsedContextThreshold:n,errorPrefix:"VirtualizedFileDiff"}):void 0,C=y!=null&&y.collapsedLines>0?$e({type:o,metrics:this.metrics})?.totalHeight??0:0,g=y!=null?y.fromStart+y.fromEnd:0,b=r==="split"?u.splitLineCount:u.unifiedLineCount,m=r==="split"?u.splitLineStart:u.unifiedLineStart;h({rowCount:b,startLineIndex:m,preSeparatorHeight:v,postSeparatorHeight:g===0?C:0,metadataOffsets:fa({diffStyle:r,hunk:u,rowCount:b})}),y!=null&&g>0&&h({rowCount:g,startLineIndex:m+b,postSeparatorHeight:C})}this.cache.totalLines=d}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,i;for(;t<=n;){const r=t+n>>1,o=this.cache.checkpoints[r];if(o==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");o.lineIndex<=e?(i=o,t=r+1):n=r-1}return i}getLayoutCheckpointBeforeTop(e,t){let n=0,i=this.cache.checkpoints.length-1,r=-1;for(;n<=i;){const o=n+i>>1,s=this.cache.checkpoints[o];if(s==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");s.top<=e?(r=o,n=o+1):i=o-1}if(t==null)return r>=0?this.cache.checkpoints[r]:void 0;for(let o=r;o>=0;o--){const s=this.cache.checkpoints[o];if(s==null)throw new Error("VirtualizedFileDiff: invalid checkpoint index");if(s.renderedLineIndex%t===0)return s}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(const l of e.hunks)n+=t==="split"?l.splitLineCount:l.unifiedLineCount;return n}const{expandUnchanged:i=!1,collapsedContextThreshold:r=1}=this.options,o=i?!0:this.hunksRenderer.getExpandedHunksMap();for(const[l,a]of e.hunks.entries()){const d=t==="split"?a.splitLineCount:a.unifiedLineCount;n+=d;const h=Math.max(a.collapsedBefore,0),{fromStart:c,fromEnd:u,renderAll:f}=Ye({isPartial:e.isPartial,rangeSize:h,expandedHunks:o,hunkIndex:l,collapsedContextThreshold:r});h>0&&(n+=f?h:c+u)}const s=Xe({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:o,collapsedContextThreshold:r,errorPrefix:"VirtualizedFileDiff"});return s!=null&&(n+=s.fromStart+s.fromEnd),n}computeRenderRangeFromWindow(e,t,{top:n,bottom:i}){const{disableFileHeader:r=!1,expandUnchanged:o=!1,collapsedContextThreshold:s=1}=this.options,{hunkLineCount:l,lineHeight:a}=this.metrics,d=this.getDiffStyle(),h=this.getHunkSeparatorType(),c=this.height;let u=this.cache.totalLines>0?this.cache.totalLines:this.getExpandedLineCount(e,d);const f=oe(this.metrics,r),p=e.hunks.length>0?Ct(this.metrics):0,{fileAnnotationHeight:v}=this.cache,y=f+v,C=Math.max(0,c-f-v-p),g=this.hasFileAnnotations(e),b=t+f,m=v>0&&g&&bn;if(ti)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:c-f-p};if(u<=l||e.hunks.length===0)return{startingLine:0,totalLines:l,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(),u=this.cache.totalLines>0?this.cache.totalLines:u;const x=Math.ceil(Math.max(i-n,0)/a),S=Math.ceil(x/l)*l+l,L=S/l,w=L,k=[],I=(n+i)/2,R=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-S*a*2),l);let E=t+(R?.top??y),T=R?.renderedLineIndex??0,H,N,W;if(je({diff:e,diffStyle:d,startingLine:R?.renderedLineIndex??0,expandedHunks:o?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:s,callback:({hunkIndex:ae,hunk:j,collapsedBefore:Se,collapsedAfter:D,deletionLine:B,additionLine:z})=>{const le=z!=null?z.splitLineIndex:B.splitLineIndex,ee=z!=null?z.unifiedLineIndex:B.unifiedLineIndex,te=(z?.noEOFCR??!1)||(B?.noEOFCR??!1),De=(Se>0?Ve({type:h,metrics:this.metrics,hunkIndex:ae,hunkSpecs:j?.hunkSpecs}):void 0)?.totalHeight??0;E+=De;const q=T%l===0,Lt=Math.floor(T/l);if(q&&(k[Lt]=E-(t+y+De),W!=null)){if(W<=0)return!0;W--}const kt=this.getLineHeight(d==="split"?le:ee,te);return E>n-kt&&EI&&(N=Lt),W==null&&E>=i&&q&&(W=w),T++,E+=kt,D>0&&(E+=$e({type:h,metrics:this.metrics})?.totalHeight??0),!1}}),H==null)if(m)H=0,N=0;else return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:c-f-p};N??=H;const M=Math.round(N-L/2),F=Math.max(0,Math.ceil(u/l)-L),O=Math.max(0,Math.min(M,F)),Q=O*l,ge=M<0?S+M*l:S,me=k[O]??0,xe=Q===0?0:v+me,Z=O+ge/l,ve=Zo[0]-s[0]),n=[],i=[0];let r=0;for(const[o,s]of t)n.push(o),r+=s,i.push(r);return{lineIndexes:n,prefixTotals:i}}function Kn({lineIndexes:e,prefixTotals:t},n,i){if(n>=i||e.length===0)return 0;const r=Yn(e,n);return(t[Yn(e,i)]??0)-(t[r]??0)}function Yn(e,t){let n=0,i=e.length;for(;n>1,o=e[r];if(o==null)throw new Error("VirtualizedFileDiff: invalid prefix index");o0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[n-1]:[];const s=[],l=n-o;return i.deletions>0&&t.noEOFCRDeletions&&s.push(l+i.deletions-1),i.additions>0&&t.noEOFCRAdditions&&s.push(n-1),s}function pa(e,t){return(e.diffStyle??"split")!==(t.diffStyle??"split")||(e.overflow??"scroll")!==(t.overflow??"scroll")||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.diffIndicators??"bars")!==(t.diffIndicators??"bars")||(e.hunkSeparators??"line-info")!==(t.hunkSeparators??"line-info")||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)||e.unsafeCSS!==t.unsafeCSS}function ga(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??"line-info")!==(t.hunkSeparators??"line-info")||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function ma(e){return typeof e=="function"?"custom":e??"line-info"}function va(e,t){const[n,i]=e.split(",").map(Number);return t==="split"?i:n}function ie(e){const t=window.devicePixelRatio??1;return Math.round(e*t)/t}const ba=["theme","disableLineNumbers","overflow","themeType","disableFileHeader","disableVirtualizationBuffers","preferredHighlighter","useCSSClasses","useTokenTransformer","tokenizeMaxLineLength","tokenizeMaxLength","unsafeCSS","diffStyle","diffIndicators","disableBackground","expandUnchanged","collapsedContextThreshold","lineDiffType","maxLineDiffLength","expansionLineCount","lineHoverHighlight","enableTokenInteractionsOnWhitespace","enableGutterUtility","__debugPointerEvents","enableLineSelection","controlledSelection","disableErrorHandling"],Ca=["theme","disableLineNumbers","overflow","themeType","disableFileHeader","disableVirtualizationBuffers","preferredHighlighter","useCSSClasses","useTokenTransformer","tokenizeMaxLineLength","tokenizeMaxLength","unsafeCSS","lineHoverHighlight","enableTokenInteractionsOnWhitespace","enableGutterUtility","__debugPointerEvents","enableLineSelection","controlledSelection","disableErrorHandling"],Xn=["renderCustomHeader","renderHeaderPrefix","renderHeaderMetadata","renderAnnotation","renderGutterUtility","onPostRender","onGutterUtilityClick","onLineClick","onLineNumberClick","onLineEnter","onLineLeave","onTokenClick","onTokenEnter","onTokenLeave"],Qn=["onLineSelected","onLineSelectionStart","onLineSelectionChange","onLineSelectionEnd"],hr=Symbol("CodeView.itemOptionsState");function Jn(e,t){Object.defineProperty(e,hr,{configurable:!1,enumerable:!1,value:t})}function ze(e){return e[hr]}function he(e,t,n){Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get(){return n(this)}})}const Sa=120,Zn="--diffs-overflow-override",bn=12e6,cr=1e6,ur=2e6,ya=bn-ur,ei=bn-cr,xa=(()=>{const{navigator:e}=globalThis,t=e.userAgent,n=/iP(?:hone|ad|od)/.test(t),i=e.platform==="MacIntel"&&e.maxTouchPoints>1;return(n||i)&&/AppleWebKit/.test(t)&&/Safari/.test(t)&&!/(CriOS|FxiOS|EdgiOS|OPiOS)/.test(t)})();var wl=class ue{static __STOP=!1;static __lastScrollPosition=0;type="advanced";config={overscrollSize:200,intersectionObserverMargin:0,resizeDebugging:!1};items=[];idToItem=new Map;selectedLines=null;instanceToItem=new Map;layoutDirtyIndex;pendingLayoutReset;renderOptionsRevision=0;slotCoordinator;slotSnapshot;scrollListeners=new Set;scrollHeight=0;containerHeight=-1;scrollTop=0;scrollPageOffset=0;scrollDirty=!0;scrollInteractionFixTimer;pointerEventsDisabled=!1;codeOverflowFix=!1;height=0;heightDirty=!0;windowSpecs={top:0,bottom:0};renderState={scrollTop:-1,firstIndex:-1,lastIndex:-1,stickyHeight:0,stickyTop:-1,stickyBottom:-1};itemMetricsCache=Pe;fileOptionsPrototype;diffOptionsPrototype;pendingScrollTarget;pendingLayoutAnchor;shouldFixContainerFocus=!1;scrollAnimation;root;resizeObserver;container=document.createElement("div");stickyContainer=document.createElement("div");stickyOffset=document.createElement("div");elementPool=[];elementPoolVersion=0;elementPoolTracker=new WeakMap;pendingElementPool=[];options;workerManager;isContainerManaged;constructor(t={theme:P},n,i=!1){this.options=t,this.computeMetricsCache(t.itemMetrics),this.fileOptionsPrototype=this.createFileOptionsPrototype(),this.diffOptionsPrototype=this.createDiffOptionsPrototype(),this.workerManager=n,this.isContainerManaged=i,this.stickyOffset.style.contain="layout size",this.stickyContainer.style.position="sticky",this.stickyContainer.style.width="100%",this.stickyContainer.style.contain="layout style inline-size",this.stickyContainer.style.isolation="isolate",this.stickyContainer.style.display="flex",this.stickyContainer.style.flexDirection="column"}getLayout(){return this.options.layout??jr}computeMetricsCache(t){return this.itemMetricsCache={hunkLineCount:t?.hunkLineCount??Pe.hunkLineCount,lineHeight:t?.lineHeight??Pe.lineHeight,diffHeaderHeight:t?.diffHeaderHeight??Pe.diffHeaderHeight,hunkSeparatorHeight:t?.hunkSeparatorHeight,spacing:t?.spacing??Pe.spacing,paddingTop:t?.paddingTop,paddingBottom:t?.paddingBottom},this.itemMetricsCache}getSmoothScrollSettings(){return this.options.smoothScrollSettings??qr}shouldDisablePointerEvents(){return this.options.pointerEventsOnScroll!==!0}shouldValidateItemHeights(){return Or&&this.options.__devOnlyValidateItemHeights===!0}validateRenderedItemHeight(t){if(!this.shouldValidateItemHeights()||t.element==null)return;const n=t.instance.getAdvancedStickySpecs();if(n==null)return;const i=n.height,r=t.element.getBoundingClientRect().height;i!==r&&console.error("CodeView: reconciled item height does not match DOM height",{id:t.item.id,type:t.type,index:t.index,version:t.version,expectedHeight:i,actualHeight:r,delta:r-i,stickyTopOffset:n.topOffset,virtualizedHeight:t.instance.getVirtualizedHeight(),top:t.top,scrollTop:this.getScrollTop(),windowSpecs:{...this.windowSpecs},element:t.element,instance:t.instance})}validateStickyContainerHeight(){if(!this.shouldValidateItemHeights())return;const{firstIndex:t,lastIndex:n,stickyHeight:i,stickyTop:r,stickyBottom:o}=this.renderState;if(t===-1||n===-1)return;const s=this.stickyContainer.getBoundingClientRect().height;Math.abs(s-i)<1||console.error("CodeView: sticky container height does not match computed layout",{computedStickyHeight:i,actualStickyHeight:s,delta:s-i,stickyTop:r,stickyBottom:o,firstIndex:t,lastIndex:n,firstStickySpecs:this.items[t]?.instance.getAdvancedStickySpecs(),lastStickySpecs:this.items[n]?.instance.getAdvancedStickySpecs(),scrollTop:this.getScrollTop(),scrollPageOffset:this.scrollPageOffset,windowSpecs:{...this.windowSpecs},stickyContainer:this.stickyContainer})}clearScrollInteractionTimer(){this.scrollInteractionFixTimer!=null&&(clearTimeout(this.scrollInteractionFixTimer),this.scrollInteractionFixTimer=void 0)}suspendScrollInteractions(){this.clearScrollInteractionTimer(),this.shouldDisablePointerEvents()&&!this.pointerEventsDisabled&&(this.stickyContainer.style.pointerEvents="none",this.pointerEventsDisabled=!0),xa&&!this.codeOverflowFix&&(this.stickyContainer.style.setProperty(Zn,"hidden"),this.codeOverflowFix=!0),this.scrollInteractionFixTimer=setTimeout(this.restoreScrollInteractions,Sa)}restoreScrollInteractions=()=>{this.clearScrollInteractionTimer(),this.pointerEventsDisabled&&(this.stickyContainer.style.removeProperty("pointer-events"),this.pointerEventsDisabled=!1),this.codeOverflowFix&&(this.stickyContainer.style.setProperty(Zn,"auto"),this.codeOverflowFix=!1)};syncLayout(){const{gap:t,paddingBottom:n,paddingTop:i}=this.getLayout();this.stickyContainer.style.gap=`${t}px`,this.container?.style.setProperty("margin-top",`${i}px`),this.container?.style.setProperty("margin-bottom",`${n}px`)}setup(t){if(this.root!=null)throw new Error("CodeView.setup: already setup");this.workerManager?.subscribeToThemeChanges(this),this.root=t,this.root.style.overflowAnchor="none",this.root.hasAttribute("tabindex")||(this.root.tabIndex=-1),this.container??=document.createElement("div"),this.container.style.contain="layout style",this.syncLayout(),this.container.appendChild(this.stickyOffset),this.container.appendChild(this.stickyContainer),this.root.appendChild(this.container),this.scrollDirty=!0,this.heightDirty=!0,this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.stickyContainer),this.root.addEventListener("scroll",this.handleScroll,{passive:!0}),this.root.addEventListener("wheel",this.clearPendingScroll,{passive:!0}),this.root.addEventListener("touchstart",this.clearPendingScroll,{passive:!0}),this.root.addEventListener("pointerdown",this.clearPendingScroll,{passive:!0}),this.root.addEventListener("keydown",this.clearPendingScroll,{passive:!0}),this.resizeObserver.observe(this.root),this.render(!0),window.__INSTANCE=this,window.__TOGGLE=()=>{ue.__STOP?(ue.__STOP=!1,this.scrollTo({type:"position",position:ue.__lastScrollPosition,behavior:"instant"})):(ue.__lastScrollPosition=this.getScrollTop(),ue.__STOP=!0)}}reset(){this.restoreScrollInteractions(),this.cleanAllRenderedItems(),this.selectedLines=null,this.items.length=0,this.idToItem.clear(),this.instanceToItem.clear(),this.layoutDirtyIndex=void 0,this.pendingLayoutReset=void 0,this.stickyContainer.textContent="",this.stickyOffset.style.height="",this.container?.style.removeProperty("height"),this.containerHeight=-1,this.windowSpecs={top:0,bottom:0},this.pendingLayoutAnchor=void 0,this.shouldFixContainerFocus=!1,this.height=0,this.scrollTop=0,this.scrollPageOffset=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.resetRenderState(),this.isContainerManaged||this.flushSlotCoordinator()}cleanUp(){this.reset(),this.clearElementPool(),this.restoreScrollInteractions(),this.workerManager?.unsubscribeToThemeChanges(this),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.root?.removeEventListener("scroll",this.handleScroll),this.root?.removeEventListener("wheel",this.clearPendingScroll),this.root?.removeEventListener("touchstart",this.clearPendingScroll),this.root?.removeEventListener("pointerdown",this.clearPendingScroll),this.root?.removeEventListener("keydown",this.clearPendingScroll),this.root?.style.removeProperty("overflow-anchor"),this.container?.remove(),this.stickyOffset.remove(),this.stickyContainer.remove(),this.stickyContainer.textContent="",this.root=void 0,this.container=void 0}cleanAllRenderedItems(){if(this.renderState.firstIndex!==-1)for(let t=this.renderState.firstIndex;t<=this.renderState.lastIndex;t++){const n=this.items[t];if(n==null)throw new Error(`CodeView.cleanAllRenderedItems: Item does not exist at index: ${t}`);this.releaseRenderedItem(n)}}primeScrollTarget(t){if(t.type==="position")return;const n=this.idToItem.get(t.id);n?.instance.primeHighlightCache()}getElementPoolLimit(){const t=this.getHeight()+this.config.overscrollSize*2,{diffHeaderHeight:n}=this.itemMetricsCache;return Math.max(8,Math.ceil(t/Math.max(n,10))+1)*(this.isContainerManaged?2:1)}acquireElement(){this.promotePendingPooledElements();let t=this.elementPool.pop();for(;t!=null&&!this.isElementPoolGenerationCurrent(t);)t=this.elementPool.pop();return t??=document.createElement(xi),this.markElementPoolGenerationCurrent(t),t}releaseRenderedItem(t){const{element:n}=t;n!=null&&this.renderedItemOwnsFocus(n)&&(this.shouldFixContainerFocus=!0),t.instance.cleanUp(!0),t.element=void 0,n!=null&&(n.remove(),this.cleanElement(n),this.queueElementForPool(n))}renderedItemOwnsFocus(t){const{activeElement:n}=document;return n===t||t.contains(n)||t.shadowRoot?.activeElement!=null}fixContainerFocus(){this.shouldFixContainerFocus&&(this.shouldFixContainerFocus=!1,this.root?.focus({preventScroll:!0}))}cleanElement(t){const{shadowRoot:n}=t;if(n!=null)for(const i of Array.from(n.children))Ea(i)||i.remove();this.isContainerManaged||t.replaceChildren()}queueElementForPool(t){const n=this.getElementPoolLimit();!this.isElementPoolGenerationCurrent(t)||this.getElementPoolSize()>=n||(this.isElementClean(t)?this.elementPool.push(t):this.pendingElementPool.push(t))}promotePendingPooledElements(){if(this.pendingElementPool.length===0)return;const{pendingElementPool:t}=this;this.pendingElementPool=[];const n=this.getElementPoolLimit();for(const i of t)this.isElementPoolGenerationCurrent(i)&&this.isElementClean(i)&&this.elementPool.lengththis.windowSpecs.bottom}onThemeChange(){this.invalidateElementPool()}setOptions(t){if(t==null)return;this.capturePendingLayoutAnchor();const{options:n}=this,i=this.getLayout(),{itemMetricsCache:r}=this;ka(n,t)&&this.invalidateElementPool(),this.options=t;const o=this.computeMetricsCache(t.itemMetrics),s=!Re(r,o),l=!Re(i,this.getLayout());l&&this.syncLayout();const a=s||wa(n,t);if(a){const d=this.pendingLayoutReset;this.pendingLayoutReset={metrics:s?o:d?.metrics,resetFileLayoutCache:!0,resetDiffLayoutCache:!0,includeEstimatedDiffHeights:d?.includeEstimatedDiffHeights===!0||s||Ta(n,t)}}(l||a)&&(this.markLayoutDirtyFromIndex(0),this.scrollDirty=!0),an(n,t)||this.renderOptionsRevision++,!this.isContainerManaged&&this.items.length>0&&this.render()}capturePendingLayoutAnchor(){this.root==null||this.items.length===0||this.pendingScrollTarget!=null||(this.pendingLayoutAnchor=this.getScrollAnchor(this.getScrollTop()))}render(t=!1){ue.__STOP||(t?(Yr(this.computeRenderRangeAndEmit),this.computeRenderRangeAndEmit()):K(this.computeRenderRangeAndEmit))}instanceChanged(t,n){const i=this.instanceToItem.get(t);if(i==null)throw new Error("CodeView.instanceChanged: An instance has changed that is not registered");n&&this.markItemLayoutDirty(i),this.render()}getWindowSpecs(){return this.windowSpecs}getContainerElement(){return this.root}getRenderedItems(){const{firstIndex:t,lastIndex:n}=this.renderState;if(t===-1||n===-1||n{this.scrollListeners.delete(t)}}getLocalTopForInstance(t){const n=this.instanceToItem.get(t);if(n==null)throw new Error("CodeView.getLocalTopForInstance: unknown virtualized instance");return n.top}getTopForItem(t){const n=this.idToItem.get(t);if(n!=null)return n.top+this.getLayout().paddingTop}createItem(t,n,i){const{itemMetricsCache:r}=this;if(t.type==="diff"){const s=new la(this.createDiffOptions(t.id),this,r,this.workerManager,this.isContainerManaged);return{type:"diff",item:t,version:t.version,index:n,top:i,height:0,element:void 0,renderedOptionsRevision:this.renderOptionsRevision,instance:s}}const o=new ns(this.createFileOptions(t.id),this,r,this.workerManager,this.isContainerManaged);return{type:"file",item:t,version:t.version,index:n,top:i,height:0,element:void 0,renderedOptionsRevision:this.renderOptionsRevision,instance:o}}applySelectedLines(t,n){const{selectedLines:i}=this;t==null&&i==null||t!=null&&i?.id===t.id&&Vt(i.range,t.range)||(i!=null&&i.id!==t?.id&&this.idToItem.get(i.id)?.instance.setSelectedLines(null,{notify:!1}),this.selectedLines=t,this.idToItem.get(t?.id??"")?.instance.setSelectedLines(t?.range??null,n))}syncSelection(){if(this.selectedLines==null)return;const t=this.idToItem.get(this.selectedLines.id);if(t==null){this.selectedLines=null;return}t.instance.setSelectedLines(this.selectedLines.range,{notify:!1})}renamePendingScrollTarget(t,n){const{pendingScrollTarget:i}=this;i==null||i.type==="position"||i.id!==t||(this.pendingScrollTarget={...i,id:n})}renamePendingLayoutAnchor(t,n){this.pendingLayoutAnchor?.id===t&&(this.pendingLayoutAnchor.id=n)}createFileOptionsPrototype(){const t={};for(const n of Ca)he(t,n,()=>this.options[n]);he(t,"stickyHeader",()=>this.options.stickyHeaders),he(t,"collapsed",n=>this.getItemOptions(ze(n),"file")?.item.collapsed===!0);for(const n of Xn)this.defineItemSharedCallback(t,"file",n);for(const n of Qn)this.defineItemSelectionCallback(t,"file",n);return t}createDiffOptionsPrototype(){const t={};for(const n of ba)he(t,n,()=>this.options[n]);he(t,"stickyHeader",()=>this.options.stickyHeaders),he(t,"hunkSeparators",()=>this.options.hunkSeparators),he(t,"collapsed",n=>this.getItemOptions(ze(n),"diff")?.item.collapsed===!0);for(const n of Xn)this.defineItemSharedCallback(t,"diff",n);for(const n of Qn)this.defineItemSelectionCallback(t,"diff",n);return t}createFileOptions(t){const n=Object.create(this.fileOptionsPrototype);return Jn(n,{id:t}),n}createDiffOptions(t){const n=Object.create(this.diffOptionsPrototype);return Jn(n,{id:t}),n}updateItemOptionsId(t,n){ze(t).id=n}getItemOptions(t,n){const i=this.idToItem.get(t.id);if(!(i==null||i.type!==n))return i}defineItemSharedCallback(t,n,i){he(t,i,r=>{if(this.options[i]==null)return;const o=ze(r),s=o.callbackCache??={};let l=s[i];return l==null&&(l=((...a)=>{const d=this.getItemOptions(o,n);if(d==null)return;const h=this.options[i];return h?.(...a,d)}),s[i]=l),l})}defineItemSelectionCallback(t,n,i){he(t,i,r=>{if(this.options.enableLineSelection!==!0)return;const o=ze(r),s=o.callbackCache??={};let l=s[i];return l==null&&(l=(a=>{const d=this.getItemOptions(o,n);if(d==null)return;const h=a==null?null:{id:d.item.id,range:a};this.options.controlledSelection!==!0&&(a!=null||this.selectedLines?.id===d.item.id)&&this.applySelectedLines(h,{notify:!1}),this.options.onSelectedLinesChange?.(h);const c=this.options[i];return c?.(a,d)}),s[i]=l),l})}markLayoutDirtyFromIndex(t){this.layoutDirtyIndex=Math.min(this.layoutDirtyIndex??t,t)}markItemLayoutDirty(t){if(this.items[t.index]!==t)throw new Error(`CodeView.markItemLayoutDirty: unknown item id "${t.item.id}"`);this.markLayoutDirtyFromIndex(t.index)}tryAppendItems(t){if(t.length<=this.items.length)return!1;for(let n=0;n=o.length?this.resetRenderState():this.renderState.lastIndex>=o.length&&(this.renderState.lastIndex=o.length-1),this.markLayoutDirtyFromIndex(a),this.scrollDirty=!0,this.render())}syncItemRecord(t,n){if(t.type!==n.type)throw new Error(`CodeView.syncItemRecord: type mismatch for id "${n.id}"`);return t.version===n.version?!1:(t.item=n,t.version=n.version,t.renderedOptionsRevision=-1,!0)}getMaxScrollTopForHeight(t){const{paddingBottom:n,paddingTop:i}=this.getLayout();return Math.max(i+t+n-this.getHeight(),0)}getMaxScrollTop(){return this.getMaxScrollTopForHeight(this.getScrollHeight())}shouldRebaseScroll(){return this.getMaxScrollTop()>ei}getPagedScrollHeight(){return this.shouldRebaseScroll()?Math.min(this.getScrollHeight(),bn):this.getScrollHeight()}getMaxPagedScrollTop(){return this.getMaxScrollTopForHeight(this.getPagedScrollHeight())}clampPagedScrollTop(t){const n=this.getMaxPagedScrollTop();return Math.max(0,Math.min(t,n))}clampScrollTop(t){const n=this.getMaxScrollTop();return Math.max(0,Math.min(t,n))}getMaxScrollPageOffset(){return Math.max(this.getMaxScrollTop()-this.getMaxPagedScrollTop(),0)}clampScrollPageOffset(t){const n=this.getMaxScrollPageOffset();return Math.max(0,Math.min(t,n))}resolveScrollPageWindow(t,n){let i=ie(this.clampPagedScrollTop(n)),r=this.clampScrollPageOffset(t-i);return i=ie(this.clampPagedScrollTop(t-r)),r=this.clampScrollPageOffset(t-i),{pagedScrollTop:i,scrollPageOffset:r}}resolvePagedScrollPosition(t){if(!this.shouldRebaseScroll())return{pagedScrollTop:this.clampPagedScrollTop(t),scrollPageOffset:0};const n=this.clampScrollPageOffset(this.scrollPageOffset),i=t-n,r=this.getMaxPagedScrollTop(),o=this.getMaxScrollPageOffset(),s=i>ei&&n0;return i<0||i>r||s||l?this.resolveScrollPageWindow(t,l?Math.min(ya,r):ur):{pagedScrollTop:ie(this.clampPagedScrollTop(i)),scrollPageOffset:n}}needsScrollPageUpdate(t){const n=ie(this.clampScrollTop(t)),{scrollPageOffset:i}=this.resolvePagedScrollPosition(n);return i!==this.scrollPageOffset}getPagedLayoutTop(t){return this.shouldRebaseScroll()?Math.max(t-this.scrollPageOffset,0):t}getStickyHeaderOffset(){return this.options.stickyHeaders===!0&&this.options.disableFileHeader!==!0?this.itemMetricsCache.diffHeaderHeight:0}getScrollTargetRect(t){const n=this.idToItem.get(t.id);if(n==null){console.warn(`CodeView.scrollTo: unknown item id "${t.id}"`);return}if(t.type==="item")return{top:n.top,height:n.height};if(t.type==="range"){const r=this.getRangeScrollPosition(n,t);if(r==null){console.warn(`CodeView.scrollTo: unable to resolve range ${ti(t.range)} for item "${t.id}"`);return}return{top:n.top+r.top,height:r.height}}const i=this.getLineScrollPosition(n,t);if(i==null){console.warn(`CodeView.scrollTo: unable to resolve line ${t.lineNumber} for item "${t.id}"`);return}return{top:n.top+i.top,height:i.height}}normalizeScrollTarget(t){if(t.type==="position"||t.align!=="nearest")return t;const n=this.getScrollTargetRect(t);if(n==null)return;const i=t.offset??0,r=this.getLayout().paddingTop+n.top,o=r+n.height,s=this.getScrollTop(),l=s+(t.type==="line"||t.type==="range"?this.getStickyHeaderOffset():0),a=s+this.getHeight();if(!(r-i<=l&&o+i>=a)){if(r-ia)return{...t,align:"end"}}}resolveScrollTargetTop(t){if(t.type==="position"){const r=this.clampScrollTop(t.position);return r!==t.position?r:this.clampScrollTop(t.position-this.getStickyHeaderOffset())}const n=this.idToItem.get(t.id);if(n==null){console.warn(`CodeView.scrollTo: unknown item id "${t.id}"`);return}if(t.type==="item")return this.clampScrollTop(this.resolveAlignedScrollPosition(n.top,n.height,t.align,t.offset));if(t.type==="range"){const r=this.getRangeScrollPosition(n,t);if(r==null){console.warn(`CodeView.scrollTo: unable to resolve range ${ti(t.range)} for item "${t.id}"`);return}return this.clampScrollTop(this.resolveAlignedScrollPosition(n.top+r.top,r.height,t.align,t.offset,this.getStickyHeaderOffset()))}const i=this.getLineScrollPosition(n,t);if(i==null){console.warn(`CodeView.scrollTo: unable to resolve line ${t.lineNumber} for item "${t.id}"`);return}return this.clampScrollTop(this.resolveAlignedScrollPosition(n.top+i.top,i.height,t.align,t.offset,this.getStickyHeaderOffset()))}resolveAlignedScrollPosition(t,n,i,r=0,o=0){t+=this.getLayout().paddingTop;const s=this.getHeight();return i==="center"&&n+r{if(ue.__STOP||this.container==null)return;const n=this.getHeight(),i=this.getScrollTop();let r=i,o=this.pendingLayoutAnchor!=null,s=this.getScrollAnchor(r);if(this.layoutDirtyIndex!=null&&(this.recomputeLayout(this.layoutDirtyIndex,this.pendingLayoutReset),this.layoutDirtyIndex=void 0,this.pendingLayoutReset=void 0,o=!0),o&&s!=null){const S=this.resolveAnchoredScrollTop(s);if(S!=null){const L=S-r;r=S,this.scrollAnimation!=null&&(this.scrollAnimation.position+=L)}}o&&(r=this.clampScrollTop(r),this.syncContainerHeight());const l=this.computeTargetScrollTopForFrame(r,t),a=!o&&(this.renderState.scrollTop===-1||Math.abs(l-this.renderState.scrollTop)>n+this.config.overscrollSize*2);a&&(s=void 0),this.windowSpecs=$t({scrollTop:l,height:n,scrollHeight:this.getScrollHeight(),fitPerfectly:a,fitPerfectlyOverscroll:this.getFitPerfectlyOverscroll(),overscrollSize:this.config.overscrollSize});let d=i;(this.pendingScrollTarget!=null&&l!==d||this.needsScrollPageUpdate(l))&&(this.applyScrollFix(l,d,this.windowSpecs),d=l);const{top:h,bottom:c}=this.windowSpecs,{firstIndex:u,lastIndex:f}=this.renderState;if(u>=0)for(let S=u;S<=f;S++){const L=this.items[S];if(L==null)throw new Error(`CodeView.computeRenderRangeAndEmit: No item at index: ${S}`);L.top>h-L.height&&L.top<=c||this.releaseRenderedItem(L)}let p;const v=new Set,y=this.findFirstVisibleIndex(h),C=this.findLastVisibleIndex(c);for(let S=y;S<=C;S++){const L=this.items[S];if(L==null)throw new Error("CodeView.computeRenderRangeAndEmit: missing item");const{instance:w}=L;L.element==null?(L.element=this.acquireElement(),ri(this.stickyContainer,L.element,p),w.virtualizedSetup(),ii(L,L.element)&&(L.renderedOptionsRevision=this.renderOptionsRevision,v.add(L)),p=L.element):(ri(this.stickyContainer,L.element,p),ii(L,void 0,L.renderedOptionsRevision!==this.renderOptionsRevision)&&(L.renderedOptionsRevision=this.renderOptionsRevision,v.add(L)),p=L.element)}this.renderState.firstIndex=y<=C?y:-1,this.renderState.lastIndex=C,this.flushSlotCoordinator(),this.reconcileRenderedItems(v),this.syncContainerHeight(),this.updateStickyPositioning();const g=s!=null?this.resolveAnchoredScrollTop(s):void 0;s===this.pendingLayoutAnchor&&(this.pendingLayoutAnchor=void 0);const b=g!=null?g-r:0;let m=l,x=!1;if(this.pendingScrollTarget!=null){const S=this.advanceScrollAnimation(t,b);S!=null?(m=S,x=!0):m=r}else m=g??l;m!==d&&(this.applyScrollFix(m,d,this.windowSpecs),d=m),x&&this.pendingScrollTarget!=null&&this.isPendingTargetSettled(this.pendingScrollTarget)&&(this.pendingScrollTarget=void 0,this.scrollAnimation=void 0),this.renderState.scrollTop=ie(d),this.flushManagers(v),this.validateStickyContainerHeight(),this.fixContainerFocus(),(a||this.scrollAnimation!=null)&&this.render()};flushManagers(t){for(const n of t)n.instance.flushManagers()}syncContainerHeight(){const t=this.getPagedScrollHeight();this.container==null||this.containerHeight===t||(this.container.style.height=`${t}px`,this.containerHeight=t)}getStickyBounds(t){const{firstIndex:n,lastIndex:i}=t!=null?{firstIndex:this.findFirstVisibleIndex(t.top),lastIndex:this.findLastVisibleIndex(t.bottom)}:this.renderState;if(n===-1||i===-1||n>i)return;const r=this.items[n]?.instance.getAdvancedStickySpecs(t),o=this.items[i]?.instance.getAdvancedStickySpecs(t);if(!(r==null||o==null))return{stickyTop:this.getPagedLayoutTop(Math.max(r.topOffset,0)),stickyBottom:this.getPagedLayoutTop(o.topOffset+o.height)}}applyStickyPositioning({stickyTop:t,stickyBottom:n}){const i=this.getHeight(),{itemMetricsCache:r}=this,o=n-t;this.renderState.stickyHeight=o,this.renderState.stickyTop=t,this.renderState.stickyBottom=n,this.stickyOffset.style.height=`${t}px`;const s=(Math.random()*r.lineHeight>>0)*-1,l=-Math.max(o+s,0)+i;this.stickyContainer.style.top=`${l}px`,this.stickyContainer.style.bottom=`${l+r.diffHeaderHeight}px`}syncPagedScrollScaffolding(t){this.syncContainerHeight();const n=this.getStickyBounds(t);n!=null&&this.applyStickyPositioning(n)}reconcileRenderedItems(t){const{firstIndex:n,lastIndex:i}=this.renderState;if(n===-1)return;let r=-1,o=!1;for(let s=n;si);s++){const l=this.items[s];if(l==null)throw new Error("CodeView.reconcileRenderedItems: Invalid item");r===-1?r=l.top:l.top!==r&&(l.top=r,l.instance.syncVirtualizedTop(),o=!0),(t==null?s<=i:t.has(l))&&(l.instance.reconcileHeights()&&(o=!0,l.height=l.instance.getVirtualizedHeight()),this.validateRenderedItemHeight(l)),r+=l.instance.getVirtualizedHeight(),s{ue.__STOP||(this.suspendScrollInteractions(),this.scrollDirty=!0,this.notifyScroll(),this.render())};clearPendingScroll=()=>{this.pendingScrollTarget=void 0,this.pendingLayoutAnchor=void 0,this.scrollAnimation=void 0};handleResize=t=>{for(const n of t)if(n.target===this.stickyContainer){if(n.borderBoxSize[0].blockSize!==this.renderState.stickyHeight){const i=this.getScrollTop(),r=this.getScrollAnchor(i);this.reconcileRenderedItems(),this.updateStickyPositioning();const o=r!=null?this.resolveAnchoredScrollTop(r):void 0;if(o!=null){const s=o-i;this.applyScrollFix(o,i,this.windowSpecs),this.scrollAnimation!=null&&(this.scrollAnimation.position+=s)}this.pendingScrollTarget!=null&&this.isPendingTargetSettled(this.pendingScrollTarget)&&(this.pendingScrollTarget=void 0,this.scrollAnimation=void 0)}}else this.scrollDirty=!0,this.heightDirty=!0,this.render()};getScrollAnchorViewportTop(t,n){return t=t+s)break;if(d>=t)return{type:"item",id:a.item.id,viewportOffset:d-t};const h=this.getScrollAnchorViewportTop(d,t)-d,c=a.instance.getNumericScrollAnchor(h);if(c!=null){const u=d+c.top;return{type:"line",id:a.item.id,lineNumber:c.lineNumber,side:c.side,viewportOffset:u-t}}}}resolveAnchoredScrollTop(t){const n=this.idToItem.get(t.id);if(n==null)return;const{paddingTop:i}=this.getLayout();if(t.type==="item"){const s=i+n.top;return this.clampScrollTop(s-t.viewportOffset)}const r=n.type==="diff"?n.instance.getLinePosition(t.lineNumber,t.side):n.instance.getLinePosition(t.lineNumber);if(r==null)return;const o=i+n.top+r.top;return this.clampScrollTop(o-t.viewportOffset)}applyScrollFix(t,n,i){if(this.root==null)return;const r=ie(this.clampScrollTop(t)),o=ie(n),{scrollPageOffset:s}=this,l=ie(this.clampPagedScrollTop(o-s)),{pagedScrollTop:a,scrollPageOffset:d}=this.resolvePagedScrollPosition(r),h=a,c=s!==d;r===this.renderState.scrollTop&&r===o&&h===l&&!c||(this.suspendScrollInteractions(),(h!==l||c)&&(this.scrollPageOffset=d,this.syncPagedScrollScaffolding(i)),h!==l&&this.root.scrollTo({top:h,behavior:"instant"}),this.renderState.scrollTop=r,this.scrollTop=r,this.scrollDirty=!1)}isPendingTargetSettled(t){const n=this.resolveScrollTargetTop(t);return n==null?!0:ie(this.getScrollTop())===ie(n)}getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;const t=this.root?.scrollTop??0;return this.scrollTop=this.clampScrollTop(t+this.scrollPageOffset),this.scrollTop}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root?.getBoundingClientRect().height??0,this.height):this.height}getScrollHeight(){return this.scrollHeight}flushSlotCoordinator(){if(this.slotCoordinator==null)return;const{onSnapshotChange:t}=this.slotCoordinator,n=oi(this.getRenderedItems(),this.slotCoordinator);Aa(this.slotSnapshot,n)||(this.slotSnapshot=n,t(n))}notifyScroll(){if(this.scrollListeners.size===0)return;const t=this.getScrollTop();for(const n of this.scrollListeners)n(t,this)}findFirstVisibleIndex(t){let n=0,i=this.items.length-1,r=this.items.length;for(;n<=i;){const o=n+i>>1,s=this.items[o];if(s==null)throw new Error("CodeView.findFirstVisibleIndex: invalid item index");s.top+s.height>t?(r=o,i=o-1):n=o+1}return r}findLastVisibleIndex(t){let n=0,i=this.items.length-1,r=-1;for(;n<=i;){const o=n+i>>1,s=this.items[o];if(s==null)throw new Error("CodeView.findLastVisibleIndex: invalid item index");s.top<=t?(r=o,n=o+1):i=o-1}return r}recomputeLayout(t=0,n){if(this.items.length===0){this.scrollHeight=0;return}const i=this.getLayout();let r=0;if(t>0){const o=this.items[t-1];if(o==null)throw new Error("CodeView.recomputeLayout: invalid dirty index");r=o.top+o.height+i.gap}for(let o=t;o0}function oi(e,{hasHeaderRenderers:t,hasAnnotationRenderer:n,hasGutterRenderer:i}){if(e.length===0)return;if(t||i)return e;if(!n)return;const r=[];for(const o of e)Ia(o.item)&&r.push(o);return r.length>0?r:void 0}function Aa(e,t){if(e==null||t==null)return e===t;if(e.length!==t.length)return!1;for(let n=0;n{const a=l===n.length-1,d=this.options.highlighter.codeToTokens(s,{...this.options,grammarState:this.lastStableGrammarState}),h=d.tokens[0];a||h.push({content:` -`,offset:0}),a?(r=h,this.lastUnstableCodeChunk=s):(this.lastStableGrammarState=d.grammarState,i.push(...h))}),this.tokensStable.push(...i),this.tokensUnstable=r,{recall:o,stable:i,unstable:r}}close(){const t=this.tokensUnstable;return this.tokensUnstable=[],this.lastUnstableCodeChunk="",this.lastStableGrammarState=void 0,{stable:t}}clear(){this.tokensStable=[],this.tokensUnstable=[],this.lastUnstableCodeChunk="",this.lastStableGrammarState=void 0}clone(){const t=new fr(this.options);return t.lastUnstableCodeChunk=this.lastUnstableCodeChunk,t.tokensUnstable=this.tokensUnstable,t.tokensStable=this.tokensStable,t.lastStableGrammarState=this.lastStableGrammarState,t}},si=class extends TransformStream{tokenizer;options;constructor(e){const t=new Ra(e),{allowRecalls:n=!1}=e;super({async transform(i,r){const{stable:o,unstable:s,recall:l}=await t.enqueue(i);n&&l>0&&r.enqueue({recall:l});for(const a of o)r.enqueue(a);if(n)for(const a of s)r.enqueue(a)},async flush(i){const{stable:r}=t.close();if(!n)for(const o of r)i.enqueue(o)}}),this.tokenizer=t,this.options=e}};function Ha(e){const t=document.createElement("span");return t.style=Ir(e.htmlStyle??Ar(e)),t.textContent=e.content,t}let Ma=-1;var Tl=class{options;__id=`file-stream:${++Ma}`;highlighter;stream;abortController;fileContainer;pre;code;gutterElement;contentElement;themeCSSStyle;appliedThemeCSS;currentRowCount=0;constructor(e={theme:P}){this.options=e,this.currentLineIndex=this.options.startingLineIndex??1}cleanUp(){this.abortController?.abort(),this.abortController=void 0}setThemeType(e){(this.options.themeType??"system")!==e&&(this.options={...this.options,themeType:e},!(typeof this.options.theme=="string"||this.fileContainer==null||this.appliedThemeCSS==null)&&this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType))}async initializeHighlighter(){return this.highlighter=await St(dn(this.options.lang,this.options)),this.highlighter}queuedSetupArgs;async setup(e,t){const n=this.queuedSetupArgs!=null;if(this.queuedSetupArgs=[e,t],n)return;this.highlighter??=await this.initializeHighlighter();const[i,r]=this.queuedSetupArgs;this.queuedSetupArgs=void 0;const o=i;this.setupStream(o,r,this.highlighter)}setupStream(e,t,n){const{disableLineNumbers:i=!1,overflow:r="scroll",theme:o=P,themeType:s="system"}=this.options,l=this.getOrCreateFileContainer();l.parentElement==null&&t.appendChild(l),this.pre??=document.createElement("pre"),this.pre.parentElement==null&&l.shadowRoot?.appendChild(this.pre);const a=typeof o=="string"?n.getTheme(o).type:void 0,d=hn({theme:o,highlighter:n});this.applyThemeState(l,d,s,a);const h=gn(this.pre,{type:"file",diffIndicators:"none",disableBackground:!0,disableLineNumbers:i,overflow:r,split:!1,totalLines:0});h.textContent="",this.pre=h,this.code=Ge({code:this.code,pre:h}),this.gutterElement=void 0,this.contentElement=void 0,this.currentRowCount=0,this.currentLineElement=void 0,this.currentLineIndex=this.options.startingLineIndex??1,this.abortController?.abort(),this.abortController=new AbortController;const{onStreamStart:c,onStreamClose:u,onStreamAbort:f}=this.options;this.stream?.cancel().catch(()=>{}),this.stream=e,this.stream.pipeThrough(typeof o=="string"?new si({...this.options,theme:o,highlighter:n,allowRecalls:!0,defaultColor:!1,cssVariablePrefix:_("token"),tokenizeTimeLimit:0}):new si({...this.options,themes:o,highlighter:n,allowRecalls:!0,defaultColor:!1,cssVariablePrefix:_("token"),tokenizeTimeLimit:0})).pipeTo(new WritableStream({start(p){c?.(p)},close(){u?.()},abort(p){f?.(p)},write:this.handleWrite}),{signal:this.abortController.signal}).catch(p=>{p.name!=="AbortError"&&console.error("FileStream pipe error:",p)})}queuedTokens=[];handleWrite=e=>{"recall"in e&&this.queuedTokens.length>=e.recall?this.queuedTokens.length=this.queuedTokens.length-e.recall:this.queuedTokens.push(e),K(this.render),this.options.onStreamWrite?.(e)};currentLineIndex;currentLineElement;render=()=>{this.options.onPreRender?.(this);const{gutter:e,content:t}=this.getOrCreateStreamColumns(),n=document.createDocumentFragment(),i=document.createDocumentFragment();for(const r of this.queuedTokens)if("recall"in r){if(this.currentLineElement==null)throw new Error("FileStream.render: no current line element, shouldnt be possible to get here");if(r.recall>this.currentLineElement.childNodes.length)throw new Error("FileStream.render: Token recall exceed the current line, there's probably a bug...");for(let o=0;o0&&e.appendChild(n),i.childNodes.length>0&&t.appendChild(i),this.queuedTokens.length=0,this.options.onPostRender?.(this)};getOrCreateStreamColumns(){if(this.code==null)throw new Error("FileStream: expected code element to exist");if(this.gutterElement!=null&&this.contentElement!=null)return{gutter:this.gutterElement,content:this.contentElement};const e=document.createElement("div");e.dataset.gutter="";const t=document.createElement("div");return t.dataset.content="",this.code.appendChild(e),this.code.appendChild(t),this.gutterElement=e,this.contentElement=t,{gutter:e,content:t}}updateRowSpan(){this.gutterElement!=null&&(this.gutterElement.style.gridRow=`span ${this.currentRowCount}`),this.contentElement!=null&&(this.contentElement.style.gridRow=`span ${this.currentRowCount}`)}createLine(){const e=this.currentLineIndex,t=`${e-1}`,n=document.createElement("div");n.dataset.columnNumber=`${e}`,n.dataset.lineType="context",n.dataset.lineIndex=t;const i=document.createElement("span");i.dataset.lineNumberContent="",i.textContent=`${e}`,n.appendChild(i);const r=document.createElement("div");return r.dataset.line=`${e}`,r.dataset.lineType="context",r.dataset.lineIndex=t,this.currentRowCount+=1,this.updateRowSpan(),this.currentLineElement=r,{gutterLine:n,contentLine:r}}getOrCreateFileContainer(e){return e!=null&&e===this.fileContainer||e==null&&this.fileContainer!=null?this.fileContainer:(this.fileContainer!=null&&e!=null&&e!==this.fileContainer&&(this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0),this.fileContainer=e??document.createElement("diffs-container"),this.fileContainer)}applyThemeState(e,t,n,i){const r=e.shadowRoot??e.attachShadow({mode:"open"}),o=i??n,s=this.options.theme??P,l=typeof s=="string"?s:{...s},a=He(r);if(this.themeCSSStyle?.parentNode===r&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===o&&this.appliedThemeCSS.scrollbarGutter===a){this.appliedThemeCSS.theme=l;return}this.themeCSSStyle=mn({shadowRoot:r,currentNode:this.themeCSSStyle,themeCSS:pn(t,o,a)}),this.appliedThemeCSS=this.themeCSSStyle!=null?{theme:l,themeStyles:t,themeType:o,baseThemeType:i,scrollbarGutter:a}:void 0}};function pr(e,t){const{resolution:n,hunkIndex:i,startContentIndex:r,endContentIndex:o,indexesToDelete:s=new Set}=t,l=e.hunks[i];if(l==null)throw console.error({diff:e,hunkIndex:i}),new Error(`resolveRegion: Invalid hunk index: ${i}`);if(r<0||o>=l.hunkContent.length||r>o)throw new Error(`resolveRegion: Invalid content range, ${r}, ${o}`);const{hunks:a,additionLines:d,deletionLines:h}=e,c={...e,hunks:[],deletionLines:[],additionLines:[],splitLineCount:0,unifiedLineCount:0,cacheKey:e.cacheKey!=null?`${e.cacheKey}:${n[0]}-${i}:${r}-${o}`:void 0},u={nextAdditionLineIndex:0,nextDeletionLineIndex:0,nextAdditionStart:1,nextDeletionStart:1,splitLineCount:0,unifiedLineCount:0},f=i===a.length-1&&o===l.hunkContent.length-1,p=!e.isPartial;for(const[y,C]of a.entries()){Da(e,c,u,C.deletionLineIndex-C.collapsedBefore,C.additionLineIndex-C.collapsedBefore,C.collapsedBefore,p);const g={...C,hunkContent:[],additionStart:u.nextAdditionStart,deletionStart:u.nextDeletionStart,additionLineIndex:u.nextAdditionLineIndex,deletionLineIndex:u.nextDeletionLineIndex,additionCount:0,deletionCount:0,deletionLines:0,additionLines:0,splitLineStart:u.splitLineCount,unifiedLineStart:u.unifiedLineCount,splitLineCount:0,unifiedLineCount:0};for(const[b,m]of C.hunkContent.entries())if(y!==i||bo){ai(m,c,h,d);const x={...m,additionLineIndex:u.nextAdditionLineIndex,deletionLineIndex:u.nextDeletionLineIndex};g.hunkContent.push(x),Ut(x,u,g)}else if(s.has(b))g.hunkContent.push({type:"context",lines:0,deletionLineIndex:u.nextDeletionLineIndex,additionLineIndex:u.nextAdditionLineIndex});else if(m.type==="context"){ai(m,c,h,d);const x={...m,deletionLineIndex:u.nextDeletionLineIndex,additionLineIndex:u.nextAdditionLineIndex};g.hunkContent.push(x),Ut(x,u,g)}else{Pa(n,m,c,h,d);const x={type:"context",lines:n==="deletions"?m.deletions:n==="additions"?m.additions:m.deletions+m.additions,deletionLineIndex:u.nextDeletionLineIndex,additionLineIndex:u.nextAdditionLineIndex};g.hunkContent.push(x),Ut(x,u,g)}if(y===i&&f){const b=n==="deletions"?C.noEOFCRDeletions:C.noEOFCRAdditions;g.noEOFCRAdditions=b,g.noEOFCRDeletions=b}c.hunks.push(g)}const v=a.at(-1);return v!=null&&!e.isPartial&&gr(c,h,d,v.deletionLineIndex+v.deletionCount,v.additionLineIndex+v.additionCount,Math.min(h.length-(v.deletionLineIndex+v.deletionCount),d.length-(v.additionLineIndex+v.additionCount))),c.splitLineCount=u.splitLineCount,c.unifiedLineCount=u.unifiedLineCount,c}function gr(e,t,n,i,r,o){for(let s=0;s0){let c=0,u=0,f=i.indexOf(` -`,c);for(;f!==-1;)di(n,i.slice(c,f+1),u),c=f+1,u++,f=i.indexOf(` -`,c);c0)throw new Error("parseMergeConflictDiffFromFile: unfinished merge conflict marker stack");n.activeHunk!=null&&n.activeHunk.hunkContent.length>0&&(Cn(n,n.activeHunk,"trailing"),yr(n));for(let c=0;c0&&n.additionLines.length>0&&n.deletionLines.length>0){const c=n.hunks[n.hunks.length-1],u=Math.max(n.additionLines.length-(c.additionStart+c.additionCount-1),0);n.splitLineCount+=u,n.unifiedLineCount+=u}const o=n.deletionLines.join(""),s=n.additionLines.join(""),l=gi(e,"current",o),a=gi(e,"incoming",s);let d="change";s===""?d="deleted":o===""&&(d="new");const h={name:e.name,prevName:void 0,type:d,hunks:n.hunks,splitLineCount:n.splitLineCount,unifiedLineCount:n.unifiedLineCount,isPartial:!1,deletionLines:n.deletionLines,additionLines:n.additionLines,cacheKey:e.cacheKey!=null?`${e.cacheKey}:merge-conflict-diff`:void 0};return{fileDiff:h,currentFile:l,incomingFile:a,actions:n.actions,markerRows:Lr(h,n.actions)}}function di(e,t,n){const i=e.conflictStack[e.conflictStack.length-1];if(i==null){if(t.length>=7&&t.charCodeAt(0)===60&&pi(t)==="start"){ui(e,t,n);return}hi(e,t);return}const r=pi(t);if(r==="start"){ui(e,t,n);return}if(r==="base"){i.stage="base",i.baseMarkerLineIndex=n,i.markerLines.base=t;return}if(r==="separator"){i.stage="incoming",i.separatorLineIndex=n,i.markerLines.separator=t;return}if(r==="end"){const o=e.conflictStack.pop();if(o==null)throw new Error("parseMergeConflictDiffFromFile: encountered end marker before start marker");Ua(e,o,n,t);return}i.stage==="current"?ci(e,"deletion",t,i.conflictIndex,"current"):i.stage==="base"?hi(e,t,i.conflictIndex):ci(e,"addition",t,i.conflictIndex,"incoming")}function Cr(e){return e.activeHunk??=xr(e.additionLines.length+1,e.deletionLines.length+1),e.activeHunk}function Sr(e,t,n,i){const r=e.conflictBuilders[t];if(r==null)throw new Error(`parseMergeConflictDiffFromFile: failed to locate conflict action ${t}`);const o=r.action,s=e.hunks.length;if(o.hunkIndex<0)o.hunkIndex=s;else if(o.hunkIndex!==s)throw new Error(`parseMergeConflictDiffFromFile: conflict ${t} spans multiple hunks and cannot be anchored`);if(o.startContentIndex<0&&(o.startContentIndex=i),o.endContentIndex=i,o.endMarkerContentIndex=i,n==="current"){o.currentContentIndex??=i;return}if(n==="base"){o.baseContentIndex??=i;return}o.incomingContentIndex=i}function Fa(e,t,n,i){const r=e.hunkContent,o=r[r.length-1];return o?.type==="change"?(t==="addition"?o.additions++:o.deletions++,r.length-1):(r.push({type:"change",additions:t==="addition"?1:0,deletions:t==="deletion"?1:0,additionLineIndex:n,deletionLineIndex:i}),r.length-1)}function Cn(e,t,n){let i=t.contextBufferCount,r=t.contextBufferAdditionStart,o=t.contextBufferDeletionStart;if(n==="leading"&&i>e.maxContextLines){const h=i-e.maxContextLines;r+=h,o+=h,i=e.maxContextLines,t.additionStart+=h,t.deletionStart+=h,t.additionLineIndex+=h,t.deletionLineIndex+=h}if(n==="trailing"&&i>e.maxContextLines&&(i=e.maxContextLines),i===0){t.contextBufferCount=0,t.contextBufferBaseConflicts=void 0;return}const s=t.hunkContent,l=s[s.length-1];let a;l?.type==="context"?(l.lines+=i,a=s.length-1):(s.push({type:"context",lines:i,additionLineIndex:r,deletionLineIndex:o}),a=s.length-1),t.additionCount+=i,t.deletionCount+=i;const d=t.contextBufferBaseConflicts;if(d!=null){const h=r-t.contextBufferAdditionStart;for(const[c,u]of d)c>=h&&c=d&&(s??=new Map,s.set(h-d,c))}Cn(e,t,"trailing");const l=t.additionCount,a=t.deletionCount;yr(e),e.activeHunk=xr(t.additionStart+l+i,t.deletionStart+a+i),e.activeHunk.contextBufferAdditionStart=r,e.activeHunk.contextBufferDeletionStart=o,e.activeHunk.contextBufferCount=e.maxContextLines,e.activeHunk.contextBufferBaseConflicts=s}function hi(e,t,n=-1){const i=Cr(e);i.contextBufferCount===0&&(i.contextBufferAdditionStart=e.additionLines.length,i.contextBufferDeletionStart=e.deletionLines.length),e.additionLines.push(t),e.deletionLines.push(t),n>=0&&(i.contextBufferBaseConflicts??=new Map,i.contextBufferBaseConflicts.set(i.contextBufferCount,n)),i.contextBufferCount++}function ci(e,t,n,i,r){let o=Cr(e);o.hunkContent.length>0&&o.contextBufferCount>e.maxContextLines2&&(za(e),o=e.activeHunk),Cn(e,o,o.hunkContent.length===0?"leading":"before-change");const s=e.additionLines.length,l=e.deletionLines.length;t==="addition"?e.additionLines.push(n):e.deletionLines.push(n);const a=Fa(o,t,s,l);t==="addition"?(o.additionCount++,o.additionLines++):(o.deletionCount++,o.deletionLines++),Sr(e,i,r,a)}function Ua(e,t,n,i){if(t.separatorLineIndex==null||t.markerLines.separator==null)throw new Error(`parseMergeConflictDiffFromFile: conflict ${t.conflictIndex} is missing a separator marker`);const r=e.conflictBuilders[t.conflictIndex];if(r==null)throw new Error(`parseMergeConflictDiffFromFile: failed to finalize conflict ${t.conflictIndex}`);const o=r.action;o.markerLines.separator=t.markerLines.separator,o.markerLines.end=i,t.markerLines.base!=null&&(o.markerLines.base=t.markerLines.base),o.conflict={conflictIndex:t.conflictIndex,startLineIndex:t.startLineIndex,startLineNumber:t.startLineIndex+1,separatorLineIndex:t.separatorLineIndex,separatorLineNumber:t.separatorLineIndex+1,endLineIndex:n,endLineNumber:n+1,baseMarkerLineIndex:t.baseMarkerLineIndex,baseMarkerLineNumber:t.baseMarkerLineIndex!=null?t.baseMarkerLineIndex+1:void 0};const s=o.currentContentIndex??o.incomingContentIndex;if(o.currentContentIndex??=s,o.incomingContentIndex??=s,o.startContentIndex<0&&s!=null&&(o.startContentIndex=s),o.endContentIndex<0&&s!=null&&(o.endContentIndex=s),o.endMarkerContentIndex<0&&s!=null&&(o.endMarkerContentIndex=s),o.hunkIndex<0||o.startContentIndex<0||o.endContentIndex<0||o.endMarkerContentIndex<0)throw new Error(`parseMergeConflictDiffFromFile: failed to anchor merge conflict ${t.conflictIndex}`);e.actions[o.conflictIndex]=o,r.completed=!0}function ui(e,t,n){const i=e.nextConflictIndex;e.nextConflictIndex++,e.conflictStack.push({conflictIndex:i,stage:"current",startLineIndex:n,markerLines:{start:t}}),e.conflictBuilders[i]={completed:!1,action:{conflict:{conflictIndex:i,startLineIndex:n,startLineNumber:n+1,separatorLineIndex:n,separatorLineNumber:n+1,endLineIndex:n,endLineNumber:n+1,baseMarkerLineIndex:void 0,baseMarkerLineNumber:void 0},conflictIndex:i,hunkIndex:-1,startContentIndex:-1,endContentIndex:-1,endMarkerContentIndex:-1,markerLines:{start:t,separator:"",end:""}}}}function xr(e,t){return{additionStart:e,deletionStart:t,additionCount:0,deletionCount:0,additionLines:0,deletionLines:0,additionLineIndex:Math.max(e-1,0),deletionLineIndex:Math.max(t-1,0),hunkContent:[],contextBufferAdditionStart:Math.max(e-1,0),contextBufferDeletionStart:Math.max(t-1,0),contextBufferCount:0,contextBufferBaseConflicts:void 0}}function fi(e,t){return t===1?`${e}`:`${e},${t}`}function pi(e){if(e.length<7)return;const t=e.charCodeAt(0);if(t!==60&&t!==62&&t!==61&&t!==124)return;const n=Ba(e);if(n<7)return;let i=1;for(;i0&&e.charCodeAt(t-1)===10&&t--,t>0&&e.charCodeAt(t-1)===13&&t--,t}function _a(e){return e===9||e===10||e===11||e===12||e===13||e===32}function gi(e,t,n){return{...e,contents:n,cacheKey:e.cacheKey!=null?`${e.cacheKey}:merge-conflict-${t}`:void 0}}function Lr(e,t){const n=[],i=new Array(e.hunks.length),r=(s,l)=>{const a=e.hunks[s];if(a==null)return 0;let d=i[s];if(d==null){d=new Array(a.hunkContent.length+1);let h=a.unifiedLineStart;d[0]=h;for(let c=0;c{const a=r(s,l),d=i[s]?.[Math.max(l+1,0)]??r(s,l+1);return Math.max(a,d-1)};for(const s of t){if(s==null)continue;const l=e.hunks[s.hunkIndex];if(l==null)continue;const a=r(s.hunkIndex,s.startContentIndex);if(n.push(ke(s,"marker-start",s.startContentIndex,s.markerLines.start,a)),s.baseContentIndex!=null){const f=s.currentContentIndex,p=s.incomingContentIndex;if(f==null||p==null)continue;const v=s.markerLines.base;if(v==null)continue;const y=l.hunkContent[f],C=l.hunkContent[s.baseContentIndex],g=l.hunkContent[p];if(y?.type!=="change"||C?.type!=="context"||g?.type!=="change")continue;const b=r(s.hunkIndex,f),m=r(s.hunkIndex,p);n.push(ke(s,"marker-base",s.baseContentIndex,v,b+y.deletions)),n.push(ke(s,"marker-separator",s.baseContentIndex,s.markerLines.separator,m),ke(s,"marker-end",s.endMarkerContentIndex,s.markerLines.end,o(s.hunkIndex,s.endMarkerContentIndex)));continue}const d=s.currentContentIndex;if(d==null)continue;const h=l.hunkContent[d];if(h?.type!=="change")continue;const c=r(s.hunkIndex,d),u=h.deletions>0?c+h.deletions:a;n.push(ke(s,"marker-separator",d,s.markerLines.separator,u),ke(s,"marker-end",s.endMarkerContentIndex,s.markerLines.end,o(s.hunkIndex,s.endMarkerContentIndex)))}return n}function ke(e,t,n,i,r){return{type:t,hunkIndex:e.hunkIndex,contentIndex:n,conflictIndex:e.conflictIndex,lineText:i,lineIndex:r}}function Va(e,t){let n=e.unifiedLineStart;for(let i=0;i{const t=this.injectedRows.get(`${e.hunkIndex}:${e.lineIndex}`);if(t==null||t.length===0)return;const{mergeConflictActionsType:n}=this.getOptionsWithDefaults(),i=[],r=[];for(const o of t){if(o.type==="actions"){i.push({content:$a({row:o,includeDefaultActions:n==="default",includeSlot:!0}),gutter:Ci("action")});continue}(o.type==="marker-end"?r:i).push({content:Wa(o),gutter:Ci("marker",o.type)})}return{before:i.length>0?i:void 0,after:r.length>0?r:void 0}};getOptionsWithDefaults(){const e=super.getOptionsWithDefaults();return e.diffStyle="unified",e.lineDiffType="none",e.mergeConflictActionsType=this.options.mergeConflictActionsType??"default",e}};function vi(e){return e!=null?{"data-merge-conflict":e}:void 0}function bi(e,t){if(t!=null){if(e==="change")return t==="current"||t==="incoming"?{"data-line-type":"context","data-merge-conflict":t}:void 0;if(t==="marker-start"||t==="marker-base"||t==="marker-separator"||t==="marker-end")return{"data-merge-conflict":t}}}function Ci(e,t){const n=G(void 0,"annotation",1);return n.properties["data-gutter-buffer"]=e==="action"?"merge-conflict-action":`merge-conflict-${t??"marker"}`,n}function $a({row:e,includeDefaultActions:t,includeSlot:n}){const i=t?Ga(e.conflictIndex):[];return i.push(A({tagName:"slot",properties:{name:vr({hunkIndex:e.hunkIndex,lineIndex:e.lineIndex,conflictIndex:e.conflictIndex}),"data-merge-conflict-action-slot":""}})),A({tagName:"div",properties:{"data-merge-conflict-actions":""},children:[A({tagName:"div",properties:{"data-merge-conflict-actions-content":""},children:i})]})}function Wa(e){return A({tagName:"div",properties:{"data-merge-conflict":e.type,"data-merge-conflict-marker-row":""},children:[$(e.lineText.replace(/(?:\r\n|\n|\r)$/,""))]})}function Ga(e){return[Bt({resolution:"current",label:"Accept current change",conflictIndex:e}),Si(),Bt({resolution:"incoming",label:"Accept incoming change",conflictIndex:e}),Si(),Bt({resolution:"both",label:"Accept both",conflictIndex:e})]}function Bt({resolution:e,label:t,conflictIndex:n}){return A({tagName:"button",properties:{type:"button","data-merge-conflict-action":e,"data-merge-conflict-conflict-index":`${n}`},children:[$(t)]})}function Si(){return A({tagName:"span",properties:{"data-merge-conflict-action-separator":""},children:[$("|")]})}function ja(e,t){return e.hunkIndex===t.hunkIndex&&e.startContentIndex===t.startContentIndex&&e.endContentIndex===t.endContentIndex&&e.currentContentIndex===t.currentContentIndex&&e.baseContentIndex===t.baseContentIndex&&e.incomingContentIndex===t.incomingContentIndex&&e.endMarkerContentIndex===t.endMarkerContentIndex&&e.conflictIndex===t.conflictIndex&&qa(e.conflict,t.conflict)}function qa(e,t){return e.conflictIndex===t.conflictIndex&&e.startLineIndex===t.startLineIndex&&e.startLineNumber===t.startLineNumber&&e.separatorLineIndex===t.separatorLineIndex&&e.separatorLineNumber===t.separatorLineNumber&&e.endLineIndex===t.endLineIndex&&e.endLineNumber===t.endLineNumber&&e.baseMarkerLineIndex===t.baseMarkerLineIndex&&e.baseMarkerLineNumber===t.baseMarkerLineNumber}let Ka=-1;var El=class extends dr{options;__id=`unresolved-file:${++Ka}`;type="unresolved-file";computedCache={file:void 0,fileDiff:void 0,actions:void 0,markerRows:void 0};conflictActions=[];markerRows=[];conflictActionCache=new Map;constructor(e={theme:P},t,n=!1){super(void 0,t,n),this.options=e,this.setOptions(e)}setOptions(e){if(e!=null){if(e.onMergeConflictAction!=null&&e.onMergeConflictResolve!=null)throw new Error("UnresolvedFile: onMergeConflictAction and onMergeConflictResolve are mutually exclusive. Use only one callback.");this.options=e,this.hunksRenderer.setOptions(this.getHunksRendererOptions(e)),this.syncInteractionOptions()}}syncInteractionOptions(){this.interactionManager.setOptions(qe(this.options,typeof this.options.hunkSeparators=="function"||(this.options.hunkSeparators??"line-info")==="line-info"||this.options.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex,this.handleMergeConflictActionClick))}createHunksRenderer(e){return new mi(this.getHunksRendererOptions(e),this.handleHighlightRender,this.workerManager)}getHunksRendererOptions(e){return il(e,this.options)}applyPreNodeAttributes(e,t){super.applyPreNodeAttributes(e,t,{"data-has-merge-conflict":""})}cleanUp(){this.emitPostRender(!0),this.clearMergeConflictActionCache(),this.computedCache={file:void 0,fileDiff:void 0,actions:void 0,markerRows:void 0},this.conflictActions=[],super.cleanUp()}getOrComputeDiff({file:e,fileDiff:t,actions:n,markerRows:i}){const{maxContextLines:r,onMergeConflictAction:o}=this.options;e:if(o!=null){const s=t!=null;if(s!==(n!=null)||s!==(i!=null))throw new Error("UnresolvedFile.getOrComputeDiff: fileDiff, actions, and markerRows must be passed together");if(t!=null&&n!=null&&i!=null){this.computedCache={file:e??this.computedCache.file,fileDiff:t,actions:n,markerRows:i};break e}else if(e!=null||this.computedCache.file!=null){if(e!=null&&this.computedCache.file!=null&&!se(e,this.computedCache.file)&&this.computedCache.fileDiff!=null&&this.computedCache.actions!=null)throw new Error("UnresolvedFile.getOrComputeDiff: file can only be used to initialize unresolved state once. Pass fileDiff and actions for subsequent updates.");if(e??=this.computedCache.file,e==null)throw new Error("UnresolvedFile.getOrComputeDiff: file is null, should be impossible");if(!se(e,this.computedCache.file)||this.computedCache.fileDiff==null||this.computedCache.actions==null){const l=li(e,r);this.computedCache={file:e,fileDiff:l.fileDiff,actions:l.actions,markerRows:l.markerRows}}t=this.computedCache.fileDiff,n=this.computedCache.actions,i=this.computedCache.markerRows;break e}else{t=this.computedCache.fileDiff,n=this.computedCache.actions,i=this.computedCache.markerRows;break e}}else{if(t!=null||n!=null||i!=null)throw new Error("UnresolvedFile.getOrComputeDiff: fileDiff, actions, and markerRows are only usable in controlled mode, you must pass in `onMergeConflictAction`");if(e!=null&&this.computedCache.file!=null&&!se(e,this.computedCache.file))throw new Error("UnresolvedFile.getOrComputeDiff: uncontrolled unresolved files parse the file only once. Later updates must come from the cached diff state.");if(this.computedCache.file??=e,this.computedCache.fileDiff==null&&this.computedCache.file!=null){const s=li(this.computedCache.file,r);this.computedCache.fileDiff=s.fileDiff,this.computedCache.actions=s.actions,this.computedCache.markerRows=s.markerRows}t=this.computedCache.fileDiff,n=this.computedCache.actions,i=this.computedCache.markerRows;break e}if(!(t==null||n==null||i==null))return{fileDiff:t,actions:n,markerRows:i}}hydrate(e){const{file:t,fileDiff:n,actions:i,markerRows:r,lineAnnotations:o,fileContainer:s,prerenderedHTML:l,preventEmit:a=!1}=e,d=this.getOrComputeDiff({file:t,fileDiff:n,actions:i,markerRows:r});d!=null&&(this.hydrateElements(s,l),this.setActiveMergeConflictState(d.actions,d.markerRows),tl(this.pre,d.fileDiff,this.options.collapsed)||nl(this.headerElement,d.fileDiff,this.options.disableFileHeader)?this.render({...e,preventEmit:!0}):(this.hydrationSetup({fileDiff:d.fileDiff,lineAnnotations:o}),this.pre!=null&&this.renderMergeConflictActionSlots()),a||this.emitPostRender())}rerender(){!this.enabled||this.fileDiff==null||this.render({forceRender:!0,renderRange:this.renderRange})}render(e={}){const{file:t,fileDiff:n,actions:i,markerRows:r,lineAnnotations:o,preventEmit:s=!1,...l}=e,a=this.getOrComputeDiff({file:t,fileDiff:n,actions:i,markerRows:r});if(a==null)return!1;this.setActiveMergeConflictState(a.actions,a.markerRows);const d=super.render({...l,fileDiff:a.fileDiff,lineAnnotations:o,preventEmit:!0});return d&&(this.renderMergeConflictActionSlots(),s||this.emitPostRender()),d}resolveConflict(e,t,n=this.computedCache.fileDiff){const i=this.conflictActions[e];if(n==null||i==null)return;if(i.conflictIndex!==e)throw console.error({conflictIndex:e,action:i}),new Error("UnresolvedFile.resolveConflict: conflictIndex and conflictAction don't match");const r=Oa(n,i,t),o=this.computedCache.file,{file:s,actions:l,markerRows:a}=Ya({fileDiff:r,previousActions:this.conflictActions,resolvedConflictIndex:e,previousFile:o,resolution:t});return{file:s,fileDiff:r,actions:l,markerRows:a}}resolveConflictAndRender(e,t){const n=this.conflictActions[e];if(n==null)return;if(n.conflictIndex!==e)throw console.error({conflictIndex:e,action:n}),new Error("UnresolvedFile.resolveConflictAndRender: conflictIndex and conflictAction don't match");const i={resolution:t,conflict:n.conflict},{file:r,fileDiff:o,actions:s,markerRows:l}=this.resolveConflict(e,t)??{};r==null||o==null||s==null||l==null||(this.computedCache={file:r,fileDiff:o,actions:s,markerRows:l},this.setActiveMergeConflictState(s,l),this.workerManager!=null?this.hunksRenderer.renderDiff(o):this.render({forceRender:!0}),this.options.onMergeConflictResolve?.(r,i))}setActiveMergeConflictState(e=this.conflictActions,t=this.markerRows){this.conflictActions=e,this.markerRows=t,this.computedCache.fileDiff!=null&&this.hunksRenderer instanceof mi&&this.hunksRenderer.setConflictState(this.options.mergeConflictActionsType==="none"?[]:e,t,this.computedCache.fileDiff)}handleMergeConflictActionClick=e=>{const t=this.conflictActions[e.conflictIndex];if(t==null)return;if(t.conflictIndex!==e.conflictIndex)throw console.error({conflictIndex:e.conflictIndex,action:t}),new Error("UnresolvedFile.handleMergeConflictActionClick: conflictIndex and conflictAction don't match");const n={resolution:e.resolution,conflict:t.conflict};if(this.options.onMergeConflictAction!=null){this.options.onMergeConflictAction(n,this);return}this.resolveConflictAndRender(e.conflictIndex,e.resolution)};renderMergeConflictActionSlots(){const{fileDiff:e}=this.computedCache;if(this.isContainerManaged||this.fileContainer==null||typeof this.options.mergeConflictActionsType!="function"||this.conflictActions.length===0||e==null){this.clearMergeConflictActionCache();return}const t=new Map(this.conflictActionCache);for(let n=0;n{if(s!==t&&o!=null)return o.conflict.startLineIndex>n.conflict.endLineIndex?{...o,conflict:el(o.conflict,r)}:o})}function Za(e,t){const n=(e.baseMarkerLineIndex??e.separatorLineIndex)-e.startLineIndex-1,i=e.endLineIndex-e.separatorLineIndex-1;return(t==="current"?n:t==="incoming"?i:n+i)-(e.endLineIndex-e.startLineIndex+1)}function el(e,t){return{...e,startLineIndex:e.startLineIndex+t,startLineNumber:e.startLineNumber+t,separatorLineIndex:e.separatorLineIndex+t,separatorLineNumber:e.separatorLineNumber+t,endLineIndex:e.endLineIndex+t,endLineNumber:e.endLineNumber+t,baseMarkerLineIndex:e.baseMarkerLineIndex!=null?e.baseMarkerLineIndex+t:void 0,baseMarkerLineNumber:e.baseMarkerLineNumber!=null?e.baseMarkerLineNumber+t:void 0}}function tl(e,t,n=!1){return!n&&e==null&&t!=null}function nl(e,t,n=!1){return e==null&&t!=null&&!n}function il(e,t){return{...t,...e,hunkSeparators:typeof e?.hunkSeparators=="function"?"custom":e?.hunkSeparators,mergeConflictActionsType:typeof e?.mergeConflictActionsType=="function"?"custom":e?.mergeConflictActionsType}}function rl(e,t){return e==null||t==null?e===t:e.top===t.top&&e.bottom===t.bottom}const kr=1e3,ol=kr*4,sl=[0,1e-6,.99999,1],al={overscrollSize:kr,intersectionObserverMargin:ol,resizeDebugging:!1};let lt=0,ll=-1;var Il=class re{static __STOP=!1;static __lastScrollPosition=0;__id=`virtualizer-${++ll}`;config;type="simple";intersectionObserver;scrollTop=0;height=0;scrollHeight=0;windowSpecs={top:0,bottom:0};root;contentContainer;resizeObserver;observers=new Map;visibleInstances=new Map;visibleInstancesDirty=!1;instancesChanged=new Set;scrollDirty=!0;heightDirty=!0;scrollHeightDirty=!0;renderedObservers=0;connectQueue=new Map;constructor(t){this.config={...al,...t}}setup(t,n){if(this.root==null){this.root=t,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:sl,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),t instanceof Document?this.setupWindow():this.setupElement(n),window.__INSTANCE=this,window.__TOGGLE=()=>{re.__STOP?(re.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:re.__lastScrollPosition}),K(this.computeRenderRangeAndEmit)):(re.__lastScrollPosition=this.getScrollTop(),re.__STOP=!0)};for(const[i,r]of this.connectQueue.entries())this.connect(i,r);this.connectQueue.clear(),this.markDOMDirty(),K(this.computeRenderRangeAndEmit)}}instanceChanged(t,n){this.instancesChanged.add(t),n&&this.markDOMDirty(),K(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=$t({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}isInstanceVisible(t,n){const i=this.getScrollTop(),r=this.getHeight(),o=this.config.intersectionObserverMargin,s=i-o,l=i+r+o;return!(tl)}handleContainerResize=t=>{if(this.root==null)return;let n=!1;for(const i of t){const r=i.borderBoxSize[0].blockSize;this.root instanceof Document?r!==this.scrollHeight&&(this.scrollHeightDirty=!0,n=!0,this.config.resizeDebugging&&(console.log("Virtualizer: content size change",this.__id,{sizeChange:r-lt,newSize:r}),lt=r)):i.target===this.root?r!==this.height&&(this.heightDirty=!0,n=!0):i.target===this.contentContainer&&(this.scrollHeightDirty=!0,n=!0,this.config.resizeDebugging&&(console.log("Virtualizer: scroller size change",this.__id,{sizeChange:r-lt,newSize:r}),lt=r))}n&&K(this.computeRenderRangeAndEmit)};setupWindow(){if(this.root==null||!(this.root instanceof Document))throw new Error("Virtualizer.setupWindow: Invalid setup method");window.addEventListener("scroll",this.handleWindowScroll,{passive:!0}),window.addEventListener("resize",this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(t){if(this.root==null||this.root instanceof Document)throw new Error("Virtualizer.setupElement: Invalid setup method");this.root.addEventListener("scroll",this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),t??=this.root.firstElementChild??void 0,t instanceof HTMLElement&&(this.contentContainer=t,this.resizeObserver?.observe(t))}cleanUp(){this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener("scroll",this.handleElementScroll),window.removeEventListener("scroll",this.handleWindowScroll),window.removeEventListener("resize",this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0}getOffsetInScrollContainer(t){return this.getScrollTop()+Ue(t,this.getScrollContainerElement())}connect(t,n){if(this.observers.has(t))throw new Error("Virtualizer.connect: instance is already connected...");return this.intersectionObserver==null?this.connectQueue.set(t,n):(this.intersectionObserver.observe(t),this.observers.set(t,n),this.instancesChanged.add(n),this.markDOMDirty(),K(this.computeRenderRangeAndEmit)),()=>this.disconnect(t)}disconnect(t){const n=this.observers.get(t);this.connectQueue.delete(t),n!=null&&(this.intersectionObserver?.unobserve(t),this.observers.delete(t),this.visibleInstances.delete(t)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),K(this.computeRenderRangeAndEmit))}handleWindowResize=()=>{re.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,K(this.computeRenderRangeAndEmit))};handleWindowScroll=()=>{re.__STOP||this.root==null||!(this.root instanceof Document)||(this.scrollDirty=!0,K(this.computeRenderRangeAndEmit))};handleElementScroll=()=>{re.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,K(this.computeRenderRangeAndEmit))};computeRenderRangeAndEmit=()=>{if(re.__STOP)return;const t=this.heightDirty||this.scrollHeightDirty;if(!this.scrollDirty&&!this.scrollHeightDirty&&!this.heightDirty&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.instancesChanged.size===0)return;let n=this.instancesChanged.size>0;if(this.instancesChanged.size===0){const o=$t({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!t&&rl(this.windowSpecs,o)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty)return;this.windowSpecs=o}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;const i=this.getScrollAnchor(this.height),r=new Set;for(const o of t?this.observers.values():this.visibleInstances.values())o.onRender(t)&&r.add(o);for(const o of this.instancesChanged)r.has(o)||o.onRender(t)&&r.add(o);this.scrollFix(i);for(const o of r)o.reconcileHeights();n||=this.instancesChanged.size>0,n&&this.markDOMDirty(),(n||t)&&K(this.computeRenderRangeAndEmit),r.clear(),this.instancesChanged.clear()};scrollFix(t){if(t==null)return;const n=this.getScrollContainerElement(),{lineIndex:i,lineOffset:r,fileElement:o,fileOffset:s,fileTypeOffset:l}=t;if(i!=null&&r!=null){const d=o.shadowRoot?.querySelector(`[data-line][data-line-index="${i}"]`);if(d instanceof HTMLElement){const h=Ue(d,n);if(h!==r){const c=h-r;this.applyScrollFix(c)}return}}const a=Ue(o,n);if(l==="top")a!==s&&this.applyScrollFix(a-s);else{const d=a+o.getBoundingClientRect().height;d!==s&&this.applyScrollFix(d-s)}}applyScrollFix(t){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+t,behavior:"instant"}):this.root.scrollTo({top:this.root.scrollTop+t,behavior:"instant"}),this.markDOMDirty()}getScrollAnchor(t){const n=this.getScrollContainerElement();let i;for(const[r]of this.visibleInstances.entries()){const o=Ue(r,n),s=o+r.offsetHeight;let l,a;s<=0?(l=s,a="bottom"):(l=o,a="top");let d,h;if(s>0&&o=0&&(i.fileOffset<0||li.fileOffset))&&(c=!0),c&&(i={fileElement:r,fileTypeOffset:a,fileOffset:l,lineIndex:d,lineOffset:h})}return i}handleIntersectionChange=t=>{this.scrollDirty=!0;for(const{target:n,isIntersecting:i}of t){if(!(n instanceof HTMLElement))throw new Error("Virtualizer.handleIntersectionChange: target not an HTMLElement");const r=this.observers.get(n);r!=null&&(i&&!this.visibleInstances.has(n)?(r.setVisibility(!0),this.visibleInstances.set(n,r),this.visibleInstancesDirty=!0):!i&&this.visibleInstances.has(n)&&(r.setVisibility(!1),this.visibleInstances.delete(n),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&K(this.computeRenderRangeAndEmit)};getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let t=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return t=Math.max(0,Math.min(t,this.getScrollHeight()-this.getHeight())),this.scrollTop=t,t}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}};function Ue(e,t){const n=e.getBoundingClientRect(),i=t?.getBoundingClientRect().top??0;return n.top-i}function Al(e){const t=[];for(const n of e){const i=Ce.get(n);if(i==null)throw new Error(`getResolvedLanguages: ${n} is not resolved. Please resolve languages before calling getResolvedLanguages`);t.push(i)}return t}function Rl(e){for(const t of Array.isArray(e)?e:[e])if(!Ce.has(t))return!1;return!0}function Hl(e,t,n=[]){if(e==="text"||e==="ansi")throw new Error("registerCustomLanguage: 'text' and 'ansi' are reserved language names");if(Wt.has(e)){console.error(`registerCustomLanguage: lang: ${e} is already registered`);return}Wt.set(e,t);for(const i of n)xo(i,e)}async function Ml(e){const t=[],n=[];for(const i of e){if(i==="text"||i==="ansi")continue;const r=Pi(i)??Di(i);"then"in r?n.push(r):t.push(r)}return n.length>0&&await Promise.all(n).then(i=>{for(const r of i){if(r==null)throw new Error("resolvedLanguages: unable to resolve language");t.push(r)}}),t}function Dl(e){return Y.getResolvedThemes(e)}function Pl(e,t,n=!1){const i=Rr({name:e,variablePrefix:_("global"),variableDefaults:t,fontStyle:n});Pr(e,()=>Promise.resolve(i))}async function Ol(e){for(const n of e)Oi(n);const t=await Y.resolveThemes(e);for(let n=0;n0&&(dt(i,t,"trailing"),_t(i,n)),i=void 0);const l=parseInt(s[3]),a=parseInt(s[1]),d=parseInt(s[4]??"1"),h=parseInt(s[2]??"1");isNaN(l)||isNaN(a)||isNaN(d)||isNaN(h)?n.push(o):i={additionStart:l,deletionStart:a,additionCount:0,deletionCount:0,hunkLines:[],contextLines:[]};continue}if(i==null){n.push(o);continue}if(o.startsWith(" "))i.contextLines.push(o);else if(o!==""){if(i.hunkLines.length>0&&i.contextLines.length>t*2){const l=i.contextLines.length-t*2,a=i.contextLines.slice(-t);dt(i,t,"trailing");const{additionCount:d,deletionCount:h}=i;_t(i,n),i={additionStart:i.additionStart+d+l,deletionStart:i.deletionStart+h+l,deletionCount:0,additionCount:0,contextLines:a,hunkLines:[]}}dt(i,t,i.hunkLines.length===0?"leading":"before-change"),i.hunkLines.push(o),o.startsWith("+")?i.additionCount+=1:o.startsWith("-")&&(i.deletionCount+=1)}}i!=null&&i.hunkLines.length>0&&(dt(i,t,"trailing"),_t(i,n));const r=n.join(` -`);return e.endsWith(` -`)?`${r} -`:r}function dt(e,t,n){if(n==="leading"&&e.contextLines.length>t){const i=e.contextLines.length-t;e.contextLines.splice(0,i),e.additionStart+=i,e.deletionStart+=i}return n==="trailing"&&e.contextLines.length>t&&(e.contextLines.length=t),e.contextLines.length>0&&(e.hunkLines.push(...e.contextLines),e.additionCount+=e.contextLines.length,e.deletionCount+=e.contextLines.length,e.contextLines.length=0),e}function _t(e,t){t.push(`@@ -${yi(e.deletionStart,e.deletionCount)} +${yi(e.additionStart,e.additionCount)} @@`),t.push(...e.hunkLines)}function yi(e,t){return t===1?`${e}`:`${e},${t}`}export{_r as ALTERNATE_FILE_NAMES_GIT,ft as AttachedLanguages,gt as AttachedThemes,Nr as COMMIT_METADATA_SPLIT,$r as CORE_CSS_ATTRIBUTE,on as CUSTOM_HEADER_SLOT_ID,si as CodeToTokenTransformStream,wl as CodeView,Pe as DEFAULT_CODE_VIEW_FILE_METRICS,jr as DEFAULT_CODE_VIEW_LAYOUT,vl as DEFAULT_COLLAPSED_CONTEXT_THRESHOLD,Kr as DEFAULT_EXPANDED_REGION,Ae as DEFAULT_RENDER_RANGE,qr as DEFAULT_SMOOTH_SCROLL_SETTINGS,P as DEFAULT_THEMES,Gr as DEFAULT_TOKENIZE_MAX_LENGTH,sn as DEFAULT_VIRTUAL_FILE_METRICS,Or as DIFFS_DEVELOPMENT_BUILD,Ti as DIFFS_SCROLLBAR_GUTTER_MEASURED_PROPERTY,Wr as DIFFS_SCROLLBAR_MEASURE_ATTRIBUTE,xi as DIFFS_TAG_NAME,lr as DiffHunksRenderer,Ei as EMPTY_RENDER_RANGE,Ne as EXTENSION_TO_FILE_FORMAT,Ur as FILENAME_HEADER_REGEX,Br as FILENAME_HEADER_REGEX_GIT,ul as FILE_CONTEXT_BLOB,Ko as File,dr as FileDiff,Uo as FileRenderer,Tl as FileStream,Li as GIT_DIFF_FILE_BREAK_REGEX,rn as HEADER_METADATA_SLOT_ID,nn as HEADER_PREFIX_SLOT_ID,Fr as HUNK_HEADER,Vr as INDEX_LINE_METADATA,Ri as InteractionManager,pl as MERGE_CONFLICT_BASE_MARKER_REGEX,ml as MERGE_CONFLICT_END_MARKER_REGEX,gl as MERGE_CONFLICT_SEPARATOR_MARKER_REGEX,fl as MERGE_CONFLICT_START_MARKER_REGEX,Wt as RegisteredCustomLanguages,Hi as ResizeManager,Ce as ResolvedLanguages,Tt as ResolvingLanguages,zr as SPLIT_WITH_NEWLINES,Gi as SVGSpriteSheet,Ms as ScrollSyncManager,Ra as ShikiStreamTokenizer,ki as THEME_CSS_ATTRIBUTE,cl as UNIFIED_DIFF_FILE_BREAK_REGEX,wi as UNSAFE_CSS_ATTRIBUTE,El as UnresolvedFile,ns as VirtualizedFile,la as VirtualizedFileDiff,Il as Virtualizer,Xs as areDiffLineAnnotationsEqual,Fe as areDiffRenderOptionsEqual,_e as areDiffTargetsEqual,Oe as areFileRenderOptionsEqual,se as areFilesEqual,Qs as areHunkDataEqual,pt as areLanguagesAttached,Bo as areLineAnnotationsEqual,Re as areObjectsEqual,an as areOptionsEqual,ji as arePrePropertiesEqual,yt as areRenderRangesEqual,Vt as areSelectionsEqual,We as areThemesAttached,Me as areThemesEqual,rl as areVirtualWindowSpecsEqual,Nl as areWorkerStatsEqual,Tn as attachResolvedLanguages,En as attachResolvedThemes,ye as cleanLastNewline,uo as cleanUpResolvedLanguages,fo as cleanUpResolvedThemes,Kl as codeToHtml,Gt as createAnnotationElement,cn as createAnnotationWrapperNode,Rr as createCSSVariablesTheme,Vn as createDiffSpanDecoration,nt as createEmptyRowBuffer,zi as createFileHeaderElement,G as createGutterGap,Ai as createGutterItem,qi as createGutterUtilityContentNode,Jr as createGutterUtilityElement,we as createGutterWrapper,A as createHastElement,ut as createIconElement,it as createNoNewlineElement,Ui as createPreElement,yo as createPreWrapperProperties,Fl as createRowNodes,Le as createSeparator,Ha as createSpanFromToken,zl as createStyleElement,$ as createTextNodeElement,Ul as createThemeStyleElement,_i as createTransformerWithState,Ki as createUnsafeCSSStyleNode,$t as createWindowFromScrollPosition,Yr as dequeueRender,U as detachString,Bl as diffAcceptRejectHunk,yl as disposeHighlighter,Qr as findCodeElement,_ as formatCSSVariablePrefix,kl as getCustomExtensionsMap,Ll as getCustomExtensionsVersion,X as getFiletypeFromFileName,Fi as getHighlighterIfLoaded,dn as getHighlighterOptions,hn as getHighlighterThemeStyles,Ds as getHunkSeparatorSlotName,bo as getIconForType,pe as getLineAnnotationName,_l as getLineEndingType,jt as getLineNodes,Ge as getOrCreateCodeNode,Al as getResolvedLanguages,Pi as getResolvedOrResolveLanguage,go as getResolvedOrResolveTheme,Dl as getResolvedThemes,St as getSharedHighlighter,Vl as getSingularPatch,ln as getThemes,Ps as getTotalLineCountFromHunks,il as getUnresolvedDiffHunksRendererOptions,Rl as hasResolvedLanguages,vo as hasResolvedThemes,Os as isDefaultRenderRange,bl as isHighlighterLoaded,mo as isHighlighterLoading,Cl as isHighlighterNull,Mi as isWorkerContext,Zt as parseDiffFromFile,$l as parseLineType,hs as parsePatchFiles,Qi as patchScrollbarGutterSize,qe as pluckInteractionOptions,Xr as prefersReducedMotion,Sl as preloadHighlighter,Ji as prerenderHTMLIfNecessary,ds as processFile,Lo as processLine,as as processPatch,rt as pushOrJoinSpan,K as queueRender,Pl as registerCustomCSSVariableTheme,Hl as registerCustomLanguage,Pr as registerCustomTheme,Zi as releaseStringDetachBuffer,Ws as renderDiffWithHighlighter,No as renderFileWithHighlighter,xl as replaceCustomExtensions,Oa as resolveConflict,Di as resolveLanguage,Ml as resolveLanguages,pr as resolveRegion,po as resolveTheme,Ol as resolveThemes,xo as setCustomExtension,Wl as setLanguageOverride,gn as setPreNodeProperties,Gl as trimPatchContext,$o as wrapCoreCSS,pn as wrapThemeCSS,fn as wrapUnsafeCSS}; diff --git a/apps/kimi-code/dist-web/assets/index-BOtIzGLC.js b/apps/kimi-code/dist-web/assets/index-BOtIzGLC.js new file mode 100644 index 000000000..691922b68 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/index-BOtIzGLC.js @@ -0,0 +1,1142 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mhchem-DtR62fUK.js","assets/katex-DnlPpQZa.js","assets/CodeBlockNode-DXHZxqco.js","assets/PreCodeBlock-txKBqZ4o.js","assets/safeRaf-DGuzXxDK.js","assets/index10-Bk1rSddE.js"])))=>i.map(i=>d[i]); +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const r of s.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();/** +* @vue/shared v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function k7(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Gi={},e2=[],gu=()=>{},qG=()=>!1,L3=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),w7=e=>e.startsWith("onUpdate:"),Bo=Object.assign,NL=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},fhe=Object.prototype.hasOwnProperty,ko=(e,t)=>fhe.call(e,t),Yn=Array.isArray,t2=e=>ov(e)==="[object Map]",xm=e=>ov(e)==="[object Set]",mD=e=>ov(e)==="[object Date]",hhe=e=>ov(e)==="[object RegExp]",mi=e=>typeof e=="function",qo=e=>typeof e=="string",Fc=e=>typeof e=="symbol",Ao=e=>e!==null&&typeof e=="object",BL=e=>(Ao(e)||mi(e))&&mi(e.then)&&mi(e.catch),VG=Object.prototype.toString,ov=e=>VG.call(e),phe=e=>ov(e).slice(8,-1),C7=e=>ov(e)==="[object Object]",A7=e=>qo(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,O0=k7(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),x7=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},mhe=/-\w/g,Gr=x7(e=>e.replace(mhe,t=>t.slice(1).toUpperCase())),ghe=/\B([A-Z])/g,Bl=x7(e=>e.replace(ghe,"-$1").toLowerCase()),S7=x7(e=>e.charAt(0).toUpperCase()+e.slice(1)),E8=x7(e=>e?`on${S7(e)}`:""),sa=(e,t)=>!Object.is(e,t),n2=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:n})},_7=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Hk=e=>{const t=qo(e)?Number(e):NaN;return isNaN(t)?e:t};let gD;const I7=()=>gD||(gD=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),vhe="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",yhe=k7(vhe);function nn(e){if(Yn(e)){const t={};for(let n=0;n{if(n){const i=n.split(khe);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function De(e){let t="";if(qo(e))t=e;else if(Yn(e))for(let n=0;nuh(n,t))}const ZG=e=>!!(e&&e.__v_isRef===!0),O=e=>qo(e)?e:e==null?"":Yn(e)||Ao(e)&&(e.toString===VG||!mi(e.toString))?ZG(e)?O(e.value):JSON.stringify(e,GG,2):String(e),GG=(e,t)=>ZG(t)?GG(e,t.value):t2(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[i,o],s)=>(n[YA(i,s)+" =>"]=o,n),{})}:xm(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>YA(n))}:Fc(t)?YA(t):Ao(t)&&!Yn(t)&&!C7(t)?String(t):t,YA=(e,t="")=>{var n;return Fc(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function Ihe(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}/** +* @vue/reactivity v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Vr;class QG{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Vr&&(Vr.active?(this.parent=Vr,this.index=(Vr.scopes||(Vr.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0){if(Vr===this)Vr=this.prevScope;else{let t=Vr;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n0)return;if(d4){let t=d4;for(d4=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;u4;){let t=u4;for(u4=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=n}}if(e)throw e}function XG(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function eQ(e){let t,n=e.depsTail,i=n;for(;i;){const o=i.prevDep;i.version===-1?(i===n&&(n=o),jL(i),The(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=o}e.deps=t,e.depsTail=n}function pI(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(tQ(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function tQ(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===c9)||(e.globalVersion=c9,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!pI(e))))return;e.flags|=2;const t=e.dep,n=cs,i=td;cs=e,td=!0;try{XG(e);const o=e.fn(e._value);(t.version===0||sa(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{cs=n,td=i,eQ(e),e.flags&=-3}}function jL(e,t=!1){const{dep:n,prevSub:i,nextSub:o}=e;if(i&&(i.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=i,e.nextSub=void 0),n.subs===e&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)jL(s,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function The(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function Xon(e,t){e.effect instanceof jk&&(e=e.effect.fn);const n=new jk(e);t&&Bo(n,t);try{n.run()}catch(o){throw n.stop(),o}const i=n.run.bind(n);return i.effect=n,i}function esn(e){e.effect.stop()}let td=!0;const nQ=[];function af(){nQ.push(td),td=!1}function lf(){const e=nQ.pop();td=e===void 0?!0:e}function vD(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=cs;cs=void 0;try{t()}finally{cs=n}}}let c9=0,Mhe=class{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}};class M7{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!cs||!td||cs===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==cs)n=this.activeLink=new Mhe(cs,this),cs.deps?(n.prevDep=cs.depsTail,cs.depsTail.nextDep=n,cs.depsTail=n):cs.deps=cs.depsTail=n,iQ(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=cs.depsTail,n.nextDep=void 0,cs.depsTail.nextDep=n,cs.depsTail=n,cs.deps===n&&(cs.deps=i)}return n}trigger(t){this.version++,c9++,this.notify(t)}notify(t){zL();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{HL()}}}function iQ(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)iQ(i)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Wk=new WeakMap,F0=Symbol(""),mI=Symbol(""),u9=Symbol("");function za(e,t,n){if(td&&cs){let i=Wk.get(e);i||Wk.set(e,i=new Map);let o=i.get(n);o||(i.set(n,o=new M7),o.map=i,o.key=n),o.track()}}function Hf(e,t,n,i,o,s){const r=Wk.get(e);if(!r){c9++;return}const a=l=>{l&&l.trigger()};if(zL(),t==="clear")r.forEach(a);else{const l=Yn(e),c=l&&A7(n);if(l&&n==="length"){const u=Number(i);r.forEach((d,f)=>{(f==="length"||f===u9||!Fc(f)&&f>=u)&&a(d)})}else switch((n!==void 0||r.has(void 0))&&a(r.get(n)),c&&a(r.get(u9)),t){case"add":l?c&&a(r.get("length")):(a(r.get(F0)),t2(e)&&a(r.get(mI)));break;case"delete":l||(a(r.get(F0)),t2(e)&&a(r.get(mI)));break;case"set":t2(e)&&a(r.get(F0));break}}HL()}function Ehe(e,t){const n=Wk.get(e);return n&&n.get(t)}function Xm(e){const t=Hi(e);return t===e?t:(za(t,"iterate",u9),_c(e)?t:t.map(ld))}function E7(e){return za(e=Hi(e),"iterate",u9),e}function qd(e,t){return dh(e)?_2(nd(e)?ld(t):t):ld(t)}const Lhe={__proto__:null,[Symbol.iterator](){return XA(this,Symbol.iterator,e=>qd(this,e))},concat(...e){return Xm(this).concat(...e.map(t=>Yn(t)?Xm(t):t))},entries(){return XA(this,"entries",e=>(e[1]=qd(this,e[1]),e))},every(e,t){return Sf(this,"every",e,t,void 0,arguments)},filter(e,t){return Sf(this,"filter",e,t,n=>n.map(i=>qd(this,i)),arguments)},find(e,t){return Sf(this,"find",e,t,n=>qd(this,n),arguments)},findIndex(e,t){return Sf(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Sf(this,"findLast",e,t,n=>qd(this,n),arguments)},findLastIndex(e,t){return Sf(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Sf(this,"forEach",e,t,void 0,arguments)},includes(...e){return ex(this,"includes",e)},indexOf(...e){return ex(this,"indexOf",e)},join(e){return Xm(this).join(e)},lastIndexOf(...e){return ex(this,"lastIndexOf",e)},map(e,t){return Sf(this,"map",e,t,void 0,arguments)},pop(){return ey(this,"pop")},push(...e){return ey(this,"push",e)},reduce(e,...t){return yD(this,"reduce",e,t)},reduceRight(e,...t){return yD(this,"reduceRight",e,t)},shift(){return ey(this,"shift")},some(e,t){return Sf(this,"some",e,t,void 0,arguments)},splice(...e){return ey(this,"splice",e)},toReversed(){return Xm(this).toReversed()},toSorted(e){return Xm(this).toSorted(e)},toSpliced(...e){return Xm(this).toSpliced(...e)},unshift(...e){return ey(this,"unshift",e)},values(){return XA(this,"values",e=>qd(this,e))}};function XA(e,t,n){const i=E7(e),o=i[t]();return i!==e&&!_c(e)&&(o._next=o.next,o.next=()=>{const s=o._next();return s.done||(s.value=n(s.value)),s}),o}const Rhe=Array.prototype;function Sf(e,t,n,i,o,s){const r=E7(e),a=r!==e&&!_c(e),l=r[t];if(l!==Rhe[t]){const d=l.apply(e,s);return a?ld(d):d}let c=n;r!==e&&(a?c=function(d,f){return n.call(this,qd(e,d),f,e)}:n.length>2&&(c=function(d,f){return n.call(this,d,f,e)}));const u=l.call(r,c,i);return a&&o?o(u):u}function yD(e,t,n,i){const o=E7(e),s=o!==e&&!_c(e);let r=n,a=!1;o!==e&&(s?(a=i.length===0,r=function(c,u,d){return a&&(a=!1,c=qd(e,c)),n.call(this,c,qd(e,u),d,e)}):n.length>3&&(r=function(c,u,d){return n.call(this,c,u,d,e)}));const l=o[t](r,...i);return a?qd(e,l):l}function ex(e,t,n){const i=Hi(e);za(i,"iterate",u9);const o=i[t](...n);return(o===-1||o===!1)&&P7(n[0])?(n[0]=Hi(n[0]),i[t](...n)):o}function ey(e,t,n=[]){af(),zL();const i=Hi(e)[t].apply(e,n);return HL(),lf(),i}const Phe=k7("__proto__,__v_isRef,__isVue"),oQ=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Fc));function $he(e){Fc(e)||(e=String(e));const t=Hi(this);return za(t,"has",e),t.hasOwnProperty(e)}class sQ{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,i){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return s;if(n==="__v_raw")return i===(o?s?dQ:uQ:s?cQ:lQ).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const r=Yn(t);if(!o){let l;if(r&&(l=Lhe[n]))return l;if(n==="hasOwnProperty")return $he}const a=Reflect.get(t,n,Vo(t)?t:i);if((Fc(n)?oQ.has(n):Phe(n))||(o||za(t,"get",n),s))return a;if(Vo(a)){const l=r&&A7(n)?a:a.value;return o&&Ao(l)?d9(l):l}return Ao(a)?o?d9(a):Qo(a):a}}class rQ extends sQ{constructor(t=!1){super(!1,t)}set(t,n,i,o){let s=t[n];const r=Yn(t)&&A7(n);if(!this._isShallow){const c=dh(s);if(!_c(i)&&!dh(i)&&(s=Hi(s),i=Hi(i)),!r&&Vo(s)&&!Vo(i))return c||(s.value=i),!0}const a=r?Number(n)e,e5=e=>Reflect.getPrototypeOf(e);function Bhe(e,t,n){return function(...i){const o=this.__v_raw,s=Hi(o),r=t2(s),a=e==="entries"||e===Symbol.iterator&&r,l=e==="keys"&&r,c=o[e](...i),u=n?gI:t?_2:ld;return!t&&za(s,"iterate",l?mI:F0),Bo(Object.create(c),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:a?[u(d[0]),u(d[1])]:u(d),done:f}}})}}function t5(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function zhe(e,t){const n={get(o){const s=this.__v_raw,r=Hi(s),a=Hi(o);e||(sa(o,a)&&za(r,"get",o),za(r,"get",a));const{has:l}=e5(r),c=t?gI:e?_2:ld;if(l.call(r,o))return c(s.get(o));if(l.call(r,a))return c(s.get(a));s!==r&&s.get(o)},get size(){const o=this.__v_raw;return!e&&za(Hi(o),"iterate",F0),o.size},has(o){const s=this.__v_raw,r=Hi(s),a=Hi(o);return e||(sa(o,a)&&za(r,"has",o),za(r,"has",a)),o===a?s.has(o):s.has(o)||s.has(a)},forEach(o,s){const r=this,a=r.__v_raw,l=Hi(a),c=t?gI:e?_2:ld;return!e&&za(l,"iterate",F0),a.forEach((u,d)=>o.call(s,c(u),c(d),r))}};return Bo(n,e?{add:t5("add"),set:t5("set"),delete:t5("delete"),clear:t5("clear")}:{add(o){const s=Hi(this),r=e5(s),a=Hi(o),l=!t&&!_c(o)&&!dh(o)?a:o;return r.has.call(s,l)||sa(o,l)&&r.has.call(s,o)||sa(a,l)&&r.has.call(s,a)||(s.add(l),Hf(s,"add",l,l)),this},set(o,s){!t&&!_c(s)&&!dh(s)&&(s=Hi(s));const r=Hi(this),{has:a,get:l}=e5(r);let c=a.call(r,o);c||(o=Hi(o),c=a.call(r,o));const u=l.call(r,o);return r.set(o,s),c?sa(s,u)&&Hf(r,"set",o,s):Hf(r,"add",o,s),this},delete(o){const s=Hi(this),{has:r,get:a}=e5(s);let l=r.call(s,o);l||(o=Hi(o),l=r.call(s,o)),a&&a.call(s,o);const c=s.delete(o);return l&&Hf(s,"delete",o,void 0),c},clear(){const o=Hi(this),s=o.size!==0,r=o.clear();return s&&Hf(o,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Bhe(o,e,t)}),n}function L7(e,t){const n=zhe(e,t);return(i,o,s)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?i:Reflect.get(ko(n,o)&&o in i?n:i,o,s)}const Hhe={get:L7(!1,!1)},jhe={get:L7(!1,!0)},Whe={get:L7(!0,!1)},qhe={get:L7(!0,!0)},lQ=new WeakMap,cQ=new WeakMap,uQ=new WeakMap,dQ=new WeakMap;function Vhe(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Qo(e){return dh(e)?e:R7(e,!1,Ohe,Hhe,lQ)}function V1(e){return R7(e,!1,Dhe,jhe,cQ)}function d9(e){return R7(e,!0,Fhe,Whe,uQ)}function nsn(e){return R7(e,!0,Nhe,qhe,dQ)}function R7(e,t,n,i,o){if(!Ao(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const s=o.get(e);if(s)return s;const r=Vhe(phe(e));if(r===0)return e;const a=new Proxy(e,r===2?i:n);return o.set(e,a),a}function nd(e){return dh(e)?nd(e.__v_raw):!!(e&&e.__v_isReactive)}function dh(e){return!!(e&&e.__v_isReadonly)}function _c(e){return!!(e&&e.__v_isShallow)}function P7(e){return e?!!e.__v_raw:!1}function Hi(e){const t=e&&e.__v_raw;return t?Hi(t):e}function it(e){return!ko(e,"__v_skip")&&Object.isExtensible(e)&&UG(e,"__v_skip",!0),e}const ld=e=>Ao(e)?Qo(e):e,_2=e=>Ao(e)?d9(e):e;function Vo(e){return e?e.__v_isRef===!0:!1}function Z(e){return fQ(e,!1)}function Is(e){return fQ(e,!0)}function fQ(e,t){return Vo(e)?e:new Uhe(e,t)}class Uhe{constructor(t,n){this.dep=new M7,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Hi(t),this._value=n?t:ld(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,i=this.__v_isShallow||_c(t)||dh(t);t=i?t:Hi(t),sa(t,n)&&(this._rawValue=t,this._value=i?t:ld(t),this.dep.trigger())}}function Khe(e){e.dep&&e.dep.trigger()}function p(e){return Vo(e)?e.value:e}function $l(e){return mi(e)?e():p(e)}const Zhe={get:(e,t,n)=>t==="__v_raw"?e:p(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const o=e[t];return Vo(o)&&!Vo(n)?(o.value=n,!0):Reflect.set(e,t,n,i)}};function hQ(e){return nd(e)?e:new Proxy(e,Zhe)}class Ghe{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new M7,{get:i,set:o}=t(n.track.bind(n),n.trigger.bind(n));this._get=i,this._set=o}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Qhe(e){return new Ghe(e)}function Yhe(e){const t=Yn(e)?new Array(e.length):{};for(const n in e)t[n]=pQ(e,n);return t}class Jhe{constructor(t,n,i){this._object=t,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0,this._key=Fc(n)?n:String(n),this._raw=Hi(t);let o=!0,s=t;if(!Yn(t)||Fc(this._key)||!A7(this._key))do o=!P7(s)||_c(s);while(o&&(s=s.__v_raw));this._shallow=o}get value(){let t=this._object[this._key];return this._shallow&&(t=p(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Vo(this._raw[this._key])){const n=this._object[this._key];if(Vo(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return Ehe(this._raw,this._key)}}class Xhe{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function e1e(e,t,n){return Vo(e)?e:mi(e)?new Xhe(e):Ao(e)&&arguments.length>1?pQ(e,t,n):Z(e)}function pQ(e,t,n){return new Jhe(e,t,n)}class t1e{constructor(t,n,i){this.fn=t,this.setter=n,this._value=void 0,this.dep=new M7(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=c9-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&cs!==this)return JG(this,!0),!0}get value(){const t=this.dep.track();return tQ(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function n1e(e,t,n=!1){let i,o;return mi(e)?i=e:(i=e.get,o=e.set),new t1e(i,o,n)}const isn={GET:"get",HAS:"has",ITERATE:"iterate"},osn={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},n5={},qk=new WeakMap;let i1;function ssn(){return i1}function i1e(e,t=!1,n=i1){if(n){let i=qk.get(n);i||qk.set(n,i=[]),i.push(e)}}function o1e(e,t,n=Gi){const{immediate:i,deep:o,once:s,scheduler:r,augmentJob:a,call:l}=n,c=C=>o?C:_c(C)||o===!1||o===0?jf(C,1):jf(C);let u,d,f,h,m=!1,g=!1;if(Vo(e)?(d=()=>e.value,m=_c(e)):nd(e)?(d=()=>c(e),m=!0):Yn(e)?(g=!0,m=e.some(C=>nd(C)||_c(C)),d=()=>e.map(C=>{if(Vo(C))return C.value;if(nd(C))return c(C);if(mi(C))return l?l(C,2):C()})):mi(e)?t?d=l?()=>l(e,2):e:d=()=>{if(f){af();try{f()}finally{lf()}}const C=i1;i1=u;try{return l?l(e,3,[h]):e(h)}finally{i1=C}}:d=gu,t&&o){const C=d,x=o===!0?1/0:o;d=()=>jf(C(),x)}const y=ad(),v=()=>{u.stop(),y&&y.active&&NL(y.effects,u)};if(s&&t){const C=t;t=(...x)=>{const S=C(...x);return v(),S}}let k=g?new Array(e.length).fill(n5):n5;const w=C=>{if(!(!(u.flags&1)||!u.dirty&&!C))if(t){const x=u.run();if(C||o||m||(g?x.some((S,M)=>sa(S,k[M])):sa(x,k))){f&&f();const S=i1;i1=u;try{const M=[x,k===n5?void 0:g&&k[0]===n5?[]:k,h];k=x,l?l(t,3,M):t(...M)}finally{i1=S}}}else u.run()};return a&&a(w),u=new jk(d),u.scheduler=r?()=>r(w,!1):w,h=C=>i1e(C,!1,u),f=u.onStop=()=>{const C=qk.get(u);if(C){if(l)l(C,4);else for(const x of C)x();qk.delete(u)}},t?i?w(!0):k=u.run():r?r(w.bind(null,!0),!0):u.run(),v.pause=u.pause.bind(u),v.resume=u.resume.bind(u),v.stop=v,v}function jf(e,t=1/0,n){if(t<=0||!Ao(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Vo(e))jf(e.value,t,n);else if(Yn(e))for(let i=0;i{jf(i,t,n)});else if(C7(e)){for(const i in e)jf(e[i],t,n);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&jf(e[i],t,n)}return e}/** +* @vue/runtime-core v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/const mQ=[];function s1e(e){mQ.push(e)}function r1e(){mQ.pop()}function rsn(e,t){}const asn={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},a1e={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function P3(e,t,n,i){try{return i?e(...i):e()}catch(o){sv(o,t,n)}}function xu(e,t,n,i){if(mi(e)){const o=P3(e,t,n,i);return o&&BL(o)&&o.catch(s=>{sv(s,t,n)}),o}if(Yn(e)){const o=[];for(let s=0;s>>1,o=cl[i],s=f9(o);s=f9(n)?cl.push(e):cl.splice(c1e(t),0,e),e.flags|=1,vQ()}}function vQ(){Vk||(Vk=gQ.then(yQ))}function Uk(e){Yn(e)?i2.push(...e):o1&&e.id===-1?o1.splice(kg+1,0,e):e.flags&1||(i2.push(e),e.flags|=1),vQ()}function bD(e,t,n=Hd+1){for(;nf9(n)-f9(i));if(i2.length=0,o1){o1.push(...t);return}for(o1=t,kg=0;kge.id==null?e.flags&2?-1:1/0:e.id;function yQ(e){try{for(Hd=0;Hdwg.emit(o,...s)),i5=[]):typeof window<"u"&&window.HTMLElement&&!((i=(n=window.navigator)==null?void 0:n.userAgent)!=null&&i.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{bQ(s,t)}),setTimeout(()=>{wg||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,i5=[])},3e3)):i5=[]}let Ta=null,$7=null;function h9(e){const t=Ta;return Ta=e,$7=e&&e.type.__scopeId||null,t}function lsn(e){$7=e}function csn(){$7=null}const usn=e=>ie;function ie(e,t=Ta,n){if(!t||e._n)return e;const i=(...o)=>{i._d&&Xk(-1);const s=h9(t);let r;try{r=e(...o)}finally{h9(s),i._d&&Xk(1)}return r};return i._n=!0,i._c=!0,i._d=!0,i}function qi(e,t){if(Ta===null)return e;const n=F3(Ta),i=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&mi(t)?t.call(i&&i.proxy):t}}function u1e(){return!!(Dr()||D0)}const d1e=Symbol.for("v-scx"),f1e=()=>Zt(d1e);function Wf(e,t){return $3(e,null,t)}function dsn(e,t){return $3(e,null,{flush:"post"})}function h1e(e,t){return $3(e,null,{flush:"sync"})}function Fe(e,t,n){return $3(e,t,n)}function $3(e,t,n=Gi){const{immediate:i,deep:o,flush:s,once:r}=n,a=Bo({},n),l=t&&i||!t&&s!=="post";let c;if(sm){if(s==="sync"){const h=f1e();c=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=gu,h.resume=gu,h.pause=gu,h}}const u=Sa;a.call=(h,m,g)=>xu(h,u,m,g);let d=!1;s==="post"?a.scheduler=h=>{_r(h,u&&u.suspense)}:s!=="sync"&&(d=!0,a.scheduler=(h,m)=>{m?h():WL(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,u&&(h.id=u.uid,h.i=u))};const f=o1e(e,t,a);return sm&&(c?c.push(f):l&&f()),f}function p1e(e,t,n){const i=this.proxy,o=qo(e)?e.includes(".")?kQ(i,e):()=>i[e]:e.bind(i,i);let s;mi(t)?s=t:(s=t.handler,n=t);const r=av(this),a=$3(o,s.bind(i),n);return r(),a}function kQ(e,t){const n=t.split(".");return()=>{let i=e;for(let o=0;oe.__isTeleport,p0=e=>e&&(e.disabled||e.disabled===""),m1e=e=>e&&(e.defer||e.defer===""),kD=e=>typeof SVGElement<"u"&&e instanceof SVGElement,wD=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,vI=(e,t)=>{const n=e&&e.to;return qo(n)?t?t(n):null:n},g1e={name:"Teleport",__isTeleport:!0,process(e,t,n,i,o,s,r,a,l,c){const{mc:u,pc:d,pbc:f,o:{insert:h,querySelector:m,createText:g,createComment:y,parentNode:v}}=c,k=p0(t.props);let{dynamicChildren:w}=t;const C=(M,_,T)=>{M.shapeFlag&16&&u(M.children,_,T,o,s,r,a,l)},x=(M=t)=>{const _=p0(M.props),T=M.target=vI(M.props,m),E=yI(T,M,g,h);T&&(r!=="svg"&&kD(T)?r="svg":r!=="mathml"&&wD(T)&&(r="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(T),_||(C(M,T,E),Oy(M,!1)))},S=M=>{const _=()=>{if(Qh.get(M)===_){if(Qh.delete(M),p0(M.props)){const T=v(M.el)||n;C(M,T,M.anchor),Oy(M,!0)}x(M)}};Qh.set(M,_),_r(_,s)};if(e==null){const M=t.el=g(""),_=t.anchor=g("");if(h(M,n,i),h(_,n,i),m1e(t.props)||s&&s.pendingBranch){S(t);return}k&&(C(t,n,_),Oy(t,!0)),x()}else{t.el=e.el;const M=t.anchor=e.anchor,_=Qh.get(e);if(_){_.flags|=8,Qh.delete(e),S(t);return}t.targetStart=e.targetStart;const T=t.target=e.target,E=t.targetAnchor=e.targetAnchor,L=p0(e.props),P=L?n:T,N=L?M:E;if(r==="svg"||kD(T)?r="svg":(r==="mathml"||wD(T))&&(r="mathml"),w?(f(e.dynamicChildren,w,P,o,s,r,a),tR(e,t,!0)):l||d(e,t,P,N,o,s,r,a,!1),k)L?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):o5(t,n,M,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const U=vI(t.props,m);U&&(t.target=U,o5(t,U,null,c,0))}else L&&o5(t,T,E,c,1);Oy(t,k)}},remove(e,t,n,{um:i,o:{remove:o}},s){const{shapeFlag:r,children:a,anchor:l,targetStart:c,targetAnchor:u,target:d,props:f}=e,h=p0(f),m=s||!h,g=Qh.get(e);if(g&&(g.flags|=8,Qh.delete(e)),d&&(o(c),o(u)),s&&o(l),!g&&(h||d)&&r&16)for(let y=0;y{e.isMounted=!0}),ki(()=>{e.isUnmounting=!0}),e}const Uc=[Function,Array],xQ={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Uc,onEnter:Uc,onAfterEnter:Uc,onEnterCancelled:Uc,onBeforeLeave:Uc,onLeave:Uc,onAfterLeave:Uc,onLeaveCancelled:Uc,onBeforeAppear:Uc,onAppear:Uc,onAfterAppear:Uc,onAppearCancelled:Uc},SQ=e=>{const t=e.subTree;return t.component?SQ(t.component):t},y1e={name:"BaseTransition",props:xQ,setup(e,{slots:t}){const n=Dr(),i=AQ();return()=>{const o=t.default&&qL(t.default(),!0),s=o&&o.length?_Q(o):n.subTree?X():void 0;if(!s)return;const r=Hi(e),{mode:a}=r;if(i.isLeaving)return tx(s);const l=CD(s);if(!l)return tx(s);let c=p9(l,r,i,n,d=>c=d);l.type!==Pr&&U1(l,c);let u=n.subTree&&CD(n.subTree);if(u&&u.type!==Pr&&!Zu(u,l)&&SQ(n).type!==Pr){let d=p9(u,r,i,n);if(U1(u,d),a==="out-in"&&l.type!==Pr)return i.isLeaving=!0,d.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},tx(s);a==="in-out"&&l.type!==Pr?d.delayLeave=(f,h,m)=>{const g=IQ(i,u);g[String(u.key)]=u,f[Xc]=()=>{h(),f[Xc]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{m(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return s}}};function _Q(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Pr){t=n;break}}return t}const b1e=y1e;function IQ(e,t){const{leavingVNodes:n}=e;let i=n.get(t.type);return i||(i=Object.create(null),n.set(t.type,i)),i}function p9(e,t,n,i,o){const{appear:s,mode:r,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:h,onAfterLeave:m,onLeaveCancelled:g,onBeforeAppear:y,onAppear:v,onAfterAppear:k,onAppearCancelled:w}=t,C=String(e.key),x=IQ(n,e),S=(T,E)=>{T&&xu(T,i,9,E)},M=(T,E)=>{const L=E[1];S(T,E),Yn(T)?T.every(P=>P.length<=1)&&L():T.length<=1&&L()},_={mode:r,persisted:a,beforeEnter(T){let E=l;if(!n.isMounted)if(s)E=y||l;else return;T[Xc]&&T[Xc](!0);const L=x[C];L&&Zu(e,L)&&L.el[Xc]&&L.el[Xc](),S(E,[T])},enter(T){if(x[C]===e)return;let E=c,L=u,P=d;if(!n.isMounted)if(s)E=v||c,L=k||u,P=w||d;else return;let N=!1;T[ty]=F=>{N||(N=!0,F?S(P,[T]):S(L,[T]),_.delayedLeave&&_.delayedLeave(),T[ty]=void 0)};const U=T[ty].bind(null,!1);E?M(E,[T,U]):U()},leave(T,E){const L=String(e.key);if(T[ty]&&T[ty](!0),n.isUnmounting)return E();S(f,[T]);let P=!1;T[Xc]=U=>{P||(P=!0,E(),U?S(g,[T]):S(m,[T]),T[Xc]=void 0,x[L]===e&&delete x[L])};const N=T[Xc].bind(null,!1);x[L]=e,h?M(h,[T,N]):N()},clone(T){const E=p9(T,t,n,i,o);return o&&o(E),E}};return _}function tx(e){if(O3(e))return e=fh(e),e.children=null,e}function CD(e){if(!O3(e))return CQ(e.type)&&e.children?_Q(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&mi(n.default))return n.default()}}function U1(e,t){e.shapeFlag&6&&e.component?(e.transition=t,U1(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function qL(e,t=!1,n){let i=[],o=0;for(let s=0;s1)for(let s=0;sn.value,set:s=>n.value=s})}return n}function AD(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Zk=new WeakMap;function o2(e,t,n,i,o=!1){if(Yn(e)){e.forEach((g,y)=>o2(g,t&&(Yn(t)?t[y]:t),n,i,o));return}if(nh(i)&&!o){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&o2(e,t,n,i.component.subTree);return}const s=i.shapeFlag&4?F3(i.component):i.el,r=o?null:s,{i:a,r:l}=e,c=t&&t.r,u=a.refs===Gi?a.refs={}:a.refs,d=a.setupState,f=Hi(d),h=d===Gi?qG:g=>AD(u,g)?!1:ko(f,g),m=(g,y)=>!(y&&AD(u,y));if(c!=null&&c!==l){if(xD(t),qo(c))u[c]=null,h(c)&&(d[c]=null);else if(Vo(c)){const g=t;m(c,g.k)&&(c.value=null),g.k&&(u[g.k]=null)}}if(mi(l)){af();try{P3(l,a,12,[r,u])}finally{lf()}}else{const g=qo(l),y=Vo(l);if(g||y){const v=()=>{if(e.f){const k=g?h(l)?d[l]:u[l]:m()||!e.k?l.value:u[e.k];if(o)Yn(k)&&NL(k,s);else if(Yn(k))k.includes(s)||k.push(s);else if(g)u[l]=[s],h(l)&&(d[l]=u[l]);else{const w=[s];m(l,e.k)&&(l.value=w),e.k&&(u[e.k]=w)}}else g?(u[l]=r,h(l)&&(d[l]=r)):y&&(m(l,e.k)&&(l.value=r),e.k&&(u[e.k]=r))};if(r){const k=()=>{v(),Zk.delete(e)};k.id=-1,Zk.set(e,k),_r(k,n)}else xD(e),v()}}}function xD(e){const t=Zk.get(e);t&&(t.flags|=8,Zk.delete(e))}let SD=!1;const eg=()=>{SD||(console.error("Hydration completed but contains mismatches."),SD=!0)},k1e=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",w1e=e=>e.namespaceURI.includes("MathML"),s5=e=>{if(e.nodeType===1){if(k1e(e))return"svg";if(w1e(e))return"mathml"}},$g=e=>e.nodeType===8;function C1e(e){const{mt:t,p:n,o:{patchProp:i,createText:o,nextSibling:s,parentNode:r,remove:a,insert:l,createComment:c}}=e,u=(w,C)=>{if(!C.hasChildNodes()){n(null,w,C),Kk(),C._vnode=w;return}d(C.firstChild,w,null,null,null),Kk(),C._vnode=w},d=(w,C,x,S,M,_=!1)=>{_=_||!!C.dynamicChildren;const T=$g(w)&&w.data==="[",E=()=>g(w,C,x,S,M,T),{type:L,ref:P,shapeFlag:N,patchFlag:U}=C;let F=w.nodeType;C.el=w,U===-2&&(_=!1,C.dynamicChildren=null);let B=null;switch(L){case P1:F!==3?C.children===""?(l(C.el=o(""),r(w),w),B=w):B=E():(w.data!==C.children&&(eg(),w.data=C.children),B=s(w));break;case Pr:k(w)?(B=s(w),v(C.el=w.content.firstChild,w,x)):F!==8||T?B=E():B=s(w);break;case r2:if(T&&(w=s(w),F=w.nodeType),F===1||F===3){B=w;const W=!C.children.length;for(let D=0;D{_=_||!!C.dynamicChildren;const{type:T,dynamicProps:E,props:L,patchFlag:P,shapeFlag:N,dirs:U,transition:F}=C,B=T==="input"||T==="option",W=!!E;if(B||W||P!==-1){U&&Wd(C,null,x,"created");let D=!1;if(k(w)){D=KQ(null,F)&&x&&x.vnode.props&&x.vnode.props.appear;const $=w.content.firstChild;if(D){const j=$.getAttribute("class");j&&($.$cls=j),F.beforeEnter($)}v($,w,x),C.el=w=$}if(N&16&&!(L&&(L.innerHTML||L.textContent))){let $=h(w.firstChild,C,w,x,S,M,_);for($&&!L8(w,1)&&eg();$;){const j=$;$=$.nextSibling,a(j)}}else if(N&8){let $=C.children;$[0]===` +`&&(w.tagName==="PRE"||w.tagName==="TEXTAREA")&&($=$.slice(1));const{textContent:j}=w;j!==$&&j!==$.replace(/\r\n|\r/g,` +`)&&(L8(w,0)||eg(),w.textContent=C.children)}if(L){if(B||W||!_||P&48){const $=w.tagName.includes("-");for(const j in L)(B&&(j.endsWith("value")||j==="indeterminate")||L3(j)&&!O0(j)||j[0]==="."||$&&!O0(j)||E&&E.includes(j))&&i(w,j,null,L[j],void 0,x)}else if(L.onClick)i(w,"onClick",null,L.onClick,void 0,x);else if(P&4&&nd(L.style))for(const $ in L.style)L.style[$]}let z;(z=L&&L.onVnodeBeforeMount)&&Pl(z,x,C),U&&Wd(C,null,x,"beforeMount"),((z=L&&L.onVnodeMounted)||U||D)&&YQ(()=>{z&&Pl(z,x,C),D&&F.enter(w),U&&Wd(C,null,x,"mounted")},S)}return w.nextSibling},h=(w,C,x,S,M,_,T)=>{T=T||!!C.dynamicChildren;const E=C.children,L=E.length;let P=!1;for(let N=0;N{const{slotScopeIds:T}=C;T&&(M=M?M.concat(T):T);const E=r(w),L=h(s(w),C,E,x,S,M,_);return L&&$g(L)&&L.data==="]"?s(C.anchor=L):(eg(),l(C.anchor=c("]"),E,L),L)},g=(w,C,x,S,M,_)=>{if(x1e(w,C)||eg(),C.el=null,_){const L=y(w);for(;;){const P=s(w);if(P&&P!==L)a(P);else break}}const T=s(w),E=r(w);return a(w),n(null,C,E,T,x,S,s5(E),M),x&&(x.vnode.el=C.el,D7(x,C.el)),T},y=(w,C="[",x="]")=>{let S=0;for(;w;)if(w=s(w),w&&$g(w)&&(w.data===C&&S++,w.data===x)){if(S===0)return s(w);S--}return w},v=(w,C,x)=>{const S=C.parentNode;S&&S.replaceChild(w,C);let M=x;for(;M;)M.vnode.el===C&&(M.vnode.el=M.subTree.el=w),M=M.parent},k=w=>w.nodeType===1&&w.tagName==="TEMPLATE";return[u,d]}const Gk="data-allow-mismatch",A1e={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function L8(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(Gk);)e=e.parentElement;return KL(e&&e.getAttribute(Gk),t)}function KL(e,t){if(e==null)return!1;if(e==="")return!0;{const n=e.split(",");return t===0&&n.includes("children")?!0:n.includes(A1e[t])}}function x1e(e,t){return L8(e.parentElement,1)||S1e(e)||_1e(t)}function S1e(e){return e.nodeType===1&&KL(e.getAttribute(Gk),1)}function _1e({props:e}){const t=e&&e[Gk];return typeof t=="string"&&KL(t,1)}const I1e=I7().requestIdleCallback||(e=>setTimeout(e,1)),T1e=I7().cancelIdleCallback||(e=>clearTimeout(e)),hsn=(e=1e4)=>t=>{const n=I1e(t,{timeout:e});return()=>T1e(n)};function M1e(e){const{top:t,left:n,bottom:i,right:o}=e.getBoundingClientRect(),{innerHeight:s,innerWidth:r}=window;return(t>0&&t0&&i0&&n0&&o(t,n)=>{const i=new IntersectionObserver(o=>{for(const s of o)if(s.isIntersecting){i.disconnect(),t();break}},e);return n(o=>{if(o instanceof Element){if(M1e(o))return t(),i.disconnect(),!1;i.observe(o)}}),()=>i.disconnect()},msn=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},gsn=(e=[])=>(t,n)=>{qo(e)&&(e=[e]);let i=!1;const o=r=>{i||(i=!0,s(),t(),r.target.dispatchEvent(new r.constructor(r.type,r)))},s=()=>{n(r=>{for(const a of e)r.removeEventListener(a,o)})};return n(r=>{for(const a of e)r.addEventListener(a,o,{once:!0})}),s};function E1e(e,t){if($g(e)&&e.data==="["){let n=1,i=e.nextSibling;for(;i;){if(i.nodeType===1){if(t(i)===!1)break}else if($g(i))if(i.data==="]"){if(--n===0)break}else i.data==="["&&n++;i=i.nextSibling}}else t(e)}const nh=e=>!!e.type.__asyncLoader;function ih(e){mi(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:i,delay:o=200,hydrate:s,timeout:r,suspensible:a=!0,onError:l}=e;let c=null,u,d=0;const f=()=>(d++,c=null,h()),h=()=>{let m;return c||(m=c=t().catch(g=>{if(g=g instanceof Error?g:new Error(String(g)),l)return new Promise((y,v)=>{l(g,()=>y(f()),()=>v(g),d+1)});throw g}).then(g=>m!==c&&c?c:(g&&(g.__esModule||g[Symbol.toStringTag]==="Module")&&(g=g.default),u=g,g)))};return Xe({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(m,g,y){let v=!1;(g.bu||(g.bu=[])).push(()=>v=!0);const k=()=>{v||y()},w=s?()=>{const C=s(k,x=>E1e(m,x));C&&(g.bum||(g.bum=[])).push(C)}:k;u?w():h().then(()=>!g.isUnmounted&&w())},get __asyncResolved(){return u},setup(){const m=Sa;if(UL(m),u)return()=>r5(u,m);const g=x=>{c=null,sv(x,m,13,!i)};if(a&&m.suspense||sm)return h().then(x=>()=>r5(x,m)).catch(x=>(g(x),()=>i?V(i,{error:x}):null));const y=Z(!1),v=Z(),k=Z(!!o);let w,C;return Xn(()=>{w!=null&&clearTimeout(w),C!=null&&clearTimeout(C)}),o&&(C=setTimeout(()=>{m.isUnmounted||(k.value=!1)},o)),r!=null&&(w=setTimeout(()=>{if(!m.isUnmounted&&!y.value&&!v.value){const x=new Error(`Async component timed out after ${r}ms.`);g(x),v.value=x}},r)),h().then(()=>{m.isUnmounted||(y.value=!0,m.parent&&O3(m.parent.vnode)&&m.parent.update())}).catch(x=>{if(m.isUnmounted){c=null;return}g(x),v.value=x}),()=>{if(y.value&&u)return r5(u,m);if(v.value&&i)return V(i,{error:v.value});if(n&&!k.value)return r5(n,m)}}})}function r5(e,t){const{ref:n,props:i,children:o,ce:s}=t.vnode,r=V(e,i,o);return r.ref=n,r.ce=s,delete t.vnode.ce,r}const O3=e=>e.type.__isKeepAlive,L1e={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Dr(),i=n.ctx;if(!i.renderer)return()=>{const k=t.default&&t.default();return k&&k.length===1?k[0]:k};const o=new Map,s=new Set;let r=null;const a=n.suspense,{renderer:{p:l,m:c,um:u,o:{createElement:d}}}=i,f=d("div");i.activate=(k,w,C,x,S)=>{const M=k.component;c(k,w,C,0,a),l(M.vnode,k,w,C,M,a,x,k.slotScopeIds,S),_r(()=>{M.isDeactivated=!1,M.a&&n2(M.a);const _=k.props&&k.props.onVnodeMounted;_&&Pl(_,M.parent,k)},a)},i.deactivate=k=>{const w=k.component;Yk(w.m),Yk(w.a),c(k,f,null,1,a),_r(()=>{w.da&&n2(w.da);const C=k.props&&k.props.onVnodeUnmounted;C&&Pl(C,w.parent,k),w.isDeactivated=!0},a)};function h(k){nx(k),u(k,n,a,!0)}function m(k){o.forEach((w,C)=>{const x=II(nh(w)?w.type.__asyncResolved||{}:w.type);x&&!k(x)&&g(C)})}function g(k){const w=o.get(k);w&&(!r||!Zu(w,r))?h(w):r&&nx(r),o.delete(k),s.delete(k)}Fe(()=>[e.include,e.exclude],([k,w])=>{k&&m(C=>Fy(k,C)),w&&m(C=>!Fy(w,C))},{flush:"post",deep:!0});let y=null;const v=()=>{y!=null&&(Jk(n.subTree.type)?_r(()=>{o.set(y,a5(n.subTree))},n.subTree.suspense):o.set(y,a5(n.subTree)))};return Pn(v),rv(v),ki(()=>{o.forEach(k=>{const{subTree:w,suspense:C}=n,x=a5(w);if(k.type===x.type&&k.key===x.key){nx(x);const S=x.component.da;S&&_r(S,C);return}h(k)})}),()=>{if(y=null,!t.default)return r=null;const k=t.default(),w=k[0];if(k.length>1)return r=null,k;if(!K1(w)||!(w.shapeFlag&4)&&!(w.shapeFlag&128))return r=null,w;let C=a5(w);if(C.type===Pr)return r=null,C;const x=C.type,S=II(nh(C)?C.type.__asyncResolved||{}:x),{include:M,exclude:_,max:T}=e;if(M&&(!S||!Fy(M,S))||_&&S&&Fy(_,S))return C.shapeFlag&=-257,r=C,w;const E=C.key==null?x:C.key,L=o.get(E);return C.el&&(C=fh(C),w.shapeFlag&128&&(w.ssContent=C)),y=E,L?(C.el=L.el,C.component=L.component,C.transition&&U1(C,C.transition),C.shapeFlag|=512,s.delete(E),s.add(E)):(s.add(E),T&&s.size>parseInt(T,10)&&g(s.values().next().value)),C.shapeFlag|=256,r=C,Jk(w.type)?w:C}}},vsn=L1e;function Fy(e,t){return Yn(e)?e.some(n=>Fy(n,t)):qo(e)?e.split(",").includes(t):hhe(e)?(e.lastIndex=0,e.test(t)):!1}function R1e(e,t){TQ(e,"a",t)}function P1e(e,t){TQ(e,"da",t)}function TQ(e,t,n=Sa){const i=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(O7(t,i,n),n){let o=n.parent;for(;o&&o.parent;)O3(o.parent.vnode)&&$1e(i,t,n,o),o=o.parent}}function $1e(e,t,n,i){const o=O7(t,e,i,!0);Xn(()=>{NL(i[t],o)},n)}function nx(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function a5(e){return e.shapeFlag&128?e.ssContent:e}function O7(e,t,n=Sa,i=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...r)=>{af();const a=av(n),l=xu(t,n,e,r);return a(),lf(),l});return i?o.unshift(s):o.push(s),s}}const bh=e=>(t,n=Sa)=>{(!sm||e==="sp")&&O7(e,(...i)=>t(...i),n)},O1e=bh("bm"),Pn=bh("m"),MQ=bh("bu"),rv=bh("u"),ki=bh("bum"),Xn=bh("um"),F1e=bh("sp"),D1e=bh("rtg"),N1e=bh("rtc");function EQ(e,t=Sa){O7("ec",e,t)}const ZL="components",B1e="directives";function GL(e,t){return QL(ZL,e,!0,t)||e}const LQ=Symbol.for("v-ndc");function Ds(e){return qo(e)?QL(ZL,e,!1)||e:e||LQ}function ysn(e){return QL(B1e,e)}function QL(e,t,n=!0,i=!1){const o=Ta||Sa;if(o){const s=o.type;if(e===ZL){const a=II(s,!1);if(a&&(a===t||a===Gr(t)||a===S7(Gr(t))))return s}const r=_D(o[e]||s[e],t)||_D(o.appContext[e],t);return!r&&i?s:r}}function _D(e,t){return e&&(e[t]||e[Gr(t)]||e[S7(Gr(t))])}function yt(e,t,n,i){let o;const s=n&&n[i],r=Yn(e);if(r||qo(e)){const a=r&&nd(e);let l=!1,c=!1;a&&(l=!_c(e),c=dh(e),e=E7(e)),o=new Array(e.length);for(let u=0,d=e.length;ut(a,l,void 0,s&&s[l]));else{const a=Object.keys(e);o=new Array(a.length);for(let l=0,c=a.length;l{const s=i.fn(...o);return s&&(s.key=i.key),s}:i.fn)}return e}function si(e,t,n={},i,o){if(Ta.ce||Ta.parent&&nh(Ta.parent)&&Ta.parent.ce){const c=Object.keys(n).length>0;return t!=="default"&&(n.name=t),b(),oe(_e,null,[V("slot",n,i&&i())],c?-2:64)}let s=e[t];s&&s._c&&(s._d=!1),b();const r=s&&YL(s(n)),a=n.key||r&&r.key,l=oe(_e,{key:(a&&!Fc(a)?a:`_${t}`)+(!r&&i?"_fb":"")},r||(i?i():[]),r&&e._===1?64:-2);return!o&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l}function YL(e){return e.some(t=>K1(t)?!(t.type===Pr||t.type===_e&&!YL(t.children)):!0)?e:null}function bsn(e,t){const n={};for(const i in e)n[t&&/[A-Z]/.test(i)?`on:${i}`:E8(i)]=e[i];return n}const bI=e=>e?iY(e)?F3(e):bI(e.parent):null,f4=Bo(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>bI(e.parent),$root:e=>bI(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>JL(e),$forceUpdate:e=>e.f||(e.f=()=>{WL(e.update)}),$nextTick:e=>e.n||(e.n=bt.bind(e.proxy)),$watch:e=>p1e.bind(e)}),ix=(e,t)=>e!==Gi&&!e.__isScriptSetup&&ko(e,t),kI={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:i,data:o,props:s,accessCache:r,type:a,appContext:l}=e;if(t[0]!=="$"){const f=r[t];if(f!==void 0)switch(f){case 1:return i[t];case 2:return o[t];case 4:return n[t];case 3:return s[t]}else{if(ix(i,t))return r[t]=1,i[t];if(o!==Gi&&ko(o,t))return r[t]=2,o[t];if(ko(s,t))return r[t]=3,s[t];if(n!==Gi&&ko(n,t))return r[t]=4,n[t];wI&&(r[t]=0)}}const c=f4[t];let u,d;if(c)return t==="$attrs"&&za(e.attrs,"get",""),c(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(n!==Gi&&ko(n,t))return r[t]=4,n[t];if(d=l.config.globalProperties,ko(d,t))return d[t]},set({_:e},t,n){const{data:i,setupState:o,ctx:s}=e;return ix(o,t)?(o[t]=n,!0):i!==Gi&&ko(i,t)?(i[t]=n,!0):ko(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:o,props:s,type:r}},a){let l;return!!(n[a]||e!==Gi&&a[0]!=="$"&&ko(e,a)||ix(t,a)||ko(s,a)||ko(i,a)||ko(f4,a)||ko(o.config.globalProperties,a)||(l=r.__cssModules)&&l[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ko(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},z1e=Bo({},kI,{get(e,t){if(t!==Symbol.unscopables)return kI.get(e,t,e)},has(e,t){return t[0]!=="_"&&!yhe(t)}});function ksn(){return null}function wsn(){return null}function Csn(e){}function Asn(e){}function xsn(){return null}function Ssn(){}function _sn(e,t){return null}function H1e(){return RQ().slots}function Sm(){return RQ().attrs}function RQ(e){const t=Dr();return t.setupContext||(t.setupContext=rY(t))}function m9(e){return Yn(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Isn(e,t){const n=m9(e);for(const i in t){if(i.startsWith("__skip"))continue;let o=n[i];o?Yn(o)||mi(o)?o=n[i]={type:o,default:t[i]}:o.default=t[i]:o===null&&(o=n[i]={default:t[i]}),o&&t[`__skip_${i}`]&&(o.skipFactory=!0)}return n}function ID(e,t){return!e||!t?e||t:Yn(e)&&Yn(t)?e.concat(t):Bo({},m9(e),m9(t))}function Tsn(e,t){const n={};for(const i in e)t.includes(i)||Object.defineProperty(n,i,{enumerable:!0,get:()=>e[i]});return n}function Msn(e){const t=Dr(),n=sm;let i=e();v9(),n&&a2(!1);const o=()=>{av(t),n&&a2(!0)},s=()=>{Dr()!==t&&t.scope.off(),v9(),n&&a2(!1)};return BL(i)&&(i=i.catch(r=>{throw o(),Promise.resolve().then(()=>Promise.resolve().then(s)),r})),[i,()=>{o(),Promise.resolve().then(s)}]}let wI=!0;function j1e(e){const t=JL(e),n=e.proxy,i=e.ctx;wI=!1,t.beforeCreate&&TD(t.beforeCreate,e,"bc");const{data:o,computed:s,methods:r,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:h,updated:m,activated:g,deactivated:y,beforeDestroy:v,beforeUnmount:k,destroyed:w,unmounted:C,render:x,renderTracked:S,renderTriggered:M,errorCaptured:_,serverPrefetch:T,expose:E,inheritAttrs:L,components:P,directives:N,filters:U}=t;if(c&&W1e(c,i,null),r)for(const W in r){const D=r[W];mi(D)&&(i[W]=D.bind(n))}if(o){const W=o.call(n,n);Ao(W)&&(e.data=Qo(W))}if(wI=!0,s)for(const W in s){const D=s[W],z=mi(D)?D.bind(n,n):mi(D.get)?D.get.bind(n,n):gu,$=!mi(D)&&mi(D.set)?D.set.bind(n):gu,j=R({get:z,set:$});Object.defineProperty(i,W,{enumerable:!0,configurable:!0,get:()=>j.value,set:G=>j.value=G})}if(a)for(const W in a)PQ(a[W],i,n,W);if(l){const W=mi(l)?l.call(n):l;Reflect.ownKeys(W).forEach(D=>{fi(D,W[D])})}u&&TD(u,e,"c");function B(W,D){Yn(D)?D.forEach(z=>W(z.bind(n))):D&&W(D.bind(n))}if(B(O1e,d),B(Pn,f),B(MQ,h),B(rv,m),B(R1e,g),B(P1e,y),B(EQ,_),B(N1e,S),B(D1e,M),B(ki,k),B(Xn,C),B(F1e,T),Yn(E))if(E.length){const W=e.exposed||(e.exposed={});E.forEach(D=>{Object.defineProperty(W,D,{get:()=>n[D],set:z=>n[D]=z,enumerable:!0})})}else e.exposed||(e.exposed={});x&&e.render===gu&&(e.render=x),L!=null&&(e.inheritAttrs=L),P&&(e.components=P),N&&(e.directives=N),T&&UL(e)}function W1e(e,t,n=gu){Yn(e)&&(e=CI(e));for(const i in e){const o=e[i];let s;Ao(o)?"default"in o?s=Zt(o.from||i,o.default,!0):s=Zt(o.from||i):s=Zt(o),Vo(s)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:r=>s.value=r}):t[i]=s}}function TD(e,t,n){xu(Yn(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,n)}function PQ(e,t,n,i){let o=i.includes(".")?kQ(n,i):()=>n[i];if(qo(e)){const s=t[e];mi(s)&&Fe(o,s)}else if(mi(e))Fe(o,e.bind(n));else if(Ao(e))if(Yn(e))e.forEach(s=>PQ(s,t,n,i));else{const s=mi(e.handler)?e.handler.bind(n):t[e.handler];mi(s)&&Fe(o,s,e)}}function JL(e){const t=e.type,{mixins:n,extends:i}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:r}}=e.appContext,a=s.get(t);let l;return a?l=a:!o.length&&!n&&!i?l=t:(l={},o.length&&o.forEach(c=>Qk(l,c,r,!0)),Qk(l,t,r)),Ao(t)&&s.set(t,l),l}function Qk(e,t,n,i=!1){const{mixins:o,extends:s}=t;s&&Qk(e,s,n,!0),o&&o.forEach(r=>Qk(e,r,n,!0));for(const r in t)if(!(i&&r==="expose")){const a=q1e[r]||n&&n[r];e[r]=a?a(e[r],t[r]):t[r]}return e}const q1e={data:MD,props:ED,emits:ED,methods:Dy,computed:Dy,beforeCreate:nl,created:nl,beforeMount:nl,mounted:nl,beforeUpdate:nl,updated:nl,beforeDestroy:nl,beforeUnmount:nl,destroyed:nl,unmounted:nl,activated:nl,deactivated:nl,errorCaptured:nl,serverPrefetch:nl,components:Dy,directives:Dy,watch:U1e,provide:MD,inject:V1e};function MD(e,t){return t?e?function(){return Bo(mi(e)?e.call(this,this):e,mi(t)?t.call(this,this):t)}:t:e}function V1e(e,t){return Dy(CI(e),CI(t))}function CI(e){if(Yn(e)){const t={};for(let n=0;n{let u,d=Gi,f;return h1e(()=>{const h=e[o];sa(u,h)&&(u=h,c())}),{get(){return l(),n.get?n.get(u):u},set(h){const m=n.set?n.set(h):h;if(!sa(m,u)&&!(d!==Gi&&sa(h,d)))return;const g=i.vnode.props,y=!!(g&&(t in g||o in g||s in g)&&(`onUpdate:${t}`in g||`onUpdate:${o}`in g||`onUpdate:${s}`in g));y||(u=h,c()),i.emit(`update:${t}`,m),sa(h,d)&&(sa(h,m)&&!sa(m,f)||y&&d!==Gi&&!sa(m,u))&&c(),d=h,f=m}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?r||Gi:a,done:!1}:{done:!0}}}},a}const OQ=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Gr(t)}Modifiers`]||e[`${Bl(t)}Modifiers`];function Q1e(e,t,...n){if(e.isUnmounted)return;const i=e.vnode.props||Gi;let o=n;const s=t.startsWith("update:"),r=s&&OQ(i,t.slice(7));r&&(r.trim&&(o=n.map(u=>qo(u)?u.trim():u)),r.number&&(o=n.map(_7)));let a,l=i[a=E8(t)]||i[a=E8(Gr(t))];!l&&s&&(l=i[a=E8(Bl(t))]),l&&xu(l,e,6,o);const c=i[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,xu(c,e,6,o)}}const Y1e=new WeakMap;function FQ(e,t,n=!1){const i=n?Y1e:t.emitsCache,o=i.get(e);if(o!==void 0)return o;const s=e.emits;let r={},a=!1;if(!mi(e)){const l=c=>{const u=FQ(c,t,!0);u&&(a=!0,Bo(r,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!a?(Ao(e)&&i.set(e,null),null):(Yn(s)?s.forEach(l=>r[l]=null):Bo(r,s),Ao(e)&&i.set(e,r),r)}function F7(e,t){return!e||!L3(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ko(e,t[0].toLowerCase()+t.slice(1))||ko(e,Bl(t))||ko(e,t))}function R8(e){const{type:t,vnode:n,proxy:i,withProxy:o,propsOptions:[s],slots:r,attrs:a,emit:l,render:c,renderCache:u,props:d,data:f,setupState:h,ctx:m,inheritAttrs:g}=e,y=h9(e);let v,k;try{if(n.shapeFlag&4){const C=o||i,x=C;v=Dl(c.call(x,C,u,d,h,f,m)),k=a}else{const C=t;v=Dl(C.length>1?C(d,{attrs:a,slots:r,emit:l}):C(d,null)),k=t.props?a:X1e(a)}}catch(C){h4.length=0,sv(C,e,1),v=V(Pr)}let w=v;if(k&&g!==!1){const C=Object.keys(k),{shapeFlag:x}=w;C.length&&x&7&&(s&&C.some(w7)&&(k=epe(k,s)),w=fh(w,k,!1,!0))}return n.dirs&&(w=fh(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&U1(w,n.transition),v=w,h9(y),v}function J1e(e,t=!0){let n;for(let i=0;i{let t;for(const n in e)(n==="class"||n==="style"||L3(n))&&((t||(t={}))[n]=e[n]);return t},epe=(e,t)=>{const n={};for(const i in e)(!w7(i)||!(i.slice(9)in t))&&(n[i]=e[i]);return n};function tpe(e,t,n){const{props:i,children:o,component:s}=e,{props:r,children:a,patchFlag:l}=t,c=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return i?LD(i,r,c):!!r;if(l&8){const u=t.dynamicProps;for(let d=0;dObject.create(NQ),zQ=e=>Object.getPrototypeOf(e)===NQ;function npe(e,t,n,i=!1){const o={},s=BQ();e.propsDefaults=Object.create(null),HQ(e,t,o,s);for(const r in e.propsOptions[0])r in o||(o[r]=void 0);n?e.props=i?o:V1(o):e.type.props?e.props=o:e.props=s,e.attrs=s}function ipe(e,t,n,i){const{props:o,attrs:s,vnode:{patchFlag:r}}=e,a=Hi(o),[l]=e.propsOptions;let c=!1;if((i||r>0)&&!(r&16)){if(r&8){const u=e.vnode.dynamicProps;for(let d=0;d{l=!0;const[f,h]=jQ(d,t,!0);Bo(r,f),h&&a.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!s&&!l)return Ao(e)&&i.set(e,e2),e2;if(Yn(s))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",eR=e=>Yn(e)?e.map(Dl):[Dl(e)],spe=(e,t,n)=>{if(t._n)return t;const i=ie((...o)=>eR(t(...o)),n);return i._c=!1,i},WQ=(e,t,n)=>{const i=e._ctx;for(const o in e){if(XL(o))continue;const s=e[o];if(mi(s))t[o]=spe(o,s,i);else if(s!=null){const r=eR(s);t[o]=()=>r}}},qQ=(e,t)=>{const n=eR(t);e.slots.default=()=>n},VQ=(e,t,n)=>{for(const i in t)(n||!XL(i))&&(e[i]=t[i])},rpe=(e,t,n)=>{const i=e.slots=BQ();if(e.vnode.shapeFlag&32){const o=t._;o?(VQ(i,t,n),n&&UG(i,"_",o,!0)):WQ(t,i)}else t&&qQ(e,t)},ape=(e,t,n)=>{const{vnode:i,slots:o}=e;let s=!0,r=Gi;if(i.shapeFlag&32){const a=t._;a?n&&a===1?s=!1:VQ(o,t,n):(s=!t.$stable,WQ(t,o)),r=t}else t&&(qQ(e,t),r={default:1});if(s)for(const a in o)!XL(a)&&r[a]==null&&delete o[a]},_r=YQ;function lpe(e){return UQ(e)}function cpe(e){return UQ(e,C1e)}function UQ(e,t){const n=I7();n.__VUE__=!0;const{insert:i,remove:o,patchProp:s,createElement:r,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:h=gu,insertStaticContent:m}=e,g=(Q,ee,he,Re=null,Pe=null,le=null,ke=void 0,ne=null,ce=!!ee.dynamicChildren)=>{if(Q===ee)return;Q&&!Zu(Q,ee)&&(Re=Y(Q),G(Q,Pe,le,!0),Q=null),ee.patchFlag===-2&&(ce=!1,ee.dynamicChildren=null);const{type:be,ref:xe,shapeFlag:de}=ee;switch(be){case P1:y(Q,ee,he,Re);break;case Pr:v(Q,ee,he,Re);break;case r2:Q==null&&k(ee,he,Re,ke);break;case _e:P(Q,ee,he,Re,Pe,le,ke,ne,ce);break;default:de&1?x(Q,ee,he,Re,Pe,le,ke,ne,ce):de&6?N(Q,ee,he,Re,Pe,le,ke,ne,ce):(de&64||de&128)&&be.process(Q,ee,he,Re,Pe,le,ke,ne,ce,Me)}xe!=null&&Pe?o2(xe,Q&&Q.ref,le,ee||Q,!ee):xe==null&&Q&&Q.ref!=null&&o2(Q.ref,null,le,Q,!0)},y=(Q,ee,he,Re)=>{if(Q==null)i(ee.el=a(ee.children),he,Re);else{const Pe=ee.el=Q.el;ee.children!==Q.children&&c(Pe,ee.children)}},v=(Q,ee,he,Re)=>{Q==null?i(ee.el=l(ee.children||""),he,Re):ee.el=Q.el},k=(Q,ee,he,Re)=>{[Q.el,Q.anchor]=m(Q.children,ee,he,Re,Q.el,Q.anchor)},w=({el:Q,anchor:ee},he,Re)=>{let Pe;for(;Q&&Q!==ee;)Pe=f(Q),i(Q,he,Re),Q=Pe;i(ee,he,Re)},C=({el:Q,anchor:ee})=>{let he;for(;Q&&Q!==ee;)he=f(Q),o(Q),Q=he;o(ee)},x=(Q,ee,he,Re,Pe,le,ke,ne,ce)=>{if(ee.type==="svg"?ke="svg":ee.type==="math"&&(ke="mathml"),Q==null)S(ee,he,Re,Pe,le,ke,ne,ce);else{const be=Q.el&&Q.el._isVueCE?Q.el:null;try{be&&be._beginPatch(),T(Q,ee,Pe,le,ke,ne,ce)}finally{be&&be._endPatch()}}},S=(Q,ee,he,Re,Pe,le,ke,ne)=>{let ce,be;const{props:xe,shapeFlag:de,transition:$e,dirs:Ye}=Q;if(ce=Q.el=r(Q.type,le,xe&&xe.is,xe),de&8?u(ce,Q.children):de&16&&_(Q.children,ce,null,Re,Pe,ox(Q,le),ke,ne),Ye&&Wd(Q,null,Re,"created"),M(ce,Q,Q.scopeId,ke,Re),xe){for(const Pt in xe)Pt!=="value"&&!O0(Pt)&&s(ce,Pt,null,xe[Pt],le,Re);"value"in xe&&s(ce,"value",null,xe.value,le),(be=xe.onVnodeBeforeMount)&&Pl(be,Re,Q)}Ye&&Wd(Q,null,Re,"beforeMount");const rt=KQ(Pe,$e);rt&&$e.beforeEnter(ce),i(ce,ee,he),((be=xe&&xe.onVnodeMounted)||rt||Ye)&&_r(()=>{try{be&&Pl(be,Re,Q),rt&&$e.enter(ce),Ye&&Wd(Q,null,Re,"mounted")}finally{}},Pe)},M=(Q,ee,he,Re,Pe)=>{if(he&&h(Q,he),Re)for(let le=0;le{for(let be=ce;be{const ne=ee.el=Q.el;let{patchFlag:ce,dynamicChildren:be,dirs:xe}=ee;ce|=Q.patchFlag&16;const de=Q.props||Gi,$e=ee.props||Gi;let Ye;if(he&&Up(he,!1),(Ye=$e.onVnodeBeforeUpdate)&&Pl(Ye,he,ee,Q),xe&&Wd(ee,Q,he,"beforeUpdate"),he&&Up(he,!0),be&&(!Q.dynamicChildren||Q.dynamicChildren.length!==be.length)&&(ce=0,ke=!1,be=null),(de.innerHTML&&$e.innerHTML==null||de.textContent&&$e.textContent==null)&&u(ne,""),be?E(Q.dynamicChildren,be,ne,he,Re,ox(ee,Pe),le):ke||D(Q,ee,ne,null,he,Re,ox(ee,Pe),le,!1),ce>0){if(ce&16)L(ne,de,$e,he,Pe);else if(ce&2&&de.class!==$e.class&&s(ne,"class",null,$e.class,Pe),ce&4&&s(ne,"style",de.style,$e.style,Pe),ce&8){const rt=ee.dynamicProps;for(let Pt=0;Pt{Ye&&Pl(Ye,he,ee,Q),xe&&Wd(ee,Q,he,"updated")},Re)},E=(Q,ee,he,Re,Pe,le,ke)=>{for(let ne=0;ne{if(ee!==he){if(ee!==Gi)for(const le in ee)!O0(le)&&!(le in he)&&s(Q,le,ee[le],null,Pe,Re);for(const le in he){if(O0(le))continue;const ke=he[le],ne=ee[le];ke!==ne&&le!=="value"&&s(Q,le,ne,ke,Pe,Re)}"value"in he&&s(Q,"value",ee.value,he.value,Pe)}},P=(Q,ee,he,Re,Pe,le,ke,ne,ce)=>{const be=ee.el=Q?Q.el:a(""),xe=ee.anchor=Q?Q.anchor:a("");let{patchFlag:de,dynamicChildren:$e,slotScopeIds:Ye}=ee;Ye&&(ne=ne?ne.concat(Ye):Ye),Q==null?(i(be,he,Re),i(xe,he,Re),_(ee.children||[],he,xe,Pe,le,ke,ne,ce)):de>0&&de&64&&$e&&Q.dynamicChildren&&Q.dynamicChildren.length===$e.length?(E(Q.dynamicChildren,$e,he,Pe,le,ke,ne),(ee.key!=null||Pe&&ee===Pe.subTree)&&tR(Q,ee,!0)):D(Q,ee,he,xe,Pe,le,ke,ne,ce)},N=(Q,ee,he,Re,Pe,le,ke,ne,ce)=>{ee.slotScopeIds=ne,Q==null?ee.shapeFlag&512?Pe.ctx.activate(ee,he,Re,ke,ce):U(ee,he,Re,Pe,le,ke,ce):F(Q,ee,ce)},U=(Q,ee,he,Re,Pe,le,ke)=>{const ne=Q.component=nY(Q,Re,Pe);if(O3(Q)&&(ne.ctx.renderer=Me),oY(ne,!1,ke),ne.asyncDep){if(Pe&&Pe.registerDep(ne,B,ke),!Q.el){const ce=ne.subTree=V(Pr);v(null,ce,ee,he),Q.placeholder=ce.el}}else B(ne,Q,ee,he,Pe,le,ke)},F=(Q,ee,he)=>{const Re=ee.component=Q.component;if(tpe(Q,ee,he))if(Re.asyncDep&&!Re.asyncResolved){W(Re,ee,he);return}else Re.next=ee,Re.update();else ee.el=Q.el,Re.vnode=ee},B=(Q,ee,he,Re,Pe,le,ke)=>{const ne=()=>{if(Q.isMounted){let{next:de,bu:$e,u:Ye,parent:rt,vnode:Pt}=Q;{const Jt=ZQ(Q);if(Jt){de&&(de.el=Pt.el,W(Q,de,ke)),Jt.asyncDep.then(()=>{_r(()=>{Q.isUnmounted||be()},Pe)});return}}let $t=de,jt;Up(Q,!1),de?(de.el=Pt.el,W(Q,de,ke)):de=Pt,$e&&n2($e),(jt=de.props&&de.props.onVnodeBeforeUpdate)&&Pl(jt,rt,de,Pt),Up(Q,!0);const Kt=R8(Q),sn=Q.subTree;Q.subTree=Kt,g(sn,Kt,d(sn.el),Y(sn),Q,Pe,le),de.el=Kt.el,$t===null&&D7(Q,Kt.el),Ye&&_r(Ye,Pe),(jt=de.props&&de.props.onVnodeUpdated)&&_r(()=>Pl(jt,rt,de,Pt),Pe)}else{let de;const{el:$e,props:Ye}=ee,{bm:rt,m:Pt,parent:$t,root:jt,type:Kt}=Q,sn=nh(ee);if(Up(Q,!1),rt&&n2(rt),!sn&&(de=Ye&&Ye.onVnodeBeforeMount)&&Pl(de,$t,ee),Up(Q,!0),$e&&se){const Jt=()=>{Q.subTree=R8(Q),se($e,Q.subTree,Q,Pe,null)};sn&&Kt.__asyncHydrate?Kt.__asyncHydrate($e,Q,Jt):Jt()}else{jt.ce&&jt.ce._hasShadowRoot()&&jt.ce._injectChildStyle(Kt,Q.parent?Q.parent.type:void 0);const Jt=Q.subTree=R8(Q);g(null,Jt,he,Re,Q,Pe,le),ee.el=Jt.el}if(Pt&&_r(Pt,Pe),!sn&&(de=Ye&&Ye.onVnodeMounted)){const Jt=ee;_r(()=>Pl(de,$t,Jt),Pe)}(ee.shapeFlag&256||$t&&nh($t.vnode)&&$t.vnode.shapeFlag&256)&&Q.a&&_r(Q.a,Pe),Q.isMounted=!0,ee=he=Re=null}};Q.scope.on();const ce=Q.effect=new jk(ne);Q.scope.off();const be=Q.update=ce.run.bind(ce),xe=Q.job=ce.runIfDirty.bind(ce);xe.i=Q,xe.id=Q.uid,ce.scheduler=()=>WL(xe),Up(Q,!0),be()},W=(Q,ee,he)=>{ee.component=Q;const Re=Q.vnode.props;Q.vnode=ee,Q.next=null,ipe(Q,ee.props,Re,he),ape(Q,ee.children,he),af(),bD(Q),lf()},D=(Q,ee,he,Re,Pe,le,ke,ne,ce=!1)=>{const be=Q&&Q.children,xe=Q?Q.shapeFlag:0,de=ee.children,{patchFlag:$e,shapeFlag:Ye}=ee;if($e>0){if($e&128){$(be,de,he,Re,Pe,le,ke,ne,ce);return}else if($e&256){z(be,de,he,Re,Pe,le,ke,ne,ce);return}}Ye&8?(xe&16&&q(be,Pe,le),de!==be&&u(he,de)):xe&16?Ye&16?$(be,de,he,Re,Pe,le,ke,ne,ce):q(be,Pe,le,!0):(xe&8&&u(he,""),Ye&16&&_(de,he,Re,Pe,le,ke,ne,ce))},z=(Q,ee,he,Re,Pe,le,ke,ne,ce)=>{Q=Q||e2,ee=ee||e2;const be=Q.length,xe=ee.length,de=Math.min(be,xe);let $e;for($e=0;$exe?q(Q,Pe,le,!0,!1,de):_(ee,he,Re,Pe,le,ke,ne,ce,de)},$=(Q,ee,he,Re,Pe,le,ke,ne,ce)=>{let be=0;const xe=ee.length;let de=Q.length-1,$e=xe-1;for(;be<=de&&be<=$e;){const Ye=Q[be],rt=ee[be]=ce?Ff(ee[be]):Dl(ee[be]);if(Zu(Ye,rt))g(Ye,rt,he,null,Pe,le,ke,ne,ce);else break;be++}for(;be<=de&&be<=$e;){const Ye=Q[de],rt=ee[$e]=ce?Ff(ee[$e]):Dl(ee[$e]);if(Zu(Ye,rt))g(Ye,rt,he,null,Pe,le,ke,ne,ce);else break;de--,$e--}if(be>de){if(be<=$e){const Ye=$e+1,rt=Ye$e)for(;be<=de;)G(Q[be],Pe,le,!0),be++;else{const Ye=be,rt=be,Pt=new Map;for(be=rt;be<=$e;be++){const Ke=ee[be]=ce?Ff(ee[be]):Dl(ee[be]);Ke.key!=null&&Pt.set(Ke.key,be)}let $t,jt=0;const Kt=$e-rt+1;let sn=!1,Jt=0;const Oe=new Array(Kt);for(be=0;be=Kt){G(Ke,Pe,le,!0);continue}let Ee;if(Ke.key!=null)Ee=Pt.get(Ke.key);else for($t=rt;$t<=$e;$t++)if(Oe[$t-rt]===0&&Zu(Ke,ee[$t])){Ee=$t;break}Ee===void 0?G(Ke,Pe,le,!0):(Oe[Ee-rt]=be+1,Ee>=Jt?Jt=Ee:sn=!0,g(Ke,ee[Ee],he,null,Pe,le,ke,ne,ce),jt++)}const Le=sn?upe(Oe):e2;for($t=Le.length-1,be=Kt-1;be>=0;be--){const Ke=rt+be,Ee=ee[Ke],Ie=ee[Ke+1],Ve=Ke+1{const{el:le,type:ke,transition:ne,children:ce,shapeFlag:be}=Q;if(be&6){j(Q.component.subTree,ee,he,Re);return}if(be&128){Q.suspense.move(ee,he,Re);return}if(be&64){ke.move(Q,ee,he,Me);return}if(ke===_e){i(le,ee,he);for(let de=0;dene.enter(le),Pe));else{const{leave:de,delayLeave:$e,afterLeave:Ye}=ne,rt=()=>{Q.ctx.isUnmounted?o(le):i(le,ee,he)},Pt=()=>{const $t=le._isLeaving||!!le[Xc];le._isLeaving&&le[Xc](!0),ne.persisted&&!$t?rt():de(le,()=>{rt(),Ye&&Ye()})};$e?$e(le,rt,Pt):Pt()}else i(le,ee,he)},G=(Q,ee,he,Re=!1,Pe=!1)=>{const{type:le,props:ke,ref:ne,children:ce,dynamicChildren:be,shapeFlag:xe,patchFlag:de,dirs:$e,cacheIndex:Ye,memo:rt}=Q;if(de===-2&&(Pe=!1),ne!=null&&(af(),o2(ne,null,he,Q,!0),lf()),Ye!=null&&(ee.renderCache[Ye]=void 0),xe&256){ee.ctx.deactivate(Q);return}const Pt=xe&1&&$e,$t=!nh(Q);let jt;if($t&&(jt=ke&&ke.onVnodeBeforeUnmount)&&Pl(jt,ee,Q),xe&6)J(Q.component,he,Re);else{if(xe&128){Q.suspense.unmount(he,Re);return}Pt&&Wd(Q,null,ee,"beforeUnmount"),xe&64?Q.type.remove(Q,ee,he,Me,Re):be&&!be.hasOnce&&(le!==_e||de>0&&de&64)?q(be,ee,he,!1,!0):(le===_e&&de&384||!Pe&&xe&16)&&q(ce,ee,he),Re&&K(Q)}const Kt=rt!=null&&Ye==null;($t&&(jt=ke&&ke.onVnodeUnmounted)||Pt||Kt)&&_r(()=>{jt&&Pl(jt,ee,Q),Pt&&Wd(Q,null,ee,"unmounted"),Kt&&(Q.el=null)},he)},K=Q=>{const{type:ee,el:he,anchor:Re,transition:Pe}=Q;if(ee===_e){te(he,Re);return}if(ee===r2){C(Q);return}const le=()=>{o(he),Pe&&!Pe.persisted&&Pe.afterLeave&&Pe.afterLeave()};if(Q.shapeFlag&1&&Pe&&!Pe.persisted){const{leave:ke,delayLeave:ne}=Pe,ce=()=>ke(he,le);ne?ne(Q.el,le,ce):ce()}else le()},te=(Q,ee)=>{let he;for(;Q!==ee;)he=f(Q),o(Q),Q=he;o(ee)},J=(Q,ee,he)=>{const{bum:Re,scope:Pe,job:le,subTree:ke,um:ne,m:ce,a:be}=Q;Yk(ce),Yk(be),Re&&n2(Re),Pe.stop(),le&&(le.flags|=8,G(ke,Q,ee,he)),ne&&_r(ne,ee),_r(()=>{Q.isUnmounted=!0},ee)},q=(Q,ee,he,Re=!1,Pe=!1,le=0)=>{for(let ke=le;ke{if(Q.shapeFlag&6)return Y(Q.component.subTree);if(Q.shapeFlag&128)return Q.suspense.next();const ee=f(Q.anchor||Q.el),he=ee&&ee[wQ];return he?f(he):ee};let ae=!1;const pe=(Q,ee,he)=>{let Re;Q==null?ee._vnode&&(G(ee._vnode,null,null,!0),Re=ee._vnode.component):g(ee._vnode||null,Q,ee,null,null,null,he),ee._vnode=Q,ae||(ae=!0,bD(Re),Kk(),ae=!1)},Me={p:g,um:G,m:j,r:K,mt:U,mc:_,pc:D,pbc:E,n:Y,o:e};let fe,se;return t&&([fe,se]=t(Me)),{render:pe,hydrate:fe,createApp:Z1e(pe,fe)}}function ox({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Up({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function KQ(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function tR(e,t,n=!1){const i=e.children,o=t.children;if(Yn(i)&&Yn(o))for(let s=0;s>1,e[n[a]]0&&(t[i]=n[s-1]),n[s]=i)}}for(s=n.length,r=n[s-1];s-- >0;)n[s]=r,r=t[r];return n}function ZQ(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ZQ(t)}function Yk(e){if(e)for(let t=0;te.__isSuspense;let xI=0;const dpe={name:"Suspense",__isSuspense:!0,process(e,t,n,i,o,s,r,a,l,c){if(e==null)fpe(t,n,i,o,s,r,a,l,c);else{if(s&&s.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}hpe(e,t,n,i,o,r,a,l,c)}},hydrate:ppe,normalize:mpe},Esn=dpe;function g9(e,t){const n=e.props&&e.props[t];mi(n)&&n()}function fpe(e,t,n,i,o,s,r,a,l){const{p:c,o:{createElement:u}}=l,d=u("div"),f=e.suspense=QQ(e,o,i,t,d,n,s,r,a,l);c(null,f.pendingBranch=e.ssContent,d,null,i,f,s,r),f.deps>0?(g9(e,"onPending"),g9(e,"onFallback"),c(null,e.ssFallback,t,n,i,null,s,r),s2(f,e.ssFallback)):f.resolve(!1,!0)}function hpe(e,t,n,i,o,s,r,a,{p:l,um:c,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const f=t.ssContent,h=t.ssFallback,{activeBranch:m,pendingBranch:g,isInFallback:y,isHydrating:v}=d;if(g)d.pendingBranch=f,Zu(g,f)?(l(g,f,d.hiddenContainer,null,o,d,s,r,a),d.deps<=0?d.resolve():y&&(v||(l(m,h,n,i,o,null,s,r,a),s2(d,h)))):(d.pendingId=xI++,v?(d.isHydrating=!1,d.activeBranch=g):c(g,o,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),y?(l(null,f,d.hiddenContainer,null,o,d,s,r,a),d.deps<=0?d.resolve():(l(m,h,n,i,o,null,s,r,a),s2(d,h))):m&&Zu(m,f)?(l(m,f,n,i,o,d,s,r,a),d.resolve(!0)):(l(null,f,d.hiddenContainer,null,o,d,s,r,a),d.deps<=0&&d.resolve()));else if(m&&Zu(m,f))l(m,f,n,i,o,d,s,r,a),s2(d,f);else if(g9(t,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=xI++,l(null,f,d.hiddenContainer,null,o,d,s,r,a),d.deps<=0)d.resolve();else{const{timeout:k,pendingId:w}=d;k>0?setTimeout(()=>{d.pendingId===w&&d.fallback(h)},k):k===0&&d.fallback(h)}}function QQ(e,t,n,i,o,s,r,a,l,c,u=!1){const{p:d,m:f,um:h,n:m,o:{parentNode:g,remove:y}}=c;let v;const k=gpe(e);k&&t&&t.pendingBranch&&(v=t.pendingId,t.deps++);const w=e.props?Hk(e.props.timeout):void 0,C=s,x={vnode:e,parent:t,parentComponent:n,namespace:r,container:i,hiddenContainer:o,deps:0,pendingId:xI++,timeout:typeof w=="number"?w:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(S=!1,M=!1){const{vnode:_,activeBranch:T,pendingBranch:E,pendingId:L,effects:P,parentComponent:N,container:U,isInFallback:F}=x;let B=!1;if(x.isHydrating)x.isHydrating=!1;else if(!S){B=T&&E.transition&&E.transition.mode==="out-in";let z=!1;B&&(T.transition.afterLeave=()=>{L===x.pendingId&&(f(E,U,s===C&&!z?m(T):s,0),Uk(P),F&&_.ssFallback&&(_.ssFallback.el=null))}),T&&!x.isFallbackMountPending&&(g(T.el)===U&&(s=m(T),z=!0),h(T,N,x,!0),!B&&F&&_.ssFallback&&_r(()=>_.ssFallback.el=null,x)),B||f(E,U,s,0)}x.isFallbackMountPending=!1,s2(x,E),x.pendingBranch=null,x.isInFallback=!1;let W=x.parent,D=!1;for(;W;){if(W.pendingBranch){W.effects.push(...P),D=!0;break}W=W.parent}!D&&!B&&Uk(P),x.effects=[],k&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,t.deps===0&&!M&&t.resolve()),g9(_,"onResolve")},fallback(S){if(!x.pendingBranch)return;const{vnode:M,activeBranch:_,parentComponent:T,container:E,namespace:L}=x;g9(M,"onFallback");const P=m(_),N=()=>{x.isFallbackMountPending=!1,x.isInFallback&&(d(null,S,E,P,T,null,L,a,l),s2(x,S))},U=S.transition&&S.transition.mode==="out-in";U&&(x.isFallbackMountPending=!0,_.transition.afterLeave=N),x.isInFallback=!0,h(_,T,null,!0),U||N()},move(S,M,_){x.activeBranch&&f(x.activeBranch,S,M,_),x.container=S},next(){return x.activeBranch&&m(x.activeBranch)},registerDep(S,M,_){const T=!!x.pendingBranch;T&&x.deps++;const E=S.vnode.el;S.asyncDep.catch(L=>{sv(L,S,0)}).then(L=>{if(S.isUnmounted||x.isUnmounted||x.pendingId!==S.suspenseId)return;v9(),S.asyncResolved=!0;const{vnode:P}=S;SI(S,L,!1),E&&(P.el=E);const N=!E&&S.subTree.el;M(S,P,g(E||S.subTree.el),E?null:m(S.subTree),x,r,_),N&&(P.placeholder=null,y(N)),D7(S,P.el),T&&--x.deps===0&&x.resolve()})},unmount(S,M){x.isUnmounted=!0,x.activeBranch&&h(x.activeBranch,n,S,M),x.pendingBranch&&h(x.pendingBranch,n,S,M)}};return x}function ppe(e,t,n,i,o,s,r,a,l){const c=t.suspense=QQ(t,i,n,e.parentNode,document.createElement("div"),null,o,s,r,a,!0),u=l(e,c.pendingBranch=t.ssContent,n,c,s,r);return c.deps===0&&c.resolve(!1,!0),u}function mpe(e){const{shapeFlag:t,children:n}=e,i=t&32;e.ssContent=PD(i?n.default:n),e.ssFallback=i?PD(n.fallback):V(Pr)}function PD(e){let t;if(mi(e)){const n=om&&e._c;n&&(e._d=!1,b()),e=e(),n&&(e._d=!0,t=ja,JQ())}return Yn(e)&&(e=J1e(e)),e=Dl(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function YQ(e,t){t&&t.pendingBranch?Yn(e)?t.effects.push(...e):t.effects.push(e):Uk(e)}function s2(e,t){e.activeBranch=t;const{vnode:n,parentComponent:i}=e;let o=t.el;for(;!o&&t.component;)t=t.component.subTree,o=t.el;n.el=o,i&&i.subTree===n&&(i.vnode.el=o,D7(i,o))}function gpe(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const _e=Symbol.for("v-fgt"),P1=Symbol.for("v-txt"),Pr=Symbol.for("v-cmt"),r2=Symbol.for("v-stc"),h4=[];let ja=null;function b(e=!1){h4.push(ja=e?null:[])}function JQ(){h4.pop(),ja=h4[h4.length-1]||null}let om=1;function Xk(e,t=!1){om+=e,e<0&&ja&&t&&(ja.hasOnce=!0)}function XQ(e){return e.dynamicChildren=om>0?ja||e2:null,JQ(),om>0&&ja&&ja.push(e),e}function I(e,t,n,i,o,s){return XQ(A(e,t,n,i,o,s,!0))}function oe(e,t,n,i,o){return XQ(V(e,t,n,i,o,!0))}function K1(e){return e?e.__v_isVNode===!0:!1}function Zu(e,t){return e.type===t.type&&e.key===t.key}function Lsn(e){}const eY=({key:e})=>e??null,P8=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?qo(e)||Vo(e)||mi(e)?{i:Ta,r:e,k:t,f:!!n}:e:null);function A(e,t=null,n=null,i=0,o=null,s=e===_e?0:1,r=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&eY(t),ref:t&&P8(t),scopeId:$7,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:i,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ta};return a?(e6(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=qo(n)?8:16),om>0&&!r&&ja&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&ja.push(l),l}const V=vpe;function vpe(e,t=null,n=null,i=0,o=null,s=!1){if((!e||e===LQ)&&(e=Pr),K1(e)){const a=fh(e,t,!0);return n&&e6(a,n),om>0&&!s&&ja&&(a.shapeFlag&6?ja[ja.indexOf(e)]=a:ja.push(a)),a.patchFlag=-2,a}if(Cpe(e)&&(e=e.__vccOpts),t){t=tY(t);let{class:a,style:l}=t;a&&!qo(a)&&(t.class=De(a)),Ao(l)&&(P7(l)&&!Yn(l)&&(l=Bo({},l)),t.style=nn(l))}const r=qo(e)?1:Jk(e)?128:CQ(e)?64:Ao(e)?4:mi(e)?2:0;return A(e,t,n,i,o,r,s,!0)}function tY(e){return e?P7(e)||zQ(e)?Bo({},e):e:null}function fh(e,t,n=!1,i=!1){const{props:o,ref:s,patchFlag:r,children:a,transition:l}=e,c=t?Ni(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&eY(c),ref:t&&t.ref?n&&s?Yn(s)?s.concat(P8(t)):[s,P8(t)]:P8(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==_e?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&fh(e.ssContent),ssFallback:e.ssFallback&&fh(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&i&&U1(u,l.clone(u)),u}function Be(e=" ",t=0){return V(P1,null,e,t)}function Eu(e,t){const n=V(r2,null,e);return n.staticCount=t,n}function X(e="",t=!1){return t?(b(),oe(Pr,null,e)):V(Pr,null,e)}function Dl(e){return e==null||typeof e=="boolean"?V(Pr):Yn(e)?V(_e,null,e.slice()):K1(e)?Ff(e):V(P1,null,String(e))}function Ff(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:fh(e)}function e6(e,t){let n=0;const{shapeFlag:i}=e;if(t==null)t=null;else if(Yn(t))n=16;else if(typeof t=="object")if(i&65){const o=t.default;o&&(o._c&&(o._d=!1),e6(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!zQ(t)?t._ctx=Ta:o===3&&Ta&&(Ta.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(mi(t)){if(i&65){e6(e,{default:t});return}t={default:t,_ctx:Ta},n=32}else t=String(t),i&64?(n=16,t=[Be(t)]):n=8;e.children=t,e.shapeFlag|=n}function Ni(...e){const t={};for(let n=0;nSa||Ta;let t6,a2;{const e=I7(),t=(n,i)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(i),s=>{o.length>1?o.forEach(r=>r(s)):o[0](s)}};t6=t("__VUE_INSTANCE_SETTERS__",n=>Sa=n),a2=t("__VUE_SSR_SETTERS__",n=>sm=n)}const av=e=>{const t=Sa;return t6(e),e.scope.on(),()=>{e.scope.off(),t6(t)}},v9=()=>{Sa&&Sa.scope.off(),t6(null)};function iY(e){return e.vnode.shapeFlag&4}let sm=!1;function oY(e,t=!1,n=!1){t&&a2(t);const{props:i,children:o}=e.vnode,s=iY(e);npe(e,i,s,t),rpe(e,o,n||t);const r=s?kpe(e,t):void 0;return t&&a2(!1),r}function kpe(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,kI);const{setup:i}=n;if(i){af();const o=e.setupContext=i.length>1?rY(e):null,s=av(e),r=P3(i,e,0,[e.props,o]),a=BL(r);if(lf(),s(),(a||e.sp)&&!nh(e)&&UL(e),a){if(r.then(v9,v9),t)return r.then(l=>{SI(e,l,t)}).catch(l=>{sv(l,e,0)});e.asyncDep=r}else SI(e,r,t)}else sY(e,t)}function SI(e,t,n){mi(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ao(t)&&(e.setupState=hQ(t)),sY(e,n)}let n6,_I;function Rsn(e){n6=e,_I=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,z1e))}}const Psn=()=>!n6;function sY(e,t,n){const i=e.type;if(!e.render){if(!t&&n6&&!i.render){const o=i.template||JL(e).template;if(o){const{isCustomElement:s,compilerOptions:r}=e.appContext.config,{delimiters:a,compilerOptions:l}=i,c=Bo(Bo({isCustomElement:s,delimiters:a},r),l);i.render=n6(o,c)}}e.render=i.render||gu,_I&&_I(e)}{const o=av(e);af();try{j1e(e)}finally{lf(),o()}}}const wpe={get(e,t){return za(e,"get",""),e[t]}};function rY(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,wpe),slots:e.slots,emit:e.emit,expose:t}}function F3(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(hQ(it(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in f4)return f4[n](e)},has(t,n){return n in t||n in f4}})):e.proxy}function II(e,t=!0){return mi(e)?e.displayName||e.name:e.name||t&&e.__name}function Cpe(e){return mi(e)&&"__vccOpts"in e}const R=(e,t)=>n1e(e,t,sm);function Gn(e,t,n){try{Xk(-1);const i=arguments.length;return i===2?Ao(t)&&!Yn(t)?K1(t)?V(e,null,[t]):V(e,t):V(e,null,t):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&K1(n)&&(n=[n]),V(e,t,n))}finally{Xk(1)}}function $sn(){}function Osn(e,t,n,i){const o=n[i];if(o&&Ape(o,e))return o;const s=t();return s.memo=e.slice(),s.cacheIndex=i,n[i]=s}function Ape(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let i=0;i0&&ja&&ja.push(e),!0}const xpe="3.5.39",Fsn=gu,Dsn=a1e,Nsn=wg,Bsn=bQ,Spe={createComponentInstance:nY,setupComponent:oY,renderComponentRoot:R8,setCurrentRenderingInstance:h9,isVNode:K1,normalizeVNode:Dl,getComponentPublicInstance:F3,ensureValidVNode:YL,pushWarningContext:s1e,popWarningContext:r1e},zsn=Spe,Hsn=null,jsn=null,Wsn=null;/** +* @vue/runtime-dom v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let TI;const $D=typeof window<"u"&&window.trustedTypes;if($D)try{TI=$D.createPolicy("vue",{createHTML:e=>e})}catch{}const aY=TI?e=>TI.createHTML(e):e=>e,_pe="http://www.w3.org/2000/svg",Ipe="http://www.w3.org/1998/Math/MathML",Pf=typeof document<"u"?document:null,OD=Pf&&Pf.createElement("template"),Tpe={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,i)=>{const o=t==="svg"?Pf.createElementNS(_pe,e):t==="mathml"?Pf.createElementNS(Ipe,e):n?Pf.createElement(e,{is:n}):Pf.createElement(e);return e==="select"&&i&&i.multiple!=null&&o.setAttribute("multiple",i.multiple),o},createText:e=>Pf.createTextNode(e),createComment:e=>Pf.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Pf.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,i,o,s){const r=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===s||!(o=o.nextSibling)););else{OD.innerHTML=aY(i==="svg"?`${e}`:i==="mathml"?`${e}`:e);const a=OD.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},jh="transition",ny="animation",I2=Symbol("_vtc"),lY={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},cY=Bo({},xQ,lY),Mpe=e=>(e.displayName="Transition",e.props=cY,e),Co=Mpe((e,{slots:t})=>Gn(b1e,uY(e),t)),Kp=(e,t=[])=>{Yn(e)?e.forEach(n=>n(...t)):e&&e(...t)},FD=e=>e?Yn(e)?e.some(t=>t.length>1):e.length>1:!1;function uY(e){const t={};for(const P in e)P in lY||(t[P]=e[P]);if(e.css===!1)return t;const{name:n="v",type:i,duration:o,enterFromClass:s=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:c=r,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,m=Epe(o),g=m&&m[0],y=m&&m[1],{onBeforeEnter:v,onEnter:k,onEnterCancelled:w,onLeave:C,onLeaveCancelled:x,onBeforeAppear:S=v,onAppear:M=k,onAppearCancelled:_=w}=t,T=(P,N,U,F)=>{P._enterCancelled=F,Yh(P,N?u:a),Yh(P,N?c:r),U&&U()},E=(P,N)=>{P._isLeaving=!1,Yh(P,d),Yh(P,h),Yh(P,f),N&&N()},L=P=>(N,U)=>{const F=P?M:k,B=()=>T(N,P,U);Kp(F,[N,B]),DD(()=>{Yh(N,P?l:s),Fd(N,P?u:a),FD(F)||ND(N,i,g,B)})};return Bo(t,{onBeforeEnter(P){Kp(v,[P]),Fd(P,s),Fd(P,r)},onBeforeAppear(P){Kp(S,[P]),Fd(P,l),Fd(P,c)},onEnter:L(!1),onAppear:L(!0),onLeave(P,N){P._isLeaving=!0;const U=()=>E(P,N);Fd(P,d),P._enterCancelled?(Fd(P,f),MI(P)):(MI(P),Fd(P,f)),DD(()=>{P._isLeaving&&(Yh(P,d),Fd(P,h),FD(C)||ND(P,i,y,U))}),Kp(C,[P,U])},onEnterCancelled(P){T(P,!1,void 0,!0),Kp(w,[P])},onAppearCancelled(P){T(P,!0,void 0,!0),Kp(_,[P])},onLeaveCancelled(P){E(P),Kp(x,[P])}})}function Epe(e){if(e==null)return null;if(Ao(e))return[sx(e.enter),sx(e.leave)];{const t=sx(e);return[t,t]}}function sx(e){return Hk(e)}function Fd(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[I2]||(e[I2]=new Set)).add(t)}function Yh(e,t){t.split(/\s+/).forEach(i=>i&&e.classList.remove(i));const n=e[I2];n&&(n.delete(t),n.size||(e[I2]=void 0))}function DD(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Lpe=0;function ND(e,t,n,i){const o=e._endId=++Lpe,s=()=>{o===e._endId&&i()};if(n!=null)return setTimeout(s,n);const{type:r,timeout:a,propCount:l}=dY(e,t);if(!r)return i();const c=r+"end";let u=0;const d=()=>{e.removeEventListener(c,f),s()},f=h=>{h.target===e&&++u>=l&&d()};setTimeout(()=>{u(n[m]||"").split(", "),o=i(`${jh}Delay`),s=i(`${jh}Duration`),r=BD(o,s),a=i(`${ny}Delay`),l=i(`${ny}Duration`),c=BD(a,l);let u=null,d=0,f=0;t===jh?r>0&&(u=jh,d=r,f=s.length):t===ny?c>0&&(u=ny,d=c,f=l.length):(d=Math.max(r,c),u=d>0?r>c?jh:ny:null,f=u?u===jh?s.length:l.length:0);const h=u===jh&&/\b(?:transform|all)(?:,|$)/.test(i(`${jh}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:h}}function BD(e,t){for(;e.lengthzD(n)+zD(e[i])))}function zD(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function MI(e){return(e?e.ownerDocument:document).body.offsetHeight}function Rpe(e,t,n){const i=e[I2];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const i6=Symbol("_vod"),nR=Symbol("_vsh"),Js={name:"show",beforeMount(e,{value:t},{transition:n}){e[i6]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):iy(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:i}){!t!=!n&&(i?t?(i.beforeEnter(e),iy(e,!0),i.enter(e)):i.leave(e,()=>{iy(e,!1)}):iy(e,t))},beforeUnmount(e,{value:t}){iy(e,t)}};function iy(e,t){e.style.display=t?e[i6]:"none",e[nR]=!t}function Ppe(){Js.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const fY=Symbol("");function qsn(e){const t=Dr();if(!t)return;const n=t.ut=(o=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(s=>o6(s,o))},i=()=>{const o=e(t.proxy);t.ce?o6(t.ce,o):EI(t.subTree,o),n(o)};MQ(()=>{Uk(i)}),Pn(()=>{Fe(i,gu,{flush:"post"});const o=new MutationObserver(i);o.observe(t.subTree.el.parentNode,{childList:!0}),Xn(()=>o.disconnect())})}function EI(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{EI(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)o6(e.el,t);else if(e.type===_e)e.children.forEach(n=>EI(n,t));else if(e.type===r2){let{el:n,anchor:i}=e;for(;n&&(o6(n,t),n!==i);)n=n.nextSibling}}function o6(e,t){if(e.nodeType===1){const n=e.style;let i="";for(const o in t){const s=Ihe(t[o]);n.setProperty(`--${o}`,s),i+=`--${o}: ${s};`}n[fY]=i}}const $pe=/(?:^|;)\s*display\s*:/;function Ope(e,t,n){const i=e.style,o=qo(n);let s=!1;if(n&&!o){if(t)if(qo(t))for(const r of t.split(";")){const a=r.slice(0,r.indexOf(":")).trim();n[a]==null&&Ny(i,a,"")}else for(const r in t)n[r]==null&&Ny(i,r,"");for(const r in n){r==="display"&&(s=!0);const a=n[r];a!=null?Dpe(e,r,!qo(t)&&t?t[r]:void 0,a)||Ny(i,r,a):Ny(i,r,"")}}else if(o){if(t!==n){const r=i[fY];r&&(n+=";"+r),i.cssText=n,s=$pe.test(n)}}else t&&e.removeAttribute("style");i6 in e&&(e[i6]=s?i.display:"",e[nR]&&(i.display="none"))}const HD=/\s*!important$/;function Ny(e,t,n){if(Yn(n))n.forEach(i=>Ny(e,t,i));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const i=Fpe(e,t);HD.test(n)?e.setProperty(Bl(i),n.replace(HD,""),"important"):e[i]=n}}const jD=["Webkit","Moz","ms"],rx={};function Fpe(e,t){const n=rx[t];if(n)return n;let i=Gr(t);if(i!=="filter"&&i in e)return rx[t]=i;i=S7(i);for(let o=0;oax||(Wpe.then(()=>ax=0),ax=Date.now());function Vpe(e,t){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;const o=n.value;if(Yn(o)){const s=i.stopImmediatePropagation;i.stopImmediatePropagation=()=>{s.call(i),i._stopped=!0};const r=o.slice(),a=[i];for(let l=0;le.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Upe=(e,t,n,i,o,s)=>{const r=o==="svg";t==="class"?Rpe(e,i,r):t==="style"?Ope(e,n,i):L3(t)?w7(t)||Bpe(e,t,n,i,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Kpe(e,t,i,r))?(VD(e,t,i),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&qD(e,t,i,r,s,t!=="value")):e._isVueCE&&(Zpe(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!qo(i)))?VD(e,Gr(t),i,s,t):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),qD(e,t,i,r))};function Kpe(e,t,n,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&KD(t)&&mi(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return KD(t)&&qo(n)?!1:t in e}function Zpe(e,t){const n=e._def.props;if(!n)return!1;const i=Gr(t);return Array.isArray(n)?n.some(o=>Gr(o)===i):Object.keys(n).some(o=>Gr(o)===i)}const ZD={};function Gpe(e,t,n){let i=Xe(e,t);C7(i)&&(i=Bo({},i,t));class o extends iR{constructor(r){super(i,r,n)}}return o.def=i,o}const Vsn=((e,t)=>Gpe(e,t,d0e)),Qpe=typeof HTMLElement<"u"?HTMLElement:class{};class iR extends Qpe{constructor(t,n={},i=a6){super(),this._def=t,this._props=n,this._createApp=i,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&i!==a6?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(Bo({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.assignedSlot||t.parentNode||t.host);)if(t instanceof iR){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,bt(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const n of t)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let i=0;i{this._resolved=!0,this._pendingResolve=void 0;const{props:s,styles:r}=i;let a;if(s&&!Yn(s))for(const l in s){const c=s[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=Hk(this._props[l])),(a||(a=Object.create(null)))[Gr(l)]=!0)}this._numberProps=a,this._resolveProps(i),this.shadowRoot&&this._applyStyles(r),this._mount(i)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(i=>{i.configureApp=this._def.configureApp,t(this._def=i,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const i in n)ko(this,i)||Object.defineProperty(this,i,{get:()=>p(n[i])})}_resolveProps(t){const{props:n}=t,i=Yn(n)?n:Object.keys(n||{});for(const o of Object.keys(this))o[0]!=="_"&&i.includes(o)&&this._setProp(o,this[o]);for(const o of i.map(Gr))Object.defineProperty(this,o,{get(){return this._getProp(o)},set(s){this._setProp(o,s,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let i=n?this.getAttribute(t):ZD;const o=Gr(t);n&&this._numberProps&&this._numberProps[o]&&(i=Hk(i)),this._setProp(o,i,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,i=!0,o=!1){if(n!==this._props[t]&&(this._dirty=!0,n===ZD?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),o&&this._instance&&this._update(),i)){const s=this._ob;s&&(this._processMutations(s.takeRecords()),s.disconnect()),n===!0?this.setAttribute(Bl(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Bl(t),n+""):n||this.removeAttribute(Bl(t)),s&&s.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),u0e(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=V(this._def,Bo(t,this._props));return this._instance||(n.ce=i=>{this._instance=i,i.ce=this,i.isCE=!0;const o=(s,r)=>{this.dispatchEvent(new CustomEvent(s,C7(r[0])?Bo({detail:r},r[0]):{detail:r}))};i.emit=(s,...r)=>{o(s,r),Bl(s)!==s&&o(Bl(s),r)},this._setParent()}),n}_applyStyles(t,n,i){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const o=this._nonce,s=this.shadowRoot,r=i?this._getStyleAnchor(i)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(s);let a=null;for(let l=t.length-1;l>=0;l--){const c=document.createElement("style");o&&c.setAttribute("nonce",o),c.textContent=t[l],s.insertBefore(c,a||r),a=c,l===0&&(i||this._styleAnchors.set(this._def,c),n&&this._styleAnchors.set(n,c))}}_getStyleAnchor(t){if(!t)return null;const n=this._styleAnchors.get(t);return n&&n.parentNode===this.shadowRoot?n:(n&&this._styleAnchors.delete(t),null)}_getRootStyleInsertionAnchor(t){for(let n=0;n(delete e.props.mode,e),Xpe=Jpe({name:"TransitionGroup",props:Bo({},cY,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Dr(),i=AQ();let o,s;return rv(()=>{if(!o.length)return;const r=e.moveClass||`${e.name||"v"}-move`;if(!i0e(o[0].el,n.vnode.el,r)){o=[];return}o.forEach(e0e),o.forEach(t0e);const a=o.filter(n0e);MI(n.vnode.el),a.forEach(l=>{const c=l.el,u=c.style;Fd(c,r),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[s6]=f=>{f&&f.target!==c||(!f||f.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[s6]=null,Yh(c,r))};c.addEventListener("transitionend",d)}),o=[]}),()=>{const r=Hi(e),a=uY(r);let l=r.tag||_e;if(o=[],s)for(let c=0;c{a.split(/\s+/).forEach(l=>l&&i.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&i.classList.add(a)),i.style.display="none";const s=t.nodeType===1?t:t.parentNode;s.appendChild(i);const{hasTransform:r}=dY(i);return s.removeChild(i),r}const Z1=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Yn(t)?n=>n2(t,n):t};function o0e(e){e.target.composing=!0}function QD(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const vu=Symbol("_assign");function YD(e,t,n){return t&&(e=e.trim()),n&&(e=_7(e)),e}const Va={created(e,{modifiers:{lazy:t,trim:n,number:i}},o){e[vu]=Z1(o);const s=i||o.props&&o.props.type==="number";qf(e,t?"change":"input",r=>{r.target.composing||e[vu](YD(e.value,n,s))}),(n||s)&&qf(e,"change",()=>{e.value=YD(e.value,n,s)}),t||(qf(e,"compositionstart",o0e),qf(e,"compositionend",QD),qf(e,"change",QD))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:i,trim:o,number:s}},r){if(e[vu]=Z1(r),e.composing)return;const a=(s||e.type==="number")&&!/^0\d/.test(e.value)?_7(e.value):e.value,l=t??"";if(a===l)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(i&&t===n||o&&e.value.trim()===l)||(e.value=l)}},r6={deep:!0,created(e,t,n){e[vu]=Z1(n),qf(e,"change",()=>{const i=e._modelValue,o=T2(e),s=e.checked,r=e[vu];if(Yn(i)){const a=T7(i,o),l=a!==-1;if(s&&!l)r(i.concat(o));else if(!s&&l){const c=[...i];c.splice(a,1),r(c)}}else if(xm(i)){const a=new Set(i);s?a.add(o):a.delete(o),r(a)}else r(vY(e,s))})},mounted:JD,beforeUpdate(e,t,n){e[vu]=Z1(n),JD(e,t,n)}};function JD(e,{value:t,oldValue:n},i){e._modelValue=t;let o;if(Yn(t))o=T7(t,i.props.value)>-1;else if(xm(t))o=t.has(i.props.value);else{if(t===n)return;o=uh(t,vY(e,!0))}e.checked!==o&&(e.checked=o)}const gY={created(e,{value:t},n){e.checked=uh(t,n.props.value),e[vu]=Z1(n),qf(e,"change",()=>{e[vu](T2(e))})},beforeUpdate(e,{value:t,oldValue:n},i){e[vu]=Z1(i),t!==n&&(e.checked=uh(t,i.props.value))}},LI={deep:!0,created(e,{value:t,modifiers:{number:n}},i){const o=xm(t);qf(e,"change",()=>{const s=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?_7(T2(r)):T2(r));e[vu](e.multiple?o?new Set(s):s:s[0]),e._assigning=!0,bt(()=>{e._assigning=!1})}),e[vu]=Z1(i)},mounted(e,{value:t}){XD(e,t)},beforeUpdate(e,t,n){e[vu]=Z1(n)},updated(e,{value:t}){e._assigning||XD(e,t)}};function XD(e,t){const n=e.multiple,i=Yn(t);if(!(n&&!i&&!xm(t))){for(let o=0,s=e.options.length;oString(c)===String(a)):r.selected=T7(t,a)>-1}else r.selected=t.has(a);else if(uh(T2(r),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function T2(e){return"_value"in e?e._value:e.value}function vY(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const s0e={created(e,t,n){l5(e,t,n,null,"created")},mounted(e,t,n){l5(e,t,n,null,"mounted")},beforeUpdate(e,t,n,i){l5(e,t,n,i,"beforeUpdate")},updated(e,t,n,i){l5(e,t,n,i,"updated")}};function yY(e,t){switch(e){case"SELECT":return LI;case"TEXTAREA":return Va;default:switch(t){case"checkbox":return r6;case"radio":return gY;default:return Va}}}function l5(e,t,n,i,o){const r=yY(e.tagName,n.props&&n.props.type)[o];r&&r(e,t,n,i)}function r0e(){Va.getSSRProps=({value:e})=>({value:e}),gY.getSSRProps=({value:e},t)=>{if(t.props&&uh(t.props.value,e))return{checked:!0}},r6.getSSRProps=({value:e},t)=>{if(Yn(e)){if(t.props&&T7(e,t.props.value)>-1)return{checked:!0}}else if(xm(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},s0e.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=yY(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const a0e=["ctrl","shift","alt","meta"],l0e={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>a0e.some(n=>e[`${n}Key`]&&!t.includes(n))},Ot=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),i=t.join(".");return n[i]||(n[i]=((o,...s)=>{for(let r=0;r{const n=e._withKeys||(e._withKeys={}),i=t.join(".");return n[i]||(n[i]=(o=>{if(!("key"in o))return;const s=Bl(o.key);if(t.some(r=>r===s||c0e[r]===s))return e(o)}))},bY=Bo({patchProp:Upe},Tpe);let p4,eN=!1;function kY(){return p4||(p4=lpe(bY))}function wY(){return p4=eN?p4:cpe(bY),eN=!0,p4}const u0e=((...e)=>{kY().render(...e)}),Zsn=((...e)=>{wY().hydrate(...e)}),a6=((...e)=>{const t=kY().createApp(...e),{mount:n}=t;return t.mount=i=>{const o=AY(i);if(!o)return;const s=t._component;!mi(s)&&!s.render&&!s.template&&(s.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const r=n(o,!1,CY(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),r},t}),d0e=((...e)=>{const t=wY().createApp(...e),{mount:n}=t;return t.mount=i=>{const o=AY(i);if(o)return n(o,!0,CY(o))},t});function CY(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function AY(e){return qo(e)?document.querySelector(e):e}let tN=!1;const Gsn=()=>{tN||(tN=!0,r0e(),Ppe())},xY=Symbol("IconResolver"),f0e={sm:14,md:16,lg:20},ve=Xe({__name:"Icon",props:{name:{},size:{default:"md"},label:{}},setup(e){const t=e,n=Zt(xY,()=>{}),i=R(()=>n(t.name)),o=R(()=>f0e[t.size]);return(s,r)=>i.value?(b(),oe(Ds(i.value),{key:0,class:"kw-icon",width:o.value,height:o.value,"aria-label":e.label,"aria-hidden":e.label?void 0:!0},null,8,["width","height","aria-label","aria-hidden"])):X("",!0)}}),h0e=["disabled"],p0e={key:0,class:"ui-action-card__leading"},m0e={class:"ui-action-card__text"},g0e={class:"ui-action-card__title"},v0e={key:0,class:"ui-action-card__hint"},y0e=Xe({__name:"ActionCard",props:{disabled:{type:Boolean,default:!1}},emits:["select"],setup(e){return(t,n)=>(b(),I("button",{class:"ui-action-card",type:"button",disabled:e.disabled,onClick:n[0]||(n[0]=i=>t.$emit("select"))},[t.$slots.leading?(b(),I("span",p0e,[si(t.$slots,"leading",{},void 0,!0)])):X("",!0),A("span",m0e,[A("span",g0e,[si(t.$slots,"default",{},void 0,!0),si(t.$slots,"badge",{},void 0,!0)]),t.$slots.hint?(b(),I("span",v0e,[si(t.$slots,"hint",{},void 0,!0)])):X("",!0)]),V(ve,{name:"chevron-right",size:"lg",class:"ui-action-card__chevron"})],8,h0e))}}),kt=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},RI=kt(y0e,[["__scopeId","data-v-e52e7748"]]);/*! + * shared v11.4.6 + * (c) 2026 kazuya kawaguchi + * Released under the MIT License. + */function b0e(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const l6=typeof window<"u",hp=(e,t=!1)=>t?Symbol.for(e):Symbol(e),k0e=(e,t,n)=>w0e({l:e,k:t,s:n}),w0e=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),$r=e=>typeof e=="number"&&isFinite(e),SY=e=>rR(e)==="[object Date]",M2=e=>rR(e)==="[object RegExp]",N7=e=>to(e)&&Object.keys(e).length===0,Or=Object.assign,C0e=Object.create,Wo=(e=null)=>C0e(e);let nN;const C0=()=>nN||(nN=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Wo());function iN(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function A0e(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}const x0e=/^\s*javascript\s*(?::|�*58;?|�*3a;?|:?)/i,S0e=/^(?:href|src|action|formaction)$/i;function sR(e){return x0e.test(e)}function _0e(e){const t=/url\s*\(/gi;let n="",i=0,o;for(;(o=t.exec(e))!==null;){const s=o.index,r=t.lastIndex-1;let a=r+1,l=1,c=null;for(;a`${i}="${oN(i,o)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(n,i,o)=>`${i}='${oN(i,o)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3")),e=e.replace(/(\s+(?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi,(n,i,o)=>sR(o)?`${i}about:blank`:n),e}const T0e=Object.prototype.hasOwnProperty;function cu(e,t){return T0e.call(e,t)}const Xs=Array.isArray,Ss=e=>typeof e=="function",Hn=e=>typeof e=="string",ho=e=>typeof e=="boolean",po=e=>e!==null&&typeof e=="object",M0e=e=>po(e)&&Ss(e.then)&&Ss(e.catch),_Y=Object.prototype.toString,rR=e=>_Y.call(e),to=e=>rR(e)==="[object Object]",E0e=e=>e==null?"":Xs(e)||to(e)&&e.toString===_Y?JSON.stringify(e,null,2):String(e);function aR(e,t=""){return e.reduce((n,i,o)=>o===0?n+i:n+t+i,"")}const c5=e=>!po(e)||Xs(e);function $8(e,t){if(c5(e)||c5(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:i,des:o}=n.pop();Object.keys(i).forEach(s=>{s!=="__proto__"&&(po(i[s])&&!po(o[s])&&(o[s]=Array.isArray(i[s])?[]:Wo()),c5(o[s])||c5(i[s])?o[s]=i[s]:n.push({src:i[s],des:o[s]}))})}}/*! + * message-compiler v11.4.6 + * (c) 2026 kazuya kawaguchi + * Released under the MIT License. + */function L0e(e,t,n){return{line:e,column:t,offset:n}}function PI(e,t,n){return{start:e,end:t}}const So={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},R0e=17;function B7(e,t,n={}){const{domain:i,messages:o,args:s}=n,r=e,a=new SyntaxError(String(r));return a.code=e,t&&(a.location=t),a.domain=i,a}function P0e(e){throw e}const Rd=" ",$0e="\r",Na=` +`,O0e="\u2028",F0e="\u2029";function D0e(e){const t=e;let n=0,i=1,o=1,s=0;const r=M=>t[M]===$0e&&t[M+1]===Na,a=M=>t[M]===Na,l=M=>t[M]===F0e,c=M=>t[M]===O0e,u=M=>r(M)||a(M)||l(M)||c(M),d=()=>n,f=()=>i,h=()=>o,m=()=>s,g=M=>r(M)||l(M)||c(M)?Na:t[M],y=()=>g(n),v=()=>g(n+s);function k(){return s=0,u(n)&&(i++,o=0),r(n)&&n++,n++,o++,t[n]}function w(){return r(n+s)&&s++,s++,t[n+s]}function C(){n=0,i=1,o=1,s=0}function x(M=0){s=M}function S(){const M=n+s;for(;M!==n;)k();s=0}return{index:d,line:f,column:h,peekOffset:m,charAt:g,currentChar:y,currentPeek:v,next:k,peek:w,reset:C,resetPeek:x,skipToPeek:S}}const _f=void 0,N0e=".",sN="'",B0e="tokenizer";function z0e(e,t={}){const n=t.location!==!1,i=D0e(e),o=()=>i.index(),s=()=>L0e(i.line(),i.column(),i.index()),r=s(),a=o(),l={currentType:13,offset:a,startLoc:r,endLoc:r,lastType:13,lastOffset:a,lastStartLoc:r,lastEndLoc:r,braceNest:0,inLinked:!1,text:""},c=()=>l,{onError:u}=t;function d(le,ke,ne,...ce){const be=c();if(ke.column+=ne,ke.offset+=ne,u){const xe=n?PI(be.startLoc,ke):null,de=B7(le,xe,{domain:B0e,args:ce});u(de)}}function f(le,ke,ne){le.endLoc=s(),le.currentType=ke;const ce={type:ke};return n&&(ce.loc=PI(le.startLoc,le.endLoc)),ne!=null&&(ce.value=ne),ce}const h=le=>f(le,13);function m(le,ke){return le.currentChar()===ke?(le.next(),ke):(d(So.EXPECTED_TOKEN,s(),0,ke),"")}function g(le){let ke="";for(;le.currentPeek()===Rd||le.currentPeek()===Na;)ke+=le.currentPeek(),le.peek();return ke}function y(le){const ke=g(le);return le.skipToPeek(),ke}function v(le){if(le===_f)return!1;const ke=le.charCodeAt(0);return ke>=97&&ke<=122||ke>=65&&ke<=90||ke===95}function k(le){if(le===_f)return!1;const ke=le.charCodeAt(0);return ke>=48&&ke<=57}function w(le,ke){const{currentType:ne}=ke;if(ne!==2)return!1;g(le);const ce=v(le.currentPeek());return le.resetPeek(),ce}function C(le,ke){const{currentType:ne}=ke;if(ne!==2)return!1;g(le);const ce=le.currentPeek()==="-"?le.peek():le.currentPeek(),be=k(ce);return le.resetPeek(),be}function x(le,ke){const{currentType:ne}=ke;if(ne!==2)return!1;g(le);const ce=le.currentPeek()===sN;return le.resetPeek(),ce}function S(le,ke){const{currentType:ne}=ke;if(ne!==7)return!1;g(le);const ce=le.currentPeek()===".";return le.resetPeek(),ce}function M(le,ke){const{currentType:ne}=ke;if(ne!==8)return!1;g(le);const ce=v(le.currentPeek());return le.resetPeek(),ce}function _(le,ke){const{currentType:ne}=ke;if(!(ne===7||ne===11))return!1;g(le);const ce=le.currentPeek()===":";return le.resetPeek(),ce}function T(le,ke){const{currentType:ne}=ke;if(ne!==9)return!1;const ce=()=>{const xe=le.currentPeek();return xe==="{"?v(le.peek()):xe==="@"||xe==="|"||xe===":"||xe==="."||xe===Rd||!xe?!1:xe===Na?(le.peek(),ce()):L(le,!1)},be=ce();return le.resetPeek(),be}function E(le){g(le);const ke=le.currentPeek()==="|";return le.resetPeek(),ke}function L(le,ke=!0){const ne=(be=!1,xe="")=>{const de=le.currentPeek();return de==="{"||de==="@"||!de?be:de==="|"?!(xe===Rd||xe===Na):de===Rd?(le.peek(),ne(!0,Rd)):de===Na?(le.peek(),ne(!0,Na)):!0},ce=ne();return ke&&le.resetPeek(),ce}function P(le,ke){const ne=le.currentChar();return ne===_f?_f:ke(ne)?(le.next(),ne):null}function N(le){const ke=le.charCodeAt(0);return ke>=97&&ke<=122||ke>=65&&ke<=90||ke>=48&&ke<=57||ke===95||ke===36}function U(le){return P(le,N)}function F(le){const ke=le.charCodeAt(0);return ke>=97&&ke<=122||ke>=65&&ke<=90||ke>=48&&ke<=57||ke===95||ke===36||ke===45}function B(le){return P(le,F)}function W(le){const ke=le.charCodeAt(0);return ke>=48&&ke<=57}function D(le){return P(le,W)}function z(le){const ke=le.charCodeAt(0);return ke>=48&&ke<=57||ke>=65&&ke<=70||ke>=97&&ke<=102}function $(le){return P(le,z)}function j(le){let ke="",ne="";for(;ke=D(le);)ne+=ke;return ne}function G(le){let ke="";for(;;){const ne=le.currentChar();if(ne==="\\"){const ce=le.peek();ce==="{"||ce==="}"||ce==="@"||ce==="|"||ce==="\\"?(ke+=ne+ce,le.next(),le.next()):(le.resetPeek(),ke+=ne,le.next())}else{if(ne==="{"||ne==="}"||ne==="@"||ne==="|"||!ne)break;if(ne===Rd||ne===Na)if(L(le))ke+=ne,le.next();else{if(E(le))break;ke+=ne,le.next()}else ke+=ne,le.next()}}return ke}function K(le){y(le);let ke="",ne="";for(;ke=B(le);)ne+=ke;const ce=le.currentChar();if(ce&&ce!=="}"&&ce!==_f&&ce!==Rd&&ce!==Na&&ce!==" "){const be=Me(le);return d(So.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,ne+be),ne+be}return le.currentChar()===_f&&d(So.UNTERMINATED_CLOSING_BRACE,s(),0),ne}function te(le){y(le);let ke="";return le.currentChar()==="-"?(le.next(),ke+=`-${j(le)}`):ke+=j(le),le.currentChar()===_f&&d(So.UNTERMINATED_CLOSING_BRACE,s(),0),ke}function J(le){return le!==sN&&le!==Na}function q(le){y(le),m(le,"'");let ke="",ne="";for(;ke=P(le,J);)ke==="\\"?ne+=Y(le):ne+=ke;const ce=le.currentChar();return ce===Na||ce===_f?(d(So.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),ce===Na&&(le.next(),m(le,"'")),ne):(m(le,"'"),ne)}function Y(le){const ke=le.currentChar();switch(ke){case"\\":case"'":return le.next(),`\\${ke}`;case"u":return ae(le,ke,4);case"U":return ae(le,ke,6);default:return d(So.UNKNOWN_ESCAPE_SEQUENCE,s(),0,ke),""}}function ae(le,ke,ne){m(le,ke);let ce="";for(let be=0;be{const ce=le.currentChar();return ce==="{"||ce==="@"||ce==="|"||ce==="("||ce===")"||!ce||ce===Rd?ne:(ne+=ce,le.next(),ke(ne))};return ke("")}function Q(le){y(le);const ke=m(le,"|");return y(le),ke}function ee(le,ke){let ne=null;switch(le.currentChar()){case"{":return ke.braceNest>=1&&d(So.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),le.next(),ne=f(ke,2,"{"),y(le),ke.braceNest++,ne;case"}":return ke.braceNest>0&&ke.currentType===2&&d(So.EMPTY_PLACEHOLDER,s(),0),le.next(),ne=f(ke,3,"}"),ke.braceNest--,ke.braceNest>0&&y(le),ke.inLinked&&ke.braceNest===0&&(ke.inLinked=!1),ne;case"@":return ke.braceNest>0&&d(So.UNTERMINATED_CLOSING_BRACE,s(),0),ne=he(le,ke)||h(ke),ke.braceNest=0,ne;default:{let be=!0,xe=!0,de=!0;if(E(le))return ke.braceNest>0&&d(So.UNTERMINATED_CLOSING_BRACE,s(),0),ne=f(ke,1,Q(le)),ke.braceNest=0,ke.inLinked=!1,ne;if(ke.braceNest>0&&(ke.currentType===4||ke.currentType===5||ke.currentType===6))return d(So.UNTERMINATED_CLOSING_BRACE,s(),0),ke.braceNest=0,Re(le,ke);if(be=w(le,ke))return ne=f(ke,4,K(le)),y(le),ne;if(xe=C(le,ke))return ne=f(ke,5,te(le)),y(le),ne;if(de=x(le,ke))return ne=f(ke,6,q(le)),y(le),ne;if(!be&&!xe&&!de)return ne=f(ke,12,Me(le)),d(So.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,ne.value),y(le),ne;break}}return ne}function he(le,ke){const{currentType:ne}=ke;let ce=null;const be=le.currentChar();switch((ne===7||ne===8||ne===11||ne===9)&&(be===Na||be===Rd)&&d(So.INVALID_LINKED_FORMAT,s(),0),be){case"@":return le.next(),ce=f(ke,7,"@"),ke.inLinked=!0,ce;case".":return y(le),le.next(),f(ke,8,".");case":":return y(le),le.next(),f(ke,9,":");default:return E(le)?(ce=f(ke,1,Q(le)),ke.braceNest=0,ke.inLinked=!1,ce):S(le,ke)||_(le,ke)?(y(le),he(le,ke)):M(le,ke)?(y(le),f(ke,11,fe(le))):T(le,ke)?(y(le),be==="{"?ee(le,ke)||ce:f(ke,10,se(le))):(ne===7&&d(So.INVALID_LINKED_FORMAT,s(),0),ke.braceNest=0,ke.inLinked=!1,Re(le,ke))}}function Re(le,ke){let ne={type:13};if(ke.braceNest>0)return ee(le,ke)||h(ke);if(ke.inLinked)return he(le,ke)||h(ke);switch(le.currentChar()){case"{":return ee(le,ke)||h(ke);case"}":return d(So.UNBALANCED_CLOSING_BRACE,s(),0),le.next(),f(ke,3,"}");case"@":return he(le,ke)||h(ke);default:{if(E(le))return ne=f(ke,1,Q(le)),ke.braceNest=0,ke.inLinked=!1,ne;if(L(le))return f(ke,0,G(le));break}}return ne}function Pe(){const{currentType:le,offset:ke,startLoc:ne,endLoc:ce}=l;return l.lastType=le,l.lastOffset=ke,l.lastStartLoc=ne,l.lastEndLoc=ce,l.offset=o(),l.startLoc=s(),i.currentChar()===_f?f(l,13):Re(i,l)}return{nextToken:Pe,currentOffset:o,currentPosition:s,context:c}}const H0e="parser",j0e=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,W0e=/\\([\\@{}|])/g;function q0e(e,t){return t}function V0e(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const i=parseInt(t||n,16);return i<=55295||i>=57344?String.fromCodePoint(i):"�"}}}function U0e(e={}){const t=e.location!==!1,{onError:n}=e;function i(v,k,w,C,...x){const S=v.currentPosition();if(S.offset+=C,S.column+=C,n){const M=t?PI(w,S):null,_=B7(k,M,{domain:H0e,args:x});n(_)}}function o(v,k,w){const C={type:v};return t&&(C.start=k,C.end=k,C.loc={start:w,end:w}),C}function s(v,k,w,C){t&&(v.end=k,v.loc&&(v.loc.end=w))}function r(v,k){const w=v.context(),C=o(3,w.offset,w.startLoc);return C.value=k.replace(W0e,q0e),s(C,v.currentOffset(),v.currentPosition()),C}function a(v,k){const w=v.context(),{lastOffset:C,lastStartLoc:x}=w,S=o(5,C,x);return S.index=parseInt(k,10),v.nextToken(),s(S,v.currentOffset(),v.currentPosition()),S}function l(v,k){const w=v.context(),{lastOffset:C,lastStartLoc:x}=w,S=o(4,C,x);return S.key=k,v.nextToken(),s(S,v.currentOffset(),v.currentPosition()),S}function c(v,k){const w=v.context(),{lastOffset:C,lastStartLoc:x}=w,S=o(9,C,x);return S.value=k.replace(j0e,V0e),v.nextToken(),s(S,v.currentOffset(),v.currentPosition()),S}function u(v){const k=v.nextToken(),w=v.context(),{lastOffset:C,lastStartLoc:x}=w,S=o(8,C,x);return k.type!==11?(i(v,So.UNEXPECTED_EMPTY_LINKED_MODIFIER,w.lastStartLoc,0),S.value="",s(S,C,x),{nextConsumeToken:k,node:S}):(k.value==null&&i(v,So.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,Pd(k)),S.value=k.value||"",s(S,v.currentOffset(),v.currentPosition()),{node:S})}function d(v,k){const w=v.context(),C=o(7,w.offset,w.startLoc);return C.value=k,s(C,v.currentOffset(),v.currentPosition()),C}function f(v){const k=v.context(),w=o(6,k.offset,k.startLoc);let C=v.nextToken();if(C.type===8){const x=u(v);w.modifier=x.node,C=x.nextConsumeToken||v.nextToken()}switch(C.type!==9&&i(v,So.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Pd(C)),C=v.nextToken(),C.type===2&&(C=v.nextToken()),C.type){case 10:C.value==null&&i(v,So.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Pd(C)),w.key=d(v,C.value||"");break;case 4:C.value==null&&i(v,So.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Pd(C)),w.key=l(v,C.value||"");break;case 5:C.value==null&&i(v,So.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Pd(C)),w.key=a(v,C.value||"");break;case 6:C.value==null&&i(v,So.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Pd(C)),w.key=c(v,C.value||"");break;default:{i(v,So.UNEXPECTED_EMPTY_LINKED_KEY,k.lastStartLoc,0);const x=v.context(),S=o(7,x.offset,x.startLoc);return S.value="",s(S,x.offset,x.startLoc),w.key=S,s(w,x.offset,x.startLoc),{nextConsumeToken:C,node:w}}}return s(w,v.currentOffset(),v.currentPosition()),{node:w}}function h(v){const k=v.context(),w=k.currentType===1?v.currentOffset():k.offset,C=k.currentType===1?k.endLoc:k.startLoc,x=o(2,w,C);x.items=[];let S=null;do{const T=S||v.nextToken();switch(S=null,T.type){case 0:T.value==null&&i(v,So.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Pd(T)),x.items.push(r(v,T.value||""));break;case 5:T.value==null&&i(v,So.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Pd(T)),x.items.push(a(v,T.value||""));break;case 4:T.value==null&&i(v,So.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Pd(T)),x.items.push(l(v,T.value||""));break;case 6:T.value==null&&i(v,So.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Pd(T)),x.items.push(c(v,T.value||""));break;case 7:{const E=f(v);x.items.push(E.node),S=E.nextConsumeToken||null;break}}}while(k.currentType!==13&&k.currentType!==1);const M=k.currentType===1?k.lastOffset:v.currentOffset(),_=k.currentType===1?k.lastEndLoc:v.currentPosition();return s(x,M,_),x}function m(v,k,w,C){const x=v.context();let S=C.items.length===0;const M=o(1,k,w);M.cases=[],M.cases.push(C);do{const _=h(v);S||(S=_.items.length===0),M.cases.push(_)}while(x.currentType!==13);return S&&i(v,So.MUST_HAVE_MESSAGES_IN_PLURAL,w,0),s(M,v.currentOffset(),v.currentPosition()),M}function g(v){const k=v.context(),{offset:w,startLoc:C}=k,x=h(v);return k.currentType===13?x:m(v,w,C,x)}function y(v){const k=z0e(v,Or({},e)),w=k.context(),C=o(0,w.offset,w.startLoc);return t&&C.loc&&(C.loc.source=v),C.body=g(k),e.onCacheKey&&(C.cacheKey=e.onCacheKey(v)),w.currentType!==13&&i(k,So.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,v[w.offset]||""),s(C,k.currentOffset(),k.currentPosition()),C}return{parse:y}}function Pd(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function K0e(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:s=>(n.helpers.add(s),s)}}function rN(e,t){for(let n=0;naN(n)),e}function aN(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;nr;function l(g,y){r.code+=g}function c(g,y=!0){const v=y?i:"";l(o?v+" ".repeat(g):v)}function u(g=!0){const y=++r.indentLevel;g&&c(y)}function d(g=!0){const y=--r.indentLevel;g&&c(y)}function f(){c(r.indentLevel)}return{context:a,push:l,indent:u,deindent:d,newline:f,helper:g=>`_${g}`,needIndent:()=>r.needIndent}}function Y0e(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),E2(e,t.key),t.modifier?(e.push(", "),E2(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function J0e(e,t){const{helper:n,needIndent:i}=e;e.push(`${n("normalize")}([`),e.indent(i());const o=t.items.length;for(let s=0;s1){e.push(`${n("plural")}([`),e.indent(i());const o=t.cases.length;for(let s=0;s{const n=Hn(t.mode)?t.mode:"normal",i=Hn(t.filename)?t.filename:"message.intl";t.sourceMap;const o=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":` +`,s=t.needIndent?t.needIndent:n!=="arrow",r=e.helpers||[],a=Q0e(e,{filename:i,breakLineCode:o,needIndent:s});a.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(s),r.length>0&&(a.push(`const { ${aR(r.map(u=>`${u}: _${u}`),", ")} } = ctx`),a.newline()),a.push("return "),E2(a,e),a.deindent(s),a.push("}"),delete e.helpers;const{code:l,map:c}=a.context();return{ast:e,code:l,map:c?c.toJSON():void 0}};function nme(e,t={}){const n=Or({},t),i=!!n.jit,o=!!n.minify,s=n.optimize==null?!0:n.optimize,a=U0e(n).parse(e);return i?(s&&G0e(a),o&&Cg(a),{ast:a,code:""}):(Z0e(a,n),tme(a,n))}/*! + * core-base v11.4.6 + * (c) 2026 kazuya kawaguchi + * Released under the MIT License. + */function ime(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(C0().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(C0().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function tf(e){return po(e)&&cR(e)===0&&(cu(e,"b")||cu(e,"body"))}const IY=["b","body"];function ome(e){return pp(e,IY)}const TY=["c","cases"];function sme(e){return pp(e,TY,[])}const MY=["s","static"];function rme(e){return pp(e,MY)}const EY=["i","items"];function ame(e){return pp(e,EY,[])}const LY=["t","type"];function cR(e){return pp(e,LY)}const RY=["v","value"];function u5(e,t){const n=pp(e,RY);if(n!=null)return n;throw y9(t)}const PY=["m","modifier"];function lme(e){return pp(e,PY)}const $Y=["k","key"];function cme(e){const t=pp(e,$Y);if(t)return t;throw y9(6)}function pp(e,t,n){for(let i=0;iume(n,e)}function ume(e,t){const n=ome(t);if(n==null)throw y9(0);if(cR(n)===1){const s=sme(n);return e.plural(s.reduce((r,a)=>[...r,lN(e,a)],[]))}else return lN(e,n)}function lN(e,t){const n=rme(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const i=ame(t).reduce((o,s)=>[...o,$I(e,s)],[]);return e.normalize(i)}}function $I(e,t){const n=cR(t);switch(n){case 3:return u5(t,n);case 9:return u5(t,n);case 4:{const i=t;if(cu(i,"k")&&i.k)return e.interpolate(e.named(i.k));if(cu(i,"key")&&i.key)return e.interpolate(e.named(i.key));throw y9(n)}case 5:{const i=t;if(cu(i,"i")&&$r(i.i))return e.interpolate(e.list(i.i));if(cu(i,"index")&&$r(i.index))return e.interpolate(e.list(i.index));throw y9(n)}case 6:{const i=t,o=lme(i),s=cme(i);return e.linked($I(e,s),o?$I(e,o):void 0,e.type)}case 7:return u5(t,n);case 8:return u5(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const dme=e=>e;let d5=Wo();function fme(e,t={}){let n=!1;const i=t.onError||P0e;return t.onError=o=>{n=!0,i(o)},{...nme(e,t),detectError:n}}function hme(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Hn(e)){ho(t.warnHtmlMessage)&&t.warnHtmlMessage;const i=(t.onCacheKey||dme)(e),o=d5[i];if(o)return o;const{ast:s,detectError:r}=fme(e,{...t,location:!1,jit:!0}),a=lx(s);return r?a:d5[i]=a}else{const n=e.cacheKey;if(n){const i=d5[n];return i||(d5[n]=lx(e))}else return lx(e)}}let b9=null;function pme(e){b9=e}function mme(e,t,n){b9&&b9.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const gme=vme("function:translate");function vme(e){return t=>b9&&b9.emit(e,t)}const Uf={INVALID_ARGUMENT:R0e,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},yme=24;function Kf(e){return B7(e,null,void 0)}function uR(e,t){return t.locale!=null?cN(t.locale):cN(e.locale)}let cx;function cN(e){if(Hn(e))return e;if(Ss(e)){if(e.resolvedOnce&&cx!=null)return cx;if(e.constructor.name==="Function"){const t=e();if(M0e(t))throw Kf(Uf.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return cx=t}else throw Kf(Uf.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Kf(Uf.NOT_SUPPORT_LOCALE_TYPE)}function bme(e,t,n){return[...new Set([n,...Xs(t)?t:po(t)?Object.keys(t):Hn(t)?[t]:[n]])]}function OI(e,t,n){const i=Hn(n)?n:k9,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let s=o.__localeChainCache.get(i);if(!s){s=[];let r=[n];for(;Xs(r);)r=uN(s,r,t);const a=Xs(t)||!to(t)?t:t.default?t.default:null;r=Hn(a)?[a]:a,Xs(r)&&uN(s,r,!1),o.__localeChainCache.set(i,s)}return s}function uN(e,t,n){let i=!0;for(let o=0;o{r===void 0?r=a:r+=a},f[1]=()=>{r!==void 0&&(t.push(r),r=void 0)},f[2]=()=>{f[0](),o++},f[3]=()=>{if(o>0)o--,i=4,f[0]();else{if(o=0,r===void 0||(r=_me(r),r===!1))return!1;f[1]()}};function h(){const m=e[n+1];if(i===5&&m==="'"||i===6&&m==='"')return n++,a="\\"+m,f[0](),!0}for(;i!==null;)if(n++,s=e[n],!(s==="\\"&&h())){if(l=Sme(s),d=mp[i],c=d[l]||d.l||8,c===8||(i=c[0],c[1]!==void 0&&(u=f[c[1]],u&&(a=s,u()===!1))))return;if(i===7)return t}}const dN=new Map;function Tme(e,t){return po(e)?e[t]:null}function Mme(e,t){if(!po(e))return null;let n=dN.get(t);if(n||(n=Ime(t),n&&dN.set(t,n)),!n)return null;const i=n.length;let o=e,s=0;for(;s`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function Lme(){return{upper:(e,t)=>t==="text"&&Hn(e)?e.toUpperCase():t==="vnode"&&po(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Hn(e)?e.toLowerCase():t==="vnode"&&po(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Hn(e)?fN(e):t==="vnode"&&po(e)&&"__v_isVNode"in e?fN(e.children):e}}let FY;function Rme(e){FY=e}let DY;function Pme(e){DY=e}let NY;function $me(e){NY=e}let BY=null;const Ome=e=>{BY=e},Fme=()=>BY;let zY=null;const hN=e=>{zY=e},Dme=()=>zY;let pN=0;function Nme(e={}){const t=Ss(e.onWarn)?e.onWarn:b0e,n=Hn(e.version)?e.version:Eme,i=Hn(e.locale)||Ss(e.locale)?e.locale:k9,o=Ss(i)?k9:i,s=Xs(e.fallbackLocale)||to(e.fallbackLocale)||Hn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:o,r=to(e.messages)?e.messages:ux(o),a=to(e.datetimeFormats)?e.datetimeFormats:ux(o),l=to(e.numberFormats)?e.numberFormats:ux(o),c=Or(Wo(),e.modifiers,Lme()),u=e.pluralRules||Wo(),d=Ss(e.missing)?e.missing:null,f=ho(e.missingWarn)||M2(e.missingWarn)?e.missingWarn:!0,h=ho(e.fallbackWarn)||M2(e.fallbackWarn)?e.fallbackWarn:!0,m=!!e.fallbackFormat,g=!!e.unresolving,y=Ss(e.postTranslation)?e.postTranslation:null,v=to(e.processor)?e.processor:null,k=ho(e.warnHtmlMessage)?e.warnHtmlMessage:!0,w=!!e.escapeParameter,C=Ss(e.messageCompiler)?e.messageCompiler:FY,x=Ss(e.messageResolver)?e.messageResolver:DY||Tme,S=Ss(e.localeFallbacker)?e.localeFallbacker:NY||bme,M=po(e.fallbackContext)?e.fallbackContext:void 0,_=e,T=po(_.__datetimeFormatters)?_.__datetimeFormatters:new Map,E=po(_.__numberFormatters)?_.__numberFormatters:new Map,L=po(_.__meta)?_.__meta:{};pN++;const P={version:n,cid:pN,locale:i,fallbackLocale:s,messages:r,modifiers:c,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:h,fallbackFormat:m,unresolving:g,postTranslation:y,processor:v,warnHtmlMessage:k,escapeParameter:w,messageCompiler:C,messageResolver:x,localeFallbacker:S,fallbackContext:M,onWarn:t,__meta:L};return P.datetimeFormats=a,P.numberFormats=l,P.__datetimeFormatters=T,P.__numberFormatters=E,__INTLIFY_PROD_DEVTOOLS__&&mme(P,n,L),P}const ux=e=>({[e]:Wo()});function dR(e,t,n,i,o){const{missing:s,onWarn:r}=e;if(s!==null){const a=s(e,n,t,o);return Hn(a)?a:t}else return t}function oy(e,t,n){const i=e;i.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function Bme(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function zme(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let i=n+1;i{HY.includes(l)?r[l]=n[l]:s[l]=n[l]}),Hn(i)?s.locale=i:to(i)&&(r=i),to(o)&&(r=o),[s.key||"",a,s,r]}function gN(e,t,n){const i=e;for(const o in n){const s=`${t}__${o}`;i.__datetimeFormatters.has(s)&&i.__datetimeFormatters.delete(s)}}function vN(e,...t){const{numberFormats:n,unresolving:i,fallbackLocale:o,onWarn:s,localeFallbacker:r}=e,{__numberFormatters:a}=e;if(!$r(t[0]))return c6;const[l,c,u,d]=DI(...t),f=ho(u.missingWarn)?u.missingWarn:e.missingWarn;ho(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const h=!!u.part,m=uR(e,u),g=r(e,o,m);if(!Hn(l)||l===""){const S=new Intl.NumberFormat(m.replace(/!/g,""),d);return h?S.formatToParts(c):S.format(c)}let y={},v,k=null;const w="number format";for(let S=0;S{jY.includes(l)?r[l]=n[l]:s[l]=n[l]}),Hn(i)?s.locale=i:to(i)&&(r=i),to(o)&&(r=o),[s.key||"",a,s,r]}function yN(e,t,n){const i=e;for(const o in n){const s=`${t}__${o}`;i.__numberFormatters.has(s)&&i.__numberFormatters.delete(s)}}const Hme=e=>e,jme=e=>"",Wme="text",qme=e=>e.length===0?"":aR(e),Vme=E0e;function dx(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function Ume(e){const t=$r(e.pluralIndex)?e.pluralIndex:-1;return $r(e.named?.count)?e.named.count:$r(e.named?.n)?e.named.n:t}function Kme(e={}){const t=e.locale,n=Ume(e),i=Hn(t)&&Ss(e.pluralRules?.[t])?e.pluralRules[t]:dx,o=i===dx?void 0:dx,s=v=>v[i(n,v.length,o)],r=e.list||[],a=v=>r[v],l=e.named||Wo();$r(e.pluralIndex)&&(l.count||=e.pluralIndex,l.n||=e.pluralIndex);const c=v=>l[v];function u(v,k){const w=Ss(e.messages)?e.messages(v,!!k):po(e.messages)?e.messages[v]:!1;return w||(e.parent?e.parent.message(v):jme)}const d=v=>e.modifiers?e.modifiers[v]:Hme,f=Ss(e.processor?.normalize)?e.processor.normalize:qme,h=Ss(e.processor?.interpolate)?e.processor.interpolate:Vme,m=Hn(e.processor?.type)?e.processor.type:Wme,y={list:a,named:c,plural:s,linked:(v,...k)=>{const[w,C]=k;let x="text",S="";k.length===1?po(w)?(S=w.modifier||S,x=w.type||x):Hn(w)&&(S=w||S):k.length===2&&(Hn(w)&&(S=w||S),Hn(C)&&(x=C||x));const M=u(v,!0)(y),_=M===""||M===void 0?v:M,T=x==="vnode"&&Xs(_)&&S?_[0]:_;return S?d(S)(T,x):T},message:u,type:m,interpolate:h,normalize:f,values:Or(Wo(),r,l)};return y}const bN=()=>"",iu=e=>Ss(e);function kN(e,...t){const{fallbackFormat:n,postTranslation:i,unresolving:o,messageCompiler:s,fallbackLocale:r,messages:a}=e,[l,c]=NI(...t),u=ho(c.missingWarn)?c.missingWarn:e.missingWarn,d=ho(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=ho(c.escapeParameter)?c.escapeParameter:e.escapeParameter,h=!!c.resolvedMessage,m=Hn(c.default)||ho(c.default)?ho(c.default)?s?l:()=>l:c.default:n?s?l:()=>l:null,g=n||m!=null&&(Hn(m)||Ss(m)),y=uR(e,c);f&&Zme(c);let[v,k,w]=h?[l,y,a[y]||Wo()]:WY(e,l,y,r,d,u),C=v,x=l;if(!h&&!(Hn(C)||tf(C)||iu(C))&&g&&(C=m,x=C),!h&&(!(Hn(C)||tf(C)||iu(C))||!Hn(k)))return o?z7:l;let S=!1;const M=()=>{S=!0},_=iu(C)?C:qY(e,l,k,C,x,M);if(S)return C;const T=Yme(e,k,w,c),E=Kme(T),L=Gme(e,_,E);let P=i?i(L,l):L;if(f&&Hn(P)&&(P=I0e(P)),__INTLIFY_PROD_DEVTOOLS__){const N={timestamp:Date.now(),key:Hn(l)?l:iu(C)?C.key:"",locale:k||(iu(C)?C.locale:""),format:Hn(C)?C:iu(C)?C.source:"",message:P};N.meta=Or({},e.__meta,Fme()||{}),gme(N)}return P}function Zme(e){Xs(e.list)?e.list=e.list.map(t=>Hn(t)?iN(t):t):po(e.named)&&Object.keys(e.named).forEach(t=>{Hn(e.named[t])&&(e.named[t]=iN(e.named[t]))})}function WY(e,t,n,i,o,s){const{messages:r,onWarn:a,messageResolver:l,localeFallbacker:c}=e,u=c(e,i,n);let d=Wo(),f,h=null;const m="translate";for(let g=0;gi);return c.locale=n,c.key=t,c}const l=r(i,Qme(e,n,o,i,a,s));return l.locale=n,l.key=t,l.source=i,l}function Gme(e,t,n){return t(n)}function NI(...e){const[t,n,i]=e,o=Wo();if(!Hn(t)&&!$r(t)&&!iu(t)&&!tf(t))throw Kf(Uf.INVALID_ARGUMENT);const s=$r(t)?String(t):(iu(t),t);return $r(n)?o.plural=n:Hn(n)?o.default=n:to(n)&&!N7(n)?o.named=n:Xs(n)&&(o.list=n),$r(i)?o.plural=i:Hn(i)?o.default=i:to(i)&&Or(o,i),[s,o]}function Qme(e,t,n,i,o,s){return{locale:t,key:n,warnHtmlMessage:o,onError:r=>{throw s&&s(r),r},onCacheKey:r=>k0e(t,n,r)}}function Yme(e,t,n,i){const{modifiers:o,pluralRules:s,messageResolver:r,fallbackLocale:a,fallbackWarn:l,missingWarn:c,fallbackContext:u}=e,f={locale:t,modifiers:o,pluralRules:s,messages:(h,m)=>{let g=r(n,h);if(g==null&&(u||m)){const[y,,v]=WY(u||e,h,t,a,l,c);g=y??r(v,h)}if(Hn(g)||tf(g)){let y=!1;const k=qY(e,h,t,g,h,()=>{y=!0});return y?bN:k}else return iu(g)?g:bN}};return e.processor&&(f.processor=e.processor),i.list&&(f.list=i.list),i.named&&(f.named=i.named),$r(i.plural)&&(f.pluralIndex=i.plural),f}ime();/*! + * vue-i18n v11.4.6 + * (c) 2026 kazuya kawaguchi + * Released under the MIT License. + */const Jme="11.4.6";function Xme(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(C0().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(C0().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(C0().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(C0().__INTLIFY_PROD_DEVTOOLS__=!1)}const pl={UNEXPECTED_RETURN_TYPE:yme,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function zl(e,...t){return B7(e,null,void 0)}const BI=hp("__translateVNode"),zI=hp("__datetimeParts"),HI=hp("__numberParts"),VY=hp("__setPluralRules"),UY=hp("__injectWithOption"),Og=hp("__dispose");function w9(e){if(!po(e)||tf(e))return e;for(const t in e)if(cu(e,t))if(!t.includes("."))po(e[t])&&w9(e[t]);else{const n=t.split("."),i=n.length-1;let o=e,s=!1;for(let r=0;r{if("locale"in a&&"resource"in a){const{locale:l,resource:c}=a;l?(r[l]=r[l]||Wo(),$8(c,r[l])):$8(c,r)}else Hn(a)&&$8(JSON.parse(a),r)}),o==null&&s)for(const a in r)cu(r,a)&&w9(r[a]);return r}function KY(e){return e.type}function ZY(e,t,n){let i=po(t.messages)?t.messages:Wo();"__i18nGlobal"in n&&(i=fR(e.locale.value,{messages:i,__i18n:n.__i18nGlobal}));const o=Object.keys(i);o.length&&o.forEach(s=>{e.mergeLocaleMessage(s,i[s])});{if(po(t.datetimeFormats)){const s=Object.keys(t.datetimeFormats);s.length&&s.forEach(r=>{e.mergeDateTimeFormat(r,t.datetimeFormats[r])})}if(po(t.numberFormats)){const s=Object.keys(t.numberFormats);s.length&&s.forEach(r=>{e.mergeNumberFormat(r,t.numberFormats[r])})}}}function wN(e){return V(P1,null,e,0)}function C9(){return Dr()}const CN="__INTLIFY_META__",AN=()=>[],ege=()=>!1;let xN=0;function SN(e){return((t,n,i,o)=>e(n,i,C9()||void 0,o))}const tge=()=>{const e=C9();let t=null;return e&&(t=KY(e)[CN])?{[CN]:t}:null};function u6(e={}){const{__root:t,__injectWithOption:n}=e,i=t===void 0,o=e.flatJson,s=l6?Z:Is;let r=ho(e.inheritLocale)?e.inheritLocale:!0;const a=s(t&&r?t.locale.value:Hn(e.locale)?e.locale:k9),l=s(t&&r?t.fallbackLocale.value:Hn(e.fallbackLocale)||Xs(e.fallbackLocale)||to(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a.value),c=s(fR(a.value,e)),u=s(to(e.datetimeFormats)?e.datetimeFormats:{[a.value]:{}}),d=s(to(e.numberFormats)?e.numberFormats:{[a.value]:{}});let f=t?t.missingWarn:ho(e.missingWarn)||M2(e.missingWarn)?e.missingWarn:!0,h=t?t.fallbackWarn:ho(e.fallbackWarn)||M2(e.fallbackWarn)?e.fallbackWarn:!0,m=t?t.fallbackRoot:ho(e.fallbackRoot)?e.fallbackRoot:!0,g=!!e.fallbackFormat,y=Ss(e.missing)?e.missing:null,v=Ss(e.missing)?SN(e.missing):null,k=Ss(e.postTranslation)?e.postTranslation:null,w=t?t.warnHtmlMessage:ho(e.warnHtmlMessage)?e.warnHtmlMessage:!0,C=!!e.escapeParameter;const x=t?t.modifiers:to(e.modifiers)?e.modifiers:{};let S=e.pluralRules||t&&t.pluralRules,M;M=(()=>{i&&hN(null);const de={version:Jme,locale:a.value,fallbackLocale:l.value,messages:c.value,modifiers:x,pluralRules:S,missing:v===null?void 0:v,missingWarn:f,fallbackWarn:h,fallbackFormat:g,unresolving:!0,postTranslation:k===null?void 0:k,warnHtmlMessage:w,escapeParameter:C,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};de.datetimeFormats=u.value,de.numberFormats=d.value,de.__datetimeFormatters=to(M)?M.__datetimeFormatters:void 0,de.__numberFormatters=to(M)?M.__numberFormatters:void 0;const $e=Nme(de);return i&&hN($e),$e})(),oy(M,a.value,l.value);function T(){return[a.value,l.value,c.value,u.value,d.value]}const E=R({get:()=>a.value,set:de=>{M.locale=de,a.value=de}}),L=R({get:()=>l.value,set:de=>{M.fallbackLocale=de,l.value=de,oy(M,a.value,de)}}),P=R(()=>c.value),N=R(()=>u.value),U=R(()=>d.value);function F(){return Ss(k)?k:null}function B(de){k=de,M.postTranslation=de}function W(){return y}function D(de){de!==null&&(v=SN(de)),y=de,M.missing=v}const z=(de,$e,Ye,rt,Pt,$t)=>{T();let jt;try{__INTLIFY_PROD_DEVTOOLS__,i||(M.fallbackContext=t?Dme():void 0),jt=de(M)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(M.fallbackContext=void 0)}if(Ye!=="translate exists"&&$r(jt)&&jt===z7||Ye==="translate exists"&&!jt){const[Kt,sn]=$e();return t&&m?rt(t):Pt(Kt)}else{if($t(jt))return jt;throw zl(pl.UNEXPECTED_RETURN_TYPE)}};function $(...de){return z($e=>Reflect.apply(kN,null,[$e,...de]),()=>NI(...de),"translate",$e=>Reflect.apply($e.t,$e,[...de]),$e=>$e,$e=>Hn($e))}function j(...de){const[$e,Ye,rt]=de;if(rt&&!po(rt))throw zl(pl.INVALID_ARGUMENT);return $($e,Ye,Or({resolvedMessage:!0},rt||{}))}function G(...de){return z($e=>Reflect.apply(mN,null,[$e,...de]),()=>FI(...de),"datetime format",$e=>Reflect.apply($e.d,$e,[...de]),()=>c6,$e=>Hn($e)||Xs($e))}function K(...de){return z($e=>Reflect.apply(vN,null,[$e,...de]),()=>DI(...de),"number format",$e=>Reflect.apply($e.n,$e,[...de]),()=>c6,$e=>Hn($e)||Xs($e))}function te(de){return de.map($e=>Hn($e)||$r($e)||ho($e)?wN(String($e)):$e)}const q={normalize:te,interpolate:de=>de,type:"vnode"};function Y(...de){return z($e=>{let Ye;const rt=$e;try{rt.processor=q,Ye=Reflect.apply(kN,null,[rt,...de])}finally{rt.processor=null}return Ye},()=>NI(...de),"translate",$e=>$e[BI](...de),$e=>[wN($e)],$e=>Xs($e))}function ae(...de){return z($e=>Reflect.apply(vN,null,[$e,...de]),()=>DI(...de),"number format",$e=>$e[HI](...de),AN,$e=>Hn($e)||Xs($e))}function pe(...de){return z($e=>Reflect.apply(mN,null,[$e,...de]),()=>FI(...de),"datetime format",$e=>$e[zI](...de),AN,$e=>Hn($e)||Xs($e))}function Me(de){S=de,M.pluralRules=S}function fe(de,$e){return z(()=>{if(!de)return!1;const Ye=Hn($e)?$e:a.value,rt=Hn($e)?[Ye]:OI(M,l.value,Ye);for(let Pt=0;Pt[de],"translate exists",Ye=>Reflect.apply(Ye.te,Ye,[de,$e]),ege,Ye=>ho(Ye))}function se(de){let $e=null;const Ye=OI(M,l.value,a.value);for(let rt=0;rt{r&&(a.value=de,M.locale=de,oy(M,a.value,l.value))}),Fe(t.fallbackLocale,de=>{r&&(l.value=de,M.fallbackLocale=de,oy(M,a.value,l.value))}));const xe={id:xN,locale:E,fallbackLocale:L,get inheritLocale(){return r},set inheritLocale(de){r=de,de&&t&&(a.value=t.locale.value,l.value=t.fallbackLocale.value,oy(M,a.value,l.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:P,get modifiers(){return x},get pluralRules(){return S||{}},get isGlobal(){return i},get missingWarn(){return f},set missingWarn(de){f=de,M.missingWarn=f},get fallbackWarn(){return h},set fallbackWarn(de){h=de,M.fallbackWarn=h},get fallbackRoot(){return m},set fallbackRoot(de){m=de},get fallbackFormat(){return g},set fallbackFormat(de){g=de,M.fallbackFormat=g},get warnHtmlMessage(){return w},set warnHtmlMessage(de){w=de,M.warnHtmlMessage=de},get escapeParameter(){return C},set escapeParameter(de){C=de,M.escapeParameter=de},t:$,getLocaleMessage:ee,setLocaleMessage:he,mergeLocaleMessage:Re,getPostTranslationHandler:F,setPostTranslationHandler:B,getMissingHandler:W,setMissingHandler:D,[VY]:Me};return xe.datetimeFormats=N,xe.numberFormats=U,xe.rt=j,xe.te=fe,xe.tm=Q,xe.d=G,xe.n=K,xe.getDateTimeFormat=Pe,xe.setDateTimeFormat=le,xe.mergeDateTimeFormat=ke,xe.getNumberFormat=ne,xe.setNumberFormat=ce,xe.mergeNumberFormat=be,xe[UY]=n,xe[BI]=Y,xe[zI]=pe,xe[HI]=ae,xe}function nge(e){const t=Hn(e.locale)?e.locale:k9,n=Hn(e.fallbackLocale)||Xs(e.fallbackLocale)||to(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,i=Ss(e.missing)?e.missing:void 0,o=ho(e.silentTranslationWarn)||M2(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,s=ho(e.silentFallbackWarn)||M2(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,r=ho(e.fallbackRoot)?e.fallbackRoot:!0,a=!!e.formatFallbackMessages,l=to(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,u=Ss(e.postTranslation)?e.postTranslation:void 0,d=Hn(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,f=!!e.escapeParameterHtml,h=ho(e.sync)?e.sync:!0;let m=e.messages;if(to(e.sharedMessages)){const x=e.sharedMessages;m=Object.keys(x).reduce((M,_)=>{const T=M[_]||(M[_]={});return Or(T,x[_]),M},m||{})}const{__i18n:g,__root:y,__injectWithOption:v}=e,k=e.datetimeFormats,w=e.numberFormats,C=e.flatJson;return{locale:t,fallbackLocale:n,messages:m,flatJson:C,datetimeFormats:k,numberFormats:w,missing:i,missingWarn:o,fallbackWarn:s,fallbackRoot:r,fallbackFormat:a,modifiers:l,pluralRules:c,postTranslation:u,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:h,__i18n:g,__root:y,__injectWithOption:v}}function jI(e={}){const t=u6(nge(e)),{__extender:n}=e,i={id:t.id,get locale(){return t.locale.value},set locale(o){t.locale.value=o},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(o){t.fallbackLocale.value=o},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(o){t.setMissingHandler(o)},get silentTranslationWarn(){return ho(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(o){t.missingWarn=ho(o)?!o:o},get silentFallbackWarn(){return ho(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(o){t.fallbackWarn=ho(o)?!o:o},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(o){t.fallbackFormat=o},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(o){t.setPostTranslationHandler(o)},get sync(){return t.inheritLocale},set sync(o){t.inheritLocale=o},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(o){t.warnHtmlMessage=o!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(o){t.escapeParameter=o},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...o){return Reflect.apply(t.t,t,[...o])},rt(...o){return Reflect.apply(t.rt,t,[...o])},te(o,s){return t.te(o,s)},tm(o){return t.tm(o)},getLocaleMessage(o){return t.getLocaleMessage(o)},setLocaleMessage(o,s){t.setLocaleMessage(o,s)},mergeLocaleMessage(o,s){t.mergeLocaleMessage(o,s)},d(...o){return Reflect.apply(t.d,t,[...o])},getDateTimeFormat(o){return t.getDateTimeFormat(o)},setDateTimeFormat(o,s){t.setDateTimeFormat(o,s)},mergeDateTimeFormat(o,s){t.mergeDateTimeFormat(o,s)},n(...o){return Reflect.apply(t.n,t,[...o])},getNumberFormat(o){return t.getNumberFormat(o)},setNumberFormat(o,s){t.setNumberFormat(o,s)},mergeNumberFormat(o,s){t.mergeNumberFormat(o,s)}};return i.__extender=n,i}function ige(e,t,n){return{beforeCreate(){const i=C9();if(!i)throw zl(pl.UNEXPECTED_ERROR);const o=this.$options;if(o.i18n){const s=o.i18n;if(o.__i18n&&(s.__i18n=o.__i18n),s.__root=t,this===this.$root)this.$i18n=_N(e,s);else{s.__injectWithOption=!0,s.__extender=n.__vueI18nExtend,this.$i18n=jI(s);const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}}else if(o.__i18n)if(this===this.$root)this.$i18n=_N(e,o);else{this.$i18n=jI({__i18n:o.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=e;o.__i18nGlobal&&ZY(t,o,o),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$te=(s,r)=>this.$i18n.te(s,r),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),n.__setInstance(i,this.$i18n)},mounted(){},unmounted(){const i=C9();if(!i)throw zl(pl.UNEXPECTED_ERROR);const o=this.$i18n;o&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,o?.__disposer&&(o.__disposer(),delete o.__disposer,delete o.__extender),n.__deleteInstance(i),delete this.$i18n)}}}function _N(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[VY](t.pluralizationRules||e.pluralizationRules);const n=fR(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(i=>e.mergeLocaleMessage(i,n[i])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(i=>e.mergeDateTimeFormat(i,t.datetimeFormats[i])),t.numberFormats&&Object.keys(t.numberFormats).forEach(i=>e.mergeNumberFormat(i,t.numberFormats[i])),e}const hR={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function oge({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((i,o)=>[...i,...o.type===_e?o.children:[o]],[]):t.reduce((n,i)=>{const o=e[i];return o&&(n[i]=o()),n},Wo())}function GY(){return _e}const sge=Xe({name:"i18n-t",props:Or({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>$r(e)||!isNaN(e)}},hR),setup(e,t){const{slots:n,attrs:i}=t,o=e.i18n||Wt({useScope:e.scope,__useComponent:!0});return()=>{const s=()=>{const l=Object.keys(n).filter(d=>d[0]!=="_"),c=Wo();e.locale&&(c.locale=e.locale),e.plural!==void 0&&(c.plural=Hn(e.plural)?+e.plural:e.plural);const u=oge(t,l);return o[BI](e.keypath,u,c)},r=Or(Wo(),i),a=Hn(e.tag)||po(e.tag)?e.tag:GY();return po(a)?Gn(a,r,{default:s}):Gn(a,r,s())}}}),IN=sge;function rge(e){return Xs(e)&&!Hn(e[0])}function QY(e,t,n,i){const{slots:o,attrs:s}=t;return()=>{const r=()=>{const c={part:!0};let u=Wo();e.locale&&(c.locale=e.locale),Hn(e.format)?c.key=e.format:po(e.format)&&(Hn(e.format.key)&&(c.key=e.format.key),u=Object.keys(e.format).reduce((h,m)=>n.includes(m)?Or(Wo(),h,{[m]:e.format[m]}):h,Wo()));const d=i(e.value,c,u);let f=[c.key];return Xs(d)?f=d.map((h,m)=>{const g=o[h.type],y=g?g({[h.type]:h.value,index:m,parts:d}):[h.value];return rge(y)&&(y[0].key=`${h.type}-${m}`),y}):Hn(d)&&(f=[d]),f},a=Or(Wo(),s),l=Hn(e.tag)||po(e.tag)?e.tag:GY();return po(l)?Gn(l,a,{default:r}):Gn(l,a,r())}}const age=Xe({name:"i18n-n",props:Or({value:{type:Number,required:!0},format:{type:[String,Object]}},hR),setup(e,t){const n=e.i18n||Wt({useScope:e.scope,__useComponent:!0});return QY(e,t,jY,(...i)=>n[HI](...i))}}),TN=age;function lge(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const i=n.__getInstance(t);return i!=null?i.__composer:e.global.__composer}}function cge(e){const t=r=>{const{instance:a,value:l}=r;if(!a||!a.$)throw zl(pl.UNEXPECTED_ERROR);const c=lge(e,a.$),u=MN(l);return[Reflect.apply(c.t,c,[...EN(u)]),c]};return{created:(r,a)=>{const[l,c]=t(a);l6&&(r.__i18nWatcher=Fe(c.locale,()=>{a.instance&&a.instance.$forceUpdate()})),r.__composer=c,r.textContent=l},unmounted:r=>{l6&&r.__i18nWatcher&&(r.__i18nWatcher(),r.__i18nWatcher=void 0,delete r.__i18nWatcher),r.__composer&&(r.__composer=void 0,delete r.__composer)},beforeUpdate:(r,{value:a})=>{if(r.__composer){const l=r.__composer,c=MN(a);r.textContent=Reflect.apply(l.t,l,[...EN(c)])}},getSSRProps:r=>{const[a]=t(r);return{textContent:a}}}}function MN(e){if(Hn(e))return{path:e};if(to(e)){if(!("path"in e))throw zl(pl.REQUIRED_VALUE,"path");return e}else throw zl(pl.INVALID_VALUE)}function EN(e){const{path:t,locale:n,args:i,choice:o,plural:s}=e,r={},a=i||{};return Hn(n)&&(r.locale=n),$r(o)&&(r.plural=o),$r(s)&&(r.plural=s),[t,a,r]}function uge(e,t,...n){const i=to(n[0])?n[0]:{};(ho(i.globalInstall)?i.globalInstall:!0)&&([IN.name,"I18nT"].forEach(s=>e.component(s,IN)),[TN.name,"I18nN"].forEach(s=>e.component(s,TN)),[PN.name,"I18nD"].forEach(s=>e.component(s,PN))),e.directive("t",cge(t))}const dge=hp("global-vue-i18n");function fge(e={}){const t=__VUE_I18N_LEGACY_API__&&ho(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=ho(e.globalInjection)?e.globalInjection:!0,i=new Map,[o,s]=hge(e,t),r=hp("");function a(d){return i.get(d)||null}function l(d,f){i.set(d,f)}function c(d){i.delete(d)}const u={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(d,...f){if(d.__VUE_I18N_SYMBOL__=r,d.provide(d.__VUE_I18N_SYMBOL__,u),to(f[0])){const g=f[0];u.__composerExtend=g.__composerExtend,u.__vueI18nExtend=g.__vueI18nExtend}let h=null;!t&&n&&(h=kge(d,u.global)),__VUE_I18N_FULL_INSTALL__&&uge(d,u,...f),__VUE_I18N_LEGACY_API__&&t&&d.mixin(ige(s,s.__composer,u));const m=d.unmount;d.unmount=()=>{h&&h(),u.dispose(),m()}},get global(){return s},dispose(){o.stop()},__instances:i,__getInstance:a,__setInstance:l,__deleteInstance:c};return u}function Wt(e={}){const t=C9();if(t==null)throw zl(pl.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw zl(pl.NOT_INSTALLED);const n=pge(t),i=gge(n),o=KY(t),s=mge(e,o);if(s==="global")return ZY(i,e,o),i;if(s==="parent"){let l=LN(n,t,e.__useComponent);return l==null&&(l=i),l}if(s==="isolated"){if(n.mode!=="composition")throw zl(pl.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const l=n,c=Or({},e),u=LN(n,t);c.__root=u||i;const d=u6(c);return l.__composerExtend&&(d[Og]=l.__composerExtend(d)),ad()&&Qr(()=>{const h=d[Og];h&&(h(),delete d[Og])}),d}const r=n;let a=r.__getInstance(t);if(a==null){const l=Or({},e);"__i18n"in o&&(l.__i18n=o.__i18n),i&&(l.__root=i),a=u6(l),r.__composerExtend&&(a[Og]=r.__composerExtend(a)),yge(r,t,a),r.__setInstance(t,a)}return a}function hge(e,t){const n=R3(),i=__VUE_I18N_LEGACY_API__&&t?n.run(()=>jI(e)):n.run(()=>u6(e));if(i==null)throw zl(pl.UNEXPECTED_ERROR);return[n,i]}function pge(e){const t=Zt(e.isCE?dge:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw zl(e.isCE?pl.NOT_INSTALLED_WITH_PROVIDE:pl.UNEXPECTED_ERROR);return t}function mge(e,t){return N7(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function gge(e){return e.mode==="composition"?e.global:e.global.__composer}function LN(e,t,n=!1){let i=null;const o=t.root;let s=vge(t,n);for(;s!=null;){const r=e;if(e.mode==="composition")i=r.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const a=r.__getInstance(s);a!=null&&(i=a.__composer,n&&i&&!i[UY]&&(i=null))}if(i!=null||o===s)break;s=s.parent}return i}function vge(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function yge(e,t,n){Pn(()=>{},t),Xn(()=>{const i=n;e.__deleteInstance(t);const o=i[Og];o&&(o(),delete i[Og])},t)}const bge=["locale","fallbackLocale","availableLocales"],RN=["t","rt","d","n","tm","te"];function kge(e,t){const n=Object.create(null);return bge.forEach(o=>{const s=Object.getOwnPropertyDescriptor(t,o);if(!s)throw zl(pl.UNEXPECTED_ERROR);const r=Vo(s.value)?{get(){return s.value.value},set(a){s.value.value=a}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,o,r)}),e.config.globalProperties.$i18n=n,RN.forEach(o=>{const s=Object.getOwnPropertyDescriptor(t,o);if(!s||!s.value)throw zl(pl.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${o}`,s)}),()=>{delete e.config.globalProperties.$i18n,RN.forEach(o=>{delete e.config.globalProperties[`$${o}`]})}}const wge=Xe({name:"i18n-d",props:Or({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},hR),setup(e,t){const n=e.i18n||Wt({useScope:e.scope,__useComponent:!0});return QY(e,t,HY,(...i)=>n[zI](...i))}}),PN=wge;Xme();Rme(hme);Pme(Mme);$me(OI);if(__INTLIFY_PROD_DEVTOOLS__){const e=C0();e.__INTLIFY__=!0,pme(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const Cge={preview:"Preview",source:"Code",confirm:"Confirm",cancel:"Cancel",close:"Close",dismiss:"Dismiss",loading:"Loading",copy:"Copy",errorBoundaryTitle:"Something went wrong",errorBoundaryRetry:"Try again",asyncLoadFailed:"Failed to load. Close this view and try again."},Age={connecting:"Connecting…",connectingStageAuth:"Checking sign-in…",connectingStageServer:"Connecting to the Kimi Code service…",connectingStageConfig:"Loading configuration…",connectingStageSessions:"Loading sessions…",connectingStageSession:"Opening session…",connectingRetrySuffix:" (retry {n})",connectingIssueNetworkTitle:"Cannot connect",connectingIssueNetworkMessage:"Check your network connection and make sure the Kimi Code service is still running.",connectingIssueTimeoutTitle:"Response timed out",connectingIssueTimeoutMessage:"Still retrying automatically — please wait.",connectingIssueApiTitle:"Request failed",connectingIssueUnknownTitle:"Connection problem",menuFile:"File",menuEdit:"Edit",menuView:"View",menuHelp:"Help",applicationMenu:"Application menu",quitConfirmTitle:"Quit Kimi Code?",quitConfirmMessage:"Sessions are still in progress on this machine and will be interrupted if you quit.",quitConfirmMessageRemoteControl:"Remote Control is running. Quitting the app will stop it, and you will need to turn it on again after restarting.",quitConfirmMessageBusyAndRemoteControl:"Sessions are still in progress and will be interrupted. Remote Control is also running — quitting the app will stop it, and you will need to turn it on again after restarting.",quitConfirmQuit:"Quit",quitConfirmCancel:"Cancel"},xge={workspaceMeta:"workspace · {branch}",sessionsHeader:"sessions",workspaces:"workspaces",viewSwitcher:"List options",viewGroup:"View",viewFlat:"Flat list",viewGrouped:"Group by workspace",sortGroup:"Sort order",sortManual:"Manual",sortRecent:"Recent activity",sessionAdmin:"Manage Sessions",collapseAll:"Collapse all workspaces",expandAll:"Expand all workspaces",newSession:"New Session",newChat:"New Session",newWorkspace:"New Workspace",dropToAddWorkspace:"Drop to add workspace",emptyState:"No sessions yet · click New Session to start",options:"Options",rename:"Rename",genTitle:"Gen Title",genTitleUnavailable:"Title generation unavailable — needs a managed Kimi Code login and at least one message",setEmoji:"Set Emoji…",sessionEmojiTitle:"Pick an emoji",removeEmoji:"Remove emoji",randomEmoji:"Random",searchEmoji:"Search emoji",recentEmojis:"Recently used",noEmojiResults:"No matching emoji",emojiGroupFaces:"Smileys & People",emojiGroupNature:"Animals & Nature",emojiGroupFood:"Food & Drink",emojiGroupActivity:"Activities & Travel",emojiGroupObjects:"Objects & Work",emojiGroupSymbols:"Symbols & Status",copyPath:"Copy path",copySessionId:"Copy session ID",copied:"Copied",copyFailed:"Copy failed",archive:"Archive",archiveToastUndo:"Undo",archiveToastMid:"or view archived chats in",archiveToastSettings:"Settings",archiveToastTail:"",tabOpen:"Open",tabDone:"Done",tabWorkspaces:"Workspaces",tagOpen:"Open",tagDone:"Done",complete:"Done",markDone:"Mark as done",reopen:"Mark as open",noDoneSessions:"No completed sessions yet",noOpenSessions:"No open sessions yet",completeToastLead:"Done",reopenToastLead:"Back to open",fork:"Fork session",reload:"Reload session",export:"Export session",pin:"Pin",unpin:"Unpin",pinned:"Pinned",collapsePinned:"Collapse pinned",expandPinned:"Expand pinned",resizePinnedAria:"Resize pinned section height",delete:"Delete",deleteConfirmTitle:"Delete session",deleteConfirmMessage:'Permanently delete all conversation history of "{title}". This cannot be undone. Files and code changes in the workspace are not affected.',deleteConfirmButton:"Permanently delete",deleteToast:"Session deleted",removeWorkspace:"Remove workspace",brand:"Kimi Code",signedIn:"Signed in",signOut:"Sign out",notSignedIn:"Not signed in",signIn:"Sign in",defaultUserName:"Kimi User",upgradeMembership:"Upgrade membership",logoutConfirmTitle:"Sign out",logoutConfirmMessage:"Are you sure you want to sign out?",language:"Language",backendTitle:"Backend {backend} · {endpoint} — click to switch",noSessions:"No conversations yet",allPinned:"{count} conversations pinned",showMore:"Show more",loadMore:"Load more",showLess:"Show less",loadingMore:"Loading…",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",searchPlaceholder:"Search sessions and workspaces",search:"Search",searchHint:"↑↓ navigate · ↵ open · Esc close",searchHintSelect:"navigate",searchHintOpen:"open",searchHintClose:"close",searchClear:"Clear search",searchNoResults:"No matching sessions or workspaces",searchEmpty:"No sessions yet",update:"Upgrade",updateAvailable:"v{version} available",updateDownloadingButton:"Downloading… ({percent}%)",updateReady:"v{version} ready",updateDone:"Restart",updateFailed:"Download failed",updateRetry:"Retry",updateDownloadNow:"Download & Update",updateSkip:"Skip This Version",updateRestartNow:"Restart Now",updateRestartLater:"Later",updateReleaseDate:"Released {date}",updateCurrentVersion:"Current v{version}",updateWhatsNew:"What’s new",updateBackground:"Download in Background",updateAutoDownload:"Automatically download and install updates",rcSelectDevice:"Select device",rcCurrentDevice:"Current device: {name}",rcConnectable:"Connectable",rcUnavailable:"Unavailable",rcOnline:"Online",rcOffline:"Offline",rcDevicesLoadFailed:"Failed to load devices"},Sge={title:"Session Management",subtitle:"Manage all sessions. Mark the finished ones as done. Filter by last updated to clean up old sessions in bulk.",back:"Back",filterWorkspace:"Workspace",filterStatus:"Status",filterTime:"Updated",allWorkspaces:"All workspaces",selectAll:"Select all",searchWorkspace:"Search workspaces",noWorkspaceMatch:"No matching workspaces",removeTag:"Remove {name}",statusAll:"All statuses",statusOpen:"Open",statusDone:"Done",timeAll:"Any time",timeDaysAgo:"{n} days ago",query:"Query",reset:"Reset",colStatus:"Status",colTitle:"Title",colWorkspace:"Workspace",colPrompt:"Last prompt",colUpdated:"Updated",colCompleted:"Completed",colActions:"Actions",empty:"No sessions match the current filters",loading:"Loading…",total:"{n} total",pageSize:"{n} / page",prevPage:"Previous page",nextPage:"Next page",selectPageAll:"Select all on this page",batchSelected:"{n} selected",selectAllMatching:"Select all {total} matching sessions",materializingAll:"Selecting…",allMatchingSelected:"All {n} selected",clearSelection:"Clear selection",markDone:"Mark as done",reopen:"Mark as open",markDoneCount:"Mark as done ({n})",reopenCount:"Mark as open ({n})",batchDoneToast:"{n} marked as done",batchReopenedToast:"{n} moved back to open",batchFailedSuffix:", {n} failed",batchDoneFailedNotice:"Could not mark {n} as done",batchReopenFailedNotice:"Could not move {n} back to open",undo:"Undo",open:"Open session",rename:"Rename…",fork:"Fork",export:"Export",moreActions:"More actions"},_ge={switcherTitle:"Switch workspace",switchTooltip:"Switch workspace",eyebrow:"Workspace",branchLabel:"branch: {branch}",noBranch:"no branch",sessionCount:"{count} session | {count} sessions",allWorkspaces:"All workspaces",currentWorkspace:"Current workspace only",addWorkspace:"Add workspace…",noWorkspace:"No workspace",deleteHasSessions:"This workspace still has sessions — archive them before deleting it",removeWorkspaceConfirm:`Remove "{name}" from the sidebar? +The folder and its files are not deleted, and its sessions are kept — add the folder back at any time to bring them back.`,removeAction:"Remove",swarmEnableTitle:"Enable swarm mode?",swarmEnableConfirm:"The agent will run multiple sub-agents in parallel.",goalStartTitle:"Start goal?",goalStartConfirm:'"{objective}" — the agent will run autonomously toward it.',scopeCurrent:"this workspace",scopeAll:"all workspaces",newInGroup:"New session in this workspace",addTitle:"Add workspace",pathLabel:"Path",pathPlaceholder:"/absolute/path/to/project",recentLabel:"Recent folders",add:"Add",cancel:"Cancel",addHint:"Paste an absolute folder path, or pick a recent one.",addFailed:"Couldn't open this folder. Check the path and try again.",requiredTitle:"Choose a workspace first",requiredMessage:"Pick a folder to use as your workspace before sending a message.",openThisFolder:"Open this folder",up:"Up",browsing:"Browsing…",filterPlaceholder:"Filter subfolders…",searchPlaceholder:"Fuzzy-search under this folder…",searching:"Searching…",pasteToggle:"Enter an absolute path",noFilterMatch:"No subfolders match “{q}”",noSubfolders:"No subfolders here",browseHint:'Click a folder to enter it, then "Open this folder" to add it as a workspace.',attentionTitle:"{count} item needs your attention | {count} items need your attention",awaitingAnswer:"Answer",awaitingAnswerTitle:"A question is waiting for your answer",awaitingPermission:"Approve",awaitingPermissionTitle:"An action is waiting for your approval",aborted:"Failed",abortedTitle:"This session's latest turn ended on an error",trust:{title:"Trust this workspace",desc:"Until trusted, you can't send messages in this workspace, and project-level configurations such as agent instructions and MCP config stay disabled. These files can direct Kimi to run commands, so make sure you trust their authors. After trusting, tool calls still ask for your approval one by one, and trust is remembered for future config changes.",trustAction:"Trust workspace",rejectAction:"Reject",trustedNote:"Workspace trusted — project-level config loaded",readFailedTitle:"Failed to verify workspace trust. Please try again"}},Ige={jumpToLatestAria:"Jump to latest message",backToBottom:"Back to bottom",toc:"Conversation outline",historyPrevious:"Previous item",historyNext:"Next item",newMessages:"Latest messages",loading:"Loading…",starting:"Starting conversation…",requesting:"Requesting…",working:"Working…",workingRetry:"Model request failed — retrying ({n}/{max})…",emptyWorkspaceHint:"Send in {name}",switchWorkspace:"Switch workspace",recentSessions:"Recent sessions",viewMoreSessions:"View more",sessionAdminTooltip:"View and manage more sessions in Session Management",addWorkspace:"New workspace",moreWorkspaces:"More workspaces ({count})",pickFolder:"Choose folder…",compacting:"Compacting context…",compactedPlain:"Context compacted",compactedAuto:"Context auto-compacted",compactedTokens:" ({before} → {after} tokens)",viewSummary:"View summary",undo:"Undo",undoTooltip:"Undo message",undoConfirm:"This removes this message and all later messages from the conversation context, and puts this message’s text back into the composer. File and code changes are not affected.",undone:"Undone — the message is back in the composer",turnInterrupted:"Manually stopped",turnFailed:"Model request failed — this turn was interrupted",turnFailedMaxSteps:"Step limit reached — this turn was interrupted",turnFailedResume:"Continue",turnFailedResumeText:"Continue",sessionRatingQuestion:"How’s Kimi doing in this session?",sessionRatingBad:"Bad",sessionRatingFine:"Fine",sessionRatingGood:"Good",sessionRatingThanks:"Thanks for your feedback",sessionRatingUndo:"Undo",yesterday:"Yesterday",loadOlder:"Load earlier messages",loadingOlder:"Loading earlier messages…",widenTable:"Widen table",restoreTableWidth:"Restore default width",copyTable:"Copy table",copyPath:"Copy path",revealInFolder:"Reveal in folder",openLinkExternally:"External",openLinkInSidebar:"Right panel",wrapCode:"Enable word wrap",unwrapCode:"Disable word wrap",showLineNumbers:"Show line numbers",hideLineNumbers:"Hide line numbers",cron:{fired:"Scheduled reminder fired",missed:"Missed scheduled reminders",job:"job {id}",oneShot:"one-shot",coalesced:"{n} fires coalesced",missedCount:"{n} missed",finalDelivery:"final delivery",expand:"Show more",collapse:"Show less"},fold:{worked:"Worked {duration}",workedUnknown:"Work details"},turnFiles:{titleOne:"{number} file changed",titleOther:"{number} files changed",more:"{number} more files",moreOne:"1 more file",showLess:"Show less",diffUnavailable:"This file’s changes can’t be shown line by line",rebuilding:"Loading this turn’s changes…",openFile:"Open file"},goal:{continuation:"Goal continuation"},notification:{sentBy:{task:"From background (Bash)",subagent:"From background (Agent)"},bodyLine:"{status}: {description}",reason:"Reason: {reason}",userStopped:"Stopped by user",statusTitle:{completed:"Completed",failed:"Failed",timed_out:"Timed out",killed:"Stopped",lost:"Lost",info:"Notification"},status:{completed:"completed",failed:"failed",timed_out:"timed out",killed:"killed",lost:"lost",info:"info"},groupTitle:"{n} notifications",copyPath:"Copy path",copied:"Copied",rawPayload:"Raw payload",outputTruncated:"Output truncated — showing the tail",fields:{type:"Type",source:"Source",severity:"Severity"}},userMessage:{expand:"Show more",collapse:"Show less"},search:{placeholder:"Search chat…",searching:"Searching…",results:"{current}/{total} results",resultsCapped:"{current}/{total}+ results",noResults:"No results",previous:"Previous match",next:"Next match",close:"Close search"}},Tge={connectionConnected:"Connected",connectionConnecting:"Connecting…",connectionDisconnected:"Disconnected",ctxTooltip:"Used {used} / {max} tokens ({pct}%)",modelLabel:"Model",permissionManual:"Always Ask",permissionAuto:"Never Ask",permissionYolo:"Ask When Needed",permissionManualDesc:"Auto-read only; everything else needs your approval first",permissionAutoDesc:"Never interrupts you; everything runs and is decided automatically",permissionYoloDesc:"Routine edits and commands run automatically; risky actions, questions, and plans still ask",planLabel:"Plan",planOn:"on",planOff:"off",planTooltip:"Toggle plan mode (research before editing)",workModeDismiss:"Exit mode",goalLabel:"Goal",timeUnitHour:"h",timeUnitMinute:"m",timeUnitSecond:"s",planEmptyArmed:"Plan mode is on — the plan the agent writes will show up here.",planEmptyIdle:"No plan yet — turn plan mode on and the agent’s plan will show up here.",swarmLabel:"Swarm",swarmDismiss:"Turn off Swarm",towerLabel:"Tower",towerDismiss:"Turn off Tower",modeOff:"Off",goalPlaceholder:"What should the agent achieve?",planPlaceholder:"What should the agent plan for?",goalStart:"Start",goalPause:"Pause",goalResume:"Resume",goalCancel:"Cancel",goalCancelConfirm:"Cancel this goal? It cannot be resumed afterwards.",goalCancelConfirmYes:"Yes",goalCancelConfirmNo:"No",goalDoneWhen:"Done when",goalStatusActive:"Active",goalStatusPaused:"Paused",goalStatusBlocked:"Blocked",goalStatusComplete:"Complete",modeNotSupported:"Not supported",thinkingLabel:"Thinking",thinkingTooltip:"Toggle thinking mode",cacheNote:"Note: Switching models or thinking effort invalidates the existing prompt cache. Start a new chat to avoid extra token costs.",starredModels:"Starred",moreModels:"More models…",statusPanelTitle:"Session status",statusPanelClose:"Close",statusModel:"Model",statusThinking:"Thinking",statusPermission:"Permission",statusPlanMode:"Plan mode",statusSwarmMode:"Swarm mode",statusTowerMode:"Tower mode",swarmOn:"on",swarmOff:"off",towerOn:"on",towerOff:"off",statusContext:"Context",statusCost:"Cost",statusContextValue:"{used} / {max} ({pct}%)",statusNone:"—",activityRunning:"Running…",activityAwaitingApproval:"Awaiting approval",activityAwaitingQuestion:"Awaiting answer",interrupt:"Interrupt",runningShort:"in progress"},Mge={inputLabel:"Message input",placeholder:"Type a message…",commandArgumentHint:"Type {argument} after {command}",send:"Send ↵",queueLabel:"Queue",placeholderRunning:"Press Enter to queue · Ctrl+S to inject into the running turn",placeholderRunningMobile:"Press Enter to queue",starting:"Sending…",queuePending:"{n} waiting to send",queueSteer:"Send into the running turn Ctrl+S",queueSteerMobile:"Send into the running turn",queueDragTitle:"Drag to reorder",editQueued:"Edit (load back into the input)",queuedAttachments:"attachment ×{n}",queuedHasImage:"Contains {n} image(s) — remove only, not editable",attachmentImage:"Image",attachmentVideo:"Video",attachments:"Attachments",imagesAndVideos:"Images and videos",mentionNamed:"Mention {name}",attachmentOpenUnsupported:"Can’t open {name} — this file type isn’t supported",dropToAttach:"Drop files to attach",remove:"Remove",removeNamed:"Remove {name}",mediaAttachments:"Media rail",uploading:"Preparing",uploadFailed:"Failed",attachFile:"Attach file",addMenu:"Add",addFiles:"Files",addFilesDesc:"Upload files",addScreenshot:"Screenshot",addScreenshotDesc:"Capture a screen region with a comment",screenshotFailed:"Screenshot failed, please try again",screenshotSessionGone:"The original conversation no longer exists, so the screenshot was not added",addGoalDesc:"Set a goal to keep pursuing",addPlanDesc:"Turn plan mode on",addSwarmDesc:"Turn swarm mode on",addTowerDesc:"Turn tower mode on",noCommands:"No commands",slashSheetTitle:"Commands",slashSearchPlaceholder:"Search commands…",mentionSheetTitle:"Mention",mentionSearchPlaceholder:"Search attachments, files, or skills…",addSlash:"Commands",addSlashDesc:"Built-in commands or skills",addMention:"Mention",addMentionDesc:"Mention attachments, project files, or skills",interrupt:"Interrupt",interruptConfirm:"Press Esc again to interrupt",interruptTitle:"Interrupt current operation",expandTitle:"Expand input for multi-line editing",collapseTitle:"Collapse input",quickStartPlaceholder:"Type a message to start a new conversation…",thinkingSuffix:" · Thinking",thinkingSuffixEffort:" · {level}",noArgCommand:"{cmd} takes no arguments"},Ege={title:"Sign in to Kimi Code",close:"Close (Esc)",regionCnHint:"Sign in with your {domain} account",regionOverseasHint:"Sign in with your {domain} account",oauthTitle:"Sign in with Kimi",oauthHint:"Finish authorizing in your browser to sign in",starting:"Starting sign-in flow…",openedHint:"Finish authorizing in your browser ({time}).",blockedTitle:"Could not open the login page",blockedHint:"The browser blocked the automatic opening — use the button below to continue authorizing.",notOpened:"Didn't open in your browser?",authorizeInBrowser:"Sign in via browser",orDivider:"or",fallbackPrefix:"On another device? Open ",fallbackSuffix:" and enter the device code:",copy:"Copy",copied:"Copied",copyLink:"Copy link",success:"Signed in",successHint:"Loading, will close automatically…",expiredTitle:"Device code expired",expiredHint:"Please restart the sign-in flow",deniedTitle:"Sign-in cancelled",retry:"Retry",closeBtn:"Close",failedTitle:"Login failed",errorHint:"Please upgrade kimi-code and try again",pollErrorTitle:"Lost connection",pollErrorHint:"Sign-in polling failed repeatedly. Check the kimi-code process and try again.",action:"Sign in",requiredTitle:"Sign in required",requiredMessage:"Sign in to your Kimi account and set up a model to start chatting.",goToLogin:"Sign in",upgradeRequiredTitle:"Upgrade to a membership",upgradeRequiredMessage:"Your current plan doesn't include Kimi models. Upgrade to a membership to unlock the full Kimi Code experience.",upgradeNow:"Upgrade now",pickModelTitle:"Choose a model",pickModelMessage:"Models are available. Pick a default model to start chatting.",pickModelAction:"Choose",configureModelsTitle:"Set up a model",configureModelsMessage:"You're signed in, but no model is available yet. Set up a model to start chatting.",configureModelsGenericMessage:"No model is available yet. Set up a model to start chatting.",configureModelsAction:"Set up",rcSubtitle:"Remote Control session",rcChecking:"Checking sign-in status…",rcLead:"This Remote Control session requires authorization. Sign in with your Kimi account to continue.",rcSuccessHint:"Redirecting…",rcExpiredTitle:"Authorization expired or declined",rcDeniedTitle:"Authorization cancelled",rcStartErrorTitle:"Could not start sign-in",rcSessionErrorTitle:"Could not create your session",rcConnectionErrorHint:"Check your connection and try again.",rcUnsupportedTitle:"Open in your browser",rcUnsupportedHintWechat:"Remote Control sign-in isn't supported in WeChat's built-in browser. Open this page in your system browser to continue.",rcUnsupportedHintLark:"Remote Control sign-in isn't supported in Lark's built-in browser. Open this page in your system browser to continue.",rcOpenInBrowser:"Open in browser",rcOpenGuideIos:'Tap "···" in the top-right corner, then choose "Open in Browser" or "Open in Safari".',rcOpenGuideAndroid:'Tap "···" in the top-right corner, then choose "Open in Browser".'},Lge={title:"Remote Control devices",subtitle:"Pick a device to continue",refresh:"Refresh",connectable:"Connectable",unavailable:"Unavailable",online:"Online",offline:"Offline",emptyTitle:"No devices yet",emptyHint:"Turn on Remote Control in Kimi Code on your computer — the device will show up here",docsLink:"Remote Control docs",allOfflineHint:"Device offline — turn on Remote Control in Kimi Code on that computer to bring it back",loadFailed:"Failed to load devices",deviceCount:"{count}/{max} devices",menuLabel:"Device actions",rename:"Rename",deactivate:"Take offline",delete:"Delete",renameTitle:"Rename device",renamePlaceholder:"Device name",deactivateTitle:"Take {name} offline",deactivateHint:"Once offline, the remote link to this device will stop working until you turn Remote Control back on in Kimi Code on the host machine",deleteTitle:"Delete {name}",deleteHint:"Once deleted, the device is removed from the list until you turn Remote Control back on in Kimi Code on the host machine",actionFailed:"Action failed. Check your connection and try again."},Rge={title:"Provider management",loading:"Loading providers…",unavailable:"Provider management is not available yet",empty:"No providers yet",status:{connected:"Connected",error:"Error",unconfigured:"Not configured"},keySet:"key set",keyNotSet:"key not set",managedBadge:"OAuth",kimiSubscription:"Kimi Subscription",modelCount:"{count} models",confirmDelete:"Confirm delete?",refresh:"Refresh",delete:"Delete",refreshTitle:"Refresh {type}",deleteTitle:"Delete {type}",loginKimi:"Sign in to Kimi",loginAnthropic:"Sign in to Anthropic",addProvider:"Add provider",added:"Provider added",enterApiKey:"Enter API Key",optional:"Optional",apiKeyRequired:"API Key cannot be empty",fieldId:"Name",fieldType:"API Protocol",types:{kimi:"Kimi",openai:"OpenAI",openai_responses:"OpenAI Responses",anthropic:"Anthropic","google-genai":"Google GenAI",vertexai:"Vertex AI"},fieldApiKey:"API Key",apiKeyManaged:"Signed in with OAuth",apiKeySet:"Set — enter a new key to replace",showApiKey:"Show API key",hideApiKey:"Hide API key",fieldBaseUrl:"Base URL",baseUrlPlaceholder:"https://api.example.com/v1",fieldModels:"Models",colModelId:"Model ID",colContext:"Context",colDisplayName:"Display name",modelIdPlaceholder:"kimi-k3",modelContextPlaceholder:"1048576",modelNamePlaceholder:"Optional",noModels:"No models",addModel:"Add model",removeModel:"Remove model",fieldDefaultModel:"Default model",save:"Save",saved:"Provider saved",deleteProvider:"Delete provider",deleteConfirm:"Delete {id} and its {count} models?",deleteConfirmYes:"Delete",add:"Add",groupManaged:"Kimi Subscription",groupCustom:"Custom providers",managedBuiltin:"Built-in",loginAction:"Sign in",emptyCustom:"No custom providers yet",emptyCustomHint:'Click "Add provider" above to get started',pendingConfig:"Pending setup",managedAccount:"Account",managedAccessMode:"Access mode",managedOauth:"Subscription (OAuth)",availableModels:"Available models ({count})",availableModelsLabel:"Available models",managedLoginTitle:"Sign in to Kimi Subscription",managedLoginHint:"Sign in to use Kimi models with automatic quota sync. Authorization completes in your browser.",loginToSeeModels:"Available after sign-in",refreshModels:"Refresh models",refreshModelsDone:"Models refreshed",refreshModelsFailed:"Failed to refresh models",managedReadonly:"Built-in provider. Configuration is read-only.",chipManual:"Custom",presets:{kimiForCoding:{name:"Kimi For Coding",desc:"Moonshot Coding Plan subscription via API key"},kimiForCodingGlobal:{name:"Kimi For Coding (kimi.ai)",desc:"Moonshot Coding Plan subscription via API key · kimi.ai"},zaiIntl:{name:"Z.ai Coding Plan",desc:"GLM models · Coding Plan subscription · z.ai"},zaiCn:{name:"BigModel Coding Plan",desc:"GLM models · Coding Plan subscription · bigmodel.cn"},deepseek:{name:"DeepSeek",desc:"Official DeepSeek API"},minimaxIntl:{name:"MiniMax Global",desc:"MiniMax M models · Token Plan subscription · minimax.io"},minimaxCn:{name:"MiniMax",desc:"MiniMax M models · Token Plan subscription · minimaxi.com"}},tags:{codingPlan:"Coding Plan",tokenPlan:"Token Plan",paygo:"Pay-as-you-go"},catalog:{sourceCatalog:"From models.dev",sourceManual:"Manual",sourceRegistry:"Registry",registryHint:"Import providers and models from an api.json registry; re-importing the same URL refreshes it",registryUrlLabel:"Registry URL",registryImported:"{count} providers imported",searchPlaceholder:"Search providers",loading:"Loading directory…",loadError:"Failed to load the directory. Check your network and retry.",retry:"Retry",empty:"No matching providers",rejected:"Not importable",rejectReason:{"unknown-explicit-type":"Unsupported protocol","proprietary-sdk":"Proprietary SDK — cannot be imported","empty-base-url":"Blank base URL","placeholder-base-url":"Endpoint contains an env placeholder"},backToList:"Back to directory",overwriteWarning:"A provider with this name already exists; importing overwrites its config and models",importAction:"Import"},fetchModels:{button:"Fetch model list",done:"Model list updated ({count} new)",noNew:"All remote models are already listed",empty:"The endpoint returned no models",unsupportedType:"Vertex AI does not support fetching model lists",error:{auth:"Authentication failed. Check your API Key.",notFound:"No model list endpoint found. Check the Base URL.",network:"Request failed. The endpoint may be unreachable or blocked by CORS.",timeout:"Request timed out. Retry later.",parse:"Unrecognized response format.",http:"Request failed (HTTP {status})"}},error:{idRequired:"Name cannot be empty",idInvalid:'Name must start with a letter or digit and may only contain letters, digits, "-", "_" and spaces',apiKeyRequired:"API Key cannot be empty",baseUrlRequired:"Base URL cannot be empty",registryUrlRequired:"Registry URL cannot be empty",modelRequired:"Model ID cannot be empty",contextSizeRequired:"Max context size cannot be empty",contextSizeInvalid:"Max context size must be a positive integer"},hintClose:"Close"},Pge={dialogLabel:"Switch model",title:"Switch model",close:"Close (Esc)",allTab:"All",providerTabs:"Model providers",searchPlaceholder:"Search models or providers…",clearSearch:"Clear search",loading:"Loading models…",unavailable:"Model list is unavailable",contextSuffix:"{size} ctx",capabilityImageInput:"Image input",capabilityVideoInput:"Video input",capabilityToolUse:"Tool use",capabilityThinking:"Thinking",capabilityAlwaysThinking:"Always thinking",emptyNoModels:"No models available",emptyNoMatch:"No matching models",starTitle:"Add to favorites",unstarTitle:"Remove from favorites",hintNavigate:"Navigate",hintSelect:"Select",hintClose:"Close",switchConfirmTitle:"Confirm model switch?",switchConfirmNew:"Start a new session",switchConfirmNewDesc:"No extra cost · best for a new task",switchConfirmCompact:"Compact and continue",switchConfirmCompactDesc:"Lower cost and better output quality when continuing this session",switchConfirmContinue:"Continue as-is",switchConfirmContinueDesc:"Output quality may suffer · cache loss may increase token usage",switchConfirmCancel:"Cancel",switchConfirmCancelDesc:"Stay on the current model",switchCompactAborted:"Compaction did not finish — model unchanged."},$ge={justNow:"just now"},Oge={browserDetails:"Action parameters",allowOp:"Allow Kimi Code to {verb} {name}",opVerb:{read:"read",grep:"search",glob:"find",edit:"edit",write:"write",delete:"delete"},field:{op:"Operation: {value}",tool:"Tool: {value}",base:"Base: {value}",cwd:"Working directory: {value}"},title:{browser:"Browser action",shell:"Run command?",diff:"Apply changes?",file:"Write file?",fileop:"File operation?",url:"Fetch URL?",search:"Search?",invocation:"Invoke?",todo:"Update todo?",plan_review:"Ready to build with this plan?",generic:"Approve action?"},subagentBadge:"sub agent · {name}",danger:"Danger: {detail}",searchQueryLabel:"query",searchScope:"scope: {scope}",feedbackPlaceholder:"Explain why you are rejecting…",approve:"Approve",approveSession:"Approve for session",reject:"Reject",feedback:"Feedback",feedbackSubmit:"Reject with feedback",feedbackCancel:"Cancel",approvePlan:"Approve plan",revise:"Revise",rejectAndExit:"Reject and Exit",expandPlan:"Expand",collapsePlan:"Collapse"},Fge={back:"Previous question",nextQuestion:"Next question",otherLabel:"Other",otherPlaceholder:"Share your thoughts…",submit:"Submit",dismiss:"Dismiss",minimize:"Minimize",expand:"Expand",hint:"↑↓ to choose · Enter to confirm"},Dge={tag:"tasks",summary:"{run} running · {done} done",copy:"Copy",calling:"Calling {label}",fieldTask:"Task",fieldOutput:"Output",fieldProgress:"Progress",fieldResult:"Result",moreLines:"… ({count} more)",copied:"Copied",stop:"stop",defaultDescription:"Background task",dockTasks:"Background tasks",dockBash:"Bash",dockSubagent:"Background Agent",dockTodos:"Todos",todoProgressTitle:"Progress",stateDone:"Done",stateFail:"Failed",stateCancelled:"Cancelled",filterRecent:"Recent",filterRunning:"Running",filterDone:"Done",filterAll:"All",running:"running",closePanel:"Close panel",openPanel:"Open in the side panel",timingRunning:"Running · {time}",timingDone:"Done · {time}",emptyTasks:"No background tasks running",emptyRecent:"No recent tasks",emptyRunning:"No running tasks",emptyDone:"No completed tasks",emptyBash:"No bash tasks running",emptySubagent:"No background agent tasks running",emptyTodo:"No todos yet",openTab:"Open the tasks tab",openDetail:"Open",toBackground:"To background",collapse:"Collapse",expand:"Expand",transcriptLoadError:"Failed to load this sub agent’s conversation.",copyCommand:"Copy command",copyOutput:"Copy output",copyAll:"Copy all"},Nge={panelTitle:"Thinking",streaming:"Thinking…"},Bge={aheadTitle:"ahead of remote",behindTitle:"behind remote",fileCountOne:"{number} file",fileCountOther:"{number} files",empty:"No git changes",clean:"Working tree clean, no changes",back:"Back",loading:"Loading diff…",noDiff:"No line changes for this file",emptyFile:"Empty file",list:"List",tree:"Tree"},zge={searchPlaceholder:"Search files",refresh:"Refresh",emptyTitle:"Select a file to preview",emptyHint:"Pick a file from the tree to preview it here",emptyDir:"(Empty)",loadError:"Failed to load files",retry:"Retry",copyPath:"Copy path",copied:"Copied",reveal:"Reveal in folder",treeShow:"Show file tree",treeHide:"Hide file tree",settings:"File tree settings",positionTitle:"File tree position",positionLeft:"Left",positionRight:"Right",resize:"Resize file tree",noSession:"No active session",noResults:"No matching files"},Hge={empty:"Select a file on the left to preview",loading:"Loading…",lineCount:"{count} lines",copy:"Copy",copied:"Copied",copyPath:"Copy path",openInEditor:"Open",openInSystemBrowser:"Open in system browser",openInPanelBrowser:"Open in side panel browser",openFailed:"Could not open the file",reveal:"Reveal",download:"Download",close:"Close",moreActions:"More actions",refresh:"Refresh",assumedResolution:"Resolved against the current workspace: {path}",truncatedNotice:"Large file: showing only the first {shown} of {total}. Download it to view the full content",htmlMode:"HTML preview mode",metadata:"Metadata",markdownMode:"Markdown preview mode",markdownCode:"Code",preview:"Preview",source:"Source",imageFit:"Image sizing",fit:"Fit",actual:"Actual",pdfNoPreview:"This PDF cannot be embedded here. Download it to view.",imageNoPreview:"Image file · {mime} · {size} · preview unavailable",binaryNoPreview:"Can't preview this file ({mime} · {size}). Open with another app",unknownType:"unknown type",copyCode:"Copy code",enlargeImage:"Enlarge image",errors:{emptyPath:"File path is empty",unsupportedPath:"URLs and remote paths cannot be previewed",outsideWorkspace:"Only files inside the current workspace can be previewed",isDirectory:"Select a file instead of a directory",notFound:"File no longer exists or was moved",notFoundInWorkspace:"Can't find {path} in the current workspace. It may belong to another project or directory",tooLarge:"File is too large to preview",loadFailed:"Unable to read this file"}},jge={copyImage:"Copy image",copyPath:"Copy path",saveAs:"Save as…",reveal:"Reveal in folder",openDefault:"Open with default app",prevImage:"Previous image",nextImage:"Next image",copyFailed:"Failed to copy",saveFailed:"Failed to save",revealFailed:"Could not open the containing folder",openFailed:"Could not open the file"},Wge={searching:"Searching…",noMatch:"No matches",files:"Files",skills:"Skills",openSkill:"Open skill file",copyPath:"Copy path",attachmentUploadFailed:"Couldn’t add attachment. Remove it or drop the file in again to retry",attachmentUploadInterrupted:"Adding attachment was interrupted. Remove it or drop the file in again to retry",viewFullscreen:"View fullscreen",mediaPreviewLoading:"Loading preview…",mediaPreviewUploading:"Adding attachment — preview when ready",mediaPreviewUnavailable:"Preview unavailable",stateUploading:"Preparing",stateUploaded:"Ready to send",stateUploadFailed:"Failed"},qge={dismiss:"Close",errorLabel:"Error",noteLabel:"Note",agentWarningFallback:"agent warning",unhandledEvent:"Unhandled event: {type}",agentError:{title:"Model request failed",connection:"Cannot connect to the model service",auth:"Model authentication failed",rateLimit:"Model rate limit reached",overloaded:"Model overloaded",filtered:"Response filtered by the provider",api:"Model API error",contextOverflow:"Context size exceeded"},details:{cause:"Cause",code:"Error code",connection:"Connection",contentType:"Content type",details:"Server details",duration:"Duration",endpoint:"Endpoint",errorName:"Error type",message:"Message",operation:"Operation",phase:"Failure phase",request:"Request",requestId:"Request ID",responsePreview:"Response preview",sessionId:"Session ID",stack:"Stack",status:"HTTP status",timeout:"Timeout",timestamp:"Time"},daemonApiTitle:"Request failed",daemonNetworkMessage:"No response from the Kimi Code service. Check that it is still running, or refresh the page.",daemonNetworkTitle:"Cannot connect",daemonTimeoutMessage:"The Kimi Code service did not respond within the wait limit. The operation may still complete in the background — refresh later to check, or try again.",daemonTimeoutTitle:"Response timed out",diagnostics:"Diagnostics",hideDetails:"Hide details",operationFailedMessage:"The last operation did not finish. Try again later.",operationFailedTitle:"Operation failed",sendFailedTitle:"Send failed",sendFailedNoDefaultModelMessage:"No default model is configured. Choose a model again in Settings",sessionOccupied:{title:"Session in use",message:"This session is in use by another Kimi Code process. Stop the session in that process or exit it, then try again.",retry:"Retry"},sessionStale:{title:"Session updated",message:"This session was updated by another Kimi Code process.",retryMessage:"This session was updated by another Kimi Code process. Review the updates, then try again."},sessionSnapshotMessage:"Could not load the current conversation. Check that the Kimi Code service is still running, or refresh the page.",sessionSnapshotTitle:"Cannot load current conversation",showDetails:"Show details",copyDetails:"Copy diagnostics",copied:"Copied",wsTitle:"Realtime connection error",goal:{alreadyExists:"This session already has an active goal. Cancel it before starting a new one.",notFound:"No goal to act on — it may have already finished or been cancelled.",statusInvalid:"The current goal state does not allow this action.",notResumable:"This goal cannot be resumed (it may be cancelled or completed).",objectiveTooLong:"The objective is too long. Please shorten it and try again."}},Vge={new:{desc:"Create a new session"},clear:{desc:"Clear and start a new session"},login:{desc:"Sign in to Kimi in the browser"},plan:{desc:"Toggle plan mode on/off"},swarm:{desc:"Toggle swarm mode; /swarm runs a task in swarm"},tower:{desc:"Toggle tower mode; /tower turns it on with a base branch"},goal:{desc:"Create/control a goal: /goal , /goal pause{'|'}resume{'|'}cancel"},btw:{desc:"Side chat: /btw asks a forked side session",argHint:"[question]"},compact:{desc:"Compact the conversation history",argHint:"[instructions]"},compactQueue:{queued:"Added to the queue — /compact will run in turn",alreadyQueued:"A /compact is already queued",compacting:"Compaction is already running — wait for it to finish",skippedAuto:"Skipped the queued /compact — context was already auto-compacted"},fork:{desc:"Fork this session into a new one"},reload:{desc:"Reload the session to pick up external changes",busy:"Session is busy — wait for the current turn to finish, then reload again.",archived:"Archived sessions cannot be reloaded — restore the session first."},export:{desc:"Download this session and troubleshooting logs as a ZIP",noSession:"Open a session before exporting it.",started:"Exporting session…",done:"Session exported.",tooLarge:"Session data exceeds the export size limit. Export it from a terminal instead: kimi export {sessionId} -o session.zip"},status:{desc:"View session status"},undo:{desc:"Undo the last message"}},Uge={browser:{noClickTarget:"No click: no interactive target",nearbyCount:"{count} nearby elements",element:"Page element",text:'"{text}"',textInElement:'"{text}" · {target}',keysOnElement:"{keys} · {target}",optionInElement:"{option} · {target}",option:"Option {index}",elementsCount:"{count} elements",elementsAtLeast:"At least {count} elements",tabsCount:"Tabs: {count}",up:"Up",down:"Down",left:"Left",right:"Right",activity:{pages:"Visited {count} page | Visited {count} pages",pagesRead:"Visited {count} page, read {read} | Visited {count} pages, read {read}",livePages:"Visited {count} page | Visited {count} pages",read:"Read {count} page | Read {count} pages",liveRead:"Read {count} page | Read {count} pages",doing:"{action} “{target}”",otherFailed:"{count} more failed",retried:"Retried {count} time | Retried {count} times",breakdown:"{count} browser action: {items} | {count} browser actions: {items}",breakdownItem:"{action} {count}",breakdownFailed:"{action} {count} ({failed} failed)",breakdownSeparator:", ",actions:{click:"{count} click | {count} clicks",fill:"{count} field filled | {count} fields filled",select:"{count} option chosen | {count} options chosen",check:"{count} checkbox toggled | {count} checkboxes toggled",screenshot:"{count} screenshot | {count} screenshots",scroll:"{count} scroll | {count} scrolls",press:"{count} key press | {count} key presses",drag:"{count} drag | {count} drags",hover:"{count} hover | {count} hovers"}},sources:{label:"Pages browsed in this reply",read:"Sources · read {count} page | Sources · read {count} pages",readAndPassed:"Sources · read {read} · passed through {passed}",visited:"Sources · visited {count} page | Sources · visited {count} pages",readGroup:"Pages read",passedGroup:"Pages passed through",readTag:"Read",passedTag:"Passed",visits:"Opened {count} times",openSidebar:"Open in the right panel",openExternal:"Open in your browser",copy:"Copy link",copied:"Link copied",dialogs:"{count} page dialog | {count} page dialogs",dialogsGroup:"Page dialogs",dialogAnswer:"Answered: {text}"},retry:{chip:"Retried {count} time | Retried {count} times",attempts:"Full sequence ({count} calls)"},live:{view:"View",viewLabel:"Open the right panel to watch the page the agent is using",thumb:"Latest before-action view"},detail:{rest:"Other fields",raw:"Raw data",rawRequest:"Request",rawResult:"Result",unreadable:"The result could not be parsed. The raw data is shown below.",yes:"Yes",no:"No",empty:"—",items:"{count} item | {count} items",blocks:"{count} block | {count} blocks",changes:"Changed by this step",unchanged:"The page state did not change",unchangedNote:"Unchanged fields are listed under Other fields.",urlExpand:"Show all",urlCollapse:"Show less",receiptOpen:"View the page before this step",receiptMissing:"This screenshot is no longer available. It may have expired or been deleted.",receiptDesktopOnly:"This screenshot is kept in the desktop app.",receiptStrip:"Pages before each step",blockPart:"Part {part}",blockContinued:"Continues",openShot:"View full size",titles:{elements:"Page elements",text:"Page text",candidates:"Click target and nearby elements",tabs:"Tabs",history:"History",downloads:"Downloads",deviceProfiles:"Device profiles",shot:"Screenshot",receipt:"Before this step",location:"Action location"},relation:{target:"Target",nearby:"Nearby"},facts:{target:"Target",url:"URL",text:"Text",replace:"Replace existing",keys:"Keys",optionValue:"Option value",optionLabel:"Option label",optionIndex:"Option index",checked:"Checked",point:"Position",from:"From",to:"To",deltaX:"Horizontal scroll",deltaY:"Vertical scroll",button:"Mouse button",clickCount:"Click count",radius:"Search radius",region:"Region",loadState:"Load state",conditionKind:"Condition",locatorRole:"Element role",locatorName:"Element name",locatorExact:"Exact match",conditionState:"Expected state",conditionText:"Text to wait for",conditionValue:"URL to wait for",conditionMatch:"Match mode",timeout:"Timeout",stableFor:"Stable for",scope:"Scope",scopeTarget:"Scope element",filterRole:"Role filter",filterText:"Text filter",cursor:"Cursor",deviceEnabled:"Device emulation",deviceProfile:"Device",deviceOrientation:"Orientation",evidenceKind:"Observed kind",evidenceValue:"Observed",evidenceCount:"Matches",evidenceScanTruncated:"Scan truncated",total:"Total",truncated:"Truncated",scanTruncated:"Scan truncated",nextCursor:"Next cursor",capturedAt:"Captured at",matched:"Matched",elapsed:"Elapsed",outcome:"Outcome",message:"Message",searchRadius:"Search radius used",candidatesTruncated:"Candidates truncated",needsVisualConfirmation:"Needs visual confirmation",available:"Browser available",panelVisible:"Panel visible",controlledTab:"Controlled tab",visibleTab:"Visible tab",imageSize:"Image size",viewport:"Viewport",deviceScaleFactor:"Device pixel ratio",cropAvailable:"Crop available",pageTitle:"Page",pageUrl:"Current URL",previousUrl:"Previous URL",loading:"Loading",canGoBack:"Can go back",canGoForward:"Can go forward",controlled:"Controlled",visible:"Visible"},columns:{ref:"Ref",role:"Role",name:"Name",text:"Text",value:"Value",state:"State",relation:"Relation",tagName:"Tag",id:"ID",classes:"Classes",clickable:"Clickable",disabled:"Disabled",evidence:"Evidence",bounds:"Bounds",tabId:"Tab",title:"Title",url:"URL",visitedAt:"Visited",filename:"File name",received:"Received",total:"Total size",startedAt:"Started",savePath:"Saved to",profileId:"Device",size:"Size",deviceScaleFactor:"Device pixel ratio",mobile:"Mobile",touch:"Touch",orientation:"Orientation",controlled:"Controlled",visible:"Visible",loading:"Loading"},states:{disabled:"Disabled",checked:"Checked",unchecked:"Unchecked",selected:"Selected",expanded:"Expanded",collapsed:"Collapsed",offscreen:"Offscreen"},errors:{SNAPSHOT_EXPIRED:"The snapshot expired. The page has to be read again.",OUTPUT_LIMIT:"The result exceeded the output limit.",BROWSER_USER_TAKEOVER:"You took over the browser, so automation stopped for this turn.",INVALID_REQUEST:"The request does not match the browser protocol.",BROWSER_UNAVAILABLE:"The built-in browser is not available right now.",TAB_NOT_FOUND:"This tab could not be found. It may have been closed.",TAB_NOT_ACTIVE:"This tab has not been selected for control yet.",NAVIGATION_FAILED:"The page navigation failed.",CANNOT_GO_BACK:"There is no history to go back to.",CANNOT_GO_FORWARD:"There is no history to go forward to.",WAIT_TIMEOUT:"Timed out before the condition was met.",OPERATION_ABORTED:"The operation was aborted.",STALE_SNAPSHOT:"The screenshot is stale. The page changed after it was captured.",COORDINATE_OUT_OF_BOUNDS:"The coordinate is outside the screenshot.",PAGE_NOT_READY:"The page is not ready yet. Try again shortly.",STALE_ELEMENT:"The element snapshot is stale. The page changed after it was read.",ELEMENT_NOT_FOUND:"This element could not be found on the page.",ELEMENT_NOT_INTERACTABLE:"The element cannot be interacted with. It may be covered, disabled or hidden.",UNSUPPORTED_ELEMENT:"This kind of element does not support the operation.",INTERNAL_ERROR:"The browser hit an internal error."}},actions:{waitCondition:{approval:"Wait for page condition",running:"Waiting for page condition",ok:"Page condition met",error:"Couldn’t wait for page condition"},crop:{approval:"View screenshot detail",running:"Viewing screenshot detail",ok:"Viewed screenshot detail",error:"Couldn’t view screenshot detail"},readText:{approval:"Read page text",running:"Reading page text",ok:"Read page text",error:"Couldn’t read page text"},guardedClick:{approval:"Inspect and click control",running:"Checking click target",ok:"Clicked control",error:"Could not inspect or click control"},listHistory:{approval:"Read browsing history",running:"Reading browsing history",ok:"Read browsing history",error:"Could not read browsing history"},listDownloads:{approval:"Read download records",running:"Reading downloads",ok:"Read downloads",error:"Could not read downloads"},listDevices:{approval:"List device presets",running:"Listing device presets",ok:"Listed device presets",error:"Could not list device presets"},setDevice:{approval:"Change device mode",running:"Configuring device mode",ok:"Configured device mode",error:"Could not configure device mode"},inspectBrowser:{approval:"Inspect browser state",running:"Inspecting browser",ok:"Inspected browser",error:"Browser inspection failed"},showBrowser:{approval:"Show browser panel",running:"Showing browser",ok:"Showed browser",error:"Couldn’t show browser"},createTab:{approval:"Open a new tab",running:"Opening new tab",ok:"Opened new tab",error:"Couldn’t open tab"},switchTab:{approval:"Show tab",running:"Switching tab",ok:"Switched tab",error:"Couldn’t switch tab"},activateTab:{approval:"Take control of tab",running:"Taking control of tab",ok:"Took control of tab",error:"Couldn’t take control of tab"},releaseTab:{approval:"Release tab control",running:"Releasing tab",ok:"Released tab",error:"Couldn’t release tab"},closeTab:{approval:"Close tab",running:"Closing tab",ok:"Closed tab",error:"Couldn’t close tab"},inspectPage:{approval:"Inspect page state",running:"Inspecting page",ok:"Inspected page",error:"Page inspection failed"},navigate:{approval:"Open page",running:"Opening page",ok:"Opened page",error:"Couldn’t open page"},search:{approval:"Search the web",running:"Searching",ok:"Searched",error:"Couldn’t search"},back:{approval:"Go back",running:"Going back",ok:"Went back",error:"Couldn’t go back"},forward:{approval:"Go forward",running:"Going forward",ok:"Went forward",error:"Couldn’t go forward"},reload:{approval:"Reload page",running:"Reloading page",ok:"Reloaded page",error:"Page reload failed"},stop:{approval:"Stop loading page",running:"Stopping page load",ok:"Stopped page load",error:"Couldn’t stop page load"},wait:{approval:"Wait for page to load",running:"Waiting for page",ok:"Page loaded",error:"Page wait failed"},screenshot:{approval:"Capture page screenshot",running:"Capturing page",ok:"Captured page",error:"Page capture failed"},click:{approval:"Click page element",running:"Clicking",ok:"Clicked",error:"Click failed"},doubleClick:{approval:"Double-click page element",running:"Double-clicking",ok:"Double-clicked",error:"Double-click failed"},rightClick:{approval:"Right-click page element",running:"Right-clicking",ok:"Right-clicked",error:"Right-click failed"},hover:{approval:"Hover over page element",running:"Hovering",ok:"Hovered",error:"Hover failed"},scroll:{approval:"Scroll page",running:"Scrolling page",ok:"Scrolled page",error:"Page scroll failed"},drag:{approval:"Drag page element",running:"Dragging",ok:"Dragged",error:"Drag failed"},fill:{approval:"Fill page field",running:"Filling",ok:"Filled",error:"Fill failed"},type:{approval:"Type text",running:"Typing",ok:"Typed",error:"Typing failed"},press:{approval:"Send keystrokes",running:"Pressing",ok:"Pressed",error:"Key press failed"},elements:{approval:"Inspect page elements",running:"Inspecting page elements",ok:"Inspected page elements",error:"Element inspection failed"},select:{approval:"Select option",running:"Selecting",ok:"Selected",error:"Selection failed"},check:{approval:"Check option",running:"Checking",ok:"Checked",error:"Couldn’t check"},uncheck:{approval:"Uncheck option",running:"Unchecking",ok:"Unchecked",error:"Couldn’t uncheck"},reveal:{approval:"Scroll to page element",running:"Scrolling to element",ok:"Scrolled to element",error:"Couldn’t scroll to element"},other:{approval:"Use browser",running:"Using browser",ok:"Browser action completed",error:"Browser action failed"}}},label:{read:"Read",bash:"Run",edit:"Edit",write:"Write",grep:"Search",glob:"Find",ls:"List",web_fetch:"Fetch",search:"Search",todo:"Todo",task:"Task",swarm:"Swarm",ask_user:"Question",plan:"Plan",goal_create:"Start Goal",goal_get:"Read Goal",goal_budget:"Set Goal Budget",goal_update:"Update Goal",waitfor:"Wait",task_list:"List Tasks",task_output:"Read Task Output",task_stop:"Stop Task",cron_create:"Schedule Job",cron_create_once:"Schedule One-Shot Job",cron_list:"Cron Jobs",cron_delete:"Delete Cron Job",notify_user:"Progress update",skill:"Skill"},cron:{none:"No cron jobs",field:{id:"ID",cron:"Cron expression",schedule:"Schedule",prompt:"Prompt",recurring:"Repeats",nextFireAt:"Next run"},recurring:{yes:"Recurring",no:"One-shot"},schedule:{everyMinute:"Every minute",everyNMinutes:"Every {n} minutes",hourlyAt:"Hourly at minute {minute}",dailyAt:"Daily at {time}",weekdaysAt:"Weekdays at {time}",weeklyAt:"{day} at {time}",monthlyAt:"Monthly on day {day} at {time}",yearlyAt:"Yearly on {date} at {time}",onceAt:"{date} at {time}",dateMD:"{month} {day}",day:{0:"Sundays",1:"Mondays",2:"Tuesdays",3:"Wednesdays",4:"Thursdays",5:"Fridays",6:"Saturdays"},monthShort:{1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"}}},waitfor:{waitingAny:"Waiting for any background task",waitingTask:"Waiting for {id}",noTasks:"No background tasks running",timedOut:"Timed out",interrupted:"Wait interrupted by new input",stillRunning:"{count} still running",moreRunning:"+{count} more",result:{completed:"A task finished",interrupted:"Interrupted by new input"},field:{result:"Result",task:"Task",taskStatus:"Task status",description:"Description",waited:"Waited",timeout:"Timeout",finishedDuringWait:"Finished during wait",stillRunning:"Still running",runningTasks:"Running tasks",warning:"Warning"}},bgTask:{active:"Active tasks",all:"All tasks",count:"{count} task | {count} tasks",none:"No background tasks",truncated:"Output truncated",kind:{process:"Command",agent:"Agent",question:"Question"},status:{running:"Running",completed:"Completed",failed:"Failed",timed_out:"Timed out",killed:"Stopped",lost:"Lost"},field:{status:"Status",kind:"Type",command:"Command",pid:"PID",exit_code:"Exit code",subagent_type:"Agent type",model:"Model",reason:"Reason",stop_reason:"Reason",output_path:"Output file"}},swarm:{progress:"{done} / {total}",runningSub:"{count} in progress",doneSub:"{completed} completed · {failed} failed",doneSubWithCancelled:"{completed} completed · {failed} failed · {cancelled} cancelled",phaseWorking:"Running",phaseQueued:"Queued",phaseSuspended:"Paused",phaseCompleted:"Finished",phaseFailed:"Error",phaseCancelled:"Cancelled",waiting:"Waiting for subagents…"},chip:{lines:"{count} lines",results:"{count} results",files:"{count} files",edited:"edited",created:"created",todos:"{count} items"},disclosure:{expand:"Expand details",collapse:"Collapse details"},agent:{foreground:"Foreground",background:"Background",foregroundAgent:"Agent",backgroundAgent:"Background Agent",status:{running:"Running",ok:"Completed",error:"Failed",cancelled:"Cancelled"}},notifyUser:{posting:"Posting an update…"},output:{waiting:"Waiting for output…",empty:"No output"},plan:{review:{pending:"Pending review",approved:"Approved",rejected:"Rejected",cancelled:"Cancelled"},selectedOption:"Selected",pathOnlyHint:"No inline content — open it in the side panel:",feedback:"Feedback"},summary:{inScope:"{value} in {scope}"},goal:{objectiveWithCriterion:"{objective} · {criterion}",status:"Status: {status}",budget:"{value} {unit}",turns:"{value} turns",tokens:"{value} tokens",milliseconds:"{value} ms",seconds:"{value} sec",minutes:"{value} min",hours:"{value} hr"},group:{countOther:"{count} tool call | {count} tool calls",typed:{read:{done:"Read {count} file | Read {count} files"},bash:{done:"Ran {count} command | Ran {count} commands"},grep:{done:"Searched {count} pattern | Searched {count} patterns"},search:{done:"Ran {count} web search | Ran {count} web searches"},glob:{done:"Matched {count} file pattern | Matched {count} file patterns"},ls:{done:"Listed {count} directory | Listed {count} directories"},web_fetch:{done:"Fetched {count} page | Fetched {count} pages"},edit:{done:"Made {count} edit | Made {count} edits"},write:{done:"Wrote {count} file | Wrote {count} files"},browser:{done:"Ran {count} browser action | Ran {count} browser actions"}}},activity:{failedClause:" ({count} failed)",liveDonePrefix:"",busy:"Working…",doing:{read:"Reading {subject}",bash:"Running a command",grep:"Searching {subject}",search:"Searching {subject}",glob:"Matching {subject}",ls:"Listing {subject}",web_fetch:"Fetching {subject}",edit:"Editing {subject}",write:"Writing {subject}",browser:"Using the browser"}},ask:{dismissed:"Dismissed",answer:"{count} answer",answers:"{count} answers",answered:"Answered",more:"(+{count} more)",collected:"Collected your answers",unanswered:"No answer"}},Kge={resizeHandleAria:"Resize sidebar width",resizePreviewAria:"Resize preview panel width",detailPanelAria:"Detail panel"},Zge={openSwitcher:"Switch session / workspace",openSettings:"Session settings",settingsTitle:"Settings",groupSession:"Current session",groupApp:"App preferences",groupAccount:"Account",sheetLabel:"Sheet",closeSheet:"Close",tapToCycle:"tap to cycle",running:"running",idle:"idle",sessionCount:"{n} sessions",newSession:"New session",permManualSub:"Auto-read only; everything else needs your approval first",permAutoSub:"Never interrupts you; everything runs and is decided automatically",permYoloSub:"Routine edits and commands run automatically; risky actions, questions, and plans still ask",planModeSub:"Plan mode",goalModeSub:"Goal mode",swarmModeSub:"Swarm mode",towerModeSub:"Tower mode",archivedSessions:"Archived sessions",archivedSessionsSub:"Browse and restore archived sessions",archivedBack:"Back",viewFlat:"Flat",viewGrouped:"By workspace"},Gge={colorSchemeLabel:"Appearance",light:"Moon bright",dark:"Moon dark",system:"System"},Qge={continue:"Continue",back:"Back",skip:"Skip",welcome:{title:"Welcome to Kimi Code",subtitle:"The AI coding workbench for professional developers",languageLabel:"Language",themeLabel:"Appearance"},login:{title:"Configure Model",subtitle:"Choose the model service that powers Kimi Code. You can change it later in Settings",kimiTitle:"Sign in with Kimi",kimiHint:"Ready out of the box with Kimi membership benefits",kimiCnTitle:"Kimi Code",kimiCnHint:"Sign in with your kimi.com account",kimiOverseasTitle:"Kimi Code",kimiOverseasHint:"Sign in with your kimi.ai account",customProviderTitle:"Add a custom provider",customProviderHint:"Bring your own API key for OpenAI-compatible and other services",loggedInTitle:"Logged in with Kimi",loggedInHint:"Your model service is ready to use",finish:"Finish",skip:"Skip for now"}},Yge={title:"Settings",close:"Close (Esc)",tabs:{general:"General",browser:"Browser",agent:"Agent & Sessions",account:"Account",providers:"Model Providers",remoteControl:"Remote Control",advanced:"About",archived:"Archived Sessions",shortcuts:"Hotkeys",plugins:"Plugins",lab:"Lab"},lab:{sidebarTabs:"Tabbed session list",sidebarTabsHint:"The sidebar shows Open / Done / Workspaces tabs",notifyUser:"Progress updates",notifyUserHint:"Let the agent post progress updates in the conversation. Only applies to sessions created afterwards."},plugins:{retry:"Retry",official:"Official",thirdParty:"Third-party",installed:"Installed",install:"Install",update:"Update",remove:"Remove",enabled:"Enabled",homepage:"Homepage",empty:"No plugins found",hasErrors:"Error",customInstall:"Install custom plugin",customInstallPlaceholder:"https://… or /path/to/plugin",customInstallHint:"Accepts an https zip URL, a GitHub repo URL, or a local directory path.",extensionHintTitle:"One step left: install the browser extension",extensionGuide:"Manual install",dismissHint:"Dismiss",catalogUnavailable:"The marketplace catalog is currently unreachable; installed plugins remain manageable below.",source:{"local-path":"Local","zip-url":"ZIP",github:"GitHub"},counts:{skill:"1 skill | {n} skills",mcp:"1 MCP server | {n} MCP servers",mcpEnabled:"{n} on",hook:"1 hook | {n} hooks",command:"1 command | {n} commands"}},appearance:"Appearance",notifications:"Notifications",notifyEnabled:"System notifications",notifyEnabledHint:"Send a system notification when a turn completes, needs an answer, or needs approval",notifySound:"Notification sound",notifySoundHint:"Play the system sound with notifications",notifyDenied:"Blocked in browser settings",notifyTitle:"Kimi Code · Turn finished",notifyQuestionTitle:"Kimi Code · Needs answer",notifyApprovalTitle:"Kimi Code · Approval required",notifyFallback:"View result",notifyQuestionFallback:"A question is waiting for your answer",notifyApprovalFallback:"A tool needs your approval",account:"Account",signedIn:"Signed in",signedOutHint:"Sign in to view your account and model access",planUsage:{title:"Plan Usage",retry:"Retry",loadFailed:"Failed to load",empty:"No usage data yet",weekLimit:"Weekly limit",hourLimit:"{n}h limit",resetsIn:"resets in {duration}",resetDone:"reset",durationDay:"{n}d",durationHour:"{n}h",durationMinute:"{n}m",durationSecond:"{n}s",usedPct:"{pct}% used",segmentUsage:"{name} usage {pct}%",boosterTitle:"Booster",boosterBalance:"Balance",monthlyUsed:"Used this month",monthlyLimit:"Monthly limit",boosterLimit:"Monthly limit",unlimited:"Unlimited",freeTitle:"Free account",freeHint:"Your current plan doesn't include Kimi models. Upgrade to a membership to unlock the full Kimi Code experience."},colorSchemeHint:"Choose the app’s light or dark appearance",appIcon:"Dock icon",appIconHint:"Choose the icon shown in the Dock",appIconDefault:"Default",appIconBlack:"Black",uiFontSize:"Font size",uiFontSizeHint:"Adjust interface and message text size",vibrancy:"Frosted sidebar",vibrancyHint:"Use the native macOS frosted-glass material behind the sidebar — turn it off if the translucency is hard to read",nativeTitleBar:"Use system title bar",nativeTitleBarHint:"Show the desktop environment’s native title bar and menu bar instead of the built-in one",nativeTitleBarRestartTitle:"Restart to apply",nativeTitleBarRestartMessage:"Changing the title bar style requires restarting Kimi Code. Restart now?",nativeTitleBarRestartConfirm:"Restart now",languageHint:"Choose the interface language",defaultOpenInApp:"Default open-in app",defaultOpenInAppHint:"App used when opening files and folders from the header menu",openWith:"Open with",agentDefaults:"Agent defaults",saving:"Saving",defaultModel:"Default model",defaultModelHint:"New sessions prefer this model",noDefaultModel:"No default model",defaultPermission:"Default permission",defaultPermissionHint:"Only affects newly-created sessions",defaultThinking:"Thinking by default",defaultThinkingHint:"Whether new sessions start with thinking enabled",defaultPlanMode:"Plan mode by default",defaultPlanModeHint:"Whether new sessions start in plan mode",secondaryModelSection:"Subagents",secondaryModel:"Subagent model",secondaryModelHint:"Model and thinking effort that subagents use by default",secondaryModelEffort:"Thinking effort",noSecondaryModel:"Not set (inherit primary)",secondaryModelEffortAuto:"Model default",telemetry:"Help improve Kimi Code",telemetryHint:"When on, we collect usage data (such as feature clicks and usage statistics) to analyze and improve the product experience. This data never includes your code or conversation content. You can turn it off at any time. Changes take effect after a restart.",sessionRatingPrompts:"Session rating prompts",sessionRatingPromptsHint:"Occasionally asks you to rate this session after Kimi replies",credentialReady:"Credential configured",credentialMissing:"Missing credential",configUnavailable:"The server did not return config yet. These settings are unavailable.",versionAndUpdates:"Version & updates",appVersion:"App version",appVersionHint:"The running app’s version",checkUpdate:"Check for updates",checkUpdateHint:"Manually check whether a new version is available",checkUpdateBtn:"Check now",updateChecking:"Checking…",updateCheckLatest:"You’re on the latest version",updateCheckAvailable:"Version {version} is available — download it from the update entry in the sidebar",updateCheckUnsupported:"This build does not support update checks",updateCheckFailed:"Check failed. Please try again later.",updateCheckAvailableAuto:"Version {version} found — downloading in the background",updateCheckDownloaded:"Version {version} is ready — restart from the update entry in the sidebar",autoDownloadUpdate:"Auto-download updates",autoDownloadUpdateHint:"Download new versions in the background and install them on the next restart",canaryTargetVersion:"Preview of {version}",canaryUpdate:"Update Canary",canaryImportStable:"Import UI Settings from Stable…",canaryImportStableTitle:"Import UI Settings from Stable",canaryImportStableHint:"Copies the stable app’s UI settings (pinned sessions, appearance, and other localStorage preferences) into Canary, replacing the current ones (the existing copy is backed up as leveldb.bak). Canary restarts to finish the import; the stable app must stay quit.",canaryImportStableBtn:"Import & Restart",canaryImportStableRunning:"The stable app (Kimi Code) is running — quit it first, then import again.",canaryImportStableNoData:"No UI settings data from the stable app was found.",canaryImportStableFailed:"Import failed: {error}",privacy:"Data & privacy",diagnostics:"Diagnostics",agreements:"Agreements",userAgreement:"User Agreement",privacyPolicy:"Privacy Policy",messageFolding:"Message folding",turnFolding:"Auto-fold messages",turnFoldingHint:"When a turn ends, the work folds away automatically, leaving only the summary",activityRunFolding:"Tool call summary",activityRunFoldingHint:"During the answer, consecutive tool calls are summarized into one row",sessionTitleSection:"Session title",autoSessionTitle:"Auto-generate title",autoSessionTitleHint:"Use AI to title new sessions after the first turn. This uses your Kimi subscription quota",build:"Build",serverVersion:"Server version",serverAddress:"Server address",serverAddressHint:"The address of the connected server",serverVersionHint:"The version of the connected service",coreRef:"Built-in server version",coreRefHint:"Branch and commit of the core repo the built-in server runs from",copyServerVersion:"Copy server version",copyServerAddress:"Copy server address",copied:"Copied",exportLog:"Troubleshooting log",exportLogHint:"Export the troubleshooting log collected by the app",logHint:"Enable with ?debug=1 to capture",exportLogBtn:"Export log",archivedTitle:"Archived sessions",archivedDesc:"Browse archived sessions, see their workspace path, name, and archive time, and restore them to the session list.",archivedSearch:"Search archived sessions",archivedAllWorkspaces:"All workspaces",archivedSortLabel:"Sort by",archivedSortArchived:"Archive time",archivedSortCreated:"Created time",archivedSortName:"Name",archivedRestore:"Restore",archivedEmpty:"No archived sessions yet",archivedNoMatch:"No matching archived sessions",archivedSessionsCount:"{count} sessions",archivedAt:"Archived {time}",archivedLoadMore:"Load more",archivedLoading:"Loading…",archivedLoadingAll:"Loading all archived sessions…"},Jge={openInEditor:"Open in editor",openInEditorShort:"Open",openInApp:"Open in {app}",chooseOpenApp:"Choose application",copyAll:"Copy all as Markdown",copyFinalSummary:"Copy final summary",copied:"Copied",lastUsed:"Last used",copyPath:"Copy path",changed:"{n} changed",gitTooltip:"Open Files > Changed",detached:"detached",openPr:"Open pull request",prStatusOpen:"open",prStatusClosed:"closed",prStatusMerged:"merged",prStatusDraft:"draft",prStatusUnknown:"unknown",options:"Options",copySessionId:"Copy session ID",pinSession:"Pin",unpinSession:"Unpin",renameSession:"Rename",forkSession:"Fork session",archiveSession:"Archive",markSessionDone:"Mark as done",reopenSession:"Mark as open",exportSession:"Export session",reloadSession:"Reload session",sessionReloaded:"Session reloaded.",devBadge:"Running in development mode"},Xge={title:"Side Chat",empty:`Read-only Q&A based on the current session context. +The conversation cannot be recovered after closing.`,placeholder:"Ask a question about the current session…",send:"Send",requiresSession:"Open a session to use side chat"},e2e={comment:"Comment",addToChat:"Add to chat",commentPlaceholder:"Write a comment…",confirm:"Add",copyQuote:"Copy quote",copyComment:"Copy comment",quoteLabel:"Quote"},t2e={actions:{nextPanelTab:{label:"Next Panel Tab",desc:"Switch to the next panel tab"},previousPanelTab:{label:"Previous Panel Tab",desc:"Switch to the previous panel tab"},summonApp:{label:"Show App Window",desc:"Bring the app window to the foreground from anywhere"},captureScreenshot:{label:"Screenshot",desc:"Capture a screen region with a comment from anywhere"},newSession:{label:"New Session",desc:"Start a new session in the current workspace"},closeSessionView:{label:"Close Page",desc:"Close the current chat and go to the new-chat page; press again there to close the window"},searchSessions:{label:"Search Chats",desc:"Open the session search dialog"},archiveSession:{label:"Complete Chat",desc:"Mark the current chat as done right away (find it under Done)"},toggleSideChat:{label:"Toggle Side Chat",desc:"Open or close the /btw side chat"},toggleSidebar:{label:"Toggle Sidebar",desc:"Collapse or expand the session sidebar"},toggleRightPanel:{label:"Toggle Right Panel",desc:"Show or hide the right panel"},openFolder:{label:"Open Folder",desc:"Add a workspace folder with the native picker"},openInDefaultApp:{label:"Open in App",desc:"Open the workspace in your default editor/terminal"},openSettings:{label:"Open Settings",desc:"Show or hide the settings dialog"},toggleTerminal:{label:"Toggle Terminal",desc:"Show or hide the bottom terminal panel"},openDiffTab:{label:"Open Changes",desc:"Open or activate the workspace changes tab"},toggleFilesPanel:{label:"File Tree",desc:"Open or activate the file tree tab; hide the right panel if already active"},sidebarTabOpen:{label:"Open Tab",desc:"Switch to the Open list in the sidebar"},sidebarTabDone:{label:"Done Tab",desc:"Switch to the Done list in the sidebar"},sidebarTabWorkspaces:{label:"Workspaces Tab",desc:"Switch to the workspace directory in the sidebar"},selectPrevSibling:{label:"Previous Item",desc:"Select the previous chat / workspace in the current tab"},selectNextSibling:{label:"Next Item",desc:"Select the next chat / workspace in the current tab"},send:{label:"Send Message",desc:"Send the composer input"},newline:{label:"Newline",desc:"Insert a newline in the composer"}},searchPlaceholder:"Search shortcuts",unassigned:"Unassigned",unassign:"Unassign shortcut",edit:"Edit shortcut",reset:"Reset to default",resetAll:"Reset all to defaults",recording:"Press the new shortcut…",invalid:"This key combination can’t be used as a shortcut",notGlobal:"This key combination can’t be registered as a system-wide shortcut",globalTaken:"This shortcut is already taken by the system or another app",channelDisabled:"This build does not enable the system-wide screenshot shortcut",reserved:"Reserved by the system menu",reservedSteer:"Reserved for steer (Ctrl/Cmd+S)",reservedFind:"Reserved for transcript find (Ctrl/Cmd+F)",conflict:"Already used by “{action}”",customBadge:"Custom"},n2e={closeRunningTitle:"Close running terminals?",closeRunningMessage:"The following tabs still have running programs. Closing will terminate them:",closeRunningConfirm:"Terminate and close",closeUnknown:"Could not determine process status",panelAria:"Terminal",toolbarAria:"Terminal tabs",resizeAria:"Resize terminal panel height",toggle:"Toggle terminal",open:"Open terminal",close:"Close terminal",newTab:"New terminal",closeTab:"Close terminal",restartTab:"Restart terminal",collapse:"Collapse terminal panel",empty:"No terminal yet — click to start one",outputTruncated:"[Earlier background output was truncated; showing the latest output]",processExited:"[process exited]",processExitedWithCode:"[process exited with code {code}]"},i2e={compactionUnavailable:"Summary content is not loaded. Load the corresponding history in the conversation.",terminalRestoreFailed:"Could not create terminal",closeOthers:"Close Other Tabs",closeToRight:"Close Tabs to the Right",closeAll:"Close All Tabs",tabs:{diff:"Changes",file:"File",files:"Files",turnDiff:"Turn Diff",compaction:"Compaction summary",agent:"Subagent",term:"Terminal",browser:"Browser"},newTab:"New tab",closeTab:"Close tab",expand:"Expand panel",collapse:"Restore panel",hide:"Close right panel",openPanel:"Open right panel",launcherAria:"Quick open"},o2e={saveDialog:{download:"Save download",screenshot:"Save page screenshot"},permissionPending:"Waiting for website permission",beforeUnload:{title:"Leave page",message:"Changes you made may not be saved",stay:"Stay on page",leave:"Leave"},pageDialogs:{says:"{origin} says",pageSays:"This page says",ok:"OK",close:"Close",cancel:"Cancel",promptLabel:"Text for the page",leaveTarget:"Next page: {target}",leaveRepeatForm:"This page was submitting a form. After you choose Leave, submit it again.",leaveRepeatAction:"This page stays open. After you choose Leave, repeat the action that leaves it.",fileTitle:"{origin} wants a file",fileMessage:"Accepted types: {types}",fileAny:"The page asks for a file to upload.",chooseFiles:"Choose files…",uploadTitle:"Allow upload?",uploadMessage:"Upload the following files ({count}) to {origin}?",allowOnce:"Allow once",deny:"Deny",downloadTitle:"Download saved",downloadMessage:"{file} was saved to {path}.",move:"Move…",keep:"Keep",agentTab:"Agent in control",agentTabHint:"The agent can answer this. You can also answer it yourself.",agentChose:"Agent chose {choice}",agentRequestHint:"The agent asked to upload these files. Only you can allow it."},dialogRecords:{button:"Handled page dialogs",title:"Page dialogs this session",answeredBy:"{outcome} {answerer}",showInFolder:"Show in folder",move:"Move…",kinds:{alert:"Alert",confirm:"Confirmation",prompt:"Text prompt",beforeunload:"Leave site?",file:"File chooser",upload:"Upload approval",download:"Download","external-app":"External app link",print:"Print","screen-capture":"Screen sharing",bluetooth:"Bluetooth pairing","file-picker":"File system picker"},outcomes:{accepted:"Accepted",dismissed:"Dismissed",left:"Left the page",stayed:"Stayed on the page",uploaded:"Uploaded files",saved:"Saved",denied:"Denied","timed-out":"Timed out",cancelled:"Closed by the page",blocked:"Blocked","too-large":"Blocked: size limit"},answerers:{agent:"by the agent",user:"by you",auto:"automatically"}},records:{searchHistory:"Search history",searchDownloads:"Search downloads",noResults:"No matching records",today:"Today",yesterday:"Yesterday"},sites:{permissionTitle:"Website permission",backToList:"Back to site list",title:"Site settings",info:"Site information",search:"Search sites",all:"All sites",empty:"No sites yet",cookies:"Cookies: {count}",deleteData:"Delete site data",clearMessage:"Delete cookies and local data for {origin}? This may sign you out.",failed:"Could not update site settings. Try again.",permissionRequest:"Allow {origin} to use {permissions}?",allowOnce:"Allow once",allowAlways:"Always allow",block:"Block",states:{ask:"Ask",allow:"Allow",block:"Block"},systemPermissionDenied:"System permission not granted",openSystemSettings:"Open System Settings",permissions:{location:"Location",camera:"Camera",microphone:"Microphone",notifications:"Notifications",clipboard:"Read clipboard",clipboardWrite:"Write to clipboard",fullscreen:"Fullscreen",midi:"MIDI devices",midiSysex:"MIDI system exclusive messages"}},controlPaused:"Waiting for you to continue",controlUnknown:"Connection lost; control status unknown",controlOverlayRunning:"Agent is in control",controlOverlayPaused:"Agent paused — waiting for you",controlOverlayUnknown:"Checking browser control status",controlElapsed:"In control for {time}",controlTakeover:"Take over",controlTakeoverHint:"Stop browser actions and take control",controlPointer:"Agent",controlTyping:"Typing",controlKey:"Pressing keys",controlScroll:"Scrolling",controlActivityTarget:"{activity} “{target}”",controlActivities:{reading:"Reading page text",inspecting:"Looking at page elements",capturing:"Capturing the page",clicking:"Clicking",hovering:"Hovering",typing:"Typing",pressing:"Pressing keys",selecting:"Choosing an option",checking:"Toggling a checkbox",scrolling:"Scrolling",dragging:"Dragging",navigating:"Opening page",waiting:"Waiting for the page",answering:"Answering a page dialog"},controlledTab:"Agent is controlling this tab",controlOutOfView:"Agent is using the browser",forkTabsFailed:"Session forked, but browser tabs couldn’t be copied",ariaLabel:"Browser",navigationAria:"Browser navigation",back:"Back",forward:"Forward",reload:"Reload",menuButton:"Browser menu",openInDefaultBrowser:"Open in default browser",menu:{emulateFocus:"Keep the page focused",findInPage:"Find in page",print:"Print",zoom:"Zoom",zoomOut:"Zoom out",zoomReset:"Reset zoom",zoomIn:"Zoom in",showDeviceToolbar:"Show device toolbar",hideDeviceToolbar:"Hide device toolbar",screenshot:"Take a screenshot"},find:{placeholder:"Find in page",previous:"Previous match",next:"Next match",close:"Close find"},device:{size:"Size",phones:"Phones",foldables:"Foldables",tablets:"Tablets",desktops:"Desktop",iphoneDuoInner:"iPhone Duo inner display",iphoneDuoOuter:"iPhone Duo outer display",resizewidth:"Drag to resize page width",resizeheight:"Drag to resize page height",resizeboth:"Drag to resize page width and height","iphone-16":"iPhone 14 Pro / 16","iphone-16-pro":"iPhone 16 Pro / 17 / 17 Pro","iphone-16-pro-max":"iPhone 16 Pro Max / 17 Pro Max","pixel-8":"Pixel 8","pixel-9":"Pixel 9","desktop-1280":"Desktop 1280 × 800","desktop-1440":"Desktop 1440 × 900","desktop-1920":"Desktop 1920 × 1080",background:"Background",backgroundAuto:"Follow theme",backgroundLight:"Light background",backgroundDark:"Dark background",toolbarAria:"Device emulation toolbar",dimensions:"Dimensions:",responsive:"Responsive",iphoneSe:"iPhone SE",iphone12Pro:"iPhone 12 Pro",iphone14Pro:"iPhone 14 Pro / 16",iphone14ProMax:"iPhone 14 Pro Max",pixel7:"Pixel 7",galaxyS20Ultra:"Samsung Galaxy S20 Ultra",ipadMini:"iPad Mini",ipadPro13:"iPad Pro 13",width:"Viewport width",height:"Viewport height",rotate:"Rotate device",scale:"Display scale",fitToWindow:"Fit to window"},settings:{searchEngine:"Default search engine",searchEngineHint:"Used when searching from the address bar",title:"Browser settings",sectionAria:"Browser settings section",agentControl:"Let agents control the built-in browser",agentControlHint:"When off, new chats can’t use the browser. Chats that already used it keep it. You can still browse in the panel.",downloadsPrompt:"Ask where to save each file",downloadsPromptHint:"Show a save dialog before a download starts",agentDownloadLocation:"Agent download location",agentDownloadLocationHint:"Default location for files that agents download. Agent downloads are saved here automatically, without a dialog.",agentDownloadChoose:"Choose…",agentDownloadReset:"Use default",agentDownloadAccess:"Allow access",agentDownloadAccessHint:"Agent downloads go to your Downloads folder. Your system may ask to allow Kimi Code to access it.",agentDownloadAccessRetry:"Try again",agentDownloadFallback:"Kimi Code cannot access your Downloads folder, so agent downloads are saved here. Grant access in System Settings, then try again.",agentDownloadLimit:"Agent download size limit",agentDownloadLimitHint:"Agent downloads larger than this are cancelled and removed. Your own downloads are not limited.",agentDownloadUnlimited:"No limit",defaultZoom:"Default zoom",defaultZoomHint:"Applied to open and newly created Browser tabs",clearData:"Browsing data",clearDataHint:"Delete cookies, sign-in status, and cached browser data",userAgent:"User agent",userAgentHint:"Sent by open and new Browser tabs, popups, and workers",userAgentDefault:"Default",userAgentCustom:"Custom",userAgentDefaultValue:"Default user agent",userAgentCustomValue:"Custom user agent",userAgentPlaceholder:"Enter a user agent string",userAgentLoadPreset:"Load preset…",userAgentReset:"Reset to default",userAgentApply:"Apply",userAgentInvalid:"The user agent cannot be empty or contain control characters",userAgentNewline:"The user agent must be a single line",userAgentTooLong:"The user agent must be {max} characters or fewer",userAgentSaveFailed:"Could not save the user agent",userAgentCopy:"Copy",userAgentCopied:"Copied",userAgentPresetBuiltIn:"Built-in",userAgentPresetSaved:"Saved",userAgentSavePreset:"Save as preset…",userAgentSavePresetTitle:"Save user agent preset",userAgentPresetName:"Preset name",userAgentPresetNamePlaceholder:"e.g. Staging iPhone",userAgentPresetSave:"Save",userAgentPresetNameEmpty:"Enter a preset name",userAgentPresetNameTooLong:"The preset name must be {max} characters or fewer",userAgentPresetNameInvalid:"The preset name cannot contain control characters",userAgentPresetNameDuplicate:"A preset with this name already exists",userAgentPresetsFull:"You can save up to {max} presets. Delete one to save another",userAgentPresetSaveFailed:"Could not save the preset",userAgentDeletePreset:"Delete preset {name}",userAgentDeletePresetConfirm:"Delete",userAgentConfirmDeletePreset:"Confirm deleting preset {name}",userAgentPresetDeleteFailed:"Could not delete the preset"},downloads:{title:"Downloads",empty:"No downloads yet",clear:"Clear downloads",refresh:"Refresh downloads",completed:"Completed",progressing:"Downloading",paused:"Paused",cancelled:"Cancelled",interrupted:"Interrupted",fileMissing:"Deleted",copyLink:"Copy download link",linkCopied:"Link copied",remove:"Remove from list",showInFolder:"Show in folder",pause:"Pause",resume:"Resume",cancel:"Cancel",retry:"Retry",recent:"Recent downloads",seeAll:"See all downloads",status:{size:"{received} of {total}",speed:"{speed} - {status}",timeLeft:"{progress}, {time} left",paused:"Paused - {progress}"},timeLeft:{seconds:"{n} sec | {n} secs",minutes:"{n} min | {n} mins",hours:"{n} hour | {n} hours",days:"{n} day | {n} days"},openDialog:{title:"Open file",message:"Open “{name}”?",detail:"The file will open in its default app.",open:"Open",cancel:"Cancel"},blockedDialog:{title:"File not opened",message:"“{name}” is a program or script",detail:"Kimi Code does not open programs or scripts. You can find the file in its folder.",showInFolder:"Show in folder",ok:"OK"},openFailedDialog:{title:"Couldn’t open file",message:"“{name}” couldn’t be opened",detail:"There may be no app to open this kind of file, or the system denied access.",unavailable:"The file’s location isn’t responding. Check that the drive or network location is available, then try again.",changed:"The file changed while this dialog was open.",ok:"OK"}},history:{title:"History",empty:"No browsing history yet",clear:"Clear history",refresh:"Refresh history"},tabMenu:{newToRight:"New tab to the right",duplicate:"Duplicate tab",rename:"Rename tab",copyUrl:"Copy URL",openExternal:"Open in external browser",mute:"Mute tab",unmute:"Unmute tab",fork:"Fork session",tabName:"Tab name",saveName:"Save",automaticName:"Leave empty to use the page title",actionFailed:"Tab action failed",newTab:"New Browser tab",close:"Close tab",closeOthers:"Close other tabs",closeToRight:"Close tabs to the right"},addressAria:"Web address",addressPlaceholder:"Search or enter an address",clearData:"Clear browsing data",clearDataTitle:"Clear browsing data",clearDataMessage:"Cookies, sign-in status, and cached browser data will be deleted",clearDataConfirm:"Clear",unavailable:"The in-app browser is unavailable",invalidAddress:"Enter a valid web address",loadFailed:"Page couldn't load",retry:"Retry",empty:{title:"New tab",lead:"Type an address above, or ask the agent to:",items:{browse:{label:"Browse",detail:"Open pages, move between tabs, and show you what it finds"},read:{label:"Read",detail:"Pull out text, list page elements, and take screenshots"},interact:{label:"Interact",detail:"Click, type, fill in forms, pick options, and scroll"},layout:{label:"Test layouts",detail:"Preview pages on phone, tablet, or custom screen sizes"},recall:{label:"Recall",detail:"Search your browsing history and downloads"}},footnote:"You can watch the agent work and take over at any time"}},s2e={details:{item:"item",annotation:"Annotation",classes:"Classes",geometry:"Location & geometry",semantics:"Semantics & state",data:"Data attributes",source:"Page & capture details",pageTitle:"Page title",url:"URL",capturedAt:"Captured at",viewport:"Viewport",width:"Width",height:"Height",zoom:"Zoom",pixelRatio:"Device pixel ratio",size:"Size",position:"Position",copy:"Copy",insert:"Insert into comment",more:"Show more",less:"Show less",items:"items",base:"Base / custom",interaction:"Interaction",responsive:"Responsive",theme:"Theme",truncated:"Some attributes were omitted because they exceed capture limits.",copied:"Copied",copyFailed:"Copy failed. Select the text to copy it."},includeScreenshot:"Include screenshot with this reference",regionScreenshot:"A screenshot is required for a region",capturedAt:"Captured at {time}",screenshotUnavailable:"The screenshot is currently unavailable.",screenshotUploading:"Uploading the screenshot.",screenshotFailed:"The screenshot is unavailable. Try uploading it again.",retryScreenshot:"Retry screenshot upload",title:"Annotate page",cancelPick:"Cancel annotation",group:"Web pages",comment:"Comment",commentPlaceholder:"Describe a change, or add without a comment",add:"Add to composer",save:"Save",locate:"Locate on page",saveAndLocate:"Save and locate",noComposer:"Open a conversation composer first.",failed:"Annotation failed: {message}",missing:"The captured information for this reference is unavailable.",stale:"The original element could not be located. The page may have changed.",named:"{kind}: {name}",numbered:"{kind} · {number}",kind:{button:"Button",input:"Input",image:"Image",link:"Link",heading:"Heading",element:"Element",region:"Region"}},r2e={title:"Server token required",hint:"This server is protected. Enter the bearer token printed when the server started (or the password set via {env}).",tokenPlaceholder:"Token",connect:"Connect",connecting:"Connecting…"},a2e={title:"Remote Control",enable:"Turn on Remote Control",enableHint:"Once turned on, open the link on another device to control the agent on this computer",enableFailed:"Couldn't turn on Remote Control",disableFailed:"Couldn't turn off Remote Control",securityNote:"Keep this computer awake and online. For security, do not share the link with others",statusOn:"Remote Control is on",statusLoadFailed:"Couldn't load Remote Control status",conflictTitle:"Remote Control is already on via another process",conflictMeta:"Running: PID {pid}, since {time}",conflictHint:"You can use the existing link directly, or take that process offline and turn it on here",takeover:"Stop the existing process and turn on here",continueUsing:"Keep the existing process",turnOff:"Turn off Remote Control",qrAlt:"QR code for the remote access link",qrCaption:"Scan with your phone to open",copyLink:"Copy link",copied:"Copied",copyFailed:"Copy failed. Please try again",openLink:"Open link",devicesTitle:"Remote device management",refresh:"Refresh",refreshDevices:"Refresh device list",retry:"Retry",devicesLoadFailed:"Couldn't load devices. Please try again",emptyDevicesTitle:"No other devices yet",emptyDevicesHint:"Turn on Remote Control on another computer to see it here",currentDevice:"This computer",online:"Online",offline:"Offline",deviceMenu:"Device actions",rename:"Rename",deactivate:"Take offline",delete:"Delete",renamePlaceholder:"Device name",renameFailed:"Rename failed. Please try again",save:"Save",cancel:"Cancel",deactivateTitle:"Take {name} offline",deactivateHint:"{name} will disconnect from Remote Control. You can turn it back on from that computer",deleteTitle:"Delete {name}",deleteHint:"{name} will be removed from the device list. You can turn Remote Control back on from that computer",actionFailed:"Action failed. Please try again"},l2e={common:Cge,app:Age,sidebar:xge,admin:Sge,workspace:_ge,conversation:Ige,status:Tge,composer:Mge,login:Ege,devices:Lge,providers:Rge,model:Pge,sessions:$ge,approval:Oge,question:Fge,tasks:Dge,thinking:Nge,diff:Bge,fileTree:zge,filePreview:Hge,mediaPreview:jge,mention:Wge,warnings:qge,commands:Vge,tools:Uge,layout:Kge,mobile:Zge,theme:Gge,onboarding:Qge,settings:Yge,header:Jge,sideChat:Xge,selection:e2e,shortcuts:t2e,terminal:n2e,panel:i2e,browser:o2e,browserReference:s2e,serverAuth:r2e,remoteControl:a2e},c2e={preview:"预览",source:"代码",confirm:"确认",cancel:"取消",close:"关闭",dismiss:"关闭",loading:"加载中",copy:"复制",errorBoundaryTitle:"出错了",errorBoundaryRetry:"重试",asyncLoadFailed:"加载失败,请关闭后重试"},u2e={connecting:"连接中…",connectingStageAuth:"正在检查登录状态…",connectingStageServer:"正在连接 Kimi Code 服务…",connectingStageConfig:"正在加载配置…",connectingStageSessions:"正在加载会话列表…",connectingStageSession:"正在打开会话…",connectingRetrySuffix:"(第 {n} 次重试)",connectingIssueNetworkTitle:"无法连接",connectingIssueNetworkMessage:"请检查网络连接,确认 Kimi Code 服务仍在运行",connectingIssueTimeoutTitle:"响应超时",connectingIssueTimeoutMessage:"仍在自动重试,请稍候",connectingIssueApiTitle:"请求出错",connectingIssueUnknownTitle:"连接出现问题",menuFile:"文件",menuEdit:"编辑",menuView:"视图",menuHelp:"帮助",applicationMenu:"应用菜单",quitConfirmTitle:"退出 Kimi Code?",quitConfirmMessage:"还有会话在进行,退出会中断它们。",quitConfirmMessageRemoteControl:"远程控制正在运行,退出客户端会停止远程控制,重启后需手动开启。",quitConfirmMessageBusyAndRemoteControl:"还有会话在进行,退出会中断它们;远程控制正在运行,退出客户端会停止远程控制,重启后需手动开启。",quitConfirmQuit:"退出",quitConfirmCancel:"取消"},d2e={workspaceMeta:"工作空间 · {branch}",sessionsHeader:"会话",workspaces:"工作区",viewSwitcher:"列表管理",viewGroup:"视图",viewFlat:"平铺列表",viewGrouped:"按工作区分组",sortGroup:"排序",sortManual:"手动排序",sortRecent:"按最近活动",sessionAdmin:"会话管理",collapseAll:"折叠全部工作区",expandAll:"展开全部工作区",newSession:"新建会话",newChat:"新建会话",newWorkspace:"新建工作空间",dropToAddWorkspace:"松开鼠标添加工作区",emptyState:"还没有会话 · 点击 新建会话 开始",options:"选项",rename:"重命名",genTitle:"生成标题",genTitleUnavailable:"无法生成标题:需要登录 Kimi Code 托管账号,且会话中已有消息",setEmoji:"设置 Emoji…",sessionEmojiTitle:"选择 Emoji",removeEmoji:"移除 Emoji",randomEmoji:"随机",searchEmoji:"搜索 Emoji",recentEmojis:"最近使用",noEmojiResults:"没有匹配的 Emoji",emojiGroupFaces:"笑脸与人物",emojiGroupNature:"动物与自然",emojiGroupFood:"美食饮品",emojiGroupActivity:"活动与出行",emojiGroupObjects:"物品与工作",emojiGroupSymbols:"符号与状态",copyPath:"复制路径",copySessionId:"复制 Session ID",copied:"已复制",copyFailed:"复制失败",archive:"归档",archiveToastUndo:"撤销",archiveToastMid:"或到",archiveToastSettings:"设置",archiveToastTail:"查看已归档的会话",tabOpen:"进行中",tabDone:"已完成",tabWorkspaces:"工作空间",tagOpen:"进行中",tagDone:"已完成",complete:"完成",markDone:"标记为完成",reopen:"恢复进行中",noDoneSessions:"还没有已完成的会话",noOpenSessions:"还没有进行中的会话",completeToastLead:"已完成",reopenToastLead:"已恢复进行中",fork:"分叉会话",reload:"重新加载",export:"导出会话",pin:"置顶",unpin:"取消置顶",pinned:"置顶",collapsePinned:"折叠置顶区",expandPinned:"展开置顶区",resizePinnedAria:"调整置顶区高度",delete:"删除",deleteConfirmTitle:"删除会话",deleteConfirmMessage:"将永久删除「{title}」的全部对话记录,无法恢复。工作区里的文件和代码改动不受影响。",deleteConfirmButton:"永久删除",deleteToast:"会话已删除",removeWorkspace:"移除工作区",brand:"Kimi Code",signedIn:"已登录",signOut:"退出登录",notSignedIn:"未登录",signIn:"登录",defaultUserName:"Kimi 用户",upgradeMembership:"会员升级",logoutConfirmTitle:"退出登录",logoutConfirmMessage:"确定要退出当前账号吗?",language:"语言",backendTitle:"后端 {backend} · {endpoint} — 点击切换",noSessions:"暂无对话",allPinned:"有 {count} 条对话被置顶",showMore:"展开更多",loadMore:"加载更多",showLess:"收起",loadingMore:"加载中…",collapseSidebar:"收起侧边栏",expandSidebar:"展开侧边栏",searchPlaceholder:"搜索会话或工作区",search:"搜索",searchHint:"↑↓ 选择 · ↵ 打开 · Esc 关闭",searchHintSelect:"选择",searchHintOpen:"打开",searchHintClose:"关闭",searchClear:"清除搜索",searchNoResults:"没有匹配的会话或工作区",searchEmpty:"暂无会话",update:"更新",updateAvailable:"发现新版本 v{version}",updateDownloadingButton:"下载中({percent}%)",updateReady:"v{version} 已就绪",updateDone:"重启并更新",updateFailed:"下载失败",updateRetry:"重试",updateDownloadNow:"下载并更新",updateSkip:"本次跳过",updateRestartNow:"立即重启",updateRestartLater:"下次启动",updateReleaseDate:"发布于 {date}",updateCurrentVersion:"当前版本 v{version}",updateWhatsNew:"更新内容",updateBackground:"后台下载",updateAutoDownload:"以后自动下载并安装更新",rcSelectDevice:"选择设备",rcCurrentDevice:"当前设备:{name}",rcConnectable:"可连接",rcUnavailable:"不可用",rcOnline:"在线",rcOffline:"离线",rcDevicesLoadFailed:"设备列表加载失败"},f2e={title:"会话管理",subtitle:"管理所有会话,把任务完成的会话标记完成。旧会话按更新时间筛选,即可批量清理。",back:"返回",filterWorkspace:"工作空间",filterStatus:"状态",filterTime:"更新时间",allWorkspaces:"全部工作空间",selectAll:"全选",searchWorkspace:"搜索工作空间",noWorkspaceMatch:"没有匹配的工作空间",removeTag:"移除 {name}",statusAll:"全部状态",statusOpen:"进行中",statusDone:"已完成",timeAll:"全部时间",timeDaysAgo:"{n} 天以前",query:"查询",reset:"重置",colStatus:"状态",colTitle:"会话名",colWorkspace:"工作空间",colPrompt:"最后一条 prompt",colUpdated:"最后更新",colCompleted:"完成时间",colActions:"操作",empty:"没有符合当前筛选条件的会话",loading:"加载中…",total:"共 {n} 条",pageSize:"{n} 条/页",prevPage:"上一页",nextPage:"下一页",selectPageAll:"全选本页",batchSelected:"已选 {n} 项",selectAllMatching:"选中当前条件下的全部 {total} 项",materializingAll:"正在选中…",allMatchingSelected:"已选中全部 {n} 项",clearSelection:"清除选择",markDone:"标记完成",reopen:"恢复进行中",markDoneCount:"标记完成({n})",reopenCount:"恢复进行中({n})",batchDoneToast:"已标记完成 {n} 个会话",batchReopenedToast:"已将 {n} 个会话恢复为进行中",batchFailedSuffix:",{n} 个失败",batchDoneFailedNotice:"{n} 个会话未能标记完成",batchReopenFailedNotice:"{n} 个会话未能恢复为进行中",undo:"撤销",open:"打开会话",rename:"重命名…",fork:"分叉会话",export:"导出",moreActions:"更多操作"},h2e={switcherTitle:"切换工作区",switchTooltip:"切换工作区",eyebrow:"工作区",branchLabel:"分支: {branch}",noBranch:"无分支",sessionCount:"{count} 个会话",allWorkspaces:"全部工作区",currentWorkspace:"仅当前工作区",addWorkspace:"添加工作区…",noWorkspace:"暂无工作区",deleteHasSessions:"工作区内还有会话,请先归档这些会话再删除",removeWorkspaceConfirm:`将「{name}」从侧边栏移除? +文件夹和文件不会被删除,其中的会话记录也会保留,重新添加该文件夹即可找回。`,removeAction:"移除",swarmEnableTitle:"启用 swarm 模式?",swarmEnableConfirm:"Agent 将并行运行多个子 agent。",goalStartTitle:"启动 goal?",goalStartConfirm:"「{objective}」——Agent 将自主执行。",scopeCurrent:"当前工作区",scopeAll:"全部工作区",newInGroup:"在此工作区新建会话",addTitle:"添加工作区",pathLabel:"路径",pathPlaceholder:"/项目的绝对路径",recentLabel:"最近的文件夹",add:"添加",cancel:"取消",addHint:"粘贴一个绝对路径,或从最近用过的文件夹中选择。",addFailed:"无法打开此文件夹,请检查路径后重试。",requiredTitle:"请先选择工作空间",requiredMessage:"发送消息前,需要先选择一个文件夹作为工作区。",openThisFolder:"打开此文件夹",up:"上一级",browsing:"加载中…",filterPlaceholder:"过滤子文件夹…",searchPlaceholder:"在此目录下模糊搜索…",searching:"搜索中…",pasteToggle:"直接输入绝对路径",noFilterMatch:"没有匹配「{q}」的子文件夹",noSubfolders:"此处没有子文件夹",browseHint:'点击文件夹进入,再点"打开此文件夹"将其添加为工作区。',attentionTitle:"{count} 项待处理",awaitingAnswer:"待回答",awaitingAnswerTitle:"有提问等待你回答",awaitingPermission:"待授权",awaitingPermissionTitle:"有操作等待你授权",aborted:"失败",abortedTitle:"此会话的上一轮对话因错误中断",trust:{title:"信任此工作区",desc:"信任前,你无法向此工作区发送消息,其中的 Agent 说明与 MCP 配置等项目级配置也不会加载。这些文件可以指示 Kimi 执行命令,请仅信任来源可靠的工作区。信任后,工具调用仍会按你的权限设置逐个请求批准;信任会被记住,之后的配置变更同样生效。",trustAction:"信任此工作区",rejectAction:"拒绝",trustedNote:"已信任此工作区,项目级配置已加载",readFailedTitle:"无法确认工作区信任状态,请重试"}},p2e={jumpToLatestAria:"跳到最新消息",backToBottom:"回到底部",toc:"对话目录",historyPrevious:"上一项",historyNext:"下一项",newMessages:"最新消息",loading:"加载中…",starting:"正在创建对话…",requesting:"请求中…",working:"工作中…",workingRetry:"模型请求失败,正在重试(第 {n}/{max} 次)…",emptyWorkspaceHint:"在 {name} 中发送",switchWorkspace:"切换工作区",recentSessions:"最近会话",viewMoreSessions:"查看更多",sessionAdminTooltip:"在会话管理页面查看并管理更多会话",addWorkspace:"添加工作区",moreWorkspaces:"更多工作区 ({count})",pickFolder:"选择文件夹…",compacting:"正在压缩上下文…",compactedPlain:"上下文已压缩",compactedAuto:"已自动压缩上下文",compactedTokens:"({before} → {after} tokens)",viewSummary:"查看摘要",undo:"撤销",undoTooltip:"撤回消息",undoConfirm:"撤销后,这条消息及之后的会话内容会从上下文中移除,这条消息的原文会放回输入框;已修改的文件和代码不受影响。",undone:"已撤销,原文已放回输入框",turnInterrupted:"已手动终止",turnFailed:"模型请求失败,本轮对话已中断",turnFailedMaxSteps:"达到本轮步数上限,对话已中断",turnFailedResume:"继续",turnFailedResumeText:"继续",sessionRatingQuestion:"这次会话中,Kimi 表现如何?",sessionRatingBad:"差",sessionRatingFine:"一般",sessionRatingGood:"好",sessionRatingThanks:"感谢你的反馈",sessionRatingUndo:"撤销",yesterday:"昨天",loadOlder:"加载更早的消息",loadingOlder:"正在加载更早的消息…",widenTable:"加宽表格",restoreTableWidth:"恢复默认宽度",copyTable:"复制表格",copyPath:"复制路径",revealInFolder:"在文件夹中显示",openLinkExternally:"外部打开",openLinkInSidebar:"右侧面板打开",wrapCode:"开启自动换行",unwrapCode:"关闭自动换行",showLineNumbers:"显示行号",hideLineNumbers:"隐藏行号",cron:{fired:"定时任务已触发",missed:"错过的定时提醒",job:"任务 {id}",oneShot:"单次",coalesced:"已合并 {n} 次触发",missedCount:"错过 {n} 次",finalDelivery:"最后一次投递",expand:"展开",collapse:"收起"},fold:{worked:"已工作 {duration}",workedUnknown:"工作过程"},turnFiles:{titleOne:"{number} 个文件已修改",titleOther:"{number} 个文件已修改",more:"还有 {number} 个文件",moreOne:"还有 1 个文件",showLess:"收起",diffUnavailable:"此文件的改动无法逐项展示",rebuilding:"正在加载本轮改动…",openFile:"打开文件"},goal:{continuation:"目标续跑"},notification:{sentBy:{task:"由后台发送(Bash)",subagent:"由后台发送(Agent)"},bodyLine:"{status}:{description}",reason:"原因:{reason}",userStopped:"已被用户终止",statusTitle:{completed:"已完成",failed:"失败",timed_out:"超时",killed:"已终止",lost:"丢失",info:"通知"},status:{completed:"完成",failed:"失败",timed_out:"超时",killed:"已终止",lost:"丢失",info:"信息"},groupTitle:"{n} 条通知",copyPath:"复制路径",copied:"已复制",rawPayload:"原始 payload",outputTruncated:"输出已截断,仅显示末尾",fields:{type:"类型",source:"来源",severity:"严重度"}},userMessage:{expand:"展开",collapse:"收起"},search:{placeholder:"搜索对话…",searching:"搜索中…",results:"{current}/{total} 条结果",resultsCapped:"{current}/{total}+ 条结果",noResults:"无结果",previous:"上一个匹配",next:"下一个匹配",close:"关闭搜索"}},m2e={connectionConnected:"已连接",connectionConnecting:"连接中…",connectionDisconnected:"未连接",ctxTooltip:"使用 {used} / {max} tokens ({pct}%)",modelLabel:"模型",permissionManual:"始终询问",permissionAuto:"完全自动",permissionYolo:"必要时询问",permissionManualDesc:"仅自动读取,其余操作逐一向你确认",permissionAutoDesc:"完全不打断,所有操作和判断自动完成",permissionYoloDesc:"自动完成常规修改和命令;高危操作、提问和计划仍会问你",planLabel:"计划",planOn:"开",planOff:"关",planTooltip:"切换计划模式(先调研再修改)",workModeDismiss:"退出模式",goalLabel:"目标",timeUnitHour:"小时",timeUnitMinute:"分",timeUnitSecond:"秒",planEmptyArmed:"计划模式已开启,智能体写出计划后会显示在这里",planEmptyIdle:"还没有计划——开启计划模式后,智能体写出的计划会显示在这里",swarmLabel:"Swarm",swarmDismiss:"关闭 Swarm",towerLabel:"Tower",towerDismiss:"关闭 Tower",modeOff:"未启用",goalPlaceholder:"让智能体完成什么目标?",planPlaceholder:"让智能体先规划什么?",goalStart:"开始",goalPause:"暂停",goalResume:"继续",goalCancel:"取消",goalCancelConfirm:"是否需要取消当前目标?取消后将无法恢复。",goalCancelConfirmYes:"是",goalCancelConfirmNo:"否",goalDoneWhen:"完成条件",goalStatusActive:"进行中",goalStatusPaused:"已暂停",goalStatusBlocked:"已阻塞",goalStatusComplete:"已完成",modeNotSupported:"暂不支持",thinkingLabel:"思考",thinkingTooltip:"切换思考模式",cacheNote:"提示:切换模型或思考程度会使已有的提示词缓存失效。建议新建会话,避免额外的 token 消耗。",starredModels:"收藏",moreModels:"更多模型…",statusPanelTitle:"会话状态",statusPanelClose:"关闭",statusModel:"模型",statusThinking:"思考强度",statusPermission:"权限",statusPlanMode:"计划模式",statusSwarmMode:"Swarm 模式",statusTowerMode:"Tower 模式",swarmOn:"开",swarmOff:"关",towerOn:"开",towerOff:"关",statusContext:"上下文",statusCost:"花费",statusContextValue:"{used} / {max} ({pct}%)",statusNone:"—",activityRunning:"运行中…",activityAwaitingApproval:"等待批准",activityAwaitingQuestion:"等待回答",interrupt:"中断",runningShort:"进行中"},g2e={inputLabel:"消息输入框",placeholder:"输入消息…",commandArgumentHint:"在 {command} 后输入{argument}",send:"发送 ↵",queueLabel:"队列",placeholderRunning:"输入会加入队列 · Ctrl+S 立即插入运行中的回合",placeholderRunningMobile:"输入会加入队列",starting:"正在发送…",queuePending:"{n} 个任务等待发送",queueSteer:"立即发送到当前回合 Ctrl+S",queueSteerMobile:"立即发送到当前回合",queueDragTitle:"拖拽排序",editQueued:"编辑(载入到输入框)",queuedAttachments:"附件 ×{n}",queuedHasImage:"包含 {n} 张图片 — 只能移除,不能编辑",attachmentImage:"图片",attachmentVideo:"视频",attachments:"附件",imagesAndVideos:"图片和视频",mentionNamed:"提及{name}",attachmentOpenUnsupported:"无法打开 {name}:暂不支持此文件类型",dropToAttach:"松开鼠标添加附件",remove:"移除",removeNamed:"移除{name}",mediaAttachments:"媒体栏",uploading:"准备中",uploadFailed:"准备失败",attachFile:"添加附件",addMenu:"添加",addFiles:"文件",addFilesDesc:"上传文件",addScreenshot:"截屏",addScreenshotDesc:"框选屏幕并评论",screenshotFailed:"截图失败,请重试",screenshotSessionGone:"原对话已不存在,截图未添加",addGoalDesc:"设定目标并持续推进",addPlanDesc:"启用计划模式",addSwarmDesc:"启用 swarm 模式",addTowerDesc:"启用 tower 模式",noCommands:"无匹配命令",slashSheetTitle:"命令",slashSearchPlaceholder:"搜索命令…",mentionSheetTitle:"提及",mentionSearchPlaceholder:"搜索附件、文件或技能…",addSlash:"命令",addSlashDesc:"内置命令或技能",addMention:"提及",addMentionDesc:"提及附件、项目文件或技能",interrupt:"中断",interruptConfirm:"再按一次 Esc 中断",interruptTitle:"中断当前操作",expandTitle:"展开输入框进行多行编辑",collapseTitle:"收起输入框",quickStartPlaceholder:"输入消息开始新对话…",thinkingSuffix:" · 思考",thinkingSuffixEffort:" · {level}",noArgCommand:"{cmd} 不接受任何参数"},v2e={title:"登录 Kimi Code",close:"关闭 (Esc)",regionCnHint:"使用 {domain} 账号登录",regionOverseasHint:"使用 {domain} 账号登录",oauthTitle:"登录 Kimi 账号",oauthHint:"在浏览器中完成授权即可登录",starting:"正在启动登录流程…",openedHint:"请在浏览器中完成授权({time})",blockedTitle:"未能自动打开登录页",blockedHint:"浏览器拦截了自动打开,请点击下方按钮继续完成授权。",notOpened:"没有自动打开浏览器?",authorizeInBrowser:"在浏览器中登录",orDivider:"或者",fallbackPrefix:"换个设备?在浏览器打开 ",fallbackSuffix:" 输入设备码:",copy:"复制",copied:"已复制",copyLink:"复制链接",success:"已登录",successHint:"正在加载,稍后自动关闭…",expiredTitle:"设备码已过期",expiredHint:"请重新开始登录流程",deniedTitle:"登录已取消",retry:"重试",closeBtn:"关闭",failedTitle:"登录失败",errorHint:"请升级 kimi-code 后重试",pollErrorTitle:"连接已断开",pollErrorHint:"登录轮询连续失败,请检查 kimi-code 进程后重试",action:"登录",requiredTitle:"请先登录",requiredMessage:"登录 Kimi 账号并配置模型后,才能开始对话。",goToLogin:"去登录",upgradeRequiredTitle:"请升级会员",upgradeRequiredMessage:"当前套餐暂不支持 Kimi 模型;升级会员,解锁 Kimi Code 完整体验",upgradeNow:"立即升级",pickModelTitle:"请选择模型",pickModelMessage:"已有可用模型,选择一个默认模型后即可开始对话。",pickModelAction:"选择模型",configureModelsTitle:"请配置模型",configureModelsMessage:"账号已登录,但还没有可用模型。配置模型后即可开始对话。",configureModelsGenericMessage:"还没有可用模型。配置模型后即可开始对话。",configureModelsAction:"去配置",rcSubtitle:"远程控制会话",rcChecking:"正在检查登录状态…",rcLead:"远程控制功能需要登录后使用。使用 Kimi 账号登录即可继续。",rcSuccessHint:"正在跳转…",rcExpiredTitle:"授权已过期或被取消",rcDeniedTitle:"已取消授权",rcStartErrorTitle:"无法开始登录",rcSessionErrorTitle:"无法创建登录会话",rcConnectionErrorHint:"请检查网络连接后重试。",rcUnsupportedTitle:"请使用浏览器打开",rcUnsupportedHintWechat:"远程控制登录不支持微信内置浏览器,请在系统浏览器中打开本页完成登录。",rcUnsupportedHintLark:"远程控制登录不支持飞书内置浏览器,请在系统浏览器中打开本页完成登录。",rcOpenInBrowser:"在浏览器打开",rcOpenGuideIos:"点击右上角「···」,选择「在浏览器打开」或「Safari 打开」。",rcOpenGuideAndroid:"点击右上角「···」,选择「在浏览器打开」。"},y2e={title:"远程控制设备",subtitle:"选择一台设备继续",refresh:"刷新",connectable:"可连接",unavailable:"不可用",online:"在线",offline:"离线",emptyTitle:"还没有可连接的设备",emptyHint:"在电脑上开启 Kimi Code 远程控制,设备会出现在这里",docsLink:"查看远程控制文档",allOfflineHint:"设备已离线,在对应电脑上开启 Kimi Code 远程控制可重新上线",loadFailed:"设备列表加载失败",deviceCount:"{count}/{max} 台设备",menuLabel:"设备操作",rename:"重命名",deactivate:"下线",delete:"删除",renameTitle:"重命名设备",renamePlaceholder:"设备名称",deactivateTitle:"下线设备【{name}】",deactivateHint:"下线后,该设备的远程链接将不可用,需要在宿主机器上重新开启 Kimi Code 远程控制才能恢复",deleteTitle:"删除设备【{name}】",deleteHint:"删除后,该设备将从设备列表中移除,需要在宿主机器上重新开启 Kimi Code 远程控制才能恢复",actionFailed:"操作失败,请检查网络后重试。"},b2e={title:"供应商管理",loading:"加载提供商中…",unavailable:"暂不支持提供商管理",empty:"暂无提供商",status:{connected:"已连接",error:"错误",unconfigured:"未配置"},keySet:"key 已设置",keyNotSet:"未设置 key",managedBadge:"OAuth",kimiSubscription:"Kimi 订阅",modelCount:"{count} 个模型",confirmDelete:"确认删除?",refresh:"刷新",delete:"删除",refreshTitle:"刷新 {type}",deleteTitle:"删除 {type}",loginKimi:"登录 Kimi",loginAnthropic:"登录 Anthropic",addProvider:"添加供应商",added:"已添加",enterApiKey:"填写 API Key",optional:"可选",apiKeyRequired:"API Key 不能为空",fieldId:"名称",fieldType:"API 协议",types:{kimi:"Kimi",openai:"OpenAI",openai_responses:"OpenAI Responses",anthropic:"Anthropic","google-genai":"Google GenAI",vertexai:"Vertex AI"},fieldApiKey:"API Key",apiKeyManaged:"OAuth 托管登录",apiKeySet:"已设置,输入以更换",showApiKey:"显示 API Key",hideApiKey:"隐藏 API Key",fieldBaseUrl:"Base URL",baseUrlPlaceholder:"https://api.example.com/v1",fieldModels:"模型",colModelId:"模型 ID",colContext:"上下文",colDisplayName:"显示名",modelIdPlaceholder:"kimi-k3",modelContextPlaceholder:"1048576",modelNamePlaceholder:"可选",noModels:"暂无模型",addModel:"添加模型",removeModel:"移除模型",fieldDefaultModel:"默认模型",save:"保存",saved:"已保存",deleteProvider:"删除供应商",deleteConfirm:"确认删除 {id} 及其 {count} 个模型?",deleteConfirmYes:"确认删除",add:"添加",groupManaged:"Kimi 订阅",groupCustom:"自定义供应商",managedBuiltin:"内置",loginAction:"登录",emptyCustom:"暂无自定义供应商",emptyCustomHint:"点击右上角「添加供应商」开始使用",pendingConfig:"待配置",managedAccount:"账号",managedAccessMode:"接入方式",managedOauth:"订阅登录(OAuth)",availableModels:"可用模型({count})",availableModelsLabel:"可用模型",managedLoginTitle:"登录 Kimi 订阅",managedLoginHint:"登录后使用 Kimi 系列模型,订阅额度自动同步。将在浏览器中完成授权。",loginToSeeModels:"登录后可见",refreshModels:"刷新模型",refreshModelsDone:"模型已刷新",refreshModelsFailed:"模型刷新失败",managedReadonly:"内置供应商,配置为只读",chipManual:"自定义",presets:{kimiForCoding:{name:"Kimi For Coding",desc:"月之暗面 · Coding Plan 订阅,API Key 接入"},kimiForCodingGlobal:{name:"Kimi For Coding (kimi.ai)",desc:"月之暗面 · Coding Plan 订阅,API Key 接入 · kimi.ai"},zaiIntl:{name:"Z.ai Coding Plan",desc:"GLM 系列模型 · Coding Plan 订阅 · z.ai"},zaiCn:{name:"BigModel Coding Plan",desc:"GLM 系列模型 · Coding Plan 订阅 · bigmodel.cn"},deepseek:{name:"DeepSeek",desc:"深度求索官方 API"},minimaxIntl:{name:"MiniMax Global",desc:"M 系列模型 · Token Plan 订阅 · minimax.io"},minimaxCn:{name:"MiniMax",desc:"M 系列模型 · Token Plan 订阅 · minimaxi.com"}},tags:{codingPlan:"Coding Plan",tokenPlan:"Token Plan",paygo:"按量 API"},catalog:{sourceCatalog:"从 models.dev 添加",sourceManual:"手动添加",sourceRegistry:"注册表",registryHint:"从 api.json 注册表导入供应商与模型;同一 URL 重复导入即为刷新",registryUrlLabel:"注册表 URL",registryImported:"已导入 {count} 个供应商",searchPlaceholder:"搜索供应商",loading:"加载目录中…",loadError:"目录加载失败,请检查网络后重试",retry:"重试",empty:"没有匹配的供应商",rejected:"不可导入",rejectReason:{"unknown-explicit-type":"协议不受支持","proprietary-sdk":"私有协议,无法导入","empty-base-url":"Base URL 为空","placeholder-base-url":"端点包含环境变量占位符"},backToList:"返回目录列表",overwriteWarning:"已存在同名供应商,导入将覆盖其配置与模型",importAction:"导入"},fetchModels:{button:"获取模型列表",done:"已更新模型表(新增 {count} 个模型)",noNew:"远端模型均已存在,无需更新",empty:"该端点未返回任何模型",unsupportedType:"Vertex AI 不支持拉取模型列表",error:{auth:"认证失败,请检查 API Key",notFound:"未找到模型列表端点,请检查 Base URL",network:"请求失败,请检查网络或 Base URL 是否可达",timeout:"请求超时,请稍后重试",parse:"响应格式无法识别",http:"请求失败(HTTP {status})"}},error:{idRequired:"名称不能为空",idInvalid:'名称需以字母或数字开头,只能包含字母、数字、"-"、"_" 和空格',apiKeyRequired:"API Key 不能为空",baseUrlRequired:"Base URL 不能为空",registryUrlRequired:"注册表 URL 不能为空",modelRequired:"模型 ID 不能为空",contextSizeRequired:"上下文长度不能为空",contextSizeInvalid:"上下文长度需为正整数"},hintClose:"关闭"},k2e={dialogLabel:"切换模型",title:"切换模型",close:"关闭 (Esc)",allTab:"全部",providerTabs:"模型提供商",searchPlaceholder:"搜索模型或提供商…",clearSearch:"清除搜索",loading:"加载模型中…",unavailable:"暂无可用模型列表",contextSuffix:"{size} ctx",capabilityImageInput:"图片输入",capabilityVideoInput:"视频输入",capabilityToolUse:"工具调用",capabilityThinking:"思考",capabilityAlwaysThinking:"始终思考",emptyNoModels:"暂无可用模型",emptyNoMatch:"无匹配模型",starTitle:"添加到收藏",unstarTitle:"取消收藏",hintNavigate:"导航",hintSelect:"选择",hintClose:"关闭",switchConfirmTitle:"确认切换模型?",switchConfirmNew:"新建会话",switchConfirmNewDesc:"无额外消耗 · 新任务首选",switchConfirmCompact:"压缩后继续",switchConfirmCompactDesc:"继续当前会话,成本更低、效果更好",switchConfirmContinue:"直接继续",switchConfirmContinueDesc:"输出质量可能下降 · 缓存失效可能带来更高 Token 消耗",switchConfirmCancel:"取消",switchConfirmCancelDesc:"保持当前模型不变",switchCompactAborted:"压缩未完成,模型未变更。"},w2e={justNow:"刚刚"},C2e={browserDetails:"操作参数",allowOp:"允许 Kimi Code {verb} {name}",opVerb:{read:"读取",grep:"搜索",glob:"查找",edit:"编辑",write:"写入",delete:"删除"},field:{op:"操作:{value}",tool:"工具:{value}",base:"路径:{value}",cwd:"工作目录:{value}"},title:{browser:"浏览器操作",shell:"运行命令?",diff:"应用修改?",file:"写入文件?",fileop:"文件操作?",url:"抓取 URL?",search:"搜索?",invocation:"调用?",todo:"更新 todo?",plan_review:"按这份 plan 开始实现?",generic:"批准操作?"},subagentBadge:"子 agent · {name}",danger:"危险: {detail}",searchQueryLabel:"查询",searchScope:"范围:{scope}",feedbackPlaceholder:"说明拒绝原因…",approve:"批准",approveSession:"本会话内批准",reject:"拒绝",feedback:"反馈",feedbackSubmit:"提交并拒绝",feedbackCancel:"取消",approvePlan:"批准 plan",revise:"修改",rejectAndExit:"拒绝并退出",expandPlan:"放大",collapsePlan:"还原"},A2e={back:"上一题",nextQuestion:"下一题",otherLabel:"其他",otherPlaceholder:"说说你的想法…",submit:"提交",dismiss:"放弃",minimize:"最小化",expand:"展开",hint:"↑↓ 选择 · Enter 确认"},x2e={tag:"任务",summary:"{run} 运行中 · {done} 完成",copy:"复制",calling:"调用 {label}",fieldTask:"任务",fieldOutput:"输出",fieldProgress:"进度",fieldResult:"结果",moreLines:"…(还有 {count} 行)",copied:"已复制",stop:"停止",defaultDescription:"后台任务",dockTasks:"后台任务",dockBash:"后台 Bash",dockSubagent:"后台 Agent",dockTodos:"待办",todoProgressTitle:"当前进度",stateDone:"完成",stateFail:"失败",stateCancelled:"已取消",filterRecent:"最近",filterRunning:"进行中",filterDone:"已完成",filterAll:"全部",running:"运行中",closePanel:"关闭面板",openPanel:"在侧边栏打开",timingRunning:"运行中 · {time}",timingDone:"完成 · {time}",emptyTasks:"暂无后台任务",emptyRecent:"暂无最近任务",emptyRunning:"暂无运行中的任务",emptyDone:"暂无已完成的任务",emptyBash:"暂无后台 Bash 任务",emptySubagent:"暂无后台 Agent 任务",emptyTodo:"暂无待办事项",openTab:"查看全部后台任务",openDetail:"查看",toBackground:"转后台",collapse:"折叠",expand:"展开",transcriptLoadError:"无法加载这个子 Agent 的对话。",copyCommand:"复制命令",copyOutput:"复制输出",copyAll:"复制全部"},S2e={panelTitle:"思考过程",streaming:"思考中…"},_2e={aheadTitle:"领先远程",behindTitle:"落后远程",fileCountOne:"{number} 个文件",fileCountOther:"{number} 个文件",empty:"无 git 改动",clean:"工作区干净,无改动",back:"返回",loading:"正在加载 diff…",noDiff:"该文件没有行级改动",emptyFile:"空文件",list:"列表",tree:"树形"},I2e={searchPlaceholder:"搜索文件",refresh:"刷新",emptyTitle:"选择要预览的文件",emptyHint:"从文件树中选择一个文件,在此预览",emptyDir:"(空)",loadError:"文件加载失败",retry:"重试",copyPath:"复制路径",copied:"已复制",reveal:"在文件夹中显示",treeShow:"显示文件树",treeHide:"隐藏文件树",settings:"文件树设置",positionTitle:"文件树位置",positionLeft:"左侧",positionRight:"右侧",resize:"调整文件树宽度",noSession:"暂无活跃会话",noResults:"没有匹配的文件"},T2e={empty:"选择左侧文件预览",loading:"加载中…",lineCount:"{count} 行",copy:"复制",copied:"已复制",copyPath:"复制路径",openInEditor:"打开",openInSystemBrowser:"在系统浏览器打开",openInPanelBrowser:"在侧边面板浏览器打开",openFailed:"无法打开文件",reveal:"显示",download:"下载",close:"关闭",moreActions:"更多操作",refresh:"刷新",assumedResolution:"此链接按当前工作区解析:{path}",truncatedNotice:"文件过大,仅显示前 {shown}(完整大小 {total}),可下载后查看全文",htmlMode:"HTML 预览模式",metadata:"元数据",markdownMode:"Markdown 预览模式",markdownCode:"代码",preview:"预览",source:"源码",imageFit:"图片缩放",fit:"适应",actual:"原始",pdfNoPreview:"无法内嵌预览此 PDF,可以下载后查看",imageNoPreview:"图片文件 · {mime} · {size} · 暂不预览",binaryNoPreview:"无法预览此文件({mime} · {size}),可用其他应用打开",unknownType:"未知类型",copyCode:"复制代码",enlargeImage:"放大图片",errors:{emptyPath:"文件路径为空",unsupportedPath:"不支持预览 URL 或远程路径",outsideWorkspace:"只能预览当前 workspace 内的文件",isDirectory:"请选择具体文件,而不是目录",notFound:"文件不存在或已被移动",notFoundInWorkspace:"当前工作区中找不到 {path},它可能属于其他项目或目录",tooLarge:"文件过大,暂不支持预览",loadFailed:"无法读取这个文件"}},M2e={copyImage:"复制图片",copyPath:"复制路径",saveAs:"另存为…",reveal:"在文件夹中显示",openDefault:"用默认应用打开",prevImage:"上一张",nextImage:"下一张",copyFailed:"复制失败",saveFailed:"保存失败",revealFailed:"无法打开所在文件夹",openFailed:"无法打开文件"},E2e={searching:"搜索中…",noMatch:"无匹配",files:"文件",skills:"技能",openSkill:"打开技能文件",copyPath:"复制路径",attachmentUploadFailed:"添加附件失败,删除该附件或重新拖入文件重试",attachmentUploadInterrupted:"添加附件中断,删除该附件或重新拖入文件重试",viewFullscreen:"全屏查看",mediaPreviewLoading:"预览加载中…",mediaPreviewUploading:"正在添加附件,完成后可预览",mediaPreviewUnavailable:"预览不可用",stateUploading:"准备中",stateUploaded:"待发送",stateUploadFailed:"准备失败"},L2e={dismiss:"关闭",errorLabel:"错误",noteLabel:"提示",agentWarningFallback:"agent 警告",unhandledEvent:"未处理的事件:{type}",agentError:{title:"模型请求失败",connection:"无法连接模型服务",auth:"模型认证失败",rateLimit:"模型请求被限流",overloaded:"模型服务过载",filtered:"响应被提供方过滤",api:"模型接口返回错误",contextOverflow:"上下文超出模型限制"},details:{cause:"底层原因",code:"错误码",connection:"连接状态",contentType:"响应类型",details:"服务端详情",duration:"耗时",endpoint:"请求地址",errorName:"错误类型",message:"错误信息",operation:"操作",phase:"失败阶段",request:"请求",requestId:"Request ID",responsePreview:"响应预览",sessionId:"Session ID",stack:"堆栈",status:"HTTP 状态",timeout:"超时设置",timestamp:"时间"},daemonApiTitle:"请求出错",daemonNetworkMessage:"没有收到 Kimi Code 服务的响应。请确认它仍在运行,或刷新页面重试。",daemonNetworkTitle:"无法连接",daemonTimeoutMessage:"Kimi Code 服务在等待时限内没有响应。操作可能仍在后台执行,请稍后刷新确认结果,或重试。",daemonTimeoutTitle:"响应超时",diagnostics:"诊断信息",hideDetails:"收起详情",operationFailedMessage:"刚才的操作没有完成,请稍后重试。",operationFailedTitle:"操作失败",sendFailedTitle:"发送失败",sendFailedNoDefaultModelMessage:"默认模型未配置,请到设置中重新选择模型",sessionOccupied:{title:"会话被占用",message:"该会话正在被其他 Kimi Code 进程使用;请停止其他进程中的会话或退出该进程后重试",retry:"重试"},sessionStale:{title:"会话已更新",message:"该会话已被其他 Kimi Code 进程更新",retryMessage:"该会话已被其他 Kimi Code 进程更新,请确认后重新执行"},sessionSnapshotMessage:"没能加载当前会话内容。请确认 Kimi Code 服务仍在运行,或刷新页面重试。",sessionSnapshotTitle:"无法加载当前会话内容",showDetails:"查看详情",copyDetails:"复制诊断信息",copied:"已复制",wsTitle:"实时连接出错",goal:{alreadyExists:"当前会话已有一个进行中的目标,请先取消它再创建新目标。",notFound:"没有找到可操作的目标,可能它已经结束或被取消。",statusInvalid:"当前目标状态不支持这个操作。",notResumable:"这个目标无法恢复(可能已取消或已完成)。",objectiveTooLong:"目标描述太长了,请精简后重试。"}},R2e={new:{desc:"创建新会话"},clear:{desc:"清空并新建会话"},login:{desc:"在浏览器中登录 Kimi"},plan:{desc:"切换计划模式 开/关"},swarm:{desc:"切换 swarm 模式;/swarm <任务> 直接在 swarm 下执行"},tower:{desc:"切换 tower 模式;/tower 以指定 base 分支开启"},goal:{desc:"创建/控制目标:/goal <目标>、/goal pause{'|'}resume{'|'}cancel"},btw:{desc:"侧边聊天:/btw <问题> 向 fork 的侧边会话提问",argHint:"[问题]"},compact:{desc:"压缩会话历史",argHint:"[说明]"},compactQueue:{queued:"已加入队列,轮到时会自动执行 /compact",alreadyQueued:"已有排队中的 /compact",compacting:"正在压缩上下文,请等待完成后再试",skippedAuto:"已跳过排队的 /compact:上下文刚被自动压缩"},fork:{desc:"把当前会话 fork 出一个新会话"},reload:{desc:"重新加载会话以应用外部变更(AGENTS.md / skills / 配置)",busy:"会话正在生成中,请等待当前回合完成后再重新加载。",archived:"已归档的会话不能重新加载,请先恢复会话。"},export:{desc:"将当前会话和排障日志下载为 ZIP 压缩包",noSession:"请先打开一个会话再导出。",started:"正在导出会话…",done:"会话导出完成。",tooLarge:"会话数据超过导出大小限制,可在终端用 CLI 导出:kimi export {sessionId} -o session.zip"},status:{desc:"查看会话状态"},undo:{desc:"撤销上一条消息"}},P2e={browser:{noClickTarget:"未点击:未命中可交互元素",nearbyCount:"附近 {count} 个元素",element:"页面元素",text:"“{text}”",textInElement:"“{text}” · {target}",keysOnElement:"{keys} · {target}",optionInElement:"{option} · {target}",option:"第 {index} 项",elementsCount:"{count} 个元素",elementsAtLeast:"至少 {count} 个元素",tabsCount:"{count} 个标签页",up:"向上",down:"向下",left:"向左",right:"向右",activity:{pages:"浏览了 {count} 个页面",pagesRead:"浏览了 {count} 个页面,读了 {read} 个",livePages:"已浏览 {count} 个页面",read:"读了 {count} 个页面",liveRead:"已读 {count} 个页面",doing:"{action}「{target}」",otherFailed:"另有 {count} 次失败",retried:"重试 {count} 次",breakdown:"共 {count} 次浏览器操作:{items}",breakdownItem:"{action} {count}",breakdownFailed:"{action} {count}({failed} 失败)",breakdownSeparator:"、",actions:{click:"点击 {count} 次",fill:"填写 {count} 处",select:"选择 {count} 项",check:"切换勾选 {count} 次",screenshot:"截图 {count} 次",scroll:"滚动 {count} 次",press:"按键 {count} 次",drag:"拖动 {count} 次",hover:"悬停 {count} 次"}},sources:{label:"本轮浏览的页面",read:"来源 · 读了 {count} 个页面",readAndPassed:"来源 · 读了 {read} 个页面 · 经过 {passed} 个页面",visited:"来源 · 浏览了 {count} 个页面",readGroup:"读过的页面",passedGroup:"经过的页面",readTag:"已读",passedTag:"经过",visits:"打开 {count} 次",openSidebar:"在右侧浏览器打开",openExternal:"用系统浏览器打开",copy:"复制链接",copied:"已复制链接",dialogs:"{count} 个网页对话框",dialogsGroup:"网页对话框",dialogAnswer:"回答:{text}"},retry:{chip:"重试 {count} 次",attempts:"完整经过({count} 次调用)"},live:{view:"查看",viewLabel:"打开右侧面板,查看 Agent 正在操作的网页",thumb:"最近一次操作前的画面"},detail:{rest:"其他字段",raw:"原始数据",rawRequest:"请求",rawResult:"结果",unreadable:"无法解析结果,以下为原始数据。",yes:"是",no:"否",empty:"—",items:"{count} 项",blocks:"{count} 段",changes:"这一步之后的变化",unchanged:"页面状态没有变化",unchangedNote:"未变化的字段列在「其他字段」中。",urlExpand:"展开",urlCollapse:"收起",receiptOpen:"查看操作前画面",receiptMissing:"这张截图已不可用,可能已过期或被删除。",receiptDesktopOnly:"这张截图保存在桌面应用中。",receiptStrip:"本组操作前画面",blockPart:"第 {part} 部分",blockContinued:"未完",openShot:"查看大图",titles:{elements:"页面元素",text:"页面文字",candidates:"点击目标与附近元素",tabs:"标签页",history:"浏览历史",downloads:"下载",deviceProfiles:"设备预设",shot:"截图",receipt:"操作前画面",location:"操作位置"},relation:{target:"目标",nearby:"附近"},facts:{target:"目标",url:"网址",text:"文字",replace:"替换原内容",keys:"按键",optionValue:"选项值",optionLabel:"选项文字",optionIndex:"选项序号",checked:"勾选",point:"坐标",from:"起点",to:"终点",deltaX:"横向滚动",deltaY:"纵向滚动",button:"鼠标键",clickCount:"点击次数",radius:"搜索半径",region:"区域",loadState:"加载阶段",conditionKind:"条件类型",locatorRole:"元素角色",locatorName:"元素名称",locatorExact:"精确匹配",conditionState:"期望状态",conditionText:"等待文字",conditionValue:"等待网址",conditionMatch:"匹配方式",timeout:"超时",stableFor:"稳定时长",scope:"范围",scopeTarget:"范围元素",filterRole:"角色筛选",filterText:"文字筛选",cursor:"续读游标",deviceEnabled:"设备模拟",deviceProfile:"设备",deviceOrientation:"方向",evidenceKind:"观察类型",evidenceValue:"观察到",evidenceCount:"匹配数量",evidenceScanTruncated:"扫描被截断",total:"总数",truncated:"已截断",scanTruncated:"扫描被截断",nextCursor:"下一页游标",capturedAt:"捕获时间",matched:"已满足",elapsed:"耗时",outcome:"结果",message:"说明",searchRadius:"使用的搜索半径",candidatesTruncated:"候选被截断",needsVisualConfirmation:"需要视觉确认",available:"浏览器可用",panelVisible:"面板可见",controlledTab:"受控标签页",visibleTab:"可见标签页",imageSize:"图片尺寸",viewport:"视口",deviceScaleFactor:"设备像素比",cropAvailable:"可裁剪",pageTitle:"页面",pageUrl:"当前网址",previousUrl:"之前的网址",loading:"加载中",canGoBack:"可后退",canGoForward:"可前进",controlled:"受控",visible:"可见"},columns:{ref:"引用",role:"角色",name:"名称",text:"文字",value:"值",state:"状态",relation:"关系",tagName:"标签",id:"ID",classes:"类名",clickable:"可点击",disabled:"已禁用",evidence:"依据",bounds:"位置",tabId:"标签页",title:"标题",url:"网址",visitedAt:"访问时间",filename:"文件名",received:"已接收",total:"总大小",startedAt:"开始时间",savePath:"保存位置",profileId:"设备",size:"尺寸",deviceScaleFactor:"设备像素比",mobile:"移动端",touch:"触控",orientation:"方向",controlled:"受控",visible:"可见",loading:"加载中"},states:{disabled:"已禁用",checked:"已勾选",unchecked:"未勾选",selected:"已选中",expanded:"已展开",collapsed:"已收起",offscreen:"屏幕外"},errors:{SNAPSHOT_EXPIRED:"快照已过期,需要重新读取页面。",OUTPUT_LIMIT:"结果超过了输出上限。",BROWSER_USER_TAKEOVER:"你已接管浏览器,本轮不再自动操作。",INVALID_REQUEST:"请求参数不符合浏览器协议。",BROWSER_UNAVAILABLE:"内置浏览器当前不可用。",TAB_NOT_FOUND:"找不到这个标签页,它可能已被关闭。",TAB_NOT_ACTIVE:"这个标签页还未被选为受控标签页。",NAVIGATION_FAILED:"页面导航失败。",CANNOT_GO_BACK:"没有可后退的历史记录。",CANNOT_GO_FORWARD:"没有可前进的历史记录。",WAIT_TIMEOUT:"等待超时,条件始终未满足。",OPERATION_ABORTED:"操作被中止。",STALE_SNAPSHOT:"截图已失效,页面在截图之后发生了变化。",COORDINATE_OUT_OF_BOUNDS:"坐标超出了截图范围。",PAGE_NOT_READY:"页面尚未准备好,稍后重试。",STALE_ELEMENT:"元素快照已失效,页面在读取之后发生了变化。",ELEMENT_NOT_FOUND:"在页面上找不到这个元素。",ELEMENT_NOT_INTERACTABLE:"元素当前无法交互,可能被遮挡、禁用或不可见。",UNSUPPORTED_ELEMENT:"这种元素不支持该操作。",INTERNAL_ERROR:"浏览器内部错误。"}},actions:{waitCondition:{approval:"等待页面满足条件",running:"正在等待页面满足条件",ok:"页面已满足条件",error:"等待页面条件失败"},crop:{approval:"查看截图细节",running:"正在查看截图细节",ok:"已查看截图细节",error:"查看截图细节失败"},readText:{approval:"读取页面文字",running:"正在读取页面文字",ok:"已读取页面文字",error:"读取页面文字失败"},guardedClick:{approval:"检查并点击页面控件",running:"正在检查点击目标",ok:"已点击控件",error:"检查或点击失败"},listHistory:{approval:"查看浏览历史",running:"正在查看浏览历史",ok:"已查看浏览历史",error:"查看浏览历史失败"},listDownloads:{approval:"查看下载记录",running:"正在查看下载记录",ok:"已查看下载记录",error:"查看下载记录失败"},listDevices:{approval:"查看设备预设",running:"正在查看设备预设",ok:"已查看设备预设",error:"查看设备预设失败"},setDevice:{approval:"更改设备模式",running:"正在设置设备模式",ok:"已设置设备模式",error:"设置设备模式失败"},inspectBrowser:{approval:"查看浏览器状态",running:"正在查看浏览器",ok:"已查看浏览器",error:"查看浏览器失败"},showBrowser:{approval:"打开浏览器面板",running:"正在显示浏览器",ok:"已显示浏览器",error:"显示浏览器失败"},createTab:{approval:"新建标签页",running:"正在新建标签页",ok:"已新建标签页",error:"新建标签页失败"},switchTab:{approval:"显示标签页",running:"正在切换标签页",ok:"已切换标签页",error:"切换标签页失败"},activateTab:{approval:"接管标签页",running:"正在接管标签页",ok:"已接管标签页",error:"接管标签页失败"},releaseTab:{approval:"释放标签页控制权",running:"正在释放标签页",ok:"已释放标签页",error:"释放标签页失败"},closeTab:{approval:"关闭标签页",running:"正在关闭标签页",ok:"已关闭标签页",error:"关闭标签页失败"},inspectPage:{approval:"查看页面状态",running:"正在查看页面",ok:"已查看页面",error:"查看页面失败"},navigate:{approval:"打开页面",running:"正在打开页面",ok:"已打开页面",error:"打开页面失败"},search:{approval:"搜索网页",running:"正在搜索",ok:"已搜索",error:"搜索失败"},back:{approval:"返回上一页",running:"正在后退",ok:"已后退",error:"后退失败"},forward:{approval:"前往下一页",running:"正在前进",ok:"已前进",error:"前进失败"},reload:{approval:"刷新页面",running:"正在刷新页面",ok:"已刷新页面",error:"刷新页面失败"},stop:{approval:"停止加载页面",running:"正在停止加载",ok:"已停止加载",error:"停止加载失败"},wait:{approval:"等待页面加载",running:"正在等待页面加载",ok:"页面已加载",error:"等待页面加载失败"},screenshot:{approval:"截取页面截图",running:"正在截取页面",ok:"已截取页面",error:"页面截图失败"},click:{approval:"点击页面元素",running:"正在点击",ok:"已点击",error:"点击失败"},doubleClick:{approval:"双击页面元素",running:"正在双击",ok:"已双击",error:"双击失败"},rightClick:{approval:"右键点击页面元素",running:"正在右键点击",ok:"已右键点击",error:"右键点击失败"},hover:{approval:"悬停在页面元素上",running:"正在悬停",ok:"已悬停",error:"悬停失败"},scroll:{approval:"滚动页面",running:"正在滚动页面",ok:"已滚动页面",error:"滚动页面失败"},drag:{approval:"拖拽页面元素",running:"正在拖动",ok:"已拖动",error:"拖动失败"},fill:{approval:"填写页面字段",running:"正在填写",ok:"已填写",error:"填写失败"},type:{approval:"输入文本",running:"正在输入",ok:"已输入",error:"输入失败"},press:{approval:"发送按键",running:"正在按键",ok:"已按下",error:"按键失败"},elements:{approval:"查看页面元素",running:"正在查看页面元素",ok:"已查看页面元素",error:"查看页面元素失败"},select:{approval:"选择选项",running:"正在选择",ok:"已选择",error:"选择失败"},check:{approval:"勾选选项",running:"正在勾选",ok:"已勾选",error:"勾选失败"},uncheck:{approval:"取消勾选选项",running:"正在取消勾选",ok:"已取消勾选",error:"取消勾选失败"},reveal:{approval:"滚动至页面元素",running:"正在滚动到元素",ok:"已滚动到元素",error:"滚动到元素失败"},other:{approval:"使用浏览器",running:"正在操作浏览器",ok:"浏览器操作已完成",error:"浏览器操作失败"}}},label:{read:"读取",bash:"运行",edit:"编辑",write:"写入",grep:"搜索",glob:"查找",ls:"列目录",web_fetch:"抓取",search:"搜索",todo:"待办",task:"任务",swarm:"Swarm",ask_user:"提问",plan:"计划",goal_create:"启动目标",goal_get:"读取目标",goal_budget:"设置目标预算",goal_update:"更新目标",waitfor:"等待",task_list:"列出任务",task_output:"读取任务输出",task_stop:"停止任务",cron_create:"创建定时任务",cron_create_once:"创建单次定时任务",cron_list:"定时任务列表",cron_delete:"删除定时任务",notify_user:"进展",skill:"Skill"},cron:{none:"没有定时任务",field:{id:"标识符",cron:"Cron 表达式",schedule:"周期",prompt:"提示词",recurring:"重复",nextFireAt:"下次触发"},recurring:{yes:"周期",no:"单次"},schedule:{everyMinute:"每分钟",everyNMinutes:"每 {n} 分钟",hourlyAt:"每小时第 {minute} 分钟",dailyAt:"每天 {time}",weekdaysAt:"工作日 {time}",weeklyAt:"每{day} {time}",monthlyAt:"每月 {day} 日 {time}",yearlyAt:"每年 {date} {time}",onceAt:"{date} {time}",dateMD:"{month}月{day}日",day:{0:"周日",1:"周一",2:"周二",3:"周三",4:"周四",5:"周五",6:"周六"},monthShort:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"}}},waitfor:{waitingAny:"等待任一后台任务",waitingTask:"等待 {id}",noTasks:"没有后台任务在运行",timedOut:"等待超时",interrupted:"收到新输入,等待已中断",stillRunning:"{count} 个仍在运行",moreRunning:"还有 {count} 个",result:{completed:"有任务已完成",interrupted:"被新输入中断"},field:{result:"结果",task:"任务",taskStatus:"任务状态",description:"描述",waited:"已等待",timeout:"超时时间",finishedDuringWait:"等待期间完成",stillRunning:"仍在运行",runningTasks:"运行中的任务",warning:"提醒"}},bgTask:{active:"运行中的任务",all:"全部任务",count:"{count} 个任务",none:"没有后台任务",truncated:"输出已截断",kind:{process:"命令",agent:"Agent",question:"提问"},status:{running:"运行中",completed:"已完成",failed:"失败",timed_out:"超时",killed:"已停止",lost:"丢失"},field:{status:"状态",kind:"类型",command:"命令",pid:"PID",exit_code:"退出码",subagent_type:"Agent 类型",model:"模型",reason:"原因",stop_reason:"原因",output_path:"输出文件"}},swarm:{progress:"{done} / {total}",runningSub:"{count} 个进行中",doneSub:"完成 {completed} · 失败 {failed}",doneSubWithCancelled:"完成 {completed} · 失败 {failed} · 已取消 {cancelled}",phaseWorking:"进行中",phaseQueued:"排队中",phaseSuspended:"已暂停",phaseCompleted:"已结束",phaseFailed:"错误",phaseCancelled:"取消",waiting:"等待子任务加入…"},chip:{lines:"{count} 行",results:"{count} 结果",files:"{count} 个文件",edited:"已编辑",created:"已创建",todos:"{count} 项"},disclosure:{expand:"展开详情",collapse:"收起详情"},agent:{foreground:"前台",background:"后台",foregroundAgent:"Agent",backgroundAgent:"后台 Agent",status:{running:"运行中",ok:"已完成",error:"失败",cancelled:"已取消"}},notifyUser:{posting:"正在发布进展…"},output:{waiting:"等待输出…",empty:"(无输出)"},plan:{review:{pending:"待确认",approved:"已通过",rejected:"已拒绝",cancelled:"已取消"},selectedOption:"已选择",pathOnlyHint:"该计划未保存内联内容,可在侧边栏打开:",feedback:"反馈"},summary:{inScope:"{value} 在 {scope} 中"},goal:{objectiveWithCriterion:"{objective} · {criterion}",status:"状态:{status}",budget:"{value} {unit}",turns:"{value} 轮",tokens:"{value} token",milliseconds:"{value} 毫秒",seconds:"{value} 秒",minutes:"{value} 分钟",hours:"{value} 小时"},group:{countOther:"执行了 {count} 次工具调用",typed:{read:{done:"读取了 {count} 个文件"},bash:{done:"运行了 {count} 条命令"},grep:{done:"搜索了 {count} 个模式"},search:{done:"网络搜索了 {count} 次"},glob:{done:"找了 {count} 次文件"},ls:{done:"列出了 {count} 个目录"},web_fetch:{done:"抓取了 {count} 个页面"},edit:{done:"编辑了 {count} 处"},write:{done:"写入了 {count} 个文件"},browser:{done:"执行了 {count} 次浏览器操作"}}},activity:{failedClause:"({count} 失败)",liveDonePrefix:"已",busy:"正在执行…",doing:{read:"正在读取 {subject}",bash:"正在运行命令",grep:"正在搜索 {subject}",search:"正在搜索 {subject}",glob:"正在匹配 {subject}",ls:"正在列出 {subject}",web_fetch:"正在抓取 {subject}",edit:"正在编辑 {subject}",write:"正在写入 {subject}",browser:"正在操作浏览器"}},ask:{dismissed:"已忽略",answer:"{count} 个回答",answers:"{count} 个回答",answered:"已回答",more:"(还有 {count} 个)",collected:"用户回答收集",unanswered:"未作答"}},$2e={resizeHandleAria:"调整侧栏宽度",resizePreviewAria:"调整预览面板宽度",detailPanelAria:"详情面板"},O2e={openSwitcher:"切换会话 / 工作区",openSettings:"会话设置",settingsTitle:"设置",groupSession:"当前会话",groupApp:"应用偏好",groupAccount:"账号",sheetLabel:"面板",closeSheet:"关闭",tapToCycle:"点击切换",running:"运行中",idle:"空闲",sessionCount:"{n} 个会话",newSession:"新建会话",permManualSub:"仅自动读取,其余操作逐一向你确认",permAutoSub:"完全不打断,所有操作和判断自动完成",permYoloSub:"自动完成常规修改和命令;高危操作、提问和计划仍会问你",planModeSub:"计划模式",goalModeSub:"目标模式",swarmModeSub:"Swarm 模式",towerModeSub:"Tower 模式",archivedSessions:"已归档会话",archivedSessionsSub:"查看并恢复已归档会话",archivedBack:"返回",viewFlat:"平铺",viewGrouped:"按工作区"},F2e={colorSchemeLabel:"外观",light:"月之亮面",dark:"月之暗面",system:"跟随系统"},D2e={continue:"继续",back:"上一步",skip:"跳过",welcome:{title:"欢迎使用 Kimi Code",subtitle:"为专业开发者打造的 AI 编程工作台",languageLabel:"语言",themeLabel:"外观"},login:{title:"选择配置模型",subtitle:"选择驱动 Kimi Code 的模型服务,之后可在「设置」中更改。",kimiTitle:"登录 Kimi 账号",kimiHint:"使用 Kimi 会员权益,开箱即用",kimiCnTitle:"Kimi Code",kimiCnHint:"使用 kimi.com 账号登录",kimiOverseasTitle:"Kimi Code",kimiOverseasHint:"使用 kimi.ai 账号登录",customProviderTitle:"添加自定义供应商",customProviderHint:"使用自己的 API Key,接入 OpenAI 兼容等模型服务",loggedInTitle:"已登录 Kimi 账号",loggedInHint:"模型服务已就绪,可以开始使用",finish:"完成",skip:"跳过,稍后再说"}},N2e={title:"设置",close:"关闭 (Esc)",tabs:{general:"通用",browser:"浏览器",agent:"智能体与会话",account:"账户",providers:"模型供应商",remoteControl:"远程控制",advanced:"关于",archived:"已归档的会话",shortcuts:"快捷键",plugins:"插件",lab:"实验室"},lab:{sidebarTabs:"多标签页的会话列表",sidebarTabsHint:"侧边栏显示「进行中 / 已完成 / 工作空间」三个标签页",notifyUser:"进展更新",notifyUserHint:"让 agent 在对话中发布进展更新,仅对之后新建的会话生效"},plugins:{retry:"重试",official:"官方",thirdParty:"第三方",installed:"已安装",install:"安装",update:"更新",remove:"移除",enabled:"启用",homepage:"主页",empty:"没有找到插件",hasErrors:"错误",customInstall:"安装自定义插件",customInstallPlaceholder:"https://… 或 /本地/目录",customInstallHint:"支持 https zip 链接、GitHub 仓库地址或本地目录路径。",extensionHintTitle:"还差一步:安装浏览器扩展",extensionGuide:"手动安装",dismissHint:"知道了",catalogUnavailable:"插件市场目录暂时不可达;已安装的插件仍可正常管理。",source:{"local-path":"本地","zip-url":"ZIP",github:"GitHub"},counts:{skill:"{n} 个技能",mcp:"{n} 个 MCP 服务",mcpEnabled:"启用 {n} 个",hook:"{n} 个钩子",command:"{n} 个命令"}},appearance:"外观",notifications:"通知",notifyEnabled:"系统通知",notifyEnabledHint:"回合完成、待回答或待审批时发送系统通知",notifySound:"通知提示音",notifySoundHint:"系统通知随附提示音",notifyDenied:"已在浏览器设置中被阻止",notifyTitle:"Kimi Code · 回合完成",notifyQuestionTitle:"Kimi Code · 待回答",notifyApprovalTitle:"Kimi Code · 等待审批",notifyFallback:"点击查看结果",notifyQuestionFallback:"有提问等待你回答",notifyApprovalFallback:"有工具等待你审批",account:"账户",signedIn:"已登录",signedOutHint:"登录后可查看账户和模型权益",planUsage:{title:"套餐用量",retry:"重试",loadFailed:"加载失败",empty:"暂无用量数据",weekLimit:"每周限额",hourLimit:"{n} 小时限额",resetsIn:"{duration}后重置",resetDone:"已重置",durationDay:"{n} 天",durationHour:"{n} 小时",durationMinute:"{n} 分钟",durationSecond:"{n} 秒",usedPct:"已使用 {pct}%",segmentUsage:"{name} 用量 {pct}%",boosterTitle:"加油包",boosterBalance:"余额",monthlyUsed:"本月已用",monthlyLimit:"每月限额",boosterLimit:"每月上限",unlimited:"不限",freeTitle:"免费账户",freeHint:"当前套餐暂不支持 Kimi 模型;升级会员,解锁 Kimi Code 完整体验"},colorSchemeHint:"选择应用的明暗外观",appIcon:"程序坞图标",appIconHint:"选择程序坞中显示的图标",appIconDefault:"默认",appIconBlack:"黑色",uiFontSize:"字体大小",uiFontSizeHint:"调整界面和消息文字大小",vibrancy:"毛玻璃侧栏",vibrancyHint:"在侧栏使用 macOS 原生毛玻璃材质——如果半透明影响阅读可以关闭",nativeTitleBar:"使用系统标题栏",nativeTitleBarHint:"显示桌面环境原生的标题栏和菜单栏,替代内置标题栏",nativeTitleBarRestartTitle:"重启以应用更改",nativeTitleBarRestartMessage:"切换标题栏样式需要重启 Kimi Code,现在重启吗?",nativeTitleBarRestartConfirm:"立即重启",languageHint:"选择界面显示语言",defaultOpenInApp:"默认打开应用",defaultOpenInAppHint:"从顶栏菜单打开文件和文件夹时默认使用的应用",openWith:"打开方式",agentDefaults:"Agent 默认值",saving:"保存中",defaultModel:"默认模型",defaultModelHint:"新会话会优先使用这个模型",noDefaultModel:"未设置默认模型",defaultPermission:"默认权限",defaultPermissionHint:"只影响之后新建的会话",defaultThinking:"默认开启思考",defaultThinkingHint:"新会话默认是否开启思考",defaultPlanMode:"默认计划模式",defaultPlanModeHint:"新会话默认进入计划模式",secondaryModelSection:"子智能体",secondaryModel:"子智能体模型",secondaryModelHint:"子智能体默认使用的模型与思考强度",secondaryModelEffort:"思考强度",noSecondaryModel:"未设置(跟随主模型)",secondaryModelEffortAuto:"模型默认",telemetry:"帮助改进 Kimi Code",telemetryHint:"开启后,我们会收集使用数据(如功能点击、使用情况统计),用于分析和改进产品体验。数据不包含你的代码和对话内容。你可以随时关闭。更改将在重启后生效。",sessionRatingPrompts:"会话评分提示",sessionRatingPromptsHint:"偶尔在 Kimi 回复后请你评价这次会话",credentialReady:"凭据已配置",credentialMissing:"缺少凭据",configUnavailable:"当前服务端没有返回 config,设置项暂不可用。",versionAndUpdates:"版本与更新",appVersion:"应用版本",appVersionHint:"当前应用的版本号",checkUpdate:"检查更新",checkUpdateHint:"手动检查是否有新版本",checkUpdateBtn:"立即检查",updateChecking:"检查中…",updateCheckLatest:"已是最新版本",updateCheckAvailable:"发现新版本 {version},可从侧边栏的更新入口下载",updateCheckUnsupported:"当前构建不支持检查更新",updateCheckFailed:"检查失败,请稍后重试",updateCheckAvailableAuto:"发现新版本 {version},正在后台下载",updateCheckDownloaded:"新版本 {version} 已就绪,可从侧边栏的更新入口重启安装",autoDownloadUpdate:"自动下载更新",autoDownloadUpdateHint:"发现新版本时在后台自动下载,重启后完成安装",canaryTargetVersion:"{version} 预发布",canaryUpdate:"更新 Canary",canaryImportStable:"从正式版导入界面设置…",canaryImportStableTitle:"从正式版导入界面设置",canaryImportStableHint:"把正式版的界面设置(置顶、外观等 localStorage 偏好)复制到 Canary 并覆盖当前设置(原设置自动备份为 leveldb.bak)。确认后 Canary 会重启完成导入;正式版需保持退出状态。",canaryImportStableBtn:"导入并重启",canaryImportStableRunning:"正式版(Kimi Code)正在运行——请先退出它,再重新导入。",canaryImportStableNoData:"没有找到正式版的界面设置数据。",canaryImportStableFailed:"导入失败:{error}",privacy:"数据与隐私",diagnostics:"诊断",agreements:"协议",userAgreement:"用户协议",privacyPolicy:"隐私协议",messageFolding:"消息折叠",turnFolding:"消息自动折叠",turnFoldingHint:"回合结束时自动折叠工作过程,仅展示总结",activityRunFolding:"工具调用汇总",activityRunFoldingHint:"回答过程中,连续的工具调用自动汇总为一行摘要",sessionTitleSection:"会话标题",autoSessionTitle:"自动生成标题",autoSessionTitleHint:"首个回合结束后,用 AI 为新会话生成标题,会消耗 Kimi 账号的订阅额度",build:"构建",serverVersion:"服务端版本",serverAddress:"服务器地址",serverAddressHint:"当前连接的服务器地址",serverVersionHint:"当前连接服务的版本",coreRef:"内置服务版本",coreRefHint:"内置服务对应的核心仓分支与提交",copyServerVersion:"复制服务端版本",copyServerAddress:"复制服务器地址",copied:"已复制",exportLog:"故障排查日志",exportLogHint:"导出已采集的故障排查日志",logHint:"加 ?debug=1 开启采集",exportLogBtn:"导出日志",archivedTitle:"已归档的会话",archivedDesc:"查看已归档会话,确认其所属工作区路径、会话名称和归档时间,并可恢复到会话列表。",archivedSearch:"搜索已归档会话",archivedAllWorkspaces:"所有工作区",archivedSortLabel:"排序方式",archivedSortArchived:"归档时间",archivedSortCreated:"创建时间",archivedSortName:"按字母顺序",archivedRestore:"恢复",archivedEmpty:"还没有归档的会话",archivedNoMatch:"没有匹配的已归档会话",archivedSessionsCount:"{count} 个会话",archivedAt:"归档于 {time}",archivedLoadMore:"加载更多",archivedLoading:"加载中…",archivedLoadingAll:"正在加载全部归档会话…"},B2e={openInEditor:"在编辑器中打开",openInEditorShort:"打开",openInApp:"用 {app} 打开",chooseOpenApp:"选择应用",copyAll:"复制全部对话为 Markdown",copyFinalSummary:"仅复制最终总结",copied:"已复制",lastUsed:"上次使用",copyPath:"复制路径",changed:"{n} 处改动",gitTooltip:"打开「文件 > 改动」",detached:"游离",openPr:"打开 Pull Request",prStatusOpen:"已打开",prStatusClosed:"已关闭",prStatusMerged:"已合并",prStatusDraft:"草稿",prStatusUnknown:"未知",options:"选项",copySessionId:"复制 Session ID",pinSession:"置顶",unpinSession:"取消置顶",renameSession:"重命名",forkSession:"分叉会话",archiveSession:"归档",markSessionDone:"标记为完成",reopenSession:"恢复进行中",exportSession:"导出会话",reloadSession:"重新加载会话",sessionReloaded:"会话已重新加载。",devBadge:"开发环境运行中"},z2e={title:"侧边聊天",empty:"基于当前会话上下文的只读问答,关闭后对话无法恢复",placeholder:"询问当前会话相关的问题…",send:"发送",requiresSession:"请先打开一个会话,再使用侧边聊天"},H2e={comment:"评论",addToChat:"添加到对话",commentPlaceholder:"写一句评论…",confirm:"确定",copyQuote:"复制引用",copyComment:"复制评论",quoteLabel:"引用"},j2e={actions:{nextPanelTab:{label:"下一个标签页",desc:"切换到下一个面板标签页"},previousPanelTab:{label:"上一个标签页",desc:"切换到上一个面板标签页"},summonApp:{label:"显示应用窗口",desc:"从任意位置将应用窗口唤起到前台"},captureScreenshot:{label:"截屏",desc:"从任意位置框选屏幕并评论"},newSession:{label:"新建会话",desc:"在当前工作区开始一个新会话"},closeSessionView:{label:"关闭页面",desc:"关闭当前会话并回到新建会话页;在新建会话页再按一次关闭窗口"},searchSessions:{label:"搜索会话",desc:"打开会话搜索弹窗"},archiveSession:{label:"完成任务",desc:"立即完成当前会话(可在已完成列表找回)"},toggleSideChat:{label:"侧边聊天",desc:"打开或关闭 /btw 侧边聊天"},toggleSidebar:{label:"展开/收起侧边栏",desc:"收起或展开会话侧边栏"},toggleRightPanel:{label:"展开/收起右侧面板",desc:"显示或隐藏右侧面板"},openFolder:{label:"打开文件夹",desc:"通过系统原生选择器添加工作目录"},openInDefaultApp:{label:"在默认应用中打开",desc:"在默认编辑器或终端中打开当前工作目录"},openSettings:{label:"打开设置",desc:"显示或隐藏设置窗口"},toggleTerminal:{label:"切换终端",desc:"显示或隐藏底部终端面板"},openDiffTab:{label:"打开改动",desc:"打开或激活工作区改动标签页"},toggleFilesPanel:{label:"文件树",desc:"打开或激活文件树标签页,已激活时收起右侧面板"},sidebarTabOpen:{label:"进行中标签页",desc:"切换到侧栏的进行中列表"},sidebarTabDone:{label:"已完成标签页",desc:"切换到侧栏的已完成列表"},sidebarTabWorkspaces:{label:"工作空间标签页",desc:"切换到侧栏的工作空间目录"},selectPrevSibling:{label:"上一条",desc:"在当前标签页中选中上一条会话 / 上一个工作空间"},selectNextSibling:{label:"下一条",desc:"在当前标签页中选中下一条会话 / 下一个工作空间"},send:{label:"发送消息",desc:"发送输入框中的内容"},newline:{label:"换行",desc:"在输入框中插入换行"}},searchPlaceholder:"搜索快捷键",unassigned:"未分配",unassign:"取消分配",edit:"编辑快捷键",reset:"恢复默认",resetAll:"全部恢复默认",recording:"按下新的快捷键…",invalid:"该按键组合不能用作快捷键",notGlobal:"该按键组合无法注册为系统级快捷键",globalTaken:"该快捷键已被系统或其他应用占用",channelDisabled:"当前版本不启用系统级截图快捷键",reserved:"系统菜单已占用该快捷键",reservedSteer:"steer 固定快捷键(Ctrl/Cmd+S),不可占用",reservedFind:"对话搜索固定快捷键(Ctrl/Cmd+F),不可占用",conflict:"已被「{action}」占用",customBadge:"自定义"},W2e={closeRunningTitle:"关闭正在运行的终端?",closeRunningMessage:"以下标签页中仍有程序运行,关闭会终止这些程序:",closeRunningConfirm:"终止程序并关闭",closeUnknown:"无法确认进程状态",panelAria:"终端",toolbarAria:"终端标签页",resizeAria:"调整终端面板高度",toggle:"切换终端",open:"打开终端",close:"关闭终端",newTab:"新建终端",closeTab:"关闭终端",restartTab:"重启终端",collapse:"收起终端面板",empty:"还没有终端,点击新建一个",outputTruncated:"[后台较早的输出已截断,以下为最新输出]",processExited:"[进程已退出]",processExitedWithCode:"[进程已退出,退出码 {code}]"},q2e={compactionUnavailable:"摘要内容尚未加载,请在对话中加载相应的历史记录。",terminalRestoreFailed:"无法创建终端",closeOthers:"关闭其他标签页",closeToRight:"关闭右侧标签页",closeAll:"关闭所有标签页",tabs:{diff:"改动",file:"文件",files:"文件",turnDiff:"本轮改动",compaction:"压缩摘要",agent:"子 Agent",term:"终端",browser:"浏览器"},newTab:"新建标签页",closeTab:"关闭标签页",expand:"展开面板",collapse:"恢复面板",hide:"关闭右侧面板",openPanel:"打开右侧面板",launcherAria:"快速打开"},V2e={saveDialog:{download:"保存下载文件",screenshot:"保存网页截图"},permissionPending:"等待网站权限",beforeUnload:{title:"离开此页面",message:"你所做的更改可能不会保存",stay:"留在此页",leave:"离开"},pageDialogs:{says:"{origin} 显示",pageSays:"此网页显示",ok:"确定",close:"关闭",cancel:"取消",promptLabel:"提供给网页的文本",leaveTarget:"下一个页面:{target}",leaveRepeatForm:"此页面正在提交表单。选择离开后,请重新提交。",leaveRepeatAction:"此页面会保持打开。选择离开后,请重新执行离开此页面的操作。",fileTitle:"{origin} 请求文件",fileMessage:"可接受的类型:{types}",fileAny:"网页请求上传文件。",chooseFiles:"选择文件…",uploadTitle:"允许上传?",uploadMessage:"要将以下文件(共 {count} 个)上传到 {origin} 吗?",allowOnce:"允许一次",deny:"拒绝",downloadTitle:"下载已保存",downloadMessage:"{file} 已保存到 {path}。",move:"移动…",keep:"保留",agentTab:"智能体操控中",agentTabHint:"智能体可以回答这个对话框,你也可以自己作答。",agentChose:"智能体选择了“{choice}”",agentRequestHint:"智能体请求上传这些文件,只有你可以允许。"},dialogRecords:{button:"已处理的网页对话框",title:"本次控制中的网页对话框",answeredBy:"{outcome}({answerer})",showInFolder:"在文件夹中显示",move:"移动…",kinds:{alert:"提示框",confirm:"确认框",prompt:"文本输入框",beforeunload:"离开此网站?",file:"文件选择",upload:"上传授权",download:"下载","external-app":"外部应用链接",print:"打印","screen-capture":"屏幕共享",bluetooth:"蓝牙配对","file-picker":"文件系统选择器"},outcomes:{accepted:"已确认",dismissed:"已取消",left:"已离开页面",stayed:"已留在页面",uploaded:"已上传文件",saved:"已保存",denied:"已拒绝","timed-out":"已超时",cancelled:"已被网页关闭",blocked:"已拦截","too-large":"已拦截:超出大小限制"},answerers:{agent:"Agent 处理",user:"你处理",auto:"自动处理"}},records:{searchHistory:"搜索历史记录",searchDownloads:"搜索下载记录",noResults:"没有匹配的记录",today:"今天",yesterday:"昨天"},sites:{permissionTitle:"网站权限请求",backToList:"返回网站列表",title:"网站设置",info:"网站信息",search:"搜索网站",all:"所有网站",empty:"还没有网站记录",cookies:"Cookie:{count}",deleteData:"删除网站数据",clearMessage:"删除 {origin} 的 Cookie 和本地数据?这可能会使你退出登录。",failed:"无法更新网站设置,请重试。",permissionRequest:"是否允许 {origin} 使用{permissions}?",allowOnce:"仅此次允许",allowAlways:"始终允许",block:"阻止",states:{ask:"询问",allow:"允许",block:"阻止"},systemPermissionDenied:"没有授予相应的系统权限",openSystemSettings:"打开系统设置",permissions:{location:"位置信息",camera:"摄像头",microphone:"麦克风",notifications:"通知",clipboard:"读取剪贴板",clipboardWrite:"写入剪贴板",fullscreen:"全屏",midi:"MIDI 设备",midiSysex:"MIDI 系统专有消息"}},controlPaused:"等待你继续",controlUnknown:"连接中断,控制状态未知",controlOverlayRunning:"Agent 正在操作",controlOverlayPaused:"Agent 已暂停,等待你继续",controlOverlayUnknown:"正在确认浏览器控制状态",controlElapsed:"已接管 {time}",controlTakeover:"我来接管",controlTakeoverHint:"停止 Agent 的浏览器操作,由你接管",controlPointer:"Agent",controlTyping:"正在输入",controlKey:"正在按键",controlScroll:"正在滚动",controlActivityTarget:"{activity}「{target}」",controlActivities:{reading:"正在读取页面文字",inspecting:"正在查看页面元素",capturing:"正在截取页面",clicking:"正在点击",hovering:"正在悬停",typing:"正在输入",pressing:"正在按键",selecting:"正在选择选项",checking:"正在切换勾选状态",scrolling:"正在滚动",dragging:"正在拖动",navigating:"正在打开页面",waiting:"正在等待页面",answering:"正在回应页面对话框"},controlledTab:"Agent 正在控制此标签页",controlOutOfView:"Agent 正在操作浏览器",forkTabsFailed:"会话已复制,但浏览器标签页复制失败",ariaLabel:"浏览器",navigationAria:"浏览器导航",back:"后退",forward:"前进",reload:"刷新",menuButton:"浏览器菜单",openInDefaultBrowser:"在默认浏览器中打开",menu:{emulateFocus:"总是保持焦点在页面上",findInPage:"在页面中查找",print:"打印",zoom:"缩放",zoomOut:"缩小",zoomReset:"重置缩放",zoomIn:"放大",showDeviceToolbar:"显示设备工具栏",hideDeviceToolbar:"隐藏设备工具栏",screenshot:"截取网页截图"},find:{placeholder:"在页面中查找",previous:"上一个匹配项",next:"下一个匹配项",close:"关闭查找"},device:{size:"尺寸",phones:"手机",foldables:"折叠屏手机",tablets:"平板电脑",desktops:"桌面",iphoneDuoInner:"iPhone Duo 内屏",iphoneDuoOuter:"iPhone Duo 外屏",resizewidth:"拖动调整页面宽度",resizeheight:"拖动调整页面高度",resizeboth:"拖动调整页面宽高","iphone-16":"iPhone 14 Pro / 16","iphone-16-pro":"iPhone 16 Pro / 17 / 17 Pro","iphone-16-pro-max":"iPhone 16 Pro Max / 17 Pro Max","pixel-8":"Pixel 8","pixel-9":"Pixel 9","desktop-1280":"桌面 1280 × 800","desktop-1440":"桌面 1440 × 900","desktop-1920":"桌面 1920 × 1080",background:"背景",backgroundAuto:"跟随主题",backgroundLight:"浅色背景",backgroundDark:"深色背景",toolbarAria:"设备仿真工具栏",dimensions:"尺寸:",responsive:"响应式",iphoneSe:"iPhone SE",iphone12Pro:"iPhone 12 Pro",iphone14Pro:"iPhone 14 Pro / 16",iphone14ProMax:"iPhone 14 Pro Max",pixel7:"Pixel 7",galaxyS20Ultra:"三星 Galaxy S20 Ultra",ipadMini:"iPad Mini",ipadPro13:"iPad Pro 13",width:"视口宽度",height:"视口高度",rotate:"旋转设备",scale:"显示比例",fitToWindow:"适应窗口"},settings:{searchEngine:"默认搜索引擎",searchEngineHint:"从地址框搜索时使用",title:"浏览器设置",sectionAria:"浏览器设置分区",agentControl:"允许 Agent 操控内置浏览器",agentControlHint:"关闭后新对话中的 Agent 无法使用浏览器,已用过浏览器的对话不受影响,你仍可在面板中正常浏览",downloadsPrompt:"每次下载前询问保存位置",downloadsPromptHint:"下载开始前显示保存对话框",agentDownloadLocation:"Agent 下载位置",agentDownloadLocationHint:"Agent 下载文件时使用的默认位置。Agent 的下载会直接保存到这里,不弹出对话框。",agentDownloadChoose:"选择…",agentDownloadReset:"恢复默认",agentDownloadAccess:"允许访问",agentDownloadAccessHint:"Agent 的下载会保存到“下载”文件夹,系统可能会请求允许 Kimi Code 访问该文件夹。",agentDownloadAccessRetry:"重试",agentDownloadFallback:"Kimi Code 无法访问“下载”文件夹,Agent 的下载将保存在这里。请在系统设置中授予访问权限后重试。",agentDownloadLimit:"Agent 下载大小上限",agentDownloadLimitHint:"超过此大小的 Agent 下载会被取消并删除。你自己的下载不受限制。",agentDownloadUnlimited:"不限制",defaultZoom:"默认缩放",defaultZoomHint:"应用到已打开和新建的浏览器标签页",clearData:"浏览数据",clearDataHint:"删除 Cookie、登录状态和网页缓存",userAgent:"用户代理",userAgentHint:"由已打开和新建的浏览器标签页、弹出窗口及 Worker 发送",userAgentDefault:"默认",userAgentCustom:"自定义",userAgentDefaultValue:"默认用户代理",userAgentCustomValue:"自定义用户代理",userAgentPlaceholder:"输入用户代理字符串",userAgentLoadPreset:"载入预设…",userAgentReset:"恢复默认",userAgentApply:"应用",userAgentInvalid:"用户代理不能为空,也不能包含控制字符",userAgentNewline:"用户代理只能是单行文本",userAgentTooLong:"用户代理不能超过 {max} 个字符",userAgentSaveFailed:"无法保存用户代理",userAgentCopy:"复制",userAgentCopied:"已复制",userAgentPresetBuiltIn:"内置",userAgentPresetSaved:"已保存",userAgentSavePreset:"存为预设…",userAgentSavePresetTitle:"保存用户代理预设",userAgentPresetName:"预设名称",userAgentPresetNamePlaceholder:"例如:测试环境 iPhone",userAgentPresetSave:"保存",userAgentPresetNameEmpty:"请输入预设名称",userAgentPresetNameTooLong:"预设名称不能超过 {max} 个字符",userAgentPresetNameInvalid:"预设名称不能包含控制字符",userAgentPresetNameDuplicate:"已存在同名预设",userAgentPresetsFull:"最多可保存 {max} 个预设,请先删除一个",userAgentPresetSaveFailed:"无法保存预设",userAgentDeletePreset:"删除预设 {name}",userAgentDeletePresetConfirm:"删除",userAgentConfirmDeletePreset:"确认删除预设 {name}",userAgentPresetDeleteFailed:"无法删除预设"},downloads:{title:"下载内容",empty:"暂无下载记录",clear:"清空下载记录",refresh:"刷新下载记录",completed:"已完成",progressing:"下载中",paused:"已暂停",cancelled:"已取消",interrupted:"已中断",fileMissing:"已删除",copyLink:"复制下载链接",linkCopied:"已复制链接",remove:"从列表中移除",showInFolder:"在文件夹中显示",pause:"暂停",resume:"继续",cancel:"取消",retry:"重试",recent:"最近下载",seeAll:"查看全部下载",status:{size:"{received}/{total}",speed:"{speed} - {status}",timeLeft:"{progress},还剩 {time}",paused:"已暂停 - {progress}"},timeLeft:{seconds:"{n} 秒",minutes:"{n} 分钟",hours:"{n} 小时",days:"{n} 天"},openDialog:{title:"打开文件",message:"要打开“{name}”吗?",detail:"文件将使用其默认应用打开。",open:"打开",cancel:"取消"},blockedDialog:{title:"未打开文件",message:"“{name}”是程序或脚本",detail:"Kimi Code 不会打开程序或脚本。你可以在文件所在的文件夹中找到它。",showInFolder:"在文件夹中显示",ok:"好"},openFailedDialog:{title:"无法打开文件",message:"无法打开“{name}”",detail:"可能没有能打开此类文件的应用,或系统拒绝了访问。",unavailable:"文件所在位置没有响应。请确认磁盘或网络位置可用后重试。",changed:"文件在此对话框打开期间发生了变化。",ok:"好"}},history:{title:"历史记录",empty:"暂无浏览记录",clear:"清空历史记录",refresh:"刷新历史记录"},tabMenu:{newToRight:"在右侧新建标签页",duplicate:"复制标签页",rename:"重命名标签页",copyUrl:"复制网址",openExternal:"在外部浏览器中打开",mute:"将标签页静音",unmute:"取消标签页静音",fork:"分叉会话",tabName:"标签页名称",saveName:"保存",automaticName:"留空则使用网页标题",actionFailed:"标签页操作失败",newTab:"新建浏览器标签页",close:"关闭标签页",closeOthers:"关闭其他标签页",closeToRight:"关闭右侧标签页"},addressAria:"网址",addressPlaceholder:"搜索或输入网址",clearData:"清空浏览数据",clearDataTitle:"清空浏览数据",clearDataMessage:"网站 Cookie、登录状态和缓存数据将被删除",clearDataConfirm:"清空",unavailable:"应用内浏览器暂不可用",invalidAddress:"输入有效网址",loadFailed:"网页加载失败",retry:"重试",empty:{title:"新标签页",lead:"在上方输入网址,或让 Agent:",items:{browse:{label:"浏览",detail:"打开网页、切换标签页,并把找到的内容展示给你"},read:{label:"读取",detail:"提取文本、列出页面元素并截图"},interact:{label:"交互",detail:"点击、输入、填写表单、选择选项和滚动"},layout:{label:"测试布局",detail:"在手机、平板或自定义尺寸下预览网页"},recall:{label:"回溯",detail:"搜索你的浏览历史和下载记录"}},footnote:"你可以随时查看 Agent 的操作并接管"}},U2e={details:{item:"个",annotation:"标注",classes:"类名",geometry:"定位与几何",semantics:"语义与状态",data:"data-* 属性",source:"页面与捕获信息",pageTitle:"页面标题",url:"URL",capturedAt:"捕获时间",viewport:"视口",width:"宽",height:"高",zoom:"缩放",pixelRatio:"设备像素比",size:"尺寸",position:"位置",copy:"复制",insert:"插入评论",more:"展开其余",less:"收起",items:"个",base:"基础类 / 自定义",interaction:"交互状态",responsive:"响应式",theme:"主题",truncated:"部分属性过长或过多,未采集。",copied:"已复制",copyFailed:"复制失败,请选择文本复制。"},includeScreenshot:"随引用发送截图",regionScreenshot:"区域标注需要截图",capturedAt:"捕获于 {time}",screenshotUnavailable:"截图暂不可用。",screenshotUploading:"截图正在上传。",screenshotFailed:"截图暂不可用,请重试上传。",retryScreenshot:"重试上传截图",title:"标注网页",cancelPick:"取消标注",group:"网页",comment:"评论",commentPlaceholder:"描述希望如何修改,或直接加入输入框",add:"加入输入框",save:"保存",locate:"定位网页",saveAndLocate:"保存并定位",noComposer:"请先打开对话输入框。",failed:"标注失败:{message}",missing:"此标注的捕获资料不可用。",stale:"无法定位原元素,网页可能已发生变化。",named:"{kind}:{name}",numbered:"{kind} · {number}",kind:{button:"按钮",input:"输入框",image:"图片",link:"链接",heading:"标题",element:"元素",region:"区域"}},K2e={title:"需要服务器 token",hint:"此服务器已开启访问保护。输入服务器启动时打印的 bearer token(或通过 {env} 设置的密码)。",tokenPlaceholder:"Token",connect:"连接",connecting:"连接中…"},Z2e={title:"远程控制",enable:"开启远程控制",enableHint:"开启后,可使用其他设备访问链接来控制本机智能体",enableFailed:"远程控制开启失败",disableFailed:"远程控制关闭失败",securityNote:"请保持本机唤醒并联网;出于安全考虑,请勿将链接分享给他人",statusOn:"远程控制已开启",statusLoadFailed:"远程控制状态加载失败",conflictTitle:"远程控制已由本机其他进程开启",conflictMeta:"运行中:PID {pid},{time} 起",conflictHint:"可以直接使用现有链接;也可以下线该进程,改由桌面端开启",takeover:"停止原进程,在桌面端启动",continueUsing:"保持原有进程",turnOff:"关闭远程控制",qrAlt:"远程访问链接二维码",qrCaption:"用手机扫码打开",copyLink:"复制链接",copied:"已复制",copyFailed:"复制失败,请重试",openLink:"打开链接",devicesTitle:"远程设备管理",refresh:"刷新",refreshDevices:"刷新设备列表",retry:"重试",devicesLoadFailed:"设备列表加载失败,请重试",emptyDevicesTitle:"还没有其他设备",emptyDevicesHint:"在另一台电脑上开启远程控制,设备会出现在这里",currentDevice:"本机",online:"在线",offline:"离线",deviceMenu:"设备操作",rename:"重命名",deactivate:"下线",delete:"删除",renamePlaceholder:"设备名称",renameFailed:"重命名失败,请重试",save:"保存",cancel:"取消",deactivateTitle:"下线 {name}",deactivateHint:"{name} 将断开远程控制,可在该设备上重新开启",deleteTitle:"删除 {name}",deleteHint:"{name} 将从设备列表中移除,可在该设备上重新开启远程控制",actionFailed:"操作失败,请重试"},G2e={common:c2e,app:u2e,sidebar:d2e,admin:f2e,workspace:h2e,conversation:p2e,status:m2e,composer:g2e,login:v2e,devices:y2e,providers:b2e,model:k2e,sessions:w2e,approval:C2e,question:A2e,tasks:x2e,thinking:S2e,diff:_2e,fileTree:I2e,filePreview:T2e,mediaPreview:M2e,mention:E2e,warnings:L2e,commands:R2e,tools:P2e,layout:$2e,mobile:O2e,theme:F2e,onboarding:D2e,settings:N2e,header:B2e,sideChat:z2e,selection:H2e,shortcuts:j2e,terminal:W2e,panel:q2e,browser:V2e,browserReference:U2e,serverAuth:K2e,remoteControl:Z2e},Q2e={en:l2e,zh:G2e},Y2e="kimi-locale";function pR(){let e=null;try{e=globalThis.localStorage?.getItem(Y2e)??null}catch{e=null}return e==="en"||e==="zh"?e:globalThis.navigator?.language?.toLowerCase().startsWith("zh")?"zh":"en"}function J2e(e){const t=e.locale??pR();return fge({legacy:!1,locale:t,fallbackLocale:"en",messages:Q2e})}const YY=Symbol("KimiI18n"),X2e={t:e=>e};function _m(){const e=Zt(YY,null);if(e)return e;try{const t=Wt();return{t:(n,i)=>t.t(n,i),locale:t.locale.value}}catch{return X2e}}const WI=Z(0),L2=R(()=>WI.value>0),qI=new Set;function JY(e){qI.add(e),WI.value+=1;let t=!1;return()=>{t||(t=!0,qI.delete(e)&&(WI.value-=1))}}function $N(e){if(!e)return!1;for(const t of qI)if(t===e||t.contains(e))return!0;return!1}function eve(e){return typeof e=="object"&&e!==null&&typeof e.contains=="function"}function l2(e,t){let n;Fe([e,t],([i,o])=>{n?.(),n=void 0,i&&eve(o)&&(n=JY(o))},{flush:"post",immediate:!0}),Qr(()=>{n?.(),n=void 0})}const D3="mcp__desktop_browser__run";function cd(e,t){const n=t??{h:"h",m:"m",s:"s"},i=Math.max(0,Math.floor(e/1e3));if(i<60)return i===0?"":`${i}${n.s}`;const o=Math.floor(i/60);if(o<60){const a=i%60;return a===0?`${o}${n.m}`:`${o}${n.m}${a}${n.s}`}const s=Math.floor(o/60),r=o%60;return r===0?`${s}${n.h}`:`${s}${n.h}${r}${n.m}`}const tve={multiedit:"multi_edit",multiedits:"multi_edit",shell:"bash",run:"bash",exec:"bash",ripgrep:"grep",rg:"grep",find:"glob",fetch:"web_fetch",webfetch:"web_fetch",url_fetch:"web_fetch",urlfetch:"web_fetch",list:"ls",listdir:"ls",list_dir:"ls",todowrite:"todo",todo_write:"todo",todoread:"todo",todolist:"todo",todo_list:"todo",agent:"task",subagent:"task",websearch:"search",web_search:"search",create_goal:"creategoal",get_goal:"getgoal",set_goal_budget:"setgoalbudget",update_goal:"updategoal",wait_for:"waitfor",task_list:"tasklist",task_output:"taskoutput",task_stop:"taskstop"};function yr(e){const t=(e??"").trim().toLowerCase().replace(/[\s-]+/g,"_");return tve[t]??t}const nve=/^\d+$/,ive=/^\*\/(\d+)$/;function tg(e,t,n){if(!nve.test(e))return;const i=Number.parseInt(e,10);return i>=t&&i<=n?i:void 0}function ON(e){return e<10?`0${e}`:String(e)}function ove(e,t,n=!0){return mR(e,t,n)??t}function mR(e,t,n=!0){const i=t.trim().split(/\s+/);if(i.length!==5)return;const[o,s,r,a,l]=i,c=s==="*",u=r==="*",d=a==="*",f=l==="*";if(!n&&(u||d||!f))return;if(c&&u&&d&&f){if(o==="*")return e("tools.cron.schedule.everyMinute");const y=ive.exec(o)?.[1];if(y!==void 0){const k=Number.parseInt(y,10);return k===1?e("tools.cron.schedule.everyMinute"):k>1&&k<=59&&60%k===0?e("tools.cron.schedule.everyNMinutes",{n:k}):void 0}const v=tg(o,0,59);return v===void 0?void 0:e("tools.cron.schedule.hourlyAt",{minute:v})}const h=tg(o,0,59),m=tg(s,0,23);if(h===void 0||m===void 0)return;const g=`${ON(m)}:${ON(h)}`;if(u&&d){if(f)return e("tools.cron.schedule.dailyAt",{time:g});if(l==="1-5")return e("tools.cron.schedule.weekdaysAt",{time:g});const y=tg(l,0,7);return y===void 0?void 0:e("tools.cron.schedule.weeklyAt",{day:e(`tools.cron.schedule.day.${y===7?0:y}`),time:g})}if(f){const y=tg(r,1,31);if(y===void 0)return;if(d)return e("tools.cron.schedule.monthlyAt",{day:y,time:g});const v=tg(a,1,12);if(v===void 0)return;const k=e("tools.cron.schedule.dateMD",{month:e(`tools.cron.schedule.monthShort.${v}`),day:y});return n?e("tools.cron.schedule.yearlyAt",{date:k,time:g}):e("tools.cron.schedule.onceAt",{date:k,time:g})}}const sve={read:"tools.label.read",bash:"tools.label.bash",edit:"tools.label.edit",multi_edit:"tools.label.edit",write:"tools.label.write",grep:"tools.label.grep",glob:"tools.label.glob",ls:"tools.label.ls",web_fetch:"tools.label.web_fetch",search:"tools.label.search",todo:"tools.label.todo",task:"tools.label.task",agentswarm:"tools.label.swarm",askuserquestion:"tools.label.ask_user",exitplanmode:"tools.label.plan",creategoal:"tools.label.goal_create",getgoal:"tools.label.goal_get",setgoalbudget:"tools.label.goal_budget",updategoal:"tools.label.goal_update",waitfor:"tools.label.waitfor",tasklist:"tools.label.task_list",taskoutput:"tools.label.task_output",taskstop:"tools.label.task_stop",croncreate:"tools.label.cron_create",cronlist:"tools.label.cron_list",crondelete:"tools.label.cron_delete",notifyuser:"tools.label.notify_user",skill:"tools.label.skill"};function XY(e,t,n){const i=yr(t);if(i==="croncreate"&&n!==void 0&&tJ(n)?.recurring===!1)return e("tools.label.cron_create_once");const o=sve[i];return o?e(o):t}const eJ=80;function rve(e,t=eJ){const n=e.trim();return n.length>t?n.slice(0,t-1)+"…":n}function ave(e,t){const n=e.trim();return!!(n===""||n==="{}"||n==="[]"||n==="null"||t&&Object.keys(t).length===0)}function tJ(e){const t=e.trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);return n&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function zi(e){return typeof e=="string"&&e.length>0?e:void 0}function Jh(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function lve(e){try{const t=new URL(e),n=t.pathname.split("/").filter(Boolean)[0];return n?`${t.host}/${n}`:t.host}catch{return e.replace(/^https?:\/\//,"")}}function fx(e){return zi(e.path)??zi(e.file_path)??zi(e.filePath)??zi(e.filename)}const cve={active:"status.goalStatusActive",blocked:"status.goalStatusBlocked",complete:"status.goalStatusComplete"};function uve(e,t){const n=zi(t);if(!n)return;const i=cve[n];return i?e(i):n}function dve(e,t){const n=Jh(t.value),i=zi(t.unit);if(!(n===void 0||!i))switch(i){case"turns":return e("tools.goal.turns",{value:n});case"tokens":return e("tools.goal.tokens",{value:n});case"milliseconds":return e("tools.goal.milliseconds",{value:n});case"seconds":return e("tools.goal.seconds",{value:n});case"minutes":return e("tools.goal.minutes",{value:n});case"hours":return e("tools.goal.hours",{value:n});default:return e("tools.goal.budget",{value:n,unit:i})}}function gR(e,t,n,i=!1){const o=(s,r=eJ)=>i?s.trim():rve(s,r);try{const s=tJ(n);if(!i&&ave(n,s))return"";const r=()=>o(n.replace(/^·\s*/,""));if(!s)return r();switch(yr(t)){case"read":{const a=fx(s);if(!a)return r();const l=Jh(s.offset)??Jh(s.line_start)??Jh(s.start_line),c=Jh(s.limit)??Jh(s.length),u=Jh(s.line_end)??Jh(s.end_line)??(l!==void 0&&c!==void 0?l+c:void 0);return o(l!==void 0&&u!==void 0?`${a}:${l}-${u}`:l!==void 0?`${a}:${l}`:a)}case"write":{const a=fx(s);return a?o(`${a} ${e("tools.chip.created")}`):r()}case"edit":case"multi_edit":{const a=fx(s);return a?o(a):r()}case"bash":{const a=zi(s.command)??zi(s.cmd)??zi(s.script);return a?a.trim():r()}case"grep":case"search":{const a=zi(s.pattern)??zi(s.query)??zi(s.regex),l=zi(s.path)??zi(s.glob)??zi(s.include);return a&&l?o(e("tools.summary.inScope",{value:a,scope:l})):a?o(a):r()}case"glob":{const a=zi(s.pattern)??zi(s.glob)??zi(s.query),l=zi(s.path)??zi(s.cwd);return a&&l?o(e("tools.summary.inScope",{value:a,scope:l})):a?o(a):zi(s.path)?o(zi(s.path)):r()}case"ls":{const a=zi(s.path)??zi(s.dir)??zi(s.directory)??zi(s.cwd);return a?o(a):r()}case"web_fetch":{const a=zi(s.url)??zi(s.uri);return a?o(lve(a)):r()}case"todo":case"task":{const a=zi(s.description)??zi(s.title)??zi(s.prompt)??zi(s.name)??zi(s.subagent_type);if(a)return o(a);const l=Array.isArray(s.todos)?s.todos:Array.isArray(s.items)?s.items:void 0;return l?o(e("tools.chip.todos",{count:l.length})):r()}case"creategoal":{if(i)return r();const a=zi(s.objective),l=zi(s.completionCriterion);return a&&l?o(e("tools.goal.objectiveWithCriterion",{objective:a,criterion:l})):a?o(a):r()}case"getgoal":return i?r():"";case"setgoalbudget":{if(i)return r();const a=dve(e,s);return a?o(a):r()}case"updategoal":{if(i)return r();const a=uve(e,s.status);return a?o(e("tools.goal.status",{status:a})):r()}case"croncreate":{if(i)return r();const a=zi(s.cron);if(!a)return r();const l=mR(e,a,s.recurring!==!1);return l?o(l):""}case"crondelete":return i?r():"";case"skill":{const a=zi(s.skill)??zi(s.name);if(!a)return r();const l=zi(s.args);return i?l?`${a} +${l}`:a:o(l?`${a} · ${l}`:a)}default:return r()}}catch{return n}}function fve(e,t){try{switch(yr(t.name)){case"bash":return t.timing?t.timing:"";case"read":{if(t.output&&t.output.length>0){const n=t.output.length;return e("tools.chip.lines",{count:n})}return""}case"edit":case"multi_edit":case"write":{if(t.output){for(const i of t.output){const o=/\+(\d+)/.exec(i);if(o){let s=null;for(const r of i.slice(o.index+o[0].length).matchAll(/[-−](\d+)/g))s=r;if(s)return`+${o[1]} −${s[1]}`}}const n=t.output.find(i=>/\d+/.test(i));if(n){const i=n.match(/\+(\d+)/),o=n.match(/[-−](\d+)/);if(i||o)return`${i?`+${i[1]}`:""} ${o?`−${o[1]}`:""}`.trim()}if(t.status!=="error")return e("tools.chip.edited")}return""}case"grep":case"search":return t.output&&t.output.length>0?e("tools.chip.results",{count:t.output.length}):"";default:return""}}catch{return""}}const nJ=new Set(["read","bash","grep","search","glob","ls","web_fetch","edit","write","browser"]);function iJ(e){if(e===D3)return"browser";const t=yr(e);return t==="multi_edit"?"edit":t}function VI(e){const t=[],n=new Map;for(const i of e){if(i.kind==="thinking")continue;const o=iJ(i.tool.name);let s=n.get(o);s||(s={count:0,errors:0,tools:[]},n.set(o,s),t.push(o)),s.count++,s.tools.push(i.tool),i.tool.status==="error"&&s.errors++}return{order:t,byKind:n}}function R2(e,t){return e.find(n=>n.kind===t)}function oJ(e,t,n){const i=t.flatMap(o=>{const s=R2(e,o)?.detail?.(n.get(o)?.tools??[]);return s?[s]:[]});return i.length>0?i.join(` +`):void 0}function sJ(e,t,n){return nJ.has(t)?e(`tools.group.typed.${t}.done`,{count:n}):e("tools.group.countOther",{count:n})}function rJ(e){return e.map(t=>t.fragments.map(n=>n.text).join("")).join(" · ")}function aJ(e,t,n){return{text:e("tools.activity.failedClause",{count:t}),tone:n}}function hve(e,t,n={}){const i=n.providers??[],{order:o,byKind:s}=VI(t),r=[];let a=!1;for(const l of o){const c=s.get(l);if(!c)continue;c.errors>0&&(a=!0);const u=R2(i,l)?.done(c.tools,!1);if(u){r.push(...u);continue}const d=[{text:sJ(e,l,c.count),tone:"normal"}];c.errors>0&&d.push(aJ(e,c.errors,"normal")),r.push({fragments:d})}for(const l of o){const c=R2(i,l)?.tail?.(s.get(l)?.tools??[],!1);c&&r.push(c)}if(n.durationMs!==void 0){const l=cd(n.durationMs);l&&r.push({fragments:[{text:l,tone:"faint"}]})}return{clauses:r,plain:rJ(r),hasError:a,detail:oJ(i,o,s)}}function pve(e,t,n,i){if(t.kind==="thinking")return{fragments:[{text:e("thinking.streaming"),tone:"normal"}]};const o=iJ(t.tool.name),s=R2(n,o)?.doing?.(t.tool,i.get(o)?.tools??[]);if(s)return{fragments:[{text:s,tone:"normal"}]};if(o==="browser")return{fragments:[{text:e("tools.activity.doing.browser"),tone:"normal"}]};if(o==="bash")return{fragments:[{text:e("tools.activity.doing.bash"),tone:"normal"}]};let r=gR(e,t.tool.name,t.tool.arg);if(o==="write"&&r){const l=e("tools.chip.created");r.endsWith(l)&&(r=r.slice(0,r.length-l.length).trimEnd())}return{fragments:[{text:r&&nJ.has(o)?e(`tools.activity.doing.${o}`,{subject:r}):e("tools.activity.busy"),tone:"normal"}]}}function mve(e,t,n,i=[]){const o=t.filter(f=>f!==n&&!(f.kind==="tool"&&f.tool.status==="running")),{order:s,byKind:r}=VI(o),a=e("tools.activity.liveDonePrefix"),l=[];for(const f of s){const h=r.get(f);if(!h)continue;const m=R2(i,f)?.done(h.tools,!0);if(m){l.push(...m);continue}const g=[{text:`${a}${sJ(e,f,h.count)}`,tone:"faint"}];h.errors>0&&g.push(aJ(e,h.errors,"faint")),l.push({fragments:g})}for(const f of s){const h=R2(i,f)?.tail?.(r.get(f)?.tools??[],!0);h&&l.push(h)}const c=n===null?null:pve(e,n,i,r),u=c?[c,...l]:l,d=VI(t);return{current:c,done:l,plain:rJ(u),detail:oJ(i,d.order,d.byKind)}}async function hs(e){const t=typeof navigator<"u"?navigator.clipboard:void 0;if(t&&typeof t.writeText=="function")try{return await t.writeText(e),!0}catch{}return gve(e)}function gve(e){if(typeof document>"u"||typeof document.execCommand!="function")return!1;const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",t.style.opacity="0",document.body.appendChild(t);let n=!1;try{t.focus(),t.select(),n=document.execCommand("copy")}catch{n=!1}finally{document.body.removeChild(t)}return n}const vve={ts:"ts",tsx:"tsx",js:"js",jsx:"jsx",mjs:"js",cjs:"js",vue:"vue",svelte:"svelte",py:"py",rb:"rb",go:"go",rs:"rs",java:"java",kt:"kt",kts:"kts",scala:"scala",swift:"swift",c:"c",h:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",cs:"cs",php:"php",sh:"sh",bash:"bash",zsh:"zsh",fish:"fish",ps1:"ps1",bat:"bat",cmd:"bat",sql:"sql",graphql:"graphql",prisma:"prisma",html:"html",htm:"html",xml:"xml",svg:"xml",css:"css",scss:"scss",sass:"sass",less:"less",json:"json",jsonc:"jsonc",json5:"json5",yaml:"yaml",yml:"yml",toml:"toml",ini:"ini",md:"md",markdown:"markdown",mdx:"mdx",lua:"lua",r:"r",dart:"dart",zig:"zig",mk:"makefile",cmake:"cmake",diff:"diff",proto:"proto"},yve={dockerfile:"dockerfile",makefile:"makefile","cmakelists.txt":"cmake"};function bve(e){const t=e?.split(/[\\/]/).pop()?.toLowerCase()??"";if(!t)return;const n=yve[t];if(n)return n;const i=t.lastIndexOf(".");if(!(i<=0))return vve[t.slice(i+1)]}class Vf extends Error{code;requestId;details;timestamp;durationMs;constructor(t){super(t.msg),this.name="DaemonApiError",this.code=t.code,this.requestId=t.requestId,this.details=t.details,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}class cc extends Error{cause;method;path;url;requestId;phase;timeoutMs;status;statusText;contentType;bodyPreview;timestamp;durationMs;constructor(t){super(t.message),this.name="DaemonNetworkError",this.cause=t.cause,this.method=t.method,this.path=t.path,this.url=t.url,this.requestId=t.requestId,this.phase=t.phase,this.timeoutMs=t.timeoutMs,this.status=t.status,this.statusText=t.statusText,this.contentType=t.contentType,this.bodyPreview=t.bodyPreview,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}class d6 extends Error{size;limit;constructor(t){super(`file too large to preview: ${t.size} bytes (limit ${t.limit})`),this.name="FileTooLargeError",this.size=t.size,this.limit=t.limit}}function Ti(e){return e instanceof Vf||typeof e=="object"&&e!==null&&e.name==="DaemonApiError"&&typeof e.code=="number"}function N3(e){return e instanceof cc||typeof e=="object"&&e!==null&&e.name==="DaemonNetworkError"&&typeof e.method=="string"&&typeof e.path=="string"}function lJ(e){return N3(e)&&typeof e.cause=="object"&&e.cause!==null&&e.cause.name==="TimeoutError"}function cJ(e){return e instanceof d6||typeof e=="object"&&e!==null&&e.name==="FileTooLargeError"&&typeof e.limit=="number"}const kve=41301,wve=40901,Cve=40922;function FN(e){return Ti(e)&&e.code===Cve}const Ave=40932,uJ=40931;function xve(e){return Ti(e)&&e.code===Ave}function P2(e){return Ti(e)&&e.code===uJ}function Sve(e){if(!Ti(e)||e.code!==uJ)return;const t=e.details,n=typeof t=="object"?t?.holder?.clientIdentity:void 0;return typeof n=="string"&&n!==""?n:void 0}function _ve(e){const t=(e instanceof Error?e.message:String(e)).slice(0,140);return lJ(e)?{kind:"timeout",message:t}:N3(e)?{kind:"network",message:t}:Ti(e)?{kind:"api",message:t}:{kind:"unknown",message:t}}const Ive="kimi_desktop",Tve="platform",Mve="kimi_native_titlebar",DN="kimi-desktop",NN="kimi-desktop-platform",BN="kimi-native-titlebar";function Eve(){let e=!1,t=null,n=!1;try{const i=new URLSearchParams(window.location.search);i.has(Ive)?(sessionStorage.setItem(DN,"1"),e=!0):e=e||sessionStorage.getItem(DN)==="1";const o=i.get(Tve);o?(sessionStorage.setItem(NN,o),t=o):t=sessionStorage.getItem(NN);const s=i.get(Mve);s?(sessionStorage.setItem(BN,s),n=s==="1"):n=sessionStorage.getItem(BN)==="1"}catch{}return{isDesktop:e,platform:t,nativeTitleBar:n}}const UI=Eve(),lv=UI.isDesktop,$1=UI.isDesktop&&UI.platform==="darwin",Lve=["faces","nature","food","activity","objects","symbols"],Rve=[["😀","faces","grinning smile happy 笑 开心"],["😄","faces","smile happy joy 笑 开心 高兴"],["😁","faces","grin beaming 咧嘴笑 开心"],["😂","faces","joy laugh tears 笑哭 爆笑"],["🤣","faces","rofl laugh rolling 笑翻 爆笑"],["😊","faces","blush shy happy 微笑 害羞"],["😉","faces","wink 眨眼"],["😍","faces","heart eyes love 爱心眼 喜欢 爱"],["🥰","faces","smiling hearts love 爱心 喜欢"],["😘","faces","kiss 飞吻 亲亲"],["😋","faces","yum tongue 好吃 馋"],["🤪","faces","zany crazy 鬼脸 疯"],["🤔","faces","thinking hmm consider 思考 想"],["🤨","faces","skeptical eyebrow 怀疑 挑眉"],["😐","faces","neutral meh 面无表情 无语"],["😑","faces","expressionless 面无表情 无语"],["🙄","faces","eye roll 翻白眼 无语"],["😶","faces","no mouth silent 无言 沉默"],["🫡","faces","salute 敬礼 收到"],["🤫","faces","shush quiet 嘘 安静"],["🤭","faces","oops giggle 捂嘴 偷笑"],["😴","faces","sleeping sleepy 睡觉 困"],["😪","faces","sleepy tired 困 疲惫"],["😷","faces","mask sick 口罩 生病"],["🤒","faces","sick fever 生病 发烧"],["🤕","faces","hurt bandage 受伤"],["🤢","faces","nauseated 恶心"],["🤯","faces","mind blown explode 震惊 爆炸"],["🥳","faces","party celebrate 庆祝 派对"],["🤩","faces","star struck 星星眼 激动"],["😎","faces","cool sunglasses 酷 墨镜"],["🥸","faces","disguise 伪装 假扮"],["🤓","faces","nerd geek 书呆子 学霸"],["😢","faces","cry sad 哭 难过"],["😭","faces","sob cry loudly 大哭 痛哭"],["😤","faces","triumph huff 哼 生气"],["😡","faces","angry rage mad 生气 愤怒"],["🤬","faces","swearing cursing 骂人 爆粗"],["😱","faces","scream fear 尖叫 害怕"],["😨","faces","fearful 害怕 恐惧"],["🥵","faces","hot heat 热 出汗"],["🥶","faces","cold freezing 冷 冻"],["🥴","faces","woozy drunk 晕 醉"],["😇","faces","angel innocent 天使 无辜"],["🙃","faces","upside down silly 倒脸 哭笑不得"],["💀","faces","skull dead 骷髅 笑死"],["👻","faces","ghost 鬼 幽灵"],["👍","faces","thumbs up like good 赞 好"],["👎","faces","thumbs down dislike 踩 差"],["👏","faces","clap applause 鼓掌 厉害"],["🙌","faces","raise hands celebrate 举手 庆祝"],["🙏","faces","pray thanks please 拜托 感谢 祈祷"],["💪","faces","muscle strong flex 加油 强壮 肌肉"],["👀","faces","eyes look watch 看 围观 眼睛"],["🤝","faces","handshake deal 握手 合作"],["✌️","faces","victory peace 胜利 耶"],["👋","faces","wave hello bye 挥手 你好 再见"],["🤞","faces","crossed fingers luck 祈祷 好运"],["👌","faces","ok okay 好的 可以"],["🫶","faces","heart hands love 比心 爱心"],["✍️","faces","writing hand 写字 记录"],["🧠","faces","brain smart 大脑 聪明"],["🦾","faces","mechanical arm 机械臂 力量"],["👤","faces","person user profile 个人 用户"],["👥","faces","people team group 团队 多人"],["🐶","nature","dog puppy 狗 小狗"],["🐱","nature","cat kitten 猫 小猫"],["🐭","nature","mouse rat 老鼠"],["🐹","nature","hamster 仓鼠"],["🐰","nature","rabbit bunny 兔子"],["🦊","nature","fox 狐狸"],["🐻","nature","bear 熊"],["🐼","nature","panda 熊猫"],["🐨","nature","koala 考拉"],["🐯","nature","tiger 老虎"],["🦁","nature","lion 狮子"],["🐮","nature","cow 牛"],["🐷","nature","pig 猪"],["🐸","nature","frog 青蛙"],["🐵","nature","monkey 猴子"],["🐔","nature","chicken 鸡"],["🐧","nature","penguin 企鹅"],["🐦","nature","bird 鸟"],["🐣","nature","chick hatching 小鸡 孵化"],["🦆","nature","duck 鸭子"],["🦉","nature","owl 猫头鹰"],["🐝","nature","bee 蜜蜂"],["🐛","nature","bug caterpillar 虫子 毛虫"],["🦋","nature","butterfly 蝴蝶"],["🐌","nature","snail slow 蜗牛 慢"],["🐢","nature","turtle slow 乌龟 慢"],["🐍","nature","snake 蛇"],["🐙","nature","octopus 章鱼"],["🦑","nature","squid 鱿鱼"],["🦐","nature","shrimp 虾"],["🦀","nature","crab 螃蟹"],["🐠","nature","tropical fish 鱼 热带鱼"],["🐳","nature","whale 鲸鱼"],["🦈","nature","shark 鲨鱼"],["🐊","nature","crocodile 鳄鱼"],["🦄","nature","unicorn 独角兽"],["🐴","nature","horse 马"],["🐑","nature","sheep 羊 绵羊"],["🐐","nature","goat 山羊"],["🦜","nature","parrot 鹦鹉"],["🌸","nature","blossom flower sakura 樱花 花"],["🌹","nature","rose flower 玫瑰 花"],["🌻","nature","sunflower 向日葵"],["🌷","nature","tulip 郁金香"],["🌱","nature","seedling sprout 发芽 幼苗"],["🌲","nature","tree evergreen 树 松树"],["🌳","nature","deciduous tree 树 大树"],["🌵","nature","cactus 仙人掌"],["🍀","nature","clover luck 四叶草 幸运"],["🍁","nature","maple leaf autumn 枫叶 秋天"],["🍄","nature","mushroom 蘑菇"],["🌈","nature","rainbow 彩虹"],["☀️","nature","sun sunny 太阳 晴"],["🌙","nature","moon crescent 月亮"],["⭐","nature","star 星星"],["🌟","nature","glowing star 星星 闪亮"],["☁️","nature","cloud 云"],["⛅","nature","partly cloudy 多云"],["🌧️","nature","rain rainy 下雨"],["❄️","nature","snowflake snow 雪 雪花"],["⛄","nature","snowman 雪人"],["⚡","nature","lightning bolt 闪电"],["🔥","nature","fire hot 火 燃"],["🌊","nature","wave ocean sea 海浪"],["🏔️","nature","mountain snow 雪山 山"],["☕","food","coffee 咖啡"],["🍵","food","tea 茶"],["🧋","food","bubble tea boba 奶茶"],["🥛","food","milk 牛奶"],["🍺","food","beer 啤酒"],["🍷","food","wine 红酒"],["🥂","food","champagne cheers 香槟 干杯"],["🥤","food","cup straw soda 饮料 可乐"],["🧃","food","juice box 果汁"],["🍎","food","apple 苹果"],["🍊","food","orange tangerine 橙子 橘子"],["🍋","food","lemon 柠檬"],["🍉","food","watermelon 西瓜"],["🍓","food","strawberry 草莓"],["🍑","food","peach 桃子"],["🥭","food","mango 芒果"],["🍍","food","pineapple 菠萝"],["🥝","food","kiwi 猕猴桃"],["🍇","food","grapes 葡萄"],["🍒","food","cherries 樱桃"],["🥑","food","avocado 牛油果"],["🥦","food","broccoli 西兰花"],["🌽","food","corn 玉米"],["🌶️","food","hot pepper spicy 辣椒 辣"],["🍔","food","burger hamburger 汉堡"],["🍟","food","fries 薯条"],["🍕","food","pizza 披萨"],["🌭","food","hot dog 热狗"],["🥪","food","sandwich 三明治"],["🌮","food","taco 墨西哥卷"],["🍜","food","ramen noodles 拉面 面条"],["🍝","food","spaghetti pasta 意面"],["🍣","food","sushi 寿司"],["🍱","food","bento 便当"],["🥟","food","dumpling 饺子"],["🍚","food","rice 米饭"],["🍞","food","bread 面包"],["🥐","food","croissant 可颂 牛角包"],["🧀","food","cheese 奶酪 芝士"],["🍳","food","cooking egg 煎蛋 做饭"],["🍦","food","ice cream 冰淇淋"],["🍰","food","cake 蛋糕"],["🎂","food","birthday cake 生日蛋糕"],["🍫","food","chocolate 巧克力"],["🍩","food","donut doughnut 甜甜圈"],["🍪","food","cookie 饼干"],["🍭","food","lollipop 棒棒糖"],["⚽","activity","soccer football 足球"],["🏀","activity","basketball 篮球"],["🏈","activity","american football 橄榄球"],["⚾","activity","baseball 棒球"],["🎾","activity","tennis 网球"],["🏐","activity","volleyball 排球"],["🏓","activity","ping pong 乒乓球"],["🏸","activity","badminton 羽毛球"],["🥊","activity","boxing 拳击"],["⛳","activity","golf 高尔夫"],["🎣","activity","fishing 钓鱼"],["🏊","activity","swim 游泳"],["🏄","activity","surf 冲浪"],["🚴","activity","cycling 骑行"],["🏋️","activity","weightlifting gym 举重 健身"],["🧘","activity","yoga meditation 瑜伽 冥想"],["🎮","activity","video game controller 游戏 游戏机"],["🎲","activity","dice 骰子"],["🎯","activity","target bullseye 目标 靶心"],["🎳","activity","bowling 保龄球"],["🎰","activity","slot machine 老虎机"],["♟️","activity","chess 国际象棋 棋"],["🎸","activity","guitar 吉他"],["🎹","activity","piano keyboard 钢琴"],["🥁","activity","drum 鼓"],["🎤","activity","microphone sing 麦克风 唱歌"],["🎧","activity","headphones 耳机"],["🎬","activity","clapper movie 电影 拍摄"],["🎨","activity","art palette paint 画画 艺术"],["🎭","activity","theater masks 戏剧 面具"],["🎪","activity","circus 马戏团"],["🎡","activity","ferris wheel 摩天轮"],["✈️","activity","airplane travel flight 飞机 旅行"],["🚗","activity","car drive 汽车 车"],["🚕","activity","taxi 出租车"],["🚌","activity","bus 公交车"],["🚑","activity","ambulance 救护车"],["🚒","activity","fire engine 消防车"],["🚀","activity","rocket launch ship 火箭 发射"],["🛸","activity","ufo flying saucer 飞碟"],["🚲","activity","bicycle bike 自行车"],["🛴","activity","scooter 滑板车"],["🚄","activity","bullet train 高铁 动车"],["🚢","activity","ship 船 轮船"],["⛵","activity","sailboat 帆船"],["🏠","activity","house home 房子 家"],["🏢","activity","office building 公司 办公楼"],["🏥","activity","hospital 医院"],["🏫","activity","school 学校"],["🏖️","activity","beach vacation 海滩 度假"],["⛺","activity","camping tent 露营 帐篷"],["🌋","activity","volcano 火山"],["🗺️","activity","map world 地图"],["🧭","activity","compass 指南针"],["💻","objects","laptop computer 电脑 笔记本"],["🖥️","objects","desktop computer 台式机 电脑"],["⌨️","objects","keyboard 键盘"],["🖱️","objects","computer mouse 鼠标"],["📱","objects","phone mobile 手机"],["🔋","objects","battery 电池"],["🔌","objects","plug electric 插头"],["💾","objects","floppy save 软盘 保存"],["📀","objects","cd disc 光盘"],["🎥","objects","movie camera 摄像机"],["📷","objects","camera 相机"],["🔭","objects","telescope 望远镜"],["📡","objects","satellite antenna 卫星 天线"],["🌐","objects","globe web internet 网络 全球 互联网"],["🕯️","objects","candle 蜡烛"],["💡","objects","bulb idea light 灯泡 点子"],["🔦","objects","flashlight 手电筒"],["📁","objects","folder 文件夹"],["📂","objects","open folder 文件夹 打开"],["🗂️","objects","card index archive 归档 索引"],["📅","objects","calendar date 日历 日期"],["📌","objects","pin pushpin 图钉 置顶"],["📍","objects","round pin location 定位 位置"],["📎","objects","paperclip attachment 回形针 附件"],["✂️","objects","scissors cut 剪刀 剪切"],["📏","objects","ruler 尺子"],["📝","objects","memo note write 备忘 记录"],["✏️","objects","pencil edit write 铅笔 编辑"],["📄","objects","document page 文档 文件"],["📃","objects","page curl 文档 文件"],["📑","objects","bookmark tabs 标签页 文档"],["📚","objects","books 书 书籍"],["📖","objects","open book 打开的书 阅读"],["🔖","objects","bookmark 书签"],["🏷️","objects","label tag 标签"],["📊","objects","bar chart stats 图表 统计"],["📈","objects","chart up growth 上涨 增长"],["📉","objects","chart down 下跌 下降"],["🔍","objects","search magnifier 搜索 查找"],["🔎","objects","search magnifier right 搜索 查找"],["🔒","objects","lock locked 锁 锁定"],["🔓","objects","unlock open 解锁"],["🔑","objects","key 钥匙 密钥"],["🔧","objects","wrench tool 扳手 工具"],["🔨","objects","hammer 锤子"],["🛠️","objects","tools hammer wrench 工具 修理"],["🧰","objects","toolbox 工具箱 工具"],["🪛","objects","screwdriver 螺丝刀 工具"],["🔩","objects","nut and bolt screw 螺母 螺栓"],["🏗️","objects","building construction crane 施工 建造"],["⚙️","objects","gear settings 齿轮 设置"],["🧲","objects","magnet 磁铁"],["⚗️","objects","alembic 蒸馏器 实验"],["🧪","objects","test tube experiment 实验 试管"],["🔬","objects","microscope science 显微镜 科学"],["🤖","objects","robot bot 机器人"],["👾","objects","alien monster game 外星人 游戏"],["💣","objects","bomb 炸弹"],["🧨","objects","firecracker 爆竹"],["🗑️","objects","trash delete 垃圾桶 删除"],["🧹","objects","broom clean 扫帚 清理"],["🧻","objects","toilet paper 纸巾"],["🧽","objects","sponge 海绵"],["📦","objects","package box 包裹 箱子"],["✉️","objects","envelope mail 邮件 信封"],["📮","objects","mailbox postbox 邮箱"],["📧","objects","email mail 邮件"],["📥","objects","inbox tray receive 收件箱 接收"],["📤","objects","outbox tray send 发件箱 发送"],["📞","objects","telephone receiver call phone 电话 通话"],["💬","objects","speech balloon chat message bubble 聊天 对话 气泡 消息"],["💭","objects","thought balloon thinking 思考 想法 气泡"],["📣","objects","megaphone announcement 喇叭 公告"],["📢","objects","loudspeaker broadcast 广播 喇叭 通知"],["🚨","objects","police light alert emergency 警报 告警 紧急"],["🗳️","objects","ballot box vote 投票箱 投票"],["🔗","objects","link chain 链接 连接"],["🧩","objects","puzzle piece plugin 拼图 插件"],["🪄","objects","magic wand 魔法 魔杖"],["🛡️","objects","shield security 盾牌 安全"],["⚔️","objects","crossed swords 交叉剑 战斗"],["💳","objects","credit card 信用卡"],["💰","objects","money bag 钱袋 钱"],["🧾","objects","receipt 收据 小票"],["📿","objects","prayer beads 念珠"],["💍","objects","ring 戒指"],["👑","objects","crown 皇冠"],["🎩","objects","top hat 礼帽"],["🎒","objects","backpack 背包 书包"],["👓","objects","glasses 眼镜"],["🌂","objects","umbrella 雨伞"],["🕰️","objects","mantel clock 座钟"],["⌚","objects","watch 手表"],["⏱️","objects","stopwatch 秒表"],["🧯","objects","fire extinguisher 灭火器"],["🩹","objects","bandage patch fix 创可贴 补丁 修复"],["🎓","objects","graduation cap study learn 毕业 学习"],["🎫","objects","ticket 票 门票 工单"],["✅","symbols","check done complete 完成 对勾"],["✔️","symbols","checkmark correct 对勾 正确"],["❌","symbols","cross x wrong 错误 叉"],["❓","symbols","question help 问题 问号"],["❔","symbols","white question 问题 问号"],["❗","symbols","exclamation important 感叹号 重要"],["❕","symbols","white exclamation 感叹号"],["⚠️","symbols","warning caution 警告 注意"],["🚧","symbols","construction wip 施工 进行中"],["🚫","symbols","prohibited no 禁止"],["💥","symbols","boom explosion 爆炸"],["✨","symbols","sparkles shiny 闪亮 星星"],["🎉","symbols","tada party celebrate 庆祝 撒花"],["🎊","symbols","confetti party 庆祝 彩带"],["🏆","symbols","trophy champion 奖杯 冠军"],["🥇","symbols","gold medal first 金牌 第一"],["🥈","symbols","silver medal second 银牌 第二"],["🥉","symbols","bronze medal third 铜牌 第三"],["🎖️","symbols","military medal 勋章"],["🚩","symbols","red flag mark 红旗 标记"],["🏁","symbols","checkered flag finish 终点 完成"],["⏳","symbols","hourglass time waiting 沙漏 时间"],["⌛","symbols","hourglass done 沙漏 时间"],["🕐","symbols","clock one time 时钟 一点"],["⏰","symbols","alarm clock 闹钟"],["🔔","symbols","bell notification 铃铛 通知"],["🔕","symbols","bell slash mute 静音 免打扰"],["🕹️","symbols","joystick game 摇杆 游戏"],["🔴","symbols","red circle record 红圆 录制"],["🟢","symbols","green circle online 绿圆 在线"],["🟡","symbols","yellow circle 黄圆"],["🟠","symbols","orange circle 橙圆"],["🔵","symbols","blue circle 蓝圆"],["🟣","symbols","purple circle 紫圆"],["⚫","symbols","black circle 黑圆"],["⚪","symbols","white circle 白圆"],["🟥","symbols","red square 红方"],["🟩","symbols","green square 绿方"],["🟦","symbols","blue square 蓝方"],["🔺","symbols","red triangle up 三角 上"],["🔻","symbols","triangle down 三角 下"],["🔸","symbols","diamond orange 菱形"],["🔹","symbols","diamond blue 菱形"],["💠","symbols","diamond dot 菱形 花"],["🔶","symbols","diamond orange big 菱形"],["🔷","symbols","diamond blue big 菱形"],["▶️","symbols","play 播放"],["⏸️","symbols","pause 暂停"],["⏹️","symbols","stop 停止"],["⏺️","symbols","record 录制"],["⏩","symbols","fast forward 快进"],["⏪","symbols","rewind 快退"],["🔀","symbols","shuffle 随机 打乱"],["🔁","symbols","repeat 重复 循环"],["🔂","symbols","repeat one 单曲循环"],["🔄","symbols","refresh sync 刷新 同步"],["🔃","symbols","reload 重载"],["➕","symbols","plus add 加 新增"],["➖","symbols","minus 减"],["➗","symbols","divide 除"],["✖️","symbols","multiply 乘"],["💲","symbols","dollar money 美元 钱"],["™️","symbols","trademark 商标"],["©️","symbols","copyright 版权"],["®️","symbols","registered 注册商标"],["↔️","symbols","left right arrow 左右箭头"],["⬆️","symbols","up arrow 上箭头"],["⬇️","symbols","down arrow 下箭头"],["➡️","symbols","right arrow 右箭头"],["⬅️","symbols","left arrow 左箭头"],["🔙","symbols","back 返回"],["🔜","symbols","soon 很快"],["🔝","symbols","top 置顶 顶部"],["💤","symbols","zzz sleep 睡觉"],["🆕","symbols","new 新 新品"],["🆒","symbols","cool 酷"],["🆓","symbols","free 免费"],["🆗","symbols","ok 可以"],["🆙","symbols","up 提升"],["🆚","symbols","vs versus 对比"],["♾️","symbols","infinity 无限"],["💯","symbols","hundred perfect 满分 一百"],["💢","symbols","anger 生气"],["♨️","symbols","hot springs 温泉"],["🚸","symbols","children crossing 注意儿童"],["🔞","symbols","no one under eighteen 十八禁"],["📵","symbols","no mobile phones 禁止手机"],["❤️","symbols","red heart love 红心 爱"],["🧡","symbols","orange heart 橙心"],["💛","symbols","yellow heart 黄心"],["💚","symbols","green heart 绿心"],["💙","symbols","blue heart 蓝心"],["💜","symbols","purple heart 紫心"],["🖤","symbols","black heart 黑心"],["🤍","symbols","white heart 白心"],["🤎","symbols","brown heart 棕心"],["💔","symbols","broken heart 心碎"],["💕","symbols","two hearts 双心 爱心"],["💖","symbols","sparkling heart 闪亮的心"],["💗","symbols","growing heart 心动"]],dJ=Rve.map(([e,t,n])=>({emoji:e,group:t,keywords:n}));function Pve(e,t=24){const n=e.trim().toLowerCase();if(!n)return[];const i=[];for(const o of dJ)if((o.keywords.includes(n)||o.emoji===n)&&(i.push(o.emoji),i.length>=t))break;return i}const $ve=8;function Ove(e,t,n=$ve){return[t,...e.filter(i=>i!==t)].slice(0,n)}const ng=32,Fve=26,Dve=128,Nve=.1,Bve=.05,zN=.8,HN=.02,zve=.08,Hve=.7,jve=26,Wve=.35,qve=256,Vve=/^data:image\//i,Uve=/^data:image\/svg\+xml[;,]/i,Kve=/;\s*base64$/i,Ag=new Map;function hx(e){const t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4}function Zve(e,t,n){return .2126*hx(e)+.7152*hx(t)+.0722*hx(n)}function Gve(e){const t=e.length/4;let n=0,i=0,o=0,s=0,r=0;for(let a=0;ajve&&h/f>Wve&&o++;const m=Zve(c,u,d);mHve&&r++}return i===0||n/tBve?null:s/i>=zN&&r/i<=HN?"dark":r/i>=zN&&s/i<=HN?"light":null}function Qve(e){if(!Uve.test(e))return!1;const t=e.indexOf(","),n=e.slice(t+1);try{const i=Kve.test(e.slice(0,t))?atob(n):decodeURIComponent(n);return/prefers-color-scheme/i.test(i)}catch{return!0}}function Yve(e){const t=document.createElement("canvas");t.width=ng,t.height=ng;const n=t.getContext("2d",{willReadFrequently:!0});if(!n)return null;try{return n.drawImage(e,0,0,ng,ng),Gve(n.getImageData(0,0,ng,ng).data)}catch{return null}}function jN(e){return Ag.get(e)}function Jve(e,t){const n=Ag.get(e);if(n!==void 0)return n;const i=Vve.test(e)&&!Qve(e)?Yve(t):null;return Ag.size>=qve&&Ag.delete(Ag.keys().next().value),Ag.set(e,i),i}const WN={ts:"ft-typescript",tsx:"ft-typescript",mts:"ft-typescript",cts:"ft-typescript",js:"ft-javascript",jsx:"ft-javascript",mjs:"ft-javascript",cjs:"ft-javascript",vue:"ft-vue",svelte:"ft-svelte",astro:"ft-astro",py:"ft-python",rb:"ft-ruby",go:"ft-go",rs:"ft-rust",java:"ft-java",jar:"ft-jar",kt:"ft-kotlin",kts:"ft-kotlin",scala:"ft-scala",swift:"ft-swift",c:"ft-c",h:"ft-h",cpp:"ft-cpp",cc:"ft-cpp",cxx:"ft-cpp",hpp:"ft-cpp",hxx:"ft-cpp",cs:"ft-csharp",php:"ft-php",sh:"ft-console",bash:"ft-console",zsh:"ft-console",fish:"ft-console",ps1:"ft-powershell",psm1:"ft-powershell",bat:"ft-command",cmd:"ft-command",sql:"ft-database",graphql:"ft-graphql",gql:"ft-graphql",prisma:"ft-prisma",html:"ft-html",htm:"ft-html",xml:"ft-xml",svg:"ft-svg",css:"ft-css",scss:"ft-sass",sass:"ft-sass",less:"ft-less",json:"ft-json",jsonc:"ft-json",json5:"ft-json",hjson:"ft-json",yaml:"ft-yaml",yml:"ft-yaml",toml:"ft-toml",ini:"ft-editorconfig",cfg:"ft-editorconfig",conf:"ft-editorconfig",md:"ft-markdown",markdown:"ft-markdown",mdx:"ft-mdx",lua:"ft-lua",r:"ft-r",dart:"ft-dart",zig:"ft-zig",mk:"ft-makefile",cmake:"ft-cmake",diff:"ft-diff",patch:"ft-diff",proto:"ft-proto",log:"ft-log",pdf:"ft-pdf",png:"ft-image",jpg:"ft-image",jpeg:"ft-image",gif:"ft-image",webp:"ft-image",bmp:"ft-image",ico:"ft-image",avif:"ft-image",heic:"ft-image",tiff:"ft-image",mp3:"ft-audio",wav:"ft-audio",flac:"ft-audio",aac:"ft-audio",ogg:"ft-audio",m4a:"ft-audio",mp4:"ft-video",mov:"ft-video",mkv:"ft-video",avi:"ft-video",webm:"ft-video",m4v:"ft-video",zip:"ft-zip",tar:"ft-zip",gz:"ft-zip",tgz:"ft-zip",bz2:"ft-zip",xz:"ft-zip",rar:"ft-zip","7z":"ft-zip",woff:"ft-font",woff2:"ft-font",ttf:"ft-font",otf:"ft-font",eot:"ft-font",exe:"ft-exe",dll:"ft-dll"},qN={"package.json":"ft-npm","package-lock.json":"ft-npm","pnpm-lock.yaml":"ft-pnpm","pnpm-workspace.yaml":"ft-pnpm","yarn.lock":"ft-yarn",makefile:"ft-makefile",gnumakefile:"ft-makefile","cmakelists.txt":"ft-cmake",".gitignore":"ft-git",".gitattributes":"ft-git",".gitmodules":"ft-git",".editorconfig":"ft-editorconfig"},Xve=[["readme","ft-readme"],["license","ft-license"],["copying","ft-license"],["dockerfile","ft-docker"],["containerfile","ft-docker"],["tsconfig","ft-tsconfig"],["jsconfig","ft-jsconfig"],[".eslintrc","ft-eslint"],["eslint.config.","ft-eslint"],[".prettierrc","ft-prettier"],["prettier.config.","ft-prettier"],["vite.config.","ft-vite"],["vitest.config.","ft-vitest"],["webpack.config.","ft-webpack"]];function fJ(e){const t=e.split(/[\\/]/).pop()?.toLowerCase()??"";if(!t)return"ft-file";if(Object.hasOwn(qN,t))return qN[t];for(const[o,s]of Xve)if(t.startsWith(o))return s;const n=t.lastIndexOf(".");if(n<=0)return"ft-file";const i=t.slice(n+1);return Object.hasOwn(WN,i)?WN[i]:"ft-file"}function eye(e){try{const t=new URL(e);if(t.protocol!=="file:")return null;const n=decodeURIComponent(t.pathname);return t.host!==""?`\\\\${t.host}${n.replace(/\//g,"\\")}`:/^\/[a-zA-Z]:\//.test(n)?n.slice(1):n}catch{return null}}const tye=80;function KI(e,t,n){return t>n/2?!0:t<=tye?!1:e}function nye(e){switch(e.key){case"PageUp":case"ArrowUp":case"Home":return-1;case"PageDown":case"ArrowDown":case"End":return 1;case" ":return e.shiftKey?-1:1;default:return 0}}function iye(e,t){if(typeof HTMLElement>"u")return!1;for(const n of e){if(n===t)return!1;if(!(n instanceof HTMLElement)||n.scrollHeight<=n.clientHeight+1)continue;if(n.scrollTop>1)return!0;const i=getComputedStyle(n);if((i.overflowY==="auto"||i.overflowY==="scroll")&&(i.overscrollBehaviorY==="contain"||i.overscrollBehaviorY==="none"))return!0}return!1}function vR(e,t){try{const n=new Date(e);if(Number.isNaN(n.getTime()))return e;const i=new Date,o=u=>String(u).padStart(2,"0"),s=`${o(n.getHours())}:${o(n.getMinutes())}`,r=n.getFullYear()===i.getFullYear(),a=n.getMonth()===i.getMonth(),l=n.getDate()===i.getDate();if(r&&a&&l)return s;const c=new Date(i);return c.setDate(i.getDate()-1),n.getFullYear()===c.getFullYear()&&n.getMonth()===c.getMonth()&&n.getDate()===c.getDate()?`${t} ${s}`:r?`${o(n.getMonth()+1)}-${o(n.getDate())} ${s}`:`${n.getFullYear()}-${o(n.getMonth()+1)}-${o(n.getDate())} ${s}`}catch{return e}}function yu(e){if(e>=1024*1024)return`${VN(e/(1024*1024))}M`;if(e>=1024){const t=e/1024;return`${t>=100?Math.round(t):VN(t)}k`}return String(e)}function VN(e){const t=e.toFixed(1);return t.endsWith(".0")?t.slice(0,-2):t}const oye=/(?:Z|([+-])(\d{2}):?(\d{2}))$/i,UN={dateStyle:"medium",timeStyle:"short",hourCycle:"h23"};function sye(e,t){const n=new Date(t);if(!Number.isFinite(n.getTime()))return t;const i=oye.exec(t.trim());if(!i)return new Intl.DateTimeFormat(e,UN).format(n);const o=i[1]===void 0?0:(i[1]==="-"?-1:1)*(Number(i[2])*60+Number(i[3]));return new Intl.DateTimeFormat(e,{...UN,timeZone:"UTC"}).format(new Date(n.getTime()+o*6e4))}function N0(e){return e.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(e)||e.startsWith("\\\\")}function rye(){return window.kimiDesktop}function yR(e,t,n){const i=n.length===0?void 0:n.length===1?n[0]:n;try{rye()?.log?.(e,t,i)}catch{}}function KN(e,...t){console.info(e,...t),yR("info",e,t)}function La(e,...t){console.warn(e,...t),yR("warn",e,t)}function Ud(e,...t){console.error(e,...t),yR("error",e,t)}function id(e){const t=e.replace(/[\\/]+$/,"");if(t==="")return e;const n=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return n<0?t:t.slice(n+1)}const aye=/^(?:[A-Za-z]:[\\/]|\\\\|\/\/)/;function yc(e){const t=e.replaceAll("\\","/"),n=aye.test(t),i=t.replace(/\/+$/,"");return n?i.toLowerCase():i}function lye(e){const{workspaces:t,sessions:n,hiddenWorkspaceRoots:i,sessionsHasMoreByWorkspace:o}=e,s=new Set(i.map(yc)),r=new Map;for(const f of t){const h=yc(f.root);s.has(h)||r.has(h)||r.set(h,{...f})}for(const f of n){const h=f.cwd;if(!h)continue;const m=yc(h);s.has(m)||r.has(m)||r.set(m,{id:f.workspaceId??h,root:h,name:id(h),sessionCount:0})}const a=new Map;for(const f of t){const h=yc(f.root);a.has(h)||a.set(h,f.id)}const l=new Map;for(const f of n){const h=a.get(yc(f.cwd))??f.workspaceId??f.cwd;l.set(h,(l.get(h)??0)+1)}const c=new Set;for(const f of t){const h=yc(f.root);s.has(h)||c.add(h)}const u=[...r.keys()].filter(f=>!c.has(f));u.sort((f,h)=>r.get(f).root.localeCompare(r.get(h).root));const d=[];for(const f of[...c,...u]){const h=r.get(f),m=l.get(h.id)??l.get(h.root)??0,g=o[h.id]===!1?m:Math.max(h.sessionCount,m);d.push({...h,sessionCount:g})}return d}const cye=new Set(["image/png","image/jpeg","image/gif","image/webp"]);function bR(e){const t=e.split(";",1)[0].trim().toLowerCase();return cye.has(t==="image/jpg"?"image/jpeg":t)}const hJ="kimiWeb.compaction",O1="managed:kimi-code";function cv(e){if(e===void 0)return"toggle";const t=e.capabilities??[];return t.includes("always_thinking")?"always-on":t.includes("thinking")||e.adaptiveThinking===!0?"toggle":"unsupported"}function pJ(e){return e?.supportEfforts??[]}function uye(e){return e[Math.floor(e.length/2)]}function B0(e){if(cv(e)==="unsupported")return"off";const t=pJ(e);return t.length>0?e?.defaultEffort??uye(t):"on"}function uv(e){const t=pJ(e),n=cv(e);return t.length>0?n==="always-on"?[...t]:["off",...t]:n==="always-on"?["on"]:n==="unsupported"?["off"]:["on","off"]}function Cc(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function dye(e){return e!=="off"}function f6(e,t){return uv(e).includes(t)}function H7(e,t){return t==="off"?"off":t==="on"?B0(e):t}function kR(e,t){return t??B0(e)}function fye(e){return e==="off"?{enabled:!1}:e==="on"?{enabled:!0}:{enabled:!0,effort:e}}function wR(e,t){if(!e||typeof e!="object")return;const{enabled:n,effort:i}=e;if(n===!1)return f6(t,"off")?"off":void 0;if(typeof i=="string"&&f6(t,i))return i}function ZN(e,t,n,i){return!n||e===void 0?t:wR(i,e)??B0(e)}let hye=0;function O8(e,t){const n=++hye;return e.pendingThinkingBySession[t]=n,n}function uu(e,t,n){return n===void 0||e.pendingThinkingBySession[t]!==n?!1:(delete e.pendingThinkingBySession[t],!0)}function CR(e,t,n){e.pendingThinkingBySession[t]===void 0&&(e.thinkingBySession[t]=n)}function pye(e,t){if(e===void 0||e.length===0)return;const n=t?.find(i=>i.id===e)??t?.find(i=>i.model===e);return n?.displayName||n?.model||(e.includes("/")?e.split("/").pop():e)}function mye(e){if(!(e===void 0||e.length===0||e==="off"||e==="on"))return Cc(e)}function Hl(e,t){return e===O1?t("providers.kimiSubscription"):e}const gye="model_switch_confirm";function GN(e){if(typeof e=="string")return e;if(!(!Array.isArray(e)||e.length===0)&&!e.some(t=>typeof t!="string"))return e}function vye(e){if(typeof e!="object"||e===null)return;const t=e,n=GN(t.from),i=GN(t.to);if(n===void 0||i===void 0)return;const o=t.hint;if(o===void 0)return{from:n,to:i};if(typeof o!="object"||o===null)return;const s=o;if(!(s.en!==void 0&&typeof s.en!="string")&&!(s.zh!==void 0&&typeof s.zh!="string"))return{from:n,to:i,hint:{en:typeof s.en=="string"?s.en:void 0,zh:typeof s.zh=="string"?s.zh:void 0}}}function yye(e){if(typeof e!="object"||e===null)return{enable:!1,rules:[]};const t=e,n=typeof t.enable=="boolean"?t.enable:!1,i=[];if(Array.isArray(t.rules))for(const o of t.rules){const s=vye(o);s!==void 0&&i.push(s)}return{enable:n,rules:i}}function bye(e,t,n){if(e===void 0||!e.enable)return;const i=(o,s)=>typeof o=="string"?o===s:o.includes(s);return e.rules.find(o=>i(o.from,t)&&i(o.to,n))}function QN(e,t){const n=e?.[t];if(typeof n!="object"||n===null)return;const i=n.model;return typeof i=="string"?i:void 0}function kye(e,t){if(e?.hint!==void 0)return(t==="zh"?e.hint.zh:void 0)??e.hint.en}function mJ(){if(!(typeof window>"u"))return window.kimiDesktop}function f5(){return typeof mJ()?.getPathForFile=="function"}function j7(e){const t=mJ()?.getPathForFile;if(typeof t!="function")return null;try{return t(e)}catch{return null}}function px(e){return j7(e)}function mx(e){return Array.from(e.dataTransfer?.items??[]).some(t=>t.kind==="file"&&t.type==="")}function ZI(e,t=j7){const n=Array.from(e.dataTransfer?.items??[]);if(n.length===0){const a=Array.from(e.dataTransfer?.files??[]);return{files:a,folderPaths:[],items:a.map(l=>({kind:"file",file:l}))}}const i=[],o=[],s=[],r=new Set;for(const a of n){if(a.kind!=="file")continue;const l=a.getAsFile();if(l)if(a.webkitGetAsEntry()?.isDirectory===!0){const c=t(l);if(!c||r.has(c))continue;r.add(c),o.push(c),s.push({kind:"folder",path:c})}else i.push(l),s.push({kind:"file",file:l})}return{files:i,folderPaths:o,items:s}}function wye(e,t=j7){return ZI(e,t).folderPaths}function Cye(e,t=j7){const n=u=>`${u.size}:${u.type}:${u.name}`,i=[],o=new Set,s=new Set,r=[],a=new Set,l=[];let c=!1;for(const u of Array.from(e.items??[])){if(u.kind!=="file")continue;const d=u.getAsFile();if(u.webkitGetAsEntry?.()?.isDirectory===!0){c=!0,d&&s.add(n(d));const h=d?t(d):null;if(!h||a.has(h))continue;a.add(h),r.push(h),l.push({kind:"folder",path:h});continue}if(!d)continue;const f=n(d);o.has(f)||(o.add(f),i.push(d),l.push({kind:"file",file:d}))}for(const u of Array.from(e.files??[])){const d=n(u);s.has(d)||o.has(d)||(o.add(d),i.push(u),l.push({kind:"file",file:u}))}return{files:i,folderPaths:r,hasFolders:c,items:l}}function gJ(e){return yr(e)==="notifyuser"}function YN(e){return e.replace(/^[\s#>*-]+/,"").replaceAll("**","").trim()}function Aye(e){let t;try{const a=JSON.parse(e);if(a===null||typeof a!="object"||Array.isArray(a))return{title:"",message:""};t=a}catch{return{title:"",message:""}}const n=typeof t.message=="string"?t.message.trim():"",i=typeof t.title=="string"?t.title.trim():"";if(i.length>0)return{title:i,message:n};const o=n.split(` +`),s=o.findIndex(a=>YN(a).length>0);if(s===-1)return{title:"",message:""};const r=o.slice(s+1).join(` +`).trim();return{title:YN(o[s]),message:r.length>0?r:n}}function vJ(e,t,n){return e==="unsupported"?[{titleKey:n.titleKey,hintKey:n.hintKey,disabled:!1}]:t.map(i=>({...i,disabled:e==="pending"}))}function xye(e,t,n){return n?e.filter(i=>i.sessions.length>0||i.workspace.id===t):e}const Sye=["id","cron","prompt","recurring"],_ye=/^([A-Za-z][A-Za-z0-9_]*): (.*)$/,Iye=/^cron_jobs: (\d+)$/,Tye=/^Deleted cron job (\S+)\.$/;function AR(e){return(e??[]).flatMap(t=>t.split(` +`))}function yJ(e){const t={};let n;for(const i of e){const o=_ye.exec(i);o?(n=o[1],t[n]=o[2]):n!==void 0&&(t[n]+=` +${i}`)}return t}function bJ(e){const t=yJ(AR(e));return t.id&&t.cron?t:null}function kJ(e){const t=Tye.exec(AR(e).join(` +`).trim());return t?{id:t[1]}:null}function wJ(e){const t=AR(e),n=Iye.exec(t[0]??"");if(!n)return null;const i=Number(n[1]),o=[];let s=[];const r=()=>{const a=yJ(s);s=[],Sye.every(l=>a[l]!==void 0)&&o.push(a)};for(const a of t.slice(1))a==="---"?r():s.push(a);return r(),o.length===i?{count:i,jobs:o}:null}function*GI(e,t){const n=`<${t}`,i=``;let o=0;for(;o",r);if(a===-1)return;const l=e.indexOf(i,a+1);if(l===-1)return;o=l+i.length,yield{start:s,end:o,attributes:e.slice(r,a),content:e.slice(a+1,l)}}}function CJ(e,t=/[\w-]/){const n={};let i=0;for(;i").replaceAll("&","&")}function Lye(e){const t={};for(const[n,i]of Object.entries(CJ(e,/[a-z_]/)))t[n]=Eye(i);return t}function Rye(e){const t={completed:0,failed:0,aborted:0};eB.lastIndex=0;let n;for(;(n=eB.exec(e))!==null;){const i=n[1];t[i]=Number(n[2])}return t}function Pye(e,t){const n=Lye(e);return{outcome:n.outcome??"completed",item:n.item,agentId:n.agent_id,mode:n.mode,state:n.state,body:t.trim()}}function $ye(e){const t=[],n=[];let i=0;for(;i",o+9);if(s===-1)break;i=s+1,n.push(n.length===0?{attrs:e.slice(o+9,s),bodyStart:i}:null)}}return t}function Oye(e){if(e==null)return null;const t=Array.isArray(e)?e.join(` +`):e;if(!t.includes(""))return null;const n=JN(t,"","")?.trim()??"",{completed:i,failed:o,aborted:s}=Rye(n),r=JN(t,"","")?.trim(),a=$ye(t),l=i+o+s;return{summary:n,completed:i,failed:o,aborted:s,total:l>0?l:a.length,subagents:a,resumeHint:r}}const Fye=/^([a-z][a-z0-9_]*): (.*)$/,Dye=/^(active_background_tasks|background_tasks): (\d+)$/,Nye="[output]",Bye="[no output available]";function xR(e){const t={};let n;for(const i of e){const o=Fye.exec(i);o?(n=o[1],t[n]=o[2]):n!==void 0&&(t[n]+=` +${i}`)}return t}function SR(e){return(e??[]).flatMap(t=>t.split(` +`))}function zye(e){const t=SR(e),n=Dye.exec(t[0]??"");if(!n)return null;const i=Number(n[2]),o=[];let s=[];const r=()=>{const a=xR(s);a.task_id&&o.push(a),s=[]};for(const a of t.slice(1))a==="---"?r():s.push(a);return r(),{activeOnly:n[1]==="active_background_tasks",count:i,tasks:o}}function Hye(e){const t=SR(e),n=t.indexOf(Nye);if(n<0)return null;const i=t.indexOf(""),o=xR(t.slice(0,i>=0&&il.startsWith("[Truncated.")),r=t.slice(n+1);for(;r.length>0&&r[r.length-1]==="";)r.pop();const a=r.length===1&&r[0]===Bye?[]:r;return{fields:o,truncated:s,output:a}}function jye(e){const t=xR(SR(e));return t.task_id&&t.status?t:null}const Wye=3,qye=/\n\n\[wait_warning\]\n([^\n[][^\n]*)\n?$/,Vye="Use TaskOutput with one of the task_id values above to read the full output.";function s1(e,t){return new RegExp(`^${t}: (.+)$`,"m").exec(e)?.[1]}function Uye(e,t){const n=Number(s1(e,t)??0);return Number.isFinite(n)?n:0}function AJ(e,t){return e.match(t)?.length??0}function tB(e,t,n){const i=new RegExp(`^\\[${t}\\]$`,"gm"),o=[];let s;for(;(s=i.exec(e))!==null;)s.index>=n&&o.push(s.index);return o}function nB(e,t){return t>=2&&e[t-1]===` +`&&e[t-2]===` +`}function iB(e,t,n){const i=e.slice(t+n.length+2),o=/^\[/m.exec(i);return(o===null?i:i.slice(0,o.index)).trim()}function Kye(e){return e.endsWith(Vye)}function Zye(e){const t=s1(e,"active_background_tasks");if(t===void 0)return!1;const n=Number(t);return Number.isFinite(n)?AJ(e,/^task_id: /gm)===n:!1}function Gye(e,t){return[...e.matchAll(/^description: (.+)$/gm)].map(i=>i[1]??"").slice(0,Math.min(Wye,t))}function Qye(e){if(e==null)return null;const t=Array.isArray(e)?e.join(` +`):e,n=qye.exec(t),i=n===null?t:t.slice(0,n.index),o=/^\[/m.exec(i),s=o===null?i:i.slice(0,o.index),r=s1(s,"wait_status");if(r!=="completed"&&r!=="timed_out"&&r!=="interrupted"&&r!=="no_tasks")return null;const a=Number(s1(s,"waited_ms")??0),l=Number(s1(s,"timeout_ms"));let c,u=o?.index??i.length;r==="completed"&&o!==null&&i.slice(o.index).startsWith("[finished]")&&(c=iB(i,o.index,"finished"),u=o.index+10);let d=0,f=-1;for(const k of tB(i,"completed_during_wait",u)){if(!nB(i,k))continue;const w=iB(i,k,"completed_during_wait");Kye(w)&&(d=AJ(w,/^task_id: /gm),f=k)}let h=0,m=[],g=-1;for(const k of tB(i,"still_running",u)){if(f>=0&&k=0){const k=[f,g].filter(C=>C>v);y=i.slice(v+11,k.length>0?Math.min(...k):i.length).trimEnd()||void 0}return{status:r,waitedMs:Number.isFinite(a)?a:0,timeoutMs:Number.isFinite(l)?l:void 0,taskId:s1(s,"task_id"),finishedStatus:c===void 0?void 0:s1(c,"status"),finishedDescription:c===void 0?void 0:s1(c,"description"),outputPreview:y,extraCount:d,runningCount:h,runningSamples:m,warning:n?.[1]}}function m4(e){const t=[];for(const n of e.split(/[\\/]+/))if(!(!n||n===".")){if(n===".."){t.length>0&&t[t.length-1]!==".."?t.pop():t.push("..");continue}t.push(n)}return t.join("/")}function xJ(e){const t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return t<0?"":t===0?e[0]:e.slice(0,t)}const Yye=/^[A-Za-z]:[\\/]/;function A9(e){return Yye.test(e)||e.startsWith("\\\\")||e.startsWith("//")}function dv(e,t){if(!t)return null;const n=u=>u.replace(/\\/g,"/"),i=n(e);let o=n(t);o.length>1&&(o=o.replace(/\/+$/,""));const s=A9(o)||A9(i),r=s?o.toLowerCase():o,a=s?i.toLowerCase():i,l=r.endsWith("/")?r:`${r}/`;if(a!==r&&!a.startsWith(l))return null;const c=a===r?"":i.slice(l.length);return c.split("/").includes("..")?null:c||null}const xn={permission:"kimi-web.permission",permissionBySession:"kimi-web.permission-by-session",permissionExplicit:"kimi-web.permission-explicit",permissionStickyAt:"kimi-web.permission-sticky-at",permissionDaemonDefault:"kimi-web.permission-daemon-default",nonComposerPromptIds:"kimi-web.non-composer-prompt-ids",activeWorkspace:"kimi-active-workspace",planArmed:"kimi-web.plan-armed",swarmMode:"kimi-web.swarm-mode",towerMode:"kimi-web.tower-mode",goalMode:"kimi-web.goal-mode",fontScale:"kimi-web.font-scale",starredModels:"kimi-web.starred-models",unread:"kimi-web.unread",onboarded:"kimi-web.onboarded",colorScheme:"kimi-web.color-scheme",hiddenWorkspaces:"kimi-web.hidden-workspaces",collapsedWorkspaces:"kimi-web.collapsed-workspaces",workspaceOrder:"kimi-web.workspace-order",workspaceSort:"kimi-web.workspace-sort",workspaceRecencyFloor:"kimi-web.workspace-recency-floor",pinnedSessions:"kimi-web.pinned-sessions",pinnedCollapsed:"kimi-web.pinned-collapsed",workspaceNameOverrides:"kimi-web.workspace-name-overrides",notifyEnabled:"kimi-web.notify-enabled",notifySound:"kimi-web.notify-sound",inputHistory:"kimi-web.input-history",locale:"kimi-locale",clientId:"kimi-web.client-id",debug:"kimi-web.debug",openInDefaultTarget:"kimi-web.open-in.default-target",openInLastTarget:"kimi-web.open-in.last-target",sidebarCollapsed:"kimi-web.sidebar-collapsed",sidebarWidth:"kimi-web.sidebar-width",sidebarViewMode:"kimi-web.sidebar-view-mode",mobileSwitcherViewMode:"kimi-web.mobile-switcher-view-mode",diffViewMode:"kimi-web.diff-view-mode",sidebarPinnedHeight:"kimi-web.sidebar-pinned-height",shortcutOverrides:"kimi-web.shortcut-overrides",dockIconChoice:"kimi-web.dock-icon-choice",updateSkippedVersion:"kimi-web.update-skipped-version",canarySkippedVersion:"kimi-web.canary-skipped-version",planMode:"kimi-web.plan-mode",codeFont:"kimi-web.code-font",contentAlign:"kimi-web.content-align",theme:"kimi-web.theme",thinking:"kimi-web.thinking",accent:"kimi-web.accent",notifyOnComplete:"kimi-web.notify-on-complete",notifyOnQuestion:"kimi-web.notify-on-question",notifyOnApproval:"kimi-web.notify-on-approval",soundOnComplete:"kimi-web.sound-on-complete"},Jye="__new__";function Fl(e){return e&&e.length>0?e:Jye}function su(e){return`kimi-web.draft.${Fl(e)}`}function oB(e){return`kimi-web.attachment-draft.${Fl(e)}`}function oh(e){return`kimi-web.draft-atts.${Fl(e)}`}function Ol(e){return`kimi-web.draft-snapshot.${Fl(e)}`}function lo(e){try{return globalThis.localStorage.getItem(e)}catch{return null}}function Eo(e,t){try{globalThis.localStorage.setItem(e,t)}catch{}}function Do(e){try{globalThis.localStorage.removeItem(e)}catch{}}function Ua(e){const t=lo(e);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}function ua(e,t){try{globalThis.localStorage.setItem(e,JSON.stringify(t))}catch{}}function QI(){const e=lo(xn.unread);if(!e)return{};try{const t=JSON.parse(e);if(!t||typeof t!="object")return{};const n={};for(const[i,o]of Object.entries(t))o===!0&&(n[i]=!0);return n}catch{return{}}}function sB(e){const n={...QI()};for(const[i,o]of Object.entries(e))o?n[i]=!0:delete n[i];Eo(xn.unread,JSON.stringify(n))}function Xye(){const e=Ua(xn.collapsedWorkspaces);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function gx(e){ua(xn.collapsedWorkspaces,Array.from(e))}function e4e(){return Ua(xn.pinnedCollapsed)===!0}function YI(e){ua(xn.pinnedCollapsed,e)}function t4e(){return lo(xn.sidebarViewMode)==="flat"?"flat":"grouped"}function n4e(e){Eo(xn.sidebarViewMode,e)}function i4e(){return lo(xn.mobileSwitcherViewMode)==="grouped"?"grouped":"flat"}function o4e(e){Eo(xn.mobileSwitcherViewMode,e)}function s4e(){return lo(xn.diffViewMode)==="tree"?"tree":"list"}function r4e(e){Eo(xn.diffViewMode,e)}function a4e(){const e=Ua(xn.workspaceOrder);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function rB(e){ua(xn.workspaceOrder,Array.from(e))}function l4e(){return lo(xn.workspaceSort)==="recent"?"recent":"manual"}function c4e(e){Eo(xn.workspaceSort,e)}function u4e(){const e=Ua(xn.workspaceRecencyFloor);if(!e||typeof e!="object")return{};const t={};for(const[n,i]of Object.entries(e))typeof i=="number"&&Number.isFinite(i)&&(t[n]=i);return t}function aB(e){ua(xn.workspaceRecencyFloor,e)}function d4e(){try{return lo(xn.activeWorkspace)}catch{return null}}function lB(e){try{Eo(xn.activeWorkspace,e)}catch{}}function f4e(){try{const e=lo(xn.hiddenWorkspaces);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}catch{return[]}}function cB(e){try{Eo(xn.hiddenWorkspaces,JSON.stringify(e))}catch{}}function SJ(){const e=Ua(xn.pinnedSessions);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function vx(e){ua(xn.pinnedSessions,Array.from(e))}function F8(){const e=Ua(xn.workspaceNameOverrides);if(!e||typeof e!="object")return{};const t={};for(const[n,i]of Object.entries(e))typeof i=="string"&&(t[n]=i);return t}function uB(e){ua(xn.workspaceNameOverrides,e)}function G1(e){return e==="manual"||e==="auto"||e==="yolo"?e:void 0}function dB(){return G1(lo(xn.permission))??"manual"}function h4e(e){Eo(xn.permission,e)}function fB(){const e=lo(xn.permissionStickyAt),t=Number(e);return Number.isFinite(t)&&t>0?t:e===null&&lo(xn.permission)!==null?1:0}function ig(e){Eo(xn.permissionStickyAt,String(e))}function _J(e){const t=lo(e);if(!t)return{};try{const n=JSON.parse(t);if(!n||typeof n!="object"||Array.isArray(n))return{};const i={};for(const[o,s]of Object.entries(n)){const r=G1(s);r!==void 0&&(i[o]=r)}return i}catch{return{}}}function IJ(e,t){Eo(e,JSON.stringify(t))}function hB(){return _J(xn.permissionBySession)}function yx(e){IJ(xn.permissionBySession,e)}function pB(){return _J(xn.permissionExplicit)}function p4e(e){IJ(xn.permissionExplicit,e)}const mB={manual:0,yolo:1,auto:2};function m4e(e){let t="auto",n=!1;for(const i of e)i!==void 0&&(n=!0,mB[i]typeof n=="number"&&Number.isFinite(n)&&n>0).slice(0,2);return t.length===0?TJ:Math.round(t.reduce((n,i)=>n+i,0))}function MJ(e){return e==null||!Number.isFinite(e)||e<=0?TJ:Math.round(e)}const JI=96;function b4e(e,t,n){const i=e.filter(r=>r.visible),o=i[0],s=i[2];return{firstRowHeight:o?o.height:null,spanToThirdRow:s?s.viewportBottom-t+n:null}}function k4e(e,t,n){const i=s=>s!=null&&Number.isFinite(s)&&s>0;return(s=>s!=null&&Number.isFinite(s)&&s>=0)(t)?i(e)?Math.round(e)+Math.round(t):i(n)?Math.round(n)*3+Math.round(t):JI:JI}function w4e(e){return e>v4e}function gB(e){return Math.round(e*.4)}function C4e(e){return e==null||!Number.isFinite(e)||e<=0?JI:Math.round(e)}function A4e(e,t,n,i){const o=MJ(n),s=C4e(i),r=Math.max(o,Math.round(e*.6));if(t===void 0||!Number.isFinite(t))return r;const a=Math.round(t)-s;return Math.max(o,Math.min(r,a))}function bx(e,t,n){return t==null||!Number.isFinite(t)?e:Math.max(MJ(n),Math.min(e,Math.round(t)))}function x4e(e,t,n,i){return Math.max(Math.round(i),Math.min(Math.round(e+t),Math.round(n)))}function S4e(e,t){return t===null||t===e}const _R="application/x-kimi-session-row";function _4e(e,t){return e.includes(t)?e:[...e,t]}function I4e(e,t){return e.includes(t)?e.filter(n=>n!==t):e}function T4e(e,t){const n=new Set(t),i=new Map,o=[];for(const r of e)n.has(r.id)?i.set(r.id,r):o.push(r);const s=[];for(const r of t){const a=i.get(r);a!==void 0&&s.push(a)}return{pinned:s,unpinned:o}}let h6=-1,p6=-1,Fg=-1,g4=-1,IR=!1,vB=!1;function yB(){h6=-1,p6=-1,Fg=-1,g4=-1,IR=!1}function M4e(e){const t=Fg>=0;h6=Fg,p6=g4,Fg=e.clientX,g4=e.clientY,t&&(Fg!==h6||g4!==p6)&&(IR=!0)}function B3(){vB||typeof document>"u"||(vB=!0,document.addEventListener("pointermove",M4e,{capture:!0,passive:!0}),window.addEventListener("blur",yB),document.documentElement.addEventListener("pointerleave",yB))}function $2(e){return IR?e.clientX===h6&&e.clientY===p6:!0}function XI(){return{x:Fg,y:g4}}const E4e={"&":"&","<":"<",">":">",'"':""","'":"'"};function v4(e){return e.replace(/[&<>"']/g,t=>E4e[t]??t)}function L4e(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function R4e(e,t,n=40){const i=e.replace(/\s+/g," ").trim();if(i.length===0)return"";const o=t.trim();if(o.length===0)return bB(i,n*2);const s=i.toLowerCase().indexOf(o.toLowerCase());if(s<0)return bB(i,n*2);const r=Math.max(0,s-n),a=Math.min(i.length,s+o.length+n),l=r>0,c=a`${s}`)}const EJ=/([\s\S]*?)<\/kbd>/g;function LJ(e){let t="",n=0;for(const i of e.matchAll(EJ))t+=v4(e.slice(n,i.index)),t+=`${v4(i[1]??"")}`,n=i.index+i[0].length;return t+v4(e.slice(n))}function P4e(e){return e.replace(EJ,"$1")}let $4e=0;function kB(e,t){const n=++$4e;return e.pendingPlanBySession[t]=n,n}function TR(e,t,n){return n===void 0||e.pendingPlanBySession[t]!==n?!1:(delete e.pendingPlanBySession[t],!0)}function eT(e,t,n){e.pendingPlanBySession[t]===void 0&&(e.planModeBySession[t]=n)}function RJ(e){const t=[];return e.usages.limit5h!==void 0&&t.push({key:"limit5h",entry:e.usages.limit5h}),e.usages.limit7d!==void 0&&t.push({key:"limit7d",entry:e.usages.limit7d}),e.usages.monthTotal!==void 0&&t.push({key:"monthTotal",entry:e.usages.monthTotal}),t}function O4e(e){const t=e.usages.monthTotal;if(t===void 0)return null;const n=tT(e.usages.monthCode?.usedRatio??0),i=tT(Math.round((t.usedRatio-n)*1e6)/1e6);return{totalRatio:t.usedRatio,codeRatio:n,kimiRatio:i}}function PJ(e,t){switch(e){case"limit5h":return t("settings.planUsage.hourLimit",{n:5});case"limit7d":return t("settings.planUsage.weekLimit",{n:1});case"monthTotal":return t("settings.planUsage.monthlyLimit")}}function $J(e,t){const n=Date.parse(e);if(Number.isNaN(n))return"";const i=Math.floor((n-Date.now())/1e3);if(i<=0)return t("settings.planUsage.resetDone");const o=Math.floor(i/86400),s=Math.floor(i%86400/3600),r=Math.floor(i%3600/60),a=[];return o>0?(a.push(t("settings.planUsage.durationDay",{n:o})),a.push(t("settings.planUsage.durationHour",{n:s})),a.push(t("settings.planUsage.durationMinute",{n:r}))):s>0?(a.push(t("settings.planUsage.durationHour",{n:s})),a.push(t("settings.planUsage.durationMinute",{n:r}))):r>0?a.push(t("settings.planUsage.durationMinute",{n:r})):a.push(t("settings.planUsage.durationSecond",{n:i})),t("settings.planUsage.resetsIn",{duration:a.join(" ")})}function tT(e){return Number.isFinite(e)?Math.max(0,Math.min(e,1)):0}function Dd(e){return Math.round(tT(e)*100)}const F4e=30;function D4e(e){return e!==void 0&&etypeof s=="string"):[],supportEfforts:Array.isArray(o.supportEfforts)?o.supportEfforts.filter(s=>typeof s=="string"):[],...typeof o.adaptiveThinking=="boolean"?{adaptiveThinking:o.adaptiveThinking}:{}})}return n}const MR=/^[\p{L}\p{N}][\p{L}\p{N}\-_ ]*$/u;function W4e(e,t){return t==="anthropic"?e.replace(/\/v1\/?$/,""):e}function nT(e){return{model:e.id,maxContextSize:e.maxContextSize>0?String(e.maxContextSize):"",displayName:e.name??"",capabilities:[...e.capabilities??["tool_use","thinking"]],supportEfforts:[],adaptiveThinking:!0}}function q4e(e,t={}){const n=e.id.trim();if(n==="")return"idRequired";if(!MR.test(n))return"idInvalid";if(t.requireApiKey===!0&&e.apiKey.trim()==="")return"apiKeyRequired";if(t.requireBaseUrl===!0&&e.baseUrl.trim()==="")return"baseUrlRequired";if(e.models.length===0)return"modelRequired";for(const i of e.models){if(i.model.trim()==="")return"modelRequired";const o=i.maxContextSize.trim();if(o==="")return"contextSizeRequired";if(!/^\d+$/.test(o)||Number(o)<1)return"contextSizeInvalid"}return null}function OJ(e){return e.map(t=>{const n=t.displayName.trim();return{model:t.model.trim(),maxContextSize:Number(t.maxContextSize.trim()),...t.capabilities.length>0?{capabilities:[...t.capabilities]}:{},...t.supportEfforts.length>0?{supportEfforts:[...t.supportEfforts]}:{},...t.adaptiveThinking!==void 0?{adaptiveThinking:t.adaptiveThinking}:{},...n===""?{}:{displayName:n}}})}function m6(e){const t=e.apiKey.trim(),n=e.baseUrl.trim();return{id:e.id.trim(),type:e.type,models:OJ(e.models),...t===""?{}:{apiKey:t},...n===""?{}:{baseUrl:n}}}function V4e(e,t,n){const i=OJ(e.models),o=e.id.trim(),s=e.apiKey.trim(),r=e.baseUrl.trim(),a=n?.existingDefaultModel?.trim()??"",l=a.indexOf("/")>=0?a.slice(a.indexOf("/")+1):a;return{...t!==void 0&&o!==""&&o!==t.id?{newId:o}:{},type:e.type,models:i,...s===""&&n?.includeBlankApiKey!==!0?{}:{apiKey:s},...r===""?{}:{baseUrl:r},...l!==""&&i.some(c=>c.model===l)?{defaultModel:l}:{}}}function U4e(e){return e.id===O1&&e.type==="kimi"}const K4e=15e3,Z4e=["/api/claudecode","/api/anthropic","/apps/anthropic","/api/coding","/claudecode","/anthropic","/step_plan","/coding","/claude"];function G4e(e){const t=e.slice(e.lastIndexOf("/")+1);return/^v\d+$/.test(t)}function Q4e(e){for(const t of Z4e)if(e.endsWith(t))return e.slice(0,e.length-t.length);return null}function Y4e(e,t){const n=e.trim().replace(/\/+$/,"");if(n===""||t==="vertexai")return[];if(t==="google-genai")return[`${n}/v1beta/models`];const i=[];G4e(n)?(i.push(`${n}/models`),n.endsWith("/v1")||i.push(`${n}/v1/models`)):i.push(`${n}/v1/models`);const o=Q4e(n);if(o!==null){const s=o.replace(/\/+$/,"");s!==""&&s.includes("://")&&(i.push(`${s}/v1/models`),i.push(`${s}/models`))}return[...new Set(i)]}function J4e(e,t){const n=t.trim();return e==="anthropic"?{...n===""?{}:{"x-api-key":n},"anthropic-version":"2023-06-01","anthropic-dangerous-direct-browser-access":"true"}:e==="google-genai"?n===""?{}:{"x-goog-api-key":n}:n===""?{}:{authorization:`Bearer ${n}`}}function X4e(e){if(e===null||typeof e!="object")return null;const t=e,n=t.slug??t.id??t.name;if(typeof n!="string")return null;const o=(n.startsWith("models/")?n.slice(7):n).trim();if(o==="")return null;const s=t.owned_by;return s===void 0?{id:o}:{id:o,...typeof s=="string"?{ownedBy:s}:{}}}function e9e(e){let t;try{t=JSON.parse(e)}catch{return null}if(t===null||typeof t!="object")return null;const n=t,i=Array.isArray(n.data)?n.data:Array.isArray(n.models)?n.models:null;if(i===null)return null;const o=[],s=new Set;for(const r of i){const a=X4e(r);a===null||s.has(a.id)||(s.add(a.id),o.push(a))}return o.sort((r,a)=>r.id.localeCompare(a.id))}function t9e(){if(typeof window>"u")return;const e=window.kimiDesktop;if(typeof e?.fetchProviderModels!="function")return;const t=e.fetchProviderModels.bind(e);return async n=>{const i=await t(n);if(i!==null&&i.ok)return{status:i.status,body:i.body};throw i!==null&&i.kind==="timeout"?new DOMException("desktop bridge fetch timed out","TimeoutError"):new Error("desktop bridge fetch failed")}}function n9e(){return async({url:e,headers:t,timeoutMs:n})=>{const i=await fetch(e,{method:"GET",headers:t,signal:AbortSignal.timeout(n)});return{status:i.status,body:await i.text()}}}function i9e(){return t9e()??n9e()}function o9e(e){if(e===null||typeof e!="object"||!("name"in e))return!1;const t=e.name;return t==="TimeoutError"||t==="AbortError"}async function s9e(e){const t=Y4e(e.baseUrl,e.type);if(t.length===0)return{ok:!1,kind:"notFound"};const n=J4e(e.type,e.apiKey),i=e.impl??i9e(),o=e.timeoutMs??K4e;for(const s of t){let r;try{r=await i({url:s,headers:n,timeoutMs:o})}catch(l){return{ok:!1,kind:o9e(l)?"timeout":"network",detail:l instanceof Error?l.message:String(l)}}if(r.status===401||r.status===403)return{ok:!1,kind:"auth",status:r.status};if(r.status===404||r.status===405)continue;if(r.status<200||r.status>=300)return{ok:!1,kind:"http",status:r.status,detail:r.body.slice(0,512)};const a=e9e(r.body);return a===null?{ok:!1,kind:"parse"}:{ok:!0,models:a}}return{ok:!1,kind:"notFound"}}const z0=[{key:"kimi-for-coding",catalogId:"kimi-for-coding",catalogIds:["kimi-code-plan-cn","kimi-for-coding"],nameKey:"providers.presets.kimiForCoding.name",descKey:"providers.presets.kimiForCoding.desc",icon:"kimi",tagKey:"providers.tags.codingPlan"},{key:"kimi-global",catalogId:"kimi-code-plan-global",catalogIds:["kimi-code-plan-global","kimi-for-coding-global"],nameKey:"providers.presets.kimiForCodingGlobal.name",descKey:"providers.presets.kimiForCodingGlobal.desc",icon:"kimi",tagKey:"providers.tags.codingPlan"},{key:"zai-intl",catalogId:"zai-coding-plan",nameKey:"providers.presets.zaiIntl.name",descKey:"providers.presets.zaiIntl.desc",icon:"zai",tagKey:"providers.tags.codingPlan"},{key:"zai-cn",catalogId:"zhipuai-coding-plan",nameKey:"providers.presets.zaiCn.name",descKey:"providers.presets.zaiCn.desc",icon:"zhipu",tagKey:"providers.tags.codingPlan"},{key:"deepseek",catalogId:"deepseek",nameKey:"providers.presets.deepseek.name",descKey:"providers.presets.deepseek.desc",icon:"deepseek",tagKey:"providers.tags.paygo"},{key:"minimax-intl",catalogId:"minimax-coding-plan",nameKey:"providers.presets.minimaxIntl.name",descKey:"providers.presets.minimaxIntl.desc",icon:"minimax",tagKey:"providers.tags.tokenPlan"},{key:"minimax-cn",catalogId:"minimax-cn-coding-plan",nameKey:"providers.presets.minimaxCn.name",descKey:"providers.presets.minimaxCn.desc",icon:"minimax",tagKey:"providers.tags.tokenPlan"}],r9e={"kimi-code-plan-cn":"https://api.kimi.com/coding/v1","kimi-code-plan-global":"https://api.kimi.ai/coding/v1","kimi-for-coding":"https://api.kimi.com/coding/v1","kimi-for-coding-global":"https://api.kimi.ai/coding/v1"};function H0(e){const t=r9e[e];return t===void 0?null:{type:"kimi",baseUrl:t}}function g6(e,t){const n=e.replace(/\([^)]*\)/g," ").replace(/[^\p{L}\p{N}\-_ ]+/gu,"").replace(/\s+/g," ").trim();return MR.test(n)?n:t}function FJ(e){return[e.catalogId,...e.catalogIds??[]]}function v6(e,t){for(const n of e.catalogIds??[]){const i=t.find(o=>o.id===n);if(i!==void 0)return i}return t.find(n=>n.id===e.catalogId)}function a9e(e,t){return v6(e,t)?.id??e.catalogId}function DJ(e,t){const n=z0.find(i=>{for(const o of FJ(i)){if(o===e)return!0;const s=t?.find(r=>r.id===o);if(s!==void 0&&g6(s.name,s.id)===e)return!0}return!1});return n===void 0?null:{preset:n}}function kx(e){try{return new URL(e).host.toLowerCase()}catch{return null}}function l9e(e,t){if(e===void 0||e.trim()==="")return null;const n=kx(e.trim());if(n===null)return null;const i=z0.find(o=>{for(const s of FJ(o)){const r=H0(s);if(r!==null&&kx(r.baseUrl)===n)return!0;const a=t.find(l=>l.id===s);if(a!==void 0&&a.baseUrl!==null&&kx(a.baseUrl)===n)return!0}return!1});return i===void 0?null:{preset:i}}function c9e(e,t){return t.startsWith("image/")||t==="application/pdf"?!0:e.toLowerCase().endsWith(".pdf")}const y6="/devices/",NJ="kimi-rc-device-id";function W7(e){return new URLSearchParams(e.search).get("rc")==="1"}function BJ(e){const{pathname:t}=e;if(!t.startsWith(y6))return;const n=t.slice(y6.length).split("/")[0];if(n)try{const i=decodeURIComponent(n);return i.length>0?i:void 0}catch{return}}function u9e(e){if(BJ({pathname:e})===void 0)return e;const t=e.slice(y6.length),n=t.indexOf("/");return n<0?"/":t.slice(n)}function d9e(e){return`${y6}${encodeURIComponent(e)}/`}function zJ(e,t){const n=new URLSearchParams(t),i=n.get("rc"),o=n.get("from");if(i===null&&o===null)return e;const s=new URLSearchParams;return i!==null&&s.set("rc",i),o!==null&&s.set("from",o),`${e}?${s.toString()}`}function f9e(e){const t=BJ(e);return t!==void 0?(p9e(t),t):h9e()}function h9e(){try{return window.sessionStorage.getItem(NJ)??void 0}catch{return}}function p9e(e){try{window.sessionStorage.setItem(NJ,e)}catch{}}class m9e extends Error{constructor(t){super(`rc devices fetch failed: ${t}`),this.status=t,this.name="RcDevicesFetchError"}}async function g9e(){const e=await fetch("/v1/remote/devices",{credentials:"same-origin"});if(!e.ok)throw new m9e(e.status);const t=await e.json();return{devices:Array.isArray(t.devices)?t.devices:[],max_devices:typeof t.max_devices=="number"?t.max_devices:void 0}}const v9e=/^(\d+)\t(.*)$/;function y9e(e){const t=e.at(-1)===""?e.slice(0,-1):e;if(t.length===0)return null;const n=[],i=[];for(const o of t){const s=v9e.exec(o);if(!s)return null;i.push(Number(s[1])),n.push(s[2]??"")}return{contents:n,lineNumbers:i}}function wB(e,t){let n="",i=t;const o=/^((?:\\\\|\/\/)[^\\/]+[\\/][^\\/]+)/.exec(t),s=/^([a-zA-Z]:)[\\/]?/.exec(t);o?(n=o[1],i=t.slice(o[1].length)):t.startsWith("/")?(n="/",i=t.slice(1)):s&&(n=s[1],i=t.slice(s[0].length));const r=n!=="",a=i.split(/[\\/]+/).filter(Boolean);for(const c of e.split("/"))c===""||c==="."||(c===".."?a.length>0&&a[a.length-1]!==".."?a.pop():r||a.push(".."):a.push(c));const l=a.join("/");return n==="/"?`/${l}`:n!==""?l?`${n}/${l}`:`${n}/`:l}function b9e(e,t){const n={defaultModel:t.model};return e?.models!==void 0&&!Object.hasOwn(e.models,t.model)&&(n.models={...e.models,[t.model]:""}),t.effort&&(n.defaultEffort=t.effort),n}const Ca="kimi-web.server-credential",k9e="token",w9e=10080*60*1e3;let Yd;const iT=new Set;function C9e(){if(typeof window>"u")return;const e=window.location.hash??"";if(!e.startsWith("#"))return;const n=new URLSearchParams(e.slice(1)).get(k9e);if(!n)return;const i=new URL(window.location.href);return i.hash="",window.history.replaceState(window.history.state,"",`${i.pathname}${i.search}`),n}function oT(e){return{version:1,credential:e,expiresAt:Date.now()+w9e}}function A9e(e){return JSON.stringify(e)}function ER(e){try{const t=JSON.parse(e);if(typeof t!="object"||t===null)return;const n=t;return n.version!==1||typeof n.credential!="string"||n.credential.length===0||typeof n.expiresAt!="number"||!Number.isFinite(n.expiresAt)?void 0:{version:1,credential:n.credential,expiresAt:n.expiresAt}}catch{return}}function sT(e){globalThis.localStorage?.setItem(Ca,A9e(e))}function x9e(){try{const e=globalThis.localStorage?.getItem(Ca);if(e){const n=ER(e);if(n===void 0){const i=oT(e);let o=!1;try{sT(i),o=!0}catch{}if(!o)try{globalThis.localStorage?.getItem(Ca)===e&&globalThis.localStorage?.removeItem(Ca),o=!0}catch{}try{globalThis.sessionStorage?.removeItem(Ca)}catch{}return o?i:void 0}if(n.expiresAt>Date.now())return n;globalThis.sessionStorage?.removeItem(Ca),globalThis.localStorage?.getItem(Ca)===e&&globalThis.localStorage?.removeItem(Ca);return}const t=globalThis.sessionStorage?.getItem(Ca);if(t){const n=oT(t);let i=!1;try{sT(n),i=!0}catch{}try{globalThis.sessionStorage?.removeItem(Ca),i=!0}catch{}return i?n:void 0}return}catch{return}}function S9e(){const e=C9e();return e?(HJ(e),!0):(Yd=x9e(),Yd!==void 0)}function _9e(){if(Yd!==void 0){if(Yd.expiresAt<=Date.now()){I9e(Yd);return}return Yd.credential}}function I9e(e){Yd=void 0;try{globalThis.sessionStorage?.removeItem(Ca);const t=globalThis.localStorage?.getItem(Ca),n=t==null?void 0:ER(t);(n===void 0?t===e.credential:n.credential===e.credential&&n.expiresAt===e.expiresAt)&&globalThis.localStorage?.removeItem(Ca)}catch{}}function HJ(e){const t=oT(e);Yd=t;try{sT(t)}catch{}try{globalThis.sessionStorage?.removeItem(Ca)}catch{}}function T9e(){const e=Yd;Yd=void 0;try{const t=globalThis.localStorage?.getItem(Ca),i=(t==null?void 0:ER(t))?.credential??t;e!==void 0&&i===e.credential&&globalThis.localStorage?.removeItem(Ca),globalThis.sessionStorage?.removeItem(Ca)}catch{}}function M9e(e){return iT.add(e),()=>{iT.delete(e)}}function E9e(){T9e();for(const e of iT)try{e()}catch{}}function z3(e){return e.approvalCount>0?"awaiting-approval":e.questionCount>0?"awaiting-question":e.pendingInteraction==="approval"?"awaiting-approval":e.pendingInteraction==="question"?"awaiting-question":e.busy?"running":e.lastTurnReason==="failed"?"aborted":e.unread?"unread":"idle"}function CB(e){let t=null;for(const n of e){const i=z3(n);if(i==="awaiting-approval")return"approval";i==="awaiting-question"?t="question":i==="aborted"?t!=="question"&&(t="aborted"):i==="unread"&&t===null&&(t="unread")}return t}let AB;function L9e(e){if(typeof Intl.Segmenter=="function")return AB??=new Intl.Segmenter("und",{granularity:"grapheme"}),AB.segment(e)}const R9e=/\p{Emoji_Presentation}/u,P9e=/\p{Regional_Indicator}/u,$9e=/\p{Extended_Pictographic}/u,O9e="️";function F9e(e){return R9e.test(e)||P9e.test(e)?!0:$9e.test(e)&&e.includes(O9e)}function jJ(e){const t=L9e(e)?.[Symbol.iterator]().next().value;if(t===void 0||!F9e(t.segment))return{emoji:null,rest:e};const n=e.slice(t.index+t.segment.length).replace(/^\s+/,"");return{emoji:t.segment,rest:n}}function D9e(e,t){const{rest:n}=jJ(e),i=t?.trim()??"";return i?n?`${i} ${n}`:i:n}function WJ(e,t){const n=e.findIndex(s=>s.id===t.id);if(n!==-1&&e[n].updatedAt===t.updatedAt)return e.map(s=>s.id===t.id?t:s);const i=e.filter(s=>s.id!==t.id),o=i.findIndex(s=>s.updatedAt0?i:void 0}catch{return}}function N9e(e){return e===void 0||e.length===0?"/":`${rT}${encodeURIComponent(e)}`}function q7(){if(typeof navigator>"u")return!1;if(/Mac|iPod|iPhone|iPad/.test(navigator.platform))return!0;const e=navigator.userAgentData;return e?.platform==="macOS"||e?.platform==="iOS"}function KJ(e,t=q7()){return(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.code==="KeyA"||e.key.toLowerCase()==="a")&&!e.defaultPrevented}function xB(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement&&(e.isContentEditable||e.closest("input, textarea")!==null)}function B9e(e,t){return typeof Element>"u"||!(e instanceof Element)?null:e.closest(t)}function SB(e){e.ownerDocument.getSelection()?.selectAllChildren(e)}function z9e(e,t=q7()){return(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.code==="KeyK"||e.key.toLowerCase()==="k")&&!e.defaultPrevented}const H9e=[{pattern:/\brm\s+(?:-[a-zA-Z]*[rf][a-zA-Z]*|--recursive|--force)\b/,detail:"rm -rf"},{pattern:/\bsudo\b/,detail:"sudo"},{pattern:/\bmkfs(?:\.[a-z0-9]+)?\b/,detail:"mkfs"},{pattern:/\bdd\b[^|;&]*\bof=/,detail:"dd of=…"},{pattern:/>\s*\/dev\/(?:sd|nvme|disk|hd)/,detail:"> /dev/…"},{pattern:/:\(\)\s*\{/,detail:"fork bomb"},{pattern:/\bgit\s+push\b[^|;&]*(?:--force(?:-with-lease)?\b|\s-f\b)/,detail:"git push --force"},{pattern:/\bchmod\s+(?:-[a-zA-Z]+\s+)*777\b/,detail:"chmod 777"},{pattern:/\b(?:curl|wget)\b[^|;&]*\|\s*(?:sudo\s+)?(?:ba|z)?sh\b/,detail:"curl | sh"},{pattern:/\b(?:shutdown|reboot|poweroff|halt)\b/,detail:"shutdown / reboot"}];function j9e(e){const t=e.replace(/"[^"]*"|'[^']*'/g," ");for(const{pattern:n,detail:i}of H9e)if(n.test(t))return i}function gp(e){return Array.isArray?Array.isArray(e):GJ(e)==="[object Array]"}function W9e(e){if(typeof e=="string")return e;if(typeof e=="bigint")return e.toString();const t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function aT(e){return e==null?"":W9e(e)}function Ha(e){return typeof e=="string"}function D8(e){return typeof e=="number"}function q9e(e){return e===!0||e===!1||V9e(e)&&GJ(e)=="[object Boolean]"}function ZJ(e){return typeof e=="object"}function V9e(e){return ZJ(e)&&e!==null}function bc(e){return e!=null}function h5(e){return!e.trim().length}function GJ(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const U9e="Incorrect 'index' type",lT="Invalid doc index: must be a non-negative integer within the bounds of the docs array",K9e=e=>`Invalid value for key ${e}`,Z9e=e=>`Pattern length exceeds max of ${e}.`,G9e=e=>`Missing ${e} property in key`,Q9e=e=>`Property 'weight' in key '${e}' must be a positive integer`,Y9e="Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.",_B=Object.prototype.hasOwnProperty;var J9e=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(n=>{const i=QJ(n);this._keys.push(i),this._keyMap[i.id]=i,t+=i.weight}),this._keys.forEach(n=>{n.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function QJ(e){let t=null,n=null,i=null,o=1,s=null;if(Ha(e)||gp(e))i=e,t=IB(e),n=N8(e);else{if(!_B.call(e,"name"))throw new Error(G9e("name"));const r=e.name;if(i=r,_B.call(e,"weight")&&e.weight!==void 0&&(o=e.weight,o<=0))throw new Error(Q9e(N8(r)));t=IB(r),n=N8(r),s=e.getFn??null}return{path:t,id:n,weight:o,src:i,getFn:s}}function IB(e){return gp(e)?e:e.split(".")}function N8(e){return gp(e)?e.join("."):e}function X9e(e,t){const n=[];let i=!1;const o=(s,r,a,l)=>{if(bc(s))if(!r[a])n.push(l!==void 0?{v:s,i:l}:s);else{const c=s[r[a]];if(!bc(c))return;if(a===r.length-1&&(Ha(c)||D8(c)||q9e(c)||typeof c=="bigint"))n.push(l!==void 0?{v:aT(c),i:l}:aT(c));else if(gp(c)){i=!0;for(let u=0,d=c.length;ue.score===t.score?e.idx=9&&e<=13||e===32||e===160}function s3e(e=1,t=3){const n=new Map,i=Math.pow(10,t);return{get(o){let s=0,r=!1;for(let l=0;l{this._keysMap[t.id]=n})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const e=this.docs.length;this.records=new Array(e);let t=0;if(Ha(this.docs[0]))for(let n=0;ne&&(this.records[t].i-=1)}removeAll(e){const t=new Set;for(const i of e)Number.isInteger(i)&&i>=0&&t.add(i);if(t.size===0)return;this.records=this.records.filter(i=>!t.has(i.i));const n=Array.from(t).sort((i,o)=>i-o);for(const i of this.records){let o=0,s=n.length;for(;o>>1;n[r]t),records:this.records}}};function YJ(e,t,{getFn:n=bi.getFn,fieldNormWeight:i=bi.fieldNormWeight}={}){const o=new LR({getFn:n,fieldNormWeight:i});return o.setKeys(e.map(QJ)),o.setSources(t),o.create(),o}function r3e(e,{getFn:t=bi.getFn,fieldNormWeight:n=bi.fieldNormWeight}={}){const{keys:i,records:o}=e,s=new LR({getFn:t,fieldNormWeight:n});return s.setKeys(i),s.setIndexRecords(o),s}function a3e(e=[],t=bi.minMatchCharLength){const n=[];let i=-1,o=-1,s=0;for(let r=e.length;s=t&&n.push([i,o]),i=-1)}return e[s-1]&&s-i>=t&&n.push([i,s-1]),n}function l3e(e,t,n,{location:i=bi.location,distance:o=bi.distance,threshold:s=bi.threshold,findAllMatches:r=bi.findAllMatches,minMatchCharLength:a=bi.minMatchCharLength,includeMatches:l=bi.includeMatches,ignoreLocation:c=bi.ignoreLocation}={}){if(t.length>32)throw new Error(Z9e(32));const u=t.length,d=e.length,f=Math.max(0,Math.min(i,d));let h=s,m=f;const g=(T,E)=>{const L=T/u;if(c)return L;const P=Math.abs(f-E);return o?L+P/o:P?1:L},y=a>1||l,v=y?Array(d):[];let k;for(;(k=e.indexOf(t,m))>-1;){const T=g(0,k);if(h=Math.min(T,h),m=k+u,y){let E=0;for(;E=P;F-=1){const B=F-1,W=n[e[B]];if(U[F]=(U[F+1]<<1|1)&W,T&&(U[F]|=(w[F+1]|w[F])<<1|1|w[F+1]),U[F]&M&&(C=g(T,B),C<=h)){if(h=C,m=B,x=T,m<=f)break;P=Math.max(1,2*f-m)}}if(g(T+1,f)>h)break;w=U}if(y&&m>=0){const T=Math.min(d-1,m+u-1+x);for(let E=m;E<=T;E+=1)n[e[E]]&&(v[E]=1)}const _={isMatch:m>=0,score:Math.max(.001,C)};if(y){const T=a3e(v,a);T.length?l&&(_.indices=T):_.isMatch=!1}return _}function c3e(e){const t={};for(let n=0,i=e.length;nn[0]-i[0]||n[1]-i[1]);const t=[e[0]];for(let n=1,i=e.length;ne.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(u3e,t=>JJ[t]):e=>e;var PR=class{constructor(e,{location:t=bi.location,threshold:n=bi.threshold,distance:i=bi.distance,includeMatches:o=bi.includeMatches,findAllMatches:s=bi.findAllMatches,minMatchCharLength:r=bi.minMatchCharLength,isCaseSensitive:a=bi.isCaseSensitive,ignoreDiacritics:l=bi.ignoreDiacritics,ignoreLocation:c=bi.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:i,includeMatches:o,findAllMatches:s,minMatchCharLength:r,isCaseSensitive:a,ignoreDiacritics:l,ignoreLocation:c},e=a?e:e.toLowerCase(),e=l?S9(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const u=(f,h)=>{this.chunks.push({pattern:f,alphabet:c3e(f),startIndex:h})},d=this.pattern.length;if(d>32){let f=0;const h=d%32,m=d-h;for(;f{const{isMatch:v,score:k,indices:w}=l3e(e,m,g,{location:o+y,distance:s,threshold:r,findAllMatches:a,minMatchCharLength:l,includeMatches:i,ignoreLocation:c});v&&(f=!0),d+=k,v&&w&&u.push(...w)});const h={isMatch:f,score:f?d/this.chunks.length:1};return f&&i&&(h.indices=RR(u)),h}};const d3e=new Set(["fuzzy","include"]);function f3e(e){return e.startsWith("inverse")}const cT=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:"exact",search(t){const n=t===e;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:"include",search(t){let n=0,i;const o=[],s=e.length;for(;(i=t.indexOf(e,n))>-1;)n=i+s,o.push([i,n-1]);const r=!!o.length;return{isMatch:r,score:r?0:1,indices:o}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:"prefix-exact",search(t){const n=t.startsWith(e);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:"inverse-prefix-exact",search(t){const n=!t.startsWith(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:"inverse-suffix-exact",search(t){const n=!t.endsWith(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:"suffix-exact",search(t){const n=t.endsWith(e);return{isMatch:n,score:n?0:1,indices:[t.length-e.length,t.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:"inverse-exact",search(t){const n=t.indexOf(e)===-1;return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{const n=new PR(e,{location:t.location??bi.location,threshold:t.threshold??bi.threshold,distance:t.distance??bi.distance,includeMatches:t.includeMatches??bi.includeMatches,findAllMatches:t.findAllMatches??bi.findAllMatches,minMatchCharLength:t.minMatchCharLength??bi.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??bi.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??bi.ignoreDiacritics,ignoreLocation:t.ignoreLocation??bi.ignoreLocation});return{type:"fuzzy",search(i){return n.searchIn(i)}}}}],TB=cT.length,h3e="\0",p3e="|";function m3e(e){const t=[],n=e.length;let i=0;for(;i=n)break;let o=i;for(;o=n||e[s]===" "){o++;break}if(e[s]==="$"&&(s+1>=n||e[s+1]===" ")){o+=2;break}}o++}t.push(e.substring(i,o)),i=o}else{for(;o{const i=m3e(n.replace(/\u0000/g,"|").trim()).filter(s=>s&&!!s.trim()),o=[];for(let s=0,r=i.length;s!!(e[k6.AND]||e[k6.OR]),y3e=e=>!!e[dT.PATH],b3e=e=>!gp(e)&&ZJ(e)&&!fT(e),EB=e=>({[k6.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function XJ(e,t,{auto:n=!0}={}){const i=o=>{if(Ha(o)){const l={keyId:null,pattern:o};return n&&(l.searcher=b6(o,t)),l}const s=Object.keys(o),r=y3e(o);if(!r&&s.length>1&&!fT(o))return i(EB(o));if(b3e(o)){const l=r?o[dT.PATH]:s[0],c=r?o[dT.PATTERN]:o[l];if(!Ha(c))throw new Error(K9e(l));const u={keyId:N8(l),pattern:c};return n&&(u.searcher=b6(c,t)),u}const a={children:[],operator:s[0]};return s.forEach(l=>{const c=o[l];gp(c)&&c.forEach(u=>{a.children.push(i(u))})}),a};return fT(e)||(e=EB(e)),i(e)}function hT(e,{ignoreFieldNorm:t=bi.ignoreFieldNorm}){let n=1;return e.forEach(({key:i,norm:o,score:s})=>{const r=i?i.weight:null;n*=Math.pow(s===0&&r?Number.EPSILON:s,(r||1)*(t?1:o))}),n}function k3e(e,{ignoreFieldNorm:t=bi.ignoreFieldNorm}){e.forEach(n=>{n.score=hT(n.matches,{ignoreFieldNorm:t})})}var w3e=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size0;){const n=e-1>>1;if(this.comparator(t[e],t[n])<=0)break;const i=t[e];t[e]=t[n],t[n]=i,e=n}}_sinkDown(e){const t=this.heap,n=t.length;let i=e;do{e=i;const o=2*e+1,s=2*e+2;if(o0&&(i=o),s0&&(i=s),i!==e){const r=t[e];t[e]=t[i],t[i]=r}}while(i!==e)}};function C3e(e){const t=[];return e.matches.forEach(n=>{if(!bc(n.indices)||!n.indices.length)return;const i={indices:n.indices,value:n.value};n.key&&(i.key=n.key.id),n.idx>-1&&(i.refIndex=n.idx),t.push(i)}),t}function A3e(e,t,{includeMatches:n=bi.includeMatches,includeScore:i=bi.includeScore}={}){return e.map(o=>{const{idx:s}=o,r={item:t[s],refIndex:s};return n&&(r.matches=C3e(o)),i&&(r.score=o.score),r})}const x3e=/[\p{L}\p{M}\p{N}_]+/gu,LB=new WeakSet;function S3e(e){LB.has(e)||(LB.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function _3e(e){if(typeof e=="function"){let t=!1;return n=>{const i=e(n);if(!t&&(t=!0,!Array.isArray(i)||i.some(o=>typeof o!="string")))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(i)?"array containing non-strings":typeof i}.`);return i}}return e instanceof RegExp?(e.global||S3e(e),t=>t.match(e)||[]):t=>t.match(x3e)||[]}function pT({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){const i=_3e(n);return{tokenize(o){return e||(o=o.toLowerCase()),t&&(o=S9(o)),i(o)}}}var I3e=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=pT({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});const n=this.analyzer.tokenize(e),{df:i,fieldCount:o}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const s of n){this.termSearchers.push(new PR(s,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const r=i.get(s)||0,a=Math.log(1+(o-r+.5)/(r+.5));this.idfWeights.push(a)}this.combineAll=t.tokenMatch==="all",this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};const t=[];let n=0,i=0,o=0,s=0;const r=this.combineAll&&!this.useMask?new Set:null;for(let c=0;c0?1-n/i:0,l={isMatch:!0,score:Math.max(.001,a)};return this.options.includeMatches&&t.length&&(l.indices=RR(t)),this.combineAll&&(this.useMask?l.matchedMask=s:l.matchedTerms=r,l.termCount=this.numTerms),l}};function wx(e,t,n,i){const o=i.tokenize(t);if(!o.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);const s=new Set(o);let r=e.docTermFieldHits.get(n);r||(r=new Map,e.docTermFieldHits.set(n,r));for(const a of s)r.set(a,(r.get(a)||0)+1),e.df.set(a,(e.df.get(a)||0)+1)}function eX(e,t,n,i){const{i:o,v:s,$:r}=t;if(s!==void 0){wx(e,s,o,i);return}if(r)for(let a=0;aa-l);for(const a of n)E3e(e,a);const i=a=>{let l=0,c=n.length;for(;l>>1;n[u]o?i(a):a,l);e.docFieldCount=s;const r=new Map;for(const[a,l]of e.docTermFieldHits)r.set(a>o?i(a):a,l);e.docTermFieldHits=r}var vp=class{constructor(e,t,n){this.options={...bi,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new J9e(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;const t=b6(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof LR))throw new Error(U9e);if(this._myIndex=t||YJ(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const n=pT({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=T3e(this._myIndex.records,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}add(e){if(!bc(e))return;this._docs.push(e);const t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){const n=pT({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});M3e(this._invertedIndex,t,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}remove(e=()=>!1){const t=[],n=[];for(let i=0,o=this._docs.length;i!i.has(s)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw new Error(lT);this._invertedIndex&&RB(this._invertedIndex,[e]);const t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){const{limit:n=-1}=t||{},{includeMatches:i,includeScore:o,shouldSort:s,sortFn:r,ignoreFieldNorm:a}=this.options;if(Ha(e)&&!e.trim()){let f=this._docs.map((h,m)=>({item:h,refIndex:m}));return D8(n)&&n>-1&&(f=f.slice(0,n)),f}const l=s&&D8(n)&&n>0&&Ha(e),c=r,u=(f,h)=>c(f,h)||f.idx-h.idx;let d;if(l){const f=new w3e(n,u);Ha(this._docs[0])?this._searchStringList(e,{heap:f,ignoreFieldNorm:a}):this._searchObjectList(e,{heap:f,ignoreFieldNorm:a}),d=f.extractSorted()}else d=Ha(e)?Ha(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),k3e(d,{ignoreFieldNorm:a}),s&&d.sort(Ha(e)?u:c),D8(n)&&n>-1&&(d=d.slice(0,n));return A3e(d,this._docs,{includeMatches:i,includeScore:o})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){const i=this._getSearcher(e),o=this.options.useTokenSearch&&this.options.tokenMatch==="all",{records:s}=this._myIndex,r=t?null:[];return s.forEach(({v:a,i:l,n:c})=>{if(!bc(a))return;const u=i.searchIn(a);if(u.isMatch){const d={score:u.score,value:a,norm:c,indices:u.indices};o&&(d.matchedMask=u.matchedMask,d.matchedTerms=u.matchedTerms,d.termCount=u.termCount);const f=[d];if(!o||this._coversAllTokens(f)){const h={item:a,idx:l,matches:f};t?(h.score=hT(h.matches,{ignoreFieldNorm:n}),t.insert(h)):r.push(h)}}}),r}_searchLogical(e){const t=XJ(e,this.options),n=this._normalizedKeys(),i=(a,l,c)=>{if(!("children"in a)){const{keyId:h,searcher:m}=a;let g;return h===null?(g=[],n.forEach((y,v)=>{g.push(...this._findMatches({key:y,value:l[v],searcher:m}))})):g=this._findMatches({key:this._keyStore.get(h),value:this._myIndex.getValueForItemAtKeyId(l,h),searcher:m}),g&&g.length?[{idx:c,item:l,matches:g}]:[]}const{children:u,operator:d}=a,f=[];for(let h=0,m=u.length;h{if(bc(a)){const c=i(t,a,l);c.length&&(s.has(l)||(s.set(l,{idx:l,item:a,matches:[]}),r.push(s.get(l))),c.forEach(({matches:u})=>{s.get(l).matches.push(...u)}))}}),r}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){const i=this._getSearcher(e),o=this.options.useTokenSearch&&this.options.tokenMatch==="all",{records:s}=this._myIndex,r=this._normalizedKeys(),a=t?null:[];return s.forEach(({$:l,i:c})=>{if(!bc(l))return;const u=[];let d=!1,f=!1;if(r.forEach((h,m)=>{const g=this._findMatches({key:h,value:l[m],searcher:i});g.length?(u.push(...g),g[0].hasInverse&&(f=!0)):d=!0}),!(f&&d)&&u.length&&(!o||this._coversAllTokens(u))){const h={idx:c,item:l,matches:u};t?(h.score=hT(h.matches,{ignoreFieldNorm:n}),t.insert(h)):a.push(h)}}),a}_findMatches({key:e,value:t,searcher:n}){if(!bc(t))return[];const i=[];if(gp(t))t.forEach(({v:o,i:s,n:r})=>{if(!bc(o))return;const a=n.searchIn(o);if(a.isMatch){const l={score:a.score,key:e,value:o,idx:s,norm:r,indices:a.indices,hasInverse:a.hasInverse};a.termCount!==void 0&&(l.matchedMask=a.matchedMask,l.matchedTerms=a.matchedTerms,l.termCount=a.termCount),i.push(l)}});else{const{v:o,n:s}=t,r=n.searchIn(o);if(r.isMatch){const a={score:r.score,key:e,value:o,norm:s,indices:r.indices,hasInverse:r.hasInverse};r.termCount!==void 0&&(a.matchedMask=r.matchedMask,a.matchedTerms=r.matchedTerms,a.termCount=r.termCount),i.push(a)}}return i}_coversAllTokens(e){const t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let i=0;for(let o=0;o$R(t))};var L3e=vp;const R3e=/^[\uD800-\uDBFF]$/,P3e=/^[\uDC00-\uDFFF]$/,$3e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;var PB;(function(e){e[e.Unknown=1e-13]="Unknown",e[e.Rule=1e-12]="Rule",e[e.DICT=2e-8]="DICT",e[e.Surname=1]="Surname",e[e.Custom=1]="Custom"})(PB||(PB={}));const Dc={Normal:1,Surname:10,Custom:100};function Gu(e){var t;return e.length-(((t=e.match($3e))===null||t===void 0?void 0:t.length)||0)}function mT(e){const t=[];let n=0;for(;n1)return this.StringDICT.get(t);{const n=t.charCodeAt(0);return this.NumberDICT[n]}}set(t,n){if(t.length>1)this.StringDICT.set(t,n);else{const i=t.charCodeAt(0);this.NumberDICT[i]=n}}clear(){this.NumberDICT=[],this.StringDICT.clear()}}const O3e=["zh","ch","sh","z","c","s","b","p","m","f","d","t","n","l","g","k","h","j","q","x","r","y","w",""],F3e=["j","q","x"],D3e=["uān","uán","uǎn","uàn","uan","uē","ué","uě","uè","ue","ūn","ún","ǔn","ùn","un","ū","ú","ǔ","ù","u"],N3e={uān:"üān",uán:"üán",uǎn:"üǎn",uàn:"üàn",uan:"üan",uē:"üē",ué:"üé",uě:"üě",uè:"üè",ue:"üe",ūn:"ǖn",ún:"ǘn",ǔn:"ǚn",ùn:"ǜn",un:"ün",ū:"ǖ",ú:"ǘ",ǔ:"ǚ",ù:"ǜ",u:"ü"},B3e=["ia","ian","iang","iao","ie","iu","iong","ua","uai","uan","uang","ue","ui","uo","üan","üe","van","ve"],$B={一:"yì",二:"èr",三:"sān",四:"sì",五:"wǔ",六:"liù",七:"qī",八:"bā",九:"jiǔ",十:"shí",百:"bǎi",千:"qiān",万:"wàn",亿:"yì",单:"dān",两:"liǎng",双:"shuāng",多:"duō",几:"jǐ",十一:"shí yī",零一:"líng yī",第一:"dì yī",一十:"yī shí",一十一:"yī shí yī"},OB={重:"chóng",行:"háng",斗:"dǒu",更:"gēng"};function z3e(){const e={零一:"líng yī","〇一":"líng yī",十一:"shí yī",一十:"yī shí",第一:"dì yī",一十一:"yī shí yī"};for(let t in $B)for(let n in OB){const i=`${t}${n}`,o=`${$B[t]} ${OB[n]}`;e[i]=o}return e}const FB=z3e(),H3e=Object.keys(FB).map(e=>({zh:e,pinyin:FB[e],probability:1e-12,length:Gu(e),priority:Dc.Normal,dict:Symbol("rule")})),nX={不:{bú:[4]},一:{yí:[4],yì:[1,2,3]}},j3e={不:["的","而","之","后","也","还","地"],一:["的","而","之","后","也","还","是"]},W3e=Object.keys(nX),gT={南宫:"nán gōng",第五:"dì wǔ",万俟:"mò qí",司马:"sī mǎ",上官:"shàng guān",欧阳:"ōu yáng",夏侯:"xià hóu",诸葛:"zhū gě",闻人:"wén rén",东方:"dōng fāng",赫连:"hè lián",皇甫:"huáng fǔ",尉迟:"yù chí",公羊:"gōng yáng",澹台:"tán tái",公冶:"gōng yě",宗政:"zōng zhèng",濮阳:"pú yáng",淳于:"chún yú",太叔:"tài shū",申屠:"shēn tú",公孙:"gōng sūn",仲孙:"zhòng sūn",轩辕:"xuān yuán",令狐:"líng hú",钟离:"zhōng lí",宇文:"yǔ wén",长孙:"zhǎng sūn",慕容:"mù róng",鲜于:"xiān yú",闾丘:"lǘ qiū",司徒:"sī tú",司空:"sī kōng",亓官:"qí guān",司寇:"sī kòu",仉督:"zhǎng dū",子车:"zǐ jū",颛孙:"zhuān sūn",端木:"duān mù",巫马:"wū mǎ",公西:"gōng xī",漆雕:"qī diāo",乐正:"yuè zhèng",壤驷:"rǎng sì",公良:"gōng liáng",拓跋:"tuò bá",夹谷:"jiá gǔ",宰父:"zǎi fǔ",榖梁:"gǔ liáng",段干:"duàn gān",百里:"bǎi lǐ",东郭:"dōng guō",南门:"nán mén",呼延:"hū yán",羊舌:"yáng shé",梁丘:"liáng qiū",左丘:"zuǒ qiū",东门:"dōng mén",西门:"xī mén",句龙:"gōu lóng",毌丘:"guàn qiū",赵:"zhào",钱:"qián",孙:"sūn",李:"lǐ",周:"zhōu",吴:"wú",郑:"zhèng",王:"wáng",冯:"féng",陈:"chén",褚:"chǔ",卫:"wèi",蒋:"jiǎng",沈:"shěn",韩:"hán",杨:"yáng",朱:"zhū",秦:"qín",尤:"yóu",许:"xǔ",何:"hé",吕:"lǚ",施:"shī",张:"zhāng",孔:"kǒng",曹:"cáo",严:"yán",华:"huà",金:"jīn",魏:"wèi",陶:"táo",姜:"jiāng",戚:"qī",谢:"xiè",邹:"zōu",喻:"yù",柏:"bǎi",水:"shuǐ",窦:"dòu",章:"zhāng",云:"yún",苏:"sū",潘:"pān",葛:"gě",奚:"xī",范:"fàn",彭:"péng",郎:"láng",鲁:"lǔ",韦:"wéi",昌:"chāng",马:"mǎ",苗:"miáo",凤:"fèng",花:"huā",方:"fāng",俞:"yú",任:"rén",袁:"yuán",柳:"liǔ",酆:"fēng",鲍:"bào",史:"shǐ",唐:"táng",费:"fèi",廉:"lián",岑:"cén",薛:"xuē",雷:"léi",贺:"hè",倪:"ní",汤:"tāng",滕:"téng",殷:"yīn",罗:"luó",毕:"bì",郝:"hǎo",邬:"wū",安:"ān",常:"cháng",乐:"yuè",于:"yú",时:"shí",傅:"fù",皮:"pí",卞:"biàn",齐:"qí",康:"kāng",伍:"wǔ",余:"yú",元:"yuán",卜:"bǔ",顾:"gù",孟:"mèng",平:"píng",黄:"huáng",和:"hé",穆:"mù",萧:"xiāo",尹:"yǐn",姚:"yáo",邵:"shào",湛:"zhàn",汪:"wāng",祁:"qí",毛:"máo",禹:"yǔ",狄:"dí",米:"mǐ",贝:"bèi",明:"míng",臧:"zāng",计:"jì",伏:"fú",成:"chéng",戴:"dài",谈:"tán",宋:"sòng",茅:"máo",庞:"páng",熊:"xióng",纪:"jǐ",舒:"shū",屈:"qū",项:"xiàng",祝:"zhù",董:"dǒng",梁:"liáng",杜:"dù",阮:"ruǎn",蓝:"lán",闵:"mǐn",席:"xí",季:"jì",麻:"má",强:"qiáng",贾:"jiǎ",路:"lù",娄:"lóu",危:"wēi",江:"jiāng",童:"tóng",颜:"yán",郭:"guō",梅:"méi",盛:"shèng",林:"lín",刁:"diāo",钟:"zhōng",徐:"xú",邱:"qiū",骆:"luò",高:"gāo",夏:"xià",蔡:"cài",田:"tián",樊:"fán",胡:"hú",凌:"líng",霍:"huò",虞:"yú",万:"wàn",支:"zhī",柯:"kē",昝:"zǎn",管:"guǎn",卢:"lú",莫:"mò",经:"jīng",房:"fáng",裘:"qiú",缪:"miào",干:"gān",解:"xiè",应:"yīng",宗:"zōng",丁:"dīng",宣:"xuān",贲:"bēn",邓:"dèng",郁:"yù",单:"shàn",杭:"háng",洪:"hóng",包:"bāo",诸:"zhū",左:"zuǒ",石:"shí",崔:"cuī",吉:"jí",钮:"niǔ",龚:"gōng",程:"chéng",嵇:"jī",邢:"xíng",滑:"huá",裴:"péi",陆:"lù",荣:"róng",翁:"wēng",荀:"xún",羊:"yáng",於:"yū",惠:"huì",甄:"zhēn",曲:"qū",家:"jiā",封:"fēng",芮:"ruì",羿:"yì",储:"chǔ",靳:"jìn",汲:"jí",邴:"bǐng",糜:"mí",松:"sōng",井:"jǐng",段:"duàn",富:"fù",巫:"wū",乌:"wū",焦:"jiāo",巴:"bā",弓:"gōng",牧:"mù",隗:"wěi",山:"shān",谷:"gǔ",车:"chē",侯:"hóu",宓:"mì",蓬:"péng",全:"quán",郗:"xī",班:"bān",仰:"yǎng",秋:"qiū",仲:"zhòng",伊:"yī",宫:"gōng",宁:"nìng",仇:"qiú",栾:"luán",暴:"bào",甘:"gān",钭:"tǒu",厉:"lì",戎:"róng",祖:"zǔ",武:"wǔ",符:"fú",刘:"liú",景:"jǐng",詹:"zhān",束:"shù",龙:"lóng",叶:"yè",幸:"xìng",司:"sī",韶:"sháo",郜:"gào",黎:"lí",蓟:"jì",薄:"bó",印:"yìn",宿:"sù",白:"bái",怀:"huái",蒲:"pú",邰:"tái",从:"cóng",鄂:"è",索:"suǒ",咸:"xián",籍:"jí",赖:"lài",卓:"zhuó",蔺:"lìn",屠:"tú",蒙:"méng",池:"chí",乔:"qiáo",阴:"yīn",鬱:"yù",胥:"xū",能:"nài",苍:"cāng",双:"shuāng",闻:"wén",莘:"shēn",党:"dǎng",翟:"zhái",谭:"tán",贡:"gòng",劳:"láo",逄:"páng",姬:"jī",申:"shēn",扶:"fú",堵:"dǔ",冉:"rǎn",宰:"zǎi",郦:"lì",雍:"yōng",郤:"xì",璩:"qú",桑:"sāng",桂:"guì",濮:"pú",牛:"niú",寿:"shòu",通:"tōng",边:"biān",扈:"hù",燕:"yān",冀:"jì",郏:"jiá",浦:"pǔ",尚:"shàng",农:"nóng",温:"wēn",别:"bié",庄:"zhuāng",晏:"yàn",柴:"chái",瞿:"qú",阎:"yán",充:"chōng",慕:"mù",连:"lián",茹:"rú",习:"xí",宦:"huàn",艾:"ài",鱼:"yú",容:"róng",向:"xiàng",古:"gǔ",易:"yì",慎:"shèn",戈:"gē",廖:"liào",庾:"yǔ",终:"zhōng",暨:"jì",居:"jū",衡:"héng",步:"bù",都:"dū",耿:"gěng",满:"mǎn",弘:"hóng",匡:"kuāng",国:"guó",文:"wén",寇:"kòu",广:"guǎng",禄:"lù",阙:"quē",东:"dōng",欧:"ōu",殳:"shū",沃:"wò",利:"lì",蔚:"wèi",越:"yuè",夔:"kuí",隆:"lóng",师:"shī",巩:"gǒng",厍:"shè",聂:"niè",晁:"cháo",勾:"gōu",敖:"áo",融:"róng",冷:"lěng",訾:"zī",辛:"xīn",阚:"kàn",那:"nā",简:"jiǎn",饶:"ráo",空:"kōng",曾:"zēng",母:"mǔ",沙:"shā",乜:"niè",养:"yǎng",鞠:"jū",须:"xū",丰:"fēng",巢:"cháo",关:"guān",蒯:"kuǎi",相:"xiàng",查:"zhā",后:"hòu",荆:"jīng",红:"hóng",游:"yóu",竺:"zhú",权:"quán",逯:"lù",盖:"gě",益:"yì",桓:"huán",公:"gōng",牟:"móu",哈:"hǎ",言:"yán",福:"fú",肖:"xiāo",区:"ōu",覃:"qín",朴:"piáo",繁:"pó",员:"yùn",句:"gōu",要:"yāo",过:"guō",钻:"zuān",谌:"chén",折:"shé",召:"shào",郄:"qiè",撒:"sǎ",甯:"nìng",六:"lù",啜:"chuài",行:"xíng"},q3e=Object.keys(gT).map(e=>({zh:e,pinyin:gT[e],probability:1+Gu(e),length:Gu(e),priority:Dc.Surname,dict:Symbol("surname")})),DB={"bǎng páng pāng":["膀"],líng:["〇","伶","凌","刢","囹","坽","夌","姈","婈","孁","岺","彾","掕","昤","朎","柃","棂","櫺","欞","泠","淩","澪","灵","燯","爧","狑","玲","琌","瓴","皊","砱","祾","秢","竛","笭","紷","綾","绫","羐","羚","翎","聆","舲","苓","菱","蓤","蔆","蕶","蛉","衑","裬","詅","跉","軨","輘","酃","醽","鈴","錂","铃","閝","陵","零","霊","霗","霛","霝","靈","駖","魿","鯪","鲮","鴒","鸰","鹷","麢","齡","齢","龄","龗","㥄"],yī:["一","乊","伊","依","医","吚","咿","噫","壱","壹","夁","嫛","嬄","弌","揖","撎","檹","毉","洢","渏","漪","瑿","畩","祎","禕","稦","繄","蛜","衤","譩","辷","郼","醫","銥","铱","鷖","鹥","黟","黳"],"dīng zhēng":["丁"],"kǎo qiǎo yú":["丂"],qī:["七","倛","僛","凄","嘁","墄","娸","悽","慼","慽","戚","捿","柒","桤","桼","棲","榿","欺","沏","淒","漆","紪","緀","萋","褄","諆","迉","郪","鏚","霋","魌","鶈"],shàng:["丄","尙","尚","恦","緔","绱"],xià:["丅","下","乤","圷","夏","夓","懗","梺","疜","睱","罅","鎼","鏬"],hǎn:["丆","喊","浫","罕","豃","㘎"],"wàn mò":["万"],zhàng:["丈","仗","墇","嶂","帐","帳","幛","扙","杖","涱","痮","瘬","瘴","瞕","粀","胀","脹","賬","账","障"],sān:["三","厁","叁","弎","毵","毶","毿","犙","鬖"],"shàng shǎng shang":["上"],"qí jī":["丌","其","奇"],"bù fǒu":["不"],"yǔ yù yú":["与"],miǎn:["丏","偭","免","冕","勉","勔","喕","娩","愐","汅","沔","湎","睌","緬","缅","腼","葂","靦","鮸","𩾃"],gài:["丐","乢","匃","匄","戤","概","槩","槪","溉","漑","瓂","葢","鈣","钙","𬮿"],chǒu:["丑","丒","侴","吜","杽","瞅","矁","醜","魗"],zhuān:["专","叀","嫥","専","專","瑼","甎","砖","磗","磚","蟤","諯","鄟","顓","颛","鱄","䏝"],"qiě jū":["且"],pī:["丕","伓","伾","噼","坯","岯","憵","批","披","炋","狉","狓","砒","磇","礔","礕","秛","秠","耚","豾","邳","鈚","鉟","銔","錃","錍","霹","駓","髬","魾","𬳵"],shì:["世","丗","亊","事","仕","侍","冟","势","勢","卋","呩","嗜","噬","士","奭","嬕","室","市","式","弑","弒","恀","恃","戺","拭","揓","是","昰","枾","柿","栻","澨","烒","煶","眂","眎","眡","睗","示","礻","筮","簭","舐","舓","襫","視","视","觢","試","誓","諡","謚","试","谥","貰","贳","軾","轼","逝","遾","釈","释","釋","鈰","鉃","鉽","铈","飾","餙","餝","饰","鰘","䏡","𬤊"],qiū:["丘","丠","坵","媝","恘","恷","楸","秋","秌","穐","篍","緧","萩","蘒","蚯","蝵","蟗","蠤","趥","邱","鞦","鞧","鰌","鰍","鳅","鶖","鹙","龝"],bǐng:["丙","屛","怲","抦","昞","昺","柄","棅","炳","禀","秉","稟","苪","蛃","邴","鈵","陃","鞆","餅","餠","饼"],yè:["业","亱","僷","墷","夜","嶪","嶫","抴","捙","擛","擪","擫","晔","曄","曅","曗","曳","曵","枼","枽","業","洂","液","澲","烨","燁","爗","璍","皣","瞱","瞸","礏","腋","葉","謁","谒","邺","鄴","鍱","鐷","靥","靨","頁","页","餣","饁","馌","驜","鵺","鸈"],cóng:["丛","从","叢","婃","孮","従","徔","徖","悰","樷","欉","淙","灇","爜","琮","藂","誴","賨","賩","錝"],dōng:["东","倲","冬","咚","埬","岽","崬","徚","昸","東","氡","氭","涷","笗","苳","菄","蝀","鮗","鯟","鶇","鶫","鸫","鼕","𬟽"],sī:["丝","俬","凘","厮","司","咝","嘶","噝","媤","廝","恖","撕","斯","楒","泀","澌","燍","禗","禠","私","糹","絲","緦","纟","缌","罳","蕬","虒","蛳","蜤","螄","蟖","蟴","鉰","銯","鍶","鐁","锶","颸","飔","騦","鷥","鸶","鼶","㟃"],chéng:["丞","呈","城","埕","堘","塍","塖","宬","峸","惩","懲","成","承","挰","掁","揨","枨","棖","橙","檙","洆","溗","澂","珵","珹","畻","程","窚","筬","絾","脭","荿","誠","诚","郕","酲","鋮","铖","騬","鯎"],diū:["丟","丢","銩","铥"],liǎng:["両","两","兩","唡","啢","掚","緉","脼","蜽","裲","魉","魎","𬜯"],yǒu:["丣","卣","友","梄","湵","牖","禉","羑","聈","苃","莠","蜏","酉","銪","铕","黝"],yán:["严","厳","啱","喦","嚴","塩","壛","壧","妍","姸","娫","娮","岩","嵒","嵓","巌","巖","巗","延","揅","昖","楌","檐","櫩","欕","沿","炎","炏","狿","琂","盐","碞","筵","簷","莚","蔅","虤","蜒","言","訁","訮","詽","讠","郔","閆","閻","闫","阎","顏","顔","颜","鹽","麣","𫄧"],bìng:["並","併","倂","傡","垪","摒","栤","病","窉","竝","誁","靐","鮩"],"sàng sāng":["丧"],gǔn:["丨","惃","滚","滾","磙","緄","绲","蓘","蔉","衮","袞","輥","辊","鮌","鯀","鲧"],jiū:["丩","勼","啾","揪","揫","朻","究","糾","纠","萛","赳","阄","鬏","鬮","鳩","鸠"],"gè gě":["个","個","各"],yā:["丫","圧","孲","庘","押","枒","桠","椏","錏","鐚","鴉","鴨","鵶","鸦","鸭"],pán:["丬","媻","幋","槃","洀","瀊","爿","盘","盤","磐","縏","蒰","蟠","蹒","蹣","鎜","鞶"],"zhōng zhòng":["中"],jǐ:["丮","妀","己","戟","挤","掎","撠","擠","橶","泲","犱","脊","虮","蟣","魢","鱾","麂"],jiè:["丯","介","借","唶","堺","屆","届","岕","庎","徣","戒","楐","犗","玠","琾","界","畍","疥","砎","蚧","蛶","衸","褯","誡","诫","鎅","骱","魪"],fēng:["丰","仹","偑","僼","凨","凬","凮","妦","寷","封","峯","峰","崶","枫","楓","檒","沣","沨","渢","灃","烽","犎","猦","琒","疯","瘋","盽","砜","碸","篈","蘴","蜂","蠭","豐","鄷","酆","鋒","鎽","鏠","锋","霻","靊","飌","麷"],"guàn kuàng":["丱"],chuàn:["串","汌","玔","賗","釧","钏"],chǎn:["丳","产","冁","剷","囅","嵼","旵","浐","滻","灛","產","産","簅","蒇","蕆","諂","譂","讇","谄","鏟","铲","閳","闡","阐","骣","𬊤"],lín:["临","冧","壣","崊","嶙","斴","晽","暽","林","潾","瀶","燐","琳","璘","瞵","碄","磷","粦","粼","繗","翷","臨","轔","辚","遴","邻","鄰","鏻","阾","隣","霖","驎","鱗","鳞","麐","麟","𬴊","𬭸"],zhuó:["丵","劅","卓","啄","圴","妰","娺","撯","擆","擢","斫","斮","斱","斲","斵","晫","椓","浊","浞","濁","灼","烵","琸","硺","禚","窡","籗","籱","罬","茁","蠗","蠿","諁","諑","謶","诼","酌","鐲","镯","鵫","鷟","䓬","𬸦"],zhǔ:["丶","主","劯","嘱","囑","宔","帾","拄","渚","濐","煑","煮","燝","瞩","矚","罜","詝","陼","鸀","麈","𬣞"],bā:["丷","仈","八","叭","哵","夿","岜","巴","捌","朳","玐","疤","笆","粑","羓","芭","蚆","豝","釟"],wán:["丸","刓","完","岏","抏","捖","汍","烷","玩","琓","笂","紈","纨","翫","芄","貦","頑","顽"],dān:["丹","勯","匰","単","妉","媅","殚","殫","甔","眈","砃","箪","簞","耼","耽","聃","聸","褝","襌","躭","郸","鄲","酖","頕"],"wèi wéi":["为"],"jǐng dǎn":["丼"],"lì lí":["丽"],jǔ:["举","弆","挙","擧","椇","榉","榘","櫸","欅","矩","筥","聥","舉","莒","蒟","襷","踽","齟","龃"],piě:["丿","苤","鐅","𬭯"],fú:["乀","伏","俘","凫","刜","匐","咈","哹","垘","孚","岪","巿","帗","幅","幞","弗","彿","怫","扶","柫","栿","桴","氟","泭","浮","涪","澓","炥","玸","甶","畉","癁","祓","福","稪","符","箙","紱","紼","絥","綍","绂","绋","罘","罦","翇","艀","芙","芣","苻","茀","茯","菔","葍","虙","蚨","蜉","蝠","袚","袱","襆","襥","諨","豧","踾","輻","辐","郛","鉘","鉜","韍","韨","颫","髴","鮄","鮲","鳧","鳬","鴔","鵩","黻"],"yí jí":["乁"],yì:["乂","义","亄","亦","亿","伇","伿","佾","俋","億","兿","刈","劓","劮","勚","勩","匇","呓","呭","呹","唈","囈","圛","坄","垼","埸","奕","嫕","嬑","寱","屹","峄","嶧","帟","帠","幆","廙","异","弈","弋","役","忆","怈","怿","悒","意","憶","懌","懿","抑","挹","敡","易","晹","曀","曎","杙","枍","棭","榏","槸","檍","歝","殔","殪","殹","毅","浂","浥","浳","湙","溢","潩","澺","瀷","炈","焲","熠","熤","熼","燚","燡","燱","獈","玴","異","疫","痬","瘗","瘞","瘱","癔","益","瞖","穓","竩","篒","縊","繶","繹","绎","缢","義","羿","翊","翌","翳","翼","耴","肄","肊","膉","臆","艗","艺","芅","苅","萟","蓺","薏","藙","藝","蘙","虉","蜴","螠","衪","袣","裔","裛","褹","襼","訲","訳","詍","詣","誼","譯","議","讛","议","译","诣","谊","豙","豛","豷","貖","贀","跇","轶","逸","邑","鄓","醷","釴","鈠","鎰","鐿","镒","镱","阣","隿","霬","饐","駅","驛","驿","骮","鮨","鶂","鶃","鶍","鷁","鷊","鷧","鷾","鸃","鹝","鹢","黓","齸","𬬩","㑊","𫄷","𬟁"],nǎi:["乃","倷","奶","嬭","廼","氖","疓","艿","迺","釢"],wǔ:["乄","五","仵","伍","侮","倵","儛","午","啎","妩","娬","嫵","庑","廡","忤","怃","憮","摀","武","潕","熓","牾","玝","珷","瑦","甒","碔","舞","躌","迕","逜","陚","鵡","鹉","𣲘"],jiǔ:["久","乆","九","乣","奺","杦","汣","灸","玖","紤","舏","酒","镹","韭","韮"],"tuō zhé":["乇","杔","馲"],"me mó ma yāo":["么"],zhī:["之","倁","卮","巵","搘","支","栀","梔","椥","榰","汁","泜","疷","祗","祬","秓","稙","綕","肢","胑","胝","脂","芝","蘵","蜘","衼","隻","鳷","鴲","鼅","𦭜"],"wū wù":["乌"],zhà:["乍","咤","宱","搾","榨","溠","痄","蚱","詐","诈","醡","霅","䃎"],hū:["乎","乯","匢","匫","呼","唿","嘑","垀","寣","幠","忽","惚","昒","歑","泘","淴","滹","烀","苸","虍","虖","謼","軤","轷","雐"],fá:["乏","伐","傠","坺","垡","墢","姂","栰","浌","瞂","笩","筏","罚","罰","罸","藅","閥","阀"],"lè yuè yào lào":["乐","樂"],yín:["乑","吟","噖","嚚","圁","垠","夤","婬","寅","峾","崟","崯","檭","殥","泿","淫","滛","烎","犾","狺","璌","硍","碒","荶","蔩","訔","訚","訡","誾","鄞","鈝","銀","银","霪","鷣","齦"],pīng:["乒","俜","娉","涄","甹","砯","聠","艵","頩"],pāng:["乓","滂","胮","膖","雱","霶"],qiáo:["乔","侨","僑","嫶","憔","桥","槗","樵","橋","櫵","犞","瞧","硚","礄","荍","荞","蕎","藮","譙","趫","鐈","鞒","鞽","顦"],hǔ:["乕","琥","萀","虎","虝","錿","鯱"],guāi:["乖"],"chéng shèng":["乗","乘","娍"],yǐ:["乙","乛","以","倚","偯","嬟","崺","已","庡","扆","攺","敼","旑","旖","檥","矣","礒","笖","舣","艤","苡","苢","蚁","螘","蟻","裿","踦","輢","轙","逘","酏","釔","鈘","鉯","钇","顗","鳦","齮","𫖮","𬺈"],"háo yǐ":["乚"],"niè miē":["乜"],qǐ:["乞","企","启","唘","啓","啔","啟","婍","屺","杞","棨","玘","盀","綺","绮","芑","諬","起","邔","闙"],yě:["也","冶","嘢","埜","壄","漜","野"],xí:["习","喺","媳","嶍","席","椺","檄","漝","習","蓆","袭","襲","覡","觋","謵","趘","郋","鎴","隰","霫","飁","騱","騽","驨","鰼","鳛","𠅤","𫘬"],xiāng:["乡","厢","廂","忀","楿","欀","湘","瓖","稥","箱","緗","缃","膷","芗","萫","葙","薌","襄","郷","鄉","鄊","鄕","鑲","镶","香","驤","骧","鱜","麘","𬙋"],shū:["书","倏","倐","儵","叔","姝","尗","抒","掓","摅","攄","書","枢","梳","樞","殊","殳","毹","毺","淑","瀭","焂","疎","疏","紓","綀","纾","舒","菽","蔬","踈","軗","輸","输","鄃","陎","鮛","鵨"],dǒu:["乧","抖","枓","蚪","鈄","阧","陡"],shǐ:["乨","使","兘","史","始","宩","屎","榁","矢","笶","豕","鉂","駛","驶"],jī:["乩","僟","击","刉","刏","剞","叽","唧","喞","嗘","嘰","圾","基","墼","姬","屐","嵆","嵇","撃","擊","朞","机","枅","樭","機","毄","激","犄","玑","璣","畸","畿","癪","矶","磯","积","積","笄","筓","箕","簊","緁","羁","羇","羈","耭","肌","芨","虀","覉","覊","譏","譤","讥","賫","賷","赍","跻","踑","躋","躸","銈","錤","鐖","鑇","鑙","隮","雞","鞿","韲","飢","饑","饥","魕","鳮","鶏","鶺","鷄","鸄","鸡","齎","齏","齑","𬯀","𫓯","𫓹","𫌀"],náng:["乪","嚢","欜","蠰","饢"],jiā:["乫","佳","傢","加","嘉","抸","枷","梜","毠","泇","浃","浹","犌","猳","珈","痂","笳","糘","耞","腵","葭","袈","豭","貑","跏","迦","鉫","鎵","镓","鴐","麚","𬂩"],jù:["乬","倨","倶","具","剧","劇","勮","埧","埾","壉","姖","屦","屨","岠","巨","巪","怇","惧","愳","懅","懼","拒","拠","昛","歫","洰","澽","炬","烥","犋","秬","窭","窶","簴","粔","耟","聚","虡","蚷","詎","讵","豦","距","踞","躆","遽","邭","醵","鉅","鐻","钜","颶","飓","駏","鮔"],shí:["乭","十","埘","塒","姼","实","実","寔","實","峕","嵵","时","旹","時","榯","湜","溡","炻","祏","竍","蚀","蝕","辻","遈","鉐","飠","饣","鮖","鰣","鲥","鼫","鼭"],mǎo:["乮","冇","卯","峁","戼","昴","泖","笷","蓩","鉚","铆"],mǎi:["买","嘪","荬","蕒","買","鷶"],luàn:["乱","亂","釠"],rǔ:["乳","擩","汝","肗","辱","鄏"],xué:["乴","学","學","峃","嶨","斈","泶","澩","燢","穴","茓","袕","踅","鷽","鸴"],yǎn:["䶮","乵","俨","偃","儼","兖","兗","厣","厴","噞","孍","嵃","巘","巚","弇","愝","戭","扊","抁","掩","揜","曮","椼","檿","沇","渷","演","琰","甗","眼","罨","萒","蝘","衍","褗","躽","遃","郾","隒","顩","魇","魘","鰋","鶠","黡","黤","黬","黭","黶","鼴","鼹","齴","龑","𬸘","𬙂","𪩘"],fǔ:["乶","俌","俛","俯","府","弣","抚","拊","撫","斧","椨","滏","焤","甫","盙","簠","腐","腑","蜅","輔","辅","郙","釜","釡","阝","頫","鬴","黼","㕮","𫖯"],shā:["乷","唦","杀","桬","殺","毮","猀","痧","砂","硰","紗","繺","纱","蔱","裟","鎩","铩","閷","髿","魦","鯊","鯋","鲨"],nǎ:["乸","雫"],qián:["乹","亁","仱","偂","前","墘","媊","岒","拑","掮","榩","橬","歬","潛","潜","濳","灊","箝","葥","虔","軡","鈐","鉗","銭","錢","鎆","钤","钱","钳","靬","騚","騝","鰬","黔","黚"],suǒ:["乺","唢","嗩","所","暛","溑","溹","琐","琑","瑣","索","褨","鎖","鎻","鏁","锁"],yú:["乻","于","亐","伃","余","堣","堬","妤","娛","娯","娱","嬩","崳","嵎","嵛","愚","扵","揄","旟","楡","楰","榆","欤","歈","歟","歶","渔","渝","湡","漁","澞","牏","狳","玗","玙","瑜","璵","盂","睮","窬","竽","籅","羭","腴","臾","舁","舆","艅","茰","萮","萸","蕍","蘛","虞","虶","蝓","螸","衧","褕","覦","觎","諛","謣","谀","踰","輿","轝","逾","邘","酑","鍝","隅","雓","雩","餘","馀","騟","骬","髃","魚","魣","鮽","鯲","鰅","鱼","鷠","鸆","齵"],zhù:["乼","伫","佇","住","坾","墸","壴","嵀","拀","杼","柱","樦","殶","注","炷","疰","眝","祝","祩","竚","筯","箸","篫","簗","紵","紸","纻","羜","翥","苎","莇","蛀","註","貯","贮","跓","軴","鉒","鋳","鑄","铸","馵","駐","驻"],zhě:["乽","者","褶","襵","赭","踷","鍺","锗"],"qián gān":["乾"],"zhì luàn":["乿"],guī:["亀","圭","妫","媯","嫢","嬀","帰","归","摫","椝","槻","槼","櫷","歸","珪","瑰","璝","瓌","皈","瞡","硅","茥","蘬","規","规","邽","郌","閨","闺","騩","鬶","鬹"],"lǐn lìn":["亃"],jué:["亅","决","刔","劂","匷","厥","噊","孒","孓","崛","崫","嶥","彏","憠","憰","戄","抉","挗","掘","攫","桷","橛","橜","欮","氒","決","灍","焳","熦","爑","爴","爵","獗","玃","玦","玨","珏","瑴","瘚","矍","矡","砄","絕","絶","绝","臄","芵","蕝","蕨","虳","蟨","蟩","觖","觮","觼","訣","譎","诀","谲","貜","赽","趉","蹷","躩","鈌","鐍","鐝","钁","镢","鴂","鴃","鷢","𫘝","㵐","𫔎"],"le liǎo":["了"],"gè mā":["亇"],"yǔ yú":["予","懙"],zhēng:["争","佂","凧","姃","媜","峥","崝","崢","征","徰","炡","烝","爭","狰","猙","癥","眐","睁","睜","筝","箏","篜","聇","脀","蒸","踭","鉦","錚","鏳","鬇"],èr:["二","刵","咡","弍","弐","樲","誀","貮","貳","贰","髶"],chù:["亍","傗","儊","怵","憷","搐","斶","歜","珿","琡","矗","竌","絀","绌","臅","触","觸","豖","鄐","閦","黜"],kuī:["亏","刲","岿","巋","盔","窥","窺","聧","虧","闚","顝"],yún:["云","伝","勻","匀","囩","妘","愪","抣","昀","橒","沄","涢","溳","澐","熉","畇","秐","筼","篔","紜","縜","纭","耘","芸","蒷","蕓","郧","鄖","鋆","雲"],hù:["互","冱","嗀","嚛","婟","嫭","嫮","岵","帍","弖","怙","戶","户","戸","戽","扈","护","昈","槴","沍","沪","滬","熩","瓠","祜","笏","簄","粐","綔","蔰","護","豰","鄠","鍙","頀","鱯","鳠","鳸","鸌","鹱"],qí:["亓","剘","埼","岐","岓","崎","嵜","愭","掑","斉","斊","旂","旗","棊","棋","檱","櫀","歧","淇","濝","猉","玂","琦","琪","璂","畦","疧","碁","碕","祁","祈","祺","禥","竒","簯","簱","籏","粸","綥","綦","肵","脐","臍","艩","芪","萁","萕","蕲","藄","蘄","蚑","蚚","蛴","蜝","蜞","螧","蠐","褀","軝","鄿","釮","錡","锜","陭","頎","颀","騎","騏","騹","骐","骑","鬐","鬿","鯕","鰭","鲯","鳍","鵸","鶀","麒","麡","𨙸","𬨂","䓫"],jǐng:["井","儆","刭","剄","坓","宑","幜","憬","暻","殌","汫","汬","澋","璄","璟","璥","穽","肼","蟼","警","阱","頚","頸"],sì:["亖","佀","価","儩","兕","嗣","四","姒","娰","孠","寺","巳","柶","榹","汜","泗","泤","洍","洠","涘","瀃","牭","祀","禩","竢","笥","耜","肂","肆","蕼","覗","貄","釲","鈶","鈻","飤","飼","饲","駟","騃","驷"],suì:["亗","嬘","岁","嵗","旞","檖","歲","歳","澻","煫","燧","璲","砕","碎","祟","禭","穂","穗","穟","繀","繐","繸","襚","誶","譢","谇","賥","邃","鐆","鐩","隧","韢","𫟦","𬭼"],gèn:["亘","亙","揯","搄","茛"],yà:["亚","亜","俹","冴","劜","圔","圠","埡","娅","婭","揠","氩","氬","犽","砑","稏","聐","襾","覀","訝","讶","迓","齾"],"xiē suò":["些"],"qí zhāi":["亝","齊"],"yā yà":["亞","压","垭","壓","铔"],"jí qì":["亟","焏"],tóu:["亠","投","頭","骰"],"wáng wú":["亡"],"kàng háng gāng":["亢"],dà:["亣","眔"],jiāo:["交","僬","娇","嬌","峧","嶕","嶣","憍","椒","浇","澆","焦","礁","穚","簥","胶","膠","膲","茭","茮","蕉","虠","蛟","蟭","跤","轇","郊","鐎","驕","骄","鮫","鲛","鵁","鷦","鷮","鹪","䴔"],hài:["亥","嗐","害","氦","餀","饚","駭","駴","骇"],"hēng pēng":["亨"],mǔ:["亩","姆","峔","拇","母","牡","牳","畂","畆","畒","畝","畞","畮","砪","胟","踇","鉧","𬭁","𧿹"],ye:["亪"],xiǎng:["享","亯","响","想","晑","蚃","蠁","響","飨","餉","饗","饷","鮝","鯗","鱶","鲞"],jīng:["京","亰","兢","坕","坙","婛","惊","旌","旍","晶","橸","泾","涇","猄","睛","秔","稉","粳","精","経","經","綡","聙","腈","茎","荆","荊","菁","葏","驚","鯨","鲸","鶁","鶄","麖","麠","鼱","䴖"],tíng:["亭","停","婷","嵉","庭","廷","楟","榳","筳","聤","莛","葶","蜓","蝏","諪","邒","霆","鼮","䗴"],liàng:["亮","喨","悢","晾","湸","諒","谅","輌","輛","辆","鍄"],"qīn qìng":["亲","親"],bó:["亳","仢","侼","僰","博","帛","愽","懪","挬","搏","欂","浡","淿","渤","煿","牔","狛","瓝","礴","秡","箔","簙","糪","胉","脖","膊","舶","艊","萡","葧","袯","襏","襮","謈","踣","郣","鈸","鉑","鋍","鎛","鑮","钹","铂","镈","餺","馎","馛","馞","駁","駮","驳","髆","鵓","鹁"],yòu:["亴","佑","佦","侑","又","右","哊","唀","囿","姷","宥","峟","幼","狖","祐","蚴","誘","诱","貁","迶","酭","釉","鼬"],xiè:["亵","伳","偞","偰","僁","卨","卸","噧","塮","夑","媟","屑","屧","廨","徢","懈","暬","械","榍","榭","泻","洩","渫","澥","瀉","瀣","灺","炧","炨","燮","爕","獬","祄","禼","糏","紲","絏","絬","繲","纈","绁","缷","薢","薤","蟹","蠏","褉","褻","謝","谢","躞","邂","靾","韰","齂","齘","齛","齥","𬹼","𤫉"],"dǎn dàn":["亶","馾"],lián:["亷","劆","匲","匳","嗹","噒","奁","奩","嫾","帘","廉","怜","憐","涟","漣","濂","濓","瀮","熑","燫","簾","籢","籨","縺","翴","联","聨","聫","聮","聯","臁","莲","蓮","薕","螊","蠊","裢","褳","覝","謰","蹥","连","連","鎌","鐮","镰","鬑","鰱","鲢"],duǒ:["亸","哚","嚲","埵","崜","朵","朶","綞","缍","趓","躱","躲","軃"],"wěi mén":["亹","斖"],rén:["人","亻","仁","壬","忈","忎","朲","秂","芢","魜","鵀"],jí:["亼","亽","伋","佶","偮","卙","即","卽","及","叝","吉","堲","塉","姞","嫉","岌","嵴","嶯","彶","忣","急","愱","戢","揤","极","棘","楫","極","槉","檝","殛","汲","湒","潗","疾","瘠","皍","笈","箿","籍","級","级","膌","艥","蒺","蕀","蕺","蝍","螏","襋","觙","谻","踖","蹐","躤","輯","轚","辑","郆","銡","鍓","鏶","集","雧","霵","鹡","㴔"],wáng:["亾","仼","兦","莣","蚟"],"shén shí":["什"],lè:["仂","叻","忇","氻","泐","玏","砳","簕","艻","阞","韷","餎","鰳","鱳","鳓"],dīng:["仃","叮","帄","玎","疔","盯","耵","虰","靪"],zè:["仄","崱","庂","捑","昃","昗","汄"],"jǐn jìn":["仅","僅","嫤"],"pú pū":["仆"],"chóu qiú":["仇"],zhǎng:["仉","幥","掌","礃"],jīn:["今","堻","巾","惍","斤","津","珒","琻","璡","砛","筋","荕","衿","襟","觔","金","釒","釿","钅","鹶","黅","𬬱"],bīng:["仌","仒","兵","冫","冰","掤","氷","鋲"],réng:["仍","礽","芿","辸","陾"],fó:["仏","坲","梻"],"jīn sǎn":["仐"],lún:["仑","伦","侖","倫","囵","圇","婨","崘","崙","棆","沦","淪","磮","腀","菕","蜦","踚","輪","轮","錀","陯","鯩","𬬭"],cāng:["仓","仺","倉","凔","嵢","沧","滄","濸","獊","舱","艙","苍","蒼","螥","鸧"],"zǎi zǐ zī":["仔"],tā:["他","塌","它","榙","溻","牠","祂","褟","趿","遢","闧"],fù:["付","偩","傅","冨","副","咐","坿","复","妇","婦","媍","嬔","富","復","椱","祔","禣","竎","緮","縛","缚","腹","萯","蕧","蚹","蛗","蝜","蝮","袝","複","覄","覆","訃","詂","讣","負","賦","賻","负","赋","赙","赴","輹","鍑","鍢","阜","附","馥","駙","驸","鮒","鰒","鲋","鳆","㳇"],xiān:["仙","仚","佡","僊","僲","先","嘕","奾","屳","廯","忺","憸","掀","暹","杴","氙","珗","祆","秈","籼","繊","纎","纖","苮","褼","襳","跹","蹮","躚","酰","鍁","锨","韯","韱","馦","鱻","鶱","𬸣"],"tuō chà duó":["仛"],hóng:["仜","吰","垬","妅","娂","宏","宖","弘","彋","汯","泓","洪","浤","渱","潂","玒","玜","竑","竤","篊","粠","紘","紭","綋","纮","翃","翝","耾","苰","荭","葒","葓","谹","谼","鈜","鉷","鋐","閎","闳","霐","霟","鞃","魟","鴻","鸿","黉","黌","𫟹","𬭎"],tóng:["仝","佟","哃","峂","峝","庝","彤","晍","曈","桐","氃","浵","潼","犝","獞","眮","瞳","砼","秱","童","粡","膧","茼","蚒","詷","赨","酮","鉖","鉵","銅","铜","餇","鮦","鲖","𫍣","𦒍"],rèn:["仞","仭","刃","刄","妊","姙","屻","岃","扨","牣","祍","紉","紝","絍","纫","纴","肕","腍","衽","袵","訒","認","认","讱","軔","轫","鈓","靭","靱","韌","韧","飪","餁","饪"],qiān:["仟","佥","僉","千","圲","奷","孯","岍","悭","愆","慳","扦","拪","搴","撁","攐","攑","攓","杄","櫏","汘","汧","牵","牽","竏","签","簽","籖","籤","粁","芊","茾","蚈","褰","諐","謙","谦","谸","迁","遷","釺","鈆","鉛","鏲","钎","阡","韆","顅","騫","骞","鬜","鬝","鵮","鹐"],"gǎn hàn":["仠"],"yì gē":["仡"],dài:["代","侢","叇","垈","埭","岱","帒","带","帯","帶","廗","怠","戴","曃","柋","殆","瀻","玳","瑇","甙","簤","紿","緿","绐","艜","蝳","袋","襶","貣","贷","蹛","軑","軚","軩","轪","迨","霴","靆","鴏","黛","黱"],"lìng líng lǐng":["令"],chào:["仦","耖","觘"],"cháng zhǎng":["仧","兏","長","长"],sā:["仨"],cháng:["仩","偿","償","嘗","嚐","嫦","尝","常","徜","瑺","瓺","甞","肠","腸","膓","苌","萇","镸","鱨","鲿"],yí:["仪","侇","儀","冝","匜","咦","圯","夷","姨","宐","宜","宧","寲","峓","嶬","嶷","巸","彛","彜","彝","彞","怡","恞","扅","暆","栘","椬","椸","沂","洟","熪","瓵","痍","移","簃","籎","羠","胰","萓","蛦","螔","觺","謻","貽","贻","跠","迻","遺","鏔","頉","頤","頥","顊","颐","饴","鮧","鴺"],mù:["仫","凩","募","墓","幕","幙","慔","慕","暮","暯","木","楘","毣","沐","炑","牧","狇","目","睦","穆","艒","苜","莯","蚞","鉬","钼","雮","霂"],"men mén":["们"],fǎn:["仮","反","橎","返"],"chào miǎo":["仯"],"yǎng áng":["仰"],zhòng:["仲","众","堹","妕","媑","狆","眾","祌","筗","茽","蚛","衆","衶","諥"],"pǐ pí":["仳"],wò:["仴","偓","卧","媉","幄","握","楃","沃","渥","濣","瓁","瞃","硪","肟","腛","臥","齷","龌"],jiàn:["件","俴","健","僭","剑","剣","剱","劍","劎","劒","劔","墹","寋","建","徤","擶","旔","楗","毽","洊","涧","澗","牮","珔","瞷","磵","礀","箭","糋","繝","腱","臶","舰","艦","荐","薦","覸","諓","諫","譛","谏","賎","賤","贱","趝","践","踐","踺","轞","鉴","鍳","鍵","鐱","鑑","鑒","鑬","鑳","键","間","餞","饯","𬣡"],"jià jiè jie":["价"],"yǎo fó":["仸"],"rèn rén":["任"],"fèn bīn":["份"],dī:["仾","低","啲","埞","堤","岻","彽","樀","滴","磾","秪","羝","袛","趆","隄","鞮","䃅"],fǎng:["仿","倣","旊","昉","昘","瓬","眆","紡","纺","舫","訪","访","髣","鶭"],zhōng:["伀","刣","妐","幒","彸","忠","柊","汷","泈","炂","盅","籦","終","终","舯","蔠","蜙","螤","螽","衳","衷","蹱","鈡","鍾","鐘","钟","锺","鴤","鼨"],pèi:["伂","佩","姵","帔","斾","旆","沛","浿","珮","蓜","轡","辔","配","霈","馷"],diào:["伄","吊","弔","掉","瘹","盄","窎","窵","竨","訋","釣","鈟","銱","鋽","鑃","钓","铞","雿","魡"],dùn:["伅","潡","炖","燉","盾","砘","碷","踲","逇","遁","遯","鈍","钝"],wěn:["伆","刎","吻","呅","抆","桽","稳","穏","穩","紊","肳","脗"],xǐn:["伈"],kàng:["伉","匟","囥","抗","炕","鈧","钪"],ài:["伌","僾","塧","壒","嫒","嬡","愛","懓","暧","曖","爱","瑷","璦","皧","瞹","砹","硋","碍","礙","薆","譺","賹","鑀","隘","靉","餲","馤","鱫","鴱"],"jì qí":["伎","薺"],"xiū xǔ":["休"],"jìn yín":["伒"],dǎn:["伔","刐","撢","玬","瓭","紞","胆","膽","衴","賧","赕","黕","𬘘"],fū:["伕","呋","娐","孵","尃","怤","懯","敷","旉","玞","砆","稃","筟","糐","綒","肤","膚","荂","荴","衭","趺","跗","邞","鄜","酜","鈇","麩","麬","麱","麸","𫓧"],tǎng:["伖","傥","儻","埫","戃","曭","爣","矘","躺","鎲","钂","镋"],yōu:["优","優","呦","嚘","峳","幽","忧","悠","憂","攸","櫌","滺","瀀","纋","羪","耰","逌","鄾","麀"],huǒ:["伙","夥","火","煷","邩","鈥","钬"],"huì kuài":["会","會","浍","璯"],yǔ:["伛","俁","俣","偊","傴","匬","噳","圄","圉","宇","寙","屿","嶼","庾","挧","敔","斞","楀","瑀","瘐","祤","禹","穥","窳","羽","與","萭","貐","鄅","頨","麌","齬","龉","㺄"],cuì:["伜","啛","忰","悴","毳","淬","焠","疩","瘁","竁","粋","粹","紣","綷","翆","翠","脃","脆","脺","膬","膵","臎","萃","襊","顇"],sǎn:["伞","傘","糤","繖","饊","馓"],wěi:["伟","伪","偉","偽","僞","儰","娓","寪","屗","崣","嶉","徫","愇","捤","暐","梶","洧","浘","渨","炜","煒","猥","玮","瑋","痿","緯","纬","腲","艉","芛","苇","荱","萎","葦","蒍","蔿","蜼","諉","诿","踓","鍡","韑","韙","韡","韪","頠","颹","骩","骪","骫","鮪","鲔","𫇭","𬀩","𬱟"],"chuán zhuàn":["传","傳"],"chē jū":["伡","俥","车"],"jū chē":["車"],yá:["伢","厑","厓","堐","岈","崕","崖","涯","漄","牙","玡","琊","睚","笌","芽","蚜","衙","齖"],qiàn:["伣","俔","倩","儙","刋","壍","嬱","悓","棈","椠","槧","欠","歉","皘","篏","篟","縴","芡","蒨","蔳","輤","𬘬"],shāng:["伤","傷","商","墒","慯","殇","殤","滳","漡","熵","蔏","螪","觞","觴","謪","鬺"],chāng:["伥","倀","娼","昌","椙","淐","猖","琩","菖","裮","錩","锠","閶","阊","鯧","鲳","鼚"],"chen cāng":["伧"],xùn:["伨","侚","卂","噀","巺","巽","徇","愻","殉","殾","汛","潠","狥","蕈","訊","訓","訙","训","讯","迅","迿","逊","遜","鑂","顨","馴","驯"],xìn:["伩","囟","孞","脪","舋","衅","訫","釁","阠","顖"],chǐ:["伬","侈","卶","叺","呎","垑","恥","歯","耻","肔","胣","蚇","裭","褫","豉","鉹","齒","齿"],"xián xuán":["伭"],"nú nǔ":["伮"],"bó bǎi":["伯"],"gū gù":["估"],nǐ:["伱","你","儞","孴","拟","擬","旎","晲","狔","苨","薿","隬"],"nì ní":["伲"],bàn:["伴","办","半","姅","怑","扮","瓣","秚","絆","绊","辦","鉡","靽"],xù:["伵","侐","勖","勗","卹","叙","垿","壻","婿","序","恤","敍","敘","旭","昫","朂","槒","欰","殈","汿","沀","洫","溆","漵","潊","烅","烼","煦","獝","珬","盢","瞁","稸","絮","続","緒","緖","續","绪","续","聓","聟","蓄","藚","訹","賉","酗","頊","鱮","㳚"],zhòu:["伷","僽","冑","呪","咒","咮","宙","昼","晝","甃","皱","皺","籀","籒","籕","粙","紂","縐","纣","绉","胄","荮","葤","詋","酎","駎","驟","骤","㤘","㑇"],shēn:["伸","侁","兟","呻","堔","妽","娠","屾","峷","扟","敒","曑","柛","氠","深","燊","珅","甡","甧","申","眒","砷","穼","籶","籸","糂","紳","绅","罙","罧","葠","蓡","蔘","薓","裑","訷","詵","诜","身","駪","鯓","鯵","鰺","鲹","鵢","𬳽"],qū:["伹","佉","匤","呿","坥","屈","岖","岴","嶇","憈","抾","敺","浀","煀","祛","筁","粬","胠","蛆","蛐","袪","覻","詘","诎","趍","躯","軀","阹","駆","駈","驅","驱","髷","魼","鰸","鱋","鶌","麯","麴","麹","黢","㭕","𪨰","䓛"],"sì cì":["伺"],bēng:["伻","嘣","奟","崩","嵭","閍"],"sì shì":["似"],"jiā qié gā":["伽"],"yǐ chì":["佁"],"diàn tián":["佃","钿"],"hān gàn":["佄"],mài:["佅","劢","勱","卖","唛","売","脈","衇","賣","迈","邁","霡","霢","麥","麦","鿏"],dàn:["但","僤","啖","啗","啿","噉","嚪","帎","憺","旦","柦","氮","沊","泹","淡","狚","疍","癚","禫","窞","腅","萏","蓞","蛋","蜑","觛","訑","誕","诞","贉","霮","餤","饏","駳","髧","鴠","𫢸"],bù:["佈","勏","吥","咘","埗","埠","布","廍","怖","悑","步","歨","歩","瓿","篰","荹","蔀","踄","部","郶","鈈","钚","餢"],bǐ:["佊","俾","匕","夶","妣","彼","朼","柀","比","毞","沘","疕","秕","笔","筆","粃","聛","舭","貏","鄙"],"zhāo shào":["佋"],cǐ:["佌","此","泚","皉","𫚖"],wèi:["位","卫","味","喂","墛","媦","慰","懀","未","渭","煟","熭","犚","猬","畏","緭","罻","胃","苿","菋","藯","蘶","蝟","螱","衛","衞","褽","謂","讆","讏","谓","躗","躛","軎","轊","鏏","霨","餧","餵","饖","魏","鮇","鳚"],zuǒ:["佐","左","繓"],yǎng:["佒","傟","养","坱","岟","慃","懩","攁","氧","氱","炴","痒","癢","礢","紻","蝆","軮","養","駚"],"tǐ tī":["体","體"],zhàn:["佔","偡","嶘","战","戦","戰","栈","桟","棧","湛","站","綻","绽","菚","蘸","虥","虦","譧","轏","驏"],"hé hē hè":["何"],bì:["佖","咇","哔","嗶","坒","堛","壁","奰","妼","婢","嬖","币","幣","幤","庇","庳","廦","弊","弻","弼","彃","必","怭","愊","愎","敝","斃","梐","毕","毖","毙","湢","滗","滭","潷","煏","熚","狴","獘","獙","珌","璧","畀","畢","疪","痹","痺","皕","睤","碧","筚","箅","箆","篦","篳","粊","綼","縪","繴","罼","腷","苾","荜","萆","萞","蓖","蓽","蔽","薜","蜌","袐","襅","襞","襣","觱","詖","诐","貱","贔","赑","跸","蹕","躃","躄","避","邲","鄨","鄪","鉍","鏎","鐴","铋","閇","閉","閟","闭","陛","韠","飶","饆","馝","駜","驆","髀","魓","鮅","鷝","鷩","鼊"],tuó:["佗","坨","堶","岮","槖","橐","沱","砣","砤","碢","紽","詑","跎","酡","阤","陀","陁","駝","駞","騨","驒","驝","驼","鮀","鴕","鸵","鼉","鼍","鼧","𬶍"],shé:["佘","舌","虵","蛥"],"yì dié":["佚","昳","泆","軼"],"fó fú bì bó":["佛"],"zuò zuō":["作"],gōu:["佝","沟","溝","痀","篝","簼","緱","缑","袧","褠","鈎","鉤","钩","鞲","韝"],nìng:["佞","侫","倿","寕","泞","澝","濘"],qú:["佢","劬","戵","斪","欋","欔","氍","淭","灈","爠","璖","璩","癯","磲","籧","絇","胊","臞","菃","葋","蕖","蘧","蟝","蠷","蠼","衐","衢","躣","軥","鑺","鴝","鸜","鸲","鼩"],"yōng yòng":["佣"],wǎ:["佤","咓","砙","邷"],kǎ:["佧","垰","胩","裃","鉲"],bāo:["佨","勹","包","孢","煲","笣","胞","苞","蕔","裦","褒","襃","闁","齙","龅"],"huái huí":["佪"],"gé hè":["佫"],lǎo:["佬","咾","恅","栳","狫","珯","硓","老","耂","荖","蛯","轑","銠","铑","鮱"],xiáng:["佭","庠","栙","祥","絴","翔","詳","跭"],gé:["佮","匌","呄","嗝","塥","愅","挌","搿","槅","櫊","滆","膈","臵","茖","觡","諽","輵","轕","閣","阁","隔","鞷","韐","韚","騔","骼","鮯"],yáng:["佯","劷","垟","崸","徉","扬","揚","敭","旸","昜","暘","杨","楊","洋","炀","珜","疡","瘍","眻","蛘","諹","輰","鍚","钖","阦","阳","陽","霷","颺","飏","鰑","鴹","鸉"],bǎi:["佰","捭","摆","擺","栢","百","竡","粨","襬"],fǎ:["佱","峜","法","灋","砝","鍅"],mǐng:["佲","凕","姳","慏","酩"],"èr nài":["佴"],hěn:["佷","很","狠","詪","𬣳"],huó:["佸","活"],guǐ:["佹","匦","匭","厬","垝","姽","宄","庋","庪","恑","晷","湀","癸","祪","簋","蛫","蟡","觤","詭","诡","軌","轨","陒","鬼"],quán:["佺","全","啳","埢","姾","峑","巏","拳","搼","权","楾","権","權","泉","洤","湶","牷","犈","瑔","痊","硂","筌","縓","荃","葲","蜷","蠸","觠","詮","诠","跧","踡","輇","辁","醛","銓","铨","闎","顴","颧","駩","騡","鬈","鰁","鳈","齤"],tiāo:["佻","庣","旫","祧","聎"],jiǎo:["佼","儌","孂","挢","搅","撟","撹","攪","敫","敽","敿","晈","暞","曒","灚","燞","狡","璬","皎","皦","絞","纐","绞","腳","臫","蟜","譑","賋","踋","鉸","铰","餃","饺","鱎","龣"],cì:["佽","刾","庛","朿","栨","次","絘","茦","莿","蛓","螆","賜","赐"],xíng:["侀","刑","哘","型","娙","形","洐","硎","蛵","邢","郉","鈃","鉶","銒","钘","铏","陉","陘","餳","𫰛"],tuō:["侂","咃","咜","圫","托","拕","拖","汑","脫","脱","莌","袥","託","讬","飥","饦","魠","鮵"],kǎn:["侃","偘","冚","坎","惂","砍","莰","輡","轗","顑"],zhí:["侄","値","值","埴","執","姪","嬂","戠","执","摭","植","樴","淔","漐","直","禃","絷","縶","聀","职","職","膱","蟙","跖","踯","蹠","躑","軄","釞","馽"],gāi:["侅","垓","姟","峐","晐","畡","祴","荄","該","该","豥","賅","賌","赅","陔"],lái:["來","俫","倈","崃","崍","庲","来","梾","棶","涞","淶","猍","琜","筙","箂","莱","萊","逨","郲","錸","铼","騋","鯠","鶆","麳"],kuǎ:["侉","咵","垮","銙"],gōng:["侊","公","功","匑","匔","塨","宫","宮","工","幊","弓","恭","攻","杛","碽","糼","糿","肱","觥","觵","躬","躳","髸","龔","龚","䢼"],lì:["例","俐","俪","傈","儮","儷","凓","利","力","励","勵","历","厉","厤","厯","厲","叓","吏","呖","唎","唳","嚦","囇","坜","塛","壢","娳","婯","屴","岦","悧","悷","慄","戾","搮","暦","曆","曞","朸","枥","栃","栗","栛","檪","櫔","櫪","欐","歴","歷","沥","沴","涖","溧","濿","瀝","爏","犡","猁","珕","瑮","瓅","瓑","瓥","疬","痢","癧","盭","睙","砅","砺","砾","磿","礪","礫","礰","禲","秝","立","笠","篥","粒","粝","糲","脷","苈","茘","荔","莅","莉","蒚","蒞","藶","蚸","蛎","蛠","蜧","蝷","蠇","蠣","詈","讈","赲","轢","轣","轹","酈","鉝","隶","隷","雳","靂","靋","鬁","鳨","鴗","鷅","麜","𫵷","𬍛"],yīn:["侌","凐","喑","噾","囙","因","垔","堙","姻","婣","愔","慇","栶","氤","洇","溵","濦","瘖","禋","秵","筃","絪","緸","茵","蒑","蔭","裀","諲","銦","铟","闉","阥","阴","陰","陻","隂","霒","霠","鞇","音","韾","駰","骃","齗","𬘡","𬤇","𬮱"],mǐ:["侎","孊","弭","敉","洣","渳","灖","米","粎","羋","脒","芈","葞","蔝","銤"],zhū:["侏","株","槠","橥","櫧","櫫","洙","潴","瀦","猪","珠","硃","秼","絑","茱","蕏","蛛","蝫","蠩","袾","誅","諸","诛","诸","豬","跦","邾","銖","铢","駯","鮢","鯺","鴸","鼄"],ān:["侒","偣","媕","安","峖","庵","桉","氨","盦","盫","腤","菴","萻","葊","蓭","誝","諳","谙","鞌","鞍","韽","馣","鮟","鵪","鶕","鹌","𩽾"],lù:["侓","僇","勎","勠","圥","坴","塶","娽","峍","廘","彔","录","戮","摝","椂","樚","淕","淥","渌","漉","潞","琭","璐","甪","盝","睩","硉","祿","禄","稑","穋","箓","簏","簬","簵","簶","籙","粶","蔍","蕗","虂","螰","賂","赂","趢","路","踛","蹗","輅","轆","辂","辘","逯","醁","錄","録","錴","鏴","陸","騄","騼","鯥","鴼","鵦","鵱","鷺","鹭","鹿","麓","𫘧"],móu:["侔","劺","恈","眸","蛑","謀","谋","踎","鍪","鴾","麰"],ér:["侕","儿","児","兒","峏","栭","洏","粫","而","胹","荋","袻","輀","轜","陑","隭","髵","鮞","鲕","鴯","鸸"],"dòng tǒng tóng":["侗"],chà:["侘","奼","姹","岔","汊","詫","诧"],chì:["侙","傺","勅","勑","叱","啻","彳","恜","慗","憏","懘","抶","敕","斥","杘","湁","灻","炽","烾","熾","痓","痸","瘛","翄","翅","翤","翨","腟","赤","趩","遫","鉓","雴","飭","饬","鶒","鷘"],"gòng gōng":["供","共"],zhōu:["侜","周","喌","州","徟","洲","淍","炿","烐","珘","矪","舟","謅","譸","诌","賙","赒","輈","輖","辀","週","郮","銂","霌","駲","騆","鵃","鸼"],rú:["侞","儒","嚅","如","嬬","孺","帤","曘","桇","渪","濡","筎","茹","蕠","薷","蝡","蠕","袽","襦","邚","醹","銣","铷","顬","颥","鱬","鴑","鴽"],"jiàn cún":["侟"],xiá:["侠","俠","匣","峡","峽","敮","暇","柙","炠","烚","狎","狭","狹","珨","瑕","硖","硤","碬","祫","筪","縖","翈","舝","舺","蕸","赮","轄","辖","遐","鍜","鎋","陜","陿","霞","騢","魻","鶷","黠"],lǚ:["侣","侶","儢","吕","呂","屡","屢","履","挔","捛","旅","梠","焒","祣","稆","穭","絽","縷","缕","膂","膐","褛","褸","郘","鋁","铝"],ta:["侤"],"jiǎo yáo":["侥","僥","徺"],zhēn:["侦","偵","寊","帧","帪","幀","搸","斟","桢","楨","榛","樼","殝","浈","湞","潧","澵","獉","珍","珎","瑧","甄","眞","真","砧","碪","祯","禎","禛","箴","胗","臻","葴","蒖","蓁","薽","貞","贞","轃","遉","酙","針","鉁","錱","鍼","针","鱵"],"cè zè zhāi":["侧","側"],kuài:["侩","儈","凷","哙","噲","圦","块","塊","巜","廥","快","旝","欳","狯","獪","筷","糩","脍","膾","郐","鄶","鱠","鲙"],chái:["侪","儕","喍","柴","犲","祡","豺"],nóng:["侬","儂","农","哝","噥","檂","欁","浓","濃","燶","禯","秾","穠","脓","膿","蕽","襛","譨","農","辳","醲","鬞","𬪩"],jǐn:["侭","儘","卺","厪","巹","槿","漌","瑾","紧","緊","菫","蓳","謹","谨","錦","锦","饉","馑"],"hóu hòu":["侯","矦"],jiǒng:["侰","僒","冏","囧","泂","澃","炯","烱","煚","煛","熲","燛","窘","綗","褧","迥","逈","顈","颎","䌹"],"chěng tǐng":["侱"],"zhèn zhēn":["侲","揕"],zuò:["侳","做","唑","坐","岝","岞","座","祚","糳","胙","葃","葄","蓙","袏","阼"],qīn:["侵","兓","媇","嵚","嶔","欽","衾","誛","钦","顉","駸","骎","鮼"],jú:["侷","啹","婅","局","巈","椈","橘","泦","淗","湨","焗","犑","狊","粷","菊","蘜","趜","跼","蹫","輂","郹","閰","駶","驧","鵙","鵴","鶪","鼰","鼳","䴗"],"shù dōu":["侸"],tǐng:["侹","圢","娗","挺","涏","烶","珽","脡","艇","誔","頲","颋"],shèn:["侺","愼","慎","昚","涁","渗","滲","瘆","瘮","眘","祳","肾","胂","脤","腎","蜃","蜄","鋠"],"tuì tuó":["侻"],nán:["侽","喃","娚","抩","暔","枏","柟","楠","男","畘","莮","萳","遖"],xiāo:["侾","哓","嘵","嚻","囂","婋","宯","宵","庨","彇","揱","枭","枵","梟","櫹","歊","毊","消","潇","瀟","灱","灲","烋","焇","猇","獢","痚","痟","硝","硣","窙","箫","簘","簫","綃","绡","翛","膮","萧","蕭","虈","虓","蟂","蟏","蟰","蠨","踃","逍","銷","销","霄","颵","驍","骁","髇","髐","魈","鴞","鴵","鷍","鸮"],"biàn pián":["便","緶","缏"],tuǐ:["俀","腿","蹆","骽"],xì:["係","匸","卌","呬","墍","屃","屓","屭","忥","怬","恄","椞","潝","潟","澙","熂","犔","磶","禊","細","綌","縘","细","绤","舃","舄","蕮","虩","衋","覤","赩","趇","郤","釳","阋","隙","隟","霼","餼","饩","鬩","黖"],cù:["促","媨","憱","猝","瘄","瘯","簇","縬","脨","蔟","誎","趗","踧","踿","蹙","蹴","蹵","醋","顣","鼀"],é:["俄","囮","娥","峉","峨","峩","涐","珴","皒","睋","磀","莪","訛","誐","譌","讹","迗","鈋","鋨","锇","頟","額","额","魤","鵝","鵞","鹅"],qiú:["俅","叴","唒","囚","崷","巯","巰","扏","梂","殏","毬","求","汓","泅","浗","湭","煪","犰","玌","球","璆","皳","盚","紌","絿","肍","芁","莍","虬","虯","蛷","裘","觓","觩","訄","訅","賕","赇","逎","逑","遒","酋","釚","釻","銶","頄","鮂","鯄","鰽","鼽","𨱇"],xú:["俆","徐","禑"],"guàng kuāng":["俇"],kù:["俈","喾","嚳","库","庫","廤","瘔","絝","绔","袴","裤","褲","酷"],wù:["俉","务","務","勿","卼","坞","塢","奦","婺","寤","屼","岉","嵨","忢","悞","悟","悮","戊","扤","晤","杌","溩","焐","熃","物","痦","矹","窹","粅","蘁","誤","误","鋈","阢","隖","雾","霚","霧","靰","騖","骛","鶩","鹜","鼿","齀"],jùn:["俊","儁","呁","埈","寯","峻","懏","捃","攟","晙","棞","燇","珺","畯","竣","箟","蜠","賐","郡","陖","餕","馂","駿","骏","鵔","鵕","鵘","䐃"],liáng:["俍","墚","梁","椋","樑","粮","粱","糧","良","輬","辌","𫟅"],zǔ:["俎","唨","爼","祖","組","组","詛","诅","鎺","阻","靻"],"qiào xiào":["俏"],yǒng:["俑","勇","勈","咏","埇","塎","嵱","彮","怺","恿","悀","惥","愑","愹","慂","柡","栐","永","泳","湧","甬","蛹","詠","踊","踴","鯒","鲬"],hùn:["俒","倱","圂","尡","慁","掍","溷","焝","睴","觨","諢","诨"],jìng:["俓","傹","境","妌","婙","婧","弪","弳","径","徑","敬","曔","桱","梷","浄","瀞","獍","痉","痙","竞","竟","竫","競","竸","胫","脛","莖","誩","踁","迳","逕","鏡","镜","靖","静","靜","鵛"],sàn:["俕","閐"],pěi:["俖"],sú:["俗"],xī:["俙","僖","兮","凞","卥","厀","吸","唏","唽","嘻","噏","嚱","夕","奚","嬆","嬉","屖","嵠","巇","希","徆","徯","息","悉","悕","惁","惜","昔","晞","晰","晳","曦","析","桸","榽","樨","橀","欷","氥","汐","浠","淅","渓","溪","烯","焁","焈","焟","熄","熈","熙","熹","熺","熻","燨","爔","牺","犀","犠","犧","琋","瘜","皙","睎","瞦","矽","硒","磎","礂","稀","穸","窸","粞","糦","緆","繥","羲","翕","翖","肸","肹","膝","舾","莃","菥","蒠","蜥","螅","蟋","蠵","西","觹","觽","觿","譆","谿","豀","豨","豯","貕","赥","邜","鄎","酅","醯","釸","錫","鏭","鐊","鑴","锡","隵","餏","饎","饻","鯑","鵗","鸂","鼷"],lǐ:["俚","娌","峢","峲","李","欚","浬","澧","理","礼","禮","粴","裏","裡","豊","逦","邐","醴","鋰","锂","鯉","鱧","鱱","鲤","鳢"],bǎo:["保","堢","媬","宝","寚","寳","寶","珤","緥","葆","藵","褓","賲","靌","飹","飽","饱","駂","鳵","鴇","鸨"],"yú shù yù":["俞"],"sì qí":["俟"],"xìn shēn":["信"],xiū:["俢","修","咻","庥","樇","烌","羞","脙","脩","臹","貅","銝","鎀","飍","饈","馐","髤","髹","鮴","鱃","鵂","鸺","䗛"],dì:["俤","偙","僀","埊","墑","墬","娣","帝","怟","旳","梊","焍","玓","甋","眱","睇","碲","祶","禘","第","締","缔","腣","菂","蒂","蔕","蝃","蝭","螮","諦","谛","踶","递","逓","遞","遰","鉪","𤧛","䗖"],chóu:["俦","儔","嬦","惆","愁","懤","栦","燽","畴","疇","皗","稠","筹","籌","絒","綢","绸","菗","詶","讎","讐","踌","躊","酧","酬","醻","雔","雠","雦"],zhì:["俧","偫","儨","制","劕","垁","娡","寘","帙","帜","幟","庢","庤","廌","彘","徏","徝","志","忮","懥","懫","挃","挚","掷","摯","擲","旘","晊","智","栉","桎","梽","櫍","櫛","治","洷","滍","滞","滯","潌","瀄","炙","熫","狾","猘","璏","瓆","痔","痣","礩","祑","秩","秷","稚","稺","穉","窒","紩","緻","置","翐","膣","至","致","芖","蛭","袟","袠","製","覟","觗","觯","觶","誌","豑","豒","貭","質","贄","质","贽","跱","踬","躓","輊","轾","郅","銍","鋕","鑕","铚","锧","陟","隲","雉","駤","騭","騺","驇","骘","鯯","鴙","鷙","鸷","𬃊"],"liǎ liǎng":["俩"],jiǎn:["俭","倹","儉","减","剪","堿","弿","彅","戩","戬","拣","挸","捡","揀","撿","枧","柬","梘","检","検","檢","減","湕","瀽","瑐","睑","瞼","硷","碱","礆","笕","筧","简","簡","絸","繭","翦","茧","藆","蠒","裥","襇","襉","襺","詃","謇","謭","譾","谫","趼","蹇","鐗","鬋","鰎","鹸","鹻","鹼"],huò:["俰","咟","嚯","嚿","奯","彠","惑","或","擭","旤","曤","檴","沎","湱","瀖","獲","癨","眓","矐","祸","禍","穫","窢","耯","臛","艧","获","蒦","藿","蠖","謋","貨","货","鍃","鑊","镬","雘","霍","靃","韄","㸌"],"jù jū":["俱","据","鋸","锯"],xiào:["俲","傚","効","咲","哮","啸","嘋","嘨","嘯","孝","效","斅","斆","歗","涍","熽","笑","詨","誟"],pái:["俳","徘","牌","犤","猅","簰","簲","輫"],biào:["俵","鰾","鳔"],"chù tì":["俶"],fèi:["俷","剕","厞","吠","屝","废","廃","廢","昲","曊","櫠","沸","濷","狒","癈","肺","萉","費","费","鐨","镄","陫","靅","鼣"],fèng:["俸","凤","奉","湗","焨","煈","賵","赗","鳯","鳳","鴌"],ǎn:["俺","唵","埯","揞","罯","銨","铵"],bèi:["俻","倍","偝","偹","備","僃","备","悖","惫","愂","憊","昁","梖","焙","牬","犕","狈","狽","珼","琲","碚","禙","糒","苝","蓓","蛽","褙","貝","贝","軰","輩","辈","邶","郥","鄁","鋇","鐾","钡","鞁","鞴","𬇙"],yù:["俼","儥","喅","喩","喻","域","堉","妪","嫗","寓","峪","嶎","庽","彧","御","愈","慾","戫","昱","棛","棜","棫","櫲","欎","欝","欲","毓","浴","淯","滪","潏","澦","灪","焴","煜","燏","燠","爩","狱","獄","玉","琙","瘉","癒","砡","硢","硲","礇","礖","礜","禦","秗","稢","稶","篽","籞","籲","粖","緎","罭","聿","肀","艈","芋","芌","茟","蒮","蓣","蓹","蕷","蘌","蜟","蜮","袬","裕","誉","諭","譽","谕","豫","軉","輍","逳","遇","遹","郁","醧","鈺","鋊","錥","鐭","钰","閾","阈","雤","霱","預","预","飫","饇","饫","馭","驈","驭","鬰","鬱","鬻","魊","鱊","鳿","鴥","鴧","鴪","鵒","鷸","鸒","鹆","鹬"],xīn:["俽","噺","妡","嬜","廞","心","忄","忻","惞","新","昕","杺","欣","歆","炘","盺","薪","訢","辛","邤","鈊","鋅","鑫","锌","馨","馫","䜣","𫷷"],"hǔ chí":["俿"],jiù:["倃","僦","匓","匛","匶","厩","咎","就","廄","廏","廐","慦","捄","救","旧","柩","柾","桕","欍","殧","疚","臼","舅","舊","鯦","鷲","鹫","麔","齨","㠇"],yáo:["倄","傜","嗂","垚","堯","姚","媱","尧","尭","峣","嶢","嶤","徭","揺","搖","摇","摿","暚","榣","烑","爻","猺","珧","瑤","瑶","磘","窑","窯","窰","肴","蘨","謠","謡","谣","軺","轺","遙","遥","邎","顤","颻","飖","餆","餚","鰩","鱙","鳐"],"cuì zú":["倅"],"liǎng liǎ":["倆"],wǎn:["倇","唍","婉","惋","挽","晚","晥","晩","晼","梚","椀","琬","畹","皖","盌","碗","綩","綰","绾","脘","萖","踠","輓","鋔"],zǒng:["倊","偬","傯","嵸","总","惣","捴","搃","摠","燪","総","緫","縂","總","蓗"],guān:["倌","关","官","棺","瘝","癏","窤","蒄","関","闗","關","鰥","鱞","鳏"],tiǎn:["倎","唺","忝","悿","晪","殄","淟","睓","腆","舔","覥","觍","賟","錪","餂"],mén:["們","扪","捫","璊","菛","虋","鍆","钔","門","閅","门","𫞩"],"dǎo dào":["倒"],"tán tàn":["倓","埮"],"juè jué":["倔"],chuí:["倕","垂","埀","捶","搥","桘","棰","槌","箠","腄","菙","錘","鎚","锤","陲","顀"],xìng:["倖","姓","婞","嬹","幸","性","悻","杏","涬","緈","臖","荇","莕","葕"],péng:["倗","傰","塜","塳","弸","憉","捀","朋","棚","椖","樥","硼","稝","竼","篷","纄","膨","芃","蓬","蘕","蟚","蟛","袶","輣","錋","鑝","韸","韼","騯","髼","鬅","鬔","鵬","鹏"],"tǎng cháng":["倘"],hòu:["候","厚","后","垕","堠","後","洉","茩","豞","逅","郈","鮜","鱟","鲎","鲘"],tì:["倜","剃","嚏","嚔","屉","屜","悌","悐","惕","惖","戻","掦","替","朑","歒","殢","涕","瓋","笹","籊","薙","褅","逖","逷","髰","鬀","鬄"],gàn:["倝","凎","幹","榦","檊","淦","灨","盰","紺","绀","詌","贑","赣","骭","㽏"],"liàng jìng":["倞","靓"],suī:["倠","哸","夊","滖","濉","眭","睢","芕","荽","荾","虽","雖","鞖"],"chàng chāng":["倡"],jié:["倢","偼","傑","刦","刧","刼","劫","劼","卩","卪","婕","媫","孑","岊","崨","嵥","嶻","巀","幯","截","捷","掶","擮","昅","杢","杰","桀","桝","楬","楶","榤","洁","滐","潔","狤","睫","礍","竭","節","羯","莭","蓵","蛣","蜐","蠘","蠞","蠽","衱","袺","訐","詰","誱","讦","踕","迼","鉣","鍻","镼","頡","鮚","鲒","㛃"],"kǒng kōng":["倥"],juàn:["倦","劵","奆","慻","桊","淃","狷","獧","眷","睊","睠","絭","絹","绢","罥","羂","腃","蔨","鄄","餋"],zōng:["倧","堫","宗","嵏","嵕","惾","朡","棕","椶","熧","猣","磫","緃","翪","腙","葼","蝬","豵","踨","踪","蹤","鍐","鑁","騌","騣","骔","鬃","鬉","鬷","鯮","鯼"],ní:["倪","坭","埿","尼","屔","怩","淣","猊","籾","聣","蚭","蜺","觬","貎","跜","輗","郳","鈮","铌","霓","馜","鯢","鲵","麑","齯","𫐐","𫠜"],zhuō:["倬","拙","捉","桌","梲","棁","棳","槕","涿","窧","鐯","䦃"],"wō wēi":["倭"],luǒ:["倮","剆","曪","瘰","癳","臝","蓏","蠃","裸","躶"],sōng:["倯","凇","娀","崧","嵩","庺","憽","松","枀","枩","柗","梥","檧","淞","濍","硹","菘","鬆"],lèng:["倰","堎","愣","睖","踜"],zì:["倳","剚","字","恣","渍","漬","牸","眥","眦","胔","胾","自","茡","荢"],bèn:["倴","坌","捹","撪","渀","笨","逩"],cǎi:["倸","啋","婇","彩","採","棌","毝","睬","綵","跴","踩"],zhài:["债","債","寨","瘵","砦"],yē:["倻","吔","噎","擨","暍","椰","歋","潱","蠮"],shà:["倽","唼","喢","歃","箑","翜","翣","萐","閯","霎"],qīng:["倾","傾","卿","圊","寈","氢","氫","淸","清","蜻","軽","輕","轻","郬","錆","鑋","靑","青","鯖"],yīng:["偀","嘤","噟","嚶","婴","媖","嫈","嬰","孆","孾","愥","撄","攖","朠","桜","樱","櫻","渶","煐","珱","瑛","璎","瓔","甇","甖","碤","礯","緓","纓","绬","缨","罂","罃","罌","膺","英","莺","蘡","蝧","蠳","褮","譻","賏","軈","鑍","锳","霙","韺","鴬","鶑","鶧","鶯","鷪","鷹","鸎","鸚","鹦","鹰","䓨"],"chēng chèn":["偁","爯"],ruǎn:["偄","朊","瑌","瓀","碝","礝","腝","軟","輭","软","阮"],"zhòng tóng":["偅"],chǔn:["偆","惷","睶","萶","蠢","賰"],"jiǎ jià":["假"],"jì jié":["偈"],"bǐng bìng":["偋"],ruò:["偌","叒","嵶","弱","楉","焫","爇","箬","篛","蒻","鄀","鰙","鰯","鶸"],tí:["偍","厗","啼","嗁","崹","漽","瑅","睼","禵","稊","緹","缇","罤","蕛","褆","謕","趧","蹄","蹏","醍","鍗","題","题","騠","鮷","鯷","鳀","鵜","鷤","鹈","𫘨"],wēi:["偎","危","喴","威","媙","嶶","巍","微","愄","揋","揻","椳","楲","溦","烓","煨","燰","癓","縅","葨","葳","薇","蜲","蝛","覣","詴","逶","隇","隈","霺","鰃","鰄","鳂"],piān:["偏","囨","媥","楄","犏","篇","翩","鍂"],yàn:["偐","厌","厭","唁","喭","嚈","嚥","堰","妟","姲","嬊","嬿","宴","彥","彦","敥","晏","暥","曕","曣","滟","灎","灔","灧","灩","焔","焰","焱","熖","燄","牪","猒","砚","硯","艳","艶","艷","覎","觃","觾","諺","讌","讞","谚","谳","豓","豔","贋","贗","赝","軅","酀","酽","醼","釅","雁","餍","饜","騐","験","騴","驗","驠","验","鬳","鳫","鴈","鴳","鷃","鷰","齞"],"tǎng dàng":["偒"],è:["偔","匎","卾","厄","呝","咢","噩","垩","堊","堮","岋","崿","廅","悪","愕","戹","扼","搤","搹","擜","櫮","歞","歺","湂","琧","砈","砐","硆","腭","苊","萼","蕚","蚅","蝁","覨","諤","讍","谔","豟","軛","軶","轭","遌","遏","遻","鄂","鈪","鍔","鑩","锷","阨","阸","頞","顎","颚","餓","餩","饿","鰐","鰪","鱷","鳄","鶚","鹗","齃","齶","𫫇","𥔲"],xié:["偕","勰","协","協","嗋","垥","奊","恊","愶","拹","携","撷","擕","擷","攜","斜","旪","熁","燲","綊","緳","縀","缬","翓","胁","脅","脇","脋","膎","蝢","衺","襭","諧","讗","谐","鞋","鞵","龤","㙦"],chě:["偖","扯","撦"],shěng:["偗","渻","眚"],chā:["偛","嗏","扠","挿","插","揷","疀","臿","艖","銟","鍤","锸","餷"],huáng:["偟","凰","喤","堭","墴","媓","崲","徨","惶","楻","湟","煌","獚","瑝","璜","癀","皇","磺","穔","篁","簧","艎","葟","蝗","蟥","諻","趪","遑","鍠","鐄","锽","隍","韹","餭","騜","鰉","鱑","鳇","鷬","黃","黄","𨱑"],yǎo:["偠","咬","婹","宎","岆","杳","柼","榚","溔","狕","窅","窈","舀","苭","闄","騕","鷕","齩"],"chǒu qiào":["偢"],yóu:["偤","尤","庮","怣","沋","油","浟","游","犹","猶","猷","由","疣","秞","肬","莜","莸","蕕","蚰","蝣","訧","輏","輶","逰","遊","邮","郵","鈾","铀","駀","魷","鮋","鱿","鲉","𬨎"],xū:["偦","墟","媭","嬃","楈","欨","歔","燸","疞","盱","綇","縃","繻","胥","蕦","虗","虚","虛","蝑","裇","訏","許","諝","譃","谞","鑐","需","須","须","顼","驉","鬚","魆","魖","𬣙","𦈡"],zhā:["偧","哳","抯","挓","揸","摣","樝","渣","皶","觰","譇","齄","齇"],cī:["偨","疵","蠀","趀","骴","髊","齹"],bī:["偪","屄","楅","毴","豍","逼","鰏","鲾","鵖"],xún:["偱","噚","寻","尋","峋","巡","廵","循","恂","揗","攳","旬","杊","栒","桪","樳","洵","浔","潯","燅","燖","珣","璕","畃","紃","荀","蟳","詢","询","鄩","鱏","鱘","鲟","𬘓","𬩽","𬍤","𬊈"],"cāi sī":["偲"],duān:["偳","媏","端","褍","鍴"],ǒu:["偶","吘","嘔","耦","腢","蕅","藕","𬉼","𠙶"],tōu:["偷","偸","鍮"],"zán zá zǎ":["偺"],"lǚ lóu":["偻","僂"],fèn:["偾","僨","奋","奮","弅","忿","愤","憤","瀵","瞓","秎","粪","糞","膹","鱝","鲼"],"kuǐ guī":["傀"],sǒu:["傁","叜","叟","嗾","櫢","瞍","薮","藪"],"zhì sī tí":["傂"],sù:["傃","僳","嗉","塐","塑","夙","嫊","愫","憟","榡","樎","樕","殐","泝","涑","溯","溸","潚","潥","玊","珟","璛","簌","粛","粟","素","縤","肃","肅","膆","蔌","藗","觫","訴","謖","诉","谡","趚","蹜","速","遡","遬","鋉","餗","驌","骕","鱐","鷫","鹔","𫗧"],xiā:["傄","煆","瞎","虲","谺","颬","鰕"],"yuàn yuán":["傆","媛"],rǒng:["傇","冗","宂","氄","軵"],nù:["傉","怒"],yùn:["傊","孕","恽","惲","愠","慍","枟","腪","蕴","薀","藴","蘊","褞","貟","运","運","郓","鄆","酝","醖","醞","韗","韞","韵","韻","餫"],"gòu jiǎng":["傋"],mà:["傌","嘜","榪","睰","祃","禡","罵","閁","駡","骂","鬕"],bàng:["傍","塝","棒","玤","稖","艕","蒡","蜯","謗","谤","鎊","镑"],diān:["傎","厧","嵮","巅","巓","巔","掂","攧","敁","槇","滇","癫","癲","蹎","顚","顛","颠","齻"],táng:["傏","唐","啺","坣","堂","塘","搪","棠","榶","溏","漟","煻","瑭","磄","禟","篖","糃","糖","糛","膅","膛","蓎","螗","螳","赯","踼","鄌","醣","鎕","隚","餹","饄","鶶","䣘"],hào:["傐","哠","恏","昊","昦","晧","暠","暤","暭","曍","浩","淏","澔","灏","灝","皓","皜","皞","皡","皥","耗","聕","薃","號","鄗","顥","颢","鰝"],"xī xì":["傒"],shān:["傓","删","刪","剼","圸","山","挻","搧","柵","檆","潸","澘","煽","狦","珊","笘","縿","羴","羶","脠","舢","芟","衫","跚","軕","邖","閊","鯅"],"qiàn jiān":["傔"],"què jué":["傕","埆"],"cāng chen":["傖"],róng:["傛","媶","嫆","嬫","容","峵","嵘","嶸","戎","搈","曧","栄","榕","榮","榵","毧","溶","瀜","烿","熔","狨","瑢","穁","絨","绒","羢","肜","茙","茸","荣","蓉","蝾","融","螎","蠑","褣","鎔","镕","駥"],"tà tàn":["傝"],suō:["傞","唆","嗍","嗦","娑","摍","桫","梭","睃","簑","簔","羧","莏","蓑","趖","鮻"],dǎi:["傣","歹"],zài:["傤","儎","再","在","扗","洅","載","酨"],gǔ:["傦","古","啒","尳","愲","榖","榾","汩","淈","濲","瀔","牯","皷","皼","盬","瞽","穀","罟","羖","股","脵","臌","薣","蛊","蠱","詁","诂","轂","逧","鈷","钴","餶","馉","鼓","鼔","𦙶"],bīn:["傧","宾","彬","斌","椕","滨","濒","濱","濵","瀕","繽","缤","虨","豩","豳","賓","賔","邠","鑌","镔","霦","顮"],chǔ:["储","儲","杵","椘","楚","楮","檚","濋","璴","础","礎","禇","處","齭","齼","𬺓"],nuó:["傩","儺","挪","梛","橠"],"cān càn":["傪"],lěi:["傫","儡","厽","垒","塁","壘","壨","櫐","灅","癗","矋","磊","礨","耒","蕌","蕾","藟","蘽","蠝","誄","讄","诔","鑸","鸓"],cuī:["催","凗","墔","崔","嵟","慛","摧","榱","獕","磪","鏙"],yōng:["傭","嗈","墉","壅","嫞","庸","廱","慵","拥","擁","滽","灉","牅","痈","癕","癰","臃","邕","郺","鄘","鏞","镛","雍","雝","饔","鱅","鳙","鷛"],"zāo cáo":["傮"],sǒng:["傱","嵷","怂","悚","愯","慫","竦","耸","聳","駷","㧐"],ào:["傲","坳","垇","墺","奡","嫯","岙","岰","嶴","懊","擙","澳","鏊","驁","骜"],"qī còu":["傶"],chuǎng:["傸","磢","闖","闯"],shǎ:["傻","儍"],hàn:["傼","垾","悍","憾","扞","捍","撖","撼","旱","晘","暵","汉","涆","漢","瀚","焊","猂","皔","睅","翰","莟","菡","蛿","蜭","螒","譀","輚","釬","銲","鋎","雗","頷","顄","颔","駻","鶾"],zhāng:["傽","嫜","张","張","彰","慞","暲","樟","漳","獐","璋","章","粻","蔁","蟑","遧","鄣","鏱","餦","騿","鱆","麞"],"yān yàn":["傿","墕","嬮"],"piào biāo":["僄","骠"],liàn:["僆","堜","媡","恋","戀","楝","殓","殮","湅","潋","澰","瀲","炼","煉","瑓","練","纞","练","萰","錬","鍊","鏈","链","鰊","𬶠"],màn:["㵘","僈","墁","幔","慢","曼","漫","澷","熳","獌","縵","缦","蔄","蘰","鄤","鏝","镘","𬜬"],"tàn tǎn":["僋"],yíng:["僌","営","塋","嬴","攍","楹","櫿","溁","溋","滢","潆","濙","濚","濴","瀅","瀛","瀠","瀯","灐","灜","熒","營","瑩","盁","盈","禜","籝","籯","縈","茔","荧","莹","萤","营","萦","萾","蓥","藀","蛍","蝇","蝿","螢","蠅","謍","贏","赢","迎","鎣"],dòng:["働","冻","凍","动","動","姛","戙","挏","栋","棟","湩","硐","胨","胴","腖","迵","霘","駧"],zhuàn:["僎","啭","囀","堟","撰","灷","瑑","篆","腞","蒃","襈","譔","饌","馔"],xiàng:["像","勨","向","嚮","姠","嶑","曏","橡","珦","缿","蟓","衖","襐","象","鐌","項","项","鱌"],shàn:["僐","善","墠","墡","嬗","擅","敾","椫","樿","歚","汕","灗","疝","磰","繕","缮","膳","蟮","蟺","訕","謆","譱","讪","贍","赡","赸","鄯","鐥","饍","騸","骟","鱓","鱔","鳝","𫮃"],"tuí tuǐ":["僓"],zǔn:["僔","噂","撙","譐"],pú:["僕","匍","圤","墣","濮","獛","璞","瞨","穙","莆","菐","菩","葡","蒱","蒲","贌","酺","鏷","镤"],láo:["僗","劳","労","勞","哰","崂","嶗","憥","朥","浶","牢","痨","癆","窂","簩","醪","鐒","铹","顟","髝","𫭼"],chǎng:["僘","厰","廠","敞","昶","氅","鋹","𬬮"],guāng:["僙","光","咣","垙","姯","洸","灮","炗","炚","炛","烡","珖","胱","茪","輄","銧","黆","𨐈"],liáo:["僚","嘹","嫽","寥","寮","尞","屪","嵺","嶚","嶛","廫","憀","敹","暸","橑","獠","璙","疗","療","竂","簝","繚","缭","聊","膋","膫","藔","蟟","豂","賿","蹘","辽","遼","飉","髎","鷯","鹩"],dèng:["僜","凳","墱","嶝","櫈","瞪","磴","覴","邓","鄧","隥"],"chán zhàn zhuàn":["僝"],bō:["僠","嶓","拨","撥","播","波","溊","玻","癶","盋","砵","碆","礡","缽","菠","袰","蹳","鉢","钵","餑","饽","驋","鱍","𬭛"],huì:["僡","匯","卉","喙","嘒","嚖","圚","嬒","寭","屶","屷","彗","彙","彚","徻","恚","恵","惠","慧","憓","懳","晦","暳","槥","橞","檅","櫘","汇","泋","滙","潓","烩","燴","獩","璤","瞺","硊","秽","穢","篲","絵","繪","绘","翙","翽","荟","蔧","蕙","薈","薉","蟪","詯","誨","諱","譓","譿","讳","诲","賄","贿","鐬","闠","阓","靧","頮","顪","颒","餯","𬤝","𬭬"],chuǎn:["僢","喘","舛","荈","踳"],"tiě jiàn":["僣"],sēng:["僧","鬙"],xiàn:["僩","僴","哯","垷","塪","姭","娊","宪","岘","峴","憲","撊","晛","橌","橺","涀","瀗","献","獻","现","現","県","睍","粯","糮","絤","綫","線","线","缐","羡","羨","腺","臔","臽","苋","莧","誢","豏","鋧","錎","限","陥","陷","霰","餡","馅","麲","鼸","𬀪","𪾢"],"yù jú":["僪"],"è wū":["僫"],"tóng zhuàng":["僮"],lǐn:["僯","凛","凜","廩","廪","懍","懔","撛","檁","檩","澟","癛","癝"],gù:["僱","凅","固","堌","崓","崮","故","梏","棝","牿","痼","祻","錮","锢","雇","顧","顾","鯝","鲴"],jiāng:["僵","壃","姜","橿","殭","江","畕","疅","礓","繮","缰","翞","茳","葁","薑","螀","螿","豇","韁","鱂","鳉"],mǐn:["僶","冺","刡","勄","悯","惽","愍","慜","憫","抿","敃","敏","敯","泯","潣","皿","笢","笽","簢","蠠","閔","閩","闵","闽","鰵","鳘","黽"],jìn:["僸","凚","噤","嚍","墐","壗","妗","嬧","搢","晉","晋","枃","殣","浕","浸","溍","濅","濜","烬","煡","燼","琎","瑨","璶","盡","祲","縉","缙","荩","藎","覲","觐","賮","贐","赆","近","进","進","靳","齽"],"jià jie":["價"],qiào:["僺","峭","帩","撬","殻","窍","竅","誚","诮","躈","陗","鞩","韒","髚"],pì:["僻","媲","嫓","屁","澼","甓","疈","譬","闢","鷿","鸊","䴙"],sài:["僿","簺","賽","赛"],"chán tǎn shàn":["儃"],"dāng dàng":["儅","当","闣"],xuān:["儇","喧","塇","媗","宣","愃","愋","揎","昍","暄","煊","煖","瑄","睻","矎","禤","箮","翧","翾","萱","萲","蓒","蕿","藼","蘐","蝖","蠉","諠","諼","譞","谖","軒","轩","鍹","駽","鰚","𫓶","𫍽"],"dān dàn":["儋","擔","瘅"],càn:["儏","澯","灿","燦","璨","粲","薒","謲"],"bīn bìn":["儐"],"án àn":["儑"],tái:["儓","坮","嬯","抬","擡","檯","炱","炲","籉","臺","薹","跆","邰","颱","鮐","鲐"],lán:["儖","兰","囒","婪","岚","嵐","幱","拦","攔","斓","斕","栏","欄","欗","澜","瀾","灆","灡","燣","燷","璼","篮","籃","籣","繿","葻","蓝","藍","蘫","蘭","褴","襕","襤","襴","襽","譋","讕","谰","躝","鑭","镧","闌","阑","韊","𬒗"],"nǐ yì ài yí":["儗"],méng:["儚","幪","曚","朦","橗","檬","氋","溕","濛","甍","甿","盟","礞","艨","莔","萌","蕄","虻","蝱","鄳","鄸","霿","靀","顭","饛","鯍","鸏","鹲","𫑡","㠓"],níng:["儜","凝","咛","嚀","嬣","柠","橣","檸","狞","獰","聍","聹","薴","鑏","鬡","鸋"],qióng:["儝","卭","宆","惸","憌","桏","橩","焪","焭","煢","熍","琼","瓊","睘","穷","穹","窮","竆","笻","筇","舼","茕","藑","藭","蛩","蛬","赹","跫","邛","銎","䓖"],liè:["儠","冽","列","劣","劽","埒","埓","姴","峛","巤","挒","捩","栵","洌","浖","烈","烮","煭","犣","猎","猟","獵","聗","脟","茢","蛚","趔","躐","迾","颲","鬛","鬣","鮤","鱲","鴷","䴕","𫚭"],kuǎng:["儣","夼","懭"],bào:["儤","勽","報","忁","报","抱","曓","爆","犦","菢","虣","蚫","豹","鉋","鑤","铇","骲","髱","鮑","鲍"],biāo:["儦","墂","幖","彪","标","標","滮","瀌","熛","爂","猋","瘭","磦","膘","臕","謤","贆","鏢","鑣","镖","镳","颮","颷","飆","飇","飈","飊","飑","飙","飚","驫","骉","髟"],zǎn:["儧","儹","噆","攅","昝","趱","趲"],háo:["儫","嗥","嘷","噑","嚎","壕","椃","毜","毫","濠","獆","獔","竓","籇","蚝","蠔","譹","豪"],qìng:["儬","凊","庆","慶","櫦","濪","碃","磬","罄","靘"],chèn:["儭","嚫","榇","櫬","疢","衬","襯","讖","谶","趁","趂","齓","齔","龀"],téng:["儯","幐","滕","漛","疼","籐","籘","縢","腾","藤","虅","螣","誊","謄","邆","駦","騰","驣","鰧","䲢"],"lǒng lóng lòng":["儱"],"chán chàn":["儳"],"ráng xiāng":["儴","勷"],"huì xié":["儶"],luó:["儸","攞","椤","欏","猡","玀","箩","籮","罗","羅","脶","腡","萝","蘿","螺","覼","逻","邏","鏍","鑼","锣","镙","饠","騾","驘","骡","鸁"],léi:["儽","嫘","檑","欙","瓃","畾","縲","纍","纝","缧","罍","羸","蔂","蘲","虆","轠","鐳","鑘","镭","雷","靁","鱩","鼺"],"nàng nāng":["儾"],"wù wū":["兀"],yǔn:["允","喗","夽","抎","殒","殞","狁","磒","荺","賱","鈗","阭","陨","隕","霣","馻","齫","齳"],zān:["兂","橵","簪","簮","糌","鐕","鐟","鵤"],yuán:["元","円","原","厡","厵","园","圆","圎","園","圓","垣","塬","媴","嫄","援","榞","榬","橼","櫞","沅","湲","源","溒","爰","猨","猿","笎","緣","縁","缘","羱","茒","薗","蝝","蝯","螈","袁","褤","謜","轅","辕","邍","邧","酛","鈨","鎱","騵","魭","鶢","鶰","黿","鼋","𫘪"],xiōng:["兄","兇","凶","匂","匈","哅","忷","恟","汹","洶","胷","胸","芎","訩","詾","讻"],chōng:["充","嘃","忡","憃","憧","摏","沖","浺","珫","罿","翀","舂","艟","茺","衝","蹖","㳘"],zhào:["兆","垗","旐","曌","枛","櫂","照","燳","狣","瞾","笊","罀","罩","羄","肁","肇","肈","詔","诏","赵","趙","鮡","𬶐"],"duì ruì yuè":["兊","兌","兑"],kè:["克","刻","勀","勊","堁","娔","客","恪","愙","氪","溘","碦","緙","缂","艐","衉","課","课","錁","锞","騍","骒"],tù:["兎","兔","堍","迌","鵵"],dǎng:["党","攩","欓","譡","讜","谠","黨","𣗋"],dōu:["兜","兠","唗","橷","篼","蔸"],huǎng:["兤","奛","幌","怳","恍","晄","炾","熀","縨","詤","謊","谎"],rù:["入","嗕","媷","扖","杁","洳","溽","縟","缛","蓐","褥","鳰"],nèi:["內","氝","氞","錗"],"yú shù":["兪"],"liù lù":["六"],han:["兯","爳"],tiān:["兲","天","婖","添","酟","靔","靝","黇"],"xīng xìng":["兴"],diǎn:["典","嚸","奌","婰","敟","椣","点","碘","蒧","蕇","踮","點"],"zī cí":["兹"],jiān:["兼","冿","囏","坚","堅","奸","姦","姧","尖","幵","惤","戋","戔","搛","椾","樫","櫼","歼","殱","殲","湔","瀐","瀸","煎","熞","熸","牋","瑊","睷","礛","礷","笺","箋","緘","縑","缄","缣","肩","艰","艱","菅","菺","葌","蒹","蔪","蕑","蕳","虃","譼","豜","鑯","雃","鞯","韀","韉","餰","馢","鰔","鰜","鰹","鲣","鳒","鵑","鵳","鶼","鹣","麉"],shòu:["兽","受","售","壽","夀","寿","授","狩","獣","獸","痩","瘦","綬","绶","膄"],jì:["兾","冀","剂","剤","劑","勣","坖","垍","塈","妓","季","寂","寄","廭","彑","徛","忌","悸","惎","懻","技","旡","既","旣","暨","暩","曁","梞","檕","檵","洎","漃","漈","瀱","痵","癠","禝","稩","稷","穄","穊","穧","紀","継","績","繋","繼","继","绩","罽","臮","芰","茍","茤","葪","蓟","蔇","薊","蘎","蘮","蘻","裚","襀","覬","觊","計","記","誋","计","记","跡","跽","蹟","迹","际","際","霁","霽","驥","骥","髻","鬾","魝","魥","鯚","鯽","鰶","鰿","鱀","鱭","鲚","鲫","鵋","鷑","齌","𪟝","𬶨","𬶭"],jiōng:["冂","冋","坰","埛","扃","蘏","蘔","駉","駫","𬳶"],mào:["冃","冐","媢","帽","愗","懋","暓","柕","楙","毷","瑁","皃","眊","瞀","耄","茂","萺","蝐","袤","覒","貌","貿","贸","鄚","鄮"],rǎn:["冄","冉","姌","媣","染","珃","苒","蒅","䎃"],"nèi nà":["内"],gāng:["冈","冮","刚","剛","堈","堽","岡","掆","摃","棡","牨","犅","疘","綱","纲","缸","罁","罡","肛","釭","鎠","㭎"],cè:["冊","册","厕","厠","夨","廁","恻","惻","憡","敇","测","測","笧","策","筞","筴","箣","荝","萗","萴","蓛"],guǎ:["冎","剐","剮","叧","寡"],"mào mò":["冒"],gòu:["冓","啂","坸","垢","够","夠","媾","彀","搆","撀","构","構","煹","覯","觏","訽","詬","诟","購","购","遘","雊"],xǔ:["冔","喣","暊","栩","珝","盨","糈","詡","諿","诩","鄦","醑"],mì:["冖","冪","嘧","塓","宻","密","峚","幂","幎","幦","怽","榓","樒","櫁","汨","淧","滵","漞","濗","熐","羃","蔤","蜜","覓","覔","覛","觅","謐","谧","鼏"],"yóu yín":["冘"],xiě:["写","冩","藛"],jūn:["军","君","均","桾","汮","皲","皸","皹","碅","莙","蚐","袀","覠","軍","鈞","銁","銞","鍕","钧","頵","鮶","鲪","麏"],mí:["冞","擟","瀰","爢","猕","獼","祢","禰","縻","蒾","藌","蘪","蘼","袮","詸","謎","迷","醚","醾","醿","釄","镾","鸍","麊","麋","麛"],"guān guàn":["冠","覌","観","觀","观"],měng:["冡","勐","懵","掹","猛","獴","艋","蜢","蠓","錳","锰","鯭","鼆"],zhǒng:["冢","塚","尰","歱","煄","瘇","肿","腫","踵"],zuì:["冣","嶵","晬","最","栬","槜","檇","檌","祽","絊","罪","蕞","辠","酔","酻","醉","錊"],yuān:["冤","剈","囦","嬽","寃","棩","淵","渁","渆","渊","渕","灁","眢","肙","葾","蒬","蜎","蜵","駌","鳶","鴛","鵷","鸢","鸳","鹓","鼘","鼝"],míng:["冥","名","明","暝","朙","榠","洺","溟","猽","眀","眳","瞑","茗","螟","覭","詺","鄍","銘","铭","鳴","鸣"],kòu:["冦","叩","宼","寇","扣","敂","滱","窛","筘","簆","蔲","蔻","釦","鷇"],tài:["冭","太","夳","忲","态","態","汰","汱","泰","溙","肽","舦","酞","鈦","钛"],"féng píng":["冯","馮"],"chōng chòng":["冲"],kuàng:["况","圹","壙","岲","懬","旷","昿","曠","框","況","爌","眖","眶","矿","砿","礦","穬","絋","絖","纊","纩","貺","贶","軦","邝","鄺","鉱","鋛","鑛","黋"],lěng:["冷"],pàn:["冸","判","叛","沜","泮","溿","炍","牉","畔","盼","聁","袢","襻","詊","鋬","鑻","頖","鵥"],fā:["冹","彂","沷","発","發"],xiǎn:["冼","尟","尠","崄","嶮","幰","攇","显","櫶","毨","灦","烍","燹","狝","猃","獫","獮","玁","禒","筅","箲","藓","蘚","蚬","蜆","譣","赻","跣","鍌","险","険","險","韅","顕","顯","㬎"],qià:["冾","圶","帢","恰","殎","洽","硈","胢","髂"],"jìng chēng":["净","凈","淨"],sōu:["凁","嗖","廀","廋","捜","搜","摉","溲","獀","艘","蒐","螋","鄋","醙","鎪","锼","颼","飕","餿","馊","騪"],měi:["凂","媄","媺","嬍","嵄","挴","毎","每","浼","渼","燘","美","躾","鎂","镁","黣"],tú:["凃","図","图","圖","圗","塗","屠","峹","嵞","庩","廜","徒","悇","揬","涂","瘏","筡","腯","荼","蒤","跿","途","酴","鈯","鍎","馟","駼","鵌","鶟","鷋","鷵","𬳿"],zhǔn:["准","凖","埻","準","𬘯"],"liáng liàng":["凉","涼","量"],diāo:["凋","刁","刟","叼","奝","弴","彫","汈","琱","碉","簓","虭","蛁","貂","錭","雕","鮉","鯛","鲷","鵰","鼦"],còu:["凑","湊","腠","輳","辏"],ái:["凒","啀","嘊","捱","溰","癌","皑","皚"],duó:["凙","剫","夺","奪","痥","踱","鈬","鐸","铎"],dú:["凟","匵","嬻","椟","櫝","殰","涜","牍","牘","犊","犢","独","獨","瓄","皾","裻","読","讀","讟","豄","贕","錖","鑟","韇","韣","韥","騳","髑","黩","黷"],"jǐ jī":["几"],fán:["凡","凢","凣","匥","墦","杋","柉","棥","樊","瀿","烦","煩","燔","璠","矾","礬","笲","籵","緐","羳","舤","舧","薠","蘩","蠜","襎","蹯","釩","鐇","鐢","钒","鷭","𫔍","𬸪"],jū:["凥","匊","娵","婮","居","崌","抅","挶","掬","梮","椐","檋","毩","毱","泃","涺","狙","琚","疽","砠","罝","腒","艍","蜛","裾","諊","跔","踘","躹","陱","雎","鞠","鞫","駒","驹","鮈","鴡","鶋","𬶋"],"chù chǔ":["処","处"],zhǐ:["凪","劧","咫","址","坧","帋","恉","扺","指","旨","枳","止","汦","沚","洔","淽","疻","砋","祉","秖","紙","纸","芷","藢","衹","襧","訨","趾","軹","轵","酯","阯","黹"],píng:["凭","凴","呯","坪","塀","岼","帡","帲","幈","平","慿","憑","枰","洴","焩","玶","瓶","甁","竮","箳","簈","缾","荓","萍","蓱","蚲","蛢","評","评","軿","輧","郱","鮃","鲆"],kǎi:["凯","凱","剀","剴","垲","塏","恺","愷","慨","暟","蒈","輆","鍇","鎧","铠","锴","闓","闿","颽"],gān:["凲","坩","尲","尴","尶","尷","柑","泔","漧","玕","甘","疳","矸","竿","筸","粓","肝","苷","迀","酐","魐"],"kǎn qiǎn":["凵"],tū:["凸","堗","嶀","捸","涋","湥","痜","禿","秃","突","葖","鋵","鵚","鼵","㻬"],"āo wā":["凹"],chū:["出","初","岀","摴","榋","樗","貙","齣","䢺","䝙"],dàng:["凼","圵","垱","壋","档","檔","氹","璗","瓽","盪","瞊","砀","碭","礑","簜","荡","菪","蕩","蘯","趤","逿","雼","𬍡"],hán:["函","凾","含","圅","娢","寒","崡","晗","梒","浛","涵","澏","焓","琀","甝","筨","蜬","邗","邯","鋡","韓","韩"],záo:["凿","鑿"],dāo:["刀","刂","忉","氘","舠","螩","釖","魛","鱽"],chuāng:["刅","摐","牎","牕","疮","瘡","窓","窗","窻"],"fēn fèn":["分"],"qiè qiē":["切"],kān:["刊","勘","堪","戡","栞","龕","龛"],cǔn:["刌","忖"],chú:["刍","厨","幮","廚","橱","櫉","櫥","滁","犓","篨","耡","芻","蒢","蒭","蜍","蟵","豠","趎","蹰","躇","躕","鉏","鋤","锄","除","雏","雛","鶵"],"huà huá":["划"],lí:["刕","剓","剺","劙","厘","喱","嚟","囄","嫠","孷","廲","悡","梨","梸","棃","漓","灕","犁","犂","狸","琍","璃","瓈","盠","睝","离","穲","竰","筣","篱","籬","糎","縭","缡","罹","艃","荲","菞","蓠","蔾","藜","蘺","蜊","蟍","蟸","蠫","褵","謧","貍","醨","鋫","錅","鏫","鑗","離","驪","骊","鯏","鯬","鱺","鲡","鵹","鸝","鹂","黎","黧","㰀"],yuè:["刖","嬳","岄","岳","嶽","恱","悅","悦","戉","抈","捳","月","樾","瀹","爚","玥","礿","禴","篗","籆","籥","籰","粤","粵","蘥","蚎","蚏","説","越","跀","跃","躍","軏","鈅","鉞","鑰","钺","閱","閲","阅","鸑","鸙","黦","龠","𫐄","𬸚"],liú:["刘","劉","嚠","媹","嵧","旈","旒","榴","橊","流","浏","瀏","琉","瑠","瑬","璢","畄","留","畱","疁","瘤","癅","硫","蒥","蓅","蟉","裗","鎏","鏐","鐂","镠","飀","飅","飗","駠","駵","騮","驑","骝","鰡","鶹","鹠","麍"],zé:["则","則","啧","嘖","嫧","帻","幘","択","樍","歵","沢","泎","溭","皟","瞔","矠","礋","箦","簀","舴","蔶","蠌","襗","謮","賾","赜","迮","鸅","齚","齰"],"chuàng chuāng":["创","創"],qù:["刞","厺","去","閴","闃","阒","麮","鼁"],"bié biè":["別","别"],"páo bào":["刨"],"chǎn chàn":["刬","剗","幝"],guā:["刮","劀","桰","歄","煱","瓜","胍","踻","颪","颳","騧","鴰","鸹"],gēng:["刯","庚","椩","浭","焿","畊","絚","羮","羹","耕","菮","賡","赓","鶊","鹒"],dào:["到","噵","悼","椡","檤","燾","瓙","盗","盜","稲","稻","纛","翿","艔","菿","衜","衟","軇","道"],chuàng:["刱","剏","剙","怆","愴"],kū:["刳","哭","圐","堀","枯","桍","矻","窟","跍","郀","骷","鮬"],duò:["刴","剁","墯","尮","惰","憜","挅","桗","舵","跥","跺","陊","陏","飿","饳","鵽"],"shuā shuà":["刷"],"quàn xuàn":["券"],"chà shā":["刹","剎"],"cì cī":["刺"],guì:["刽","刿","劊","劌","撌","攰","昋","桂","椢","槶","樻","櫃","猤","禬","筀","蓕","襘","貴","贵","跪","鐀","鑎","鞼","鱖","鱥"],lóu:["剅","娄","婁","廔","楼","樓","溇","漊","熡","耧","耬","艛","蒌","蔞","蝼","螻","謱","軁","遱","鞻","髅","髏","𪣻"],cuò:["剉","剒","厝","夎","挫","措","棤","莝","莡","蓌","逪","銼","錯","锉","错"],"xiāo xuē":["削"],"kēi kè":["剋","尅"],"là lá":["剌"],tī:["剔","梯","踢","銻","锑","鷈","鷉","䏲","䴘"],pōu:["剖"],wān:["剜","塆","壪","帵","弯","彎","湾","潫","灣","睕","蜿","豌"],"bāo bō":["剝","剥"],duō:["剟","咄","哆","嚉","多","夛","掇","毲","畓","裰","㙍"],qíng:["剠","勍","夝","情","擎","晴","暒","棾","樈","檠","氰","甠","硘","葝","黥"],"yǎn shàn":["剡"],"dū zhuó":["剢"],yān:["剦","嫣","崦","嶖","恹","懕","懨","樮","淊","淹","漹","烟","焉","焑","煙","珚","篶","胭","臙","菸","鄢","醃","閹","阉","黫"],huō:["剨","劐","吙","攉","秴","耠","锪","騞","𬴃"],shèng:["剩","剰","勝","圣","墭","嵊","晠","榺","橳","琞","聖","蕂","貹","賸"],"duān zhì":["剬"],wū:["剭","呜","嗚","圬","屋","巫","弙","杇","歍","汙","汚","污","洿","烏","窏","箼","螐","誈","誣","诬","邬","鄔","鎢","钨","鰞","鴮"],gē:["割","哥","圪","彁","戈","戓","戨","歌","滒","犵","肐","袼","謌","鎶","鴚","鴿","鸽"],"dá zhá":["剳"],chuán:["剶","暷","椽","篅","舡","舩","船","輲","遄"],"tuán zhuān":["剸","漙","篿"],"lù jiū":["剹"],pēng:["剻","匉","嘭","怦","恲","抨","梈","烹","砰","軯","駍"],piāo:["剽","勡","慓","旚","犥","翲","螵","飃","飄","飘","魒"],kōu:["剾","彄","抠","摳","眍","瞘","芤","𫸩"],"jiǎo chāo":["剿","劋","勦","摷"],qiāo:["劁","勪","墝","幧","敲","橇","毃","燆","硗","磽","繑","趬","跷","踍","蹺","蹻","郻","鄡","鄥","鍫","鍬","鐰","锹","頝"],"huá huà":["劃"],"zhā zhá":["劄"],"pī pǐ":["劈","悂"],tāng:["劏","嘡","羰","薚","蝪","蹚","鞺","鼞"],chán:["劖","嚵","壥","婵","嬋","巉","廛","棎","毚","湹","潹","潺","澶","瀍","瀺","煘","獑","磛","緾","纏","纒","缠","艬","蝉","蟐","蟬","蟾","誗","讒","谗","躔","鄽","酁","鋋","鑱","镵","饞","馋"],zuān:["劗","躜","躦","鉆","鑚"],mó:["劘","嫫","嬤","嬷","尛","摹","擵","橅","糢","膜","藦","蘑","謨","謩","谟","饃","饝","馍","髍","魔","魹"],zhú:["劚","斸","曯","欘","灟","炢","烛","燭","爥","瘃","竹","笁","笜","舳","茿","蓫","蠋","蠾","躅","逐","逫","钃","鱁"],quàn:["劝","勧","勸","牶","韏"],"jìn jìng":["劤","劲","勁"],kēng:["劥","坑","牼","硁","硜","誙","銵","鍞","鏗","铿","阬"],"xié liè":["劦"],"zhù chú":["助"],nǔ:["努","弩","砮","胬"],shào:["劭","卲","哨","潲","紹","綤","绍","袑","邵"],miǎo:["劰","杪","淼","渺","眇","秒","篎","緲","缈","藐","邈"],kǒu:["劶","口"],wā:["劸","娲","媧","屲","挖","攨","洼","溛","漥","瓾","畖","穵","窊","窪","蛙","韈","鼃"],kuāng:["劻","匡","匩","哐","恇","洭","筐","筺","誆","诓","軭","邼"],hé:["劾","咊","啝","姀","峆","敆","曷","柇","楁","毼","河","涸","渮","澕","熆","皬","盇","盉","盍","盒","禾","篕","籺","粭","翮","菏","萂","覈","訸","詥","郃","釛","鉌","鑉","閡","闔","阂","阖","鞨","頜","餄","饸","魺","鹖","麧","齕","龁","龢","𬌗"],gào:["勂","吿","告","峼","祮","祰","禞","筶","誥","诰","郜","鋯","锆"],"bó bèi":["勃"],láng:["勆","嫏","廊","斏","桹","榔","樃","欴","狼","琅","瑯","硠","稂","艆","蓈","蜋","螂","躴","郒","郞","鋃","鎯","锒"],xūn:["勋","勛","勲","勳","嚑","坃","埙","塤","壎","壦","曛","燻","獯","矄","纁","臐","薫","薰","蘍","醺","𫄸"],"juàn juān":["勌","瓹"],"lè lēi":["勒"],kài:["勓","炌","烗","鎎"],"wěng yǎng":["勜"],qín:["勤","嗪","噙","嶜","庈","懃","懄","捦","擒","斳","檎","澿","珡","琴","琹","瘽","禽","秦","耹","芩","芹","菦","螓","蠄","鈙","鈫","雂","靲","鳹","鵭"],jiàng:["勥","匞","匠","嵹","弜","弶","摾","櫤","洚","滰","犟","糡","糨","絳","绛","謽","酱","醤","醬"],fān:["勫","嬏","帆","幡","忛","憣","旙","旛","繙","翻","藩","轓","颿","飜","鱕"],juān:["勬","姢","娟","捐","涓","蠲","裐","鎸","鐫","镌","鹃"],"tóng dòng":["勭","烔","燑","狪"],lǜ:["勴","垏","嵂","律","慮","氯","滤","濾","爈","箻","綠","繂","膟","葎","虑","鑢"],chè:["勶","坼","彻","徹","掣","撤","澈","烢","爡","瞮","硩","聅","迠","頙","㬚"],sháo:["勺","玿","韶"],"gōu gòu":["勾"],cōng:["匆","囪","囱","忩","怱","悤","暰","樬","漗","瑽","璁","瞛","篵","繱","聡","聦","聪","聰","苁","茐","葱","蓯","蔥","蟌","鍯","鏓","鏦","騘","驄","骢"],"táo yáo":["匋","陶"],páo:["匏","咆","垉","庖","爮","狍","袍","褜","軳","鞄","麅"],dá:["匒","妲","怛","炟","燵","畣","笪","羍","荙","薘","蟽","詚","达","迏","迖","迚","逹","達","鐽","靼","鞑","韃","龖","龘","𫟼"],"huà huā":["化"],"běi bèi":["北"],nǎo:["匘","垴","堖","嫐","恼","悩","惱","瑙","碯","脑","脳","腦"],"chí shi":["匙"],fāng:["匚","堏","方","淓","牥","芳","邡","鈁","錺","钫","鴋"],zā:["匝","咂","帀","沞","臜","臢","迊","鉔","魳"],qiè:["匧","厒","妾","怯","悏","惬","愜","挈","穕","窃","竊","笡","箧","篋","籡","踥","鍥","锲","鯜"],"zāng cáng":["匨"],fěi:["匪","奜","悱","棐","榧","篚","翡","蕜","誹","诽"],"kuì guì":["匮","匱"],suǎn:["匴"],pǐ:["匹","噽","嚭","圮","庀","痞","癖","脴","苉","銢","鴄"],"qū ōu":["区","區"],"kē qià":["匼"],"yǎn yàn":["匽","棪"],biǎn:["匾","惼","揙","碥","稨","窆","藊","褊","貶","贬","鴘"],nì:["匿","堄","嫟","嬺","惄","愵","昵","暱","氼","眤","睨","縌","胒","腻","膩","逆","𨺙"],niàn:["卄","唸","埝","廿","念","惗","艌"],sà:["卅","櫒","脎","萨","蕯","薩","鈒","隡","颯","飒","馺"],zú:["卆","哫","崪","族","箤","足","踤","镞"],shēng:["升","呏","声","斘","昇","曻","枡","殅","泩","湦","焺","牲","珄","生","甥","竔","笙","聲","鉎","鍟","阩","陞","陹","鵿","鼪"],wàn:["卍","卐","忨","杤","瞣","脕","腕","萬","蟃","贎","輐","錽","𬇕"],"huá huà huā":["华","華"],bēi:["卑","悲","揹","杯","桮","盃","碑","藣","鵯","鹎"],"zú cù":["卒"],"dān shàn chán":["单","單"],"nán nā":["南"],"shuài lǜ":["卛"],"bǔ bo pú":["卜"],"kuàng guàn":["卝"],biàn:["卞","变","変","峅","弁","徧","忭","抃","昪","汳","汴","玣","艑","苄","覍","諚","變","辡","辧","辨","辩","辫","辮","辯","遍","釆","𨚕"],bǔ:["卟","哺","捕","补","補","鸔","𬷕"],"zhàn zhān":["占","覱"],"kǎ qiǎ":["卡"],lú:["卢","嚧","垆","壚","庐","廬","曥","枦","栌","櫨","泸","瀘","炉","爐","獹","玈","瓐","盧","矑","籚","纑","罏","胪","臚","舮","舻","艫","芦","蘆","蠦","轤","轳","鈩","鑪","顱","颅","馿","髗","魲","鱸","鲈","鸕","鸬","黸","𬬻"],lǔ:["卤","塷","掳","擄","樐","橹","櫓","氌","滷","澛","瀂","硵","磠","穞","艣","艪","蓾","虏","虜","鏀","鐪","鑥","镥","魯","鲁","鹵"],guà:["卦","啩","挂","掛","罣","褂","詿","诖"],"áng yǎng":["卬"],yìn:["印","垽","堷","廕","慭","憖","憗","懚","洕","湚","猌","癊","胤","茚","酳","鮣","䲟"],què:["却","卻","塙","崅","悫","愨","慤","搉","榷","燩","琷","皵","确","確","礭","闋","阕","鵲","鹊","𬒈"],luǎn:["卵"],"juàn juǎn":["卷","巻"],"chǎng ān hàn":["厂"],"wěi yán":["厃"],tīng:["厅","厛","听","庁","廰","廳","汀","烃","烴","綎","耓","聴","聼","聽","鞓","𬘩"],"zhé zhái":["厇"],"hàn àn":["厈","屽"],yǎ:["厊","唖","庌","痖","瘂","蕥"],shè:["厍","厙","弽","慑","慴","懾","摂","欇","涉","涻","渉","滠","灄","社","舎","蔎","蠂","設","设","赦","騇","麝"],dǐ:["厎","呧","坘","弤","抵","拞","掋","牴","砥","菧","觝","詆","诋","軧","邸","阺","骶","鯳"],"zhǎ zhǎi":["厏"],páng:["厐","嫎","庞","徬","舽","螃","逄","鰟","鳑","龎","龐"],"zhì shī":["厔"],máng:["厖","吂","哤","娏","忙","恾","杗","杧","汒","浝","牻","痝","盲","硭","笀","芒","茫","蘉","邙","釯","鋩","铓","駹"],zuī:["厜","樶","纗","蟕"],"shà xià":["厦","廈"],áo:["厫","嗷","嗸","廒","敖","滶","獒","獓","璈","翱","翶","翺","聱","蔜","螯","謷","謸","遨","鏖","隞","鰲","鳌","鷔","鼇"],"lán qiān":["厱"],"sī mǒu":["厶"],"gōng hóng":["厷"],"lín miǎo":["厸"],"qiú róu":["厹"],dū:["厾","嘟","督","醏"],"xiàn xuán":["县","縣"],"cān shēn cēn sān":["参","參","叄","叅"],"ài yǐ":["叆"],"chā chà chǎ chá":["叉"],shuāng:["双","孀","孇","欆","礵","艭","雙","霜","騻","驦","骦","鷞","鸘","鹴"],shōu:["収","收"],guái:["叏"],bá:["叐","妭","抜","拔","炦","癹","胈","茇","菝","詙","跋","軷","魃","鼥"],"fā fà":["发"],"zhuó yǐ lì jué":["叕"],qǔ:["取","娶","竬","蝺","詓","齲","龋"],"jiǎ xiá":["叚","徦"],"wèi yù":["叞","尉","蔚"],dié:["叠","垤","堞","峌","幉","恎","惵","戜","曡","殜","氎","牃","牒","瓞","畳","疂","疉","疊","碟","絰","绖","耊","耋","胅","艓","苵","蜨","蝶","褋","詄","諜","谍","跮","蹀","迭","镻","鰈","鲽","鴩","𫶇"],ruì:["叡","枘","汭","瑞","睿","芮","蚋","蜹","銳","鋭","锐"],"jù gōu":["句"],lìng:["另","呤","炩","蘦"],"dāo dáo tāo":["叨"],"zhī zhǐ":["只"],jiào:["叫","呌","嘂","嘦","噍","嬓","斍","斠","滘","漖","獥","珓","皭","窖","藠","訆","譥","趭","較","轎","轿","较","酵","醮","釂"],"zhào shào":["召"],"kě kè":["可"],"tái tāi":["台","苔"],pǒ:["叵","尀","笸","箥","鉕","钷","駊"],"yè xié":["叶"],"hào háo":["号"],tàn:["叹","嘆","探","歎","湠","炭","碳","舕"],"hōng hóng":["叿"],miē:["吀","咩","哶","孭"],"xū yū yù":["吁"],chī:["吃","哧","喫","嗤","噄","妛","媸","彨","彲","摛","攡","殦","瓻","痴","癡","眵","瞝","笞","粚","胵","蚩","螭","訵","魑","鴟","鵄","鸱","黐","齝","𫄨"],"xuān sòng":["吅"],yāo:["吆","喓","夭","妖","幺","楆","殀","祅","腰","葽","訞","邀","鴁","鴢","㙘"],zǐ:["吇","姉","姊","子","杍","梓","榟","橴","滓","矷","秭","笫","籽","紫","耔","虸","訿","釨"],"hé gě":["合","鲄"],"cùn dòu":["吋"],"tóng tòng":["同"],"tǔ tù":["吐","唋"],"zhà zhā":["吒","奓"],"xià hè":["吓"],"ā yā":["吖"],"ma má mǎ":["吗"],lìn:["吝","恡","悋","橉","焛","甐","膦","蔺","藺","賃","赁","蹸","躏","躙","躪","轥","閵"],tūn:["吞","暾","朜","焞"],"bǐ pǐ":["吡"],qìn:["吢","吣","唚","抋","揿","搇","撳","沁","瀙","菣","藽"],"jiè gè":["吤"],"fǒu pǐ":["否"],"ba bā":["吧"],dūn:["吨","噸","墩","墪","惇","撉","撴","犜","獤","礅","蜳","蹾","驐"],fēn:["吩","帉","昐","朆","梤","棻","氛","竕","紛","纷","翂","芬","衯","訜","躮","酚","鈖","雰","餴","饙","馚"],"é huā":["吪"],"kēng háng":["吭","妔"],shǔn:["吮"],"zhī zī":["吱"],"yǐn shěn":["吲"],wú:["吳","吴","呉","墲","峿","梧","橆","毋","洖","浯","無","珸","璑","祦","芜","茣","莁","蕪","蜈","蟱","譕","郚","鋙","铻","鯃","鵐","鷡","鹀","鼯"],"chǎo chāo":["吵"],"nà nè":["吶"],"xuè chuò jué":["吷"],chuī:["吹","炊","龡"],"dōu rú":["吺"],hǒu:["吼","犼"],"hōng hǒu ōu":["吽"],"wú yù":["吾"],"ya yā":["呀"],"è e":["呃"],dāi:["呆","懛","獃"],"mèn qǐ":["呇"],hōng:["呍","嚝","揈","灴","烘","焢","硡","薨","訇","谾","軣","輷","轟","轰","鍧"],nà:["呐","捺","笝","納","纳","肭","蒳","衲","豽","貀","軜","郍","鈉","钠","靹","魶"],"tūn tiān":["呑"],"fǔ ḿ":["呒","嘸"],"dāi tǎi":["呔"],"ǒu ōu òu":["呕"],"bài bei":["呗"],"yuán yún yùn":["员","員"],guō:["呙","啯","嘓","埚","堝","墎","崞","彉","彍","懖","猓","瘑","聒","蝈","蟈","郭","鈛","鍋","锅"],"huá qì":["呚"],"qiàng qiāng":["呛","跄"],shī:["呞","失","尸","屍","师","師","施","浉","湤","湿","溮","溼","濕","狮","獅","瑡","絁","葹","蒒","蓍","虱","蝨","褷","襹","詩","诗","邿","釃","鉇","鍦","鯴","鰤","鲺","鳲","鳾","鶳","鸤","䴓","𫚕"],juǎn:["呟","埍","臇","菤","錈","锩"],pěn:["呠","翸"],"wěn mǐn":["呡"],"ne ní":["呢"],"ḿ m̀ móu":["呣"],rán:["呥","嘫","然","燃","繎","肰","蚦","蚺","衻","袇","袡","髥","髯"],"tiè chè":["呫"],"qì zhī":["呮"],"zǐ cī":["呰"],"guā gū guǎ":["呱"],"cī zī":["呲"],"hǒu xǔ gòu":["呴"],"hē ā á ǎ à a":["呵"],náo:["呶","夒","峱","嶩","巎","挠","撓","猱","硇","蛲","蟯","詉","譊","鐃","铙"],"xiā gā":["呷"],pēi:["呸","怌","肧","胚","衃","醅"],"háo xiāo":["呺"],mìng:["命","掵"],"dá dàn":["呾"],"zuǐ jǔ":["咀"],"xián gān":["咁"],pǒu:["咅","哣","犃"],"yǎng yāng":["咉"],"zǎ zé zhā":["咋"],"hé hè huó huò hú":["和"],hāi:["咍"],dā:["咑","哒","噠","墶","搭","撘","耷","褡","鎝","𨱏"],"kǎ kā":["咔"],gū:["咕","唂","唃","姑","嫴","孤","巬","巭","柧","橭","沽","泒","稒","笟","箍","箛","篐","罛","苽","菇","菰","蓇","觚","軱","軲","轱","辜","酤","鈲","鮕","鴣","鸪"],"kā gā":["咖"],zuo:["咗"],lóng:["咙","嚨","嶐","巃","巄","昽","曨","朧","栊","槞","櫳","湰","滝","漋","爖","珑","瓏","癃","眬","矓","砻","礱","礲","窿","竜","聋","聾","胧","茏","蘢","蠪","蠬","襱","豅","鏧","鑨","霳","靇","驡","鸗","龍","龒","龙"],"xiàn xián":["咞"],qì:["咠","唭","噐","器","夡","弃","憇","憩","暣","棄","欫","气","気","氣","汔","汽","泣","湆","湇","炁","甈","盵","矵","碛","碶","磜","磧","罊","芞","葺","藒","蟿","訖","讫","迄","鐑"],"xì dié":["咥"],"liē liě lié lie":["咧"],zī:["咨","嗞","姕","姿","孜","孳","孶","崰","嵫","栥","椔","淄","湽","滋","澬","玆","禌","秶","粢","紎","緇","緕","纃","缁","茊","茲","葘","諮","谘","貲","資","赀","资","赼","趑","趦","輜","輺","辎","鄑","鈭","錙","鍿","鎡","锱","镃","頾","頿","髭","鯔","鰦","鲻","鶅","鼒","齍","齜","龇"],mī:["咪"],"jī xī qià":["咭"],"gē luò kǎ lo":["咯"],"shù xún":["咰"],"zán zá zǎ zan":["咱"],"hāi ké":["咳"],huī:["咴","噅","噕","婎","媈","幑","徽","恢","拻","挥","揮","晖","暉","楎","洃","瀈","灰","灳","烣","睳","禈","翚","翬","蘳","袆","褘","詼","诙","豗","輝","辉","鰴","麾","㧑"],"huài shì":["咶"],táo:["咷","啕","桃","檮","洮","淘","祹","綯","绹","萄","蜪","裪","迯","逃","醄","鋾","鞀","鞉","饀","駣","騊","鼗","𫘦"],xián:["咸","啣","娴","娹","婱","嫌","嫺","嫻","弦","挦","撏","涎","湺","澖","甉","痫","癇","癎","絃","胘","舷","藖","蚿","蛝","衔","衘","誸","諴","賢","贒","贤","輱","醎","銜","鑦","閑","闲","鷳","鷴","鷼","鹇","鹹","麙","𫍯"],"è àn":["咹"],"xuān xuǎn":["咺","烜"],"wāi hé wǒ guǎ guō":["咼"],"yàn yè yān":["咽"],āi:["哀","哎","埃","溾","銰","鎄","锿"],pǐn:["品","榀"],shěn:["哂","婶","嬸","审","宷","審","弞","曋","渖","瀋","瞫","矤","矧","覾","訠","諗","讅","谂","谉","邥","頣","魫"],"hǒng hōng hòng":["哄"],"wā wa":["哇"],"hā hǎ hà":["哈"],zāi:["哉","栽","渽","溨","災","灾","烖","睵","賳"],"dì diè":["哋"],pài:["哌","沠","派","渒","湃","蒎","鎃"],"gén hěn":["哏"],"yǎ yā":["哑","雅"],"yuě huì":["哕","噦"],nián:["哖","年","秊","秥","鮎","鯰","鲇","鲶","鵇","黏"],"huá huā":["哗","嘩"],"jì jiē zhāi":["哜","嚌"],mōu:["哞"],"yō yo":["哟","喲"],lòng:["哢","梇","贚"],"ò ó é":["哦"],"lī lǐ li":["哩"],"nǎ na nǎi né něi":["哪"],hè:["哬","垎","壑","寉","惒","焃","煂","燺","爀","癋","碋","翯","褐","謞","賀","贺","赫","靍","靎","靏","鶴","鸖","鹤"],"bō pò bā":["哱"],zhé:["哲","啠","喆","嚞","埑","悊","摺","晢","晣","歽","矺","砓","磔","籷","粍","虴","蛰","蟄","袩","詟","謫","謺","讁","讋","谪","輒","輙","轍","辄","辙","鮿"],"liàng láng":["哴"],"liè lǜ":["哷"],hān:["哻","憨","蚶","谽","酣","頇","顸","馠","魽","鼾"],"hēng hng":["哼"],gěng:["哽","埂","峺","挭","梗","綆","绠","耿","莄","郠","骾","鯁","鲠","𬒔"],"chuò yuè":["哾"],"gě jiā":["哿"],"bei bài":["唄"],"hán hàn":["唅"],chún:["唇","浱","湻","滣","漘","犉","純","纯","脣","莼","蒓","蓴","醇","醕","錞","陙","鯙","鶉","鹑","𬭚"],"ài āi":["唉"],"jiá qiǎn":["唊"],"yán dàn xián":["唌"],chē:["唓","砗","硨","莗","蛼"],"wú ńg ń":["唔"],zào:["唕","唣","噪","慥","梍","灶","煰","燥","皁","皂","竃","竈","簉","艁","譟","趮","躁","造","𥖨"],dí:["唙","啇","嘀","嚁","嫡","廸","敌","敵","梑","涤","滌","狄","笛","籴","糴","苖","荻","蔋","蔐","藡","覿","觌","豴","迪","靮","頔","馰","髢","鸐","𬱖"],"gòng hǒng gǒng":["唝","嗊"],dóu:["唞"],"lào láo":["唠","嘮","憦"],huàn:["唤","喚","奂","奐","宦","嵈","幻","患","愌","换","換","擐","攌","梙","槵","浣","涣","渙","漶","澣","烉","焕","煥","瑍","痪","瘓","睆","肒","藧","豢","轘","逭","鯇","鯶","鰀","鲩"],léng:["唥","塄","楞","碐","薐"],"wō wěi":["唩"],fěng:["唪","覂","諷","讽"],"yín jìn":["唫"],"hǔ xià":["唬"],wéi:["唯","围","圍","壝","峗","峞","嵬","帏","帷","幃","惟","桅","沩","洈","涠","湋","溈","潍","潙","潿","濰","犩","矀","維","维","蓶","覹","违","違","鄬","醀","鍏","闈","闱","韋","韦","鮠","𣲗","𬶏"],shuā:["唰"],chàng:["唱","怅","悵","暢","焻","畅","畼","誯","韔","鬯"],"ér wā":["唲"],qiàng:["唴","炝","熗","羻"],yō:["唷"],yū:["唹","淤","瘀","盓","箊","紆","纡","込","迂","迃","陓"],lài:["唻","濑","瀨","瀬","癞","癩","睐","睞","籁","籟","藾","賚","賴","赉","赖","頼","顂","鵣"],tuò:["唾","嶞","柝","毤","毻","箨","籜","萚","蘀","跅"],"zhōu zhāo tiào":["啁"],kěn:["啃","垦","墾","恳","懇","肎","肯","肻","豤","錹"],"zhuó zhào":["啅","濯"],"hēng hèng":["啈","悙"],"lín lán":["啉"],"a ā á ǎ à":["啊"],qiāng:["啌","嗴","嶈","戕","摤","斨","枪","槍","溬","牄","猐","獇","羌","羗","腔","蜣","謒","鏘","锖","锵"],"tūn zhūn xiāng duǐ":["啍"],wèn:["問","妏","揾","搵","璺","问","顐"],"cuì qi":["啐"],"dié shà jié tì":["啑"],"yuē wā":["啘"],"zǐ cǐ":["啙"],"bǐ tú":["啚"],"chuò chuài":["啜"],"yǎ yā è":["啞"],fēi:["啡","婓","婔","扉","暃","渄","猆","緋","绯","裶","霏","非","靟","飛","飝","飞","餥","馡","騑","騛","鯡","鲱","𬴂"],pí:["啤","壀","枇","毗","毘","焷","琵","疲","皮","篺","罴","羆","脾","腗","膍","蚍","蚽","蜱","螷","蠯","豼","貔","郫","鈹","阰","陴","隦","魮","鮍","鲏","鵧","鼙"],shá:["啥"],"lā la":["啦"],"yīng qíng":["啨"],pā:["啪","妑","舥","葩","趴"],"zhě shì":["啫"],sè:["啬","嗇","懎","擌","栜","歮","涩","渋","澀","澁","濇","濏","瀒","瑟","璱","瘷","穑","穡","穯","繬","譅","轖","銫","鏼","铯","飋"],niè:["啮","嗫","噛","嚙","囁","囓","圼","孼","孽","嵲","嶭","巕","帇","敜","枿","槷","櫱","涅","湼","痆","篞","籋","糱","糵","聂","聶","臬","臲","蘖","蠥","讘","踂","踗","踙","蹑","躡","錜","鎳","鑈","鑷","钀","镊","镍","闑","陧","隉","顳","颞","齧","𫔶"],"luō luó luo":["啰","囉"],"tān chǎn tuō":["啴"],bo:["啵","蔔"],dìng:["啶","定","椗","矴","碇","碠","磸","聢","腚","萣","蝊","訂","订","錠","锭","顁","飣","饤"],lāng:["啷"],"án ān":["啽"],kā:["喀","擖"],"yóng yú":["喁"],"lā lá lǎ":["喇"],jiē:["喈","喼","嗟","堦","媘","接","掲","擑","湝","煯","疖","痎","癤","皆","秸","稭","脻","蝔","街","謯","阶","階","鞂","鶛"],hóu:["喉","帿","猴","瘊","睺","篌","糇","翭","葔","鄇","鍭","餱","骺","鯸","𬭤"],"dié zhá":["喋"],wāi:["喎","歪","竵"],"nuò rě":["喏"],"xù huò guó":["喐"],zán:["喒"],"wō ō":["喔"],hú:["喖","嘝","囫","壶","壷","壺","媩","弧","搰","斛","楜","槲","湖","瀫","焀","煳","狐","猢","瑚","瓳","箶","絗","縠","胡","葫","蔛","蝴","螜","衚","觳","醐","鍸","頶","餬","鬍","魱","鰗","鵠","鶘","鶦","鹕"],"huàn yuán xuǎn hé":["喛"],xǐ:["喜","囍","壐","屣","徙","憙","枲","橲","歖","漇","玺","璽","矖","禧","縰","葈","葸","蓰","蟢","謑","蹝","躧","鈢","鉨","鉩","鱚","𬭳","𬶮"],"hē hè yè":["喝"],kuì:["喟","嘳","媿","嬇","愦","愧","憒","篑","簣","籄","聩","聭","聵","膭","蕢","謉","餽","饋","馈"],"zhǒng chuáng":["喠"],"wéi wèi":["喡","為","爲"],"duó zhà":["喥"],"sāng sàng":["喪"],"qiáo jiāo":["喬"],"pèn bēn":["喯"],"cān sūn qī":["喰"],"zhā chā":["喳"],miāo:["喵"],"pēn pèn":["喷"],kuí:["喹","夔","奎","巙","戣","揆","晆","暌","楏","楑","櫆","犪","睽","葵","藈","蘷","虁","蝰","躨","逵","鄈","鍨","鍷","頯","馗","騤","骙","魁"],"lou lóu":["喽"],"zào qiāo":["喿"],"hè xiāo xiào hù":["嗃"],"á shà":["嗄"],xiù:["嗅","岫","峀","溴","珛","琇","璓","秀","綉","繍","繡","绣","螑","袖","褎","褏","銹","鏥","鏽","锈","齅"],"qiāng qiàng":["嗆","戗","戧","蹌","蹡"],"ài yì":["嗌","艾"],"má mǎ ma":["嗎"],"kè kē":["嗑"],"dā tà":["嗒","鎉"],sǎng:["嗓","搡","磉","褬","鎟","顙","颡"],chēn:["嗔","抻","琛","瞋","諃","謓","賝","郴","𬘭"],"wā gǔ":["嗗"],"pǎng bēng":["嗙"],"xián qiǎn qiān":["嗛"],lào:["嗠","嫪","橯","涝","澇","耢","耮","躼","軂","酪"],wēng:["嗡","翁","聬","螉","鎓","鶲","鹟","𬭩"],wà:["嗢","腽","膃","袜","襪","韤"],"hēi hāi":["嗨"],hē:["嗬","欱","蠚","訶","诃"],zi:["嗭"],sǎi:["嗮"],"ǹg ńg ňg":["嗯"],gě:["嗰","舸"],ná:["嗱","拏","拿","鎿","镎"],diǎ:["嗲"],"ài ǎi āi":["嗳"],tōng:["嗵","樋","炵","蓪"],"zuī suī":["嗺"],"zhē zhè zhù zhe":["嗻"],mò:["嗼","圽","塻","墨","妺","嫼","寞","帞","昩","末","枺","歿","殁","沫","漠","爅","獏","瘼","皌","眽","眿","瞐","瞙","砞","礳","秣","絈","纆","耱","茉","莈","蓦","蛨","蟔","貃","貊","貘","銆","鏌","镆","陌","靺","驀","魩","默","黙","𬙊"],sòu:["嗽","瘶"],tǎn:["嗿","坦","忐","憳","憻","暺","毯","璮","菼","袒","襢","醓","鉭","钽"],"jiào dǎo":["嘄"],"kǎi gě":["嘅"],"shān càn":["嘇"],cáo:["嘈","嶆","曹","曺","槽","漕","艚","蓸","螬","褿","鏪","𥕢"],piào:["嘌","徱","蔈","驃"],"lóu lou":["嘍"],gǎ:["尕","玍"],"gǔ jiǎ":["嘏"],"jiāo xiāo":["嘐"],"xū shī":["嘘","噓"],pó:["嘙","嚩","婆","櫇","皤","鄱"],"dē dēi":["嘚"],"ma má":["嘛"],"lē lei":["嘞"],"gā gá gǎ":["嘠"],sāi:["嘥","噻","毢","腮","顋","鰓"],"zuō chuài":["嘬"],"cháo zhāo":["嘲","朝","鼂"],zuǐ:["嘴","噿","嶊","璻"],"qiáo qiào":["嘺","翹","谯"],"chù xù shòu":["嘼"],"tān chǎn":["嘽"],"dàn tán":["嘾","弾","彈","惔","澹"],"hēi mò":["嘿"],ě:["噁","砨","頋","騀","鵈"],"fān bo":["噃"],chuáng:["噇","床","牀"],"cù zā hé":["噈"],"tūn kuò":["噋"],"cēng chēng":["噌"],dēng:["噔","嬁","灯","燈","璒","登","竳","簦","艠","豋"],pū:["噗","扑","撲","攴","攵","潽","炇","陠"],juē:["噘","屩","屫","撧"],lū:["噜","嚕","撸","擼","謢"],zhān:["噡","岾","惉","旃","旜","枬","栴","毡","氈","氊","沾","瞻","薝","蛅","詀","詹","譫","谵","趈","邅","閚","霑","飦","饘","驙","魙","鱣","鸇","鹯","𫗴"],ō:["噢"],"zhòu zhuó":["噣"],"jiào qiào chī":["噭"],yuàn:["噮","妴","怨","愿","掾","瑗","禐","苑","衏","裫","褑","院","願"],"ǎi ài āi":["噯"],"yōng yǒng":["噰","澭"],"jué xué":["噱"],"pēn pèn fèn":["噴"],gá:["噶","尜","釓","錷","钆"],"xīn hěn hèn":["噷"],dāng:["噹","澢","珰","璫","筜","簹","艡","蟷","裆","襠"],làn:["嚂","滥","濫","烂","燗","爁","爛","爤","瓓","糷","钄"],tà:["嚃","嚺","崉","挞","搨","撻","榻","橽","毾","涾","澾","濌","禢","粏","誻","譶","蹋","蹹","躂","躢","遝","錔","闒","闥","闼","阘","鞜","鞳"],"huō huò ǒ":["嚄"],hāo:["嚆","茠","蒿","薅"],"hè xià":["嚇"],"xiù pì":["嚊"],"zhōu chóu":["嚋","盩","诪"],mē:["嚒"],"chā cā":["嚓"],"bó pào bào":["嚗"],"me mèi mò":["嚜"],"xié hái":["嚡"],"áo xiāo":["嚣"],mō:["嚤","摸"],pín:["嚬","娦","嫔","嬪","玭","矉","薲","蠙","貧","贫","顰","颦","𬞟"],mè:["嚰","濹"],"rǎng rāng":["嚷"],lá:["嚹","旯"],"jiáo jué jiào":["嚼"],chuò:["嚽","娖","擉","歠","涰","磭","踀","輟","辍","辵","辶","酫","鑡","餟","齪","龊"],"huān huàn":["嚾"],"zá cà":["囃"],chài:["囆","虿","蠆","袃","訍"],"náng nāng":["囊"],"zá zàn cān":["囋"],sū:["囌","櫯","甦","稣","穌","窣","蘇","蘓","酥","鯂"],zèng:["囎","熷","甑","贈","赠","鋥","锃"],"zá niè yàn":["囐"],nāng:["囔"],"luó luō luo":["囖"],"wéi guó":["囗"],huí:["囘","回","囬","廻","廽","恛","洄","痐","茴","蚘","蛔","蛕","蜖","迴","逥","鮰"],nín:["囜","您","脌"],"jiǎn nān":["囝"],nān:["囡"],tuán:["团","団","團","慱","抟","摶","檲","糰","鏄","鷒","鷻"],"tún dùn":["囤","坉"],guó:["囯","囶","囻","国","圀","國","帼","幗","慖","摑","漍","聝","腘","膕","蔮","虢","馘","𬇹"],kùn:["困","涃","睏"],"wéi tōng":["囲"],qūn:["囷","夋","逡"],rì:["囸","日","衵","鈤","馹","驲"],tāi:["囼","孡","胎"],pǔ:["圃","圑","擈","普","暜","樸","檏","氆","浦","溥","烳","諩","譜","谱","蹼","鐠","镨"],"quān juàn juān":["圈","圏"],"chuí chuán":["圌"],tuǎn:["圕","畽","疃"],lüè:["圙","掠","略","畧","稤","鋝","鋢","锊","䂮"],"huán yuán":["圜"],luán:["圝","圞","奱","娈","孌","孪","孿","峦","巒","挛","攣","曫","栾","欒","滦","灤","癴","癵","羉","脔","臠","虊","銮","鑾","鵉","鸞","鸾"],tǔ:["土","圡","釷","钍"],"xū wéi":["圩"],"dì de":["地","嶳"],"qiān sú":["圱"],zhèn:["圳","塦","挋","振","朕","栚","甽","眹","紖","絼","纼","誫","賑","赈","鋴","鎭","鎮","镇","阵","陣","震","鴆","鸩"],"chǎng cháng":["场","場","塲"],"qí yín":["圻"],jiá:["圿","忦","恝","戞","扴","脥","荚","莢","蛱","蛺","裌","跲","郏","郟","鋏","铗","頬","頰","颊","鴶","鵊"],"zhǐ zhì":["坁"],bǎn:["坂","岅","昄","板","版","瓪","粄","舨","蝂","鈑","钣","阪","魬"],qǐn:["坅","寑","寝","寢","昑","梫","笉","螼","赾","鋟","锓"],"méi fén":["坆"],"rǒng kēng":["坈"],"fāng fáng":["坊"],"fèn bèn":["坋"],tān:["坍","怹","摊","擹","攤","滩","灘","瘫","癱","舑","貪","贪"],"huài pēi pī péi":["坏"],"dì làn":["坔"],tán:["坛","墰","墵","壇","壜","婒","憛","昙","曇","榃","檀","潭","燂","痰","磹","罈","罎","藫","談","譚","譠","谈","谭","貚","郯","醰","錟","顃"],bà:["坝","垻","壩","弝","欛","灞","爸","矲","覇","霸","鮁","鲅"],fén:["坟","墳","妢","岎","幩","枌","棼","汾","焚","燌","燓","羒","羵","蒶","蕡","蚠","蚡","豮","豶","轒","鐼","隫","馩","魵","黂","鼖","鼢","𣸣"],zhuì:["坠","墜","惴","甀","畷","礈","綴","縋","缀","缒","腏","膇","諈","贅","赘","醊","錣","鑆"],pō:["坡","岥","泼","溌","潑","釙","鏺","钋","頗","颇","䥽"],"pǎn bàn":["坢"],kūn:["坤","堃","堒","崐","崑","昆","晜","潉","焜","熴","猑","琨","瑻","菎","蜫","裈","裩","褌","醌","錕","锟","騉","髠","髡","髨","鯤","鲲","鵾","鶤","鹍"],diàn:["坫","垫","墊","壂","奠","婝","店","惦","扂","橂","殿","淀","澱","玷","琔","电","癜","簟","蜔","鈿","電","靛","驔"],"mù mǔ":["坶"],"kē kě":["坷","軻"],xuè:["坹","岤","桖","瀥","狘","瞲","謔","谑","趐"],"dǐ chí":["坻","柢"],lā:["垃","柆","菈","邋"],lǒng:["垄","垅","壟","壠","拢","攏","竉","陇","隴","𬕂"],mín:["垊","姄","岷","崏","捪","旻","旼","民","珉","琘","琝","瑉","痻","盿","砇","緍","緡","缗","罠","苠","鈱","錉","鍲","鴖"],"dòng tóng":["垌","峒","洞"],cí:["垐","嬨","慈","柌","濨","珁","瓷","甆","磁","礠","祠","糍","茨","詞","词","辝","辞","辤","辭","雌","飺","餈","鴜","鶿","鷀","鹚"],duī:["垖","堆","塠","痽","磓","鐓","鐜","鴭"],"duò duǒ":["垛"],"duǒ duò":["垜","挆"],chá:["垞","察","嵖","搽","槎","檫","猹","茬","茶","詧","靫","𥻗"],shǎng:["垧","晌","樉","賞","贘","赏","鋿","鏛","鑜"],shǒu:["垨","守","手","扌","艏","首"],da:["垯","繨","跶"],háng:["垳","斻","杭","筕","絎","绗","航","苀","蚢","裄","貥","迒","頏","颃","魧"],"ān ǎn":["垵"],xīng:["垶","惺","星","曐","煋","猩","瑆","皨","篂","腥","興","觪","觲","謃","騂","骍","鮏","鯹"],"yuàn huán":["垸"],bāng:["垹","帮","幇","幚","幫","捠","梆","浜","邦","邫","鞤","𠳐"],"póu fú":["垺"],cén:["埁","岑","涔"],"běng fēng":["埄"],"dì fáng":["埅"],"xiá jiā":["埉"],"mái mán":["埋"],làng:["埌","崀","浪","蒗","閬","㫰"],"shān yán":["埏"],"qín jīn":["埐"],"pǔ bù":["埔"],huā:["埖","婲","椛","硴","糀","花","蒊","蘤","誮","錵"],"suì sù":["埣"],"pí pì":["埤"],"qīng zhēng":["埥","鲭"],"wǎn wān":["埦"],lǔn:["埨","稐","𫭢"],"zhēng chéng":["埩"],kōng:["埪","崆","箜","躻","錓","鵼"],"cǎi cài":["埰","寀","采"],"chù tòu":["埱"],běng:["埲","琫","菶","鞛"],"kǎn xiàn":["埳"],"yì shì":["埶","醳"],péi:["培","毰","裴","裵","賠","赔","錇","锫","阫","陪"],"sào sǎo":["埽"],"jǐn qīn jìn":["堇"],"péng bèng":["堋"],"qiàn zàn jiàn":["堑"],àn:["堓","屵","岸","按","暗","案","胺","荌","豻","貋","錌","闇","隌","黯"],"duò huī":["堕","墮"],huán:["堚","寏","寰","峘","桓","洹","澴","獂","环","環","糫","繯","缳","羦","荁","萈","萑","豲","鍰","鐶","锾","镮","闤","阛","雈","鬟","鹮","𬘫","𤩽"],"bǎo bǔ pù":["堡"],"máo móu wǔ":["堥"],ruán:["堧","壖","撋"],"ài è yè":["堨"],gèng:["堩","暅"],méi:["堳","塺","媒","嵋","徾","攗","枚","栂","梅","楣","楳","槑","湄","湈","煤","猸","玫","珻","瑂","眉","睂","禖","脄","脢","腜","苺","莓","葿","郿","酶","鎇","镅","霉","鶥","鹛","黴"],dǔ:["堵","琽","睹","笃","篤","覩","賭","赌"],féng:["堸","綘","艂","逢"],hèng:["堼"],chūn:["堾","媋","旾","春","暙","杶","椿","槆","橁","櫄","瑃","箺","萅","蝽","輴","鰆","鶞","䲠"],jiǎng:["塂","奖","奨","奬","桨","槳","獎","耩","膙","蒋","蔣","講","讲","顜"],huāng:["塃","巟","慌","肓","荒","衁"],duàn:["塅","断","斷","椴","段","毈","煅","瑖","碫","簖","籪","緞","缎","腶","葮","躖","鍛","锻"],tǎ:["塔","墖","獭","獺","鮙","鰨","鳎"],wěng:["塕","奣","嵡","攚","暡","瞈","蓊"],"sāi sài sè":["塞"],zàng:["塟","弉","臓","臟","葬","蔵","銺"],tián:["塡","屇","恬","沺","湉","璳","甛","甜","田","畋","畑","碵","磌","胋","闐","阗","鴫","鷆","鷏"],zhèng:["塣","幁","政","証","諍","證","证","诤","郑","鄭","靕","鴊"],"tián zhèn":["填"],wēn:["塭","昷","榲","殟","温","溫","瑥","瘟","蕰","豱","輼","轀","辒","鎾","饂","鰛","鰮","鳁"],liù:["塯","廇","磟","翏","雡","霤","餾","鬸","鷚","鹨"],hǎi:["塰","海","烸","酼","醢"],lǎng:["塱","朖","朗","朤","烺","蓢","㮾"],bèng:["塴","揼","泵","甏","綳","蹦","迸","逬","鏰","镚"],chén:["塵","宸","尘","忱","敐","敶","晨","曟","栕","樄","沉","煁","瘎","臣","茞","莀","莐","蔯","薼","螴","訦","諶","軙","辰","迧","鈂","陈","陳","霃","鷐","麎"],"ōu qiū":["塸"],"qiàn jiàn":["塹"],"zhuān tuán":["塼"],shuǎng:["塽","慡","漺","爽","縔","鏯"],shú:["塾","婌","孰","璹","秫","贖","赎"],lǒu:["塿","嵝","嶁","甊","篓","簍"],chí:["墀","弛","持","池","漦","竾","筂","箎","篪","茌","荎","蚳","謘","貾","赿","踟","迟","迡","遅","遟","遲","鍉","馳","驰"],shù:["墅","庶","庻","怷","恕","戍","束","树","樹","沭","漱","潄","濖","竖","竪","絉","腧","荗","蒁","虪","術","裋","豎","述","鉥","錰","鏣","霔","鶐","𬬸"],"dì zhì":["墆","疐"],kàn:["墈","崁","瞰","矙","磡","衎","鬫"],chěn:["墋","夦","硶","碜","磣","贂","趻","踸","鍖"],"zhǐ zhuó":["墌"],qiǎng:["墏","繈","繦","羥","襁"],zēng:["増","增","憎","璔","矰","磳","罾","譄","鄫","鱛","䎖"],qiáng:["墙","墻","嫱","嬙","樯","檣","漒","牆","艢","蔃","蔷","蘠"],"kuài tuí":["墤"],"tuǎn dǒng":["墥"],"qiáo què":["墧"],"zūn dūn":["墫"],"qiāo áo":["墽"],"yì tú":["墿"],"xué bó jué":["壆"],lǎn:["壈","嬾","孄","孏","懒","懶","揽","擥","攬","榄","欖","浨","漤","灠","纜","缆","罱","覧","覽","览","醂","顲"],huài:["壊","壞","蘾"],rǎng:["壌","壤","攘","爙"],"làn xiàn":["壏"],dǎo:["壔","导","導","岛","島","嶋","嶌","嶹","捣","搗","擣","槝","祷","禂","禱","蹈","陦","隝","隯"],ruǐ:["壡","桵","橤","繠","蕊","蕋","蘂","蘃"],san:["壭"],zhuàng:["壮","壯","壵","撞","焋","状","狀"],"ké qiào":["壳","殼"],kǔn:["壸","壼","悃","捆","梱","硱","祵","稇","稛","綑","裍","閫","閸","阃"],mǎng:["壾","漭","茻","莽","莾","蠎"],cún:["壿","存"],"zhǐ zhōng":["夂"],"gǔ yíng":["夃"],"jiàng xiáng":["夅","降"],"páng féng fēng":["夆"],zhāi:["夈","捚","摘","斋","斎","榸","粂","齋"],"xuàn xiòng":["夐"],wài:["外","顡"],"wǎn yuàn wān yuān":["夗"],"mǎo wǎn":["夘"],mèng:["夢","夣","孟","梦","癦","霥"],"dà dài":["大"],"fū fú":["夫","姇","枎","粰"],guài:["夬","怪","恠"],yāng:["央","姎","抰","殃","泱","秧","胦","鉠","鍈","雵","鴦","鸯"],"hāng bèn":["夯"],gǎo:["夰","搞","杲","槀","槁","檺","稁","稾","稿","縞","缟","菒","藁","藳"],"tāo běn":["夲"],"tóu tou":["头"],"yǎn tāo":["夵"],"kuā kuà":["夸","誇"],"jiá jiā gā xiá":["夹"],huà:["夻","婳","嫿","嬅","崋","摦","杹","枠","桦","槬","樺","澅","画","畫","畵","繣","舙","話","諙","譮","话","黊"],"jiā jiá gā xiá":["夾"],ēn:["奀","恩","蒽"],"dī tì":["奃"],"yǎn yān":["奄","渰"],pào:["奅","疱","皰","砲","礟","礮","靤","麭"],nài:["奈","柰","渿","耐","萘","褦","錼","鼐"],"quān juàn":["奍","弮","棬"],zòu:["奏","揍"],"qì qiè xiè":["契"],kāi:["奒","开","揩","鐦","锎","開"],"bēn bèn":["奔","泍"],tào:["套"],"zàng zhuǎng":["奘"],běn:["奙","本","楍","畚","翉","苯"],"xùn zhuì":["奞"],shē:["奢","檨","猞","畭","畲","賒","賖","赊","輋","𪨶"],"hǎ pò tǎi":["奤"],"ào yù":["奥","奧","澚"],yūn:["奫","氲","氳","蒀","蒕","蝹","贇","赟","𫖳"],"duǒ chě":["奲"],"nǚ rǔ":["女"],nú:["奴","孥","笯","駑","驽"],"dīng dǐng tiǎn":["奵"],"tā jiě":["她"],nuán:["奻"],"hǎo hào":["好"],fàn:["奿","嬎","梵","汎","泛","滼","瀪","犯","畈","盕","笵","範","范","訉","販","贩","軬","輽","飯","飰","饭"],shuò:["妁","搠","朔","槊","烁","爍","矟","蒴","鎙","鑠","铄"],"fēi pèi":["妃"],wàng:["妄","忘","旺","望","朢"],zhuāng:["妆","妝","娤","庄","庒","桩","梉","樁","粧","糚","荘","莊","装","裝"],mā:["妈","媽"],"fū yōu":["妋"],"hài jiè":["妎"],dù:["妒","妬","杜","殬","渡","秺","芏","荰","螙","蠧","蠹","鍍","镀","靯","𬭊"],miào:["妙","庙","庿","廟","玅","竗"],"fǒu pēi pī":["妚"],"yuè jué":["妜"],niū:["妞"],"nà nàn":["妠"],tuǒ:["妥","嫷","庹","椭","楕","橢","鬌","鰖","鵎"],"wàn yuán":["妧"],fáng:["妨","房","肪","防","魴","鲂"],nī:["妮"],zhóu:["妯","碡"],zhāo:["妱","巶","招","昭","釗","鉊","鍣","钊","駋","𬬿"],"nǎi nǐ":["妳"],tǒu:["妵","敨","紏","蘣","黈"],"xián xuán xù":["妶"],"zhí yì":["妷","秇"],ē:["妸","妿","婀","屙"],mèi:["妹","媚","寐","抺","旀","昧","沬","煝","痗","眛","睸","祙","篃","蝞","袂","跊","鬽","魅"],"qī qì":["妻"],"xū xǔ":["姁","稰"],"shān shàn":["姍","姗","苫","釤","钐"],mán:["姏","慲","樠","蛮","蠻","謾","饅","馒","鬗","鬘","鰻","鳗"],jiě:["姐","媎","檞","毑","飷"],"wěi wēi":["委"],pīn:["姘","拼","礗","穦","馪","驞"],"huá huó":["姡"],"jiāo xiáo":["姣"],"gòu dù":["姤"],"lǎo mǔ":["姥"],"nián niàn":["姩"],zhěn:["姫","屒","弫","抮","昣","枕","畛","疹","眕","稹","縝","縥","缜","聄","萙","袗","裖","覙","診","诊","軫","轸","辴","駗","鬒"],héng:["姮","恆","恒","烆","珩","胻","蘅","衡","鑅","鴴","鵆","鸻"],"jūn xún":["姰"],"kuā hù":["姱"],"è yà":["姶"],"xiān shēn":["姺"],wá:["娃"],"ráo rǎo":["娆","嬈"],"shào shāo":["娋"],xiē:["娎","揳","楔","歇","蝎","蠍"],"wǔ méi mǔ":["娒"],"chuò lài":["娕"],niáng:["娘","嬢","孃"],"nà nuó":["娜","𦰡"],"pōu bǐ":["娝"],"něi suī":["娞"],tuì:["娧","煺","蛻","蜕","退","駾"],mǎn:["娨","屘","満","满","滿","螨","蟎","襔","鏋"],"wú wù yú":["娪"],"xī āi":["娭"],"zhuì shuì":["娷"],"dōng dòng":["娻"],"ǎi ái è":["娾"],"ē ě":["娿"],mián:["婂","嬵","宀","杣","棉","檰","櫋","眠","矈","矊","矏","綿","緜","绵","芇","蝒"],"pǒu péi bù":["婄"],biǎo:["婊","脿","表","裱","褾","諘","錶"],"fù fàn":["婏"],wǒ:["婐","婑","我"],"ní nǐ":["婗","棿"],"quán juàn":["婘","惓"],hūn:["婚","昏","昬","棔","涽","睧","睯","碈","荤","葷","蔒","轋","閽","阍"],"qiān jǐn":["婜"],"wān wà":["婠"],"lái lài":["婡","徕","徠"],"zhōu chōu":["婤"],"chuò nào":["婥"],"nüè àn":["婩"],"hùn kūn":["婫"],"dàng yáng":["婸"],nàn:["婻"],"ruò chuò":["婼"],jiǎ:["婽","岬","斚","斝","榎","槚","檟","玾","甲","胛","鉀","钾"],"tōu yú":["婾","媮"],"yù yú":["媀"],"wéi wěi":["媁"],"dì tí":["媂","珶","苐"],róu:["媃","揉","柔","渘","煣","瑈","瓇","禸","粈","糅","脜","腬","葇","蝚","蹂","輮","鍒","鞣","騥","鰇","鶔","𫐓"],"ruǎn nèn":["媆"],miáo:["媌","嫹","描","瞄","苗","鶓","鹋"],"yí pèi":["媐"],"mián miǎn":["媔"],"tí shì":["媞","惿"],"duò tuó":["媠","沲"],ǎo:["媪","媼","艹","芺","袄","襖","镺"],"chú zòu":["媰"],yìng:["媵","映","暎","硬","膡","鱦"],"qín shēn":["嫀"],jià:["嫁","幏","架","榢","稼","駕","驾"],sǎo:["嫂"],"zhēn zhěn":["嫃"],"jiē suǒ":["嫅"],"míng mǐng":["嫇"],niǎo:["嫋","嬝","嬲","茑","蔦","袅","裊","褭","鸟"],tāo:["嫍","幍","弢","慆","掏","搯","槄","涛","滔","濤","瑫","絛","縚","縧","绦","詜","謟","轁","鞱","韜","韬","飸","饕"],biáo:["嫑"],"piáo piāo":["嫖","薸"],xuán:["嫙","悬","懸","暶","檈","漩","玄","璇","璿","痃","蜁","𫠊"],"màn mān":["嫚"],kāng:["嫝","嵻","康","慷","槺","漮","砊","穅","糠","躿","鏮","鱇","𡐓","𩾌"],"hān nǎn":["嫨"],nèn:["嫩","嫰"],zhē:["嫬","遮"],"mā má":["嫲"],piè:["嫳"],zhǎn:["嫸","展","搌","斩","斬","琖","盏","盞","輾","醆","颭","飐"],"xiān yǎn jìn":["嬐"],liǎn:["嬚","敛","斂","琏","璉","羷","脸","臉","蔹","蘝","蘞","裣","襝","鄻"],"qióng huán xuān":["嬛"],dǒng:["嬞","懂","箽","董","蕫","諌"],cān:["嬠","湌","爘","飡","餐","驂","骖"],tiǎo:["嬥","宨","晀","朓","窱","脁"],bí:["嬶","荸","鼻"],liǔ:["嬼","柳","栁","桞","桺","橮","熮","珋","綹","绺","罶","羀","鋶","锍"],"qiān xiān":["孅","欦"],"xié huī":["孈"],"huān quán":["孉"],"lí lì":["孋","麗"],"zhú chuò":["孎"],kǒng:["孔","恐"],"mā zī":["孖"],"sūn xùn":["孙","孫"],"bèi bó":["孛","誖"],"yòu niū":["孧"],zhuǎn:["孨","竱","轉"],hái:["孩","骸"],nāo:["孬"],"chán càn":["孱"],bò:["孹","檗","蘗","譒"],nái:["孻","腉"],"níng nìng":["宁","寍","寗","寜","寧","甯"],zhái:["宅"],"tū jiā":["宊"],sòng:["宋","訟","誦","讼","诵","送","鎹","頌","颂","餸"],ròu:["宍","肉","譳"],zhūn:["宒","窀","衠","諄","谆","迍"],"mì fú":["宓"],"dàng tàn":["宕"],"wǎn yuān":["宛"],chǒng:["宠","寵"],qún:["宭","峮","帬","羣","群","裙","裠"],zǎi:["宰","崽"],"bǎo shí":["宲"],"jiā jia jie":["家"],"huāng huǎng":["宺"],kuān:["宽","寛","寬","臗","鑧","髋","髖"],"sù xiǔ xiù":["宿"],"jié zǎn":["寁"],"bìng bǐng":["寎"],"jìn qǐn":["寖"],"lóu jù":["寠"],"xiě xiè":["寫"],"qīn qìn":["寴"],cùn:["寸","籿"],duì:["对","対","對","怼","憝","懟","濧","瀩","碓","祋","綐","薱","譈","譵","轛","队","陮"],"lüè luó":["寽"],"shè yè yì":["射"],"jiāng jiàng qiāng":["将"],"jiāng jiàng":["將","浆","漿","畺"],zūn:["尊","嶟","樽","罇","遵","鐏","鱒","鳟","鶎","鷷","𨱔"],"shù zhù":["尌","澍"],xiǎo:["小","晓","暁","曉","皛","皢","筱","筿","篠","謏","𫍲"],"jié jí":["尐","诘","鞊"],"shǎo shào":["少"],ěr:["尒","尓","尔","栮","毦","洱","爾","珥","耳","薾","衈","趰","迩","邇","鉺","铒","餌","饵","駬"],"wāng yóu":["尢"],wāng:["尣","尩","尪","尫","汪"],liào:["尥","尦","廖","撂","料","炓","窷","鐐","镣","𪤗"],"méng máng lóng páng":["尨"],gà:["尬","魀"],"kuì kuǐ":["尯"],tuí:["尵","弚","穨","蘈","蹪","隤","頹","頺","頽","颓","魋","𬯎"],yǐn:["尹","嶾","引","朄","檃","檼","櫽","淾","濥","瘾","癮","粌","蘟","蚓","螾","讔","赺","趛","輑","鈏","靷"],"chǐ chě":["尺"],kāo:["尻","髛"],"jìn jǐn":["尽"],"wěi yǐ":["尾"],"niào suī":["尿"],céng:["层","層","嶒","驓"],diǎo:["屌"],"píng bǐng bīng":["屏"],lòu:["屚","漏","瘘","瘺","瘻","鏤","镂","陋"],"shǔ zhǔ":["属","屬"],"xiè tì":["屟"],"chè cǎo":["屮"],"tún zhūn":["屯"],"nì jǐ":["屰"],"hóng lóng":["屸"],"qǐ kǎi":["岂","豈"],áng:["岇","昂","昻"],"gǎng gāng":["岗","崗"],kě:["岢","敤","渇","渴","炣"],gǒu:["岣","狗","玽","笱","耇","耈","耉","苟","豿"],tiáo:["岧","岹","樤","祒","笤","芀","萔","蓚","蓨","蜩","迢","鋚","鎥","鞗","髫","鯈","鰷","鲦","齠","龆"],"qū jū":["岨"],lǐng:["岭","嶺","領","领"],pò:["岶","敀","洦","湐","烞","珀","破","砶","粕","蒪","魄"],"bā kè":["峇"],luò:["峈","摞","洛","洜","犖","珞","笿","纙","荦","詻","雒","駱","骆","鵅"],"fù niè":["峊"],ěn:["峎"],"zhì shì":["峙","崻"],qiǎ:["峠","跒","酠","鞐"],"qiáo jiào":["峤","癄"],"xié yé":["峫"],bū:["峬","庯","晡","誧","逋","鈽","錻","钸","餔","鵏"],chóng:["崇","崈","爞","虫","蝩","蟲","褈","隀"],"zú cuì":["崒","椊"],"líng léng":["崚"],"dòng dōng":["崠"],xiáo:["崤","洨","淆","訤","誵"],"pí bǐ":["崥","芘"],"zhǎn chán":["崭","嶃","嶄"],"wǎi wēi":["崴"],"yáng dàng":["崵"],"shì dié":["崼"],yào:["崾","曜","熎","燿","矅","穾","窔","筄","耀","艞","药","葯","薬","藥","袎","覞","詏","讑","靿","鷂","鹞","鼼"],"kān zhàn":["嵁"],"hán dǎng":["嵅"],"qiàn kàn":["嵌"],"wù máo":["嵍"],"kě jié":["嵑","嶱"],"wēi wěi":["嵔"],kē:["嵙","柯","棵","榼","樖","牁","牱","犐","珂","疴","瞌","磕","礚","科","稞","窠","萪","薖","蚵","蝌","趷","轲","醘","鈳","钶","頦","顆","颗","髁"],"dàng táng":["嵣"],"róng yíng":["嵤","爃"],"ái kǎi":["嵦"],"kāo qiāo":["嵪"],cuó:["嵯","嵳","痤","矬","蒫","蔖","虘","鹺","鹾"],"qiǎn qīn":["嵰"],"dì dié":["嵽"],cēn:["嵾"],dǐng:["嵿","艼","薡","鐤","頂","顶","鼎","鼑"],"áo ào":["嶅"],"pǐ pèi":["嶏"],"jiào qiáo":["嶠","潐"],"jué guì":["嶡","鳜"],"zhān shàn":["嶦","鳣"],"xiè jiè":["嶰"],"guī xī juàn":["嶲"],rū:["嶿"],"lì liè":["巁","棙","爄","綟"],"xī guī juàn":["巂"],"yíng hōng":["巆"],yǐng:["巊","廮","影","摬","梬","潁","瘿","癭","矨","穎","郢","鐛","頴","颍","颕","颖"],chǎo:["巐","炒","煼","眧","麨"],cuán:["巑","櫕","欑"],chuān:["巛","川","氚","瑏","穿"],"jīng xíng":["巠"],cháo:["巢","巣","晁","漅","潮","牊","窲","罺","謿","轈","鄛","鼌"],qiǎo:["巧","愀","髜"],gǒng:["巩","廾","拱","拲","栱","汞","珙","輁","鞏"],"chà chā chāi cī":["差"],"xiàng hàng":["巷"],shuài:["帅","帥","蟀"],pà:["帊","帕","怕","袙"],"tǎng nú":["帑"],"mò wà":["帓"],"tiē tiě tiè":["帖"],zhǒu:["帚","晭","疛","睭","箒","肘","菷","鯞"],"juǎn juàn":["帣"],shuì:["帨","涗","涚","睡","稅","税","裞"],"chóu dào":["帱","幬"],"jiǎn jiān sàn":["帴"],"shà qiè":["帹"],"qí jì":["帺","荠"],"shān qiāo shēn":["幓"],"zhuàng chuáng":["幢"],"chān chàn":["幨"],miè:["幭","懱","搣","滅","灭","烕","礣","篾","蔑","薎","蠛","衊","鑖","鱴","鴓"],"gān gàn":["干"],"bìng bīng":["并","幷"],"jī jǐ":["幾"],"guǎng ān":["广"],guǎng:["広","廣","犷","獷"],me:["庅"],"dùn tún":["庉"],"bài tīng":["庍"],"yìng yīng":["应"],"dǐ de":["底"],"dù duó":["度"],"máng méng páng":["庬"],"bìng píng":["庰"],chěng:["庱","悜","睈","逞","騁","骋"],"jī cuò":["庴"],qǐng:["庼","廎","檾","漀","苘","請","謦","请","頃","顷"],"guī wěi huì":["廆"],"jǐn qín":["廑"],kuò:["廓","扩","拡","擴","濶","筈","萿","葀","蛞","闊","阔","霩","鞟","鞹","韕","頢","鬠"],"qiáng sè":["廧","薔"],"yǐn yìn":["廴","隐","隠","隱","飮","飲","饮"],"pò pǎi":["廹","迫"],"nòng lòng":["弄"],"dì tì tuí":["弟"],"jué zhāng":["弡"],"mí mǐ":["弥","彌","靡"],chāo:["弨","怊","抄","欩","訬","超","鈔","钞"],yi:["弬"],shāo:["弰","旓","烧","焼","燒","筲","艄","萷","蕱","輎","髾","鮹"],"xuān yuān":["弲"],"qiáng qiǎng jiàng":["強","强"],"tán dàn":["弹","醈"],biè:["彆"],"qiáng jiàng qiǎng":["彊"],"jì xuě":["彐"],tuàn:["彖","褖"],yuē:["彟","曰","曱","矱"],"shān xiǎn":["彡"],wén:["彣","文","炆","珳","瘒","繧","聞","芠","蚉","蚊","螡","蟁","閺","閿","闅","闦","闻","阌","雯","馼","駇","魰","鳼","鴍","鼤","𫘜"],"péng bāng":["彭"],"piāo piào":["彯"],"zhuó bó":["彴"],"tuǒ yí":["彵"],"páng fǎng":["彷"],wǎng:["彺","往","徃","惘","枉","棢","網","网","罒","罓","罔","罖","菵","蛧","蝄","誷","輞","辋","魍"],cú:["徂","殂"],"dài dāi":["待"],huái:["徊","怀","懐","懷","槐","淮","耲","蘹","褢","褱","踝"],"wā wàng jiā":["徍"],"chěng zhèng":["徎"],"dé děi de":["得"],"cóng zòng":["從"],"shì tǐ":["徥"],"tí chí":["徲","鶗","鶙"],dé:["徳","德","恴","悳","惪","淂","鍀","锝"],"zhǐ zhēng":["徴","徵"],bié:["徶","癿","莂","蛂","襒","蹩"],"chōng zhǒng":["徸"],"jiǎo jiào":["徼","笅","筊"],"lòng lǒng":["徿"],"qú jù":["忂","渠","瞿","螶"],"dìng tìng":["忊"],gǎi:["忋","改"],rěn:["忍","栠","栣","秹","稔","綛","荏","荵","躵"],chàn:["忏","懴","懺","硟","羼","韂","顫"],tè:["忑","慝","特","蟘","鋱","铽"],"tè tēi tuī":["忒"],"gān hàn":["忓","攼"],"yì qì":["忔"],"tài shì":["忕"],"xī liě":["忚"],"yīng yìng":["応","應","譍"],"mǐn wěn mín":["忞","忟"],"sōng zhōng":["忪"],"yù shū":["忬","悆"],"qí shì":["忯","耆"],"tún zhūn dùn":["忳"],"qián qín":["忴","扲"],hún:["忶","浑","渾","餛","馄","魂","鼲"],niǔ:["忸","扭","炄","狃","紐","纽","莥","鈕","钮","靵"],"kuáng wǎng":["忹"],"kāng hàng":["忼"],"kài xì":["忾","愾"],òu:["怄","慪"],"bǎo bào":["怉"],"mín mén":["怋"],"zuò zhà":["怍"],zěn:["怎"],yàng:["怏","恙","样","様","樣","漾","羕","詇"],"kòu jù":["怐"],"náo niú":["怓"],"zhēng zhèng":["怔","掙","钲","铮"],"tiē zhān":["怗"],"hù gù":["怘"],"cū jù zū":["怚"],"sī sāi":["思"],"yóu chóu":["怞"],"tū dié":["怢"],"yōu yào":["怮"],xuàn:["怰","昡","楦","泫","渲","炫","琄","眩","碹","絢","縼","繏","绚","蔙","衒","袨","贙","鉉","鏇","铉","镟","颴"],"xù xuè":["怴"],"bì pī":["怶"],"xī shù":["怸"],"nèn nín":["恁"],"tiāo yáo":["恌"],"xī qī xù":["恓"],"xiào jiǎo":["恔"],"hū kuā":["恗"],nǜ:["恧","朒","衂","衄"],hèn:["恨"],"dòng tōng":["恫"],"quán zhuān":["恮"],"è wù ě wū":["恶","惡"],tòng:["恸","慟","憅","痛","衕"],"yuān juàn":["悁"],"qiāo qiǎo":["悄"],"jiè kè":["悈"],"hào jiào":["悎"],huǐ:["悔","檓","毀","毁","毇","燬","譭"],"mán mèn":["悗","鞔"],"yī yì":["悘","衣"],quān:["悛","箞","鐉","𨟠"],"kuī lǐ":["悝"],"yì niàn":["悥"],"mèn mēn":["悶"],guàn:["悹","悺","惯","慣","掼","摜","樌","欟","泴","涫","潅","灌","爟","瓘","盥","礶","祼","罆","罐","貫","贯","躀","遦","鏆","鑵","鱹","鸛","鹳"],"kōng kǒng":["悾"],"lǔn lùn":["惀"],guǒ:["惈","果","椁","槨","粿","綶","菓","蜾","裹","褁","輠","餜","馃"],"yuān wǎn":["惌","箢"],"lán lín":["惏"],"yù xù":["惐","淢"],"chuò chuì":["惙"],"hūn mèn":["惛"],"chǎng tǎng":["惝"],"suǒ ruǐ":["惢"],cǎn:["惨","慘","憯","黪","黲","䅟"],cán:["惭","慙","慚","残","殘","蚕","蝅","蠶","蠺"],"dàn dá":["惮","憚"],rě:["惹"],"yú tōu":["愉"],"kài qì":["愒"],"dàng táng shāng yáng":["愓"],"chén xìn dān":["愖"],"kè qià":["愘"],nuò:["愞","懦","懧","掿","搦","榒","稬","穤","糑","糥","糯","諾","诺","蹃","逽","鍩","锘"],gǎn:["感","擀","敢","桿","橄","澉","澸","皯","秆","稈","笴","芉","衦","赶","趕","鱤","鳡"],"còng sōng":["愡"],"sāi sī sǐ":["愢"],"gōng gòng hǒng":["愩","慐"],"shuò sù":["愬","洬"],"yáo yào":["愮"],huàng:["愰","曂","榥","滉","皝","皩","鎤","㿠"],zhěng:["愸","抍","拯","整","晸"],cǎo:["愺","艸","草","騲"],"xì xié":["慀"],"cǎo sāo":["慅"],"xù chù":["慉"],"qiè qiàn":["慊"],"cáo cóng":["慒"],"ào áo":["慠"],"lián liǎn":["慩","梿","槤","櫣"],"jìn qín jǐn":["慬"],"dì chì":["慸"],"zhí zhé":["慹"],"lóu lǚ":["慺","鷜"],còng:["憁","謥"],"zhī zhì":["憄","知","織","织"],chēng:["憆","摚","撐","撑","晿","柽","棦","橕","檉","泟","浾","琤","瞠","碀","緽","罉","蛏","蟶","赪","赬","鏿","鐣","阷","靗","頳","饓"],biē:["憋","虌","鱉","鳖","鼈","龞"],"chéng dèng zhèng":["憕"],"xǐ xī":["憘"],"duì dùn tūn":["憞"],"xiāo jiāo":["憢"],"xián xiàn":["憪"],"liáo liǎo":["憭","燎","爎","爒"],shéng:["憴","縄","繉","繩","绳","譝"],"náo nǎo náng":["憹"],"jǐng jìng":["憼"],"jǐ jiǎo":["憿"],"xuān huān":["懁"],"cǎo sāo sào":["懆"],mèn:["懑","懣","暪","焖","燜"],"mèng méng měng":["懜"],"ài yì nǐ":["懝"],"méng měng":["懞","瞢","矒"],"qí jī jì":["懠"],mǒ:["懡"],"lán xiàn":["懢"],"yōu yǒu":["懮"],"liú liǔ":["懰","藰"],ràng:["懹","譲","讓","让"],huān:["懽","欢","歓","歡","獾","讙","貛","酄","驩","鴅","鵍"],nǎn:["戁","揇","湳","煵","腩","蝻","赧"],"mí mó":["戂"],"gàng zhuàng":["戅","戆"],"zhuàng gàng":["戇"],"xū qu":["戌"],"xì hū":["戏","戯","戲"],"jiá gā":["戛"],zéi:["戝","蠈","賊","贼","鰂","鱡","鲗"],děng:["戥","等"],"hū xì":["戱"],chuō:["戳","踔","逴"],"biǎn piān":["扁"],"shǎng jiōng":["扄"],"shàn shān":["扇"],cái:["才","材","纔","裁","財","财"],"zhā zā zhá":["扎"],"lè lì cái":["扐"],"bā pá":["扒"],"dǎ dá":["打"],rēng:["扔"],"fǎn fú":["払"],"diǎo dí yuē lì":["扚"],"káng gāng":["扛"],"yū wū":["扜"],"yū wū kū":["扝"],"tuō chǐ yǐ":["扡"],"gǔ jié xì gē":["扢"],dèn:["扥","扽"],"sǎo sào":["扫","掃"],rǎo:["扰","擾","隢"],"xī chā qì":["扱"],"bān pān":["扳"],"bā ào":["扷"],"xī zhé":["扸"],"zhì sǔn kǎn":["扻"],zhǎo:["找","沼","瑵"],"kuáng wǎng zài":["抂"],"hú gǔ":["抇","鹄","鹘"],"bǎ bà":["把"],"dǎn shěn":["抌"],"nè nì ruì nà":["抐"],zhuā:["抓","檛","簻","膼","髽"],póu:["抔","裒"],"zhé shé zhē":["折"],"póu pōu fū":["抙","捊"],pāo:["抛","拋","脬","萢"],"ǎo ào niù":["抝"],"lūn lún":["抡","掄"],"qiǎng qiāng chēng":["抢"],"zhǐ zhǎi":["抧"],"bù pū":["抪","柨"],"yǎo tāo":["抭"],"hē hè qiā":["抲"],"nǐ ní":["抳"],"pī pēi":["抷"],"mǒ mò mā":["抹"],chōu:["抽","犨","犫","瘳","篘"],"jiā yá":["拁"],"fú bì":["拂","畐","鶝"],zhǎ:["拃","眨","砟","鮺","鲝"],"dān dàn dǎn":["担"],"chāi cā":["拆"],niān:["拈","蔫"],"lā lá lǎ là":["拉"],"bàn pàn":["拌"],pāi:["拍"],līn:["拎"],guǎi:["拐","枴","柺"],"tuò tà zhí":["拓"],"ào ǎo niù":["拗"],"jū gōu":["拘"],"pīn pàn fān":["拚"],"bài bái":["拜"],bài:["拝","敗","稗","粺","薭","贁","败","韛"],qiá:["拤"],"nǐng níng nìng":["拧"],"zé zhái":["择","擇"],hén:["拫","痕","鞎"],"kuò guā":["括"],"jié jiá":["拮"],nǐn:["拰"],shuān:["拴","栓","閂","闩"],"cún zùn":["拵"],"zā zǎn":["拶","桚"],kǎo:["拷","攷","栲","烤","考"],"yí chǐ hài":["拸"],"cè sè chuò":["拺"],"zhuài zhuāi yè":["拽"],"shí shè":["拾"],bāi:["挀","掰"],"kuò guāng":["挄"],nòng:["挊","挵","齈"],"jiào jiāo":["挍","敎","教"],"kuà kū":["挎"],"ná rú":["挐"],"tiāo tiǎo":["挑"],"dié shè":["挕"],liě:["挘","毟"],"yà yǎ":["挜","掗"],"wō zhuā":["挝"],"xié jiā":["挟","挾"],"dǎng dàng":["挡","擋"],"zhèng zhēng":["挣","正","症"],"āi ái":["挨"],"tuō shuì":["挩","捝"],"tǐ tì":["挮"],"suō shā":["挱"],"sā shā suō":["挲"],"kēng qiān":["挳","摼"],"bàng péng":["挷"],"ruó ruá":["挼"],"jiǎo kù":["捁"],"wǔ wú":["捂"],tǒng:["捅","桶","筒","筩","統","綂","统","㛚"],"huò chì":["捇"],"tú shū chá":["捈"],"lǚ luō":["捋"],"shāo shào":["捎","稍"],niē:["捏","揑"],"shù sǒng sōu":["捒"],"yé yú":["捓"],"jué zhuó":["捔"],"bù pú zhì":["捗"],zùn:["捘","銌"],lāo:["捞","撈","粩"],sǔn:["损","損","榫","笋","筍","箰","鎨","隼"],"wàn wǎn wān yù":["捥"],pěng:["捧","淎","皏"],shě:["捨"],"fǔ fù bǔ":["捬"],dáo:["捯"],"luò luǒ wǒ":["捰"],"juǎn quán":["捲"],"chēn tiǎn":["捵"],"niǎn niē":["捻"],"ruó wěi ré":["捼"],zuó:["捽","昨","秨","稓","筰","莋","鈼"],"wò xiá":["捾"],"qìng qiàn":["掅"],"póu pǒu":["掊"],qiā:["掐","葜"],"pái pǎi":["排"],"qiān wàn":["掔"],"yè yē":["掖"],"niè nǐ yì":["掜"],"huò xù":["掝"],"yàn shàn yǎn":["掞"],"zhěng dìng":["掟"],kòng:["控","鞚"],tuī:["推","蓷","藬"],"zōu zhōu chōu":["掫"],tiàn:["掭","舚"],kèn:["掯","裉","褃"],pá:["掱","杷","潖","爬","琶","筢"],"guó guāi":["掴"],"dǎn shàn":["掸","撣"],"chān xiān càn shǎn":["掺"],sāo:["掻","搔","溞","繅","缫","螦","騒","騷","鰠","鱢","鳋"],pèng:["掽","椪","槰","碰","踫"],"zhēng kēng":["揁"],"jiū yóu":["揂"],"jiān jiǎn":["揃","籛"],"pì chè":["揊"],"sāi zǒng cāi":["揌"],"tí dī dǐ":["提"],"zǒng sōng":["揔"],"huáng yóng":["揘"],"zǎn zuàn":["揝"],"xū jū":["揟"],"ké qiā":["揢"],"chuāi chuǎi chuài tuán zhuī":["揣"],"dì tì":["揥"],"lá là":["揦"],là:["揧","楋","溂","瓎","瘌","翋","臘","蝋","蝲","蠟","辢","辣","鑞","镴","鬎","鯻","𬶟"],"jiē qì":["揭"],"chòng dǒng":["揰"],"dié shé yè":["揲"],"jiàn qián jiǎn":["揵"],yé:["揶","爷","爺","瑘","鋣","鎁","铘"],chān:["搀","摻","攙","裧","襜","覘","觇","辿","鋓"],"gē gé":["搁","擱"],"lǒu lōu":["搂","摟"],"chōu zǒu":["搊"],chuāi:["搋"],sūn:["搎","槂","狲","猻","荪","蓀","蕵","薞","飧","飱"],"róng náng nǎng":["搑"],"péng bàng":["搒"],cuō:["搓","瑳","磋","蹉","遳","醝"],"kē è":["搕"],"nù nuò nòu":["搙"],"lā xié xiàn":["搚"],qiǔ:["搝","糗"],"xiǎn xiān":["搟"],"jié zhé":["搩"],"pán bān pó":["搫"],bān:["搬","攽","斑","斒","班","瘢","癍","肦","螁","螌","褩","辬","頒","颁","𨭉"],"zhì nái":["搱"],"wā wǎ wà":["搲"],huá:["搳","撶","滑","猾","蕐","螖","譁","鏵","铧","驊","骅","鷨"],"qiāng qiǎng chēng":["搶"],"tián shēn":["搷"],"ná nuò":["搻"],èn:["摁"],"shè niè":["摄","攝"],bìn:["摈","擯","殡","殯","膑","臏","髌","髕","髩","鬂","鬓","鬢"],"shā sà shǎi":["摋"],"chǎn sùn":["摌"],"jiū liú liáo jiǎo náo":["摎"],"féng pěng":["摓"],shuāi:["摔"],"dì tú zhí":["摕"],"qì jì chá":["摖"],"sōu sǒng":["摗"],"liǎn liàn":["摙"],"gài xì":["摡"],"hù chū":["摢"],tàng:["摥","烫","燙","鐋"],"nái zhì":["摨"],"mó mā":["摩"],"jiāng qiàng":["摪"],"áo qiáo":["摮"],"niè chè":["摰"],"mán màn":["摱"],"chàn cán":["摲"],"sè mí sù":["摵"],"biāo biào":["摽"],"juē jué":["撅"],piē:["撆","暼","氕","瞥"],"piě piē":["撇"],"zǎn zān zēn qián":["撍"],"sā sǎ":["撒"],hòng:["撔","訌","讧","闀","鬨"],"héng guàng":["撗"],niǎn:["撚","撵","攆","涊","焾","碾","簐","蹍","蹨","躎","輦","辇"],"chéng zhěng":["撜"],"huī wéi":["撝"],cāo:["撡","操","糙"],"xiāo sōu":["撨"],"liáo liāo":["撩"],"cuō zuǒ":["撮"],"wěi tuǒ":["撱"],cuān:["撺","攛","汆","蹿","躥","鑹","镩"],"qiào yāo jī":["撽"],"zhuā wō":["撾"],"lèi léi":["擂"],nǎng:["擃","攮","曩","灢"],"qíng jǐng":["擏"],kuǎi:["擓","蒯","㧟"],"pǐ bò":["擗"],"bò bāi":["擘"],"jù jǐ":["據"],mēng:["擝"],"sǒu sòu":["擞"],xǐng:["擤","箵","醒"],cā:["擦"],"níng nǐng nìng":["擰"],"zhì jié":["擳"],"là liè":["擸","爉"],"sòu sǒu":["擻"],"lì luò yuè":["擽"],"tī zhāi zhì":["擿"],pān:["攀","潘","眅","萠"],lèi:["攂","泪","涙","淚","禷","类","纇","蘱","酹","銇","錑","頛","頪","類","颣"],"cā sǎ":["攃"],"jùn pèi":["攈"],"lì luò":["攊","躒"],"là lài":["攋","櫴"],"lú luó":["攎"],"zǎn cuán":["攒"],"xiān jiān":["攕"],"mí mǐ mó":["攠"],"zǎn cuán zàn zuān":["攢"],zuàn:["攥"],"lì shài":["攦"],"lì luǒ":["攭"],"guǐ guì":["攱"],"jī qī yǐ":["攲"],fàng:["放"],"wù móu":["敄"],"chù shōu":["敊"],"gé guó è":["敋"],"duó duì":["敓","敚"],"duō què":["敠","敪"],"sàn sǎn":["散"],"dūn duì":["敦","镦"],"qī yǐ jī":["敧"],"xiào xué":["敩"],"shù shǔ shuò":["数","數"],"ái zhú":["敱","敳"],"xiòng xuàn":["敻"],"zhuó zhú":["斀"],"yì dù":["斁"],"lí tái":["斄"],"fěi fēi":["斐"],"yǔ zhōng":["斔"],"dòu dǒu":["斗"],"wò guǎn":["斡"],"tǒu tiǎo":["斢"],dòu:["斣","梪","浢","痘","窦","竇","脰","荳","豆","逗","郖","酘","閗","闘","餖","饾","鬥","鬦","鬪","鬬","鬭"],"yín zhì":["斦"],"chǎn jiè":["斺"],"wū yū yú":["於"],"yóu liú":["斿"],"páng bàng":["旁"],"máo mào":["旄"],"pī bì":["旇"],"xuán xuàn":["旋"],"wú mó":["无"],zǎo:["早","枣","栆","棗","澡","璪","薻","藻","蚤"],gā:["旮"],"gàn hàn":["旰"],"tái yīng":["旲"],"xū xù":["旴"],"tūn zhùn":["旽"],"wù wǔ":["旿"],"pò pèi":["昢"],zòng:["昮","猔","疭","瘲","粽","糉","糭","縦"],ǎi:["昹","毐","矮","蔼","藹","譪","躷","霭","靄"],"huàng huǎng":["晃"],xuǎn:["晅","癣","癬","选","選"],"xù kuā":["晇"],hǒng:["晎"],shài:["晒","曬"],"yūn yùn":["晕","煴"],"shèng chéng":["晟","椉","盛"],"jǐng yǐng":["景"],shǎn:["晱","熌","睒","覢","閃","闪","陕","陝"],"qǐ dù":["晵"],"ǎn àn yǎn":["晻"],"wǎng wàng":["暀"],zàn:["暂","暫","瓉","瓒","瓚","禶","襸","讃","讚","賛","贊","赞","蹔","鄼","錾","鏨","饡"],"yùn yūn":["暈"],"mín mǐn":["暋"],"dǔ shǔ":["暏"],shǔ:["暑","曙","潻","癙","糬","署","薥","薯","藷","蜀","蠴","襡","襩","鱪","鱰","黍","鼠","鼡"],"jiǎn lán":["暕"],nuǎn:["暖","煗","餪"],"bào pù":["暴"],"xī xǐ":["暿"],"pù bào":["曝","瀑"],"qū qǔ":["紶"],"qǔ qū":["曲"],"gèng gēng":["更"],"hū hù":["曶","雽"],"zēng céng":["曽","橧"],"céng zēng":["曾","竲"],"cǎn qián jiàn":["朁"],"qiè hé":["朅"],"bì pí":["朇","禆","笓","裨"],"yǒu yòu":["有"],"bān fén":["朌","鳻"],"fú fù":["服","洑"],"fěi kū":["朏","胐"],"qú xù chǔn":["朐"],"juān zuī":["朘"],"huāng máng wáng":["朚"],"qī jī":["期"],"tóng chuáng":["朣","橦"],zhá:["札","牐","箚","蚻","譗","鍘","铡","閘","闸"],"zhú shù shú":["朮"],"shù shú zhú":["术"],"zhū shú":["朱"],"pǔ pò pō piáo":["朴"],"dāo tiáo mù":["朷"],"guǐ qiú":["朹"],xiǔ:["朽","滫","潃","糔"],"chéng chēng":["朾"],zá:["杂","沯","砸","襍","雑","雜","雥","韴"],"yú wū":["杅"],"gān gǎn":["杆"],"chā chà":["杈"],"shān shā":["杉"],cūn:["村","皴","竴","膥","踆","邨"],"rèn ér":["杒","梕"],"sháo biāo":["杓"],"dì duò":["杕","枤"],"gū gài":["杚"],"yí zhì lí duò":["杝"],"gàng gāng":["杠"],"tiáo tiāo":["条","條"],"mà mǎ":["杩"],"sì zhǐ xǐ":["杫"],"yuán wán":["杬","蚖"],"bèi fèi":["杮"],"shū duì":["杸"],"niǔ chǒu":["杻"],"wò yuè":["枂","臒"],máo:["枆","毛","氂","渵","牦","矛","罞","茅","茆","蝥","蟊","軞","酕","鉾","錨","锚","髦","鶜"],"pī mì":["枈"],àng:["枊","盎","醠"],"fāng bìng":["枋"],"hù dǐ":["枑"],xín:["枔","襑","鐔","鬵"],"yāo yǎo":["枖"],"ě è":["枙"],"zhī qí":["枝"],"cōng zōng":["枞","樅"],"xiān zhēn":["枮"],"tái sì":["枱"],"gǒu jǔ gōu":["枸"],"bāo fú":["枹"],"yì xiè":["枻","栧"],"tuó duò":["柁","馱","駄","驮"],"yí duò lí":["柂"],"nǐ chì":["柅"],"pán bàn":["柈","跘"],"yǎng yàng yāng yīng":["柍"],"fù fū fǔ":["柎"],"bǎi bó bò":["柏"],mǒu:["某"],"sháo shào":["柖"],zhè:["柘","樜","浙","淛","蔗","蟅","這","鷓","鹧","䗪"],"yòu yóu":["柚","櫾"],"guì jǔ":["柜"],"zhà zuò":["柞"],"dié zhì":["柣","眰"],"zhā zǔ zū":["柤"],"chá zhā":["查","査"],"āo ào":["柪","軪"],"bā fú pèi bó biē":["柭"],"duò zuó wù":["柮"],"bì bié":["柲"],"zhù chù":["柷"],"bēi pēi":["柸"],"shì fèi":["柹"],"shān zhà shi cè":["栅"],"lì yuè":["栎","櫟"],"qì qiè":["栔","砌"],"qī xī":["栖","蹊"],"guā kuò":["栝"],"bīng bēn":["栟"],"xiào jiào":["校"],"jiàn zùn":["栫","袸"],"yǒu yù":["栯"],"hé hú":["核"],gēn:["根","跟"],"zhī yì":["栺"],"gé gē":["格"],"héng háng":["桁"],"guàng guāng":["桄"],"yí tí":["桋","荑"],sāng:["桑","桒","槡"],"jú jié":["桔"],"yú móu":["桙"],"ráo náo":["桡","橈"],"guì huì":["桧","檜"],"chén zhèn":["桭"],"tīng yíng":["桯"],"bó po":["桲"],"bèn fàn":["桳"],"fēng fèng":["桻","葑"],"sù yìn":["梀"],"tǐng tìng":["梃"],"xuān juān xié":["梋"],"tú chá":["梌"],"āo yòu":["梎"],kuǎn:["梡","欵","款","歀"],"shāo sào":["梢"],"qín chén cén":["梣"],"lí sì qǐ":["梩"],"chān yán":["梴"],"bīn bīng":["梹","槟","檳"],"táo chóu dào":["梼"],"cōng sōng":["棇"],"gùn hùn":["棍"],"dé zhé":["棏"],"pái bèi pèi":["棑"],"bàng pǒu bèi bēi":["棓"],"dì dài tì":["棣"],sēn:["森","椮","槮","襂"],"rěn shěn":["棯"],"léng lēng líng":["棱"],"fú sù":["棴"],"zōu sǒu":["棷"],zōu:["棸","箃","緅","諏","诹","邹","郰","鄒","鄹","陬","騶","驺","鯫","鲰","黀","齱","齺"],"zhào zhuō":["棹"],"chēn shēn":["棽"],"jiē qiè":["椄"],"yǐ yī":["椅"],"chóu zhòu diāo":["椆"],"qiāng kōng":["椌"],"zhuī chuí":["椎"],"bēi pí":["椑"],mēn:["椚"],"quān juàn quán":["椦"],"duǒ chuán":["椯"],"wěi huī":["椲"],"jiǎ jiā":["椵"],"hán jiān":["椷"],"shèn zhēn":["椹"],"yàn yà":["椻"],"zhā chá":["楂"],"guō kuǎ":["楇"],"jí zhì":["楖"],"kǔ hù":["楛"],"yóu yǒu":["楢"],"sǒng cōng":["楤"],"yuán xuàn":["楥"],"yǎng yàng yīng":["楧"],pián:["楩","胼","腁","賆","蹁","駢","騈","骈","骿","㛹"],"dié yè":["楪"],"dùn shǔn":["楯"],"còu zòu":["楱"],"dì dǐ shì":["楴"],"kǎi jiē":["楷"],"róu ròu":["楺"],"lè yuè":["楽"],"wēn yùn":["榅","鞰"],lǘ:["榈","櫚","氀","膢","藘","閭","闾","驢","驴"],shén:["榊","神","鉮","鰰","𬬹"],"bī pi":["榌"],"zhǎn niǎn zhèn":["榐"],"fú fù bó":["榑"],"jiàn jìn":["榗"],"bǎng bàng":["榜"],"shā xiè":["榝","樧"],nòu:["槈","耨","鎒","鐞"],"qiǎn lián xiàn":["槏"],gàng:["槓","焵","焹","筻","鿍"],gāo:["槔","槹","橰","櫜","睾","篙","糕","羔","臯","韟","餻","高","髙","鷎","鷱","鼛"],"diān zhěn zhēn":["槙"],"kǎn jiàn":["槛"],"xí dié":["槢"],"jī guī":["槣"],"róng yōng":["槦"],"tuán shuàn quán":["槫"],"qì sè":["槭"],"cuī zhǐ":["槯"],"yǒu chǎo":["槱"],"màn wàn":["槾"],"lí chī":["樆"],"léi lěi":["樏","櫑","礌"],"cháo jiǎo chāo":["樔"],"chēng táng":["樘"],"jiū liáo":["樛"],"mó mú":["模"],"niǎo mù":["樢"],"héng hèng":["横","橫"],xuě:["樰","膤","艝","轌","雪","鱈","鳕"],"fá fèi":["橃"],rùn:["橍","润","潤","膶","閏","閠","闰"],"zhǎn jiǎn":["橏"],shùn:["橓","瞚","瞬","舜","蕣","順","顺","鬊"],"tuí dūn":["橔"],"táng chēng":["橖"],"sù qiū":["橚"],"tán diàn":["橝"],"fén fèn fèi":["橨"],"rǎn yān":["橪"],"cū chu":["橻"],"shū qiāo":["橾"],"píng bò":["檘"],"zhái shì tú":["檡"],"biǎo biāo":["檦"],"qiān lián":["檶"],"nǐ mí":["檷"],"jiàn kǎn":["檻"],"nòu ruǎn rú":["檽"],"jī jì":["櫅","禨"],"huǎng guǒ gǔ":["櫎"],"lǜ chū":["櫖"],"miè mèi":["櫗"],ōu:["櫙","欧","歐","殴","毆","瓯","甌","膒","藲","謳","讴","鏂","鴎","鷗","鸥"],"zhù zhuó":["櫡"],"jué jì":["櫭"],"huái guī":["櫰"],"chán zhàn":["欃"],"wéi zuì":["欈"],cáng:["欌","鑶"],"yù yì":["欥"],"chù qù xì":["欪"],"kài ài":["欬"],"yì yīn":["欭"],"xì kài":["欯"],"shuò sòu":["欶"],"ǎi ēi éi ěi èi ê̄ ế ê̌ ề":["欸"],"qī yī":["欹"],"chuā xū":["欻"],"chǐ chuài":["欼"],"kǎn qiàn":["欿"],"kǎn kè":["歁"],"chuǎn chuán":["歂"],"yīn yān":["歅"],"jìn qūn":["歏"],pēn:["歕"],"xū chuā":["歘"],"xī shè":["歙"],"liǎn hān":["歛"],"zhì chí":["歭"],"sè shà":["歰"],sǐ:["死"],"wěn mò":["歾"],piǎo:["殍","皫","瞟","醥","顠"],"qíng jìng":["殑"],"fǒu bó":["殕"],"zhí shi":["殖"],"yè yān yàn":["殗"],"hūn mèi":["殙"],chòu:["殠","臰","遚"],"kuì huì":["殨","溃","潰"],cuàn:["殩","熶","爨","窜","竄","篡","簒"],"yīn yān yǐn":["殷"],"qìng kēng shēng":["殸"],"yáo xiáo xiào":["殽"],"gū gǔ":["毂","蛄"],"guàn wān":["毌"],"dú dài":["毒"],"xún xùn":["毥"],mú:["毪","氁"],"dòu nuò":["毭"],"sāi suī":["毸"],lu:["氇"],sào:["氉","瘙","矂","髞"],"shì zhī":["氏"],"dī dǐ":["氐"],"máng méng":["氓"],"yáng rì":["氜"],shuǐ:["水","氵","氺","閖"],"zhěng chéng zhèng":["氶"],tǔn:["氽"],"fán fàn":["氾"],"guǐ jiǔ":["氿"],"bīn pà pā":["汃"],"zhuó què":["汋"],"dà tài":["汏"],pìn:["汖","牝","聘"],"hàn hán":["汗","馯"],tu:["汢"],"tāng shāng":["汤","湯"],"zhī jì":["汥"],"gàn hán cén":["汵"],"wèn mén":["汶"],"fāng pāng":["汸"],"hǔ huǎng":["汻"],"niú yóu":["汼"],hàng:["沆"],"shěn chén":["沈"],"dùn zhuàn":["沌"],"nǜ niǔ":["沑"],"méi mò":["沒","没"],"tà dá":["沓"],"mì wù":["沕"],"hóng pāng":["沗"],"shā shà":["沙"],"zhuǐ zǐ":["沝"],"ōu òu":["沤","漚"],"jǔ jù":["沮"],"tuō duó":["沰"],"mǐ lì":["沵"],"yí chí":["沶"],"xiè yì":["泄"],"bó pō":["泊"],"mì bì":["泌","秘"],"chù shè":["泏"],"yōu yòu āo":["泑"],"pēng píng":["泙","硑"],"pào pāo":["泡"],"ní nì":["泥","秜"],"yuè sà":["泧"],"jué xuè":["泬","疦"],"lóng shuāng":["泷","瀧"],"luò pō":["泺","濼"],"zé shì":["泽","澤"],"sǎ xǐ":["洒"],"sè qì zì":["洓"],"xǐ xiǎn":["洗"],"kǎo kào":["洘"],"àn yàn è":["洝"],"lěi lèi":["洡"],"qiè jié":["洯"],"qiǎn jiān":["浅"],"jì jǐ":["济","済","濟","纪"],"hǔ xǔ":["浒","滸"],"jùn xùn":["浚","濬"],"yǐng chéng yíng":["浧"],"liàn lì":["浰"],"féng hóng":["浲","溄"],"jiǒng jiōng":["浻"],"suī něi":["浽"],"yǒng chōng":["涌"],"tūn yūn":["涒"],"wō guō":["涡","渦"],hēng:["涥","脝"],"zhǎng zhàng":["涨","漲"],"shòu tāo":["涭"],shuàn:["涮","腨"],"kōng náng":["涳"],"wò wǎn yuān":["涴"],"tuō tuò":["涶"],wō:["涹","猧","窝","窩","莴","萵","蜗","蝸","踒"],"qiè jí":["淁"],"guǒ guàn":["淉"],"lín lìn":["淋","獜","疄"],"tǎng chǎng":["淌"],"nào chuò zhuō":["淖"],"péng píng":["淜"],féi:["淝","肥","腓","蜰"],"pì pèi":["淠"],"niǎn shěn":["淰"],"biāo hǔ":["淲"],"chún zhūn":["淳"],"hùn hún":["混"],qiǎn:["淺","繾","缱","肷","膁","蜸","譴","谴","遣","鑓"],"wèn mín":["渂"],"rè ruò luò":["渃"],"dú dòu":["渎","瀆","读"],"jiàn jiān":["渐","溅","漸","濺"],"miǎn shéng":["渑","澠"],"nuǎn nuán":["渜"],"qiú wù":["渞"],"tíng tīng":["渟"],"dì tí dī":["渧"],"gǎng jiǎng":["港"],"hōng qìng":["渹"],tuān:["湍","煓"],"huì mǐn xū":["湏"],"xǔ xù":["湑"],pén:["湓","瓫","盆","葐"],"mǐn hūn":["湣"],"tuàn nuǎn":["湪"],"qiū jiǎo":["湫","湬"],"yān yīn":["湮"],"bàn pán":["湴"],"zhuāng hún":["湷"],"yàn guì":["溎"],"lián liǎn nián xián xiàn":["溓"],"dá tǎ":["溚","鿎"],"liū liù":["溜","澑","蹓"],lùn:["溣"],mǎ:["溤","犸","獁","玛","瑪","码","碼","遤","鎷","馬","马","鰢","鷌"],"zhēn qín":["溱"],"nì niào":["溺"],"chù xù":["滀","畜"],"wěng wēng":["滃"],"hào xuè":["滈"],"qì xì xiē":["滊"],"xíng yíng":["滎"],"zé hào":["滜"],"piāo piào piǎo":["漂"],"cóng sǒng":["漎"],"féng péng":["漨"],"luò tà":["漯"],"pēng bēn":["漰"],"chóng shuāng":["漴"],"huǒ kuò huò":["漷"],"liáo liú":["漻"],"cuǐ cuī":["漼"],"cóng zǒng":["潀"],"cóng zōng":["潈"],"pì piē":["潎"],"dàng xiàng":["潒"],"huáng guāng":["潢"],"liáo lào lǎo":["潦"],"cōng zòng":["潨"],"zhí zhì":["潪"],"tān shàn":["潬"],"tú zhā":["潳"],"sàn sǎ":["潵"],hēi:["潶","黑","黒","𬭶"],"chéng dèng":["澄","瀓"],"cūn cún":["澊"],"péng pēng":["澎"],"hòng gǒng":["澒","銾"],"wàn màn":["澫"],"kuài huì":["澮"],"guō wō":["濄"],"pēn fén":["濆"],"jí shà":["濈"],"huì huò":["濊"],"dǐng tìng":["濎"],"mǐ nǐ":["濔"],"bì pì":["濞"],"cuì zuǐ":["濢"],"hù huò":["濩"],"ǎi kài kè":["濭"],"wěi duì":["濻","瀢"],"zàn cuán":["濽","灒"],"yǎng yàng":["瀁"],"wǎng wāng":["瀇"],"mò miè":["瀎","眜"],suǐ:["瀡","膸","髓"],"huái wāi":["瀤"],"zùn jiàn":["瀳"],"yīng yǐng yìng":["瀴"],"ráng ràng":["瀼"],shuàng:["灀"],"zhuó jiào zé":["灂"],sǎ:["灑","訯","靸"],"luán luàn":["灓"],"dǎng tǎng":["灙"],"xún quán quàn":["灥"],"huǒ biāo":["灬"],"zhà yù":["灹"],"fén bèn":["炃"],"jiǒng guì":["炅"],"pàng fēng":["炐"],quē:["炔","缺","缼","蒛"],biān:["炞","煸","甂","砭","笾","箯","籩","編","编","蝙","邉","邊","鍽","鞭","鯾","鯿","鳊"],"zhāo zhào":["炤"],"zhuō chù":["炪"],"pào páo bāo":["炮"],"páo fǒu":["炰"],"shǎn qián shān":["炶"],"zhà zhá":["炸"],"jiǎo yào":["烄"],quǎn:["烇","犬","犭","畎","綣","绻","虇"],"yàng yáng":["烊"],"lào luò":["烙"],"huí huǐ":["烠"],rè:["热","熱"],"fú páo":["烰"],"xiè chè":["烲","焎"],"yàn shān":["烻"],"hūn xūn":["焄"],kào:["焅","犒","銬","铐","靠","鮳","鯌","鲓","㸆"],"juān yè":["焆"],"jùn qū":["焌"],"tāo dào":["焘"],"chǎo jù":["焣"],"wò ài":["焥"],"zǒng cōng":["焧"],"xī yì":["焬"],"xìn xīn":["焮"],"chāo zhuō":["焯"],"xiǒng yīng":["焸","焽"],kuǐ:["煃","跬","蹞","頍","𫠆"],"huī yùn xūn":["煇"],"jiǎo qiāo":["煍"],"qián shǎn shān":["煔"],"xī yí":["煕"],"shà shā":["煞"],"yè zhá":["煠"],"yáng yàng":["煬"],"ēn yūn":["煾"],"yūn yǔn":["熅"],"hè xiāo":["熇"],xióng:["熊","熋","雄"],"xūn xùn":["熏","爋"],gòng:["熕","貢","贡"],liū:["熘"],"cōng zǒng":["熜"],"lù āo":["熝"],"shú shóu":["熟"],"fēng péng":["熢"],"cuǐ suī":["熣"],tēng:["熥","膯","鼟"],"yùn yù":["熨"],"áo āo":["熬"],"hàn rǎn":["熯"],"ōu ǒu":["熰"],"huáng huǎng":["熿"],"chǎn dǎn chàn":["燀"],"jiāo zhuó qiáo jué":["燋"],"yàn yān":["燕"],"tài liè":["燤"],āo:["爊"],"yàn xún":["爓"],"jué jiào":["爝","覐","覚","覺","觉"],"lǎn làn":["爦"],"zhuǎ zhǎo":["爪"],"zhǎo zhuǎ":["爫"],"fù fǔ":["父"],diē:["爹","褺","跌"],zāng:["牂","羘","臧","賍","賘","贓","贜","赃","髒"],"piàn piān":["片"],"biān miàn":["牑"],bǎng:["牓","綁","绑"],"yǒu yōng":["牗"],"chēng chèng":["牚","竀"],niú:["牛","牜"],"jiū lè":["牞"],"mù móu":["牟"],māng:["牤"],"gē qiú":["牫"],"yòu chōu":["牰"],"tè zhí":["犆"],bēn:["犇","錛","锛"],"jiān qián":["犍","玪"],má:["犘","痲","蔴","蟇","麻"],"máo lí":["犛"],"bá quǎn":["犮"],"zhuó bào":["犳"],"àn hān":["犴"],"kàng gǎng":["犺"],"pèi fèi":["犻"],"fān huān":["犿"],kuáng:["狂","狅","誑","诳","軖","軠","鵟","𫛭"],"yí quán chí":["狋"],"xīng shēng":["狌"],"tuó yí":["狏"],kǔ:["狜","苦"],"huán huān":["狟"],"hé mò":["狢"],"tà shì":["狧"],"máng dòu":["狵"],"xī shǐ":["狶"],suān:["狻","痠","酸"],"bài pí":["猈"],"jiān yàn":["猏","豣"],"yī yǐ":["猗"],"yá wèi":["猚"],cāi:["猜"],"māo máo":["猫","貓"],"chuàn chuān":["猭"],"tuān tuàn":["猯","貒"],"yà jiá qiè":["猰"],"hè xiē gé hài":["猲"],"biān piàn":["猵","獱"],"bó pò":["猼"],"háo gāo":["獋"],"fén fèn":["獖"],"yào xiāo":["獟"],"shuò xī":["獡"],"gé liè xiē":["獦"],"nòu rú":["獳"],"náo nǎo yōu":["獶"],ráng:["獽","瓤","禳","穣","穰","蘘","躟","鬤"],"náo yōu":["獿"],"lǜ shuài":["率"],"wáng wàng":["王"],"yáng chàng":["玚"],"mín wén":["玟"],"bīn fēn":["玢"],"mén yǔn":["玧"],"qiāng cāng":["玱","瑲","篬"],"án gān":["玵"],"xuán xián":["玹"],"cī cǐ":["玼","跐"],"yí tāi":["珆"],"zǔ jù":["珇"],fà:["珐","琺","蕟","髪","髮"],"yín kèn":["珢"],"huī hún":["珲"],"xuán qióng":["琁"],"fú fū":["琈"],"bǐng pín":["琕"],"cuì sè":["琗"],"yù wéi":["琟"],"tiǎn tiàn":["琠"],"zhuó zuó":["琢"],"běng pěi":["琣"],guǎn:["琯","璭","痯","筦","管","舘","輨","錧","館","馆","鳤"],"hún huī":["琿"],"xié jiē":["瑎"],"chàng dàng yáng":["瑒"],"tiàn zhèn":["瑱"],"bīn pián":["瑸","璸"],"tú shū":["瑹"],cuǐ:["璀","皠","趡"],"zǎo suǒ":["璅"],"jué qióng":["璚"],"lú fū":["璷"],"jì zī":["璾"],suí:["瓍","綏","绥","遀","随","隨","髄"],"mí xǐ":["瓕"],"qióng wěi wèi":["瓗"],"huán yè yà":["瓛"],"bó páo":["瓟"],"zhí hú":["瓡"],piáo:["瓢","闝"],"wǎ wà":["瓦"],"xiáng hóng":["瓨"],wèng:["瓮","甕","罋","蕹","齆"],"shèn shén":["甚"],ruí:["甤","緌","蕤"],yòng:["用","砽","苚","蒏","醟","㶲"],shuǎi:["甩"],béng:["甭","甮"],"yóu zhá":["甴"],"diàn tián shèng":["甸"],"tǐng dīng":["町","甼"],"zāi zī":["甾"],"bì qí":["畁"],"dá fú":["畗"],"cè jì":["畟"],"zāi zī tián":["畠"],"zhì chóu shì":["畤"],"fān pān":["畨","番"],"shē yú":["畬"],"dāng dàng dǎng":["當"],"jiāng qiáng":["疆"],"pǐ yǎ shū":["疋"],"jié qiè":["疌"],"yí nǐ":["疑"],nè:["疒","眲","訥","讷"],"gē yì":["疙"],"nüè yào":["疟","瘧"],"lì lài":["疠","癘"],"yǎ xiā":["疨"],xuē:["疶","蒆","薛","辥","辪","靴","鞾"],"dǎn da":["疸"],"fá biǎn":["疺"],"fèi féi":["疿","痱"],"shān diàn":["痁"],"téng chóng":["痋"],"tōng tóng":["痌"],"wěi yòu yù":["痏"],"tān shǐ":["痑"],"pū pù":["痡","鋪"],"bēng péng":["痭"],"má lìn":["痳"],"tiǎn diàn":["痶"],"ān yè è":["痷"],"kē ē":["痾"],"zhì chì":["瘈"],"jiǎ xiá xiā":["瘕"],"lěi huì":["瘣"],"chài cuó":["瘥"],"diān chēn":["瘨"],"da dá":["瘩"],"biě biē":["瘪"],qué:["瘸"],"dàn dān":["癉"],"guì wēi":["癐"],"nòng nóng":["癑"],"biē biě":["癟"],"bō bǒ":["癷"],bái:["白"],"jí bī":["皀"],"de dì dí dī":["的"],"pā bà":["皅"],"gāo háo":["皋"],"gāo yáo":["皐"],"lì luò bō":["皪"],"zhā cǔ":["皻"],"zhāo zhǎn dǎn":["皽"],"jiān jiàn":["监","監","鋻","间","鞬"],"gài gě hé":["盖"],"máng wàng":["盳"],yuǎn:["盶","逺","遠"],"tián xián":["盷"],"xiāng xiàng":["相"],dǔn:["盹","趸","躉"],"xì pǎn":["盻"],"shěng xǐng":["省"],"yún hùn":["眃"],"miǎn miàn":["眄"],"kàn kān":["看"],"yìng yāng yǎng":["眏"],"yǎo āo ǎo":["眑"],"jū xū kōu":["眗"],"yí chì":["眙"],"dié tì":["眣"],"bǐng fǎng":["眪"],"pàng pán":["眫"],"mī mí":["眯","瞇"],"xuàn shùn xún":["眴"],tiào:["眺","粜","糶","覜","趒"],"zhe zhuó zháo zhāo":["着"],"qiáo shào xiāo":["睄"],"cuó zhuài":["睉"],gùn:["睔","謴"],"suì zuì":["睟"],"pì bì":["睥","稫","辟"],"yì zé gāo":["睪"],"xǐng xìng":["睲"],"guì wèi kuì":["瞆"],"kòu jì":["瞉"],"qióng huán":["瞏"],"mán mén":["瞒","瞞"],"diāo dōu":["瞗"],"lou lóu lǘ":["瞜"],"shùn rún":["瞤"],"liào liǎo":["瞭","钌"],"jiàn xián":["瞯"],"wǔ mí":["瞴"],"guì kuì":["瞶"],"nǐng chēng":["矃"],"huò yuè":["矆"],"mēng méng":["矇"],"kuàng guō":["矌"],"guàn quán":["矔"],"mǎn mán":["矕"],"jīn guān qín":["矜"],"jīn qín guān":["矝"],"yù xù jué":["矞"],"jiǎo jiáo":["矫","矯"],duǎn:["短"],"shí dàn":["石"],"gāng qiāng kòng":["矼"],"huā xū":["砉"],"pīn bīn fēn":["砏"],"yán yàn":["研","硏"],"luǒ kē":["砢"],"fú fèi":["砩","笰"],"zhǔ zhù":["砫"],"lá lì lā":["砬"],"kuāng guāng":["硄"],"gè luò":["硌"],"shuò shí":["硕","碩"],"wèi wéi ái":["硙"],"què kè kù":["硞"],"mǎng bàng":["硥"],"luò lòng":["硦"],"yǒng tóng":["硧"],nüè:["硸","虐"],"kēng kěng":["硻"],"yān yǎn":["硽"],"zhuì chuí duǒ":["硾"],"kōng kòng":["硿"],"zòng cóng":["碂"],"jiān zhàn":["碊"],"lù liù":["碌","陆"],"què xī":["碏"],"lún lǔn lùn":["碖"],"náo gāng":["碙"],"jié yà":["碣"],"wèi wěi":["碨"],"tí dī":["碮"],"chá chā":["碴"],"qiāo què":["碻"],"sù xiè":["碿"],"liú liù":["磂","遛","鎦","馏"],"sī tí":["磃"],"bàng páng":["磅"],"huá kě gū":["磆"],"wěi kuǐ":["磈"],"xiá qià yà":["磍"],"lián qiān":["磏"],"wèi ái gài":["磑"],"lá lā":["磖"],"áo qiāo":["磝"],"pēng pèng":["磞","閛"],"yīn yǐn":["磤"],"lěi léi":["磥"],"mó mò":["磨"],"qì zhú":["磩"],"láo luò":["磱"],"pán bō":["磻"],"jí shé":["磼"],"hé qiāo qiào":["礉"],"kè huò":["礊"],"què hú":["礐"],"è qì":["礘"],cǎ:["礤","礸"],"xián xín":["礥"],"léi lěi lèi":["礧"],"yán yǎn":["礹"],"qí zhǐ":["祇","蚔"],"bēng fāng":["祊"],"bì mì":["祕"],suàn:["祘","笇","筭","算","蒜"],"piào piāo":["票"],"jì zhài":["祭"],"shuì lèi":["祱"],"jìn jīn":["禁"],"chán shàn":["禅"],"yáng shāng":["禓"],"zhī zhǐ tí":["禔"],"shàn chán":["禪"],"yú yù ǒu":["禺"],"zǐ zì":["秄"],"chá ná":["秅"],"zhǒng zhòng chóng":["种"],"hào mào":["秏"],"kù kū":["秙"],zū:["租","葅"],chèng:["秤","穪"],"huó kuò":["秮","秳"],"chēng chèn chèng":["称","稱"],"shì zhì":["秲","銴"],"fù pū":["秿"],"xùn zè":["稄"],"tú shǔ":["稌"],"zhùn zhǔn":["稕"],"jī qí":["稘","綨","觭"],"léng líng":["稜"],"zuì zú sū":["稡"],"xì qiè":["稧","郄"],"zhǒng zhòng":["種"],"zōng zǒng":["稯"],"xián jiān liàn":["稴"],"zī jiū":["稵"],"jī qǐ":["稽"],ròng:["穃"],"shān cǎn cēn":["穇"],"mén méi":["穈"],"jǐ jì":["穖"],"xiāo rào":["穘"],"zhuō bó":["穛"],"tóng zhǒng zhòng":["穜"],zuō:["穝"],"biāo pāo":["穮","藨"],"zhuō jué":["穱"],"cuán zàn":["穳"],"kōng kòng kǒng":["空"],"yū yǔ":["穻"],zhǎi:["窄","鉙"],báo:["窇","雹"],"kū zhú":["窋"],"jiào liáo liù":["窌"],"wā guī":["窐"],"tiǎo yáo":["窕"],"xūn yìn":["窨"],"yà yē":["窫"],"tián diān yǎn":["窴"],"chāo kē":["窼"],"kuǎn cuàn":["窽","窾"],"chù qì":["竐"],"qǔ kǒu":["竘"],"jìng zhěn":["竧"],"kǎn kàn":["竷"],"zhú dǔ":["竺"],"lè jīn":["竻"],"zhuì ruì":["笍"],"háng hàng":["笐"],"cén jìn hán":["笒"],"dā xiá nà":["笚"],"zé zuó":["笮"],"lóng lǒng":["笼","篭","籠","躘","龓"],"zhù zhú":["筑","築"],"dá dā":["答","荅"],shāi:["筛","篩","簁","籭"],"yún jūn":["筠"],"láng làng":["筤","郎","阆"],"zhì zhǐ":["筫"],o:["筽"],"póu bù fú pú":["箁"],"pái bēi":["箄"],gè:["箇","虼","鉻","铬"],"tái chí":["箈"],"guǎi dài":["箉"],"zhào dào":["箌"],"jīng qìng":["箐"],"lín lǐn":["箖"],"jùn qūn":["箘"],"shī yí":["箷","釶"],"yuē yào chuò":["箹"],"xiāo shuò qiào":["箾"],"gōng gǎn lǒng":["篢"],"páng péng":["篣"],"zhuó huò":["篧"],"jiǎn jiān":["篯"],"dí zhú":["篴"],"zān cēn cǎn":["篸"],"zhuàn suǎn zuàn":["篹"],"piǎo biāo":["篻"],"guó guì":["簂"],"cè jí":["簎"],"mì miè":["簚"],"shāi sī":["簛"],"sǔn zhuàn":["簨"],"gàn gǎn":["簳"],"bò bǒ":["簸"],"bó bù":["簿"],shi:["籂"],"zhēn jiān":["籈"],"zhuàn zuǎn":["籑"],"fān pān biān":["籓"],"sǒu shǔ":["籔"],zuǎn:["籫","繤","纂","纉","纘","缵"],nǚ:["籹","釹","钕"],"shā chǎo":["粆"],"kāng jīng":["粇"],fěn:["粉","黺"],cū:["粗","觕","麁","麄","麤"],"nián zhān":["粘"],"cè sè":["粣"],"zhōu yù":["粥"],"shēn sǎn":["糁"],"biān biǎn":["糄","萹"],miàn:["糆","面","靣","麪","麫","麵","麺"],"hú hū hù":["糊"],"gǔ gòu":["糓"],"mí méi":["糜"],"sǎn shēn":["糝","糣"],zāo:["糟","蹧","遭","醩"],"mì sī":["糸"],"jiū jiǔ":["糺"],"xì jì":["系","繫"],"zhēng zhěng":["糽"],"chà chǎ":["紁","衩"],"yuē yāo":["約","约"],"hóng gōng":["紅","红"],"hé gē":["紇","纥"],"wén wèn":["紋","纹"],fóu:["紑"],"jì jié jiè":["紒"],"pī pí bǐ":["紕","纰"],"jīn jìn":["紟"],"zhā zā":["紥","紮"],hā:["紦"],"fū fù":["紨"],"chōu chóu":["紬"],"lèi léi lěi":["累"],"bō bì":["紴"],"tiǎn zhěn":["紾"],"jiōng jiǒng":["絅"],"jié jiē":["結","结","节"],"guà kuā":["絓"],"bǎi mò":["絔"],"gēng huán":["絙"],"jié xié":["絜"],"quán shuān":["絟"],"gǎi ǎi":["絠"],"luò lào":["絡","络"],"bīng bēng pēng":["絣"],"gěi jǐ":["給","给"],"tóng tōng dòng":["絧"],"tiào diào dào":["絩"],"lěi lèi léi":["絫"],"gāi hài":["絯"],"chī zhǐ":["絺"],"wèn miǎn mán wàn":["絻"],"huán huàn wàn":["綄"],"qīn xiān":["綅"],"tì tí":["綈"],"yán xiàn":["綖"],"zōng zèng zòng":["綜"],"chēn lín":["綝"],"zhǔn zhùn":["綧"],"qiàn qīng zhēng":["綪"],"qìng qǐ":["綮"],"lún guān":["綸","纶"],"chuò chāo":["綽","绰"],"tián tǎn chān":["緂"],"lǜ lù":["緑","绿"],"ruǎn ruàn":["緛"],"jí qī":["緝"],"zhòng chóng":["緟","重"],"miáo máo":["緢"],"xiè yè":["緤"],huǎn:["緩","缓","㬊"],"gēng gèng":["緪","縆"],"tōu xū shū":["緰"],"zōng zòng":["緵","繌"],"yùn gǔn":["緷"],"guā wō":["緺"],"yùn yūn wēn":["緼","縕"],"bāng bàng":["縍"],"gǔ hú":["縎","鶻"],"cī cuò suǒ":["縒"],"cuī shuāi":["縗"],"róng rǒng ròng":["縙"],"zài zēng":["縡"],cài:["縩","菜","蔡"],"féng fèng":["縫"],"suō sù":["縮","缩"],"yǎn yǐn":["縯","酓"],"zòng zǒng":["縱","纵"],"zhuàn juàn":["縳"],"mò mù":["縸","莫"],"piǎo piāo":["縹","缥"],"fán pó":["繁"],"bēng bèng":["繃"],"móu miù miào liǎo":["繆"],"yáo yóu zhòu":["繇"],"zēng zèng":["繒","缯"],"jú jué":["繘"],"chuō chuò":["繛"],"zūn zǔn":["繜"],rào:["繞","绕","遶"],"chǎn chán":["繟"],"huì huí":["繢","缋","藱"],"qiāo sāo zǎo":["繰"],"jiǎo zhuó":["繳","缴"],"dàn tán chán":["繵"],nǒng:["繷"],"pú fú":["纀"],"yào lì":["纅"],"rǎng xiāng":["纕"],"lí sǎ xǐ lǐ":["纚"],"xiān qiàn":["纤"],"jīng jìng":["经"],"tí tì":["绨"],"bēng běng bèng":["绷"],"zōng zèng":["综"],"jī qī":["缉"],"wēn yùn yūn":["缊"],"fèng féng":["缝"],"shuāi cuī suī":["缞"],"miù móu liáo miào mù":["缪"],"qiāo sāo":["缲"],fǒu:["缶","缹","缻","雬","鴀"],"bà ba pí":["罢","罷"],"guà guǎi":["罫"],"yáng xiáng":["羊","羏"],"měi gāo":["羙"],"yì xī":["羛"],"qiǎng qiān":["羟"],"qiāng kòng":["羫"],"qián xián yán":["羬"],nóu:["羺"],"hóng gòng":["羾"],"pī bì pō":["翍"],"qú yù":["翑"],ké:["翗"],"qiào qiáo":["翘"],"zhái dí":["翟"],"dào zhōu":["翢"],"hóu qú":["翵"],shuǎ:["耍"],"ruǎn nuò":["耎"],"ér nài":["耏"],"zhuān duān":["耑"],"pá bà":["耙"],"chí sì":["耛"],"qù chú":["耝"],"lún lǔn":["耣"],"jí jiè":["耤"],"tāng tǎng":["耥"],pǎng:["耪","覫"],"zhá zé":["耫"],"yē yé":["耶"],"yún yíng":["耺"],"wà tuǐ zhuó":["聉"],"ér nǜ":["聏"],"tiē zhé":["聑"],"dǐ zhì":["聜"],qié:["聺"],"nǐ jiàn":["聻"],"lèi lē":["肋"],cào:["肏","襙","鄵","鼜"],"bó dí":["肑"],"xiào xiāo":["肖"],"dù dǔ":["肚"],chāi:["肞","釵","钗"],"hán qín hàn":["肣"],"pàng pán pàn":["肨","胖"],"zhūn chún":["肫"],āng:["肮","骯"],"yù yō":["育"],"pí bǐ bì":["肶"],"fèi bì":["胇"],"bèi bēi":["背"],"fèi zǐ":["胏"],"píng pēng":["胓","苹"],"fū fú zhǒu":["胕"],"shèng shēng":["胜"],kuà:["胯","跨","骻"],"gǎi hǎi":["胲"],"gē gé gā":["胳"],"néng nài":["能"],"guī kuì":["胿"],"mài mò":["脉"],"zāng zàng":["脏"],"jiǎo jué":["脚","角"],cuǒ:["脞"],"de te":["脦"],"zuī juān":["脧"],něi:["脮","腇","餒","馁","鮾","鯘"],"pú fǔ":["脯"],niào:["脲"],shuí:["脽"],guò:["腂","過","鐹"],"là xī":["腊"],"yān ā":["腌"],"gāo gào":["膏"],"lù biāo":["膔"],chuái:["膗"],"zhuān chuán chún zhuǎn":["膞"],chuài:["膪","踹"],"fán pán":["膰"],"wǔ hū":["膴"],"shān dàn":["膻"],tún:["臀","臋","蛌","豘","豚","軘","霕","飩","饨","魨","鲀","黗"],"bì bei":["臂"],"là gé":["臈"],"sào sāo":["臊"],nào:["臑","閙","闹","鬧"],"ní luán":["臡"],"qiān xián":["臤"],"guàng jiǒng":["臦"],"guǎng jiǒng":["臩"],"chòu xiù":["臭"],"mián biān":["臱"],"dié zhí":["臷"],"zhī jìn":["臸"],"shè shě":["舍"],pù:["舖","舗"],"bān bō pán":["般"],kuā:["舿"],"gèn gěn":["艮"],"sè shǎi":["色"],"fú bó":["艴"],"jiāo qiú":["艽"],"chāi chā":["芆"],"sháo què":["芍"],"hù xià":["芐"],"zì zǐ":["芓"],"huì hū":["芔"],"tún chūn":["芚"],"jiè gài":["芥"],"xù zhù":["芧"],"yuán yán":["芫"],"xīn xìn":["芯"],"lún huā":["芲"],"wù hū":["芴"],"gōu gǒu":["芶"],"mào máo":["芼"],"fèi fú":["芾"],"chán yín":["苂"],qiē:["苆"],"sū sù":["苏"],"tiáo sháo":["苕"],"lì jī":["苙"],"kē hē":["苛"],"jù qǔ":["苣"],"ruò rě":["若"],"zhù níng":["苧"],"pā bó":["苩"],xiú:["苬"],"zhǎ zuó":["苲"],"jū chá":["苴"],nié:["苶"],"shēng ruí":["苼"],"qié jiā":["茄"],"zǐ cí":["茈"],"qiàn xī":["茜"],chǎi:["茝"],"fá pèi":["茷"],ráo:["荛","蕘","襓","饒","饶"],"yíng xíng":["荥"],"qián xún":["荨","蕁"],"yìn yīn":["荫"],"hé hè":["荷"],"shā suō":["莎"],"péng fēng":["莑"],"shēn xīn":["莘"],"wǎn guān guǎn":["莞"],"yóu sù":["莤"],"shāo xiāo":["莦","蛸"],"làng liáng":["莨"],"piǎo fú":["莩"],"wèn wǎn miǎn":["莬"],"shì shí":["莳","蒔"],"tù tú":["莵"],"xiān liǎn":["莶","薟"],"wǎn yù":["菀"],"zōu chù":["菆"],"lù lǜ":["菉"],"jūn jùn":["菌"],"niè rěn":["菍"],"zī zì zāi":["菑"],"tú tù":["菟"],"jiē shà":["菨"],"qiáo zhǎo":["菬"],"tái zhī chí":["菭"],"fēi fěi":["菲","蜚"],"qín qīn jīn":["菳"],"zū jù":["菹","蒩"],"lǐn má":["菻"],"tián tiàn":["菾"],tiē:["萜","貼","贴"],"luò là lào luō":["落"],"zhù zhuó zhe":["著"],"shèn rèn":["葚"],"gě gé":["葛"],"jùn suǒ":["葰"],"kuì kuài":["蒉"],"rú ná":["蒘"],"méng mēng měng":["蒙"],"yuán huán":["蒝"],"xú shú":["蒣"],"xí xì":["蒵"],"mì míng":["蓂"],"sōu sǒu":["蓃"],"gài gě hé hài":["蓋"],"yǎo zhuó":["蓔"],"diào tiáo dí":["蓧"],"xū qiū fū":["蓲"],"zí jú":["蓻"],"liǎo lù":["蓼"],xu:["蓿"],"hàn hǎn":["蔊"],"màn wàn mán":["蔓"],"pó bò":["蔢"],"fān fán bō":["蕃"],"hóng hòng":["蕻"],"yù ào":["薁","隩"],"xí xiào":["薂"],"báo bó bò":["薄"],"cí zī":["薋"],"wàn luàn":["薍"],"kǎo hāo":["薧"],"yuǎn wěi":["薳"],"zhòu chóu":["薵"],"wō mái":["薶"],"xiāo hào":["藃"],"yù xù xū":["藇"],"jiè jí":["藉"],"diào zhuó":["藋"],"cáng zàng":["藏"],lǎ:["藞"],"chú zhū":["藸"],"pín píng":["蘋"],"gān hán":["虷"],"hóng jiàng":["虹"],"huī huǐ":["虺"],"xiā há":["虾"],"mǎ mà mā":["蚂"],"fāng bàng":["蚄"],"bàng bèng":["蚌"],"jué quē":["蚗"],"qín qián":["蚙"],"gōng zhōng":["蚣"],"fǔ fù":["蚥"],"dài dé":["蚮"],"gǒu qú xù":["蚼"],"bǒ pí":["蚾"],"shé yí":["蛇"],tiě:["蛈","鉄","銕","鐡","鐵","铁","驖"],"gé luò":["蛒"],"máng bàng":["蛖"],"yì xǔ":["蛡"],"há gé":["蛤"],"qiè ní":["蛪"],"é yǐ":["蛾"],"zhē zhé":["蜇"],"là zhà":["蜡"],suò:["蜶","逤"],"yóu qiú":["蝤"],"xiā hā":["蝦"],"xī qī":["螇"],"bī pí":["螕"],"nài něng":["螚"],"hé xiá":["螛"],"guì huǐ":["螝"],"mǎ mā mà":["螞"],"shì zhē":["螫"],"zhì dié":["螲"],"jiàn chán":["螹"],"ma má mò":["蟆"],"mǎng měng":["蟒"],"biē bié":["蟞"],"bēn fèi":["蟦"],"láo liáo":["蟧"],"yín xún":["蟫"],"lí lǐ":["蠡"],"xuè xiě":["血"],"xíng háng hàng héng":["行"],"shuāi cuī":["衰"],"tuó tuō":["袉"],"lǐng líng":["袊"],"bào páo pào":["袌"],"jù jiē":["袓"],"hè kè":["袔"],"yí yì":["袘","貤"],"nà jué":["袦"],"bèi pī":["被"],"chǐ nuǒ":["袲"],"chǐ qǐ duǒ nuǒ":["袳"],"jiá qiā jié":["袷"],"bó mò":["袹"],"guī guà":["袿"],"liè liě":["裂"],"chéng chěng":["裎"],"jiē gé":["裓"],"dāo chóu":["裯"],"shang cháng":["裳"],"yuān gǔn":["裷"],"yǎn ān":["裺"],"tì xī":["裼"],"fù fú":["褔"],"chǔ zhǔ":["褚"],"tuì tùn":["褪"],lǎi:["襰"],"yào yāo":["要"],"qín tán":["覃"],"jiàn xiàn":["見","见"],piǎn:["覑","諞","谝","貵","𡎚"],"piē miè":["覕"],"yíng yǐng":["覮"],"qù qū":["覰","覷","觑"],"jiàn biǎn":["覵"],"luó luǎn":["覶"],"zī zuǐ":["觜"],"huà xiè":["觟"],"jiě jiè xiè":["解","觧"],"xué hù":["觷"],"lì lù":["觻"],tǎo:["討","讨"],zhùn:["訰"],"zī zǐ":["訾"],"yí dài":["詒","诒"],xiòng:["詗","诇"],"diào tiǎo":["誂"],"yí chǐ chì":["誃"],"lǎng làng":["誏"],"ēi éi ěi èi xī":["誒","诶"],shuà:["誜"],"yǔ yù":["語","语","雨"],"shuō shuì yuè":["說","说"],"shuí shéi":["誰","谁"],"qū juè":["誳"],"chī lài":["誺"],"nì ná":["誽"],"diào tiáo":["調"],"pǐ bēi":["諀"],"jì jī":["諅"],"zé zuò zhǎ cuò":["諎"],"chù jí":["諔"],"háo xià":["諕"],"lùn lún":["論","论"],"shì dì":["諟"],"huà guā":["諣"],"xǐ shāi āi":["諰"],"nán nàn":["諵","難"],miù:["謬","谬"],zèn:["譖","谮"],"shí zhì":["識","识"],"juàn xuān":["讂"],"yí tuī":["讉"],zhán:["讝"],"xǔ hǔ":["许"],"xiáng yáng":["详"],"tiáo diào zhōu":["调"],"chén shèn":["谌"],"mí mèi":["谜"],"màn mán":["谩"],"gǔ yù":["谷"],"huō huò huá":["豁"],"zhì zhài":["豸"],"huān huán":["貆"],"kěn kūn":["貇"],"mò hé":["貈"],"mò hé háo":["貉"],"jù lóu":["貗"],"zé zhài":["責","责"],"dài tè":["貸"],"bì bēn":["賁"],"jiǎ gǔ jià":["賈"],"xiōng mín":["賯"],càng:["賶"],"zhuàn zuàn":["賺","赚"],"wàn zhuàn":["贃"],"gàn gòng zhuàng":["贛"],"yuán yùn":["贠"],"bēn bì":["贲"],"jiǎ gǔ":["贾"],zǒu:["走","赱","鯐"],"dié tú":["趃"],"jū qiè":["趄"],"qū cù":["趋","趨"],"jí jié":["趌"],"guā huó":["趏"],"què qì jí":["趞"],"tàng tāng":["趟"],"chuō zhuó":["趠"],"qù cù":["趣"],"yuè tì":["趯"],"bō bào":["趵"],"kuà wù":["趶"],"guì jué":["趹"],"fāng fàng páng":["趽"],"páo bà":["跁"],"qí qǐ":["跂"],"jiàn chén":["跈"],"pǎo páo":["跑"],"diǎn diē tiē":["跕"],"jū jù qiè":["跙"],bǒ:["跛"],"luò lì":["跞"],"dài duò duō chí":["跢"],zhuǎi:["跩"],"bèng pián":["跰"],"tiào táo":["跳"],"shū chōu":["跾"],"liàng liáng":["踉"],"tà tā":["踏"],chǎ:["蹅","鑔","镲"],"dí zhí":["蹢"],"dēng dèng":["蹬","鐙","镫"],cèng:["蹭"],"dūn cún":["蹲"],"juě jué":["蹶"],liāo:["蹽"],"xiè sǎ":["躠"],tǐ:["躰","軆","骵"],"yà zhá gá":["轧","軋"],"xìn xiàn":["軐"],"fàn guǐ":["軓"],"zhuàn zhuǎn":["転"],"zhóu zhòu":["軸","轴"],bú:["轐","醭","鳪"],"zhuǎn zhuàn zhuǎi":["转"],"zǎi zài":["载"],"niǎn zhǎn":["辗"],"biān bian":["边"],"dào biān":["辺"],"yǐ yí":["迆","迤","迱"],"guò guo guō":["过"],"wàng kuāng":["迋"],"hái huán":["还"],"zhè zhèi":["这"],"yuǎn yuàn":["远"],"zhì lì":["迣"],"zhù wǎng":["迬"],"zhuī duī":["追"],"shì kuò":["适"],tòu:["透"],"tōng tòng":["通"],guàng:["逛"],"dǎi dài":["逮"],"suì suí":["遂"],"tí dì":["遆"],"yí wèi":["遗"],"shì dí zhé":["適"],cà:["遪"],"huán hái":["還"],"lí chí":["邌"],"kàng háng":["邟"],"nà nèi nā":["那"],"xié yá yé yú xú":["邪"],"gāi hái":["郂"],"huán xún":["郇"],"chī xī":["郗"],hǎo:["郝"],"lì zhí":["郦"],"xiáo ǎo":["郩"],"dōu dū":["都"],liǎo:["曢","鄝","镽"],"zàn cuán cuó":["酂","酇"],"dīng dǐng":["酊"],"cù zuò":["酢"],"fā pō":["酦"],"shāi shī":["酾"],niàng:["酿","醸"],"qiú chōu":["醔"],"pō fā":["醗","醱"],"chǎn chěn":["醦"],"yàn liǎn xiān":["醶"],"niàng niáng":["釀"],"lǐ li":["里"],"lí xǐ xī":["釐"],"liǎo liào":["釕"],"dīng dìng":["釘","钉"],"qiǎo jiǎo":["釥"],"yú huá":["釪"],"huá wū":["釫"],"rì rèn jiàn":["釰","釼"],"dì dài":["釱"],"pī zhāo":["釽"],"yá yé":["釾"],"bǎ pá":["鈀","钯"],"tā tuó":["鉈","铊"],běi:["鉳"],"bǐng píng":["鉼"],"hā kē":["鉿","铪"],chòng:["銃","铳"],"xiǎng jiōng":["銄"],"yù sì":["銉"],"xù huì":["銊"],"rén rěn":["銋"],"shàn shuò":["銏"],"chì lì":["銐"],"xiǎn xǐ":["銑","铣"],"hóu xiàng":["銗"],"diào tiáo yáo":["銚"],"xiān kuò tiǎn guā":["銛","銽","铦"],"zhé niè":["銸"],"zhōng yōng":["銿"],"tōu tù dòu":["鋀"],"méi méng":["鋂"],"wàn jiǎn":["鋄","鎫"],"tǐng dìng":["鋌","铤"],"juān jiān cuān":["鋑"],"sī tuó":["鋖"],"juān xuān juàn":["鋗"],"wú huá wū":["鋘"],"zhuó chuò":["鋜"],"xíng xìng jīng":["鋞"],"jū jú":["鋦","锔"],"zuì niè":["鋷"],"yuān yuǎn wǎn wān":["鋺"],"gāng gàng":["鋼","钢"],zhuī:["錐","锥","騅","骓","鵻"],ā:["錒","锕"],"cuō chā":["鎈"],"suǒ sè":["鎍"],"yáo zú":["鎐"],"yè tà gé":["鎑"],"qiāng chēng":["鎗"],"gé lì":["鎘","镉","鬲"],"bī pī bì":["鎞"],"gǎo hào":["鎬"],"zú chuò":["鏃"],"xiū xiù":["鏅"],"shòu sōu":["鏉"],"dí dī":["鏑","镝"],"qiāo sǎn càn":["鏒"],"lù áo":["鏕"],"tāng táng":["鏜"],"jiàn zàn":["鏩"],"huì suì ruì":["鏸"],"qiǎng qiāng":["鏹","镪"],"sǎn xiàn sà":["鏾"],"jiǎn jiàn":["鐧","锏"],"dāng chēng":["鐺","铛"],"zuān zuàn":["鑽"],"sà xì":["钑"],"yào yuè":["钥"],"tǒu dǒu":["钭"],"zuàn zuān":["钻"],"qiān yán":["铅"],"pí pī":["铍"],"yáo diào tiáo":["铫"],"tāng tàng":["铴"],"pù pū":["铺"],"tán xiān":["锬"],"liù liú":["镏"],"hào gǎo":["镐"],"táng tāng":["镗"],"tán chán xín":["镡"],"huò shǎn":["閄"],"hàn bì":["閈","闬"],"kāng kàng":["閌","闶"],"xián jiàn jiān jiǎn":["閒"],"xiā xiǎ":["閕"],"xiǎ kě":["閜"],"biàn guān":["閞"],"hé gé":["閤","颌"],"hòng xiàng":["閧"],"sē xī":["閪"],"tíng tǐng":["閮"],"è yān":["閼","阏"],"hòng juǎn xiàng":["闂"],"bǎn pàn":["闆"],"dū shé":["闍","阇"],"què quē":["闕"],"tāng táng chāng":["闛"],"kàn hǎn":["闞","阚"],"xì sè tà":["闟"],"mēn mèn":["闷"],"quē què":["阙"],"yán diàn":["阽"],"ā ē":["阿"],"bēi pō pí":["陂"],"yàn yǎn":["隁"],"yú yáo shù":["隃"],"lóng lōng":["隆"],"duì zhuì":["隊"],"suí duò":["隋"],"gāi qí ái":["隑"],"huī duò":["隓","隳"],"wěi kuí":["隗"],"lì dài":["隸"],"zhuī cuī wéi":["隹"],"hè hú":["隺","鶮"],"jùn juàn":["隽","雋"],"nán nàn nuó":["难"],"què qiāo qiǎo":["雀"],"guàn huán":["雚"],"guī xī":["雟"],"sè xí":["雭"],án:["雸"],"wù méng":["雺"],tèng:["霯"],"lù lòu":["露"],mái:["霾"],"jìng liàng":["靚"],"gé jí":["革"],bǎ:["靶"],"yāng yàng":["鞅"],"gé tà sǎ":["鞈"],"biān yìng":["鞕"],"qiào shāo":["鞘"],"juān xuān":["鞙"],"shàng zhǎng":["鞝"],"pí bǐng bì bēi":["鞞"],la:["鞡"],"xiè dié":["鞢"],ēng:["鞥"],"móu mù":["鞪"],"bì bǐng":["鞸"],"mèi wà":["韎"],rǒu:["韖"],"shè xiè":["韘"],"yùn wēn":["韫"],"dùn dú":["頓","顿"],duǐ:["頧"],luō:["頱"],"bīn pín":["頻"],yóng:["顒","颙","鰫"],mān:["顢","颟"],"jǐng gěng":["颈"],"jié xié jiá":["颉"],"kē ké":["颏"],"pín bīn":["频"],"chàn zhàn":["颤"],"fēng fěng":["風","风"],"biāo diū":["颩"],"bá fú":["颰"],"sāo sōu":["颾"],"liù liáo":["飂"],"shí sì yì":["食"],"yǎng juàn":["飬"],"zhù tǒu":["飳"],"yí sì":["飴"],"zuò zé zhā":["飵"],tiè:["飻","餮"],"xiǎng náng":["饟"],"táng xíng":["饧"],"gē le":["饹"],"chā zha":["馇"],"náng nǎng":["馕"],"yūn wò":["馧"],"zhī shì":["馶"],"xìn jìn":["馸"],"kuài jué":["駃"],zǎng:["駔","驵"],"tái dài":["駘"],"xún xuān":["駨"],"liáng láng":["駺"],piàn:["騗","騙","骗","魸"],"dài tái":["骀"],"sāo sǎo":["骚"],"gǔ gū":["骨"],"bèi mó":["骳"],"xiāo qiāo":["骹"],"bǎng pǎng":["髈"],"bó jué":["髉"],"bì pǒ":["髲"],"máo méng":["髳"],"kuò yuè":["髺"],"bā bà":["魞","鲃"],"jì cǐ":["鮆"],"bó bà":["鮊"],"zhǎ zhà":["鮓","鲊"],"chóu dài":["鮘"],"luò gé":["鮥"],"guī xié wā kuí":["鮭"],"xiān xiǎn":["鮮","鲜"],"pū bū":["鯆"],"yì sī":["鯣"],"bà bó":["鲌"],"guī xié":["鲑"],"sāi xǐ":["鳃"],"niǎo diǎo":["鳥"],"diāo zhāo":["鳭"],"gān hàn yàn":["鳱"],"fū guī":["鳺"],"jiān qiān zhān":["鳽"],"hé jiè":["鶡"],"piān biǎn":["鶣"],"chuàn zhì":["鶨"],"cāng qiāng":["鶬"],"sǔn xùn":["鶽"],"biāo páo":["麃"],"zhù cū":["麆"],"jūn qún":["麇","麕"],chi:["麶"],"mó me":["麼"],"mó me ma":["麽"],"mí mǒ":["麿"],"dàn shèn":["黮"],"zhěn yān":["黰"],"dǎn zhǎn":["黵"],"miǎn mǐn měng":["黾"],hōu:["齁"],nàng:["齉"],"qí jì zī zhāi":["齐"],"yín kěn yǎn":["龂"],"yín kěn":["龈"],"gōng wò":["龏"],"guī jūn qiū":["龜","龟"],"kuí wā":["䖯"],lōu:["䁖"],"ōu qū":["𫭟"],"lóu lǘ":["𦝼"],"gǎ gā gá":["嘎"],"wā guà":["坬"],"zhǐ dǐ":["茋"],"gǒng hóng":["硔"],"yáo xiào":["滧"]},Q1=new tX;Object.keys(DB).forEach(e=>{const t=DB[e];for(let n of t)Q1.set(n,e)});const NB={这个:"zhè ge",成为:"chéng wéi",认为:"rèn wéi",作为:"zuò wéi",部分:"bù fen",要求:"yāo qiú",应该:"yīng gāi",增长:"zēng zhǎng",提供:"tí gōng",觉得:"jué de",任务:"rèn wu",那个:"nà ge",称为:"chēng wéi",为主:"wéi zhǔ",了解:"liǎo jiě",处理:"chǔ lǐ",皇上:"huáng shang",只要:"zhǐ yào",大量:"dà liàng",力量:"lì liàng",几乎:"jī hū",干部:"gàn bù",目的:"mù dì",行为:"xíng wéi",只见:"zhǐ jiàn",认识:"rèn shi",市长:"shì zhǎng",师父:"shī fu",调查:"diào chá",重新:"chóng xīn",分为:"fēn wéi",知识:"zhī shi",导弹:"dǎo dàn",质量:"zhì liàng",行款:"háng kuǎn",行列:"háng liè",行话:"háng huà",行业:"háng yè",隔行:"gé háng",在行:"zài háng",行家:"háng jia",内行:"nèi háng",外行:"wài háng",同行:"tóng háng",本行:"běn háng",行伍:"háng wǔ",洋行:"yáng háng",银行:"yín háng",商行:"shāng háng",支行:"zhī háng",总行:"zǒng háng",行情:"háng qíng",懂行:"dǒng háng",行规:"háng guī",行当:"háng dang",行货:"háng huò",太行:"tài háng",入行:"rù háng",中行:"zhōng háng",农行:"nóng háng",工行:"gōng háng",建行:"jiàn háng",各行:"gè háng",行号:"háng hào",行高:"háng gāo",行首:"háng shǒu",行尾:"háng wěi",行末:"háng mò",行长:"háng zhǎng",行距:"háng jù",换行:"huàn háng",行会:"háng huì",行辈:"háng bèi",行道:"háng dào",道行:"dào heng",参与:"cān yù",充分:"chōng fèn",尽管:"jǐn guǎn",生长:"shēng zhǎng",数量:"shù liàng",应当:"yīng dāng",院长:"yuàn zhǎng",强调:"qiáng diào",只能:"zhǐ néng",音乐:"yīn yuè",以为:"yǐ wéi",处于:"chǔ yú",部长:"bù zhǎng",蒙古:"měng gǔ",只有:"zhǐ yǒu",适当:"shì dàng",只好:"zhǐ hǎo",成长:"chéng zhǎng",高兴:"gāo xìng",不了:"bù liǎo",产量:"chǎn liàng",胖子:"pàng zi",显得:"xiǎn de",只是:"zhǐ shì",似的:"shì de",率领:"shuài lǐng",改为:"gǎi wéi",不禁:"bù jīn",成分:"chéng fèn",答应:"dā ying",少年:"shào nián",兴趣:"xìng qù",太监:"tài jian",休息:"xiū xi",校长:"xiào zhǎng",更新:"gēng xīn",合同:"hé tong",喝道:"hè dào",重庆:"chóng qìng",重建:"chóng jiàn",使得:"shǐ de",审查:"shěn chá",累计:"lěi jì",给予:"jǐ yǔ",极为:"jí wéi",冠军:"guàn jūn",仿佛:"fǎng fú",头发:"tóu fa",投降:"tóu xiáng",家长:"jiā zhǎng",仔细:"zǐ xì",要是:"yào shi",将领:"jiàng lǐng",含量:"hán liàng",更为:"gèng wéi",积累:"jī lěi",地处:"dì chǔ",县长:"xiàn zhǎng",少女:"shào nǚ",路上:"lù shang",只怕:"zhǐ pà",能量:"néng liàng",储量:"chǔ liàng",供应:"gōng yìng",挑战:"tiǎo zhàn",西藏:"xī zàng",记得:"jì de",总量:"zǒng liàng",当真:"dàng zhēn",将士:"jiàng shì",差别:"chā bié",较为:"jiào wéi",长老:"zhǎng lǎo",大夫:"dài fu",差异:"chā yì",懂得:"dǒng de",尽量:"jǐn liàng",模样:"mú yàng",的确:"dí què",为首:"wéi shǒu",便宜:"pián yi",更名:"gēng míng",石头:"shí tou",州长:"zhōu zhǎng",为止:"wéi zhǐ",漂亮:"piào liang",炮弹:"pào dàn",藏族:"zàng zú",角色:"jué sè",当作:"dàng zuò",尽快:"jǐn kuài",人为:"rén wéi",重复:"chóng fù",胡同:"hú tòng",差距:"chā jù",弟兄:"dì xiong",大将:"dà jiàng",睡觉:"shuì jiào",一觉:"yí jiào",团长:"tuán zhǎng",队长:"duì zhǎng",区长:"qū zhǎng",难得:"nán dé",丫头:"yā tou",会长:"huì zhǎng",弟弟:"dì di",王爷:"wáng ye",重量:"zhòng liàng",誉为:"yù wéi",家伙:"jiā huo",华山:"huà shān",椅子:"yǐ zi",流量:"liú liàng",长大:"zhǎng dà",勉强:"miǎn qiǎng",会计:"kuài jì",过分:"guò fèn",济南:"jǐ nán",调动:"diào dòng",燕京:"yān jīng",少将:"shào jiàng",中毒:"zhòng dú",晓得:"xiǎo de",变更:"biàn gēng",打更:"dǎ gēng",认得:"rèn de",苹果:"píng guǒ",念头:"niàn tou",挣扎:"zhēng zhá",三藏:"sān zàng",剥削:"bō xuē",丞相:"chéng xiàng",少量:"shǎo liàng",寻思:"xún si",夺得:"duó dé",干线:"gàn xiàn",呼吁:"hū yù",处罚:"chǔ fá",长官:"zhǎng guān",柏林:"bó lín",亲戚:"qīn qi",身分:"shēn fèn",胳膊:"gē bo",着手:"zhuó shǒu",炸弹:"zhà dàn",咳嗽:"ké sou",叶子:"yè zi",外长:"wài zhǎng",供给:"gōng jǐ",师长:"shī zhǎng",变量:"biàn liàng",应有:"yīng yǒu",下载:"xià zài",乐器:"yuè qì",间接:"jiàn jiē",底下:"dǐ xià",打扮:"dǎ bàn",子弹:"zǐ dàn",弹药:"dàn yào",热量:"rè liàng",削弱:"xuē ruò",骨干:"gǔ gàn",容量:"róng liàng",模糊:"mó hu",转动:"zhuàn dòng",称呼:"chēng hu",科长:"kē zhǎng",处置:"chǔ zhì",着重:"zhuó zhòng",着急:"zháo jí",强迫:"qiǎng pò",庭长:"tíng zhǎng",首相:"shǒu xiàng",喇嘛:"lǎ ma",镇长:"zhèn zhǎng",只管:"zhǐ guǎn",重重:"chóng chóng",免得:"miǎn de",着实:"zhuó shí",度假:"dù jià",真相:"zhēn xiàng",相貌:"xiàng mào",处分:"chǔ fèn",委屈:"wěi qu",为期:"wéi qī",伯伯:"bó bo",伯子:"bǎi zi",圈子:"quān zi",见识:"jiàn shi",笼罩:"lǒng zhào",与会:"yù huì",都督:"dū du",都市:"dū shì",成都:"chéng dū",首都:"shǒu dū",帝都:"dì dū",王都:"wáng dū",东都:"dōng dū",都护:"dū hù",都城:"dū chéng",建都:"jiàn dū",迁都:"qiān dū",故都:"gù dū",定都:"dìng dū",中都:"zhōng dū",六安:"lù ān",宰相:"zǎi xiàng",较量:"jiào liàng",对称:"duì chèn",总长:"zǒng zhǎng",相公:"xiàng gong",空白:"kòng bái",打量:"dǎ liang",水分:"shuǐ fèn",舌头:"shé tou",没收:"mò shōu",行李:"xíng li",判处:"pàn chǔ",散文:"sǎn wén",处境:"chǔ jìng",孙子:"sūn zi",拳头:"quán tou",打发:"dǎ fā",组长:"zǔ zhǎng",骨头:"gǔ tou",宁可:"nìng kě",更换:"gēng huàn",薄弱:"bó ruò",还原:"huán yuán",重修:"chóng xiū",重来:"chóng lái",只顾:"zhǐ gù",爱好:"ài hào",馒头:"mán tou",军长:"jūn zhǎng",首长:"shǒu zhǎng",厂长:"chǎng zhǎng",司长:"sī zhǎng",长子:"zhǎng zǐ",强劲:"qiáng jìng",恰当:"qià dàng",头儿:"tóu er",站长:"zhàn zhǎng",折腾:"zhē teng",相处:"xiāng chǔ",统率:"tǒng shuài",中将:"zhōng jiàng",命中:"mìng zhòng",名将:"míng jiàng",木头:"mù tou",动弹:"dòng tan",地壳:"dì qiào",干活:"gàn huó",少爷:"shào ye",水量:"shuǐ liàng",补给:"bǔ jǐ",尾巴:"wěi ba",来得:"lái de",好奇:"hào qí",钥匙:"yào shi",当做:"dàng zuò",沉着:"chén zhuó",哑巴:"yǎ ba",车子:"chē zi",上将:"shàng jiàng",恶心:"ě xīn",担子:"dàn zi",应届:"yīng jiè",主角:"zhǔ jué",运转:"yùn zhuǎn",兄长:"xiōng zhǎng",格式:"gé shì",正月:"zhēng yuè",营长:"yíng zhǎng",当成:"dàng chéng",女婿:"nǚ xu",咽喉:"yān hóu",重阳:"chóng yáng",化为:"huà wéi",吐蕃:"tǔ bō",钻进:"zuān jìn",乐队:"yuè duì",亮相:"liàng xiàng",被子:"bèi zi",舍得:"shě de",杉木:"shā mù",击中:"jī zhòng",排长:"pái zhǎng",假期:"jià qī",分量:"fèn liàng",数次:"shù cì",提防:"dī fáng",吆喝:"yāo he",查处:"chá chǔ",量子:"liàng zǐ",里头:"lǐ tou",调研:"diào yán",伺候:"cì hou",重申:"chóng shēn",枕头:"zhěn tou",拚命:"pīn mìng",社长:"shè zhǎng",归还:"guī huán",批量:"pī liàng",畜牧:"xù mù",点着:"diǎn zháo",甚为:"shèn wéi",小将:"xiǎo jiàng",着眼:"zhuó yǎn",处死:"chǔ sǐ",厌恶:"yàn wù",鼓乐:"gǔ yuè",树干:"shù gàn",秘鲁:"bì lǔ",大方:"dà fāng",外头:"wài tou",班长:"bān zhǎng",星宿:"xīng xiù",宁愿:"nìng yuàn",钦差:"qīn chāi",为数:"wéi shù",勾当:"gòu dàng",削减:"xuē jiǎn",间谍:"jiàn dié",埋怨:"mán yuàn",结实:"jiē shi",计量:"jì liáng",淹没:"yān mò",村长:"cūn zhǎng",连长:"lián zhǎng",自给:"zì jǐ",武将:"wǔ jiàng",温差:"wēn chā",直奔:"zhí bèn",供求:"gōng qiú",剂量:"jì liàng",道长:"dào zhǎng",泄露:"xiè lòu",王八:"wáng ba",切割:"qiē gē",间隔:"jiàn gé",一晃:"yì huǎng",长假:"cháng jià",令狐:"líng hú",为害:"wéi hài",句子:"jù zi",偿还:"cháng huán",疙瘩:"gē da",燕山:"yān shān",堵塞:"dǔ sè",夺冠:"duó guàn",扎实:"zhā shi",电荷:"diàn hè",看守:"kān shǒu",复辟:"fù bì",郁闷:"yù mèn",尽早:"jǐn zǎo",切断:"qiē duàn",指头:"zhǐ tou",为生:"wéi shēng",畜生:"chù sheng",切除:"qiē chú",着力:"zhuó lì",着想:"zhuó xiǎng",级差:"jí chā",投奔:"tóu bèn",棍子:"gùn zi",含糊:"hán hu",少妇:"shào fù",兴致:"xìng zhì",纳闷:"nà mèn",干流:"gàn liú",卷起:"juǎn qǐ",扇子:"shàn zi",更改:"gēng gǎi",笼络:"lǒng luò",喇叭:"lǎ ba",载荷:"zài hè",妥当:"tuǒ dàng",为难:"wéi nán",着陆:"zhuó lù",燕子:"yàn zi",干吗:"gàn má",白发:"bái fà",总得:"zǒng děi",夹击:"jiā jī",曝光:"bào guāng",曲调:"qǔ diào",相机:"xiàng jī",叫化:"jiào huà",角逐:"jué zhú",啊哟:"ā yō",载重:"zài zhòng",长辈:"zhǎng bèi",出差:"chū chāi",垛口:"duǒ kǒu",撇开:"piē kāi",厅长:"tīng zhǎng",组分:"zǔ fèn",误差:"wù chā",家当:"jiā dàng",传记:"zhuàn jì",个子:"gè zi",铺设:"pū shè",干事:"gàn shì",杆菌:"gǎn jūn",定量:"dìng liàng",运载:"yùn zài",会儿:"huì er",酋长:"qiú zhǎng",重返:"chóng fǎn",差额:"chā é",露面:"lòu miàn",钻研:"zuān yán",大城:"dài chéng",上当:"shàng dàng",销量:"xiāo liàng",作坊:"zuō fang",照相:"zhào xiàng",哎呀:"āi yā",调集:"diào jí",看中:"kàn zhòng",议长:"yì zhǎng",风筝:"fēng zheng",辟邪:"bì xié",空隙:"kòng xì",更迭:"gēng dié",偏差:"piān chā",声调:"shēng diào",适量:"shì liàng",屯子:"tún zi",无量:"wú liàng",空地:"kòng dì",调度:"diào dù",散射:"sǎn shè",创伤:"chuāng shāng",海参:"hǎi shēn",满载:"mǎn zài",重叠:"chóng dié",落差:"luò chā",单调:"dān diào",老将:"lǎo jiàng",人参:"rén shēn",间断:"jiàn duàn",重现:"chóng xiàn",夹杂:"jiā zá",调用:"diào yòng",萝卜:"luó bo",附着:"fù zhuó",应声:"yìng shēng",主将:"zhǔ jiàng",罪过:"zuì guo",咀嚼:"jǔ jué",为政:"wéi zhèng",过量:"guò liàng",乐曲:"yuè qǔ",负荷:"fù hè",枪弹:"qiāng dàn",悄然:"qiǎo rán",处方:"chǔ fāng",悄声:"qiǎo shēng",曲子:"qǔ zi",情调:"qíng diào",挑衅:"tiǎo xìn",代为:"dài wéi",了结:"liǎo jié",打中:"dǎ zhòng",酒吧:"jiǔ bā",懒得:"lǎn de",增量:"zēng liàng",衣着:"yī zhuó",部将:"bù jiàng",要塞:"yào sài",茶几:"chá jī",杠杆:"gàng gǎn",出没:"chū mò",鲜有:"xiǎn yǒu",间隙:"jiàn xì",重担:"zhòng dàn",重演:"chóng yǎn",重试:"chóng shì",应酬:"yìng chou",只当:"zhǐ dāng",毋宁:"wú nìng",包扎:"bāo zā",前头:"qián tou",卷烟:"juǎn yān",非得:"fēi děi",弹道:"dàn dào",杆子:"gān zi",门将:"mén jiàng",后头:"hòu tou",喝彩:"hè cǎi",暖和:"nuǎn huo",累积:"lěi jī",调遣:"diào qiǎn",倔强:"jué jiàng",宝藏:"bǎo zàng",丧事:"sāng shì",约莫:"yuē mo",纤夫:"qiàn fū",更替:"gēng tì",装载:"zhuāng zài",背包:"bēi bāo",帖子:"tiě zi",松散:"sōng sǎn",呼喝:"hū hè",可恶:"kě wù",自转:"zì zhuàn",供电:"gōng diàn",反省:"fǎn xǐng",坦率:"tǎn shuài",苏打:"sū dá",本分:"běn fèn",落得:"luò de",鄙薄:"bǐ bó",相间:"xiāng jiàn",单薄:"dān bó",混蛋:"hún dàn",贞观:"zhēn guān",附和:"fù hè",能耐:"néng nài",吓唬:"xià hu",未了:"wèi liǎo",引着:"yǐn zháo",抽调:"chōu diào",沙子:"shā zi",席卷:"xí juǎn",标的:"biāo dì",别扭:"biè niu",思量:"sī liang",喝采:"hè cǎi",论语:"lún yǔ",盖子:"gài zi",分外:"fèn wài",弄堂:"lòng táng",乐舞:"yuè wǔ",雨量:"yǔ liàng",毛发:"máo fà",差遣:"chāi qiǎn",背负:"bēi fù",转速:"zhuàn sù",声乐:"shēng yuè",夹攻:"jiā gōng",供水:"gōng shuǐ",主干:"zhǔ gàn",惩处:"chéng chǔ",长相:"zhǎng xiàng",公差:"gōng chāi",榴弹:"liú dàn",省得:"shěng de",条子:"tiáo zi",重围:"chóng wéi",阻塞:"zǔ sè",劲风:"jìng fēng",纠葛:"jiū gé",颠簸:"diān bǒ",点中:"diǎn zhòng",重创:"zhòng chuāng",姥姥:"lǎo lao",迷糊:"mí hu",公家:"gōng jia",几率:"jī lǜ",苦闷:"kǔ mèn",度量:"dù liàng",差错:"chā cuò",暑假:"shǔ jià",参差:"cēn cī",搭载:"dā zài",助长:"zhù zhǎng",相称:"xiāng chèn",红晕:"hóng yùn",舍命:"shě mìng",喜好:"xǐ hào",列传:"liè zhuàn",劲敌:"jìng dí",蛤蟆:"há ma",请假:"qǐng jià",钉子:"dīng zi",沉没:"chén mò",高丽:"gāo lí",休假:"xiū jià",无为:"wú wéi",巴结:"bā jie",了得:"liǎo dé",变相:"biàn xiàng",核弹:"hé dàn",亲家:"qìng jia",承载:"chéng zài",喝问:"hè wèn",还击:"huán jī",交还:"jiāo huán",将令:"jiàng lìng",单于:"chán yú",空缺:"kòng quē",绿林:"lù lín",胆量:"dǎn liàng",执着:"zhí zhuó",低调:"dī diào",闭塞:"bì sè",轻薄:"qīng bó",得当:"dé dàng",占卜:"zhān bǔ",扫帚:"sào zhou",龟兹:"qiū cí",年长:"nián zhǎng",外传:"wài zhuàn",头子:"tóu zi",裁缝:"cái feng",礼乐:"lǐ yuè",血泊:"xuè pō",散乱:"sǎn luàn",动量:"dòng liàng",倒腾:"dǎo teng",取舍:"qǔ shě",咱家:"zán jiā",长发:"cháng fà",爪哇:"zhǎo wā",弹壳:"dàn ké",省悟:"xǐng wù",嚷嚷:"rāng rang",连累:"lián lèi",应得:"yīng dé",族长:"zú zhǎng",柜子:"guì zi",擂鼓:"léi gǔ",眩晕:"xuàn yùn",调配:"tiáo pèi",躯干:"qū gàn",差役:"chāi yì",坎坷:"kǎn kě",少儿:"shào ér",乐团:"yuè tuán",养分:"yǎng fèn",退还:"tuì huán",格调:"gé diào",语调:"yǔ diào",音调:"yīn diào",乐府:"yuè fǔ",古朴:"gǔ pǔ",打点:"dǎ diǎn",差使:"chāi shǐ",匀称:"yún chèn",瘦削:"shòu xuē",膏药:"gāo yao",吞没:"tūn mò",调任:"diào rèn",散居:"sǎn jū",上头:"shàng tóu",风靡:"fēng mǐ",放假:"fàng jià",估量:"gū liang",失当:"shī dàng",中弹:"zhòng dàn",妄为:"wàng wéi",长者:"zhǎng zhě",起哄:"qǐ hòng",末了:"mò liǎo",相声:"xiàng sheng",校正:"jiào zhèng",劝降:"quàn xiáng",矢量:"shǐ liàng",沉闷:"chén mèn",给与:"jǐ yǔ",解法:"jiě fǎ",塞外:"sài wài",将校:"jiàng xiào",嗜好:"shì hào",没落:"mò luò",朴刀:"pō dāo",片子:"piān zi",切削:"qiē xiāo",弹丸:"dàn wán",稀薄:"xī bó",亏得:"kuī dé",间歇:"jiàn xiē",翘首:"qiáo shǒu",色调:"sè diào",处决:"chǔ jué",表率:"biǎo shuài",尺子:"chǐ zi",招降:"zhāo xiáng",称职:"chèn zhí",斗篷:"dǒu peng",铺子:"pù zi",底子:"dǐ zi",负载:"fù zài",干警:"gàn jǐng",倒数:"dào shǔ",将官:"jiàng guān",锄头:"chú tou",归降:"guī xiáng",疟疾:"nüè ji",唠叨:"láo dao",限量:"xiàn liàng",屏息:"bǐng xī",重逢:"chóng féng",器乐:"qì yuè",氢弹:"qīng dàn",脖颈:"bó gěng",妃子:"fēi zi",处事:"chǔ shì",参量:"cān liàng",轻率:"qīng shuài",缥缈:"piāo miǎo",中奖:"zhòng jiǎng",才干:"cái gàn",施舍:"shī shě",卷子:"juàn zi",游说:"yóu shuì",巷子:"xiàng zi",膀胱:"páng guāng",切勿:"qiè wù",看管:"kān guǎn",风头:"fēng tou",精干:"jīng gàn",高差:"gāo chā",恐吓:"kǒng hè",扁担:"biǎn dàn",给养:"jǐ yǎng",格子:"gé zi",供需:"gōng xū",反差:"fǎn chā",飞弹:"fēi dàn",微薄:"wēi bó",发型:"fà xíng",即兴:"jí xìng",攒动:"cuán dòng",间或:"jiàn huò",浅薄:"qiǎn bó",乐章:"yuè zhāng",顺差:"shùn chā",调子:"diào zi",相位:"xiàng wèi",转子:"zhuàn zǐ",劲旅:"jìng lǚ",咔嚓:"kā chā",了事:"liǎo shì",转悠:"zhuàn you",当铺:"dàng pù",爪子:"zhuǎ zi",单子:"dān zi",好战:"hào zhàn",燕麦:"yàn mài",只许:"zhǐ xǔ",干练:"gàn liàn",女将:"nǚ jiàng",酒量:"jiǔ liàng",划船:"huá chuán",伎俩:"jì liǎng",挑拨:"tiǎo bō",少校:"shào xiào",着落:"zhuó luò",憎恶:"zēng wù",刻薄:"kè bó",要挟:"yāo xié",用处:"yòng chu",还手:"huán shǒu",模具:"mú jù",执著:"zhí zhuó",喝令:"hè lìng",保长:"bǎo zhǎng",吸着:"xī zhe",症结:"zhēng jié",公转:"gōng zhuàn",校勘:"jiào kān",重提:"chóng tí",扫兴:"sǎo xìng",铺盖:"pū gài",长史:"zhǎng shǐ",差价:"chā jià",压根:"yà gēn",怔住:"zhèng zhù",应允:"yīng yǔn",切入:"qiē rù",战将:"zhàn jiàng",年少:"nián shào",舍身:"shě shēn",执拗:"zhí niù",处世:"chǔ shì",中风:"zhòng fēng",等量:"děng liàng",放量:"fàng liàng",腔调:"qiāng diào",老少:"lǎo shào",没入:"mò rù",瓜葛:"guā gé",将帅:"jiàng shuài",车载:"chē zài",窝囊:"wō nang",长进:"zhǎng jìn",可汗:"kè hán",并州:"bīng zhōu",供销:"gōng xiāo",切片:"qiē piàn",差事:"chāi shì",知会:"zhī hui",鹰爪:"yīng zhǎo",处女:"chǔ nǚ",切磋:"qiē cuō",日头:"rì tou",押解:"yā jiè",滋长:"zī zhǎng",道观:"dào guàn",脚色:"jué sè",当量:"dāng liàng",婆家:"pó jia",缘分:"yuán fèn",空闲:"kòng xián",好色:"hào sè",怒喝:"nù hè",笼统:"lǒng tǒng",边塞:"biān sài",何曾:"hé céng",重合:"chóng hé",零散:"líng sǎn",轰隆:"hōng lōng",化子:"huà zi",内蒙:"nèi měng",数落:"shǔ luò",逆差:"nì chā",牟利:"móu lì",栅栏:"zhà lan",中标:"zhòng biāo",调档:"diào dàng",佝偻:"gōu lóu",场子:"chǎng zi",甲壳:"jiǎ qiào",重温:"chóng wēn",炮制:"páo zhì",返还:"fǎn huán",自传:"zì zhuàn",高调:"gāo diào",殷红:"yān hóng",固着:"gù zhuó",强求:"qiǎng qiú",本相:"běn xiàng",骄横:"jiāo hèng",草率:"cǎo shuài",气闷:"qì mèn",着色:"zhuó sè",宁肯:"nìng kěn",兴头:"xìng tou",拘泥:"jū nì",夹角:"jiā jiǎo",发髻:"fà jì",猛将:"měng jiàng",约摸:"yuē mo",拖累:"tuō lěi",呢绒:"ní róng",钻探:"zuān tàn",夹层:"jiā céng",落魄:"luò pò",巷道:"hàng dào",运量:"yùn liàng",解闷:"jiě mèn",空儿:"kòng er",估摸:"gū mo",好客:"hào kè",钻孔:"zuān kǒng",糊弄:"hù nòng",荥阳:"xíng yáng",烦闷:"fán mèn",仓卒:"cāng cù",分叉:"fēn chà",厂子:"chǎng zi",小调:"xiǎo diào",少阳:"shào yáng",受降:"shòu xiáng",染坊:"rǎn fáng",胳臂:"gē bei",将门:"jiàng mén",模板:"mú bǎn",配给:"pèi jǐ",为伍:"wéi wǔ",跟头:"gēn tou",划算:"huá suàn",累赘:"léi zhui",哄笑:"hōng xiào",晕眩:"yūn xuàn",干掉:"gàn diào",缝制:"féng zhì",难处:"nán chù",着意:"zhuó yì",蛮横:"mán hèng",奇数:"jī shù",短发:"duǎn fà",生还:"shēng huán",还清:"huán qīng",看护:"kān hù",直率:"zhí shuài",奏乐:"zòu yuè",载客:"zài kè",专横:"zhuān hèng",湮没:"yān mò",空格:"kòng gé",铺垫:"pū diàn",良将:"liáng jiàng",哗啦:"huā lā",散漫:"sǎn màn",脱发:"tuō fà",送还:"sòng huán",埋没:"mái mò",累及:"lěi jí",薄雾:"bó wù",调离:"diào lí",舌苔:"shé tāi",机长:"jī zhǎng",栓塞:"shuān sè",配角:"pèi jué",切口:"qiē kǒu",创口:"chuāng kǒu",哈欠:"hā qian",实弹:"shí dàn",铺平:"pū píng",哈达:"hǎ dá",懒散:"lǎn sǎn",实干:"shí gàn",填空:"tián kòng",刁钻:"diāo zuān",乐师:"yuè shī",量变:"liàng biàn",诱降:"yòu xiáng",搪塞:"táng sè",征调:"zhēng diào",夹道:"jiā dào",干咳:"gān ké",止咳:"zhǐ ké",乐工:"yuè gōng",划过:"huá guò",着火:"zháo huǒ",更正:"gēng zhèng",给付:"jǐ fù",空子:"kòng zi",哪吒:"né zhā",正着:"zhèng zháo",刷子:"shuā zi",丧葬:"sāng zàng",夹带:"jiā dài",安分:"ān fèn",中意:"zhòng yì",长孙:"zhǎng sūn",校订:"jiào dìng",卷曲:"juǎn qū",载运:"zài yùn",投弹:"tóu dàn",柞蚕:"zuò cán",份量:"fèn liàng",调换:"diào huàn",了然:"liǎo rán",咧嘴:"liě zuǐ",典当:"diǎn dàng",寒假:"hán jià",长兄:"zhǎng xiōng",给水:"jǐ shuǐ",须发:"xū fà",枝干:"zhī gàn",属相:"shǔ xiàng",哄抢:"hōng qiǎng",刻划:"kè huà",塞子:"sāi zi",单干:"dān gàn",还乡:"huán xiāng",兆头:"zhào tou",寺观:"sì guàn",督率:"dū shuài",啊哈:"ā ha",割舍:"gē shě",抹布:"mā bù",好恶:"hào wù",下处:"xià chǔ",消长:"xiāo zhǎng",离间:"lí jiàn",准头:"zhǔn tou",校对:"jiào duì",什物:"shí wù",番禺:"pān yú",佛爷:"fó ye",吗啡:"mǎ fēi",盐分:"yán fèn",虎将:"hǔ jiàng",薄荷:"bò he",独处:"dú chǔ",空位:"kòng wèi",铺路:"pū lù",乌拉:"wū lā",调回:"diào huí",来头:"lái tou",闲散:"xián sǎn",胶卷:"jiāo juǎn",冒失:"mào shi",干劲:"gàn jìn",弦乐:"xián yuè",相国:"xiàng guó",丹参:"dān shēn",助兴:"zhù xìng",铺开:"pū kāi",次长:"cì zhǎng",发卡:"fà qiǎ",拮据:"jié jū",刹车:"shā chē",生发:"shēng fà",重播:"chóng bō",缝合:"féng hé",音量:"yīn liàng",少尉:"shào wèi",冲压:"chòng yā",苍劲:"cāng jìng",厚薄:"hòu báo",威吓:"wēi hè",外相:"wài xiàng",呼号:"hū háo",着迷:"zháo mí",挑担:"tiāo dàn",纹路:"wén lù",还俗:"huán sú",强横:"qiáng hèng",着数:"zhāo shù",降顺:"xiáng shùn",挑明:"tiǎo míng",眯缝:"mī feng",分内:"fèn nèi",更衣:"gēng yī",软和:"ruǎn huo",尽兴:"jìn xìng",号子:"hào zi",爪牙:"zhǎo yá",败将:"bài jiàng",猜中:"cāi zhòng",结扎:"jié zā",没空:"méi kòng",夹缝:"jiā fèng",拾掇:"shí duo",掺和:"chān huo",簸箕:"bò ji",电量:"diàn liàng",荷载:"hè zǎi",调式:"diào shì",处身:"chǔ shēn",打手:"dǎ shǒu",弹弓:"dàn gōng",横蛮:"hèng mán",能干:"néng gàn",校点:"jiào diǎn",加载:"jiā zài",干校:"gàn xiào",哄传:"hōng chuán",校注:"jiào zhù",淤塞:"yū sè",马扎:"mǎ zhá",月氏:"yuè zhī",高干:"gāo gàn",经传:"jīng zhuàn",曾孙:"zēng sūn",好斗:"hào dòu",关卡:"guān qiǎ",逃奔:"táo bèn",磨蹭:"mó ceng",牟取:"móu qǔ",颤栗:"zhàn lì",蚂蚱:"mà zha",撮合:"cuō he",趔趄:"liè qie",摔打:"shuāi dǎ",台子:"tái zi",分得:"fēn de",粘着:"nián zhuó",采邑:"cài yì",散装:"sǎn zhuāng",婀娜:"ē nuó",兴味:"xìng wèi",行头:"xíng tou",气量:"qì liàng",调运:"diào yùn",处治:"chǔ zhì",乐音:"yuè yīn",充塞:"chōng sè",恫吓:"dòng hè",论调:"lùn diào",相中:"xiāng zhòng",民乐:"mín yuè",炮仗:"pào zhang",丧服:"sāng fú",骁将:"xiāo jiàng",量刑:"liàng xíng",缝补:"féng bǔ",财会:"cái kuài",大干:"dà gàn",历数:"lì shǔ",校场:"jiào chǎng",塞北:"sài běi",识相:"shí xiàng",辱没:"rǔ mò",鲜亮:"xiān liàng",语塞:"yǔ sè",露脸:"lòu liǎn",凉快:"liáng kuai",腰杆:"yāo gǎn",溜达:"liū da",嘎嘎:"gā gā",公干:"gōng gàn",桔梗:"jié gěng",挑逗:"tiǎo dòu",看门:"kān mén",乐歌:"yuè gē",拓片:"tà piàn",挑动:"tiǎo dòng",准将:"zhǔn jiàng",遒劲:"qiú jìng",磨坊:"mò fáng",逶迤:"wēi yí",搅和:"jiǎo huo",摩挲:"mó suō",作弄:"zuò nòng",苗头:"miáo tou",打颤:"dǎ zhàn",大藏:"dà zàng",畜牲:"chù shēng",勾搭:"gōu da",树荫:"shù yīn",树杈:"shù chà",铁杆:"tiě gǎn",将相:"jiàng xiàng",份子:"fèn zi",视差:"shì chā",绿荫:"lǜ yīn",枪杆:"qiāng gǎn",缝纫:"féng rèn",愁闷:"chóu mèn",点将:"diǎn jiàng",华佗:"huà tuó",劲射:"jìng shè",箱笼:"xiāng lǒng",终了:"zhōng liǎo",鬓发:"bìn fà",结巴:"jiē ba",苦干:"kǔ gàn",看家:"kān jiā",正旦:"zhēng dàn",中肯:"zhòng kěn",厦门:"xià mén",东莞:"dōng guǎn",食量:"shí liàng",宫调:"gōng diào",间作:"jiàn zuò",弹片:"dàn piàn",差池:"chā chí",漂白:"piǎo bái",杠子:"gàng zi",调处:"tiáo chǔ",好动:"hào dòng",转炉:"zhuàn lú",屏气:"bǐng qì",夹板:"jiā bǎn",哀乐:"āi yuè",干道:"gàn dào",苦处:"kǔ chù",劈柴:"pǐ chái",长势:"zhǎng shì",天华:"tiān huá",共处:"gòng chǔ",校验:"jiào yàn",出塞:"chū sài",磨盘:"mò pán",萎靡:"wěi mǐ",奔丧:"bēn sāng",唱和:"chàng hè",大调:"dà diào",非分:"fēi fèn",钻营:"zuān yíng",夹子:"jiā zi",超载:"chāo zài",更始:"gēng shǐ",铃铛:"líng dang",披散:"pī sàn",发还:"fā huán",转轮:"zhuàn lún",横财:"hèng cái",泡桐:"pāo tóng",抛撒:"pāo sǎ",天呀:"tiān yā",糊糊:"hū hu",躯壳:"qū qiào",通量:"tōng liàng",奉还:"fèng huán",午觉:"wǔ jiào",闷棍:"mèn gùn",浪头:"làng tou",砚台:"yàn tái",油坊:"yóu fáng",学长:"xué zhǎng",过载:"guò zài",笔调:"bǐ diào",衣被:"yī bèi",畜产:"xù chǎn",调阅:"diào yuè",蛮干:"mán gàn",曾祖:"zēng zǔ",提干:"tí gàn",变调:"biàn diào",覆没:"fù mò",模子:"mú zi",乐律:"yuè lǜ",称心:"chèn xīn",木杆:"mù gān",重印:"chóng yìn",自省:"zì xǐng",提调:"tí diào",看相:"kàn xiàng",芋头:"yù tou",下切:"xià qiē",塞上:"sài shàng",铺张:"pū zhāng",藤蔓:"téng wàn",薄幸:"bó xìng",解数:"xiè shù",褪去:"tuì qù",霰弹:"xiàn dàn",柚木:"yóu mù",痕量:"hén liàng",雅乐:"yǎ yuè",号哭:"háo kū",诈降:"zhà xiáng",猪圈:"zhū juàn",咋舌:"zé shé",铣床:"xǐ chuáng",防弹:"fáng dàn",健将:"jiàn jiàng",丽水:"lí shuǐ",削发:"xuē fà",空当:"kòng dāng",多相:"duō xiàng",鲜见:"xiǎn jiàn",划桨:"huá jiǎng",载波:"zài bō",跳蚤:"tiào zao",俏皮:"qiào pí",吧嗒:"bā dā",结发:"jié fà",了断:"liǎo duàn",同调:"tóng diào",石磨:"shí mò",时差:"shí chā",鼻塞:"bí sè",挑子:"tiāo zi",推磨:"tuī mò",武侯:"wǔ hóu",抹煞:"mǒ shā",调转:"diào zhuǎn",籍没:"jí mò",还债:"huán zhài",调演:"diào yǎn",分划:"fēn huá",奇偶:"jī ǒu",断喝:"duàn hè",闷雷:"mèn léi",狼藉:"láng jí",饭量:"fàn liàng",还礼:"huán lǐ",转调:"zhuǎn diào",星相:"xīng xiàng",手相:"shǒu xiàng",配乐:"pèi yuè",盖头:"gài tou",连杆:"lián gǎn",簿记:"bù jì",刀把:"dāo bà",量词:"liàng cí",名角:"míng jué",步调:"bù diào",校本:"jiào běn",账簿:"zhàng bù",隽永:"juàn yǒng",稍为:"shāo wéi",易传:"yì zhuàn",乐谱:"yuè pǔ",牵累:"qiān lěi",答理:"dā li",喝斥:"hè chì",吟哦:"yín é",干渠:"gàn qú",海量:"hǎi liàng",精当:"jīng dàng",着床:"zhuó chuáng",月相:"yuè xiàng",庶几:"shù jī",宫观:"gōng guàn",论处:"lùn chǔ",征辟:"zhēng bì",厚朴:"hòu pò",介壳:"jiè qiào",吭哧:"kēng chī",咯血:"kǎ xiě",铺陈:"pū chén",重生:"chóng shēng",乐理:"yuè lǐ",哀号:"āi háo",藏历:"zàng lì",刚劲:"gāng jìng",削平:"xuē píng",浓荫:"nóng yīn",城垛:"chéng duǒ",当差:"dāng chāi",正传:"zhèng zhuàn",并处:"bìng chǔ",创面:"chuāng miàn",旦角:"dàn jué",薄礼:"bó lǐ",晃荡:"huàng dang",臊子:"sào zi",家什:"jiā shí",闷头:"mēn tóu",美发:"měi fà",度数:"dù shu",着凉:"zháo liáng",闯将:"chuǎng jiàng",几案:"jī àn",姘头:"pīn tou",差数:"chā shù",散碎:"sǎn suì",壅塞:"yōng sè",寒颤:"hán zhàn",牵强:"qiān qiǎng",无间:"wú jiàn",轮转:"lún zhuàn",号叫:"háo jiào",铺排:"pū pái",降伏:"xiáng fú",轧钢:"zhá gāng",东阿:"dōng ē",病假:"bìng jià",累加:"lěi jiā",梗塞:"gěng sè",弹夹:"dàn jiā",钻心:"zuān xīn",晃眼:"huǎng yǎn",魔爪:"mó zhǎo",标量:"biāo liàng",憋闷:"biē mèn",猜度:"cāi duó",处士:"chǔ shì",官差:"guān chāi",讨还:"tǎo huán",长门:"cháng mén",馏分:"liú fēn",里弄:"lǐ lòng",色相:"sè xiàng",雅兴:"yǎ xìng",角力:"jué lì",弹坑:"dàn kēng",枝杈:"zhī chà",夹具:"jiā jù",处刑:"chǔ xíng",悍将:"hàn jiàng",好学:"hào xué",好好:"hǎo hǎo",银发:"yín fà",扫把:"sào bǎ",法相:"fǎ xiàng",贵干:"guì gàn",供气:"gōng qì",空余:"kòng yú",捆扎:"kǔn zā",瘠薄:"jí bó",浆糊:"jiàng hu",嘎吱:"gā zhī",调令:"diào lìng",法帖:"fǎ tiè",淋病:"lìn bìng",调派:"diào pài",转盘:"zhuàn pán",供稿:"gōng gǎo",差官:"chāi guān",忧闷:"yōu mèn",教长:"jiào zhǎng",重唱:"chóng chàng",酒兴:"jiǔ xìng",乐坛:"yuè tán",花呢:"huā ní",叱喝:"chì hè",膀臂:"bǎng bì",得空:"dé kòng",转圈:"zhuàn quān",横暴:"hèng bào",哄抬:"hōng tái",引吭:"yǐn háng",载货:"zài huò",中计:"zhòng jì",官长:"guān zhǎng",相面:"xiàng miàn",看头:"kàn tou",盼头:"pàn tou",意兴:"yì xìng",军乐:"jūn yuè",累次:"lěi cì",骨嘟:"gǔ dū",燕赵:"yān zhào",报丧:"bào sāng",弥撒:"mí sa",挨斗:"ái dòu",扁舟:"piān zhōu",丑角:"chǒu jué",吊丧:"diào sāng",强将:"qiáng jiàng",重奏:"chóng zòu",发辫:"fà biàn",着魔:"zháo mó",着法:"zhāo fǎ",盛放:"shèng fàng",填塞:"tián sè",凶横:"xiōng hèng",稽首:"qǐ shǒu",碑帖:"bēi tiè",冲量:"chōng liàng",发菜:"fà cài",假发:"jiǎ fà",翻卷:"fān juǎn",小量:"xiǎo liàng",胶着:"jiāo zhuó",里子:"lǐ zi",调调:"diào diao",散兵:"sǎn bīng",高挑:"gāo tiǎo",播撒:"bō sǎ",夹心:"jiā xīn",扇动:"shān dòng",叨扰:"tāo rǎo",霓裳:"ní cháng",捻子:"niǎn zi",弥缝:"mí féng",撒布:"sǎ bù",场院:"cháng yuàn",省亲:"xǐng qīn",提拉:"tí lā",惯量:"guàn liàng",强逼:"qiáng bī",强征:"qiáng zhēng",晕车:"yùn chē",数道:"shù dào",带累:"dài lèi",拓本:"tà běn",嫌恶:"xián wù",宿将:"sù jiàng",龟裂:"jūn liè",缠夹:"chán jiā",发式:"fà shì",隔扇:"gé shàn",天分:"tiān fèn",癖好:"pǐ hào",四通:"sì tōng",白术:"bái zhú",划伤:"huá shāng",角斗:"jué dòu",听差:"tīng chāi",岁差:"suì chā",丧礼:"sāng lǐ",脉脉:"mò mò",削瘦:"xuē shòu",撒播:"sǎ bō",莎草:"suō cǎo",犍为:"qián wéi",调头:"diào tóu",龙卷:"lóng juǎn",外调:"wài diào",字帖:"zì tiè",卷发:"juǎn fà",揣度:"chuǎi duó",洋相:"yáng xiàng",散光:"sǎn guāng",骨碌:"gū lu",薄命:"bó mìng",笼头:"lóng tóu",咽炎:"yān yán",碌碡:"liù zhou",片儿:"piàn er",纤手:"qiàn shǒu",散体:"sǎn tǐ",内省:"nèi xǐng",强留:"qiáng liú",解送:"jiè sòng",反间:"fǎn jiàn",少壮:"shào zhuàng",留空:"liú kōng",告假:"gào jià",咳血:"ké xuè",薄暮:"bó mù",铺轨:"pū guǐ",磨削:"mó xuē",治丧:"zhì sāng",叉子:"chā zi",哄动:"hōng dòng",蛾子:"é zi",出落:"chū luò",股长:"gǔ zhǎng",贵处:"guì chù",还魂:"huán hún",例假:"lì jià",刹住:"shā zhù",身量:"shēn liàng",同好:"tóng hào",模量:"mó liàng",更生:"gēng shēng",服丧:"fú sāng",率直:"shuài zhí",字模:"zì mú",散架:"sǎn jià",答腔:"dā qiāng",交恶:"jiāo wù",薄情:"bó qíng",眼泡:"yǎn pāo",袅娜:"niǎo nuó",草垛:"cǎo duò",冲劲:"chòng jìn",呢喃:"ní nán",切中:"qiè zhòng",挑灯:"tiǎo dēng",还愿:"huán yuàn",激将:"jī jiàng",更鼓:"gēng gǔ",没药:"mò yào",败兴:"bài xìng",切面:"qiē miàn",散户:"sǎn hù",累进:"lěi jìn",背带:"bēi dài",秤杆:"chèng gǎn",碾坊:"niǎn fáng",簿子:"bù zi",扳手:"bān shǒu",铅山:"yán shān",儒将:"rú jiàng",重光:"chóng guāng",剪发:"jiǎn fà",长上:"zhǎng shàng",小传:"xiǎo zhuàn",压轴:"yā zhòu",弱冠:"ruò guàn",花卷:"huā juǎn",横祸:"hèng huò",夹克:"jiā kè",光晕:"guāng yùn",披靡:"pī mǐ",对调:"duì diào",夹持:"jiā chí",空额:"kòng é",平调:"píng diào",铺床:"pū chuáng",丧钟:"sāng zhōng",作乐:"zuò lè",少府:"shào fǔ",数数:"shuò shuò",奔头:"bèn tou",进给:"jìn jǐ",率性:"shuài xìng",乐子:"lè zi",绑扎:"bǎng zā",挑唆:"tiǎo suō",漂洗:"piǎo xǐ",夹墙:"jiā qiáng",咳喘:"ké chuǎn",乜斜:"miē xie",错处:"cuò chù",闷酒:"mèn jiǔ",时调:"shí diào",重孙:"chóng sūn",经幢:"jīng chuáng",圩场:"xū chǎng",调门:"diào mén",花头:"huā tóu",划拉:"huá la",套色:"tào shǎi",粗率:"cū shuài",相率:"xiāng shuài",款识:"kuǎn zhì",吁请:"yù qǐng",荫蔽:"yīn bì",文蛤:"wén gé",嘀嗒:"dī dā",调取:"diào qǔ",交差:"jiāo chāi",落子:"luò zǐ",相册:"xiàng cè",絮叨:"xù dao",落发:"luò fà",异相:"yì xiàng",浸没:"jìn mò",角抵:"jué dǐ",卸载:"xiè zài",春卷:"chūn juǎn",扎挣:"zhá zheng",畜养:"xù yǎng",吡咯:"bǐ luò",垛子:"duò zi",恶少:"è shào",发际:"fà jì",红苕:"hóng sháo",糨糊:"jiàng hu",哭丧:"kū sāng",稍息:"shào xī",晕船:"yùn chuán",校样:"jiào yàng",外差:"wài chā",脚爪:"jiǎo zhǎo",铺展:"pū zhǎn",芫荽:"yán sui",夹紧:"jiā jǐn",尿泡:"suī pào",丧乱:"sāng luàn",凶相:"xiōng xiàng",华发:"huá fà",打场:"dǎ cháng",云量:"yún liàng",正切:"zhèng qiē",划拳:"huá quán",划艇:"huá tǐng",评传:"píng zhuàn",拉纤:"lā qiàn",句读:"jù dòu",散剂:"sǎn jì",骨殖:"gǔ shi",塞音:"sè yīn",铺叙:"pū xù",阏氏:"yān zhī",冷颤:"lěng zhàn",煞住:"shā zhù",少男:"shào nán",管乐:"guǎn yuè",号啕:"háo táo",纳降:"nà xiáng",拥塞:"yōng sè",万乘:"wàn shèng",杆儿:"gǎn ér",葛藤:"gé téng",簿籍:"bù jí",皮夹:"pí jiā",校准:"jiào zhǔn",允当:"yǔn dàng",器量:"qì liàng",选调:"xuǎn diào",扮相:"bàn xiàng",干才:"gàn cái",基干:"jī gàn",割切:"gē qiē",国乐:"guó yuè",卡壳:"qiǎ ké",辟谷:"bì gǔ",磨房:"mò fáng",咿呀:"yī yā",芥末:"jiè mo",薄技:"bó jì",产假:"chǎn jià",诗兴:"shī xìng",重出:"chóng chū",转椅:"zhuàn yǐ",酌量:"zhuó liang",簿册:"bù cè",藏青:"zàng qīng",的士:"dī shì",调人:"diào rén",解元:"jiè yuán",茎干:"jīng gàn",巨量:"jù liàng",榔头:"láng tou",率真:"shuài zhēn",喷香:"pèn xiāng",锁钥:"suǒ yuè",虾蟆:"há má",相图:"xiàng tú",兴会:"xìng huì",灶头:"zào tóu",重婚:"chóng hūn",钻洞:"zuān dòng",忖度:"cǔn duó",党参:"dǎng shēn",调温:"diào wēn",杆塔:"gān tǎ",葛布:"gé bù",拱券:"gǒng xuàn",夹生:"jiā shēng",露馅:"lòu xiàn",恰切:"qià qiè",散见:"sǎn jiàn",哨卡:"shào qiǎ",烫发:"tàng fà",体量:"tǐ liàng",挺括:"tǐng kuò",系带:"jì dài",相士:"xiàng shì",羊圈:"yáng juàn",转矩:"zhuàn jǔ",吧台:"bā tái",苍术:"cāng zhú",菲薄:"fěi bó",蛤蚧:"gé jiè",蛤蜊:"gé lí",瓜蔓:"guā wàn",怪相:"guài xiàng",临帖:"lín tiè",女红:"nǚ gōng",刨床:"bào chuáng",翘楚:"qiáo chǔ",数九:"shǔ jiǔ",谈兴:"tán xìng",雄劲:"xióng jìng",扎染:"zā rǎn",遮荫:"zhē yīn",周正:"zhōu zhèng",赚头:"zhuàn tou",扒手:"pá shǒu",搀和:"chān huo",诚朴:"chéng pǔ",肚量:"dù liàng",干结:"gān jié",工尺:"gōng chě",家累:"jiā lěi",曲水:"qū shuǐ",沙参:"shā shēn",挑花:"tiǎo huā",阿门:"ā mén",背篓:"bēi lǒu",瘪三:"biē sān",裁处:"cái chǔ",创痛:"chuāng tòng",福相:"fú xiàng",更动:"gēng dòng",豪兴:"háo xìng",还阳:"huán yáng",还嘴:"huán zuǐ",借调:"jiè diào",卷云:"juǎn yún",流弹:"liú dàn",想头:"xiǎng tou",削价:"xuē jià",校阅:"jiào yuè",雅量:"yǎ liàng",别传:"bié zhuàn",薄酒:"bó jiǔ",春假:"chūn jià",发妻:"fà qī",哗哗:"huā huā",宽绰:"kuān chuo",了悟:"liǎo wù",切花:"qiē huā",审度:"shěn duó",应许:"yīng xǔ",转台:"zhuàn tái",仔猪:"zǐ zhū",裁量:"cái liáng",藏戏:"zàng xì",乘兴:"chéng xìng",绸缪:"chóu móu",摧折:"cuī zhé",调经:"tiáo jīng",调职:"diào zhí",缝缀:"féng zhuì",骨朵:"gū duǒ",核儿:"hú er",恒量:"héng liàng",还价:"huán jià",浑朴:"hún pǔ",苦差:"kǔ chāi",面糊:"miàn hù",煞车:"shā chē",省视:"xǐng shì",什锦:"shí jǐn",信差:"xìn chāi",余切:"yú qiē",攒眉:"cuán méi",炸糕:"zhá gāo",钻杆:"zuàn gǎn",扒灰:"pá huī",拌和:"bàn huò",长调:"cháng diào",大溜:"dà liù",抖搂:"dǒu lōu",飞转:"fēi zhuàn",干仗:"gàn zhàng",好胜:"hào shèng",画片:"huà piàn",搅混:"jiǎo hún",螺杆:"luó gǎn",木模:"mù mú",怒号:"nù háo",频数:"pín shù",无宁:"wú níng",遗少:"yí shào",邮差:"yóu chāi",占卦:"zhān guà",占星:"zhān xīng",重审:"chóng shěn",自量:"zì liàng",调防:"diào fáng",发廊:"fà láng",反调:"fǎn diào",缝子:"fèng zi",更夫:"gēng fū",骨子:"gǔ zi",光杆:"guāng gǎn",夹棍:"jiā gùn",居丧:"jū sāng",巨贾:"jù gǔ",看押:"kān yā",空转:"kōng zhuàn",量力:"liàng lì",炮烙:"páo luò",赔还:"péi huán",扑扇:"pū shān",散记:"sǎn jì",散件:"sǎn jiàn",删削:"shān xuē",射干:"shè gàn",条几:"tiáo jī",偷空:"tōu kòng",削壁:"xuē bì",校核:"jiào hé",阴干:"yīn gān",择菜:"zhái cài",重九:"chóng jiǔ",主调:"zhǔ diào",自禁:"zì jīn",吧唧:"bā jī",便溺:"biàn niào",词调:"cí diào",叨咕:"dáo gu",落枕:"lào zhěn",铺砌:"pū qì",刷白:"shuà bái",委靡:"wěi mǐ",系泊:"xì bó",相马:"xiàng mǎ",熨帖:"yù tiē",转筋:"zhuàn jīn",棒喝:"bàng hè",傧相:"bīn xiàng",镐头:"gǎo tóu",间苗:"jiàn miáo",乐池:"yuè chí",卖相:"mài xiàng",屏弃:"bǐng qì",铅弹:"qiān dàn",切变:"qiē biàn",请调:"qǐng diào",群氓:"qún méng",散板:"sǎn bǎn",省察:"xǐng chá",事假:"shì jià",纤绳:"qiàn shéng",重影:"chóng yǐng",耕种:"gēng zhòng",种地:"zhòng dì",种菜:"zhòng cài",栽种:"zāi zhòng",接种:"jiē zhòng",垦种:"kěn zhòng",种殖:"zhòng zhí",种瓜:"zhòng guā",种豆:"zhòng dòu",种树:"zhòng shù",睡着:"shuì zháo",笼子:"lóng zi",重启:"chóng qǐ",重整:"chóng zhěng",重弹:"chóng tán",重足:"chóng zú",重山:"chóng shān",重游:"chóng yóu",重峦:"chóng luán",爷爷:"yé ye",奶奶:"nǎi nai",姥爷:"lǎo ye",爸爸:"bà ba",妈妈:"mā ma",婶婶:"shěn shen",舅舅:"jiù jiu",姑姑:"gū gu",叔叔:"shū shu",姨夫:"yí fu",舅母:"jiù mu",姑父:"gū fu",姐夫:"jiě fu",婆婆:"pó po",公公:"gōng gong",舅子:"jiù zi",姐姐:"jiě jie",哥哥:"gē ge",妹妹:"mèi mei",妹夫:"mèi fu",姨子:"yí zi",宝宝:"bǎo bao",娃娃:"wá wa",孩子:"hái zi",日子:"rì zi",样子:"yàng zi",狮子:"shī zi",身子:"shēn zi",架子:"jià zi",嫂子:"sǎo zi",鼻子:"bí zi",亭子:"tíng zi",折子:"zhé zi",面子:"miàn zi",脖子:"bó zi",辈子:"bèi zi",帽子:"mào zi",拍子:"pāi zi",柱子:"zhù zi",辫子:"biàn zi",鸽子:"gē zi",房子:"fáng zi",丸子:"wán zi",摊子:"tān zi",牌子:"pái zi",胡子:"hú zi",鬼子:"guǐ zi",矮子:"ǎi zi",鸭子:"yā zi",小子:"xiǎo zi",影子:"yǐng zi",屋子:"wū zi",对子:"duì zi",点子:"diǎn zi",本子:"běn zi",种子:"zhǒng zi",儿子:"ér zi",兔子:"tù zi",骗子:"piàn zi",院子:"yuàn zi",猴子:"hóu zi",嗓子:"sǎng zi",侄子:"zhí zi",柿子:"shì zi",钳子:"qián zi",虱子:"shī zi",瓶子:"píng zi",豹子:"bào zi",筷子:"kuài zi",篮子:"lán zi",绳子:"shéng zi",嘴巴:"zuǐ ba",耳朵:"ěr duo",茄子:"qié zi",蚌埠:"bèng bù",崆峒:"kōng tóng",琵琶:"pí pa",蘑菇:"mó gu",葫芦:"hú lu",狐狸:"hú li",桔子:"jú zi",盒子:"hé zi",桌子:"zhuō zi",竹子:"zhú zi",师傅:"shī fu",衣服:"yī fu",袜子:"wà zi",杯子:"bēi zi",刺猬:"cì wei",麦子:"mài zi",队伍:"duì wu",知了:"zhī liǎo",鱼儿:"yú er",馄饨:"hún tun",灯笼:"dēng long",庄稼:"zhuāng jia",聪明:"cōng ming",镜子:"jìng zi",银子:"yín zi",盘子:"pán zi",了却:"liǎo què",力气:"lì qi",席子:"xí zi",林子:"lín zi",朝霞:"zhāo xiá",朝夕:"zhāo xī",朝气:"zhāo qì",翅膀:"chì bǎng",省长:"shěng zhǎng",臧否:"zāng pǐ",否泰:"pǐ tài",变得:"biàn de",丈夫:"zhàng fu",豆腐:"dòu fu",笔杆:"bǐ gǎn",枞阳:"zōng yáng",行人:"xíng rén",打着:"dǎ zhe",第一:"dì yī",万一:"wàn yī",之一:"zhī yī",得之:"dé zhī",统一:"tǒng yī",唯一:"wéi yī",专一:"zhuān yī",单一:"dān yī",如一:"rú yī",其一:"qí yī",合一:"hé yī",逐一:"zhú yī",周一:"zhōu yī",初一:"chū yī",研一:"yán yī",归一:"guī yī",假一:"jiǎ yī",闻一:"wén yī",了了:"liǎo liǎo",公了:"gōng liǎo",私了:"sī liǎo",一月:"yī yuè",一号:"yī hào",一级:"yī jí",一等:"yī děng",一哥:"yī gē",月一:"yuè yī",一一:"yī yī",二一:"èr yī",三一:"sān yī",四一:"sì yī",五一:"wǔ yī",六一:"liù yī",七一:"qī yī",八一:"bā yī",九一:"jiǔ yī","一〇":"yī líng",一零:"yī líng",一二:"yī èr",一三:"yī sān",一四:"yī sì",一五:"yī wǔ",一六:"yī liù",一七:"yī qī",一八:"yī bā",一九:"yī jiǔ",一又:"yī yòu",一饼:"yī bǐng",一楼:"yī lóu",为例:"wéi lì",为准:"wéi zhǔn",沧海:"cāng hǎi",难为:"nán wéi",责难:"zé nàn",患难:"huàn nàn",磨难:"mó nàn",大难:"dà nàn",刁难:"diāo nàn",殉难:"xùn nàn",落难:"luò nàn",罹难:"lí nàn",灾难:"zāi nàn",难民:"nàn mín",苦难:"kǔ nàn",危难:"wēi nàn",发难:"fā nàn",逃难:"táo nàn",避难:"bì nàn",遇难:"yù nàn",阻难:"zǔ nàn",厄难:"è nàn",徇难:"xùn nàn",空难:"kōng nàn",喜欢:"xǐ huan",朝朝:"zhāo zhāo",不行:"bù xíng",轧轧:"yà yà",弯曲:"wān qū",扭曲:"niǔ qū",曲直:"qū zhí",委曲:"wěi qū",酒曲:"jiǔ qū",曲径:"qū jìng",曲解:"qū jiě",歪曲:"wāi qū",曲线:"qū xiàn",曲阜:"qū fù",九曲:"jiǔ qū",曲折:"qū zhé",曲肱:"qū gōng",曲意:"qū yì",仡佬:"gē lǎo"},V3e=Object.keys(NB).map(e=>({zh:e,pinyin:NB[e],probability:2e-8,length:2,priority:Dc.Normal,dict:Symbol("dict2")})),BB={为什么:"wèi shén me",实际上:"shí jì shang",检察长:"jiǎn chá zhǎng",干什么:"gàn shén me",这会儿:"zhè huì er",尽可能:"jǐn kě néng",董事长:"dǒng shì zhǎng",了不起:"liǎo bù qǐ",参谋长:"cān móu zhǎng",朝鲜族:"cháo xiǎn zú",海内外:"hǎi nèi wài",禁不住:"jīn bú zhù",柏拉图:"bó lā tú",不在乎:"bú zài hu",洛杉矶:"luò shān jī",有点儿:"yǒu diǎn er",迫击炮:"pǎi jī pào",不得了:"bù dé liǎo",马尾松:"mǎ wěi sōng",运输量:"yùn shū liàng",发脾气:"fā pí qi",士大夫:"shì dà fū",鸭绿江:"yā lù jiāng",压根儿:"yà gēn er",对得起:"duì de qǐ",那会儿:"nà huì er",自个儿:"zì gě er",物理量:"wù lǐ liàng",怎么着:"zěn me zhāo",明晃晃:"míng huǎng huǎng",节假日:"jié jià rì",心里话:"xīn lǐ huà",发行量:"fā xíng liàng",兴冲冲:"xìng chōng chōng",分子量:"fēn zǐ liàng",国子监:"guó zǐ jiàn",老大难:"lǎo dà nán",党内外:"dǎng nèi wài",这么着:"zhè me zhāo",少奶奶:"shào nǎi nai",暗地里:"àn dì lǐ",更年期:"gēng nián qī",工作量:"gōng zuò liàng",背地里:"bèi dì lǐ",山里红:"shān li hóng",好好儿:"hǎo hāo er",交响乐:"jiāo xiǎng yuè",好意思:"hǎo yì si",吐谷浑:"tǔ yù hún",没意思:"méi yì si",理发师:"lǐ fà shī",塔什干:"tǎ shí gān",充其量:"chōng qí liàng",靠得住:"kào de zhù",车行道:"chē xíng dào",人行道:"rén xíng dào",中郎将:"zhōng láng jiàng",照明弹:"zhào míng dàn",烟幕弹:"yān mù dàn",没奈何:"mò nài hé",乱哄哄:"luàn hōng hōng",惠更斯:"huì gēng sī",载重量:"zài zhòng liàng",瞧得起:"qiáo de qǐ",纪传体:"jì zhuàn tǐ",阿房宫:"ē páng gōng",卷心菜:"juǎn xīn cài",戏班子:"xì bān zi",过得去:"guò de qù",花岗石:"huā gāng shí",外甥女:"wài sheng nǚ",团团转:"tuán tuán zhuàn",大堡礁:"dà bǎo jiāo",燃烧弹:"rán shāo dàn",劳什子:"láo shí zi",摇滚乐:"yáo gǔn yuè",夹竹桃:"jiā zhú táo",闹哄哄:"nào hōng hōng",三连冠:"sān lián guàn",重头戏:"zhòng tóu xì",二人转:"èr rén zhuàn",节骨眼:"jiē gǔ yǎn",知识面:"zhī shi miàn",护士长:"hù shi zhǎng",信号弹:"xìn hào dàn",干电池:"gān diàn chí",枪杆子:"qiāng gǎn zi",哭丧棒:"kū sāng bàng",鼻咽癌:"bí yān ái",瓦岗军:"wǎ gāng jūn",买得起:"mǎi de qǐ",癞蛤蟆:"lài há ma",脊梁骨:"jǐ liang gǔ",子母弹:"zǐ mǔ dàn",开小差:"kāi xiǎo chāi",女强人:"nǚ qiáng rén",英雄传:"yīng xióng zhuàn",爵士乐:"jué shì yuè",说笑话:"shuō xiào hua",碰头会:"pèng tóu huì",玻璃钢:"bō li gāng",曳光弹:"yè guāng dàn",少林拳:"shào lín quán",咏叹调:"yǒng tàn diào",少先队:"shào xiān duì",灵长目:"líng zhǎng mù",对着干:"duì zhe gàn",蒙蒙亮:"méng méng liàng",软骨头:"ruǎn gǔ tou",铺盖卷:"pū gài juǎn",和稀泥:"huò xī ní",背黑锅:"bēi hēi guō",红彤彤:"hóng tōng tōng",武侯祠:"wǔ hóu cí",打哆嗦:"dǎ duō suo",户口簿:"hù kǒu bù",马尾藻:"mǎ wěi zǎo",夜猫子:"yè māo zi",打手势:"dǎ shǒu shì",龙王爷:"lóng wáng yé",气头上:"qì tóu shang",糊涂虫:"hú tu chóng",笔杆子:"bǐ gǎn zi",占便宜:"zhàn pián yi",打主意:"dǎ zhǔ yì",多弹头:"duō dàn tóu",露一手:"lòu yì shǒu",堰塞湖:"yàn sè hú",保得住:"bǎo de zhù",趵突泉:"bào tū quán",奥得河:"ào de hé",司务长:"sī wù zhǎng",禁不起:"jīn bù qǐ",什刹海:"shí chà hǎi",莲花落:"lián huā lào",见世面:"jiàn shì miàn",豁出去:"huō chū qù",电位差:"diàn wèi chā",挨个儿:"āi gè er",那阵儿:"nà zhèn er",肺活量:"fèi huó liàng",大师傅:"dà shī fu",掷弹筒:"zhì dàn tǒng",打呼噜:"dǎ hū lu",广渠门:"ān qú mén",未见得:"wèi jiàn dé",大婶儿:"dà shěn er",谈得来:"tán de lái",脚丫子:"jiǎo yā zi",空包弹:"kōng bāo dàn",窝里斗:"wō li dòu",弹着点:"dàn zhuó diǎn",个头儿:"gè tóu er",看得起:"kàn de qǐ",糊涂账:"hú tu zhàng",大猩猩:"dà xīng xing",禁得起:"jīn de qǐ",法相宗:"fǎ xiàng zōng",可怜相:"kě lián xiàng",吃得下:"chī de xià",汉堡包:"hàn bǎo bāo",闹嚷嚷:"nào rāng rāng",数来宝:"shǔ lái bǎo",合得来:"hé de lái",干性油:"gān xìng yóu",闷葫芦:"mèn hú lu",呱呱叫:"guā guā jiào",西洋参:"xī yáng shēn",林荫道:"lín yīn dào",拉家常:"lā jiā cháng",卷铺盖:"juǎn pū gài",过得硬:"guò de yìng",飞将军:"fēi jiāng jūn",挑大梁:"tiǎo dà liáng",哈巴狗:"hǎ ba gǒu",过家家:"guò jiā jiā",催泪弹:"cuī lèi dàn",雨夹雪:"yǔ jiā xuě",敲竹杠:"qiāo zhú gàng",列车长:"liè chē zhǎng",华达呢:"huá dá ní",犯得着:"fàn de zháo",土疙瘩:"tǔ gē da",煞风景:"shā fēng jǐng",轻量级:"qīng liàng jí",羞答答:"xiū dā dā",石子儿:"shí zǐ er",达姆弹:"dá mǔ dàn",科教片:"kē jiào piān",侃大山:"kǎn dà shān",丁点儿:"dīng diǎn er",吃得消:"chī de xiāo",捋虎须:"luō hǔ xū",高丽参:"gāo lí shēn",众生相:"zhòng shēng xiàng",咽峡炎:"yān xiá yán",禁得住:"jīn de zhù",吃得开:"chī de kāi",柞丝绸:"zuò sī chóu",应声虫:"yìng shēng chóng",数得着:"shǔ de zháo",傻劲儿:"shǎ jìn er",铅玻璃:"qiān bō li",可的松:"kě dì sōng",划得来:"huá de lái",晕乎乎:"yūn hū hū",屎壳郎:"shǐ ke làng",尥蹶子:"liào juě zi",藏红花:"zàng hóng huā",闷罐车:"mèn guàn chē",卡脖子:"qiǎ bó zi",红澄澄:"hóng deng deng",赶得及:"gǎn de jí",当间儿:"dāng jiàn er",露马脚:"lòu mǎ jiǎo",鸡内金:"jī nèi jīn",犯得上:"fàn de shàng",钉齿耙:"dīng chǐ bà",饱和点:"bǎo hé diǎn",龙爪槐:"lóng zhǎo huái",喝倒彩:"hè dào cǎi",定冠词:"dìng guàn cí",担担面:"dàn dan miàn",吃得住:"chī de zhù",爪尖儿:"zhuǎ jiān er",支着儿:"zhī zhāo er",折跟头:"zhē gēn tou",阴着儿:"yīn zhāo er",烟卷儿:"yān juǎn er",宣传弹:"xuān chuán dàn",信皮儿:"xìn pí er",弦切角:"xián qiē jiǎo",缩砂密:"sù shā mì",说得来:"shuō de lái",水漂儿:"shuǐ piāo er",耍笔杆:"shuǎ bǐ gǎn",数得上:"shǔ de shàng",数不着:"shǔ bù zháo",数不清:"shǔ bù qīng",什件儿:"shí jiàn er",生死簿:"shēng sǐ bù",扇风机:"shān fēng jī",撒呓挣:"sā yì zheng",日记簿:"rì jì bù",热得快:"rè de kuài",亲家公:"qìng jia gōng",奇函数:"jī hán shù",拍纸簿:"pāi zhǐ bù",努劲儿:"nǔ jìn er",泥娃娃:"ní wá wa",内切圆:"nèi qiē yuán",哪会儿:"nǎ huì er",闷头儿:"mēn tóu er",没谱儿:"méi pǔ er",铆劲儿:"mǎo jìn er",溜肩膀:"liū jiān bǎng",了望台:"liào wàng tái",老来少:"lǎo lái shào",坤角儿:"kūn jué er",考勤簿:"kǎo qín bù",卷笔刀:"juǎn bǐ dāo",进给量:"jìn jǐ liàng",划不来:"huá bù lái",汗褂儿:"hàn guà er",鼓囊囊:"gǔ nāng nāng",够劲儿:"gòu jìn er",公切线:"gōng qiē xiàn",搁得住:"gé de zhù",赶浪头:"gǎn làng tóu",赶得上:"gǎn de shàng",干酵母:"gān jiào mǔ",嘎渣儿:"gā zhā er",嘎嘣脆:"gā bēng cuì",对得住:"duì de zhù",逗闷子:"dòu mèn zi",顶呱呱:"dǐng guā guā",滴溜儿:"dī liù er",大轴子:"dà zhòu zi",打板子:"dǎ bǎn zi",寸劲儿:"cùn jìn er",醋劲儿:"cù jìn er",揣手儿:"chuāi shǒu er",冲劲儿:"chòng jìn er",吃得来:"chī de lái",不更事:"bù gēng shì",奔头儿:"bèn tou er",百夫长:"bǎi fū zhǎng",娃娃亲:"wá wa qīn",死劲儿:"sǐ jìn er",骨朵儿:"gū duǒ er",功劳簿:"gōng láo bù",都江堰:"dū jiāng yàn",一担水:"yí dàn shuǐ",否极泰:"pǐ jí tài",泰来否:"tài lái pǐ",咳特灵:"ké tè líng",开户行:"kāi hù háng",郦食其:"lì yì jī",花事了:"huā shì liǎo",一更更:"yì gēng gēng",一重山:"yì chóng shān",风一更:"fēng yì gēng",雪一更:"xuě yì gēng",归一码:"guī yì mǎ",星期一:"xīng qī yī",礼拜一:"lǐ bài yī",一季度:"yī jì dù",一月一:"yī yuè yī",一字马:"yī zì mǎ",一是一:"yī shì yī",一次方:"yī cì fāng",一阳指:"yī yáng zhǐ",一字决:"yī zì jué",一年级:"yī nián jí",一不做:"yī bú zuò",屈戌儿:"qū qu ér",难为水:"nán wéi shuǐ",难为情:"nán wéi qíng",行一行:"xíng yì háng",别别的:"biè bié de",干哪行:"gàn nǎ háng",干一行:"gàn yì háng",曲别针:"qū bié zhēn"},U3e=Object.keys(BB).map(e=>({zh:e,pinyin:BB[e],probability:2e-8,length:3,priority:Dc.Normal,dict:Symbol("dict3")})),zB={成吉思汗:"chéng jí sī hán",四通八达:"sì tōng bā dá",一模一样:"yì mú yí yàng",青藏高原:"qīng zàng gāo yuán",阿弥陀佛:"ē mí tuó fó",解放思想:"jiè fàng sī xiǎng",所作所为:"suǒ zuò suǒ wéi",迷迷糊糊:"mí mí hu hū",荷枪实弹:"hè qiāng shí dàn",兴高采烈:"xìng gāo cǎi liè",无能为力:"wú néng wéi lì",布鲁塞尔:"bù lǔ sài ěr",为所欲为:"wéi suǒ yù wéi",克什米尔:"kè shí mǐ ěr",没完没了:"méi wán méi liǎo",不为人知:"bù wéi rén zhī",结结巴巴:"jiē jiē bā bā",前仆后继:"qián pū hòu jì",铺天盖地:"pū tiān gài dì",直截了当:"zhí jié liǎo dàng",供不应求:"gōng bú yìng qiú",御史大夫:"yù shǐ dà fū",不为瓦全:"bù wéi wǎ quán",不可收拾:"bù kě shōu shi",胡作非为:"hú zuò fēi wéi",分毫不差:"fēn háo bú chà",模模糊糊:"mó mó hu hū",不足为奇:"bù zú wéi qí",悄无声息:"qiǎo wú shēng xī",了如指掌:"liǎo rú zhǐ zhǎng",深恶痛绝:"shēn wù tòng jué",高高兴兴:"gāo gāo xìng xìng",唉声叹气:"āi shēng tàn qì",汉藏语系:"hàn zàng yǔ xì",处心积虑:"chǔ xīn jī lǜ",泣不成声:"qì bù chéng shēng",半夜三更:"bàn yè sān gēng",失魂落魄:"shī hún luò pò",二十八宿:"èr shí bā xiù",转来转去:"zhuàn lái zhuàn qù",数以万计:"shǔ yǐ wàn jì",相依为命:"xiāng yī wéi mìng",恋恋不舍:"liàn liàn bù shě",屈指可数:"qū zhǐ kě shǔ",神出鬼没:"shén chū guǐ mò",结结实实:"jiē jiē shí shí",有的放矢:"yǒu dì fàng shǐ",叽哩咕噜:"jī lǐ gū lū",调兵遣将:"diào bīng qiǎn jiàng",载歌载舞:"zài gē zài wǔ",转危为安:"zhuǎn wēi wéi ān",踏踏实实:"tā tā shi shí",桑给巴尔:"sāng jǐ bā ěr",装模作样:"zhuāng mú zuò yàng",见义勇为:"jiàn yì yǒng wéi",相差无几:"xiāng chā wú jǐ",叹为观止:"tàn wéi guān zhǐ",闷闷不乐:"mèn mèn bú lè",喜怒哀乐:"xǐ nù āi lè",鲜为人知:"xiǎn wéi rén zhī",张牙舞爪:"zhāng yá wǔ zhǎo",为非作歹:"wéi fēi zuò dǎi",含糊其辞:"hán hú qí cí",疲于奔命:"pí yú bēn mìng",勉为其难:"miǎn wéi qí nán",依依不舍:"yī yī bù shě",顶头上司:"dǐng tóu shàng si",不着边际:"bù zhuó biān jì",大模大样:"dà mú dà yàng",寻欢作乐:"xún huān zuò lè",一走了之:"yì zǒu liǎo zhī",字里行间:"zì lǐ háng jiān",含含糊糊:"hán hán hu hū",恰如其分:"qià rú qí fèn",破涕为笑:"pò tì wéi xiào",深更半夜:"shēn gēng bàn yè",千差万别:"qiān chā wàn bié",数不胜数:"shǔ bú shèng shǔ",据为己有:"jù wéi jǐ yǒu",天旋地转:"tiān xuán dì zhuàn",养尊处优:"yǎng zūn chǔ yōu",玻璃纤维:"bō li xiān wéi",吵吵闹闹:"chāo chao nào nào",晕头转向:"yūn tóu zhuàn xiàng",土生土长:"tǔ shēng tǔ zhǎng",宁死不屈:"nìng sǐ bù qū",不省人事:"bù xǐng rén shì",尽力而为:"jìn lì ér wéi",精明强干:"jīng míng qiáng gàn",唠唠叨叨:"láo lao dāo dāo",叽叽喳喳:"jī ji zhā zhā",功不可没:"gōng bù kě mò",锲而不舍:"qiè ér bù shě",排忧解难:"pái yōu jiě nàn",稀里糊涂:"xī li hú tú",各有所长:"gè yǒu suǒ cháng",的的确确:"dí dí què què",哄堂大笑:"hōng táng dà xiào",听而不闻:"tīng ér bù wén",刀耕火种:"dāo gēng huǒ zhòng",内分泌腺:"nèi fèn mì xiàn",化险为夷:"huà xiǎn wéi yí",百发百中:"bǎi fā bǎi zhòng",重见天日:"chóng jiàn tiān rì",反败为胜:"fǎn bài wéi shèng",一了百了:"yì liǎo bǎi liǎo",大大咧咧:"dà da liē liē",心急火燎:"xīn jí huǒ liǎo",粗心大意:"cū xīn dà yi",鸡皮疙瘩:"jī pí gē da",夷为平地:"yí wéi píng dì",日积月累:"rì jī yuè lěi",设身处地:"shè shēn chǔ dì",投其所好:"tóu qí suǒ hào",间不容发:"jiān bù róng fà",人满为患:"rén mǎn wéi huàn",穷追不舍:"qióng zhuī bù shě",为时已晚:"wéi shí yǐ wǎn",如数家珍:"rú shǔ jiā zhēn",心里有数:"xīn lǐ yǒu shù",以牙还牙:"yǐ yá huán yá",神不守舍:"shén bù shǒu shě",孟什维克:"mèng shí wéi kè",各自为战:"gè zì wéi zhàn",怨声载道:"yuàn shēng zài dào",救苦救难:"jiù kǔ jiù nàn",好好先生:"hǎo hǎo xiān sheng",怪模怪样:"guài mú guài yàng",抛头露面:"pāo tóu lù miàn",游手好闲:"yóu shǒu hào xián",无所不为:"wú suǒ bù wéi",调虎离山:"diào hǔ lí shān",步步为营:"bù bù wéi yíng",好大喜功:"hào dà xǐ gōng",众矢之的:"zhòng shǐ zhī dì",长生不死:"cháng shēng bù sǐ",蔚为壮观:"wèi wéi zhuàng guān",不可胜数:"bù kě shèng shǔ",鬼使神差:"guǐ shǐ shén chāi",洁身自好:"jié shēn zì hào",敢作敢为:"gǎn zuò gǎn wéi",茅塞顿开:"máo sè dùn kāi",走马换将:"zǒu mǎ huàn jiàng",为时过早:"wéi shí guò zǎo",为人师表:"wéi rén shī biǎo",阴差阳错:"yīn chā yáng cuò",油腔滑调:"yóu qiāng huá diào",重蹈覆辙:"chóng dǎo fù zhé",骂骂咧咧:"mà ma liē liē",絮絮叨叨:"xù xù dāo dāo",如履薄冰:"rú lǚ bó bīng",损兵折将:"sǔn bīng zhé jiàng",拐弯抹角:"guǎi wān mò jiǎo",像模像样:"xiàng mú xiàng yàng",供过于求:"gōng guò yú qiú",开花结果:"kāi huā jiē guǒ",仔仔细细:"zǐ zǐ xì xì",川藏公路:"chuān zàng gōng lù",河北梆子:"hé běi bāng zi",长年累月:"cháng nián lěi yuè",正儿八经:"zhèng er bā jīng",不识抬举:"bù shí tái ju",重振旗鼓:"chóng zhèn qí gǔ",气息奄奄:"qì xī yān yān",紧追不舍:"jǐn zhuī bù shě",服服帖帖:"fú fu tiē tiē",强词夺理:"qiǎng cí duó lǐ",噼里啪啦:"pī li pā lā",人才济济:"rén cái jǐ jǐ",发人深省:"fā rén shēn xǐng",不足为凭:"bù zú wéi píng",为富不仁:"wéi fù bù rén",连篇累牍:"lián piān lěi dú",呼天抢地:"hū tiān qiāng dì",落落大方:"luò luò dà fāng",自吹自擂:"zì chuī zì léi",乐善好施:"lè shàn hào shī",以攻为守:"yǐ gōng wéi shǒu",磨磨蹭蹭:"mó mó cèng cèng",削铁如泥:"xuē tiě rú ní",助纣为虐:"zhù zhòu wéi nüè",以退为进:"yǐ tuì wéi jìn",嘁嘁喳喳:"qī qī chā chā",枪林弹雨:"qiāng lín dàn yǔ",令人发指:"lìng rén fà zhǐ",转败为胜:"zhuǎn bài wéi shèng",转弯抹角:"zhuǎn wān mò jiǎo",在劫难逃:"zài jié nán táo",正当防卫:"zhèng dàng fáng wèi",不足为怪:"bù zú wéi guài",难兄难弟:"nàn xiōng nàn dì",咿咿呀呀:"yī yī yā yā",弹尽粮绝:"dàn jìn liáng jué",阿谀奉承:"ē yú fèng chéng",稀里哗啦:"xī li huā lā",返老还童:"fǎn lǎo huán tóng",好高骛远:"hào gāo wù yuǎn",鹿死谁手:"lù sǐ shéi shǒu",差强人意:"chā qiáng rén yì",大吹大擂:"dà chuī dà léi",成家立业:"chéng jiā lì yè",自怨自艾:"zì yuàn zì yì",负债累累:"fù zhài lěi lěi",古为今用:"gǔ wéi jīn yòng",入土为安:"rù tǔ wéi ān",下不为例:"xià bù wéi lì",一哄而上:"yì hōng ér shàng",没头苍蝇:"méi tóu cāng ying",天差地远:"tiān chā dì yuǎn",风卷残云:"fēng juǎn cán yún",多灾多难:"duō zāi duō nàn",乳臭未干:"rǔ xiù wèi gān",行家里手:"háng jiā lǐ shǒu",狼狈为奸:"láng bèi wéi jiān",处变不惊:"chǔ biàn bù jīng",一唱一和:"yí chàng yí hè",一念之差:"yí niàn zhī chā",金蝉脱壳:"jīn chán tuō qiào",滴滴答答:"dī dī dā dā",硕果累累:"shuò guǒ léi léi",好整以暇:"hào zhěng yǐ xiá",红得发紫:"hóng de fā zǐ",传为美谈:"chuán wéi měi tán",富商大贾:"fù shāng dà gǔ",四海为家:"sì hǎi wéi jiā",了若指掌:"liǎo ruò zhǐ zhǎng",大有可为:"dà yǒu kě wéi",出头露面:"chū tóu lù miàn",鼓鼓囊囊:"gǔ gu nāng nāng",窗明几净:"chuāng míng jī jìng",泰然处之:"tài rán chǔ zhī",怒发冲冠:"nù fà chōng guān",有机玻璃:"yǒu jī bō li",骨头架子:"gǔ tou jià zi",义薄云天:"yì bó yún tiān",一丁点儿:"yī dīng diǎn er",时来运转:"shí lái yùn zhuǎn",陈词滥调:"chén cí làn diào",化整为零:"huà zhěng wéi líng",火烧火燎:"huǒ shāo huǒ liǎo",干脆利索:"gàn cuì lì suǒ",吊儿郎当:"diào er láng dāng",广种薄收:"guǎng zhòng bó shōu",种瓜得瓜:"zhòng guā dé guā",种豆得豆:"zhòng dòu dé dòu",难舍难分:"nán shě nán fēn",歃血为盟:"shà xuè wéi méng",奋发有为:"fèn fā yǒu wéi",阴错阳差:"yīn cuò yáng chā",东躲西藏:"dōng duǒ xī cáng",烟熏火燎:"yān xūn huǒ liǎo",钻牛角尖:"zuān niú jiǎo jiān",乔装打扮:"qiáo zhuāng dǎ bàn",改弦更张:"gǎi xián gēng zhāng",河南梆子:"hé nán bāng zi",好吃懒做:"hào chī lǎn zuò",何乐不为:"hé lè bù wéi",大出风头:"dà chū fēng tóu",攻城掠地:"gōng chéng lüè dì",漂漂亮亮:"piào piào liang liang",折衷主义:"zhé zhōng zhǔ yì",大马哈鱼:"dà mǎ hǎ yú",绿树成荫:"lǜ shù chéng yīn",率先垂范:"shuài xiān chuí fàn",家长里短:"jiā cháng lǐ duǎn",宽大为怀:"kuān dà wéi huái",左膀右臂:"zuǒ bǎng yòu bì",一笑了之:"yí xiào liǎo zhī",天下为公:"tiān xià wéi gōng",还我河山:"huán wǒ hé shān",何足为奇:"hé zú wéi qí",好自为之:"hǎo zì wéi zhī",风姿绰约:"fēng zī chuò yuē",大雨滂沱:"dà yǔ pāng tuó",传为佳话:"chuán wéi jiā huà",吃里扒外:"chī lǐ pá wài",重操旧业:"chóng cāo jiù yè",小家子气:"xiǎo jiā zi qì",少不更事:"shào bù gēng shì",难分难舍:"nán fēn nán shě",添砖加瓦:"tiān zhuān jiā wǎ",是非分明:"shì fēi fēn míng",舍我其谁:"shě wǒ qí shuí",偏听偏信:"piān tīng piān xìn",量入为出:"liàng rù wéi chū",降龙伏虎:"xiáng lóng fú hǔ",钢化玻璃:"gāng huà bō li",正中下怀:"zhèng zhòng xià huái",以身许国:"yǐ shēn xǔ guó",一语中的:"yì yǔ zhòng dì",丧魂落魄:"sàng hún luò pò",三座大山:"sān zuò dà shān",济济一堂:"jǐ jǐ yì táng",好事之徒:"hào shì zhī tú",干净利索:"gàn jìng lì suǒ",出将入相:"chū jiàng rù xiàng",袅袅娜娜:"niǎo niǎo nuó nuó",狐狸尾巴:"hú li wěi ba",好逸恶劳:"hào yì wù láo",大而无当:"dà ér wú dàng",打马虎眼:"dǎ mǎ hu yǎn",板上钉钉:"bǎn shàng dìng dīng",吆五喝六:"yāo wǔ hè liù",虾兵蟹将:"xiā bīng xiè jiàng",水调歌头:"shuǐ diào gē tóu",数典忘祖:"shǔ diǎn wàng zǔ",人事不省:"rén shì bù xǐng",曲高和寡:"qǔ gāo hè guǎ",屡教不改:"lǚ jiào bù gǎi",互为因果:"hù wéi yīn guǒ",互为表里:"hù wéi biǎo lǐ",厚此薄彼:"hòu cǐ bó bǐ",过关斩将:"guò guān zhǎn jiàng",疙疙瘩瘩:"gē ge dā dā",大腹便便:"dà fù pián pián",走为上策:"zǒu wéi shàng cè",冤家对头:"yuān jia duì tóu",有隙可乘:"yǒu xì kě chèng",一鳞半爪:"yì lín bàn zhǎo",片言只语:"piàn yán zhǐ yǔ",开花结实:"kāi huā jié shí",经年累月:"jīng nián lěi yuè",含糊其词:"hán hú qí cí",寡廉鲜耻:"guǎ lián xiǎn chǐ",成年累月:"chéng nián lěi yuè",不徇私情:"bú xùn sī qíng",不当人子:"bù dāng rén zǐ",膀大腰圆:"bǎng dà yāo yuán",指腹为婚:"zhǐ fù wéi hūn",这么点儿:"zhè me diǎn er",意兴索然:"yì xīng suǒ rán",绣花枕头:"xiù huā zhěn tou",无的放矢:"wú dì fàng shǐ",望闻问切:"wàng wén wèn qiè",舍己为人:"shě jǐ wèi rén",穷年累月:"qióng nián lěi yuè",排难解纷:"pái nàn jiě fēn",处之泰然:"chǔ zhī tài rán",指鹿为马:"zhǐ lù wéi mǎ",危如累卵:"wēi rú lěi luǎn",天兵天将:"tiān bīng tiān jiàng",舍近求远:"shě jìn qiú yuǎn",南腔北调:"nán qiāng běi diào",苦中作乐:"kǔ zhōng zuò lè",厚积薄发:"hòu jī bó fā",臭味相投:"xiù wèi xiāng tóu",长幼有序:"zhǎng yòu yǒu xù",逼良为娼:"bī liáng wéi chāng",悲悲切切:"bēi bēi qiè qiē",败军之将:"bài jūn zhī jiàng",欺行霸市:"qī háng bà shì",削足适履:"xuē zú shì lǚ",先睹为快:"xiān dǔ wéi kuài",啼饥号寒:"tí jī háo hán",疏不间亲:"shū bú jiàn qīn",神差鬼使:"shén chāi guǐ shǐ",敲敲打打:"qiāo qiāo dǎ dǎ",平铺直叙:"píng pū zhí xù",没头没尾:"méi tóu mò wěi",寥寥可数:"liáo liáo kě shǔ",哼哈二将:"hēng hā èr jiàng",鹤发童颜:"hè fà tóng yán",各奔前程:"gè bèn qián chéng",弹无虚发:"dàn wú xū fā",大人先生:"dà rén xiān sheng",与民更始:"yǔ mín gēng shǐ",树碑立传:"shù bēi lì zhuàn",是非得失:"shì fēi dé shī",实逼处此:"shí bī chǔ cǐ",塞翁失马:"sài wēng shī mǎ",日薄西山:"rì bó xī shān",切身体会:"qiè shēn tǐ huì",片言只字:"piàn yán zhǐ zì",跑马卖解:"pǎo mǎ mài xiè",宁折不弯:"nìng zhé bù wān",零零散散:"líng líng sǎn sǎn",量体裁衣:"liàng tǐ cái yī",连中三元:"lián zhòng sān yuán",礼崩乐坏:"lǐ bēng yuè huài",不为已甚:"bù wéi yǐ shèn",转悲为喜:"zhuǎn bēi wéi xǐ",以眼还眼:"yǐ yǎn huán yǎn",蔚为大观:"wèi wéi dà guān",未为不可:"wèi wéi bù kě",童颜鹤发:"tóng yán hè fà",朋比为奸:"péng bǐ wéi jiān",莫此为甚:"mò cǐ wéi shèn",夹枪带棒:"jiā qiāng dài bàng",富商巨贾:"fù shāng jù jiǎ",淡然处之:"dàn rán chǔ zhī",箪食壶浆:"dān shí hú jiāng",创巨痛深:"chuāng jù tòng shēn",草长莺飞:"cǎo zhǎng yīng fēi",坐视不救:"zuò shī bú jiù",以己度人:"yǐ jǐ duó rén",随行就市:"suí háng jiù shì",文以载道:"wén yǐ zài dào",文不对题:"wén bú duì tí",铁板钉钉:"tiě bǎn dìng dīng",身体发肤:"shēn tǐ fà fū",缺吃少穿:"quē chī shǎo chuān",目无尊长:"mù wú zūn zhǎng",吉人天相:"jí rén tiān xiàng",毁家纾难:"huǐ jiā shū nàn",钢筋铁骨:"gāng jīn tiě gǔ",丢卒保车:"diū zú bǎo jū",丢三落四:"diū sān là sì",闭目塞听:"bì mù sè tīng",削尖脑袋:"xuē jiān nǎo dài",为非作恶:"wéi fēi zuò è",人才难得:"rén cái nán dé",情非得已:"qíng fēi dé yǐ",切中要害:"qiè zhòng yào hài",火急火燎:"huǒ jí huǒ liǎo",画地为牢:"huà dì wéi láo",好酒贪杯:"hào jiǔ tān bēi",长歌当哭:"cháng gē dàng kū",载沉载浮:"zài chén zài fú",遇难呈祥:"yù nàn chéng xiáng",榆木疙瘩:"yú mù gē da",以邻为壑:"yǐ lín wéi hè",洋为中用:"yáng wéi zhōng yòng",言为心声:"yán wéi xīn shēng",言必有中:"yán bì yǒu zhòng",图穷匕见:"tú qióng bǐ xiàn",滂沱大雨:"páng tuó dà yǔ",目不暇给:"mù bù xiá jǐ",量才录用:"liàng cái lù yòng",教学相长:"jiào xué xiāng zhǎng",悔不当初:"huǐ bù dāng chū",呼幺喝六:"hū yāo hè liù",不足为训:"bù zú wéi xùn",不拘形迹:"bù jū xíng jī",傍若无人:"páng ruò wú rén",罪责难逃:"zuì zé nán táo",自我吹嘘:"zì wǒ chuī xū",转祸为福:"zhuǎn huò wéi fú",勇冠三军:"yǒng guàn sān jūn",易地而处:"yì dì ér chǔ",卸磨杀驴:"xiè mò shā lǘ",玩儿不转:"wán ér bú zhuàn",天道好还:"tiān dào hǎo huán",身单力薄:"shēn dān lì bó",撒豆成兵:"sǎ dòu chéng bīng",片纸只字:"piàn zhǐ zhī zì",宁缺毋滥:"nìng quē wú làn",没没无闻:"mò mò wú wén",量力而为:"liàng lì ér wéi",历历可数:"lì lì kě shǔ",口碑载道:"kǒu bēi zài dào",君子好逑:"jūn zǐ hǎo qiú",好为人师:"hào wéi rén shī",豪商巨贾:"háo shāng jù jiǎ",各有所好:"gè yǒu suǒ hào",度德量力:"duó dé liàng lì",指天为誓:"zhǐ tiān wéi shì",逸兴遄飞:"yì xìng chuán fēi",心宽体胖:"xīn kuān tǐ pán",为德不卒:"wéi dé bù zú",天下为家:"tiān xià wéi jiā",视为畏途:"shì wéi wèi tú",三灾八难:"sān zāi bā nàn",沐猴而冠:"mù hóu ér guàn",哩哩啦啦:"lī li lā lā",见缝就钻:"jiàn fèng jiù zuān",夹层玻璃:"jiā céng bō li",急公好义:"jí gōng hào yì",积年累月:"jī nián lěi yuè",划地为牢:"huá dì wéi láo",更名改姓:"gēng míng gǎi xìng",奉为圭臬:"fèng wéi guī niè",多难兴邦:"duō nàn xīng bāng",不破不立:"bú pò bú lì",坐地自划:"zuò dì zì huá",坐不重席:"zuò bù chóng xí",坐不窥堂:"zuò bù kuī táng",作嫁衣裳:"zuò jià yī shang",左枝右梧:"zuǒ zhī yòu wú",左宜右有:"zuǒ yí yòu yǒu",钻头觅缝:"zuān tóu mì fèng",钻天打洞:"zuān tiān dǎ dòng",钻皮出羽:"zuān pí chū yǔ",钻火得冰:"zuān huǒ dé bīng",钻洞觅缝:"zuàn dòng mì féng",钻冰求火:"zuān bīng qiú huǒ",子为父隐:"zǐ wéi fù yǐn",擢发难数:"zhuó fà nán shǔ",着人先鞭:"zhuó rén xiān biān",斫雕为朴:"zhuó diāo wéi pǔ",锥处囊中:"zhuī chǔ náng zhōng",椎心饮泣:"chuí xīn yǐn qì",椎心泣血:"chuí xīn qì xuè",椎牛飨士:"chuí niú xiǎng shì",椎牛歃血:"chuí niú shà xuè",椎牛发冢:"chuí niú fà zhǒng",椎埋屠狗:"chuí mái tú gǒu",椎埋狗窃:"chuí mái gǒu qiè",壮发冲冠:"zhuàng fā chōng guàn",庄严宝相:"zhuāng yán bǎo xiàng",转愁为喜:"zhuǎn chóu wéi xǐ",转嗔为喜:"zhuǎn chēn wéi xǐ",拽巷啰街:"zhuài xiàng luó jiē",拽耙扶犁:"zhuāi pá fú lí",拽布拖麻:"zhuài bù tuō má",箸长碗短:"zhù cháng wǎn duǎn",铸剑为犁:"zhù jiàn wéi lí",杼柚其空:"zhù yòu qí kōng",杼柚空虚:"zhù yòu kōng xū",助天为虐:"zhù tiān wéi nüè",属垣有耳:"zhǔ yuán yǒu ěr",属毛离里:"zhǔ máo lí lǐ",属辞比事:"zhǔ cí bǐ shì",逐物不还:"zhú wù bù huán",铢量寸度:"zhū liáng cùn duó",铢两悉称:"zhū liǎng xī chèn",侏儒观戏:"zhū rú guān xì",朱轓皁盖:"zhū fān zào gài",昼度夜思:"zhòu duó yè sī",诪张为幻:"zhōu zhāng wéi huàn",重明继焰:"chóng míng jì yàn",众啄同音:"zhòng zhuó tóng yīn",众毛攒裘:"zhòng máo cuán qiú",众好众恶:"zhòng hào zhòng wù",擿埴索涂:"zhāi zhí suǒ tú",稚齿婑媠:"zhì chǐ wǒ tuó",至当不易:"zhì dàng bú yì",指皂为白:"zhǐ zào wéi bái",指雁为羹:"zhǐ yàn wéi gēng",指树为姓:"zhǐ shù wéi xìng",指山说磨:"zhǐ shān shuō mò",止戈为武:"zhǐ gē wéi wǔ",枝干相持:"zhī gàn xiāng chí",枝大于本:"zh dà yú běn",支吾其词:"zhī wú qí cí",正身率下:"zhèng shēn shuài xià",正冠李下:"zhèng guàn lǐ xià",整冠纳履:"zhěng guān nà lǚ",整躬率物:"zhěng gōng shuài wù",整顿干坤:"zhěng dùn gàn kūn",针头削铁:"zhēn tóu xuē tiě",贞松劲柏:"zhēn sōng jìng bǎi",赭衣塞路:"zhě yī sè lù",折箭为誓:"shé jiàn wéi shì",折而族之:"zhé ér zú zhī",昭德塞违:"zhāo dé sè wéi",章句小儒:"zhāng jù xiǎo rú",湛恩汪濊:"zhàn ēn wāng huì",占风望气:"zhān fēng wàng qì",斩将搴旗:"zhǎn jiàng qiān qí",曾母投杼:"zēng mǔ tóu zhù",曾参杀人:"zēng shēn shā rén",造谣中伤:"zào yáo zhòng shāng",早占勿药:"zǎo zhān wù yào",凿龟数策:"záo guī shǔ cè",攒三聚五:"cuán sān jù wǔ",攒眉蹙额:"cuán mei cù é",攒零合整:"cuán líng hé zhěng",攒锋聚镝:"cuán fēng jù dí",载笑载言:"zài xiào zài yán",载酒问字:"zài jiǔ wèn zì",殒身不恤:"yǔn shēn bú xù",云舒霞卷:"yún shū xiá juǎn",月中折桂:"yuè zhōng shé guì",月落参横:"yuè luò shēn héng",鬻驽窃价:"yù nú qiè jià",鬻鸡为凤:"yù jī wéi fèng",遇难成祥:"yù nàn chéng xiáng",郁郁累累:"yù yù lěi lěi",玉卮无当:"yù zhī wú dàng",语笑喧阗:"yǔ xiào xuān tián",与世沉浮:"yǔ shì chén fú",与时消息:"yǔ shí xiāo xi",逾墙钻隙:"yú qiáng zuān xì",渔夺侵牟:"yú duó qīn móu",杅穿皮蠹:"yú chuān pí dù",余勇可贾:"yú yǒng kě gǔ",予智予雄:"yú zhì yú xióng",予取予求:"yú qǔ yú qiú",于家为国:"yú jiā wéi guó",有借无还:"yǒu jiè wú huán",有加无已:"yǒu jiā wú yǐ",有国难投:"yǒu guó nán tóu",游必有方:"yóu bì yǒu fāng",油干灯尽:"yóu gàn dēng jìn",尤云殢雨:"yóu yún tì yǔ",庸中皦皦:"yōng zhōng jiǎo jiǎo",郢书燕说:"yǐng shū yān shuō",营蝇斐锦:"yíng yíng fēi jǐn",鹰心雁爪:"yīng xīn yàn zhǎo",莺吟燕儛:"yīng yín yàn wǔ",应天顺时:"yīng tiān shùn shí",印累绶若:"yìn léi shòu ruò",隐占身体:"yǐn zhàn shēn tǐ",饮犊上流:"yìn dú shàng liú",引绳切墨:"yǐn shéng qiē mò",龈齿弹舌:"yín chǐ dàn shé",因缘为市:"yīn yuán wéi shì",因树为屋:"yīn shù wéi wū",溢美溢恶:"yì měi yì wù",抑塞磊落:"yì sè lěi luò",倚闾望切:"yǐ lǘ wàng qiē",以意为之:"yǐ yì wéi zhī",以言为讳:"yǐ yán wéi huì",以疏间亲:"yǐ shū jiàn qīn",以水济水:"yǐ shuǐ jǐ shuǐ",以书为御:"yǐ shū wéi yù",以守为攻:"yǐ shǒu wéi gōng",以升量石:"yǐ shēng liáng dàn",以慎为键:"yǐ shèn wéi jiàn",以筌为鱼:"yǐ quán wéi yú",以利累形:"yǐ lì lěi xíng",以毁为罚:"yǐ huǐ wéi fá",以黑为白:"yǐ hēi wéi bái",以规为瑱:"yǐ guī wéi tiàn",以古为鉴:"yǐ gǔ wéi jiàn",以宫笑角:"yǐ gōng xiào jué",以法为教:"yǐ fǎ wéi jiào",以大恶细:"yǐ dà wù xì",遗世忘累:"yí shì wàng lěi",遗寝载怀:"yí qǐn zài huái",移的就箭:"yí dì jiù jiàn",依头缕当:"yī tóu lǚ dàng",衣租食税:"yì zū shí shuì",衣轻乘肥:"yì qīng chéng féi",衣裳之会:"yī shang zhī huì",衣单食薄:"yī dān shí bó",一还一报:"yì huán yí bào",叶公好龙:"yè gōng hào lóng",野调无腔:"yě diào wú qiāng",瑶池女使:"yáo chí nǚ shǐ",幺麽小丑:"yāo mó xiǎo chǒu",养精畜锐:"yǎng jīng xù ruì",卬首信眉:"áng shǒu shēn méi",洋洋纚纚:"yáng yáng sǎ sǎ",羊羔美酒:"yáng gāo měi jiǔ",扬风扢雅:"yáng fēng jié yǎ",燕昭市骏:"yān zhāo shì jùn",燕昭好马:"yān zhāo hǎo mǎ",燕石妄珍:"yān shí wàng zhēn",燕骏千金:"yān jùn qiān jīn",燕金募秀:"yān jīn mù xiù",燕驾越毂:"yān jià yuè gǔ",燕歌赵舞:"yān gē zhào wǔ",燕岱之石:"yān dài zhī shí",燕处危巢:"yàn chǔ wēi cháo",掞藻飞声:"shàn zǎo fēi shēng",偃革为轩:"yǎn gé wéi xuān",妍蚩好恶:"yán chī hǎo è",压良为贱:"yā liáng wéi jiàn",搀行夺市:"chān háng duó shì",泣数行下:"qì shù háng xià",当行出色:"dāng háng chū sè",秀出班行:"xiù chū bān háng",儿女成行:"ér nǚ chéng háng",大行大市:"dà háng dà shì",寻行数墨:"xún háng shǔ mò",埙篪相和:"xūn chí xiāng hè",血债累累:"xuè zhài lěi lěi",炫玉贾石:"xuàn yù gǔ shí",炫石为玉:"xuàn shí wéi yù",悬石程书:"xuán dàn chéng shū",悬狟素飡:"xuán huán sù cān",悬龟系鱼:"xuán guī xì yú",揎拳捋袖:"xuān quán luō xiù",轩鹤冠猴:"xuān hè guàn hóu",畜妻养子:"xù qī yǎng zǐ",羞人答答:"xiū rén dā dā",修鳞养爪:"xiū lín yǎng zhǎo",熊据虎跱:"xióng jù hǔ zhì",兄死弟及:"xiōng sǐ dì jí",腥闻在上:"xīng wén zài shàng",兴文匽武:"xīng wén yǎn wǔ",兴观群怨:"xìng guān qún yuàn",兴高彩烈:"xìng gāo cǎi liè",心手相应:"xīn shǒu xiāng yìng",心口相应:"xīn kǒu xiāng yīng",挟势弄权:"xié shì nòng quán",胁肩累足:"xié jiān lěi zú",校短量长:"jiào duǎn liáng cháng",小眼薄皮:"xiǎo yǎn bó pí",硝云弹雨:"xiāo yún dàn yǔ",鸮鸣鼠暴:"xiāo míng shǔ bào",削株掘根:"xuē zhū jué gēn",削铁无声:"xuē tiě wú shēng",削职为民:"xuē zhí wéi mín",削木为吏:"xuē mù wéi lì",想望风褱:"xiǎng wàng fēng huái",香培玉琢:"xiang pei yu zhuó",相鼠有皮:"xiàng shǔ yǒu pí",相时而动:"xiàng shí ér dòng",相切相磋:"xiāng qiē xiāng cuō",相女配夫:"xiàng nǚ pèi fū",相门有相:"xiàng mén yǒu xiàng",挦章撦句:"xián zhāng chě jù",先我着鞭:"xiān wǒ zhuó biān",习焉不察:"xí yān bù chá",歙漆阿胶:"shè qī ē jiāo",晰毛辨发:"xī máo biàn fà",悉索薄赋:"xī suǒ bó fù",雾鳞云爪:"wù lín yún zhǎo",物稀为贵:"wù xī wéi guì",碔砆混玉:"wǔ fū hùn yù",武断专横:"wǔ duàn zhuān héng",五石六鹢:"wǔ shí liù yì",五色相宣:"wǔ sè xiāng xuān",五侯七贵:"wǔ hóu qī guì",五侯蜡烛:"wǔ hòu là zhú",五羖大夫:"wǔ gǔ dà fū",吾自有处:"wú zì yǒu chǔ",无下箸处:"wú xià zhù chǔ",无伤无臭:"wú shāng wú xiù",无能为役:"wú néng wéi yì",无寇暴死:"wú kòu bào sǐ",无孔不钻:"wú kǒng bú zuàn",无间可乘:"wú jiān kě chéng",无间冬夏:"wú jiān dōng xià",无恶不为:"wú è bù wéi",无动为大:"wú dòng wéi dà",诬良为盗:"wū liáng wéi dào",握拳透爪:"wò quán tòu zhǎo",文武差事:"wén wǔ chāi shì",委委佗佗:"wēi wēi tuó tuó",惟日为岁:"wéi rì wéi suì",帷薄不修:"wéi bó bù xiū",为善最乐:"wéi shàn zuì lè",为山止篑:"wéi shān zhǐ kuì",为仁不富:"wéi rén bú fù",为裘为箕:"wéi qiú wéi jī",为民父母:"wéi mín fù mǔ",为虺弗摧:"wéi huǐ fú cuī",为好成歉:"wéi hǎo chéng qiàn",为鬼为蜮:"wéi guǐ wéi yù",望风响应:"wàng fēng xiǎng yīng",望尘僄声:"wàng chén piào shēng",往渚还汀:"wǎng zhǔ huán tīng",王贡弹冠:"wáng gòng dàn guàn",亡国大夫:"wáng guó dà fū",万贯家私:"wàn guàn jiā sī",晚食当肉:"wǎn shí dàng ròu",晚节不保:"wǎn jié bù bǎo",玩岁愒时:"wán suì kài shí",蛙蟆胜负:"wā má shèng fù",吞言咽理:"tūn yán yàn lǐ",颓垣断堑:"tuí yuán duàn qiàn",推干就湿:"tuī gàn jiù shī",剸繁决剧:"tuán fán jué jù",团头聚面:"tuán tóu jù miàn",兔丝燕麦:"tù sī yàn mài",兔头麞脑:"tù tóu zhāng nǎo",兔葵燕麦:"tù kuí yàn mài",吐哺握发:"tǔ bǔ wò fà",投传而去:"tóu zhuàn ér qù",头没杯案:"tóu mò bēi àn",头昏脑闷:"tóu hūn nǎo mèn",头会箕敛:"tóu kuài jī liǎn",头出头没:"tóu chū tóu mò",痛自创艾:"tòng zì chuāng yì",同恶相助:"tóng wù xiāng zhù",同恶相恤:"tóng wù xiāng xù",痌瘝在抱:"tōng guān zài bào",通文调武:"tōng wén diào wǔ",停留长智:"tíng liú zhǎng zhì",铁树开华:"tiě shù kāi huā",条贯部分:"tiáo guàn bù fēn",挑牙料唇:"tiǎo yá liào chún",挑么挑六:"tiāo yāo tiāo liù",挑唇料嘴:"tiǎo chún liào zuǐ",恬不为意:"tián bù wéi yì",恬不为怪:"tián bù wéi guài",天下为笼:"tiān xià wéi lóng",天台路迷:"tiān tái lù mí",天年不遂:"tiān nián bú suì",探囊胠箧:"tàn náng qū qiè",谭言微中:"tán yán wēi zhòng",谈言微中:"tán yán wēi zhòng",狧穅及米:"shì kāng jí mǐ",随物应机:"suí wù yīng jī",搜岩采干:"sōu yán cǎi gàn",宋斤鲁削:"sòng jīn lǔ xuē",松筠之节:"sōng yún zhī jié",四亭八当:"sì tíng bā dàng",四马攒蹄:"sì mǎ cuán tí",四不拗六:"sì bú niù liù",思所逐之:"sī suǒ zhú zhī",丝恩发怨:"sī ēn fà yuàn",硕望宿德:"shuò wàng xiǔ dé",铄古切今:"shuò gǔ qiē jīn",顺风而呼:"shùn fēng ér hū",顺风吹火:"shùn fēng chuī huǒ",水中著盐:"shuǐ zhōng zhuó yán",双柑斗酒:"shuāng gān dǒu jiǔ",数米而炊:"shǔ mǐ ér chuī",数米量柴:"shǔ mǐ liáng chái",数理逻辑:"shù lǐ luó ji",数黑论黄:"shǔ hēi lùn huáng",数白论黄:"shǔ bái lùn huáng",束缊还妇:"shù yūn huán fù",束蒲为脯:"shù pú wéi pú",束椽为柱:"shù chuán wéi zhù",书缺有间:"shū quē yǒu jiàn",手足重茧:"shǒu zú chóng jiǎn",手足异处:"shǒu zú yì chǔ",手脚干净:"shǒu jiǎo gàn jìng",手不应心:"shǒu bù yīng xīn",螫手解腕:"shì shǒu jiě wàn",释知遗形:"shì zhī yí xíng",适时应务:"shì shí yīng wù",适情率意:"shì qíng shuài yì",适当其冲:"shì dāng qí chōng",视为知己:"shì wéi zhī jǐ",使羊将狼:"shǐ yáng jiàng láng",食为民天:"shí wéi mín tiān",拾掇无遗:"shí duō wú yí",实与有力:"shí yù yǒu lì",石英玻璃:"shí yīng bō li",石室金匮:"shí shì jīn guì",什袭珍藏:"shí xí zhēn cáng",什伍东西:"shí wǔ dōng xī",什围伍攻:"shí wéi wǔ gōng",十魔九难:"shí mó jiǔ nàn",诗书发冢:"shī shū fà zhǒng",虱处裈中:"shī chǔ kūn zhōng",师直为壮:"shī zhí wéi zhuàng",尸居龙见:"shī jū lóng xiàn",圣经贤传:"shèng jīng xián zhuàn",圣君贤相:"shèng jūn xián xiàng",生拖死拽:"shēng tuō sǐ zhuài",审己度人:"shěn jǐ duó rén",神武挂冠:"shén wǔ guà guàn",神龙失埶:"shén lóng shī shì",深文曲折:"shēn wén qǔ shé",深厉浅揭:"shēn lì qiǎn qì",深谷为陵:"shēn gǔ wéi líng",深恶痛疾:"shēn wù tòng jí",深仇宿怨:"shēn chóu xiǔ yuàn",舍己为公:"shě jǐ wèi gōng",舍短取长:"shě duǎn qǔ cháng",舍策追羊:"shě cè zhuī yáng",蛇蝎为心:"shé xiē wéi xīn",少成若性:"shào chéng ruò xìng",上当学乖:"shàng dàng xué guāi",赏不当功:"shǎng bù dāng gōng",善自为谋:"shàn zì wéi móu",善为说辞:"shàn wéi shuō cí",善善恶恶:"shàn shàn wù è",善财难舍:"shàn cái nán shě",苫眼铺眉:"shān yǎn pū méi",讪牙闲嗑:"shàn yá xián kē",山阴乘兴:"shān yīn chéng xīng",山殽野湋:"shān yáo yě wéi",山溜穿石:"shān liù chuān shí",山节藻棁:"shān jié zǎo zhuō",杀鸡为黍:"shā jī wéi shǔ",色厉胆薄:"sè lì dǎn bó",桑荫未移:"sāng yīn wèi yí",桑荫不徙:"sāng yīn bù xǐ",桑土绸缪:"sāng tǔ chóu miù",桑户棬枢:"sāng hù juàn shū",三战三北:"sān zhàn sān běi",三瓦两舍:"sān wǎ liǎng shě",三人为众:"sān rén wèi zhòng",三差两错:"sān chā liǎng cuò",塞井焚舍:"sāi jǐng fén shě",洒心更始:"sǎ xīn gèng shǐ",洒扫应对:"sǎ sǎo yìng duì",软红香土:"ruǎn hóng xiāng tǔ",入吾彀中:"rù wú gòu zhōng",入铁主簿:"rù tiě zhǔ bù",入理切情:"rù lǐ qiē qíng",汝成人耶:"rǔ chéng rén yé",如水投石:"rú shuǐ tóu shí",如切如磋:"rú qiē rú cuō",如登春台:"rú dēng chūn tái",肉薄骨并:"ròu bó gǔ bìng",柔情绰态:"róu qíng chuò tài",戎马劻勷:"róng mǎ kuāng ráng",日中为市:"rì zhōng wéi shì",日月参辰:"rì yuè shēn chén",日省月修:"rì xǐng yuè xiū",日削月割:"rì xuē yuè gē",日省月试:"rì xǐng yuè shì",任达不拘:"rèn dá bù jū",人言藉藉:"rén yán jí jí",人模狗样:"rén mú gǒu yàng",人莫予毒:"rén mò yú dú",热熬翻饼:"rè áo fān bǐng",圈牢养物:"juàn láo yǎng wù",取予有节:"qǔ yǔ yǒu jié",诎要桡腘:"qū yāo ráo guó",穷形尽相:"qióng xíng jìn xiàng",情凄意切:"qíng qī yì qiè",情见势屈:"qíng xiàn shì qū",情见乎辞:"qíng xiàn hū cí",清都绛阙:"qīng dōu jiàng què",倾肠倒肚:"qīng cháng dào dǔ",青紫被体:"qīng zǐ pī tǐ",青林黑塞:"qīng lín hēi sài",螓首蛾眉:"qín shǒu é méi",琴瑟之好:"qín sè zhī hào",且住为佳:"qiě zhù wéi jiā",切树倒根:"qiē shù dǎo gēn",切理餍心:"qiē lǐ yàn xīn",切近的当:"qiē jìn de dāng",翘足引领:"qiáo zú yǐn lǐng",巧发奇中:"qiǎo fā qí zhòng",强嘴拗舌:"jiàng zuǐ niù shé",强直自遂:"qiáng zhí zì suí",强死强活:"qiǎng sǐ qiǎng huó",强食自爱:"qiǎng shí zì ài",强食靡角:"qiǎng shí mí jiǎo",强弓劲弩:"qiáng gōng jìng nǔ",强聒不舍:"qiǎng guō bù shě",强凫变鹤:"qiáng fú biàn hè",强而后可:"qiǎng ér hòu kě",强得易贫:"qiǎng dé yì pín",遣兴陶情:"qiǎn xìng táo qíng",牵羊担酒:"qiān yáng dān jiǔ",千了百当:"qiān liǎo bǎi dàng",泣下如雨:"qì xià rú yǔ",起偃为竖:"qǐ yǎn wéi shù",岂弟君子:"kǎi tì jūn zǐ",綦溪利跂:"qí xī lì qí",棋输先著:"qí shū xiān zhuó",齐王舍牛:"qí wáng shě niú",欺天诳地:"qī tiān kuáng dì",普天率土:"pǔ tiān shuài tǔ",铺胸纳地:"pū xiōng nà dì",铺锦列绣:"pū jǐn liè xiù",破家为国:"pò jiā wèi guó",破觚为圜:"pò gū wéi yuán",萍飘蓬转:"píng piāo péng zhuàn",帡天极地:"píng tiān jí dì",屏声息气:"bǐng shēng xī qì",凭几据杖:"píng jī jù zhàng",贫嘴薄舌:"pín zuǐ bó shé",片语只辞:"piàn yǔ zhī cí",披发文身:"pī fà wén shēn",烹龙炮凤:"pēng lóng páo fèng",炰鳖脍鲤:"fǒu biē kuài lǐ",庞眉皓发:"páng méi hào fà",攀花折柳:"pān huā zhé liǔ",攀蟾折桂:"pān chán shé guì",女大难留:"nǚ dà nán liú",弄玉吹箫:"nòng yù chuī xiāo",弄管调弦:"nòng guǎn tiáo xián",弄粉调朱:"nòng fěn diào zhū",浓抹淡妆:"nóng mò dàn zhuāng",捻土为香:"niǎn tǔ wéi xiāng",年谊世好:"nián yì shì hǎo",年华垂暮:"nián huá chuí mù",儗不于伦:"nǐ bù yú lún",泥而不滓:"ní ér bù zǐ",能者为师:"néng zhě wéi shī",能不称官:"néng bú chèn guān",挠直为曲:"náo zhí wéi qū",难进易退:"nán jìn yì tuì",难得糊涂:"nán dé hú tú",南蛮鴂舌:"nán mán jué shé",南贩北贾:"nán fàn běi gǔ",牧猪奴戏:"mù zhū nú xì",目眢心忳:"mù yuān xīn tún",目挑心招:"mù tiǎo xīn zhāo",目量意营:"mù liàng yì yíng",木头木脑:"mù tóu mù nǎo",木干鸟栖:"mù gàn niǎo qī",侔色揣称:"móu sè chuǎi chèn",莫予毒也:"mò yú dú yě",抹粉施脂:"mò fěn shī zhī",磨砻镌切:"mó lóng juān qiē",磨棱刓角:"mó léng wán jiǎo",摸门不着:"mō mén bù zháo",摸不着边:"mō bù zhuó biān",命中注定:"mìng zhōng zhù dìng",鸣鹤之应:"míng hè zhī yìng",明效大验:"míng xiào dà yàn",名我固当:"míng wǒ gù dāng",邈处欿视:"miǎo chǔ kǎn shì",黾穴鸲巢:"měng xué qú cháo",绵里薄材:"mián lǐ bó cái",靡有孑遗:"mǐ yǒu jié yí",靡衣偷食:"mǐ yī tōu shí",迷恋骸骨:"mí liàn hái gǔ",扪参历井:"mén shēn lì jǐng",门单户薄:"mén dān hù bó",昧旦晨兴:"mèi dàn chén xīng",冒名接脚:"mào míng jiē jiǎo",毛遂堕井:"máo suí duò jǐng",毛发倒竖:"máo fā dǎo shù",卖文为生:"mài wén wéi shēng",卖李钻核:"mài lǐ zuān hé",买椟还珠:"mǎi dú huán zhū",埋三怨四:"mán sān yuàn sì",马入华山:"mǎ rù huá shān",落魄江湖:"luò pò jiāng hú",落落难合:"luò luò nán hé",落草为寇:"luò cǎo wéi kòu",罗织构陷:"luó zhī gòu xiàn",鸾凤和鸣:"luán fèng hè míng",率由旧章:"shuài yóu jiù zhāng",率土同庆:"shuài tǔ tóng qìng",率兽食人:"shuài shòu shí rén",率土归心:"shuài tǔ guī xīn",率马以骥:"shuài mǎ yǐ jì",率尔成章:"shuài ěr chéng zhāng",鲁斤燕削:"lǔ jīn yàn xuē",漏尽更阑:"lòu jìn gēng lán",笼鸟槛猿:"lóng niǎo jiàn yuán",笼鸟池鱼:"lóng niǎo chí yú",龙游曲沼:"lóng yóu qū zhǎo",龙血玄黄:"lóng xuè xuán huáng",龙雕凤咀:"lóng diāo fèng jǔ",六尺之讬:"liù chǐ zhī tuō",令原之戚:"líng yuán zhī qī",令人捧腹:"lìng rén pěng fù",陵劲淬砺:"líng jìng cuì lì",临敌易将:"lín dí yì jiàng",裂裳衣疮:"liè shang yī chuāng",裂冠毁冕:"liè guàn huǐ miǎn",了无惧色:"liǎo wú jù sè",了身达命:"liǎo shēn dá mìng",了然无闻:"liǎo rán wú wén",了不可见:"liǎo bù kě jiàn",了不长进:"liǎo bù zhǎng jìn",燎发摧枯:"liǎo fà cuī kū",审时度势:"shěn shí duó shì",量小力微:"liàng xiǎo lì wēi",相时度力:"xiāng shí duó lì",量枘制凿:"liàng ruì zhì záo",量如江海:"liàng rú jiāng hǎi",量金买赋:"liàng jīn mǎi fù",量己审分:"liàng jǐ shěn fēn",敛骨吹魂:"liǎn gǔ chuī hún",詈夷为跖:"lì yí wéi zhí",利令志惛:"lì lìng zhì hūn",李广不侯:"lǐ guǎng bú hòu",礼为情貌:"lǐ wéi qíng mào",礼让为国:"lǐ ràng wéi guó",犁生骍角:"lí shēng xīng jiǎo",离本徼末:"lí běn jiǎo mò",楞眉横眼:"léng méi hèng yǎn",擂天倒地:"léi tiān dǎo dì",累足成步:"lěi zú chéng bù",累瓦结绳:"lěi wǎ jié shéng",累土至山:"lěi tǔ zhì shān",累土聚沙:"lěi tǔ jù shā",累卵之危:"lěi luǎn zhī wēi",累累如珠:"lěi lěi rú zhū",累块积苏:"lěi kuài jī sū",乐山乐水:"lè shān lè shuǐ",潦原浸天:"lǎo yuán jìn tiān",老师宿儒:"lǎo shī xiǔ rú",牢什古子:"láo shí gǔ zi",琅嬛福地:"láng huán fú dì",揆情度理:"kuí qíng duó lǐ",旷日累时:"kuàng rì lěi shí",匡救弥缝:"kuāng jiù mí fèng",枯树生华:"kū shù shēng huā",口轻舌薄:"kǒu qīng shé bó",口角生风:"kǒu jiǎo shēng fēng",口角春风:"kǒu jiǎo chūn fēng",口角风情:"kǒu jiǎo fēng qíng",口干舌焦:"kǒu gān shé jiāo",口腹之累:"kǒu fù zhī lěi",空腹便便:"kōng fù pián pián",嗑牙料嘴:"kē yá liào zuǐ",刻木为鹄:"kè mù wéi hú",咳珠唾玉:"ké zhū tuò yù",咳唾成珠:"ké tuò chéng zhū",抗颜为师:"kàng yán wéi shī",开华结果:"kāi huā jié guǒ",峻阪盐车:"jùn bǎn yán chē",嚼铁咀金:"jiáo tiě jǔ jīn",嚼墨喷纸:"jué mò pēn zhǐ",倔头强脑:"juè tóu jiàng nǎo",倔头倔脑:"juè tóu juè nǎo",倦鸟知还:"juàn niǎo zhī huán",卷席而葬:"juǎn xí ér zàng",卷甲倍道:"juǎn jiǎ bèi dào",聚米为山:"jù mǐ wéi shān",举手相庆:"jǔ shǒu xiāng qìng",举世混浊:"jǔ shì hún zhuó",鞠为茂草:"jū wéi mào cǎo",拘神遣将:"jū shén qiǎn jiàng",居下讪上:"jū xià shàn shàng",久要不忘:"jiǔ yāo bú wàng",九转功成:"jiǔ zhuǎn gōng chéng",九蒸三熯:"jiǔ zhēng sān hàn",敬业乐群:"jìng yè lè qún",井底虾蟆:"jǐng dǐ xiā má",旌旗卷舒:"jīng qí juǎn shū",荆棘载途:"jīng jí zài tú",禁舍开塞:"jìn shě kāi sāi",祲威盛容:"jìn wēi shèng róng",进退消长:"jìn tuì xiāo cháng",进退应矩:"jìn tuì yīng jǔ",进退触籓:"jìn tuì chù fān",进退跋疐:"jìn tuì bá zhì",尽多尽少:"jǐn duō jǐn shǎo",锦囊还矢:"jǐn náng huán shǐ",矜己自饰:"jīn jǐ zì shì",矜功负气:"jīn gōng fù qì",津关险塞:"jīn guān xiǎn sài",金吾不禁:"jīn wú bú jìn",金翅擘海:"jīn chì bāi hǎi",解衣衣人:"jiě yī yī rén",解人难得:"jiě rén nán dé",解铃系铃:"jiě líng xì líng",解发佯狂:"jiě fà yáng kuáng",诘屈磝碻:"jié qū áo qiāo",教猱升木:"jiāo náo shēng mù",较瘦量肥:"jiào shòu liàng féi",角立杰出:"jiǎo lì jié chū",焦沙烂石:"jiāo shā làn shí",骄儿騃女:"jiāo ér sì nǚ",浇风薄俗:"jiāo fēng bó sú",降妖捉怪:"xiáng yāo zhuō guài",将取固予:"jiāng qǔ gù yǔ",将门有将:"jiàng mén yǒu jiàng",将夺固与:"jiāng duó gù yǔ",槛花笼鹤:"jiàn huā lóng hè",鉴影度形:"jiàn yǐng duó xíng",渐不可长:"jiàn bù kě zhǎng",见素抱朴:"xiàn sù bào pǔ",见弃于人:"jiàn qì yú rén",简丝数米:"jiǎn sī shǔ mǐ",俭不中礼:"jiǎn bú zhòng lǐ",间见层出:"jiàn xiàn céng chū",尖嘴薄舌:"jiān zuǐ bó shé",甲冠天下:"jiǎ guàn tiān xià",葭莩之亲:"jiā fú zhī qīn",家累千金:"jiā lèi qiān jīn",家给人足:"jiā jǐ rén zú",家道从容:"jiā dào cóng róng",夹袋人物:"jiā dài rén wù",霁风朗月:"jì fēng lǎng yuè",寄兴寓情:"jì xìng yù qíng",计深虑远:"jì shēn lǜ yuǎn",计功量罪:"jì gōng liàng zuì",掎裳连襼:"jǐ shang lián yì",虮虱相吊:"jǐ shī xiāng diào",疾不可为:"jí bù kě wéi",极深研几:"jí shēn yán jī",及宾有鱼:"jí bīn yǒu yú",激薄停浇:"jī bó tíng jiāo",积素累旧:"jī sù lěi jiù",积时累日:"jī shí lěi rì",积露为波:"jī lù wéi bō",积德累功:"jī dé lěi gōng",积谗糜骨:"jī chán méi gǔ",击排冒没:"jī pái mào mò",祸为福先:"huò wéi fú xiān",祸福相依:"huò fú xiāng yī",获隽公车:"huò jùn gōng chē",混应滥应:"hùn yīng làn yīng",毁舟为杕:"huǐ zhōu wéi duò",毁钟为铎:"huǐ zhōng wéi duó",毁冠裂裳:"huǐ guān liè cháng",晦盲否塞:"huì máng pǐ sè",回船转舵:"huí chuán zhuàn duò",潢池盗弄:"huáng chí dào nòng",黄冠草履:"huáng guàn cǎo lǚ",黄发儿齿:"huáng fà ér chǐ",黄发垂髫:"huáng fà chuí tiáo",还珠返璧:"huán zhū fǎn bì",还年驻色:"huán nián zhù sè",还年却老:"huán nián què lǎo",坏裳为裤:"huài shang wéi kù",画荻和丸:"huà dí huò wán",化枭为鸠:"huà xiāo wéi jiū",化腐为奇:"huà fǔ wéi qí",化鸱为凤:"huà chī wéi fèng",花不棱登:"huā bu lēng dēng",户限为穿:"hù xiàn wéi chuān",呼卢喝雉:"hū lú hè zhì",呼来喝去:"hū lái hè qù",呼不给吸:"hū bù jǐ xī",厚味腊毒:"hòu wèi xī dú",厚德载物:"hòu dé zài wù",鸿渐于干:"hóng jiàn yú gàn",洪炉燎发:"hóng lú liáo fà",红绳系足:"hóng shéng jì zú",红不棱登:"hóng bu lēng dēng",横抢硬夺:"hèng qiǎng yìng duó",横恩滥赏:"hèng ēn làn shǎng",恨海难填:"hèn hǎi nán tián",鹤发鸡皮:"hè fà jī pí",涸思干虑:"hé sī gān lǜ",河涸海干:"hé hé hǎi gān",和颜说色:"hé yán yuè sè",合从连衡:"hé zòng lián héng",浩浩汤汤:"hào hào shāng shāng",好勇斗狠:"hào yǒng dòu hěn",好问则裕:"hào wèn zé yù",好为事端:"hào wéi shì duān",好问决疑:"hào wèn jué yí",好生之德:"hào shēng zhī dé",好奇尚异:"hǎo qí shàng yì",好恶不同:"hǎo è bù tóng",好丹非素:"hào dān fēi sù",豪干暴取:"háo gàn bào qǔ",毫发不爽:"háo fà bù shuǎng",寒酸落魄:"hán suān luò pò",含英咀华:"hán yīng jǔ huá",含糊不明:"hán hú bù míng",过为已甚:"guò wéi yǐ shèn",桂折兰摧:"guì shé lán cuī",规旋矩折:"guī xuán jǔ shé",广文先生:"guǎng wén xiān sheng",广陵散绝:"guǎng líng sǎn jué",冠山戴粒:"guàn shān dài lì",冠屦倒施:"guàn jù dǎo shī",挂席为门:"guà xí wéi mén",寡见鲜闻:"guǎ jiàn xiǎn wén",瓜葛相连:"guā gé xiāng lián",鼓吻奋爪:"gǔ wěn fèn zhǎo",古调单弹:"gǔ diào dān tán",古调不弹:"gǔ diào bù tán",姑射神人:"gū yè shén rén",苟合取容:"gǒu hé qǔ róng",狗续侯冠:"gǒu xù hòu guàn",钩爪锯牙:"gōu zhǎo jù yá",共枝别干:"gòng zhī bié gàn",共为唇齿:"gòng wéi chún chǐ",拱手而降:"gǒng shǒu ér xiáng",拱肩缩背:"gǒng jiān suō bèi",功薄蝉翼:"gōng bó chán yì",弓调马服:"gōng diào mǎ fú",更姓改物:"gēng xìng gǎi wù",更仆难数:"gēng pú nán shǔ",更令明号:"gēng lìng míng hào",更待干罢:"gèng dài gàn bà",更唱迭和:"gēng chàng dié hé",更长梦短:"gēng cháng mèng duǎn",各色名样:"gè sè míng yàng",格格不纳:"gé gé bú nà",格格不吐:"gé gé bù tǔ",告朔饩羊:"gù shuò xì yáng",膏车秣马:"gào chē mò mǎ",高义薄云:"gāo yì bó yún",岗头泽底:"gāng tóu zé dǐ",敢为敢做:"gǎn wéi gǎn zuò",甘分随时:"gān fèn suí shí",甘处下流:"gān chǔ xià liú",干啼湿哭:"gàn tí shī kū",干名犯义:"gàn míng fàn yì",干将莫邪:"gān jiāng mò yé",干城之将:"gān chéng zhī jiàng",腹载五车:"fù zài wǔ chē",父债子还:"fù zhài zǐ huán",父为子隐:"fù wéi zǐ yǐn",辅世长民:"fǔ shì zhǎng mín",福为祸始:"fú wéi huò shǐ",符号逻辑:"fú hào luó jí",浮收勒折:"fú shōu lè shé",肤受之愬:"fū shòu zhī sù",否终则泰:"pǐ zhōng zé tài",佛头著粪:"fó tóu zhuó fèn",奉为楷模:"fèng wéi kǎi mó",凤靡鸾吪:"fèng mǐ luán é",封豨修蛇:"fēng xī xiū shé",风影敷衍:"fēng yǐng fū yǎn",丰屋蔀家:"fēng wū bù jiā",粪土不如:"fèn tǔ bù rú",分风劈流:"fēn fēng pǐ liú",沸沸汤汤:"fèi fèi shāng shāng",菲食薄衣:"fěi shí bó yī",飞将数奇:"fēi jiàng shù qí",放辟邪侈:"fàng pì xié chǐ",方领圆冠:"fāng lǐng yuán guàn",犯而不校:"fàn ér bú jiào",返本还源:"fǎn běn huán yuán",反劳为逸:"fǎn láo wéi yì",法轮常转:"fǎ lún cháng zhuàn",罚不当罪:"fá bù dāng zuì",发引千钧:"fà yǐn qiān jūn",发奸擿伏:"fā jiān tī fú",发短心长:"fà duǎn xīn cháng",二竖为虐:"èr shù wéi nüè",儿女心肠:"ér nǚ xīn cháng",儿女亲家:"ér nǚ qìng jiā",遏恶扬善:"è wù yáng shàn",饿殍枕藉:"è piǎo zhěn jí",饿殍载道:"è piǎo zài dào",恶醉强酒:"wù zuì qiǎng jiǔ",恶意中伤:"è yì zhòng shāng",恶湿居下:"wù shī jū xià",恶居下流:"wù jū xià liú",恶不去善:"wù bú qù shàn",扼吭夺食:"è háng duó shí",扼襟控咽:"è jīn kòng yān",峨峨汤汤:"é é shāng shāng",屙金溺银:"ē jīn niào yín",朵颐大嚼:"duǒ yí dà jiáo",夺人所好:"duó rén suǒ hào",多言数穷:"duō yán shuò qióng",多文为富:"duō wén wéi fù",多端寡要:"duō duān guǎ yào",多财善贾:"duō cái shàn gǔ",遁世无闷:"dùn shì wú mèn",遁迹黄冠:"dùn jì huáng guàn",堆案盈几:"duī àn yíng jī",断还归宗:"duàn huán guī zōng",短见薄识:"duǎn jiàn bó shí",蠹居棊处:"dù jū qí chǔ",度己以绳:"duó jǐ yǐ shéng",杜默为诗:"dù mò wéi shī",杜鹃啼血:"dù juān tí xuè",笃近举远:"dǔ jìn jǔ yuǎn",独有千秋:"dú yǒu qiān qiū",读书得间:"dú shū dé jiàn",斗转参横:"dǒu zhuǎn shēn héng",兜肚连肠:"dōu dǔ lián cháng",洞见症结:"dòng jiàn zhèng jié",恫疑虚喝:"dòng yí xū hè",动中窾要:"dòng zhōng kuǎn yào",东鸣西应:"dōng míng xī yīng",东鳞西爪:"dōng lín xī zhǎo",东量西折:"dōng liàng xī shé",东家西舍:"dōng jiā xī shè",东扯西拽:"dōng chě xī zhuāi",鼎铛有耳:"dǐng chēng yǒu ěr",鼎铛玉石:"dǐng chēng yù shí",钉头磷磷:"dīng tóu lín lín",跌宕不羁:"diē dàng bù jī",跌弹斑鸠:"diē dàn bān jiū",雕心雁爪:"diāo xīn yàn zhǎo",颠倒衣裳:"diān dǎo yī cháng",德薄能鲜:"dé bó néng xiǎn",得马折足:"dé mǎ shé zú",蹈其覆辙:"dǎo qí fù zhé",捣虚撇抗:"dǎo xū piē kàng",倒载干戈:"dào zài gān gē",倒裳索领:"dào cháng suǒ lǐng",倒果为因:"dào guǒ wéi yīn",叨在知己:"tāo zài zhī jǐ",叨陪末座:"tāo péi mò zuò",党豺为虐:"dǎng chái wéi nüè",当轴处中:"dāng zhóu chǔ zhōng",当着不着:"dāng zhuó bù zhuó",当务始终:"dāng wù shǐ zhōng",淡汝浓抹:"dàn rǔ nóng mǒ",弹丸脱手:"tán wán tuō shǒu",弹铗无鱼:"dàn jiá wú yú",箪食瓢饮:"dān sì piáo yǐn",大璞不完:"dà pú bù wán",大明法度:"dà míng fǎ dù",大车以载:"dà chē yǐ zài",打闷葫芦:"dǎ mèn hú lu",沓来踵至:"tà lái zhǒng zhì",厝火燎原:"cuò huǒ liǎo yuán",撮科打哄:"cuō kē dǎ hòng",寸积铢累:"cùn jī zhū lěi",啛啛喳喳:"cuì cuì chā chā",摧折豪强:"cuī zhé háo qiáng",摧刚为柔:"cuī gāng wéi róu",从俗就简:"cóng sú jiù jiǎn",此发彼应:"cǐ fā bǐ yīng",此唱彼和:"cǐ chàng bǐ hè",慈悲为本:"cí bēi wéi běn",纯属骗局:"chún shǔ piàn jú",春笋怒发:"chūn sǔn nù fā",垂头搨翼:"chuí tóu tà yì",传为笑谈:"chuán wéi xiào tán",传风扇火:"chuán fēng shān huǒ",穿红着绿:"chuān hóng zhuó lǜ",触处机来:"chù chǔ jī lái",处尊居显:"chǔ zūn jū xiǎn",处堂燕雀:"chǔ táng yàn què",处实效功:"chǔ shí xiào gōng",处高临深:"chǔ gāo lín shēn",出入无间:"chū rù wú jiān",出门应辙:"chū mén yīng zhé",出处语默:"chū chǔ yǔ mò",出处殊途:"chū chǔ shū tú",出处进退:"chū chǔ jìn tuì",愁山闷海:"chóu shān mèn hǎi",冲冠眦裂:"chōng guàn zì liè",齿牙为祸:"chǐ yá wéi huò",尺二冤家:"chǐ èr yuān jia",尺短寸长:"chǐ duǎn cùn cháng",尺寸之功:"chǐ cùn zhī gōng",城北徐公:"chéng běi xú gōng",成败兴废:"chéng bài xīng fèi",趁水和泥:"chèn shuǐ huò ní",称雨道晴:"chēng yǔ dào qíng",称体载衣:"chēng tǐ zài yī",称体裁衣:"chèn tǐ cái yī",称家有无:"chèn jiā yǒu wú",称德度功:"chēng dé duó gōng",沉吟章句:"chén yín zhāng jù",沉吟不决:"chén yín bù jué",沉疴宿疾:"chén kē sù jí",扯纤拉烟:"chě qiàn lā yān",扯顺风旗:"chě shùn fēng qí",车载船装:"chē zǎi chuán zhuāng",朝升暮合:"zhāo shēng mù gě",朝攀暮折:"zhāo pān mù shé",超今冠古:"chāo jīn guàn gǔ",倡而不和:"chàng ér bú hè",畅所欲为:"chàng suǒ yù wéi",苌弘碧血:"cháng hóng bì xiě",长幼尊卑:"zhǎng yòu zūn bēi",长绳系日:"cháng shéng jì rì",长年三老:"zhǎng nián sān lǎo",长春不老:"cháng chūn bù lǎo",长傲饰非:"zhǎng ào shì fēi",昌亭旅食:"chāng tíng lǚ shí",禅絮沾泥:"chán xù zhān ní",差三错四:"chā sān cuò sì",层台累榭:"céng tái lěi xiè",层见迭出:"céng xiàn dié chū",藏踪蹑迹:"cáng zōng niè jì",苍蝇见血:"cāng yíng jiàn xiě",餐松啖柏:"cān sōng dàn bó",骖风驷霞:"cān fēng sì xiá",参伍错综:"cēn wǔ cuò zōng",参辰卯酉:"shēn chén mǎo yǒu",材优干济:"cái yōu gān jǐ",材薄质衰:"cái bó zhì shuāi",才大难用:"cái dà nán yòng",才薄智浅:"cái bó zhì qiǎn",不足为意:"bù zú wéi yì",不足为据:"bù zú wéi jù",不足为法:"bù zú wéi fǎ",不足齿数:"bù zú chǐ shǔ",不着疼热:"bù zhuó téng rè",不知薡蕫:"bù zhī dǐng dǒng",不越雷池:"bú yuè léi chí",不相为谋:"bù xiāng wéi móu",不贪为宝:"bù tān wéi bǎo",不了而了:"bù liǎo ér liǎo",不可揆度:"bù kě kuí duó",不遑启处:"bù huáng qǐ chǔ",不当不正:"bù dāng bú zhèng",不差什么:"bú chà shén me",不差累黍:"bù chā lěi shǔ",擘两分星:"bò liǎng fēn xīng",簸土扬沙:"bǒ tǔ yáng shā",薄物细故:"bó wù xì gù",薄寒中人:"bó hán zhòng rén",博文约礼:"bó wén yuē lǐ",播糠眯目:"bō kāng mí mù",剥皮抽筋:"bō pí chōu jīn",剥肤椎髓:"bō fū chuí suǐ",波属云委:"bō zhǔ yún wěi",波骇云属:"bō hài yún zhǔ",兵微将寡:"bīng wēi jiàng guǎ",兵强将勇:"bīng qiáng jiàng yǒng",兵多将广:"bīng duō jiàng guǎng",兵不由将:"bīng bù yóu jiàng",冰解的破:"bīng jiě dì pò",彬彬济济:"bīn bīn jǐ jǐ",摽梅之年:"biào méi zhī nián",表里为奸:"biǎo lǐ wéi jiān",飙发电举:"biāo fā diàn jǔ",变贪厉薄:"biàn tān lì bó",敝盖不弃:"bì gài bú qì",秕言谬说:"bǐ yán miù shuō",比物属事:"bǐ wù zhǔ shì",被山带河:"pī shān dài hé",被甲枕戈:"pī jiǎ zhěn gē",被甲据鞍:"pī jiǎ jù ān",被褐怀玉:"pī hè huái yù",被发缨冠:"pī fà yīng guàn",背曲腰躬:"bèi qǔ yāo gōng",北窗高卧:"běi chuāng gāo wò",北辰星拱:"běi chén xīng gǒng",北鄙之音:"běi bǐ zhī yīn",卑宫菲食:"bēi gōng fěi shí",暴衣露冠:"pù yī lù guàn",暴腮龙门:"pù sāi lóng mén",暴露文学:"bào lù wén xué",暴虎冯河:"bào hǔ píng hé",抱蔓摘瓜:"bào wàn zhāi guā",抱法处势:"bào fǎ chǔ shì",褒贬与夺:"bāo biǎn yǔ duó",帮闲钻懒:"bāng xián zuān lǎn",拜将封侯:"bài jiàng fēng hóu",百兽率舞:"bǎi shòu shuài wǔ",百孔千创:"bǎi kǒng qiān chuāng",白衣卿相:"bái yī qīng xiàng",白首为郎:"bái shǒu wéi láng",白首相知:"bái shǒu xiāng zhī",把玩无厌:"bǎ wán wú yàn",拔锅卷席:"bá guō juǎn xí",拔本塞源:"bá běn sè yuán",傲不可长:"ào bù kě zhǎng",熬更守夜:"áo gēng shǒu yè",安时处顺:"ān shí chǔ shùn",安身为乐:"ān shēn wéi lè",安老怀少:"ān lǎo huái shào",安步当车:"ān bù dàng chē",爱人好士:"ài rén hào shì",矮人观场:"ǎi rén guān chǎng",捱风缉缝:"ái fēng jī fèng",挨山塞海:"āi shān sè hǎi",阿家阿翁:"ā jiā ā wēng",阿党相为:"ē dǎng xiāng wéi",追亡逐北:"zhuī wáng zhú běi",竹篮打水:"zhú lán dá shuǐ",知疼着热:"zhī téng zháo rè",语不惊人:"yǔ bù jīng rén",于今为烈:"yú jīn wéi liè",一日三省:"yí rì sān xǐng",穴居野处:"xué jū yě chǔ",五脊六兽:"wǔ jǐ liù shòu",无声无臭:"wú shēng wú xiù",谓予不信:"wèi yú bú xìn",舍身为国:"shě shēn wéi guó",杀妻求将:"shā qī qiú jiàng",强作解人:"qiǎng zuò jiě rén",气冲斗牛:"qì chōng dǒu niú",临深履薄:"lín shēn lǚ bó",钧天广乐:"jūn tiān guǎng yuè",艰难竭蹶:"jiān nán jié jué",夹七夹八:"jiā qī jiā bā",混混噩噩:"hún hún è è",厚古薄今:"hòu gǔ bó jīn",鬼怕恶人:"guǐ pà è rén",伽马射线:"gā mǎ shè xiàn",佛头着粪:"fó tóu zhuó fèn",奉为至宝:"fèng wéi zhì bǎo",登坛拜将:"dēng tán bài jiàng",晨昏定省:"chén hūn dìng xǐng",察察为明:"chá chá wéi míng",博闻强识:"bó wén qiáng zhì",避难就易:"bì nán jiù yì",了无生机:"liǎo wú shēng jī",有一说一:"yǒu yī shuō yī",独一无二:"dú yī wú èr",说一不二:"shuō yī bù èr",举一反三:"jǔ yī fǎn sān",数一数二:"shǔ yī shǔ èr",杀一儆百:"shā yī jǐng bǎi",丁一卯二:"dīng yī mǎo èr",丁一确二:"dīng yī què èr",不一而止:"bù yī ér zhǐ",无一幸免:"wú yī xìng miǎn",表里不一:"biǎo lǐ bù yī",良莠不一:"liáng yǒu bù yī",心口不一:"xīn kǒu bù yī",言行不一:"yán xíng bù yī",政令不一:"zhèng lìng bù yī",参差不一:"cēn cī bù yī",纷纷不一:"fēn fēn bù yī",毁誉不一:"huǐ yù bù yī",不一而三:"bù yī ér sān",百不一遇:"bǎi bù yī yù",言行抱一:"yán xíng bào yī",瑜百瑕一:"yú bǎi xiá yī",背城借一:"bèi chéng jiè yī",凭城借一:"píng chéng jiè yī",劝百讽一:"quàn bǎi fěng yī",群居和一:"qún jū hé yī",百不获一:"bǎi bù huò yī",百不失一:"bǎi bù shī yī",百无失一:"bǎi wú shī yī",万不失一:"wàn bù shī yī",万无失一:"wàn wú shī yī",合而为一:"hé ér wéi yī",合两为一:"hé liǎng wéi yī",合二为一:"hé èr wéi yī",天下为一:"tiān xià wéi yī",相与为一:"xiāng yǔ wéi yī",较若画一:"jiào ruò huà yī",较如画一:"jiào rú huà yī",斠若画一:"jiào ruò huà yī",言行若一:"yán xíng ruò yī",始终若一:"shǐ zhōng ruò yī",终始若一:"zhōng shǐ ruò yī",惟精惟一:"wéi jīng wéi yī",众多非一:"zhòng duō fēi yī",不能赞一:"bù néng zàn yī",问一答十:"wèn yī dá shí",一不扭众:"yī bù niǔ zhòng",一以贯之:"yī yǐ guàn zhī",一以当百:"yī yǐ dāng bǎi",百不当一:"bǎi bù dāng yī",十不当一:"shí bù dāng yī",以一警百:"yǐ yī jǐng bǎi",以一奉百:"yǐ yī fèng bǎi",以一持万:"yǐ yī chí wàn",以一知万:"yǐ yī zhī wàn",百里挑一:"bǎi lǐ tiāo yī",整齐划一:"zhěng qí huà yī",一来二去:"yī lái èr qù",一路公交:"yī lù gōng jiāo",一路汽车:"yī lù qì chē",一路巴士:"yī lù bā shì",朝朝朝落:"zhāo cháo zhāo luò",曲意逢迎:"qū yì féng yíng",一行不行:"yì háng bù xíng",行行不行:"háng háng bù xíng"},K3e=Object.keys(zB).map(e=>({zh:e,pinyin:zB[e],probability:2e-8,length:4,priority:Dc.Normal,dict:Symbol("dict4")})),HB={巴尔干半岛:"bā ěr gàn bàn dǎo",巴尔喀什湖:"bā ěr kā shí hú",不幸而言中:"bú xìng ér yán zhòng",布尔什维克:"bù ěr shí wéi kè",何乐而不为:"hé lè ér bù wéi",苛政猛于虎:"kē zhèng měng yú hǔ",蒙得维的亚:"méng dé wéi dì yà",民以食为天:"mín yǐ shí wéi tiān",事后诸葛亮:"shì hòu zhū gě liàng",物以稀为贵:"wù yǐ xī wéi guì",先下手为强:"xiān xià shǒu wéi qiáng",行行出状元:"háng háng chū zhuàng yuan",亚得里亚海:"yà dé lǐ yà hǎi",眼不见为净:"yǎn bú jiàn wéi jìng",竹筒倒豆子:"zhú tǒng dào dòu zi"},Z3e=Object.keys(HB).map(e=>({zh:e,pinyin:HB[e],probability:2e-8,length:5,priority:Dc.Normal,dict:Symbol("dict5")}));function jB(e,t){return e&&(e.decimalt.probability)?e:t}function WB(e){e.probability<1e-300&&(e.probability*=1e300,e.decimal+=1)}function G3e(e){return e.priority===Dc.Custom?-(e.length*e.length*100):e.priority===Dc.Surname?-(e.length*e.length*10):0}function Q3e(e,t){const n=[];let i=e.length-1,o=e[i];for(let s=t-1;s>=0;s--){const r=s+1>=t?{probability:1,decimal:0,patterns:[]}:n[s+1];for(;o&&o.index+o.length-1===s;){const l=o.index,c={probability:o.probability*r.probability,decimal:r.decimal+G3e(o),patterns:r.patterns,concatPattern:o};WB(c),n[l]=jB(n[l],c),o=e[--i]}const a={probability:1e-13*r.probability,decimal:0,patterns:r.patterns};WB(a),n[s]=jB(n[s],a),n[s].concatPattern&&(n[s].patterns=n[s].patterns.concat(n[s].concatPattern),n[s].concatPattern=void 0,delete n[s+1])}return n[0].patterns.reverse()}function qB(e,t){return e&&e.count<=t.count?e:t}function Y3e(e){return e.priority===Dc.Custom?-(e.length*e.length*1e5):e.priority===Dc.Surname?-(e.length*e.length*100):1}function J3e(e,t){const n=[];let i=e.length-1,o=e[i];for(let s=t-1;s>=0;s--){const r=s+1>=t?{count:0,patterns:[]}:n[s+1];for(;o&&o.index+o.length-1===s;){const l=o.index,c={count:Y3e(o)+r.count,patterns:r.patterns,concatPattern:o};n[l]=qB(n[l],c),o=e[--i]}const a={count:1+r.count,patterns:r.patterns};n[s]=qB(n[s],a),n[s].concatPattern&&(n[s].patterns=n[s].patterns.concat(n[s].concatPattern),n[s].concatPattern=void 0,delete n[s+1])}return n[0].patterns.reverse()}function X3e(e,t){return!(t.index+t.length<=e.index||t.priority>e.priority||t.priority===e.priority&&t.length>e.length)}function ebe(e){const t=[];for(let n=e.length-1;n>=0;){const{index:i}=e[n];let o=n-1;for(;o>=0&&X3e(e[n],e[o]);)o--;(o<0||e[o].index+e[o].length<=i)&&t.push(e[n]),n=o}return t.reverse()}var VB;(function(e){e[e.ReverseMaxMatch=1]="ReverseMaxMatch",e[e.MaxProbability=2]="MaxProbability",e[e.MinTokenization=3]="MinTokenization"})(VB||(VB={}));class UB{constructor(t,n="",i=""){this.children=new Map,this.fail=null,this.patterns=[],this.parent=t,this.prefix=n,this.key=i}}class tbe{constructor(){this.dictMap=new Map,this.queues=[],this.root=new UB(null)}build(t){this.buildTrie(t),this.buildFailPointer()}buildTrie(t){for(let n of t){const i=mT(n.zh);let o=this.root;for(let s=0;s{t=t.concat(i)}),this.queues=[];t.length>n;){let i=t[n++],o=i.parent&&i.parent.fail,s=i.key;for(;o&&!o.children.has(s);)o=o.fail;o?i.fail=o.children.get(s):i.fail=this.root}}addPatternToDictMap(t){this.dictMap.has(t.dict)||this.dictMap.set(t.dict,new Set),this.dictMap.get(t.dict).add(t)}addNodeToQueues(t){this.queues[Gu(t.prefix)]||(this.queues[Gu(t.prefix)]=[]),this.queues[Gu(t.prefix)].push(t)}insertPattern(t,n){for(let i=t.length-1;i>=0;i--){const o=t[i];if(n.priority===o.priority&&n.probability>=o.probability)t[i+1]=o;else if(n.priority>o.priority)t[i+1]=o;else{t[i+1]=n;return}}t[0]=n}removeDict(t){this.dictMap.has(t)&&(this.dictMap.get(t).forEach(i=>{i.node.patterns=i.node.patterns.filter(o=>o!==i)}),this.dictMap.delete(t))}match(t,n){let i=this.root,o=[];const s=mT(t);for(let r=0;rn==="off"?u.priority!==Dc.Surname:n==="head"?u.length-1-r===0:!0);l&&o.push(Object.assign(Object.assign({},l),{index:r-l.length+1}));let c=i.fail;for(;c!==null;){const u=c.patterns.find(d=>n==="off"?d.priority!==Dc.Surname:n==="head"?d.length-1-r===0:!0);u&&o.push(Object.assign(Object.assign({},u),{index:r-u.length+1})),c=c.fail}}}return o}search(t,n,i=2){const o=this.match(t,n);return i===1?ebe(o):i===3?J3e(o,Gu(t)):Q3e(o,Gu(t))}}const nbe=[...Z3e,...K3e,...U3e,...V3e,...H3e,...q3e],iX=new tbe;iX.build(nbe);const ibe=new tX,obe=()=>ibe,sbe=[];function rbe(){return sbe}const By=e=>{const t=Q1.get(e);return t?t.split(" ")[0]:e},abe=e=>{const t=[],n=rbe();for(let i=0;i{const s=o?abe(e):e,r=iX.search(s,n,i);let a=0;const l=mT(e);for(let c=0;ce.replace(/(ā|á|ǎ|à)/g,"a").replace(/(ō|ó|ǒ|ò)/g,"o").replace(/(ē|é|ě|è)/g,"e").replace(/(ī|í|ǐ|ì)/g,"i").replace(/(ū|ú|ǔ|ù)/g,"u").replace(/(ǖ|ǘ|ǚ|ǜ)/g,"ü").replace(/(n̄|ń|ň|ǹ)/g,"n").replace(/(m̄|ḿ|m̌|m̀)/g,"m").replace(/(ê̄|ế|ê̌|ề)/g,"ê"),oX=(e,t="off")=>{const n=obe();let i=Q1.get(e)?Q1.get(e).split(" "):[];if(n.get(e))i=n.get(e).split(" ");else if(t!=="off"){const o=gT[e];o&&(i=[o].concat(i.filter(s=>s!==o)))}return i},cbe=(e,t="off")=>{let n=oX(e,t);return n.length>0?n.map(i=>({origin:e,result:i,isZh:!0,originPinyin:i})):[{origin:e,result:e,isZh:!1,originPinyin:e}]},w6=(e,t)=>{const n=e.split(" "),i=[],o=[];for(let s of n)for(let r of O3e)if(s.startsWith(r)){let a=s.slice(r.length);F3e.indexOf(r)!==-1&&D3e.indexOf(a)!==-1&&(a=N3e[a]),i.push(r),o.push(a);break}return t==="standard"&&i.forEach((s,r)=>{(s==="y"||s==="w")&&(i[r]="")}),{final:o.join(" "),initial:i.join(" ")}},B8=e=>{const{final:t}=w6(e);let n="",i="",o="";return B3e.indexOf(V7(t))!==-1?(n=t[0],i=t[1],o=t.slice(2)):(i=t[0]||"",o=t.slice(1)||""),{head:n,body:i,tail:o}},U7=e=>{const t=/(ā|ō|ē|ī|ū|ǖ|n̄|m̄|ê̄)/,n=/(á|ó|é|í|ú|ǘ|ń|ḿ|ế)/,i=/(ǎ|ǒ|ě|ǐ|ǔ|ǚ|ň|m̌|ê̌)/,o=/(à|ò|è|ì|ù|ǜ|ǹ|m̀|ề)/,s=/(a|o|e|i|u|ü|ê)/,r=/(n|m)$/,a=[];return e.split(" ").forEach(c=>{t.test(c)?a.push("1"):n.test(c)?a.push("2"):i.test(c)?a.push("3"):o.test(c)?a.push("4"):s.test(c)||r.test(c)?a.push("0"):a.push("")}),a.join(" ")},ube=(e,t)=>{const n=V7(e).split(" "),i=U7(t).split(" "),o=[];return n.forEach((s,r)=>{o.push(`${s}${i[r]}`)}),o.join(" ")},sX=(e,t)=>{const n=[];return e.split(" ").forEach(o=>{n.push(t?o[0]:o)}),n.join(" ")};function dbe(e,t,n){if(W3e.indexOf(e)===-1)return By(e);if(t===n&&t&&By(t)!==t)return V7(By(e));if(n&&!j3e[e].includes(n)){const i=By(n);if(i!==n){const o=U7(i),s=nX[e];for(let r in s)if(s[r].indexOf(Number(o))!==-1)return r}}}function fbe(e,t){if(e==="了"&&(!t||!Q1.get(t)))return"liǎo"}function hbe(e,t){if(e==="々")return!t||!Q1.get(t)?"tóng":Q1.get(t).split(" ")[0]}function KB(e,t,n){return hbe(e,t)||fbe(e,t)||dbe(e,t,n)||By(e)}const pbe=e=>typeof e!="string"?(console.error("The first param of pinyin is error: "+e+' is not assignable to type "string".'),!1):!0;function Cx(e,t){return t instanceof RegExp?t.test(e):!0}const mbe=(e,t)=>{let n=t.nonZh;if(n==="removed")return e.filter(i=>i.isZh||!Cx(i.origin,t.nonZhScope));if(n==="consecutive"){for(let i=e.length-2;i>=0;i--){const o=e[i],s=e[i+1];!o.isZh&&!s.isZh&&Cx(o.origin,t.nonZhScope)&&Cx(s.origin,t.nonZhScope)&&(o.origin+=s.origin,o.result+=s.result,s.delete=!0)}return e.filter(i=>!i.delete)}else return e},ZB=(e,t)=>Gu(e)===1&&t.multiple?cbe(e,t.surname):!1,gbe=(e,t)=>{switch(t.pattern){case"pinyin":break;case"num":e.forEach(n=>{n.result=n.isZh?U7(n.result):""});break;case"initial":e.forEach(n=>{n.result=n.isZh?w6(n.result,t.initialPattern).initial:""});break;case"final":e.forEach(n=>{n.result=n.isZh?w6(n.result,t.initialPattern).final:""});break;case"first":e.forEach(n=>{n.result=sX(n.result,n.isZh)});break;case"finalHead":e.forEach(n=>{n.result=n.isZh?B8(n.result).head:""});break;case"finalBody":e.forEach(n=>{n.result=n.isZh?B8(n.result).body:""});break;case"finalTail":e.forEach(n=>{n.result=n.isZh?B8(n.result).tail:""});break}},vbe=(e,t)=>{switch(t.toneType){case"symbol":break;case"none":e.forEach(n=>{n.isZh&&(n.result=V7(n.result))});break;case"num":{e.forEach(n=>{n.isZh&&(n.result=ube(n.result,n.originPinyin))});break}}},ybe=(e,t)=>{t.v&&e.forEach(n=>{n.isZh&&(n.result=n.result.replace(/ü/g,typeof t.v=="string"?t.v:"v"))})},bbe=(e,t,n)=>{if(t.multiple&&Gu(n)===1){let i="";e=e.filter(o=>{const s=o.result!==i;return i=o.result,s})}return t.type==="array"?e.map(i=>i.result):t.type==="all"?e.map(i=>{const o=i.isZh?i.result:"",{initial:s,final:r}=w6(o,t.initialPattern),{head:a,body:l,tail:c}=B8(o);let u=[];return o!==""&&(u=[o].concat(oX(i.origin,t.surname).filter(d=>d!==o))),{origin:i.origin,pinyin:o,initial:s,final:r,first:sX(i.result,i.isZh),finalHead:a,finalBody:l,finalTail:c,num:Number(U7(i.originPinyin)),isZh:i.isZh,polyphonic:u,inZhRange:!!Q1.get(i.origin),result:i.result}}):e.map(i=>i.result).join(t.separator)},kbe=(e,t)=>(t===!1&&e.forEach(n=>{n.origin==="一"?n.result=n.originPinyin="yī":n.origin==="不"&&(n.result=n.originPinyin="bù")}),e),wbe={pattern:"pinyin",toneType:"symbol",type:"string",multiple:!1,mode:"normal",removeNonZh:!1,nonZh:"spaced",v:!1,separator:" ",toneSandhi:!0,segmentit:2};function C6(e,t){if(t=Object.assign(Object.assign({},wbe),t||{}),!pbe(e))return e;if(e==="")return t.type==="array"||t.type==="all"?[]:"";t.surname===void 0&&(t.mode==="surname"?t.surname="all":t.surname="off"),t.type==="all"&&(t.pattern="pinyin"),t.pattern==="num"&&(t.toneType="none"),t.removeNonZh&&(t.nonZh="removed");let i=Array(Gu(e)),{list:o}=lbe(e,i,t.surname,t.segmentit,t.traditional);return o=kbe(o,t.toneSandhi),o=mbe(o,t),ZB(e,t)&&(o=ZB(e,t)),gbe(o,t),vbe(o,t),ybe(o,t),bbe(o,t,e)}var vT;(function(e){e[e.AllSegment=1]="AllSegment",e[e.AllArray=2]="AllArray",e[e.AllString=3]="AllString",e[e.PinyinSegment=4]="PinyinSegment",e[e.PinyinArray=5]="PinyinArray",e[e.PinyinString=6]="PinyinString",e[e.ZhSegment=7]="ZhSegment",e[e.ZhArray=8]="ZhArray",e[e.ZhString=9]="ZhString"})(vT||(vT={}));vT.AllSegment;function OR(e,t=[]){let n="";const i=[],o=[],s=(a,l)=>{for(let c=a;cl.start-c.start)){const l=Math.min(Math.max(a.start,r),e.length),c=Math.min(Math.max(a.end,l),e.length);s(r,l);const u=a.text??"";for(let d=0;d0?e.ends[e.ends.length-1]:e.source.length}function Cbe(e,t){return t>0&&t<=e.ends.length?e.ends[t-1]:t<=0?aX(e,0):e.source.length}const yT=[{name:"/new",desc:"commands.new.desc",noArgs:!0},{name:"/clear",desc:"commands.clear.desc",noArgs:!0},{name:"/login",desc:"commands.login.desc",noArgs:!0},{name:"/plan",desc:"commands.plan.desc"},{name:"/swarm",desc:"commands.swarm.desc"},{name:"/tower",desc:"commands.tower.desc"},{name:"/goal",desc:"commands.goal.desc"},{name:"/btw",desc:"commands.btw.desc",acceptsInput:!0,argHint:"commands.btw.argHint"},{name:"/compact",desc:"commands.compact.desc",acceptsInput:!0,argHint:"commands.compact.argHint"},{name:"/undo",desc:"commands.undo.desc",noArgs:!0},{name:"/fork",desc:"commands.fork.desc",noArgs:!0},{name:"/reload",desc:"commands.reload.desc",noArgs:!0},{name:"/export",desc:"commands.export.desc",noArgs:!0},{name:"/status",desc:"commands.status.desc",noArgs:!0}],GB={"/plan":"plan","/goal":"goal","/swarm":"swarm"};function lX(e){return Object.hasOwn(GB,e)?GB[e]:void 0}function A6(e){if(!e.startsWith("/"))return null;const t=e.indexOf(" ");return t===-1?{cmd:e,arg:""}:{cmd:e.slice(0,t),arg:e.slice(t+1)}}function x6(e,t=xbe()){const n=typeof e=="string"?OR(e,rX(e)):e,i=Abe(n.text);if(!i)return null;const o=t.find(c=>c.isSkill!==!0&&c.name===i.cmd);if(!o||o.noArgs===!0&&i.arg.trim()!=="")return null;const{source:s}=n,r=aX(n,i.start),a=Cbe(n,i.start+i.cmd.length);let l=a;for(;s[l]===" ";)l+=1;return{item:o,commandRange:{start:r,end:a},argumentRange:{start:l,end:s.length},needsArgumentSeparator:l===a}}function Abe(e){const t=e.length-e.trimStart().length;if(lX(e.slice(t,e.trimEnd().length))!==void 0)return{cmd:e.slice(t,e.trimEnd().length),arg:"",start:t};const n=A6(e);return n===null?null:{cmd:n.cmd,arg:n.arg,start:0}}let QB=null;function xbe(){return QB??=Z7(),QB}const nf="skill:";function Sbe(e,t){const n=e.find(r=>r.name===t);if(n!==void 0)return n;const i=`/${nf}${t.slice(1)}`,o=e.find(r=>r.name===i);if(o!==void 0)return o;if(!t.startsWith(`/${nf}`))return;const s=t.slice(1+nf.length);if(!(s.length===0||s.includes(" ")))return e.find(r=>r.isSkill===!0&&K7(r.name)===s)}function K7(e){const t=e.startsWith("/")?e.slice(1):e;return t.startsWith(nf)?t.slice(nf.length):t}function _be(e,t,n){for(const i of[`/${nf}${t}`,`/${t}`]){if(e===i)return;if(e.startsWith(`${i} `))return e.slice(i.length+1).trim()||void 0}return(n??"").trim()||void 0}function Z7(e=[],t){const n=t?.towerEnabled===!0?yT:yT.filter(o=>o.name!=="/tower"),i=e.map(o=>({name:o.source==="builtin"?`/${o.name}`:`/${nf}${o.name}`,desc:o.description,isSkill:!0,acceptsInput:!0}));return[...n,...i]}const YB=new Map;function cX(e){let t=YB.get(e);if(!t){const n=C6(e,{toneType:"none",type:"array"}),i=C6(e,{pattern:"first",toneType:"none",type:"array"});t=Ibe(e,n,i),YB.set(e,t)}return t}const JB={full:[],first:[],offsets:[],literal:[]};function Ibe(e,t,n){if(t.length!==n.length)return JB;const i=[],o=[];let s=0;for(let r=0;r0&&e.slice(s,s+a.length).toLowerCase()===a.toLowerCase()?(o.push(!0),s+=a.length):(o.push(!1),s+=Array.from(e.slice(s))[0]?.length??0)}return i.push(s),s!==e.length?JB:{full:t,first:n,offsets:i,literal:o}}function bT(e,t,n,i){const o=e[t];let s=0,r=-1,a=-1,l=0,c=0;for(let f=0;f=0)return bT(i,"first",o,o+t.length);const s=i.full.join("").indexOf(t);if(!(s<0))return bT(i,"full",s,s+t.length)}function Rbe(e,t,n){const i=e.trim().replace(/^\//,"").toLowerCase();if(i==="")return{};const o=Ebe(t,i),s=Lbe(n,i);return{name:o?[o]:void 0,desc:s?[s]:void 0}}const Pbe={keys:[{name:"name",weight:3},{name:"desc",weight:1},{name:"pinyinFull",weight:1},{name:"pinyinFirst",weight:1}],includeScore:!0,includeMatches:!0,ignoreLocation:!0,threshold:.4};function $be(e,t){const n=e.toLowerCase(),i=t.toLowerCase();return n===i?0:n.startsWith(i)?1:2}function ez(e){const t=[...e].sort((i,o)=>i[0]-o[0]),n=[];for(const i of t){const o=n[n.length-1];o&&i[0]<=o[1]?o[1]=Math.max(o[1],i[1]):n.push([...i])}return n}function Obe(e,t){const n=[],i=[];for(const o of t??[])for(const[s,r]of o.indices)if(o.key==="name")n.push([s+1,r+2]);else if(o.key==="desc")i.push([s,r+1]);else if(o.key==="pinyinFirst"||o.key==="pinyinFull"){const a=bT(cX(e.desc),o.key==="pinyinFirst"?"first":"full",s,r+1);a&&i.push(a)}return{name:n.length>0?ez(n):void 0,desc:i.length>0?ez(i):void 0}}function Fbe(e,t=yT,n=i=>i.desc){const i=e.trim().replace(/^\//,"");if(i==="")return t.map(s=>({item:s,ranges:{}}));const o=t.map((s,r)=>{const a=n(s),l=Tbe(a);return{index:r,item:s,name:s.name.replace(/^\//,""),desc:a,pinyinFull:l.full,pinyinFirst:l.first}});return new L3e(o,Pbe).search(i).map(({item:s,score:r,matches:a})=>({doc:s,score:r??1,rank:$be(s.name,i),ranges:Obe(s,a)})).sort((s,r)=>s.rank!==r.rank?s.rank-r.rank:s.score!==r.score?s.score-r.score:s.doc.index-r.doc.index).map(({doc:s,ranges:r})=>({item:s.item,ranges:r}))}const Dbe=50;function Nbe(e){const t=e.llmTiming?.llmStreamDurationMs,n=e.usage?.output;if(!(t===void 0||ts&&r>s,l=Math.min(e,a?r:s);return{left:a?t.left-i-l:t.right+i,maxWidth:l,flipped:a}}let jbe=0;function tz(e,t){const n=++jbe;return e.pendingSwarmBySession[t]=n,n}function FR(e,t,n){return n===void 0||e.pendingSwarmBySession[t]!==n?!1:(delete e.pendingSwarmBySession[t],!0)}function kT(e,t,n){e.pendingSwarmBySession[t]===void 0&&(e.swarmModeBySession[t]=n)}function nz(e,t){const n=new Set(e.map(c=>c.id)),i=t.filter(c=>c.kind==="subagent"&&!n.has(c.id));if(i.length===0)return e;const o=new Map(e.map(c=>[c.id,c])),s=new Map(e.filter(c=>c.kind==="subagent"&&c.agentId!==void 0).map(c=>[c.agentId,c])),r=new Set,a=i.map(c=>{const u=c.backgroundTaskId!==void 0?o.get(c.backgroundTaskId):void 0,d=s.get(c.agentId??c.id),f=(d?.status==="running"&&u?.status!=="running"?d:u)??d;if(f===void 0)return c;r.add(f.id);const h=c.status==="running"&&f.status!=="running";return{...c,status:c.status==="running"?f.status:c.status,subagentPhase:h?f.status==="completed"?"completed":"failed":c.subagentPhase,completedAt:f.completedAt??c.completedAt,completedAtEstimated:f.completedAt!==void 0?void 0:c.completedAtEstimated,outputPreview:f.outputPreview??c.outputPreview,outputBytes:f.outputBytes??c.outputBytes,model:c.model??f.model,thinkingEffort:c.thinkingEffort??f.thinkingEffort,backgroundTaskId:f.id}});return[...e.filter(c=>!r.has(c.id)),...a]}const Wbe="Report the current tower status: call TowerStatus and give a compact summary.",qbe="Tear down the tower: call TowerTeardown and report what it did. It refuses to destroy dirty worktrees unless forced.";let Vbe=0;function wT(e,t){const n=++Vbe;return e.pendingTowerBySession[t]=n,n}function DR(e,t,n){return n===void 0||e.pendingTowerBySession[t]!==n?!1:(delete e.pendingTowerBySession[t],!0)}function CT(e,t,n){e.pendingTowerBySession[t]===void 0&&(e.towerModeBySession[t]=n)}function Ube(){if(typeof navigator>"u")return!1;if(/Mac|iPod|iPhone|iPad/.test(navigator.platform))return!0;const e=navigator.userAgentData;return e?.platform==="macOS"||e?.platform==="iOS"}function Kbe(e,t=Ube()){return(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.code==="KeyF"||e.key.toLowerCase()==="f")&&!e.defaultPrevented}const Zbe=new Map([["ς","σ"],["ß","ss"],["ſ","s"],["ff","ff"],["fi","fi"],["fl","fl"],["ffi","ffi"],["ffl","ffl"],["ſt","st"],["st","st"],["ʼn","ʼn"],["µ","μ"],["K","k"],["Å","å"],["Ω","ω"]]);function Gbe(e){return e==="pre"||e==="pre-wrap"||e==="break-spaces"?"preserve":e==="pre-line"?"pre-line":"collapse"}function Qbe(e,t){if(t==="preserve")return{text:e,map:Array.from({length:e.length},(r,a)=>a)};const n=t==="collapse"?/[\t\n\f\r ]/:/[\t ]/;let i="";const o=[];let s=!1;for(let r=0;riz(u.text)),i="\0";let o="";const s=[];for(let u=0;u0&&e[u].gapBefore&&(o+=i),s[u]=o.length,o+=n[u].folded;const r=Xbe(iz(t).folded);if(r===null)return;const a=new RegExp(r,"g");function l(u){let d=0,f=s.length-1,h=0;for(;d<=f;){const m=d+f>>1;s[m]<=u?(h=m,d=m+1):f=m-1}return h}let c;for(;;){const u=a.exec(o);if(u===null)return;const d=u.index,f=d+u[0].length-1,h=l(d),m=l(f),g=n[h].map[d-s[h]],y=n[m].map[f-s[m]],v={startSeg:h,startOffset:g.start,endSeg:m,endOffset:y.start+y.length};c!==void 0&&c.startSeg===v.startSeg&&c.startOffset===v.startOffset&&c.endSeg===v.endSeg&&c.endOffset===v.endOffset||(c=v,yield v)}}const Jbe=/[.*+?^${}()|[\]\\]/g;function Xbe(e){const t=[];let n=0;for(;n=o5e)return{ranges:l,truncated:!0};l.push(f)}}return{ranges:l,truncated:!1}}const fX="kimi-transcript-search",AT="kimi-transcript-search-current";function hX(){return globalThis.CSS?.highlights??null}function xx(e,t){const n=hX(),i=globalThis.Highlight;if(!n||!i)return;if(e.length===0){xT();return}const o=new i;for(const r of e)o.add(r);n.set(fX,o);const s=e[t];if(s!==void 0){const r=new i;r.add(s),n.set(AT,r)}else n.delete(AT)}function xT(){const e=hX();e?.delete(fX),e?.delete(AT)}let pX=null;function r5e(e){e!==null&&(pX=e)}let sz=0,p5=null;async function S6(e){const t=++sz,n=(async()=>{const o=await e();t===sz&&r5e(o)})(),i=(async()=>{await n,p5!==null&&p5.seq>t&&await p5.promise})();return p5={seq:t,promise:i},i}let mX=null;function a5e(e){mX=e}const l5e=5e3;function c5e(e){return Promise.race([e(),new Promise(t=>{setTimeout(()=>t(null),l5e)})])}function m5(){return`${pX==="global"?"https://www.kimi.ai":"https://www.kimi.com"}/code?from=${lv?"kimi_code_desktop":"kimi_code_web"}`}function NR(){const e=mX;if(e===null){window.open(m5(),"_blank","noopener");return}const t=()=>c5e(e);if(lv){S6(t).then(()=>{window.open(m5(),"_blank","noopener")});return}const n=window.open("","_blank");if(n===null){window.open(m5(),"_blank","noopener");return}try{n.opener=null}catch{}S6(t).then(()=>{try{n.location.href=m5()}catch{}})}function u5e(e,t,n){if(e.length===0)return null;const i=new Set(e),o=t.filter(r=>i.has(r)),s=e.filter(r=>!t.includes(r));return s.length===0&&o.length===t.length?null:t.length===0&&n!==void 0?s.toSorted((r,a)=>(n.get(a)??Number.NEGATIVE_INFINITY)-(n.get(r)??Number.NEGATIVE_INFINITY)):[...s,...o]}function d5e(e,t){const n=new Map(t.map((i,o)=>[i,o]));return e.toSorted((i,o)=>(n.get(i.id)??-1)-(n.get(o.id)??-1))}function f5e(e,t,n,i="before"){const o=e.indexOf(t),s=e.indexOf(n);if(o===-1||s===-1||o===s)return e;const r=[...e];r.splice(o,1);const a=o(t.get(i.id)??Number.NEGATIVE_INFINITY)-(t.get(n.id)??Number.NEGATIVE_INFINITY))}function p5e(e,t){let n=!1;const i={...e};for(const[o,s]of t)s>(i[o]??Number.NEGATIVE_INFINITY)&&(i[o]=s,n=!0);return{next:i,changed:n}}function m5e(e,t){const n=new Map;for(const i of e){if(i.parentSessionId||i.archived)continue;const o=new Date(i.updatedAt).getTime();if(Number.isNaN(o))continue;const s=t(i);o>(n.get(s)??Number.NEGATIVE_INFINITY)&&n.set(s,o)}return n}function g5e(e,t){const n=new Map;for(const i of e){const o=t[i.id]??Number.NEGATIVE_INFINITY,s=i.lastOpenedAt?Date.parse(i.lastOpenedAt):Number.NaN,r=Number.isNaN(s)?Number.NEGATIVE_INFINITY:s;n.set(i.id,Math.max(o,r))}return n}function v5e(e,t){const n=Object.keys(e);if(!n.some(o=>!t.has(o)))return{next:e,changed:!1};const i={};for(const o of n)t.has(o)&&(i[o]=e[o]);return{next:i,changed:!0}}const y5e=5;function b5e(e,t,n,i=y5e){if(e.length<=i)return e;const o=e.slice(0,i);if(t&&!o.some(s=>s.id===t)){const s=e.find(r=>r.id===t);s&&(o[i-1]=s)}return o}const z8=new Set;let _6=!1;function I6(){for(const e of z8)e()}function k5e(){_6||typeof window>"u"||(_6=!0,window.addEventListener("scroll",I6,!0),window.addEventListener("resize",I6))}function w5e(){_6&&(_6=!1,window.removeEventListener("scroll",I6,!0),window.removeEventListener("resize",I6))}function C5e(e){z8.add(e),k5e();let t=!1;return()=>{t||(t=!0,z8.delete(e),z8.size===0&&w5e())}}const Wh=6,qh=8,A5e=150,x5e=Xe({__name:"TooltipBubble",props:{target:{default:null},delegate:{default:null},text:{},placement:{default:"top"},maxWidth:{default:280},maxLines:{default:6}},setup(e){const t=e,n=Z(),i=Z(!1),o=Z(!1),s=Z({maxWidth:`${t.maxWidth}px`});let r,a=null,l,c=!1;function u(){if(t.target)return t.target;const T=t.delegate;return T?T.firstElementChild??T:null}function d(T){const E=n.value;if(!E)return;const L=T.getBoundingClientRect(),P=E.offsetWidth,N=E.offsetHeight,U=window.innerWidth,F=window.innerHeight;let B=t.placement;B==="top"&&L.top-Wh-NF-qh?B="top":B==="left"&&L.left-Wh-PU-qh&&(B="left");let W=0,D=0;B==="top"?(W=L.top-Wh-N,D=L.left+L.width/2-P/2):B==="bottom"?(W=L.bottom+Wh,D=L.left+L.width/2-P/2):B==="left"?(W=L.top+L.height/2-N/2,D=L.left-Wh-P):(W=L.top+L.height/2-N/2,D=L.right+Wh),D=Math.min(Math.max(D,qh),U-qh-P),W=Math.min(Math.max(W,qh),F-qh-N),s.value={maxWidth:`${t.maxWidth}px`,top:`${Math.round(W)}px`,left:`${Math.round(D)}px`}}function f(){return L2.value&&!$N(u())}function h(){if(!t.text||f())return;const T=u();T&&(window.clearTimeout(r),r=window.setTimeout(()=>{!T.isConnected||f()||(s.value={maxWidth:`${t.maxWidth}px`},i.value=!0,o.value=!1,bt(()=>{d(T),o.value=!0}))},A5e))}function m(){window.clearTimeout(r),c=!1,i.value=!1,o.value=!1}function g(T){c||$2(T)||(c=!0,h())}function y(T){!(T.target instanceof Element)||!T.target.matches(":focus-visible")||t.delegate&&k(T.target)!==t.delegate||h()}function v(){m()}function k(T){return T instanceof Element?T.closest(".ui-tip"):null}function w(T){const E=t.delegate;if(E){if(k(T.target)!==E){m();return}c||$2(T)||(c=!0,h())}}function C(T){const E=t.delegate;if(!E)return;const L=T.relatedTarget;L instanceof Element&&E.contains(L)||m()}function x(){m()}function S(){a&&(a.removeEventListener("focusin",y),t.delegate?(a.removeEventListener("pointermove",w),a.removeEventListener("mouseout",C),a.removeEventListener("focusout",x)):(a.removeEventListener("pointermove",g),a.removeEventListener("mouseleave",v),a.removeEventListener("focusout",v)),a=null)}function M(){S(),l?.disconnect(),l=void 0;const T=t.target??t.delegate;T&&(a=T,T.addEventListener("focusin",y),t.delegate?(T.addEventListener("pointermove",w,{passive:!0}),T.addEventListener("mouseout",C),T.addEventListener("focusout",x),l=new MutationObserver(()=>{i.value&&m()}),l.observe(T,{childList:!0})):(T.addEventListener("pointermove",g,{passive:!0}),T.addEventListener("mouseleave",v),T.addEventListener("focusout",v)))}Fe(()=>[t.target,t.delegate],()=>{m(),M()}),Fe(L2,T=>{T&&!$N(u())&&m()});let _=null;return Fe(i,T=>{if(T){_??=C5e(m);return}_?.(),_=null}),Pn(()=>{B3(),M()}),ki(()=>{window.clearTimeout(r),l?.disconnect(),S(),_?.(),_=null}),(T,E)=>i.value?(b(),oe(_s,{key:0,to:"body"},[A("div",{ref_key:"bubble",ref:n,class:De(["ui-tip__bubble",{positioned:o.value}]),style:nn([s.value,{"--tip-lines":e.maxLines}]),role:"tooltip"},O(e.text),7)])):X("",!0)}}),gX=kt(x5e,[["__scopeId","data-v-19764006"]]),S5e=["aria-pressed","type","disabled","aria-label"],_5e=Xe({__name:"IconButton",props:{size:{default:"md"},disabled:{type:Boolean},pressed:{type:Boolean,default:void 0},label:{},tooltip:{},type:{default:"button"}},setup(e,{expose:t}){const n=Z();return t({el:n}),(i,o)=>(b(),I("button",{ref_key:"el",ref:n,class:De(["ui-icon-button",[`ui-icon-button--${e.size}`,{"is-pressed":e.pressed}]]),"aria-pressed":e.pressed,type:e.type,disabled:e.disabled,"aria-label":e.label},[si(i.$slots,"default",{},void 0,!0),e.tooltip?(b(),oe(gX,{key:0,target:n.value??null,text:e.tooltip},null,8,["target","text"])):X("",!0)],10,S5e))}}),fn=kt(_5e,[["__scopeId","data-v-ae430378"]]),I5e={class:"ui-action-toast-host"},T5e={class:"ui-action-toast__body"},M5e=Xe({__name:"ActionToast",props:{duration:{default:8e3},dismissLabel:{},dismissToken:{}},emits:["dismiss"],setup(e,{emit:t}){const n=e,i=t,{t:o}=_m();let s=null,r=0,a=0;function l(d){s=setTimeout(()=>i("dismiss",n.dismissToken),d),r=Date.now()+d}function c(){s!==null&&(clearTimeout(s),s=null,a=Math.max(0,r-Date.now()))}function u(){s===null&&l(a)}return l(n.duration),Xn(()=>{s!==null&&clearTimeout(s)}),(d,f)=>(b(),I("div",I5e,[A("div",{class:"ui-action-toast",role:"status",onPointerenter:c,onPointerleave:u},[A("span",T5e,[si(d.$slots,"default")]),V(fn,{class:"ui-action-toast__close",size:"sm",label:e.dismissLabel??p(o)("common.dismiss"),tooltip:e.dismissLabel??p(o)("common.dismiss"),onClick:f[0]||(f[0]=h=>i("dismiss",e.dismissToken))},{default:ie(()=>[V(ve,{name:"close",size:"sm"})]),_:1},8,["label","tooltip"])],32)]))}}),E5e=kt(M5e,[["__scopeId","data-v-23d7613a"]]),L5e={key:0,width:"36",height:"36",viewBox:"0 0 36 36",fill:"none",stroke:"var(--color-success)","stroke-width":"2","aria-hidden":"true"},R5e={key:1,width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",stroke:"var(--color-danger)","stroke-width":"1.5","aria-hidden":"true"},P5e={key:2,width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",stroke:"var(--color-warning)","stroke-width":"1.5","aria-hidden":"true"},C1=Xe({__name:"AuthStateIcon",props:{kind:{}},setup(e){return(t,n)=>e.kind==="success"?(b(),I("svg",L5e,[...n[0]||(n[0]=[A("circle",{cx:"18",cy:"18",r:"15"},null,-1),A("polyline",{points:"10,18 15,24 26,12"},null,-1)])])):e.kind==="expired"?(b(),I("svg",R5e,[...n[1]||(n[1]=[A("circle",{cx:"14",cy:"14",r:"12"},null,-1),A("line",{x1:"14",y1:"8",x2:"14",y2:"15"},null,-1),A("circle",{cx:"14",cy:"19",r:"1.2",fill:"var(--color-danger)"},null,-1)])])):(b(),I("svg",P5e,[...n[2]||(n[2]=[A("path",{d:"M14 3 L26 24 H2 Z"},null,-1),A("line",{x1:"14",y1:"12",x2:"14",y2:"18"},null,-1),A("circle",{cx:"14",cy:"21.5",r:"1",fill:"var(--color-warning)"},null,-1)])]))}}),$5e={key:0,class:"ui-badge__dot","aria-hidden":"true"},O5e=Xe({__name:"Badge",props:{variant:{default:"neutral"},size:{default:"md"},dot:{type:Boolean}},setup(e){return(t,n)=>(b(),I("span",{class:De(["ui-badge",[`ui-badge--${e.variant}`,`ui-badge--${e.size}`]])},[e.dot?(b(),I("span",$5e)):X("",!0),si(t.$slots,"default",{},void 0,!0)],2))}}),pr=kt(O5e,[["__scopeId","data-v-8fbd890a"]]),F5e={class:"ui-banner__icon","aria-hidden":"true"},D5e={class:"ui-banner__text"},N5e=Xe({__name:"Banner",props:{variant:{default:"info"}},setup(e){return(t,n)=>(b(),I("div",{class:De(["ui-banner",`ui-banner--${e.variant}`]),role:"status"},[A("span",F5e,[si(t.$slots,"icon",{},()=>[e.variant==="info"?(b(),oe(ve,{key:0,name:"info",size:"md"})):(b(),oe(ve,{key:1,name:"alert-triangle",size:"md"}))],!0)]),A("span",D5e,[si(t.$slots,"default",{},void 0,!0)])],2))}}),Dg=kt(N5e,[["__scopeId","data-v-6d8a7768"]]),B5e=["aria-label"],z5e=Xe({__name:"Spinner",props:{size:{default:"md"},label:{}},setup(e){const{t}=_m(),n=Z(null);let i,o;function s(){const r=n.value;if(r){if(o?.matches){i?.cancel(),i=void 0;return}i||(i=r.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:850,iterations:1/0}),i.startTime=0)}}return Pn(()=>{const r=n.value;!r||typeof r.animate!="function"||(o=window.matchMedia("(prefers-reduced-motion: reduce)"),o.addEventListener("change",s),s())}),ki(()=>{o?.removeEventListener("change",s),o=void 0,i?.cancel(),i=void 0}),(r,a)=>(b(),I("span",{ref_key:"boxRef",ref:n,class:De(["ui-spinner",`ui-spinner--${e.size}`]),role:"status","aria-label":e.label??p(t)("common.loading")},[...a[0]||(a[0]=[A("svg",{class:"ui-spinner__svg",viewBox:"0 0 24 24","aria-hidden":"true"},[A("circle",{class:"ui-spinner__track",cx:"12",cy:"12",r:"9"}),A("circle",{class:"ui-spinner__arc",cx:"12",cy:"12",r:"9"})],-1)])],10,B5e))}}),ji=kt(z5e,[["__scopeId","data-v-bf7852f3"]]),H5e=["type","disabled"],j5e={class:"ui-button__content"},W5e=Xe({__name:"Button",props:{variant:{default:"primary"},size:{default:"md"},disabled:{type:Boolean},loading:{type:Boolean},type:{default:"button"}},setup(e){return(t,n)=>(b(),I("button",{class:De(["ui-button",[`ui-button--${e.variant}`,`ui-button--${e.size}`,{"is-loading":e.loading}]]),type:e.type,disabled:e.disabled||e.loading},[e.loading?(b(),oe(ji,{key:0,size:"sm",class:"ui-button__spinner"})):X("",!0),A("span",j5e,[si(t.$slots,"default",{},void 0,!0)])],10,H5e))}}),In=kt(W5e,[["__scopeId","data-v-e1f48763"]]),q5e={key:0,class:"ui-card__head"},V5e={class:"ui-card__body"},U5e={key:1,class:"ui-card__foot"},K5e=Xe({__name:"Card",props:{elevated:{type:Boolean,default:!1},size:{default:"md"}},setup(e){return(t,n)=>(b(),I("div",{class:De(["ui-card",[{"is-elevated":e.elevated},`ui-card--${e.size}`]])},[t.$slots.head?(b(),I("div",q5e,[si(t.$slots,"head",{},void 0,!0)])):X("",!0),A("div",V5e,[si(t.$slots,"default",{},void 0,!0)]),t.$slots.foot?(b(),I("div",U5e,[si(t.$slots,"foot",{},void 0,!0)])):X("",!0)],2))}}),vX=kt(K5e,[["__scopeId","data-v-cda946c0"]]),Z5e=["checked","disabled"],G5e={class:"ui-check__box","aria-hidden":"true"},Q5e={key:0,class:"ui-check__label"},Y5e=Xe({__name:"Checkbox",props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(i,o)=>(b(),I("label",{class:De(["ui-check",{"is-on":e.modelValue,"is-disabled":e.disabled}])},[A("input",{class:"ui-check__input",type:"checkbox",checked:e.modelValue,disabled:e.disabled,onChange:o[0]||(o[0]=s=>n("update:modelValue",s.target.checked))},null,40,Z5e),A("span",G5e,[e.modelValue?(b(),oe(ve,{key:0,name:"check",size:"md"})):X("",!0)]),i.$slots.default?(b(),I("span",Q5e,[si(i.$slots,"default",{},void 0,!0)])):X("",!0)],2))}}),J5e=kt(Y5e,[["__scopeId","data-v-acffd4ba"]]),X5e=["r","stroke-width"],e8e=["r","stroke-width","stroke-dasharray","stroke-dashoffset"],t8e=["cx","r"],n8e=.25,i8e=Xe({__name:"ContextRing",props:{pct:{},weight:{default:"regular"},indeterminate:{type:Boolean,default:!1},origin:{type:Boolean,default:!1}},setup(e){const t=e,n={regular:{r:7,stroke:2.5},thin:{r:9.25,stroke:1.5}},i=R(()=>n[t.weight]),o=R(()=>2*Math.PI*i.value.r),s=R(()=>t.indeterminate?`${o.value*n8e} ${o.value}`:`${o.value}`),r=R(()=>t.indeterminate?0:o.value*(1-Math.min(100,Math.max(0,t.pct))/100));return(a,l)=>(b(),I("svg",{class:De(["ctx-ring",[`ctx-ring--${e.weight}`,{"ctx-ring--indeterminate":e.indeterminate}]]),viewBox:"0 0 20 20","aria-hidden":"true"},[A("circle",{class:"ctx-ring-track",cx:"10",cy:"10",r:i.value.r,fill:"none","stroke-width":i.value.stroke},null,8,X5e),A("circle",{class:"ctx-ring-fill",cx:"10",cy:"10",r:i.value.r,fill:"none","stroke-width":i.value.stroke,"stroke-linecap":"round","stroke-dasharray":s.value,"stroke-dashoffset":`${r.value}`},null,8,e8e),e.origin?(b(),I("circle",{key:0,class:"ctx-ring-origin",cx:10+i.value.r,cy:"10",r:i.value.stroke/2},null,8,t8e)):X("",!0)],2))}}),o8e=kt(i8e,[["__scopeId","data-v-ef2d1b6a"]]),ml=Z(0),xg=Z(0),j0=Z([]),s8e=R(()=>j0.value[j0.value.length-1]);function r8e(e){j0.value=[...j0.value,e],ml.value+=1}function rz(e){const t=j0.value.lastIndexOf(e);if(t<0)return;const n=[...j0.value];n.splice(t,1),j0.value=n,ml.value=Math.max(0,ml.value-1)}const a8e=["aria-modal","aria-label","inert"],l8e={key:0,class:"ui-dialog__head"},c8e={class:"ui-dialog__titles"},u8e={key:0,class:"ui-dialog__title"},d8e={key:1,class:"ui-dialog__desc"},f8e={class:"ui-dialog__body"},h8e={key:1,class:"ui-dialog__foot"},p8e='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])',m8e=Xe({__name:"Dialog",props:{open:{type:Boolean},title:{},ariaLabel:{},description:{},closeOnOverlay:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},size:{default:"md"},height:{default:"auto"},padded:{type:Boolean,default:!0},hideClose:{type:Boolean},level:{default:"raised"},initialFocus:{},focusOnOpen:{type:Boolean,default:!0}},emits:["update:open","close"],setup(e,{emit:t}){const n=e,i=t,{t:o}=_m(),s=Z(null);let r=null;const a=Symbol("kimi-dialog"),l=R(()=>s8e.value===a);function c(){i("update:open",!1),i("close")}function u(){return s.value?Array.from(s.value.querySelectorAll(p8e)):[]}function d(){const{initialFocus:m}=n;return m?typeof m=="function"?m()??null:typeof m=="string"?s.value?.querySelector(m)??null:s.value?.contains(m)?m:null:null}function f(m){if(!n.open||!l.value)return;if(m.key==="Escape"&&n.closeOnEsc){m.preventDefault(),c();return}if(m.key!=="Tab")return;const g=u(),y=g[0],v=g[g.length-1];if(!y||!v){m.preventDefault(),s.value?.focus();return}const k=document.activeElement;m.shiftKey&&k===y?(m.preventDefault(),v.focus()):!m.shiftKey&&k===v&&(m.preventDefault(),y.focus())}function h(m){n.closeOnOverlay&&m.target===m.currentTarget&&c()}return Fe(()=>n.open,async m=>{if(m){if(r8e(a),r=document.activeElement,n.focusOnOpen){await bt();const g=d(),y=u();(g??y[0]??s.value)?.focus()}}else rz(a),r instanceof HTMLElement&&(await bt(),r.focus(),r=null)},{immediate:!0}),typeof window<"u"&&window.addEventListener("keydown",f),ki(()=>{if(typeof window<"u"&&window.removeEventListener("keydown",f),n.open&&(rz(a),r instanceof HTMLElement)){const m=r;bt(()=>m.focus())}}),(m,g)=>(b(),oe(_s,{to:"body"},[e.open?(b(),I("div",{key:0,class:"ui-dialog__overlay",onMousedown:h},[A("div",{ref_key:"panel",ref:s,class:De(["ui-dialog",[`ui-dialog--${e.size}`,{"ui-dialog--flush":!e.padded,"ui-dialog--fixed-height":e.height==="fixed","ui-dialog--grouped":e.level==="grouped"}]]),role:"dialog","aria-modal":l.value,"aria-label":e.ariaLabel??e.title,inert:!l.value,tabindex:"-1"},[e.title||m.$slots.head?(b(),I("div",l8e,[si(m.$slots,"head",{},()=>[A("div",c8e,[e.title?(b(),I("div",u8e,O(e.title),1)):X("",!0),e.description?(b(),I("div",d8e,O(e.description),1)):X("",!0)])],!0),e.hideClose?X("",!0):(b(),oe(fn,{key:0,class:"ui-dialog__close",size:"sm",label:p(o)("common.close"),tooltip:p(o)("common.close"),onClick:c},{default:ie(()=>[V(ve,{name:"close",size:"md"})]),_:1},8,["label","tooltip"]))])):X("",!0),A("div",f8e,[si(m.$slots,"default",{},void 0,!0)]),m.$slots.foot?(b(),I("div",h8e,[si(m.$slots,"foot",{},void 0,!0)])):X("",!0)],10,a8e)],32)):X("",!0)]))}}),ud=kt(m8e,[["__scopeId","data-v-c33919d1"]]),g8e={key:0,class:"ui-empty__icon","aria-hidden":"true"},v8e={key:1,class:"ui-empty__title"},y8e={key:2,class:"ui-empty__hint"},b8e=Xe({__name:"EmptyState",props:{title:{},hint:{},size:{default:"md"}},setup(e){return(t,n)=>(b(),I("div",{class:De(["ui-empty",`ui-empty--${e.size}`])},[t.$slots.icon?(b(),I("span",g8e,[si(t.$slots,"icon",{},void 0,!0)])):X("",!0),e.title?(b(),I("div",v8e,O(e.title),1)):X("",!0),e.hint?(b(),I("div",y8e,O(e.hint),1)):X("",!0),si(t.$slots,"default",{},void 0,!0)],2))}}),_9=kt(b8e,[["__scopeId","data-v-a8b39ebb"]]),k8e=["src","data-ink"],w8e=Xe({__name:"Favicon",props:{src:{}},setup(e){const t=e,n=Z(jN(t.src)??null);Fe(()=>t.src,o=>{n.value=jN(o)??null});function i(o){o.currentTarget instanceof HTMLImageElement&&(n.value=Jve(t.src,o.currentTarget))}return(o,s)=>(b(),I("img",{class:"ui-favicon",src:e.src,"data-ink":n.value??void 0,alt:"",onLoad:i},null,40,k8e))}}),ST=kt(w8e,[["__scopeId","data-v-93ad484b"]]),C8e={key:0,class:"ui-field__label"},A8e={key:1,class:"ui-field__error"},x8e={key:2,class:"ui-field__hint"},S8e=Xe({__name:"Field",props:{label:{},hint:{},error:{}},setup(e){return(t,n)=>(b(),I("div",{class:De(["ui-field",{"has-error":!!e.error}])},[e.label?(b(),I("label",C8e,O(e.label),1)):X("",!0),si(t.$slots,"default",{},void 0,!0),e.error?(b(),I("span",A8e,O(e.error),1)):e.hint?(b(),I("span",x8e,O(e.hint),1)):X("",!0)],2))}}),_8e=kt(S8e,[["__scopeId","data-v-a6fe84a4"]]),I8e=["type","value","placeholder","disabled","readonly"],T8e=Xe({__name:"Input",props:{modelValue:{},size:{default:"md"},type:{default:"text"},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},error:{type:Boolean},embedded:{type:Boolean}},emits:["update:modelValue","focus","blur"],setup(e,{expose:t,emit:n}){const i=n,o=Z();function s(l){i("update:modelValue",l.target.value)}function r(){o.value?.focus()}function a(){o.value?.select()}return t({focus:r,select:a,el:o}),(l,c)=>(b(),I("input",{ref_key:"el",ref:o,class:De(["ui-input",[`ui-input--${e.size}`,{"has-error":e.error,"is-embedded":e.embedded}]]),type:e.type,value:e.modelValue,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,onInput:s,onFocus:c[0]||(c[0]=u=>l.$emit("focus",u)),onBlur:c[1]||(c[1]=u=>l.$emit("blur",u))},null,42,I8e))}}),Rr=kt(T8e,[["__scopeId","data-v-790e4789"]]),M8e=Xe({__name:"Kbd",props:{keys:{},variant:{}},setup(e){return(t,n)=>e.keys.length>0?(b(),I("span",{key:0,class:De(["ui-kbd",{"ui-kbd--button":e.variant==="button"}])},[(b(!0),I(_e,null,yt(e.keys,i=>(b(),I("kbd",{key:i,class:"ui-kbd__key"},O(i),1))),128))],2)):X("",!0)}}),bu=kt(M8e,[["__scopeId","data-v-94e6fa5b"]]),E8e=["href","target","rel"],L8e=Xe({__name:"Link",props:{href:{},variant:{default:"default"},external:{type:Boolean}},setup(e){return(t,n)=>e.href?(b(),I("a",{key:0,class:De(["ui-link",`ui-link--${e.variant}`]),href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0},[si(t.$slots,"default",{},void 0,!0)],10,E8e)):(b(),I("span",{key:1,class:De(["ui-link",`ui-link--${e.variant}`])},[si(t.$slots,"default",{},void 0,!0)],2))}}),R8e=kt(L8e,[["__scopeId","data-v-2c379b58"]]),P8e=["role"],$8e=Xe({__name:"Menu",props:{role:{default:"menu"}},setup(e,{expose:t}){const n=Z();t({el:n});let i;return Pn(()=>{n.value&&(i=JY(n.value))}),ki(()=>i?.()),(o,s)=>(b(),I("div",{ref_key:"el",ref:n,class:"ui-menu",role:e.role},[si(o.$slots,"default",{},void 0,!0)],8,P8e))}}),ps=kt($8e,[["__scopeId","data-v-c75ed4a2"]]),O8e={key:0,class:"ui-menu-sep",role:"separator"},F8e=["role","disabled"],D8e={class:"ui-menu-item__action"},N8e=["role","disabled"],B8e=Xe({__name:"MenuItem",props:{active:{type:Boolean},danger:{type:Boolean},disabled:{type:Boolean},separator:{type:Boolean},size:{default:"md"},role:{default:"menuitem"}},emits:["click"],setup(e){const t=H1e();return(n,i)=>e.separator?(b(),I("div",O8e)):t.action?(b(),I("div",{key:1,class:De(["ui-menu-item-row",{"is-active":e.active,"is-disabled":e.disabled}]),role:"none"},[A("button",{class:De(["ui-menu-item",[`ui-menu-item--${e.size}`,{"is-active":e.active,"is-danger":e.danger}]]),type:"button",role:e.role,disabled:e.disabled,onClick:i[0]||(i[0]=o=>n.$emit("click",o))},[si(n.$slots,"default",{},void 0,!0)],10,F8e),A("span",D8e,[si(n.$slots,"action",{},void 0,!0)])],2)):(b(),I("button",{key:2,class:De(["ui-menu-item",[`ui-menu-item--${e.size}`,{"is-active":e.active,"is-danger":e.danger}]]),type:"button",role:e.role,disabled:e.disabled,onClick:i[1]||(i[1]=o=>n.$emit("click",o))},[si(n.$slots,"default",{},void 0,!0)],10,N8e))}}),an=kt(B8e,[["__scopeId","data-v-4b436907"]]),z8e=Xe({__name:"Tooltip",props:{text:{},placement:{default:"top"},maxWidth:{default:280},maxLines:{default:6}},setup(e){const t=Z();return(n,i)=>(b(),I(_e,null,[A("span",{ref_key:"trigger",ref:t,class:"ui-tip"},[si(n.$slots,"default",{},void 0,!0)],512),V(gX,{delegate:t.value??null,text:e.text,placement:e.placement,"max-width":e.maxWidth,"max-lines":e.maxLines},null,8,["delegate","text","placement","max-width","max-lines"])],64))}}),Nn=kt(z8e,[["__scopeId","data-v-4f57efde"]]),H8e={class:"ui-panel-header__title"},j8e={key:0,class:"ui-panel-header__sub"},W8e=Xe({__name:"PanelHeader",props:{title:{},titleTooltip:{},subtitle:{},closable:{type:Boolean,default:!0},closeLabel:{},closeIcon:{default:"close"},wrap:{type:Boolean}},emits:["close"],setup(e){const{t}=_m();return(n,i)=>(b(),I("div",{class:De(["ui-panel-header",{wrap:e.wrap}])},[si(n.$slots,"leading",{},void 0,!0),e.title?(b(),oe(Nn,{key:0,text:e.titleTooltip??e.title},{default:ie(()=>[A("span",H8e,O(e.title),1)]),_:1},8,["text"])):X("",!0),V(Nn,{text:e.subtitle},{default:ie(()=>[e.subtitle?(b(),I("span",j8e,O(e.subtitle),1)):X("",!0)]),_:1},8,["text"]),si(n.$slots,"default",{},void 0,!0),e.closable?(b(),oe(fn,{key:1,class:"ui-panel-header__close",size:"sm",label:e.closeLabel??p(t)("common.close"),tooltip:e.closeLabel??p(t)("common.close"),onClick:i[0]||(i[0]=o=>n.$emit("close"))},{default:ie(()=>[V(ve,{name:e.closeIcon,size:"sm"},null,8,["name"])]),_:1},8,["label","tooltip"])):X("",!0)],2))}}),I9=kt(W8e,[["__scopeId","data-v-3f73fde3"]]),q8e=["disabled","aria-pressed"],V8e=Xe({__name:"Pill",props:{clickable:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean},ariaPressed:{type:Boolean}},emits:["click"],setup(e){return(t,n)=>e.clickable?(b(),I("button",{key:0,class:De(["ui-pill",{"is-active":e.active}]),type:"button",disabled:e.disabled,"aria-pressed":e.ariaPressed,onClick:n[0]||(n[0]=i=>t.$emit("click",i))},[si(t.$slots,"default",{},void 0,!0)],10,q8e)):(b(),I("span",{key:1,class:De(["ui-pill",{"is-active":e.active}])},[si(t.$slots,"default",{},void 0,!0)],2))}}),yX=kt(V8e,[["__scopeId","data-v-827de660"]]),U8e=Xe({__name:"ScrollArea",props:{orientation:{default:"vertical"},hideDelay:{default:600},overscroll:{default:"contain"}},setup(e,{expose:t}){const n=e,i=Z(null),o=Z(null),s=Z(!1),r=Z({overflow:!1,size:0,offset:0}),a=Z({overflow:!1,size:0,offset:0}),l=Z(null);let c=null,u=null,d=null;const f=R(()=>({overflowX:n.orientation==="vertical"?"hidden":"auto",overflowY:n.orientation==="horizontal"?"hidden":"auto",overscrollBehavior:n.overscroll})),h=R(()=>({height:`${r.value.size}px`,transform:`translateY(${r.value.offset}px)`})),m=R(()=>({width:`${a.value.size}px`,transform:`translateX(${a.value.offset}px)`}));function g(E,L,P,N){if(!(L>E+1)||E<=0)return{overflow:!1,size:0,offset:0};const F=Math.max(0,E-N*2),B=Math.min(F,Math.max(24,F*E/L)),W=Math.max(0,F-B),D=Math.max(1,L-E);return{overflow:!0,size:B,offset:W*P/D}}function y(){const E=o.value;if(!E)return 2;const L=Number.parseFloat(getComputedStyle(E).getPropertyValue("--ui-scroll-area-track-inset"));return Number.isFinite(L)?L:2}function v(){const E=o.value;if(!E)return;const L=y(),P=g(E.clientHeight,E.scrollHeight,E.scrollTop,L),N=g(E.clientWidth,E.scrollWidth,E.scrollLeft,L);(P.overflow!==r.value.overflow||P.size!==r.value.size||P.offset!==r.value.offset)&&(r.value=P),(N.overflow!==a.value.overflow||N.size!==a.value.size||N.offset!==a.value.offset)&&(a.value=N)}function k(){c!==null&&clearTimeout(c),c=null}function w(){k(),s.value=!0}function C(){k(),!(l.value||i.value?.matches(":hover, :focus-within"))&&(c=setTimeout(()=>{s.value=!1,c=null},n.hideDelay))}function x(){v(),w(),C()}function S(E,L){const P=o.value;P&&(L.preventDefault(),w(),l.value={axis:E,pointerId:L.pointerId,startPointer:E==="vertical"?L.clientY:L.clientX,startScroll:E==="vertical"?P.scrollTop:P.scrollLeft},L.currentTarget.setPointerCapture(L.pointerId))}function M(E){const L=l.value,P=o.value;if(!L||L.pointerId!==E.pointerId||!P)return;const N=L.axis==="vertical"?E.clientY:E.clientX,U=L.axis==="vertical"?P.clientHeight:P.clientWidth,F=L.axis==="vertical"?P.scrollHeight:P.scrollWidth,B=L.axis==="vertical"?r.value.size:a.value.size,W=Math.max(1,U-y()*2-B),D=(N-L.startPointer)*(F-U)/W;L.axis==="vertical"?P.scrollTop=L.startScroll+D:P.scrollLeft=L.startScroll+D}function _(E){!l.value||l.value.pointerId!==E.pointerId||(l.value=null,C())}function T(){const E=o.value;if(!(!E||!u))for(const L of E.children)u.observe(L)}return Pn(async()=>{await bt();const E=o.value;E&&(u=new ResizeObserver(v),u.observe(E),T(),d=new MutationObserver(()=>{T(),v()}),d.observe(E,{childList:!0,subtree:!0,characterData:!0}),v())}),ki(()=>{k(),u?.disconnect(),d?.disconnect()}),t({viewport:o,updateMetrics:v}),(E,L)=>(b(),I("div",{ref_key:"root",ref:i,class:"ui-scroll-area",onPointerenter:w,onPointerleave:C,onFocusin:w,onFocusout:C},[A("div",{ref_key:"viewport",ref:o,class:"ui-scroll-area__viewport",style:nn(f.value),tabindex:"0",onScroll:x},[si(E.$slots,"default",{},void 0,!0)],36),r.value.overflow&&n.orientation!=="horizontal"?(b(),I("div",{key:0,class:De(["ui-scroll-area__bar ui-scroll-area__bar--vertical",{"is-visible":s.value}]),"aria-hidden":"true"},[A("span",{class:"ui-scroll-area__thumb",style:nn(h.value),onPointerdown:L[0]||(L[0]=P=>S("vertical",P)),onPointermove:M,onPointerup:_,onPointercancel:_},null,36)],2)):X("",!0),a.value.overflow&&n.orientation!=="vertical"?(b(),I("div",{key:1,class:De(["ui-scroll-area__bar ui-scroll-area__bar--horizontal",{"is-visible":s.value}]),"aria-hidden":"true"},[A("span",{class:"ui-scroll-area__thumb",style:nn(m.value),onPointerdown:L[1]||(L[1]=P=>S("horizontal",P)),onPointermove:M,onPointerup:_,onPointercancel:_},null,36)],2)):X("",!0)],544))}}),T9=kt(U8e,[["__scopeId","data-v-657c8668"]]),K8e=["data-icon","aria-selected","disabled","onClick"],Z8e=Xe({__name:"SegmentedControl",props:{modelValue:{},options:{},size:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(i,o)=>(b(),I("div",{class:De(["ui-seg",[`ui-seg--${e.size??"md"}`,{"ui-seg--disabled":e.disabled}]]),role:"tablist"},[(b(!0),I(_e,null,yt(e.options,s=>(b(),I("button",{key:s.value,class:De(["ui-seg__item",{"is-on":s.value===e.modelValue}]),"data-icon":s.icon,type:"button",role:"tab","aria-selected":s.value===e.modelValue,disabled:e.disabled,onClick:r=>n("update:modelValue",s.value)},[s.icon?(b(),oe(ve,{key:0,class:"ui-seg__icon",name:s.icon,size:"sm"},null,8,["name"])):X("",!0),s.swatch?(b(),I("span",{key:1,class:"ui-seg__swatch",style:nn({backgroundColor:s.swatch})},null,4)):X("",!0),Be(" "+O(s.label),1)],10,K8e))),128))],2))}}),Ur=kt(Z8e,[["__scopeId","data-v-d1055351"]]);function G8e(e){const{anchor:t,menuHeight:n,viewportWidth:i,viewportHeight:o,gap:s,margin:r}=e,a=o-r-(t.bottom+s),l=t.top-s-r,c=aa,u=c?l:a,d=Math.min(t.width,Math.max(0,i-2*r)),f=Math.min(Math.max(t.left,r),Math.max(r,i-r-d)),h={left:`${Math.round(f)}px`,width:`${Math.round(d)}px`};return un.options.findIndex(J=>String(J.value)===String(n.modelValue??""))),C=R(()=>n.options[w.value]),x=R(()=>C.value?.label??n.placeholder);function S(J,q){l.value[q]=J instanceof HTMLElement?J:null}function M(){const J=a.value,q=l.value[u.value];!J||!q||(J.scrollTop=q.offsetTop-(J.clientHeight-q.offsetHeight)/2)}function _(){const J=r.value,q=a.value;if(!J||!q)return;q.style.maxHeight="";const Y=J.getBoundingClientRect();f.value=G8e({anchor:Y,menuHeight:q.offsetHeight,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,gap:y,margin:v}).style}function T(){n.disabled||c.value||(c.value=!0,u.value=w.value>=0?w.value:n.options.findIndex(J=>!J.disabled),y=k("--space-1",az),v=k("--space-2",lz),G(),bt(()=>{_(),bt(M)}))}function E({restoreFocus:J=!1}={}){c.value&&(c.value=!1,te(),J&&bt(()=>r.value?.focus()))}function L(){c.value?E():T()}function P(J){J.disabled||(String(J.value)!==String(n.modelValue??"")&&i("update:modelValue",J.value),E({restoreFocus:!0}))}function N(J){if(c.value||T(),n.options.length===0)return;let q=u.value;for(let Y=0;YY.disabled?-1:ae).filter(Y=>Y>=0);u.value=J.key==="Home"?q[0]??-1:q.at(-1)??-1,bt(M)}}function F(J){m=c.value;const q=J.target;s.value?.contains(q)||a.value?.contains(q)||E()}function B(){const J=g;m=!1,g=!1,te(),J&&c.value&&r.value?.focus()}function W(){g=!0}function D(J){const q=J.relatedTarget;q instanceof Node&&(s.value?.contains(q)||a.value?.contains(q))||requestAnimationFrame(()=>{if(!c.value||g)return;const Y=document.activeElement;Y&&(s.value?.contains(Y)||a.value?.contains(Y))||E()})}function z(J){c.value&&(a.value?.contains(J.target)||_())}function $(){c.value&&_()}Fe(()=>n.options.length,()=>{c.value&&bt(_)});function j(J){(J.type==="touchmove"?c.value||m:c.value)&&Q8e(J.target,a.value)&&J.preventDefault()}function G(){h||(h=!0,document.addEventListener("wheel",j,{capture:!0,passive:!1}),document.addEventListener("touchmove",j,{capture:!0,passive:!1}))}function K(){h&&(h=!1,document.removeEventListener("wheel",j,{capture:!0}),document.removeEventListener("touchmove",j,{capture:!0}))}function te(){c.value||m||K()}return Pn(()=>{document.addEventListener("pointerdown",F,{passive:!0}),document.addEventListener("pointerup",B,{passive:!0}),document.addEventListener("pointercancel",B,{passive:!0}),document.addEventListener("scroll",z,!0),window.addEventListener("resize",$)}),Xn(()=>{m=!1,K(),document.removeEventListener("pointerdown",F),document.removeEventListener("pointerup",B),document.removeEventListener("pointercancel",B),document.removeEventListener("scroll",z,!0),window.removeEventListener("resize",$)}),(J,q)=>(b(),I("div",{ref_key:"rootRef",ref:s,class:De(["ui-select",[`ui-select--${e.size}`,{"has-error":e.error,"is-open":c.value,"is-disabled":e.disabled}]])},[A("button",Ni({ref_key:"triggerRef",ref:r},p(o),{class:"ui-select__trigger",type:"button",role:"combobox","aria-controls":d,"aria-expanded":c.value,"aria-haspopup":"listbox",disabled:e.disabled,onClick:L,onKeydown:U,onFocusout:D}),[A("span",{class:De(["ui-select__value",{"is-placeholder":!C.value}])},[C.value?.icon?(b(),I("img",{key:0,class:"ui-select__icon",src:C.value.icon,alt:""},null,8,J8e)):X("",!0),A("span",X8e,O(x.value),1)],2),V(ve,{class:"ui-select__chevron",name:"chevron-down",size:"sm"})],16,Y8e),(b(),oe(_s,{to:"body"},[c.value?(b(),I("div",{key:0,id:d,ref_key:"listRef",ref:a,class:"ui-select__menu",style:nn(f.value),role:"listbox",onPointerdown:W,onFocusout:D},[(b(!0),I(_e,null,yt(e.options,(Y,ae)=>(b(),I(_e,{key:`${Y.group??""}:${Y.value}`},[Y.group&&Y.group!==e.options[ae-1]?.group?(b(),I("div",eke,O(Y.group),1)):X("",!0),A("button",{ref_for:!0,ref:pe=>S(pe,ae),class:De(["ui-select__option",{"is-selected":ae===w.value,"is-active":ae===u.value}]),type:"button",role:"option","aria-selected":ae===w.value,disabled:Y.disabled,onMouseenter:pe=>u.value=ae,onClick:pe=>P(Y)},[V(ve,{class:"ui-select__check",name:"check",size:"sm"}),Y.icon?(b(),I("img",{key:0,class:"ui-select__icon ui-select__icon--option",src:Y.icon,alt:""},null,8,nke)):X("",!0),A("span",null,O(Y.label),1)],42,tke)],64))),128))],36)):X("",!0)]))],2))}}),_T=kt(ike,[["__scopeId","data-v-e6b12a18"]]),oke=Xe({__name:"Skeleton",props:{width:{},height:{},circle:{type:Boolean}},setup(e){return(t,n)=>(b(),I("span",{class:De(["ui-skeleton",{"is-circle":e.circle}]),style:nn({width:e.width??"100%",height:e.height??"12px"}),"aria-hidden":"true"},null,6))}}),ske=kt(oke,[["__scopeId","data-v-861ece71"]]),rke=Xe({__name:"StatusDot",props:{status:{}},setup(e){const t=e;function n(o){switch(o){case"ok":case"done":case"completed":case"success":return"ok";case"error":case"failed":case"fail":case"danger":return"error";case"running":case"run":case"working":case"in_progress":case"active":return"running";case"suspended":return"suspended";default:return"idle"}}const i=R(()=>n(t.status));return(o,s)=>(b(),I("span",{class:De(["kw-dot",`kw-dot--${i.value}`]),"aria-hidden":"true"},null,2))}}),hh=kt(rke,[["__scopeId","data-v-ddf97fc4"]]),ake=["aria-checked","aria-label","disabled"],lke=Xe({__name:"Switch",props:{modelValue:{type:Boolean},disabled:{type:Boolean},label:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(i,o)=>(b(),I("button",{class:De(["ui-switch",{"is-on":e.modelValue}]),type:"button",role:"switch","aria-checked":e.modelValue,"aria-label":e.label,disabled:e.disabled,onClick:o[0]||(o[0]=s=>n("update:modelValue",!e.modelValue))},[...o[1]||(o[1]=[A("span",{class:"ui-switch__thumb"},null,-1)])],10,ake))}}),dc=kt(lke,[["__scopeId","data-v-3cf7b836"]]),cke=["value","rows","placeholder","disabled","readonly"],uke=Xe({__name:"Textarea",props:{modelValue:{},rows:{default:3},autosize:{type:Boolean},size:{default:"md"},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},error:{type:Boolean},resize:{type:Boolean,default:!0}},emits:["update:modelValue","focus","blur"],setup(e,{expose:t,emit:n}){const i=e,o=n;function s(u){o("update:modelValue",u.target.value),i.autosize&&a()}const r=Z(null);function a(){const u=r.value;!i.autosize||!u||(u.style.height="auto",u.style.height=`${u.scrollHeight+u.offsetHeight-u.clientHeight}px`)}let l,c=0;return Fe(()=>[i.modelValue,i.autosize],()=>void bt(a)),Pn(()=>{r.value&&(l=new ResizeObserver(u=>{const d=u[0]?.contentRect.width??0;d!==c&&(c=d,a())}),l.observe(r.value),document.fonts?.ready.then(a),a())}),Xn(()=>l?.disconnect()),t({el:r}),(u,d)=>(b(),I("textarea",{ref_key:"textareaRef",ref:r,class:De(["ui-textarea",[{"has-error":e.error,"no-resize":!e.resize||e.autosize,"is-autosize":e.autosize},`ui-textarea--${e.size}`]]),value:e.modelValue,rows:e.rows,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,onInput:s,onFocus:d[0]||(d[0]=f=>u.$emit("focus",f)),onBlur:d[1]||(d[1]=f=>u.$emit("blur",f))},null,42,cke))}}),bX=kt(uke,[["__scopeId","data-v-a08469a1"]]),dke={class:"ui-toast__icon","aria-hidden":"true"},fke={class:"ui-toast__body"},hke={class:"ui-toast__title"},pke={key:0,class:"ui-toast__msg"},mke=Xe({__name:"Toast",props:{variant:{default:"info"},title:{},message:{},dismissLabel:{}},emits:["dismiss"],setup(e){const{t}=_m();return(n,i)=>(b(),I("div",{class:De(["ui-toast",`ui-toast--${e.variant}`])},[A("span",dke,[si(n.$slots,"icon",{},()=>[e.variant==="success"?(b(),oe(ve,{key:0,name:"check"})):e.variant==="danger"?(b(),oe(ve,{key:1,name:"close"})):e.variant==="warning"?(b(),oe(ve,{key:2,name:"alert-triangle"})):(b(),oe(ve,{key:3,name:"info"}))],!0)]),A("div",fke,[A("div",hke,O(e.title),1),e.message?(b(),I("div",pke,O(e.message),1)):X("",!0),si(n.$slots,"default",{},void 0,!0)]),V(fn,{class:"ui-toast__close",size:"sm",label:e.dismissLabel??p(t)("common.dismiss"),tooltip:e.dismissLabel??p(t)("common.dismiss"),onClick:i[0]||(i[0]=o=>n.$emit("dismiss"))},{default:ie(()=>[V(ve,{name:"close",size:"sm"})]),_:1},8,["label","tooltip"])],2))}}),gke=kt(mke,[["__scopeId","data-v-ed19c769"]]),vke=100;function Hc(){let e=!1,t=0;function n(){e=!0,t=0}function i(){e=!1,t=Date.now()}function o(){e=!1,t=0}function s(r){return e||r.isComposing||r.keyCode===229||Date.now()-t{typeof window<"u"&&(window.removeEventListener("focusin",o,!0),window.removeEventListener("focusout",o,!0))}),{handleCompositionStart:n,handleCompositionEnd:i,resetComposition:o,isComposingKeyEvent:s}}function yke(e,t,n,i){if(!["ArrowDown","ArrowUp","Home","End","Tab"].includes(e))return null;if(i===0)return-1;if(e==="Home")return 0;if(e==="End")return i-1;const o=e==="ArrowUp"||e==="Tab"&&t?-1:1;return n<0?o===-1?i-1:0:(n+o+i)%i}const bke=/^[0-9a-z]{1,64}$/,kke=/^data:image\/(?:jpeg|png|webp);base64,/,wke=512*1024;function BR(e){return typeof e=="string"&&e.length<=wke&&kke.test(e)?e:void 0}function Cke(e){if(e===null||typeof e!="object"||Array.isArray(e))return;const t=e,n=i=>typeof i=="string"&&i.length>0&&i.length<=1024&&!/[\s/\\\0]/.test(i)&&i!=="."&&i!=="..";return n(t.sessionId)&&n(t.fileId)?{sessionId:t.sessionId,fileId:t.fileId}:void 0}function kX(e,t){if(typeof e!="object"||e===null)return null;const n=e;if(typeof n.attId!="string"||t==="clipboard"&&!bke.test(n.attId)||typeof n.key!="string"||typeof n.name!="string"||n.kind!=="file"&&n.kind!=="folder"&&n.kind!=="image"&&n.kind!=="video")return null;const i=n.uploading===!0,o=n.mediaOrdinal??n.mentionOrdinal;return{attId:n.attId,key:n.key,kind:n.kind,name:n.name,mediaOrdinal:typeof o=="number"&&Number.isInteger(o)&&o>0?o:void 0,size:typeof n.size=="number"?n.size:void 0,mediaType:typeof n.mediaType=="string"?n.mediaType:void 0,lastModified:typeof n.lastModified=="number"?n.lastModified:void 0,path:typeof n.path=="string"?n.path:void 0,refCount:t==="draft"&&typeof n.refCount=="number"?n.refCount:0,uploading:!1,fileId:typeof n.fileId=="string"?n.fileId:void 0,sessionId:typeof n.sessionId=="string"?n.sessionId:void 0,error:typeof n.error=="string"?n.error:i?"upload-interrupted":void 0,thumbnailUrl:BR(n.thumbnailUrl),remoteSource:Cke(n.remoteSource),purpose:n.purpose==="browser-screenshot"?"browser-screenshot":void 0,browserAssetId:typeof n.browserAssetId=="string"&&/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,127}$/.test(n.browserAssetId)?n.browserAssetId:void 0}}function wX(e){return kX(e,"draft")}function Ake(e){return kX(e,"clipboard")}function Y1(){let e="";for(let t=0;t<8;t++)e+=Math.floor(Math.random()*36).toString(36);return e}function zR(e){let t=e.replace(/\\/g,"/"),n="";/^[a-zA-Z]:\//.test(t)?(n=t.slice(0,3),t=t.slice(3)):t.startsWith("//")?(n="//",t=t.slice(2)):t.startsWith("/")&&(n="/",t=t.slice(1));const i=[];for(const o of t.split("/"))if(!(o===""||o===".")){if(o===".."){i.length>0&&i[i.length-1]!==".."?i.pop():n===""&&i.push("..");continue}i.push(o)}return n+i.join("/")}function T6(e){if(!e.path)return`blob:${e.attId}`;const t=zR(e.path);return`file://${e.kind==="folder"?`${t}/`:t}`}function G7(e){if(e.previewUrl===void 0&&e.uploadProgress===void 0)return e;const{previewUrl:t,uploadProgress:n,...i}=e;return i}function H8(e,t){return e.kind==="folder"?!0:e.uploading||e.error!==void 0||e.fileId===void 0?!1:e.sessionId===void 0||e.sessionId===t||t===void 0}function ph(e){return e==="image"||e==="video"}function O2(e){return e!==void 0&&Number.isInteger(e)&&e>0}function M9(e,t){return{...e,mediaOrdinal:t}}function HR(e){let t=0;for(const n of e)n.purpose!=="browser-screenshot"&&ph(n.kind)&&O2(n.mediaOrdinal)&&(t=Math.max(t,n.mediaOrdinal));return t+1}function CX(e,t){if(!ph(e.kind)||e.purpose==="browser-screenshot")return e;const n=t.some(i=>i.attId!==e.attId&&ph(i.kind)&&i.mediaOrdinal===e.mediaOrdinal);return O2(e.mediaOrdinal)&&!n?e:M9(e,HR(t))}function cz(e,t){return!ph(e.kind)||e.purpose==="browser-screenshot"?e:M9(e,HR(t))}function uz(e){const t=new Map;let n=1;for(const i of e)!ph(i.kind)||i.purpose==="browser-screenshot"||!O2(i.mediaOrdinal)||(t.has(i.mediaOrdinal)||t.set(i.mediaOrdinal,i.attId),n=Math.max(n,i.mediaOrdinal+1));return e.map(i=>{if(!ph(i.kind)||i.purpose==="browser-screenshot"||O2(i.mediaOrdinal)&&t.get(i.mediaOrdinal)===i.attId)return i;const o=n;return n+=1,M9(i,o)})}function xke(e,t){const n=new Map(e.map(a=>[a.attId,a])),i=t.filter(a=>{const l=n.get(a);return l!==void 0&&l.purpose!=="browser-screenshot"&&ph(l.kind)}),o=new Map(i.map((a,l)=>[a,l+1])),s=new Set(o.values());let r=i.length+1;return e.map(a=>{if(!ph(a.kind)||a.purpose==="browser-screenshot")return a;const l=o.get(a.attId);if(l!==void 0)return M9(a,l);if(O2(a.mediaOrdinal)&&!s.has(a.mediaOrdinal))return s.add(a.mediaOrdinal),a;for(;s.has(r);)r+=1;const c=r;return s.add(c),r+=1,M9(a,c)})}function AX(e,t){return e.purpose!=="browser-screenshot"&&ph(e.kind)&&O2(e.mediaOrdinal)?`${t[e.kind]} ${e.mediaOrdinal}`:e.name}function dz(e){if(e===void 0)return;const t=new Map(e.map(n=>[n.attId,n.kind]));return n=>t.get(n)}function fz(e,t,n){let i;if(n!==void 0)e.insertTextAt(n," "),i=n;else{const a=e.getText();i=a.length,i>0&&!/\s/.test(a.charAt(i-1))&&(e.insertTextAt(i," "),i+=1)}const o=Y1(),s=CX({attId:o,key:T6({kind:t.kind,attId:o}),kind:t.kind,name:t.name,size:t.size,mediaType:t.mediaType,refCount:0,uploading:t.uploading},e.getAttachmentEntries()),r=s.mediaOrdinal!==void 0&&t.mediaName!==void 0?t.mediaName(s.mediaOrdinal):t.name;return e.insertAttachment({attId:o,name:r,kind:t.kind},i),t.fileId!==void 0&&(s.fileId=t.fileId),t.sessionId!==void 0&&(s.sessionId=t.sessionId),t.error!==void 0&&(s.error=t.error),e.upsertAttachmentEntry(s),o}var xX=Symbol.for("immer-nothing"),hz=Symbol.for("immer-draftable"),Ki=Symbol.for("immer-state");function ru(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ac=Object,F2=Ac.getPrototypeOf,M6="constructor",Q7="prototype",IT="configurable",E6="enumerable",j8="writable",E9="value",J1=e=>!!e&&!!e[Ki];function Su(e){return e?SX(e)||Y7(e)||!!e[hz]||!!e[M6]?.[hz]||J7(e)||X7(e):!1}var Ske=Ac[Q7][M6].toString(),pz=new WeakMap;function SX(e){if(!e||!eC(e))return!1;const t=F2(e);if(t===null||t===Ac[Q7])return!0;const n=Ac.hasOwnProperty.call(t,M6)&&t[M6];if(n===Object)return!0;if(!Sg(n))return!1;let i=pz.get(n);return i===void 0&&(i=Function.toString.call(n),pz.set(n,i)),i===Ske}function H3(e,t,n=!0){j3(e)===0?(n?Reflect.ownKeys(e):Ac.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((i,o)=>t(o,i,e))}function j3(e){const t=e[Ki];return t?t.type_:Y7(e)?1:J7(e)?2:X7(e)?3:0}var Sx=(e,t,n=j3(e))=>n===2?e.has(t):Ac[Q7].hasOwnProperty.call(e,t),TT=(e,t,n=j3(e))=>n===2?e.get(t):e[t],L6=(e,t,n,i=j3(e))=>{i===2?e.set(t,n):i===3?e.add(n):e[t]=n};function _ke(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Y7=Array.isArray,J7=e=>e instanceof Map,X7=e=>e instanceof Set,eC=e=>typeof e=="object",Sg=e=>typeof e=="function",_x=e=>typeof e=="boolean";function Ike(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Tke=e=>eC(e)?e?.[Ki]:null,Tr=e=>e.copy_||e.base_,Mke=e=>{const t=Tke(e);return t?tC(t):e},tC=e=>e.modified_?e.copy_:e.base_;function MT(e,t){if(J7(e))return new Map(e);if(X7(e))return new Set(e);if(Y7(e))return Array[Q7].slice.call(e);const n=SX(e);if(t===!0||t==="class_only"&&!n){const i=Ac.getOwnPropertyDescriptors(e);delete i[Ki];let o=Reflect.ownKeys(i);for(let s=0;s1&&Ac.defineProperties(e,{set:g5,add:g5,clear:g5,delete:g5}),Ac.freeze(e),t&&H3(e,(n,i)=>{sh(i,!0)},!1)),e}function Eke(){ru(2)}var g5={[E9]:Eke};function nC(e){return e===null||!eC(e)?!0:Ac.isFrozen(e)}var L9="MapSet",ET="Patches",mz="ArrayMethods",R6={};function rm(e){const t=R6[e];return t||ru(0,e),t}var gz=e=>!!R6[e];function Lke(e,t){R6[e]||(R6[e]=t)}var R9,P6=()=>R9,Rke=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:gz(L9)?rm(L9):void 0,arrayMethodsPlugin_:gz(mz)?rm(mz):void 0});function vz(e,t){t&&(e.patchPlugin_=rm(ET),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function LT(e){RT(e),e.drafts_.forEach(Pke),e.drafts_=null}function RT(e){e===R9&&(R9=e.parent_)}var yz=e=>R9=Rke(R9,e);function Pke(e){const t=e[Ki];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function bz(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[Ki].modified_&&(LT(t),ru(4)),Su(e)&&(e=kz(t,e));const{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(n[Ki].base_,e,t)}else e=kz(t,n);return $ke(t,e,!0),LT(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==xX?e:void 0}function kz(e,t){if(nC(t))return t;const n=t[Ki];if(!n)return $6(t,e.handledSet_,e);if(!iC(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:i}=n;if(i)for(;i.length>0;)i.pop()(e);TX(n,e)}return n.copy_}function $ke(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&sh(t,n)}function _X(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var iC=(e,t)=>e.scope_===t,Oke=[];function IX(e,t,n,i){const o=Tr(e),s=e.type_;if(i!==void 0&&TT(o,i,s)===t){L6(o,i,n,s);return}if(!e.draftLocations_){const a=e.draftLocations_=new Map;H3(o,(l,c)=>{if(J1(c)){const u=a.get(c)||[];u.push(l),a.set(c,u)}})}const r=e.draftLocations_.get(t)??Oke;for(const a of r)L6(o,a,n,s)}function Fke(e,t,n){e.callbacks_.push(function(o){const s=t;if(!s||!iC(s,o))return;o.mapSetPlugin_?.fixSetContents(s);const r=tC(s);IX(e,s.draft_??s,r,n),TX(s,o)})}function TX(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:i}=t;if(i){const o=i.getPath(e);o&&i.generatePatches_(e,o,t)}_X(e)}}function PT(e,t,n){const{scope_:i}=e;if(J1(n)){const o=n[Ki];iC(o,i)&&o.callbacks_.push(function(){W8(e);const r=tC(o);IX(e,n,r,t)})}else Su(n)&&e.callbacks_.push(function(){const s=Tr(e);e.type_===3?s.has(n)&&$6(n,i.handledSet_,i):TT(s,t,e.type_)===n&&i.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&$6(TT(e.copy_,t,e.type_),i.handledSet_,i)})}function $6(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||J1(e)||t.has(e)||!Su(e)||nC(e)||(t.add(e),H3(e,(i,o)=>{if(J1(o)){const s=o[Ki];if(iC(s,n)){const r=tC(s);L6(e,i,r,e.type_),_X(s)}}else Su(o)&&$6(o,t,n)})),e}function Dke(e,t){const n=Y7(e),i={type_:n?1:0,scope_:t?t.scope_:P6(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let o=i,s=O6;n&&(o=[i],s=P9);const{revoke:r,proxy:a}=Proxy.revocable(o,s);return i.draft_=a,i.revoke_=r,[a,i]}var O6={get(e,t){if(t===Ki)return e;let n=e.scope_.arrayMethodsPlugin_;const i=e.type_===1&&typeof t=="string";if(i&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const o=Tr(e);if(!Sx(o,t,e.type_))return Bke(e,o,t);const s=o[t];if(e.finalized_||!Su(s)||i&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Ike(t))return s;if(s===Ix(e.base_,t)||Nke(e,t,s)){W8(e);const r=e.type_===1?+t:t,a=$9(e.scope_,s,e,r);return e.copy_[r]=a}return s},has(e,t){return t in Tr(e)},ownKeys(e){return Reflect.ownKeys(Tr(e))},set(e,t,n){const i=MX(Tr(e),t);if(i?.set)return i.set.call(e.draft_,n),!0;if(!e.modified_){const o=Ix(Tr(e),t),s=o?.[Ki];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(_ke(n,o)&&(n!==void 0||Sx(e.base_,t,e.type_)))return!0;W8(e),Df(e)}return e.copy_[t]===n&&(n!==void 0||Sx(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),PT(e,t,n)),!0},deleteProperty(e,t){return W8(e),Ix(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Df(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Tr(e),i=Reflect.getOwnPropertyDescriptor(n,t);return i&&{[j8]:!0,[IT]:e.type_!==1||t!=="length",[E6]:i[E6],[E9]:n[t]}},defineProperty(){ru(11)},getPrototypeOf(e){return F2(e.base_)},setPrototypeOf(){ru(12)}},P9={};for(let e in O6){let t=O6[e];P9[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}P9.deleteProperty=function(e,t){return P9.set.call(this,e,t,void 0)};P9.set=function(e,t,n){return O6.set.call(this,e[0],t,n,e[0])};function Ix(e,t){const n=e[Ki];return(n?Tr(n):e)[t]}function Nke(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!Su(n)||n[Ki]?!1:e.baseRefs_.has(n)}function Bke(e,t,n){const i=MX(t,n);return i?E9 in i?i[E9]:i.get?.call(e.draft_):void 0}function MX(e,t){if(!(t in e))return;let n=F2(e);for(;n;){const i=Object.getOwnPropertyDescriptor(n,t);if(i)return i;n=F2(n)}}function Df(e){e.modified_||(e.modified_=!0,e.parent_&&Df(e.parent_))}function W8(e){e.copy_||(e.assigned_=new Map,e.copy_=MT(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var zke=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,n,i)=>{if(Sg(t)&&!Sg(n)){const s=n;n=t;const r=this;return function(l=s,...c){return r.produce(l,u=>n.call(this,u,...c))}}Sg(n)||ru(6),i!==void 0&&!Sg(i)&&ru(7);let o;if(Su(t)){const s=yz(this),r=$9(s,t,void 0);let a=!0;try{o=n(r),a=!1}finally{a?LT(s):RT(s)}return vz(s,i),bz(o,s)}else if(!t||!eC(t)){if(o=n(t),o===void 0&&(o=t),o===xX&&(o=void 0),this.autoFreeze_&&sh(o,!0),i){const s=[],r=[];rm(ET).generateReplacementPatches_(t,o,{patches_:s,inversePatches_:r}),i(s,r)}return o}else ru(1,t)},this.produceWithPatches=(t,n)=>{if(Sg(t))return(r,...a)=>this.produceWithPatches(r,l=>t(l,...a));let i,o;return[this.produce(t,n,(r,a)=>{i=r,o=a}),i,o]},_x(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),_x(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),_x(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Su(e)||ru(8),J1(e)&&(e=Hke(e));const t=yz(this),n=$9(t,e,void 0);return n[Ki].isManual_=!0,RT(t),n}finishDraft(e,t){const n=e&&e[Ki];(!n||!n.isManual_)&&ru(9);const{scope_:i}=n;return vz(i,t),bz(void 0,i)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const i=rm(ET).applyPatches_;return J1(e)?i(e,t):this.produce(e,o=>i(o,t))}};function $9(e,t,n,i){const[o,s]=J7(t)?rm(L9).proxyMap_(t,n):X7(t)?rm(L9).proxySet_(t,n):Dke(t,n);return(n?.scope_??P6()).drafts_.push(o),s.callbacks_=n?.callbacks_??[],s.key_=i,n&&i!==void 0?Fke(n,s,i):s.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(s);const{patchPlugin_:c}=l;s.modified_&&c&&c.generatePatches_(s,[],l)}),o}function Hke(e){return J1(e)||ru(10,e),EX(e)}function EX(e){if(!Su(e)||nC(e))return e;const t=e[Ki];let n,i=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=MT(e,t.scope_.immer_.useStrictShallowCopy_),i=t.scope_.immer_.shouldUseStrictIteration()}else n=MT(e,!0);return H3(n,(o,s)=>{L6(n,o,EX(s))},i),t&&(t.finalized_=!1),n}var LX=globalThis.Iterator,jke=typeof LX?.from=="function";function Wke(){class e extends Map{constructor(u,d){super(),this[Ki]={type_:2,parent_:d,scope_:d?d.scope_:P6(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:u,draft_:this,isManual_:!1,revoked_:!1,callbacks_:[]}}get size(){return Tr(this[Ki]).size}has(u){return Tr(this[Ki]).has(u)}set(u,d){const f=this[Ki];return a(f),(!Tr(f).has(u)||Tr(f).get(u)!==d)&&(i(f),Df(f),f.assigned_.set(u,!0),f.copy_.set(u,d),f.assigned_.set(u,!0),PT(f,u,d)),this}delete(u){if(!this.has(u))return!1;const d=this[Ki];return a(d),i(d),Df(d),d.base_.has(u)?d.assigned_.set(u,!1):d.assigned_.delete(u),d.copy_.delete(u),!0}clear(){const u=this[Ki];a(u),Tr(u).size&&(i(u),Df(u),u.assigned_=new Map,H3(u.base_,d=>{u.assigned_.set(d,!1)}),u.copy_.clear())}forEach(u,d){const f=this[Ki];Tr(f).forEach((h,m,g)=>{u.call(d,this.get(m),m,this)})}get(u){const d=this[Ki];a(d);const f=Tr(d).get(u);if(d.finalized_||!Su(f)||f!==d.base_.get(u))return f;const h=$9(d.scope_,f,d,u);return i(d),d.copy_.set(u,h),h}keys(){return Tr(this[Ki]).keys()}values(){const u=this.keys();return t({next:()=>{const d=u.next();return d.done?d:{done:!1,value:this.get(d.value)}}})}entries(){const u=this.keys();return t({next:()=>{const d=u.next();if(d.done)return d;const f=this.get(d.value);return{done:!1,value:[d.value,f]}}})}[Symbol.iterator](){return this.entries()}}function t(c){if(jke)return LX.from(c);const u={...c,[Symbol.iterator]:()=>u};return u}function n(c,u){const d=new e(c,u);return[d,d[Ki]]}function i(c){c.copy_||(c.assigned_=new Map,c.copy_=new Map(c.base_))}class o extends Set{constructor(u,d){super(),this[Ki]={type_:3,parent_:d,scope_:d?d.scope_:P6(),modified_:!1,finalized_:!1,copy_:void 0,base_:u,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1,assigned_:void 0,callbacks_:[]}}get size(){return Tr(this[Ki]).size}has(u){const d=this[Ki];return a(d),d.copy_?!!(d.copy_.has(u)||d.drafts_.has(u)&&d.copy_.has(d.drafts_.get(u))):d.base_.has(u)}add(u){const d=this[Ki];return a(d),this.has(u)||(r(d),Df(d),d.copy_.add(u),PT(d,u,u)),this}delete(u){if(!this.has(u))return!1;const d=this[Ki];return a(d),r(d),Df(d),d.copy_.delete(u)||(d.drafts_.has(u)?d.copy_.delete(d.drafts_.get(u)):!1)}clear(){const u=this[Ki];a(u),Tr(u).size&&(r(u),Df(u),u.copy_.clear())}values(){const u=this[Ki];return a(u),r(u),u.copy_.values()}entries(){const u=this[Ki];return a(u),r(u),u.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(u,d){const f=this.values();let h=f.next();for(;!h.done;)u.call(d,h.value,h.value,this),h=f.next()}}function s(c,u){const d=new o(c,u);return[d,d[Ki]]}function r(c){c.copy_||(c.copy_=new Set,c.base_.forEach(u=>{if(Su(u)){const d=$9(c.scope_,u,c,u);c.drafts_.set(u,d),c.copy_.add(d)}else c.copy_.add(u)}))}function a(c){c.revoked_&&ru(3,JSON.stringify(Tr(c)))}function l(c){if(c.type_===3&&c.copy_){const u=new Set(c.copy_);c.copy_.clear(),u.forEach(d=>{c.copy_.add(Mke(d))})}}Lke(L9,{proxyMap_:n,proxySet_:s,fixSetContents:l})}var qke=new zke,$T=qke.produce;function ka(e){this.content=e}ka.prototype={constructor:ka,find:function(e){for(var t=0;t>1}};ka.from=function(e){if(e instanceof ka)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new ka(t)};function RX(e,t,n){for(let i=0;;i++){if(i==e.childCount||i==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(i),s=t.child(i);if(o==s){n+=o.nodeSize;continue}if(!o.sameMarkup(s))return n;if(o.isText&&o.text!=s.text){let r=o.text,a=s.text,l=0;for(;r[l]==a[l];l++)n++;return l&&l0&&f>0&&c[d-1]==u[f-1];)d--,f--,n--,i--;return d&&f&&d=56320&&e<57344}function OX(e){return e>=55296&&e<56320}class Mn{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let i=0;it&&i(l,o+a,s||null,r)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,t-u),Math.min(l.content.size,n-u),i,o+u)}a=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,i,o){let s="",r=!0;return this.nodesBetween(t,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(t,l)-l,n-l):a.isLeaf?o?typeof o=="function"?o(a):o:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&i&&(r?r=!1:s+=i),s+=c},0),s}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,i=t.firstChild,o=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(i)&&(o[o.length-1]=n.withText(n.text+i.text),s=1);st)for(let s=0,r=0;rt&&((rn)&&(a.isText?a=a.cut(Math.max(0,t-r),Math.min(a.text.length,n-r)):a=a.cut(Math.max(0,t-r-1),Math.min(a.content.size,n-r-1))),i.push(a),o+=a.nodeSize),r=l}return new Mn(i,o)}cutByIndex(t,n){return t==n?Mn.empty:t==0&&n==this.content.length?this:new Mn(this.content.slice(t,n))}replaceChild(t,n){let i=this.content[t];if(i==n)return this;let o=this.content.slice(),s=this.size+n.nodeSize-i.nodeSize;return o[t]=n,new Mn(o,s)}addToStart(t){return new Mn([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new Mn(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;nthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,i=0;;n++){let o=this.child(n),s=i+o.nodeSize;if(s>=t)return s==t?v5(n+1,s):v5(n,i);i=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return Mn.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return Mn.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return Mn.empty;let n,i=0;for(let o=0;othis.type.rank&&(n||(n=t.slice(0,o)),n.push(this),i=!0),n&&n.push(s)}}return n||(n=t.slice()),i||n.push(this),n}removeFromSet(t){for(let n=0;ni.type.rank-o.type.rank),n}}To.none=[];class O9 extends Error{}class jn{constructor(t,n,i){this.content=t,this.openStart=n,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let i=DX(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return i&&new jn(i,this.openStart,this.openEnd)}removeBetween(t,n){return new jn(FX(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return jn.empty;let i=n.openStart||0,o=n.openEnd||0;if(typeof i!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new jn(Mn.fromJSON(t,n.content),i,o)}static maxOpen(t,n=!0){let i=0,o=0;for(let s=t.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)i++;for(let s=t.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)o++;return new jn(t,i,o)}}jn.empty=new jn(Mn.empty,0,0);function FX(e,t,n){let{index:i,offset:o}=e.findIndex(t),s=e.maybeChild(i),{index:r,offset:a}=e.findIndex(n);if(o==t||s.isText){if(a!=n&&!e.child(r).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(i!=r)throw new RangeError("Removing non-flat range");return e.replaceChild(i,s.copy(FX(s.content,t-o-1,n-o-1)))}function DX(e,t,n,i,o,s){let{index:r,offset:a}=e.findIndex(t),l=e.maybeChild(r);if(a==t||l.isText)return s&&i<=0&&o<=0&&!s.canReplace(r,r,n)?null:e.cut(0,t).append(n).append(e.cut(t));let c=DX(l.content,t-a-1,n,r==0?i-1:0,r==e.childCount-1?o-1:0,l);return c&&e.replaceChild(r,l.copy(c))}function Vke(e,t,n){if(n.openStart>e.depth)throw new O9("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new O9("Inconsistent open depths");return NX(e,t,n,0)}function NX(e,t,n,i){let o=e.index(i),s=e.node(i);if(o==t.index(i)&&i=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function y4(e,t,n,i){let o=(t||e).node(n),s=0,r=t?t.index(n):o.childCount;e&&(s=e.index(n),e.depth>n?s++:e.textOffset&&(W0(e.nodeAfter,i),s++));for(let a=s;ao&&OT(e,t,o+1),r=i.depth>o&&OT(n,i,o+1),a=[];return y4(null,e,o,a),s&&r&&t.index(o)==n.index(o)?(BX(s,r),W0(q0(s,zX(e,t,n,i,o+1)),a)):(s&&W0(q0(s,D6(e,t,o+1)),a),y4(t,n,o,a),r&&W0(q0(r,D6(n,i,o+1)),a)),y4(i,null,o,a),new Mn(a)}function D6(e,t,n){let i=[];if(y4(null,e,n,i),e.depth>n){let o=OT(e,t,n+1);W0(q0(o,D6(e,t,n+1)),i)}return y4(t,null,n,i),new Mn(i)}function Uke(e,t){let n=t.depth-e.openStart,o=t.node(n).copy(e.content);for(let s=n-1;s>=0;s--)o=t.node(s).copy(Mn.from(o));return{start:o.resolveNoCache(e.openStart+n),end:o.resolveNoCache(o.content.size-e.openEnd-n)}}class F9{constructor(t,n,i){this.pos=t,this.path=n,this.parentOffset=i,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let i=this.pos-this.path[this.path.length-1],o=t.child(n);return i?t.child(n).cut(i):o}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let i=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let s=0;s0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos=0;i--)if(t.pos<=this.end(i)&&(!n||n(this.node(i))))return new Gke(this,t,i);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let i=[],o=0,s=n;for(let r=t;;){let{index:a,offset:l}=r.content.findIndex(s),c=s-l;if(i.push(r,a,o+l),!c||(r=r.child(a),r.isText))break;s=c-1,o+=l+1}return new F9(n,i,s)}static resolveCached(t,n){let i=wz.get(t);if(i)for(let s=0;st&&this.nodesBetween(t,n,s=>(i.isInSet(s.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),HX(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,i=Mn.empty,o=0,s=i.childCount){let r=this.contentMatchAt(t).matchFragment(i,o,s),a=r&&r.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=o;ln.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let i;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,i)}let o=Mn.fromJSON(t,n.content),s=t.nodeType(n.type).create(n.attrs,o,i);return s.type.checkAttrs(s.attrs),s}};V0.prototype.text=void 0;class N6 extends V0{constructor(t,n,i,o){if(super(t,n,null,o),!i)throw new RangeError("Empty text nodes are not allowed");this.text=i}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):HX(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new N6(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new N6(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function HX(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class am{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let i=new Yke(t,n);if(i.next==null)return am.empty;let o=jX(i);i.next&&i.err("Unexpected trailing text");let s=o6e(i6e(o));return s6e(s,i),s}matchType(t){for(let n=0;nc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(i){t.push(i);for(let o=0;o{let s=o+(i.validEnd?"*":" ")+" ";for(let r=0;r"+t.indexOf(i.next[r].next);return s}).join(` +`)}}am.empty=new am(!0);class Yke{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function jX(e){let t=[];do t.push(Jke(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function Jke(e){let t=[];do t.push(Xke(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function Xke(e){let t=n6e(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=e6e(e,t);else break;return t}function Cz(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function e6e(e,t){let n=Cz(e),i=n;return e.eat(",")&&(e.next!="}"?i=Cz(e):i=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:i,expr:t}}function t6e(e,t){let n=e.nodeTypes,i=n[t];if(i)return[i];let o=[];for(let s in n){let r=n[s];r.isInGroup(t)&&o.push(r)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function n6e(e){if(e.eat("(")){let t=jX(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=t6e(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function i6e(e){let t=[[]];return o(s(e,0),n()),t;function n(){return t.push([])-1}function i(r,a,l){let c={term:l,to:a};return t[r].push(c),c}function o(r,a){r.forEach(l=>l.to=a)}function s(r,a){if(r.type=="choice")return r.exprs.reduce((l,c)=>l.concat(s(c,a)),[]);if(r.type=="seq")for(let l=0;;l++){let c=s(r.exprs[l],a);if(l==r.exprs.length-1)return c;o(c,a=n())}else if(r.type=="star"){let l=n();return i(a,l),o(s(r.expr,l),l),[i(l)]}else if(r.type=="plus"){let l=n();return o(s(r.expr,a),l),o(s(r.expr,l),l),[i(l)]}else{if(r.type=="opt")return[i(a)].concat(s(r.expr,a));if(r.type=="range"){let l=a;for(let c=0;c{e[r].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u{c||o.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let s=t[i.join(",")]=new am(i.indexOf(e.length-1)>-1);for(let r=0;r-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:VX(this.attrs,t)}create(t=null,n,i){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new V0(this,this.computeAttrs(t),Mn.from(n),To.setFrom(i))}createChecked(t=null,n,i){return n=Mn.from(n),this.checkContent(n),new V0(this,this.computeAttrs(t),n,To.setFrom(i))}createAndFill(t=null,n,i){if(t=this.computeAttrs(t),n=Mn.from(n),n.size){let r=this.contentMatch.fillBefore(n);if(!r)return null;n=r.append(n)}let o=this.contentMatch.matchFragment(n),s=o&&o.fillBefore(Mn.empty,!0);return s?new V0(this,t,n.append(s),To.setFrom(i)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let i=0;i-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;ni[s]=new ZX(s,n,r));let o=n.spec.topNode||"doc";if(!i[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!i.text)throw new RangeError("Every schema needs a 'text' type");for(let s in i.text.attrs)throw new RangeError("The text node type should not have attributes");return i}};function r6e(e,t,n){let i=n.split("|");return o=>{let s=o===null?"null":typeof o;if(i.indexOf(s)<0)throw new RangeError(`Expected value of type ${i} for attribute ${t} on type ${e}, got ${s}`)}}class a6e{constructor(t,n,i){this.hasDefault=Object.prototype.hasOwnProperty.call(i,"default"),this.default=i.default,this.validate=typeof i.validate=="string"?r6e(t,n,i.validate):i.validate}get isRequired(){return!this.hasDefault}}class oC{constructor(t,n,i,o){this.name=t,this.rank=n,this.schema=i,this.spec=o,this.attrs=KX(t,o.attrs),this.excluded=null;let s=qX(this.attrs);this.instance=s?new To(this,s):null}create(t=null){return!t&&this.instance?this.instance:new To(this,VX(this.attrs,t))}static compile(t,n){let i=Object.create(null),o=0;return t.forEach((s,r)=>i[s]=new oC(s,o++,n,r)),i}removeFromSet(t){for(var n=0;n-1}}let l6e=class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=ka.from(t.nodes),n.marks=ka.from(t.marks||{}),this.nodes=xz.compile(this.spec.nodes,this),this.marks=oC.compile(this.spec.marks,this);let i=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let s=this.nodes[o],r=s.spec.content||"",a=s.spec.marks;if(s.contentMatch=i[r]||(i[r]=am.parse(r,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=a=="_"?null:a?Sz(this,a.split(" ")):a==""||!s.inlineContent?[]:null}for(let o in this.marks){let s=this.marks[o],r=s.spec.excludes;s.excluded=r==null?[s]:r==""?[]:Sz(this,r.split(" "))}this.nodeFromJSON=o=>V0.fromJSON(this,o),this.markFromJSON=o=>To.fromJSON(this,o),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,i,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof xz){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,i,o)}text(t,n){let i=this.nodes.text;return new N6(i,i.defaultAttrs,t,To.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}};function Sz(e,t){let n=[];for(let i=0;i-1)&&n.push(r=l)}if(!r)throw new SyntaxError("Unknown mark type: '"+t[i]+"'")}return n}function c6e(e){return e.tag!=null}function u6e(e){return e.style!=null}let GX=class DT{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let i=this.matchedStyles=[];n.forEach(o=>{if(c6e(o))this.tags.push(o);else if(u6e(o)){let s=/[^=]*/.exec(o.style)[0];i.indexOf(s)<0&&i.push(s),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let s=t.nodes[o.node];return s.contentMatch.matchType(s)})}parse(t,n={}){let i=new Iz(this,n,!1);return i.addAll(t,To.none,n.from,n.to),i.finish()}parseSlice(t,n={}){let i=new Iz(this,n,!0);return i.addAll(t,To.none,n.from,n.to),jn.maxOpen(i.finish())}matchTag(t,n,i){for(let o=i?this.tags.indexOf(i)+1:0;ot.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(r.getAttrs){let l=r.getAttrs(n);if(l===!1)continue;r.attrs=l||void 0}return r}}}static schemaRules(t){let n=[];function i(o){let s=o.priority==null?50:o.priority,r=0;for(;r{i(r=Tz(r)),r.mark||r.ignore||r.clearMark||(r.mark=o)})}for(let o in t.nodes){let s=t.nodes[o].spec.parseDOM;s&&s.forEach(r=>{i(r=Tz(r)),r.node||r.ignore||r.mark||(r.node=o)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new DT(t,DT.schemaRules(t)))}};const QX={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},d6e={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},YX={ol:!0,ul:!0},D9=1,NT=2,b4=4;function _z(e,t,n){return t!=null?(t?D9:0)|(t==="full"?NT:0):e&&e.whitespace=="pre"?D9|NT:n&~b4}class y5{constructor(t,n,i,o,s,r){this.type=t,this.attrs=n,this.marks=i,this.solid=o,this.options=r,this.content=[],this.activeMarks=To.none,this.match=s||(r&b4?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Mn.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let i=this.type.contentMatch,o;return(o=i.findWrapping(t.type))?(this.match=i,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&D9)){let i=this.content[this.content.length-1],o;if(i&&i.isText&&(o=/[ \t\r\n\u000c]+$/.exec(i.text))){let s=i;i.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-o[0].length))}}let n=Mn.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(Mn.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!QX.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class Iz{constructor(t,n,i){this.parser=t,this.options=n,this.isOpen=i,this.open=0,this.localPreserveWS=!1;let o=n.topNode,s,r=_z(null,n.preserveWhitespace,0)|(i?b4:0);o?s=new y5(o.type,o.attrs,To.none,!0,n.topMatch||o.type.contentMatch,r):i?s=new y5(null,null,To.none,!0,null,r):s=new y5(t.schema.topNodeType,null,To.none,!0,null,r),this.nodes=[s],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let i=t.nodeValue,o=this.top,s=o.options&NT?"full":this.localPreserveWS||(o.options&D9)>0,{schema:r}=this.parser;if(s==="full"||o.inlineContext(t)||/[^ \t\r\n\u000c]/.test(i)){if(s)if(s==="full")i=i.replace(/\r\n?/g,` +`);else if(r.linebreakReplacement&&/[\r\n]/.test(i)&&this.top.findWrapping(r.linebreakReplacement.create())){let a=i.split(/\r?\n|\r/);for(let l=0;l!l.clearMark(c)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(t,n,i,o){let s,r;if(n.node)if(r=this.parser.schema.nodes[n.node],r.isLeaf)this.insertNode(r.create(n.attrs),i,t.nodeName=="BR")||this.leafFallback(t,i);else{let l=this.enter(r,n.attrs||null,i,n.preserveWhitespace);l&&(s=!0,i=l)}else{let l=this.parser.schema.marks[n.mark];i=i.concat(l.create(n.attrs))}let a=this.top;if(r&&r.isLeaf)this.findInside(t);else if(o)this.addElement(t,i,o);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,i,!1));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,i),this.findAround(t,l,!1)}s&&this.sync(a)&&this.open--}addAll(t,n,i,o){let s=i||0;for(let r=i?t.childNodes[i]:t.firstChild,a=o==null?null:t.childNodes[o];r!=a;r=r.nextSibling,++s)this.findAtPoint(t,s),this.addDOM(r,n);this.findAtPoint(t,s)}findPlace(t,n,i){let o,s;for(let r=this.open,a=0;r>=0;r--){let l=this.nodes[r],c=l.findWrapping(t);if(c&&(!o||o.length>c.length+a)&&(o=c,s=l,!c.length))break;if(l.solid){if(i)break;a+=2}}if(!o)return null;this.sync(s);for(let r=0;r(r.type?r.type.allowsMarkType(c.type):Mz(c.type,t))?(l=c.addToSet(l),!1):!0),this.nodes.push(new y5(t,n,l,o,null,a)),this.open++,i}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=D9)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let i=this.nodes[n].content;for(let o=i.length-1;o>=0;o--)t+=i[o].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let i=0;i-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),i=this.options.context,o=!this.isOpen&&(!i||i.parent.type==this.nodes[0].type),s=-(i?i.depth+1:0)+(o?0:1),r=(a,l)=>{for(;a>=0;a--){let c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=s;l--)if(r(a-1,l))return!0;return!1}else{let u=l>0||l==0&&o?this.nodes[l].type:i&&l>=s?i.node(l-s).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;l--}}return!0};return r(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(i&&i.isTextblock&&i.defaultAttrs)return i}for(let n in this.parser.schema.nodes){let i=this.parser.schema.nodes[n];if(i.isTextblock&&i.defaultAttrs)return i}}}function f6e(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let i=t.nodeType==1?t.nodeName.toLowerCase():null;i&&YX.hasOwnProperty(i)&&n?(n.appendChild(t),t=n):i=="li"?n=t:i&&(n=null)}}function h6e(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Tz(e){let t={};for(let n in e)t[n]=e[n];return t}function Mz(e,t){let n=t.schema.nodes;for(let i in n){let o=n[i];if(!o.allowsMarkType(e))continue;let s=[],r=a=>{s.push(a);for(let l=0;l{if(s.length||r.marks.length){let a=0,l=0;for(;a=0;o--){let s=this.serializeMark(t.marks[o],t.isInline,n);s&&((s.contentDOM||s.dom).appendChild(i),i=s.dom)}return i}serializeMark(t,n,i={}){let o=this.marks[t.type.name];return o&&q8(b5(i),o(t,n),null,t.attrs)}static renderSpec(t,n,i=null,o){return typeof n=="string"?{dom:t.createTextNode(n)}:q8(t,n,i,o)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new of(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=Ez(t.nodes);return n.text||(n.text=i=>i.text),n}static marksFromSchema(t){return Ez(t.marks)}}function Ez(e){let t={};for(let n in e){let i=e[n].spec.toDOM;i&&(t[n]=i)}return t}function b5(e){return e.document||window.document}const Lz=new WeakMap;function p6e(e){let t=Lz.get(e);return t===void 0&&Lz.set(e,t=m6e(e)),t}function m6e(e){let t=null;function n(i){if(i&&typeof i=="object")if(Array.isArray(i))if(typeof i[0]=="string")t||(t=[]),t.push(i);else for(let o=0;o-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let r=o.indexOf(" ");r>0&&(n=o.slice(0,r),o=o.slice(r+1));let a,l=n?e.createElementNS(n,o):e.createElement(o),c=t[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&l.style?l.style.cssText=c[d]:l.setAttribute(d,c[d])}}for(let d=u;du)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else if(typeof f=="string")l.appendChild(e.createTextNode(f));else{let{dom:h,contentDOM:m}=q8(e,f,n,i);if(l.appendChild(h),m){if(a)throw new RangeError("Multiple content holes");a=m}}}return{dom:l,contentDOM:a}}const JX=65535,XX=Math.pow(2,16);function g6e(e,t){return e+t*XX}function Rz(e){return e&JX}function v6e(e){return(e-(e&JX))/XX}const eee=1,tee=2,V8=4,nee=8;class BT{constructor(t,n,i){this.pos=t,this.delInfo=n,this.recover=i}get deleted(){return(this.delInfo&nee)>0}get deletedBefore(){return(this.delInfo&(eee|V8))>0}get deletedAfter(){return(this.delInfo&(tee|V8))>0}get deletedAcross(){return(this.delInfo&V8)>0}}class fl{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&fl.empty)return fl.empty}recover(t){let n=0,i=Rz(t);if(!this.inverted)for(let o=0;ot)break;let c=this.ranges[a+s],u=this.ranges[a+r],d=l+c;if(t<=d){let f=c?t==l?-1:t==d?1:n:n,h=l+o+(f<0?0:u);if(i)return h;let m=t==(n<0?l:d)?null:g6e(a/3,t-l),g=t==l?tee:t==d?eee:V8;return(n<0?t!=l:t!=d)&&(g|=nee),new BT(h,g,m)}o+=u-c}return i?t+o:new BT(t+o,0,null)}touches(t,n){let i=0,o=Rz(n),s=this.inverted?2:1,r=this.inverted?1:2;for(let a=0;at)break;let c=this.ranges[a+s],u=l+c;if(t<=u&&a==o*3)return!0;i+=this.ranges[a+r]-c}return!1}forEach(t){let n=this.inverted?2:1,i=this.inverted?1:2;for(let o=0,s=0;o=0;n--){let o=t.getMirror(n);this.appendMap(t._maps[n].invert(),o!=null&&o>n?i-o-1:void 0)}}invert(){let t=new N9;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let i=this.from;is&&l!r.isAtom||!a.type.allowsMarkType(this.mark.type)?r:r.mark(this.mark.addToSet(r.marks)),o),n.openStart,n.openEnd);return tr.fromReplace(t,this.from,this.to,s)}invert(){return new Jd(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new A1(n.pos,i.pos,this.mark)}merge(t){return t instanceof A1&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new A1(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new A1(n.from,n.to,t.markFromJSON(n.mark))}}Br.jsonID("addMark",A1);class Jd extends Br{constructor(t,n,i){super(),this.from=t,this.to=n,this.mark=i}apply(t){let n=t.slice(this.from,this.to),i=new jn(jR(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return tr.fromReplace(t,this.from,this.to,i)}invert(){return new A1(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new Jd(n.pos,i.pos,this.mark)}merge(t){return t instanceof Jd&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Jd(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Jd(n.from,n.to,t.markFromJSON(n.mark))}}Br.jsonID("removeMark",Jd);class x1 extends Br{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return tr.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return tr.fromReplace(t,this.pos,this.pos+1,new jn(Mn.from(i),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let i=this.mark.addToSet(n.marks);if(i.length==n.marks.length){for(let o=0;oi.pos?null:new Ic(n.pos,i.pos,o,s,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Ic(n.from,n.to,n.gapFrom,n.gapTo,jn.fromJSON(t,n.slice),n.insert,!!n.structure)}}Br.jsonID("replaceAround",Ic);function zT(e,t,n){let i=e.resolve(t),o=n-t,s=i.depth;for(;o>0&&s>0&&i.indexAfter(s)==i.node(s).childCount;)s--,o--;if(o>0){let r=i.node(s).maybeChild(i.indexAfter(s));for(;o>0;){if(!r||r.isLeaf)return!0;r=r.firstChild,o--}}return!1}function y6e(e,t,n,i){let o=[],s=[],r,a;e.doc.nodesBetween(t,n,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!i.isInSet(d)&&u.type.allowsMarkType(i.type)){let f=Math.max(c,t),h=Math.min(c+l.nodeSize,n),m=i.addToSet(d);for(let g=0;ge.step(l)),s.forEach(l=>e.step(l))}function b6e(e,t,n,i){let o=[],s=0;e.doc.nodesBetween(t,n,(r,a)=>{if(!r.isInline)return;s++;let l=null;if(i instanceof oC){let c=r.marks,u;for(;u=i.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else i?i.isInSet(r.marks)&&(l=[i]):l=r.marks;if(l&&l.length){let c=Math.min(a+r.nodeSize,n);for(let u=0;ue.step(new Jd(r.from,r.to,r.style)))}function WR(e,t,n,i=n.contentMatch,o=!0){let s=e.doc.nodeAt(t),r=[],a=t+1;for(let l=0;l=0;l--)e.step(r[l])}function k6e(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function qR(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let i=e.depth,o=0,s=0;;--i){let r=e.$from.node(i),a=e.$from.index(i)+o,l=e.$to.indexAfter(i)-s;if(in;m--)g||i.index(m)>0?(g=!0,u=Mn.from(i.node(m).copy(u)),d++):l--;let f=Mn.empty,h=0;for(let m=s,g=!1;m>n;m--)g||o.after(m+1)=0;r--){if(i.size){let a=n[r].type.contentMatch.matchFragment(i);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=Mn.from(n[r].type.create(n[r].attrs,i))}let o=t.start,s=t.end;e.step(new Ic(o,s,o,s,new jn(i,0,0),n.length,!0))}function A6e(e,t,n,i,o){if(!i.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=e.steps.length;e.doc.nodesBetween(t,n,(r,a)=>{let l=typeof o=="function"?o(r):o;if(r.isTextblock&&!r.hasMarkup(i,l)&&x6e(e.doc,e.mapping.slice(s).map(a),i)){let c=null;if(i.schema.linebreakReplacement){let h=i.whitespace=="pre",m=!!i.contentMatch.matchType(i.schema.linebreakReplacement);h&&!m?c=!1:!h&&m&&(c=!0)}c===!1&&oee(e,r,a,s),WR(e,e.mapping.slice(s).map(a,1),i,void 0,c===null);let u=e.mapping.slice(s),d=u.map(a,1),f=u.map(a+r.nodeSize,1);return e.step(new Ic(d,f,d+1,f-1,new jn(Mn.from(i.create(l,null,r.marks)),0,0),1,!0)),c===!0&&iee(e,r,a,s),!1}})}function iee(e,t,n,i){t.forEach((o,s)=>{if(o.isText){let r,a=/\r?\n|\r/g;for(;r=a.exec(o.text);){let l=e.mapping.slice(i).map(n+1+s+r.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function oee(e,t,n,i){t.forEach((o,s)=>{if(o.type==o.type.schema.linebreakReplacement){let r=e.mapping.slice(i).map(n+1+s);e.replaceWith(r,r+1,t.type.schema.text(` +`))}})}function x6e(e,t,n){let i=e.resolve(t),o=i.index();return i.parent.canReplaceWith(o,o+1,n)}function S6e(e,t,n,i,o){let s=e.doc.nodeAt(t);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let r=n.create(i,null,o||s.marks);if(s.isLeaf)return e.replaceWith(t,t+s.nodeSize,r);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Ic(t,t+s.nodeSize,t+1,t+s.nodeSize-1,new jn(Mn.from(r),0,0),1,!0))}function U8(e,t,n=1,i){let o=e.resolve(t),s=o.depth-n,r=i&&i[i.length-1]||o.parent;if(s<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!r.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,u=n-2;c>s;c--,u--){let d=o.node(c),f=o.index(c);if(d.type.spec.isolating)return!1;let h=d.content.cutByIndex(f,d.childCount),m=i&&i[u+1];m&&(h=h.replaceChild(0,m.type.create(m.attrs)));let g=i&&i[u]||d;if(!d.canReplace(f+1,d.childCount)||!g.type.validContent(h))return!1}let a=o.indexAfter(s),l=i&&i[0];return o.node(s).canReplaceWith(a,a,l?l.type:o.node(s+1).type)}function _6e(e,t,n=1,i){let o=e.doc.resolve(t),s=Mn.empty,r=Mn.empty;for(let a=o.depth,l=o.depth-n,c=n-1;a>l;a--,c--){s=Mn.from(o.node(a).copy(s));let u=i&&i[c];r=Mn.from(u?u.type.create(u.attrs,r):o.node(a).copy(r))}e.step(new ra(t,t,new jn(s.append(r),n,n),!0))}function see(e,t){let n=e.resolve(t),i=n.index();return T6e(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(i,i+1)}function I6e(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:i}=e.type.schema;for(let o=0;o=0;o--){let s=i.index(o);if(i.node(o).canReplaceWith(s,s,n))return i.before(o+1);if(s>0)return null}if(i.parentOffset==i.parent.content.size)for(let o=i.depth-1;o>=0;o--){let s=i.indexAfter(o);if(i.node(o).canReplaceWith(s,s,n))return i.after(o+1);if(s=0;r--){let a=r==i.depth?0:i.pos<=(i.start(r+1)+i.end(r+1))/2?-1:1,l=i.index(r)+(a>0?1:0),c=i.node(r),u=!1;if(s==1)u=c.canReplace(l,l,o);else{let d=c.contentMatchAt(l).findWrapping(o.firstChild.type);u=d&&c.canReplaceWith(l,l,d[0])}if(u)return a==0?i.pos:a<0?i.before(r+1):i.after(r+1)}return null}function VR(e,t,n=t,i=jn.empty){if(t==n&&!i.size)return null;let o=e.resolve(t),s=e.resolve(n);return ree(o,s,i)?new ra(t,n,i):new R6e(o,s,i).fit()}function ree(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class R6e{constructor(t,n,i){this.$from=t,this.$to=n,this.unplaced=i,this.frontier=[],this.placed=Mn.empty;for(let o=0;o<=t.depth;o++){let s=t.node(o);this.frontier.push({type:s.type,match:s.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=Mn.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,i=this.$from,o=this.close(t<0?this.$to:i.doc.resolve(t));if(!o)return null;let s=this.placed,r=i.depth,a=o.depth;for(;r&&a&&s.childCount==1;)s=s.firstChild.content,r--,a--;let l=new jn(s,r,a);return t>-1?new Ic(i.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||i.pos!=this.$to.pos?new ra(i.pos,o.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,i=0,o=this.unplaced.openEnd;i1&&(o=0),s.type.spec.isolating&&o<=i){t=i;break}n=s.content}for(let n=1;n<=2;n++)for(let i=n==1?t:this.unplaced.openStart;i>=0;i--){let o,s=null;i?(s=Ex(this.unplaced.content,i-1).firstChild,o=s.content):o=this.unplaced.content;let r=o.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],u,d=null;if(n==1&&(r?c.matchType(r.type)||(d=c.fillBefore(Mn.from(r),!1)):s&&l.compatibleContent(s.type)))return{sliceDepth:i,frontierDepth:a,parent:s,inject:d};if(n==2&&r&&(u=c.findWrapping(r.type)))return{sliceDepth:i,frontierDepth:a,parent:s,wrap:u};if(s&&c.matchType(s.type))break}}}openMore(){let{content:t,openStart:n,openEnd:i}=this.unplaced,o=Ex(t,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new jn(t,n+1,Math.max(i,o.size+n>=t.size-i?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:i}=this.unplaced,o=Ex(t,n);if(o.childCount<=1&&n>0){let s=t.size-n<=n+o.size;this.unplaced=new jn(zy(t,n-1,1),n-1,s?n-1:i)}else this.unplaced=new jn(zy(t,n,1),n,i)}placeNodes({sliceDepth:t,frontierDepth:n,parent:i,inject:o,wrap:s}){for(;this.depth>n;)this.closeFrontierNode();if(s)for(let g=0;g1||l==0||g.content.size)&&(d=y,u.push(aee(g.mark(f.allowedMarks(g.marks)),c==1?l:0,c==a.childCount?h:-1)))}let m=c==a.childCount;m||(h=-1),this.placed=Hy(this.placed,n,Mn.from(u)),this.frontier[n].match=d,m&&h<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,y=a;g1&&o==this.$to.end(--i);)++o;return o}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:i,type:o}=this.frontier[n],s=n=0;a--){let{match:l,type:c}=this.frontier[a],u=Lx(t,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:r,move:s?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Hy(this.placed,n.depth,n.fit)),t=n.move;for(let i=n.depth+1;i<=t.depth;i++){let o=t.node(i),s=o.type.contentMatch.fillBefore(o.content,!0,t.index(i));this.openFrontierNode(o.type,o.attrs,s)}return t}openFrontierNode(t,n=null,i){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=Hy(this.placed,this.depth,Mn.from(t.create(n,i))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Mn.empty,!0);n.childCount&&(this.placed=Hy(this.placed,this.frontier.length,n))}}function zy(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(zy(e.firstChild.content,t-1,n)))}function Hy(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Hy(e.lastChild.content,t-1,n)))}function Ex(e,t){for(let n=0;n1&&(i=i.replaceChild(0,aee(i.firstChild,t-1,i.childCount==1?n-1:0))),t>0&&(i=e.type.contentMatch.fillBefore(i).append(i),n<=0&&(i=i.append(e.type.contentMatch.matchFragment(i).fillBefore(Mn.empty,!0)))),e.copy(i)}function Lx(e,t,n,i,o){let s=e.node(t),r=o?e.indexAfter(t):e.index(t);if(r==s.childCount&&!n.compatibleContent(s.type))return null;let a=i.fillBefore(s.content,!0,r);return a&&!P6e(n,s.content,r)?a:null}function P6e(e,t,n){for(let i=n;i0;f--,h--){let m=o.node(f).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;r.indexOf(f)>-1?a=f:o.before(f)==h&&r.splice(1,0,-f)}let l=r.indexOf(a),c=[],u=i.openStart;for(let f=i.content,h=0;;h++){let m=f.firstChild;if(c.push(m),h==i.openStart)break;f=m.content}for(let f=u-1;f>=0;f--){let h=c[f],m=$6e(h.type);if(m&&!h.sameMarkup(o.node(Math.abs(a)-1)))u=f;else if(m||!h.type.isTextblock)break}for(let f=i.openStart;f>=0;f--){let h=(f+u+1)%(i.openStart+1),m=c[h];if(m)for(let g=0;g=0&&(e.replace(t,n,i),!(e.steps.length>d));f--){let h=r[f];h<0||(t=o.before(h),n=s.after(h))}}function lee(e,t,n,i,o){if(ti){let s=o.contentMatchAt(0),r=s.fillBefore(e).append(e);e=r.append(s.matchFragment(r).fillBefore(Mn.empty,!0))}return e}function F6e(e,t,n,i){if(!i.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=E6e(e.doc,t,i.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new jn(Mn.from(i),0,0))}function D6e(e,t,n){let i=e.doc.resolve(t),o=e.doc.resolve(n);if(i.parent.isTextblock&&o.parent.isTextblock&&i.start()!=o.start()&&i.parentOffset==0&&o.parentOffset==0){let r=i.sharedDepth(n),a=!1;for(let l=i.depth;l>r;l--)i.node(l).type.spec.isolating&&(a=!0);for(let l=o.depth;l>r;l--)o.node(l).type.spec.isolating&&(a=!0);if(!a){for(let l=i.depth;l>0&&t==i.start(l);l--)t=i.before(l);for(let l=o.depth;l>0&&n==o.start(l);l--)n=o.before(l);i=e.doc.resolve(t),o=e.doc.resolve(n)}}let s=cee(i,o);for(let r=0;r0&&(l||i.node(a-1).canReplace(i.index(a-1),o.indexAfter(a-1))))return e.delete(i.before(a),o.after(a))}for(let r=1;r<=i.depth&&r<=o.depth;r++)if(t-i.start(r)==i.depth-r&&n>i.end(r)&&o.end(r)-n!=o.depth-r&&i.start(r-1)==o.start(r-1)&&i.node(r-1).canReplace(i.index(r-1),o.index(r-1)))return e.delete(i.before(r),n);e.delete(t,n)}function cee(e,t){let n=[],i=Math.min(e.depth,t.depth);for(let o=i;o>=0;o--){let s=e.start(o);if(st.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(s==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==s-1)&&n.push(o)}return n}class c2 extends Br{constructor(t,n,i){super(),this.pos=t,this.attr=n,this.value=i}apply(t){let n=t.nodeAt(this.pos);if(!n)return tr.fail("No node at attribute step's position");let i=Object.create(null);for(let s in n.attrs)i[s]=n.attrs[s];i[this.attr]=this.value;let o=n.type.create(i,null,n.marks);return tr.fromReplace(t,this.pos,this.pos+1,new jn(Mn.from(o),0,n.isLeaf?0:1))}getMap(){return fl.empty}invert(t){return new c2(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new c2(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new c2(n.pos,n.attr,n.value)}}Br.jsonID("attr",c2);class B9 extends Br{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let i=t.type.create(n,t.content,t.marks);return tr.ok(i)}getMap(){return fl.empty}invert(t){return new B9(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new B9(n.attr,n.value)}}Br.jsonID("docAttr",B9);let D2=class extends Error{};D2=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};D2.prototype=Object.create(Error.prototype);D2.prototype.constructor=D2;D2.prototype.name="TransformError";class N6e{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new N9}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new D2(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let t=1e9,n=-1e9;for(let i=0;i{t=Math.min(t,a),n=Math.max(n,l)})}return t==1e9?null:{from:t,to:n}}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,i=jn.empty){let o=VR(this.doc,t,n,i);return o&&this.step(o),this}replaceWith(t,n,i){return this.replace(t,n,new jn(Mn.from(i),0,0))}delete(t,n){return this.replace(t,n,jn.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,i){return O6e(this,t,n,i),this}replaceRangeWith(t,n,i){return F6e(this,t,n,i),this}deleteRange(t,n){return D6e(this,t,n),this}lift(t,n){return w6e(this,t,n),this}join(t,n=1){return M6e(this,t,n),this}wrap(t,n){return C6e(this,t,n),this}setBlockType(t,n=t,i,o=null){return A6e(this,t,n,i,o),this}setNodeMarkup(t,n,i=null,o){return S6e(this,t,n,i,o),this}setNodeAttribute(t,n,i){return this.step(new c2(t,n,i)),this}setDocAttribute(t,n){return this.step(new B9(t,n)),this}addNodeMark(t,n){return this.step(new x1(t,n)),this}removeNodeMark(t,n){let i=this.doc.nodeAt(t);if(!i)throw new RangeError("No node at position "+t);if(n instanceof To)n.isInSet(i.marks)&&this.step(new lm(t,n));else{let o=i.marks,s,r=[];for(;s=n.isInSet(o);)r.push(new lm(t,s)),o=s.removeFromSet(o);for(let a=r.length-1;a>=0;a--)this.step(r[a])}return this}split(t,n=1,i){return _6e(this,t,n,i),this}addMark(t,n,i){return y6e(this,t,n,i),this}removeMark(t,n,i){return b6e(this,t,n,i),this}clearIncompatible(t,n,i){return WR(this,t,n,i),this}}const Rx=Object.create(null);class _o{constructor(t,n,i){this.$anchor=t,this.$head=n,this.ranges=i||[new B6e(t.min(n),t.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 t=this.ranges;for(let n=0;n=0;s--){let r=n<0?_g(t.node(0),t.node(s),t.before(s+1),t.index(s),n,i):_g(t.node(0),t.node(s),t.after(s+1),t.index(s)+1,n,i);if(r)return r}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new Tc(t.node(0))}static atStart(t){return _g(t,t,0,0,1)||new Tc(t)}static atEnd(t){return _g(t,t,t.content.size,t.childCount,-1)||new Tc(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=Rx[n.type];if(!i)throw new RangeError(`No selection type ${n.type} defined`);return i.fromJSON(t,n)}static jsonID(t,n){if(t in Rx)throw new RangeError("Duplicate use of selection JSON ID "+t);return Rx[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Pi.between(this.$anchor,this.$head).getBookmark()}}_o.prototype.visible=!0;class B6e{constructor(t,n){this.$from=t,this.$to=n}}let Pz=!1;function $z(e){!Pz&&!e.parent.inlineContent&&(Pz=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Pi extends _o{constructor(t,n=t){$z(t),$z(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let i=t.resolve(n.map(this.head));if(!i.parent.inlineContent)return _o.near(i);let o=t.resolve(n.map(this.anchor));return new Pi(o.parent.inlineContent?o:i,i)}replace(t,n=jn.empty){if(super.replace(t,n),n==jn.empty){let i=this.$from.marksAcross(this.$to);i&&t.ensureMarks(i)}}eq(t){return t instanceof Pi&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new sC(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Pi(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,i=n){let o=t.resolve(n);return new this(o,i==n?o:t.resolve(i))}static between(t,n,i){let o=t.pos-n.pos;if((!i||o)&&(i=o>=0?1:-1),!n.parent.inlineContent){let s=_o.findFrom(n,i,!0)||_o.findFrom(n,-i,!0);if(s)n=s.$head;else return _o.near(n,i)}return t.parent.inlineContent||(o==0?t=n:(t=(_o.findFrom(t,-i,!0)||_o.findFrom(t,i,!0)).$anchor,t.pos0?0:1);o>0?r=0;r+=o){let a=t.child(r);if(a.isAtom){if(!s&&$i.isSelectable(a))return $i.create(e,n-(o<0?a.nodeSize:0))}else{let l=_g(e,a,n+o,o<0?a.childCount:0,o,s);if(l)return l}n+=a.nodeSize*o}return null}function Oz(e,t,n){let i=e.steps.length-1;if(i{r==null&&(r=u)}),e.setSelection(_o.near(e.doc.resolve(r),n))}const Fz=1,k5=2,Dz=4;class H6e extends N6e{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=k5,this}ensureMarks(t){return To.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&k5)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~k5,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let i=this.selection;return n&&(t=t.mark(this.storedMarks||(i.empty?i.$from.marks():i.$from.marksAcross(i.$to)||To.none))),i.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,i){let o=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(i==null&&(i=n),!t)return this.deleteRange(n,i);let s=this.storedMarks;if(!s){let r=this.doc.resolve(n);s=i==n?r.marks():r.marksAcross(this.doc.resolve(i))}return this.replaceRangeWith(n,i,o.text(t,s)),!this.selection.empty&&this.selection.to==n+t.length&&this.setSelection(_o.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Dz,this}get scrolledIntoView(){return(this.updated&Dz)>0}}function Nz(e,t){return!t||!e?e:e.bind(t)}class jy{constructor(t,n,i){this.name=t,this.init=Nz(n.init,i),this.apply=Nz(n.apply,i)}}const j6e=[new jy("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new jy("selection",{init(e,t){return e.selection||_o.atStart(t.doc)},apply(e){return e.selection}}),new jy("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,i){return i.selection.$cursor?e.storedMarks:null}}),new jy("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class Px{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=j6e.slice(),n&&n.forEach(i=>{if(this.pluginsByKey[i.key])throw new RangeError("Adding different instances of a keyed plugin ("+i.key+")");this.plugins.push(i),this.pluginsByKey[i.key]=i,i.spec.state&&this.fields.push(new jy(i.key,i.spec.state,i))})}}class S1{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let i=0;ii.toJSON())),t&&typeof t=="object")for(let i in t){if(i=="doc"||i=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[i],s=o.spec.state;s&&s.toJSON&&(n[i]=s.toJSON.call(o,this[o.key]))}return n}static fromJSON(t,n,i){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new Px(t.schema,t.plugins),s=new S1(o);return o.fields.forEach(r=>{if(r.name=="doc")s.doc=V0.fromJSON(t.schema,n.doc);else if(r.name=="selection")s.selection=_o.fromJSON(s.doc,n.selection);else if(r.name=="storedMarks")n.storedMarks&&(s.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(i)for(let a in i){let l=i[a],c=l.spec.state;if(l.key==r.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){s[r.name]=c.fromJSON.call(l,t,n[a],s);return}}s[r.name]=r.init(t,s)}}),s}}function uee(e,t,n){for(let i in e){let o=e[i];o instanceof Function?o=o.bind(t):i=="handleDOMEvents"&&(o=uee(o,t,{})),n[i]=o}return n}class yp{constructor(t){this.spec=t,this.props={},t.props&&uee(t.props,this,this.props),this.key=t.key?t.key.key:dee("plugin")}getState(t){return t[this.key]}}const $x=Object.create(null);function dee(e){return e in $x?e+"$"+ ++$x[e]:($x[e]=0,e+"$")}class W3{constructor(t="key"){this.key=dee(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}function u2(e){let t="";for(const n of e)n.codePointAt(0)>127||/[A-Za-z0-9\-._~]/.test(n)?t+=n:t+=`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`;return t}function W6e(e){const t=e.split("/").map(u2).join("/");return t.startsWith("//")?`/%2F${t.slice(2)}`:t}function rC(e){return e.replace(/%/g,"%25").replace(/&/g,"%26").replace(//g,"%3E").replace(/([\\[\]])/g,"\\$1").replace(/\n/g,"%0A").replace(/\r/g,"%0D")}function Ox(e){return e.replace(/\\([\\[\]])/g,"$1").replace(/%0A/g,` +`).replace(/%0D/g,"\r").replace(/%26/g,"&").replace(/%3C/g,"<").replace(/%3E/g,">").replace(/%25/g,"%")}function q6e(e){return e.replace(/%0A/g,` +`).replace(/%0D/g,"\r").replace(/%26/g,"&").replace(/%3C/g,"<").replace(/%3E/g,">").replace(/%25/g,"%")}function V6e(e,t){const n=t?e.replace(/\\([\\<>])/g,"$1"):e.replace(/\\([\\()])/g,"$1");return k4(n)}function k4(e){try{return decodeURIComponent(e)}catch{return e}}let Bz;function HT(e){return Bz??=new Intl.Segmenter("und",{granularity:"grapheme"}),[...Bz.segment(e)].map(t=>t.segment)}function B6(e,t){const n=HT(e);return n.length<=t?e:`${n.slice(0,t-1).join("")}…`}const z6="kimi-code://skill/";function KR(e){return e?e.startsWith(z6)&&e.length>z6.length?"skill":e.startsWith("#")||e.startsWith("?")||e.startsWith("//")||/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(e)&&!/^[a-zA-Z]:(?:[\\/]|%5c)/i.test(e)?null:e.endsWith("/")||e.endsWith("\\")||/%5c$/i.test(e)?"folder":"file":null}function w4(e){const t=e.search(/[#?]/);return t>0?e.slice(0,t):e}function ZR(e){const t=e.search(/[#?]/);return t>0?e.slice(t):""}function fee(e){const t=e.slice(z6.length);return k4(t)}function fv(e){const t=rC(e.name);if(e.kind==="skill")return`[${t}](${z6}${u2(e.name)})`;const n=e.kind==="folder"&&!e.path.endsWith("/")&&!e.path.endsWith("\\")?`${e.path}/`:e.path;return`[${t}](${W6e(n)})`}const C4="kimi-code-composer://attachments/",jT="kimi-code-composer://browser-references/";function GR(e){return`[${rC(e.label)}](${jT}${u2(e.refId)})`}function N2(e){const t=`[${rC(e.name)}](${C4}${e.attId})`;return e.comment?aC({text:t,comment:e.comment}):t}const Zf="kimi-code-composer://quote/",U6e=12;function F1(e){const t=e.split(` +`).map(i=>i.trim()).find(i=>i.length>0)??"",n=B6(t,U6e);return n.length>0?n:"…"}function aC(e){const t=e.source!==void 0&&e.source.length>0?`?source=${u2(e.source)}`:"",n=e.comment!==void 0&&e.comment.length>0?`?comment=${u2(e.comment)}`:"";return`[${rC(F1(e.text))}](${Zf}${u2(e.text)}${t}${n})`}function hee(e){const t=e.indexOf("?source="),n=e.indexOf("?comment="),i=[t,n].filter(s=>s>=0).sort((s,r)=>s-r)[0]??-1,o={text:k4(i===-1?e:e.slice(0,i))};if(t>=0){const s=n>t?n:e.length;o.source=k4(e.slice(t+8,s))}if(n>=0){const s=t>n?t:e.length;o.comment=k4(e.slice(n+9,s))}return o}const zz=document.createElement("i");function K6e(e){const t="&"+e+";";zz.innerHTML=t;const n=zz.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function cf(e,t,n,i){const o=e.length;let s=0,r;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,i.length<1e4)r=Array.from(i),r.unshift(t,n),e.splice(...r);else for(n&&e.splice(t,n);s0?(cf(e,e.length,0,t),e):t}const Hz={}.hasOwnProperty;function Z6e(e){const t={};let n=-1;for(;++n-1&&e.test(String.fromCharCode(n))}}function ds(e,t,n,i){const o=i?i-1:Number.POSITIVE_INFINITY;let s=0;return r;function r(l){return wo(l)?(e.enter(n),a(l)):t(l)}function a(l){return wo(l)&&s++r))return;const M=t.events.length;let _=M,T,E;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){if(T){E=t.events[_][1].end;break}T=!0}for(v(i),S=M;Sw;){const x=n[C];t.containerState=x[1],x[0].exit.call(t,e)}n.length=w}function k(){o.write([null]),s=void 0,o=void 0,t.containerState._closeFlow=void 0}}function rwe(e,t,n){return ds(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Wz(e){if(e===null||jl(e)||twe(e))return 1;if(ewe(e))return 2}function YR(e,t,n){const i=[];let o=-1;for(;++o1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[i][1].end},f={...e[n][1].start};qz(d,-l),qz(f,l),r={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[i][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},s={type:l>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},o={type:l>1?"strong":"emphasis",start:{...r.start},end:{...a.end}},e[i][1].end={...r.start},e[n][1].start={...a.end},c=[],e[i][1].end.offset-e[i][1].start.offset&&(c=ou(c,[["enter",e[i][1],t],["exit",e[i][1],t]])),c=ou(c,[["enter",o,t],["enter",r,t],["exit",r,t],["enter",s,t]]),c=ou(c,YR(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),c=ou(c,[["exit",s,t],["enter",a,t],["exit",a,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=ou(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,cf(e,i-1,n-i+3,c),n=i+c.length-u-2;break}}for(n=-1;++n0&&wo(S)?ds(e,k,"linePrefix",s+1)(S):k(S)}function k(S){return S===null||Ci(S)?e.check(Vz,g,C)(S):(e.enter("codeFlowValue"),w(S))}function w(S){return S===null||Ci(S)?(e.exit("codeFlowValue"),k(S)):(e.consume(S),w)}function C(S){return e.exit("codeFenced"),t(S)}function x(S,M,_){let T=0;return E;function E(F){return S.enter("lineEnding"),S.consume(F),S.exit("lineEnding"),L}function L(F){return S.enter("codeFencedFence"),wo(F)?ds(S,P,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):P(F)}function P(F){return F===a?(S.enter("codeFencedFenceSequence"),N(F)):_(F)}function N(F){return F===a?(T++,S.consume(F),N):T>=r?(S.exit("codeFencedFenceSequence"),wo(F)?ds(S,U,"whitespace")(F):U(F)):_(F)}function U(F){return F===null||Ci(F)?(S.exit("codeFencedFence"),M(F)):_(F)}}}function ywe(e,t,n){const i=this;return o;function o(r){return r===null?n(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),s)}function s(r){return i.parser.lazy[i.now().line]?n(r):t(r)}}const Fx={name:"codeIndented",tokenize:kwe},bwe={partial:!0,tokenize:wwe};function kwe(e,t,n){const i=this;return o;function o(c){return e.enter("codeIndented"),ds(e,s,"linePrefix",5)(c)}function s(c){const u=i.events[i.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?r(c):n(c)}function r(c){return c===null?l(c):Ci(c)?e.attempt(bwe,r,l)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||Ci(c)?(e.exit("codeFlowValue"),r(c)):(e.consume(c),a)}function l(c){return e.exit("codeIndented"),t(c)}}function wwe(e,t,n){const i=this;return o;function o(r){return i.parser.lazy[i.now().line]?n(r):Ci(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),o):ds(e,s,"linePrefix",5)(r)}function s(r){const a=i.events[i.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(r):Ci(r)?o(r):n(r)}}const Cwe={name:"codeText",previous:xwe,resolve:Awe,tokenize:Swe};function Awe(e){let t=e.length-4,n=3,i,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const o=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&ry(this.left,i),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ry(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ry(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(r):e.interrupt(i.parser.constructs.flow,n,t)(r)}}function yee(e,t,n,i,o,s,r,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(v){return v===60?(e.enter(i),e.enter(o),e.enter(s),e.consume(v),e.exit(s),f):v===null||v===32||v===41||WT(v)?n(v):(e.enter(i),e.enter(r),e.enter(a),e.enter("chunkString",{contentType:"string"}),g(v))}function f(v){return v===62?(e.enter(s),e.consume(v),e.exit(s),e.exit(o),e.exit(i),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===62?(e.exit("chunkString"),e.exit(a),f(v)):v===null||v===60||Ci(v)?n(v):(e.consume(v),v===92?m:h)}function m(v){return v===60||v===62||v===92?(e.consume(v),h):h(v)}function g(v){return!u&&(v===null||v===41||jl(v))?(e.exit("chunkString"),e.exit(a),e.exit(r),e.exit(i),t(v)):u999||h===null||h===91||h===93&&!l||h===94&&!a&&"_hiddenFootnoteSupport"in r.parser.constructs?n(h):h===93?(e.exit(s),e.enter(o),e.consume(h),e.exit(o),e.exit(i),t):Ci(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||Ci(h)||a++>999?(e.exit("chunkString"),u(h)):(e.consume(h),l||(l=!wo(h)),h===92?f:d)}function f(h){return h===91||h===92||h===93?(e.consume(h),a++,d):d(h)}}function kee(e,t,n,i,o,s){let r;return a;function a(f){return f===34||f===39||f===40?(e.enter(i),e.enter(o),e.consume(f),e.exit(o),r=f===40?41:f,l):n(f)}function l(f){return f===r?(e.enter(o),e.consume(f),e.exit(o),e.exit(i),t):(e.enter(s),c(f))}function c(f){return f===r?(e.exit(s),l(r)):f===null?n(f):Ci(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ds(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===r||f===null||Ci(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:u)}function d(f){return f===r||f===92?(e.consume(f),u):u(f)}}function A4(e,t){let n;return i;function i(o){return Ci(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,i):wo(o)?ds(e,i,n?"linePrefix":"lineSuffix")(o):t(o)}}const Pwe={name:"definition",tokenize:Owe},$we={partial:!0,tokenize:Fwe};function Owe(e,t,n){const i=this;let o;return s;function s(h){return e.enter("definition"),r(h)}function r(h){return bee.call(i,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return o=QR(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),l):n(h)}function l(h){return jl(h)?A4(e,c)(h):c(h)}function c(h){return yee(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function u(h){return e.attempt($we,d,d)(h)}function d(h){return wo(h)?ds(e,f,"whitespace")(h):f(h)}function f(h){return h===null||Ci(h)?(e.exit("definition"),i.parser.defined.push(o),t(h)):n(h)}}function Fwe(e,t,n){return i;function i(a){return jl(a)?A4(e,o)(a):n(a)}function o(a){return kee(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return wo(a)?ds(e,r,"whitespace")(a):r(a)}function r(a){return a===null||Ci(a)?t(a):n(a)}}const Dwe={name:"hardBreakEscape",tokenize:Nwe};function Nwe(e,t,n){return i;function i(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return Ci(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const Bwe={name:"headingAtx",resolve:zwe,tokenize:Hwe};function zwe(e,t){let n=e.length-2,i=3,o,s;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(o={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},s={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},cf(e,i,n-i+1,[["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t]])),e}function Hwe(e,t,n){let i=0;return o;function o(u){return e.enter("atxHeading"),s(u)}function s(u){return e.enter("atxHeadingSequence"),r(u)}function r(u){return u===35&&i++<6?(e.consume(u),r):u===null||jl(u)?(e.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||Ci(u)?(e.exit("atxHeading"),t(u)):wo(u)?ds(e,a,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||jl(u)?(e.exit("atxHeadingText"),a(u)):(e.consume(u),c)}}const jwe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Kz=["pre","script","style","textarea"],Wwe={concrete:!0,name:"htmlFlow",resolveTo:Uwe,tokenize:Kwe},qwe={partial:!0,tokenize:Gwe},Vwe={partial:!0,tokenize:Zwe};function Uwe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Kwe(e,t,n){const i=this;let o,s,r,a,l;return c;function c(K){return u(K)}function u(K){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(K),d}function d(K){return K===33?(e.consume(K),f):K===47?(e.consume(K),s=!0,g):K===63?(e.consume(K),o=3,i.interrupt?t:$):Kd(K)?(e.consume(K),r=String.fromCharCode(K),y):n(K)}function f(K){return K===45?(e.consume(K),o=2,h):K===91?(e.consume(K),o=5,a=0,m):Kd(K)?(e.consume(K),o=4,i.interrupt?t:$):n(K)}function h(K){return K===45?(e.consume(K),i.interrupt?t:$):n(K)}function m(K){const te="CDATA[";return K===te.charCodeAt(a++)?(e.consume(K),a===te.length?i.interrupt?t:P:m):n(K)}function g(K){return Kd(K)?(e.consume(K),r=String.fromCharCode(K),y):n(K)}function y(K){if(K===null||K===47||K===62||jl(K)){const te=K===47,J=r.toLowerCase();return!te&&!s&&Kz.includes(J)?(o=1,i.interrupt?t(K):P(K)):jwe.includes(r.toLowerCase())?(o=6,te?(e.consume(K),v):i.interrupt?t(K):P(K)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(K):s?k(K):w(K))}return K===45||Ju(K)?(e.consume(K),r+=String.fromCharCode(K),y):n(K)}function v(K){return K===62?(e.consume(K),i.interrupt?t:P):n(K)}function k(K){return wo(K)?(e.consume(K),k):E(K)}function w(K){return K===47?(e.consume(K),E):K===58||K===95||Kd(K)?(e.consume(K),C):wo(K)?(e.consume(K),w):E(K)}function C(K){return K===45||K===46||K===58||K===95||Ju(K)?(e.consume(K),C):x(K)}function x(K){return K===61?(e.consume(K),S):wo(K)?(e.consume(K),x):w(K)}function S(K){return K===null||K===60||K===61||K===62||K===96?n(K):K===34||K===39?(e.consume(K),l=K,M):wo(K)?(e.consume(K),S):_(K)}function M(K){return K===l?(e.consume(K),l=null,T):K===null||Ci(K)?n(K):(e.consume(K),M)}function _(K){return K===null||K===34||K===39||K===47||K===60||K===61||K===62||K===96||jl(K)?x(K):(e.consume(K),_)}function T(K){return K===47||K===62||wo(K)?w(K):n(K)}function E(K){return K===62?(e.consume(K),L):n(K)}function L(K){return K===null||Ci(K)?P(K):wo(K)?(e.consume(K),L):n(K)}function P(K){return K===45&&o===2?(e.consume(K),B):K===60&&o===1?(e.consume(K),W):K===62&&o===4?(e.consume(K),j):K===63&&o===3?(e.consume(K),$):K===93&&o===5?(e.consume(K),z):Ci(K)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(qwe,G,N)(K)):K===null||Ci(K)?(e.exit("htmlFlowData"),N(K)):(e.consume(K),P)}function N(K){return e.check(Vwe,U,G)(K)}function U(K){return e.enter("lineEnding"),e.consume(K),e.exit("lineEnding"),F}function F(K){return K===null||Ci(K)?N(K):(e.enter("htmlFlowData"),P(K))}function B(K){return K===45?(e.consume(K),$):P(K)}function W(K){return K===47?(e.consume(K),r="",D):P(K)}function D(K){if(K===62){const te=r.toLowerCase();return Kz.includes(te)?(e.consume(K),j):P(K)}return Kd(K)&&r.length<8?(e.consume(K),r+=String.fromCharCode(K),D):P(K)}function z(K){return K===93?(e.consume(K),$):P(K)}function $(K){return K===62?(e.consume(K),j):K===45&&o===2?(e.consume(K),$):P(K)}function j(K){return K===null||Ci(K)?(e.exit("htmlFlowData"),G(K)):(e.consume(K),j)}function G(K){return e.exit("htmlFlow"),t(K)}}function Zwe(e,t,n){const i=this;return o;function o(r){return Ci(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),s):n(r)}function s(r){return i.parser.lazy[i.now().line]?n(r):t(r)}}function Gwe(e,t,n){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(lC,t,n)}}const Qwe={name:"htmlText",tokenize:Ywe};function Ywe(e,t,n){const i=this;let o,s,r;return a;function a($){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume($),l}function l($){return $===33?(e.consume($),c):$===47?(e.consume($),x):$===63?(e.consume($),w):Kd($)?(e.consume($),_):n($)}function c($){return $===45?(e.consume($),u):$===91?(e.consume($),s=0,m):Kd($)?(e.consume($),k):n($)}function u($){return $===45?(e.consume($),h):n($)}function d($){return $===null?n($):$===45?(e.consume($),f):Ci($)?(r=d,W($)):(e.consume($),d)}function f($){return $===45?(e.consume($),h):d($)}function h($){return $===62?B($):$===45?f($):d($)}function m($){const j="CDATA[";return $===j.charCodeAt(s++)?(e.consume($),s===j.length?g:m):n($)}function g($){return $===null?n($):$===93?(e.consume($),y):Ci($)?(r=g,W($)):(e.consume($),g)}function y($){return $===93?(e.consume($),v):g($)}function v($){return $===62?B($):$===93?(e.consume($),v):g($)}function k($){return $===null||$===62?B($):Ci($)?(r=k,W($)):(e.consume($),k)}function w($){return $===null?n($):$===63?(e.consume($),C):Ci($)?(r=w,W($)):(e.consume($),w)}function C($){return $===62?B($):w($)}function x($){return Kd($)?(e.consume($),S):n($)}function S($){return $===45||Ju($)?(e.consume($),S):M($)}function M($){return Ci($)?(r=M,W($)):wo($)?(e.consume($),M):B($)}function _($){return $===45||Ju($)?(e.consume($),_):$===47||$===62||jl($)?T($):n($)}function T($){return $===47?(e.consume($),B):$===58||$===95||Kd($)?(e.consume($),E):Ci($)?(r=T,W($)):wo($)?(e.consume($),T):B($)}function E($){return $===45||$===46||$===58||$===95||Ju($)?(e.consume($),E):L($)}function L($){return $===61?(e.consume($),P):Ci($)?(r=L,W($)):wo($)?(e.consume($),L):T($)}function P($){return $===null||$===60||$===61||$===62||$===96?n($):$===34||$===39?(e.consume($),o=$,N):Ci($)?(r=P,W($)):wo($)?(e.consume($),P):(e.consume($),U)}function N($){return $===o?(e.consume($),o=void 0,F):$===null?n($):Ci($)?(r=N,W($)):(e.consume($),N)}function U($){return $===null||$===34||$===39||$===60||$===61||$===96?n($):$===47||$===62||jl($)?T($):(e.consume($),U)}function F($){return $===47||$===62||jl($)?T($):n($)}function B($){return $===62?(e.consume($),e.exit("htmlTextData"),e.exit("htmlText"),t):n($)}function W($){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),D}function D($){return wo($)?ds(e,z,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):z($)}function z($){return e.enter("htmlTextData"),r($)}}const JR={name:"labelEnd",resolveAll:t7e,resolveTo:n7e,tokenize:i7e},Jwe={tokenize:o7e},Xwe={tokenize:s7e},e7e={tokenize:r7e};function t7e(e){let t=-1;const n=[];for(;++t=3&&(c===null||Ci(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===o?(e.consume(c),i++,l):(e.exit("thematicBreakSequence"),wo(c)?ds(e,a,"whitespace")(c):a(c))}}const Ll={continuation:{tokenize:g7e},exit:y7e,name:"list",tokenize:m7e},h7e={partial:!0,tokenize:b7e},p7e={partial:!0,tokenize:v7e};function m7e(e,t,n){const i=this,o=i.events[i.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,r=0;return a;function a(h){const m=i.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!i.containerState.marker||h===i.containerState.marker:qT(h)){if(i.containerState.type||(i.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(K8,n,c)(h):c(h);if(!i.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(h)}return n(h)}function l(h){return qT(h)&&++r<10?(e.consume(h),l):(!i.interrupt||r<2)&&(i.containerState.marker?h===i.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),c(h)):n(h)}function c(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||h,e.check(lC,i.interrupt?n:u,e.attempt(h7e,f,d))}function u(h){return i.containerState.initialBlankLine=!0,s++,f(h)}function d(h){return wo(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),f):n(h)}function f(h){return i.containerState.size=s+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function g7e(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(lC,o,s);function o(a){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,ds(e,t,"listItemIndent",i.containerState.size+1)(a)}function s(a){return i.containerState.furtherBlankLines||!wo(a)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,r(a)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(p7e,t,r)(a))}function r(a){return i.containerState._closeFlow=!0,i.interrupt=void 0,ds(e,e.attempt(Ll,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function v7e(e,t,n){const i=this;return ds(e,o,"listItemIndent",i.containerState.size+1);function o(s){const r=i.events[i.events.length-1];return r&&r[1].type==="listItemIndent"&&r[2].sliceSerialize(r[1],!0).length===i.containerState.size?t(s):n(s)}}function y7e(e){e.exit(this.containerState.type)}function b7e(e,t,n){const i=this;return ds(e,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const r=i.events[i.events.length-1];return!wo(s)&&r&&r[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const Zz={name:"setextUnderline",resolveTo:k7e,tokenize:w7e};function k7e(e,t){let n=e.length,i,o,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const r={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",r,t]),e.splice(s+1,0,["exit",e[i][1],t]),e[i][1].end={...e[s][1].end}):e[i][1]=r,e.push(["exit",r,t]),e}function w7e(e,t,n){const i=this;let o;return s;function s(c){let u=i.events.length,d;for(;u--;)if(i.events[u][1].type!=="lineEnding"&&i.events[u][1].type!=="linePrefix"&&i.events[u][1].type!=="content"){d=i.events[u][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||d)?(e.enter("setextHeadingLine"),o=c,r(c)):n(c)}function r(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===o?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),wo(c)?ds(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Ci(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const C7e={tokenize:A7e};function A7e(e){const t=this,n=e.attempt(lC,i,e.attempt(this.parser.constructs.flowInitial,o,ds(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Twe,o)),"linePrefix")));return n;function i(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const x7e={resolveAll:Cee()},S7e=wee("string"),_7e=wee("text");function wee(e){return{resolveAll:Cee(e==="text"?I7e:void 0),tokenize:t};function t(n){const i=this,o=this.parser.constructs[e],s=n.attempt(o,r,a);return r;function r(u){return c(u)?s(u):a(u)}function a(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),s(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=o[u];let f=-1;if(d)for(;++f-1){const a=r[0];typeof a=="string"?r[0]=a.slice(i):r.shift()}s>0&&r.push(e[o].slice(0,s))}return r}function z7e(e,t){let n=-1;const i=[];let o;for(;++n=t&&e<=n}function Ig(e,t){return e===void 0||_1(e,t)}function xee(e){return!Zd(e)||!hc(e.x,-1e6)||!hc(e.y,-1e6)||!hc(e.width,.01)||!hc(e.height,.01)?null:{x:e.x,y:e.y,width:e.width,height:e.height}}function q7e(e){if(!Zd(e))return null;const t=xee(e.bounds);if(t===null)return null;if(e.kind==="region")return{kind:"region",bounds:t};if(e.kind!=="element"||!_1(e.tagName,128)||e.tagName.length===0||!Ig(e.role,128)||!Ig(e.accessibleName,2e3)||!Ig(e.text,4e3))return null;let n;if(e.attributes!==void 0){if(!Zd(e.attributes)||Object.keys(e.attributes).length>128)return null;const o=Object.entries(e.attributes);if(o.some(([s,r])=>!/^(id|class|href|target|src|alt|type|name|placeholder|disabled|readonly|data-[a-zA-Z0-9_.:-]+)$/.test(s)||s.length>128||!_1(r,4096))||o.reduce((s,[r,a])=>s+r.length+a.length,0)>32768)return null;n=Object.fromEntries(o)}if(e.attributesTruncated!==void 0&&typeof e.attributesTruncated!="boolean")return null;let i;if(e.locator!==void 0){if(!Zd(e.locator)||!Ig(e.locator.selector,4096)||!Ig(e.locator.xpath,4096))return null;const o=e.locator.framePath;if(o!==void 0&&(!Array.isArray(o)||o.length>16||!o.every(s=>_1(s,4096))))return null;i={xpath:e.locator.xpath,selector:e.locator.selector,framePath:o===void 0?void 0:[...o]}}return{kind:"element",...n===void 0?{}:{attributes:n},...e.attributesTruncated===void 0?{}:{attributesTruncated:e.attributesTruncated},tagName:e.tagName,role:e.role,accessibleName:e.accessibleName,text:e.text,locator:i,bounds:t}}function z9(e){return!Zd(e)||!U0(e.id)||!U0(e.captureId)||!Ig(e.comment,1e4)||e.includeScreenshot!==void 0&&typeof e.includeScreenshot!="boolean"?null:{id:e.id,captureId:e.captureId,comment:e.comment,includeScreenshot:e.includeScreenshot}}function cm(e){if(Zd(e)&&e.bindingId!==void 0&&!U0(e.bindingId)||!Zd(e)||e.version!==1||!U0(e.id)||!hc(e.ordinal,1)||!Number.isInteger(e.ordinal)||!_1(e.label,256)||e.label.length===0||!_1(e.capturedAt,64)||!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(e.capturedAt)||!Number.isFinite(Date.parse(e.capturedAt))||new Date(e.capturedAt).toISOString()!==e.capturedAt||!Zd(e.page)||!_1(e.page.url,32768)||!_1(e.page.title,1024))return null;try{if(!["http:","https:"].includes(new URL(e.page.url).protocol))return null}catch{return null}const t=q7e(e.target),n=e.viewport;if(t===null||!Zd(n)||!hc(n.width,1)||!hc(n.height,1)||!hc(n.scrollX,-1e6)||!hc(n.scrollY,-1e6)||!hc(n.zoomFactor,.01,64)||!hc(n.devicePixelRatio,.01,64))return null;let i;if(e.screenshot!==void 0){const o=e.screenshot;if(!Zd(o)||!U0(o.attachmentId)||!hc(o.pixelWidth,1,32768)||!hc(o.pixelHeight,1,32768)||!Number.isInteger(o.pixelWidth)||!Number.isInteger(o.pixelHeight))return null;const s=xee(o.crop);if(s===null||s.x<0||s.y<0||s.x+s.width>n.width+1||s.y+s.height>n.height+1)return null;i={attachmentId:o.attachmentId,crop:s,pixelWidth:o.pixelWidth,pixelHeight:o.pixelHeight}}return{version:1,id:e.id,...e.bindingId===void 0?{}:{bindingId:e.bindingId},ordinal:e.ordinal,label:e.label,capturedAt:e.capturedAt,page:{url:e.page.url,title:e.page.title},target:t,viewport:{width:n.width,height:n.height,scrollX:n.scrollX,scrollY:n.scrollY,zoomFactor:n.zoomFactor,devicePixelRatio:n.devicePixelRatio},screenshot:i}}const V7e={extensions:[{disable:{null:["attention","autolink","blockQuote","characterReference","codeFenced","codeIndented","codeText","definition","hardBreakEscape","headingAtx","htmlFlow","htmlText","list","setextUnderline","thematicBreak"]}}]};function XR(e){if(e.includes(` +`)){const l=[];let c=0;for(const u of e.split(` +`)){for(const d of XR(u))l.push({...d,start:d.start+c,end:d.end+c});c+=u.length+1}return l}const t=j7e(H7e(V7e).document().write(W7e()(e,void 0,!0))),n=[];let i=null,o=!1,s=!1,r=null,a=0;for(const[l,c]of t){if(c.type==="image"){a+=l==="enter"?1:-1;continue}if(l==="enter"){c.type==="label"?i={start:c.start.offset,end:c.end.offset}:c.type==="resource"&&i!==null&&c.start.offset===i.end?(o=!0,s=!1,r=null):c.type==="resourceTitle"&&o?s=!0:c.type==="resourceDestination"&&o&&(r={start:c.start.offset,end:c.end.offset});continue}if(c.type!=="resource"||!o||i===null)continue;o=!1;const{start:u,end:d}=i;i=null;const f=c.end.offset,h=a>0;if(s||e[u]!==(h?"!":"[")||r===null)continue;const m=e.slice(u+(h?2:1),d-1);let g=e.slice(r.start,r.end),y=!1;g.startsWith("<")&&(y=!0,g=g.slice(1,-1)),!(!m||!g)&&n.push({start:u,end:f,rawText:m,rawDest:g,angle:y,image:h})}return n}function See(e,t){const{start:n,end:i,rawText:o,rawDest:s,angle:r,image:a}=e;if(a&&!s.startsWith(Zf))return null;if(s.startsWith(jT)){const c=s.slice(jT.length);return U0(c)?{type:"browser-reference",start:n,end:i,attrs:{refId:c,label:Ox(o)},rawDest:s}:null}if(s.startsWith(C4)&&s.length>C4.length){const c=Ox(o),u=s.slice(C4.length);return{type:"attachment",start:n,end:i,attrs:{attId:u,name:c,kind:t?.(u)??(c.endsWith("/")?"folder":"file")},rawDest:s}}if(s.startsWith(Zf)&&s.length>Zf.length)return{type:"quote",start:n,end:i,attrs:hee(s.slice(Zf.length)),rawDest:s};const l=KR(s);return l===null?null:l==="skill"?{type:"mention",start:n,end:i,attrs:{kind:l,name:fee(s),path:""},rawDest:s}:{type:"mention",start:n,end:i,attrs:{kind:l,name:Ox(o),path:V6e(s,r)},rawDest:s}}function U7e(e){const t=[];if(!e.includes(Zf))return t;const n=new Int32Array(e.length+1).fill(-1);for(let s=e.length-1;s>=0;s-=1){const r=e[s];r==="]"?n[s]=s:r==="\\"?s+1i.start-o.start),n}function X1(e){return q3(e).filter(t=>t.type==="mention").map(({start:t,end:n,attrs:i,rawDest:o})=>({start:t,end:n,attrs:i,rawDest:o}))}function du(e){return q3(e).map(t=>_ee(t)??t).filter(t=>t.type==="attachment").map(({start:t,end:n,attrs:i,rawDest:o})=>({start:t,end:n,attrs:i,rawDest:o}))}function _ee(e,t){if(e.type!=="quote"||e.attrs.source||!e.attrs.text.includes(C4))return null;const n=XR(e.attrs.text),i=n[0];if(n.length!==1||!i||i.start!==0||i.end!==e.attrs.text.length)return null;const o=See(i,t);return o?.type!=="attachment"?null:{...o,start:e.start,end:e.end,attrs:{...o.attrs,...e.attrs.comment?{comment:e.attrs.comment}:{}}}}function Iee(e){return q3(e).filter(t=>t.type==="quote").map(({start:t,end:n,attrs:i,rawDest:o})=>({start:t,end:n,attrs:i,rawDest:o}))}function Tee(e){return q3(e).flatMap(t=>t.type==="browser-reference"?[{start:t.start,end:t.end,attrs:t.attrs}]:[])}function UT(e,t){const n=q3(e,t);if(n.length===0)return[{type:"text",value:e}];const i=[];let o=0;for(const s of n){const r=_ee(s,t)??s;r.start>o&&i.push({type:"text",value:e.slice(o,r.start)}),r.type==="mention"?i.push({type:"mention",attrs:r.attrs,rawDest:r.rawDest}):r.type==="browser-reference"?i.push({type:"browser-reference",attrs:r.attrs,rawDest:r.rawDest}):r.type==="attachment"?i.push({type:"attachment",attrs:r.attrs,rawDest:r.rawDest}):i.push({type:"quote",attrs:r.attrs,rawDest:r.rawDest}),o=r.end}return o[l,c+1])),s=new Map(t.mediaAttIds.map((l,c)=>[l,c+1]));let r="",a=0;for(const l of i){r+=e.slice(a,l.start),a=l.end;const{attId:c,name:u,kind:d}=l.attrs,f=d==="folder"?n?.resolveFolder?.(c):void 0;if(f!==void 0){const y=f==="/"||/^[a-zA-Z]:\/$/.test(f)?f.slice(0,-1)||"/":u.endsWith("/")?u.slice(0,-1):u;r+=fv({kind:"folder",name:y,path:f});continue}const h=o.get(c);if(h!==void 0){r+=N2({...l.attrs,attId:String(h)});continue}const m=s.get(c);if(m!==void 0){const g=n?.resolveMediaName?.(c,m)??u;r+=N2({...l.attrs,attId:`m${m}`,name:g});continue}r+=u+(l.attrs.comment?` +${l.attrs.comment}`:"")}return r+=e.slice(a),r}function Qz(e,t,n=0){if(t<=0&&n<=0)return e;const i=du(e);if(i.length===0)return e;let o="",s=0;for(const r of i){const{attId:a,name:l}=r.attrs;let c,u=l;if(t>0&&/^[1-9]\d*$/.test(a))c=String(Number(a)+t);else if(n>0&&/^m[1-9]\d*$/.test(a)){const d=Number(a.slice(1)),f=d+n;c=`m${f}`;const h=` ${d}`;l.endsWith(h)&&(u=`${l.slice(0,-h.length)} ${f}`)}c!==void 0&&(o+=e.slice(s,r.start),s=r.end,o+=N2({...r.attrs,attId:c,name:u}))}return o+=e.slice(s),o}function I1(e,t){const n=du(e);if(n.length===0)return e;let i="",o=0;for(const s of n){const r=s.attrs.name+(s.attrs.comment?` +${s.attrs.comment}`:"");i+=e.slice(o,s.start)+(t?.(r)??r),o=s.end}return i+=e.slice(o),i}function KT(e,t){const n=du(e);if(n.length===0)return e;let i="",o=0;for(const s of n)t.has(s.attrs.attId)||(i+=e.slice(o,s.start)+s.attrs.name+(s.attrs.comment?` +${s.attrs.comment}`:""),o=s.end);return i+=e.slice(o),i}function Mee(e){return e.includes("](")?du(e).map(t=>({start:t.start,end:t.end,text:t.attrs.comment?`${t.attrs.name} +${t.attrs.comment}`:""})):[]}function ZT(e){const t=Mee(e);return t.length===0?e:OR(e,t).text}function H6(e){const t=rX(e),n=t[0].end,i=Mee(e.slice(n,t[1].start));return OR(e,[...t,...i.map(o=>({start:o.start+n,end:o.end+n,text:o.text}))])}let Z7e=!0;const G7e=/^> (.*)$/,Q7e=/^>$/;function Eee(e){return e.replaceAll("%","%25").replaceAll(` +`,"%0A").replaceAll("\r","%0D")}function Y7e(e){return e.replaceAll("%0A",` +`).replaceAll("%0D","\r").replaceAll("%25","%")}const J7e=/^from: (.+)$/;function X7e(e){let t=e,n;const i=e.indexOf(` +`),o=J7e.exec(i===-1?e:e.slice(0,i));o!==null&&(n=Y7e(o[1]),t=i===-1?"":e.slice(i+1));const s=[];for(const r of t.split(` +`)){const a=G7e.exec(r);if(a!==null){s.push(a[1]??"");continue}if(Q7e.test(r)){s.push("");continue}return null}return{text:s.join(` +`),...n!==void 0?{source:n}:{}}}function eP(e){const t=[];for(const i of e.split(/(\n{2,})/)){if(i==="")continue;if(/^\n{2,}$/.test(i)){t.push({type:"sep",text:i});continue}const o=X7e(i);t.push(o===null?{type:"inline",text:i}:{type:"quote",text:o.text,...o.source!==void 0?{source:o.source}:{}})}const n=[];for(let i=0;i`> ${t}`).join(` +`)}function Lee(e){const t=eP(e),n=new Set;return t.forEach((i,o)=>{i.type==="sep"&&i.text===` + +`&&t[o-1]?.type==="quote"&&t[o+1]?.type==="quote"&&n.add(o)}),t.map((i,o)=>{if(n.has(o))return" ";if(i.type!=="quote")return i.text;const s={text:i.text};return i.source!==void 0&&(s.source=i.source),i.comment!==void 0&&(s.comment=i.comment),aC(s)}).join("")}const Qn=new l6e({nodes:{doc:{content:"block+"},paragraph:{group:"block",content:"inline*",toDOM:()=>["p",0],parseDOM:[{tag:"p"}]},text:{group:"inline"},browser_reference:{group:"inline",inline:!0,atom:!0,selectable:!0,attrs:{refId:{},label:{}},leafText:e=>GR(e.attrs),toDOM:e=>["span",{class:"browser-reference-pill","data-browser-ref-id":e.attrs.refId},e.attrs.label]},mention:{group:"inline",inline:!0,atom:!0,selectable:!0,attrs:{kind:{},name:{},path:{default:""}},leafText:e=>fv(e.attrs),toDOM:e=>{const t=e.attrs;return["span",{class:`mention-pill mention-${t.kind}`,"data-mention-path":t.path},t.name]}},attachment:{group:"inline",inline:!0,atom:!0,selectable:!0,attrs:{attId:{},name:{},kind:{},comment:{default:void 0}},leafText:e=>N2(e.attrs),toDOM:e=>{const t=e.attrs;return["span",{class:`attachment-pill attachment-${t.kind}`,"data-attachment-id":t.attId,"data-attachment-kind":t.kind,"data-attachment-name":t.name,"data-attachment-comment":t.comment},t.name+(t.comment?` +${t.comment}`:"")]}},quote:{group:"inline",inline:!0,atom:!0,selectable:!0,attrs:{text:{},comment:{default:""},source:{default:""}},leafText:e=>aC(e.attrs),toDOM:e=>{const t=e.attrs,n={class:"quote-pill","data-quote-text":t.text};return typeof t.comment=="string"&&t.comment.length>0&&(n["data-quote-comment"]=t.comment),typeof t.source=="string"&&t.source.length>0&&(n["data-quote-source"]=t.source),["span",n,F1(t.text)]}}}});function tP(e){return Qn.nodes.mention.create(e)}function nP(e){return Qn.nodes.attachment.create(e)}function iP(e){return Qn.nodes.quote.create(e)}function oP(e){return Qn.nodes.browser_reference.create(e)}function nCe(e,t){return e?UT(e,t).map(n=>n.type==="mention"?tP(n.attrs):n.type==="attachment"?nP(n.attrs):n.type==="quote"?iP(n.attrs):n.type==="browser-reference"?oP(n.attrs):Qn.text(n.value)):[]}function B2(e,t){const n=e.split(` +`);return Qn.node("doc",null,n.map(i=>i?Qn.node("paragraph",null,t?.reviveMentions?nCe(i,t?.attachmentKindFor):Qn.text(i)):Qn.node("paragraph")))}function _a(e){return e.textBetween(0,e.content.size,` +`)}function x4(e){return e.isText?e.text.length:e.type===Qn.nodes.browser_reference?GR(e.attrs).length:e.type===Qn.nodes.attachment?N2(e.attrs).length:e.type===Qn.nodes.quote?aC(e.attrs).length:fv(e.attrs).length}function iCe(e,t){if(!t.parent.isTextblock)return Xd(e,t.pos);if(t.textOffset>0)return Xd(e,t.pos-t.textOffset);const n=t.nodeBefore;return n&&n.isText?Xd(e,t.pos-n.nodeSize):Xd(e,t.pos)}function hl(e,t){let n=Math.max(0,t),i=-1;return e.forEach((o,s)=>{if(i!==-1)return;let r=0;if(o.forEach(a=>{r+=x4(a)}),n>r){n-=r+1;return}o.forEach((a,l)=>{if(i!==-1)return;const c=s+1+l,u=x4(a);if(n<=u){a.isText?i=c+n:i=n===0?c:c+1;return}n-=u}),i===-1&&(i=s+1+o.content.size)}),i===-1?e.content.size-1:i}function Xd(e,t){let n=0,i=-1;return e.forEach((o,s)=>{if(i!==-1)return;const r=s+o.nodeSize;if(t>r){o.forEach(l=>{n+=x4(l)}),n+=1;return}let a=0;o.forEach((l,c)=>{if(i!==-1)return;const u=s+1+c;if(l.isText){const d=u+l.nodeSize;if(t<=d){i=n+a+Math.max(0,t-u);return}a+=l.text.length}else{const d=u+1;if(t<=d){i=n+a+(t<=u?0:x4(l));return}a+=x4(l)}}),i===-1&&(i=n+a)}),i===-1?n:i}function oCe(e){const t=[];return e.forEach(n=>{n.forEach(i=>{!i.isText&&i.type===Qn.nodes.mention&&i.attrs.kind==="skill"&&t.push({name:i.attrs.name})})}),t}function Yz(e){return(t,n)=>{const i=t.selection.$head,o=e?i.start():i.end();return n&&n(t.tr.setSelection(Pi.create(t.doc,t.selection.$anchor.pos,o)).scrollIntoView()),!0}}var j6=200,da=function(){};da.prototype.append=function(t){return t.length?(t=da.from(t),!this.length&&t||t.length=n?da.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};da.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};da.prototype.forEach=function(t,n,i){n===void 0&&(n=0),i===void 0&&(i=this.length),n<=i?this.forEachInner(t,n,i,0):this.forEachInvertedInner(t,n,i,0)};da.prototype.map=function(t,n,i){n===void 0&&(n=0),i===void 0&&(i=this.length);var o=[];return this.forEach(function(s,r){return o.push(t(s,r))},n,i),o};da.from=function(t){return t instanceof da?t:t&&t.length?new Ree(t):da.empty};var Ree=(function(e){function t(i){e.call(this),this.values=i}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(o,s){return o==0&&s==this.length?this:new t(this.values.slice(o,s))},t.prototype.getInner=function(o){return this.values[o]},t.prototype.forEachInner=function(o,s,r,a){for(var l=s;l=r;l--)if(o(this.values[l],a+l)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=j6)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=j6)return new t(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t})(da);da.empty=new Ree([]);var sCe=(function(e){function t(n,i){e.call(this),this.left=n,this.right=i,this.length=n.length+i.length,this.depth=Math.max(n.depth,i.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(i){return ia&&this.right.forEachInner(i,Math.max(o-a,0),Math.min(this.length,s)-a,r+a)===!1)return!1},t.prototype.forEachInvertedInner=function(i,o,s,r){var a=this.left.length;if(o>a&&this.right.forEachInvertedInner(i,o-a,Math.max(s,a)-a,r+a)===!1||s=s?this.right.slice(i-s,o-s):this.left.slice(i,s).append(this.right.slice(0,o-s))},t.prototype.leafAppend=function(i){var o=this.right.leafAppend(i);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(i){var o=this.left.leafPrepend(i);if(o)return new t(o,this.right)},t.prototype.appendInner=function(i){return this.left.depth>=Math.max(this.right.depth,i.depth)+1?new t(this.left,new t(this.right,i)):new t(this,i)},t})(da);const rCe=500;class Qu{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}let o,s;n&&(o=this.remapping(i,this.items.length),s=o.maps.length);let r=t.tr,a,l,c=[],u=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(i,f+1),s=o.maps.length),s--,u.push(d);return}if(o){u.push(new jd(d.map));let h=d.step.map(o.slice(s)),m;h&&r.maybeStep(h).doc&&(m=r.mapping.maps[r.mapping.maps.length-1],c.push(new jd(m,void 0,void 0,c.length+u.length))),s--,m&&o.appendMap(m,s)}else r.maybeStep(d.step);if(d.selection)return a=o?d.selection.map(o.slice(s)):d.selection,l=new Qu(this.items.slice(0,i).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:r,selection:a}}addTransform(t,n,i,o){let s=[],r=this.eventCount,a=this.items,l=!o&&a.length?a.get(a.length-1):null;for(let u=0;ulCe&&(a=aCe(a,c),r-=c),new Qu(a.append(s),r)}remapping(t,n){let i=new N9;return this.items.forEach((o,s)=>{let r=o.mirrorOffset!=null&&s-o.mirrorOffset>=t?i.maps.length-o.mirrorOffset:void 0;i.appendMap(o.map,r)},t,n),i}addMaps(t){return this.eventCount==0?this:new Qu(this.items.append(t.map(n=>new jd(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let i=[],o=Math.max(0,this.items.length-n),s=t.mapping,r=t.steps.length,a=this.eventCount;this.items.forEach(f=>{f.selection&&a--},o);let l=n;this.items.forEach(f=>{let h=s.getMirror(--l);if(h==null)return;r=Math.min(r,h);let m=s.maps[h];if(f.step){let g=t.steps[h].invert(t.docs[h]),y=f.selection&&f.selection.map(s.slice(l+1,h));y&&a++,i.push(new jd(m,g,y))}else i.push(new jd(m))},o);let c=[];for(let f=n;frCe&&(d=d.compress(this.items.length-i.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),i=n.maps.length,o=[],s=0;return this.items.forEach((r,a)=>{if(a>=t)o.push(r),r.selection&&s++;else if(r.step){let l=r.step.map(n.slice(i)),c=l&&l.getMap();if(i--,c&&n.appendMap(c,i),l){let u=r.selection&&r.selection.map(n.slice(i));u&&s++;let d=new jd(c.invert(),l,u),f,h=o.length-1;(f=o.length&&o[h].merge(d))?o[h]=f:o.push(d)}}else r.map&&i--},this.items.length,0),new Qu(da.from(o.reverse()),s)}}Qu.empty=new Qu(da.empty,0);function aCe(e,t){let n;return e.forEach((i,o)=>{if(i.selection&&t--==0)return n=o,!1}),e.slice(n)}class jd{constructor(t,n,i,o){this.map=t,this.step=n,this.selection=i,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new jd(n.getMap().invert(),n,this.selection)}}}class r1{constructor(t,n,i,o,s){this.done=t,this.undone=n,this.prevRanges=i,this.prevTime=o,this.prevComposition=s}}const lCe=20;function cCe(e,t,n,i){let o=n.getMeta(K0),s;if(o)return o.historyState;n.getMeta(Pee)&&(e=new r1(e.done,e.undone,null,0,-1));let r=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(r&&r.getMeta(K0))return r.getMeta(K0).redo?new r1(e.done.addTransform(n,void 0,i,Z8(t)),e.undone,Jz(n.mapping.maps),e.prevTime,e.prevComposition):new r1(e.done,e.undone.addTransform(n,void 0,i,Z8(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(r&&r.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=e.prevTime==0||!r&&e.prevComposition!=a&&(e.prevTime<(n.time||0)-i.newGroupDelay||!uCe(n,e.prevRanges)),c=r?Nx(e.prevRanges,n.mapping):Jz(n.mapping.maps);return new r1(e.done.addTransform(n,l?t.selection.getBookmark():void 0,i,Z8(t)),Qu.empty,c,n.time,a??e.prevComposition)}else return(s=n.getMeta("rebased"))?new r1(e.done.rebased(n,s),e.undone.rebased(n,s),Nx(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new r1(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Nx(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function uCe(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((i,o)=>{for(let s=0;s=t[s]&&(n=!0)}),n}function Jz(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((i,o,s,r)=>t.push(s,r));return t}function Nx(e,t){if(!e)return null;let n=[];for(let i=0;i{let o=K0.getState(n);if(!o||(e?o.undone:o.done).eventCount==0)return!1;if(i){let s=dCe(o,n,e);s&&i(t?s.scrollIntoView():s)}return!0}}const Oee=$ee(!1,!0),GT=$ee(!0,!0);function hCe(e,t,n){const i=hl(e.doc,n.start),o=hl(e.doc,n.end),s=_a(e.doc),r=n.start>0?s.charAt(n.start-1):"",a=s.charAt(n.end),l=[];(r==="!"||r==="\\")&&l.push(Qn.text(" ")),l.push(tP(t)),(a===""||!/\s/.test(a))&&l.push(Qn.text(" "));const c=e.tr.replaceWith(i,o,l);return c.setSelection(Pi.create(c.doc,i+l.reduce((u,d)=>u+d.nodeSize,0))),c.scrollIntoView()}function pCe(e,t,n){const i=hl(e.doc,n.start),o=hl(e.doc,n.end),s=e.tr.insertText(t,i,o);return s.setSelection(Pi.create(s.doc,i+t.length)),G8(s.scrollIntoView())}function Fee(e,t,n){const i=n?n.start:Xd(e.doc,e.selection.from),o=n?n.end:Xd(e.doc,e.selection.to),s=hl(e.doc,i),r=hl(e.doc,o),a=_a(e.doc),l=i>0?a.charAt(i-1):"",c=a.charAt(o),u=[];(l==="!"||l==="\\")&&u.push(Qn.text(" ")),u.push(nP(t)),(c===""||!/\s/.test(c))&&u.push(Qn.text(" "));const d=e.tr.replaceWith(s,r,u);return d.setSelection(Pi.create(d.doc,s+u.reduce((f,h)=>f+h.nodeSize,0))),d.scrollIntoView()}function mCe(e,t,n,i){const o=i===void 0?void 0:{start:i,end:i};return Fee(e,n.length>0?{...t,comment:n}:t,o)}function gCe(e,t,n){const i=e.selection.to,o=_a(e.doc),s=Xd(e.doc,i),r=s>0?o.charAt(s-1):"",a=o.charAt(s),l=[];r!==""&&!/\s/.test(r)&&l.push(Qn.text(" ")),l.push(iP(n!==void 0&&n.length>0?{...t,comment:n}:t)),(a===""||!/\s/.test(a))&&l.push(Qn.text(" "));const c=e.tr.replaceWith(i,i,l);return c.setSelection(Pi.create(c.doc,i+l.reduce((u,d)=>u+d.nodeSize,0))),c.scrollIntoView()}function w5(e,t){return jn.maxOpen(B2(e.replace(/\r\n?/g,` +`),t).content)}function eH(e){const t=typeof e.source=="string"&&e.source.length>0?`from: ${Eee(e.source)} +`:"",n=typeof e.comment=="string"&&e.comment.length>0?` + +${e.comment}`:"";return`${t}${tCe(e.text)}${n}`}function Dee(e,t){const n=o=>{if(o.isText)return o.text??"";if(o.type===Qn.nodes.mention)return fv(o.attrs);if(o.type===Qn.nodes.attachment){const s=o.attrs;return s.name+(s.comment?` +${s.comment}`:"")}return o.type===Qn.nodes.quote?eH(o.attrs):o.type===Qn.nodes.browser_reference?t?.(o.attrs.refId,o.attrs.label)??o.attrs.label:o.textBetween(0,o.content.size,"")},i=[];return e.content.forEach(o=>{if(o.type===Qn.nodes.mention||o.type===Qn.nodes.attachment||o.type===Qn.nodes.quote||o.type===Qn.nodes.browser_reference)i.push(n(o));else{let s="",r=!1;o.forEach(a=>{if(a.type===Qn.nodes.quote){const c=eH(a.attrs);s=s.length>0?`${s.replace(/ +$/,"")} + +${c}`:c,r=!0;return}let l=n(a);r&&(l=l.replace(/^ /,""),s+=` + +`,r=!1),s+=l}),i.push(s)}}),i.join(` +`)}const vCe=8*1024*1024,tH=1e5,QT=1e3;function S4(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function yCe(e){if(e.content!==void 0||e.marks!==void 0)return!1;if(e.type==="text")return typeof e.text=="string"&&e.text.length>0&&e.attrs===void 0;if(e.text!==void 0||!S4(e.attrs))return!1;const t=e.attrs;return e.type==="browser_reference"?U0(t.refId)&&typeof t.label=="string"&&t.label.length<=256:e.type==="mention"?(t.kind==="file"||t.kind==="folder"||t.kind==="skill")&&typeof t.name=="string"&&typeof t.path=="string":e.type==="attachment"?(t.kind==="file"||t.kind==="folder"||t.kind==="image"||t.kind==="video")&&typeof t.attId=="string"&&t.attId.length>0&&typeof t.name=="string":e.type==="quote"?typeof t.text=="string"&&(t.source===void 0||typeof t.source=="string")&&(t.comment===void 0||typeof t.comment=="string"):!1}function bCe(e){if(!S4(e)||e.type!=="doc"||!Array.isArray(e.content)||e.content.length===0||e.content.length>tH||e.text!==void 0||e.marks!==void 0)return null;let t=1;for(const n of e.content){if(!S4(n)||n.type!=="paragraph"||n.text!==void 0||n.marks!==void 0)return null;if(n.content!==void 0&&(!Array.isArray(n.content)||(t+=1+n.content.length,t>tH||!n.content.every(i=>S4(i)&&yCe(i)))))return null}try{const n=Qn.nodeFromJSON(e);return n.check(),n}catch{return null}}function sf(e){if(!S4(e)||e.version!==1||!Array.isArray(e.attachments)||!Array.isArray(e.attachmentOrder)||e.attachments.length>QT||e.attachmentOrder.length>QT)return null;try{if(JSON.stringify(e).length>vCe)return null}catch{return null}const t=bCe(e.doc);if(t===null)return null;const n=nH(e.browserReferences,z9),i=nH(e.browserCaptures,cm);if(n===null||i===null)return null;const o=[],s=new Set;for(const l of e.attachments){const c=wX(l);if(c===null||s.has(c.attId))return null;s.add(c.attId),o.push(c)}const r=[],a=new Set;for(const l of e.attachmentOrder){if(typeof l!="string"||l.length===0||a.has(l))return null;a.add(l),r.push(l)}return{version:1,doc:t.toJSON(),attachments:o,attachmentOrder:r,...n.length===0?{}:{browserReferences:n},...i.length===0?{}:{browserCaptures:i}}}function nH(e,t){if(e===void 0)return[];if(!Array.isArray(e)||e.length>QT)return null;const n=[],i=new Set;for(const o of e){const s=t(o);if(s===null||i.has(s.id))return null;i.add(s.id),n.push(s)}return n}function cC(e,t,n,i){const o=new Set(n),s=new Set;e.descendants(c=>{c.type===Qn.nodes.attachment&&o.add(c.attrs.attId),c.type===Qn.nodes.browser_reference&&s.add(c.attrs.refId)});const r=i?.references.filter(c=>s.has(c.id))??[],a=new Set(r.map(c=>c.captureId)),l=i?.captures.filter(c=>a.has(c.id))??[];for(const c of l)c.screenshot!==void 0&&o.add(c.screenshot.attachmentId);return{version:1,doc:structuredClone(e.toJSON()),attachments:t.filter(c=>o.has(c.attId)).map(c=>({...G7(c)})),attachmentOrder:[...n],...r.length===0?{}:{browserReferences:structuredClone(r)},...l.length===0?{}:{browserCaptures:structuredClone(l)}}}function kCe(e,t){if(!e.attachments.some(i=>t.has(i.attId))&&!e.attachmentOrder.some(i=>t.has(i)))return e;const n=[];return Qn.nodeFromJSON(e.doc).forEach(i=>{const o=[];i.forEach(s=>{s.type!==Qn.nodes.attachment||!t.has(s.attrs.attId)?o.push(s):s.attrs.name&&o.push(Qn.text(s.attrs.name))}),n.push(i.type.create(i.attrs,o))}),{...e,doc:Qn.nodes.doc.create(null,n).toJSON(),attachments:e.attachments.filter(i=>!t.has(i.attId)),attachmentOrder:e.attachmentOrder.filter(i=>!t.has(i))}}function Mc(e){return Qn.nodeFromJSON(e.doc)}function Nee(e,t){if(e.length===0)return null;const n=[],i=[],o=[],s=new Set,r=new Set,a=new Set,l=[],c=[];return e.forEach((u,d)=>{const f=structuredClone(u),h=new Map,m=new Set([...f.attachmentOrder,...f.attachments.map(w=>w.attId)]);for(const w of f.browserCaptures??[])w.screenshot!==void 0&&m.add(w.screenshot.attachmentId);Mc(f).descendants(w=>{w.type===Qn.nodes.attachment&&m.add(w.attrs.attId)});for(const w of m){let C=w,x=d;for(;s.has(C);)C=`${w}m${x++}`;s.add(C),h.set(w,C)}const y=new Map,v=new Map,k=(w,C)=>{let x=w,S=d;for(;C.has(x);)x=`${w.slice(0,112)}m${S++}`;return C.add(x),x};for(const w of f.browserCaptures??[]){const C=k(w.id,r);y.set(w.id,C),c.push({...w,id:C,bindingId:Aee(w),screenshot:w.screenshot===void 0?void 0:{...w.screenshot,attachmentId:h.get(w.screenshot.attachmentId)}})}for(const w of f.browserReferences??[]){const C=k(w.id,a);v.set(w.id,C),y.has(w.captureId)||y.set(w.captureId,k(w.captureId,r)),l.push({...w,id:C,captureId:y.get(w.captureId)})}for(const w of f.doc.content??[])for(const C of w.content??[])if(C.type==="attachment"&&C.attrs!==void 0&&(C.attrs.attId=h.get(C.attrs.attId)),C.type==="browser_reference"&&C.attrs!==void 0){const x=C.attrs.refId;v.has(x)||v.set(x,k(x,a)),C.attrs.refId=v.get(x)}d>0&&n.push({type:"paragraph"}),n.push(...f.doc.content??[]),i.push(...f.attachments.map(w=>{const C=h.get(w.attId);return{...w,attId:C,key:w.key===`blob:${w.attId}`?`blob:${C}`:w.key}})),o.push(...f.attachmentOrder.map(w=>h.get(w))),t?.(d,{attachments:h,references:v,captures:y})}),{version:1,doc:{type:"doc",content:n},attachments:i,attachmentOrder:o,...l.length===0?{}:{browserReferences:l},...c.length===0?{}:{browserCaptures:c}}}Wke();const eu=new W3("composerAttachmentInventory"),_4="composerAttachmentInventory";function YT(e,t){return Math.max(0,Math.min(Math.trunc(e),t))}function zx(e){const t=new Map;return e.descendants(n=>{if(n.type!==Qn.nodes.attachment)return!0;const i=n.attrs.attId;return t.set(i,(t.get(i)??0)+1),!1}),t}function wCe(e){const t=new Set;return e.descendants(n=>{if(n.type!==Qn.nodes.attachment)return!0;const i=n.attrs;return(i.kind==="file"||i.kind==="folder")&&t.add(i.attId),!1}),t}function CCe(e,t){if(e.size!==t.size)return!1;for(const[n,i]of e)if(t.get(n)!==i)return!1;return!0}function ACe(e,t){return $T(e,n=>{if(t.type==="activate"){if(n.activeIds.has(t.attId))return;const s=YT(t.index,n.orderedIds.length);n.activeIds.add(t.attId),n.orderedIds.splice(s,0,t.attId);return}if(t.type==="deactivate"){if(!n.activeIds.has(t.attId))return;n.activeIds.delete(t.attId);const s=n.orderedIds.indexOf(t.attId);s!==-1&&n.orderedIds.splice(s,1);return}if(!n.activeIds.has(t.attId))return;const i=n.orderedIds.indexOf(t.attId);if(i===-1)return;const o=YT(t.to,n.orderedIds.length-1);i!==o&&(n.orderedIds.splice(i,1),n.orderedIds.splice(o,0,t.attId))})}class fu extends Br{constructor(t){super(),this.operation=t}apply(t){return tr.ok(t)}getMap(){return fl.empty}invert(){const t=this.operation;return t.type==="activate"?new fu({type:"deactivate",attId:t.attId,index:t.index}):t.type==="deactivate"?new fu({type:"activate",attId:t.attId,index:t.index}):new fu({type:"reorder",attId:t.attId,from:t.to,to:t.from})}map(){return this}toJSON(){return{stepType:_4,operation:this.operation}}static fromJSON(t,n){if(n.operation===void 0)throw new RangeError("Invalid attachment inventory step");return new fu(n.operation)}}try{Br.jsonID(_4,fu)}catch(e){if(!(e instanceof RangeError)||e.message!==`Duplicate use of step JSON ID ${_4}`)throw e;Object.defineProperty(fu.prototype,"jsonID",{value:_4})}function xCe(e){return e instanceof fu||e.jsonID===_4}function SCe(e=[]){const t=[...new Set(e)];return new yp({key:eu,state:{init(n,i){return sh({orderedIds:t,activeIds:new Set(t),refCounts:zx(i.doc),resourceRevision:0},!0)},apply(n,i,o,s){let r=i;for(const c of n.steps)xCe(c)&&(r=ACe(r,c.operation));n.getMeta(eu)?.type==="resource-revision"&&(r=$T(r,c=>{c.resourceRevision+=1}));const l=zx(s.doc);return CCe(r.refCounts,l)||(r=$T(r,c=>{c.refCounts=new Map(l)})),r}},appendTransaction(n,i,o){if(!n.some(c=>c.docChanged))return null;const s=eu.getState(o);if(s===void 0)return null;const r=zx(o.doc),a=[...wCe(i.doc)].filter(c=>s.activeIds.has(c)&&!r.has(c));if(a.length===0)return null;const l=o.tr;for(const c of a){const u=s.orderedIds.indexOf(c);u!==-1&&l.step(new fu({type:"deactivate",attId:c,index:u}))}return l.steps.length===0?null:l}})}function mc(e){const t=eu.getState(e);if(t===void 0)throw new Error("Attachment inventory plugin is missing");return t}function H9(e,t,n){const i=mc(e),o=n===void 0?i.orderedIds.length:Math.max(0,Math.trunc(n));return new fu({type:"activate",attId:t,index:o})}function Bee(e,t){const i=mc(e).orderedIds.indexOf(t);return i===-1?null:new fu({type:"deactivate",attId:t,index:i})}function _Ce(e,t,n){const i=mc(e),o=i.orderedIds.indexOf(t);if(o===-1)return null;const s=YT(n,i.orderedIds.length-1);return o===s?null:new fu({type:"reorder",attId:t,from:o,to:s})}function zee(e,t){const n=[];return e.doc.descendants((i,o)=>i.type!==Qn.nodes.attachment?!0:(i.attrs.attId===t&&n.push({from:o,to:o+i.nodeSize}),!1)),n}function ICe(e,t){const n=Bee(e,t);if(n===null)return null;const i=e.tr.step(n);for(const o of zee(e,t).reverse())i.delete(o.from,o.to);return i.scrollIntoView()}function TCe(e,t){const n=zee(e,t);if(n.length===0)return null;const i=e.tr;for(const o of n.reverse())i.delete(o.from,o.to);return i.scrollIntoView()}function MCe(e,t){if(t.length===0)return null;let n=e;const i=e.tr;for(const o of t){const s=o.range??(o.pos===void 0?void 0:{start:o.pos,end:o.pos}),r=o.reference?Fee(n,o.attrs,s):n.tr;if(mc(n).activeIds.has(o.attrs.attId)||r.step(H9(n,o.attrs.attId)),r.steps.length!==0){for(const a of r.steps)i.step(a);i.setSelection(_o.fromJSON(i.doc,r.selection.toJSON())),n=n.apply(r)}}return i.steps.length===0?null:i.scrollIntoView()}const W6=new W3("composerAttachmentRegistry");function ECe(e){const t=new Set,n=[];return e.descendants(i=>{if(i.type!==Qn.nodes.attachment)return!0;const o=i.attrs.attId;return t.has(o)||(t.add(o),n.push(o)),!1}),n}const mh=new W3("browserReferences"),I4="composerBrowserReference";class gh extends Br{before;after;constructor(t,n){super(),this.before=t===null?null:sh(structuredClone(t)),this.after=n===null?null:sh(structuredClone(n))}apply(t){return tr.ok(t)}getMap(){return fl.empty}invert(){return new gh(this.after,this.before)}map(){return this}toJSON(){return{stepType:I4,before:this.before,after:this.after}}static fromJSON(t,n){const i=n.before===null?null:z9(n.before),o=n.after===null?null:z9(n.after);if(n.before!==null&&i===null||n.after!==null&&o===null||i===null&&o===null||i!==null&&o!==null&&i.id!==o.id)throw new RangeError("Invalid browser reference step");return new gh(i,o)}}try{Br.jsonID(I4,gh)}catch(e){if(!(e instanceof RangeError)||e.message!==`Duplicate use of step JSON ID ${I4}`)throw e;Object.defineProperty(gh.prototype,"jsonID",{value:I4})}function iH(e){return e instanceof gh||e.jsonID===I4}function Hee(e){const t=new Set;return e.descendants(n=>{n.type===Qn.nodes.browser_reference&&t.add(n.attrs.refId)}),t}function j9(e){const t=mh.getState(e);if(t===void 0)throw new Error("Browser reference plugin is missing");return t}function LCe(e={}){return new yp({key:mh,state:{init:()=>({references:new Map((e.browserReferences??[]).map(t=>[t.id,sh(structuredClone(t))])),captures:new Map((e.browserCaptures??[]).map(t=>[t.id,sh(structuredClone(t),!0)]))}),apply(t,n){let i=n.references,o=n.captures;for(const r of t.steps){if(!iH(r))continue;const a=new Map(i);r.after!==null?a.set(r.after.id,r.after):r.before!==null&&a.delete(r.before.id),i=a}const s=t.getMeta(mh);for(const r of s?.captures??[])o.has(r.id)||(o=new Map(o).set(r.id,sh(structuredClone(r),!0)));return i===n.references&&o===n.captures?n:{references:i,captures:o}}},appendTransaction(t,n,i){if(!t.some(l=>l.docChanged||l.steps.some(iH)))return null;const o=j9(i),s=new Set;for(const l of Hee(i.doc)){const c=o.references.get(l),u=c===void 0?void 0:o.captures.get(c.captureId);u?.screenshot!==void 0&&(u.target.kind==="region"||c?.includeScreenshot!==!1)&&s.add(u.screenshot.attachmentId)}const r=mc(i),a=i.tr;for(const l of s)r.activeIds.has(l)||a.step(H9(i,l));for(const l of o.captures.values()){const c=l.screenshot?.attachmentId;if(c===void 0||s.has(c)||(r.refCounts.get(c)??0)>0)continue;const u=Bee(i,c);u!==null&&a.step(u)}return a.steps.length===0?null:a}})}function RCe(e,t,n,i){const o=cm(t),s=z9(n);if(o===null||s===null)throw new Error("Invalid browser reference data");t=o,n=s;const r=j9(e);if(n.captureId!==t.id||r.references.has(n.id))throw new Error("Invalid browser reference identity");const a=r.captures.get(t.id);if(a!==void 0&&JSON.stringify(cm(a))!==JSON.stringify(t))throw new Error("Browser capture is immutable");const l=i===void 0?e.selection.from:hl(e.doc,i.start),c=i===void 0?e.selection.to:hl(e.doc,i.end),u=oP({refId:n.id,label:t.label}),d=e.tr.replaceWith(l,c,[u,Qn.text(" ")]);return d.step(new gh(null,n)),a===void 0&&d.setMeta(mh,{captures:[t]}),d.setSelection(Pi.create(d.doc,l+u.nodeSize+1)),d.scrollIntoView()}function PCe(e,t,n,i){const o=j9(e),s=o.references.get(t);if(s===void 0||!Hee(e.doc).has(t))return null;const r=o.captures.get(s.captureId)?.target.kind==="region"?!0:i??s.includeScreenshot;if((s.comment??"")===n&&s.includeScreenshot!==!1==(r!==!1))return null;if(n.length>1e4)throw new Error("Browser reference comment is too long");return e.tr.step(new gh(s,{...s,comment:n||void 0,includeScreenshot:r}))}function um(e,t,n){if(t===void 0)return;const i=n?.find(a=>a.attId===e);if(i!==void 0)return i.fileId===void 0?void 0:t.find(a=>a.fileId===i.fileId&&a.sessionId===i.sessionId);let o,s;if(/^[1-9]\d*$/.test(e))o=Number(e),s=a=>a.kind==="file";else if(/^m[1-9]\d*$/.test(e))o=Number(e.slice(1)),s=a=>a.kind==="image"||a.kind==="video";else return;let r=0;for(const a of t)if(s(a)&&(r+=1,r===o))return a}function $Ce(e,t,n){const i=um(e,t,n);if(i===void 0)return{};const o=i.url!=="";return{"data-attachment-kind":i.kind,"data-attachment-url":o?i.url:void 0,"data-attachment-file-id":i.fileId,"data-attachment-media-type":i.mediaType,"data-attachment-size":i.size,"data-attachment-session-id":o?i.sessionId:void 0,tabindex:o?0:void 0,role:o?"button":void 0}}function OCe(e,t){const n=[...e],i=new Map(n.map(r=>[r.key,r])),o=new Map(n.map(r=>[r.attId,r])),s={};for(const r of t){const a=o.get(r.attId);if(a!==void 0&&a.key===r.key)continue;const l=i.get(r.key);if(l&&!(r.kind!==l.kind||r.size!==void 0&&l.size!==void 0&&r.size!==l.size||r.lastModified!==void 0&&l.lastModified!==void 0&&r.lastModified!==l.lastModified)){l.attId!==r.attId&&(s[r.attId]=l.attId);continue}if(!o.has(r.attId)){const d=cz(r,n);n.push(d),i.set(d.key,d),o.set(d.attId,d);continue}let c=Y1();for(;o.has(c);)c=Y1();const u=cz({...r,attId:c},n);n.push(u),i.set(u.key,u),o.set(c,u),s[r.attId]=c}return{entries:n,attIdRemap:s}}const sP="application/x-kimi-composer",FCe=1024*1024;function DCe(e){if(e.length>FCe)return null;let t;try{t=JSON.parse(e)}catch{return null}if(typeof t!="object"||t===null)return null;const n=t;if(n.v!==1||typeof n.slice!="object"||n.slice===null||n.browserReferences!==void 0&&(!Array.isArray(n.browserReferences)||n.browserReferences.length>1e3)||n.browserCaptures!==void 0&&(!Array.isArray(n.browserCaptures)||n.browserCaptures.length>1e3))return null;let i;try{i=jn.fromJSON(Qn,n.slice)}catch{return null}const o=[];for(const a of Array.isArray(n.attachments)?n.attachments:[]){const l=Ake(a);l!==null&&o.push(l)}const s=[],r=[];for(const a of n.browserReferences??[]){const l=z9(a);if(l===null)return null;s.push(l)}for(const a of n.browserCaptures??[]){const l=cm(a);if(l===null)return null;r.push(l)}return{slice:i,attachments:o,browserReferences:s,browserCaptures:r}}function NCe(e,t,n,i){if(Object.keys(t).length===0&&n===void 0)return e;const o=new Map(n?.map(l=>[l.attId,l])??[]),s=(l,c)=>{if(l.kind!=="image"&&l.kind!=="video"||l.mediaOrdinal===void 0)return c;const u=/^(.*)\s+[1-9]\d*$/.exec(c);return u===null?c:`${u[1]} ${l.mediaOrdinal}`},r=l=>{if(l.type===Qn.nodes.attachment){const u=l.attrs,d=t[u.attId]??u.attId,f=o.get(d),h=f===void 0?u.name:i?.(f)??s(f,u.name);return d===u.attId&&h===u.name?l:Qn.nodes.attachment.create({...u,attId:d,name:h})}if(l.isLeaf)return l;const c=[];return l.forEach(u=>c.push(r(u))),l.copy(Mn.fromArray(c))},a=[];return e.content.forEach(l=>a.push(r(l))),new jn(Mn.fromArray(a),e.openStart,e.openEnd)}function oH(e,t,n){const i=DCe(t);if(!i)return null;const o=n===void 0?[...W6.getState(e)?.values()??[]]:[...n.entries],{entries:s,attIdRemap:r}=OCe(o,i.attachments);let a=NCe(i.slice,r,s,n?.referenceName);const l=mh.getState(e),c=[],u=[];if(l!==void 0){const g=new Map;for(const w of i.browserCaptures){const C={...w,screenshot:w.screenshot===void 0?void 0:{...w.screenshot,attachmentId:r[w.screenshot.attachmentId]??w.screenshot.attachmentId}},x=l.captures.get(C.id);x!==void 0&&JSON.stringify(cm(x))!==JSON.stringify(cm(C))&&(C.bindingId=Aee(C),C.id=`bc_${crypto.randomUUID()}`),g.set(w.id,C.id),c.push(C)}const y=new Map(i.browserReferences.map(w=>[w.id,w])),v=w=>{if(w.type===Qn.nodes.browser_reference){const x=`br_${crypto.randomUUID()}`,S=y.get(w.attrs.refId);if(S!==void 0){let M=g.get(S.captureId);M===void 0&&(M=`bc_${crypto.randomUUID()}`,g.set(S.captureId,M)),u.push({...S,id:x,captureId:M})}return w.type.create({...w.attrs,refId:x})}if(w.isLeaf)return w;const C=[];return w.forEach(x=>C.push(v(x))),w.copy(Mn.fromArray(C))},k=[];a.content.forEach(w=>k.push(v(w))),a=new jn(Mn.fromArray(k),a.openStart,a.openEnd)}const d=e.tr.replaceSelection(a);for(const g of u)d.step(new gh(null,g));c.length>0&&d.setMeta(mh,{captures:c});const f=new Set(o.map(g=>g.attId)),h=s.filter(g=>!f.has(g.attId));if(n===void 0){const g=h.map(y=>({type:"upsert",entry:y}));g.length>0&&d.setMeta(W6,g)}else for(const g of h)n.upsert(g);const m=eu.getState(e);if(m!==void 0){const g=jee(a);let y=m.orderedIds.length;for(const v of g)m.activeIds.has(v)||(d.step(H9(e,v,y)),y+=1)}return d.scrollIntoView()}function jee(e){const t=[];return e.content.descendants(n=>{if(n.type!==Qn.nodes.attachment)return!0;const i=n.attrs.attId;return t.includes(i)||t.push(i),!1}),t}function Wee(e,t,n){const i=new Set(jee(e)),o=new Set;if(e.content.descendants(d=>{d.type===Qn.nodes.browser_reference&&o.add(d.attrs.refId)}),e.content.size===0)return null;const s=[...o].flatMap(d=>n?.references.get(d)??[]),a=[...new Set(s.map(d=>d.captureId))].flatMap(d=>n?.captures.get(d)??[]);for(const d of a)d.screenshot!==void 0&&i.add(d.screenshot.attachmentId);const l=[...i].map(d=>t(d)).filter(d=>d!==void 0).map(G7),c={v:1,slice:e.toJSON(),attachments:l,...s.length===0?{}:{browserReferences:s},...a.length===0?{}:{browserCaptures:a}};return{plain:Dee(e,(d,f)=>{const h=n?.references.get(d),m=h===void 0?void 0:n?.captures.get(h.captureId);return[f,m?.page.url,h?.comment].filter(Boolean).join(` +`)}),flavor:JSON.stringify(c)}}const BCe=50,Wy=new Map;function qee(e){const t=Y1()+Y1();for(Wy.set(t,e);Wy.size>BCe;){const n=Wy.keys().next().value;if(n===void 0)break;Wy.delete(n)}return JSON.stringify({v:2,ref:t})}function zCe(e){try{const t=JSON.parse(e);if(typeof t=="object"&&t!==null){const n=t;if(n.v===2&&typeof n.ref=="string")return Wy.get(n.ref)}}catch{}return e}function Vee(e,t){const n=t===void 0||t.fileId===void 0;return{attId:e.attId,key:t?.fileId?t.sessionId!==void 0?`blob:${t.sessionId}:${t.fileId}`:`blob:${t.fileId}`:`blob:${e.attId}`,kind:t!==void 0&&(t.kind==="image"||t.kind==="video")?t.kind:e.kind,name:t?.name??e.name,size:t?.size,mediaType:t?.mediaType,...t?.mediaOrdinal===void 0?{}:{mediaOrdinal:t.mediaOrdinal},refCount:0,uploading:!1,fileId:t?.fileId,sessionId:t?.sessionId,error:n?"upload-interrupted":void 0}}function HCe(e,t){const n=du(e),i=eP(e).some(a=>a.type==="quote");if(n.length===0&&!i)return;const o=B2(Lee(e),{reviveMentions:!0,attachmentKindFor:a=>um(a,t)?.kind}),s=n.map(a=>Vee(a.attrs,um(a.attrs.attId,t))),r={v:1,slice:jn.maxOpen(o.content).toJSON()??{},attachments:s};return JSON.stringify(r)}const JT=` + + + + +`,Uee=` + + + + +`,Kee='',Zee=` + + + +`,Gee=` + + +`,Qee='',Yee=` + + +`,Jee=` + + +`,Xee=` + + +`,jCe='',WCe='',qCe='',VCe='',UCe='',ete=` + + +`,KCe={sm:14,md:16,lg:20},ZCe={file:JT,folder:Uee,skill:Kee,copy:Zee,check:Gee,"external-link":Qee,target:Yee,"file-edit":Jee,close:Xee,attachment:jCe,image:WCe,video:qCe,fullscreen:VCe,quote:UCe,browser:ete};function Ra(e,t="md"){const n=KCe[t];return ZCe[e].replace(/]*>/,i=>i.replace(/\s(?:width|height)="[^"]*"/g,"")).replace(/^