@fantasticit/sumi 0.14.4 → 0.14.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-hooks.js +15 -2
- package/dist/agent-hooks.js.map +1 -1
- package/dist/agents.js +14 -9
- package/dist/agents.js.map +1 -1
- package/dist/cli.js +20 -3
- package/dist/cli.js.map +1 -1
- package/dist/codex-trust.d.ts +8 -0
- package/dist/codex-trust.js +27 -0
- package/dist/codex-trust.js.map +1 -0
- package/dist/codex-user-hook-entry.d.ts +1 -0
- package/dist/codex-user-hook-entry.js +134 -0
- package/dist/codex-user-hook-entry.js.map +1 -0
- package/dist/codex-user-hook.cjs +137 -0
- package/dist/codex-user-hook.d.ts +2 -0
- package/dist/codex-user-hook.js +85 -0
- package/dist/codex-user-hook.js.map +1 -0
- package/dist/context-providers.js +1 -3
- package/dist/context-providers.js.map +1 -1
- package/dist/context.d.ts +3 -1
- package/dist/context.js +16 -16
- package/dist/context.js.map +1 -1
- package/dist/doctor-wiring.d.ts +1 -6
- package/dist/doctor-wiring.js +4 -25
- package/dist/doctor-wiring.js.map +1 -1
- package/dist/hub/board.d.ts +85 -0
- package/dist/hub/board.js +261 -0
- package/dist/hub/board.js.map +1 -0
- package/dist/hub/commands.d.ts +13 -0
- package/dist/hub/commands.js +86 -0
- package/dist/hub/commands.js.map +1 -0
- package/dist/hub/pages.d.ts +2 -0
- package/dist/hub/pages.js +136 -0
- package/dist/hub/pages.js.map +1 -0
- package/dist/hub/server.d.ts +23 -0
- package/dist/hub/server.js +128 -0
- package/dist/hub/server.js.map +1 -0
- package/dist/hub/snapshot.d.ts +48 -0
- package/dist/hub/snapshot.js +132 -0
- package/dist/hub/snapshot.js.map +1 -0
- package/dist/hub/start.d.ts +13 -0
- package/dist/hub/start.js +59 -0
- package/dist/hub/start.js.map +1 -0
- package/dist/hub/state.d.ts +49 -0
- package/dist/hub/state.js +144 -0
- package/dist/hub/state.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/instructions.js +1 -1
- package/dist/launcher.cjs +209 -155
- package/dist/run-stats.d.ts +20 -0
- package/dist/run-stats.js +58 -6
- package/dist/run-stats.js.map +1 -1
- package/dist/task.js +8 -2
- package/dist/task.js.map +1 -1
- package/node_modules/@sumi/create/package.json +2 -2
- package/node_modules/@sumi/create/template/control/flows/change.flow.yaml +1 -1
- package/node_modules/@sumi/create/template/control/flows/check.flow.yaml +8 -0
- package/node_modules/@sumi/create/template/control/flows/checkpoint.flow.yaml +8 -0
- package/node_modules/@sumi/create/template/control/rubrics/slice.yaml +14 -0
- package/node_modules/@sumi/create/template/control/rules/development.md +1 -1
- package/node_modules/@sumi/create/template/init/control/flows/change.flow.yaml +1 -1
- package/node_modules/@sumi/create/template/init/control/flows/check.flow.yaml +21 -0
- package/node_modules/@sumi/kernel/dist/brief.d.ts +2 -0
- package/node_modules/@sumi/kernel/dist/brief.js.map +1 -1
- package/node_modules/@sumi/kernel/dist/config.d.ts +1 -6
- package/node_modules/@sumi/kernel/dist/config.js +5 -16
- package/node_modules/@sumi/kernel/dist/config.js.map +1 -1
- package/node_modules/@sumi/kernel/dist/engine.js +6 -1
- package/node_modules/@sumi/kernel/dist/engine.js.map +1 -1
- package/node_modules/@sumi/kernel/dist/flow.d.ts +1 -0
- package/node_modules/@sumi/kernel/dist/flow.js +9 -1
- package/node_modules/@sumi/kernel/dist/flow.js.map +1 -1
- package/node_modules/@sumi/kernel/dist/plan.d.ts +2 -0
- package/node_modules/@sumi/kernel/dist/plan.js +8 -1
- package/node_modules/@sumi/kernel/dist/plan.js.map +1 -1
- package/node_modules/@sumi/kernel/dist/registry.d.ts +2 -3
- package/node_modules/@sumi/kernel/dist/registry.js +5 -6
- package/node_modules/@sumi/kernel/dist/registry.js.map +1 -1
- package/node_modules/@sumi/kernel/dist/runner.js +1 -1
- package/node_modules/@sumi/kernel/dist/runner.js.map +1 -1
- package/node_modules/@sumi/kernel/dist/runtime.d.ts +11 -0
- package/node_modules/@sumi/kernel/dist/runtime.js +34 -2
- package/node_modules/@sumi/kernel/dist/runtime.js.map +1 -1
- package/node_modules/@sumi/kernel/dist/step-cache.js +1 -0
- package/node_modules/@sumi/kernel/dist/step-cache.js.map +1 -1
- package/node_modules/@sumi/kernel/dist/step.d.ts +1 -0
- package/node_modules/@sumi/kernel/dist/step.js +1 -0
- package/node_modules/@sumi/kernel/dist/step.js.map +1 -1
- package/node_modules/@sumi/kernel/package.json +2 -2
- package/node_modules/@sumi/plugin-sdk/README.md +8 -0
- package/node_modules/@sumi/plugin-sdk/dist/context-delivery.d.ts +11 -6
- package/node_modules/@sumi/plugin-sdk/dist/context-delivery.js +35 -3
- package/node_modules/@sumi/plugin-sdk/dist/context-delivery.js.map +1 -1
- package/node_modules/@sumi/plugin-sdk/dist/edit-paths.d.ts +2 -0
- package/node_modules/@sumi/plugin-sdk/dist/edit-paths.js +29 -23
- package/node_modules/@sumi/plugin-sdk/dist/edit-paths.js.map +1 -1
- package/node_modules/@sumi/plugin-sdk/dist/env.d.ts +2 -0
- package/node_modules/@sumi/plugin-sdk/dist/env.js +7 -0
- package/node_modules/@sumi/plugin-sdk/dist/env.js.map +1 -1
- package/node_modules/@sumi/plugin-sdk/dist/git.d.ts +8 -0
- package/node_modules/@sumi/plugin-sdk/dist/git.js +38 -0
- package/node_modules/@sumi/plugin-sdk/dist/git.js.map +1 -1
- package/node_modules/@sumi/plugin-sdk/dist/html-page.d.ts +10 -2
- package/node_modules/@sumi/plugin-sdk/dist/html-page.js +14 -5
- package/node_modules/@sumi/plugin-sdk/dist/html-page.js.map +1 -1
- package/node_modules/@sumi/plugin-sdk/dist/hub.d.ts +31 -0
- package/node_modules/@sumi/plugin-sdk/dist/hub.js +32 -0
- package/node_modules/@sumi/plugin-sdk/dist/hub.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/import-graph.d.ts +22 -0
- package/node_modules/@sumi/plugin-sdk/dist/import-graph.js +118 -0
- package/node_modules/@sumi/plugin-sdk/dist/import-graph.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/index.d.ts +3 -0
- package/node_modules/@sumi/plugin-sdk/dist/index.js +3 -0
- package/node_modules/@sumi/plugin-sdk/dist/index.js.map +1 -1
- package/node_modules/@sumi/plugin-sdk/dist/permissions.d.ts +2 -0
- package/node_modules/@sumi/plugin-sdk/dist/permissions.js +12 -1
- package/node_modules/@sumi/plugin-sdk/dist/permissions.js.map +1 -1
- package/node_modules/@sumi/plugin-sdk/dist/protocol.d.ts +4 -0
- package/node_modules/@sumi/plugin-sdk/dist/protocol.js.map +1 -1
- package/node_modules/@sumi/plugin-sdk/dist/scenario-selection.d.ts +20 -0
- package/node_modules/@sumi/plugin-sdk/dist/scenario-selection.js +18 -0
- package/node_modules/@sumi/plugin-sdk/dist/scenario-selection.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/session-context.d.ts +2 -2
- package/node_modules/@sumi/plugin-sdk/dist/session-context.js +10 -7
- package/node_modules/@sumi/plugin-sdk/dist/session-context.js.map +1 -1
- package/node_modules/@sumi/plugin-sdk/dist/session-env.d.ts +2 -0
- package/node_modules/@sumi/plugin-sdk/dist/session-env.js +3 -0
- package/node_modules/@sumi/plugin-sdk/dist/session-env.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/shell.d.ts +11 -5
- package/node_modules/@sumi/plugin-sdk/dist/shell.js +132 -23
- package/node_modules/@sumi/plugin-sdk/dist/shell.js.map +1 -1
- package/node_modules/@sumi/plugin-sdk/dist/validate.js +5 -0
- package/node_modules/@sumi/plugin-sdk/dist/validate.js.map +1 -1
- package/node_modules/@sumi/plugin-sdk/package.json +1 -1
- package/node_modules/@sumi/plugins-core/dist/agent-rules.js +20 -5
- package/node_modules/@sumi/plugins-core/dist/agent-rules.js.map +1 -1
- package/node_modules/@sumi/plugins-core/dist/change-impact.js +1 -13
- package/node_modules/@sumi/plugins-core/dist/change-impact.js.map +1 -1
- package/node_modules/@sumi/plugins-core/dist/commands/agent-rules-subagent-context.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/commands/agent-rules-subagent-context.js +10 -0
- package/node_modules/@sumi/plugins-core/dist/commands/agent-rules-subagent-context.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/commands/context-impact.js +1 -3
- package/node_modules/@sumi/plugins-core/dist/commands/context-impact.js.map +1 -1
- package/node_modules/@sumi/plugins-core/dist/plugins/test-affected.js +26 -7
- package/node_modules/@sumi/plugins-core/dist/plugins/test-affected.js.map +1 -1
- package/node_modules/@sumi/plugins-core/dist/test-scope.d.ts +3 -1
- package/node_modules/@sumi/plugins-core/dist/test-scope.js +14 -3
- package/node_modules/@sumi/plugins-core/dist/test-scope.js.map +1 -1
- package/node_modules/@sumi/plugins-core/dist/vitest-runner.js +16 -0
- package/node_modules/@sumi/plugins-core/dist/vitest-runner.js.map +1 -1
- package/node_modules/@sumi/plugins-core/instructions/bugfix.md +1 -1
- package/node_modules/@sumi/plugins-core/instructions/feature.md +1 -1
- package/node_modules/@sumi/plugins-core/package.json +2 -2
- package/node_modules/@sumi/plugins-core/sumi-plugins.yaml +6 -0
- package/node_modules/@sumi/plugins-governance/README.md +16 -1
- package/node_modules/@sumi/plugins-governance/dist/boundary-answer-page.d.ts +3 -0
- package/node_modules/@sumi/plugins-governance/dist/boundary-answer-page.js +76 -0
- package/node_modules/@sumi/plugins-governance/dist/boundary-answer-page.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/boundary-browser.d.ts +6 -0
- package/node_modules/@sumi/plugins-governance/dist/boundary-browser.js +121 -0
- package/node_modules/@sumi/plugins-governance/dist/boundary-browser.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/boundary-form.d.ts +18 -0
- package/node_modules/@sumi/plugins-governance/dist/boundary-form.js +97 -0
- package/node_modules/@sumi/plugins-governance/dist/boundary-form.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/boundary-mcp.d.ts +1 -0
- package/node_modules/@sumi/plugins-governance/dist/boundary-mcp.js +179 -0
- package/node_modules/@sumi/plugins-governance/dist/boundary-mcp.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/boundary.d.ts +10 -0
- package/node_modules/@sumi/plugins-governance/dist/boundary.js +136 -30
- package/node_modules/@sumi/plugins-governance/dist/boundary.js.map +1 -1
- package/node_modules/@sumi/plugins-governance/dist/branch-scope.d.ts +9 -0
- package/node_modules/@sumi/plugins-governance/dist/branch-scope.js +64 -0
- package/node_modules/@sumi/plugins-governance/dist/branch-scope.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/checkout.d.ts +2 -0
- package/node_modules/@sumi/plugins-governance/dist/checkout.js +13 -3
- package/node_modules/@sumi/plugins-governance/dist/checkout.js.map +1 -1
- package/node_modules/@sumi/plugins-governance/dist/commands/boundary.js +59 -9
- package/node_modules/@sumi/plugins-governance/dist/commands/boundary.js.map +1 -1
- package/node_modules/@sumi/plugins-governance/dist/commands/gate.js +16 -14
- package/node_modules/@sumi/plugins-governance/dist/commands/gate.js.map +1 -1
- package/node_modules/@sumi/plugins-governance/dist/commands/hub-snapshot.d.ts +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/hub-snapshot.js +4 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/hub-snapshot.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/pr-report.js +7 -1
- package/node_modules/@sumi/plugins-governance/dist/commands/pr-report.js.map +1 -1
- package/node_modules/@sumi/plugins-governance/dist/commands/run-policy.js +1 -3
- package/node_modules/@sumi/plugins-governance/dist/commands/run-policy.js.map +1 -1
- package/node_modules/@sumi/plugins-governance/dist/extensions.d.ts +2 -0
- package/node_modules/@sumi/plugins-governance/dist/extensions.js +32 -0
- package/node_modules/@sumi/plugins-governance/dist/extensions.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/gate-cache.d.ts +2 -1
- package/node_modules/@sumi/plugins-governance/dist/gate-cache.js +11 -2
- package/node_modules/@sumi/plugins-governance/dist/gate-cache.js.map +1 -1
- package/node_modules/@sumi/plugins-governance/dist/guard.js +147 -19
- package/node_modules/@sumi/plugins-governance/dist/guard.js.map +1 -1
- package/node_modules/@sumi/plugins-governance/dist/hub-snapshot.d.ts +3 -0
- package/node_modules/@sumi/plugins-governance/dist/hub-snapshot.js +40 -0
- package/node_modules/@sumi/plugins-governance/dist/hub-snapshot.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/index.d.ts +3 -1
- package/node_modules/@sumi/plugins-governance/dist/index.js +3 -1
- package/node_modules/@sumi/plugins-governance/dist/index.js.map +1 -1
- package/node_modules/@sumi/plugins-governance/dist/plugins/size-budget.d.ts +1 -0
- package/node_modules/@sumi/plugins-governance/dist/plugins/size-budget.js +4 -0
- package/node_modules/@sumi/plugins-governance/dist/plugins/size-budget.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-base.js +21 -1
- package/node_modules/@sumi/plugins-governance/dist/pr-base.js.map +1 -1
- package/node_modules/@sumi/plugins-governance/dist/pr-report-compose.js +25 -12
- package/node_modules/@sumi/plugins-governance/dist/pr-report-compose.js.map +1 -1
- package/node_modules/@sumi/plugins-governance/dist/pr-report-markers.d.ts +2 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-report-markers.js +2 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-report-markers.js.map +1 -1
- package/node_modules/@sumi/plugins-governance/dist/pr-report-sections.js +34 -4
- package/node_modules/@sumi/plugins-governance/dist/pr-report-sections.js.map +1 -1
- package/node_modules/@sumi/plugins-governance/dist/preflight.d.ts +1 -0
- package/node_modules/@sumi/plugins-governance/dist/preflight.js +2 -2
- package/node_modules/@sumi/plugins-governance/dist/preflight.js.map +1 -1
- package/node_modules/@sumi/plugins-governance/dist/protected.d.ts +2 -0
- package/node_modules/@sumi/plugins-governance/dist/protected.js +4 -0
- package/node_modules/@sumi/plugins-governance/dist/protected.js.map +1 -1
- package/node_modules/@sumi/plugins-governance/dist/size-budget.d.ts +2 -0
- package/node_modules/@sumi/plugins-governance/dist/size-budget.js +73 -0
- package/node_modules/@sumi/plugins-governance/dist/size-budget.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/upgrade-command.js +12 -5
- package/node_modules/@sumi/plugins-governance/dist/upgrade-command.js.map +1 -1
- package/node_modules/@sumi/plugins-governance/dist/view-page.d.ts +1 -0
- package/node_modules/@sumi/plugins-governance/dist/view-page.js +19 -18
- package/node_modules/@sumi/plugins-governance/dist/view-page.js.map +1 -1
- package/node_modules/@sumi/plugins-governance/instructions/boundary.md +18 -2
- package/node_modules/@sumi/plugins-governance/package.json +4 -4
- package/node_modules/@sumi/plugins-governance/sumi-plugins.yaml +12 -0
- package/node_modules/@sumi/plugins-openspec/README.md +36 -12
- package/node_modules/@sumi/plugins-openspec/dist/checkpoint-hook.d.ts +4 -0
- package/node_modules/@sumi/plugins-openspec/dist/checkpoint-hook.js +34 -0
- package/node_modules/@sumi/plugins-openspec/dist/checkpoint-hook.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/commands/checkpoint-after-edit.d.ts +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/commands/checkpoint-after-edit.js +9 -0
- package/node_modules/@sumi/plugins-openspec/dist/commands/checkpoint-after-edit.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/commands/hub-snapshot.d.ts +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/commands/hub-snapshot.js +4 -0
- package/node_modules/@sumi/plugins-openspec/dist/commands/hub-snapshot.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/commands/pr-dependencies.d.ts +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/commands/pr-dependencies.js +10 -0
- package/node_modules/@sumi/plugins-openspec/dist/commands/pr-dependencies.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/commands/size-groups.d.ts +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/commands/size-groups.js +12 -0
- package/node_modules/@sumi/plugins-openspec/dist/commands/size-groups.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/commands/slice-record.d.ts +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/commands/slice-record.js +28 -0
- package/node_modules/@sumi/plugins-openspec/dist/commands/slice-record.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/hub-snapshot.d.ts +4 -0
- package/node_modules/@sumi/plugins-openspec/dist/hub-snapshot.js +34 -0
- package/node_modules/@sumi/plugins-openspec/dist/hub-snapshot.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/index.d.ts +4 -0
- package/node_modules/@sumi/plugins-openspec/dist/index.js +4 -0
- package/node_modules/@sumi/plugins-openspec/dist/index.js.map +1 -1
- package/node_modules/@sumi/plugins-openspec/dist/plugins/change-tasks.js +7 -2
- package/node_modules/@sumi/plugins-openspec/dist/plugins/change-tasks.js.map +1 -1
- package/node_modules/@sumi/plugins-openspec/dist/plugins/impact-consistency.js +2 -0
- package/node_modules/@sumi/plugins-openspec/dist/plugins/impact-consistency.js.map +1 -1
- package/node_modules/@sumi/plugins-openspec/dist/plugins/planner.js +35 -0
- package/node_modules/@sumi/plugins-openspec/dist/plugins/planner.js.map +1 -1
- package/node_modules/@sumi/plugins-openspec/dist/slice-check.d.ts +3 -0
- package/node_modules/@sumi/plugins-openspec/dist/slice-check.js +13 -0
- package/node_modules/@sumi/plugins-openspec/dist/slice-check.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/slice-ledger.d.ts +19 -0
- package/node_modules/@sumi/plugins-openspec/dist/slice-ledger.js +179 -0
- package/node_modules/@sumi/plugins-openspec/dist/slice-ledger.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/slice.d.ts +2 -0
- package/node_modules/@sumi/plugins-openspec/dist/slice.js +134 -0
- package/node_modules/@sumi/plugins-openspec/dist/slice.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/task-groups.d.ts +12 -0
- package/node_modules/@sumi/plugins-openspec/dist/task-groups.js +21 -0
- package/node_modules/@sumi/plugins-openspec/dist/task-groups.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/upgrade-command.d.ts +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/upgrade-command.js +7 -0
- package/node_modules/@sumi/plugins-openspec/dist/upgrade-command.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/package.json +8 -4
- package/node_modules/@sumi/plugins-openspec/sumi-plugins.yaml +30 -0
- package/node_modules/@sumi/plugins-precedent/dist/after-edit-context.js +10 -11
- package/node_modules/@sumi/plugins-precedent/dist/after-edit-context.js.map +1 -1
- package/node_modules/@sumi/plugins-precedent/dist/candidates.d.ts +9 -3
- package/node_modules/@sumi/plugins-precedent/dist/candidates.js +12 -6
- package/node_modules/@sumi/plugins-precedent/dist/candidates.js.map +1 -1
- package/node_modules/@sumi/plugins-precedent/dist/commands/promote.js +20 -5
- package/node_modules/@sumi/plugins-precedent/dist/commands/promote.js.map +1 -1
- package/node_modules/@sumi/plugins-precedent/dist/context-output.d.ts +15 -8
- package/node_modules/@sumi/plugins-precedent/dist/context-output.js +93 -34
- package/node_modules/@sumi/plugins-precedent/dist/context-output.js.map +1 -1
- package/node_modules/@sumi/plugins-precedent/dist/context-provider.js +7 -3
- package/node_modules/@sumi/plugins-precedent/dist/context-provider.js.map +1 -1
- package/node_modules/@sumi/plugins-precedent/dist/impact-state.d.ts +2 -1
- package/node_modules/@sumi/plugins-precedent/dist/impact-state.js +5 -4
- package/node_modules/@sumi/plugins-precedent/dist/impact-state.js.map +1 -1
- package/node_modules/@sumi/plugins-precedent/dist/impact.d.ts +7 -6
- package/node_modules/@sumi/plugins-precedent/dist/impact.js +33 -29
- package/node_modules/@sumi/plugins-precedent/dist/impact.js.map +1 -1
- package/node_modules/@sumi/plugins-precedent/dist/matching.d.ts +12 -0
- package/node_modules/@sumi/plugins-precedent/dist/matching.js +90 -0
- package/node_modules/@sumi/plugins-precedent/dist/matching.js.map +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/harvest.js +44 -13
- package/node_modules/@sumi/plugins-precedent/dist/plugins/harvest.js.map +1 -1
- package/node_modules/@sumi/plugins-precedent/dist/plugins/impact.js +15 -10
- package/node_modules/@sumi/plugins-precedent/dist/plugins/impact.js.map +1 -1
- package/node_modules/@sumi/plugins-precedent/dist/plugins/planner.js +47 -6
- package/node_modules/@sumi/plugins-precedent/dist/plugins/planner.js.map +1 -1
- package/node_modules/@sumi/plugins-precedent/dist/review-candidates.d.ts +3 -0
- package/node_modules/@sumi/plugins-precedent/dist/review-candidates.js +40 -0
- package/node_modules/@sumi/plugins-precedent/dist/review-candidates.js.map +1 -0
- package/node_modules/@sumi/plugins-precedent/package.json +3 -3
- package/node_modules/@sumi/plugins-review/README.md +8 -0
- package/node_modules/@sumi/plugins-review/dist/batch-request.d.ts +4 -0
- package/node_modules/@sumi/plugins-review/dist/batch-request.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/checkpoint.d.ts +6 -0
- package/node_modules/@sumi/plugins-review/dist/checkpoint.js +76 -0
- package/node_modules/@sumi/plugins-review/dist/checkpoint.js.map +1 -0
- package/node_modules/@sumi/plugins-review/dist/command-input.d.ts +1 -1
- package/node_modules/@sumi/plugins-review/dist/command-input.js +4 -4
- package/node_modules/@sumi/plugins-review/dist/command-input.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/commands/preflight.js +0 -2
- package/node_modules/@sumi/plugins-review/dist/commands/preflight.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/commands/stats.js +3 -3
- package/node_modules/@sumi/plugins-review/dist/commands/stats.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/commands/submit.js +20 -6
- package/node_modules/@sumi/plugins-review/dist/commands/submit.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/convergence.d.ts +7 -2
- package/node_modules/@sumi/plugins-review/dist/convergence.js +43 -5
- package/node_modules/@sumi/plugins-review/dist/convergence.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/dispatch.d.ts +1 -0
- package/node_modules/@sumi/plugins-review/dist/dispatch.js +21 -12
- package/node_modules/@sumi/plugins-review/dist/dispatch.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/plugins/checkpoint-save.d.ts +1 -0
- package/node_modules/@sumi/plugins-review/dist/plugins/checkpoint-save.js +4 -0
- package/node_modules/@sumi/plugins-review/dist/plugins/checkpoint-save.js.map +1 -0
- package/node_modules/@sumi/plugins-review/dist/plugins/checkpoint.d.ts +1 -0
- package/node_modules/@sumi/plugins-review/dist/plugins/checkpoint.js +4 -0
- package/node_modules/@sumi/plugins-review/dist/plugins/checkpoint.js.map +1 -0
- package/node_modules/@sumi/plugins-review/dist/plugins/dispatch.js +15 -3
- package/node_modules/@sumi/plugins-review/dist/plugins/dispatch.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/plugins/independent-recheck.js +1 -1
- package/node_modules/@sumi/plugins-review/dist/plugins/independent-recheck.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/plugins/validation.js +2 -1
- package/node_modules/@sumi/plugins-review/dist/plugins/validation.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/precedent-context.d.ts +7 -0
- package/node_modules/@sumi/plugins-review/dist/precedent-context.js +28 -0
- package/node_modules/@sumi/plugins-review/dist/precedent-context.js.map +1 -0
- package/node_modules/@sumi/plugins-review/dist/preflight.d.ts +1 -0
- package/node_modules/@sumi/plugins-review/dist/preflight.js +32 -24
- package/node_modules/@sumi/plugins-review/dist/preflight.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/report.d.ts +9 -0
- package/node_modules/@sumi/plugins-review/dist/report.js +28 -7
- package/node_modules/@sumi/plugins-review/dist/report.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/resolved-blockers.d.ts +9 -0
- package/node_modules/@sumi/plugins-review/dist/resolved-blockers.js +50 -0
- package/node_modules/@sumi/plugins-review/dist/resolved-blockers.js.map +1 -0
- package/node_modules/@sumi/plugins-review/dist/review-evidence.d.ts +2 -2
- package/node_modules/@sumi/plugins-review/dist/review-evidence.js +24 -12
- package/node_modules/@sumi/plugins-review/dist/review-evidence.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/review-scope.d.ts +1 -0
- package/node_modules/@sumi/plugins-review/dist/review-scope.js +2 -0
- package/node_modules/@sumi/plugins-review/dist/review-scope.js.map +1 -0
- package/node_modules/@sumi/plugins-review/dist/review-slices.d.ts +13 -0
- package/node_modules/@sumi/plugins-review/dist/review-slices.js +60 -0
- package/node_modules/@sumi/plugins-review/dist/review-slices.js.map +1 -0
- package/node_modules/@sumi/plugins-review/dist/review.d.ts +103 -24
- package/node_modules/@sumi/plugins-review/dist/review.js +439 -84
- package/node_modules/@sumi/plugins-review/dist/review.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/rubric-check.d.ts +3 -1
- package/node_modules/@sumi/plugins-review/dist/rubric-check.js +232 -72
- package/node_modules/@sumi/plugins-review/dist/rubric-check.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/startup-context.js +3 -2
- package/node_modules/@sumi/plugins-review/dist/startup-context.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/stats.d.ts +1 -0
- package/node_modules/@sumi/plugins-review/dist/stats.js +11 -15
- package/node_modules/@sumi/plugins-review/dist/stats.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/submission.js +92 -42
- package/node_modules/@sumi/plugins-review/dist/submission.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/submit-continuation.d.ts +2 -0
- package/node_modules/@sumi/plugins-review/dist/submit-continuation.js +143 -0
- package/node_modules/@sumi/plugins-review/dist/submit-continuation.js.map +1 -0
- package/node_modules/@sumi/plugins-review/dist/submit-files.d.ts +3 -0
- package/node_modules/@sumi/plugins-review/dist/submit-files.js +55 -0
- package/node_modules/@sumi/plugins-review/dist/submit-files.js.map +1 -0
- package/node_modules/@sumi/plugins-review/dist/support-scope.d.ts +2 -0
- package/node_modules/@sumi/plugins-review/dist/support-scope.js +15 -0
- package/node_modules/@sumi/plugins-review/dist/support-scope.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/tickets.d.ts +2 -0
- package/node_modules/@sumi/plugins-review/dist/tickets.js +41 -3
- package/node_modules/@sumi/plugins-review/dist/tickets.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/upgrade-flow-plan.js +27 -0
- package/node_modules/@sumi/plugins-review/dist/upgrade-flow-plan.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/upgrade.js +10 -1
- package/node_modules/@sumi/plugins-review/dist/upgrade.js.map +1 -1
- package/node_modules/@sumi/plugins-review/dist/validation-receipt.js +4 -2
- package/node_modules/@sumi/plugins-review/dist/validation-receipt.js.map +1 -1
- package/node_modules/@sumi/plugins-review/package.json +6 -6
- package/node_modules/@sumi/plugins-review/sumi-plugins.yaml +12 -0
- package/package.json +10 -10
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { execFileSync, spawn } from 'node:child_process';
|
|
2
|
+
import { existsSync, readFileSync, realpathSync } from 'node:fs';
|
|
3
|
+
import { dirname, isAbsolute, join, resolve } from 'node:path';
|
|
4
|
+
import { parse } from 'yaml';
|
|
5
|
+
import { codexHome, codexHookPositions, codexTrustedPositions, untrustedCodexPositions } from './codex-trust.js';
|
|
6
|
+
const events = {
|
|
7
|
+
SessionStart: 'session-start',
|
|
8
|
+
SubagentStart: 'subagent-start',
|
|
9
|
+
PostCompact: 'post-compact',
|
|
10
|
+
PreToolUse: 'before-tool',
|
|
11
|
+
PostToolUse: 'after-tool',
|
|
12
|
+
UserPromptSubmit: 'user-prompt',
|
|
13
|
+
Stop: 'stop',
|
|
14
|
+
};
|
|
15
|
+
function projectRoot(cwd) {
|
|
16
|
+
for (let dir = resolve(cwd);; dir = dirname(dir)) {
|
|
17
|
+
const config = ['control/config.yaml', 'sumi.config.yaml'].map((rel) => join(dir, rel)).find(existsSync);
|
|
18
|
+
if (config) {
|
|
19
|
+
const value = parse(readFileSync(config, 'utf8'));
|
|
20
|
+
return Array.isArray(value?.agents) && value.agents.includes('codex') && existsSync(join(dir, '.codex/hooks.json')) ? dir : null;
|
|
21
|
+
}
|
|
22
|
+
if (dirname(dir) === dir)
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function commonDir(root) {
|
|
27
|
+
const path = execFileSync('git', ['rev-parse', '--path-format=absolute', '--git-common-dir'], {
|
|
28
|
+
cwd: root,
|
|
29
|
+
encoding: 'utf8',
|
|
30
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
31
|
+
windowsHide: true,
|
|
32
|
+
}).trim();
|
|
33
|
+
return realpathSync(path);
|
|
34
|
+
}
|
|
35
|
+
function approvedPeer(root, file, trusted) {
|
|
36
|
+
const common = commonDir(root);
|
|
37
|
+
const bytes = readFileSync(file);
|
|
38
|
+
const candidates = new Set([...trusted].flatMap((key) => {
|
|
39
|
+
const match = /^(.*[/\\]\.codex[/\\]hooks\.json):[a-z_]+:\d+:\d+$/.exec(key);
|
|
40
|
+
return match ? [match[1]] : [];
|
|
41
|
+
}));
|
|
42
|
+
return [...candidates].some((candidate) => {
|
|
43
|
+
try {
|
|
44
|
+
if (!isAbsolute(candidate) || !bytes.equals(readFileSync(candidate)))
|
|
45
|
+
return false;
|
|
46
|
+
const positions = codexHookPositions(candidate);
|
|
47
|
+
if (!positions.length || untrustedCodexPositions(candidate, trusted).length)
|
|
48
|
+
return false;
|
|
49
|
+
return commonDir(dirname(dirname(candidate))) === common;
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/** 只认生成的 bootstrap 命令,绝不把已读配置交给 shell 执行。 */
|
|
57
|
+
function invocation(hook, event) {
|
|
58
|
+
if (hook.type !== 'command' || typeof hook.command !== 'string')
|
|
59
|
+
return null;
|
|
60
|
+
const prefix = 'node "$(git rev-parse --show-toplevel)/control/bin/sumi-hook.cjs" hook ';
|
|
61
|
+
if (!hook.command.startsWith(prefix))
|
|
62
|
+
return null;
|
|
63
|
+
const match = /^([a-z-]+) codex (control\/bin\/sumi\.cjs|node_modules\/(?:@fantasticit\/sumi|@sumi\/cli)\/dist\/bin\.js)( \|\| exit 2)?$/.exec(hook.command.slice(prefix.length));
|
|
64
|
+
if (!match || match[1] !== events[event])
|
|
65
|
+
return null;
|
|
66
|
+
return { args: ['hook', match[1], 'codex', match[2]], closed: !!match[3] };
|
|
67
|
+
}
|
|
68
|
+
async function run(raw) {
|
|
69
|
+
// 在开始执行项目前,任何无法核验的状态都静默放行。
|
|
70
|
+
let root;
|
|
71
|
+
let cwd;
|
|
72
|
+
let calls;
|
|
73
|
+
try {
|
|
74
|
+
const payload = JSON.parse(raw);
|
|
75
|
+
if (typeof payload.cwd !== 'string' || !isAbsolute(payload.cwd))
|
|
76
|
+
return 0;
|
|
77
|
+
cwd = payload.cwd;
|
|
78
|
+
const found = projectRoot(payload.cwd);
|
|
79
|
+
if (!found || typeof payload.hook_event_name !== 'string')
|
|
80
|
+
return 0;
|
|
81
|
+
root = found;
|
|
82
|
+
const event = payload.hook_event_name;
|
|
83
|
+
if (!Object.hasOwn(events, event))
|
|
84
|
+
return 0;
|
|
85
|
+
const file = join(root, '.codex/hooks.json');
|
|
86
|
+
const trusted = codexTrustedPositions(readFileSync(join(codexHome(), 'config.toml'), 'utf8'));
|
|
87
|
+
if (!trusted.size || !untrustedCodexPositions(file, trusted).length)
|
|
88
|
+
return 0;
|
|
89
|
+
if (!approvedPeer(root, file, trusted))
|
|
90
|
+
return 0;
|
|
91
|
+
const data = JSON.parse(readFileSync(file, 'utf8'));
|
|
92
|
+
calls = (data.hooks?.[event] ?? []).flatMap((group) => {
|
|
93
|
+
if (group.matcher && (typeof payload.tool_name !== 'string' || !new RegExp(group.matcher).test(payload.tool_name)))
|
|
94
|
+
return [];
|
|
95
|
+
return (group.hooks ?? []).flatMap((hook) => {
|
|
96
|
+
const call = invocation(hook, event);
|
|
97
|
+
return call ? [call] : [];
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
catch {
|
|
102
|
+
return 0;
|
|
103
|
+
}
|
|
104
|
+
for (const call of calls) {
|
|
105
|
+
const code = await new Promise((done) => {
|
|
106
|
+
const child = spawn(process.execPath, [join(root, 'control/bin/sumi-hook.cjs'), ...call.args], {
|
|
107
|
+
cwd,
|
|
108
|
+
stdio: ['pipe', 'inherit', 'inherit'],
|
|
109
|
+
windowsHide: true,
|
|
110
|
+
});
|
|
111
|
+
child.stdin.on('error', () => undefined);
|
|
112
|
+
child.stdin.end(raw);
|
|
113
|
+
child.on('error', () => done(1));
|
|
114
|
+
child.on('close', (status) => done(status ?? 1));
|
|
115
|
+
});
|
|
116
|
+
if (code)
|
|
117
|
+
return call.closed ? 2 : code;
|
|
118
|
+
}
|
|
119
|
+
return 0;
|
|
120
|
+
}
|
|
121
|
+
let input = '';
|
|
122
|
+
process.stdin.setEncoding('utf8');
|
|
123
|
+
process.stdin.on('data', (chunk) => {
|
|
124
|
+
input += chunk;
|
|
125
|
+
});
|
|
126
|
+
process.stdin.on('end', () => {
|
|
127
|
+
void run(input).then((code) => {
|
|
128
|
+
process.exitCode = code;
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
process.stdin.on('error', () => {
|
|
132
|
+
process.exitCode = 0;
|
|
133
|
+
});
|
|
134
|
+
//# sourceMappingURL=codex-user-hook-entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-user-hook-entry.js","sourceRoot":"","sources":["../src/codex-user-hook-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAUjH,MAAM,MAAM,GAA2B;IACrC,YAAY,EAAE,eAAe;IAC7B,aAAa,EAAE,gBAAgB;IAC/B,WAAW,EAAE,cAAc;IAC3B,UAAU,EAAE,aAAa;IACzB,WAAW,EAAE,YAAY;IACzB,gBAAgB,EAAE,aAAa;IAC/B,IAAI,EAAE,MAAM;CACb,CAAC;AAEF,SAAS,WAAW,CAAC,GAAW;IAC9B,KAAK,IAAI,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,GAAI,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAClD,MAAM,MAAM,GAAG,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACzG,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,KAAK,GAAG,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAgC,CAAC;YACjF,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;QACnI,CAAC;QACD,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,GAAG;YAAE,OAAO,IAAI,CAAC;IACxC,CAAC;AACH,CAAC;AACD,SAAS,SAAS,CAAC,IAAY;IAC7B,MAAM,IAAI,GAAG,YAAY,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE,wBAAwB,EAAE,kBAAkB,CAAC,EAAE;QAC5F,GAAG,EAAE,IAAI;QACT,QAAQ,EAAE,MAAM;QAChB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;QACnC,WAAW,EAAE,IAAI;KAClB,CAAC,CAAC,IAAI,EAAE,CAAC;IACV,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC;AACD,SAAS,YAAY,CAAC,IAAY,EAAE,IAAY,EAAE,OAAoB;IACpE,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,UAAU,GAAG,IAAI,GAAG,CACxB,CAAC,GAAG,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QAC3B,MAAM,KAAK,GAAG,oDAAoD,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC7E,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAClC,CAAC,CAAC,CACH,CAAC;IACF,OAAO,CAAC,GAAG,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE;QACxC,IAAI,CAAC;YACH,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;gBAAE,OAAO,KAAK,CAAC;YACnF,MAAM,SAAS,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;YAChD,IAAI,CAAC,SAAS,CAAC,MAAM,IAAI,uBAAuB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,MAAM;gBAAE,OAAO,KAAK,CAAC;YAC1F,OAAO,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC;QAC3D,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,6CAA6C;AAC7C,SAAS,UAAU,CAAC,IAAU,EAAE,KAAa;IAC3C,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC7E,MAAM,MAAM,GAAG,yEAAyE,CAAC;IACzF,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IAClD,MAAM,KAAK,GACT,2HAA2H,CAAC,IAAI,CAC9H,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAClC,CAAC;IACJ,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACtD,OAAO,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAE,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AAC/E,CAAC;AAED,KAAK,UAAU,GAAG,CAAC,GAAW;IAC5B,2BAA2B;IAC3B,IAAI,IAAY,CAAC;IACjB,IAAI,GAAW,CAAC;IAChB,IAAI,KAA4C,CAAC;IACjD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAsE,CAAC;QACrG,IAAI,OAAO,OAAO,CAAC,GAAG,KAAK,QAAQ,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC;YAAE,OAAO,CAAC,CAAC;QAC1E,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;QAClB,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACvC,IAAI,CAAC,KAAK,IAAI,OAAO,OAAO,CAAC,eAAe,KAAK,QAAQ;YAAE,OAAO,CAAC,CAAC;QACpE,IAAI,GAAG,KAAK,CAAC;QACb,MAAM,KAAK,GAAG,OAAO,CAAC,eAAe,CAAC;QACtC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;YAAE,OAAO,CAAC,CAAC;QAC5C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC;QAC7C,MAAM,OAAO,GAAG,qBAAqB,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,aAAa,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;QAC9F,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,uBAAuB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,MAAM;YAAE,OAAO,CAAC,CAAC;QAC9E,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC;YAAE,OAAO,CAAC,CAAC;QACjD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAwC,CAAC;QAC3F,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YACpD,IAAI,KAAK,CAAC,OAAO,IAAI,CAAC,OAAO,OAAO,CAAC,SAAS,KAAK,QAAQ,IAAI,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;gBAAE,OAAO,EAAE,CAAC;YAC9H,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBAC1C,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;gBACrC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC5B,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,CAAC;IACX,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,IAAI,GAAG,MAAM,IAAI,OAAO,CAAS,CAAC,IAAI,EAAE,EAAE;YAC9C,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,2BAA2B,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE;gBAC7F,GAAG;gBACH,KAAK,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC;gBACrC,WAAW,EAAE,IAAI;aAClB,CAAC,CAAC;YACH,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;YACzC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACrB,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;YACjC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;QACH,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1C,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED,IAAI,KAAK,GAAG,EAAE,CAAC;AACf,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AAClC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAa,EAAE,EAAE;IACzC,KAAK,IAAI,KAAK,CAAC;AACjB,CAAC,CAAC,CAAC;AACH,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;IAC3B,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QAC5B,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AACH,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;IAC7B,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";var Po=Object.create;var Mi=Object.defineProperty;var Mo=Object.getOwnPropertyDescriptor;var _o=Object.getOwnPropertyNames;var $o=Object.getPrototypeOf,Do=Object.prototype.hasOwnProperty;var g=(s,e)=>()=>{try{return e||s((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}};var Bo=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of _o(e))!Do.call(s,n)&&n!==t&&Mi(s,n,{get:()=>e[n],enumerable:!(i=Mo(e,n))||i.enumerable});return s};var Ko=(s,e,t)=>(t=s!=null?Po($o(s)):{},Bo(e||!s||!s.__esModule?Mi(t,"default",{value:s,enumerable:!0}):t,s));var q=g(P=>{"use strict";var Qt=Symbol.for("yaml.alias"),_i=Symbol.for("yaml.document"),Qe=Symbol.for("yaml.map"),$i=Symbol.for("yaml.pair"),Xt=Symbol.for("yaml.scalar"),Xe=Symbol.for("yaml.seq"),U=Symbol.for("yaml.node.type"),jo=s=>!!s&&typeof s=="object"&&s[U]===Qt,Fo=s=>!!s&&typeof s=="object"&&s[U]===_i,Ro=s=>!!s&&typeof s=="object"&&s[U]===Qe,Uo=s=>!!s&&typeof s=="object"&&s[U]===$i,Di=s=>!!s&&typeof s=="object"&&s[U]===Xt,Yo=s=>!!s&&typeof s=="object"&&s[U]===Xe;function Bi(s){if(s&&typeof s=="object")switch(s[U]){case Qe:case Xe:return!0}return!1}function Jo(s){if(s&&typeof s=="object")switch(s[U]){case Qt:case Qe:case Xt:case Xe:return!0}return!1}var Vo=s=>(Di(s)||Bi(s))&&!!s.anchor;P.ALIAS=Qt;P.DOC=_i;P.MAP=Qe;P.NODE_TYPE=U;P.PAIR=$i;P.SCALAR=Xt;P.SEQ=Xe;P.hasAnchor=Vo;P.isAlias=jo;P.isCollection=Bi;P.isDocument=Fo;P.isMap=Ro;P.isNode=Jo;P.isPair=Uo;P.isScalar=Di;P.isSeq=Yo});var Se=g(zt=>{"use strict";var I=q(),_=Symbol("break visit"),Ki=Symbol("skip children"),F=Symbol("remove node");function ze(s,e){let t=ji(e);I.isDocument(s)?le(null,s.contents,t,Object.freeze([s]))===F&&(s.contents=null):le(null,s,t,Object.freeze([]))}ze.BREAK=_;ze.SKIP=Ki;ze.REMOVE=F;function le(s,e,t,i){let n=Fi(s,e,t,i);if(I.isNode(n)||I.isPair(n))return Ri(s,i,n),le(s,n,t,i);if(typeof n!="symbol"){if(I.isCollection(e)){i=Object.freeze(i.concat(e));for(let r=0;r<e.items.length;++r){let o=le(r,e.items[r],t,i);if(typeof o=="number")r=o-1;else{if(o===_)return _;o===F&&(e.items.splice(r,1),r-=1)}}}else if(I.isPair(e)){i=Object.freeze(i.concat(e));let r=le("key",e.key,t,i);if(r===_)return _;r===F&&(e.key=null);let o=le("value",e.value,t,i);if(o===_)return _;o===F&&(e.value=null)}}return n}async function Ze(s,e){let t=ji(e);I.isDocument(s)?await ce(null,s.contents,t,Object.freeze([s]))===F&&(s.contents=null):await ce(null,s,t,Object.freeze([]))}Ze.BREAK=_;Ze.SKIP=Ki;Ze.REMOVE=F;async function ce(s,e,t,i){let n=await Fi(s,e,t,i);if(I.isNode(n)||I.isPair(n))return Ri(s,i,n),ce(s,n,t,i);if(typeof n!="symbol"){if(I.isCollection(e)){i=Object.freeze(i.concat(e));for(let r=0;r<e.items.length;++r){let o=await ce(r,e.items[r],t,i);if(typeof o=="number")r=o-1;else{if(o===_)return _;o===F&&(e.items.splice(r,1),r-=1)}}}else if(I.isPair(e)){i=Object.freeze(i.concat(e));let r=await ce("key",e.key,t,i);if(r===_)return _;r===F&&(e.key=null);let o=await ce("value",e.value,t,i);if(o===_)return _;o===F&&(e.value=null)}}return n}function ji(s){return typeof s=="object"&&(s.Collection||s.Node||s.Value)?Object.assign({Alias:s.Node,Map:s.Node,Scalar:s.Node,Seq:s.Node},s.Value&&{Map:s.Value,Scalar:s.Value,Seq:s.Value},s.Collection&&{Map:s.Collection,Seq:s.Collection},s):s}function Fi(s,e,t,i){if(typeof t=="function")return t(s,e,i);if(I.isMap(e))return t.Map?.(s,e,i);if(I.isSeq(e))return t.Seq?.(s,e,i);if(I.isPair(e))return t.Pair?.(s,e,i);if(I.isScalar(e))return t.Scalar?.(s,e,i);if(I.isAlias(e))return t.Alias?.(s,e,i)}function Ri(s,e,t){let i=e[e.length-1];if(I.isCollection(i))i.items[s]=t;else if(I.isPair(i))s==="key"?i.key=t:i.value=t;else if(I.isDocument(i))i.contents=t;else{let n=I.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}zt.visit=ze;zt.visitAsync=Ze});var Zt=g(Yi=>{"use strict";var Ui=q(),xo=Se(),Ho={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Go=s=>s.replace(/[!,[\]{}]/g,e=>Ho[e]),we=class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){let e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);let i=e.trim().split(/[ \t]+/),n=i.shift();switch(n){case"%TAG":{if(i.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;let[r,o]=i;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[r]=i;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{let o=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,o),!1}}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}let[,i,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);let r=this.tags[i];if(r)try{return r+decodeURIComponent(n)}catch(o){return t(String(o)),null}return i==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,i]of Object.entries(this.tags))if(e.startsWith(i))return t+Go(e.substring(i.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags),n;if(e&&i.length>0&&Ui.isNode(e.contents)){let r={};xo.visit(e.contents,(o,a)=>{Ui.isNode(a)&&a.tag&&(r[a.tag]=!0)}),n=Object.keys(r)}else n=[];for(let[r,o]of i)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||n.some(a=>a.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(`
|
|
2
|
+
`)}};we.defaultYaml={explicit:!1,version:"1.2"};we.defaultTags={"!!":"tag:yaml.org,2002:"};Yi.Directives=we});var et=g(ve=>{"use strict";var Ji=q(),Wo=Se();function Qo(s){if(/[\x00-\x19\s,[\]{}]/.test(s)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;throw new Error(t)}return!0}function Vi(s){let e=new Set;return Wo.visit(s,{Value(t,i){i.anchor&&e.add(i.anchor)}}),e}function xi(s,e){for(let t=1;;++t){let i=`${s}${t}`;if(!e.has(i))return i}}function Xo(s,e){let t=[],i=new Map,n=null;return{onAnchor:r=>{t.push(r),n??(n=Vi(s));let o=xi(e,n);return n.add(o),o},setAnchors:()=>{for(let r of t){let o=i.get(r);if(typeof o=="object"&&o.anchor&&(Ji.isScalar(o.node)||Ji.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=r,a}}},sourceObjects:i}}ve.anchorIsValid=Qo;ve.anchorNames=Vi;ve.createNodeAnchors=Xo;ve.findNewAnchor=xi});var es=g(Hi=>{"use strict";function ke(s,e,t,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let n=0,r=i.length;n<r;++n){let o=i[n],a=ke(s,i,String(n),o);a===void 0?delete i[n]:a!==o&&(i[n]=a)}else if(i instanceof Map)for(let n of Array.from(i.keys())){let r=i.get(n),o=ke(s,i,n,r);o===void 0?i.delete(n):o!==r&&i.set(n,o)}else if(i instanceof Set)for(let n of Array.from(i)){let r=ke(s,i,n,n);r===void 0?i.delete(n):r!==n&&(i.delete(n),i.add(r))}else for(let[n,r]of Object.entries(i)){let o=ke(s,i,n,r);o===void 0?delete i[n]:o!==r&&(i[n]=o)}return s.call(e,t,i)}Hi.applyReviver=ke});var V=g(Wi=>{"use strict";var zo=q();function Gi(s,e,t){if(Array.isArray(s))return s.map((i,n)=>Gi(i,String(n),t));if(s&&typeof s.toJSON=="function"){if(!t||!zo.hasAnchor(s))return s.toJSON(e,t);let i={aliasCount:0,count:1,res:void 0};t.anchors.set(s,i),t.onCreate=r=>{i.res=r,delete t.onCreate};let n=s.toJSON(e,t);return t.onCreate&&t.onCreate(n),n}return typeof s=="bigint"&&!t?.keep?Number(s):s}Wi.toJS=Gi});var tt=g(Xi=>{"use strict";var Zo=es(),Qi=q(),ea=V(),ts=class{constructor(e){Object.defineProperty(this,Qi.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:i,onAnchor:n,reviver:r}={}){if(!Qi.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},a=ea.toJS(this,"",o);if(typeof n=="function")for(let{count:l,res:c}of o.anchors.values())n(c,l);return typeof r=="function"?Zo.applyReviver(r,{"":a},"",a):a}};Xi.NodeBase=ts});var Ne=g(zi=>{"use strict";var ta=et(),sa=Se(),fe=q(),ia=tt(),na=V(),ss=class extends ia.NodeBase{constructor(e){super(fe.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){if(t?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let i;t?.aliasResolveCache?i=t.aliasResolveCache:(i=[],sa.visit(e,{Node:(r,o)=>{(fe.isAlias(o)||fe.hasAnchor(o))&&i.push(o)}}),t&&(t.aliasResolveCache=i));let n;for(let r of i){if(r===this)break;r.anchor===this.source&&(n=r)}if(n&&t){let{anchors:r,doc:o,maxAliasCount:a}=t,l=r.get(n);if(l||(na.toJS(n,null,t),l=r.get(n)),l?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(a>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=st(o,n,r)),l.count*l.aliasCount>a)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}}return n}toJSON(e,t){if(!t)return{source:this.source};let i=this.resolve(t.doc,t);if(!i){let n=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(n)}return t.anchors.get(i).res}toString(e,t,i){let n=`*${this.source}`;if(e){if(ta.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${n} `}return n}};function st(s,e,t){if(fe.isAlias(e)){let i=e.resolve(s),n=t&&i&&t.get(i);return n?n.count*n.aliasCount:0}else if(fe.isCollection(e)){let i=0;for(let n of e.items){let r=st(s,n,t);r>i&&(i=r)}return i}else if(fe.isPair(e)){let i=st(s,e.key,t),n=st(s,e.value,t);return Math.max(i,n)}return 1}zi.Alias=ss});var L=g(is=>{"use strict";var ra=q(),oa=tt(),aa=V(),la=s=>!s||typeof s!="function"&&typeof s!="object",x=class extends oa.NodeBase{constructor(e){super(ra.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:aa.toJS(this.value,e,t)}toString(){return String(this.value)}};x.BLOCK_FOLDED="BLOCK_FOLDED";x.BLOCK_LITERAL="BLOCK_LITERAL";x.PLAIN="PLAIN";x.QUOTE_DOUBLE="QUOTE_DOUBLE";x.QUOTE_SINGLE="QUOTE_SINGLE";is.Scalar=x;is.isScalarValue=la});var Ae=g(en=>{"use strict";var ca=Ne(),te=q(),Zi=L(),fa="tag:yaml.org,2002:";function ua(s,e,t){if(e){let i=t.filter(r=>r.tag===e),n=i.find(r=>!r.format)??i[0];if(!n)throw new Error(`Tag ${e} not found`);return n}return t.find(i=>i.identify?.(s)&&!i.format)}function ha(s,e,t){if(te.isDocument(s)&&(s=s.contents),te.isNode(s))return s;if(te.isPair(s)){let f=t.schema[te.MAP].createNode?.(t.schema,null,t);return f.items.push(s),f}(s instanceof String||s instanceof Number||s instanceof Boolean||typeof BigInt<"u"&&s instanceof BigInt)&&(s=s.valueOf());let{aliasDuplicateObjects:i,onAnchor:n,onTagObj:r,schema:o,sourceObjects:a}=t,l;if(i&&s&&typeof s=="object"){if(l=a.get(s),l)return l.anchor??(l.anchor=n(s)),new ca.Alias(l.anchor);l={anchor:null,node:null},a.set(s,l)}e?.startsWith("!!")&&(e=fa+e.slice(2));let c=ua(s,e,o.tags);if(!c){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){let f=new Zi.Scalar(s);return l&&(l.node=f),f}c=s instanceof Map?o[te.MAP]:Symbol.iterator in Object(s)?o[te.SEQ]:o[te.MAP]}r&&(r(c),delete t.onTagObj);let d=c?.createNode?c.createNode(t.schema,s,t):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(t.schema,s,t):new Zi.Scalar(s);return e?d.tag=e:c.default||(d.tag=c.tag),l&&(l.node=d),d}en.createNode=ha});var nt=g(it=>{"use strict";var da=Ae(),R=q(),pa=tt();function ns(s,e,t){let i=t;for(let n=e.length-1;n>=0;--n){let r=e[n];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){let o=[];o[r]=i,i=o}else i=new Map([[r,i]])}return da.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:s,sourceObjects:new Map})}var tn=s=>s==null||typeof s=="object"&&!!s[Symbol.iterator]().next().done,rs=class extends pa.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(i=>R.isNode(i)||R.isPair(i)?i.clone(e):i),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(tn(e))this.add(t);else{let[i,...n]=e,r=this.get(i,!0);if(R.isCollection(r))r.addIn(n,t);else if(r===void 0&&this.schema)this.set(i,ns(this.schema,n,t));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}deleteIn(e){let[t,...i]=e;if(i.length===0)return this.delete(t);let n=this.get(t,!0);if(R.isCollection(n))return n.deleteIn(i);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${i}`)}getIn(e,t){let[i,...n]=e,r=this.get(i,!0);return n.length===0?!t&&R.isScalar(r)?r.value:r:R.isCollection(r)?r.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!R.isPair(t))return!1;let i=t.value;return i==null||e&&R.isScalar(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(e){let[t,...i]=e;if(i.length===0)return this.has(t);let n=this.get(t,!0);return R.isCollection(n)?n.hasIn(i):!1}setIn(e,t){let[i,...n]=e;if(n.length===0)this.set(i,t);else{let r=this.get(i,!0);if(R.isCollection(r))r.setIn(n,t);else if(r===void 0&&this.schema)this.set(i,ns(this.schema,n,t));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}};it.Collection=rs;it.collectionFromPath=ns;it.isEmptyPath=tn});var qe=g(rt=>{"use strict";var ma=s=>s.replace(/^(?!$)(?: $)?/gm,"#");function os(s,e){return/^\n+$/.test(s)?s.substring(1):e?s.replace(/^(?! *$)/gm,e):s}var ga=(s,e,t)=>s.endsWith(`
|
|
3
|
+
`)?os(t,e):t.includes(`
|
|
4
|
+
`)?`
|
|
5
|
+
`+os(t,e):(s.endsWith(" ")?"":" ")+t;rt.indentComment=os;rt.lineComment=ga;rt.stringifyComment=ma});var nn=g(Oe=>{"use strict";var ya="flow",as="block",ot="quoted";function ba(s,e,t="flow",{indentAtStart:i,lineWidth:n=80,minContentWidth:r=20,onFold:o,onOverflow:a}={}){if(!n||n<0)return s;n<r&&(r=0);let l=Math.max(1+r,1+n-e.length);if(s.length<=l)return s;let c=[],d={},f=n-e.length;typeof i=="number"&&(i>n-Math.max(2,r)?c.push(0):f=n-i);let u,m,y=!1,h=-1,p=-1,S=-1;t===as&&(h=sn(s,h,e.length),h!==-1&&(f=h+l));for(let v;v=s[h+=1];){if(t===ot&&v==="\\"){switch(p=h,s[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}S=h}if(v===`
|
|
6
|
+
`)t===as&&(h=sn(s,h,e.length)),f=h+e.length+l,u=void 0;else{if(v===" "&&m&&m!==" "&&m!==`
|
|
7
|
+
`&&m!==" "){let k=s[h+1];k&&k!==" "&&k!==`
|
|
8
|
+
`&&k!==" "&&(u=h)}if(h>=f)if(u)c.push(u),f=u+l,u=void 0;else if(t===ot){for(;m===" "||m===" ";)m=v,v=s[h+=1],y=!0;let k=h>S+1?h-2:p-1;if(d[k])return s;c.push(k),d[k]=!0,f=k+l,u=void 0}else y=!0}m=v}if(y&&a&&a(),c.length===0)return s;o&&o();let w=s.slice(0,c[0]);for(let v=0;v<c.length;++v){let k=c[v],N=c[v+1]||s.length;k===0?w=`
|
|
9
|
+
${e}${s.slice(0,N)}`:(t===ot&&d[k]&&(w+=`${s[k]}\\`),w+=`
|
|
10
|
+
${e}${s.slice(k+1,N)}`)}return w}function sn(s,e,t){let i=e,n=e+1,r=s[n];for(;r===" "||r===" ";)if(e<n+t)r=s[++e];else{do r=s[++e];while(r&&r!==`
|
|
11
|
+
`);i=e,n=e+1,r=s[n]}return i}Oe.FOLD_BLOCK=as;Oe.FOLD_FLOW=ya;Oe.FOLD_QUOTED=ot;Oe.foldFlowLines=ba});var Le=g(rn=>{"use strict";var B=L(),H=nn(),lt=(s,e)=>({indentAtStart:e?s.indent.length:s.indentAtStart,lineWidth:s.options.lineWidth,minContentWidth:s.options.minContentWidth}),ct=s=>/^(%|---|\.\.\.)/m.test(s);function Sa(s,e,t){if(!e||e<0)return!1;let i=e-t,n=s.length;if(n<=i)return!1;for(let r=0,o=0;r<n;++r)if(s[r]===`
|
|
12
|
+
`){if(r-o>i)return!0;if(o=r+1,n-o<=i)return!1}return!0}function Ee(s,e){let t=JSON.stringify(s);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:i}=e,n=e.options.doubleQuotedMinMultiLineLength,r=e.indent||(ct(s)?" ":""),o="",a=0;for(let l=0,c=t[l];c;c=t[++l])if(c===" "&&t[l+1]==="\\"&&t[l+2]==="n"&&(o+=t.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(t[l+1]){case"u":{o+=t.slice(a,l);let d=t.substr(l+2,4);switch(d){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:d.substr(0,2)==="00"?o+="\\x"+d.substr(2):o+=t.substr(l,6)}l+=5,a=l+1}break;case"n":if(i||t[l+2]==='"'||t.length<n)l+=1;else{for(o+=t.slice(a,l)+`
|
|
13
|
+
|
|
14
|
+
`;t[l+2]==="\\"&&t[l+3]==="n"&&t[l+4]!=='"';)o+=`
|
|
15
|
+
`,l+=2;o+=r,t[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+t.slice(a):t,i?o:H.foldFlowLines(o,r,H.FOLD_QUOTED,lt(e,!1))}function ls(s,e){if(e.options.singleQuote===!1||e.implicitKey&&s.includes(`
|
|
16
|
+
`)||/[ \t]\n|\n[ \t]/.test(s))return Ee(s,e);let t=e.indent||(ct(s)?" ":""),i="'"+s.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
17
|
+
${t}`)+"'";return e.implicitKey?i:H.foldFlowLines(i,t,H.FOLD_FLOW,lt(e,!1))}function ue(s,e){let{singleQuote:t}=e.options,i;if(t===!1)i=Ee;else{let n=s.includes('"'),r=s.includes("'");n&&!r?i=ls:r&&!n?i=Ee:i=t?ls:Ee}return i(s,e)}var cs;try{cs=new RegExp(`(^|(?<!
|
|
18
|
+
))
|
|
19
|
+
+(?!
|
|
20
|
+
|$)`,"g")}catch{cs=/\n+(?!\n|$)/g}function at({comment:s,type:e,value:t},i,n,r){let{blockQuote:o,commentString:a,lineWidth:l}=i.options;if(!o||/\n[\t ]+$/.test(t))return ue(t,i);let c=i.indent||(i.forceBlockIndent||ct(t)?" ":""),d=o==="literal"?!0:o==="folded"||e===B.Scalar.BLOCK_FOLDED?!1:e===B.Scalar.BLOCK_LITERAL?!0:!Sa(t,l,c.length);if(!t)return d?`|
|
|
21
|
+
`:`>
|
|
22
|
+
`;let f,u;for(u=t.length;u>0;--u){let N=t[u-1];if(N!==`
|
|
23
|
+
`&&N!==" "&&N!==" ")break}let m=t.substring(u),y=m.indexOf(`
|
|
24
|
+
`);y===-1?f="-":t===m||y!==m.length-1?(f="+",r&&r()):f="",m&&(t=t.slice(0,-m.length),m[m.length-1]===`
|
|
25
|
+
`&&(m=m.slice(0,-1)),m=m.replace(cs,`$&${c}`));let h=!1,p,S=-1;for(p=0;p<t.length;++p){let N=t[p];if(N===" ")h=!0;else if(N===`
|
|
26
|
+
`)S=p;else break}let w=t.substring(0,S<p?S+1:p);w&&(t=t.substring(w.length),w=w.replace(/\n+/g,`$&${c}`));let k=(h?c?"2":"1":"")+f;if(s&&(k+=" "+a(s.replace(/ ?[\r\n]+/g," ")),n&&n()),!d){let N=t.replace(/\n+/g,`
|
|
27
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),A=!1,E=lt(i,!0);o!=="folded"&&e!==B.Scalar.BLOCK_FOLDED&&(E.onOverflow=()=>{A=!0});let b=H.foldFlowLines(`${w}${N}${m}`,c,H.FOLD_BLOCK,E);if(!A)return`>${k}
|
|
28
|
+
${c}${b}`}return t=t.replace(/\n+/g,`$&${c}`),`|${k}
|
|
29
|
+
${c}${w}${t}${m}`}function wa(s,e,t,i){let{type:n,value:r}=s,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:d}=e;if(a&&r.includes(`
|
|
30
|
+
`)||d&&/[[\]{},]/.test(r))return ue(r,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return a||d||!r.includes(`
|
|
31
|
+
`)?ue(r,e):at(s,e,t,i);if(!a&&!d&&n!==B.Scalar.PLAIN&&r.includes(`
|
|
32
|
+
`))return at(s,e,t,i);if(ct(r)){if(l==="")return e.forceBlockIndent=!0,at(s,e,t,i);if(a&&l===c)return ue(r,e)}let f=r.replace(/\n+/g,`$&
|
|
33
|
+
${l}`);if(o){let u=h=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(f),{compat:m,tags:y}=e.doc.schema;if(y.some(u)||m?.some(u))return ue(r,e)}return a?f:H.foldFlowLines(f,l,H.FOLD_FLOW,lt(e,!1))}function va(s,e,t,i){let{implicitKey:n,inFlow:r}=e,o=typeof s.value=="string"?s:Object.assign({},s,{value:String(s.value)}),{type:a}=s;a!==B.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=B.Scalar.QUOTE_DOUBLE);let l=d=>{switch(d){case B.Scalar.BLOCK_FOLDED:case B.Scalar.BLOCK_LITERAL:return n||r?ue(o.value,e):at(o,e,t,i);case B.Scalar.QUOTE_DOUBLE:return Ee(o.value,e);case B.Scalar.QUOTE_SINGLE:return ls(o.value,e);case B.Scalar.PLAIN:return wa(o,e,t,i);default:return null}},c=l(a);if(c===null){let{defaultKeyType:d,defaultStringType:f}=e.options,u=n&&d||f;if(c=l(u),c===null)throw new Error(`Unsupported default string type ${u}`)}return c}rn.stringifyString=va});var Te=g(fs=>{"use strict";var ka=et(),G=q(),Na=qe(),Aa=Le();function qa(s,e){let t=Object.assign({blockQuote:!0,commentString:Na.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},s.schema.toStringOptions,e),i;switch(t.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:s,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:i,options:t}}function Oa(s,e){if(e.tag){let n=s.filter(r=>r.tag===e.tag);if(n.length>0)return n.find(r=>r.format===e.format)??n[0]}let t,i;if(G.isScalar(e)){i=e.value;let n=s.filter(r=>r.identify?.(i));if(n.length>1){let r=n.filter(o=>o.test);r.length>0&&(n=r)}t=n.find(r=>r.format===e.format)??n.find(r=>!r.format)}else i=e,t=s.find(n=>n.nodeClass&&i instanceof n.nodeClass);if(!t){let n=i?.constructor?.name??(i===null?"null":typeof i);throw new Error(`Tag not resolved for ${n} value`)}return t}function Ea(s,e,{anchors:t,doc:i}){if(!i.directives)return"";let n=[],r=(G.isScalar(s)||G.isCollection(s))&&s.anchor;r&&ka.anchorIsValid(r)&&(t.add(r),n.push(`&${r}`));let o=s.tag??(e.default?null:e.tag);return o&&n.push(i.directives.tagString(o)),n.join(" ")}function La(s,e,t,i){if(G.isPair(s))return s.toString(e,t,i);if(G.isAlias(s)){if(e.doc.directives)return s.toString(e);if(e.resolvedAliases?.has(s))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(s):e.resolvedAliases=new Set([s]),s=s.resolve(e.doc)}let n,r=G.isNode(s)?s:e.doc.createNode(s,{onTagObj:l=>n=l});n??(n=Oa(e.doc.schema.tags,r));let o=Ea(r,n,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let a=typeof n.stringify=="function"?n.stringify(r,e,t,i):G.isScalar(r)?Aa.stringifyString(r,e,t,i):r.toString(e,t,i);return o?G.isScalar(r)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
|
|
34
|
+
${e.indent}${a}`:a}fs.createStringifyContext=qa;fs.stringify=La});var cn=g(ln=>{"use strict";var Y=q(),on=L(),an=Te(),Ce=qe();function Ta({key:s,value:e},t,i,n){let{allNullValues:r,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:d,simpleKeys:f}}=t,u=Y.isNode(s)&&s.comment||null;if(f){if(u)throw new Error("With simple keys, key nodes cannot have comments");if(Y.isCollection(s)||!Y.isNode(s)&&typeof s=="object"){let E="With simple keys, collection cannot be used as a key value";throw new Error(E)}}let m=!f&&(!s||u&&e==null&&!t.inFlow||Y.isCollection(s)||(Y.isScalar(s)?s.type===on.Scalar.BLOCK_FOLDED||s.type===on.Scalar.BLOCK_LITERAL:typeof s=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!m&&(f||!r),indent:a+l});let y=!1,h=!1,p=an.stringify(s,t,()=>y=!0,()=>h=!0);if(!m&&!t.inFlow&&p.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");m=!0}if(t.inFlow){if(r||e==null)return y&&i&&i(),p===""?"?":m?`? ${p}`:p}else if(r&&!f||e==null&&m)return p=`? ${p}`,u&&!y?p+=Ce.lineComment(p,t.indent,c(u)):h&&n&&n(),p;y&&(u=null),m?(u&&(p+=Ce.lineComment(p,t.indent,c(u))),p=`? ${p}
|
|
35
|
+
${a}:`):(p=`${p}:`,u&&(p+=Ce.lineComment(p,t.indent,c(u))));let S,w,v;Y.isNode(e)?(S=!!e.spaceBefore,w=e.commentBefore,v=e.comment):(S=!1,w=null,v=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!m&&!u&&Y.isScalar(e)&&(t.indentAtStart=p.length+1),h=!1,!d&&l.length>=2&&!t.inFlow&&!m&&Y.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let k=!1,N=an.stringify(e,t,()=>k=!0,()=>h=!0),A=" ";if(u||S||w){if(A=S?`
|
|
36
|
+
`:"",w){let E=c(w);A+=`
|
|
37
|
+
${Ce.indentComment(E,t.indent)}`}N===""&&!t.inFlow?A===`
|
|
38
|
+
`&&v&&(A=`
|
|
39
|
+
|
|
40
|
+
`):A+=`
|
|
41
|
+
${t.indent}`}else if(!m&&Y.isCollection(e)){let E=N[0],b=N.indexOf(`
|
|
42
|
+
`),T=b!==-1,J=t.inFlow??e.flow??e.items.length===0;if(T||!J){let ae=!1;if(T&&(E==="&"||E==="!")){let C=N.indexOf(" ");E==="&"&&C!==-1&&C<b&&N[C+1]==="!"&&(C=N.indexOf(" ",C+1)),(C===-1||b<C)&&(ae=!0)}ae||(A=`
|
|
43
|
+
${t.indent}`)}}else(N===""||N[0]===`
|
|
44
|
+
`)&&(A="");return p+=A+N,t.inFlow?k&&i&&i():v&&!k?p+=Ce.lineComment(p,t.indent,c(v)):h&&n&&n(),p}ln.stringifyPair=Ta});var hs=g(us=>{"use strict";var fn=require("process");function Ca(s,...e){s==="debug"&&console.log(...e)}function Ia(s,e){(s==="debug"||s==="warn")&&(typeof fn.emitWarning=="function"?fn.emitWarning(e):console.warn(e))}us.debug=Ca;us.warn=Ia});var pt=g(dt=>{"use strict";var ht=q(),un=L(),ft="<<",ut={identify:s=>s===ft||typeof s=="symbol"&&s.description===ft,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new un.Scalar(Symbol(ft)),{addToJSMap:hn}),stringify:()=>ft},Pa=(s,e)=>(ut.identify(e)||ht.isScalar(e)&&(!e.type||e.type===un.Scalar.PLAIN)&&ut.identify(e.value))&&s?.doc.schema.tags.some(t=>t.tag===ut.tag&&t.default);function hn(s,e,t){let i=dn(s,t);if(ht.isSeq(i))for(let n of i.items)ds(s,e,n);else if(Array.isArray(i))for(let n of i)ds(s,e,n);else ds(s,e,i)}function ds(s,e,t){let i=dn(s,t);if(!ht.isMap(i))throw new Error("Merge sources must be maps or map aliases");let n=i.toJSON(null,s,Map);for(let[r,o]of n)e instanceof Map?e.has(r)||e.set(r,o):e instanceof Set?e.add(r):Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function dn(s,e){return s&&ht.isAlias(e)?e.resolve(s.doc,s):e}dt.addMergeToJSMap=hn;dt.isMergeKey=Pa;dt.merge=ut});var ms=g(gn=>{"use strict";var Ma=hs(),pn=pt(),_a=Te(),mn=q(),ps=V();function $a(s,e,{key:t,value:i}){if(mn.isNode(t)&&t.addToJSMap)t.addToJSMap(s,e,i);else if(pn.isMergeKey(s,t))pn.addMergeToJSMap(s,e,i);else{let n=ps.toJS(t,"",s);if(e instanceof Map)e.set(n,ps.toJS(i,n,s));else if(e instanceof Set)e.add(n);else{let r=Da(t,n,s),o=ps.toJS(i,r,s);r in e?Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[r]=o}}return e}function Da(s,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(mn.isNode(s)&&t?.doc){let i=_a.createStringifyContext(t.doc,{});i.anchors=new Set;for(let r of t.anchors.keys())i.anchors.add(r.anchor);i.inFlow=!0,i.inStringifyKey=!0;let n=s.toString(i);if(!t.mapKeyWarned){let r=JSON.stringify(n);r.length>40&&(r=r.substring(0,36)+'..."'),Ma.warn(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return n}return JSON.stringify(e)}gn.addPairToJSMap=$a});var W=g(gs=>{"use strict";var yn=Ae(),Ba=cn(),Ka=ms(),mt=q();function ja(s,e,t){let i=yn.createNode(s,void 0,t),n=yn.createNode(e,void 0,t);return new gt(i,n)}var gt=class s{constructor(e,t=null){Object.defineProperty(this,mt.NODE_TYPE,{value:mt.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:i}=this;return mt.isNode(t)&&(t=t.clone(e)),mt.isNode(i)&&(i=i.clone(e)),new s(t,i)}toJSON(e,t){let i=t?.mapAsMap?new Map:{};return Ka.addPairToJSMap(t,i,this)}toString(e,t,i){return e?.doc?Ba.stringifyPair(this,e,t,i):JSON.stringify(this)}};gs.Pair=gt;gs.createPair=ja});var ys=g(Sn=>{"use strict";var se=q(),bn=Te(),yt=qe();function Fa(s,e,t){return(e.inFlow??s.flow?Ua:Ra)(s,e,t)}function Ra({comment:s,items:e},t,{blockItemPrefix:i,flowChars:n,itemIndent:r,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=t,d=Object.assign({},t,{indent:r,type:null}),f=!1,u=[];for(let y=0;y<e.length;++y){let h=e[y],p=null;if(se.isNode(h))!f&&h.spaceBefore&&u.push(""),bt(t,u,h.commentBefore,f),h.comment&&(p=h.comment);else if(se.isPair(h)){let w=se.isNode(h.key)?h.key:null;w&&(!f&&w.spaceBefore&&u.push(""),bt(t,u,w.commentBefore,f))}f=!1;let S=bn.stringify(h,d,()=>p=null,()=>f=!0);p&&(S+=yt.lineComment(S,r,c(p))),f&&p&&(f=!1),u.push(i+S)}let m;if(u.length===0)m=n.start+n.end;else{m=u[0];for(let y=1;y<u.length;++y){let h=u[y];m+=h?`
|
|
45
|
+
${l}${h}`:`
|
|
46
|
+
`}}return s?(m+=`
|
|
47
|
+
`+yt.indentComment(c(s),l),a&&a()):f&&o&&o(),m}function Ua({items:s},e,{flowChars:t,itemIndent:i}){let{indent:n,indentStep:r,flowCollectionPadding:o,options:{commentString:a}}=e;i+=r;let l=Object.assign({},e,{indent:i,inFlow:!0,type:null}),c=!1,d=0,f=[];for(let y=0;y<s.length;++y){let h=s[y],p=null;if(se.isNode(h))h.spaceBefore&&f.push(""),bt(e,f,h.commentBefore,!1),h.comment&&(p=h.comment);else if(se.isPair(h)){let w=se.isNode(h.key)?h.key:null;w&&(w.spaceBefore&&f.push(""),bt(e,f,w.commentBefore,!1),w.comment&&(c=!0));let v=se.isNode(h.value)?h.value:null;v?(v.comment&&(p=v.comment),v.commentBefore&&(c=!0)):h.value==null&&w?.comment&&(p=w.comment)}p&&(c=!0);let S=bn.stringify(h,l,()=>p=null);c||(c=f.length>d||S.includes(`
|
|
48
|
+
`)),y<s.length-1?S+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(c||(c=f.reduce((w,v)=>w+v.length+2,2)+(S.length+2)>e.options.lineWidth)),c&&(S+=",")),p&&(S+=yt.lineComment(S,i,a(p))),f.push(S),d=f.length}let{start:u,end:m}=t;if(f.length===0)return u+m;if(!c){let y=f.reduce((h,p)=>h+p.length+2,2);c=e.options.lineWidth>0&&y>e.options.lineWidth}if(c){let y=u;for(let h of f)y+=h?`
|
|
49
|
+
${r}${n}${h}`:`
|
|
50
|
+
`;return`${y}
|
|
51
|
+
${n}${m}`}else return`${u}${o}${f.join(" ")}${o}${m}`}function bt({indent:s,options:{commentString:e}},t,i,n){if(i&&n&&(i=i.replace(/^\n+/,"")),i){let r=yt.indentComment(e(i),s);t.push(r.trimStart())}}Sn.stringifyCollection=Fa});var X=g(Ss=>{"use strict";var Ya=ys(),Ja=ms(),Va=nt(),Q=q(),St=W(),xa=L();function Ie(s,e){let t=Q.isScalar(e)?e.value:e;for(let i of s)if(Q.isPair(i)&&(i.key===e||i.key===t||Q.isScalar(i.key)&&i.key.value===t))return i}var bs=class extends Va.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Q.MAP,e),this.items=[]}static from(e,t,i){let{keepUndefined:n,replacer:r}=i,o=new this(e),a=(l,c)=>{if(typeof r=="function")c=r.call(t,l,c);else if(Array.isArray(r)&&!r.includes(l))return;(c!==void 0||n)&&o.items.push(St.createPair(l,c,i))};if(t instanceof Map)for(let[l,c]of t)a(l,c);else if(t&&typeof t=="object")for(let l of Object.keys(t))a(l,t[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){let i;Q.isPair(e)?i=e:!e||typeof e!="object"||!("key"in e)?i=new St.Pair(e,e?.value):i=new St.Pair(e.key,e.value);let n=Ie(this.items,i.key),r=this.schema?.sortMapEntries;if(n){if(!t)throw new Error(`Key ${i.key} already set`);Q.isScalar(n.value)&&xa.isScalarValue(i.value)?n.value.value=i.value:n.value=i.value}else if(r){let o=this.items.findIndex(a=>r(i,a)<0);o===-1?this.items.push(i):this.items.splice(o,0,i)}else this.items.push(i)}delete(e){let t=Ie(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=Ie(this.items,e)?.value;return(!t&&Q.isScalar(n)?n.value:n)??void 0}has(e){return!!Ie(this.items,e)}set(e,t){this.add(new St.Pair(e,t),!0)}toJSON(e,t,i){let n=i?new i:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(n);for(let r of this.items)Ja.addPairToJSMap(t,n,r);return n}toString(e,t,i){if(!e)return JSON.stringify(this);for(let n of this.items)if(!Q.isPair(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Ya.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:i,onComment:t})}};Ss.YAMLMap=bs;Ss.findPair=Ie});var he=g(vn=>{"use strict";var Ha=q(),wn=X(),Ga={collection:"map",default:!0,nodeClass:wn.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(s,e){return Ha.isMap(s)||e("Expected a mapping for this tag"),s},createNode:(s,e,t)=>wn.YAMLMap.from(s,e,t)};vn.map=Ga});var z=g(kn=>{"use strict";var Wa=Ae(),Qa=ys(),Xa=nt(),vt=q(),za=L(),Za=V(),ws=class extends Xa.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(vt.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=wt(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let i=wt(e);if(typeof i!="number")return;let n=this.items[i];return!t&&vt.isScalar(n)?n.value:n}has(e){let t=wt(e);return typeof t=="number"&&t<this.items.length}set(e,t){let i=wt(e);if(typeof i!="number")throw new Error(`Expected a valid index, not ${e}.`);let n=this.items[i];vt.isScalar(n)&&za.isScalarValue(t)?n.value=t:this.items[i]=t}toJSON(e,t){let i=[];t?.onCreate&&t.onCreate(i);let n=0;for(let r of this.items)i.push(Za.toJS(r,String(n++),t));return i}toString(e,t,i){return e?Qa.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:i,onComment:t}):JSON.stringify(this)}static from(e,t,i){let{replacer:n}=i,r=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let a of t){if(typeof n=="function"){let l=t instanceof Set?a:String(o++);a=n.call(t,l,a)}r.items.push(Wa.createNode(a,void 0,i))}}return r}};function wt(s){let e=vt.isScalar(s)?s.value:s;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}kn.YAMLSeq=ws});var de=g(An=>{"use strict";var el=q(),Nn=z(),tl={collection:"seq",default:!0,nodeClass:Nn.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(s,e){return el.isSeq(s)||e("Expected a sequence for this tag"),s},createNode:(s,e,t)=>Nn.YAMLSeq.from(s,e,t)};An.seq=tl});var Pe=g(qn=>{"use strict";var sl=Le(),il={identify:s=>typeof s=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:s=>s,stringify(s,e,t,i){return e=Object.assign({actualString:!0},e),sl.stringifyString(s,e,t,i)}};qn.string=il});var kt=g(Ln=>{"use strict";var On=L(),En={identify:s=>s==null,createNode:()=>new On.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new On.Scalar(null),stringify:({source:s},e)=>typeof s=="string"&&En.test.test(s)?s:e.options.nullStr};Ln.nullTag=En});var vs=g(Cn=>{"use strict";var nl=L(),Tn={identify:s=>typeof s=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:s=>new nl.Scalar(s[0]==="t"||s[0]==="T"),stringify({source:s,value:e},t){if(s&&Tn.test.test(s)){let i=s[0]==="t"||s[0]==="T";if(e===i)return s}return e?t.options.trueStr:t.options.falseStr}};Cn.boolTag=Tn});var pe=g(In=>{"use strict";function rl({format:s,minFractionDigits:e,tag:t,value:i}){if(typeof i=="bigint")return String(i);let n=typeof i=="number"?i:Number(i);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let r=Object.is(i,-0)?"-0":JSON.stringify(i);if(!s&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^-?\d/.test(r)&&!r.includes("e")){let o=r.indexOf(".");o<0&&(o=r.length,r+=".");let a=e-(r.length-o-1);for(;a-- >0;)r+="0"}return r}In.stringifyNumber=rl});var Ns=g(Nt=>{"use strict";var ol=L(),ks=pe(),al={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:ks.stringifyNumber},ll={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():ks.stringifyNumber(s)}},cl={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(s){let e=new ol.Scalar(parseFloat(s)),t=s.indexOf(".");return t!==-1&&s[s.length-1]==="0"&&(e.minFractionDigits=s.length-t-1),e},stringify:ks.stringifyNumber};Nt.float=cl;Nt.floatExp=ll;Nt.floatNaN=al});var qs=g(qt=>{"use strict";var Pn=pe(),At=s=>typeof s=="bigint"||Number.isInteger(s),As=(s,e,t,{intAsBigInt:i})=>i?BigInt(s):parseInt(s.substring(e),t);function Mn(s,e,t){let{value:i}=s;return At(i)&&i>=0?t+i.toString(e):Pn.stringifyNumber(s)}var fl={identify:s=>At(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(s,e,t)=>As(s,2,8,t),stringify:s=>Mn(s,8,"0o")},ul={identify:At,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(s,e,t)=>As(s,0,10,t),stringify:Pn.stringifyNumber},hl={identify:s=>At(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(s,e,t)=>As(s,2,16,t),stringify:s=>Mn(s,16,"0x")};qt.int=ul;qt.intHex=hl;qt.intOct=fl});var $n=g(_n=>{"use strict";var dl=he(),pl=kt(),ml=de(),gl=Pe(),yl=vs(),Os=Ns(),Es=qs(),bl=[dl.map,ml.seq,gl.string,pl.nullTag,yl.boolTag,Es.intOct,Es.int,Es.intHex,Os.floatNaN,Os.floatExp,Os.float];_n.schema=bl});var Kn=g(Bn=>{"use strict";var Sl=L(),wl=he(),vl=de();function Dn(s){return typeof s=="bigint"||Number.isInteger(s)}var Ot=({value:s})=>JSON.stringify(s),kl=[{identify:s=>typeof s=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:s=>s,stringify:Ot},{identify:s=>s==null,createNode:()=>new Sl.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Ot},{identify:s=>typeof s=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:s=>s==="true",stringify:Ot},{identify:Dn,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(s,e,{intAsBigInt:t})=>t?BigInt(s):parseInt(s,10),stringify:({value:s})=>Dn(s)?s.toString():JSON.stringify(s)},{identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:s=>parseFloat(s),stringify:Ot}],Nl={default:!0,tag:"",test:/^/,resolve(s,e){return e(`Unresolved plain scalar ${JSON.stringify(s)}`),s}},Al=[wl.map,vl.seq].concat(kl,Nl);Bn.schema=Al});var Ts=g(jn=>{"use strict";var Me=require("buffer"),Ls=L(),ql=Le(),Ol={identify:s=>s instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(s,e){if(typeof Me.Buffer=="function")return Me.Buffer.from(s,"base64");if(typeof atob=="function"){let t=atob(s.replace(/[\n\r]/g,"")),i=new Uint8Array(t.length);for(let n=0;n<t.length;++n)i[n]=t.charCodeAt(n);return i}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),s},stringify({comment:s,type:e,value:t},i,n,r){if(!t)return"";let o=t,a;if(typeof Me.Buffer=="function")a=o instanceof Me.Buffer?o.toString("base64"):Me.Buffer.from(o.buffer).toString("base64");else if(typeof btoa=="function"){let l="";for(let c=0;c<o.length;++c)l+=String.fromCharCode(o[c]);a=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=Ls.Scalar.BLOCK_LITERAL),e!==Ls.Scalar.QUOTE_DOUBLE){let l=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),c=Math.ceil(a.length/l),d=new Array(c);for(let f=0,u=0;f<c;++f,u+=l)d[f]=a.substr(u,l);a=d.join(e===Ls.Scalar.BLOCK_LITERAL?`
|
|
52
|
+
`:" ")}return ql.stringifyString({comment:s,type:e,value:a},i,n,r)}};jn.binary=Ol});var Tt=g(Lt=>{"use strict";var Et=q(),Cs=W(),El=L(),Ll=z();function Fn(s,e){if(Et.isSeq(s))for(let t=0;t<s.items.length;++t){let i=s.items[t];if(!Et.isPair(i)){if(Et.isMap(i)){i.items.length>1&&e("Each pair must have its own sequence indicator");let n=i.items[0]||new Cs.Pair(new El.Scalar(null));if(i.commentBefore&&(n.key.commentBefore=n.key.commentBefore?`${i.commentBefore}
|
|
53
|
+
${n.key.commentBefore}`:i.commentBefore),i.comment){let r=n.value??n.key;r.comment=r.comment?`${i.comment}
|
|
54
|
+
${r.comment}`:i.comment}i=n}s.items[t]=Et.isPair(i)?i:new Cs.Pair(i)}}else e("Expected a sequence for this tag");return s}function Rn(s,e,t){let{replacer:i}=t,n=new Ll.YAMLSeq(s);n.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof i=="function"&&(o=i.call(e,String(r++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;n.items.push(Cs.createPair(a,l,t))}return n}var Tl={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Fn,createNode:Rn};Lt.createPairs=Rn;Lt.pairs=Tl;Lt.resolvePairs=Fn});var Ms=g(Ps=>{"use strict";var Un=q(),Is=V(),_e=X(),Cl=z(),Yn=Tt(),ie=class s extends Cl.YAMLSeq{constructor(){super(),this.add=_e.YAMLMap.prototype.add.bind(this),this.delete=_e.YAMLMap.prototype.delete.bind(this),this.get=_e.YAMLMap.prototype.get.bind(this),this.has=_e.YAMLMap.prototype.has.bind(this),this.set=_e.YAMLMap.prototype.set.bind(this),this.tag=s.tag}toJSON(e,t){if(!t)return super.toJSON(e);let i=new Map;t?.onCreate&&t.onCreate(i);for(let n of this.items){let r,o;if(Un.isPair(n)?(r=Is.toJS(n.key,"",t),o=Is.toJS(n.value,r,t)):r=Is.toJS(n,"",t),i.has(r))throw new Error("Ordered maps must not include duplicate keys");i.set(r,o)}return i}static from(e,t,i){let n=Yn.createPairs(e,t,i),r=new this;return r.items=n.items,r}};ie.tag="tag:yaml.org,2002:omap";var Il={collection:"seq",identify:s=>s instanceof Map,nodeClass:ie,default:!1,tag:"tag:yaml.org,2002:omap",resolve(s,e){let t=Yn.resolvePairs(s,e),i=[];for(let{key:n}of t.items)Un.isScalar(n)&&(i.includes(n.value)?e(`Ordered maps must not include duplicate keys: ${n.value}`):i.push(n.value));return Object.assign(new ie,t)},createNode:(s,e,t)=>ie.from(s,e,t)};Ps.YAMLOMap=ie;Ps.omap=Il});var Gn=g(_s=>{"use strict";var Jn=L();function Vn({value:s,source:e},t){return e&&(s?xn:Hn).test.test(e)?e:s?t.options.trueStr:t.options.falseStr}var xn={identify:s=>s===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Jn.Scalar(!0),stringify:Vn},Hn={identify:s=>s===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Jn.Scalar(!1),stringify:Vn};_s.falseTag=Hn;_s.trueTag=xn});var Wn=g(Ct=>{"use strict";var Pl=L(),$s=pe(),Ml={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:$s.stringifyNumber},_l={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s.replace(/_/g,"")),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():$s.stringifyNumber(s)}},$l={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(s){let e=new Pl.Scalar(parseFloat(s.replace(/_/g,""))),t=s.indexOf(".");if(t!==-1){let i=s.substring(t+1).replace(/_/g,"");i[i.length-1]==="0"&&(e.minFractionDigits=i.length)}return e},stringify:$s.stringifyNumber};Ct.float=$l;Ct.floatExp=_l;Ct.floatNaN=Ml});var Xn=g(De=>{"use strict";var Qn=pe(),$e=s=>typeof s=="bigint"||Number.isInteger(s);function It(s,e,t,{intAsBigInt:i}){let n=s[0];if((n==="-"||n==="+")&&(e+=1),s=s.substring(e).replace(/_/g,""),i){switch(t){case 2:s=`0b${s}`;break;case 8:s=`0o${s}`;break;case 16:s=`0x${s}`;break}let o=BigInt(s);return n==="-"?BigInt(-1)*o:o}let r=parseInt(s,t);return n==="-"?-1*r:r}function Ds(s,e,t){let{value:i}=s;if($e(i)){let n=i.toString(e);return i<0?"-"+t+n.substr(1):t+n}return Qn.stringifyNumber(s)}var Dl={identify:$e,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(s,e,t)=>It(s,2,2,t),stringify:s=>Ds(s,2,"0b")},Bl={identify:$e,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(s,e,t)=>It(s,1,8,t),stringify:s=>Ds(s,8,"0")},Kl={identify:$e,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(s,e,t)=>It(s,0,10,t),stringify:Qn.stringifyNumber},jl={identify:$e,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(s,e,t)=>It(s,2,16,t),stringify:s=>Ds(s,16,"0x")};De.int=Kl;De.intBin=Dl;De.intHex=jl;De.intOct=Bl});var Ks=g(Bs=>{"use strict";var _t=q(),Pt=W(),Mt=X(),ne=class s extends Mt.YAMLMap{constructor(e){super(e),this.tag=s.tag}add(e){let t;_t.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new Pt.Pair(e.key,null):t=new Pt.Pair(e,null),Mt.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let i=Mt.findPair(this.items,e);return!t&&_t.isPair(i)?_t.isScalar(i.key)?i.key.value:i.key:i}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let i=Mt.findPair(this.items,e);i&&!t?this.items.splice(this.items.indexOf(i),1):!i&&t&&this.items.push(new Pt.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,i){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,i);throw new Error("Set items must all have null values")}static from(e,t,i){let{replacer:n}=i,r=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof n=="function"&&(o=n.call(t,o,o)),r.items.push(Pt.createPair(o,null,i));return r}};ne.tag="tag:yaml.org,2002:set";var Fl={collection:"map",identify:s=>s instanceof Set,nodeClass:ne,default:!1,tag:"tag:yaml.org,2002:set",createNode:(s,e,t)=>ne.from(s,e,t),resolve(s,e){if(_t.isMap(s)){if(s.hasAllNullValues(!0))return Object.assign(new ne,s);e("Set items must all have null values")}else e("Expected a mapping for this tag");return s}};Bs.YAMLSet=ne;Bs.set=Fl});var Fs=g($t=>{"use strict";var Rl=pe();function js(s,e){let t=s[0],i=t==="-"||t==="+"?s.substring(1):s,n=o=>e?BigInt(o):Number(o),r=i.replace(/_/g,"").split(":").reduce((o,a)=>o*n(60)+n(a),n(0));return t==="-"?n(-1)*r:r}function zn(s){let{value:e}=s,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return Rl.stringifyNumber(s);let i="";e<0&&(i="-",e*=t(-1));let n=t(60),r=[e%n];return e<60?r.unshift(0):(e=(e-r[0])/n,r.unshift(e%n),e>=60&&(e=(e-r[0])/n,r.unshift(e))),i+r.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Ul={identify:s=>typeof s=="bigint"||Number.isInteger(s),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(s,e,{intAsBigInt:t})=>js(s,t),stringify:zn},Yl={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:s=>js(s,!1),stringify:zn},Zn={identify:s=>s instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(s){let e=s.match(Zn.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,i,n,r,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(t,i-1,n,r||0,o||0,a||0,l),d=e[8];if(d&&d!=="Z"){let f=js(d,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:s})=>s?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};$t.floatTime=Yl;$t.intTime=Ul;$t.timestamp=Zn});var sr=g(tr=>{"use strict";var Jl=he(),Vl=kt(),xl=de(),Hl=Pe(),Gl=Ts(),er=Gn(),Rs=Wn(),Dt=Xn(),Wl=pt(),Ql=Ms(),Xl=Tt(),zl=Ks(),Us=Fs(),Zl=[Jl.map,xl.seq,Hl.string,Vl.nullTag,er.trueTag,er.falseTag,Dt.intBin,Dt.intOct,Dt.int,Dt.intHex,Rs.floatNaN,Rs.floatExp,Rs.float,Gl.binary,Wl.merge,Ql.omap,Xl.pairs,zl.set,Us.intTime,Us.floatTime,Us.timestamp];tr.schema=Zl});var hr=g(Vs=>{"use strict";var or=he(),ec=kt(),ar=de(),tc=Pe(),sc=vs(),Ys=Ns(),Js=qs(),ic=$n(),nc=Kn(),lr=Ts(),Be=pt(),cr=Ms(),fr=Tt(),ir=sr(),ur=Ks(),Bt=Fs(),nr=new Map([["core",ic.schema],["failsafe",[or.map,ar.seq,tc.string]],["json",nc.schema],["yaml11",ir.schema],["yaml-1.1",ir.schema]]),rr={binary:lr.binary,bool:sc.boolTag,float:Ys.float,floatExp:Ys.floatExp,floatNaN:Ys.floatNaN,floatTime:Bt.floatTime,int:Js.int,intHex:Js.intHex,intOct:Js.intOct,intTime:Bt.intTime,map:or.map,merge:Be.merge,null:ec.nullTag,omap:cr.omap,pairs:fr.pairs,seq:ar.seq,set:ur.set,timestamp:Bt.timestamp},rc={"tag:yaml.org,2002:binary":lr.binary,"tag:yaml.org,2002:merge":Be.merge,"tag:yaml.org,2002:omap":cr.omap,"tag:yaml.org,2002:pairs":fr.pairs,"tag:yaml.org,2002:set":ur.set,"tag:yaml.org,2002:timestamp":Bt.timestamp};function oc(s,e,t){let i=nr.get(e);if(i&&!s)return t&&!i.includes(Be.merge)?i.concat(Be.merge):i.slice();let n=i;if(!n)if(Array.isArray(s))n=[];else{let r=Array.from(nr.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`)}if(Array.isArray(s))for(let r of s)n=n.concat(r);else typeof s=="function"&&(n=s(n.slice()));return t&&(n=n.concat(Be.merge)),n.reduce((r,o)=>{let a=typeof o=="string"?rr[o]:o;if(!a){let l=JSON.stringify(o),c=Object.keys(rr).map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return r.includes(a)||r.push(a),r},[])}Vs.coreKnownTags=rc;Vs.getTags=oc});var Gs=g(dr=>{"use strict";var xs=q(),ac=he(),lc=de(),cc=Pe(),Kt=hr(),fc=(s,e)=>s.key<e.key?-1:s.key>e.key?1:0,Hs=class s{constructor({compat:e,customTags:t,merge:i,resolveKnownTags:n,schema:r,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?Kt.getTags(e,"compat"):e?Kt.getTags(null,e):null,this.name=typeof r=="string"&&r||"core",this.knownTags=n?Kt.coreKnownTags:{},this.tags=Kt.getTags(t,this.name,i),this.toStringOptions=a??null,Object.defineProperty(this,xs.MAP,{value:ac.map}),Object.defineProperty(this,xs.SCALAR,{value:cc.string}),Object.defineProperty(this,xs.SEQ,{value:lc.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?fc:null}clone(){let e=Object.create(s.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};dr.Schema=Hs});var mr=g(pr=>{"use strict";var uc=q(),Ws=Te(),Ke=qe();function hc(s,e){let t=[],i=e.directives===!0;if(e.directives!==!1&&s.directives){let l=s.directives.toString(s);l?(t.push(l),i=!0):s.directives.docStart&&(i=!0)}i&&t.push("---");let n=Ws.createStringifyContext(s,e),{commentString:r}=n.options;if(s.commentBefore){t.length!==1&&t.unshift("");let l=r(s.commentBefore);t.unshift(Ke.indentComment(l,""))}let o=!1,a=null;if(s.contents){if(uc.isNode(s.contents)){if(s.contents.spaceBefore&&i&&t.push(""),s.contents.commentBefore){let d=r(s.contents.commentBefore);t.push(Ke.indentComment(d,""))}n.forceBlockIndent=!!s.comment,a=s.contents.comment}let l=a?void 0:()=>o=!0,c=Ws.stringify(s.contents,n,()=>a=null,l);a&&(c+=Ke.lineComment(c,"",r(a))),(c[0]==="|"||c[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${c}`:t.push(c)}else t.push(Ws.stringify(s.contents,n));if(s.directives?.docEnd)if(s.comment){let l=r(s.comment);l.includes(`
|
|
55
|
+
`)?(t.push("..."),t.push(Ke.indentComment(l,""))):t.push(`... ${l}`)}else t.push("...");else{let l=s.comment;l&&o&&(l=l.replace(/^\n+/,"")),l&&((!o||a)&&t[t.length-1]!==""&&t.push(""),t.push(Ke.indentComment(r(l),"")))}return t.join(`
|
|
56
|
+
`)+`
|
|
57
|
+
`}pr.stringifyDocument=hc});var je=g(gr=>{"use strict";var dc=Ne(),me=nt(),D=q(),pc=W(),mc=V(),gc=Gs(),yc=mr(),Qs=et(),bc=es(),Sc=Ae(),Xs=Zt(),zs=class s{constructor(e,t,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,D.NODE_TYPE,{value:D.DOC});let n=null;typeof t=="function"||Array.isArray(t)?n=t:i===void 0&&t&&(i=t,t=void 0);let r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=r;let{version:o}=r;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Xs.Directives({version:o}),this.setSchema(o,i),this.contents=e===void 0?null:this.createNode(e,n,i)}clone(){let e=Object.create(s.prototype,{[D.NODE_TYPE]:{value:D.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=D.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ge(this.contents)&&this.contents.add(e)}addIn(e,t){ge(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let i=Qs.anchorNames(this);e.anchor=!t||i.has(t)?Qs.findNewAnchor(t||"a",i):t}return new dc.Alias(e.anchor)}createNode(e,t,i){let n;if(typeof t=="function")e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){let p=w=>typeof w=="number"||w instanceof String||w instanceof Number,S=t.filter(p).map(String);S.length>0&&(t=t.concat(S)),n=t}else i===void 0&&t&&(i=t,t=void 0);let{aliasDuplicateObjects:r,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:d}=i??{},{onAnchor:f,setAnchors:u,sourceObjects:m}=Qs.createNodeAnchors(this,o||"a"),y={aliasDuplicateObjects:r??!0,keepUndefined:l??!1,onAnchor:f,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:m},h=Sc.createNode(e,d,y);return a&&D.isCollection(h)&&(h.flow=!0),u(),h}createPair(e,t,i={}){let n=this.createNode(e,null,i),r=this.createNode(t,null,i);return new pc.Pair(n,r)}delete(e){return ge(this.contents)?this.contents.delete(e):!1}deleteIn(e){return me.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):ge(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return D.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return me.isEmptyPath(e)?!t&&D.isScalar(this.contents)?this.contents.value:this.contents:D.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return D.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return me.isEmptyPath(e)?this.contents!==void 0:D.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=me.collectionFromPath(this.schema,[e],t):ge(this.contents)&&this.contents.set(e,t)}setIn(e,t){me.isEmptyPath(e)?this.contents=t:this.contents==null?this.contents=me.collectionFromPath(this.schema,Array.from(e),t):ge(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let i;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Xs.Directives({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Xs.Directives({version:e}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{let n=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(i)this.schema=new gc.Schema(Object.assign(i,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:i,maxAliasCount:n,onAnchor:r,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=mc.toJS(this.contents,t??"",a);if(typeof r=="function")for(let{count:c,res:d}of a.anchors.values())r(d,c);return typeof o=="function"?bc.applyReviver(o,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return yc.stringifyDocument(this,e)}};function ge(s){if(D.isCollection(s))return!0;throw new Error("Expected a YAML collection as document contents")}gr.Document=zs});var Ue=g(Re=>{"use strict";var Fe=class extends Error{constructor(e,t,i,n){super(),this.name=e,this.code=i,this.message=n,this.pos=t}},Zs=class extends Fe{constructor(e,t,i){super("YAMLParseError",e,t,i)}},ei=class extends Fe{constructor(e,t,i){super("YAMLWarning",e,t,i)}},wc=(s,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(a=>e.linePos(a));let{line:i,col:n}=t.linePos[0];t.message+=` at line ${i}, column ${n}`;let r=n-1,o=s.substring(e.lineStarts[i-1],e.lineStarts[i]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){let a=Math.min(r-39,o.length-79);o="\u2026"+o.substring(a),r-=a-1}if(o.length>80&&(o=o.substring(0,79)+"\u2026"),i>1&&/^ *$/.test(o.substring(0,r))){let a=s.substring(e.lineStarts[i-2],e.lineStarts[i-1]);a.length>80&&(a=a.substring(0,79)+`\u2026
|
|
58
|
+
`),o=a+o}if(/[^ ]/.test(o)){let a=1,l=t.linePos[1];l?.line===i&&l.col>n&&(a=Math.max(1,Math.min(l.col-n,80-r)));let c=" ".repeat(r)+"^".repeat(a);t.message+=`:
|
|
59
|
+
|
|
60
|
+
${o}
|
|
61
|
+
${c}
|
|
62
|
+
`}};Re.YAMLError=Fe;Re.YAMLParseError=Zs;Re.YAMLWarning=ei;Re.prettifyError=wc});var Ye=g(yr=>{"use strict";function vc(s,{flow:e,indicator:t,next:i,offset:n,onError:r,parentIndent:o,startOnNewline:a}){let l=!1,c=a,d=a,f="",u="",m=!1,y=!1,h=null,p=null,S=null,w=null,v=null,k=null,N=null;for(let b of s)switch(y&&(b.type!=="space"&&b.type!=="newline"&&b.type!=="comma"&&r(b.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y=!1),h&&(c&&b.type!=="comment"&&b.type!=="newline"&&r(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),b.type){case"space":!e&&(t!=="doc-start"||i?.type!=="flow-collection")&&b.source.includes(" ")&&(h=b),d=!0;break;case"comment":{d||r(b,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let T=b.source.substring(1)||" ";f?f+=u+T:f=T,u="",c=!1;break}case"newline":c?f?f+=b.source:(!k||t!=="seq-item-ind")&&(l=!0):u+=b.source,c=!0,m=!0,(p||S)&&(w=b),d=!0;break;case"anchor":p&&r(b,"MULTIPLE_ANCHORS","A node can have at most one anchor"),b.source.endsWith(":")&&r(b.offset+b.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),p=b,N??(N=b.offset),c=!1,d=!1,y=!0;break;case"tag":{S&&r(b,"MULTIPLE_TAGS","A node can have at most one tag"),S=b,N??(N=b.offset),c=!1,d=!1,y=!0;break}case t:(p||S)&&r(b,"BAD_PROP_ORDER",`Anchors and tags must be after the ${b.source} indicator`),k&&r(b,"UNEXPECTED_TOKEN",`Unexpected ${b.source} in ${e??"collection"}`),k=b,c=t==="seq-item-ind"||t==="explicit-key-ind",d=!1;break;case"comma":if(e){v&&r(b,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),v=b,c=!1,d=!1;break}default:r(b,"UNEXPECTED_TOKEN",`Unexpected ${b.type} token`),c=!1,d=!1}let A=s[s.length-1],E=A?A.offset+A.source.length:n;return y&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&r(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h&&(c&&h.indent<=o||i?.type==="block-map"||i?.type==="block-seq")&&r(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:k,spaceBefore:l,comment:f,hasNewline:m,anchor:p,tag:S,newlineAfterProp:w,end:E,start:N??E}}yr.resolveProps=vc});var jt=g(br=>{"use strict";function ti(s){if(!s)return null;switch(s.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(s.source.includes(`
|
|
63
|
+
`))return!0;if(s.end){for(let e of s.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of s.items){for(let t of e.start)if(t.type==="newline")return!0;if(e.sep){for(let t of e.sep)if(t.type==="newline")return!0}if(ti(e.key)||ti(e.value))return!0}return!1;default:return!0}}br.containsNewline=ti});var si=g(Sr=>{"use strict";var kc=jt();function Nc(s,e,t){if(e?.type==="flow-collection"){let i=e.end[0];i.indent===s&&(i.source==="]"||i.source==="}")&&kc.containsNewline(e)&&t(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Sr.flowIndentCheck=Nc});var ii=g(vr=>{"use strict";var wr=q();function Ac(s,e,t){let{uniqueKeys:i}=s.options;if(i===!1)return!1;let n=typeof i=="function"?i:(r,o)=>r===o||wr.isScalar(r)&&wr.isScalar(o)&&r.value===o.value;return e.some(r=>n(r.key,t))}vr.mapIncludes=Ac});var Er=g(Or=>{"use strict";var kr=W(),qc=X(),Nr=Ye(),Oc=jt(),Ar=si(),Ec=ii(),qr="All mapping items must start at the same column";function Lc({composeNode:s,composeEmptyNode:e},t,i,n,r){let o=r?.nodeClass??qc.YAMLMap,a=new o(t.schema);t.atRoot&&(t.atRoot=!1);let l=i.offset,c=null;for(let d of i.items){let{start:f,key:u,sep:m,value:y}=d,h=Nr.resolveProps(f,{indicator:"explicit-key-ind",next:u??m?.[0],offset:l,onError:n,parentIndent:i.indent,startOnNewline:!0}),p=!h.found;if(p){if(u&&(u.type==="block-seq"?n(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in u&&u.indent!==i.indent&&n(l,"BAD_INDENT",qr)),!h.anchor&&!h.tag&&!m){c=h.end,h.comment&&(a.comment?a.comment+=`
|
|
64
|
+
`+h.comment:a.comment=h.comment);continue}(h.newlineAfterProp||Oc.containsNewline(u))&&n(u??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else h.found?.indent!==i.indent&&n(l,"BAD_INDENT",qr);t.atKey=!0;let S=h.end,w=u?s(t,u,h,n):e(t,S,f,null,h,n);t.schema.compat&&Ar.flowIndentCheck(i.indent,u,n),t.atKey=!1,Ec.mapIncludes(t,a.items,w)&&n(S,"DUPLICATE_KEY","Map keys must be unique");let v=Nr.resolveProps(m??[],{indicator:"map-value-ind",next:y,offset:w.range[2],onError:n,parentIndent:i.indent,startOnNewline:!u||u.type==="block-scalar"});if(l=v.end,v.found){p&&(y?.type==="block-map"&&!v.hasNewline&&n(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&h.start<v.found.offset-1024&&n(w.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let k=y?s(t,y,v,n):e(t,l,m,null,v,n);t.schema.compat&&Ar.flowIndentCheck(i.indent,y,n),l=k.range[2];let N=new kr.Pair(w,k);t.options.keepSourceTokens&&(N.srcToken=d),a.items.push(N)}else{p&&n(w.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),v.comment&&(w.comment?w.comment+=`
|
|
65
|
+
`+v.comment:w.comment=v.comment);let k=new kr.Pair(w);t.options.keepSourceTokens&&(k.srcToken=d),a.items.push(k)}}return c&&c<l&&n(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[i.offset,l,c??l],a}Or.resolveBlockMap=Lc});var Tr=g(Lr=>{"use strict";var Tc=z(),Cc=Ye(),Ic=si();function Pc({composeNode:s,composeEmptyNode:e},t,i,n,r){let o=r?.nodeClass??Tc.YAMLSeq,a=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let l=i.offset,c=null;for(let{start:d,value:f}of i.items){let u=Cc.resolveProps(d,{indicator:"seq-item-ind",next:f,offset:l,onError:n,parentIndent:i.indent,startOnNewline:!0});if(!u.found)if(u.anchor||u.tag||f)f?.type==="block-seq"?n(u.end,"BAD_INDENT","All sequence items must start at the same column"):n(l,"MISSING_CHAR","Sequence item without - indicator");else{c=u.end,u.comment&&(a.comment=u.comment);continue}let m=f?s(t,f,u,n):e(t,u.end,d,null,u,n);t.schema.compat&&Ic.flowIndentCheck(i.indent,f,n),l=m.range[2],a.items.push(m)}return a.range=[i.offset,l,c??l],a}Lr.resolveBlockSeq=Pc});var ye=g(Cr=>{"use strict";function Mc(s,e,t,i){let n="";if(s){let r=!1,o="";for(let a of s){let{source:l,type:c}=a;switch(c){case"space":r=!0;break;case"comment":{t&&!r&&i(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let d=l.substring(1)||" ";n?n+=o+d:n=d,o="";break}case"newline":n&&(o+=l),r=!0;break;default:i(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:n,offset:e}}Cr.resolveEnd=Mc});var _r=g(Mr=>{"use strict";var _c=q(),$c=W(),Ir=X(),Dc=z(),Bc=ye(),Pr=Ye(),Kc=jt(),jc=ii(),ni="Block collections are not allowed within flow collections",ri=s=>s&&(s.type==="block-map"||s.type==="block-seq");function Fc({composeNode:s,composeEmptyNode:e},t,i,n,r){let o=i.start.source==="{",a=o?"flow map":"flow sequence",l=r?.nodeClass??(o?Ir.YAMLMap:Dc.YAMLSeq),c=new l(t.schema);c.flow=!0;let d=t.atRoot;d&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let f=i.offset+i.start.source.length;for(let p=0;p<i.items.length;++p){let S=i.items[p],{start:w,key:v,sep:k,value:N}=S,A=Pr.resolveProps(w,{flow:a,indicator:"explicit-key-ind",next:v??k?.[0],offset:f,onError:n,parentIndent:i.indent,startOnNewline:!1});if(!A.found){if(!A.anchor&&!A.tag&&!k&&!N){p===0&&A.comma?n(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):p<i.items.length-1&&n(A.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),A.comment&&(c.comment?c.comment+=`
|
|
66
|
+
`+A.comment:c.comment=A.comment),f=A.end;continue}!o&&t.options.strict&&Kc.containsNewline(v)&&n(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(p===0)A.comma&&n(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(A.comma||n(A.start,"MISSING_CHAR",`Missing , between ${a} items`),A.comment){let E="";e:for(let b of w)switch(b.type){case"comma":case"space":break;case"comment":E=b.source.substring(1);break e;default:break e}if(E){let b=c.items[c.items.length-1];_c.isPair(b)&&(b=b.value??b.key),b.comment?b.comment+=`
|
|
67
|
+
`+E:b.comment=E,A.comment=A.comment.substring(E.length+1)}}if(!o&&!k&&!A.found){let E=N?s(t,N,A,n):e(t,A.end,k,null,A,n);c.items.push(E),f=E.range[2],ri(N)&&n(E.range,"BLOCK_IN_FLOW",ni)}else{t.atKey=!0;let E=A.end,b=v?s(t,v,A,n):e(t,E,w,null,A,n);ri(v)&&n(b.range,"BLOCK_IN_FLOW",ni),t.atKey=!1;let T=Pr.resolveProps(k??[],{flow:a,indicator:"map-value-ind",next:N,offset:b.range[2],onError:n,parentIndent:i.indent,startOnNewline:!1});if(T.found){if(!o&&!A.found&&t.options.strict){if(k)for(let C of k){if(C===T.found)break;if(C.type==="newline"){n(C,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}A.start<T.found.offset-1024&&n(T.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else N&&("source"in N&&N.source?.[0]===":"?n(N,"MISSING_CHAR",`Missing space after : in ${a}`):n(T.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let J=N?s(t,N,T,n):T.found?e(t,T.end,k,null,T,n):null;J?ri(N)&&n(J.range,"BLOCK_IN_FLOW",ni):T.comment&&(b.comment?b.comment+=`
|
|
68
|
+
`+T.comment:b.comment=T.comment);let ae=new $c.Pair(b,J);if(t.options.keepSourceTokens&&(ae.srcToken=S),o){let C=c;jc.mapIncludes(t,C.items,b)&&n(E,"DUPLICATE_KEY","Map keys must be unique"),C.items.push(ae)}else{let C=new Ir.YAMLMap(t.schema);C.flow=!0,C.items.push(ae);let Pi=(J??b).range;C.range=[b.range[0],Pi[1],Pi[2]],c.items.push(C)}f=J?J.range[2]:T.end}}let u=o?"}":"]",[m,...y]=i.end,h=f;if(m?.source===u)h=m.offset+m.source.length;else{let p=a[0].toUpperCase()+a.substring(1),S=d?`${p} must end with a ${u}`:`${p} in block collection must be sufficiently indented and end with a ${u}`;n(f,d?"MISSING_CHAR":"BAD_INDENT",S),m&&m.source.length!==1&&y.unshift(m)}if(y.length>0){let p=Bc.resolveEnd(y,h,t.options.strict,n);p.comment&&(c.comment?c.comment+=`
|
|
69
|
+
`+p.comment:c.comment=p.comment),c.range=[i.offset,h,p.offset]}else c.range=[i.offset,h,h];return c}Mr.resolveFlowCollection=Fc});var Dr=g($r=>{"use strict";var Rc=q(),Uc=L(),Yc=X(),Jc=z(),Vc=Er(),xc=Tr(),Hc=_r();function oi(s,e,t,i,n,r){let o=t.type==="block-map"?Vc.resolveBlockMap(s,e,t,i,r):t.type==="block-seq"?xc.resolveBlockSeq(s,e,t,i,r):Hc.resolveFlowCollection(s,e,t,i,r),a=o.constructor;return n==="!"||n===a.tagName?(o.tag=a.tagName,o):(n&&(o.tag=n),o)}function Gc(s,e,t,i,n){let r=i.tag,o=r?e.directives.tagName(r.source,u=>n(r,"TAG_RESOLVE_FAILED",u)):null;if(t.type==="block-seq"){let{anchor:u,newlineAfterProp:m}=i,y=u&&r?u.offset>r.offset?u:r:u??r;y&&(!m||m.offset<y.offset)&&n(y,"MISSING_CHAR","Missing newline after block sequence props")}let a=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!r||!o||o==="!"||o===Yc.YAMLMap.tagName&&a==="map"||o===Jc.YAMLSeq.tagName&&a==="seq")return oi(s,e,t,n,o);let l=e.schema.tags.find(u=>u.tag===o&&u.collection===a);if(!l){let u=e.schema.knownTags[o];if(u?.collection===a)e.schema.tags.push(Object.assign({},u,{default:!1})),l=u;else return u?n(r,"BAD_COLLECTION_TYPE",`${u.tag} used for ${a} collection, but expects ${u.collection??"scalar"}`,!0):n(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),oi(s,e,t,n,o)}let c=oi(s,e,t,n,o,l),d=l.resolve?.(c,u=>n(r,"TAG_RESOLVE_FAILED",u),e.options)??c,f=Rc.isNode(d)?d:new Uc.Scalar(d);return f.range=c.range,f.tag=o,l?.format&&(f.format=l.format),f}$r.composeCollection=Gc});var li=g(Br=>{"use strict";var ai=L();function Wc(s,e,t){let i=e.offset,n=Qc(e,s.options.strict,t);if(!n)return{value:"",type:null,comment:"",range:[i,i,i]};let r=n.mode===">"?ai.Scalar.BLOCK_FOLDED:ai.Scalar.BLOCK_LITERAL,o=e.source?Xc(e.source):[],a=o.length;for(let h=o.length-1;h>=0;--h){let p=o[h][1];if(p===""||p==="\r")a=h;else break}if(a===0){let h=n.chomp==="+"&&o.length>0?`
|
|
70
|
+
`.repeat(Math.max(1,o.length-1)):"",p=i+n.length;return e.source&&(p+=e.source.length),{value:h,type:r,comment:n.comment,range:[i,p,p]}}let l=e.indent+n.indent,c=e.offset+n.length,d=0;for(let h=0;h<a;++h){let[p,S]=o[h];if(S===""||S==="\r")n.indent===0&&p.length>l&&(l=p.length);else{p.length<l&&t(c+p.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),n.indent===0&&(l=p.length),d=h,l===0&&!s.atRoot&&t(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=p.length+S.length+1}for(let h=o.length-1;h>=a;--h)o[h][0].length>l&&(a=h+1);let f="",u="",m=!1;for(let h=0;h<d;++h)f+=o[h][0].slice(l)+`
|
|
71
|
+
`;for(let h=d;h<a;++h){let[p,S]=o[h];c+=p.length+S.length+1;let w=S[S.length-1]==="\r";if(w&&(S=S.slice(0,-1)),S&&p.length<l){let k=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;t(c-S.length-(w?2:1),"BAD_INDENT",k),p=""}r===ai.Scalar.BLOCK_LITERAL?(f+=u+p.slice(l)+S,u=`
|
|
72
|
+
`):p.length>l||S[0]===" "?(u===" "?u=`
|
|
73
|
+
`:!m&&u===`
|
|
74
|
+
`&&(u=`
|
|
75
|
+
|
|
76
|
+
`),f+=u+p.slice(l)+S,u=`
|
|
77
|
+
`,m=!0):S===""?u===`
|
|
78
|
+
`?f+=`
|
|
79
|
+
`:u=`
|
|
80
|
+
`:(f+=u+S,u=" ",m=!1)}switch(n.chomp){case"-":break;case"+":for(let h=a;h<o.length;++h)f+=`
|
|
81
|
+
`+o[h][0].slice(l);f[f.length-1]!==`
|
|
82
|
+
`&&(f+=`
|
|
83
|
+
`);break;default:f+=`
|
|
84
|
+
`}let y=i+n.length+e.source.length;return{value:f,type:r,comment:n.comment,range:[i,y,y]}}function Qc({offset:s,props:e},t,i){if(e[0].type!=="block-scalar-header")return i(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:n}=e[0],r=n[0],o=0,a="",l=-1;for(let u=1;u<n.length;++u){let m=n[u];if(!a&&(m==="-"||m==="+"))a=m;else{let y=Number(m);!o&&y?o=y:l===-1&&(l=s+u)}}l!==-1&&i(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let c=!1,d="",f=n.length;for(let u=1;u<e.length;++u){let m=e[u];switch(m.type){case"space":c=!0;case"newline":f+=m.source.length;break;case"comment":t&&!c&&i(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=m.source.length,d=m.source.substring(1);break;case"error":i(m,"UNEXPECTED_TOKEN",m.message),f+=m.source.length;break;default:{let y=`Unexpected token in block scalar header: ${m.type}`;i(m,"UNEXPECTED_TOKEN",y);let h=m.source;h&&typeof h=="string"&&(f+=h.length)}}}return{mode:r,indent:o,chomp:a,comment:d,length:f}}function Xc(s){let e=s.split(/\n( *)/),t=e[0],i=t.match(/^( *)/),r=[i?.[1]?[i[1],t.slice(i[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)r.push([e[o],e[o+1]]);return r}Br.resolveBlockScalar=Wc});var fi=g(jr=>{"use strict";var ci=L(),zc=ye();function Zc(s,e,t){let{offset:i,type:n,source:r,end:o}=s,a,l,c=(u,m,y)=>t(i+u,m,y);switch(n){case"scalar":a=ci.Scalar.PLAIN,l=ef(r,c);break;case"single-quoted-scalar":a=ci.Scalar.QUOTE_SINGLE,l=tf(r,c);break;case"double-quoted-scalar":a=ci.Scalar.QUOTE_DOUBLE,l=sf(r,c);break;default:return t(s,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[i,i+r.length,i+r.length]}}let d=i+r.length,f=zc.resolveEnd(o,d,e,t);return{value:l,type:a,comment:f.comment,range:[i,d,f.offset]}}function ef(s,e){let t="";switch(s[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${s[0]}`;break}case"@":case"`":{t=`reserved character ${s[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Kr(s)}function tf(s,e){return(s[s.length-1]!=="'"||s.length===1)&&e(s.length,"MISSING_CHAR","Missing closing 'quote"),Kr(s.slice(1,-1)).replace(/''/g,"'")}function Kr(s){let e=/(.*?)\r?\n/sy,t=e.exec(s);if(!t)return s;let i,n;try{i=new RegExp("(?<![ ])[ ]+$"),n=new RegExp("^[ ]+|(?<![ ])[ ]+$","g")}catch{i=/[ \t]+$/,n=/^[ \t]+|[ \t]+$/g}let r=t[1].replace(i,""),o=" ",a=e.lastIndex;for(;t=e.exec(s);){let c=t[1].replace(n,"");c===""?o===`
|
|
85
|
+
`?r+=o:o=`
|
|
86
|
+
`:(r+=o+c,o=" "),a=e.lastIndex}let l=/[ \t]*(.*)/sy;return l.lastIndex=a,t=l.exec(s),r+o+(t?.[1]??"")}function sf(s,e){let t="";for(let i=1;i<s.length-1;++i){let n=s[i];if(!(n==="\r"&&s[i+1]===`
|
|
87
|
+
`))if(n===`
|
|
88
|
+
`){let{fold:r,offset:o}=nf(s,i);t+=r,i=o}else if(n==="\\"){let r=s[++i],o=rf[r];if(o)t+=o;else if(r===`
|
|
89
|
+
`)for(r=s[i+1];r===" "||r===" ";)r=s[++i+1];else if(r==="\r"&&s[i+1]===`
|
|
90
|
+
`)for(r=s[++i+1];r===" "||r===" ";)r=s[++i+1];else if(r==="x"||r==="u"||r==="U"){let a=r==="x"?2:r==="u"?4:8;t+=of(s,i+1,a,e),i+=a}else{let a=s.substr(i-1,2);e(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),t+=a}}else if(n===" "||n===" "){let r=i,o=s[i+1];for(;o===" "||o===" ";)o=s[++i+1];o!==`
|
|
91
|
+
`&&!(o==="\r"&&s[i+2]===`
|
|
92
|
+
`)&&(t+=i>r?s.slice(r,i+1):n)}else t+=n}return(s[s.length-1]!=='"'||s.length===1)&&e(s.length,"MISSING_CHAR",'Missing closing "quote'),t}function nf(s,e){let t="",i=s[e+1];for(;(i===" "||i===" "||i===`
|
|
93
|
+
`||i==="\r")&&!(i==="\r"&&s[e+2]!==`
|
|
94
|
+
`);)i===`
|
|
95
|
+
`&&(t+=`
|
|
96
|
+
`),e+=1,i=s[e+1];return t||(t=" "),{fold:t,offset:e}}var rf={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
97
|
+
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function of(s,e,t,i){let n=s.substr(e,t),o=n.length===t&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;try{return String.fromCodePoint(o)}catch{let a=s.substr(e-2,t+2);return i(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}jr.resolveFlowScalar=Zc});var Ur=g(Rr=>{"use strict";var re=q(),Fr=L(),af=li(),lf=fi();function cf(s,e,t,i){let{value:n,type:r,comment:o,range:a}=e.type==="block-scalar"?af.resolveBlockScalar(s,e,i):lf.resolveFlowScalar(e,s.options.strict,i),l=t?s.directives.tagName(t.source,f=>i(t,"TAG_RESOLVE_FAILED",f)):null,c;s.options.stringKeys&&s.atKey?c=s.schema[re.SCALAR]:l?c=ff(s.schema,n,l,t,i):e.type==="scalar"?c=uf(s,n,e,i):c=s.schema[re.SCALAR];let d;try{let f=c.resolve(n,u=>i(t??e,"TAG_RESOLVE_FAILED",u),s.options);d=re.isScalar(f)?f:new Fr.Scalar(f)}catch(f){let u=f instanceof Error?f.message:String(f);i(t??e,"TAG_RESOLVE_FAILED",u),d=new Fr.Scalar(n)}return d.range=a,d.source=n,r&&(d.type=r),l&&(d.tag=l),c.format&&(d.format=c.format),o&&(d.comment=o),d}function ff(s,e,t,i,n){if(t==="!")return s[re.SCALAR];let r=[];for(let a of s.tags)if(!a.collection&&a.tag===t)if(a.default&&a.test)r.push(a);else return a;for(let a of r)if(a.test?.test(e))return a;let o=s.knownTags[t];return o&&!o.collection?(s.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),s[re.SCALAR])}function uf({atKey:s,directives:e,schema:t},i,n,r){let o=t.tags.find(a=>(a.default===!0||s&&a.default==="key")&&a.test?.test(i))||t[re.SCALAR];if(t.compat){let a=t.compat.find(l=>l.default&&l.test?.test(i))??t[re.SCALAR];if(o.tag!==a.tag){let l=e.tagString(o.tag),c=e.tagString(a.tag),d=`Value may be parsed as either ${l} or ${c}`;r(n,"TAG_RESOLVE_FAILED",d,!0)}}return o}Rr.composeScalar=cf});var Jr=g(Yr=>{"use strict";function hf(s,e,t){if(e){t??(t=e.length);for(let i=t-1;i>=0;--i){let n=e[i];switch(n.type){case"space":case"comment":case"newline":s-=n.source.length;continue}for(n=e[++i];n?.type==="space";)s+=n.source.length,n=e[++i];break}}return s}Yr.emptyScalarPosition=hf});var Hr=g(hi=>{"use strict";var df=Ne(),pf=q(),mf=Dr(),Vr=Ur(),gf=ye(),yf=Jr(),bf={composeNode:xr,composeEmptyNode:ui};function xr(s,e,t,i){let n=s.atKey,{spaceBefore:r,comment:o,anchor:a,tag:l}=t,c,d=!0;switch(e.type){case"alias":c=Sf(s,e,i),(a||l)&&i(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Vr.composeScalar(s,e,l,i),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=mf.composeCollection(bf,s,e,t,i),a&&(c.anchor=a.source.substring(1))}catch(f){let u=f instanceof Error?f.message:String(f);i(e,"RESOURCE_EXHAUSTION",u)}break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;i(e,"UNEXPECTED_TOKEN",f),d=!1}}return c??(c=ui(s,e.offset,void 0,null,t,i)),a&&c.anchor===""&&i(a,"BAD_ALIAS","Anchor cannot be an empty string"),n&&s.options.stringKeys&&(!pf.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&i(l??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),r&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),s.options.keepSourceTokens&&d&&(c.srcToken=e),c}function ui(s,e,t,i,{spaceBefore:n,comment:r,anchor:o,tag:a,end:l},c){let d={type:"scalar",offset:yf.emptyScalarPosition(e,t,i),indent:-1,source:""},f=Vr.composeScalar(s,d,a,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(f.spaceBefore=!0),r&&(f.comment=r,f.range[2]=l),f}function Sf({options:s},{offset:e,source:t,end:i},n){let r=new df.Alias(t.substring(1));r.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),r.source.endsWith(":")&&n(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+t.length,a=gf.resolveEnd(i,o,s.strict,n);return r.range=[e,o,a.offset],a.comment&&(r.comment=a.comment),r}hi.composeEmptyNode=ui;hi.composeNode=xr});var Qr=g(Wr=>{"use strict";var wf=je(),Gr=Hr(),vf=ye(),kf=Ye();function Nf(s,e,{offset:t,start:i,value:n,end:r},o){let a=Object.assign({_directives:e},s),l=new wf.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},d=kf.resolveProps(i,{indicator:"doc-start",next:n??r?.[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});d.found&&(l.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!d.hasNewline&&o(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=n?Gr.composeNode(c,n,d,o):Gr.composeEmptyNode(c,d.end,i,null,d,o);let f=l.contents.range[2],u=vf.resolveEnd(r,f,!1,o);return u.comment&&(l.comment=u.comment),l.range=[t,f,u.offset],l}Wr.composeDoc=Nf});var pi=g(Zr=>{"use strict";var Af=require("process"),qf=Zt(),Of=je(),Je=Ue(),Xr=q(),Ef=Qr(),Lf=ye();function Ve(s){if(typeof s=="number")return[s,s+1];if(Array.isArray(s))return s.length===2?s:[s[0],s[1]];let{offset:e,source:t}=s;return[e,e+(typeof t=="string"?t.length:1)]}function zr(s){let e="",t=!1,i=!1;for(let n=0;n<s.length;++n){let r=s[n];switch(r[0]){case"#":e+=(e===""?"":i?`
|
|
98
|
+
|
|
99
|
+
`:`
|
|
100
|
+
`)+(r.substring(1)||" "),t=!0,i=!1;break;case"%":s[n+1]?.[0]!=="#"&&(n+=1),t=!1;break;default:t||(i=!0),t=!1}}return{comment:e,afterEmptyLine:i}}var di=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,i,n,r)=>{let o=Ve(t);r?this.warnings.push(new Je.YAMLWarning(o,i,n)):this.errors.push(new Je.YAMLParseError(o,i,n))},this.directives=new qf.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:i,afterEmptyLine:n}=zr(this.prelude);if(i){let r=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
101
|
+
${i}`:i;else if(n||e.directives.docStart||!r)e.commentBefore=i;else if(Xr.isCollection(r)&&!r.flow&&r.items.length>0){let o=r.items[0];Xr.isPair(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${i}
|
|
102
|
+
${a}`:i}else{let o=r.commentBefore;r.commentBefore=o?`${i}
|
|
103
|
+
${o}`:i}}if(t){for(let r=0;r<this.errors.length;++r)e.errors.push(this.errors[r]);for(let r=0;r<this.warnings.length;++r)e.warnings.push(this.warnings[r])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:zr(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,i=-1){for(let n of e)yield*this.next(n);yield*this.end(t,i)}*next(e){switch(Af.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,i,n)=>{let r=Ve(e);r[0]+=t,this.onError(r,"BAD_DIRECTIVE",i,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=Ef.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,i=new Je.YAMLParseError(Ve(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){let i="Unexpected doc-end without preceding document";this.errors.push(new Je.YAMLParseError(Ve(e),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;let t=Lf.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let i=this.doc.comment;this.doc.comment=i?`${i}
|
|
104
|
+
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Je.YAMLParseError(Ve(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let i=Object.assign({_directives:this.directives},this.options),n=new Of.Document(void 0,i);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,t,t],this.decorate(n,!1),yield n}}};Zr.Composer=di});var so=g(Ft=>{"use strict";var Tf=li(),Cf=fi(),If=Ue(),eo=Le();function Pf(s,e=!0,t){if(s){let i=(n,r,o)=>{let a=typeof n=="number"?n:Array.isArray(n)?n[0]:n.offset;if(t)t(a,r,o);else throw new If.YAMLParseError([a,a+1],r,o)};switch(s.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Cf.resolveFlowScalar(s,e,i);case"block-scalar":return Tf.resolveBlockScalar({options:{strict:e}},s,i)}}return null}function Mf(s,e){let{implicitKey:t=!1,indent:i,inFlow:n=!1,offset:r=-1,type:o="PLAIN"}=e,a=eo.stringifyString({type:o,value:s},{implicitKey:t,indent:i>0?" ".repeat(i):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),l=e.end??[{type:"newline",offset:-1,indent:i,source:`
|
|
105
|
+
`}];switch(a[0]){case"|":case">":{let c=a.indexOf(`
|
|
106
|
+
`),d=a.substring(0,c),f=a.substring(c+1)+`
|
|
107
|
+
`,u=[{type:"block-scalar-header",offset:r,indent:i,source:d}];return to(u,l)||u.push({type:"newline",offset:-1,indent:i,source:`
|
|
108
|
+
`}),{type:"block-scalar",offset:r,indent:i,props:u,source:f}}case'"':return{type:"double-quoted-scalar",offset:r,indent:i,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:r,indent:i,source:a,end:l};default:return{type:"scalar",offset:r,indent:i,source:a,end:l}}}function _f(s,e,t={}){let{afterKey:i=!1,implicitKey:n=!1,inFlow:r=!1,type:o}=t,a="indent"in s?s.indent:null;if(i&&typeof a=="number"&&(a+=2),!o)switch(s.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=s.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let l=eo.stringifyString({type:o,value:e},{implicitKey:n||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":$f(s,l);break;case'"':mi(s,l,"double-quoted-scalar");break;case"'":mi(s,l,"single-quoted-scalar");break;default:mi(s,l,"scalar")}}function $f(s,e){let t=e.indexOf(`
|
|
109
|
+
`),i=e.substring(0,t),n=e.substring(t+1)+`
|
|
110
|
+
`;if(s.type==="block-scalar"){let r=s.props[0];if(r.type!=="block-scalar-header")throw new Error("Invalid block scalar header");r.source=i,s.source=n}else{let{offset:r}=s,o="indent"in s?s.indent:-1,a=[{type:"block-scalar-header",offset:r,indent:o,source:i}];to(a,"end"in s?s.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
|
|
111
|
+
`});for(let l of Object.keys(s))l!=="type"&&l!=="offset"&&delete s[l];Object.assign(s,{type:"block-scalar",indent:o,props:a,source:n})}}function to(s,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":s.push(t);break;case"newline":return s.push(t),!0}return!1}function mi(s,e,t){switch(s.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":s.type=t,s.source=e;break;case"block-scalar":{let i=s.props.slice(1),n=e.length;s.props[0].type==="block-scalar-header"&&(n-=s.props[0].source.length);for(let r of i)r.offset+=n;delete s.props,Object.assign(s,{type:t,source:e,end:i});break}case"block-map":case"block-seq":{let n={type:"newline",offset:s.offset+e.length,indent:s.indent,source:`
|
|
112
|
+
`};delete s.items,Object.assign(s,{type:t,source:e,end:[n]});break}default:{let i="indent"in s?s.indent:-1,n="end"in s&&Array.isArray(s.end)?s.end.filter(r=>r.type==="space"||r.type==="comment"||r.type==="newline"):[];for(let r of Object.keys(s))r!=="type"&&r!=="offset"&&delete s[r];Object.assign(s,{type:t,indent:i,source:e,end:n})}}}Ft.createScalarToken=Mf;Ft.resolveAsScalar=Pf;Ft.setScalarValue=_f});var no=g(io=>{"use strict";var Df=s=>"type"in s?Ut(s):Rt(s);function Ut(s){switch(s.type){case"block-scalar":{let e="";for(let t of s.props)e+=Ut(t);return e+s.source}case"block-map":case"block-seq":{let e="";for(let t of s.items)e+=Rt(t);return e}case"flow-collection":{let e=s.start.source;for(let t of s.items)e+=Rt(t);for(let t of s.end)e+=t.source;return e}case"document":{let e=Rt(s);if(s.end)for(let t of s.end)e+=t.source;return e}default:{let e=s.source;if("end"in s&&s.end)for(let t of s.end)e+=t.source;return e}}}function Rt({start:s,key:e,sep:t,value:i}){let n="";for(let r of s)n+=r.source;if(e&&(n+=Ut(e)),t)for(let r of t)n+=r.source;return i&&(n+=Ut(i)),n}io.stringify=Df});var lo=g(ao=>{"use strict";var gi=Symbol("break visit"),Bf=Symbol("skip children"),ro=Symbol("remove item");function oe(s,e){"type"in s&&s.type==="document"&&(s={start:s.start,value:s.value}),oo(Object.freeze([]),s,e)}oe.BREAK=gi;oe.SKIP=Bf;oe.REMOVE=ro;oe.itemAtPath=(s,e)=>{let t=s;for(let[i,n]of e){let r=t?.[i];if(r&&"items"in r)t=r.items[n];else return}return t};oe.parentCollection=(s,e)=>{let t=oe.itemAtPath(s,e.slice(0,-1)),i=e[e.length-1][0],n=t?.[i];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function oo(s,e,t){let i=t(e,s);if(typeof i=="symbol")return i;for(let n of["key","value"]){let r=e[n];if(r&&"items"in r){for(let o=0;o<r.items.length;++o){let a=oo(Object.freeze(s.concat([[n,o]])),r.items[o],t);if(typeof a=="number")o=a-1;else{if(a===gi)return gi;a===ro&&(r.items.splice(o,1),o-=1)}}typeof i=="function"&&n==="key"&&(i=i(e,s))}}return typeof i=="function"?i(e,s):i}ao.visit=oe});var Yt=g($=>{"use strict";var yi=so(),Kf=no(),jf=lo(),bi="\uFEFF",Si="",wi="",vi="",Ff=s=>!!s&&"items"in s,Rf=s=>!!s&&(s.type==="scalar"||s.type==="single-quoted-scalar"||s.type==="double-quoted-scalar"||s.type==="block-scalar");function Uf(s){switch(s){case bi:return"<BOM>";case Si:return"<DOC>";case wi:return"<FLOW_END>";case vi:return"<SCALAR>";default:return JSON.stringify(s)}}function Yf(s){switch(s){case bi:return"byte-order-mark";case Si:return"doc-mode";case wi:return"flow-error-end";case vi:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
113
|
+
`:case`\r
|
|
114
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(s[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}$.createScalarToken=yi.createScalarToken;$.resolveAsScalar=yi.resolveAsScalar;$.setScalarValue=yi.setScalarValue;$.stringify=Kf.stringify;$.visit=jf.visit;$.BOM=bi;$.DOCUMENT=Si;$.FLOW_END=wi;$.SCALAR=vi;$.isCollection=Ff;$.isScalar=Rf;$.prettyToken=Uf;$.tokenType=Yf});var Ai=g(fo=>{"use strict";var xe=Yt();function K(s){switch(s){case void 0:case" ":case`
|
|
115
|
+
`:case"\r":case" ":return!0;default:return!1}}var co=new Set("0123456789ABCDEFabcdef"),Jf=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Jt=new Set(",[]{}"),Vf=new Set(` ,[]{}
|
|
116
|
+
\r `),ki=s=>!s||Vf.has(s),Ni=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let i=this.next??"stream";for(;i&&(t||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
|
|
117
|
+
`?!0:t==="\r"?this.buffer[e+1]===`
|
|
118
|
+
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let i=0;for(;t===" ";)t=this.buffer[++i+e];if(t==="\r"){let n=this.buffer[i+e+1];if(n===`
|
|
119
|
+
`||!n&&!this.atEnd)return e+i+1}return t===`
|
|
120
|
+
`||i>=this.indentNext||!t&&!this.atEnd?e+i:-1}if(t==="-"||t==="."){let i=this.buffer.substr(e,3);if((i==="---"||i==="...")&&K(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
121
|
+
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===xe.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,i=e.indexOf("#");for(;i!==-1;){let r=e[i-1];if(r===" "||r===" "){t=i-1;break}else i=e.indexOf("#",i+1)}for(;;){let r=e[t-1];if(r===" "||r===" ")t-=1;else break}let n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield xe.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&K(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!K(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&K(t)){let i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(ki),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,i=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=i=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let n=this.getLine();if(n===null)return this.setNext("flow");if((i!==-1&&i<this.indentNext&&n[0]!=="#"||i===0&&(n.startsWith("---")||n.startsWith("..."))&&K(n[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield xe.FLOW_END,yield*this.parseLineStart();let r=0;for(;n[r]===",";)r+=yield*this.pushCount(1),r+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(r+=yield*this.pushIndicators(),n[r]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-r),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(ki),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||K(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let r=0;for(;this.buffer[t-1-r]==="\\";)r+=1;if(r%2===0)break;t=this.buffer.indexOf('"',t+1)}let i=this.buffer.substring(0,t),n=i.indexOf(`
|
|
122
|
+
`,this.pos);if(n!==-1){for(;n!==-1;){let r=this.continueScalar(n+1);if(r===-1)break;n=i.indexOf(`
|
|
123
|
+
`,r)}n!==-1&&(t=n-(i[n-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>K(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,i;e:for(let r=this.pos;i=this.buffer[r];++r)switch(i){case" ":t+=1;break;case`
|
|
124
|
+
`:e=r,t=0;break;case"\r":{let o=this.buffer[r+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
|
|
125
|
+
`)break}default:break e}if(!i&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let r=this.continueScalar(e+1);if(r===-1)break;e=this.buffer.indexOf(`
|
|
126
|
+
`,r)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let n=e+1;for(i=this.buffer[n];i===" ";)i=this.buffer[++n];if(i===" "){for(;i===" "||i===" "||i==="\r"||i===`
|
|
127
|
+
`;)i=this.buffer[++n];e=n-1}else if(!this.blockScalarKeep)do{let r=e-1,o=this.buffer[r];o==="\r"&&(o=this.buffer[--r]);let a=r;for(;o===" ";)o=this.buffer[--r];if(o===`
|
|
128
|
+
`&&r>=this.pos&&r+1+t>a)e=r;else break}while(!0);return yield xe.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,i=this.pos-1,n;for(;n=this.buffer[++i];)if(n===":"){let r=this.buffer[i+1];if(K(r)||e&&Jt.has(r))break;t=i}else if(K(n)){let r=this.buffer[i+1];if(n==="\r"&&(r===`
|
|
129
|
+
`?(i+=1,n=`
|
|
130
|
+
`,r=this.buffer[i+1]):t=i),r==="#"||e&&Jt.has(r))break;if(n===`
|
|
131
|
+
`){let o=this.continueScalar(i+1);if(o===-1)break;i=Math.max(i,o-2)}}else{if(e&&Jt.has(n))break;t=i}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield xe.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let i=this.buffer.slice(this.pos,e);return i?(yield i,this.pos+=i.length,i.length):(t&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(ki),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,i=this.charAt(1);if(K(i)||t&&Jt.has(i)){t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!K(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(Jf.has(t))t=this.buffer[++e];else if(t==="%"&&co.has(this.buffer[e+1])&&co.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
|
132
|
+
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
133
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,i;do i=this.buffer[++t];while(i===" "||e&&i===" ");let n=t-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=t),n}*pushUntil(e){let t=this.pos,i=this.buffer[t];for(;!e(i);)i=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};fo.Lexer=Ni});var Oi=g(uo=>{"use strict";var qi=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,i=this.lineStarts.length;for(;t<i;){let r=t+i>>1;this.lineStarts[r]<e?t=r+1:i=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let n=this.lineStarts[t-1];return{line:t,col:e-n+1}}}};uo.LineCounter=qi});var Li=g(yo=>{"use strict";var xf=require("process"),ho=Yt(),Hf=Ai();function Z(s,e){for(let t=0;t<s.length;++t)if(s[t].type===e)return!0;return!1}function po(s){for(let e=0;e<s.length;++e)switch(s[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function go(s){switch(s?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Vt(s){switch(s.type){case"document":return s.start;case"block-map":{let e=s.items[s.items.length-1];return e.sep??e.start}case"block-seq":return s.items[s.items.length-1].start;default:return[]}}function be(s){if(s.length===0)return[];let e=s.length;e:for(;--e>=0;)switch(s[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;s[++e]?.type==="space";);return s.splice(e,s.length)}function xt(s,e){if(e.length<1e5)Array.prototype.push.apply(s,e);else for(let t=0;t<e.length;++t)s.push(e[t])}function mo(s){if(s.start.type==="flow-seq-start")for(let e of s.items)e.sep&&!e.value&&!Z(e.start,"explicit-key-ind")&&!Z(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,go(e.value)?e.value.end?xt(e.value.end,e.sep):e.value.end=e.sep:xt(e.start,e.sep),delete e.sep)}var Ei=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Hf.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let i of this.lexer.lex(e,t))yield*this.next(i);t||(yield*this.end())}*next(e){if(this.source=e,xf.env.LOG_TOKENS&&console.log("|",ho.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=ho.tokenType(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let i=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let i=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in i?i.indent:0:t.type==="flow-collection"&&i.type==="document"&&(t.indent=0),t.type==="flow-collection"&&mo(t),i.type){case"document":i.value=t;break;case"block-scalar":i.props.push(t);break;case"block-map":{let n=i.items[i.items.length-1];if(n.value){i.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=i.items[i.items.length-1];n.value?i.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{let n=i.items[i.items.length-1];!n||n.value?i.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&po(n.start)===-1&&(t.indent===0||n.start.every(r=>r.type!=="comment"||r.indent<t.indent))&&(i.type==="document"?i.end=n.start:i.items.push({start:n.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{po(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let t=Vt(this.peek(2)),i=be(t),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
|
|
134
|
+
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
135
|
+
`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let i="end"in t.value?t.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){xt(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let i=!this.onKeyLine&&this.indent===e.indent,n=i&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",r=[];if(n&&t.sep&&!t.value){let o=[];for(let a=0;a<t.sep.length;++a){let l=t.sep[a];switch(l.type){case"newline":o.push(a);break;case"space":break;case"comment":l.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(r=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":n||t.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):n||t.value?(r.push(this.sourceToken),e.items.push({start:r,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Z(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(go(t.key)&&!Z(t.sep,"newline")){let o=be(t.start),a=t.key,l=t.sep;l.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:l}]})}else r.length>0?t.sep=t.sep.concat(r,this.sourceToken):t.sep.push(this.sourceToken);else if(Z(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=be(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||n?e.items.push({start:r,key:null,sep:[this.sourceToken]}):Z(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);n||t.value?(e.items.push({start:r,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!t.explicitKey&&t.sep&&!Z(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else i&&e.items.push({start:r});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let i="end"in t.value?t.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){xt(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||Z(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let i=this.startBlockValue(e);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let i=this.startBlockValue(e);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{let i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===e.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){let n=Vt(i),r=be(n);mo(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
|
|
136
|
+
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
137
|
+
`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=Vt(e),i=be(t);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=Vt(e),i=be(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};yo.Parser=Ei});var ko=g(Ge=>{"use strict";var bo=pi(),Gf=je(),He=Ue(),Wf=hs(),Qf=q(),Xf=Oi(),So=Li();function wo(s){let e=s.prettyErrors!==!1;return{lineCounter:s.lineCounter||e&&new Xf.LineCounter||null,prettyErrors:e}}function zf(s,e={}){let{lineCounter:t,prettyErrors:i}=wo(e),n=new So.Parser(t?.addNewLine),r=new bo.Composer(e),o=Array.from(r.compose(n.parse(s)));if(i&&t)for(let a of o)a.errors.forEach(He.prettifyError(s,t)),a.warnings.forEach(He.prettifyError(s,t));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}function vo(s,e={}){let{lineCounter:t,prettyErrors:i}=wo(e),n=new So.Parser(t?.addNewLine),r=new bo.Composer(e),o=null;for(let a of r.compose(n.parse(s),!0,s.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new He.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&t&&(o.errors.forEach(He.prettifyError(s,t)),o.warnings.forEach(He.prettifyError(s,t))),o}function Zf(s,e,t){let i;typeof e=="function"?i=e:t===void 0&&e&&typeof e=="object"&&(t=e);let n=vo(s,t);if(!n)return null;if(n.warnings.forEach(r=>Wf.warn(n.options.logLevel,r)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:i},t))}function eu(s,e,t){let i=null;if(typeof e=="function"||Array.isArray(e)?i=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let n=Math.round(t);t=n<1?void 0:n>8?{indent:8}:{indent:n}}if(s===void 0){let{keepUndefined:n}=t??e??{};if(!n)return}return Qf.isDocument(s)&&!i?s.toString(t):new Gf.Document(s,i,t).toString(t)}Ge.parse=Zf;Ge.parseAllDocuments=zf;Ge.parseDocument=vo;Ge.stringify=eu});var Ao=g(O=>{"use strict";var tu=pi(),su=je(),iu=Gs(),Ti=Ue(),nu=Ne(),ee=q(),ru=W(),ou=L(),au=X(),lu=z(),cu=Yt(),fu=Ai(),uu=Oi(),hu=Li(),Ht=ko(),No=Se();O.Composer=tu.Composer;O.Document=su.Document;O.Schema=iu.Schema;O.YAMLError=Ti.YAMLError;O.YAMLParseError=Ti.YAMLParseError;O.YAMLWarning=Ti.YAMLWarning;O.Alias=nu.Alias;O.isAlias=ee.isAlias;O.isCollection=ee.isCollection;O.isDocument=ee.isDocument;O.isMap=ee.isMap;O.isNode=ee.isNode;O.isPair=ee.isPair;O.isScalar=ee.isScalar;O.isSeq=ee.isSeq;O.Pair=ru.Pair;O.Scalar=ou.Scalar;O.YAMLMap=au.YAMLMap;O.YAMLSeq=lu.YAMLSeq;O.CST=cu;O.Lexer=fu.Lexer;O.LineCounter=uu.LineCounter;O.Parser=hu.Parser;O.parse=Ht.parse;O.parseAllDocuments=Ht.parseAllDocuments;O.parseDocument=Ht.parseDocument;O.stringify=Ht.stringify;O.visit=No.visit;O.visitAsync=No.visitAsync});var Wt=require("node:child_process"),j=require("node:fs"),M=require("node:path"),To=Ko(Ao(),1);var We=require("node:fs"),qo=require("node:os"),Gt=require("node:path"),Oo=(s=process.env)=>(0,Gt.resolve)(s.CODEX_HOME??(0,Gt.join)((0,qo.homedir)(),".codex")),du=s=>s.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase();function Ci(s){let e=JSON.parse((0,We.readFileSync)(s,"utf8"));return Object.entries(e.hooks??{}).flatMap(([t,i])=>(Array.isArray(i)?i:[]).flatMap((n,r)=>(Array.isArray(n?.hooks)?n.hooks:[]).map((o,a)=>`${s}:${du(t)}:${r}:${a}`)))}function Eo(s){return new Set([...s.matchAll(/^\[hooks\.state\."([^"]+)"\]\s*$/gm)].map(e=>e[1]))}function Ii(s,e){let t=(0,We.realpathSync)(s);return Ci(s).filter(i=>!e.has(i)&&!e.has(t+i.slice(s.length)))}var Co={SessionStart:"session-start",SubagentStart:"subagent-start",PostCompact:"post-compact",PreToolUse:"before-tool",PostToolUse:"after-tool",UserPromptSubmit:"user-prompt",Stop:"stop"};function pu(s){for(let e=(0,M.resolve)(s);;e=(0,M.dirname)(e)){let t=["control/config.yaml","sumi.config.yaml"].map(i=>(0,M.join)(e,i)).find(j.existsSync);if(t){let i=(0,To.parse)((0,j.readFileSync)(t,"utf8"));return Array.isArray(i?.agents)&&i.agents.includes("codex")&&(0,j.existsSync)((0,M.join)(e,".codex/hooks.json"))?e:null}if((0,M.dirname)(e)===e)return null}}function Lo(s){let e=(0,Wt.execFileSync)("git",["rev-parse","--path-format=absolute","--git-common-dir"],{cwd:s,encoding:"utf8",stdio:["ignore","pipe","ignore"],windowsHide:!0}).trim();return(0,j.realpathSync)(e)}function mu(s,e,t){let i=Lo(s),n=(0,j.readFileSync)(e);return[...new Set([...t].flatMap(o=>{let a=/^(.*[/\\]\.codex[/\\]hooks\.json):[a-z_]+:\d+:\d+$/.exec(o);return a?[a[1]]:[]}))].some(o=>{try{return!(0,M.isAbsolute)(o)||!n.equals((0,j.readFileSync)(o))||!Ci(o).length||Ii(o,t).length?!1:Lo((0,M.dirname)((0,M.dirname)(o)))===i}catch{return!1}})}function gu(s,e){if(s.type!=="command"||typeof s.command!="string")return null;let t='node "$(git rev-parse --show-toplevel)/control/bin/sumi-hook.cjs" hook ';if(!s.command.startsWith(t))return null;let i=/^([a-z-]+) codex (control\/bin\/sumi\.cjs|node_modules\/(?:@fantasticit\/sumi|@sumi\/cli)\/dist\/bin\.js)( \|\| exit 2)?$/.exec(s.command.slice(t.length));return!i||i[1]!==Co[e]?null:{args:["hook",i[1],"codex",i[2]],closed:!!i[3]}}async function yu(s){let e,t,i;try{let n=JSON.parse(s);if(typeof n.cwd!="string"||!(0,M.isAbsolute)(n.cwd))return 0;t=n.cwd;let r=pu(n.cwd);if(!r||typeof n.hook_event_name!="string")return 0;e=r;let o=n.hook_event_name;if(!Object.hasOwn(Co,o))return 0;let a=(0,M.join)(e,".codex/hooks.json"),l=Eo((0,j.readFileSync)((0,M.join)(Oo(),"config.toml"),"utf8"));if(!l.size||!Ii(a,l).length||!mu(e,a,l))return 0;i=(JSON.parse((0,j.readFileSync)(a,"utf8")).hooks?.[o]??[]).flatMap(d=>d.matcher&&(typeof n.tool_name!="string"||!new RegExp(d.matcher).test(n.tool_name))?[]:(d.hooks??[]).flatMap(f=>{let u=gu(f,o);return u?[u]:[]}))}catch{return 0}for(let n of i){let r=await new Promise(o=>{let a=(0,Wt.spawn)(process.execPath,[(0,M.join)(e,"control/bin/sumi-hook.cjs"),...n.args],{cwd:t,stdio:["pipe","inherit","inherit"],windowsHide:!0});a.stdin.on("error",()=>{}),a.stdin.end(s),a.on("error",()=>o(1)),a.on("close",l=>o(l??1))});if(r)return n.closed?2:r}return 0}var Io="";process.stdin.setEncoding("utf8");process.stdin.on("data",s=>{Io+=s});process.stdin.on("end",()=>{yu(Io).then(s=>{process.exitCode=s})});process.stdin.on("error",()=>{process.exitCode=0});
|